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

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: 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 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 19 matching lines...) Expand all
131 // come from the right sender. Without valid SSRCs, the return address cannot 133 // come from the right sender. Without valid SSRCs, the return address cannot
132 // be automatically established. 134 // be automatically established.
133 virtual void AddValidSsrc(uint32_t ssrc) = 0; 135 virtual void AddValidSsrc(uint32_t ssrc) = 0;
134 136
135 // Send an RTCP message from receiver to sender. 137 // Send an RTCP message from receiver to sender.
136 virtual void SendRtcpFromRtpReceiver( 138 virtual void SendRtcpFromRtpReceiver(
137 uint32_t ssrc, 139 uint32_t ssrc,
138 uint32_t sender_ssrc, 140 uint32_t sender_ssrc,
139 const RtcpTimeData& time_data, 141 const RtcpTimeData& time_data,
140 const RtcpCastMessage* cast_message, 142 const RtcpCastMessage* cast_message,
143 const RtcpPliMessage* pli_message,
141 base::TimeDelta target_delay, 144 base::TimeDelta target_delay,
142 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events, 145 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events,
143 const RtpReceiverStatistics* rtp_receiver_statistics) = 0; 146 const RtpReceiverStatistics* rtp_receiver_statistics) = 0;
144 147
145 // Set options for the PacedSender and Wifi. 148 // Set options for the PacedSender and Wifi.
146 virtual void SetOptions(const base::DictionaryValue& options) = 0; 149 virtual void SetOptions(const base::DictionaryValue& options) = 0;
147 }; 150 };
148 151
149 } // namespace cast 152 } // namespace cast
150 } // namespace media 153 } // namespace media
151 154
152 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ 155 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698