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

Issue 10912080: Switch to AVIO instead of a custom FFmpeg URLProtocol handler. (Closed)

Created:
8 years, 3 months ago by DaleCurtis
Modified:
8 years, 1 month ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Switch to AVIO instead of a custom FFmpeg URLProtocol handler. FFmpegGlue is a filthy den of sin: - Singleton. - Unchecked initialization. - Mixed signed, unsigned usage. - Requires custom FFmpeg patches. - Hacks IO through http://0xDEADBEEF Switching to AVIO will absolve FFmpegGlue of its sins and has the added bonus of allowing us to tweak the buffer sizes used for read requests over the wire. AVIO works through a special AVIOContext created through avio_alloc_context() which is attached to the AVFormatContext used for demuxing. The AVIO context is initialized with read and seek methods identical to the existing URLProtocol structures. During avformat_open_input() we tell FFmpeg to use our AVIO context by passing NULL in for the filename parameter. FFmpeg will now redirect all reads and seeks through our AVIO context. The new FFmpegGlue also handles all destruction cases which can occur after an OpenContext(), allowing us to unify the slightly disparate shutdown paths used by FFmpegDemuxer and AudioFileReader. BUG=118986, 146529 TEST=unit tests under tooling. layout tests. manual playback pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=165502

Patch Set 1 : AVIO! #

Total comments: 26

Patch Set 2 : Comments. #

Total comments: 2

Patch Set 3 : Documentation! #

Patch Set 4 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+325 lines, -521 lines) Patch
M media/ffmpeg/ffmpeg_common.h View 1 chunk +0 lines, -4 lines 0 comments Download
M media/ffmpeg/ffmpeg_common.cc View 1 2 3 1 chunk +0 lines, -26 lines 0 comments Download
M media/filters/audio_file_reader.h View 1 2 3 2 chunks +6 lines, -5 lines 0 comments Download
M media/filters/audio_file_reader.cc View 1 2 3 7 chunks +21 lines, -36 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/filters/ffmpeg_audio_decoder_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 4 chunks +3 lines, -5 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 9 chunks +17 lines, -40 lines 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M media/filters/ffmpeg_glue.h View 1 2 2 chunks +35 lines, -64 lines 0 comments Download
M media/filters/ffmpeg_glue.cc View 1 3 chunks +86 lines, -92 lines 0 comments Download
M media/filters/ffmpeg_glue_unittest.cc View 1 3 chunks +126 lines, -206 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M media/filters/ffmpeg_video_decoder_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/filters/in_memory_url_protocol.h View 2 chunks +2 lines, -1 line 0 comments Download
M media/filters/in_memory_url_protocol.cc View 1 chunk +2 lines, -2 lines 0 comments Download
media/webm/webm_stream_parser.cc View 1 2 3 5 chunks +17 lines, -29 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
DaleCurtis
Yay! @Ronald, please sanity check my FFmpeg construct usage here. Luca informed me about AVIO ...
8 years, 2 months ago (2012-09-27 02:17:56 UTC) #1
Ami GONE FROM CHROMIUM
drive-by I guess most of my comments are negated by the "ah crap" one. Leaving ...
8 years, 2 months ago (2012-09-27 03:24:45 UTC) #2
DaleCurtis
http://codereview.chromium.org/10912080/diff/10001/media/filters/ffmpeg_demuxer.h File media/filters/ffmpeg_demuxer.h (right): http://codereview.chromium.org/10912080/diff/10001/media/filters/ffmpeg_demuxer.h#newcode160 media/filters/ffmpeg_demuxer.h:160: // FFmpegURLProtocol implementation. On 2012/09/27 03:24:45, Ami Fischman wrote: ...
8 years, 2 months ago (2012-09-27 03:46:11 UTC) #3
rbultje1
On 2012/09/27 02:17:56, DaleCurtis wrote: > Yay! @Ronald, please sanity check my FFmpeg construct usage ...
8 years, 2 months ago (2012-09-27 16:20:24 UTC) #4
DaleCurtis
https://codereview.chromium.org/10912080/diff/10001/media/filters/ffmpeg_glue.cc File media/filters/ffmpeg_glue.cc (right): https://codereview.chromium.org/10912080/diff/10001/media/filters/ffmpeg_glue.cc#newcode174 media/filters/ffmpeg_glue.cc:174: avcodec_close(stream->codec); On 2012/09/27 03:46:12, DaleCurtis wrote: > On 2012/09/27 ...
8 years, 2 months ago (2012-09-28 23:17:41 UTC) #5
scherkus (not reviewing)
do you remember why we call FFmpegGlue::InitializeFFmpeg() everywhere? is it "just in case"? http://codereview.chromium.org/10912080/diff/10001/media/filters/audio_file_reader.cc File ...
8 years, 2 months ago (2012-10-02 00:20:56 UTC) #6
DaleCurtis
Pretty sure it's just in case. Maybe at one time it was necessary because the ...
8 years, 2 months ago (2012-10-02 01:24:23 UTC) #7
scherkus (not reviewing)
lgtm w/ comment https://codereview.chromium.org/10912080/diff/27001/media/filters/ffmpeg_glue.h File media/filters/ffmpeg_glue.h (right): https://codereview.chromium.org/10912080/diff/27001/media/filters/ffmpeg_glue.h#newcode64 media/filters/ffmpeg_glue.h:64: explicit FFmpegGlue(FFmpegURLProtocol* protocol); seems like you ...
8 years, 2 months ago (2012-10-02 01:36:35 UTC) #8
DaleCurtis
https://codereview.chromium.org/10912080/diff/27001/media/filters/ffmpeg_glue.h File media/filters/ffmpeg_glue.h (right): https://codereview.chromium.org/10912080/diff/27001/media/filters/ffmpeg_glue.h#newcode64 media/filters/ffmpeg_glue.h:64: explicit FFmpegGlue(FFmpegURLProtocol* protocol); On 2012/10/02 01:36:35, scherkus wrote: > ...
8 years, 2 months ago (2012-10-02 01:46:30 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/10912080/24002
8 years, 2 months ago (2012-10-02 01:46:51 UTC) #10
commit-bot: I haz the power
Retried try job too often for step(s) sync_integration_tests, content_unittests, browser_tests, chrome_frame_net_tests
8 years, 2 months ago (2012-10-02 04:12:11 UTC) #11
DaleCurtis
On 2012/10/02 04:12:11, I haz the power (commit-bot) wrote: > Retried try job too often ...
8 years, 2 months ago (2012-10-06 00:07:55 UTC) #12
DaleCurtis
On 2012/10/06 00:07:55, DaleCurtis wrote: > On 2012/10/02 04:12:11, I haz the power (commit-bot) wrote: ...
8 years, 2 months ago (2012-10-22 20:43:48 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/10912080/41001
8 years, 1 month ago (2012-11-01 19:34:45 UTC) #14
commit-bot: I haz the power
8 years, 1 month ago (2012-11-01 21:23:36 UTC) #15
Change committed as 165502

Powered by Google App Engine
This is Rietveld 408576698