IBOutlet id o_t6_txt_ttl;
IBOutlet id o_t6_btn_mrInfo_ttl;
IBOutlet id o_t6_btn_mrInfo_sap;
+ IBOutlet id o_t6_btn_mrInfo_local;
+ IBOutlet id o_t6_ckb_local;
/* page seven ("Transcode 2") */
IBOutlet id o_t7_btn_chooseFile;
IBOutlet id o_t7_text;
IBOutlet id o_t7_title;
IBOutlet id o_t7_txt_saveFileTo;
+ IBOutlet id o_t7_btn_mrInfo_local;
+ IBOutlet id o_t7_ckb_local;
/* page eight ("Summary") */
IBOutlet id o_t8_fld_destination;
IBOutlet id o_t8_fld_trnscdVideo;
IBOutlet id o_t8_fld_ttl;
IBOutlet id o_t8_fld_mrl;
+ IBOutlet id o_t8_fld_local;
IBOutlet id o_t8_txt_destination;
IBOutlet id o_t8_txt_encapFormat;
IBOutlet id o_t8_txt_inputStream;
IBOutlet id o_t8_txt_trnscdVideo;
IBOutlet id o_t8_txt_ttl;
IBOutlet id o_t8_txt_mrl;
+ IBOutlet id o_t8_txt_local;
NSMutableDictionary * o_userSelections;
NSArray * o_videoCodecs;
- (IBAction)t6_enblSapAnnce:(id)sender;
- (IBAction)t6_mrInfo_ttl:(id)sender;
- (IBAction)t6_mrInfo_sap:(id)sender;
+- (IBAction)t67_mrInfo_local:(id)sender;
- (IBAction)t7_selectTrnscdDestFile:(id)sender;
- (IBAction)wh_closeSheet:(id)sender;
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 " \
+ [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.)\n" \
+ "(for example, a file or a disc, but not an UDP network stream.) " \
"Enter the starting and ending times (in seconds).")];
[o_t2_txt_prtExtrctFrom setStringValue: _NS("From")];
[o_t2_txt_prtExtrctTo setStringValue: _NS("To")];
/* 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.")];
+ "additional parameters for your transcoding.")];
[o_t7_txt_saveFileTo setStringValue: _NS("Select the file to save to")];
[o_t7_btn_chooseFile setTitle: _NS("Choose...")];
stringByAppendingString: @":"]];
[o_t8_txt_trnscdVideo setStringValue: [_NS("Transcode video") \
stringByAppendingString: @":"]];
+ [o_t8_txt_local setStringValue: [_NS("Local playback") \
+ stringByAppendingString: @":"]];
/* wizard help window */
[o_wh_btn_okay setTitle: _NS("OK")];
} else {
[o_userSelections setObject:@"NO" forKey:@"sap"];
}
-
+
+ /* local playback? */
+ if ([o_t6_ckb_local state] == NSOnState)
+ {
+ [o_userSelections setObject:@"YES" forKey:@"localPb"];
+ } else {
+ [o_userSelections setObject:@"NO" forKey:@"localPb"];
+ }
+
/* go to "Summary" */
[self showSummary];
}
else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
@"Transcode 2"])
{
+ /* local playback? */
+ if ([o_t7_ckb_local state] == NSOnState)
+ {
+ [o_userSelections setObject:@"YES" forKey:@"localPb"];
+ } else {
+ [o_userSelections setObject:@"NO" forKey:@"localPb"];
+ }
+
/* check whether the path != "" and store it */
if( [[o_t7_fld_filePath stringValue] isEqualToString: @""] )
{
{
[o_btn_forward setTitle: _NS("Finish")];
[o_t8_fld_inptStream setStringValue:[o_userSelections objectForKey:@"pathToStrm"]];
+
+ if ([[o_userSelections objectForKey:@"localPb"] isEqualToString: @"YES"])
+ {
+ [o_t8_fld_local setStringValue: _NS("yes")];
+ } else {
+ [o_t8_fld_local setStringValue: _NS("no")];
+ }
if ([[o_userSelections objectForKey:@"partExtract"] isEqualToString: @"YES"])
{
{
NSMutableString * o_opts_string = [NSMutableString stringWithString:@""];
NSMutableString *o_trnscdCmd = [NSMutableString stringWithString:@""];
+ NSMutableString *o_duplicateCmd = [NSMutableString stringWithString:@""];
/* check whether we transcode the audio and/or the video and compose a
* string reflecting the settings, if needed */
[o_trnscdCmd appendString: @"}:"];
}
}
+
+ /* check whether the user requested local playback. if yes, prepare the
+ * string, if not, let it empty */
+ if ([[o_userSelections objectForKey:@"localPb"] isEqualToString:@"YES"])
+ {
+ [o_duplicateCmd appendString: @"duplicate{dst=display,dst=\""];
+ }
+
if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
{
if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualToString:@"NO"])
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_trnscdCmd UTF8String], [[[o_encapFormats objectAtIndex: \
- [[o_userSelections objectForKey:@"encapFormat"] intValue]] \
- objectAtIndex:0] UTF8String], [[o_userSelections objectForKey: \
- @"trnscdFilePath"] UTF8String]];
+ [o_opts_string appendFormat: \
+ @":sout=#%s%sstandard{mux=%s,url=%s,access=file}", [o_duplicateCmd \
+ UTF8String], [o_trnscdCmd UTF8String], [[[o_encapFormats \
+ objectAtIndex: [[o_userSelections objectForKey:@"encapFormat"] \
+ intValue]] objectAtIndex:0] UTF8String], [[o_userSelections \
+ objectForKey: @"trnscdFilePath"] UTF8String]];
} else {
[o_sap_option appendFormat: @"sap,name=\"%s\"",[[o_userSelections \
objectForKey:@"sapText"] UTF8String]];
}
- [o_opts_string appendFormat: @":sout=#%sstandard{mux=%s,url=%s,access=%s,%s}", \
- [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]];
+ [o_opts_string appendFormat: \
+ @":sout=#%s%sstandard{mux=%s,url=%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=#%sstandard{mux=%s,url=%s,access=%s}", \
- [o_trnscdCmd UTF8String], [[[o_encapFormats objectAtIndex: \
- [[o_userSelections objectForKey: @"encapFormat"] intValue]] \
- objectAtIndex:0] UTF8String], [[o_userSelections objectForKey: \
+ [o_opts_string appendFormat: \
+ @":sout=#%s%sstandard{mux=%s,url=%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]];
}
}
+ /* check whether the user requested local playback. if yes, close the
+ * string with an additional bracket */
+ if ([[o_userSelections objectForKey:@"localPb"] isEqualToString:@"YES"])
+ {
+ [o_opts_string appendString: @"\"}"];
+ }
+
[o_userSelections setObject:o_opts_string forKey:@"opts"];
}
contextInfo: nil];
}
+- (IBAction)t67_mrInfo_local:(id)sender
+{
+ /* show a sheet for the help */
+ NSBeginInformationalAlertSheet(_NS("Local playback"), \
+ _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, \
+ _NS("When this option is enabled, the stream will be both played " \
+ "and transcoded/streamed.\n\nNote that this requires much more " \
+ "CPU power than simple transcoding or streaming."));
+}
+
- (IBAction)t7_selectTrnscdDestFile:(id)sender
{
/* provide a save-to-dialogue, so the user can choose a location for his/her new file */