| Index: media/base/video_frame.cc
|
| diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
|
| index 578f2e1a80ee3200d2bab57a9f202adc565055c7..037b8d620283a09f23d83526c3a5999780a92da0 100644
|
| --- a/media/base/video_frame.cc
|
| +++ b/media/base/video_frame.cc
|
| @@ -156,16 +156,17 @@ scoped_refptr<VideoFrame> VideoFrame::CreateZeroInitializedFrame(
|
| }
|
|
|
| // static
|
| -scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
|
| +scoped_refptr<VideoFrame> VideoFrame::WrapNativeTextures(
|
| VideoPixelFormat format,
|
| - const gpu::MailboxHolder& mailbox_holder,
|
| + const gpu::MailboxHolder (&mailbox_holders)[kMaxPlanes],
|
| const ReleaseMailboxCB& mailbox_holder_release_cb,
|
| const gfx::Size& coded_size,
|
| const gfx::Rect& visible_rect,
|
| const gfx::Size& natural_size,
|
| base::TimeDelta timestamp) {
|
| if (format != PIXEL_FORMAT_ARGB && format != PIXEL_FORMAT_XRGB &&
|
| - format != PIXEL_FORMAT_UYVY && format != PIXEL_FORMAT_NV12) {
|
| + format != PIXEL_FORMAT_UYVY && format != PIXEL_FORMAT_NV12 &&
|
| + format != PIXEL_FORMAT_I420) {
|
| LOG(DFATAL) << "Unsupported pixel format supported, got "
|
| << VideoPixelFormatToString(format);
|
| return nullptr;
|
| @@ -178,35 +179,6 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
|
| return nullptr;
|
| }
|
|
|
| - gpu::MailboxHolder mailbox_holders[kMaxPlanes];
|
| - mailbox_holders[kARGBPlane] = mailbox_holder;
|
| - return new VideoFrame(format, storage, coded_size, visible_rect, natural_size,
|
| - mailbox_holders, mailbox_holder_release_cb, timestamp);
|
| -}
|
| -
|
| -// static
|
| -scoped_refptr<VideoFrame> VideoFrame::WrapYUV420NativeTextures(
|
| - const gpu::MailboxHolder& y_mailbox_holder,
|
| - const gpu::MailboxHolder& u_mailbox_holder,
|
| - const gpu::MailboxHolder& v_mailbox_holder,
|
| - const ReleaseMailboxCB& mailbox_holder_release_cb,
|
| - const gfx::Size& coded_size,
|
| - const gfx::Rect& visible_rect,
|
| - const gfx::Size& natural_size,
|
| - base::TimeDelta timestamp) {
|
| - const StorageType storage = STORAGE_OPAQUE;
|
| - VideoPixelFormat format = PIXEL_FORMAT_I420;
|
| - if (!IsValidConfig(format, storage, coded_size, visible_rect, natural_size)) {
|
| - LOG(DFATAL) << __FUNCTION__ << " Invalid config."
|
| - << ConfigToString(format, storage, coded_size, visible_rect,
|
| - natural_size);
|
| - return nullptr;
|
| - }
|
| -
|
| - gpu::MailboxHolder mailbox_holders[kMaxPlanes];
|
| - mailbox_holders[kYPlane] = y_mailbox_holder;
|
| - mailbox_holders[kUPlane] = u_mailbox_holder;
|
| - mailbox_holders[kVPlane] = v_mailbox_holder;
|
| return new VideoFrame(format, storage, coded_size, visible_rect, natural_size,
|
| mailbox_holders, mailbox_holder_release_cb, timestamp);
|
| }
|
|
|