- (void)resetWizard
{
- /* get the current state of our setting to keep the selections or not */
- b_keepSettingsOrNot = (BOOL)config_GetInt( VLCIntf, "macosx-wizard-keep" );
-
/* go to the front page and clean up a bit */
[o_userSelections removeAllObjects];
[o_btn_forward setTitle: _NS("Next")];
[o_tab_pageHolder selectFirstTabViewItem:self];
-
-
- if( b_keepSettingsOrNot )
- return;
-
- /* reset the wizard-window to its default values if wanted */
- [o_t1_matrix_strmgOrTrnscd selectCellAtRow:0 column:0];
- [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setState: NSOffState];
-
- /* "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];
- [o_t2_fld_pathToNewStrm setEnabled:YES];
- [o_t2_btn_chooseFile setEnabled:YES];
- [o_t2_tbl_plst setEnabled:NO];
-
- /* "Streaming 1" */
- [o_t3_fld_address setStringValue: @""];
- [o_t3_matrix_stmgMhd selectCellAtRow:0 column:0];
- [[o_t3_matrix_stmgMhd cellAtRow:0 column:1] setState: NSOffState];
- [[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
@"ttl=%@", [o_userSelections objectForKey:@"ttl"]]
UTF8String] );
+ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP,
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, pl_Unlocked );
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,
+ playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL,
p_item );
}
+ vlc_gc_decref( p_input );
x += 1;
}
objectAtIndex:0]];
x += 1;
}
- if( b_keepSettingsOrNot && savePreviousSel >= 0 )
+ if( savePreviousSel >= 0 )
[o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel];
savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem];
objectAtIndex:0]];
x += 1;
}
- if( b_keepSettingsOrNot && savePreviousSel >= 0 )
+ if( savePreviousSel >= 0 )
[o_t4_pop_audioCodec selectItemAtIndex: savePreviousSel];
}
[o_sap_option appendFormat: @"sap,name=\"%s\"",
[[o_userSelections objectForKey:@"sapText"] UTF8String]];
}
- [o_opts_string appendFormat:
- @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s,%s}",
- [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String],
- [[[o_encapFormats objectAtIndex: [[o_userSelections
- objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
- UTF8String], [[o_userSelections objectForKey: @"stmgDest"]
- UTF8String], [[[o_strmgMthds objectAtIndex: [[o_userSelections
- objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0]
- UTF8String], [o_sap_option UTF8String]];
+ if( [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] == @"rtp" )
+ {
+ /* RTP is no access out, but a stream out module */
+ [o_opts_string appendFormat:
+ @":sout=#%s%srtp{mux=%s,dst=%s,%s}",
+ [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String],
+ [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
+ UTF8String],
+ [[o_userSelections objectForKey: @"stmgDest"] UTF8String],
+ [o_sap_option UTF8String]];
+ }
+ else
+ {
+ [o_opts_string appendFormat:
+ @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s,%s}",
+ [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String],
+ [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
+ UTF8String],
+ [[o_userSelections objectForKey: @"stmgDest"] UTF8String],
+ [[[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0]
+ UTF8String],
+ [o_sap_option UTF8String]];
+ }
}
else
{
/* no SAP, just streaming */
- [o_opts_string appendFormat:
- @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s}",
- [o_duplicateCmd UTF8String], [o_trnscdCmd UTF8String],
- [[[o_encapFormats objectAtIndex: [[o_userSelections
- objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
- UTF8String], [[o_userSelections objectForKey:
- @"stmgDest"] UTF8String], [[[o_strmgMthds objectAtIndex:
- [[o_userSelections objectForKey: @"stmgMhd"] intValue]]
- objectAtIndex:0] UTF8String]];
+ if( [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] == @"rtp" )
+ {
+ /* RTP is different from the other protocols, as it isn't provided through an access out module anymore */
+ [o_opts_string appendFormat:
+ @":sout=#%s%srtp{mux=%s,dst=%s}",
+ [o_duplicateCmd UTF8String],
+ [o_trnscdCmd UTF8String],
+ [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
+ UTF8String],
+ [[o_userSelections objectForKey: @"stmgDest"] UTF8String]];
+ }
+ else
+ {
+ /* all other protocols are cool */
+ [o_opts_string appendFormat:
+ @":sout=#%s%sstandard{mux=%s,dst=%s,access=%s}",
+ [o_duplicateCmd UTF8String],
+ [o_trnscdCmd UTF8String],
+ [[[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0]
+ UTF8String],
+ [[o_userSelections objectForKey: @"stmgDest"] UTF8String],
+ [[[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] UTF8String]];
+ }
}
}