open.h 10.4 KB
Newer Older
1
/*****************************************************************************
2
 * open.h: Open dialogues for VLC's MacOS X port
3
 *****************************************************************************
4
 * Copyright (C) 2002-2012 VLC authors and VideoLAN
5
 * $Id$
6
 *
7
8
9
 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
 *          Christophe Massiot <massiot@via.ecp.fr>
 *          Derk-Jan Hartman <thedj@users.sourceforge.net>
10
 *          Felix Paul Kühne <fkuehne at videolan dot org>
11
12
13
14
15
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
16
 *
17
18
19
20
21
22
23
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
dionoea's avatar
dionoea committed
24
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25
26
 *****************************************************************************/

27
28
29
30
#define kVLCMediaAudioCD @"AudioCD"
#define kVLCMediaDVD @"DVD"
#define kVLCMediaVCD @"VCD"
#define kVLCMediaSVCD @"SVCD"
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
31
#define kVLCMediaBD @"Blu-ray"
32
33
34
#define kVLCMediaVideoTSFolder @"VIDEO_TS"
#define kVLCMediaBDMVFolder @"BDMV"
#define kVLCMediaUnknown @"Unknown"
35

36
37
38
39
40
/*****************************************************************************
 * Intf_Open interface
 *****************************************************************************/
@interface VLCOpen : NSObject
{
41
42
    IBOutlet id o_panel;

43
    IBOutlet id o_mrl_fld;
44
    IBOutlet id o_mrl_lbl;
45
46
    IBOutlet id o_mrl_view;
    IBOutlet id o_mrl_btn;
47
48
49
50
51
    IBOutlet id o_tabview;

    IBOutlet id o_btn_ok;
    IBOutlet id o_btn_cancel;

52
    /* bottom-line items */
53
54
55
56
    IBOutlet id o_output_ckbox;
    IBOutlet id o_sout_options;

    /* open file */
57
58
59
    IBOutlet id o_file_name;
    IBOutlet id o_file_name_stub;
    IBOutlet id o_file_icon_well;
60
    IBOutlet id o_file_btn_browse;
61
    IBOutlet id o_file_stream;
62
63
    IBOutlet id o_file_slave_ckbox;
    IBOutlet id o_file_slave_select_btn;
64
65
66
67
    IBOutlet id o_file_slave_filename_lbl;
    IBOutlet id o_file_slave_icon_well;
    IBOutlet id o_file_subtitles_filename_lbl;
    IBOutlet id o_file_subtitles_icon_well;
68
69
70
71
72
    IBOutlet id o_file_custom_timing_ckb;
    IBOutlet id o_file_starttime_fld;
    IBOutlet id o_file_starttime_lbl;
    IBOutlet id o_file_stoptime_fld;
    IBOutlet id o_file_stoptime_lbl;
73

74
    /* open disc */
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    IBOutlet id o_disc_selector_pop;

    IBOutlet id o_disc_nodisc_view;
    IBOutlet id o_disc_nodisc_lbl;
    IBOutlet id o_disc_nodisc_videots_btn;

    IBOutlet id o_disc_audiocd_view;
    IBOutlet id o_disc_audiocd_lbl;
    IBOutlet id o_disc_audiocd_trackcount_lbl;
    IBOutlet id o_disc_audiocd_videots_btn;

    IBOutlet id o_disc_dvd_view;
    IBOutlet id o_disc_dvd_lbl;
    IBOutlet id o_disc_dvd_disablemenus_btn;
    IBOutlet id o_disc_dvd_videots_btn;

    IBOutlet id o_disc_dvdwomenus_view;
    IBOutlet id o_disc_dvdwomenus_lbl;
    IBOutlet id o_disc_dvdwomenus_enablemenus_btn;
    IBOutlet id o_disc_dvdwomenus_videots_btn;
    IBOutlet id o_disc_dvdwomenus_title;
    IBOutlet id o_disc_dvdwomenus_title_lbl;
    IBOutlet id o_disc_dvdwomenus_title_stp;
    IBOutlet id o_disc_dvdwomenus_chapter;
    IBOutlet id o_disc_dvdwomenus_chapter_lbl;
    IBOutlet id o_disc_dvdwomenus_chapter_stp;

    IBOutlet id o_disc_vcd_view;
    IBOutlet id o_disc_vcd_lbl;
    IBOutlet id o_disc_vcd_videots_btn;
    IBOutlet id o_disc_vcd_title;
    IBOutlet id o_disc_vcd_title_lbl;
    IBOutlet id o_disc_vcd_title_stp;
    IBOutlet id o_disc_vcd_chapter;
    IBOutlet id o_disc_vcd_chapter_lbl;
    IBOutlet id o_disc_vcd_chapter_stp;

    IBOutlet id o_disc_bd_view;
    IBOutlet id o_disc_bd_lbl;
    IBOutlet id o_disc_bd_videots_btn;
115

116
    /* open network */
117
118
    IBOutlet id o_net_http_url;
    IBOutlet id o_net_http_url_lbl;
119
120
121
122
123
124
125
126
    IBOutlet id o_net_help_lbl;

