~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to modules/gui/macosx/wizard.m

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 * wizard.m: MacOS X Streaming Wizard
3
3
 *****************************************************************************
4
 
 * Copyright (C) 2005-2006 the VideoLAN team
5
 
 * $Id: 1604a935da81d834bd4d19c9800d2e1b107c0b84 $
 
4
 * Copyright (C) 2005-2007 the VideoLAN team
 
5
 * $Id: ec94012776d9100d01f8023e4b712a0407f16f9a $
6
6
 *
7
7
 * Authors: Felix Kühne <fkuehne@users.sf.net>
8
8
 *
33
33
 *****************************************************************************/
34
34
#import "wizard.h"
35
35
#import "intf.h"
36
 
#import "network.h"
37
36
#import "playlist.h"
38
 
#import <vlc/intf.h>
 
37
#import <vlc_interface.h>
39
38
 
40
39
/*****************************************************************************
41
40
 * VLCWizard implementation
79
78
 
80
79
    /* add audio-bitrates for transcoding */
81
80
    NSArray * audioBitratesArray;
82
 
    audioBitratesArray = [NSArray arrayWithObjects: @"512", @"256", @"192", \
 
81
    audioBitratesArray = [NSArray arrayWithObjects: @"512", @"256", @"192", 
83
82
        @"128", @"64", @"32", @"16", nil ];
84
83
    [o_t4_pop_audioBitrate removeAllItems];
85
84
    [o_t4_pop_audioBitrate addItemsWithTitles: audioBitratesArray];
87
86
 
88
87
    /* add video-bitrates for transcoding */
89
88
    NSArray * videoBitratesArray;
90
 
    videoBitratesArray = [NSArray arrayWithObjects: @"3072", @"2048", @"1024", \
 
89
    videoBitratesArray = [NSArray arrayWithObjects: @"3072", @"2048", @"1024", 
91
90
        @"768", @"512", @"256", @"192", @"128", @"64", @"32", @"16", nil ];
92
91
    [o_t4_pop_videoBitrate removeAllItems];
93
92
    [o_t4_pop_videoBitrate addItemsWithTitles: videoBitratesArray];
110
109
    NSArray * o_mjpg;
111
110
    NSArray * o_theo;
112
111
    NSArray * o_dummyVid;
113
 
    o_mp1v = [NSArray arrayWithObjects: @"MPEG-1 Video", @"mp1v", \
114
 
        _NS("MPEG-1 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG " \
115
 
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", \
116
 
        @"NO", @"NO", @"NO", @"NO", nil];
117
 
    o_mp2v = [NSArray arrayWithObjects: @"MPEG-2 Video", @"mp2v", \
118
 
        _NS("MPEG-2 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG " \
119
 
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", \
120
 
        @"NO", @"NO", @"NO", @"NO", nil];
121
 
    o_mp4v = [NSArray arrayWithObjects: @"MPEG-4 Video", @"mp4v", \
122
 
        _NS("MPEG-4 Video codec (useable with MPEG PS, MPEG TS, MPEG1, ASF, " \
123
 
        "MP4, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", \
 
112
    o_mp1v = [NSArray arrayWithObjects: @"MPEG-1 Video", @"mp1v", 
 
113
        _NS("MPEG-1 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG " 
 
114
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
 
115
        @"NO", @"NO", @"NO", @"NO", nil];
 
116
    o_mp2v = [NSArray arrayWithObjects: @"MPEG-2 Video", @"mp2v",
 
117
        _NS("MPEG-2 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG "
 
118
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
 
119
        @"NO", @"NO", @"NO", @"NO", nil];
 
120
    o_mp4v = [NSArray arrayWithObjects: @"MPEG-4 Video", @"mp4v",
 
121
        _NS("MPEG-4 Video codec (useable with MPEG PS, MPEG TS, MPEG1, ASF, "
 
122
        "MP4, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF",
124
123
        @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", nil];
125
 
    o_div1 = [NSArray arrayWithObjects: @"DIVX 1", @"DIV1", \
126
 
        _NS("DivX first version (useable with MPEG TS, MPEG1, ASF and OGG)"), \
127
 
        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", \
128
 
        @"NO", @"NO", nil];
129
 
    o_div2 = [NSArray arrayWithObjects: @"DIVX 2", @"DIV2", \
130
 
        _NS("DivX second version (useable with MPEG TS, MPEG1, ASF and OGG)"), \
131
 
        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", \
132
 
        @"NO", @"NO", nil];
133
 
    o_div3 = [NSArray arrayWithObjects: @"DIVX 3", @"DIV3", \
134
 
        _NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"), \
135
 
        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", \
136
 
        @"NO", @"NO", nil];
137
 
    o_h263 = [NSArray arrayWithObjects: @"H.263", @"h263", \
138
 
        _NS("H263 is a video codec optimized for videoconference " \
139
 
        "(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO", \
 
124
    o_div1 = [NSArray arrayWithObjects: @"DIVX 1", @"DIV1",
 
125
        _NS("DivX first version (useable with MPEG TS, MPEG1, ASF and OGG)"),
 
126
        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
 
127
        @"NO", @"NO", nil];
 
128
    o_div2 = [NSArray arrayWithObjects: @"DIVX 2", @"DIV2",
 
129
        _NS("DivX second version (useable with MPEG TS, MPEG1, ASF and OGG)"),
 
130
        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
 
131
        @"NO", @"NO", nil];
 
132
    o_div3 = [NSArray arrayWithObjects: @"DIVX 3", @"DIV3",
 
133
        _NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"),
 
134
        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
 
135
        @"NO", @"NO", nil];
 
136
    o_h263 = [NSArray arrayWithObjects: @"H.263", @"h263",
 
137
        _NS("H263 is a video codec optimized for videoconference "
 
138
        "(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO",
140
139
        @"NO", @"NO", @"NO", @"NO", @"NO", nil];
141
 
    o_h264 = [NSArray arrayWithObjects: @"H.264", @"h264", \
142
 
        _NS("H264 is a new video codec (useable with MPEG TS and MP4)"), \
143
 
        @"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", \
 
140
    o_h264 = [NSArray arrayWithObjects: @"H.264", @"h264",
 
141
        _NS("H264 is a new video codec (useable with MPEG TS and MP4)"),
 
142
        @"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO",
144
143
        @"NO", nil];
145
 
    o_wmv1 = [NSArray arrayWithObjects: @"WMV 1", @"WMV1", \
146
 
        _NS("WMV (Windows Media Video) 1 (useable with MPEG TS, MPEG1, ASF and " \
147
 
        "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", \
148
 
        @"NO", @"NO", @"NO", nil];
149
 
    o_wmv2 = [NSArray arrayWithObjects: @"WMV 2", @"WMV2", \
150
 
        _NS("WMV (Windows Media Video) 2 (useable with MPEG TS, MPEG1, ASF and " \
151
 
        "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", \
152
 
        @"NO", @"NO", @"NO", nil];
153
 
    o_mjpg = [NSArray arrayWithObjects: @"MJPEG", @"MJPG", \
154
 
        _NS("MJPEG consists of a series of JPEG pictures (useable with MPEG TS," \
155
 
        " MPEG1, ASF and OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", \
 
144
    o_wmv1 = [NSArray arrayWithObjects: @"WMV 1", @"WMV1",
 
145
        _NS("WMV (Windows Media Video) 1 (useable with MPEG TS, MPEG1, ASF and "
 
146
        "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
 
147
        @"NO", @"NO", @"NO", nil];
 
148
    o_wmv2 = [NSArray arrayWithObjects: @"WMV 2", @"WMV2",
 
149
        _NS("WMV (Windows Media Video) 2 (useable with MPEG TS, MPEG1, ASF and "
 
150
        "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
 
151
        @"NO", @"NO", @"NO", nil];
 
152
    o_mjpg = [NSArray arrayWithObjects: @"MJPEG", @"MJPG",
 
153
        _NS("MJPEG consists of a series of JPEG pictures (useable with MPEG TS,"
 
154
        " MPEG1, ASF and OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
156
155
        @"NO", @"NO", @"NO", @"NO", @"NO", nil];
157
 
    o_theo = [NSArray arrayWithObjects: @"Theora", @"theo", \
158
 
        _NS("Theora is a free general-purpose codec (useable with MPEG TS " \
159
 
        "and OGG)"), @"MUX_TS", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", \
 
156
    o_theo = [NSArray arrayWithObjects: @"Theora", @"theo",
 
157
        _NS("Theora is a free general-purpose codec (useable with MPEG TS "
 
158
        "and OGG)"), @"MUX_TS", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO",
160
159
        @"NO", @"NO", nil];
161
 
    o_dummyVid = [NSArray arrayWithObjects: @"Dummy", @"dummy", \
162
 
        _NS("Dummy codec (do not transcode, useable with all encapsulation " \
163
 
        "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", \
 
160
    o_dummyVid = [NSArray arrayWithObjects: @"Dummy", @"dummy",
 
161
        _NS("Dummy codec (do not transcode, useable with all encapsulation "
 
162
        "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
164
163
        @"MUX_OGG", @"MUX_WAV", @"MUX_RAW", @"MUX_MOV", nil];
165
 
    o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v, \
166
 
        o_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo, \
 
164
    o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v,
 
165
        o_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo,
167
166
        o_dummyVid, nil];
168
 
    
 
167
 
169
168
 
170
169
    NSArray * o_mpga;
171
170
    NSArray * o_mp3;
177
176
    NSArray * o_s16l;
178
177
    NSArray * o_fl32;
179
178
    NSArray * o_dummyAud;
180
 
    o_mpga = [NSArray arrayWithObjects: @"MPEG Audio", @"mpga", \
181
 
        _NS("The standard MPEG audio (1/2) format (useable with MPEG PS, MPEG TS, " \
182
 
        "MPEG1, ASF, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", \
 
179
    o_mpga = [NSArray arrayWithObjects: @"MPEG Audio", @"mpga",
 
180
        _NS("The standard MPEG audio (1/2) format (useable with MPEG PS, MPEG TS, "
 
181
        "MPEG1, ASF, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG",
183
182
        @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
184
 
    o_mp3 = [NSArray arrayWithObjects: @"MP3", @"mp3", \
185
 
        _NS("MPEG Audio Layer 3 (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG " \
186
 
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", \
 
183
    o_mp3 = [NSArray arrayWithObjects: @"MP3", @"mp3",
 
184
        _NS("MPEG Audio Layer 3 (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
 
185
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
187
186
        @"MUX_RAW", @"-1", @"-1", @"-1", nil];
188
 
    o_mp4a = [NSArray arrayWithObjects: @"MPEG 4 Audio", @"mp4a", \
189
 
        _NS("Audio format for MPEG4 (useable with MPEG TS and MPEG4)"), @"MUX_TS", \
 
187
    o_mp4a = [NSArray arrayWithObjects: @"MPEG 4 Audio", @"mp4a",
 
188
        _NS("Audio format for MPEG4 (useable with MPEG TS and MPEG4)"), @"MUX_TS",
190
189
        @"MUX_MP4", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
191
 
    o_a52 = [NSArray arrayWithObjects: @"A/52", @"a52", 
192
 
        _NS("DVD audio format (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG " \
193
 
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", \
 
190
    o_a52 = [NSArray arrayWithObjects: @"A/52", @"a52",
 
191
        _NS("DVD audio format (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
 
192
        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
194
193
        @"MUX_RAW", @"-1", @"-1", @"-1", nil];
195
 
    o_vorb = [NSArray arrayWithObjects: @"Vorbis", @"vorb", \
196
 
        _NS("Vorbis is a free audio codec (useable with OGG)"), @"MUX_OGG", \
 
194
    o_vorb = [NSArray arrayWithObjects: @"Vorbis", @"vorb",
 
195
        _NS("Vorbis is a free audio codec (useable with OGG)"), @"MUX_OGG",
197
196
        @"-1",  @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
198
 
    o_flac = [NSArray arrayWithObjects: @"FLAC", @"flac", \
199
 
        _NS("FLAC is a lossless audio codec (useable with OGG and RAW)"), \
200
 
        @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", \
 
197
    o_flac = [NSArray arrayWithObjects: @"FLAC", @"flac",
 
198
        _NS("FLAC is a lossless audio codec (useable with OGG and RAW)"),
 
199
        @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1",
201
200
        @"-1", nil];
202
 
    o_spx = [NSArray arrayWithObjects: @"Speex", @"spx", \
203
 
        _NS("A free audio codec dedicated to compression of voice (useable " \
204
 
        "with OGG)"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", \
 
201
    o_spx = [NSArray arrayWithObjects: @"Speex", @"spx",
 
202
        _NS("A free audio codec dedicated to compression of voice (useable "
 
203
        "with OGG)"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1",
205
204
        @"-1", @"-1", nil];
206
 
    o_s16l = [NSArray arrayWithObjects: @"Uncompressed, integer", @"s16l", \
207
 
        _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV", \
208
 
        @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
209
 
    o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating point", @"fl32", \
210
 
        _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV", \
211
 
        @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
212
 
    o_dummyAud = [NSArray arrayWithObjects: @"Dummy", @"dummy", \
213
 
        _NS("Dummy codec (do not transcode, useable with all encapsulation " \
214
 
        "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", \
 
205
    o_s16l = [NSArray arrayWithObjects: @"Uncompressed, integer", @"s16l",
 
206
        _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
 
207
        @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
 
208
    o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating point", @"fl32",
 
209
        _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
 
210
        @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
 
211
    o_dummyAud = [NSArray arrayWithObjects: @"Dummy", @"dummy",
 
212
        _NS("Dummy codec (do not transcode, useable with all encapsulation "
 
213
        "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
215
214
        @"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV", nil];
216
 
    o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a, \
 
215
    o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a,
217
216
        o_a52, o_vorb, o_flac, o_spx, o_s16l, o_fl32, o_dummyAud, nil];
218
217
 
219
218
 
231
230
    NSArray * o_mov;
232
231
    NSArray * o_wav;
233
232
    NSArray * o_asfh;
234
 
    o_ps = [NSArray arrayWithObjects: @"ps", @"MPEG PS", \
 
233
    o_ps = [NSArray arrayWithObjects: @"ps", @"MPEG PS",
235
234
        _NS("MPEG Program Stream"), @"mpg", nil];
236
 
    o_ts = [NSArray arrayWithObjects: @"ts", @"MPEG TS", \
 
235
    o_ts = [NSArray arrayWithObjects: @"ts", @"MPEG TS",
237
236
        _NS("MPEG Transport Stream"), nil];
238
 
    o_mpeg = [NSArray arrayWithObjects: @"ps", @"MPEG 1", \
 
237
    o_mpeg = [NSArray arrayWithObjects: @"ps", @"MPEG 1",
239
238
        _NS("MPEG 1 Format"), @"mpg", nil];
240
239
    o_ogg = [NSArray arrayWithObjects: @"ogg", @"OGG", @"OGG", nil];
241
240
    o_raw = [NSArray arrayWithObjects: @"raw", @"RAW", @"RAW", nil];
245
244
    o_mov = [NSArray arrayWithObjects: @"mov", @"MOV", @"MOV", nil];
246
245
    o_wav = [NSArray arrayWithObjects: @"wav", @"WAV", @"WAV", nil];
247
246
    o_asfh = [NSArray arrayWithObjects: @"asfh", @"ASFH", @"ASFH", nil];
248
 
    o_encapFormats = [[NSArray alloc] initWithObjects: o_ps, o_ts, o_mpeg, \
 
247
    o_encapFormats = [[NSArray alloc] initWithObjects: o_ps, o_ts, o_mpeg,
249
248
        o_ogg, o_raw, o_asf, o_avi, o_mp4, o_mov, o_wav, o_asfh, nil];
250
249
 
251
250
    /* yet another array on streaming methods including help texts */
255
254
    NSArray * o_udp_multi;
256
255
    NSArray * o_rtp_uni;
257
256
    NSArray * o_rtp_multi;
258
 
    o_http = [NSArray arrayWithObjects: @"http", @"HTTP", _NS("Enter the local " \
259
 
        "addresses you want to listen requests on. Do not enter anything if " \
260
 
        "you want to listen on all the network interfaces. This is generally " \
261
 
        "the best thing to do. Other computers can then access the stream at " \
262
 
        "http://yourip:8080 by default.") , _NS("Use this to stream to several " \
 
257
    o_http = [NSArray arrayWithObjects: @"http", @"HTTP", _NS("Enter the local "
 
258
        "addresses you want to listen requests on. Do not enter anything if "
 
259
        "you want to listen on all the network interfaces. This is generally "
 
260
        "the best thing to do. Other computers can then access the stream at "
 
261
        "http://yourip:8080 by default.") , _NS("Use this to stream to several "
263
262
        "computers. This method is not the most efficient, as the server needs "\
264
263
        "to send the stream several times, but generally the most compatible"), nil];
265
 
    o_mms = [NSArray arrayWithObjects: @"mmsh", @"MMS", _NS("Enter the local " \
266
 
        "addresses you want to listen requests on. Do not enter anything if " \
267
 
        "you want to listen on all the network interfaces. This is generally " \
268
 
        "the best thing to do. Other computers can then access the stream at " \
269
 
        "mms://yourip:8080 by default."), _NS("Use this to stream to several " \
270
 
        "computers using the Microsoft MMS protocol. This protocol is used as " \
271
 
        "transport method by many Microsoft's softwares. Note that only a " \
272
 
        "small part of the MMS protocol is supported (MMS encapsulated in " \
 
264
    o_mms = [NSArray arrayWithObjects: @"mmsh", @"MMS", _NS("Enter the local "
 
265
        "addresses you want to listen requests on. Do not enter anything if "
 
266
        "you want to listen on all the network interfaces. This is generally "
 
267
        "the best thing to do. Other computers can then access the stream at "
 
268
        "mms://yourip:8080 by default."), _NS("Use this to stream to several "
 
269
        "computers using the Microsoft MMS protocol. This protocol is used as "
 
270
        "transport method by many Microsoft's softwares. Note that only a "
 
271
        "small part of the MMS protocol is supported (MMS encapsulated in "
273
272
        "HTTP)." ), nil];
274
 
    o_udp_uni = [NSArray arrayWithObjects: @"udp", @"UDP-Unicast", _NS("Enter " \
275
 
        "the address of the computer to stream to."), _NS("Use this to stream " \
 
273
    o_udp_uni = [NSArray arrayWithObjects: @"udp", @"UDP-Unicast", _NS("Enter "
 
274
        "the address of the computer to stream to."), _NS("Use this to stream "
276
275
        "to a single computer."), nil];
277
 
    o_udp_multi = [NSArray arrayWithObjects: @"udp", @"UDP-Multicast", _NS("Enter " \
278
 
        "the multicast address to stream to in this field. This must be an IP " \
279
 
        "address between 224.0.0.0 and 239.255.255.255. For a private use, " \
280
 
        "enter an address beginning with 239.255."), _NS("Use this to stream " \
281
 
        "to a dynamic group of computers on a multicast-enabled network. This " \
282
 
        "is the most efficient method to stream to several computers, but it " \
 
276
    o_udp_multi = [NSArray arrayWithObjects: @"udp", @"UDP-Multicast", _NS("Enter "
 
277
        "the multicast address to stream to in this field. This must be an IP "
 
278
        "address between 224.0.0.0 and 239.255.255.255. For a private use, "
 
279
        "enter an address beginning with 239.255."), _NS("Use this to stream "
 
280
        "to a dynamic group of computers on a multicast-enabled network. This "
 
281
        "is the most efficient method to stream to several computers, but it "
283
282
        "won't work over the Internet."), nil];
284
 
    o_rtp_uni = [NSArray arrayWithObjects: @"rtp", @"RTP-Unicast", _NS("Enter the " \
285
 
        "address of the computer to stream to.") , _NS("Use this to stream " \
 
283
    o_rtp_uni = [NSArray arrayWithObjects: @"rtp", @"RTP-Unicast", _NS("Enter the "
 
284
        "address of the computer to stream to.") , _NS("Use this to stream "
286
285
        "to a single computer. RTP headers will be added to the stream"), nil];
287
 
    o_rtp_multi = [NSArray arrayWithObjects: @"rtp", @"RTP-Multicast", _NS("Enter " \
288
 
        "the multicast address to stream to in this field. This must be an IP " \
289
 
        "address between 224.0.0.0 and 239.255.255.255. For a private use, " \
290
 
        "enter an address beginning with 239.255."), _NS("Use this to stream " \
291
 
        "to a dynamic group of computers on a multicast-enabled network. This " \
292
 
        "is the most efficient method to stream to several computers, but it " \
 
286
    o_rtp_multi = [NSArray arrayWithObjects: @"rtp", @"RTP-Multicast", _NS("Enter "
 
287
        "the multicast address to stream to in this field. This must be an IP "
 
288
        "address between 224.0.0.0 and 239.255.255.255. For a private use, "
 
289
        "enter an address beginning with 239.255."), _NS("Use this to stream "
 
290
        "to a dynamic group of computers on a multicast-enabled network. This "
 
291
        "is the most efficient method to stream to several computers, but it "
293
292
        "won't work over Internet. RTP headers will be added to the stream"), nil];
294
 
    o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_mms, \
 
293
    o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_mms,
295
294
        o_udp_uni, o_udp_multi, o_rtp_uni, o_rtp_multi, nil];
296
295
}
297
296
 
305
304
 
306
305
- (void)resetWizard
307
306
{
308
 
    /* get the current state of our setting to keep the selections or not */
309
 
    keepSettingsOrNot = (BOOL *)config_GetInt( VLCIntf, "macosx-wizard-keep" );
310
 
 
311
307
    /* go to the front page and clean up a bit */
312
308
    [o_userSelections removeAllObjects];
313
309
    [o_btn_forward setTitle: _NS("Next")];
314
310
    [o_tab_pageHolder selectFirstTabViewItem:self];
315
 
 
316
 
    
317
 
    if( keepSettingsOrNot )
318
 
        return;
319
 
    
320
 
    /* reset the wizard-window to its default values if wanted */
321
 
    [o_t1_matrix_strmgOrTrnscd selectCellAtRow:0 column:0];
322
 
    [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setState: NSOffState];
323
 
 
324
 
    /* "Input" */
325
 
    [o_t2_fld_pathToNewStrm setStringValue: @""];
326
 
    [o_t2_ckb_enblPartExtrct setState: NSOffState];
327
 
    [self t2_enableExtract:nil];
328
 
    [o_t2_matrix_inputSourceType selectCellAtRow:0 column:0];
329
 
    [[o_t2_matrix_inputSourceType cellAtRow:1 column:0] setState: NSOffState];
330
 
    [o_t2_fld_pathToNewStrm setEnabled:YES];
331
 
    [o_t2_btn_chooseFile setEnabled:YES];
332
 
    [o_t2_tbl_plst setEnabled:NO];
333
 
 
334
 
    /* "Streaming 1" */
335
 
    [o_t3_fld_address setStringValue: @""];
336
 
    [o_t3_matrix_stmgMhd selectCellAtRow:0 column:0];
337
 
    [[o_t3_matrix_stmgMhd cellAtRow:0 column:1] setState: NSOffState];
338
 
    [[o_t3_matrix_stmgMhd cellAtRow:1 column:1] setState: NSOffState];
339
 
    [[o_t3_matrix_stmgMhd cellAtRow:1 column:2] setState: NSOffState];
340
 
 
341
 
    /* "Transcode 1" */
342
 
    [o_t4_ckb_audio setState: NSOffState];
343
 
    [o_t4_ckb_video setState: NSOffState];
344
 
    [self t4_enblVidTrnscd:nil];
345
 
    [self t4_enblAudTrnscd:nil];
346
 
 
347
 
    /* "Streaming 2" */
348
 
    [o_t6_fld_ttl setStringValue: @"1"];
349
 
    [o_t6_ckb_sap setState: NSOffState];
350
 
    [self t6_enblSapAnnce:nil];
351
 
 
352
 
    /* "Transcode 2" */
353
 
    [o_t7_fld_filePath setStringValue: @""];
354
311
}
355
312
 
356
313
- (void)initStrings
366
323
 
367
324
    /* page one ("Hello") */
368
325
    [o_t1_txt_title setStringValue: _NS("Streaming/Transcoding Wizard")];
369
 
    [o_t1_txt_text setStringValue: _NS("This wizard allows to configure " \
 
326
    [o_t1_txt_text setStringValue: _NS("This wizard allows to configure "
370
327
        "simple streaming or transcoding setups.")];
371
328
    [o_t1_btn_mrInfo_strmg setTitle: _NS("More Info")];
372
329
    [o_t1_btn_mrInfo_trnscd setTitle: _NS("More Info")];
373
 
    [o_t1_txt_notice setStringValue: _NS("This wizard only gives access to " \
374
 
        "a small subset of VLC's streaming and transcoding capabilities. " \
375
 
        "The Open and 'Saving/Streaming' dialogs will give access to more " \
 
330
    [o_t1_txt_notice setStringValue: _NS("This wizard only gives access to "
 
331
        "a small subset of VLC's streaming and transcoding capabilities. "
 
332
        "The Open and 'Saving/Streaming' dialogs will give access to more "
376
333
        "features.")];
377
 
    [[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle: _NS("Stream " \
378
 
        "to network")];
379
 
    [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setTitle: _NS("" \
380
 
        "Transcode/Save to file")];
 
334
    [[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle: 
 
335
        _NS("Stream to network")];
 
336
    [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setTitle: 
 
337
        _NS("Transcode/Save to file")];
381
338
 
382
339
    /* page two ("Input") */
383
340
    [o_t2_title setStringValue: _NS("Choose input")];
384
341
    [o_t2_text setStringValue: _NS("Choose here your input stream.")];
385
 
    [[o_t2_matrix_inputSourceType cellAtRow:0 column:0] setTitle:  \
 
342
    [[o_t2_matrix_inputSourceType cellAtRow:0 column:0] setTitle:
386
343
        _NS("Select a stream")];
387
 
    [[o_t2_matrix_inputSourceType cellAtRow:1 column:0] setTitle: \
 
344
    [[o_t2_matrix_inputSourceType cellAtRow:1 column:0] setTitle:
388
345
        _NS("Existing playlist item")];
389
346
    [o_t2_btn_chooseFile setTitle: _NS("Choose...")];
390
 
    [[[o_t2_tbl_plst tableColumnWithIdentifier:@"1"] headerCell] \
 
347
    [[[o_t2_tbl_plst tableColumnWithIdentifier:@"1"] headerCell]
391
348
        setStringValue: _NS("Title")];
392
 
    [[[o_t2_tbl_plst tableColumnWithIdentifier:@"2"] headerCell] \
 
349
    [[[o_t2_tbl_plst tableColumnWithIdentifier:@"2"] headerCell]
393
350
        setStringValue: _NS("Author")];
394
351
    [o_t2_box_prtExtrct setTitle: _NS("Partial Extract")];
395
352
    [o_t2_ckb_enblPartExtrct setTitle: _NS("Enable")];
396
 
    [o_t2_ckb_enblPartExtrct setToolTip: _NS("This can be used to read only a "\
397
 
        "part of the stream. It must be possible to control the incoming "\
398
 
        "stream (for example, a file or a disc, but not an UDP network stream.) " \
 
353
    [o_t2_ckb_enblPartExtrct setToolTip: _NS("This can be used to read only a "
 
354
        "part of the stream. It must be possible to control the incoming "
 
355
        "stream (for example, a file or a disc, but not an UDP network stream.) "
399
356
        "The starting and ending times can be given in seconds.")];
400
357
    [o_t2_txt_prtExtrctFrom setStringValue: _NS("From")];
401
358
    [o_t2_txt_prtExtrctTo setStringValue: _NS("To")];
402
359
 
403
360
    /* page three ("Streaming 1") */
404
361
    [o_t3_txt_title setStringValue: _NS("Streaming")];
405
 
    [o_t3_txt_text setStringValue: _NS("This page allows to select how " \
 
362
    [o_t3_txt_text setStringValue: _NS("This page allows to select how "
406
363
        "the input stream will be sent.")];
407
364
    [o_t3_box_dest setTitle: _NS("Destination")];
408
365
    [o_t3_box_strmgMthd setTitle: _NS("Streaming method")];
409
 
    [o_t3_txt_destInfo setStringValue: _NS("Address of the computer " \
 
366
    [o_t3_txt_destInfo setStringValue: _NS("Address of the computer "
410
367
        "to stream to.")];
411
368
    [[o_t3_matrix_stmgMhd cellAtRow:0 column:0] setTitle: _NS("UDP Unicast")];
412
369
    [[o_t3_matrix_stmgMhd cellAtRow:0 column:1] setTitle: _NS("UDP Multicast")];
413
 
    [o_t3_txt_strgMthdInfo setStringValue: _NS("Use this to stream to a single " \
 
370
    [o_t3_txt_strgMthdInfo setStringValue: _NS("Use this to stream to a single "
414
371
        "computer.")];
415
372
 
416
373
    /* page four ("Transcode 1") */
417
374
    [o_t4_title setStringValue: _NS("Transcode")];
418
 
    [o_t4_text setStringValue: _NS("This page allows to change the compression " \
419
 
        "format of the audio or video tracks. To change only " \
 
375
    [o_t4_text setStringValue: _NS("This page allows to change the compression "
 
376
        "format of the audio or video tracks. To change only "
420
377
        "the container format, proceed to next page.")];
421
378
    [o_t4_box_audio setTitle: _NS("Audio")];
422
379
    [o_t4_box_video setTitle: _NS("Video")];
431
388
 
432
389
    /* page five ("Encap") */
433
390
    [o_t5_title setStringValue: _NS("Encapsulation format")];
434
 
    [o_t5_text setStringValue: _NS("This page allows to select how the " \
 
391
    [o_t5_text setStringValue: _NS("This page allows to select how the "
435
392
        "stream will be encapsulated. Depending on previously chosen settings "
436
393
        "all formats won't be available.")];
437
394
 
438
395
    /* page six ("Streaming 2") */
439
396
    [o_t6_title setStringValue: _NS("Additional streaming options")];
440
 
    [o_t6_text setStringValue: _NS("In this page, a few " \
 
397
    [o_t6_text setStringValue: _NS("In this page, a few "
441
398
                              "additional streaming parameters can be set.")];
442
399
    [o_t6_txt_ttl setStringValue: _NS("Time-To-Live (TTL)")];
443
400
    [o_t6_btn_mrInfo_ttl setTitle: _NS("More Info")];
445
402
    [o_t6_btn_mrInfo_sap setTitle: _NS("More Info")];
446
403
    [o_t6_ckb_local setTitle: _NS("Local playback")];
447
404
    [o_t6_btn_mrInfo_local setTitle: _NS("More Info")];
448
 
    [o_t6_ckb_soverlay setTitle: _NS("Add subtitles to transcoded video")];
 
405
    [o_t6_ckb_soverlay setTitle: _NS("Add Subtitles to transcoded video")];
449
406
 
450
407
    /* page seven ("Transcode 2") */
451
408
    [o_t7_title setStringValue: _NS("Additional transcode options")];
452
 
    [o_t7_text setStringValue: _NS("In this page, a few " \
 
409
    [o_t7_text setStringValue: _NS("In this page, a few "
453
410
                              "additional transcoding parameters can be set.")];
454
411
    [o_t7_txt_saveFileTo setStringValue: _NS("Select the file to save to")];
455
412
    [o_t7_btn_chooseFile setTitle: _NS("Choose...")];
456
413
    [o_t7_ckb_local setTitle: _NS("Local playback")];
457
 
    [o_t7_ckb_soverlay setTitle: _NS("Add subtitles to transcoded video")];
458
 
    [o_t7_ckb_soverlay setToolTip: _NS("Adds available subtitles directly to " \
459
 
                                       "the video. These cannot be disabled " \
460
 
                                       "by the receiving user as they become " \
 
414
    [o_t7_ckb_soverlay setTitle: _NS("Add Subtitles to transcoded video")];
 
415
    [o_t7_ckb_soverlay setToolTip: _NS("Adds available subtitles directly to "
 
416
                                       "the video. These cannot be disabled "
 
417
                                       "by the receiving user as they become "
461
418
                                       "part of the image.")];
462
419
    [o_t7_btn_mrInfo_local setTitle: _NS("More Info")];
463
420
 
464
421
    /* page eight ("Summary") */
465
 
    [o_t8_txt_text setStringValue: _NS("This page lists all the settings." \
 
422
    [o_t8_txt_text setStringValue: _NS("This page lists all the settings."
466
423
        "Click \"Finish\" to start streaming or transcoding.")];
467
424
    [o_t8_txt_title setStringValue: _NS("Summary")];
468
 
    [o_t8_txt_destination setStringValue: [_NS("Destination") \
469
 
        stringByAppendingString: @":"]];
470
 
    [o_t8_txt_encapFormat setStringValue: [_NS("Encap. format") \
471
 
        stringByAppendingString: @":"]];
472
 
    [o_t8_txt_inputStream setStringValue: [_NS("Input stream") \
473
 
        stringByAppendingString: @":"]];
474
 
    [o_t8_txt_partExtract setStringValue: [_NS("Partial Extract") \
475
 
        stringByAppendingString: @":"]];
476
 
    [o_t8_txt_sap setStringValue: [_NS("SAP Announce") \
477
 
        stringByAppendingString: @":"]];
478
 
    [o_t8_txt_saveFileTo setStringValue: [_NS("Save file to") \
479
 
        stringByAppendingString: @":"]];
480
 
    [o_t8_txt_strmgMthd setStringValue: [_NS("Streaming method") \
481
 
        stringByAppendingString: @":"]];
482
 
    [o_t8_txt_trnscdAudio setStringValue: [_NS("Transcode audio") \
483
 
        stringByAppendingString: @":"]];
484
 
    [o_t8_txt_trnscdVideo setStringValue: [_NS("Transcode video") \
485
 
        stringByAppendingString: @":"]];
486
 
    [o_t8_txt_soverlay setStringValue: [_NS("Include subtitles") \
487
 
        stringByAppendingString: @":"]];
488
 
    [o_t8_txt_local setStringValue: [_NS("Local playback") \
 
425
    [o_t8_txt_destination setStringValue: [_NS("Destination")
 
426
        stringByAppendingString: @":"]];
 
427
    [o_t8_txt_encapFormat setStringValue: [_NS("Encap. format")
 
428
        stringByAppendingString: @":"]];
 
429
    [o_t8_txt_inputStream setStringValue: [_NS("Input stream")
 
430
        stringByAppendingString: @":"]];
 
431
    [o_t8_txt_partExtract setStringValue: [_NS("Partial Extract")
 
432
        stringByAppendingString: @":"]];
 
433
    [o_t8_txt_sap setStringValue: [_NS("SAP Announce")
 
434
        stringByAppendingString: @":"]];
 
435
    [o_t8_txt_saveFileTo setStringValue: [_NS("Save file to")
 
436
        stringByAppendingString: @":"]];
 
437
    [o_t8_txt_strmgMthd setStringValue: [_NS("Streaming method")
 
438
        stringByAppendingString: @":"]];
 
439
    [o_t8_txt_trnscdAudio setStringValue: [_NS("Transcode audio")
 
440
        stringByAppendingString: @":"]];
 
441
    [o_t8_txt_trnscdVideo setStringValue: [_NS("Transcode video")
 
442
        stringByAppendingString: @":"]];
 
443
    [o_t8_txt_soverlay setStringValue: [_NS("Include subtitles")
 
444
        stringByAppendingString: @":"]];
 
445
    [o_t8_txt_local setStringValue: [_NS("Local playback")
489
446
        stringByAppendingString: @":"]];
490
447
}
491
448
 
492
 
- (void)initWithExtractValuesFrom: (NSString *)from to: (NSString *)to \
493
 
    ofItem: (NSString *)item
 
449
- (void)initWithExtractValuesFrom: (NSString *)from 
 
450
                               to: (NSString *)to
 
451
                           ofItem: (NSString *)item
494
452
{
495
453
    [self resetWizard];
496
454
    msg_Dbg(VLCIntf, "wizard was reseted");
505
463
    [o_t2_ckb_enblPartExtrct setState: NSOnState];
506
464
    [self t2_enableExtract: nil];
507
465
    msg_Dbg(VLCIntf, "wizard interface is set");
508
 
    
 
466
 
509
467
    [o_wizard_window center];
510
468
    [o_wizard_window display];
511
469
    [o_wizard_window makeKeyAndOrderFront:nil];
553
511
        if ([o_t2_ckb_enblPartExtrct state] == NSOnState)
554
512
        {
555
513
            [o_userSelections setObject:@"YES" forKey:@"partExtract"];
556
 
            [o_userSelections setObject:[o_t2_fld_prtExtrctFrom stringValue] \
 
514
            [o_userSelections setObject:[o_t2_fld_prtExtrctFrom stringValue]
557
515
                forKey:@"partExtractFrom"];
558
 
            [o_userSelections setObject:[o_t2_fld_prtExtrctTo stringValue] \
 
516
            [o_userSelections setObject:[o_t2_fld_prtExtrctTo stringValue]
559
517
                forKey:@"partExtractTo"];
560
518
        }else{
561
519
            [o_userSelections setObject:@"NO" forKey:@"partExtract"];
591
549
                NSMutableArray * tempArray = [[NSMutableArray alloc] init];
592
550
                while( x != y )
593
551
                {
594
 
                    playlist_item_t *p_item = 
595
 
                        [[o_t2_tbl_plst itemAtRow: 
596
 
                            [[o_t2_tbl_plst selectedRowIndexes] 
 
552
                    playlist_item_t *p_item =
 
553
                        [[o_t2_tbl_plst itemAtRow:
 
554
                            [[o_t2_tbl_plst selectedRowIndexes]
597
555
                            indexGreaterThanOrEqualToIndex: x]] pointerValue];
598
556
 
599
557
                    if( p_item->i_children <= 0 )
600
558
                    {
 
559
                        char *psz_uri = input_item_GetURI( p_item->p_input );
601
560
                        [tempArray addObject: [NSString stringWithUTF8String:
602
 
                        p_item->input.psz_uri]];
 
561
                        psz_uri]];
 
562
                        free( psz_uri );
603
563
                        stop = NO;
604
564
                    }
605
565
                    else
620
580
        /* show either "Streaming 1" or "Transcode 1" to the user */
621
581
        if (stop == NO)
622
582
        {
623
 
            if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] \
 
583
            if ([[o_userSelections objectForKey:@"trnscdOrStrmg"]
624
584
                isEqualToString:@"strmg"])
625
585
            {
626
586
                /* we are streaming */
635
595
            }
636
596
        } else {
637
597
            /* show a sheet that the user didn't select a file */
638
 
            NSBeginInformationalAlertSheet(_NS("No input selected"), \
639
 
                _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
640
 
                _NS("No new stream or valid playlist item has been selected.\n\n" \
 
598
            NSBeginInformationalAlertSheet(_NS("No input selected"),
 
599
                _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
 
600
                _NS("No new stream or valid playlist item has been selected.\n\n"
641
601
                "Choose one before going to the next page."));
642
602
        }
643
603
    }
644
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
604
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
645
605
        @"Streaming 1"])
646
606
    {
647
607
        /* rebuild the menues for the codec-selections */
648
608
        [self rebuildCodecMenus];
649
 
        
 
609
 
650
610
        /* check which streaming method is selected and store it */
651
611
        int mode;
652
612
        mode = [[o_t3_matrix_stmgMhd selectedCell] tag];
659
619
             * OGG, RAW or ASF */
660
620
            [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
661
621
            [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating point"];
662
 
            
 
622
 
663
623
        } else if ( mode == 1 )
664
624
        {
665
625
            /* MMS Streaming */
666
626
            [o_userSelections setObject:@"1" forKey:@"stmgMhd"];
667
 
            
 
627
 
668
628
            /* disable all codecs which don't support ASF / ASFH */
669
629
            [o_t4_pop_audioCodec removeItemWithTitle:@"MPEG 4 Audio"];
670
630
            [o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"];
672
632
            [o_t4_pop_audioCodec removeItemWithTitle:@"Speex"];
673
633
            [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
674
634
            [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating point"];
675
 
            
 
635
 
676
636
            [o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-1 Video"];
677
637
            [o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-2 Video"];
678
638
            [o_t4_pop_videoCodec removeItemWithTitle:@"H.263"];
681
641
            [o_t4_pop_videoCodec removeItemWithTitle:@"Theora"];
682
642
        } else {
683
643
            /* RTP/UDP Unicast/Multicast Streaming */
684
 
            [o_userSelections setObject: [[NSNumber numberWithInt: mode] \
 
644
            [o_userSelections setObject: [[NSNumber numberWithInt: mode]
685
645
                stringValue] forKey:@"stmgMhd"];
686
 
            
 
646
 
687
647
            /* disable all codecs which don't support MPEG-TS */
688
648
            [o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"];
689
649
            [o_t4_pop_audioCodec removeItemWithTitle:@"FLAC"];
699
659
            if( [[o_t3_fld_address stringValue] isEqualToString: @""] )
700
660
            {
701
661
                /* complain to the user that "" is no valid dest. */
702
 
                NSBeginInformationalAlertSheet(_NS("No valid destination"), \
703
 
                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
704
 
                    _NS("A valid destination has to be selected "\
705
 
                    "Enter either a Unicast-IP or a Multicast-IP." \
706
 
                    "\n\nIf you don't know what this means, have a look at " \
707
 
                    "the VLC Streaming HOWTO and the help texts in this " \
 
662
                NSBeginInformationalAlertSheet(_NS("No valid destination"),
 
663
                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
 
664
                    _NS("A valid destination has to be selected "
 
665
                    "Enter either a Unicast-IP or a Multicast-IP."
 
666
                    "\n\nIf you don't know what this means, have a look at "
 
667
                    "the VLC Streaming HOWTO and the help texts in this "
708
668
                    "window."));
709
669
            } else {
710
670
                /* FIXME: check whether the entered IP is really valid */
711
 
                [o_userSelections setObject:[o_t3_fld_address stringValue] \
 
671
                [o_userSelections setObject:[o_t3_fld_address stringValue]
712
672
                    forKey:@"stmgDest"];
713
673
                /* let's go to the transcode-1-tab */
714
674
                [o_tab_pageHolder selectTabViewItemAtIndex:3];
715
675
            }
716
676
        } else {
717
 
            [o_userSelections setObject:[o_t3_fld_address stringValue] \
 
677
            [o_userSelections setObject:[o_t3_fld_address stringValue]
718
678
                forKey:@"stmgDest"];
719
679
            /* let's go to the transcode-1-tab */
720
680
            [o_tab_pageHolder selectTabViewItemAtIndex:3];
721
681
        }
722
682
    }
723
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
683
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
724
684
        @"Transcode 1"])
725
685
    {
726
 
        /* check whether the user wants to transcode the video-track and store 
 
686
        /* check whether the user wants to transcode the video-track and store
727
687
         * the related options */
728
688
        if ([o_t4_ckb_video state] == NSOnState)
729
689
        {
730
690
            NSNumber * theNum;
731
691
            theNum = [NSNumber numberWithInt:[o_t4_pop_videoCodec indexOfSelectedItem]];
732
692
            [o_userSelections setObject:@"YES" forKey:@"trnscdVideo"];
733
 
            [o_userSelections setObject:[o_t4_pop_videoBitrate titleOfSelectedItem] \
 
693
            [o_userSelections setObject:[o_t4_pop_videoBitrate titleOfSelectedItem]
734
694
                forKey:@"trnscdVideoBitrate"];
735
695
            [o_userSelections setObject:theNum forKey:@"trnscdVideoCodec"];
736
696
        } else {
737
697
            [o_userSelections setObject:@"NO" forKey:@"trnscdVideo"];
738
698
        }
739
699
 
740
 
        /* check whether the user wants to transcode the audio-track and store 
 
700
        /* check whether the user wants to transcode the audio-track and store
741
701
         * the related options */
742
702
        if ([o_t4_ckb_audio state] == NSOnState)
743
703
        {
744
704
            NSNumber * theNum;
745
705
            theNum = [NSNumber numberWithInt:[o_t4_pop_audioCodec indexOfSelectedItem]];
746
706
            [o_userSelections setObject:@"YES" forKey:@"trnscdAudio"];
747
 
            [o_userSelections setObject:[o_t4_pop_audioBitrate titleOfSelectedItem] \
 
707
            [o_userSelections setObject:[o_t4_pop_audioBitrate titleOfSelectedItem]
748
708
                forKey:@"trnscdAudioBitrate"];
749
709
            [o_userSelections setObject:theNum forKey:@"trnscdAudioCodec"];
750
710
        } else {
773
733
            if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualTo: @"YES"])
774
734
            {
775
735
                /* we are transcoding both audio and video, so we need to check both deps */
776
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
736
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
777
737
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_PS"])
778
738
                {
779
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections \
780
 
                        objectForKey:@"trnscdAudioCodec"] intValue]] \
 
739
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections
 
740
                        objectForKey:@"trnscdAudioCodec"] intValue]]
781
741
                        containsObject: @"MUX_PS"])
782
742
                    {
783
743
                        [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];
784
744
                        [o_t5_matrix_encap selectCellAtRow:0 column:0];
785
745
                    }
786
746
                }
787
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections \
 
747
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections
788
748
                    objectForKey:@"trnscdVideoCodec"] intValue]] containsObject: @"MUX_TS"])
789
749
                {
790
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
750
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
791
751
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_TS"])
792
752
                    {
793
753
                        [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
794
754
                        [o_t5_matrix_encap selectCellAtRow:1 column:0];
795
755
                    }
796
756
                }
797
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
757
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
798
758
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MPEG"])
799
759
                {
800
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
760
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
801
761
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MPEG"])
802
762
                    {
803
763
                        [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];
804
764
                        [o_t5_matrix_encap selectCellAtRow:2 column:0];
805
765
                    }
806
766
                }
807
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
767
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
808
768
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_OGG"])
809
769
                {
810
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections \
 
770
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections
811
771
                        objectForKey:@"trnscdAudioCodec"] intValue]] containsObject: @"MUX_OGG"])
812
772
                    {
813
773
                        [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];
814
774
                        [o_t5_matrix_encap selectCellAtRow:3 column:0];
815
775
                    }
816
776
                }
817
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
777
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
818
778
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_RAW"])
819
779
                {
820
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
780
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
821
781
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_RAW"])
822
782
                    {
823
783
                        [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];
824
784
                        [o_t5_matrix_encap selectCellAtRow:4 column:0];
825
785
                    }
826
786
                }
827
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
787
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
828
788
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_ASF"])
829
789
                {
830
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
790
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
831
791
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_ASF"])
832
792
                    {
833
793
                        [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];
834
794
                        [o_t5_matrix_encap selectCellAtRow:5 column:0];
835
795
                    }
836
796
                }
837
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
797
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
838
798
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_AVI"])
839
799
                {
840
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
800
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
841
801
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_AVI"])
842
802
                    {
843
803
                        [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];
844
804
                        [o_t5_matrix_encap selectCellAtRow:6 column:0];
845
805
                    }
846
806
                }
847
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
807
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
848
808
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MP4"])
849
809
                {
850
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
810
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
851
811
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MP4"])
852
812
                    {
853
813
                        [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];
854
814
                        [o_t5_matrix_encap selectCellAtRow:7 column:0];
855
815
                    }
856
816
                }
857
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
817
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
858
818
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MOV"])
859
819
                {
860
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
820
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
861
821
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MOV"])
862
822
                    {
863
823
                        [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];
864
824
                        [o_t5_matrix_encap selectCellAtRow:8 column:0];
865
825
                    }
866
826
                }
867
 
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
827
                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
868
828
                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_WAV"])
869
829
                {
870
 
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
830
                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
871
831
                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_WAV"])
872
832
                    {
873
833
                        [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:YES];
880
840
                /* we just transcoding the audio */
881
841
 
882
842
                /* select formats supported by the audio codec */
883
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
843
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
884
844
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_PS"])
885
845
                {
886
846
                    [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];
887
847
                    [o_t5_matrix_encap selectCellAtRow:0 column:0];
888
848
                }
889
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
849
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
890
850
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_TS"])
891
851
                {
892
852
                    [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
893
853
                    [o_t5_matrix_encap selectCellAtRow:1 column:0];
894
854
                }
895
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
855
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
896
856
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MPEG"])
897
857
                {
898
858
                    [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];
899
859
                    [o_t5_matrix_encap selectCellAtRow:2 column:0];
900
860
                }
901
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
861
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
902
862
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_OGG"])
903
863
                {
904
864
                    [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];
905
865
                    [o_t5_matrix_encap selectCellAtRow:3 column:0];
906
866
                }
907
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
867
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
908
868
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_RAW"])
909
869
                {
910
870
                    [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];
911
871
                    [o_t5_matrix_encap selectCellAtRow:4 column:0];
912
872
                }
913
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
873
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
914
874
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_ASF"])
915
875
                {
916
876
                    [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];
917
877
                    [o_t5_matrix_encap selectCellAtRow:5 column:0];
918
878
                }
919
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
879
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
920
880
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_AVI"])
921
881
                {
922
882
                    [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];
923
883
                    [o_t5_matrix_encap selectCellAtRow:6 column:0];
924
884
                }
925
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
885
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
926
886
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MP4"])
927
887
                {
928
888
                    [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];
929
889
                    [o_t5_matrix_encap selectCellAtRow:7 column:0];
930
890
                }
931
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
891
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
932
892
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MOV"])
933
893
                {
934
894
                    [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];
935
895
                    [o_t5_matrix_encap selectCellAtRow:8 column:0];
936
896
                }
937
 
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
897
                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
938
898
                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_WAV"])
939
899
                {
940
900
                    [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:YES];
948
908
 
949
909
            /* select formats supported by the video-codec */
950
910
 
951
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
911
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
952
912
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_PS"])
953
913
            {
954
914
                [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];
955
915
                [o_t5_matrix_encap selectCellAtRow:0 column:0];
956
916
            }
957
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
917
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
958
918
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_TS"])
959
919
            {
960
920
                [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
961
921
                [o_t5_matrix_encap selectCellAtRow:1 column:0];
962
922
            }
963
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
923
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
964
924
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MPEG"])
965
925
            {
966
926
                [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];
967
927
                [o_t5_matrix_encap selectCellAtRow:2 column:0];
968
928
            }
969
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
929
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
970
930
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_OGG"])
971
931
            {
972
932
                [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];
973
933
                [o_t5_matrix_encap selectCellAtRow:3 column:0];
974
934
            }
975
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
935
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
976
936
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_RAW"])
977
937
            {
978
938
                [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];
979
939
                [o_t5_matrix_encap selectCellAtRow:4 column:0];
980
940
            }
981
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
941
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
982
942
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_ASF"])
983
943
            {
984
944
                [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];
985
945
                [o_t5_matrix_encap selectCellAtRow:5 column:0];
986
946
            }
987
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
947
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
988
948
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_AVI"])
989
949
            {
990
950
                [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];
991
951
                [o_t5_matrix_encap selectCellAtRow:6 column:0];
992
952
            }
993
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
953
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
994
954
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MP4"])
995
955
            {
996
956
                [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];
997
957
                [o_t5_matrix_encap selectCellAtRow:7 column:0];
998
958
            }
999
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
959
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
1000
960
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MOV"])
1001
961
            {
1002
962
                [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];
1003
963
                [o_t5_matrix_encap selectCellAtRow:8 column:0];
1004
964
            }
1005
 
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
965
            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
1006
966
                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_WAV"])
1007
967
            {
1008
968
                [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:YES];
1013
973
             * -> enabled the encap-formats allowed when streaming content via
1014
974
             * http plus MP4 since this should work fine in most cases */
1015
975
 
1016
 
            /* FIXME: choose a selection of encap-formats based upon the 
 
976
            /* FIXME: choose a selection of encap-formats based upon the
1017
977
             * actually used codecs */
1018
978
 
1019
979
            /* enable MPEG PS, MPEG TS, MPEG 1, OGG, RAW, ASF, MP4 and MOV
1092
1052
            [o_tab_pageHolder selectTabViewItemAtIndex:4];
1093
1053
        } else {
1094
1054
            /* show a sheet that the selected codecs are not compatible */
1095
 
            NSBeginInformationalAlertSheet(_NS("Invalid selection"), _NS("OK"), \
1096
 
                @"", @"", o_wizard_window, nil, nil, nil, nil, _NS("The " \
1097
 
                "chosen codecs are not compatible with each other. For example: " \
1098
 
                "It is impossibleto  mix uncompressed audio with any video codec.\n\n" \
 
1055
            NSBeginInformationalAlertSheet(_NS("Invalid selection"), _NS("OK"),
 
1056
                @"", @"", o_wizard_window, nil, nil, nil, nil, _NS("The "
 
1057
                "chosen codecs are not compatible with each other. For example: "
 
1058
                "It is impossibleto  mix uncompressed audio with any video codec.\n\n"
1099
1059
                "Correct your selection and try again."));
1100
1060
        }
1101
1061
 
1119
1079
             * select a folder instead of a localtion for a single item */
1120
1080
            if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
1121
1081
            {
1122
 
                [o_t7_txt_saveFileTo setStringValue: 
 
1082
                [o_t7_txt_saveFileTo setStringValue:
1123
1083
                    _NS("Select the directory to save to")];
1124
1084
            }
1125
1085
            else
1126
1086
            {
1127
 
                [o_t7_txt_saveFileTo setStringValue: 
 
1087
                [o_t7_txt_saveFileTo setStringValue:
1128
1088
                    _NS("Select the file to save to")];
1129
1089
            }
1130
1090
        }
1131
1091
    }
1132
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1092
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1133
1093
        @"Streaming 2"])
1134
1094
    {
1135
1095
        /* store the chosen TTL */
1143
1103
        } else {
1144
1104
            [o_userSelections setObject:@"NO" forKey:@"sap"];
1145
1105
        }
1146
 
        
 
1106
 
1147
1107
        /* local playback? */
1148
1108
        if ([o_t6_ckb_local state] == NSOnState)
1149
1109
        {
1151
1111
        } else {
1152
1112
            [o_userSelections setObject:@"NO" forKey:@"localPb"];
1153
1113
        }
1154
 
        
 
1114
 
1155
1115
        /* include subtitles? */
1156
 
        [o_userSelections setObject: 
 
1116
        [o_userSelections setObject:
1157
1117
            [[NSNumber numberWithInt:[o_t6_ckb_soverlay state]] stringValue]
1158
1118
                             forKey: @"soverlay"];
1159
 
        
 
1119
 
1160
1120
        /* go to "Summary" */
1161
1121
        [self showSummary];
1162
1122
    }
1163
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1123
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1164
1124
        @"Transcode 2"])
1165
1125
    {
1166
1126
        /* local playback? */
1176
1136
        {
1177
1137
            /* complain to the user that "" is no valid path for a folder/file */
1178
1138
            if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
1179
 
                NSBeginInformationalAlertSheet(_NS("No folder selected"), \
1180
 
                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
 
1139
                NSBeginInformationalAlertSheet(_NS("No folder selected"),
 
1140
                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
1181
1141
                    [NSString stringWithFormat: @"%@\n\n%@", _NS("A directory "
1182
1142
                    "where to save the files has to be selected."),
1183
 
                    _NS("Enter either a valid path or use the \"Choose...\" " \
 
1143
                    _NS("Enter either a valid path or use the \"Choose...\" "
1184
1144
                    "button to select a location.")]);
1185
1145
            else
1186
 
                NSBeginInformationalAlertSheet(_NS("No file selected"), \
1187
 
                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
1188
 
                    [NSString stringWithFormat: @"%@\n\n%@", _NS("A file " \
 
1146
                NSBeginInformationalAlertSheet(_NS("No file selected"),
 
1147
                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
 
1148
                    [NSString stringWithFormat: @"%@\n\n%@", _NS("A file "
1189
1149
                    "where to save the stream has to be selected."),
1190
 
                    _NS("Enter either a valid path or use the \"Choose\" " \
 
1150
                    _NS("Enter either a valid path or use the \"Choose\" "
1191
1151
                    "button to select a location.")]);
1192
1152
        } else {
1193
1153
            /* create a string containing the requested suffix for later usage */
1194
1154
            NSString * theEncapFormat = [[o_encapFormats objectAtIndex:
1195
 
                [[o_userSelections objectForKey:@"encapFormat"] intValue]] \
 
1155
                [[o_userSelections objectForKey:@"encapFormat"] intValue]]
1196
1156
                objectAtIndex:0];
1197
1157
            if( theEncapFormat == @"ps" )
1198
1158
                theEncapFormat = @"mpg";
1208
1168
                while( x != y )
1209
1169
                {
1210
1170
                    NSString * fileNameToUse;
1211
 
                    /* check whether the extension is hidden or not. 
 
1171
                    /* check whether the extension is hidden or not.
1212
1172
                     * if not, remove it
1213
1173
                     * we need the casting to make GCC4 happy */
1214
 
                    if( (int)[[[NSFileManager defaultManager] fileAttributesAtPath: \
1215
 
                        [[o_userSelections objectForKey:@"pathToStrm"] \
1216
 
                        objectAtIndex: x] traverseLink: NO] objectForKey: \
1217
 
                        NSFileExtensionHidden] == YES )
 
1174
                    if( [[[NSFileManager defaultManager] fileAttributesAtPath:
 
1175
                        [[o_userSelections objectForKey:@"pathToStrm"]
 
1176
                        objectAtIndex: x] traverseLink: NO] objectForKey:
 
1177
                        NSFileExtensionHidden] )
1218
1178
                        fileNameToUse = [NSString stringWithString:
1219
1179
                            [[NSFileManager defaultManager] displayNameAtPath:
1220
1180
                            [[o_userSelections objectForKey:@"pathToStrm"]
1222
1182
                    else
1223
1183
                    {
1224
1184
                        int z = 0;
1225
 
                        int count = [[[[NSFileManager defaultManager] \
1226
 
                            displayNameAtPath: \
1227
 
                            [[o_userSelections objectForKey:@"pathToStrm"] \
1228
 
                            objectAtIndex: x]] \
 
1185
                        int count = [[[[NSFileManager defaultManager]
 
1186
                            displayNameAtPath:
 
1187
                            [[o_userSelections objectForKey:@"pathToStrm"]
 
1188
                            objectAtIndex: x]]
1229
1189
                            componentsSeparatedByString: @"."] count];
1230
1190
                        fileNameToUse = @"";
1231
1191
                        while( z < (count - 1) )
1232
1192
                        {
1233
1193
                            fileNameToUse = [fileNameToUse stringByAppendingString:
1234
 
                                [[[[NSFileManager defaultManager] \
1235
 
                                displayNameAtPath: \
1236
 
                                [[o_userSelections objectForKey:@"pathToStrm"] \
1237
 
                                objectAtIndex: x]] \
1238
 
                                componentsSeparatedByString: @"."] \
 
1194
                                [[[[NSFileManager defaultManager]
 
1195
                                displayNameAtPath:
 
1196
                                [[o_userSelections objectForKey:@"pathToStrm"]
 
1197
                                objectAtIndex: x]]
 
1198
                                componentsSeparatedByString: @"."]
1239
1199
                                objectAtIndex: z]];
1240
1200
                            z += 1;
1241
1201
                        }
1243
1203
                    tempString = [NSString stringWithFormat: @"%@%@.%@",
1244
1204
                        [o_t7_fld_filePath stringValue],
1245
1205
                        fileNameToUse, theEncapFormat];
1246
 
                    if( [[NSFileManager defaultManager] fileExistsAtPath: \
 
1206
                    if( [[NSFileManager defaultManager] fileExistsAtPath:
1247
1207
                        tempString] )
1248
1208
                    {
1249
1209
                        /* we don't wanna overwrite existing files, so add an
1254
1214
                            tempString = [NSString stringWithFormat:@"%@%@ %i.%@",
1255
1215
                                [o_t7_fld_filePath stringValue],
1256
1216
                                fileNameToUse, additionalInt, theEncapFormat];
1257
 
                            if(! [[NSFileManager defaultManager] \
 
1217
                            if(! [[NSFileManager defaultManager]
1258
1218
                                fileExistsAtPath: tempString] )
1259
1219
                                break;
1260
1220
                            additionalInt += 1;
1261
1221
                        }
1262
1222
                        if( additionalInt >= 100 )
1263
 
                            msg_Err( VLCIntf, "Files with the same name are " \
1264
 
                                "already present in the destination directory. " \
 
1223
                            msg_Err( VLCIntf, "Files with the same name are "
 
1224
                                "already present in the destination directory. "
1265
1225
                                "Delete these files or choose a different directory." );
1266
1226
                    }
1267
1227
                    [tempArray addObject: [tempString retain]];
1277
1237
                /* we don't need to check for existing items because Cocoa
1278
1238
                 * does that already when we are asking the user for a location
1279
1239
                 * to save her file */
1280
 
                [o_userSelections setObject: [NSArray arrayWithObject: \
 
1240
                [o_userSelections setObject: [NSArray arrayWithObject:
1281
1241
                    [o_t7_fld_filePath stringValue]] forKey: @"trnscdFilePath"];
1282
1242
            }
1283
1243
 
1284
1244
            /* include subtitles ? */
1285
 
            [o_userSelections setObject: 
 
1245
            [o_userSelections setObject:
1286
1246
                [[NSNumber numberWithInt:[o_t7_ckb_soverlay state]] stringValue]
1287
1247
                                 forKey: @"soverlay"];
1288
 
            
 
1248
 
1289
1249
            /* go to "Summary" */
1290
1250
            [self showSummary];
1291
1251
        }
1292
1252
    }
1293
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1253
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1294
1254
        @"Summary"])
1295
1255
    {
1296
1256
        intf_thread_t * p_intf = VLCIntf;
1297
1257
 
1298
 
        playlist_t * p_playlist = (playlist_t *)vlc_object_find( p_intf,
1299
 
                            VLC_OBJECT_PLAYLIST, FIND_ANYWHERE);
1300
 
        if( p_playlist )
 
1258
        playlist_t * p_playlist = pl_Yield( p_intf );
 
1259
 
 
1260
        int x = 0;
 
1261
        int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
 
1262
        while( x != y )
1301
1263
        {
1302
 
            int x = 0;
1303
 
            int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
1304
 
            while( x != y )
1305
 
            {
1306
 
                /* we need a temp. variable here to work-around a GCC4-bug */
1307
 
                NSString *tempString = [NSString stringWithFormat: \
1308
 
                    @"%@ (%i/%i)", _NS("Streaming/Transcoding Wizard"), \
1309
 
                    ( x + 1 ), y];
1310
 
                playlist_item_t *p_item = playlist_ItemNew( p_playlist, \
1311
 
                    [[[o_userSelections objectForKey:@"pathToStrm"] \
1312
 
                    objectAtIndex:x] UTF8String], \
1313
 
                    [tempString UTF8String] );
1314
 
                playlist_ItemAddOption( p_item, [[[o_userSelections \
1315
 
                    objectForKey:@"opts"] objectAtIndex: x] UTF8String]);
1316
 
 
1317
 
                if(! [[o_userSelections objectForKey:@"partExtractFrom"] \
1318
 
                    isEqualToString:@""] )
1319
 
                {
1320
 
                    playlist_ItemAddOption( p_item, [[NSString \
1321
 
                        stringWithFormat: @"start-time=%@", [o_userSelections \
1322
 
                        objectForKey: @"partExtractFrom"]] UTF8String] );
1323
 
                }
1324
 
 
1325
 
                if(! [[o_userSelections objectForKey:@"partExtractTo"] \
1326
 
                    isEqualToString:@""] )
1327
 
                {
1328
 
                    playlist_ItemAddOption( p_item, [[NSString \
1329
 
                        stringWithFormat: @"stop-time=%@", [o_userSelections \
1330
 
                        objectForKey: @"partExtractTo"]] UTF8String] );
1331
 
                }
1332
 
 
1333
 
                playlist_ItemAddOption( p_item, [[NSString stringWithFormat: \
1334
 
                    @"ttl=%@", [o_userSelections objectForKey:@"ttl"]] \
1335
 
                    UTF8String] );
1336
 
 
1337
 
                playlist_AddItem( p_playlist, p_item, PLAYLIST_STOP, PLAYLIST_END );
1338
 
                
1339
 
                if( x == 0 )
1340
 
                    /* play the first item and add the others afterwards */ 
1341
 
                    playlist_Control( p_playlist, PLAYLIST_ITEMPLAY, p_item );
1342
 
 
1343
 
                x += 1;
1344
 
            }
1345
 
 
1346
 
            playlist_ViewUpdate( p_playlist, VIEW_CATEGORY );
1347
 
 
1348
 
            vlc_object_release(p_playlist);
1349
 
        } else {
1350
 
            msg_Err( p_intf, "unable to find playlist" );
 
1264
            /* we need a temp. variable here to work-around a GCC4-bug */
 
1265
            NSString *tempString = [NSString stringWithFormat:
 
1266
                @"%@ (%i/%i)", _NS("Streaming/Transcoding Wizard"),
 
1267
                ( x + 1 ), y];
 
1268
            input_item_t *p_input = input_item_New( p_playlist,
 
1269
                [[[o_userSelections objectForKey:@"pathToStrm"]
 
1270
                objectAtIndex:x] UTF8String],
 
1271
                [tempString UTF8String] );
 
1272
            input_item_AddOption( p_input, [[[o_userSelections
 
1273
                objectForKey:@"opts"] objectAtIndex: x] UTF8String]);
 
1274
 
 
1275
            if(! [[o_userSelections objectForKey:@"partExtractFrom"]
 
1276
                isEqualToString:@""] )
 
1277
            {
 
1278
                input_item_AddOption( p_input, [[NSString
 
1279
                    stringWithFormat: @"start-time=%@", [o_userSelections
 
1280
                    objectForKey: @"partExtractFrom"]] UTF8String] );
 
1281
            }
 
1282
 
 
1283
            if(! [[o_userSelections objectForKey:@"partExtractTo"]
 
1284
                isEqualToString:@""] )
 
1285
            {
 
1286
                input_item_AddOption( p_input, [[NSString
 
1287
                    stringWithFormat: @"stop-time=%@", [o_userSelections
 
1288
                    objectForKey: @"partExtractTo"]] UTF8String] );
 
1289
            }
 
1290
 
 
1291
            input_item_AddOption( p_input, [[NSString stringWithFormat:
 
1292
                @"ttl=%@", [o_userSelections objectForKey:@"ttl"]]
 
1293
                UTF8String] );
 
1294
 
 
1295
            /* FIXME: playlist_AddInput() can fail */
 
1296
            playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP,
 
1297
                PLAYLIST_END, true, pl_Unlocked );
 
1298
 
 
1299
            if( x == 0 )
 
1300
            {
 
1301
                /* play the first item and add the others afterwards */
 
1302
                PL_LOCK;
 
1303
                playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked );
 
1304
                playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, NULL,
 
1305
                          p_item );
 
1306
                PL_UNLOCK;
 
1307
            }
 
1308
 
 
1309
            vlc_gc_decref( p_input );
 
1310
            x += 1;
1351
1311
        }
1352
1312
 
 
1313
        vlc_object_release( p_playlist );
 
1314
 
1353
1315
        /* close the window, since we are done */
1354
1316
        [o_wizard_window close];
1355
1317
    }
1364
1326
    x = 0;
1365
1327
    while (x != [o_videoCodecs count])
1366
1328
    {
1367
 
        [o_t4_pop_videoCodec addItemWithTitle:[[o_videoCodecs objectAtIndex:x] \
 
1329
        [o_t4_pop_videoCodec addItemWithTitle:[[o_videoCodecs objectAtIndex:x]
1368
1330
            objectAtIndex:0]];
1369
1331
        x += 1;
1370
1332
    }
1371
 
    if( keepSettingsOrNot && savePreviousSel >= 0 )
 
1333
    if( savePreviousSel >= 0 )
1372
1334
        [o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel];
1373
1335
 
1374
1336
    savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem];
1376
1338
    x = 0;
1377
1339
    while (x != [o_audioCodecs count])
1378
1340
    {
1379
 
        [o_t4_pop_audioCodec addItemWithTitle:[[o_audioCodecs objectAtIndex:x] \
 
1341
        [o_t4_pop_audioCodec addItemWithTitle:[[o_audioCodecs objectAtIndex:x]
1380
1342
            objectAtIndex:0]];
1381
1343
        x += 1;
1382
1344
    }
1383
 
    if( keepSettingsOrNot && savePreviousSel >= 0 )
 
1345
    if( savePreviousSel >= 0 )
1384
1346
        [o_t4_pop_audioCodec selectItemAtIndex: savePreviousSel];
1385
1347
}
1386
1348
 
1391
1353
     * print the URI of the single item */
1392
1354
    if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
1393
1355
        [o_t8_fld_inptStream setStringValue: [NSString stringWithFormat:
1394
 
            _NS("%i items"), 
 
1356
            _NS("%i items"),
1395
1357
            [[o_userSelections objectForKey:@"pathToStrm"] count]]];
1396
1358
    else
1397
 
        [o_t8_fld_inptStream setStringValue: 
 
1359
        [o_t8_fld_inptStream setStringValue:
1398
1360
            [[o_userSelections objectForKey:@"pathToStrm"] objectAtIndex: 0]];
1399
 
    
 
1361
 
1400
1362
    if ([[o_userSelections objectForKey:@"localPb"] isEqualToString: @"YES"])
1401
1363
    {
1402
1364
        [o_t8_fld_local setStringValue: _NS("yes")];
1406
1368
 
1407
1369
    if ([[o_userSelections objectForKey:@"partExtract"] isEqualToString: @"YES"])
1408
1370
    {
1409
 
        [o_t8_fld_partExtract setStringValue: [NSString stringWithFormat: 
1410
 
            _NS("yes: from %@ to %@ secs"), 
 
1371
        [o_t8_fld_partExtract setStringValue: [NSString stringWithFormat:
 
1372
            _NS("yes: from %@ to %@ secs"),
1411
1373
            [o_userSelections objectForKey:@"partExtractFrom"],
1412
1374
            [o_userSelections objectForKey:@"partExtractTo"]]];
1413
1375
    } else {
1418
1380
    {
1419
1381
        [o_t8_fld_trnscdVideo setStringValue: [NSString stringWithFormat:
1420
1382
            _NS("yes: %@ @ %@ kb/s"),
1421
 
            [[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
1383
            [[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
1422
1384
            @"trnscdVideoCodec"] intValue]] objectAtIndex:0],
1423
1385
            [o_userSelections objectForKey:@"trnscdVideoBitrate"]]];
1424
1386
    }
1426
1388
    {
1427
1389
        [o_t8_fld_trnscdVideo setStringValue: _NS("no")];
1428
1390
    }
1429
 
    
 
1391
 
1430
1392
    if ([[o_userSelections objectForKey:@"soverlay"] isEqualToString:@"1"])
1431
1393
        [o_t8_fld_soverlay setStringValue: _NS("yes")];
1432
1394
    else
1433
1395
        [o_t8_fld_soverlay setStringValue: _NS("no")];
1434
 
    
 
1396
 
1435
1397
    if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
1436
1398
    {
1437
1399
        [o_t8_fld_trnscdAudio setStringValue: [NSString stringWithFormat:
1438
1400
            _NS("yes: %@ @ %@ kb/s"),
1439
 
            [[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey: \
 
1401
            [[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
1440
1402
                @"trnscdAudioCodec"] intValue]] objectAtIndex:0],
1441
1403
            [o_userSelections objectForKey:@"trnscdAudioBitrate"]]];
1442
1404
    }
1449
1411
    {
1450
1412
        /* we are streaming and perhaps also transcoding */
1451
1413
        [o_t8_fld_saveFileTo setStringValue: @"-"];
1452
 
        [o_t8_fld_strmgMthd setStringValue: [[o_strmgMthds objectAtIndex: \
1453
 
            [[o_userSelections objectForKey:@"stmgMhd"] intValue]] \
 
1414
        [o_t8_fld_strmgMthd setStringValue: [[o_strmgMthds objectAtIndex:
 
1415
            [[o_userSelections objectForKey:@"stmgMhd"] intValue]]
1454
1416
            objectAtIndex:1]];
1455
 
        [o_t8_fld_destination setStringValue: [o_userSelections objectForKey: \
 
1417
        [o_t8_fld_destination setStringValue: [o_userSelections objectForKey:
1456
1418
            @"stmgDest"]];
1457
1419
        [o_t8_fld_ttl setStringValue: [o_userSelections objectForKey:@"ttl"]];
1458
1420
        if ([[o_userSelections objectForKey:@"sap"] isEqualToString: @"YES"])
1459
1421
        {
1460
 
            [o_t8_fld_sap setStringValue: 
 
1422
            [o_t8_fld_sap setStringValue:
1461
1423
                [_NS("yes") stringByAppendingFormat: @": \"%@\"",
1462
1424
                    [o_userSelections objectForKey:@"sapText"]]];
1463
1425
        }else{
1471
1433
        [o_t8_fld_sap setStringValue: @"-"];
1472
1434
        /* do only show the destination of the first item and add a counter, if needed */
1473
1435
        if( [[o_userSelections objectForKey: @"trnscdFilePath"] count] > 1 )
1474
 
            [o_t8_fld_saveFileTo setStringValue: \
1475
 
                [NSString stringWithFormat: @"%@ (+%i)", \
1476
 
                [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex:0], \
 
1436
            [o_t8_fld_saveFileTo setStringValue:
 
1437
                [NSString stringWithFormat: @"%@ (+%i)",
 
1438
                [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex:0],
1477
1439
                ([[o_userSelections objectForKey: @"trnscdFilePath"] count] - 1)]];
1478
1440
        else
1479
 
            [o_t8_fld_saveFileTo setStringValue: \
 
1441
            [o_t8_fld_saveFileTo setStringValue:
1480
1442
                [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex:0]];
1481
1443
    }
1482
 
    [o_t8_fld_encapFormat setStringValue: [[o_encapFormats objectAtIndex: \
 
1444
    [o_t8_fld_encapFormat setStringValue: [[o_encapFormats objectAtIndex:
1483
1445
        [[o_userSelections objectForKey:@"encapFormat"] intValue]] objectAtIndex:1]];
1484
1446
 
1485
1447
    [self createOpts];
1497
1459
    int x = 0;
1498
1460
    int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
1499
1461
    NSMutableArray * tempArray = [[NSMutableArray alloc] init];
1500
 
    
 
1462
 
1501
1463
    /* loop to create an opt-string for each item we're processing */
1502
1464
    while( x != y )
1503
1465
    {
1506
1468
        if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualToString:@"YES"])
1507
1469
        {
1508
1470
            [o_trnscdCmd appendString: @"transcode{"];
1509
 
            [o_trnscdCmd appendFormat: @"vcodec=%s,vb=%i", [[[o_videoCodecs \
1510
 
                objectAtIndex:[[o_userSelections objectForKey:@"trnscdVideoCodec"] \
1511
 
                intValue]] objectAtIndex:1] UTF8String],  [[o_userSelections \
 
1471
            [o_trnscdCmd appendFormat: @"vcodec=%s,vb=%i", [[[o_videoCodecs
 
1472
                objectAtIndex:[[o_userSelections objectForKey:@"trnscdVideoCodec"]
 
1473
                intValue]] objectAtIndex:1] UTF8String],  [[o_userSelections
1512
1474
                objectForKey:@"trnscdVideoBitrate"] intValue]];
1513
1475
            if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
1514
1476
            {
1519
1481
                [o_trnscdCmd appendString: @"}:"];
1520
1482
            }
1521
1483
        }
1522
 
            
 
1484
 
1523
1485
        /* check whether the user requested local playback. if yes, prepare the
1524
1486
         * string, if not, let it empty */
1525
1487
        if ([[o_userSelections objectForKey:@"localPb"] isEqualToString:@"YES"])
1526
1488
        {
1527
1489
            [o_duplicateCmd appendString: @"duplicate{dst=display,dst=\""];
1528
1490
        }
1529
 
    
 
1491
 
1530
1492
        if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
1531
1493
        {
1532
1494
            if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualToString:@"NO"])
1534
1496
                /* in case we transcode the audio only, add this */
1535
1497
                [o_trnscdCmd appendString: @"transcode{"];
1536
1498
            }
1537
 
            [o_trnscdCmd appendFormat: @"acodec=%s,ab=%i}:", [[[o_audioCodecs \
1538
 
                objectAtIndex:[[o_userSelections objectForKey:@"trnscdAudioCodec"] \
1539
 
                intValue]] objectAtIndex:1] UTF8String],  [[o_userSelections \
 
1499
            [o_trnscdCmd appendFormat: @"acodec=%s,ab=%i}:", [[[o_audioCodecs
 
1500
                objectAtIndex:[[o_userSelections objectForKey:@"trnscdAudioCodec"]
 
1501
                intValue]] objectAtIndex:1] UTF8String],  [[o_userSelections
1540
1502
                objectForKey:@"trnscdAudioBitrate"] intValue]];
1541
1503
        }
1542
 
    
 
1504
 
1543
1505
        if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"trnscd"])
1544
1506
        {
1545
1507
            /* we are just transcoding and dumping the stuff to a file */
1546
 
            [o_opts_string appendFormat: \
1547
 
                @":sout=#%s%sstandard{mux=%s,dst=%s,access=file}", [o_duplicateCmd \
1548
 
                UTF8String], [o_trnscdCmd UTF8String], [[[o_encapFormats \
1549
 
                objectAtIndex: [[o_userSelections objectForKey:@"encapFormat"] \
1550
 
                intValue]] objectAtIndex:0] UTF8String], [[[o_userSelections \
 
1508
            [o_opts_string appendFormat:
 
1509
                @":sout=#%s%sstandard{mux=%s,dst=%s,access=file}", [o_duplicateCmd
 
1510
                UTF8String], [o_trnscdCmd UTF8String], [[[o_encapFormats
 
1511
                objectAtIndex: [[o_userSelections objectForKey:@"encapFormat"]
 
1512
                intValue]] objectAtIndex:0] UTF8String], [[[o_userSelections
1551
1513
                objectForKey: @"trnscdFilePath"] objectAtIndex: x] UTF8String]];
1552
1514
        }
1553
1515
        else
1564
1526
                }
1565
1527
                else
1566
1528
                {
1567
 
                    [o_sap_option appendFormat: @"sap,name=\"%s\"", \
 
1529
                    [o_sap_option appendFormat: @"sap,name=\"%s\"",
1568
1530
                        [[o_userSelections objectForKey:@"sapText"] UTF8String]];
1569
1531
                }
1570
 
                [o_opts_string appendFormat: \
1571
 
                    @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s,%s}", \
1572
 
                    [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String], \
1573
 
                    [[[o_encapFormats objectAtIndex: [[o_userSelections \
1574
 
                    objectForKey: @"encapFormat"] intValue]] objectAtIndex:0] \
1575
 
                    UTF8String], [[o_userSelections objectForKey: @"stmgDest"] \
1576
 
                    UTF8String], [[[o_strmgMthds objectAtIndex: [[o_userSelections \
1577
 
                    objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] \
1578
 
                    UTF8String], [o_sap_option UTF8String]];
 
1532
                if( [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] == @"rtp" )
 
1533
                {
 
1534
                    /* RTP is no access out, but a stream out module */
 
1535
                    [o_opts_string appendFormat:
 
1536
                                             @":sout=#%s%srtp{mux=%s,dst=%s,%s}",
 
1537
                        [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String],
 
1538
                        [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
 
1539
                            UTF8String], 
 
1540
                        [[o_userSelections objectForKey: @"stmgDest"] UTF8String],
 
1541
                        [o_sap_option UTF8String]];
 
1542
                }
 
1543
                else
 
1544
                {
 
1545
                    [o_opts_string appendFormat:
 
1546
                                             @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s,%s}",
 
1547
                        [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String],
 
1548
                        [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
 
1549
                            UTF8String], 
 
1550
                        [[o_userSelections objectForKey: @"stmgDest"] UTF8String], 
 
1551
                        [[[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0]
 
1552
                            UTF8String], 
 
1553
                        [o_sap_option UTF8String]];                    
 
1554
                }
1579
1555
            }
1580
1556
            else
1581
1557
            {
1582
1558
                /* no SAP, just streaming */
1583
 
                [o_opts_string appendFormat: \
1584
 
                    @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s}", \
1585
 
                    [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String], \
1586
 
                    [[[o_encapFormats objectAtIndex: [[o_userSelections \
1587
 
                    objectForKey: @"encapFormat"] intValue]] objectAtIndex:0] \
1588
 
                    UTF8String], [[o_userSelections objectForKey: \
1589
 
                    @"stmgDest"] UTF8String], [[[o_strmgMthds objectAtIndex: \
1590
 
                    [[o_userSelections objectForKey: @"stmgMhd"] intValue]] \
1591
 
                    objectAtIndex:0] UTF8String]];
 
1559
                if( [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] == @"rtp" )
 
1560
                {
 
1561
                    /* RTP is different from the other protocols, as it isn't provided through an access out module anymore */
 
1562
                    [o_opts_string appendFormat:
 
1563
                                             @":sout=#%s%srtp{mux=%s,dst=%s}",
 
1564
                        [o_duplicateCmd UTF8String], 
 
1565
                        [o_trnscdCmd UTF8String],
 
1566
                        [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
 
1567
                            UTF8String], 
 
1568
                        [[o_userSelections objectForKey: @"stmgDest"] UTF8String]];
 
1569
                }
 
1570
                else
 
1571
                {
 
1572
                    /* all other protocols are cool */
 
1573
                    [o_opts_string appendFormat:
 
1574
                                             @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s}",
 
1575
                        [o_duplicateCmd UTF8String], 
 
1576
                        [o_trnscdCmd UTF8String],
 
1577
                        [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
 
1578
                            UTF8String], 
 
1579
                        [[o_userSelections objectForKey: @"stmgDest"] UTF8String], 
 
1580
                        [[[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] UTF8String]];
 
1581
                }
1592
1582
            }
1593
1583
        }
1594
1584
 
1598
1588
        {
1599
1589
            [o_opts_string appendString: @"\"}"];
1600
1590
        }
1601
 
        
 
1591
 
1602
1592
        /* add subtitles to the video if desired */
1603
 
        [o_opts_string appendFormat: @":sout-transcode-soverlay=%@", 
 
1593
        [o_opts_string appendFormat: @":sout-transcode-soverlay=%@",
1604
1594
                [o_userSelections objectForKey:@"soverlay"]];
1605
1595
 
1606
1596
        [tempArray addObject: o_opts_string];
1630
1620
        /* rename the forward-button */
1631
1621
        [o_btn_forward setTitle: _NS("Next")];
1632
1622
    }
1633
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1623
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1634
1624
        @"Transcode 2"])
1635
1625
    {
1636
1626
        /* show "Encap" */
1637
1627
        [o_tab_pageHolder selectTabViewItemAtIndex:4];
1638
1628
    }
1639
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1629
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1640
1630
        @"Streaming 2"])
1641
1631
    {
1642
1632
        /* show "Encap" */
1643
1633
        [o_tab_pageHolder selectTabViewItemAtIndex:4];
1644
1634
    }
1645
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1635
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1646
1636
        @"Encap"])
1647
1637
    {
1648
1638
        /* show "Transcode 1" */
1649
1639
        [o_tab_pageHolder selectTabViewItemAtIndex:3];
1650
1640
    }
1651
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1641
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1652
1642
        @"Streaming 1"])
1653
1643
    {
1654
1644
        /* show "Input" */
1655
1645
        [o_tab_pageHolder selectTabViewItemAtIndex:1];
1656
1646
    }
1657
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1647
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1658
1648
        @"Transcode 1"])
1659
1649
    {
1660
1650
        if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"strmg"])
1666
1656
            [o_tab_pageHolder selectTabViewItemAtIndex:1];
1667
1657
        }
1668
1658
    }
1669
 
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
 
1659
    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
1670
1660
        @"Input"])
1671
1661
    {
1672
1662
        /* reset the wizard before going backwards. Otherwise, we might get
1682
1672
- (IBAction)t1_mrInfo_streaming:(id)sender
1683
1673
{
1684
1674
    /* show a sheet for the help */
1685
 
    NSBeginInformationalAlertSheet(_NS("Stream to network"), \
1686
 
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
 
1675
    NSBeginInformationalAlertSheet(_NS("Stream to network"),
 
1676
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
1687
1677
        _NS("This allows to stream on a network."));
1688
1678
}
1689
1679
 
1690
1680
- (IBAction)t1_mrInfo_transcode:(id)sender
1691
1681
{
1692
1682
    /* show a sheet for the help */
1693
 
    NSBeginInformationalAlertSheet(_NS("Transcode/Save to file"), \
1694
 
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
1695
 
        _NS("This allows to save a stream to a file. The "\
1696
 
        "can be reencoded on the fly. Whatever "\
1697
 
        "VLC can read can be saved.\nPlease note that VLC is not very suited " \
1698
 
        "for file to file transcoding. Its transcoding " \
 
1683
    NSBeginInformationalAlertSheet(_NS("Transcode/Save to file"),
 
1684
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
 
1685
        _NS("This allows to save a stream to a file. The "
 
1686
        "can be reencoded on the fly. Whatever "
 
1687
        "VLC can read can be saved.\nPlease note that VLC is not very suited "
 
1688
        "for file to file transcoding. Its transcoding "
1699
1689
        "features are however useful to save network streams, for example."));
1700
1690
}
1701
1691
 
1703
1693
{
1704
1694
    NSOpenPanel * openPanel = [NSOpenPanel openPanel];
1705
1695
    SEL sel = @selector(t2_getNewStreamFromDialog:returnCode:contextInfo:);
1706
 
    [openPanel beginSheetForDirectory:nil file:nil types:nil modalForWindow: \
 
1696
    [openPanel beginSheetForDirectory:nil file:nil types:nil modalForWindow:
1707
1697
        o_wizard_window modalDelegate:self didEndSelector:sel contextInfo:nil];
1708
1698
}
1709
1699
 
1710
 
- (void)t2_getNewStreamFromDialog: (NSOpenPanel *)sheet returnCode: \
1711
 
    (int)returnCode contextInfo: (void *)contextInfo
 
1700
- (void)t2_getNewStreamFromDialog: (NSOpenPanel *)sheet 
 
1701
                       returnCode: (int)returnCode
 
1702
                      contextInfo: (void *)contextInfo
1712
1703
{
1713
1704
    if (returnCode == NSOKButton)
1714
1705
    {
1715
 
        [o_t2_fld_pathToNewStrm setStringValue: [@"file://" \
 
1706
        [o_t2_fld_pathToNewStrm setStringValue: [@"file://"
1716
1707
            stringByAppendingString: [sheet filename]]];
1717
1708
    }
1718
1709
}
1759
1750
    if( mode == 0 )
1760
1751
    {
1761
1752
        /* HTTP */
1762
 
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:0] \
 
1753
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:0]
1763
1754
            objectAtIndex:2]];
1764
 
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:0] \
 
1755
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:0]
1765
1756
            objectAtIndex:3]];
1766
1757
    }
1767
1758
    else if( mode == 1 )
1768
1759
    {
1769
1760
        /* MMS */
1770
 
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:1] \
 
1761
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:1]
1771
1762
            objectAtIndex:2]];
1772
 
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:1] \
 
1763
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:1]
1773
1764
            objectAtIndex:3]];
1774
1765
    }
1775
1766
    else if( mode == 2 )
1776
1767
    {
1777
1768
        /* UDP-Unicast */
1778
 
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:2] \
 
1769
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:2]
1779
1770
            objectAtIndex:2]];
1780
 
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:2] \
 
1771
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:2]
1781
1772
        objectAtIndex:3]];
1782
1773
    }
1783
1774
    else if( mode == 3 )
1784
1775
    {
1785
1776
        /* UDP-Multicast */
1786
 
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:3] \
 
1777
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:3]
1787
1778
            objectAtIndex:2]];
1788
 
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:3] \
 
1779
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:3]
1789
1780
        objectAtIndex:3]];
1790
1781
    }
1791
1782
    else if( mode == 4 )
1792
1783
    {
1793
1784
        /* RTP-Unicast */
1794
 
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:4] \
 
1785
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:4]
1795
1786
            objectAtIndex:2]];
1796
 
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:4] \
 
1787
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:4]
1797
1788
            objectAtIndex:3]];
1798
1789
    }
1799
1790
    else if( mode == 5 )
1800
1791
    {
1801
1792
        /* RTP-Multicast */
1802
 
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:5] \
 
1793
        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:5]
1803
1794
            objectAtIndex:2]];
1804
 
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:5] \
 
1795
        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:5]
1805
1796
        objectAtIndex:3]];
1806
1797
    }
1807
1798
}
1809
1800
- (IBAction)t4_AudCdcChanged:(id)sender
1810
1801
{
1811
1802
    /* update codec info */
1812
 
    [o_t4_txt_hintAudio setStringValue:[[o_audioCodecs objectAtIndex: \
 
1803
    [o_t4_txt_hintAudio setStringValue:[[o_audioCodecs objectAtIndex:
1813
1804
        [o_t4_pop_audioCodec indexOfSelectedItem]] objectAtIndex:2]];
1814
1805
}
1815
1806
 
1820
1811
    {
1821
1812
        [o_t4_pop_audioCodec setEnabled:YES];
1822
1813
        [o_t4_pop_audioBitrate setEnabled:YES];
1823
 
        [o_t4_txt_hintAudio setStringValue: _NS("Select your audio codec. " \
 
1814
        [o_t4_txt_hintAudio setStringValue: _NS("Select your audio codec. "
1824
1815
        "Click one to get more information.")];
1825
1816
    } else {
1826
1817
        [o_t4_pop_audioCodec setEnabled:NO];
1827
1818
        [o_t4_pop_audioBitrate setEnabled:NO];
1828
 
        [o_t4_txt_hintAudio setStringValue: _NS("Enabling this allows to transcode " \
 
1819
        [o_t4_txt_hintAudio setStringValue: _NS("Enabling this allows to transcode "
1829
1820
        "the audio track if one is present in the stream.")];
1830
1821
    }
1831
1822
}
1842
1833
    } else {
1843
1834
        [o_t4_pop_videoCodec setEnabled:NO];
1844
1835
        [o_t4_pop_videoBitrate setEnabled:NO];
1845
 
        [o_t4_txt_hintVideo setStringValue: _NS("Enabling this allows to transcode " \
 
1836
        [o_t4_txt_hintVideo setStringValue: _NS("Enabling this allows to transcode "
1846
1837
        "the video track if one is present in the stream.")];
1847
1838
 
1848
1839
    }
1851
1842
- (IBAction)t4_VidCdcChanged:(id)sender
1852
1843
{
1853
1844
    /* update codec info */
1854
 
    [o_t4_txt_hintVideo setStringValue:[[o_videoCodecs objectAtIndex: \
 
1845
    [o_t4_txt_hintVideo setStringValue:[[o_videoCodecs objectAtIndex:
1855
1846
        [o_t4_pop_videoCodec indexOfSelectedItem]] objectAtIndex:2]];
1856
1847
}
1857
1848
 
1870
1861
- (IBAction)t6_mrInfo_ttl:(id)sender
1871
1862
{
1872
1863
    /* show a sheet for the help */
1873
 
    NSBeginInformationalAlertSheet(_NS("Time-To-Live (TTL)"), \
1874
 
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
1875
 
        _NS("This allows to define the TTL (Time-To-Live) of the stream. "\
1876
 
            "This parameter is the maximum number of routers your stream can " \
1877
 
            "go through. If you don't know what it means, or if you want to " \
 
1864
    NSBeginInformationalAlertSheet(_NS("Time-To-Live (TTL)"),
 
1865
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
 
1866
        _NS("This allows to define the TTL (Time-To-Live) of the stream. "
 
1867
            "This parameter is the maximum number of routers your stream can "
 
1868
            "go through. If you don't know what it means, or if you want to "
1878
1869
            "stream on your local network only, leave this setting to 1."));
1879
1870
}
1880
1871
 
1881
1872
- (IBAction)t6_mrInfo_sap:(id)sender
1882
1873
{
1883
1874
    /* show a sheet for the help */
1884
 
    NSBeginInformationalAlertSheet(_NS("SAP Announce"), \
1885
 
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
1886
 
        _NS("When streaming using UDP, the streams can be " \
1887
 
        "announced using the SAP/SDP announcing protocol. This " \
1888
 
        "way, the clients won't have to type in the multicast address, it " \
1889
 
        "will appear in their playlist if they enable the SAP extra " \
1890
 
        "interface.\nIf you want to give a name to your stream, enter it " \
 
1875
    NSBeginInformationalAlertSheet(_NS("SAP Announce"),
 
1876
        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
 
1877
        _NS("When streaming using UDP, the streams can be "
 
1878
        "announced using the SAP/SDP announcing protocol. This "
 
1879
        "way, the clients won't have to type in the multicast address, it "
 
1880
        "will appear in their playlist if they enable the SAP extra "
 
1881
        "interface.\nIf you want to give a name to your stream, enter it "
1891
1882
        "here, else, a default name will be used."));
1892
1883
}
1893
1884
 
1894
1885
- (IBAction)t67_mrInfo_local:(id)sender
1895
1886
{
1896
1887
    /* show a sheet for the help */
1897
 
    NSBeginInformationalAlertSheet(_NS("Local playback"), \
1898
 
            _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
1899
 
            _NS("When this option is enabled, the stream will be both played " \
1900
 
            "and transcoded/streamed.\n\nNote that this requires much more " \
 
1888
    NSBeginInformationalAlertSheet(_NS("Local playback"),
 
1889
            _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
 
1890
            _NS("When this option is enabled, the stream will be both played "
 
1891
            "and transcoded/streamed.\n\nNote that this requires much more "
1901
1892
            "CPU power than simple transcoding or streaming."));
1902
1893
}
1903
1894
 
1904
1895
- (IBAction)t7_selectTrnscdDestFile:(id)sender
1905
1896
{
1906
 
    /* provide a save-to-dialogue, so the user can choose a location for 
 
1897
    /* provide a save-to-dialogue, so the user can choose a location for
1907
1898
     * his/her new file. We take a modified NSOpenPanel to select a folder
1908
1899
     * and a plain NSSavePanel to save a single file. */
1909
1900
 
1910
1901
    SEL sel = @selector(t7_getTrnscdDestFile:returnCode:contextInfo:);
1911
 
    
 
1902
 
1912
1903
    if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
1913
1904
    {
1914
1905
        NSOpenPanel * saveFolderPanel = [[NSOpenPanel alloc] init];
1915
 
        
 
1906
 
1916
1907
        [saveFolderPanel setCanChooseDirectories: YES];
1917
1908
        [saveFolderPanel setCanChooseFiles: NO];
1918
1909
        [saveFolderPanel setCanSelectHiddenExtension: NO];
1919
1910
        [saveFolderPanel setCanCreateDirectories: YES];
1920
 
        [saveFolderPanel beginSheetForDirectory:nil file:nil modalForWindow: \
 
1911
        [saveFolderPanel beginSheetForDirectory:nil file:nil modalForWindow:
1921
1912
        o_wizard_window modalDelegate:self didEndSelector:sel contextInfo:nil];
1922
1913
    }
1923
1914
    else
1924
1915
    {
1925
1916
        NSSavePanel * saveFilePanel = [[NSSavePanel alloc] init];
1926
1917
 
1927
 
        /* don't use ".ps" as suffix, since the OSX Finder confuses our 
1928
 
         * creations with PostScript-files and wants to open them with 
 
1918
        /* don't use ".ps" as suffix, since the OSX Finder confuses our
 
1919
         * creations with PostScript-files and wants to open them with
1929
1920
         * Preview.app */
1930
 
        NSString * theEncapFormat = [[o_encapFormats objectAtIndex: \
1931
 
        [[o_userSelections objectForKey:@"encapFormat"] intValue]] \
 
1921
        NSString * theEncapFormat = [[o_encapFormats objectAtIndex:
 
1922
        [[o_userSelections objectForKey:@"encapFormat"] intValue]]
1932
1923
        objectAtIndex:0];
1933
1924
        if( theEncapFormat != @"ps" )
1934
1925
            [saveFilePanel setRequiredFileType: theEncapFormat];
1937
1928
 
1938
1929
        [saveFilePanel setCanSelectHiddenExtension: YES];
1939
1930
        [saveFilePanel setCanCreateDirectories: YES];
1940
 
        [saveFilePanel beginSheetForDirectory:nil file:nil modalForWindow: \
 
1931
        [saveFilePanel beginSheetForDirectory:nil file:nil modalForWindow:
1941
1932
        o_wizard_window modalDelegate:self didEndSelector:sel contextInfo:nil];
1942
1933
    }
1943
1934
}
1944
1935
 
1945
 
- (void)t7_getTrnscdDestFile: (NSOpenPanel *)sheet returnCode: \
 
1936
- (void)t7_getTrnscdDestFile: (NSOpenPanel *)sheet returnCode:
1946
1937
    (int)returnCode contextInfo: (void *)contextInfo
1947
1938
{
1948
1939
    if (returnCode == NSOKButton)
1950
1941
        /* output returned path to text-field, add a / to the end if the user
1951
1942
         * selected a folder */
1952
1943
        if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
1953
 
            [o_t7_fld_filePath setStringValue: [NSString stringWithFormat: \
 
1944
            [o_t7_fld_filePath setStringValue: [NSString stringWithFormat:
1954
1945
                @"%@/", [sheet filename]]];
1955
1946
        else
1956
1947
            [o_t7_fld_filePath setStringValue:[sheet filename]];