| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 public VCMReceiveStatisticsCallback, | 50 public VCMReceiveStatisticsCallback, |
| 51 public VCMDecoderTimingCallback, | 51 public VCMDecoderTimingCallback, |
| 52 public CallStatsObserver { | 52 public CallStatsObserver { |
| 53 public: | 53 public: |
| 54 friend class ChannelStatsObserver; | 54 friend class ChannelStatsObserver; |
| 55 | 55 |
| 56 VideoStreamDecoder(vcm::VideoReceiver* video_receiver, | 56 VideoStreamDecoder(vcm::VideoReceiver* video_receiver, |
| 57 VCMFrameTypeCallback* vcm_frame_type_callback, | 57 VCMFrameTypeCallback* vcm_frame_type_callback, |
| 58 VCMPacketRequestCallback* vcm_packet_request_callback, | 58 VCMPacketRequestCallback* vcm_packet_request_callback, |
| 59 bool enable_nack, | 59 bool enable_nack, |
| 60 bool enable_fec, |
| 60 ReceiveStatisticsProxy* receive_statistics_proxy, | 61 ReceiveStatisticsProxy* receive_statistics_proxy, |
| 61 IncomingVideoStream* incoming_video_stream, | 62 IncomingVideoStream* incoming_video_stream, |
| 62 I420FrameCallback* pre_render_callback); | 63 I420FrameCallback* pre_render_callback); |
| 63 ~VideoStreamDecoder(); | 64 ~VideoStreamDecoder(); |
| 64 | 65 |
| 65 // Implements VCMReceiveCallback. | 66 // Implements VCMReceiveCallback. |
| 66 int32_t FrameToRender(VideoFrame& video_frame) override; // NOLINT | 67 int32_t FrameToRender(VideoFrame& video_frame) override; // NOLINT |
| 67 int32_t ReceivedDecodedReferenceFrame(const uint64_t picture_id) override; | 68 int32_t ReceivedDecodedReferenceFrame(const uint64_t picture_id) override; |
| 68 void OnIncomingPayloadType(int payload_type) override; | 69 void OnIncomingPayloadType(int payload_type) override; |
| 69 void OnDecoderImplementationName(const char* implementation_name) override; | 70 void OnDecoderImplementationName(const char* implementation_name) override; |
| 70 | 71 |
| 71 // Implements VCMReceiveStatisticsCallback. | 72 // Implements VCMReceiveStatisticsCallback. |
| 72 void OnReceiveRatesUpdated(uint32_t bit_rate, uint32_t frame_rate) override; | 73 void OnReceiveRatesUpdated(uint32_t bit_rate, uint32_t frame_rate) override; |
| 73 void OnDiscardedPacketsUpdated(int discarded_packets) override; | 74 void OnDiscardedPacketsUpdated(int discarded_packets) override; |
| 74 void OnFrameCountsUpdated(const FrameCounts& frame_counts) override; | 75 void OnFrameCountsUpdated(const FrameCounts& frame_counts) override; |
| 75 | 76 |
| 76 // Implements VCMDecoderTimingCallback. | 77 // Implements VCMDecoderTimingCallback. |
| 77 void OnDecoderTiming(int decode_ms, | 78 void OnDecoderTiming(int decode_ms, |
| 78 int max_decode_ms, | 79 int max_decode_ms, |
| 79 int current_delay_ms, | 80 int current_delay_ms, |
| 80 int target_delay_ms, | 81 int target_delay_ms, |
| 81 int jitter_buffer_ms, | 82 int jitter_buffer_ms, |
| 82 int min_playout_delay_ms, | 83 int min_playout_delay_ms, |
| 83 int render_delay_ms) override; | 84 int render_delay_ms) override; |
| 84 | 85 |
| 85 | |
| 86 void RegisterReceiveStatisticsProxy( | 86 void RegisterReceiveStatisticsProxy( |
| 87 ReceiveStatisticsProxy* receive_statistics_proxy); | 87 ReceiveStatisticsProxy* receive_statistics_proxy); |
| 88 | 88 |
| 89 // Implements StatsObserver. | 89 // Implements StatsObserver. |
| 90 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; | 90 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 // Assumed to be protected. | 93 // Assumed to be protected. |
| 94 void StartDecodeThread(); | 94 void StartDecodeThread(); |
| 95 void StopDecodeThread(); | 95 void StopDecodeThread(); |
| 96 | 96 |
| 97 // Used for all registered callbacks except rendering. | 97 // Used for all registered callbacks except rendering. |
| 98 rtc::CriticalSection crit_; | 98 rtc::CriticalSection crit_; |
| 99 | 99 |
| 100 vcm::VideoReceiver* const video_receiver_; | 100 vcm::VideoReceiver* const video_receiver_; |
| 101 | 101 |
| 102 ReceiveStatisticsProxy* const receive_stats_callback_; | 102 ReceiveStatisticsProxy* const receive_stats_callback_; |
| 103 IncomingVideoStream* const incoming_video_stream_; | 103 IncomingVideoStream* const incoming_video_stream_; |
| 104 | 104 |
| 105 I420FrameCallback* const pre_render_callback_; | 105 I420FrameCallback* const pre_render_callback_; |
| 106 | 106 |
| 107 int64_t last_rtt_ms_ GUARDED_BY(crit_); | 107 int64_t last_rtt_ms_ GUARDED_BY(crit_); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace webrtc | 110 } // namespace webrtc |
| 111 | 111 |
| 112 #endif // WEBRTC_VIDEO_VIDEO_STREAM_DECODER_H_ | 112 #endif // WEBRTC_VIDEO_VIDEO_STREAM_DECODER_H_ |
| OLD | NEW |