Moved creating and destroying of Reader and Decoder plugins into the PluginManager class.
Removed deferred initialization from BMediaDecoder. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21296 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -39,7 +39,7 @@ public:
|
||||
status_t GetNextChunk(const void **chunkBuffer, size_t *chunkSize,
|
||||
media_header *mediaHeader);
|
||||
|
||||
void Setup(ChunkProvider *provider);
|
||||
void SetChunkProvider(ChunkProvider *provider);
|
||||
private:
|
||||
ChunkProvider * fChunkProvider;
|
||||
};
|
||||
|
||||
@@ -6,12 +6,6 @@
|
||||
#include <TList.h>
|
||||
#include <Locker.h>
|
||||
|
||||
status_t _CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source);
|
||||
status_t _CreateDecoder(Decoder **decoder, const media_format &format);
|
||||
|
||||
void _DestroyReader(Reader *reader);
|
||||
void _DestroyDecoder(Decoder *decoder);
|
||||
|
||||
|
||||
class PluginManager
|
||||
{
|
||||
@@ -21,6 +15,15 @@ public:
|
||||
|
||||
MediaPlugin * GetPlugin(const entry_ref &ref);
|
||||
void PutPlugin(MediaPlugin *plugin);
|
||||
|
||||
|
||||
status_t CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source);
|
||||
void DestroyReader(Reader *reader);
|
||||
|
||||
status_t CreateDecoder(Decoder **decoder, const media_format &format);
|
||||
status_t CreateDecoder(Decoder **decoder, const media_codec_info &mci);
|
||||
status_t GetDecoderInfo(Decoder *decoder, media_codec_info *out_info) const;
|
||||
void DestroyDecoder(Decoder *decoder);
|
||||
|
||||
private:
|
||||
bool LoadPlugin(const entry_ref &ref, MediaPlugin **plugin, image_id *image);
|
||||
@@ -37,4 +40,6 @@ private:
|
||||
BLocker *fLocker;
|
||||
};
|
||||
|
||||
extern PluginManager _plugin_manager;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user