2010-04-13 01:02:09 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
2010-04-13 13:48:02 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
2010-04-13 01:02:09 +04:00
|
|
|
*/
|
2004-01-23 10:24:51 +03:00
|
|
|
#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();
|
2010-04-13 13:48:02 +04:00
|
|
|
meta_format(const media_format_description &description,
|
|
|
|
const media_format &format, int32 id);
|
2004-01-23 10:24:51 +03:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2010-04-13 13:48:02 +04:00
|
|
|
typedef status_t (*_MakeFormatHookFunc)(
|
|
|
|
const media_format_description *descriptions, int32 descriptionsCount,
|
|
|
|
media_format *format, uint32 flags);
|
|
|
|
|
2004-01-23 10:24:51 +03:00
|
|
|
extern _MakeFormatHookFunc _gMakeFormatHook;
|
|
|
|
|
|
|
|
} // namespace media
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
#endif /* META_FORMAT_H */
|