* Cleanup
* Added TODO note with regards to BDataIO streams. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31618 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -24,7 +24,6 @@ extern "C" {
|
|||||||
|
|
||||||
#include "DemuxerTable.h"
|
#include "DemuxerTable.h"
|
||||||
#include "gfx_util.h"
|
#include "gfx_util.h"
|
||||||
//#include "RawFormats.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_AVFORMAT_READER
|
#define TRACE_AVFORMAT_READER
|
||||||
@@ -45,7 +44,7 @@ extern "C" {
|
|||||||
|
|
||||||
static const size_t kIOBufferSize = 64 * 1024;
|
static const size_t kIOBufferSize = 64 * 1024;
|
||||||
// TODO: This could depend on the BMediaFile creation flags, IIRC,
|
// TODO: This could depend on the BMediaFile creation flags, IIRC,
|
||||||
// the allow to specify a buffering mode.
|
// they allow to specify a buffering mode.
|
||||||
|
|
||||||
uint32
|
uint32
|
||||||
avformat_to_beos_format(SampleFormat format)
|
avformat_to_beos_format(SampleFormat format)
|
||||||
@@ -92,7 +91,7 @@ public:
|
|||||||
|
|
||||||
double FrameRate() const;
|
double FrameRate() const;
|
||||||
|
|
||||||
// Support for AVFormatContext
|
// Support for AVFormatReader
|
||||||
status_t GetStreamInfo(int64* frameCount,
|
status_t GetStreamInfo(int64* frameCount,
|
||||||
bigtime_t* duration, media_format* format,
|
bigtime_t* duration, media_format* format,
|
||||||
const void** infoBuffer,
|
const void** infoBuffer,
|
||||||
@@ -112,6 +111,14 @@ private:
|
|||||||
// Since multiple StreamCookies use the same BPositionIO source, they
|
// Since multiple StreamCookies use the same BPositionIO source, they
|
||||||
// maintain the position individually, and may need to seek the source
|
// maintain the position individually, and may need to seek the source
|
||||||
// if it does not match anymore in _Read().
|
// if it does not match anymore in _Read().
|
||||||
|
// TODO: This concept prevents the use of a plain BDataIO that is not
|
||||||
|
// seekable. There is a version of AVFormatReader in the SVN history
|
||||||
|
// which implements packet buffering for other streams when reading
|
||||||
|
// packets. To support non-seekable network streams for example, this
|
||||||
|
// code should be resurrected. It will make handling seekable streams,
|
||||||
|
// especially from different threads that read from totally independent
|
||||||
|
// positions in the stream (aggressive pre-buffering perhaps), a lot
|
||||||
|
// more difficult with potentially large memory overhead.
|
||||||
static int _Read(void* cookie, uint8* buffer,
|
static int _Read(void* cookie, uint8* buffer,
|
||||||
int bufferSize);
|
int bufferSize);
|
||||||
static off_t _Seek(void* cookie, off_t offset, int whence);
|
static off_t _Seek(void* cookie, off_t offset, int whence);
|
||||||
|
|||||||
Reference in New Issue
Block a user