|
Introducing DecoderBuffer and general Buffer cleanup.
FFmpeg expects data to be padded and aligned in a certain way. It's
currently possible to do this incorrectly and introduce dangerous issues.
I enforce padding and alignment by introducing a new Buffer called
DecoderBuffer and forcing DemuxerStream::Read to only accept it for
transfer into decoders.
DecoderBuffer allocates all memory through av_malloc (which takes care of
alignment) with the appropriate padding size (except for Android, which
doesn't care about this).
Along the way it was necessary to clean up a large smattering of code to
replace usage of DataBuffer with DecoderBuffer.
I've rolled in several cleanup actions as well:
- Moved DecryptConfig from Buffer to DecoderBuffer.
- Replaced AVPacketBuffer and av_dup_packet with a DecoderBuffer::CopyFrom.
- Fixed a resultant issue with FFmpegBitStreamConverter after removing the
av_dup_packet functionality. Removed some unsupported bitstream filters.
- Reduce TestDataUtil::ReadTestDataFile() to a single method returning a
DecoderBuffer so unit tests will always have safe buffers.
- Replace new DataBuffer(0)/new DecoderBuffer(0) w/
DecoderBuffer::CreateEOSBuffer.
- Remove extraneous IsEndOfStream check from FFmpegAudioDecoder.
BUG= 129843
TEST=media_unittests + valgrind, layout tests.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=139857
Total comments: 37
Total comments: 19
Total comments: 10
Total comments: 17
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+461 lines, -326 lines) |
Patch |
 |
M |
media/audio/win/audio_low_latency_output_win_unittest.cc
|
View
|
1
2
3
4
5
6
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
media/base/buffers.h
|
View
|
|
2 chunks |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
media/base/buffers.cc
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
media/base/buffers_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
media/base/data_buffer.h
|
View
|
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
media/base/data_buffer.cc
|
View
|
1
|
4 chunks |
+15 lines, -33 lines |
0 comments
|
Download
|
 |
A |
media/base/decoder_buffer.h
|
View
|
1
2
3
4
5
|
1 chunk |
+66 lines, -0 lines |
0 comments
|
Download
|
 |
A |
media/base/decoder_buffer.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+87 lines, -0 lines |
0 comments
|
Download
|
 |
A |
media/base/decoder_buffer_unittest.cc
|
View
|
1
2
|
1 chunk |
+103 lines, -0 lines |
0 comments
|
Download
|
 |
M |
media/base/demuxer_stream.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/base/mock_reader.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/base/stream_parser_buffer.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/base/stream_parser_buffer.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
media/base/test_data_util.h
|
View
|
|
1 chunk |
+4 lines, -22 lines |
0 comments
|
Download
|
 |
M |
media/base/test_data_util.cc
|
View
|
1
|
3 chunks |
+7 lines, -30 lines |
0 comments
|
Download
|
 |
M |
media/base/video_decoder.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
media/crypto/aes_decryptor.h
|
View
|
1
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/crypto/aes_decryptor.cc
|
View
|
1
2
3
4
|
5 chunks |
+10 lines, -12 lines |
0 comments
|
Download
|
 |
M |
media/crypto/aes_decryptor_unittest.cc
|
View
|
|
4 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
media/filters/chunk_demuxer.cc
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/filters/chunk_demuxer_unittest.cc
|
View
|
1
2
|
7 chunks |
+34 lines, -38 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_audio_decoder.h
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_audio_decoder.cc
|
View
|
1
|
4 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_audio_decoder_unittest.cc
|
View
|
1
|
5 chunks |
+10 lines, -13 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_demuxer.h
|
View
|
1
2
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_demuxer.cc
|
View
|
1
2
3
4
|
12 chunks |
+30 lines, -78 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_demuxer_unittest.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_h264_bitstream_converter.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_video_decoder.h
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_video_decoder.cc
|
View
|
1
|
4 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
media/filters/ffmpeg_video_decoder_unittest.cc
|
View
|
1
|
7 chunks |
+14 lines, -15 lines |
0 comments
|
Download
|
 |
M |
media/filters/gpu_video_decoder.h
|
View
|
1
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/filters/gpu_video_decoder.cc
|
View
|
|
4 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/filters/pipeline_integration_test.cc
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+9 lines, -10 lines |
0 comments
|
Download
|
 |
M |
media/media.gyp
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
media/tools/seek_tester/seek_tester.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 26 (0 generated)
|