    /* open UDP stuff panel */
    IBOutlet id o_net_help_udp_lbl;
    IBOutlet id o_net_udp_protocol_mat;
    IBOutlet id o_net_udp_protocol_lbl;
    IBOutlet id o_net_udp_address_lbl;
    IBOutlet id o_net_udp_mode_lbl;
127
    IBOutlet id o_net_mode;
128
129
130
131
    IBOutlet id o_net_openUDP_btn;
    IBOutlet id o_net_udp_cancel_btn;
    IBOutlet id o_net_udp_ok_btn;
    IBOutlet id o_net_udp_panel;
132
133
134
135
136
137
138
139
    IBOutlet id o_net_udp_port;
    IBOutlet id o_net_udp_port_lbl;
    IBOutlet id o_net_udp_port_stp;
    IBOutlet id o_net_udpm_addr;
    IBOutlet id o_net_udpm_addr_lbl;
    IBOutlet id o_net_udpm_port;
    IBOutlet id o_net_udpm_port_lbl;
    IBOutlet id o_net_udpm_port_stp;
Christophe Massiot's avatar
Christophe Massiot committed
140

141
    /* open subtitle file */
142
143
144
    IBOutlet id o_file_sub_ckbox;
    IBOutlet id o_file_sub_btn_settings;
    IBOutlet id o_file_sub_sheet;
145
146
147
    IBOutlet id o_file_sub_path_lbl;
    IBOutlet id o_file_sub_path_fld;
    IBOutlet id o_file_sub_icon_view;
148
149
150
151
152
153
154
155
    IBOutlet id o_file_sub_btn_browse;
    IBOutlet id o_file_sub_override;
    IBOutlet id o_file_sub_delay;
    IBOutlet id o_file_sub_delay_lbl;
    IBOutlet id o_file_sub_delay_stp;
    IBOutlet id o_file_sub_fps;
    IBOutlet id o_file_sub_fps_lbl;
    IBOutlet id o_file_sub_fps_stp;
156
157
158
159
160
161
    IBOutlet id o_file_sub_encoding_pop;
    IBOutlet id o_file_sub_encoding_lbl;
    IBOutlet id o_file_sub_size_pop;
    IBOutlet id o_file_sub_size_lbl;
    IBOutlet id o_file_sub_align_pop;
    IBOutlet id o_file_sub_align_lbl;
162
    IBOutlet id o_file_sub_ok_btn;
163
164
    IBOutlet id o_file_sub_font_box;
    IBOutlet id o_file_sub_file_box;
165

166
167
168
169
170
171
172
173
174
    /* generic capturing stuff */
    IBOutlet id o_capture_lbl;
    IBOutlet id o_capture_long_lbl;
    IBOutlet id o_capture_mode_pop;
    IBOutlet id o_capture_label_view;

    /* eyetv support */
    IBOutlet id o_eyetv_notLaunched_view;
    IBOutlet id o_eyetv_running_view;
175
176
177
178
179
    IBOutlet id o_eyetv_channels_pop;
    IBOutlet id o_eyetv_currentChannel_lbl;
    IBOutlet id o_eyetv_chn_status_txt;
    IBOutlet id o_eyetv_chn_bgbar;
    IBOutlet id o_eyetv_launchEyeTV_btn;
180
    IBOutlet id o_eyetv_getPlugin_btn;
181
    IBOutlet id o_eyetv_nextProgram_btn;
182
183
    IBOutlet id o_eyetv_noInstance_lbl;
    IBOutlet id o_eyetv_noInstanceLong_lbl;
184
    IBOutlet id o_eyetv_previousProgram_btn;
185

186
187
188
    /* screen support */
    IBOutlet id o_screen_view;
    IBOutlet id o_screen_long_lbl;
189
    IBOutlet id o_screen_fps_fld;
190
    IBOutlet id o_screen_fps_lbl;
191
    IBOutlet id o_screen_fps_stp;
192
193
    IBOutlet id o_screen_screen_lbl;
    IBOutlet id o_screen_screen_pop;
194
195
    IBOutlet id o_screen_left_fld;
    IBOutlet id o_screen_left_lbl;
196
    IBOutlet id o_screen_left_stp;
197
198
    IBOutlet id o_screen_top_fld;
    IBOutlet id o_screen_top_lbl;
199
    IBOutlet id o_screen_top_stp;
200
201
    IBOutlet id o_screen_width_fld;
    IBOutlet id o_screen_width_lbl;
202
    IBOutlet id o_screen_width_stp;
203
204
    IBOutlet id o_screen_height_fld;
    IBOutlet id o_screen_height_lbl;
205
206
    IBOutlet id o_screen_height_stp;
    IBOutlet id o_screen_follow_mouse_ckb;
207
208
    IBOutlet id o_screen_qtk_audio_pop;
    IBOutlet id o_screen_qtk_audio_ckb;
209

210
211
    /* QTK support */
    IBOutlet id o_qtk_view;
212
213
214
215
    IBOutlet id o_qtk_video_device_pop;
    IBOutlet id o_qtk_video_ckb;
    IBOutlet id o_qtk_audio_device_pop;
    IBOutlet id o_qtk_audio_ckb;
216
217
218
219
220
221
    IBOutlet id o_capture_width_lbl;
    IBOutlet id o_capture_width_fld;
    IBOutlet id o_capture_width_stp;
    IBOutlet id o_capture_height_lbl;
    IBOutlet id o_capture_height_fld;
    IBOutlet id o_capture_height_stp;
222
223

