| 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 file contains the interface to the cast RTP sender. | 5 // This file contains the interface to the cast RTP sender. |
| 6 | 6 |
| 7 #ifndef MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ | 7 #ifndef MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ |
| 8 #define MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ | 8 #define MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 ~RtpSender(); | 41 ~RtpSender(); |
| 42 | 42 |
| 43 // Initialize audio stack. Audio must be initialized prior to sending encoded | 43 // Initialize audio stack. Audio must be initialized prior to sending encoded |
| 44 // audio frames. Returns false if configuration is invalid. | 44 // audio frames. Returns false if configuration is invalid. |
| 45 bool InitializeAudio(const CastTransportAudioConfig& config); | 45 bool InitializeAudio(const CastTransportAudioConfig& config); |
| 46 | 46 |
| 47 // Initialize video stack. Video must be initialized prior to sending encoded | 47 // Initialize video stack. Video must be initialized prior to sending encoded |
| 48 // video frames. Returns false if configuration is invalid. | 48 // video frames. Returns false if configuration is invalid. |
| 49 bool InitializeVideo(const CastTransportVideoConfig& config); | 49 bool InitializeVideo(const CastTransportVideoConfig& config); |
| 50 | 50 |
| 51 // The video_frame objects ownership is handled by the main cast thread. | 51 void SendFrame(const EncodedFrame& frame); |
| 52 void IncomingEncodedVideoFrame(const EncodedVideoFrame* video_frame, | |
| 53 const base::TimeTicks& capture_time); | |
| 54 | |
| 55 // The audio_frame objects ownership is handled by the main cast thread. | |
| 56 void IncomingEncodedAudioFrame(const EncodedAudioFrame* audio_frame, | |
| 57 const base::TimeTicks& recorded_time); | |
| 58 | 52 |
| 59 void ResendPackets(const MissingFramesAndPacketsMap& missing_packets); | 53 void ResendPackets(const MissingFramesAndPacketsMap& missing_packets); |
| 60 | 54 |
| 61 size_t send_packet_count() const { | 55 size_t send_packet_count() const { |
| 62 return packetizer_ ? packetizer_->send_packet_count() : 0; | 56 return packetizer_ ? packetizer_->send_packet_count() : 0; |
| 63 } | 57 } |
| 64 size_t send_octet_count() const { | 58 size_t send_octet_count() const { |
| 65 return packetizer_ ? packetizer_->send_octet_count() : 0; | 59 return packetizer_ ? packetizer_->send_octet_count() : 0; |
| 66 } | 60 } |
| 67 uint32 ssrc() const { return config_.ssrc; } | 61 uint32 ssrc() const { return config_.ssrc; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 80 base::WeakPtrFactory<RtpSender> weak_factory_; | 74 base::WeakPtrFactory<RtpSender> weak_factory_; |
| 81 | 75 |
| 82 DISALLOW_COPY_AND_ASSIGN(RtpSender); | 76 DISALLOW_COPY_AND_ASSIGN(RtpSender); |
| 83 }; | 77 }; |
| 84 | 78 |
| 85 } // namespace transport | 79 } // namespace transport |
| 86 } // namespace cast | 80 } // namespace cast |
| 87 } // namespace media | 81 } // namespace media |
| 88 | 82 |
| 89 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ | 83 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ |
| OLD | NEW |