xref: /haiku/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2004-2008, François Revol, <revol@free.fr>.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _CAM_BUFFERING_DEFRAMER_H
6 #define _CAM_BUFFERING_DEFRAMER_H
7 
8 #include "CamDeframer.h"
9 
10 class CamBufferingDeframer : public CamDeframer {
11 public:
12 			CamBufferingDeframer(CamDevice *device);
13 virtual 	~CamBufferingDeframer();
14 					// BPositionIO interface
15 					// write from usb transfers
16 virtual ssize_t		Write(const void *buffer, size_t size);
17 size_t				DiscardFromInput(size_t size);
18 
19 private:
20 
21 BMallocIO	fInputBuffs[2];
22 int			fInputBuffIndex;
23 
24 
25 };
26 
27 
28 #endif /* _CAM_BUFFERING_DEFRAMER_H */
29