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 // Set the callback on which RTP statistics data will be returned. Calling | 55 // Set the callback on which RTP statistics data will be returned. Calling |
62 // this function would start a timer that would schedule the callback in | 56 // this function would start a timer that would schedule the callback in |
63 // a constant interval. | 57 // a constant interval. |
64 void SubscribeRtpStatsCallback(const CastTransportRtpStatistics& callback); | 58 void SubscribeRtpStatsCallback(const CastTransportRtpStatistics& callback); |
65 | 59 |
66 private: | 60 private: |
67 void ScheduleNextStatsReport(); | 61 void ScheduleNextStatsReport(); |
(...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 |