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

Unified Diff: media/base/video_frame_unittest.cc

Issue 1960563002: Add media::VideoFrame::WrapNativeTextures() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/video_frame.cc ('k') | media/blink/webmediaplayer_cast_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_unittest.cc
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index d66859b01e87983685a6115bc245afcc9a7c9df6..ea03e032b62540192c35479c544f964dcab42cf7 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -294,9 +294,10 @@ TEST(VideoFrame, TextureNoLongerNeededCallbackIsCalled) {
gpu::CommandBufferId::FromUnsafeValue(1), 1);
{
- scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTexture(
- PIXEL_FORMAT_ARGB,
- gpu::MailboxHolder(gpu::Mailbox::Generate(), gpu::SyncToken(), 5),
+ gpu::MailboxHolder holders[media::VideoFrame::kMaxPlanes] = {
+ gpu::MailboxHolder(gpu::Mailbox::Generate(), gpu::SyncToken(), 5)};
+ scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTextures(
+ PIXEL_FORMAT_ARGB, holders,
base::Bind(&TextureCallback, &called_sync_token),
gfx::Size(10, 10), // coded_size
gfx::Rect(10, 10), // visible_rect
@@ -352,10 +353,13 @@ TEST(VideoFrame,
gpu::SyncToken called_sync_token;
{
- scoped_refptr<VideoFrame> frame = VideoFrame::WrapYUV420NativeTextures(
+ gpu::MailboxHolder holders[media::VideoFrame::kMaxPlanes] = {
gpu::MailboxHolder(mailbox[VideoFrame::kYPlane], sync_token, target),
gpu::MailboxHolder(mailbox[VideoFrame::kUPlane], sync_token, target),
gpu::MailboxHolder(mailbox[VideoFrame::kVPlane], sync_token, target),
+ };
+ scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTextures(
+ PIXEL_FORMAT_I420, holders,
base::Bind(&TextureCallback, &called_sync_token),
gfx::Size(10, 10), // coded_size
gfx::Rect(10, 10), // visible_rect
« no previous file with comments | « media/base/video_frame.cc ('k') | media/blink/webmediaplayer_cast_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698