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 "DecoderPlugin.h"
|
||||
#include "ChunkCache.h"
|
||||
|
||||
namespace BPrivate {
|
||||
namespace media {
|
||||
@ -14,6 +15,7 @@ struct stream_info
|
||||
bool hasCookie;
|
||||
void * infoBuffer;
|
||||
int32 infoBufferSize;
|
||||
ChunkCache * chunkCache;
|
||||
media_format encodedFormat;
|
||||
};
|
||||
|
||||
@ -42,10 +44,17 @@ public:
|
||||
|
||||
status_t CreateDecoder(int32 stream, Decoder **decoder, media_codec_info *mci);
|
||||
|
||||
private:
|
||||
static int32 extractor_thread(void *arg);
|
||||
void ExtractorThread();
|
||||
|
||||
private:
|
||||
status_t fErr;
|
||||
|
||||
|
||||
sem_id fExtractorWaitSem;
|
||||
thread_id fExtractorThread;
|
||||
volatile bool fTerminateExtractor;
|
||||
|
||||
BDataIO *fSource;
|
||||
Reader *fReader;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user