diff options
author | dalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-31 20:35:25 +0000 |
---|---|---|
committer | dalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-31 20:35:25 +0000 |
commit | f42d6a10c8645a83220341ef9cfd22b36b3b49b5 (patch) | |
tree | db76016f0b892d43961d1ead916de9f79534fa62 /media/base/buffers.h | |
parent | 665e4fbc3d7de70829f6db36a955f63f9c4d7f9f (diff) | |
download | chromium_src-f42d6a10c8645a83220341ef9cfd22b36b3b49b5.zip chromium_src-f42d6a10c8645a83220341ef9cfd22b36b3b49b5.tar.gz chromium_src-f42d6a10c8645a83220341ef9cfd22b36b3b49b5.tar.bz2 |
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.
Review URL: https://chromiumcodereview.appspot.com/10447035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/buffers.h')
-rw-r--r-- | media/base/buffers.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/media/base/buffers.h b/media/base/buffers.h index f4e4264..d14f4db 100644 --- a/media/base/buffers.h +++ b/media/base/buffers.h @@ -33,8 +33,6 @@ namespace media { -class DecryptConfig; - // Indicates an invalid or missing timestamp. MEDIA_EXPORT extern inline base::TimeDelta kNoTimestamp() { return base::TimeDelta::FromMicroseconds(kint64min); @@ -56,9 +54,6 @@ class MEDIA_EXPORT Buffer : public base::RefCountedThreadSafe<Buffer> { // If there's no data in this buffer, it represents end of stream. bool IsEndOfStream() const; - // Return DecryptConfig if buffer is encrypted, or NULL otherwise. - virtual const DecryptConfig* GetDecryptConfig() const; - base::TimeDelta GetTimestamp() const { return timestamp_; } |