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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 // Sends a RTCP sender report to the receiver. | 79 // Sends a RTCP sender report to the receiver. |
80 // |ssrc| is the SSRC for this report. | 80 // |ssrc| is the SSRC for this report. |
81 // |current_time| is the current time reported by a tick clock. | 81 // |current_time| is the current time reported by a tick clock. |
82 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. | 82 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. |
83 virtual void SendSenderReport( | 83 virtual void SendSenderReport( |
84 uint32 ssrc, | 84 uint32 ssrc, |
85 base::TimeTicks current_time, | 85 base::TimeTicks current_time, |
86 uint32 current_time_as_rtp_timestamp) = 0; | 86 uint32 current_time_as_rtp_timestamp) = 0; |
87 | 87 |
88 // Retransmission request. | 88 // Cancels sending packets for the frames in the set. |
89 // |missing_packets| includes the list of frames and packets in each | 89 // |ssrc| is the SSRC for the stream. |
90 // frame to be re-transmitted. | 90 // |frame_ids| contains the IDs of the frames that will be cancelled. |
91 // If |cancel_rtx_if_not_in_list| is used as an optimization to cancel | 91 virtual void CancelSendingFrames(uint32 ssrc, |
92 // pending re-transmission requests of packets not listed in | 92 const std::vector<uint32>& frame_ids) = 0; |
93 // |missing_packets|. If the requested packet(s) were sent recently | 93 |
94 // (how long is specified by |dedupe_window|) then this re-transmit | 94 // Resends a frame or part of a frame to kickstart. This is used when the |
95 // will be ignored. | 95 // stream appears to be stalled. |
96 virtual void ResendPackets( | 96 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) = 0; |
97 bool is_audio, | |
98 const MissingFramesAndPacketsMap& missing_packets, | |
99 bool cancel_rtx_if_not_in_list, | |
100 base::TimeDelta dedupe_window) = 0; | |
101 | 97 |
102 // Returns a callback for receiving packets for testing purposes. | 98 // Returns a callback for receiving packets for testing purposes. |
103 virtual PacketReceiverCallback PacketReceiverForTesting(); | 99 virtual PacketReceiverCallback PacketReceiverForTesting(); |
104 }; | 100 }; |
105 | 101 |
106 } // namespace cast | 102 } // namespace cast |
107 } // namespace media | 103 } // namespace media |
108 | 104 |
109 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ | 105 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ |
OLD | NEW |