vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / media / media-add-ons / finepix_webcam / FinePixProducer / AddOn.h
blob1a0c63208f753ee0e256dc827fcf3fbc27efcbf9
1 #ifndef _VIDEO_ADDON_H
2 #define _VIDEO_ADDON_H
4 #include <media/MediaAddOn.h>
6 #define TOUCH(x) ((void)(x))
8 extern "C" _EXPORT BMediaAddOn *make_media_addon(image_id you);
10 class MediaAddOn : public BMediaAddOn
12 public:
13 MediaAddOn(image_id imid);
14 virtual ~MediaAddOn();
16 virtual status_t InitCheck(const char **out_failure_text);
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);
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; }
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; }
37 private:
38 status_t fInitStatus;
39 flavor_info fFlavorInfo;
40 media_format fMediaFormat;
43 #endif