OLD | NEW |
---|---|
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_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ |
6 #define CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ | 6 #define CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ |
7 | 7 |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
10 #include "chrome/common/cast_messages.h" | 10 #include "chrome/common/cast_messages.h" |
11 #include "content/public/browser/browser_message_filter.h" | 11 #include "content/public/browser/browser_message_filter.h" |
12 #include "media/cast/cast_sender.h" | 12 #include "media/cast/cast_sender.h" |
13 #include "media/cast/logging/logging_defines.h" | 13 #include "media/cast/logging/logging_defines.h" |
14 #include "media/cast/net/cast_transport_sender.h" | 14 #include "media/cast/net/cast_transport_sender.h" |
15 | 15 |
16 namespace cast { | 16 namespace cast { |
17 | 17 |
18 class CastTransportHostFilter : public content::BrowserMessageFilter { | 18 class CastTransportHostFilter : public content::BrowserMessageFilter { |
19 public: | 19 public: |
20 CastTransportHostFilter(); | 20 CastTransportHostFilter(); |
21 private: | 21 private: |
22 virtual ~CastTransportHostFilter(); | 22 virtual ~CastTransportHostFilter(); |
23 | 23 |
24 void NotifyStatusChange( | 24 void NotifyStatusChange( |
25 int32 channel_id, | 25 int32 channel_id, |
26 media::cast::CastTransportStatus result); | 26 media::cast::CastTransportStatus result); |
27 void ReceivedPacket( | |
28 int32 channel_id, | |
29 scoped_ptr<media::cast::Packet> result); | |
30 void RawEvents(int32 channel_id, | 27 void RawEvents(int32 channel_id, |
miu
2014/07/18 00:06:23
naming: Let's prepend a verb at the beginning of t
Alpha Left Google
2014/07/18 01:14:30
Done.
| |
31 const std::vector<media::cast::PacketEvent>& packet_events); | 28 const std::vector<media::cast::PacketEvent>& packet_events, |
29 const std::vector<media::cast::FrameEvent>& frame_events); | |
30 void Rtt(int32 channel_id, | |
31 uint32 ssrc, | |
32 base::TimeDelta rtt, | |
33 base::TimeDelta avg_rtt, | |
34 base::TimeDelta min_rtt, | |
35 base::TimeDelta max_rtt); | |
36 void CastMessage(int32 channel_id, | |
37 uint32 ssrc, | |
38 const media::cast::RtcpCastMessage& cast_message); | |
32 | 39 |
33 // BrowserMessageFilter implementation. | 40 // BrowserMessageFilter implementation. |
34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
35 | 42 |
36 // Forwarding functions. | 43 // Forwarding functions. |
37 void OnInitializeAudio( | 44 void OnInitializeAudio( |
38 int32 channel_id, | 45 int32 channel_id, |
39 const media::cast::CastTransportRtpConfig& config); | 46 const media::cast::CastTransportRtpConfig& config); |
40 void OnInitializeVideo( | 47 void OnInitializeVideo( |
41 int32 channel_id, | 48 int32 channel_id, |
42 const media::cast::CastTransportRtpConfig& config); | 49 const media::cast::CastTransportRtpConfig& config); |
43 void OnInsertCodedAudioFrame( | 50 void OnInsertCodedAudioFrame( |
44 int32 channel_id, | 51 int32 channel_id, |
45 const media::cast::EncodedFrame& audio_frame); | 52 const media::cast::EncodedFrame& audio_frame); |
46 void OnInsertCodedVideoFrame( | 53 void OnInsertCodedVideoFrame( |
47 int32 channel_id, | 54 int32 channel_id, |
48 const media::cast::EncodedFrame& video_frame); | 55 const media::cast::EncodedFrame& video_frame); |
49 void OnSendRtcpFromRtpSender( | 56 void OnSendSenderReport( |
50 int32 channel_id, | 57 int32 channel_id, |
51 const media::cast::SendRtcpFromRtpSenderData& data, | 58 uint32 ssrc, |
52 const media::cast::RtcpDlrrReportBlock& dlrr); | 59 base::TimeTicks current_time, |
60 uint32 current_time_as_rtp_timestamp); | |
53 void OnResendPackets( | 61 void OnResendPackets( |
54 int32 channel_id, | 62 int32 channel_id, |
55 bool is_audio, | 63 bool is_audio, |
56 const media::cast::MissingFramesAndPacketsMap& missing_packets, | 64 const media::cast::MissingFramesAndPacketsMap& missing_packets, |
57 bool cancel_rtx_if_not_in_list, | 65 bool cancel_rtx_if_not_in_list, |
58 base::TimeDelta dedupe_window); | 66 base::TimeDelta dedupe_window); |
59 void OnNew( | 67 void OnNew( |
60 int32 channel_id, | 68 int32 channel_id, |
61 const net::IPEndPoint& remote_end_point); | 69 const net::IPEndPoint& remote_end_point); |
62 void OnDelete(int32 channel_id); | 70 void OnDelete(int32 channel_id); |
63 | 71 |
64 IDMap<media::cast::CastTransportSender, IDMapOwnPointer> id_map_; | 72 IDMap<media::cast::CastTransportSender, IDMapOwnPointer> id_map_; |
65 | 73 |
66 // Clock used by Cast transport. | 74 // Clock used by Cast transport. |
67 base::DefaultTickClock clock_; | 75 base::DefaultTickClock clock_; |
68 | 76 |
69 DISALLOW_COPY_AND_ASSIGN(CastTransportHostFilter); | 77 DISALLOW_COPY_AND_ASSIGN(CastTransportHostFilter); |
70 }; | 78 }; |
71 | 79 |
72 } // namespace cast | 80 } // namespace cast |
73 | 81 |
74 #endif // CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ | 82 #endif // CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ |
OLD | NEW |