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

Unified Diff: media/base/video_frame.h

Issue 1737253002: Handle Alpha channel in Canvas capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: media/base/video_frame.h
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index ad7f4c01a4268651728ce71acba87c3ec0ac388e..ea1359e32ad3a6764bbbf73b81a81c7b30899f8c 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -379,6 +379,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
CVPixelBufferRef cv_pixel_buffer() const;
#endif
+ // Converts a frame with YV12A format into I420 by dropping alpha channel.
Pawel Osciak 2016/02/26 00:32:51 Personally, I'm wondering if this kind of a method
emircan 2016/02/26 01:33:08 I see your point about VF being too complicated ag
Pawel Osciak 2016/02/26 01:51:25 Honestly, I would really prefer not doing it this
+ bool DropYV12AAlphaChannel();
+
// Adds a callback to be run when the VideoFrame is about to be destroyed.
// The callback may be run from ANY THREAD, and so it is up to the client to
// ensure thread safety. Although read-only access to the members of this
@@ -464,7 +467,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
void AllocateYUV(bool zero_initialize_memory);
// Frame format.
- const VideoPixelFormat format_;
+ VideoPixelFormat format_;
// Storage type for the different planes.
StorageType storage_type_; // TODO(mcasas): make const

Powered by Google App Engine
This is Rietveld 408576698