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

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

Issue 1328113004: Work on flexible mode and screen sharing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Spatial layers when screensharing. Created 5 years, 3 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/vp9/screenshare_layers.h
diff --git a/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.h b/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.h
new file mode 100644
index 0000000000000000000000000000000000000000..73709ce6ec7a161fcc5855fdce78c8c6760f79ba
--- /dev/null
+++ b/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.h
@@ -0,0 +1,44 @@
+/* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
sprang_webrtc 2015/09/15 15:41:21 2015
philipel 2015/09/16 09:35:53 Done.
+*
+* Use of this source code is governed by a BSD-style license
+* that can be found in the LICENSE file in the root of the source
+* tree. An additional intellectual property rights grant can be found
+* in the file PATENTS. All contributing project authors may
+* be found in the AUTHORS file in the root of the source tree.
+*/
+
+#ifndef WEBRTC_SCREENSHARE_LAYERS_H
+#define WEBRTC_SCREENSHARE_LAYERS_H
+
+#include <stdint.h>
+#include "webrtc/modules/video_coding/codecs/vp9/vp9_impl.h"
+
+namespace webrtc {
+
+class ScreenshareLayersVP9 {
+ public:
+ ScreenshareLayersVP9();
+ void ConfigureBitrate(int threshold_kbps);
sprang_webrtc 2015/09/15 15:41:22 Rename and/or comment to make it clear that this i
philipel 2015/09/16 09:35:53 Acknowledged.
+ int CurrentLayer() const;
+ void LayerFrameEncoded(unsigned int size_bytes, int layer_id);
+ VP9EncoderImpl::SuperFrameRefSettings SfSettings(uint32_t timestamp,
+ bool is_keyframe);
sprang_webrtc 2015/09/15 15:41:22 Pls avoid abbreviations whenever possible! How 'bo
philipel 2015/09/16 09:35:53 Done.
+
+ private:
+ // Target kbps for layer 0
sprang_webrtc 2015/09/15 15:41:21 Always end comments with a period.
philipel 2015/09/16 09:35:53 Done.
+ float threshold_kbps_;
+
+ // How many bits that has been used so far. Increased in FrameEncoded() by
+ // the size of the encoded frame and decreased in SfSettings() depending
+ // on the time between frames.
+ float l0_bits_used_;
+
+ // Timestamp of last frame
sprang_webrtc 2015/09/15 15:41:22 .
philipel 2015/09/16 09:35:53 Done.
+ uint32_t last_ts_;
+
+ int current_layer_;
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_SCREENSHARE_LAYERS_H

Powered by Google App Engine
This is Rietveld 408576698