2 * Copyright 2004-2009, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT license.
8 * Stephan Aßmus <superstippi@gmx.de>
10 #ifndef _ADD_ON_MANAGER_H
11 #define _ADD_ON_MANAGER_H
14 /*! Manager for codec add-ons (reader, writer, encoder, decoder)
15 BMediaAddOn are handled in the NodeManager
19 #include "DataExchange.h"
22 #include "DecoderPlugin.h"
23 #include "EncoderPlugin.h"
24 #include "ReaderPlugin.h"
25 #include "WriterPlugin.h"
36 static AddOnManager
* GetInstance();
38 status_t
GetDecoderForFormat(entry_ref
* _ref
,
39 const media_format
& format
);
41 status_t
GetReaders(entry_ref
* _ref
,
42 int32
* _count
, int32 maxCount
);
44 status_t
GetEncoder(entry_ref
* _ref
, int32 id
);
46 status_t
GetWriter(entry_ref
* _ref
,
49 status_t
GetFileFormat(media_file_format
* _fileFormat
,
51 status_t
GetCodecInfo(media_codec_info
* _codecInfo
,
52 media_format_family
* _formatFamily
,
53 media_format
* _inputFormat
,
54 media_format
* _outputFormat
, int32 cookie
);
56 void RegisterAddOns();
60 status_t
_RegisterAddOn(const entry_ref
& ref
);
61 status_t
_UnregisterAddOn(const entry_ref
& ref
);
63 void _RegisterReader(ReaderPlugin
* reader
,
64 const entry_ref
& ref
);
65 void _RegisterDecoder(DecoderPlugin
* decoder
,
66 const entry_ref
& ref
);
68 void _RegisterWriter(WriterPlugin
* writer
,
69 const entry_ref
& ref
);
70 void _RegisterEncoder(EncoderPlugin
* encoder
,
71 const entry_ref
& ref
);
73 bool _FindDecoder(const media_format
& format
,
75 entry_ref
* _decoderRef
);
76 void _GetReaders(const BPath
& path
,
77 entry_ref
* outRefs
, int32
* outCount
,
90 List
<media_format
> formats
;
95 media_codec_info codecInfo
;
96 media_format_family formatFamily
;
97 media_format intputFormat
;
98 media_format outputFormat
;
102 List
<reader_info
> fReaderList
;
103 List
<writer_info
> fWriterList
;
104 List
<decoder_info
> fDecoderList
;
105 List
<encoder_info
> fEncoderList
;
107 List
<media_file_format
> fWriterFileFormats
;
109 uint32 fNextWriterFormatFamilyID
;
110 uint32 fNextEncoderCodecInfoID
;
112 static AddOnManager sInstance
;
116 } // namespace BPrivate
118 #endif // _ADD_ON_MANAGER_H