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 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 should be done | 9 // Construction of the Cast Sender and the Cast Transport should be done |
10 // in the following order: | 10 // in the following order: |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 virtual ~CastTransport() {} | 108 virtual ~CastTransport() {} |
109 | 109 |
110 // Audio/Video initialization. | 110 // Audio/Video initialization. |
111 // Encoded frames cannot be transmitted until the relevant initialize method | 111 // Encoded frames cannot be transmitted until the relevant initialize method |
112 // is called. | 112 // is called. |
113 virtual void InitializeStream(const CastTransportRtpConfig& config, | 113 virtual void InitializeStream(const CastTransportRtpConfig& config, |
114 std::unique_ptr<RtcpObserver> rtcp_observer) {} | 114 std::unique_ptr<RtcpObserver> rtcp_observer) {} |
115 | 115 |
116 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a | 116 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a |
117 // a channel already established with InitializeAudio / InitializeVideo. | 117 // a channel already established with InitializeStream. |
118 virtual void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) = 0; | 118 virtual void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) = 0; |
119 | 119 |
120 // Sends a RTCP sender report to the receiver. | 120 // Sends a RTCP sender report to the receiver. |
121 // |ssrc| is the SSRC for this report. | 121 // |ssrc| is the SSRC for this report. |
122 // |current_time| is the current time reported by a tick clock. | 122 // |current_time| is the current time reported by a tick clock. |
123 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. | 123 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. |
124 virtual void SendSenderReport(uint32_t ssrc, | 124 virtual void SendSenderReport(uint32_t ssrc, |
125 base::TimeTicks current_time, | 125 base::TimeTicks current_time, |
126 RtpTimeTicks current_time_as_rtp_timestamp) = 0; | 126 RtpTimeTicks current_time_as_rtp_timestamp) = 0; |
127 | 127 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 virtual void SendRtcpFromRtpReceiver() = 0; | 168 virtual void SendRtcpFromRtpReceiver() = 0; |
169 | 169 |
170 // Set options for the PacedSender and Wifi. | 170 // Set options for the PacedSender and Wifi. |
171 virtual void SetOptions(const base::DictionaryValue& options) = 0; | 171 virtual void SetOptions(const base::DictionaryValue& options) = 0; |
172 }; | 172 }; |
173 | 173 |
174 } // namespace cast | 174 } // namespace cast |
175 } // namespace media | 175 } // namespace media |
176 | 176 |
177 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_H_ | 177 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_H_ |
OLD | NEW |