Commit 8e4bbaa9 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* implemented transcoding when streaming -- might need some testing, if anyone...

* implemented transcoding when streaming -- might need some testing, if anyone on OSX got the time (refs #271)
parent 06b6f0f6
...@@ -171,6 +171,7 @@ ...@@ -171,6 +171,7 @@
- (void)showSummary; - (void)showSummary;
- (void)resetWizard; - (void)resetWizard;
- (void)createOpts; - (void)createOpts;
- (void)rebuildCodecMenus;
- (id)getPlaylistWizard; - (id)getPlaylistWizard;
@end @end
...@@ -27,11 +27,6 @@ ...@@ -27,11 +27,6 @@
* ../wxwindows/streamdata.h; both written by Clment Stenac. * ../wxwindows/streamdata.h; both written by Clment Stenac.
*****************************************************************************/ *****************************************************************************/
/* TODO:
- fill the playlist-table on t2
- see FIXME's
*/
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
...@@ -139,11 +134,11 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -139,11 +134,11 @@ static VLCWizard *_o_sharedInstance = nil;
_NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"), \ _NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"), \
@"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", \ @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", \
@"NO", @"NO", nil]; @"NO", @"NO", nil];
o_h263 = [NSArray arrayWithObjects: @"H 263", @"H263", \ o_h263 = [NSArray arrayWithObjects: @"H.263", @"H263", \
_NS("H263 is a video codec optimized for videoconference " \ _NS("H263 is a video codec optimized for videoconference " \
"(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO", \ "(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO", \
@"NO", @"NO", @"NO", @"NO", @"NO", nil]; @"NO", @"NO", @"NO", @"NO", @"NO", nil];
o_h264 = [NSArray arrayWithObjects: @"H 264", @"H264", \ o_h264 = [NSArray arrayWithObjects: @"H.264", @"H264", \
_NS("H264 is a new video codec (useable with MPEG TS and MP4)"), \ _NS("H264 is a new video codec (useable with MPEG TS and MP4)"), \
@"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", \ @"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", \
@"NO", nil]; @"NO", nil];
...@@ -169,15 +164,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -169,15 +164,7 @@ static VLCWizard *_o_sharedInstance = nil;
o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v, \ 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_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo, \
o_dummyVid, nil]; 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_mpga;
NSArray * o_mp3; NSArray * o_mp3;
...@@ -227,13 +214,6 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -227,13 +214,6 @@ static VLCWizard *_o_sharedInstance = nil;
@"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV", nil]; @"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV", nil];
o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a, \ 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_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 /* fill another global array with all information about the encap-formats
...@@ -574,6 +554,10 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -574,6 +554,10 @@ static VLCWizard *_o_sharedInstance = nil;
[o_tab_pageHolder selectTabViewItemAtIndex:2]; [o_tab_pageHolder selectTabViewItemAtIndex:2];
}else{ }else{
/* we are just transcoding */ /* we are just transcoding */
/* rebuild the menues for the codec-selections */
[self rebuildCodecMenus];
[o_tab_pageHolder selectTabViewItemAtIndex:3]; [o_tab_pageHolder selectTabViewItemAtIndex:3];
} }
} else { } else {
...@@ -588,40 +572,39 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -588,40 +572,39 @@ static VLCWizard *_o_sharedInstance = nil;
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \ else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
@"Streaming 1"]) @"Streaming 1"])
{ {
/* rebuild the menues for the codec-selections */
[self rebuildCodecMenus];
/* check which streaming method is selected and store it */ /* check which streaming method is selected and store it */
NSString *o_mode; NSString *o_mode;
o_mode = [[o_t3_matrix_stmgMhd selectedCell] title]; o_mode = [[o_t3_matrix_stmgMhd selectedCell] title];
if( [o_mode isEqualToString: @"HTTP"] ) if( [o_mode isEqualToString: @"HTTP"] )
{ {
[o_userSelections setObject:@"0" forKey:@"stmgMhd"]; [o_userSelections setObject:@"0" forKey:@"stmgMhd"];
/* enable MPEG PS, MPEG TS, MPEG 1, OGG, RAW and ASF; select MPEG PS */
[[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES]; /* disable all codecs which don't support MPEG PS, MPEG TS, MPEG 1,
[[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES]; * OGG, RAW or ASF */
[[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES]; [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
[[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES]; [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating"];
[[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];
[[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];
[[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];
[o_t5_matrix_encap selectCellAtRow:0 column:0];
} else if ([o_mode isEqualToString: @"MMS"]) } else if ([o_mode isEqualToString: @"MMS"])
{ {
[o_userSelections setObject:@"1" forKey:@"stmgMhd"]; [o_userSelections setObject:@"1" forKey:@"stmgMhd"];
[[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:NO]; /* disable all codecs which don't support ASF / ASFH */
[[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"MPEG 4 Audio"];
[[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"];
[[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"FLAC"];
[[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Speex"];
[[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating"];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO]; [o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-1 Video"];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:YES]; [o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-2 Video"];
[o_t5_matrix_encap selectCellAtRow:10 column:0]; [o_t4_pop_videoCodec removeItemWithTitle:@"H.263"];
[o_t4_pop_videoCodec removeItemWithTitle:@"H.264"];
[o_t4_pop_videoCodec removeItemWithTitle:@"MJPEG"];
[o_t4_pop_videoCodec removeItemWithTitle:@"Theora"];
} else { } else {
if( [o_mode isEqualToString: _NS("UDP Unicast")] ) if( [o_mode isEqualToString: _NS("UDP Unicast")] )
{ {
...@@ -629,19 +612,13 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -629,19 +612,13 @@ static VLCWizard *_o_sharedInstance = nil;
} else { } else {
[o_userSelections setObject:@"3" forKey:@"stmgMhd"]; [o_userSelections setObject:@"3" forKey:@"stmgMhd"];
} }
/* disable all encap-formats but MPEG-TS and select it */
[[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO]; /* disable all codecs which don't support MPEG-TS */
[[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"];
[[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"FLAC"];
[[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Speex"];
[[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
[[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO]; [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating"];
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
[o_t5_matrix_encap selectCellAtRow:1 column:0];
} }
/* store the destination and check whether is it empty */ /* store the destination and check whether is it empty */
...@@ -662,14 +639,14 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -662,14 +639,14 @@ static VLCWizard *_o_sharedInstance = nil;
/* FIXME: check whether the entered IP is really valid */ /* FIXME: check whether the entered IP is really valid */
[o_userSelections setObject:[o_t3_fld_address stringValue] \ [o_userSelections setObject:[o_t3_fld_address stringValue] \
forKey:@"stmgDest"]; forKey:@"stmgDest"];
/* let's go to the encap-tab */ /* let's go to the transcode-1-tab */
[o_tab_pageHolder selectTabViewItemAtIndex:4]; [o_tab_pageHolder selectTabViewItemAtIndex:3];
} }
} else { } else {
[o_userSelections setObject:[o_t3_fld_address stringValue] \ [o_userSelections setObject:[o_t3_fld_address stringValue] \
forKey:@"stmgDest"]; forKey:@"stmgDest"];
/* let's go to the encap-tab */ /* let's go to the transcode-1-tab */
[o_tab_pageHolder selectTabViewItemAtIndex:4]; [o_tab_pageHolder selectTabViewItemAtIndex:3];
} }
} }
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \ else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
...@@ -714,6 +691,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -714,6 +691,7 @@ static VLCWizard *_o_sharedInstance = nil;
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO]; [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO]; [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO]; [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];
/* re-enable the encap-formats supported by the chosen codecs */ /* re-enable the encap-formats supported by the chosen codecs */
/* FIXME: the following is a really bad coding-style. feel free to mail /* FIXME: the following is a really bad coding-style. feel free to mail
...@@ -977,8 +955,51 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -977,8 +955,51 @@ static VLCWizard *_o_sharedInstance = nil;
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO]; [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO]; [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO]; [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];
[o_t5_matrix_encap selectCellAtRow:0 column:0]; [o_t5_matrix_encap selectCellAtRow:0 column:0];
} }
if ([o_userSelections objectForKey:@"stmgMhd"] == @"1")
{
/* if MMS is the streaming protocol, only ASFH is available */
[[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:YES];
[o_t5_matrix_encap selectCellAtRow:10 column:0];
}
else if ([o_userSelections objectForKey:@"stmgMhd"] == @"0")
{
/* if HTTP is the streaming protocol, disable all unsupported
* encap-formats, but don't touch the other ones selected above */
[[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];
}
else if ([o_userSelections objectForKey:@"stmgMhd"] >= @"2")
{
/* if UDP is the streaming protocol, only MPEG-TS is available */
[[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];
[[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
[o_t5_matrix_encap selectCellAtRow:1 column:0];
}
int x; int x;
BOOL anythingEnabled; BOOL anythingEnabled;
x = 0; x = 0;
...@@ -993,6 +1014,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -993,6 +1014,7 @@ static VLCWizard *_o_sharedInstance = nil;
} }
if (anythingEnabled == YES) if (anythingEnabled == YES)
{ {
/* go the encap-tab */
[o_tab_pageHolder selectTabViewItemAtIndex:4]; [o_tab_pageHolder selectTabViewItemAtIndex:4];
} else { } else {
/* show a sheet that the selected codecs are not compatible */ /* show a sheet that the selected codecs are not compatible */
...@@ -1103,6 +1125,27 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1103,6 +1125,27 @@ static VLCWizard *_o_sharedInstance = nil;
} }
} }
- (void)rebuildCodecMenus
{
[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);
}
[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);
}
}
- (void)showSummary - (void)showSummary
{ {
[o_btn_forward setTitle: _NS("Finish")]; [o_btn_forward setTitle: _NS("Finish")];
...@@ -1183,11 +1226,10 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1183,11 +1226,10 @@ static VLCWizard *_o_sharedInstance = nil;
- (void) createOpts - (void) createOpts
{ {
NSMutableString * o_opts_string = [NSMutableString stringWithString:@""]; NSMutableString * o_opts_string = [NSMutableString stringWithString:@""];
if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"trnscd"])
{
/* we are just transcoding and dumping the stuff to a file */
NSMutableString *o_trnscdCmd = [NSMutableString stringWithString:@""]; NSMutableString *o_trnscdCmd = [NSMutableString stringWithString:@""];
/* check whether we transcode the audio and/or the video and compose a
* string reflecting the settings, if needed */
if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualToString:@"YES"]) if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualToString:@"YES"])
{ {
[o_trnscdCmd appendString: @"transcode{"]; [o_trnscdCmd appendString: @"transcode{"];
...@@ -1216,6 +1258,10 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1216,6 +1258,10 @@ static VLCWizard *_o_sharedInstance = nil;
intValue]] objectAtIndex:1] UTF8String], [[o_userSelections \ intValue]] objectAtIndex:1] UTF8String], [[o_userSelections \
objectForKey:@"trnscdAudioBitrate"] intValue]]; objectForKey:@"trnscdAudioBitrate"] intValue]];
} }
if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"trnscd"])
{
/* we are just transcoding and dumping the stuff to a file */
[o_opts_string appendFormat: @":sout=#%sstandard{mux=%s,url=%s,access=file}", \ [o_opts_string appendFormat: @":sout=#%sstandard{mux=%s,url=%s,access=file}", \
[o_trnscdCmd UTF8String], [[[o_encapFormats objectAtIndex: \ [o_trnscdCmd UTF8String], [[[o_encapFormats objectAtIndex: \
[[o_userSelections objectForKey:@"encapFormat"] intValue]] \ [[o_userSelections objectForKey:@"encapFormat"] intValue]] \
...@@ -1224,7 +1270,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1224,7 +1270,7 @@ static VLCWizard *_o_sharedInstance = nil;
} else { } else {
/* we are streaming - no transcoding allowed atm, since we mirror the wx-wizard */ /* we are streaming */
if ([[o_userSelections objectForKey:@"sap"] isEqualToString:@"YES"]) if ([[o_userSelections objectForKey:@"sap"] isEqualToString:@"YES"])
{ {
/* SAP-Announcement is requested */ /* SAP-Announcement is requested */
...@@ -1236,21 +1282,22 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1236,21 +1282,22 @@ static VLCWizard *_o_sharedInstance = nil;
[o_sap_option appendFormat: @"sap,name=\"%s\"",[[o_userSelections \ [o_sap_option appendFormat: @"sap,name=\"%s\"",[[o_userSelections \
objectForKey:@"sapText"] UTF8String]]; objectForKey:@"sapText"] UTF8String]];
} }
[o_opts_string appendFormat: @":sout=#standard{mux=%s,url=%s,access=%s,%s}", \ [o_opts_string appendFormat: @":sout=#%sstandard{mux=%s,url=%s,access=%s,%s}", \
[[[o_encapFormats objectAtIndex:[[o_userSelections objectForKey: \ [o_trnscdCmd UTF8String], [[[o_encapFormats objectAtIndex: \
@"encapFormat"] intValue]] objectAtIndex:0] UTF8String], \ [[o_userSelections objectForKey: @"encapFormat"] intValue]] \
[[o_userSelections objectForKey:@"stmgDest"] UTF8String], \ objectAtIndex:0] UTF8String], [[o_userSelections objectForKey: \
[[[o_strmgMthds objectAtIndex:[[o_userSelections objectForKey: \ @"stmgDest"] UTF8String], [[[o_strmgMthds objectAtIndex: \
@"stmgMhd"] intValue]] objectAtIndex:0] UTF8String], \ [[o_userSelections objectForKey: @"stmgMhd"] intValue]] \
[o_sap_option UTF8String]]; objectAtIndex:0] UTF8String], [o_sap_option UTF8String]];
} else { } else {
/* no SAP, just streaming */ /* no SAP, just streaming */
[o_opts_string appendFormat: @":sout=#standard{mux=%s,url=%s,access=%s}", \ [o_opts_string appendFormat: @":sout=#%sstandard{mux=%s,url=%s,access=%s}", \
[[[o_encapFormats objectAtIndex:[[o_userSelections objectForKey: \ [o_trnscdCmd UTF8String], [[[o_encapFormats objectAtIndex: \
@"encapFormat"] intValue]] objectAtIndex:0] UTF8String], \ [[o_userSelections objectForKey: @"encapFormat"] intValue]] \
[[o_userSelections objectForKey:@"stmgDest"] UTF8String], \ objectAtIndex:0] UTF8String], [[o_userSelections objectForKey: \
[[[o_strmgMthds objectAtIndex:[[o_userSelections objectForKey: \ @"stmgDest"] UTF8String], [[[o_strmgMthds objectAtIndex: \
@"stmgMhd"] intValue]] objectAtIndex:0] UTF8String]]; [[o_userSelections objectForKey: @"stmgMhd"] intValue]] \
objectAtIndex:0] UTF8String]];
} }
} }
...@@ -1288,17 +1335,9 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1288,17 +1335,9 @@ static VLCWizard *_o_sharedInstance = nil;
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \ else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
@"Encap"]) @"Encap"])
{ {
/* check whether we are streaming or transcoding and go back */ /* show "Transcode 1" */
if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString: \
@"strmg"])
{
/* show "Streaming 1" */
[o_tab_pageHolder selectTabViewItemAtIndex:2];
}else{
/* show "Transcode 2" */
[o_tab_pageHolder selectTabViewItemAtIndex:3]; [o_tab_pageHolder selectTabViewItemAtIndex:3];
} }
}
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \ else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
@"Streaming 1"]) @"Streaming 1"])
{ {
...@@ -1308,9 +1347,15 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1308,9 +1347,15 @@ static VLCWizard *_o_sharedInstance = nil;
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \ else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
@"Transcode 1"]) @"Transcode 1"])
{ {
if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"strmg"])
{
/* show "Streaming 1" */
[o_tab_pageHolder selectTabViewItemAtIndex:2];
}else{
/* show "Input" */ /* show "Input" */
[o_tab_pageHolder selectTabViewItemAtIndex:1]; [o_tab_pageHolder selectTabViewItemAtIndex:1];
} }
}
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \ else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
@"Input"]) @"Input"])
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment