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

Unified Diff: media/base/video_util.h

Issue 1737253002: Handle Alpha channel in Canvas capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bbudge@ nit. Created 4 years, 9 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_unittest.cc ('k') | media/base/video_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_util.h
diff --git a/media/base/video_util.h b/media/base/video_util.h
index e51343344a098376193636406d5652dcece7d0dc..2dec7e9371013ff3bf0442cb798cef0c90104659 100644
--- a/media/base/video_util.h
+++ b/media/base/video_util.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include "base/memory/ref_counted.h"
#include "media/base/media_export.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -92,6 +93,10 @@ MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8_t* source,
const gfx::Rect& region_in_frame,
VideoFrame* frame);
+// Converts a frame with YV12A format into I420 by dropping alpha channel.
+MEDIA_EXPORT scoped_refptr<VideoFrame> WrapAsI420VideoFrame(
+ const scoped_refptr<VideoFrame>& frame);
+
} // namespace media
#endif // MEDIA_BASE_VIDEO_UTIL_H_
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | media/base/video_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698