| 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 23 matching lines...) Expand all Loading... |
| 34 class RtpSender { | 34 class RtpSender { |
| 35 public: | 35 public: |
| 36 RtpSender( | 36 RtpSender( |
| 37 base::TickClock* clock, | 37 base::TickClock* clock, |
| 38 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 38 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
| 39 PacedSender* const transport); | 39 PacedSender* const transport); |
| 40 | 40 |
| 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. | 44 // audio frames. Returns false if configuration is invalid. |
| 45 void 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. | 48 // video frames. Returns false if configuration is invalid. |
| 49 void 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 // The video_frame objects ownership is handled by the main cast thread. |
| 52 void IncomingEncodedVideoFrame(const EncodedVideoFrame* video_frame, | 52 void IncomingEncodedVideoFrame(const EncodedVideoFrame* video_frame, |
| 53 const base::TimeTicks& capture_time); | 53 const base::TimeTicks& capture_time); |
| 54 | 54 |
| 55 // The audio_frame objects ownership is handled by the main cast thread. | 55 // The audio_frame objects ownership is handled by the main cast thread. |
| 56 void IncomingEncodedAudioFrame(const EncodedAudioFrame* audio_frame, | 56 void IncomingEncodedAudioFrame(const EncodedAudioFrame* audio_frame, |
| 57 const base::TimeTicks& recorded_time); | 57 const base::TimeTicks& recorded_time); |
| 58 | 58 |
| 59 void ResendPackets(const MissingFramesAndPacketsMap& missing_packets); | 59 void ResendPackets(const MissingFramesAndPacketsMap& missing_packets); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 80 base::WeakPtrFactory<RtpSender> weak_factory_; | 80 base::WeakPtrFactory<RtpSender> weak_factory_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(RtpSender); | 82 DISALLOW_COPY_AND_ASSIGN(RtpSender); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace transport | 85 } // namespace transport |
| 86 } // namespace cast | 86 } // namespace cast |
| 87 } // namespace media | 87 } // namespace media |
| 88 | 88 |
| 89 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ | 89 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ |
| OLD | NEW |