diff options
author | mcasas <mcasas@chromium.org> | 2015-05-29 15:38:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-29 22:39:21 +0000 |
commit | f1236fc25c67ceb18942ffc1696f24fd05e15453 (patch) | |
tree | 925ecdaca1415ddffdea51e0fa4d835c70aaca8a /media/filters/ffmpeg_video_decoder.cc | |
parent | cea5a9cbf8d5722435a6e13d4777568b1259ca75 (diff) | |
download | chromium_src-f1236fc25c67ceb18942ffc1696f24fd05e15453.zip chromium_src-f1236fc25c67ceb18942ffc1696f24fd05e15453.tar.gz chromium_src-f1236fc25c67ceb18942ffc1696f24fd05e15453.tar.bz2 |
Relanding 1143663007: VideoFrame: Separate Pixel Format from Storage Type.
Relanding after revert 1161803003.
(original list of reviewers:)
TBR=reveman@chromium.org, watk@chromium.org, jfroy@chromium.org, svitkine@chromium.org, DaleCurtis@chromium.org, miu@chromium.org, bbudge@chromium.org (for pepper)
Original CL description:
-----------------------------------------------------------
VideoFrame: Segregate Pixel Format and Storage Type.
VideoFrame::Format is a mix of textures and cpu-backed
formats. Textures are then further specified by
a texture format VideoFrame::TextureFormat.
This CL consolidates this into a single pixel format
and a storage type. This applies to HOLE as well,
which is understood as another Storage type.
VideoFrame ctor forces to pass a |mailbox_holders_|
also for non-texture based formats. Another private
ctor is added without this necessity, and all the
necessary factory methods are updated.
UMA-wise: Removing NATIVE_TEXTURE and HOLE from pixel
format prevents them from being UMA-accounted, but
there are no registered instances of those anyway.
NV12 format is restricted to OS_MACOSX.
BUG=489744
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Committed: https://crrev.com/80f289fe303323361d07c5b58b23f8499903a154
Cr-Commit-Position: refs/heads/master@{#332000}
Review URL: https://codereview.chromium.org/1154153003
Cr-Commit-Position: refs/heads/master@{#332065}
Diffstat (limited to 'media/filters/ffmpeg_video_decoder.cc')
-rw-r--r-- | media/filters/ffmpeg_video_decoder.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc index 54f1808..5d03c80 100644 --- a/media/filters/ffmpeg_video_decoder.cc +++ b/media/filters/ffmpeg_video_decoder.cc @@ -120,9 +120,10 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context, RoundUp(std::max(size.width(), codec_context->coded_width), 2), RoundUp(std::max(size.height(), codec_context->coded_height), 2)); - if (!VideoFrame::IsValidConfig( - format, coded_size, gfx::Rect(size), natural_size)) + if (!VideoFrame::IsValidConfig(format, VideoFrame::STORAGE_UNKNOWN, + coded_size, gfx::Rect(size), natural_size)) { return AVERROR(EINVAL); + } scoped_refptr<VideoFrame> video_frame = frame_pool_.CreateFrame( format, coded_size, gfx::Rect(size), natural_size, kNoTimestamp()); |