integrating codec API, added some MediaExtractor functionality

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5470 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2003-11-23 23:50:27 +00:00
parent 8545b8bd8d
commit 7a115dc75d
4 changed files with 148 additions and 16 deletions
+11 -4
View File
@@ -1,7 +1,10 @@
#ifndef _DECODER_PLUGIN_H
#define _DECODER_PLUGIN_H
#include <MediaTrack.h>
#include <MediaFormats.h>
#include "MediaPlugin.h"
#include "ReaderPlugin.h"
#include "MediaExtractor.h"
namespace BPrivate { namespace media {
@@ -26,9 +29,11 @@ public:
media_header *mediaHeader);
private:
void Setup(Reader *reader, void *readerCookie);
Reader * fReader;
void * fReaderCookie;
friend class MediaExtractor;
void Setup(MediaExtractor *extractor, int32 stream);
MediaExtractor * fExtractor;
int32 fStream;
};
@@ -46,3 +51,5 @@ public:
} } // namespace BPrivate::media
using namespace BPrivate::media;
#endif
+20
View File
@@ -7,6 +7,15 @@
namespace BPrivate {
namespace media {
struct stream_info
{
status_t status;
void * cookie;
void * infoBuffer;
int32 infoBufferSize;
media_format encodedFormat;
};
class MediaExtractor
{
public:
@@ -33,7 +42,18 @@ public:
media_header *mediaHeader);
status_t CreateDecoder(int32 stream, Decoder **decoder, media_codec_info *mci);
private:
status_t fErr;
BDataIO *fSource;
Reader *fReader;
stream_info * fStreamInfo;
int32 fStreamCount;
media_file_format fMff;
};
}; // namespace media