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

Unified Diff: media/base/video_frame.cc

Issue 12255032: Implement "hole" video frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « media/base/video_frame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 71bdcf4eb208ba904721d74f503102d868cd7ceb..b5330bd845078e95348f36ac95b30905cf161560 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -135,6 +135,17 @@ scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) {
return CreateColorFrame(size, kBlackY, kBlackUV, kBlackUV, kZero);
}
+#if defined(GOOGLE_TV)
+// static
+scoped_refptr<VideoFrame> VideoFrame::CreateHoleFrame(
+ const gfx::Size& size) {
+ DCHECK(IsValidConfig(VideoFrame::HOLE, size, gfx::Rect(size), size));
+ scoped_refptr<VideoFrame> frame(new VideoFrame(
+ VideoFrame::HOLE, size, gfx::Rect(size), size, base::TimeDelta()));
+ return frame;
+}
+#endif
+
static inline size_t RoundUp(size_t value, size_t alignment) {
// Check that |alignment| is a power of 2.
DCHECK((alignment + (alignment - 1)) == (alignment | (alignment - 1)));
« no previous file with comments | « media/base/video_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698