diff options
author | dalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-22 23:06:45 +0000 |
---|---|---|
committer | dalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-22 23:06:45 +0000 |
commit | 7a032766439f88961cf02aa8b06e31c865c30692 (patch) | |
tree | a8aba2889c7644e184728b287ceb95eb165e0250 /media/base | |
parent | dc6ea7623f8289de35907a940e1e980b65f16aae (diff) | |
download | chromium_src-7a032766439f88961cf02aa8b06e31c865c30692.zip chromium_src-7a032766439f88961cf02aa8b06e31c865c30692.tar.gz chromium_src-7a032766439f88961cf02aa8b06e31c865c30692.tar.bz2 |
Fix media code to work with new ffmpeg.
Once ffmpeg git, svn are updated to new ffmpeg, will update DEPS
in this CL. Which when committed, should seal the deal for the
ffmpeg roll.
API Changes:
avutil: SampleFormat->AVSampleFormat
avutil: av_get_bits_per_sample_fmt -> av_get_bytes_per_sample
avcodec: avcodec_open -> avcodec_open2(..., NULL)
avcodec: avcodec_decode_video2(... AVPacket ...) -> const AVPacket.
avformat: av_open_input_file -> avformat_open_input
avformat: av_register_protocol2 -> ffurl_register_protocol
avformat: av_close_input_file -> avformat_close_input(&...)
avformat: av_find_stream_info -> avformat_find_stream_info(..., NULL)
URLContext now has a url_open2 method as well, for now I've set this
to NULL.
Also fixes:
- ffmpeg_unittests change threading to mirror ffmpeg_video_decoder. There's
an issue where threading causes the last frames of a no-audio video to be
clipped. It existed before this ffmpeg roll, but because threading was
disabled by default in ffmpeg, we never noticed it.
- ffmpeg_demuxer_tests: GetBitrate_UnsetInContainer_NoFileSize now passes.
- New ffmpeg_unittests passes:
sync0_ogv/FFmpegTest.Seek_Video/0, where GetParam() = "sync0.ogv"
sync1_ogv/FFmpegTest.Seek_Video/0, where GetParam() = "sync1.ogv"
sync2_ogv/FFmpegTest.Seek_Video/0, where GetParam() = "sync2.ogv"
FFmpeg fixups here, https://chromiumcodereview.appspot.com/9325049/
New git repo here: http://git.chromium.org/gitweb/?p=chromium/third_party/ffmpeg.git;a=summary
Merge+Patches diff: https://chromiumcodereview.appspot.com/9317107
BUG=110776
TEST=unittests, layouttests, etc. Trybots.
Review URL: https://chromiumcodereview.appspot.com/9317096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/audio_decoder_config.h | 3 | ||||
-rw-r--r-- | media/base/media_posix.cc | 6 | ||||
-rw-r--r-- | media/base/media_win.cc | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h index 90f51c1..6e58c5b 100644 --- a/media/base/audio_decoder_config.h +++ b/media/base/audio_decoder_config.h @@ -35,6 +35,9 @@ enum AudioCodec { kAudioCodecMax = kCodecPCM_MULAW // Must equal the last "real" codec above. }; +// TODO(dalecurtis): FFmpeg API uses |bytes_per_channel| instead of +// |bits_per_channel|, we should switch over since bits are generally confusing +// to work with. class MEDIA_EXPORT AudioDecoderConfig { public: // Constructs an uninitialized object. Clients should call Initialize() with diff --git a/media/base/media_posix.cc b/media/base/media_posix.cc index 7be3255..52ad34f 100644 --- a/media/base/media_posix.cc +++ b/media/base/media_posix.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -55,9 +55,9 @@ static std::string GetDSOName(tp_ffmpeg::StubModules stub_key) { // TODO(ajwong): Remove this once mac is migrated. Either that, or have GYP // set a constant that we can switch implementations based off of. switch (stub_key) { - case tp_ffmpeg::kModuleAvcodec53: + case tp_ffmpeg::kModuleAvcodec54: return FILE_PATH_LITERAL(DSO_NAME("avcodec", AVCODEC_VERSION)); - case tp_ffmpeg::kModuleAvformat53: + case tp_ffmpeg::kModuleAvformat54: return FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION)); case tp_ffmpeg::kModuleAvutil51: return FILE_PATH_LITERAL(DSO_NAME("avutil", AVUTIL_VERSION)); diff --git a/media/base/media_win.cc b/media/base/media_win.cc index 9462c02..e8c0368 100644 --- a/media/base/media_win.cc +++ b/media/base/media_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -25,9 +25,9 @@ static FilePath::CharType* GetDLLName(FFmpegDLLKeys dll_key) { // TODO(ajwong): Do we want to lock to a specific ffmpeg version? switch (dll_key) { case FILE_LIBAVCODEC: - return FILE_PATH_LITERAL("avcodec-53.dll"); + return FILE_PATH_LITERAL("avcodec-54.dll"); case FILE_LIBAVFORMAT: - return FILE_PATH_LITERAL("avformat-53.dll"); + return FILE_PATH_LITERAL("avformat-54.dll"); case FILE_LIBAVUTIL: return FILE_PATH_LITERAL("avutil-51.dll"); default: |