00001 #ifndef VDEVICEPREFS_H
00002 #define VDEVICEPREFS_H
00003
00004
00005 #ifndef MODEPLAY
00006 #define MODEPLAY 0
00007 #define MODERECORD 1
00008 #define MODEDUPLEX 2
00009 #endif
00010
00011 #include "adeviceprefs.inc"
00012 #include "channelpicker.inc"
00013 #include "guicast.h"
00014 #include "playbackconfig.inc"
00015 #include "preferencesthread.inc"
00016 #include "recordconfig.inc"
00017 #include "vdeviceprefs.inc"
00018
00019 class VDeviceCheckBox;
00020 class VDeviceTextBox;
00021 class VDeviceIntBox;
00022 class VDeviceTumbleBox;
00023 class VDriverMenu;
00024
00025 class VDevicePrefs
00026 {
00027 public:
00028 VDevicePrefs(int x,
00029 int y,
00030 PreferencesWindow *pwindow,
00031 PreferencesDialog *dialog,
00032 VideoOutConfig *out_config,
00033 VideoInConfig *in_config,
00034 int mode);
00035 ~VDevicePrefs();
00036
00037
00038
00039 int initialize(int creation = 0);
00040 int delete_objects();
00041 void reset_objects();
00042
00043 PreferencesWindow *pwindow;
00044 PreferencesDialog *dialog;
00045 VideoOutConfig *out_config;
00046 VideoInConfig *in_config;
00047 PrefsChannelPicker *channel_picker;
00048
00049 private:
00050 int create_lml_objs();
00051 int create_firewire_objs();
00052 int create_dv1394_objs();
00053 int create_v4l_objs();
00054 int create_v4l2_objs();
00055 int create_v4l2jpeg_objs();
00056 int create_screencap_objs();
00057 int create_buz_objs();
00058 int create_x11_objs();
00059 int create_dvb_objs();
00060
00061 VDriverMenu *menu;
00062
00063 BC_Title *device_title;
00064 BC_Title *port_title;
00065 BC_Title *number_title;
00066 BC_Title *channel_title;
00067 BC_Title *output_title;
00068 BC_Title *syt_title;
00069 VDeviceTextBox *device_text;
00070 VDeviceTumbleBox *device_port;
00071 VDeviceTumbleBox *device_number;
00072 VDeviceIntBox *firewire_port;
00073 VDeviceIntBox *firewire_channel;
00074 VDeviceIntBox *firewire_channels;
00075 VDeviceIntBox *firewire_syt;
00076 VDeviceTextBox *firewire_path;
00077
00078 VDeviceCheckBox *buz_swap_channels;
00079 int driver, mode;
00080 int x;
00081 int y;
00082 };
00083
00084 class VDeviceTextBox : public BC_TextBox
00085 {
00086 public:
00087 VDeviceTextBox(int x, int y, char *output);
00088
00089 int handle_event();
00090 char *output;
00091 };
00092
00093 class VDeviceIntBox : public BC_TextBox
00094 {
00095 public:
00096 VDeviceIntBox(int x, int y, int *output);
00097
00098 int handle_event();
00099 int *output;
00100 };
00101
00102 class VDeviceTumbleBox : public BC_TumbleTextBox
00103 {
00104 public:
00105 VDeviceTumbleBox(VDevicePrefs *prefs,
00106 int x,
00107 int y,
00108 int *output,
00109 int min,
00110 int max);
00111
00112 int handle_event();
00113 int *output;
00114 };
00115
00116 class VDeviceCheckBox : public BC_CheckBox
00117 {
00118 public:
00119 VDeviceCheckBox(int x, int y, int *output, char *text);
00120
00121 int handle_event();
00122 int *output;
00123 };
00124
00125
00126 class VDriverMenu : public BC_PopupMenu
00127 {
00128 public:
00129 VDriverMenu(int x,
00130 int y,
00131 VDevicePrefs *device_prefs,
00132 int do_input,
00133 int *output);
00134 ~VDriverMenu();
00135
00136 char* driver_to_string(int driver);
00137 int create_objects();
00138
00139 VDevicePrefs *device_prefs;
00140 int do_input;
00141 int *output;
00142 char string[BCTEXTLEN];
00143 };
00144
00145
00146 class VDriverItem : public BC_MenuItem
00147 {
00148 public:
00149 VDriverItem(VDriverMenu *popup, char *text, int driver);
00150 ~VDriverItem();
00151
00152 int handle_event();
00153
00154 VDriverMenu *popup;
00155 int driver;
00156 };
00157
00158
00159
00160 #endif