prevent popup deactivation while button_down
[goodguy/history.git] / cinelerra-5.1 / cinelerra / playbackconfig.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
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.
10  * 
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.
15  * 
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
19  * 
20  */
21
22 #ifndef PLAYBACKCONFIG_H
23 #define PLAYBACKCONFIG_H
24
25 #include "audiodevice.inc"
26 #include "bcwindowbase.inc"
27 #include "bchash.inc"
28 #include "playbackconfig.inc"
29
30 // This structure is passed to the driver for configuration during playback
31 class AudioOutConfig
32 {
33 public:
34         AudioOutConfig();
35         ~AudioOutConfig();
36
37         int operator!=(AudioOutConfig &that);
38         int operator==(AudioOutConfig &that);
39         AudioOutConfig& operator=(AudioOutConfig &that);
40         void copy_from(AudioOutConfig *src);
41         int load_defaults(BC_Hash *defaults, int active_config);
42         int save_defaults(BC_Hash *defaults, int active_config);
43
44         int fragment_size;
45
46
47 // Offset for synchronization in seconds
48         float audio_offset;
49         double play_gain;
50         int map51_2;
51
52         int driver;
53         int oss_enable[MAXDEVICES];
54         char oss_out_device[MAXDEVICES][BCTEXTLEN];
55         int oss_out_bits;
56
57
58
59         char esound_out_server[BCTEXTLEN];
60         int esound_out_port;
61
62 // ALSA options
63         char alsa_out_device[BCTEXTLEN];
64         int alsa_out_bits;
65         int interrupt_workaround;
66
67 // Firewire options
68         int firewire_channel;
69         int firewire_port;
70         int firewire_frames;
71         char firewire_path[BCTEXTLEN];
72         int firewire_syt;
73
74
75 // DV1394 options
76         int dv1394_channel;
77         int dv1394_port;
78         int dv1394_frames;
79         char dv1394_path[BCTEXTLEN];
80         int dv1394_syt;
81
82 };
83
84 // This structure is passed to the driver
85 class VideoOutConfig
86 {
87 public:
88         VideoOutConfig();
89         ~VideoOutConfig();
90
91         int operator!=(VideoOutConfig &that);
92         int operator==(VideoOutConfig &that);
93         VideoOutConfig& operator=(VideoOutConfig &that);
94         void copy_from(VideoOutConfig *src);
95         int load_defaults(BC_Hash *defaults, int active_config);
96         int save_defaults(BC_Hash *defaults, int active_config);
97         char* get_path();
98
99         int driver;
100         char lml_out_device[BCTEXTLEN];
101         char buz_out_device[BCTEXTLEN];
102 // Entry in the buz channel table
103         int buz_out_channel;
104         int buz_swap_fields;
105
106 // X11 options
107         char x11_host[BCTEXTLEN];
108         int x11_use_fields;
109 // Values for x11_use_fields
110         enum
111         {
112                 USE_NO_FIELDS,
113                 USE_EVEN_FIRST,
114                 USE_ODD_FIRST
115         };
116
117
118
119 // Picture quality
120         int brightness;
121         int hue;
122         int color;
123         int contrast;
124         int whiteness;
125
126 // Firewire options
127         int firewire_channel;
128         int firewire_port;
129         char firewire_path[BCTEXTLEN];
130         int firewire_syt;
131
132 // DV1394 options
133         int dv1394_channel;
134         int dv1394_port;
135         char dv1394_path[BCTEXTLEN];
136         int dv1394_syt;
137 };
138
139 class PlaybackConfig
140 {
141 public:
142         PlaybackConfig();
143         ~PlaybackConfig();
144
145         PlaybackConfig& operator=(PlaybackConfig &that);
146         void copy_from(PlaybackConfig *src);
147         int load_defaults(BC_Hash *defaults, int load_config=-1);
148         int save_defaults(BC_Hash *defaults);
149
150         char hostname[BCTEXTLEN];
151         int active_config;
152         int port;
153
154         AudioOutConfig *aconfig;
155         VideoOutConfig *vconfig;
156 };
157
158
159 #endif