xref: /haiku/src/add-ons/media/media-add-ons/reader/MediaReaderAddOn.h (revision b55a57da7173b9af0432bd3e148d03f06161d036)
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 virtual	status_t SniffTypeKind(				//	Like SniffType, but for the specific kind(s)
49 				const BMimeType & type,
50 				uint64 in_kinds,
51 				float * out_quality,
52 				int32 * out_internal_id,
53 				void * _reserved);
54 
55 /* end from BMediaAddOn */
56 /************************/
57 
58 private:
59 
60 		MediaReaderAddOn(	/* private unimplemented */
61 				const MediaReaderAddOn & clone);
62 		MediaReaderAddOn & operator=(
63 				const MediaReaderAddOn & clone);
64 
65 		/* Mmmh, stuffing! */
66 virtual		status_t _Reserved_MediaReaderAddOn_0(void *);
67 virtual		status_t _Reserved_MediaReaderAddOn_1(void *);
68 virtual		status_t _Reserved_MediaReaderAddOn_2(void *);
69 virtual		status_t _Reserved_MediaReaderAddOn_3(void *);
70 virtual		status_t _Reserved_MediaReaderAddOn_4(void *);
71 virtual		status_t _Reserved_MediaReaderAddOn_5(void *);
72 virtual		status_t _Reserved_MediaReaderAddOn_6(void *);
73 virtual		status_t _Reserved_MediaReaderAddOn_7(void *);
74 virtual		status_t _Reserved_MediaReaderAddOn_8(void *);
75 virtual		status_t _Reserved_MediaReaderAddOn_9(void *);
76 virtual		status_t _Reserved_MediaReaderAddOn_10(void *);
77 virtual		status_t _Reserved_MediaReaderAddOn_11(void *);
78 virtual		status_t _Reserved_MediaReaderAddOn_12(void *);
79 virtual		status_t _Reserved_MediaReaderAddOn_13(void *);
80 virtual		status_t _Reserved_MediaReaderAddOn_14(void *);
81 virtual		status_t _Reserved_MediaReaderAddOn_15(void *);
82 
83 		uint32 _reserved_media_reader_add_on_[16];
84 
85 };
86 
87 #if BUILDING_MEDIA_READER__ADD_ON
88 extern "C" _EXPORT BMediaAddOn * make_media_reader_add_on(image_id you);
89 #endif
90 
91 #endif /* _MEDIA_READER_ADD_ON_H */
92