2 * Copyright 2004-2008, François Revol, <revol@free.fr>.
3 * Distributed under the terms of the MIT License.
8 #include <media/MediaAddOn.h>
10 #define TOUCH(x) ((void)(x))
12 extern "C" _EXPORT BMediaAddOn
*make_media_addon(image_id you
);
17 class WebCamMediaAddOn
: public BMediaAddOn
{
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
,
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
);
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
);
48 uint32 fInternalIDCounter
;
50 flavor_info fDefaultFlavorInfo
;
51 media_format fMediaFormat
;