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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h

Issue 1734793003: Add stats (histograms) for vp8 screenshare layers (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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h
diff --git a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h
index 762875820995aa18ac6337544c4c0f0198c100d7..e774f12624b598ae2b9f2daecb6e61714e694e4b 100644
--- a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h
+++ b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h
@@ -21,6 +21,7 @@
namespace webrtc {
struct CodecSpecificInfoVP8;
+class Clock;
class ScreenshareLayers : public TemporalLayers {
public:
@@ -30,8 +31,10 @@ class ScreenshareLayers : public TemporalLayers {
static const int kTl1Flags;
static const int kTl1SyncFlags;
- ScreenshareLayers(int num_temporal_layers, uint8_t initial_tl0_pic_idx);
- virtual ~ScreenshareLayers() {}
+ ScreenshareLayers(int num_temporal_layers,
+ uint8_t initial_tl0_pic_idx,
+ Clock* clock);
+ virtual ~ScreenshareLayers();
// Returns the recommended VP8 encode flags needed. May refresh the decoder
// and/or update the reference buffers.
@@ -58,6 +61,8 @@ class ScreenshareLayers : public TemporalLayers {
private:
bool TimeToSync(int64_t timestamp) const;
+ Clock* const clock_;
+
int number_of_temporal_layers_;
bool last_base_layer_sync_;
uint8_t tl0_pic_idx_;
@@ -93,6 +98,20 @@ class ScreenshareLayers : public TemporalLayers {
void UpdateDebt(int64_t delta_ms);
} layers_[kMaxNumTemporalLayers];
+
+ void UpdateHistograms();
+ // Data for histogram statistics.
+ struct Stats {
+ int64_t first_framt_time_ms_ = -1;
+ int64_t num_tl0_frames_ = 0;
+ int64_t num_tl1_frames_ = 0;
+ int64_t num_dropped_frames_ = 0;
+ int64_t num_overshoots_ = 0;
+ int64_t tl0_qp_sum_ = 0;
+ int64_t tl1_qp_sum_ = 0;
+ int64_t tl0_target_bitrate_sum_ = 0;
+ int64_t tl1_target_bitrate_sum_ = 0;
+ } stats_;
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698