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

Issue 9317096: Fix media code to work with new ffmpeg. (Closed)

Created:
8 years, 10 months ago by DaleCurtis
Modified:
8 years, 10 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, amit, acolwell+watch_chromium.org, annacc+watch_chromium.org, robertshield, vrk (LEFT CHROMIUM), pam+watch_chromium.org, scherkus (not reviewing), ihf+watch_chromium.org
Visibility:
Public.

Description

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. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=123123

Patch Set 1 #

Patch Set 2 : Fix deprecated methods. #

Total comments: 16

Patch Set 3 : Code review fixes. #

Total comments: 2

Patch Set 4 : Comment fix. #

Patch Set 5 : Switch back to av_register_protocol2 #

Patch Set 6 : More fixes. #

Patch Set 7 : Roll deps. #

Patch Set 8 : Roll deps. #

Patch Set 9 : Fix years. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -126 lines) Patch
M DEPS View 1 2 3 4 5 6 7 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/app/chrome.dll.deps View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/tools/build/win/FILES.cfg View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome_frame/test/perf/chrome_frame_perftest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/audio_decoder_config.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M media/base/media_posix.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M media/base/media_win.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M media/ffmpeg/ffmpeg_common.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/ffmpeg/ffmpeg_common.cc View 1 2 3 4 5 6 7 4 chunks +19 lines, -19 lines 0 comments Download
M media/ffmpeg/ffmpeg_regression_tests.cc View 1 2 3 4 5 6 5 chunks +32 lines, -17 lines 0 comments Download
M media/ffmpeg/ffmpeg_unittest.cc View 1 2 3 4 5 6 7 8 8 chunks +22 lines, -12 lines 0 comments Download
M media/ffmpeg/file_protocol.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M media/filters/audio_file_reader.cc View 1 2 3 4 5 6 7 8 5 chunks +8 lines, -8 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -4 lines 0 comments Download
M media/filters/ffmpeg_glue.h View 1 2 3 4 5 6 7 8 2 chunks +17 lines, -17 lines 0 comments Download
M media/filters/ffmpeg_glue.cc View 1 2 3 4 5 6 7 8 4 chunks +3 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_glue_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_video_decoder_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M media/test/ffmpeg_tests/ffmpeg_tests.cc View 1 2 3 4 6 chunks +7 lines, -8 lines 0 comments Download
M media/tools/media_bench/media_bench.cc View 1 2 3 4 5 6 7 8 7 chunks +8 lines, -9 lines 0 comments Download
M media/webm/webm_stream_parser.cc View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
DaleCurtis
PTAL. These changes are 99% complete, all that's left is to roll DEPS in this ...
8 years, 10 months ago (2012-02-04 03:42:28 UTC) #1
ilja
Double check that you got all the 53->54 transitions. They lurk in unexpected places. In ...
8 years, 10 months ago (2012-02-04 03:57:38 UTC) #2
DaleCurtis
These are all that code search found, if you know of any others please let ...
8 years, 10 months ago (2012-02-04 04:02:32 UTC) #3
Ami GONE FROM CHROMIUM
I'll let scherkus review this.
8 years, 10 months ago (2012-02-04 17:04:15 UTC) #4
scherkus (not reviewing)
http://codereview.chromium.org/9317096/diff/2001/media/ffmpeg/ffmpeg_common.cc File media/ffmpeg/ffmpeg_common.cc (right): http://codereview.chromium.org/9317096/diff/2001/media/ffmpeg/ffmpeg_common.cc#newcode189 media/ffmpeg/ffmpeg_common.cc:189: bytes_per_channel << 3, we should also make a similar ...
8 years, 10 months ago (2012-02-06 21:13:49 UTC) #5
DaleCurtis
PTAL. Where is the revision # controlled for rolling the Chrome specific binaries? In DEPS ...
8 years, 10 months ago (2012-02-07 19:09:13 UTC) #6
scherkus (not reviewing)
LGTM w/ one nit http://codereview.chromium.org/9317096/diff/13002/media/base/audio_decoder_config.h File media/base/audio_decoder_config.h (right): http://codereview.chromium.org/9317096/diff/13002/media/base/audio_decoder_config.h#newcode39 media/base/audio_decoder_config.h:39: // bits_per_channel, we should match ...
8 years, 10 months ago (2012-02-07 19:21:28 UTC) #7
scherkus (not reviewing)
LGTM w/ one nit http://codereview.chromium.org/9317096/diff/13002/media/base/audio_decoder_config.h File media/base/audio_decoder_config.h (right): http://codereview.chromium.org/9317096/diff/13002/media/base/audio_decoder_config.h#newcode39 media/base/audio_decoder_config.h:39: // bits_per_channel, we should match ...
8 years, 10 months ago (2012-02-07 19:21:29 UTC) #8
DaleCurtis
8 years, 10 months ago (2012-02-07 22:53:55 UTC) #9
http://codereview.chromium.org/9317096/diff/13002/media/base/audio_decoder_co...
File media/base/audio_decoder_config.h (right):

http://codereview.chromium.org/9317096/diff/13002/media/base/audio_decoder_co...
media/base/audio_decoder_config.h:39: // bits_per_channel, we should match them.
On 2012/02/07 19:21:29, scherkus wrote:
> nit: want to move this down by the function itself?
> 
> also annotate w/ ()
> 
> I'd also say that this TODO isn't about matching FFmpeg per se, just that bits
> are more confusing to work with :)

I put it up here since there are several functions and variables which
references bits_per_channel. The () is just for functions right? These are
variable names.

I did clarify the comment a bit. Once the DEPS roll is ready, I'll ping you
again for one last look at those bits.

Powered by Google App Engine
This is Rietveld 408576698