4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef VDEVICEPREFS_H
23 #define VDEVICEPREFS_H
32 #include "adeviceprefs.inc"
33 #include "channelpicker.inc"
35 #include "playbackconfig.inc"
36 #include "preferencesthread.inc"
37 #include "recordconfig.inc"
38 #include "vdeviceprefs.inc"
40 class VDeviceCheckBox;
43 class VDeviceTumbleBox;
51 PreferencesWindow *pwindow,
52 PreferencesDialog *dialog,
53 VideoOutConfig *out_config,
54 VideoInConfig *in_config,
58 // creation - set if this is the first initialize of the object
59 // to prevent file format from being overwritten
60 // & window from being flushed
61 int initialize(int creation /* = 0 */);
64 static int max(int a,int b) { return a>b ? a : b; }
66 PreferencesWindow *pwindow;
67 PreferencesDialog *dialog;
68 VideoOutConfig *out_config;
69 VideoInConfig *in_config;
70 PrefsChannelPicker *channel_picker;
73 int create_lml_objs();
74 int create_firewire_objs();
75 int create_dv1394_objs();
76 int create_v4l_objs();
77 int create_v4l2_objs();
78 int create_v4l2jpeg_objs();
79 int create_v4l2mpeg_objs();
80 int create_screencap_objs();
81 int create_buz_objs();
82 int create_x11_objs();
83 void create_dvb_objs();
87 BC_Title *device_title;
89 BC_CheckBox *follow_video_config;
90 BC_Title *channel_title;
91 BC_Title *output_title;
93 BC_Title *fields_title;
94 BC_Title *dvb_adapter_title;
96 VDeviceTextBox *device_text;
97 VDeviceIntBox *firewire_port;
98 VDeviceIntBox *firewire_channel;
99 VDeviceIntBox *firewire_channels;
100 VDeviceIntBox *firewire_syt;
101 VDeviceTextBox *firewire_path;
102 VDeviceTumbleBox *device_fields;
103 VDeviceTumbleBox *dvb_adapter_device;
105 VDeviceCheckBox *buz_swap_channels;
111 class VDeviceTextBox : public BC_TextBox
114 VDeviceTextBox(int x, int y, char *output);
120 class VDeviceIntBox : public BC_TextBox
123 VDeviceIntBox(int x, int y, int *output);
129 class VDeviceTumbleBox : public BC_TumbleTextBox
132 VDeviceTumbleBox(VDevicePrefs *prefs,
133 int x, int y, int *output, int min, int max, int text_w=60);
139 class VDeviceCheckBox : public BC_CheckBox
142 VDeviceCheckBox(int x, int y, int *output, char *text);
149 class VDriverMenu : public BC_PopupMenu
154 VDevicePrefs *device_prefs,
159 char* driver_to_string(int driver);
160 void create_objects();
162 VDevicePrefs *device_prefs;
165 char string[BCTEXTLEN];
169 class VDriverItem : public BC_MenuItem
172 VDriverItem(VDriverMenu *popup, const char *text, int driver);
182 class VScalingEquation : public BC_PopupMenu
185 VScalingEquation(int x, int y, int *output);
188 const char* interpolation_to_string(int type);
189 void create_objects();
193 class VScalingItem : public BC_MenuItem
196 VScalingItem(VScalingEquation *popup, int interpolation);
199 VScalingEquation *popup;