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 PLAYBACKPREFS_H
23 #define PLAYBACKPREFS_H
27 class PlaybackModuleFragment;
28 class PlaybackAudioOffset;
29 class PlaybackViewFollows;
30 class PlaybackSoftwareTimer;
31 class PlaybackRealTime;
32 class PlaybackMap51_2;
34 class VideoAsynchronous;
35 class VideoEveryFrame;
36 class PlaybackDeblock;
37 class PlaybackPreload;
38 class PlaybackInterpolateRaw;
39 class PlaybackWhiteBalanceRaw;
40 class PlaybackSubtitle;
41 class PlaybackSubtitleNumber;
42 class PlaybackLabelCells;
43 class PlaybackProgramNumber;
46 #include "adeviceprefs.h"
48 #include "mwindow.inc"
49 #include "preferencesthread.h"
50 #include "vdeviceprefs.h"
52 class PlaybackPrefs : public PreferencesDialog
55 PlaybackPrefs(MWindow *mwindow, PreferencesWindow *pwindow, int config_number);
58 void create_objects();
59 // int set_strategy(int strategy);
61 static char* strategy_to_string(int strategy);
62 void delete_strategy();
64 int draw_framerate(int flush /* = 1 */);
67 ADevicePrefs *audio_device;
68 VDevicePrefs *video_device;
69 ArrayList<BC_ListBoxItem*> strategies;
71 PlaybackConfig *playback_config;
72 BC_Title *framerate_title;
73 PlaybackDeblock *mpeg4_deblock;
74 PlaybackInterpolateRaw *interpolate_raw;
75 PlaybackWhiteBalanceRaw *white_balance_raw;
76 VideoAsynchronous *asynchronous;
78 BC_Title *vdevice_title;
79 PlaybackAudioOffset *audio_offset;
80 PlaybackGain *play_gain;
83 class PlaybackModuleFragment : public BC_PopupMenu
86 PlaybackModuleFragment(int x,
88 PreferencesWindow *pwindow,
89 PlaybackPrefs *playback,
92 PreferencesWindow *pwindow;
93 PlaybackPrefs *playback;
96 class PlaybackAudioOffset : public BC_TumbleTextBox
99 PlaybackAudioOffset(PreferencesWindow *pwindow,
100 PlaybackPrefs *subwindow,
104 PreferencesWindow *pwindow;
105 PlaybackPrefs *playback;
109 class PlaybackViewFollows : public BC_CheckBox
112 PlaybackViewFollows(PreferencesWindow *pwindow, int value, int y);
114 PreferencesWindow *pwindow;
117 class PlaybackSoftwareTimer : public BC_CheckBox
120 PlaybackSoftwareTimer(PreferencesWindow *pwindow, int value, int y);
122 PreferencesWindow *pwindow;
125 class PlaybackRealTime : public BC_CheckBox
128 PlaybackRealTime(PreferencesWindow *pwindow, int value, int y);
130 PreferencesWindow *pwindow;
133 class PlaybackMap51_2 : public BC_CheckBox
136 PlaybackMap51_2(PreferencesWindow *pwindow,
137 PlaybackPrefs *playback_prefs, int x, int y);
139 PreferencesWindow *pwindow;
140 PlaybackPrefs *playback_prefs;
143 class VideoAsynchronous : public BC_CheckBox
146 VideoAsynchronous(PreferencesWindow *pwindow, int x, int y);
148 PreferencesWindow *pwindow;
151 class VideoEveryFrame : public BC_CheckBox
154 VideoEveryFrame(PreferencesWindow *pwindow,
155 PlaybackPrefs *playback_prefs, int x, int y);
157 PreferencesWindow *pwindow;
158 PlaybackPrefs *playback_prefs;
161 class PlaybackDeblock : public BC_CheckBox
164 PlaybackDeblock(PreferencesWindow *pwindow, int x, int y);
166 PreferencesWindow *pwindow;
169 class PlaybackPreload : public BC_TextBox
172 PlaybackPreload(int x,
174 PreferencesWindow *pwindow,
175 PlaybackPrefs *playback,
178 PreferencesWindow *pwindow;
179 PlaybackPrefs *playback;
182 class PlaybackInterpolateRaw : public BC_CheckBox
185 PlaybackInterpolateRaw(int x,
187 PreferencesWindow *pwindow,
188 PlaybackPrefs *playback);
190 PreferencesWindow *pwindow;
191 PlaybackPrefs *playback;
194 class PlaybackWhiteBalanceRaw : public BC_CheckBox
197 PlaybackWhiteBalanceRaw(int x,
199 PreferencesWindow *pwindow,
200 PlaybackPrefs *playback);
202 PreferencesWindow *pwindow;
203 PlaybackPrefs *playback;
206 class TimecodeOffset : public BC_TextBox
209 TimecodeOffset(int x, int y, PreferencesWindow *pwindow,
210 PlaybackPrefs *playback, char *text, int unit);
213 PlaybackPrefs *playback;
214 PreferencesWindow *pwindow;
217 class PlaybackSubtitle : public BC_CheckBox
220 PlaybackSubtitle(int x,
222 PreferencesWindow *pwindow,
223 PlaybackPrefs *playback);
225 PreferencesWindow *pwindow;
226 PlaybackPrefs *playback;
229 class PlaybackSubtitleNumber : public BC_TumbleTextBox
232 PlaybackSubtitleNumber(int x, int y,
233 PreferencesWindow *pwindow,
234 PlaybackPrefs *playback);
236 PreferencesWindow *pwindow;
237 PlaybackPrefs *playback;
240 class PlaybackLabelCells : public BC_CheckBox
243 PlaybackLabelCells(int x, int y,
244 PreferencesWindow *pwindow,
245 PlaybackPrefs *playback);
247 PreferencesWindow *pwindow;
248 PlaybackPrefs *playback;
251 class PlaybackProgramNumber : public BC_TumbleTextBox
254 PlaybackProgramNumber(int x, int y,
255 PreferencesWindow *pwindow,
256 PlaybackPrefs *playback);
258 PreferencesWindow *pwindow;
259 PlaybackPrefs *playback;
262 class PlaybackGain : public BC_TumbleTextBox
265 PlaybackGain(int x, int y,
266 PreferencesWindow *pwindow,
269 PreferencesWindow *pwindow;