X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Foutput.m;h=f28df5442ffec6d996da86c7f09a0fe3ef1368fb;hb=6bdb92a04ae418a5eb052a389a059acf163e7bce;hp=66caa5616718877f5536998e26361ec6dc21ea8f;hpb=107cc2a5cfefa78d0d0ee8eb5729f5d355aef018;p=vlc diff --git a/modules/gui/macosx/output.m b/modules/gui/macosx/output.m index 66caa56167..f28df5442f 100644 --- a/modules/gui/macosx/output.m +++ b/modules/gui/macosx/output.m @@ -1,7 +1,7 @@ /***************************************************************************** * output.m: MacOS X Output Dialog ***************************************************************************** - * Copyright (C) 2002-2003 VideoLAN + * Copyright (C) 2002-2003 the VideoLAN team * $Id$ * * Authors: Jon Lech Johansen @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /***************************************************************************** @@ -133,12 +133,12 @@ NSArray *o_v_codecs = [NSArray arrayWithObjects: @"mp1v", @"mp2v", @"mp4v", @"DIV1", @"DIV2", @"DIV3", @"h263", @"h264", @"WMV1", @"WMV2", @"MJPG", @"theo", nil]; - [o_output_ckbox setTitle: _NS("Advanced output:")]; + [o_output_ckbox setTitle: _NS("Streaming/Saving:")]; [o_output_settings setTitle: _NS("Settings...")]; [o_btn_ok setTitle: _NS("OK")]; - [o_options_lbl setTitle: _NS("Output Options")]; - [o_display setTitle: _NS("Play locally")]; + [o_options_lbl setTitle: _NS("Streaming and Transcoding Options")]; + [o_display setTitle: _NS("Display the stream locally")]; [[o_method cellAtRow:0 column:0] setTitle: _NS("File")]; [[o_method cellAtRow:1 column:0] setTitle: _NS("Stream")]; [o_dump_chkbox setTitle: _NS("Dump raw input")]; @@ -156,7 +156,7 @@ [o_mux_selector removeAllItems]; [o_mux_selector addItemsWithTitles: o_muxers]; - [o_transcode_lbl setTitle: _NS("Transcode options")]; + [o_transcode_lbl setTitle: _NS("Transcoding options")]; [o_transcode_video_chkbox setTitle: _NS("Video")]; [o_transcode_video_selector removeAllItems]; [o_transcode_video_selector addItemsWithTitles: o_v_codecs]; @@ -179,7 +179,6 @@ [o_misc_lbl setTitle: _NS("Stream Announcing")]; [o_sap_chkbox setTitle: _NS("SAP announce")]; - [o_slp_chkbox setTitle: _NS("SLP announce")]; [o_rtsp_chkbox setTitle: _NS("RTSP announce")]; [o_http_chkbox setTitle:_NS("HTTP announce")]; [o_file_chkbox setTitle:_NS("Export SDP as file")]; @@ -221,7 +220,6 @@ o_mode = [[o_method selectedCell] title]; [o_sap_chkbox setEnabled: NO]; - [o_slp_chkbox setEnabled: NO]; [o_http_chkbox setEnabled: NO]; [o_rtsp_chkbox setEnabled: NO]; [o_file_chkbox setEnabled: NO]; @@ -306,7 +304,6 @@ [[o_mux_selector itemAtIndex: 7] setEnabled: NO]; [[o_mux_selector itemAtIndex: 8] setEnabled: YES]; [o_sap_chkbox setEnabled: YES]; - [o_slp_chkbox setEnabled: YES]; [o_channel_name setEnabled: YES]; } else if( [o_mode isEqualToString: @"RTP"] ) @@ -325,7 +322,6 @@ [[o_mux_selector itemAtIndex: 8] setEnabled: YES]; [o_mux_selector selectItemAtIndex: 8]; [o_sap_chkbox setEnabled: YES]; - [o_slp_chkbox setEnabled: NO]; [o_rtsp_chkbox setEnabled: YES]; [o_http_chkbox setEnabled: YES]; [o_file_chkbox setEnabled: YES]; @@ -388,7 +384,7 @@ else { [o_mrl_string appendFormat: - @"std{access=file,mux=%@,url=\"%@\"}", + @"std{access=file,mux=%@,dst=\"%@\"}", o_mux_string, [o_file_field stringValue]]; } } @@ -414,22 +410,40 @@ else [o_announce appendFormat:@",sap"]; } - if( [o_slp_chkbox state] == NSOnState ) - { - if ( ![[o_channel_name stringValue] isEqualToString: @""] ) - [o_announce appendFormat:@ - "slp,name=%@",[o_channel_name stringValue]]; - else - [o_announce appendString: @",slp"]; - } } if ( ![o_mode isEqualToString: @"RTP"] ) { - + /* split up the hostname and the following path to paste the + * port correctly. Not need, if there isn't any path following the + * hostname. */ + NSArray * o_urlItems = [[o_stream_address stringValue] \ + componentsSeparatedByString: @"/"]; + NSMutableString * o_finalStreamAddress; + o_finalStreamAddress = [[NSMutableString alloc] init]; + + if ([o_urlItems count] == 1) + { + [o_finalStreamAddress appendFormat: @"\"%@:%@\"", \ + [o_stream_address stringValue],[o_stream_port stringValue]]; + } + else + { + [o_finalStreamAddress appendFormat: @"\"%@:%@", [o_urlItems \ + objectAtIndex: 0], [o_stream_port stringValue]]; + unsigned int x; + x = 1; + while (x != [o_urlItems count]) + { + [o_finalStreamAddress appendFormat: @"/%@", [o_urlItems \ + objectAtIndex: x]]; + x = (x + 1); + } + [o_finalStreamAddress appendString: @"\""]; + } + [o_mrl_string appendFormat: - @"std{access=%@,mux=%@,url=\"%@:%@\"%@}", - o_mode, o_mux_string, [o_stream_address stringValue], - [o_stream_port stringValue], o_announce]; + @"std{access=%@,mux=%@,dst=%@%@}", + o_mode, o_mux_string, o_finalStreamAddress, o_announce]; } else { @@ -572,7 +586,7 @@ o_transcode_string = [NSMutableString stringWithString:@"transcode{"]; if ( [o_transcode_video_chkbox state] == NSOnState ) { - [o_transcode_string appendFormat: @"vcodec=\"%@\",vb=\"%@\"" + [o_transcode_string appendFormat: @"vcodec=\"%@\",vb=\"%@\"" \ ",scale=\"%@\"", [o_transcode_video_selector titleOfSelectedItem], [o_transcode_video_bitrate stringValue], @@ -608,8 +622,8 @@ { NSString *o_mode; o_mode = [[o_stream_type selectedCell] title]; - [o_channel_name setEnabled: [o_sap_chkbox state] || [o_slp_chkbox state] - || [o_mode isEqualToString: @"RTP"]]; + [o_channel_name setEnabled: [o_sap_chkbox state] || + [o_mode isEqualToString: @"RTP"]]; if ([o_mode isEqualToString: @"RTP"]) {