xref: /haiku/headers/private/media/MetaFormat.h (revision 893988af824e65e49e55f517b157db8386e8002b)
1 /*
2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the OpenBeOS License.
4 */
5 #ifndef META_FORMAT_H
6 #define META_FORMAT_H
7 
8 
9 #include <MediaFormats.h>
10 
11 
12 namespace BPrivate {
13 namespace media {
14 
15 // Implementation can be found in MediaFormats.cpp
16 
17 #define MEDIA_META_FORMAT_TYPE 'MeFo'
18 	// to be used in the MEDIA_SERVER_GET_FORMATS message reply
19 
20 struct meta_format {
21 	meta_format();
22 	meta_format(const media_format_description &description, const media_format &format, int32 id);
23 	meta_format(const media_format_description &description);
24 	meta_format(const meta_format &other);
25 
26 	bool Matches(const media_format &format, media_format_family family);
27 	static int CompareDescriptions(const meta_format *a, const meta_format *b);
28 	static int Compare(const meta_format *a, const meta_format *b);
29 
30 	media_format_description description;
31 	media_format format;
32 	int32 id;
33 };
34 
35 typedef status_t (*_MakeFormatHookFunc)(const media_format_description *descriptions,
36 						int32 descriptionsCount, media_format *format, uint32 flags);
37 extern _MakeFormatHookFunc _gMakeFormatHook;
38 
39 }	// namespace media
40 }	// namespace BPrivate
41 
42 #endif	/* META_FORMAT_H */
43