r1006: configure: Use libx264_pic instead of libx264 if available.
[cinelerra_cv/mob.git] / cinelerra / adeviceprefs.h
blobf2641d6d33118788002503e294846d0fcbe7cd94
1 #ifndef ADEVICEPREFS_H
2 #define ADEVICEPREFS_H
5 class OSSEnable;
6 class ALSADevice;
8 #include "bitspopup.inc"
9 #include "guicast.h"
10 #include "playbackconfig.inc"
11 #include "preferencesthread.inc"
12 #include "recordconfig.inc"
14 class ADriverMenu;
15 class ADeviceTextBox;
16 class ADeviceIntBox;
18 class ADevicePrefs
20 public:
21 ADevicePrefs(int x,
22 int y,
23 PreferencesWindow *pwindow,
24 PreferencesDialog *dialog,
25 AudioOutConfig *out_config,
26 AudioInConfig *in_config,
27 int mode);
28 ~ADevicePrefs();
30 void reset();
31 static int get_h(int recording = 0);
32 int update(AudioOutConfig *out_config);
33 // creation - set if this is the first initialize of the object
34 // to prevent file format from being overwritten
35 int initialize(int creation = 0);
36 int delete_objects();
38 PreferencesWindow *pwindow;
40 private:
41 int create_oss_objs();
42 int create_esound_objs();
43 int create_firewire_objs();
44 int create_alsa_objs();
45 int create_cine_objs();
47 int delete_oss_objs();
48 int delete_esound_objs();
49 int delete_firewire_objs();
50 int delete_alsa_objs();
52 // The output config resolved from playback strategy and render engine.
53 AudioOutConfig *out_config;
54 AudioInConfig *in_config;
55 PreferencesDialog *dialog;
56 int driver, mode;
57 int x;
58 int y;
59 ADriverMenu *menu;
60 BC_Title *driver_title, *path_title, *bits_title;
61 BC_Title *server_title, *port_title, *channel_title, *syt_title;
62 OSSEnable *oss_enable[MAXDEVICES];
63 ADeviceTextBox *oss_path[MAXDEVICES];
64 BitsPopup *oss_bits;
65 ADeviceTextBox *esound_server;
66 ADeviceIntBox *esound_port;
67 ADeviceIntBox *firewire_port;
68 ADeviceIntBox *firewire_channel;
69 ADeviceTextBox *firewire_path;
70 ADeviceIntBox *firewire_syt;
73 ALSADevice *alsa_device;
74 BitsPopup *alsa_bits;
75 BC_CheckBox *alsa_workaround;
76 ArrayList<BC_ListBoxItem*> *alsa_drivers;
79 BitsPopup *cine_bits;
80 ADeviceTextBox *cine_path;
83 class ADriverMenu : public BC_PopupMenu
85 public:
86 ADriverMenu(int x,
87 int y,
88 ADevicePrefs *device_prefs,
89 int do_input,
90 int *output);
91 ~ADriverMenu();
93 void create_objects();
94 char* adriver_to_string(int driver);
96 int do_input;
97 int *output;
98 ADevicePrefs *device_prefs;
99 char string[BCTEXTLEN];
102 class ADriverItem : public BC_MenuItem
104 public:
105 ADriverItem(ADriverMenu *popup, char *text, int driver);
106 ~ADriverItem();
107 int handle_event();
108 ADriverMenu *popup;
109 int driver;
112 class OSSEnable : public BC_CheckBox
114 public:
115 OSSEnable(int x, int y, int *output);
116 int handle_event();
117 int *output;
122 class ADeviceTextBox : public BC_TextBox
124 public:
125 ADeviceTextBox(int x, int y, char *output);
126 int handle_event();
127 char *output;
130 class ADeviceIntBox : public BC_TextBox
132 public:
133 ADeviceIntBox(int x, int y, int *output);
134 int handle_event();
135 int *output;
138 class ALSADevice : public BC_PopupTextBox
140 public:
141 ALSADevice(PreferencesDialog *dialog,
142 int x,
143 int y,
144 char *output,
145 ArrayList<BC_ListBoxItem*> *devices);
146 ~ALSADevice();
148 int handle_event();
149 char *output;
152 #endif