OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 19 matching lines...) Expand all Loading... | |
30 class Clock; | 30 class Clock; |
31 class ViECodec; | 31 class ViECodec; |
32 class ViEDecoderObserver; | 32 class ViEDecoderObserver; |
33 struct CodecSpecificInfo; | 33 struct CodecSpecificInfo; |
34 | 34 |
35 class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback, | 35 class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback, |
36 public RtcpStatisticsCallback, | 36 public RtcpStatisticsCallback, |
37 public RtcpPacketTypeCounterObserver, | 37 public RtcpPacketTypeCounterObserver, |
38 public StreamDataCountersCallback { | 38 public StreamDataCountersCallback { |
39 public: | 39 public: |
40 ReceiveStatisticsProxy(const VideoReceiveStream::Config& config, | 40 ReceiveStatisticsProxy(const VideoReceiveStream::Config* config, |
pbos-webrtc
2016/06/06 16:15:34
Shouldn't this still be a const reference?
tommi
2016/06/08 09:49:39
It could. What I want to do is to make a distinct
pbos-webrtc
2016/06/08 11:24:05
I think we have quite a bit of video-related code
tommi
2016/06/08 13:28:41
I would prefer to keep this as is actually. The s
| |
41 Clock* clock); | 41 Clock* clock); |
42 virtual ~ReceiveStatisticsProxy(); | 42 virtual ~ReceiveStatisticsProxy(); |
43 | 43 |
44 VideoReceiveStream::Stats GetStats() const; | 44 VideoReceiveStream::Stats GetStats() const; |
45 | 45 |
46 void OnDecodedFrame(); | 46 void OnDecodedFrame(); |
47 void OnSyncOffsetUpdated(int64_t sync_offset_ms); | 47 void OnSyncOffsetUpdated(int64_t sync_offset_ms); |
48 void OnRenderedFrame(int width, int height); | 48 void OnRenderedFrame(int width, int height); |
49 void OnIncomingPayloadType(int payload_type); | 49 void OnIncomingPayloadType(int payload_type); |
50 void OnDecoderImplementationName(const char* implementation_name); | 50 void OnDecoderImplementationName(const char* implementation_name); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 int sum; | 89 int sum; |
90 int num_samples; | 90 int num_samples; |
91 }; | 91 }; |
92 struct QpCounters { | 92 struct QpCounters { |
93 SampleCounter vp8; | 93 SampleCounter vp8; |
94 }; | 94 }; |
95 | 95 |
96 void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 96 void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
97 | 97 |
98 Clock* const clock_; | 98 Clock* const clock_; |
99 const VideoReceiveStream::Config config_; | 99 // Ownership of this object lies with the owner of the ReceiveStatisticsProxy |
100 // instance. Lifetime is guaranteed to outlive |this|. | |
101 const VideoReceiveStream::Config& config_; | |
100 | 102 |
101 rtc::CriticalSection crit_; | 103 rtc::CriticalSection crit_; |
102 VideoReceiveStream::Stats stats_ GUARDED_BY(crit_); | 104 VideoReceiveStream::Stats stats_ GUARDED_BY(crit_); |
103 RateStatistics decode_fps_estimator_ GUARDED_BY(crit_); | 105 RateStatistics decode_fps_estimator_ GUARDED_BY(crit_); |
104 RateStatistics renders_fps_estimator_ GUARDED_BY(crit_); | 106 RateStatistics renders_fps_estimator_ GUARDED_BY(crit_); |
105 rtc::RateTracker render_fps_tracker_ GUARDED_BY(crit_); | 107 rtc::RateTracker render_fps_tracker_ GUARDED_BY(crit_); |
106 rtc::RateTracker render_pixel_tracker_ GUARDED_BY(crit_); | 108 rtc::RateTracker render_pixel_tracker_ GUARDED_BY(crit_); |
107 SampleCounter render_width_counter_ GUARDED_BY(crit_); | 109 SampleCounter render_width_counter_ GUARDED_BY(crit_); |
108 SampleCounter render_height_counter_ GUARDED_BY(crit_); | 110 SampleCounter render_height_counter_ GUARDED_BY(crit_); |
109 SampleCounter sync_offset_counter_ GUARDED_BY(crit_); | 111 SampleCounter sync_offset_counter_ GUARDED_BY(crit_); |
110 SampleCounter decode_time_counter_ GUARDED_BY(crit_); | 112 SampleCounter decode_time_counter_ GUARDED_BY(crit_); |
111 SampleCounter jitter_buffer_delay_counter_ GUARDED_BY(crit_); | 113 SampleCounter jitter_buffer_delay_counter_ GUARDED_BY(crit_); |
112 SampleCounter target_delay_counter_ GUARDED_BY(crit_); | 114 SampleCounter target_delay_counter_ GUARDED_BY(crit_); |
113 SampleCounter current_delay_counter_ GUARDED_BY(crit_); | 115 SampleCounter current_delay_counter_ GUARDED_BY(crit_); |
114 SampleCounter delay_counter_ GUARDED_BY(crit_); | 116 SampleCounter delay_counter_ GUARDED_BY(crit_); |
115 ReportBlockStats report_block_stats_ GUARDED_BY(crit_); | 117 ReportBlockStats report_block_stats_ GUARDED_BY(crit_); |
116 QpCounters qp_counters_; // Only accessed on the decoding thread. | 118 QpCounters qp_counters_; // Only accessed on the decoding thread. |
117 std::map<uint32_t, StreamDataCounters> rtx_stats_ GUARDED_BY(crit_); | 119 std::map<uint32_t, StreamDataCounters> rtx_stats_ GUARDED_BY(crit_); |
118 }; | 120 }; |
119 | 121 |
120 } // namespace webrtc | 122 } // namespace webrtc |
121 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ | 123 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ |
OLD | NEW |