4 #include "vdevicebase.h"
5 #include <linux/videodev.h>
6 #include "videodevice.inc"
8 class VDeviceV4L
: public VDeviceBase
11 VDeviceV4L(VideoDevice
*device
);
17 int read_buffer(VFrame
*frame
);
18 int get_best_colormodel(Asset
*asset
);
19 int set_channel(Channel
*channel
);
20 int set_picture(PictureConfig
*picture
);
23 int set_cloexec_flag(int desc
, int value
);
24 int set_mute(int muted
);
25 int v4l1_get_inputs();
26 int v4l1_set_mute(int muted
);
27 unsigned long translate_colormodel(int colormodel
);
28 int v4l1_set_channel(Channel
*channel
);
29 int v4l1_get_norm(int norm
);
30 int v4l1_set_picture(PictureConfig
*picture
);
31 void v4l1_start_capture();
32 int capture_frame(int capture_frame_number
);
34 int read_v4l_frame(VFrame
*frame
);
35 int frame_to_vframe(VFrame
*frame
, unsigned char *input
);
36 int next_frame(int previous_frame
);
38 int unmap_v4l_shmem();
41 int input_fd
, output_fd
;
42 // FourCC Colormodel for device
43 unsigned long device_colormodel
;
44 // BC colormodel for device
48 struct video_capability cap1
;
49 struct video_window window_params
;
50 struct video_picture picture_params
;
51 struct video_mbuf capture_params
; // Capture for Video4Linux
54 char *capture_buffer
; // sequentual capture buffers for v4l1 or read buffer for v4l2
55 int capture_frame_number
; // number of frame to capture into
56 int read_frame_number
; // number of the captured frame to read
57 int shared_memory
; // Capturing directly to memory
58 int initialization_complete
;