OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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. The cast sender | 5 // This is the main interface for the cast transport sender. The cast sender |
6 // handles the cast pipeline from encoded frames (both audio and video), to | 6 // handles the cast pipeline from encoded frames (both audio and video), to |
7 // encryption, packetization and transport. | 7 // encryption, packetization and transport. |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual void InitializeVideo(const CastTransportVideoConfig& config) = 0; | 70 virtual void InitializeVideo(const CastTransportVideoConfig& config) = 0; |
71 | 71 |
72 // Sets the Cast packet receiver. Should be called after creation on the | 72 // Sets the Cast packet receiver. Should be called after creation on the |
73 // Cast sender. Packets won't be received until this function is called. | 73 // Cast sender. Packets won't be received until this function is called. |
74 virtual void SetPacketReceiver( | 74 virtual void SetPacketReceiver( |
75 const PacketReceiverCallback& packet_receiver) = 0; | 75 const PacketReceiverCallback& packet_receiver) = 0; |
76 | 76 |
77 // The following two functions handle the encoded media frames (audio and | 77 // The following two functions handle the encoded media frames (audio and |
78 // video) to be processed. | 78 // video) to be processed. |
79 // Frames will be encrypted, packetized and transmitted to the network. | 79 // Frames will be encrypted, packetized and transmitted to the network. |
80 virtual void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame, | 80 virtual void InsertCodedAudioFrame(const EncodedFrame& audio_frame) = 0; |
81 const base::TimeTicks& recorded_time) = 0; | 81 virtual void InsertCodedVideoFrame(const EncodedFrame& video_frame) = 0; |
82 | |
83 virtual void InsertCodedVideoFrame(const EncodedVideoFrame* video_frame, | |
84 const base::TimeTicks& capture_time) = 0; | |
85 | 82 |
86 // Builds an RTCP packet and sends it to the network. | 83 // Builds an RTCP packet and sends it to the network. |
87 // |ntp_seconds|, |ntp_fraction| and |rtp_timestamp| are used in the | 84 // |ntp_seconds|, |ntp_fraction| and |rtp_timestamp| are used in the |
88 // RTCP Sender Report. | 85 // RTCP Sender Report. |
89 virtual void SendRtcpFromRtpSender(uint32 packet_type_flags, | 86 virtual void SendRtcpFromRtpSender(uint32 packet_type_flags, |
90 uint32 ntp_seconds, | 87 uint32 ntp_seconds, |
91 uint32 ntp_fraction, | 88 uint32 ntp_fraction, |
92 uint32 rtp_timestamp, | 89 uint32 rtp_timestamp, |
93 const RtcpDlrrReportBlock& dlrr, | 90 const RtcpDlrrReportBlock& dlrr, |
94 uint32 sending_ssrc, | 91 uint32 sending_ssrc, |
95 const std::string& c_name) = 0; | 92 const std::string& c_name) = 0; |
96 | 93 |
97 // Retransmission request. | 94 // Retransmission request. |
98 virtual void ResendPackets( | 95 virtual void ResendPackets( |
99 bool is_audio, | 96 bool is_audio, |
100 const MissingFramesAndPacketsMap& missing_packets) = 0; | 97 const MissingFramesAndPacketsMap& missing_packets) = 0; |
101 }; | 98 }; |
102 | 99 |
103 } // namespace transport | 100 } // namespace transport |
104 } // namespace cast | 101 } // namespace cast |
105 } // namespace media | 102 } // namespace media |
106 | 103 |
107 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_ | 104 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_ |
OLD | NEW |