| 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 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 Loading... |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 const RtpReceiverStatistics* rtp_receiver_statistics) = 0; | 145 const RtpReceiverStatistics* rtp_receiver_statistics) = 0; |
| 144 | 146 |
| 145 // Set options for the PacedSender and Wifi. | 147 // Set options for the PacedSender and Wifi. |
| 146 virtual void SetOptions(const base::DictionaryValue& options) = 0; | 148 virtual void SetOptions(const base::DictionaryValue& options) = 0; |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 } // namespace cast | 151 } // namespace cast |
| 150 } // namespace media | 152 } // namespace media |
| 151 | 153 |
| 152 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ | 154 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ |
| OLD | NEW |