Commit ac265bcd authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Finished the sout dialog on OSX.

parent 71baa3cd
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* output.m: MacOS X Output Dialog * output.m: MacOS X Output Dialog
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: output.m,v 1.1 2003/04/30 23:58:56 hartman Exp $ * $Id: output.m,v 1.2 2003/05/10 10:32:29 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -179,7 +179,6 @@ ...@@ -179,7 +179,6 @@
- (IBAction)outputCloseSheet:(id)sender - (IBAction)outputCloseSheet:(id)sender
{ {
intf_thread_t * p_intf = [NSApp getIntf]; intf_thread_t * p_intf = [NSApp getIntf];
NSLog( o_mrl );
config_PutPsz( p_intf, "sout", [o_mrl lossyCString] ); config_PutPsz( p_intf, "sout", [o_mrl lossyCString] );
[o_output_sheet orderOut:sender]; [o_output_sheet orderOut:sender];
...@@ -260,13 +259,13 @@ ...@@ -260,13 +259,13 @@
- (void)outputInfoChanged:(NSNotification *)o_notification - (void)outputInfoChanged:(NSNotification *)o_notification
{ {
NSString *o_mode, *o_mux, *o_mux_string; NSString *o_mode, *o_mux, *o_mux_string;
NSString *o_mrl_string = @"#"; NSMutableString *o_mrl_string = [NSMutableString stringWithString:@"#"];
if( [o_display state] == NSOnState ) if( [o_display state] == NSOnState )
{ {
o_mrl_string = [o_mrl_string stringByAppendingString: @"display:"]; [o_mrl_string appendString: @"display:"];
} }
o_mrl_string = [o_mrl_string stringByAppendingString: o_transcode]; [o_mrl_string appendString: o_transcode];
o_mode = [[o_method selectedCell] title]; o_mode = [[o_method selectedCell] title];
o_mux = [o_mux_selector titleOfSelectedItem]; o_mux = [o_mux_selector titleOfSelectedItem];
...@@ -279,7 +278,7 @@ ...@@ -279,7 +278,7 @@
if( [o_mode isEqualToString: _NS("File")] ) if( [o_mode isEqualToString: _NS("File")] )
{ {
o_mrl_string = [o_mrl_string stringByAppendingFormat: [o_mrl_string appendFormat:
@"dst=std{access=file,mux=%@,url=\"%@\"},", @"dst=std{access=file,mux=%@,url=\"%@\"},",
o_mux_string, [o_file_field stringValue]]; o_mux_string, [o_file_field stringValue]];
} }
...@@ -293,12 +292,12 @@ ...@@ -293,12 +292,12 @@
else if ( [o_mode isEqualToString: _NS("RTP")] ) else if ( [o_mode isEqualToString: _NS("RTP")] )
o_mode = @"rtp"; o_mode = @"rtp";
o_mrl_string = [o_mrl_string stringByAppendingFormat: [o_mrl_string appendFormat:
@"dst=std{access=%@,mux=%@,url=\"%@:%@\"},", @"dst=std{access=%@,mux=%@,url=\"%@:%@\"},",
o_mode, o_mux_string, [o_stream_address stringValue], o_mode, o_mux_string, [o_stream_address stringValue],
[o_stream_port stringValue]]; [o_stream_port stringValue]];
} }
o_mrl_string = [o_mrl_string stringByAppendingString: @"}:"]; [o_mrl_string appendString: @"}:"];
[self setMRL:o_mrl_string]; [self setMRL:o_mrl_string];
} }
...@@ -378,28 +377,28 @@ ...@@ -378,28 +377,28 @@
- (void)transcodeInfoChanged:(NSNotification *)o_notification - (void)transcodeInfoChanged:(NSNotification *)o_notification
{ {
NSString *o_transcode_string; NSMutableString *o_transcode_string;
if( [o_transcode_video_chkbox state] == NSOnState || if( [o_transcode_video_chkbox state] == NSOnState ||
[o_transcode_audio_chkbox state] == NSOnState ) [o_transcode_audio_chkbox state] == NSOnState )
{ {
o_transcode_string = @"transcode{"; o_transcode_string = [NSMutableString stringWithString:@"transcode{"];
if ( [o_transcode_video_chkbox state] == NSOnState ) if ( [o_transcode_video_chkbox state] == NSOnState )
{ {
o_transcode_string = [o_transcode stringByAppendingFormat: @"vcodec=\"%@\",vb=\"%@\",", [o_transcode_string appendFormat: @"vcodec=\"%@\",vb=\"%@\",",
[o_transcode_video_selector titleOfSelectedItem], [o_transcode_video_selector titleOfSelectedItem],
[o_transcode_video_bitrate stringValue]]; [o_transcode_video_bitrate stringValue]];
} }
if ( [o_transcode_audio_chkbox state] == NSOnState ) if ( [o_transcode_audio_chkbox state] == NSOnState )
{ {
o_transcode_string = [o_transcode stringByAppendingFormat: @"acodec=\"%@\",ab=\"%@\",", [o_transcode_string appendFormat: @"acodec=\"%@\",ab=\"%@\",",
[o_transcode_audio_selector titleOfSelectedItem], [o_transcode_audio_selector titleOfSelectedItem],
[o_transcode_audio_bitrate stringValue]]; [o_transcode_audio_bitrate stringValue]];
} }
} }
else else
{ {
o_transcode_string = @"duplicate{"; o_transcode_string = [NSString stringWithString:@"duplicate{"];
} }
[self setTranscode: o_transcode_string]; [self setTranscode: o_transcode_string];
[self outputInfoChanged:nil]; [self outputInfoChanged:nil];
......
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