more codec api enhancements
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5523 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
#ifndef _PLUGIN_MANAGER_H
|
||||||
|
#define _PLUGIN_MANAGER_H
|
||||||
|
|
||||||
|
#include "ReaderPlugin.h"
|
||||||
|
#include "DecoderPlugin.h"
|
||||||
|
|
||||||
|
status_t _CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source);
|
||||||
|
status_t _CreateDecoder(Decoder **decoder, media_codec_info *mci, const media_format *format);
|
||||||
|
|
||||||
|
void _DestroyReader(Reader *reader);
|
||||||
|
void _DestroyDecoder(Decoder *decoder);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -74,6 +74,7 @@ SharedLibrary media :
|
|||||||
ReaderPlugin.cpp
|
ReaderPlugin.cpp
|
||||||
DecoderPlugin.cpp
|
DecoderPlugin.cpp
|
||||||
MediaExtractor.cpp
|
MediaExtractor.cpp
|
||||||
|
PluginManager.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
LinkSharedOSLibs libmedia.so :
|
LinkSharedOSLibs libmedia.so :
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
#include "MediaExtractor.h"
|
#include "MediaExtractor.h"
|
||||||
|
#include "PluginManager.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
status_t _CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source);
|
|
||||||
status_t _CreateDecoder(Decoder **decoder, media_codec_info *mci, const media_format *format);
|
|
||||||
|
|
||||||
MediaExtractor::MediaExtractor(BDataIO * source, int32 flags)
|
MediaExtractor::MediaExtractor(BDataIO * source, int32 flags)
|
||||||
{
|
{
|
||||||
fSource = source;
|
fSource = source;
|
||||||
@@ -62,6 +60,9 @@ MediaExtractor::~MediaExtractor()
|
|||||||
fReader->FreeCookie(fStreamInfo[i].cookie);
|
fReader->FreeCookie(fStreamInfo[i].cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fReader)
|
||||||
|
_DestroyReader(fReader);
|
||||||
|
|
||||||
delete fStreamInfo;
|
delete fStreamInfo;
|
||||||
delete fSource;
|
delete fSource;
|
||||||
}
|
}
|
||||||
@@ -171,15 +172,3 @@ MediaExtractor::CreateDecoder(int32 stream, Decoder **decoder, media_codec_info
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t
|
|
||||||
_CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source)
|
|
||||||
{
|
|
||||||
return B_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
status_t
|
|
||||||
_CreateDecoder(Decoder **decoder, media_codec_info *mci, const media_format *format)
|
|
||||||
{
|
|
||||||
return B_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
#include <MediaTrack.h>
|
#include <MediaTrack.h>
|
||||||
#include "MediaExtractor.h"
|
#include "MediaExtractor.h"
|
||||||
|
#include "PluginManager.h"
|
||||||
#include "ReaderPlugin.h"
|
#include "ReaderPlugin.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
@@ -15,7 +16,8 @@
|
|||||||
BMediaTrack::~BMediaTrack()
|
BMediaTrack::~BMediaTrack()
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
delete fDecoder;
|
if (fDecoder)
|
||||||
|
_DestroyDecoder(fDecoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include "PluginManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
_CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source)
|
||||||
|
{
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
status_t
|
||||||
|
_CreateDecoder(Decoder **decoder, media_codec_info *mci, const media_format *format)
|
||||||
|
{
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_DestroyReader(Reader *reader)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_DestroyDecoder(Decoder *decoder)
|
||||||
|
{
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user