summaryrefslogtreecommitdiffstats
path: root/media/ffmpeg/ffmpeg_common.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-21 20:18:15 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-21 20:18:15 +0000
commita20df1f7fa136a777212206ce61c119da2c9a0e2 (patch)
treec673996cf1d0ae017214744a06e0f4d240304fec /media/ffmpeg/ffmpeg_common.cc
parent8bcb0ab7d54f5786320e782e10b6616023a92931 (diff)
downloadchromium_src-a20df1f7fa136a777212206ce61c119da2c9a0e2.zip
chromium_src-a20df1f7fa136a777212206ce61c119da2c9a0e2.tar.gz
chromium_src-a20df1f7fa136a777212206ce61c119da2c9a0e2.tar.bz2
Revert 177842. This doesn't build in standalone webkit builds:
https://bugs.webkit.org/show_bug.cgi?id=107468 It looks like the exact same problem happened when this landed the last time: https://bugs.webkit.org/show_bug.cgi?id=105813 Please make sure this issue is fixed before you reland. The CL also likely regressed binary size by 0.25MB: http://crbug.com/171143 > Add wrapper class to media for support of VP9 video, and add a command line flag to enable the support. > > This initial version of the wrapper provides support for decoding VP9 video in WebM container files, and is disabled by default. > > New flag added: --enable-vp9-playback > > TBR=brettw,scherkus,xhwang > BUG=166094 > TEST=VP9 video in WebM containers plays back in <video> elements when --enable-vp9-playback is specified on the command line. > > > Review URL: https://chromiumcodereview.appspot.com/12025030 TBR=tomfinegan@chromium.org Review URL: https://codereview.chromium.org/11953017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg/ffmpeg_common.cc')
-rw-r--r--media/ffmpeg/ffmpeg_common.cc25
1 files changed, 3 insertions, 22 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 2ae0b1b..8b81e01 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -147,8 +147,6 @@ VideoCodec CodecIDToVideoCodec(CodecID codec_id) {
return kCodecMPEG4;
case CODEC_ID_VP8:
return kCodecVP8;
- case AV_CODEC_ID_VP9:
- return kCodecVP9;
default:
DVLOG(1) << "Unknown video CodecID: " << codec_id;
}
@@ -165,8 +163,6 @@ static CodecID VideoCodecToCodecID(VideoCodec video_codec) {
return CODEC_ID_MPEG4;
case kCodecVP8:
return CODEC_ID_VP8;
- case kCodecVP9:
- return AV_CODEC_ID_VP9;
default:
DVLOG(1) << "Unknown VideoCodec: " << video_codec;
}
@@ -339,28 +335,13 @@ void AVStreamToVideoDecoderConfig(
aspect_ratio = stream->codec->sample_aspect_ratio;
VideoCodec codec = CodecIDToVideoCodec(stream->codec->codec_id);
-
- VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
- if (codec == kCodecVP8)
- profile = VP8PROFILE_MAIN;
- else if (codec == kCodecVP9)
- profile = VP9PROFILE_MAIN;
- else
- profile = ProfileIDToVideoCodecProfile(stream->codec->profile);
-
+ VideoCodecProfile profile = (codec == kCodecVP8) ? VP8PROFILE_MAIN :
+ ProfileIDToVideoCodecProfile(stream->codec->profile);
gfx::Size natural_size = GetNaturalSize(
visible_rect.size(), aspect_ratio.num, aspect_ratio.den);
-
- VideoFrame::Format format = PixelFormatToVideoFormat(stream->codec->pix_fmt);
- if (codec == kCodecVP9) {
- // TODO(tomfinegan): libavcodec doesn't know about VP9.
- format = VideoFrame::YV12;
- coded_size = natural_size;
- }
-
config->Initialize(codec,
profile,
- format,
+ PixelFormatToVideoFormat(stream->codec->pix_fmt),
coded_size, visible_rect, natural_size,
stream->codec->extradata, stream->codec->extradata_size,
false, // Not encrypted.