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

Unified Diff: webrtc/common_types.h

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Implement Asapersson@ comments and foolproof generic encoder to be used in tests Created 3 years, 6 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/common_types.h
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index 73a1c8340d62e93b65b3d0f4894583826c336705..a100cf1da7923f902af6b91ae1952135d4a4dd24 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -20,6 +20,7 @@
#include "webrtc/api/video/video_content_type.h"
#include "webrtc/api/video/video_rotation.h"
+#include "webrtc/api/video/video_timing.h"
#include "webrtc/base/array_view.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/optional.h"
@@ -588,6 +589,16 @@ class VideoCodec {
VideoCodecMode mode;
bool expect_encode_from_texture;
+ // Timing frames configuration. There is delay of delay_ms between two
+ // consequent timing frames, excluding outliers. Frame is always made a
+ // timing frame if it's at least outlier_ratio in percent of "ideal" average
+ // frame given bitrate and framerate, i.e. if it's bigger than
+ // |outlier_ratio / 100.0 * bitrate_bps / fps| in bits.
holmer 2017/06/19 07:48:26 Can you comment on why we have logic like this? Be
ilnik 2017/06/19 08:41:51 Done.
+ struct TimingFrameTriggerThresholds {
+ int64_t delay_ms;
+ uint16_t outlier_ratio_percent;
+ } timingFrameTriggerThresholds;
holmer 2017/06/19 07:48:26 timing_frame_thresholds
ilnik 2017/06/19 08:41:51 Done.
+
bool operator==(const VideoCodec& other) const = delete;
bool operator!=(const VideoCodec& other) const = delete;
@@ -763,6 +774,9 @@ struct RTPHeaderExtension {
bool hasVideoContentType;
VideoContentType videoContentType;
+ bool hasVideoTiming;
+ VideoTiming videoTiming;
holmer 2017/06/19 07:48:26 No camelCase. I see why you used it, but since we
ilnik 2017/06/19 08:41:51 Done.
+
PlayoutDelay playout_delay = {-1, -1};
// For identification of a stream when ssrc is not signaled. See

Powered by Google App Engine
This is Rietveld 408576698