implement MediaDecoder using added ChunkProvider
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6136 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,6 +7,12 @@
|
|||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
class Decoder;
|
class Decoder;
|
||||||
}
|
}
|
||||||
|
namespace BPrivate {
|
||||||
|
namespace media {
|
||||||
|
class Decoder;
|
||||||
|
class DecoderPlugin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class BMediaDecoder {
|
class BMediaDecoder {
|
||||||
public:
|
public:
|
||||||
@@ -42,14 +48,16 @@ class BMediaDecoder {
|
|||||||
static status_t next_chunk(void *classptr, void **chunkData, size_t *chunkLen, media_header *mh);
|
static status_t next_chunk(void *classptr, void **chunkData, size_t *chunkLen, media_header *mh);
|
||||||
void ReleaseDecoder();
|
void ReleaseDecoder();
|
||||||
|
|
||||||
BPrivate::Decoder *fDecoder;
|
BPrivate::media::Decoder *fDecoder;
|
||||||
int32 fDecoderID;
|
int32 fDecoderID;
|
||||||
|
BPrivate::media::DecoderPlugin *fDecoderPlugin;
|
||||||
|
int32 fDecoderPluginID;
|
||||||
status_t fInitStatus;
|
status_t fInitStatus;
|
||||||
|
|
||||||
|
|
||||||
/* fbc data and virtuals */
|
/* fbc data and virtuals */
|
||||||
|
|
||||||
uint32 _reserved_BMediaDecoder_[32];
|
uint32 _reserved_BMediaDecoder_[30];
|
||||||
|
|
||||||
virtual status_t _Reserved_BMediaDecoder_0(int32 arg, ...);
|
virtual status_t _Reserved_BMediaDecoder_0(int32 arg, ...);
|
||||||
virtual status_t _Reserved_BMediaDecoder_1(int32 arg, ...);
|
virtual status_t _Reserved_BMediaDecoder_1(int32 arg, ...);
|
||||||
|
|||||||
@@ -4,12 +4,17 @@
|
|||||||
#include <MediaTrack.h>
|
#include <MediaTrack.h>
|
||||||
#include <MediaFormats.h>
|
#include <MediaFormats.h>
|
||||||
#include "MediaPlugin.h"
|
#include "MediaPlugin.h"
|
||||||
#include "MediaExtractor.h"
|
|
||||||
|
|
||||||
class AddOnManager;
|
class AddOnManager;
|
||||||
|
|
||||||
namespace BPrivate { namespace media {
|
namespace BPrivate { namespace media {
|
||||||
|
|
||||||
|
class ChunkProvider {
|
||||||
|
public:
|
||||||
|
virtual status_t GetNextChunk(void **chunkBuffer, int32 *chunkSize,
|
||||||
|
media_header *mediaHeader) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
class Decoder
|
class Decoder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -31,12 +36,9 @@ public:
|
|||||||
status_t GetNextChunk(void **chunkBuffer, int32 *chunkSize,
|
status_t GetNextChunk(void **chunkBuffer, int32 *chunkSize,
|
||||||
media_header *mediaHeader);
|
media_header *mediaHeader);
|
||||||
|
|
||||||
|
void Setup(ChunkProvider *provider);
|
||||||
private:
|
private:
|
||||||
friend class MediaExtractor;
|
ChunkProvider * fChunkProvider;
|
||||||
|
|
||||||
void Setup(MediaExtractor *extractor, int32 stream);
|
|
||||||
MediaExtractor * fExtractor;
|
|
||||||
int32 fStream;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user