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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 base::TimeDelta logging_flush_interval, | 103 base::TimeDelta logging_flush_interval, |
104 std::unique_ptr<Client> client, | 104 std::unique_ptr<Client> client, |
105 std::unique_ptr<PacketTransport> transport, | 105 std::unique_ptr<PacketTransport> transport, |
106 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner); | 106 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner); |
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 InitializeAudio(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 virtual void InitializeVideo(const CastTransportRtpConfig& config, | |
116 std::unique_ptr<RtcpObserver> rtcp_observer) {} | |
117 | 115 |
118 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a | 116 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a |
119 // a channel already established with InitializeAudio / InitializeVideo. | 117 // a channel already established with InitializeAudio / InitializeVideo. |
120 virtual void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) = 0; | 118 virtual void InsertFrame(uint32_t ssrc, const EncodedFrame& frame) = 0; |
121 | 119 |
122 // Sends a RTCP sender report to the receiver. | 120 // Sends a RTCP sender report to the receiver. |
123 // |ssrc| is the SSRC for this report. | 121 // |ssrc| is the SSRC for this report. |
124 // |current_time| is the current time reported by a tick clock. | 122 // |current_time| is the current time reported by a tick clock. |
125 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. | 123 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. |
126 virtual void SendSenderReport(uint32_t ssrc, | 124 virtual void SendSenderReport(uint32_t ssrc, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 virtual void SendRtcpFromRtpReceiver() = 0; | 168 virtual void SendRtcpFromRtpReceiver() = 0; |
171 | 169 |
172 // Set options for the PacedSender and Wifi. | 170 // Set options for the PacedSender and Wifi. |
173 virtual void SetOptions(const base::DictionaryValue& options) = 0; | 171 virtual void SetOptions(const base::DictionaryValue& options) = 0; |
174 }; | 172 }; |
175 | 173 |
176 } // namespace cast | 174 } // namespace cast |
177 } // namespace media | 175 } // namespace media |
178 | 176 |
179 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_H_ | 177 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_H_ |
OLD | NEW |