xref: /haiku/src/add-ons/media/media-add-ons/usb_webcam/addons/uvc/UVCCamDevice.h (revision b55a57da7173b9af0432bd3e148d03f06161d036)
1 /*
2  * Copyright 2009, Ithamar Adema, <ithamar.adema@team-embedded.nl>.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #ifndef _UVC_CAM_DEVICE_H
7 #define _UVC_CAM_DEVICE_H
8 
9 #include "CamDevice.h"
10 
11 class UVCCamDevice : public CamDevice
12 {
13 public:
14 				UVCCamDevice(CamDeviceAddon &_addon, BUSBDevice* _device);
15 				~UVCCamDevice();
16 
17 	virtual bool		SupportsIsochronous();
18 	virtual status_t	StartTransfer();
19 	virtual status_t	StopTransfer();
20 private:
21 	void ParseVideoControl(const uint8* buf, size_t len);
22 	void ParseVideoStreaming(const uint8* buf, size_t len);
23 };
24 
25 class UVCCamDeviceAddon : public CamDeviceAddon
26 {
27 	public:
28 				UVCCamDeviceAddon(WebCamMediaAddOn* webcam);
29 	virtual 		~UVCCamDeviceAddon();
30 
31 	virtual const char		*BrandName();
32 	virtual UVCCamDevice	*Instantiate(CamRoster &roster, BUSBDevice *from);
33 };
34 
35 #endif /* _UVC_CAM_DEVICE_H */
36