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

Side by Side Diff: media/cast/net/cast_transport_sender_impl.h

Issue 1709863002: Add Cast PLI support on sender side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate Pli message from Cast message. Created 4 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 // 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 base::TimeDelta logging_flush_interval, 59 base::TimeDelta logging_flush_interval,
60 scoped_ptr<Client> client, 60 scoped_ptr<Client> client,
61 scoped_ptr<PacketSender> transport, 61 scoped_ptr<PacketSender> transport,
62 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner); 62 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner);
63 63
64 ~CastTransportSenderImpl() final; 64 ~CastTransportSenderImpl() final;
65 65
66 // CastTransportSender implementation. 66 // CastTransportSender implementation.
67 void InitializeAudio(const CastTransportRtpConfig& config, 67 void InitializeAudio(const CastTransportRtpConfig& config,
68 const RtcpCastMessageCallback& cast_message_cb, 68 const RtcpCastMessageCallback& cast_message_cb,
69 const RtcpRttCallback& rtt_cb) final; 69 const RtcpRttCallback& rtt_cb,
70 const RtcpPliCallback& pli_cb) final;
70 void InitializeVideo(const CastTransportRtpConfig& config, 71 void InitializeVideo(const CastTransportRtpConfig& config,
71 const RtcpCastMessageCallback& cast_message_cb, 72 const RtcpCastMessageCallback& cast_message_cb,
72 const RtcpRttCallback& rtt_cb) final; 73 const RtcpRttCallback& rtt_cb,
74 const RtcpPliCallback& pli_cb) final;
73 void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) final; 75 void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) final;
74 76
75 void SendSenderReport(uint32_t ssrc, 77 void SendSenderReport(uint32_t ssrc,
76 base::TimeTicks current_time, 78 base::TimeTicks current_time,
77 RtpTimeTicks current_time_as_rtp_timestamp) final; 79 RtpTimeTicks current_time_as_rtp_timestamp) final;
78 80
79 void CancelSendingFrames(uint32_t ssrc, 81 void CancelSendingFrames(uint32_t ssrc,
80 const std::vector<uint32_t>& frame_ids) final; 82 const std::vector<uint32_t>& frame_ids) final;
81 83
82 void ResendFrameForKickstart(uint32_t ssrc, uint32_t frame_id) final; 84 void ResendFrameForKickstart(uint32_t ssrc, uint32_t frame_id) final;
(...skipping 15 matching lines...) Expand all
98 void SetOptions(const base::DictionaryValue& options) final; 100 void SetOptions(const base::DictionaryValue& options) final;
99 101
100 // CastTransportReceiver implementation. 102 // CastTransportReceiver implementation.
101 void AddValidSsrc(uint32_t ssrc) final; 103 void AddValidSsrc(uint32_t ssrc) final;
102 104
103 void SendRtcpFromRtpReceiver( 105 void SendRtcpFromRtpReceiver(
104 uint32_t ssrc, 106 uint32_t ssrc,
105 uint32_t sender_ssrc, 107 uint32_t sender_ssrc,
106 const RtcpTimeData& time_data, 108 const RtcpTimeData& time_data,
107 const RtcpCastMessage* cast_message, 109 const RtcpCastMessage* cast_message,
110 const RtcpPliMessage* pli_message,
108 base::TimeDelta target_delay, 111 base::TimeDelta target_delay,
109 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events, 112 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events,
110 const RtpReceiverStatistics* rtp_receiver_statistics) final; 113 const RtpReceiverStatistics* rtp_receiver_statistics) final;
111 114
112 private: 115 private:
113 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, NacksCancelRetransmits); 116 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, NacksCancelRetransmits);
114 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, CancelRetransmits); 117 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, CancelRetransmits);
115 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, Kickstart); 118 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, Kickstart);
116 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, 119 FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest,
117 DedupRetransmissionWithAudio); 120 DedupRetransmissionWithAudio);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 189
187 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; 190 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_;
188 191
189 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); 192 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl);
190 }; 193 };
191 194
192 } // namespace cast 195 } // namespace cast
193 } // namespace media 196 } // namespace media
194 197
195 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_IMPL_H_ 198 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698