*****************************************************************************/
#import "wizard.h"
#import "intf.h"
-#import "network.h"
#import "playlist.h"
-#import <vlc/intf.h>
+#import <vlc_interface.h>
/*****************************************************************************
* VLCWizard implementation
" MPEG1, ASF and OGG)"), @"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 (useable with MPEG TS)"), \
- @"MUX_TS", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", nil];
+ _NS("Theora is a free general-purpose codec (useable with MPEG TS " \
+ "and OGG)"), @"MUX_TS", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", \
+ @"NO", @"NO", nil];
o_dummyVid = [NSArray arrayWithObjects: @"Dummy", @"dummy", \
_NS("Dummy codec (do not transcode, useable with all encapsulation " \
"formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", \
o_s16l = [NSArray arrayWithObjects: @"Uncompressed, integer", @"s16l", \
_NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV", \
@"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
- o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating", @"fl32", \
+ o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating point", @"fl32", \
_NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV", \
@"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
o_dummyAud = [NSArray arrayWithObjects: @"Dummy", @"dummy", \
NSArray * o_rtp_uni;
NSArray * o_rtp_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 " \
+ "addresses you want to listen requests on. Do not enter anything if " \
+ "you want to listen on all the network interfaces. 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];
+ "computers. This method is not the most efficient, as the server needs "\
+ "to send the stream several times, but generally the most compatible"), nil];
o_mms = [NSArray arrayWithObjects: @"mmsh", @"MMS", _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 " \
+ "addresses you want to listen requests on. Do not enter anything if " \
+ "you want to listen on all the network interfaces. This is generally " \
"the best thing to do. Other computers can then access the stream at " \
"mms://yourip:8080 by default."), _NS("Use this to stream to several " \
"computers using the Microsoft MMS protocol. This protocol is used as " \
"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];
+ "won't work over the Internet."), nil];
o_rtp_uni = [NSArray arrayWithObjects: @"rtp", @"RTP-Unicast", _NS("Enter the " \
"address of the computer to stream to.") , _NS("Use this to stream " \
- "to a single computer."), nil];
+ "to a single computer. RTP headers will be added to the stream"), nil];
o_rtp_multi = [NSArray arrayWithObjects: @"rtp", @"RTP-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];
+ "won't work over Internet. RTP headers will be added to the stream"), nil];
o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_mms, \
o_udp_uni, o_udp_multi, o_rtp_uni, o_rtp_multi, nil];
}
- (void)resetWizard
{
/* get the current state of our setting to keep the selections or not */
- keepSettingsOrNot = (BOOL *)config_GetInt( VLCIntf, "macosx-wizard-keep" );
+ b_keepSettingsOrNot = (BOOL)config_GetInt( VLCIntf, "macosx-wizard-keep" );
/* go to the front page and clean up a bit */
[o_userSelections removeAllObjects];
[o_tab_pageHolder selectFirstTabViewItem:self];
- if( keepSettingsOrNot )
+ if( b_keepSettingsOrNot )
return;
/* reset the wizard-window to its default values if wanted */
/* 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_txt_text setStringValue: _NS("This wizard allows to configure " \
+ "simple streaming or transcoding setups.")];
[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.")];
+ "The Open and 'Saving/Streaming' dialogs will give access to more " \
+ "features.")];
[[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle: _NS("Stream " \
"to network")];
[[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setTitle: _NS("" \
setStringValue: _NS("Author")];
[o_t2_box_prtExtrct setTitle: _NS("Partial Extract")];
[o_t2_ckb_enblPartExtrct setTitle: _NS("Enable")];
- [o_t2_ckb_enblPartExtrct setToolTip: _NS("Use this to read only a part of "\
- "the stream. You must be able to control the incoming stream " \
- "(for example, a file or a disc, but not an UDP network stream.) " \
- "Enter the starting and ending times (in seconds).")];
+ [o_t2_ckb_enblPartExtrct setToolTip: _NS("This can be used to read only a "\
+ "part of the stream. It must be possible to control the incoming "\
+ "stream (for example, a file or a disc, but not an UDP network stream.) " \
+ "The starting and ending times can be given 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.")];
+ [o_t3_txt_text setStringValue: _NS("This page allows to select how " \
+ "the input stream will be sent.")];
[o_t3_box_dest setTitle: _NS("Destination")];
[o_t3_box_strmgMthd setTitle: _NS("Streaming method")];
- [o_t3_txt_destInfo setStringValue: _NS("Enter the address of the computer " \
+ [o_t3_txt_destInfo setStringValue: _NS("Address of the computer " \
"to stream to.")];
[[o_t3_matrix_stmgMhd cellAtRow:0 column:0] setTitle: _NS("UDP Unicast")];
[[o_t3_matrix_stmgMhd cellAtRow:0 column:1] setTitle: _NS("UDP Multicast")];
/* 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.)")];
+ [o_t4_text setStringValue: _NS("This page allows to change the compression " \
+ "format of the audio or video tracks. To change only " \
+ "the container format, proceed to next page.")];
[o_t4_box_audio setTitle: _NS("Audio")];
[o_t4_box_video setTitle: _NS("Video")];
[o_t4_ckb_audio setTitle: _NS("Transcode audio")];
[o_t4_ckb_video setTitle: _NS("Transcode video")];
[o_t4_txt_videoBitrate setStringValue: _NS("Bitrate (kb/s)")];
[o_t4_txt_videoCodec setStringValue: _NS("Codec")];
- [o_t4_txt_hintAudio setStringValue: _NS("If your stream has audio and you " \
- "want to transcode it, enable this.")];
- [o_t4_txt_hintVideo setStringValue: _NS("If your stream has video and you " \
- "want to transcode it, enable this.")];
+ [o_t4_txt_hintAudio setStringValue: _NS("Enabling this allows to transcode "\
+ "the audio track if one is present in the stream.")];
+ [o_t4_txt_hintVideo setStringValue: _NS("Enabling this allows to transcode "\
+ "the video track if one is present in the stream.")];
/* 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.")];
+ [o_t5_text setStringValue: _NS("This page allows to select how the " \
+ "stream will be encapsulated. Depending on previously chosen settings "
+ "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 " \
- "additional parameters for your stream.")];
+ [o_t6_text setStringValue: _NS("In this page, a few " \
+ "additional streaming parameters can be set.")];
[o_t6_txt_ttl setStringValue: _NS("Time-To-Live (TTL)")];
[o_t6_btn_mrInfo_ttl setTitle: _NS("More Info")];
[o_t6_ckb_sap setTitle: _NS("SAP Announce")];
/* 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 " \
- "additional parameters for your transcoding.")];
+ [o_t7_text setStringValue: _NS("In this page, a few " \
+ "additional transcoding parameters can be set.")];
[o_t7_txt_saveFileTo setStringValue: _NS("Select the file to save to")];
[o_t7_btn_chooseFile setTitle: _NS("Choose...")];
[o_t7_ckb_local setTitle: _NS("Local playback")];
[o_t7_btn_mrInfo_local setTitle: _NS("More Info")];
- [o_t7_txt_note_saveFolderTo setStringValue: _NS("Note that your input " \
- "files will keep their original names when being saved in the folder " \
- "you selected. Existing files may be overwritten.")];
/* 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_text setStringValue: _NS("This page lists all the settings." \
+ "Click \"Finish\" to start streaming or transcoding.")];
[o_t8_txt_title setStringValue: _NS("Summary")];
[o_t8_txt_destination setStringValue: [_NS("Destination") \
stringByAppendingString: @":"]];
NSMutableArray * tempArray = [[NSMutableArray alloc] init];
while( x != y )
{
- playlist_item_t *p_item =
+ playlist_item_t *p_item =
[[o_t2_tbl_plst itemAtRow:
[[o_t2_tbl_plst selectedRowIndexes]
indexGreaterThanOrEqualToIndex: x]] pointerValue];
if( p_item->i_children <= 0 )
{
[tempArray addObject: [NSString stringWithUTF8String:
- p_item->input.psz_uri]];
+ p_item->p_input->psz_uri]];
stop = NO;
}
else
/* show a sheet that the user didn't select a file */
NSBeginInformationalAlertSheet(_NS("No input selected"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- _NS("You have selected neither a new stream nor a valid " \
- "playlist item. VLC is unable to guess, which input you " \
- "want use.\n\nChoose one before going to the next page."));
+ _NS("No new stream or valid playlist item has been selected.\n\n" \
+ "Choose one before going to the next page."));
}
}
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
/* disable all codecs which don't support MPEG PS, MPEG TS, MPEG 1,
* OGG, RAW or ASF */
[o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
- [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating"];
+ [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating point"];
} else if ( mode == 1 )
{
[o_t4_pop_audioCodec removeItemWithTitle:@"FLAC"];
[o_t4_pop_audioCodec removeItemWithTitle:@"Speex"];
[o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
- [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating"];
+ [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating point"];
[o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-1 Video"];
[o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-2 Video"];
[o_t4_pop_videoCodec removeItemWithTitle:@"Theora"];
} else {
/* RTP/UDP Unicast/Multicast Streaming */
-
[o_userSelections setObject: [[NSNumber numberWithInt: mode] \
stringValue] forKey:@"stmgMhd"];
[o_t4_pop_audioCodec removeItemWithTitle:@"FLAC"];
[o_t4_pop_audioCodec removeItemWithTitle:@"Speex"];
[o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
- [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating"];
+ [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating point"];
}
/* store the destination and check whether is it empty */
/* complain to the user that "" is no valid dest. */
NSBeginInformationalAlertSheet(_NS("No valid destination"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- _NS("You need to enter a valid destination you want to "\
- "stream to. Enter either a Unicast-IP or a Multicast-IP." \
+ _NS("A valid destination has to be selected "\
+ "Enter either a Unicast-IP or a Multicast-IP." \
"\n\nIf you don't know what this means, have a look at " \
"the VLC Streaming HOWTO and the help texts in this " \
"window."));
} else {
/* show a sheet that the selected codecs are not compatible */
NSBeginInformationalAlertSheet(_NS("Invalid selection"), _NS("OK"), \
- @"", @"", o_wizard_window, nil, nil, nil, nil, _NS("Your " \
+ @"", @"", o_wizard_window, nil, nil, nil, nil, _NS("The " \
"chosen codecs are not compatible with each other. For example: " \
- "you cannot mix uncompressed audio with any video codec.\n\n" \
+ "It is impossibleto mix uncompressed audio with any video codec.\n\n" \
"Correct your selection and try again."));
}
if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
{
[o_t7_txt_saveFileTo setStringValue:
- _NS("Select the folder to save to")];
- [o_t7_txt_note_saveFolderTo setHidden: NO];
+ _NS("Select the directory to save to")];
}
else
{
[o_t7_txt_saveFileTo setStringValue:
_NS("Select the file to save to")];
- [o_t7_txt_note_saveFolderTo setHidden: YES];
}
}
}
if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
NSBeginInformationalAlertSheet(_NS("No folder selected"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- [NSString stringWithFormat: @"%@\n\n%@", _NS("You you " \
- "need to select a folder, you want to save your files to."),
- _NS("Enter either a valid path or choose a location " \
- "through the button's dialog-box.")]);
+ [NSString stringWithFormat: @"%@\n\n%@", _NS("A directory "
+ "where to save the files has to be selected."),
+ _NS("Enter either a valid path or use the \"Choose...\" " \
+ "button to select a location.")]);
else
NSBeginInformationalAlertSheet(_NS("No file selected"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- [NSString stringWithFormat: @"%@\n\n%@", _NS("You you " \
- "need to select a file, you want to save to."),
- _NS("Enter either a valid path or choose a location " \
- "through the button's dialog-box.")]);
+ [NSString stringWithFormat: @"%@\n\n%@", _NS("A file " \
+ "where to save the stream has to be selected."),
+ _NS("Enter either a valid path or use the \"Choose\" " \
+ "button to select a location.")]);
} else {
+ /* create a string containing the requested suffix for later usage */
+ NSString * theEncapFormat = [[o_encapFormats objectAtIndex:
+ [[o_userSelections objectForKey:@"encapFormat"] intValue]] \
+ objectAtIndex:0];
+ if( theEncapFormat == @"ps" )
+ theEncapFormat = @"mpg";
+
+ /* look whether we need to process multiple items or not.
+ * choose a faster variant if we just want a single item */
if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
{
NSMutableArray * tempArray = [[NSMutableArray alloc] init];
- NSString * theEncapFormat = [[o_encapFormats objectAtIndex: \
- [[o_userSelections objectForKey:@"encapFormat"] intValue]] \
- objectAtIndex:0];
- if( theEncapFormat == @"ps" )
- theEncapFormat = @"mpg";
int x = 0;
int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
+ NSMutableString * tempString = [[NSMutableString alloc] init];
while( x != y )
{
- [tempArray addObject:[NSString stringWithFormat: @"%@%@.%@",
+ NSString * fileNameToUse;
+ /* check whether the extension is hidden or not.
+ * if not, remove it
+ * we need the casting to make GCC4 happy */
+ if( [[[NSFileManager defaultManager] fileAttributesAtPath: \
+ [[o_userSelections objectForKey:@"pathToStrm"] \
+ objectAtIndex: x] traverseLink: NO] objectForKey: \
+ NSFileExtensionHidden] )
+ fileNameToUse = [NSString stringWithString:
+ [[NSFileManager defaultManager] displayNameAtPath:
+ [[o_userSelections objectForKey:@"pathToStrm"]
+ objectAtIndex: x]]];
+ else
+ {
+ int z = 0;
+ int count = [[[[NSFileManager defaultManager] \
+ displayNameAtPath: \
+ [[o_userSelections objectForKey:@"pathToStrm"] \
+ objectAtIndex: x]] \
+ componentsSeparatedByString: @"."] count];
+ fileNameToUse = @"";
+ while( z < (count - 1) )
+ {
+ fileNameToUse = [fileNameToUse stringByAppendingString:
+ [[[[NSFileManager defaultManager] \
+ displayNameAtPath: \
+ [[o_userSelections objectForKey:@"pathToStrm"] \
+ objectAtIndex: x]] \
+ componentsSeparatedByString: @"."] \
+ objectAtIndex: z]];
+ z += 1;
+ }
+ }
+ tempString = [NSString stringWithFormat: @"%@%@.%@",
[o_t7_fld_filePath stringValue],
- [[NSFileManager defaultManager] displayNameAtPath:
- [[o_userSelections objectForKey:@"pathToStrm"]
- objectAtIndex: x]],theEncapFormat]];
+ fileNameToUse, theEncapFormat];
+ if( [[NSFileManager defaultManager] fileExistsAtPath: \
+ tempString] )
+ {
+ /* we don't wanna overwrite existing files, so add an
+ * int to the file-name */
+ int additionalInt = 1;
+ while( additionalInt < 100 )
+ {
+ tempString = [NSString stringWithFormat:@"%@%@ %i.%@",
+ [o_t7_fld_filePath stringValue],
+ fileNameToUse, additionalInt, theEncapFormat];
+ if(! [[NSFileManager defaultManager] \
+ fileExistsAtPath: tempString] )
+ break;
+ additionalInt += 1;
+ }
+ if( additionalInt >= 100 )
+ msg_Err( VLCIntf, "Files with the same name are " \
+ "already present in the destination directory. " \
+ "Delete these files or choose a different directory." );
+ }
+ [tempArray addObject: [tempString retain]];
x += 1;
}
[o_userSelections setObject: [NSArray arrayWithArray:tempArray]
forKey: @"trnscdFilePath"];
[tempArray release];
+ [tempString release];
}
else
{
+ /* we don't need to check for existing items because Cocoa
+ * does that already when we are asking the user for a location
+ * to save her file */
[o_userSelections setObject: [NSArray arrayWithObject: \
[o_t7_fld_filePath stringValue]] forKey: @"trnscdFilePath"];
}
{
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = (playlist_t *)vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE);
- if( p_playlist )
+ playlist_t * p_playlist = pl_Yield( p_intf );
+
+ int x = 0;
+ int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
+ while( x != y )
{
- int x = 0;
- int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
- while( x != y )
+ /* we need a temp. variable here to work-around a GCC4-bug */
+ NSString *tempString = [NSString stringWithFormat: \
+ @"%@ (%i/%i)", _NS("Streaming/Transcoding Wizard"), \
+ ( x + 1 ), y];
+ input_item_t *p_input = input_ItemNew( p_playlist, \
+ [[[o_userSelections objectForKey:@"pathToStrm"] \
+ objectAtIndex:x] UTF8String], \
+ [tempString UTF8String] );
+ input_ItemAddOption( p_input, [[[o_userSelections \
+ objectForKey:@"opts"] objectAtIndex: x] UTF8String]);
+
+ if(! [[o_userSelections objectForKey:@"partExtractFrom"] \
+ isEqualToString:@""] )
{
- /* we need a temp. variable here to work-around a GCC4-bug */
- NSString *tempString = [NSString stringWithFormat: \
- @"%@ (%i/%i)", _NS("Streaming/Transcoding Wizard"), \
- ( x + 1 ), y];
- playlist_item_t *p_item = playlist_ItemNew( p_playlist, \
- [[[o_userSelections objectForKey:@"pathToStrm"] \
- objectAtIndex:x] UTF8String], \
- [tempString UTF8String] );
- playlist_ItemAddOption( p_item, [[[o_userSelections \
- objectForKey:@"opts"] objectAtIndex: x] UTF8String]);
-
- if(! [[o_userSelections objectForKey:@"partExtractFrom"] \
- isEqualToString:@""] )
- {
- playlist_ItemAddOption( p_item, [[NSString \
- stringWithFormat: @"start-time=%@", [o_userSelections \
- objectForKey: @"partExtractFrom"]] UTF8String] );
- }
+ input_ItemAddOption( p_input, [[NSString \
+ stringWithFormat: @"start-time=%@", [o_userSelections \
+ objectForKey: @"partExtractFrom"]] UTF8String] );
+ }
- if(! [[o_userSelections objectForKey:@"partExtractTo"] \
- isEqualToString:@""] )
- {
- playlist_ItemAddOption( p_item, [[NSString \
- stringWithFormat: @"stop-time=%@", [o_userSelections \
- objectForKey: @"partExtractTo"]] UTF8String] );
- }
+ if(! [[o_userSelections objectForKey:@"partExtractTo"] \
+ isEqualToString:@""] )
+ {
+ input_ItemAddOption( p_input, [[NSString \
+ stringWithFormat: @"stop-time=%@", [o_userSelections \
+ objectForKey: @"partExtractTo"]] UTF8String] );
+ }
- playlist_ItemAddOption( p_item, [[NSString stringWithFormat: \
- @"ttl=%@", [o_userSelections objectForKey:@"ttl"]] \
- UTF8String] );
+ input_ItemAddOption( p_input, [[NSString stringWithFormat: \
+ @"ttl=%@", [o_userSelections objectForKey:@"ttl"]] \
+ UTF8String] );
- playlist_AddItem( p_playlist, p_item, PLAYLIST_STOP, PLAYLIST_END );
-
- if( x == 0 )
- /* play the first item and add the others afterwards */
- playlist_Control( p_playlist, PLAYLIST_ITEMPLAY, p_item );
+ playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP,
+ PLAYLIST_END, VLC_TRUE );
- x += 1;
+ if( x == 0 )
+ {
+ /* play the first item and add the others afterwards */
+ playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, NULL,
+ p_item );
}
- playlist_ViewUpdate( p_playlist, VIEW_CATEGORY );
-
- vlc_object_release(p_playlist);
- } else {
- msg_Err( p_intf, "Uh Oh! Unable to find playlist!" );
+ x += 1;
}
+ vlc_object_release( p_playlist );
+
/* close the window, since we are done */
[o_wizard_window close];
}
objectAtIndex:0]];
x += 1;
}
- if( keepSettingsOrNot && savePreviousSel >= 0 )
+ if( b_keepSettingsOrNot && savePreviousSel >= 0 )
[o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel];
savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem];
objectAtIndex:0]];
x += 1;
}
- if( keepSettingsOrNot && savePreviousSel >= 0 )
+ if( b_keepSettingsOrNot && savePreviousSel >= 0 )
[o_t4_pop_audioCodec selectItemAtIndex: savePreviousSel];
}
[o_t8_fld_destination setStringValue: @"-"];
[o_t8_fld_ttl setStringValue: @"-"];
[o_t8_fld_sap setStringValue: @"-"];
- [o_t8_fld_saveFileTo setStringValue: [o_userSelections objectForKey: \
- @"trnscdFilePath"]];
+ /* do only show the destination of the first item and add a counter, if needed */
+ if( [[o_userSelections objectForKey: @"trnscdFilePath"] count] > 1 )
+ [o_t8_fld_saveFileTo setStringValue: \
+ [NSString stringWithFormat: @"%@ (+%i)", \
+ [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex:0], \
+ ([[o_userSelections objectForKey: @"trnscdFilePath"] count] - 1)]];
+ else
+ [o_t8_fld_saveFileTo setStringValue: \
+ [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex:0]];
}
[o_t8_fld_encapFormat setStringValue: [[o_encapFormats objectAtIndex: \
[[o_userSelections objectForKey:@"encapFormat"] intValue]] objectAtIndex:1]];
/* show a sheet for the help */
NSBeginInformationalAlertSheet(_NS("Stream to network"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- _NS("Use this to stream on a network."));
+ _NS("This allows to stream on a network."));
}
- (IBAction)t1_mrInfo_transcode:(id)sender
/* show a sheet for the help */
NSBeginInformationalAlertSheet(_NS("Transcode/Save to file"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- _NS("Use this to save a stream to a file. You "\
- "have the possibility to reencode the stream. You can save whatever "\
- "VLC can read.\nPlease notice that VLC is not very suited " \
- "for file to file transcoding. You should use its transcoding " \
- "features to save network streams, for example."));
+ _NS("This allows to save a stream to a file. The "\
+ "can be reencoded on the fly. Whatever "\
+ "VLC can read can be saved.\nPlease note that VLC is not very suited " \
+ "for file to file transcoding. Its transcoding " \
+ "features are however useful to save network streams, for example."));
}
- (IBAction)t2_addNewStream:(id)sender
{
[o_t4_pop_audioCodec setEnabled:YES];
[o_t4_pop_audioBitrate setEnabled:YES];
- [o_t4_txt_hintAudio setStringValue: _NS("Select your audio codec. "\
+ [o_t4_txt_hintAudio setStringValue: _NS("Select your audio codec. " \
"Click one to get more information.")];
} else {
[o_t4_pop_audioCodec setEnabled:NO];
[o_t4_pop_audioBitrate setEnabled:NO];
- [o_t4_txt_hintAudio setStringValue: _NS("If your stream has audio " \
- "and you want to transcode it, enable this.")];
+ [o_t4_txt_hintAudio setStringValue: _NS("Enabling this allows to transcode " \
+ "the audio track if one is present in the stream.")];
}
}
} else {
[o_t4_pop_videoCodec setEnabled:NO];
[o_t4_pop_videoBitrate setEnabled:NO];
- [o_t4_txt_hintVideo setStringValue: _NS("If your stream has video " \
- "and you want to transcode it, enable this.")];
+ [o_t4_txt_hintVideo setStringValue: _NS("Enabling this allows to transcode " \
+ "the video track if one is present in the stream.")];
+
}
}
/* show a sheet for the help */
NSBeginInformationalAlertSheet(_NS("Time-To-Live (TTL)"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- _NS("Define the TTL (Time-To-Live) of the stream. "\
+ _NS("This allows to define the TTL (Time-To-Live) of the stream. "\
"This parameter is the maximum number of routers your stream can " \
"go through. If you don't know what it means, or if you want to " \
"stream on your local network only, leave this setting to 1."));
/* show a sheet for the help */
NSBeginInformationalAlertSheet(_NS("SAP Announce"), \
_NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
- _NS("When streaming using UDP, you can " \
- "announce your streams using the SAP/SDP announcing protocol. This " \
+ _NS("When streaming using UDP, the streams can be " \
+ "announced using the SAP/SDP announcing protocol. This " \
"way, the clients won't have to type in the multicast address, it " \
"will appear in their playlist if they enable the SAP extra " \
"interface.\nIf you want to give a name to your stream, enter it " \