OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 class VideoReceiver; | 36 class VideoReceiver; |
37 } // namespace vcm | 37 } // namespace vcm |
38 | 38 |
39 enum StreamType { | 39 enum StreamType { |
40 kViEStreamTypeNormal = 0, // Normal media stream | 40 kViEStreamTypeNormal = 0, // Normal media stream |
41 kViEStreamTypeRtx = 1 // Retransmission media stream | 41 kViEStreamTypeRtx = 1 // Retransmission media stream |
42 }; | 42 }; |
43 | 43 |
44 class VideoStreamDecoder : public VCMReceiveCallback, | 44 class VideoStreamDecoder : public VCMReceiveCallback, |
45 public VCMReceiveStatisticsCallback, | 45 public VCMReceiveStatisticsCallback, |
46 public VCMDecoderTimingCallback, | |
47 public CallStatsObserver { | 46 public CallStatsObserver { |
48 public: | 47 public: |
49 friend class ChannelStatsObserver; | 48 friend class ChannelStatsObserver; |
50 | 49 |
51 VideoStreamDecoder( | 50 VideoStreamDecoder( |
52 vcm::VideoReceiver* video_receiver, | 51 vcm::VideoReceiver* video_receiver, |
53 VCMFrameTypeCallback* vcm_frame_type_callback, | 52 VCMFrameTypeCallback* vcm_frame_type_callback, |
54 VCMPacketRequestCallback* vcm_packet_request_callback, | 53 VCMPacketRequestCallback* vcm_packet_request_callback, |
55 bool enable_nack, | 54 bool enable_nack, |
56 bool enable_fec, | 55 bool enable_fec, |
(...skipping 14 matching lines...) Expand all Loading... |
71 void OnFrameCountsUpdated(const FrameCounts& frame_counts) override; | 70 void OnFrameCountsUpdated(const FrameCounts& frame_counts) override; |
72 void OnCompleteFrame(bool is_keyframe, size_t size_bytes) override; | 71 void OnCompleteFrame(bool is_keyframe, size_t size_bytes) override; |
73 void OnFrameBufferTimingsUpdated(int decode_ms, | 72 void OnFrameBufferTimingsUpdated(int decode_ms, |
74 int max_decode_ms, | 73 int max_decode_ms, |
75 int current_delay_ms, | 74 int current_delay_ms, |
76 int target_delay_ms, | 75 int target_delay_ms, |
77 int jitter_buffer_ms, | 76 int jitter_buffer_ms, |
78 int min_playout_delay_ms, | 77 int min_playout_delay_ms, |
79 int render_delay_ms) override; | 78 int render_delay_ms) override; |
80 | 79 |
81 // Implements VCMDecoderTimingCallback. | |
82 void OnDecoderTiming(int decode_ms, | |
83 int max_decode_ms, | |
84 int current_delay_ms, | |
85 int target_delay_ms, | |
86 int jitter_buffer_ms, | |
87 int min_playout_delay_ms, | |
88 int render_delay_ms) override; | |
89 | |
90 void RegisterReceiveStatisticsProxy( | 80 void RegisterReceiveStatisticsProxy( |
91 ReceiveStatisticsProxy* receive_statistics_proxy); | 81 ReceiveStatisticsProxy* receive_statistics_proxy); |
92 | 82 |
93 // Implements StatsObserver. | 83 // Implements StatsObserver. |
94 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; | 84 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
95 | 85 |
96 private: | 86 private: |
97 // Used for all registered callbacks except rendering. | 87 // Used for all registered callbacks except rendering. |
98 rtc::CriticalSection crit_; | 88 rtc::CriticalSection crit_; |
99 | 89 |
100 vcm::VideoReceiver* const video_receiver_; | 90 vcm::VideoReceiver* const video_receiver_; |
101 | 91 |
102 ReceiveStatisticsProxy* const receive_stats_callback_; | 92 ReceiveStatisticsProxy* const receive_stats_callback_; |
103 rtc::VideoSinkInterface<VideoFrame>* const incoming_video_stream_; | 93 rtc::VideoSinkInterface<VideoFrame>* const incoming_video_stream_; |
104 | 94 |
105 int64_t last_rtt_ms_ GUARDED_BY(crit_); | 95 int64_t last_rtt_ms_ GUARDED_BY(crit_); |
106 }; | 96 }; |
107 | 97 |
108 } // namespace webrtc | 98 } // namespace webrtc |
109 | 99 |
110 #endif // WEBRTC_VIDEO_VIDEO_STREAM_DECODER_H_ | 100 #endif // WEBRTC_VIDEO_VIDEO_STREAM_DECODER_H_ |
OLD | NEW |