]> git.sesse.net Git - vlc/blob - modules/gui/macosx/ConvertAndSave.h
macosx: CAS: sync steppers and fields, and add NumberFormatters (fixes #8598)
[vlc] / modules / gui / macosx / ConvertAndSave.h
1 /*****************************************************************************
2  * ConvertAndSave.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2012 Felix Paul Kühne
5  * $Id$
6  *
7  * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #import <Cocoa/Cocoa.h>
25 #import "SharedDialogs.h"
26
27 @interface VLCConvertAndSave : NSObject
28 {
29     IBOutlet id _window;
30     IBOutlet id _ok_btn;
31
32     IBOutlet id _drop_lbl;
33     IBOutlet id _drop_image_view;
34     IBOutlet id _drop_btn;
35     IBOutlet id _drop_box;
36
37     IBOutlet id _profile_lbl;
38     IBOutlet id _profile_pop;
39     IBOutlet id _profile_btn;
40
41     IBOutlet id _destination_box;
42     IBOutlet id _destination_lbl;
43     IBOutlet id _destination_browse_btn;
44     IBOutlet id _destination_icon_view;
45     IBOutlet id _destination_filename_lbl;
46     IBOutlet id _destination_filename_stub_lbl;
47     IBOutlet id _destination_stream_btn;
48     IBOutlet id _destination_stream_lbl;
49     IBOutlet id _destination_itwantafile_btn;
50     IBOutlet id _destination_itwantastream_btn;
51     IBOutlet id _destination_itwantafile_view;
52     IBOutlet id _destination_itwantastream_view;
53     IBOutlet id _destination_cancel_btn;
54
55     IBOutlet id _dropin_view;
56     IBOutlet id _dropin_icon_view;
57     IBOutlet id _dropin_media_lbl;
58
59     IBOutlet id _customize_panel;
60     IBOutlet id _customize_ok_btn;
61     IBOutlet id _customize_cancel_btn;
62     IBOutlet id _customize_newProfile_btn;
63     IBOutlet id _customize_tabview;
64     IBOutlet id _customize_encap_matrix;
65     IBOutlet id _customize_vid_ckb;
66     IBOutlet id _customize_vid_keep_ckb;
67     IBOutlet id _customize_vid_codec_lbl;
68     IBOutlet id _customize_vid_codec_pop;
69     IBOutlet id _customize_vid_bitrate_lbl;
70     IBOutlet id _customize_vid_bitrate_fld;
71     IBOutlet id _customize_vid_framerate_lbl;
72     IBOutlet id _customize_vid_framerate_fld;
73     IBOutlet id _customize_vid_res_box;
74     IBOutlet id _customize_vid_res_lbl;
75     IBOutlet id _customize_vid_width_lbl;
76     IBOutlet id _customize_vid_width_fld;
77     IBOutlet id _customize_vid_height_lbl;
78     IBOutlet id _customize_vid_height_fld;
79     IBOutlet id _customize_vid_scale_lbl;
80     IBOutlet id _customize_vid_scale_pop;
81     IBOutlet id _customize_aud_ckb;
82     IBOutlet id _customize_aud_keep_ckb;
83     IBOutlet id _customize_aud_codec_lbl;
84     IBOutlet id _customize_aud_codec_pop;
85     IBOutlet id _customize_aud_bitrate_lbl;
86     IBOutlet id _customize_aud_bitrate_fld;
87     IBOutlet id _customize_aud_channels_lbl;
88     IBOutlet id _customize_aud_channels_fld;
89     IBOutlet id _customize_aud_samplerate_lbl;
90     IBOutlet id _customize_aud_samplerate_pop;
91     IBOutlet id _customize_subs_ckb;
92     IBOutlet id _customize_subs_pop;
93     IBOutlet id _customize_subs_overlay_ckb;
94
95     IBOutlet id _stream_panel;
96     IBOutlet id _stream_ok_btn;
97     IBOutlet id _stream_destination_lbl;
98     IBOutlet id _stream_announcement_lbl;
99     IBOutlet id _stream_type_lbl;
100     IBOutlet id _stream_type_pop;
101     IBOutlet id _stream_address_lbl;
102     IBOutlet id _stream_address_fld;
103     IBOutlet id _stream_ttl_lbl;
104     IBOutlet id _stream_ttl_fld;
105     IBOutlet id _stream_ttl_stepper;
106     IBOutlet id _stream_port_lbl;
107     IBOutlet id _stream_port_fld;
108     IBOutlet id _stream_sap_ckb;
109     IBOutlet id _stream_channel_fld;
110     IBOutlet id _stream_sdp_matrix;
111     IBOutlet id _stream_sdp_fld;
112     IBOutlet id _stream_sdp_browsefile_btn;
113
114     NSString * _MRL;
115     NSString * _outputDestination;
116     NSArray * _profileNames;
117     NSArray * _profileValueList;
118     NSArray * _videoCodecs;
119     NSArray * _audioCodecs;
120     NSArray * _subsCodecs;
121     NSMutableArray * _currentProfile;
122
123     BOOL b_streaming;
124 }
125 @property (readwrite, nonatomic, retain) NSString * MRL;
126 @property (readwrite, nonatomic, retain) NSString * outputDestination;
127 @property (readwrite, retain) NSArray * profileNames;
128 @property (readwrite, retain) NSArray * profileValueList;
129 @property (readwrite, retain) NSMutableArray * currentProfile;
130
131 /* Bindings for field / stepper combis */
132 @property (nonatomic) int vidBitrate;
133 @property (nonatomic) int vidFramerate;
134 @property (nonatomic) int audBitrate;
135 @property (nonatomic) int audChannels;
136
137
138 + (VLCConvertAndSave *)sharedInstance;
139
140 - (IBAction)toggleWindow;
141
142 - (IBAction)finalizePanel:(id)sender;
143 - (IBAction)openMedia:(id)sender;
144 - (IBAction)switchProfile:(id)sender;
145 - (IBAction)customizeProfile:(id)sender;
146 - (IBAction)closeCustomizationSheet:(id)sender;
147 - (IBAction)newProfileAction:(id)sender;
148 - (IBAction)iWantAFile:(id)sender;
149 - (IBAction)iWantAStream:(id)sender;
150 - (IBAction)cancelDestination:(id)sender;
151 - (IBAction)browseFileDestination:(id)sender;
152 - (IBAction)showStreamPanel:(id)sender;
153 - (IBAction)closeStreamPanel:(id)sender;
154 - (IBAction)streamTypeToggle:(id)sender;
155 - (IBAction)streamAnnouncementToggle:(id)sender;
156 - (IBAction)sdpFileLocationSelector:(id)sender;
157
158 - (void)panel:(VLCEnterTextPanel *)panel returnValue:(NSUInteger)value text:(NSString *)text;
159 - (void)panel:(VLCSelectItemInPopupPanel *)panel returnValue:(NSUInteger)value item:(NSUInteger)item;
160
161 - (void)updateDropView;
162
163 @end
164
165 @interface VLCDropEnabledBox : NSBox
166 {
167     BOOL b_activeDragAndDrop;
168 }
169
170 @end
171
172 @interface VLCDropEnabledImageView : NSImageView
173
174 @end
175
176 @interface VLCDropEnabledButton : NSButton
177
178 @end