1 /* 2 * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT 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, 23 const media_format &format, int32 id); 24 meta_format(const media_format_description &description); 25 meta_format(const meta_format &other); 26 27 bool Matches(const media_format &format, media_format_family family); 28 static int CompareDescriptions(const meta_format *a, const meta_format *b); 29 static int Compare(const meta_format *a, const meta_format *b); 30 31 media_format_description description; 32 media_format format; 33 int32 id; 34 }; 35 36 typedef status_t (*_MakeFormatHookFunc)( 37 const media_format_description *descriptions, int32 descriptionsCount, 38 media_format *format, uint32 flags); 39 40 extern _MakeFormatHookFunc _gMakeFormatHook; 41 42 } // namespace media 43 } // namespace BPrivate 44 45 #endif /* META_FORMAT_H */ 46