r856: Merge 2.1:
[cinelerra_cv/ct.git] / cinelerra / vdeviceprefs.h
blob8526bc3eac35ff8aea4c06b6068a79b0e013a737
1 #ifndef VDEVICEPREFS_H
2 #define VDEVICEPREFS_H
4 // Modes
5 #ifndef MODEPLAY
6 #define MODEPLAY 0
7 #define MODERECORD 1
8 #define MODEDUPLEX 2
9 #endif
11 #include "adeviceprefs.inc"
12 #include "channelpicker.inc"
13 #include "guicast.h"
14 #include "playbackconfig.inc"
15 #include "preferencesthread.inc"
16 #include "recordconfig.inc"
17 #include "vdeviceprefs.inc"
19 class VDeviceCheckBox;
20 class VDeviceTextBox;
21 class VDeviceIntBox;
22 class VDriverMenu;
24 class VDevicePrefs
26 public:
27 VDevicePrefs(int x,
28 int y,
29 PreferencesWindow *pwindow,
30 PreferencesDialog *dialog,
31 VideoOutConfig *out_config,
32 VideoInConfig *in_config,
33 int mode);
34 ~VDevicePrefs();
36 // creation - set if this is the first initialize of the object
37 // to prevent file format from being overwritten
38 int initialize(int creation = 0);
39 int delete_objects();
40 void reset_objects();
42 PreferencesWindow *pwindow;
43 PreferencesDialog *dialog;
44 VideoOutConfig *out_config;
45 VideoInConfig *in_config;
46 PrefsChannelPicker *channel_picker;
48 private:
49 int create_lml_objs();
50 int create_firewire_objs();
51 int create_dv1394_objs();
52 int create_v4l_objs();
53 int create_v4l2_objs();
54 int create_v4l2jpeg_objs();
55 int create_screencap_objs();
56 int create_buz_objs();
57 int create_x11_objs();
59 VDriverMenu *menu;
61 BC_Title *device_title, *port_title, *channel_title, *output_title, *syt_title;
62 VDeviceTextBox *device_text;
63 VDeviceIntBox *firewire_port;
64 VDeviceIntBox *firewire_channel;
65 VDeviceIntBox *firewire_channels;
66 VDeviceIntBox *firewire_syt;
67 VDeviceTextBox *firewire_path;
69 VDeviceCheckBox *buz_swap_channels;
70 int driver, mode;
71 int x;
72 int y;
75 class VDeviceTextBox : public BC_TextBox
77 public:
78 VDeviceTextBox(int x, int y, char *output);
80 int handle_event();
81 char *output;
84 class VDeviceIntBox : public BC_TextBox
86 public:
87 VDeviceIntBox(int x, int y, int *output);
89 int handle_event();
90 int *output;
93 class VDeviceCheckBox : public BC_CheckBox
95 public:
96 VDeviceCheckBox(int x, int y, int *output, char *text);
98 int handle_event();
99 int *output;
103 class VDriverMenu : public BC_PopupMenu
105 public:
106 VDriverMenu(int x,
107 int y,
108 VDevicePrefs *device_prefs,
109 int do_input,
110 int *output);
111 ~VDriverMenu();
113 char* driver_to_string(int driver);
114 int create_objects();
116 VDevicePrefs *device_prefs;
117 int do_input;
118 int *output;
119 char string[BCTEXTLEN];
123 class VDriverItem : public BC_MenuItem
125 public:
126 VDriverItem(VDriverMenu *popup, char *text, int driver);
127 ~VDriverItem();
129 int handle_event();
131 VDriverMenu *popup;
132 int driver;
137 #endif