1 #ifndef _VIDEO_ADDON_H 2 #define _VIDEO_ADDON_H 3 4 #include <media/MediaAddOn.h> 5 6 #define TOUCH(x) ((void)(x)) 7 8 extern "C" _EXPORT BMediaAddOn *make_media_addon(image_id you); 9 10 class MediaAddOn : public BMediaAddOn 11 { 12 public: 13 MediaAddOn(image_id imid); 14 virtual ~MediaAddOn(); 15 16 virtual status_t InitCheck(const char **out_failure_text); 17 18 virtual int32 CountFlavors(); 19 virtual status_t GetFlavorAt(int32 n, const flavor_info ** out_info); 20 virtual BMediaNode *InstantiateNodeFor( 21 const flavor_info * info, 22 BMessage * config, 23 status_t * out_error); 24 25 virtual status_t GetConfigurationFor(BMediaNode *node, BMessage *message) 26 { TOUCH(node); TOUCH(message); return B_OK; } 27 virtual status_t SaveConfigInfo(BMediaNode *node, BMessage *message) 28 { TOUCH(node); TOUCH(message); return B_OK; } 29 30 virtual bool WantsAutoStart() { return false; } 31 virtual status_t AutoStart(int in_count, BMediaNode **out_node, 32 int32 *out_internal_id, bool *out_has_more) 33 { TOUCH(in_count); TOUCH(out_node); 34 TOUCH(out_internal_id); TOUCH(out_has_more); 35 return B_ERROR; } 36 37 private: 38 status_t fInitStatus; 39 flavor_info fFlavorInfo; 40 media_format fMediaFormat; 41 }; 42 43 #endif 44