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

Unified Diff: media/base/video_frame.h

Issue 2007463005: Paint first frame faster, don't crash with no frames during EOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whoops, fix comment. Created 4 years, 7 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 | « media/base/null_video_sink_unittest.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.h
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index 4ff66ac333dd659f3c9d13523d1b45e1905f8843..c542aed5c69fc914738aba8e83d4e1c35b4937b8 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -420,6 +420,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// Returns a human-readable string describing |*this|.
std::string AsHumanReadableString();
+ // Unique identifier for this video frame; generated at construction time and
+ // guaranteed to be unique within a single process.
+ int unique_id() const { return unique_id_; }
+
protected:
friend class base::RefCountedThreadSafe<VideoFrame>;
@@ -569,6 +573,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
VideoFrameMetadata metadata_;
+ // Generated at construction time.
+ const int unique_id_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
};
« no previous file with comments | « media/base/null_video_sink_unittest.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698