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

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: fix sender app 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::CastLoggingConfig& logging_config,
24 const media::cast::transport::CastTransportStatusCallback& status_cb,
25 const media::cast::transport::BulkRawEventsCallback& raw_events_cb);
23 26
24 virtual ~CastTransportSenderIPC(); 27 virtual ~CastTransportSenderIPC();
25 28
26 // media::cast::transport::CastTransportSender implementation. 29 // media::cast::transport::CastTransportSender implementation.
27 virtual void SetPacketReceiver( 30 virtual void SetPacketReceiver(
28 const media::cast::transport::PacketReceiverCallback& packet_callback) 31 const media::cast::transport::PacketReceiverCallback& packet_callback)
29 OVERRIDE; 32 OVERRIDE;
30 virtual void InsertCodedAudioFrame( 33 virtual void InsertCodedAudioFrame(
31 const media::cast::transport::EncodedAudioFrame* audio_frame, 34 const media::cast::transport::EncodedAudioFrame* audio_frame,
32 const base::TimeTicks& recorded_time) OVERRIDE; 35 const base::TimeTicks& recorded_time) OVERRIDE;
(...skipping 19 matching lines...) Expand all
52 OVERRIDE; 55 OVERRIDE;
53 56
54 void OnReceivedPacket(const media::cast::transport::Packet& packet); 57 void OnReceivedPacket(const media::cast::transport::Packet& packet);
55 void OnNotifyStatusChange( 58 void OnNotifyStatusChange(
56 media::cast::transport::CastTransportStatus status); 59 media::cast::transport::CastTransportStatus status);
57 void OnRtpStatistics( 60 void OnRtpStatistics(
58 bool audio, 61 bool audio,
59 const media::cast::transport::RtcpSenderInfo& sender_info, 62 const media::cast::transport::RtcpSenderInfo& sender_info,
60 base::TimeTicks time_sent, 63 base::TimeTicks time_sent,
61 uint32 rtp_timestamp); 64 uint32 rtp_timestamp);
65 void OnRawEvents(const std::vector<media::cast::PacketEvent>& packet_events);
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