1 /*****************************************************************************
2 * output.m: MacOS X Output Dialog
3 *****************************************************************************
4 * Copyright (C) 2002-2003 VideoLAN
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8 * Christophe Massiot <massiot@via.ecp.fr>
9 * Derk-Jan Hartman <thedj@users.sourceforge.net>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
24 *****************************************************************************/
26 /*****************************************************************************
28 *****************************************************************************/
29 #include <stdlib.h> /* malloc(), free() */
35 /*****************************************************************************
36 * VLCOutput implementation
37 *****************************************************************************/
38 @implementation VLCOutput
43 o_mrl = [[NSString alloc] init];
44 o_transcode = [[NSString alloc] init];
51 [o_transcode release];
55 - (void)setMRL:(NSString *)o_mrl_string
58 o_mrl = [o_mrl_string copy];
66 - (void)setTranscode:(NSString *)o_transcode_string
68 [o_transcode autorelease];
69 o_transcode = [o_transcode_string copy];
76 [[NSNotificationCenter defaultCenter] addObserver: self
77 selector: @selector(outputInfoChanged:)
78 name: NSControlTextDidChangeNotification
79 object: o_file_field];
80 [[NSNotificationCenter defaultCenter] addObserver: self
81 selector: @selector(outputInfoChanged:)
82 name: NSControlTextDidChangeNotification
83 object: o_stream_address];
84 [[NSNotificationCenter defaultCenter] addObserver: self
85 selector: @selector(outputInfoChanged:)
86 name: NSControlTextDidChangeNotification
87 object: o_stream_port];
88 [[NSNotificationCenter defaultCenter] addObserver: self
89 selector: @selector(TTLChanged:)
90 name: NSControlTextDidChangeNotification
91 object: o_stream_ttl];
92 [[NSNotificationCenter defaultCenter] addObserver: self
93 selector: @selector(transcodeInfoChanged:)
94 name: NSControlTextDidChangeNotification
95 object: o_transcode_video_bitrate];
96 [[NSNotificationCenter defaultCenter] addObserver: self
97 selector: @selector(transcodeInfoChanged:)
98 name: NSControlTextDidChangeNotification
99 object: o_transcode_audio_bitrate];
100 [[NSNotificationCenter defaultCenter] addObserver: self
101 selector: @selector(transcodeInfoChanged:)
102 name: NSControlTextDidChangeNotification
103 object: o_transcode_audio_channels];
104 [[NSNotificationCenter defaultCenter] addObserver: self
105 selector: @selector(transcodeInfoChanged:)
106 name: NSControlTextDidChangeNotification
107 object: o_channel_name];
108 [[NSNotificationCenter defaultCenter] addObserver: self
109 selector: @selector(transcodeInfoChanged:)
110 name: NSControlTextDidChangeNotification
113 [o_mux_selector setAutoenablesItems: NO];
114 [self transcodeChanged:nil];
119 NSArray *o_muxers = [NSArray arrayWithObjects: @"MPEG TS", @"MPEG PS", @"MPEG 1",
120 @"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", @"Raw", nil];
121 NSArray *o_a_channels = [NSArray arrayWithObjects: @"1", @"2", @"4", @"6", nil];
122 NSArray *o_a_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96",
123 @"128", @"192", @"256", @"512", nil];
124 NSArray *o_v_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96",
125 @"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072", nil];
126 NSArray *o_a_codecs = [NSArray arrayWithObjects: @"mpga", @"mp3 ", @"mp4a", @"a52 ", @"vorb", @"flac", @"spx ", nil];
127 NSArray *o_v_codecs = [NSArray arrayWithObjects: @"mp1v", @"mp2v", @"mp4v", @"DIV1",
128 @"DIV2", @"DIV3", @"H263", @"I263", @"WMV1", @"WMV2", @"MJPG", @"theo", nil];
130 [o_output_ckbox setTitle: _NS("Advanced output:")];
131 [o_output_settings setTitle: _NS("Settings...")];
132 [o_btn_ok setTitle: _NS("OK")];
134 [o_options_lbl setTitle: _NS("Output Options")];
135 [o_display setTitle: _NS("Play locally")];
136 [[o_method cellAtRow:0 column:0] setTitle: _NS("File")];
137 [[o_method cellAtRow:1 column:0] setTitle: _NS("Stream")];
138 [o_dump_chkbox setTitle: _NS("Dump raw input")];
139 [o_btn_browse setTitle: _NS("Browse...")];
140 [o_stream_address_lbl setStringValue: _NS("Address")];
141 [o_stream_port_lbl setStringValue: _NS("Port")];
142 [o_stream_ttl_lbl setStringValue: @"TTL"];
143 [[o_stream_type itemAtIndex: 0] setTitle: @"HTTP"];
144 [[o_stream_type itemAtIndex: 1] setTitle: @"MMSH"];
145 [[o_stream_type itemAtIndex: 2] setTitle: @"UDP"];
146 [[o_stream_type itemAtIndex: 3] setTitle: @"RTP"];
147 [[o_stream_type itemAtIndex: 4] setTitle: @"RTP (New)"];
148 [o_stream_type_lbl setStringValue: _NS("Type")];
150 [o_mux_lbl setStringValue: _NS("Encapsulation Method")];
151 [o_mux_selector removeAllItems];
152 [o_mux_selector addItemsWithTitles: o_muxers];
154 [o_transcode_lbl setTitle: _NS("Transcode options")];
155 [o_transcode_video_chkbox setTitle: _NS("Video")];
156 [o_transcode_video_selector removeAllItems];
157 [o_transcode_video_selector addItemsWithTitles: o_v_codecs];
158 [o_transcode_video_bitrate_lbl setStringValue: _NS("Bitrate (kb/s)")];
159 [o_transcode_video_bitrate removeAllItems];
160 [o_transcode_video_bitrate addItemsWithObjectValues: o_v_bitrates];
161 [o_transcode_audio_chkbox setTitle: _NS("Audio")];
162 [o_transcode_audio_selector removeAllItems];
163 [o_transcode_audio_selector addItemsWithTitles: o_a_codecs];
164 [o_transcode_audio_bitrate_lbl setStringValue: _NS("Bitrate (kb/s)")];
165 [o_transcode_audio_bitrate removeAllItems];
166 [o_transcode_audio_bitrate addItemsWithObjectValues: o_a_bitrates];
167 [o_transcode_audio_channels_lbl setStringValue: _NS("Channels")];
168 [o_transcode_audio_channels removeAllItems];
169 [o_transcode_audio_channels addItemsWithObjectValues: o_a_channels];
171 [o_misc_lbl setTitle: _NS("Stream Announcing")];
172 [o_sap_chkbox setTitle: _NS("SAP announce")];
173 [o_slp_chkbox setTitle: _NS("SLP announce")];
174 [o_rtsp_chkbox setTitle: _NS("RTSP announce")];
175 [o_http_chkbox setTitle:_NS("HTTP announce")];
177 [o_channel_name_lbl setStringValue: _NS("Channel Name")];
178 [o_sdp_url_lbl setStringValue: _NS("SDP file address")];
181 - (IBAction)outputChanged:(id)sender;
183 if ([o_output_ckbox state] == NSOnState)
185 [o_output_settings setEnabled:YES];
189 [o_output_settings setEnabled:NO];
193 - (IBAction)outputSettings:(id)sender
195 [NSApp beginSheet: o_output_sheet
196 modalForWindow: o_open_panel
202 - (IBAction)outputCloseSheet:(id)sender
204 [o_output_sheet orderOut:sender];
205 [NSApp endSheet: o_output_sheet];
208 - (void)outputMethodChanged:(NSNotification *)o_notification
211 o_mode = [[o_method selectedCell] title];
213 [o_sap_chkbox setEnabled: NO];
214 [o_slp_chkbox setEnabled: NO];
215 [o_http_chkbox setEnabled: NO];
216 [o_rtsp_chkbox setEnabled: NO];
217 [o_channel_name setEnabled: NO];
218 [o_sdp_url setEnabled: NO];
219 [[o_mux_selector itemAtIndex: 0] setEnabled: YES];
221 if( [o_mode isEqualToString: _NS("File")] )
223 [o_file_field setEnabled: YES];
224 [o_btn_browse setEnabled: YES];
225 [o_dump_chkbox setEnabled: YES];
226 [o_stream_address setEnabled: NO];
227 [o_stream_port setEnabled: NO];
228 [o_stream_ttl setEnabled: NO];
229 [o_stream_port_stp setEnabled: NO];
230 [o_stream_ttl_stp setEnabled: NO];
231 [o_stream_type setEnabled: NO];
232 [o_mux_selector setEnabled: YES];
233 [[o_mux_selector itemAtIndex: 1] setEnabled: YES]; // MPEG PS
234 [[o_mux_selector itemAtIndex: 2] setEnabled: YES]; // MPEG 1
235 [[o_mux_selector itemAtIndex: 3] setEnabled: YES]; // Ogg
236 [[o_mux_selector itemAtIndex: 4] setEnabled: YES]; // AVI
237 [[o_mux_selector itemAtIndex: 5] setEnabled: YES]; // ASF
238 [[o_mux_selector itemAtIndex: 6] setEnabled: YES]; // MPEG 4
239 [[o_mux_selector itemAtIndex: 7] setEnabled: YES]; // QuickTime
240 [[o_mux_selector itemAtIndex: 8] setEnabled: YES]; // Raw
242 else if( [o_mode isEqualToString: _NS("Stream")] )
244 [o_file_field setEnabled: NO];
245 [o_dump_chkbox setEnabled: NO];
246 [o_btn_browse setEnabled: NO];
247 [o_stream_port setEnabled: YES];
248 [o_stream_port_stp setEnabled: YES];
249 [o_stream_type setEnabled: YES];
250 [o_mux_selector setEnabled: YES];
252 o_mode = [o_stream_type titleOfSelectedItem];
254 if( [o_mode isEqualToString: @"HTTP"] )
256 [o_stream_address setEnabled: YES];
257 [o_stream_ttl setEnabled: NO];
258 [o_stream_ttl_stp setEnabled: NO];
259 [[o_mux_selector itemAtIndex: 1] setEnabled: YES];
260 [[o_mux_selector itemAtIndex: 2] setEnabled: YES];
261 [[o_mux_selector itemAtIndex: 3] setEnabled: YES];
262 [[o_mux_selector itemAtIndex: 4] setEnabled: NO];
263 [[o_mux_selector itemAtIndex: 5] setEnabled: YES];
264 [[o_mux_selector itemAtIndex: 6] setEnabled: NO];
265 [[o_mux_selector itemAtIndex: 7] setEnabled: NO];
266 [[o_mux_selector itemAtIndex: 8] setEnabled: YES];
268 else if( [o_mode isEqualToString: @"MMSH"] )
270 [o_stream_address setEnabled: YES];
271 [o_stream_ttl setEnabled: NO];
272 [o_stream_ttl_stp setEnabled: NO];
273 [[o_mux_selector itemAtIndex: 0] setEnabled: NO];
274 [[o_mux_selector itemAtIndex: 1] setEnabled: NO];
275 [[o_mux_selector itemAtIndex: 2] setEnabled: NO];
276 [[o_mux_selector itemAtIndex: 3] setEnabled: NO];
277 [[o_mux_selector itemAtIndex: 4] setEnabled: NO];
278 [[o_mux_selector itemAtIndex: 5] setEnabled: YES];
279 [[o_mux_selector itemAtIndex: 6] setEnabled: NO];
280 [[o_mux_selector itemAtIndex: 7] setEnabled: NO];
281 [[o_mux_selector itemAtIndex: 8] setEnabled: NO];
282 [o_mux_selector selectItemAtIndex: 5];
284 else if( [o_mode isEqualToString: @"UDP"] )
286 [o_stream_address setEnabled: YES];
287 [o_stream_ttl setEnabled: YES];
288 [o_stream_ttl_stp setEnabled: YES];
289 [[o_mux_selector itemAtIndex: 1] setEnabled: NO];
290 [[o_mux_selector itemAtIndex: 2] setEnabled: NO];
291 [[o_mux_selector itemAtIndex: 3] setEnabled: NO];
292 [[o_mux_selector itemAtIndex: 4] setEnabled: NO];
293 [[o_mux_selector itemAtIndex: 5] setEnabled: NO];
294 [[o_mux_selector itemAtIndex: 6] setEnabled: NO];
295 [[o_mux_selector itemAtIndex: 7] setEnabled: NO];
296 [[o_mux_selector itemAtIndex: 8] setEnabled: YES];
297 [o_sap_chkbox setEnabled: YES];
298 [o_slp_chkbox setEnabled: YES];
299 [o_channel_name setEnabled: YES];
301 else if( [o_mode isEqualToString: @"RTP"] )
303 [o_stream_address setEnabled: YES];
304 [o_stream_ttl setEnabled: YES];
305 [o_stream_ttl_stp setEnabled: YES];
306 [[o_mux_selector itemAtIndex: 1] setEnabled: NO];
307 [[o_mux_selector itemAtIndex: 2] setEnabled: NO];
308 [[o_mux_selector itemAtIndex: 3] setEnabled: NO];
309 [[o_mux_selector itemAtIndex: 4] setEnabled: NO];
310 [[o_mux_selector itemAtIndex: 5] setEnabled: NO];
311 [[o_mux_selector itemAtIndex: 6] setEnabled: NO];
312 [[o_mux_selector itemAtIndex: 7] setEnabled: NO];
313 [[o_mux_selector itemAtIndex: 8] setEnabled: YES];
315 else if( [o_mode isEqualToString: @"RTP (New)"] )
317 [o_stream_address setEnabled: YES];
318 [o_stream_ttl setEnabled: YES];
319 [o_stream_ttl_stp setEnabled: YES];
320 [[o_mux_selector itemAtIndex: 0] setEnabled: NO];
321 [[o_mux_selector itemAtIndex: 1] setEnabled: NO];
322 [[o_mux_selector itemAtIndex: 2] setEnabled: NO];
323 [[o_mux_selector itemAtIndex: 3] setEnabled: NO];
324 [[o_mux_selector itemAtIndex: 4] setEnabled: NO];
325 [[o_mux_selector itemAtIndex: 5] setEnabled: NO];
326 [[o_mux_selector itemAtIndex: 6] setEnabled: NO];
327 [[o_mux_selector itemAtIndex: 7] setEnabled: NO];
328 [[o_mux_selector itemAtIndex: 8] setEnabled: YES];
329 [o_mux_selector selectItemAtIndex: 8];
330 [o_sap_chkbox setEnabled: YES];
331 [o_slp_chkbox setEnabled: NO];
332 [o_rtsp_chkbox setEnabled: YES];
333 [o_http_chkbox setEnabled: YES];
334 [o_channel_name setEnabled: YES];
338 if( ![[o_mux_selector selectedItem] isEnabled] && ![o_mode isEqualToString: @"RTP (New)"] )
340 [o_mux_selector selectItemAtIndex: 0];
342 else if (![[o_mux_selector selectedItem] isEnabled] && [o_mode isEqualToString: @"RTP (New)"] )
344 [o_mux_selector selectItemAtIndex: 8];
346 [self outputInfoChanged: nil];
349 - (void)outputInfoChanged:(NSNotification *)o_notification
351 NSString *o_mode, *o_mux, *o_mux_string, *o_announce;
352 NSMutableString *o_mrl_string = [NSMutableString stringWithString:@":sout=#"];
354 [o_mrl_string appendString: o_transcode];
355 if( [o_display state] == NSOnState )
357 [o_mrl_string appendString: @"duplicate{dst=display,dst="];
360 o_mode = [[o_method selectedCell] title];
361 o_mux = [o_mux_selector titleOfSelectedItem];
363 if ( [o_mux isEqualToString: @"AVI"] ) o_mux_string = @"avi";
364 else if ( [o_mux isEqualToString: @"Ogg"] ) o_mux_string = @"ogg";
365 else if ( [o_mux isEqualToString: @"MPEG PS"] ) o_mux_string = @"ps";
366 else if ( [o_mux isEqualToString: @"MPEG 4"] ) o_mux_string = @"mp4";
367 else if ( [o_mux isEqualToString: @"MPEG 1"] ) o_mux_string = @"mpeg1";
368 else if ( [o_mux isEqualToString: @"Quicktime"] ) o_mux_string = @"mov";
369 else if ( [o_mux isEqualToString: @"ASF"] ) o_mux_string = @"asf";
370 else if ( [o_mux isEqualToString: @"Raw"] ) o_mux_string = @"raw";
371 else o_mux_string = @"ts";
373 if( [o_mode isEqualToString: _NS("File")] )
375 if( [o_dump_chkbox state] == NSOnState )
377 o_mrl_string = [NSMutableString stringWithFormat:
378 @":demux=demuxdump :demuxdump-file=\"%@\"",
379 [o_file_field stringValue]];
380 [self setMRL:o_mrl_string];
385 [o_mrl_string appendFormat:
386 @"std{access=file,mux=%@,url=\"%@\"}",
387 o_mux_string, [o_file_field stringValue]];
390 else if( [o_mode isEqualToString: _NS("Stream")] )
392 o_mode = [o_stream_type titleOfSelectedItem];
395 if ( [o_mode isEqualToString: @"HTTP"] )
397 else if ( [o_mode isEqualToString: @"MMSH"] )
399 if ( [o_mux isEqualToString: @"ASF"] ) o_mux_string = @"asfh";
402 else if ( [o_mode isEqualToString: @"UDP"] )
405 if( [o_sap_chkbox state] == NSOnState )
407 if ( ![[o_channel_name stringValue] isEqualToString: @""] )
408 o_announce = [NSString stringWithFormat:@",sap,name=%@",
409 [o_channel_name stringValue]];
411 o_announce = @",sap";
413 if( [o_slp_chkbox state] == NSOnState )
415 if ( ![[o_channel_name stringValue] isEqualToString: @""] )
416 o_announce = [o_announce stringByAppendingFormat:@
417 "slp,name=%@",[o_channel_name stringValue]];
419 o_announce = [o_announce stringByAppendingString: @",slp"];
422 else if ( [o_mode isEqualToString: @"RTP"] )
425 if ( ![o_mode isEqualToString: @"RTP (New)"] )
428 [o_mrl_string appendFormat:
429 @"std{access=%@,mux=%@,url=\"%@:%@\"%@}",
430 o_mode, o_mux_string, [o_stream_address stringValue],
431 [o_stream_port stringValue], o_announce];
435 NSString * o_stream_name;
436 if (![[o_channel_name stringValue] isEqualToString: @""] )
438 o_stream_name = [NSString stringWithFormat:@",name=%@",
439 [o_channel_name stringValue]];
446 if ( [o_sap_chkbox state] == NSOnState )
448 o_announce = @",sdp=sap";
450 else if ([o_rtsp_chkbox state] == NSOnState )
452 o_announce = [NSString stringWithFormat:@",sdp=\"rtsp://%@\"",[o_sdp_url stringValue]];
455 else if ([o_http_chkbox state] == NSOnState )
457 o_announce = [NSString stringWithFormat:@",sdp=\"http://%@\"",[o_sdp_url stringValue]];
459 [o_mrl_string appendFormat:
460 @"rtp{dst=\"%@\",port=%@%@%@}",[o_stream_address stringValue],
461 [o_stream_port stringValue], o_stream_name, o_announce];
465 if( [o_display state] == NSOnState )
467 [o_mrl_string appendString: @"}"];
469 [self setMRL:o_mrl_string];
472 - (void)TTLChanged:(NSNotification *)o_notification
474 intf_thread_t * p_intf = VLCIntf;
475 config_PutInt( p_intf, "ttl", [o_stream_ttl intValue] );
478 - (IBAction)outputFileBrowse:(id)sender
480 NSSavePanel *o_save_panel = [NSSavePanel savePanel];
481 NSString *o_mux_string;
482 if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"MPEG PS"] )
483 o_mux_string = @"vob";
484 else if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"MPEG 1"] )
485 o_mux_string = @"mpg";
486 else if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"AVI"] )
487 o_mux_string = @"avi";
488 else if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"ASF"] )
489 o_mux_string = @"asf";
490 else if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"Ogg"] )
491 o_mux_string = @"ogm";
492 else if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"MPEG 4"] )
493 o_mux_string = @"mp4";
494 else if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"Quicktime"] )
495 o_mux_string = @"mov";
496 else if ( [[o_mux_selector titleOfSelectedItem] isEqualToString: @"Raw"] )
497 o_mux_string = @"raw";
499 o_mux_string = @"ts";
501 NSString * o_name = [NSString stringWithFormat: @"vlc-output.%@",
504 [o_save_panel setTitle: _NS("Save File")];
505 [o_save_panel setPrompt: _NS("Save")];
507 if( [o_save_panel runModalForDirectory: nil
508 file: o_name] == NSOKButton )
510 NSString *o_filename = [o_save_panel filename];
511 [o_file_field setStringValue: o_filename];
512 [self outputInfoChanged: nil];
516 - (IBAction)streamPortStepperChanged:(id)sender
518 [o_stream_port setIntValue: [o_stream_port_stp intValue]];
519 [self outputInfoChanged: nil];
522 - (IBAction)streamTTLStepperChanged:(id)sender
524 [o_stream_ttl setIntValue: [o_stream_ttl_stp intValue]];
525 [self TTLChanged:nil];
528 - (void)transcodeChanged:(NSNotification *)o_notification
530 if( [o_transcode_video_chkbox state] == NSOnState )
532 [o_transcode_video_selector setEnabled: YES];
533 [o_transcode_video_bitrate setEnabled: YES];
537 [o_transcode_video_selector setEnabled: NO];
538 [o_transcode_video_bitrate setEnabled: NO];
540 if( [o_transcode_audio_chkbox state] == NSOnState )
542 [o_transcode_audio_selector setEnabled: YES];
543 [o_transcode_audio_bitrate setEnabled: YES];
544 [o_transcode_audio_channels setEnabled: YES];
548 [o_transcode_audio_selector setEnabled: NO];
549 [o_transcode_audio_bitrate setEnabled: NO];
550 [o_transcode_audio_channels setEnabled: NO];
553 [self transcodeInfoChanged:nil];
556 - (void)transcodeInfoChanged:(NSNotification *)o_notification
558 NSMutableString *o_transcode_string;
560 if( [o_transcode_video_chkbox state] == NSOnState ||
561 [o_transcode_audio_chkbox state] == NSOnState )
563 o_transcode_string = [NSMutableString stringWithString:@"transcode{"];
564 if ( [o_transcode_video_chkbox state] == NSOnState )
566 [o_transcode_string appendFormat: @"vcodec=\"%@\",vb=\"%@\"",
567 [o_transcode_video_selector titleOfSelectedItem],
568 [o_transcode_video_bitrate stringValue]];
569 if ( [o_transcode_audio_chkbox state] == NSOnState )
571 [o_transcode_string appendString: @","];
574 if ( [o_transcode_audio_chkbox state] == NSOnState )
576 fprintf(stderr,"%s\n",[[o_transcode_audio_bitrate stringValue] cString]);
577 [o_transcode_string appendFormat: @"acodec=\"%@\",ab=\"%@\"",
578 [o_transcode_audio_selector titleOfSelectedItem],
579 [o_transcode_audio_bitrate stringValue]];
581 [o_transcode_string appendString:@"}:"];
585 o_transcode_string = [NSString stringWithString:@""];
587 [self setTranscode: o_transcode_string];
588 [self outputInfoChanged:nil];
591 - (IBAction)announceChanged:(id)sender
594 o_mode = [[o_stream_type selectedCell] title];
595 [o_channel_name setEnabled: [o_sap_chkbox state] || [o_slp_chkbox state]
596 || [o_mode isEqualToString: @"RTP (New)"]];
598 if ([o_mode isEqualToString: @"RTP (New)"])
600 if ([[sender title] isEqualToString: _NS("SAP announce")])
602 [o_rtsp_chkbox setState:NSOffState];
603 [o_http_chkbox setState:NSOffState];
605 else if ([[sender title] isEqualToString:_NS("RTSP announce")])
607 [o_sap_chkbox setState:NSOffState];
608 [o_http_chkbox setState:NSOffState];
610 else if ([[sender title] isEqualToString:_NS("HTTP announce")])
612 [o_sap_chkbox setState:NSOffState];
613 [o_rtsp_chkbox setState:NSOffState];
616 if ( [o_rtsp_chkbox state] == NSOnState ||
617 [o_http_chkbox state] == NSOnState)
619 [o_sdp_url setEnabled: YES];
623 [o_sdp_url setEnabled: NO];
626 [self outputInfoChanged: nil];