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

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

Issue 1709863002: Add Cast PLI support on sender side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address dcheng's comments. 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 is the main interface for the cast transport sender. It accepts encoded 5 // This is the main interface for the cast transport sender. It accepts encoded
6 // frames (both audio and video), encrypts their encoded data, packetizes them 6 // frames (both audio and video), encrypts their encoded data, packetizes them
7 // and feeds them into a transport (e.g., UDP). 7 // and feeds them into a transport (e.g., UDP).
8 8
9 // Construction of the Cast Sender and the Cast Transport Sender should be done 9 // Construction of the Cast Sender and the Cast Transport Sender should be done
10 // in the following order: 10 // in the following order:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 scoped_ptr<PacketSender> transport, 88 scoped_ptr<PacketSender> transport,
89 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner); 89 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner);
90 90
91 virtual ~CastTransportSender() {} 91 virtual ~CastTransportSender() {}
92 92
93 // Audio/Video initialization. 93 // Audio/Video initialization.
94 // Encoded frames cannot be transmitted until the relevant initialize method 94 // Encoded frames cannot be transmitted until the relevant initialize method
95 // is called. 95 // is called.
96 virtual void InitializeAudio(const CastTransportRtpConfig& config, 96 virtual void InitializeAudio(const CastTransportRtpConfig& config,
97 const RtcpCastMessageCallback& cast_message_cb, 97 const RtcpCastMessageCallback& cast_message_cb,
98 const RtcpRttCallback& rtt_cb) = 0; 98 const RtcpRttCallback& rtt_cb,
99 const RtcpPliCallback& pli_cb) = 0;
99 virtual void InitializeVideo(const CastTransportRtpConfig& config, 100 virtual void InitializeVideo(const CastTransportRtpConfig& config,
100 const RtcpCastMessageCallback& cast_message_cb, 101 const RtcpCastMessageCallback& cast_message_cb,
101 const RtcpRttCallback& rtt_cb) = 0; 102 const RtcpRttCallback& rtt_cb,
103 const RtcpPliCallback& pli_cb) = 0;
102 104
103 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a 105 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a
104 // a channel already established with InitializeAudio / InitializeVideo. 106 // a channel already established with InitializeAudio / InitializeVideo.
105 virtual void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) = 0; 107 virtual void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) = 0;
106 108
107 // Sends a RTCP sender report to the receiver. 109 // Sends a RTCP sender report to the receiver.
108 // |ssrc| is the SSRC for this report. 110 // |ssrc| is the SSRC for this report.
109 // |current_time| is the current time reported by a tick clock. 111 // |current_time| is the current time reported by a tick clock.
110 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. 112 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp.
111 virtual void SendSenderReport(uint32_t ssrc, 113 virtual void SendSenderReport(uint32_t ssrc,
(...skipping 26 matching lines...) Expand all
138 // RTP receiver to RTP sender. 140 // RTP receiver to RTP sender.
139 141
140 // Initialize the RTCP builder on RTP receiver. This has to be called before 142 // Initialize the RTCP builder on RTP receiver. This has to be called before
141 // adding other optional RTCP messages to the packet. 143 // adding other optional RTCP messages to the packet.
142 virtual void InitializeRtpReceiverRtcpBuilder( 144 virtual void InitializeRtpReceiverRtcpBuilder(
143 uint32_t rtp_receiver_ssrc, 145 uint32_t rtp_receiver_ssrc,
144 const RtcpTimeData& time_data) = 0; 146 const RtcpTimeData& time_data) = 0;
145 147
146 virtual void AddCastFeedback(const RtcpCastMessage& cast_message, 148 virtual void AddCastFeedback(const RtcpCastMessage& cast_message,
147 base::TimeDelta target_delay) = 0; 149 base::TimeDelta target_delay) = 0;
150 virtual void AddPli(const RtcpPliMessage& pli_message) = 0;
148 virtual void AddRtcpEvents( 151 virtual void AddRtcpEvents(
149 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events) = 0; 152 const ReceiverRtcpEventSubscriber::RtcpEvents& rtcp_events) = 0;
150 virtual void AddRtpReceiverReport( 153 virtual void AddRtpReceiverReport(
151 const RtcpReportBlock& rtp_report_block) = 0; 154 const RtcpReportBlock& rtp_report_block) = 0;
152 155
153 // Finalize the building of the RTCP packet and send out the built packet. 156 // Finalize the building of the RTCP packet and send out the built packet.
154 virtual void SendRtcpFromRtpReceiver() = 0; 157 virtual void SendRtcpFromRtpReceiver() = 0;
155 158
156 // Set options for the PacedSender and Wifi. 159 // Set options for the PacedSender and Wifi.
157 virtual void SetOptions(const base::DictionaryValue& options) = 0; 160 virtual void SetOptions(const base::DictionaryValue& options) = 0;
158 }; 161 };
159 162
160 } // namespace cast 163 } // namespace cast
161 } // namespace media 164 } // namespace media
162 165
163 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ 166 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_transport_sender_ipc.cc ('k') | media/cast/net/cast_transport_sender_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698