| 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 // This class maintains a send transport for audio and video in a Cast | 5 // This class maintains a send transport for audio and video in a Cast |
| 6 // Streaming session. | 6 // Streaming session. |
| 7 // Audio, video frames and RTCP messages are submitted to this object | 7 // Audio, video frames and RTCP messages are submitted to this object |
| 8 // and then packetized and paced to the underlying UDP socket. | 8 // and then packetized and paced to the underlying UDP socket. |
| 9 // | 9 // |
| 10 // The hierarchy of send transport in a Cast Streaming session: | 10 // The hierarchy of send transport in a Cast Streaming session: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 net::NetLog* net_log, | 70 net::NetLog* net_log, |
| 71 base::TickClock* clock, | 71 base::TickClock* clock, |
| 72 const net::IPEndPoint& remote_end_point, | 72 const net::IPEndPoint& remote_end_point, |
| 73 scoped_ptr<base::DictionaryValue> options, | 73 scoped_ptr<base::DictionaryValue> options, |
| 74 const CastTransportStatusCallback& status_callback, | 74 const CastTransportStatusCallback& status_callback, |
| 75 const BulkRawEventsCallback& raw_events_callback, | 75 const BulkRawEventsCallback& raw_events_callback, |
| 76 base::TimeDelta raw_events_callback_interval, | 76 base::TimeDelta raw_events_callback_interval, |
| 77 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 77 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
| 78 PacketSender* external_transport); | 78 PacketSender* external_transport); |
| 79 | 79 |
| 80 virtual ~CastTransportSenderImpl(); | 80 ~CastTransportSenderImpl() override; |
| 81 | 81 |
| 82 virtual void InitializeAudio(const CastTransportRtpConfig& config, | 82 void InitializeAudio(const CastTransportRtpConfig& config, |
| 83 const RtcpCastMessageCallback& cast_message_cb, | 83 const RtcpCastMessageCallback& cast_message_cb, |
| 84 const RtcpRttCallback& rtt_cb) override; | 84 const RtcpRttCallback& rtt_cb) override; |
| 85 virtual void InitializeVideo(const CastTransportRtpConfig& config, | 85 void InitializeVideo(const CastTransportRtpConfig& config, |
| 86 const RtcpCastMessageCallback& cast_message_cb, | 86 const RtcpCastMessageCallback& cast_message_cb, |
| 87 const RtcpRttCallback& rtt_cb) override; | 87 const RtcpRttCallback& rtt_cb) override; |
| 88 virtual void InsertFrame(uint32 ssrc, const EncodedFrame& frame) override; | 88 void InsertFrame(uint32 ssrc, const EncodedFrame& frame) override; |
| 89 | 89 |
| 90 virtual void SendSenderReport( | 90 void SendSenderReport(uint32 ssrc, |
| 91 uint32 ssrc, | 91 base::TimeTicks current_time, |
| 92 base::TimeTicks current_time, | 92 uint32 current_time_as_rtp_timestamp) override; |
| 93 uint32 current_time_as_rtp_timestamp) override; | |
| 94 | 93 |
| 95 virtual void CancelSendingFrames( | 94 void CancelSendingFrames(uint32 ssrc, |
| 96 uint32 ssrc, | 95 const std::vector<uint32>& frame_ids) override; |
| 97 const std::vector<uint32>& frame_ids) override; | |
| 98 | 96 |
| 99 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) override; | 97 void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) override; |
| 100 | 98 |
| 101 virtual PacketReceiverCallback PacketReceiverForTesting() override; | 99 PacketReceiverCallback PacketReceiverForTesting() override; |
| 102 | 100 |
| 103 private: | 101 private: |
| 104 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, NacksCancelRetransmits); | 102 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, NacksCancelRetransmits); |
| 105 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, CancelRetransmits); | 103 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, CancelRetransmits); |
| 106 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, Kickstart); | 104 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, Kickstart); |
| 107 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, | 105 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, |
| 108 DedupRetransmissionWithAudio); | 106 DedupRetransmissionWithAudio); |
| 109 | 107 |
| 110 // Resend packets for the stream identified by |ssrc|. | 108 // Resend packets for the stream identified by |ssrc|. |
| 111 // If |cancel_rtx_if_not_in_list| is true then transmission of packets for the | 109 // If |cancel_rtx_if_not_in_list| is true then transmission of packets for the |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 172 |
| 175 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; | 173 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; |
| 176 | 174 |
| 177 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); | 175 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); |
| 178 }; | 176 }; |
| 179 | 177 |
| 180 } // namespace cast | 178 } // namespace cast |
| 181 } // namespace media | 179 } // namespace media |
| 182 | 180 |
| 183 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ | 181 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ |
| OLD | NEW |