3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / media / media-add-ons / usb_webcam / AddOn.h
blobaaa08e77a9bf5a1ef014fc8d7066c19aee186fcb
1 /*
2 * Copyright 2004-2008, François Revol, <revol@free.fr>.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _VIDEO_ADDON_H
6 #define _VIDEO_ADDON_H
8 #include <media/MediaAddOn.h>
10 #define TOUCH(x) ((void)(x))
12 extern "C" _EXPORT BMediaAddOn *make_media_addon(image_id you);
14 class CamRoster;
15 class CamDevice;
17 class WebCamMediaAddOn : public BMediaAddOn {
18 public:
19 WebCamMediaAddOn(image_id imid);
20 virtual ~WebCamMediaAddOn();
22 virtual status_t InitCheck(const char **out_failure_text);
24 virtual int32 CountFlavors();
25 virtual status_t GetFlavorAt(int32 n, const flavor_info ** out_info);
26 virtual BMediaNode *InstantiateNodeFor(
27 const flavor_info * info,
28 BMessage * config,
29 status_t * out_error);
31 virtual status_t GetConfigurationFor(BMediaNode *node, BMessage *message)
32 { TOUCH(node); TOUCH(message); return B_OK; }
33 virtual status_t SaveConfigInfo(BMediaNode *node, BMessage *message)
34 { TOUCH(node); TOUCH(message); return B_OK; }
36 virtual bool WantsAutoStart() { return false; }
37 virtual status_t AutoStart(int in_count, BMediaNode **out_node,
38 int32 *out_internal_id, bool *out_has_more)
39 { TOUCH(in_count); TOUCH(out_node);
40 TOUCH(out_internal_id); TOUCH(out_has_more);
41 return B_ERROR; }
42 // those are for use by CamDevices
43 status_t CameraAdded(CamDevice* device);
44 status_t CameraRemoved(CamDevice* device);
45 void FillDefaultFlavorInfo(flavor_info* info);
47 private:
48 uint32 fInternalIDCounter;
49 status_t fInitStatus;
50 flavor_info fDefaultFlavorInfo;
51 media_format fMediaFormat;
52 CamRoster* fRoster;
55 #endif