r1005: Increase the number of displayed digits for resample audio dialog box
[cinelerra_cv/mob.git] / cinelerra / vdevicev4l.h
blobf2d08aea00006acfe4143b8b36526455f0e725a6
1 #ifndef VDEVICEV4L_H
2 #define VDEVICEV4L_H
4 #include "vdevicebase.h"
5 #include <linux/videodev.h>
6 #include "videodevice.inc"
8 class VDeviceV4L : public VDeviceBase
10 public:
11 VDeviceV4L(VideoDevice *device);
12 ~VDeviceV4L();
14 int initialize();
15 int open_input();
16 int close_all();
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);
22 private:
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);
33 int wait_v4l_frame();
34 int read_v4l_frame(VFrame *frame);
35 int frame_to_vframe(VFrame *frame, unsigned char *input);
36 int next_frame(int previous_frame);
37 int close_v4l();
38 int unmap_v4l_shmem();
39 int v4l_init();
41 int input_fd, output_fd;
42 // FourCC Colormodel for device
43 unsigned long device_colormodel;
44 // BC colormodel for device
45 int colormodel;
47 // Video4Linux
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
53 // Common
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;
59 int got_first_frame;
62 #endif