    NSArray         *qtkvideoDevices;
224
    NSArray         *qtkaudioDevices;
225
    NSString        *qtk_currdevice_uid;
226
    NSString        *qtkaudio_currdevice_uid;
227

228
    BOOL b_autoplay;
229
230
    BOOL b_nodvdmenus;
    id o_currentOpticalMediaView;
231
    id o_currentOpticalMediaIconView;
232
    NSMutableArray *o_allMediaDevices;
233
    NSArray *o_opticalDevices;
234
    NSMutableArray *o_specialMediaFolders;
235
    NSString *o_file_path;
236
    id o_currentCaptureView;
237
    NSString *o_file_slave_path;
238
    NSString *o_sub_path;
239
    NSString *o_mrl;
240
    NSMutableArray *o_displayInfos;
241
242
}

243
244
+ (VLCOpen *)sharedInstance;

245
@property (readwrite, assign) NSString *MRL;
246
247
@property (readonly) NSArray *qtkvideoDevices;
@property (readonly) NSArray *qtkaudioDevices;
248

249
250
251
252
253
/* text field / stepper binding values - subs panel */
@property (nonatomic) float fileSubDelay;
@property (nonatomic) float fileSubFps;


254
255
- (void)qtkrefreshVideoDevices;
- (void)qtkrefreshAudioDevices;
256

257
- (void)setSubPanel;
258
259
- (void)openTarget:(int)i_type;
- (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi;
260
- (void)textFieldWasClicked:(NSNotification *)o_notification;
261
- (IBAction)expandMRLfieldAction:(id)sender;
262
- (IBAction)inputSlaveAction:(id)sender;
263
- (IBAction)fileTimeCustomization:(id)sender;
264

265
- (void)openFileGeneric;
266
- (void)openFilePathChanged:(NSNotification *)o_notification;
267
268
- (IBAction)openFileBrowse:(id)sender;
- (IBAction)openFileStreamChanged:(id)sender;
269

270
- (void)openDisc;
271
272
273
274
275
- (void)scanOpticalMedia:(NSNotification *)o_notification;
- (IBAction)discSelectorChanged:(id)sender;
- (IBAction)openSpecialMediaFolder:(id)sender;
- (IBAction)dvdreadOptionChanged:(id)sender;
- (IBAction)vcdOptionChanged:(id)sender;
276
277
278
279

// static helper functions
+ (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath;
+ (NSString *)getBSDNodeFromMountPath:(NSString *)mountPath;
280

281
- (void)openNet;
282
- (IBAction)openNetModeChanged:(id)sender;
283
284
- (IBAction)openNetStepperChanged:(id)sender;
- (void)openNetInfoChanged:(NSNotification *)o_notification;
285
- (IBAction)openNetUDPButtonAction:(id)sender;
286

287
288
289
- (void)openCapture;
- (void)showCaptureView: theView;
- (IBAction)openCaptureModeChanged:(id)sender;
290
- (IBAction)qtkChanged:(id)sender;
291
- (IBAction)qtkAudioChanged:(id)sender;
292
- (IBAction)qtkToggleUIElements:(id)sender;
293
- (IBAction)screenChanged:(id)sender;
294
295
- (IBAction)eyetvSwitchChannel:(id)sender;
- (IBAction)eyetvLaunch:(id)sender;
296
- (IBAction)eyetvGetPlugin:(id)sender;
297
298
- (void)eyetvChanged:(NSNotification *)o_notification;
- (void)setupChannelInfo;
299
- (void)screenFPSfieldChanged:(NSNotification *)o_notification;
300

301
302
303
304
- (IBAction)subsChanged:(id)sender;
- (IBAction)subSettings:(id)sender;
- (IBAction)subFileBrowse:(id)sender;
- (IBAction)subOverride:(id)sender;
305

306
- (IBAction)subCloseSheet:(id)sender;
Christophe Massiot's avatar
Christophe Massiot committed
307

308
309
310
- (IBAction)panelCancel:(id)sender;
- (IBAction)panelOk:(id)sender;

311
- (void)openFile;
312
@end
313
314
315
316

@interface VLCOpenTextField : NSTextField
- (void)mouseDown:(NSEvent *)theEvent;
@end