[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9964: Get padding information from
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9964: Get padding information from media backend. |
Date: |
Wed, 08 Oct 2008 15:54:55 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9964
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2008-10-08 15:54:55 +0200
message:
Get padding information from media backend.
modified:
libmedia/MediaHandler.h
libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
libmedia/ffmpeg/MediaHandlerFfmpeg.h
------------------------------------------------------------
revno: 9963.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Wed 2008-10-08 15:52:46 +0200
message:
Provide getInputPaddingSize() for the media handler to allow allocating
the correct size of buffer on SWF parsing.
modified:
libmedia/MediaHandler.h
libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
libmedia/ffmpeg/MediaHandlerFfmpeg.h
=== modified file 'libmedia/MediaHandler.h'
--- a/libmedia/MediaHandler.h 2008-09-23 17:14:12 +0000
+++ b/libmedia/MediaHandler.h 2008-10-08 13:52:46 +0000
@@ -72,7 +72,8 @@
/// NOTE: the default implementation returns an FLVParser for FLV input
/// or 0 for others.
///
- virtual std::auto_ptr<MediaParser>
createMediaParser(std::auto_ptr<IOChannel> stream);
+ virtual std::auto_ptr<MediaParser> createMediaParser(
+ std::auto_ptr<IOChannel> stream);
/// Create a VideoDecoder for decoding what's specified in the VideoInfo
//
@@ -90,6 +91,12 @@
/// gnash::MediaException if a fatal error occurs.
virtual std::auto_ptr<AudioDecoder> createAudioDecoder(AudioInfo&
info)=0;
+ /// Return the number of bytes padding needed for input buffers
+ //
+ /// Bitstream readers are optimized to read several bytes at a time,
+ /// and this should be used to allocate a large enough input buffer.
+ virtual size_t getInputPaddingSize() const { return 0; }
+
protected:
/// Return true if input stream is an FLV
=== modified file 'libmedia/ffmpeg/MediaHandlerFfmpeg.cpp'
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp 2008-09-23 17:14:12 +0000
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp 2008-10-08 13:52:46 +0000
@@ -71,5 +71,11 @@
return ret;
}
+size_t
+MediaHandlerFfmpeg::getInputPaddingSize() const
+{
+ return FF_INPUT_BUFFER_PADDING_SIZE;
+}
+
} // gnash.media namespace
} // gnash namespace
=== modified file 'libmedia/ffmpeg/MediaHandlerFfmpeg.h'
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.h 2008-09-23 17:14:12 +0000
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.h 2008-10-08 13:52:46 +0000
@@ -40,6 +40,9 @@
virtual std::auto_ptr<VideoDecoder> createVideoDecoder(VideoInfo& info);
virtual std::auto_ptr<AudioDecoder> createAudioDecoder(AudioInfo& info);
+
+ size_t getInputPaddingSize() const;
+
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9964: Get padding information from media backend.,
Benjamin Wolsey <=