OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
acolwell GONE FROM CHROMIUM
2014/02/13 19:28:58
nit: Remove "(c) ".
hubbe
2014/02/14 00:03:24
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_ | |
6 #define CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_ | |
7 | |
8 #include "base/message_loop/message_loop_proxy.h" | |
9 #include "ipc/ipc_channel_proxy.h" | |
10 #include "media/cast/transport/cast_transport_sender.h" | |
11 | |
acolwell GONE FROM CHROMIUM
2014/02/13 19:28:58
nit: I believe this needs to be inside a namespace
hubbe
2014/02/14 00:03:24
See other comment.
| |
12 // This implementation of the CastTransportSender interface | |
13 // communicates with the browser process over IPC and relays | |
14 // all calls to/from the transport sender to the browser process. | |
15 // The primary reason for this arrangement is to give the | |
16 // renderer less direct control over the UDP sockets. | |
17 class CastTransportSenderIPC | |
18 : public media::cast::transport::CastTransportSender { | |
19 public: | |
20 CastTransportSenderIPC( | |
21 const media::cast::transport::CastTransportConfig& config, | |
22 const media::cast::transport::CastTransportStatusCallback& status_cb); | |
23 | |
24 virtual ~CastTransportSenderIPC(); | |
25 | |
26 // media::cast::transport::CastTransportSender implementation. | |
27 virtual void SetPacketReceiver( | |
28 const media::cast::transport::PacketReceiverCallback& packet_callback) | |
29 OVERRIDE; | |
30 virtual void InsertCodedAudioFrame( | |
31 const media::cast::transport::EncodedAudioFrame* audio_frame, | |
32 const base::TimeTicks& recorded_time) OVERRIDE; | |
33 virtual void InsertCodedVideoFrame( | |
34 const media::cast::transport::EncodedVideoFrame* video_frame, | |
35 const base::TimeTicks& capture_time) OVERRIDE; | |
36 virtual void SendRtcpFromRtpSender( | |
37 uint32 packet_type_flags, | |
38 const media::cast::transport::RtcpSenderInfo& sender_info, | |
39 const media::cast::transport::RtcpDlrrReportBlock& dlrr, | |
40 const media::cast::transport::RtcpSenderLogMessage& sender_log, | |
41 uint32 sending_ssrc, | |
42 const std::string& c_name) OVERRIDE; | |
43 virtual void ResendPackets( | |
44 bool is_audio, | |
45 const media::cast::transport::MissingFramesAndPacketsMap& missing_packets) | |
46 OVERRIDE; | |
47 virtual void SubscribeAudioRtpStatsCallback( | |
48 const media::cast::transport::CastTransportRtpStatistics& callback) | |
49 OVERRIDE; | |
50 virtual void SubscribeVideoRtpStatsCallback( | |
51 const media::cast::transport::CastTransportRtpStatistics& callback) | |
52 OVERRIDE; | |
53 | |
54 void OnReceivedPacket(const media::cast::transport::Packet& packet); | |
55 void OnNotifyStatusChange( | |
56 media::cast::transport::CastTransportStatus status); | |
57 void OnRtpStatistics( | |
58 bool audio, | |
59 const media::cast::transport::RtcpSenderInfo& sender_info, | |
60 base::TimeTicks time_sent, | |
61 uint32 rtp_timestamp); | |
62 | |
63 private: | |
64 void Send(IPC::Message* message); | |
65 | |
66 int32 channel_id_; | |
67 media::cast::transport::PacketReceiverCallback packet_callback_; | |
68 media::cast::transport::CastTransportStatusCallback status_callback_; | |
69 media::cast::transport::CastTransportRtpStatistics audio_rtp_callback_; | |
70 media::cast::transport::CastTransportRtpStatistics video_rtp_callback_; | |
71 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderIPC); | |
72 }; | |
73 | |
74 #endif // CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_ | |
OLD | NEW |