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

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: Addressed hubbe's comments 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 media::cast::transport::CastTransportConfig& config, 22 const media::cast::transport::CastTransportConfig& config,
22 const media::cast::transport::CastTransportStatusCallback& status_cb); 23 const media::cast::transport::CastTransportStatusCallback& status_cb,
24 const media::cast::transport::BulkRawEventsCallback& raw_events_cb);
23 25
24 virtual ~CastTransportSenderIPC(); 26 virtual ~CastTransportSenderIPC();
25 27
26 // media::cast::transport::CastTransportSender implementation. 28 // media::cast::transport::CastTransportSender implementation.
27 virtual void SetPacketReceiver( 29 virtual void SetPacketReceiver(
28 const media::cast::transport::PacketReceiverCallback& packet_callback) 30 const media::cast::transport::PacketReceiverCallback& packet_callback)
29 OVERRIDE; 31 OVERRIDE;
30 virtual void InsertCodedAudioFrame( 32 virtual void InsertCodedAudioFrame(
31 const media::cast::transport::EncodedAudioFrame* audio_frame, 33 const media::cast::transport::EncodedAudioFrame* audio_frame,
32 const base::TimeTicks& recorded_time) OVERRIDE; 34 const base::TimeTicks& recorded_time) OVERRIDE;
(...skipping 19 matching lines...) Expand all
52 OVERRIDE; 54 OVERRIDE;
53 55
54 void OnReceivedPacket(const media::cast::transport::Packet& packet); 56 void OnReceivedPacket(const media::cast::transport::Packet& packet);
55 void OnNotifyStatusChange( 57 void OnNotifyStatusChange(
56 media::cast::transport::CastTransportStatus status); 58 media::cast::transport::CastTransportStatus status);
57 void OnRtpStatistics( 59 void OnRtpStatistics(
58 bool audio, 60 bool audio,
59 const media::cast::transport::RtcpSenderInfo& sender_info, 61 const media::cast::transport::RtcpSenderInfo& sender_info,
60 base::TimeTicks time_sent, 62 base::TimeTicks time_sent,
61 uint32 rtp_timestamp); 63 uint32 rtp_timestamp);
64 void OnRawEvents(const std::vector<media::cast::PacketEvent>& packet_events)
65 OVERRIDE;
62 66
63 private: 67 private:
64 void Send(IPC::Message* message); 68 void Send(IPC::Message* message);
65 69
66 int32 channel_id_; 70 int32 channel_id_;
67 media::cast::transport::PacketReceiverCallback packet_callback_; 71 media::cast::transport::PacketReceiverCallback packet_callback_;
68 media::cast::transport::CastTransportStatusCallback status_callback_; 72 media::cast::transport::CastTransportStatusCallback status_callback_;
69 media::cast::transport::CastTransportRtpStatistics audio_rtp_callback_; 73 media::cast::transport::CastTransportRtpStatistics audio_rtp_callback_;
70 media::cast::transport::CastTransportRtpStatistics video_rtp_callback_; 74 media::cast::transport::CastTransportRtpStatistics video_rtp_callback_;
75 media::cast::transport::BulkRawEventsCallback raw_events_callback_;
76
71 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderIPC); 77 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderIPC);
72 }; 78 };
73 79
74 #endif // CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_ 80 #endif // CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698