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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const RtcpRttCallback& rtt_cb) = 0; | 81 const RtcpRttCallback& rtt_cb) = 0; |
82 | 82 |
83 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a | 83 // Encrypt, packetize and transmit |frame|. |ssrc| must refer to a |
84 // a channel already established with InitializeAudio / InitializeVideo. | 84 // a channel already established with InitializeAudio / InitializeVideo. |
85 virtual void InsertFrame(uint32 ssrc, const EncodedFrame& frame) = 0; | 85 virtual void InsertFrame(uint32 ssrc, const EncodedFrame& frame) = 0; |
86 | 86 |
87 // Sends a RTCP sender report to the receiver. | 87 // Sends a RTCP sender report to the receiver. |
88 // |ssrc| is the SSRC for this report. | 88 // |ssrc| is the SSRC for this report. |
89 // |current_time| is the current time reported by a tick clock. | 89 // |current_time| is the current time reported by a tick clock. |
90 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. | 90 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. |
91 virtual void SendSenderReport( | 91 virtual void SendSenderReport(uint32 ssrc, |
92 uint32 ssrc, | 92 base::TimeTicks current_time, |
93 base::TimeTicks current_time, | 93 RtpTimeTicks current_time_as_rtp_timestamp) = 0; |
94 uint32 current_time_as_rtp_timestamp) = 0; | |
95 | 94 |
96 // Cancels sending packets for the frames in the set. | 95 // Cancels sending packets for the frames in the set. |
97 // |ssrc| is the SSRC for the stream. | 96 // |ssrc| is the SSRC for the stream. |
98 // |frame_ids| contains the IDs of the frames that will be cancelled. | 97 // |frame_ids| contains the IDs of the frames that will be cancelled. |
99 virtual void CancelSendingFrames(uint32 ssrc, | 98 virtual void CancelSendingFrames(uint32 ssrc, |
100 const std::vector<uint32>& frame_ids) = 0; | 99 const std::vector<uint32>& frame_ids) = 0; |
101 | 100 |
102 // Resends a frame or part of a frame to kickstart. This is used when the | 101 // Resends a frame or part of a frame to kickstart. This is used when the |
103 // stream appears to be stalled. | 102 // stream appears to be stalled. |
104 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) = 0; | 103 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) = 0; |
(...skipping 16 matching lines...) Expand all Loading... |
121 const RtcpCastMessage* cast_message, | 120 const RtcpCastMessage* cast_message, |
122 base::TimeDelta target_delay, | 121 base::TimeDelta target_delay, |
123 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events, | 122 const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events, |
124 const RtpReceiverStatistics* rtp_receiver_statistics) = 0; | 123 const RtpReceiverStatistics* rtp_receiver_statistics) = 0; |
125 }; | 124 }; |
126 | 125 |
127 } // namespace cast | 126 } // namespace cast |
128 } // namespace media | 127 } // namespace media |
129 | 128 |
130 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ | 129 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ |
OLD | NEW |