New meta_format structure that is used internally by BMediaFormats and
the FormatManager in the server. Update the plugin API. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6241 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6e53563dac
commit
c38d73ee4c
headers/private/media
@ -20,7 +20,9 @@ class Decoder
|
||||
public:
|
||||
Decoder();
|
||||
virtual ~Decoder();
|
||||
|
||||
|
||||
virtual void GetCodecInfo(media_codec_info &codecInfo) = 0;
|
||||
|
||||
// Setup get's called with the info data from Reader::GetStreamInfo
|
||||
virtual status_t Setup(media_format *ioEncodedFormat, const void *infoBuffer, int32 infoSize) = 0;
|
||||
|
||||
@ -44,20 +46,11 @@ private:
|
||||
|
||||
class DecoderPlugin : public virtual MediaPlugin
|
||||
{
|
||||
public:
|
||||
DecoderPlugin();
|
||||
public:
|
||||
DecoderPlugin();
|
||||
|
||||
virtual Decoder * NewDecoder() = 0;
|
||||
|
||||
status_t PublishDecoder(const char *meta_description,
|
||||
const char *short_name,
|
||||
const char *pretty_name,
|
||||
const char *default_mapping = 0);
|
||||
|
||||
private:
|
||||
friend class AddOnManager;
|
||||
void Setup(void *publish_hook);
|
||||
void * fPublishHook;
|
||||
virtual Decoder *NewDecoder() = 0;
|
||||
virtual status_t RegisterDecoder() = 0;
|
||||
};
|
||||
|
||||
} } // namespace BPrivate::media
|
||||
|
@ -11,8 +11,6 @@ class MediaPlugin
|
||||
public:
|
||||
MediaPlugin();
|
||||
virtual ~MediaPlugin();
|
||||
|
||||
virtual status_t RegisterPlugin();
|
||||
};
|
||||
|
||||
class Decoder;
|
||||
|
42
headers/private/media/MetaFormat.h
Normal file
42
headers/private/media/MetaFormat.h
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
#ifndef META_FORMAT_H
|
||||
#define META_FORMAT_H
|
||||
|
||||
|
||||
#include <MediaFormats.h>
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
namespace media {
|
||||
|
||||
// Implementation can be found in MediaFormats.cpp
|
||||
|
||||
#define MEDIA_META_FORMAT_TYPE 'MeFo'
|
||||
// to be used in the MEDIA_SERVER_GET_FORMATS message reply
|
||||
|
||||
struct meta_format {
|
||||
meta_format();
|
||||
meta_format(const media_format_description &description, const media_format &format, int32 id);
|
||||
meta_format(const media_format_description &description);
|
||||
meta_format(const meta_format &other);
|
||||
|
||||
bool Matches(const media_format &format, media_format_family family);
|
||||
static int CompareDescriptions(const meta_format *a, const meta_format *b);
|
||||
static int Compare(const meta_format *a, const meta_format *b);
|
||||
|
||||
media_format_description description;
|
||||
media_format format;
|
||||
int32 id;
|
||||
};
|
||||
|
||||
typedef status_t (*_MakeFormatHookFunc)(const media_format_description *descriptions,
|
||||
int32 descriptionsCount, media_format *format, uint32 flags);
|
||||
extern _MakeFormatHookFunc _gMakeFormatHook;
|
||||
|
||||
} // namespace media
|
||||
} // namespace BPrivate
|
||||
|
||||
#endif /* META_FORMAT_H */
|
@ -12,11 +12,6 @@ status_t _CreateDecoder(Decoder **decoder, media_codec_info *mci, const media_fo
|
||||
void _DestroyReader(Reader *reader);
|
||||
void _DestroyDecoder(Decoder *decoder);
|
||||
|
||||
status_t _PublishDecoder(DecoderPlugin *decoderplugin,
|
||||
const char *meta_description,
|
||||
const char *short_name,
|
||||
const char *pretty_name,
|
||||
const char *default_mapping /* = 0 */);
|
||||
|
||||
class PluginManager
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user