Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: webrtc/video/receive_statistics_proxy.h

Issue 1726503003: Move histograms for rtp receive counters to ReceiveStatisticsProxy (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #ifndef WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ 11 #ifndef WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_
12 #define WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ 12 #define WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_
13 13
14 #include <map>
14 #include <string> 15 #include <string>
15 16
16 #include "webrtc/base/criticalsection.h" 17 #include "webrtc/base/criticalsection.h"
17 #include "webrtc/base/ratetracker.h" 18 #include "webrtc/base/ratetracker.h"
18 #include "webrtc/base/thread_annotations.h" 19 #include "webrtc/base/thread_annotations.h"
19 #include "webrtc/common_types.h" 20 #include "webrtc/common_types.h"
20 #include "webrtc/frame_callback.h" 21 #include "webrtc/frame_callback.h"
21 #include "webrtc/modules/remote_bitrate_estimator/rate_statistics.h" 22 #include "webrtc/modules/remote_bitrate_estimator/rate_statistics.h"
22 #include "webrtc/modules/video_coding/include/video_coding_defines.h" 23 #include "webrtc/modules/video_coding/include/video_coding_defines.h"
23 #include "webrtc/video/report_block_stats.h" 24 #include "webrtc/video/report_block_stats.h"
24 #include "webrtc/video/vie_channel.h" 25 #include "webrtc/video/vie_channel.h"
25 #include "webrtc/video_receive_stream.h" 26 #include "webrtc/video_receive_stream.h"
26 #include "webrtc/video_renderer.h" 27 #include "webrtc/video_renderer.h"
27 28
28 namespace webrtc { 29 namespace webrtc {
29 30
30 class Clock; 31 class Clock;
31 class ViECodec; 32 class ViECodec;
32 class ViEDecoderObserver; 33 class ViEDecoderObserver;
33 struct CodecSpecificInfo; 34 struct CodecSpecificInfo;
34 35
35 class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback, 36 class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
36 public RtcpStatisticsCallback, 37 public RtcpStatisticsCallback,
37 public RtcpPacketTypeCounterObserver, 38 public RtcpPacketTypeCounterObserver,
38 public StreamDataCountersCallback { 39 public StreamDataCountersCallback {
39 public: 40 public:
40 ReceiveStatisticsProxy(uint32_t ssrc, Clock* clock); 41 ReceiveStatisticsProxy(const VideoReceiveStream::Config& config,
42 Clock* clock);
41 virtual ~ReceiveStatisticsProxy(); 43 virtual ~ReceiveStatisticsProxy();
42 44
43 VideoReceiveStream::Stats GetStats() const; 45 VideoReceiveStream::Stats GetStats() const;
44 46
45 void OnDecodedFrame(); 47 void OnDecodedFrame();
46 void OnRenderedFrame(int width, int height); 48 void OnRenderedFrame(int width, int height);
47 void OnIncomingPayloadType(int payload_type); 49 void OnIncomingPayloadType(int payload_type);
48 void OnDecoderImplementationName(const char* implementation_name); 50 void OnDecoderImplementationName(const char* implementation_name);
49 void OnIncomingRate(unsigned int framerate, unsigned int bitrate_bps); 51 void OnIncomingRate(unsigned int framerate, unsigned int bitrate_bps);
50 void OnDecoderTiming(int decode_ms, 52 void OnDecoderTiming(int decode_ms,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 int sum; 89 int sum;
88 int num_samples; 90 int num_samples;
89 }; 91 };
90 struct QpCounters { 92 struct QpCounters {
91 SampleCounter vp8; 93 SampleCounter vp8;
92 }; 94 };
93 95
94 void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); 96 void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_);
95 97
96 Clock* const clock_; 98 Clock* const clock_;
99 const VideoReceiveStream::Config config_;
97 100
98 rtc::CriticalSection crit_; 101 rtc::CriticalSection crit_;
99 VideoReceiveStream::Stats stats_ GUARDED_BY(crit_); 102 VideoReceiveStream::Stats stats_ GUARDED_BY(crit_);
100 RateStatistics decode_fps_estimator_ GUARDED_BY(crit_); 103 RateStatistics decode_fps_estimator_ GUARDED_BY(crit_);
101 RateStatistics renders_fps_estimator_ GUARDED_BY(crit_); 104 RateStatistics renders_fps_estimator_ GUARDED_BY(crit_);
102 rtc::RateTracker render_fps_tracker_ GUARDED_BY(crit_); 105 rtc::RateTracker render_fps_tracker_ GUARDED_BY(crit_);
103 rtc::RateTracker render_pixel_tracker_ GUARDED_BY(crit_); 106 rtc::RateTracker render_pixel_tracker_ GUARDED_BY(crit_);
104 SampleCounter render_width_counter_ GUARDED_BY(crit_); 107 SampleCounter render_width_counter_ GUARDED_BY(crit_);
105 SampleCounter render_height_counter_ GUARDED_BY(crit_); 108 SampleCounter render_height_counter_ GUARDED_BY(crit_);
106 SampleCounter decode_time_counter_ GUARDED_BY(crit_); 109 SampleCounter decode_time_counter_ GUARDED_BY(crit_);
107 SampleCounter delay_counter_ GUARDED_BY(crit_); 110 SampleCounter delay_counter_ GUARDED_BY(crit_);
108 ReportBlockStats report_block_stats_ GUARDED_BY(crit_); 111 ReportBlockStats report_block_stats_ GUARDED_BY(crit_);
109 QpCounters qp_counters_; // Only accessed on the decoding thread. 112 QpCounters qp_counters_; // Only accessed on the decoding thread.
113 std::map<uint32_t, StreamDataCounters> rtx_stats_ GUARDED_BY(crit_);
110 }; 114 };
111 115
112 } // namespace webrtc 116 } // namespace webrtc
113 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ 117 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698