]> git.sesse.net Git - vlc/blob - modules/gui/macosx/ConvertAndSave.h
09007d8b07b325c96a586ab2b899e14cc93c3fe5
[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
66     IBOutlet id _customize_vid_settings_box;
67     IBOutlet id _customize_vid_ckb;
68     IBOutlet id _customize_vid_keep_ckb;
69     IBOutlet id _customize_vid_codec_lbl;
70     IBOutlet id _customize_vid_codec_pop;
71     IBOutlet id _customize_vid_bitrate_lbl;
72     IBOutlet id _customize_vid_bitrate_fld;
73     IBOutlet id _customize_vid_framerate_lbl;
74     IBOutlet id _customize_vid_framerate_fld;
75     IBOutlet id _customize_vid_res_box;
76     IBOutlet id _customize_vid_res_lbl;
77     IBOutlet id _customize_vid_width_lbl;
78     IBOutlet id _customize_vid_width_fld;
79     IBOutlet id _customize_vid_height_lbl;
80     IBOutlet id _customize_vid_height_fld;
81     IBOutlet id _customize_vid_scale_lbl;
82     IBOutlet id _customize_vid_scale_pop;
83
84     IBOutlet id _customize_aud_settings_box;
85     IBOutlet id _customize_aud_ckb;
86     IBOutlet id _customize_aud_keep_ckb;
87     IBOutlet id _customize_aud_codec_lbl;
88     IBOutlet id _customize_aud_codec_pop;
89     IBOutlet id _customize_aud_bitrate_lbl;
90     IBOutlet id _customize_aud_bitrate_fld;
91     IBOutlet id _customize_aud_channels_lbl;
92     IBOutlet id _customize_aud_channels_fld;
93     IBOutlet id _customize_aud_samplerate_lbl;
94     IBOutlet id _customize_aud_samplerate_pop;
95
96     IBOutlet id _customize_subs_ckb;
97     IBOutlet id _customize_subs_pop;
98     IBOutlet id _customize_subs_overlay_ckb;
99
100     IBOutlet id _stream_panel;
101     IBOutlet id _stream_cancel_btn;
102     IBOutlet id _stream_ok_btn;
103     IBOutlet id _stream_destination_lbl;
104     IBOutlet id _stream_announcement_lbl;
105     IBOutlet id _stream_type_lbl;
106     IBOutlet id _stream_type_pop;
107     IBOutlet id _stream_address_lbl;
108     IBOutlet id _stream_address_fld;
109     IBOutlet id _stream_ttl_lbl;
110     IBOutlet id _stream_ttl_fld;
111     IBOutlet id _stream_ttl_stepper;
112     IBOutlet id _stream_port_lbl;
113     IBOutlet id _stream_port_fld;
114     IBOutlet id _stream_sap_ckb;
115     IBOutlet id _stream_channel_fld;
116     IBOutlet id _stream_sdp_matrix;
117     IBOutlet id _stream_sdp_fld;
118     IBOutlet id _stream_sdp_browsefile_btn;
119
120     NSString * _MRL;
121     NSString * _outputDestination;
122     NSArray * _profileNames;
123     NSArray * _profileValueList;
124     NSArray * _videoCodecs;
125     NSArray * _audioCodecs;
126     NSArray * _subsCodecs;
127     NSMutableArray * _currentProfile;
128
129     BOOL b_streaming;
130 }
131 @property (readwrite, nonatomic, retain) NSString * MRL;
132 @property (readwrite, nonatomic, retain) NSString * outputDestination;
133 @property (readwrite, retain) NSArray * profileNames;
134 @property (readwrite, retain) NSArray * profileValueList;
135 @property (readwrite, retain) NSMutableArray * currentProfile;
136
137 /* Bindings for field / stepper combis */
138 @property (nonatomic) int vidBitrate;
139 @property (nonatomic) int vidFramerate;
140 @property (nonatomic) int audBitrate;
141 @property (nonatomic) int audChannels;
142
143
144 + (VLCConvertAndSave *)sharedInstance;
145
146 - (IBAction)toggleWindow;
147
148 - (IBAction)finalizePanel:(id)sender;
149 - (IBAction)openMedia:(id)sender;
150 - (IBAction)switchProfile:(id)sender;
151 - (IBAction)customizeProfile:(id)sender;
152 - (IBAction)closeCustomizationSheet:(id)sender;
153 - (IBAction)newProfileAction:(id)sender;
154 - (IBAction)iWantAFile:(id)sender;
155 - (IBAction)iWantAStream:(id)sender;
156 - (IBAction)cancelDestination:(id)sender;
157 - (IBAction)browseFileDestination:(id)sender;
158 - (IBAction)showStreamPanel:(id)sender;
159 - (IBAction)closeStreamPanel:(id)sender;
160 - (IBAction)streamTypeToggle:(id)sender;
161 - (IBAction)streamAnnouncementToggle:(id)sender;
162 - (IBAction)sdpFileLocationSelector:(id)sender;
163
164 - (void)panel:(VLCEnterTextPanel *)panel returnValue:(NSUInteger)value text:(NSString *)text;
165 - (void)panel:(VLCSelectItemInPopupPanel *)panel returnValue:(NSUInteger)value item:(NSUInteger)item;
166
167 - (IBAction)videoSettingsChanged:(id)sender;
168 - (IBAction)audioSettingsChanged:(id)sender;
169 - (IBAction)subSettingsChanged:(id)sender;
170
171 - (void)updateDropView;
172
173 @end
174
175 @interface VLCDropEnabledBox : NSBox
176 {
177     BOOL b_activeDragAndDrop;
178 }
179
180 @end
181
182 @interface VLCDropEnabledImageView : NSImageView
183
184 @end
185
186 @interface VLCDropEnabledButton : NSButton
187
188 @end