Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Side by Side Diff: chrome/renderer/media/cast_transport_sender_ipc.h

Issue 178073004: Cast: IPC from browser to renderer to send packet events from transport to cast library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_ 5 #ifndef CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_
6 #define CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_ 6 #define CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_
7 7
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "ipc/ipc_channel_proxy.h" 9 #include "ipc/ipc_channel_proxy.h"
10 #include "media/cast/logging/logging_defines.h"
10 #include "media/cast/transport/cast_transport_sender.h" 11 #include "media/cast/transport/cast_transport_sender.h"
11 12
12 // This implementation of the CastTransportSender interface 13 // This implementation of the CastTransportSender interface
13 // communicates with the browser process over IPC and relays 14 // communicates with the browser process over IPC and relays
14 // all calls to/from the transport sender to the browser process. 15 // all calls to/from the transport sender to the browser process.
15 // The primary reason for this arrangement is to give the 16 // The primary reason for this arrangement is to give the
16 // renderer less direct control over the UDP sockets. 17 // renderer less direct control over the UDP sockets.
17 class CastTransportSenderIPC 18 class CastTransportSenderIPC
18 : public media::cast::transport::CastTransportSender { 19 : public media::cast::transport::CastTransportSender {
19 public: 20 public:
20 CastTransportSenderIPC( 21 CastTransportSenderIPC(
21 const net::IPEndPoint& local_end_point, 22 const net::IPEndPoint& local_end_point,
22 const net::IPEndPoint& remote_end_point, 23 const net::IPEndPoint& remote_end_point,
23 const media::cast::transport::CastTransportStatusCallback& status_cb); 24 const media::cast::transport::CastTransportStatusCallback& status_cb,
25 const media::cast::CastLoggingConfig& logging_config,
26 const media::cast::transport::BulkRawEventsCallback& raw_events_cb);
24 27
25 virtual ~CastTransportSenderIPC(); 28 virtual ~CastTransportSenderIPC();
26 29
27 // media::cast::transport::CastTransportSender implementation. 30 // media::cast::transport::CastTransportSender implementation.
28 virtual void SetPacketReceiver( 31 virtual void SetPacketReceiver(
29 const media::cast::transport::PacketReceiverCallback& packet_callback) 32 const media::cast::transport::PacketReceiverCallback& packet_callback)
30 OVERRIDE; 33 OVERRIDE;
31 virtual void InitializeAudio( 34 virtual void InitializeAudio(
32 const media::cast::transport::CastTransportAudioConfig& config) OVERRIDE; 35 const media::cast::transport::CastTransportAudioConfig& config) OVERRIDE;
33 virtual void InitializeVideo( 36 virtual void InitializeVideo(
(...skipping 23 matching lines...) Expand all
57 OVERRIDE; 60 OVERRIDE;
58 61
59 void OnReceivedPacket(const media::cast::transport::Packet& packet); 62 void OnReceivedPacket(const media::cast::transport::Packet& packet);
60 void OnNotifyStatusChange( 63 void OnNotifyStatusChange(
61 media::cast::transport::CastTransportStatus status); 64 media::cast::transport::CastTransportStatus status);
62 void OnRtpStatistics( 65 void OnRtpStatistics(
63 bool audio, 66 bool audio,
64 const media::cast::transport::RtcpSenderInfo& sender_info, 67 const media::cast::transport::RtcpSenderInfo& sender_info,
65 base::TimeTicks time_sent, 68 base::TimeTicks time_sent,
66 uint32 rtp_timestamp); 69 uint32 rtp_timestamp);
70 void OnRawEvents(const std::vector<media::cast::PacketEvent>& packet_events);
67 71
68 private: 72 private:
69 void Send(IPC::Message* message); 73 void Send(IPC::Message* message);
70 74
71 int32 channel_id_; 75 int32 channel_id_;
72 media::cast::transport::PacketReceiverCallback packet_callback_; 76 media::cast::transport::PacketReceiverCallback packet_callback_;
73 media::cast::transport::CastTransportStatusCallback status_callback_; 77 media::cast::transport::CastTransportStatusCallback status_callback_;
74 media::cast::transport::CastTransportRtpStatistics audio_rtp_callback_; 78 media::cast::transport::CastTransportRtpStatistics audio_rtp_callback_;
75 media::cast::transport::CastTransportRtpStatistics video_rtp_callback_; 79 media::cast::transport::CastTransportRtpStatistics video_rtp_callback_;
80 media::cast::transport::BulkRawEventsCallback raw_events_callback_;
81
76 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderIPC); 82 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderIPC);
77 }; 83 };
78 84
79 #endif // CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_ 85 #endif // CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_session_delegate.cc ('k') | chrome/renderer/media/cast_transport_sender_ipc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698