Commit 7d9d7bad authored by bigben's avatar bigben
Browse files

We use 4 space caracters instead of spaces in VLC's sources ;)

parent 61390210
......@@ -4,13 +4,13 @@
* Copyright (C) 2005 the VideoLAN team
* $Id$
*
* Authors: Felix Khne <fkuehne@users.sf.net>
* Authors: Felix Khne <fkuehne@users.sf.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
......@@ -21,18 +21,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Note: this code is partially based upon ../wxwindows/wizard.cpp and
* ../wxwindows/streamdata.h; both written by Clment Stenac.
*****************************************************************************/
* Note: this code is partially based upon ../wxwindows/wizard.cpp and
* ../wxwindows/streamdata.h; both written by Clment Stenac.
*****************************************************************************/
/* TODO:
- fill the playlist-table on t2
- see FIXME's
- fill the playlist-table on t2
- see FIXME's
*/
/*****************************************************************************
* Preamble
*****************************************************************************/
......@@ -53,33 +53,33 @@ static VLCWizard *_o_sharedInstance = nil;
return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
}
- (id)init
- (id)init
{
if (_o_sharedInstance) {
[self dealloc];
} else {
_o_sharedInstance = [super init];
}
return _o_sharedInstance;
}
- (void)dealloc
{
[o_userSelections release];
[o_videoCodecs release];
[o_audioCodecs release];
[o_encapFormats release];
[super dealloc];
[o_userSelections release];
[o_videoCodecs release];
[o_audioCodecs release];
[o_encapFormats release];
[super dealloc];
}
- (void)awakeFromNib
{
/* some minor cleanup */
[o_t2_tbl_plst setEnabled:NO];
[o_wizardhelp_window setExcludedFromWindowsMenu:YES];
o_userSelections = [[NSMutableDictionary alloc] init];
[o_btn_backward setEnabled:NO];
[o_wizardhelp_window setExcludedFromWindowsMenu:YES];
o_userSelections = [[NSMutableDictionary alloc] init];
[o_btn_backward setEnabled:NO];
/* add audio-bitrates for transcoding */
NSArray * audioBitratesArray;
......@@ -87,140 +87,140 @@ static VLCWizard *_o_sharedInstance = nil;
[o_t4_pop_audioBitrate removeAllItems];
[o_t4_pop_audioBitrate addItemsWithTitles: audioBitratesArray];
[o_t4_pop_audioBitrate selectItemWithTitle: @"192"];
/* add video-bitrates for transcoding */
NSArray * videoBitratesArray;
videoBitratesArray = [NSArray arrayWithObjects: @"3072", @"2048", @"1024", @"768", @"512", @"256", @"192", @"128", @"64", @"32", @"16", nil ];
[o_t4_pop_videoBitrate removeAllItems];
[o_t4_pop_videoBitrate addItemsWithTitles: videoBitratesArray];
[o_t4_pop_videoBitrate selectItemWithTitle: @"1024"];
/* fill 2 global arrays with arrays containing all codec-related information
* - one array per codec named by its short name to define the encap-compability,
* cmd-names, real names, more info in the order: realName, shortName,
* moreInfo, encaps */
NSArray * o_mp1v;
NSArray * o_mp2v;
NSArray * o_mp4v;
NSArray * o_div1;
NSArray * o_div2;
NSArray * o_div3;
NSArray * o_h263;
NSArray * o_h264;
NSArray * o_wmv1;
NSArray * o_wmv2;
NSArray * o_mjpg;
NSArray * o_theo;
NSArray * o_dummyVid;
o_mp1v = [NSArray arrayWithObjects: @"MPEG-1 Video", @"mp1v", _NS("MPEG-1 Video codec"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", @"NO", @"NO", nil];
o_mp2v = [NSArray arrayWithObjects: @"MPEG-2 Video", @"mp2v", _NS("MPEG-2 Video codec"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", @"NO", @"NO", nil];
o_mp4v = [NSArray arrayWithObjects: @"MPEG-4 Video", @"mp4v", _NS("MPEG-4 Video codec"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", nil];
o_div1 = [NSArray arrayWithObjects: @"DIVX 1", @"DIV1", _NS("DivX first version"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_div2 = [NSArray arrayWithObjects: @"DIVX 2", @"DIV2", _NS("DivX second version"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_div3 = [NSArray arrayWithObjects: @"DIVX 3", @"DIV3", _NS("DivX third version"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_h263 = [NSArray arrayWithObjects: @"H 263", @"H263", _NS("H263 is a video codec optimized for videoconference (low rates)"), @"MUX_TS", @"MUX_AVI", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_h264 = [NSArray arrayWithObjects: @"H 264", @"H264", _NS("H264 is a new video codec"), @"MUX_TS", @"MUX_AVI", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_wmv1 = [NSArray arrayWithObjects: @"WMV 1", @"WMV1", _NS("WMV (Windows Media Video) 1"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_wmv2 = [NSArray arrayWithObjects: @"WMV 2", @"WMV2", _NS("WMV (Windows Media Video) 2"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_mjpg = [NSArray arrayWithObjects: @"MJPEG", @"MJPG", _NS("MJPEG consists of a series of JPEG pictures"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_theo = [NSArray arrayWithObjects: @"Theora", @"theo", _NS("Theora is a free general-purpose codec"), @"MUX_TS", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_dummyVid = [NSArray arrayWithObjects: @"Dummy", @"dummy", _NS("Dummy codec (do not transcode)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", @"MUX_OGG", @"MUX_WAV", @"MUX_RAW", @"MUX_MOV", nil];
o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v, o_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo, o_dummyVid, nil];
[o_t4_pop_videoCodec removeAllItems];
unsigned int x;
x = 0;
while (x != [o_videoCodecs count])
{
[o_t4_pop_videoCodec addItemWithTitle:[[o_videoCodecs objectAtIndex:x] objectAtIndex:0]];
x = (x + 1);
}
/* fill 2 global arrays with arrays containing all codec-related information
* - one array per codec named by its short name to define the encap-compability,
* cmd-names, real names, more info in the order: realName, shortName,
* moreInfo, encaps */
NSArray * o_mp1v;
NSArray * o_mp2v;
NSArray * o_mp4v;
NSArray * o_div1;
NSArray * o_div2;
NSArray * o_div3;
NSArray * o_h263;
NSArray * o_h264;
NSArray * o_wmv1;
NSArray * o_wmv2;
NSArray * o_mjpg;
NSArray * o_theo;
NSArray * o_dummyVid;
o_mp1v = [NSArray arrayWithObjects: @"MPEG-1 Video", @"mp1v", _NS("MPEG-1 Video codec"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", @"NO", @"NO", nil];
o_mp2v = [NSArray arrayWithObjects: @"MPEG-2 Video", @"mp2v", _NS("MPEG-2 Video codec"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", @"NO", @"NO", nil];
o_mp4v = [NSArray arrayWithObjects: @"MPEG-4 Video", @"mp4v", _NS("MPEG-4 Video codec"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", nil];
o_div1 = [NSArray arrayWithObjects: @"DIVX 1", @"DIV1", _NS("DivX first version"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_div2 = [NSArray arrayWithObjects: @"DIVX 2", @"DIV2", _NS("DivX second version"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_div3 = [NSArray arrayWithObjects: @"DIVX 3", @"DIV3", _NS("DivX third version"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_h263 = [NSArray arrayWithObjects: @"H 263", @"H263", _NS("H263 is a video codec optimized for videoconference (low rates)"), @"MUX_TS", @"MUX_AVI", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_h264 = [NSArray arrayWithObjects: @"H 264", @"H264", _NS("H264 is a new video codec"), @"MUX_TS", @"MUX_AVI", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_wmv1 = [NSArray arrayWithObjects: @"WMV 1", @"WMV1", _NS("WMV (Windows Media Video) 1"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_wmv2 = [NSArray arrayWithObjects: @"WMV 2", @"WMV2", _NS("WMV (Windows Media Video) 2"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_mjpg = [NSArray arrayWithObjects: @"MJPEG", @"MJPG", _NS("MJPEG consists of a series of JPEG pictures"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_theo = [NSArray arrayWithObjects: @"Theora", @"theo", _NS("Theora is a free general-purpose codec"), @"MUX_TS", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_dummyVid = [NSArray arrayWithObjects: @"Dummy", @"dummy", _NS("Dummy codec (do not transcode)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", @"MUX_OGG", @"MUX_WAV", @"MUX_RAW", @"MUX_MOV", nil];
o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v, o_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo, o_dummyVid, nil];
[o_t4_pop_videoCodec removeAllItems];
unsigned int x;
x = 0;
while (x != [o_videoCodecs count])
{
[o_t4_pop_videoCodec addItemWithTitle:[[o_videoCodecs objectAtIndex:x] objectAtIndex:0]];
x = (x + 1);
}
NSArray * o_mpga;
NSArray * o_mp3;
NSArray * o_mp4a;
NSArray * o_a52;
NSArray * o_vorb;
NSArray * o_flac;
NSArray * o_spx;
NSArray * o_s16l;
NSArray * o_fl32;
NSArray * o_dummyAud;
o_mpga = [NSArray arrayWithObjects: @"MPEG Audio", @"mpga", _NS("The standard MPEG audio (1/2) format"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
o_mp3 = [NSArray arrayWithObjects: @"MP3", @"mp3", _NS("MPEG Audio Layer 3"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
o_mp4a = [NSArray arrayWithObjects: @"MPEG 4 Audio", @"mp4a", _NS("Audio format for MPEG4"), @"MUX_TS", @"MUX_MP4", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_a52 = [NSArray arrayWithObjects: @"A/52", @"a52", _NS("DVD audio format"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
o_vorb = [NSArray arrayWithObjects: @"Vorbis", @"vorb", _NS("Vorbis is a free audio codec"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_flac = [NSArray arrayWithObjects: @"FLAC", @"flac", _NS("FLAC is a lossless audio codec"), @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_spx = [NSArray arrayWithObjects: @"Speex", @"spx", _NS("A free audio codec dedicated to compression of voice"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_s16l = [NSArray arrayWithObjects: @"Uncompressed, integer", @"s16l", _NS("Uncompressed audio samples"), @"MUX_WAV", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating", @"fl32", _NS("Uncompressed audio samples"), @"MUX_WAV", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_dummyAud = [NSArray arrayWithObjects: @"Dummy", @"dummy", _NS("Dummy codec (do not transcode)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV", nil];
o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a, o_a52, o_vorb, o_flac, o_spx, o_s16l, o_fl32, o_dummyAud, nil];
[o_t4_pop_audioCodec removeAllItems];
x = 0;
while (x != [o_audioCodecs count])
{
[o_t4_pop_audioCodec addItemWithTitle:[[o_audioCodecs objectAtIndex:x] objectAtIndex:0]];
x = (x + 1);
}
/* fill another global array with all information about the encap-formats
* note that the order of the formats inside the g. array is the same as on
* the encap-tab */
NSArray * o_ps;
NSArray * o_ts;
NSArray * o_mpeg;
NSArray * o_ogg;
NSArray * o_raw;
NSArray * o_asf;
NSArray * o_avi;
NSArray * o_mp4;
NSArray * o_mov;
NSArray * o_wav;
o_ps = [NSArray arrayWithObjects: @"ps", @"MPEG PS", _NS("MPEG Program Stream"), nil];
o_ts = [NSArray arrayWithObjects: @"ts", @"MPEG TS", _NS("MPEG Transport Stream"), nil];
o_mpeg = [NSArray arrayWithObjects: @"ps", @"MPEG 1", _NS("MPEG 1 Format"), nil];
o_ogg = [NSArray arrayWithObjects: @"ogg", @"OGG", @"OGG", nil];
o_raw = [NSArray arrayWithObjects: @"raw", @"RAW", @"RAW", nil];
o_asf = [NSArray arrayWithObjects: @"asf", @"ASF", @"ASF", nil];
o_avi = [NSArray arrayWithObjects: @"avi", @"AVI", @"AVI", nil];
o_mp4 = [NSArray arrayWithObjects: @"mp4", @"MP4", @"MPEG4", nil];
o_mov = [NSArray arrayWithObjects: @"mov", @"MOV", @"MOV", nil];
o_wav = [NSArray arrayWithObjects: @"wav", @"WAV", @"WAV", nil];
o_encapFormats = [[NSArray alloc] initWithObjects: o_ps, o_ts, o_mpeg, o_ogg, o_raw, o_asf, o_avi, o_mp4, o_mov, o_wav, nil];
/* yet another array on streaming methods including help texts */
NSArray * o_http;
NSArray * o_udp_uni;
NSArray * o_udp_multi;
o_http = [NSArray arrayWithObjects: @"http", @"HTTP", _NS("Enter the local " \
"addresses you want to listen to. Do not enter anything if you want to " \
"listen to all adresses or if you don't understand. This is generally " \
"the best thing to do. Other computers can then access the stream at " \
"http://yourip:8080 by default.") , _NS("Use this to stream to several " \
"computers. This method is less efficient, as the server needs to send " \
"the stream several times."), nil];
o_udp_multi = [NSArray arrayWithObjects: @"udp", @"UDP-Multicast", _NS("Enter " \
"the multicast address to stream to in this field. This must be an IP " \
"address between 224.0.0.0 and 239.255.255.255. For a private use, " \
"enter an address beginning with 239.255."), _NS("Use this to stream " \
"to a dynamic group of computers on a multicast-enabled network. This " \
"is the most efficient method to stream to several computers, but it " \
"does not work over Internet."), nil];
o_udp_uni = [NSArray arrayWithObjects: @"udp", @"UDP-Unicast", _NS("Enter " \
"the address of the computer to stream to."), _NS("Use this to stream " \
"to a single computer."), nil];
o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_udp_multi, o_udp_uni, nil];
NSArray * o_mpga;
NSArray * o_mp3;
NSArray * o_mp4a;
NSArray * o_a52;
NSArray * o_vorb;
NSArray * o_flac;
NSArray * o_spx;
NSArray * o_s16l;
NSArray * o_fl32;
NSArray * o_dummyAud;
o_mpga = [NSArray arrayWithObjects: @"MPEG Audio", @"mpga", _NS("The standard MPEG audio (1/2) format"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
o_mp3 = [NSArray arrayWithObjects: @"MP3", @"mp3", _NS("MPEG Audio Layer 3"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
o_mp4a = [NSArray arrayWithObjects: @"MPEG 4 Audio", @"mp4a", _NS("Audio format for MPEG4"), @"MUX_TS", @"MUX_MP4", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_a52 = [NSArray arrayWithObjects: @"A/52", @"a52", _NS("DVD audio format"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
o_vorb = [NSArray arrayWithObjects: @"Vorbis", @"vorb", _NS("Vorbis is a free audio codec"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_flac = [NSArray arrayWithObjects: @"FLAC", @"flac", _NS("FLAC is a lossless audio codec"), @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_spx = [NSArray arrayWithObjects: @"Speex", @"spx", _NS("A free audio codec dedicated to compression of voice"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_s16l = [NSArray arrayWithObjects: @"Uncompressed, integer", @"s16l", _NS("Uncompressed audio samples"), @"MUX_WAV", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating", @"fl32", _NS("Uncompressed audio samples"), @"MUX_WAV", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_dummyAud = [NSArray arrayWithObjects: @"Dummy", @"dummy", _NS("Dummy codec (do not transcode)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV", nil];
o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a, o_a52, o_vorb, o_flac, o_spx, o_s16l, o_fl32, o_dummyAud, nil];
[o_t4_pop_audioCodec removeAllItems];
x = 0;
while (x != [o_audioCodecs count])
{
[o_t4_pop_audioCodec addItemWithTitle:[[o_audioCodecs objectAtIndex:x] objectAtIndex:0]];
x = (x + 1);
}
/* fill another global array with all information about the encap-formats
* note that the order of the formats inside the g. array is the same as on
* the encap-tab */
NSArray * o_ps;
NSArray * o_ts;
NSArray * o_mpeg;
NSArray * o_ogg;
NSArray * o_raw;
NSArray * o_asf;
NSArray * o_avi;
NSArray * o_mp4;
NSArray * o_mov;
NSArray * o_wav;
o_ps = [NSArray arrayWithObjects: @"ps", @"MPEG PS", _NS("MPEG Program Stream"), nil];
o_ts = [NSArray arrayWithObjects: @"ts", @"MPEG TS", _NS("MPEG Transport Stream"), nil];
o_mpeg = [NSArray arrayWithObjects: @"ps", @"MPEG 1", _NS("MPEG 1 Format"), nil];
o_ogg = [NSArray arrayWithObjects: @"ogg", @"OGG", @"OGG", nil];
o_raw = [NSArray arrayWithObjects: @"raw", @"RAW", @"RAW", nil];
o_asf = [NSArray arrayWithObjects: @"asf", @"ASF", @"ASF", nil];
o_avi = [NSArray arrayWithObjects: @"avi", @"AVI", @"AVI", nil];
o_mp4 = [NSArray arrayWithObjects: @"mp4", @"MP4", @"MPEG4", nil];
o_mov = [NSArray arrayWithObjects: @"mov", @"MOV", @"MOV", nil];
o_wav = [NSArray arrayWithObjects: @"wav", @"WAV", @"WAV", nil];
o_encapFormats = [[NSArray alloc] initWithObjects: o_ps, o_ts, o_mpeg, o_ogg, o_raw, o_asf, o_avi, o_mp4, o_mov, o_wav, nil];
/* yet another array on streaming methods including help texts */
NSArray * o_http;
NSArray * o_udp_uni;
NSArray * o_udp_multi;
o_http = [NSArray arrayWithObjects: @"http", @"HTTP", _NS("Enter the local " \
"addresses you want to listen to. Do not enter anything if you want to " \
"listen to all adresses or if you don't understand. This is generally " \
"the best thing to do. Other computers can then access the stream at " \
"http://yourip:8080 by default.") , _NS("Use this to stream to several " \
"computers. This method is less efficient, as the server needs to send " \
"the stream several times."), nil];
o_udp_multi = [NSArray arrayWithObjects: @"udp", @"UDP-Multicast", _NS("Enter " \
"the multicast address to stream to in this field. This must be an IP " \
"address between 224.0.0.0 and 239.255.255.255. For a private use, " \
"enter an address beginning with 239.255."), _NS("Use this to stream " \
"to a dynamic group of computers on a multicast-enabled network. This " \
"is the most efficient method to stream to several computers, but it " \
"does not work over Internet."), nil];
o_udp_uni = [NSArray arrayWithObjects: @"udp", @"UDP-Unicast", _NS("Enter " \
"the address of the computer to stream to."), _NS("Use this to stream " \
"to a single computer."), nil];
o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_udp_multi, o_udp_uni, nil];
}
- (void)showWizard
{
/* just present the window to the user */
[o_tab_pageHolder selectFirstTabViewItem:self];
[self resetWizard];
[self resetWizard];
[o_wizard_window center];
[o_wizard_window displayIfNeeded];
[o_wizard_window makeKeyAndOrderFront:nil];
......@@ -228,65 +228,65 @@ static VLCWizard *_o_sharedInstance = nil;
- (void)resetWizard
{
/* reset the wizard-window to its default values */
[o_userSelections removeAllObjects];
[o_t1_matrix_strmgOrTrnscd selectCellAtRow:0 column:0];
[[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setState: NSOffState];
[o_btn_forward setTitle: _NS("Next")];
/* "Input" */
[o_t2_fld_pathToNewStrm setStringValue: @""];
[o_t2_ckb_enblPartExtrct setState: NSOffState];
[self t2_enableExtract:nil];
[o_t2_matrix_inputSourceType selectCellAtRow:0 column:0];
[[o_t2_matrix_inputSourceType cellAtRow:1 column:0] setState: NSOffState];
/* FIXME: we need to refresh the playlist-table as well */
[o_t2_tbl_plst setEnabled:NO];
[o_t2_fld_pathToNewStrm setEnabled:YES];
[o_t2_btn_chooseFile setEnabled:YES];
/* "Streaming 1" */
[o_t3_fld_address setStringValue: @""];
[o_t3_matrix_stmgMhd selectCellAtRow:0 column:0];
[[o_t3_matrix_stmgMhd cellAtRow:1 column:1] setState: NSOffState];
[[o_t3_matrix_stmgMhd cellAtRow:1 column:2] setState: NSOffState];
/* "Transcode 1" */
[o_t4_ckb_audio setState: NSOffState];
[o_t4_ckb_video setState: NSOffState];
[self t4_enblVidTrnscd:nil];
[self t4_enblAudTrnscd:nil];
/* "Streaming 2" */
[o_t6_fld_ttl setStringValue: @"1"];
[o_t6_ckb_sap setState: NSOffState];
[self t6_enblSapAnnce:nil];
/* "Transcode 2" */
[o_t7_fld_filePath setStringValue: @""];
/* reset the wizard-window to its default values */
[o_userSelections removeAllObjects];
[o_t1_matrix_strmgOrTrnscd selectCellAtRow:0 column:0];
[[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setState: NSOffState];
[o_btn_forward setTitle: _NS("Next")];
/* "Input" */
[o_t2_fld_pathToNewStrm setStringValue: @""];
[o_t2_ckb_enblPartExtrct setState: NSOffState];
[self t2_enableExtract:nil];
[o_t2_matrix_inputSourceType selectCellAtRow:0 column:0];
[[o_t2_matrix_inputSourceType cellAtRow:1 column:0] setState: NSOffState];
/* FIXME: we need to refresh the playlist-table as well */
[o_t2_tbl_plst setEnabled:NO];
[o_t2_fld_pathToNewStrm setEnabled:YES];
[o_t2_btn_chooseFile setEnabled:YES];
/* "Streaming 1" */
[o_t3_fld_address setStringValue: @""];
[o_t3_matrix_stmgMhd selectCellAtRow:0 column:0];
[[o_t3_matrix_stmgMhd cellAtRow:1 column:1] setState: NSOffState];
[[o_t3_matrix_stmgMhd cellAtRow:1 column:2] setState: NSOffState];
/* "Transcode 1" */
[o_t4_ckb_audio setState: NSOffState];
[o_t4_ckb_video setState: NSOffState];
[self t4_enblVidTrnscd:nil];
[self t4_enblAudTrnscd:nil];
/* "Streaming 2" */
[o_t6_fld_ttl setStringValue: @"1"];
[o_t6_ckb_sap setState: NSOffState];
[self t6_enblSapAnnce:nil];
/* "Transcode 2" */
[o_t7_fld_filePath setStringValue: @""];
}
- (void)initStrings
{
/* localise all strings to the users lang */
/* method is called from intf.m (in method openWizard) */
/* general items */
[o_btn_backward setTitle: _NS("Back")];
[o_btn_cancel setTitle: _NS("Cancel")];
[o_btn_forward setTitle: _NS("Next")];
[o_wizard_window setTitle: _NS("Streaming/Transcoding Wizard")];
/* page one ("Hello") */
[o_t1_txt_title setStringValue: _NS("Streaming/Transcoding Wizard")];
[o_t1_txt_text setStringValue: _NS("This wizard helps you to stream, transcode or save a stream.")];
[o_t1_btn_mrInfo_strmg setTitle: _NS("More Info")];
[o_t1_btn_mrInfo_trnscd setTitle: _NS("More Info")];
[o_t1_txt_notice setStringValue: _NS("This wizard only gives access to a small subset of VLC's streaming and transcoding capabilities. Use the Open and Stream Output dialogs to get all of them.")];
[[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle: _NS("Stream to network")];
[[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle: _NS("Stream to network")];
[[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setTitle: _NS("Transcode/Save to file")];
/* page two ("Input") */
[o_t2_title setStringValue: _NS("Choose input")];
[o_t2_text setStringValue: _NS("Choose here your input stream.")];
......@@ -303,7 +303,7 @@ static VLCWizard *_o_sharedInstance = nil;
"Enter the starting and ending times (in seconds).")];
[o_t2_txt_prtExtrctFrom setStringValue: _NS("From")];
[o_t2_txt_prtExtrctTo setStringValue: _NS("To")];
/* page three ("Streaming 1") */
[o_t3_txt_title setStringValue: _NS("Streaming")];
[o_t3_txt_text setStringValue: _NS("In this page, you will select how your input stream will be sent.")];
......@@ -312,8 +312,8 @@ static VLCWizard *_o_sharedInstance = nil;
[o_t3_txt_destInfo setStringValue: _NS("Enter the address of the computer to stream to.")];
[[o_t3_matrix_stmgMhd cellAtRow:1 column:0] setTitle: _NS("UDP Unicast")];
[[o_t3_matrix_stmgMhd cellAtRow:1 column:1] setTitle: _NS("UDP Multicast")];
[o_t3_txt_strgMthdInfo setStringValue: _NS("Use this to stream to a single computer.")];
[o_t3_txt_strgMthdInfo setStringValue: _NS("Use this to stream to a single computer.")];
/* page four ("Transcode 1") */
[o_t4_title setStringValue: _NS("Transcode")];
[o_t4_text setStringValue: _NS("If you want to change the compression format of the audio or video tracks, fill in this page. (If you only want to change the container format, proceed to next page.)")];
......@@ -327,13 +327,13 @@ static VLCWizard *_o_sharedInstance = nil;
"transcode it, enable this.")];
[o_t4_txt_hintVideo setStringValue: _NS("If your stream has video and you want to " \
"transcode it, enable this.")];
/* page five ("Encap") */
[o_t5_title setStringValue: _NS("Encapsulation format")];
[o_t5_text setStringValue: _NS("In this page, you will select how the stream will be "\
"encapsulated. Depending on the choices you made, all "\
"formats won't be available.")];
/* page six ("Streaming 2") */
[o_t6_title setStringValue: _NS("Additional streaming options")];
[o_t6_text setStringValue: _NS("In this page, you will define a few " \
......@@ -342,30 +342,30 @@ static VLCWizard *_o_sharedInstance = nil;
[o_t6_btn_mrInfo_ttl setTitle: _NS("More Info")];
[o_t6_ckb_sap setTitle: _NS("SAP Announce")];
[o_t6_btn_mrInfo_sap setTitle: _NS("More Info")];
/* page seven ("Transcode 2") */
[o_t7_title setStringValue: _NS("Additional transcode options")];
[o_t7_text setStringValue: _NS("In this page, you will define a few " \
"additionnal parameters for your transcoding.")];
[o_t7_txt_saveFileTo setStringValue: _NS("Select the file to save to")];
[o_t7_btn_chooseFile setTitle: _NS("Choose...")];
/* page eight ("Summary") */
[o_t8_txt_text setStringValue: _NS("This page lists all your selections. " \
"Click \"Finish\" to start your streaming or transcoding.")];
/* page eight ("Summary") */
[o_t8_txt_text setStringValue: _NS("This page lists all your selections. " \
"Click \"Finish\" to start your streaming or transcoding.")];
[o_t8_txt_title setStringValue: _NS("Summary")];
[o_t8_txt_destination setStringValue: [_NS("Destination") stringByAppendingString: @":"]];
[o_t8_txt_destination setStringValue: [_NS("Destination") stringByAppendingString: @":"]];
[o_t8_txt_encapFormat setStringValue: [_NS("Encap. format") stringByAppendingString: @":"]];
[o_t8_txt_inputStream setStringValue: [_NS("Input stream") stringByAppendingString: @":"]];
[o_t8_txt_inputStream setStringValue: [_NS("Input stream") stringByAppendingString: @":"]];
[o_t8_txt_partExtract setStringValue: [_NS("Partial Extract") stringByAppendingString: @":"]];
[o_t8_txt_sap setStringValue: [_NS("SAP Announce") stringByAppendingString: @":"]];
[o_t8_txt_saveFileTo setStringValue: [_NS("Save file to") stringByAppendingString: @":"]];
[o_t8_txt_strmgMthd setStringValue: [_NS("Streaming method") stringByAppendingString: @":"]];
[o_t8_txt_trnscdAudio setStringValue: [_NS("Transcode audio") stringByAppendingString: @":"]];
[o_t8_txt_trnscdVideo setStringValue: [_NS("Transcode video") stringByAppendingString: @":"]];
/* wizard help window */
[o_wh_btn_okay setTitle: _NS("OK")];
/* wizard help window */
[o_wh_btn_okay setTitle: _NS("OK")];
}
- (IBAction)cancelRun:(id)sender
......@@ -375,63 +375,63 @@ static VLCWizard *_o_sharedInstance = nil;
- (IBAction)nextTab:(id)sender
{
if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Hello"])
{
/* check whether the user wants to stream or just to transcode;
* store information for later usage */
NSString *o_mode;
o_mode = [[o_t1_matrix_strmgOrTrnscd selectedCell] title];
if( [o_mode isEqualToString: _NS("Stream to network")] )
{
[o_userSelections setObject:@"strmg" forKey:@"trnscdOrStrmg"];
}else{
[o_userSelections setObject:@"trnscd" forKey:@"trnscdOrStrmg"];
}
[o_btn_backward setEnabled:YES];
[o_tab_pageHolder selectTabViewItemAtIndex:1];
}
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Input"])
{
/* check whether partialExtract is enabled and store the values, if needed */
if ([o_t2_ckb_enblPartExtrct state] == NSOnState)
{
[o_userSelections setObject:@"YES" forKey:@"partExtract"];
[o_userSelections setObject:[o_t2_fld_prtExtrctFrom stringValue] forKey:@"partExtractFrom"];
[o_userSelections setObject:[o_t2_fld_prtExtrctTo stringValue] forKey:@"partExtractTo"];
}else{
[o_userSelections setObject:@"NO" forKey:@"partExtract"];
}
/* check whether we use an existing pl-item or add an new one;
* store the path or the index and set a flag.
* complain to the user if s/he didn't provide a path */
NSString *o_mode;
BOOL stop;
stop = NO;
o_mode = [[o_t2_matrix_inputSourceType selectedCell] title];
if( [o_mode isEqualToString: _NS("Select a stream")] )
{
[o_userSelections setObject:@"YES" forKey:@"newStrm"];
if ([[o_t2_fld_pathToNewStrm stringValue] isEqualToString: @""])
{
if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Hello"])
{
/* check whether the user wants to stream or just to transcode;
* store information for later usage */
NSString *o_mode;
o_mode = [[o_t1_matrix_strmgOrTrnscd selectedCell] title];
if( [o_mode isEqualToString: _NS("Stream to network")] )
{
[o_userSelections setObject:@"strmg" forKey:@"trnscdOrStrmg"];