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

Unified Diff: webrtc/common_video/include/video_frame.h

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Implement Holmer@ comments 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
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/include/video_frame.h
diff --git a/webrtc/common_video/include/video_frame.h b/webrtc/common_video/include/video_frame.h
index 1e8f37c171c7cf4bdb850d7665d4c084a69155d3..10dfb47cc94e705ed9062d63e4dbdf5cfea18efb 100644
--- a/webrtc/common_video/include/video_frame.h
+++ b/webrtc/common_video/include/video_frame.h
@@ -35,6 +35,12 @@ class EncodedImage {
EncodedImage(uint8_t* buffer, size_t length, size_t size)
: _buffer(buffer), _length(length), _size(size) {}
+ void SetEncodeTime(int64_t encode_start_ms, int64_t encode_finish_ms) const {
+ timing_.is_timing_frame = true;
+ timing_.encode_start_ms = encode_start_ms;
+ timing_.encode_finish_ms = encode_finish_ms;
+ }
+
// TODO(kthelgason): get rid of this struct as it only has a single member
// remaining.
struct AdaptReason {
@@ -63,6 +69,19 @@ class EncodedImage {
// indication that all future frames will be constrained with those limits
// until the application indicates a change again.
PlayoutDelay playout_delay_ = {-1, -1};
+
+ // Timing information should be updatable on const instances.
+ mutable struct Timing {
+ bool is_timing_frame = false;
+ int64_t encode_start_ms = 0;
+ int64_t encode_finish_ms = 0;
+ int64_t packetization_finish_ms = 0;
+ int64_t pacer_exit_ms = 0;
+ int64_t network_timestamp_ms = 0;
+ int64_t network2_timestamp_ms = 0;
+ int64_t receive_start_ms = 0;
+ int64_t receive_finish_ms = 0;
+ } timing_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698