1 // MediaReaderAddOn.h 2 // 3 // Andrew Bachmann, 2002 4 // 5 // A MediaReaderAddOn is an add-on 6 // that can make MediaReader nodes 7 // 8 // MediaReader nodes read a file into a multistream 9 10 #if !defined(_MEDIA_READER_ADD_ON_H) 11 #define _MEDIA_READER_ADD_ON_H 12 13 #include <MediaDefs.h> 14 #include <MediaAddOn.h> 15 #include "../AbstractFileInterfaceAddOn.h" 16 17 class MediaReaderAddOn : 18 public AbstractFileInterfaceAddOn 19 { 20 public: 21 virtual ~MediaReaderAddOn(void); 22 explicit MediaReaderAddOn(image_id image); 23 24 /**************************/ 25 /* begin from BMediaAddOn */ 26 public: 27 virtual status_t GetFlavorAt( 28 int32 n, 29 const flavor_info ** out_info); 30 virtual BMediaNode * InstantiateNodeFor( 31 const flavor_info * info, 32 BMessage * config, 33 status_t * out_error); 34 virtual status_t GetConfigurationFor( 35 BMediaNode * your_node, 36 BMessage * into_message); 37 38 /* only implement if you have a B_FILE_INTERFACE node */ 39 virtual status_t GetFileFormatList( 40 int32 flavor_id, // for this node flavor (if it matters) 41 media_file_format * out_writable_formats, // don't write here if NULL 42 int32 in_write_items, // this many slots in out_writable_formats 43 int32 * out_write_items, // set this to actual # available, even if bigger than in count 44 media_file_format * out_readable_formats, // don't write here if NULL 45 int32 in_read_items, // this many slots in out_readable_formats 46 int32 * out_read_items, // set this to actual # available, even if bigger than in count 47 void * _reserved); // ignore until further notice 48 49 using AbstractFileInterfaceAddOn::SniffTypeKind; 50 51 virtual status_t SniffTypeKind( // Like SniffType, but for the specific kind(s) 52 const BMimeType & type, 53 uint64 in_kinds, 54 float * out_quality, 55 int32 * out_internal_id, 56 void * _reserved); 57 58 /* end from BMediaAddOn */ 59 /************************/ 60 61 private: 62 63 MediaReaderAddOn( /* private unimplemented */ 64 const MediaReaderAddOn & clone); 65 MediaReaderAddOn & operator=( 66 const MediaReaderAddOn & clone); 67 68 /* Mmmh, stuffing! */ 69 virtual status_t _Reserved_MediaReaderAddOn_0(void *); 70 virtual status_t _Reserved_MediaReaderAddOn_1(void *); 71 virtual status_t _Reserved_MediaReaderAddOn_2(void *); 72 virtual status_t _Reserved_MediaReaderAddOn_3(void *); 73 virtual status_t _Reserved_MediaReaderAddOn_4(void *); 74 virtual status_t _Reserved_MediaReaderAddOn_5(void *); 75 virtual status_t _Reserved_MediaReaderAddOn_6(void *); 76 virtual status_t _Reserved_MediaReaderAddOn_7(void *); 77 virtual status_t _Reserved_MediaReaderAddOn_8(void *); 78 virtual status_t _Reserved_MediaReaderAddOn_9(void *); 79 virtual status_t _Reserved_MediaReaderAddOn_10(void *); 80 virtual status_t _Reserved_MediaReaderAddOn_11(void *); 81 virtual status_t _Reserved_MediaReaderAddOn_12(void *); 82 virtual status_t _Reserved_MediaReaderAddOn_13(void *); 83 virtual status_t _Reserved_MediaReaderAddOn_14(void *); 84 virtual status_t _Reserved_MediaReaderAddOn_15(void *); 85 86 uint32 _reserved_media_reader_add_on_[16]; 87 88 }; 89 90 #if BUILDING_MEDIA_READER__ADD_ON 91 extern "C" _EXPORT BMediaAddOn * make_media_reader_add_on(image_id you); 92 #endif 93 94 #endif /* _MEDIA_READER_ADD_ON_H */ 95