Added an extra thread for chunk extraction. Using the ChunkCache,
the ReadFrames call no longer needs to wait for the extractor, but can read it from a cache. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9482 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
26dc029a11
commit
d0da902001
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "ReaderPlugin.h"
|
#include "ReaderPlugin.h"
|
||||||
#include "DecoderPlugin.h"
|
#include "DecoderPlugin.h"
|
||||||
|
#include "ChunkCache.h"
|
||||||
|
|
||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
namespace media {
|
namespace media {
|
||||||
@ -14,6 +15,7 @@ struct stream_info
|
|||||||
bool hasCookie;
|
bool hasCookie;
|
||||||
void * infoBuffer;
|
void * infoBuffer;
|
||||||
int32 infoBufferSize;
|
int32 infoBufferSize;
|
||||||
|
ChunkCache * chunkCache;
|
||||||
media_format encodedFormat;
|
media_format encodedFormat;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -42,10 +44,17 @@ public:
|
|||||||
|
|
||||||
status_t CreateDecoder(int32 stream, Decoder **decoder, media_codec_info *mci);
|
status_t CreateDecoder(int32 stream, Decoder **decoder, media_codec_info *mci);
|
||||||
|
|
||||||
|
private:
|
||||||
|
static int32 extractor_thread(void *arg);
|
||||||
|
void ExtractorThread();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t fErr;
|
status_t fErr;
|
||||||
|
|
||||||
|
sem_id fExtractorWaitSem;
|
||||||
|
thread_id fExtractorThread;
|
||||||
|
volatile bool fTerminateExtractor;
|
||||||
|
|
||||||
BDataIO *fSource;
|
BDataIO *fSource;
|
||||||
Reader *fReader;
|
Reader *fReader;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user