Chromium Code Reviews| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 // Audio/Video initialization. | 63 // Audio/Video initialization. |
| 64 // Encoded frames cannot be transmitted until the relevant initialize method | 64 // Encoded frames cannot be transmitted until the relevant initialize method |
| 65 // is called. | 65 // is called. |
| 66 virtual void InitializeAudio(const CastTransportRtpConfig& config, | 66 virtual void InitializeAudio(const CastTransportRtpConfig& config, |
| 67 const RtcpCastMessageCallback& cast_message_cb, | 67 const RtcpCastMessageCallback& cast_message_cb, |
| 68 const RtcpRttCallback& rtt_cb) = 0; | 68 const RtcpRttCallback& rtt_cb) = 0; |
| 69 virtual void InitializeVideo(const CastTransportRtpConfig& config, | 69 virtual void InitializeVideo(const CastTransportRtpConfig& config, |
| 70 const RtcpCastMessageCallback& cast_message_cb, | 70 const RtcpCastMessageCallback& cast_message_cb, |
| 71 const RtcpRttCallback& rtt_cb) = 0; | 71 const RtcpRttCallback& rtt_cb) = 0; |
| 72 | 72 |
| 73 // The following two functions handle the encoded media frames (audio and | 73 // The following function handle the encoded media frames (audio and |
|
miu
2014/08/28 20:45:29
s/handle/handles/
However, perhaps you could fix
hubbe
2014/08/28 22:20:56
Comment updated.
| |
| 74 // video) to be processed. | 74 // video) to be processed. |
| 75 // Frames will be encrypted, packetized and transmitted to the network. | 75 // Frames will be encrypted, packetized and transmitted to the network. |
| 76 virtual void InsertCodedAudioFrame(const EncodedFrame& audio_frame) = 0; | 76 virtual void InsertFrame(uint32 ssrc, const EncodedFrame& frame) = 0; |
| 77 virtual void InsertCodedVideoFrame(const EncodedFrame& video_frame) = 0; | |
| 78 | 77 |
| 79 // Sends a RTCP sender report to the receiver. | 78 // Sends a RTCP sender report to the receiver. |
| 80 // |ssrc| is the SSRC for this report. | 79 // |ssrc| is the SSRC for this report. |
| 81 // |current_time| is the current time reported by a tick clock. | 80 // |current_time| is the current time reported by a tick clock. |
| 82 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. | 81 // |current_time_as_rtp_timestamp| is the corresponding RTP timestamp. |
| 83 virtual void SendSenderReport( | 82 virtual void SendSenderReport( |
| 84 uint32 ssrc, | 83 uint32 ssrc, |
| 85 base::TimeTicks current_time, | 84 base::TimeTicks current_time, |
| 86 uint32 current_time_as_rtp_timestamp) = 0; | 85 uint32 current_time_as_rtp_timestamp) = 0; |
| 87 | 86 |
| 88 // Cancels sending packets for the frames in the set. | 87 // Cancels sending packets for the frames in the set. |
| 89 // |ssrc| is the SSRC for the stream. | 88 // |ssrc| is the SSRC for the stream. |
| 90 // |frame_ids| contains the IDs of the frames that will be cancelled. | 89 // |frame_ids| contains the IDs of the frames that will be cancelled. |
| 91 virtual void CancelSendingFrames(uint32 ssrc, | 90 virtual void CancelSendingFrames(uint32 ssrc, |
| 92 const std::vector<uint32>& frame_ids) = 0; | 91 const std::vector<uint32>& frame_ids) = 0; |
| 93 | 92 |
| 94 // Resends a frame or part of a frame to kickstart. This is used when the | 93 // Resends a frame or part of a frame to kickstart. This is used when the |
| 95 // stream appears to be stalled. | 94 // stream appears to be stalled. |
| 96 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) = 0; | 95 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) = 0; |
| 97 | 96 |
| 98 // Returns a callback for receiving packets for testing purposes. | 97 // Returns a callback for receiving packets for testing purposes. |
| 99 virtual PacketReceiverCallback PacketReceiverForTesting(); | 98 virtual PacketReceiverCallback PacketReceiverForTesting(); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 } // namespace cast | 101 } // namespace cast |
| 103 } // namespace media | 102 } // namespace media |
| 104 | 103 |
| 105 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ | 104 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ |
| OLD | NEW |