+- (IBAction)soutChanged:(id)sender;
+{
+ [self soutModeChanged: nil];
+
+ if ( [o_sout_cbox state] )
+ {
+ NSPoint s_point;
+ s_point.x = 0;
+ s_point.y = 0;
+ [[o_panel contentView] setBoundsOrigin: s_point];
+ [[o_panel contentView] setNeedsDisplay: YES];
+
+ NSRect s_rect = [o_panel frame];
+ s_rect.size.height = OPEN_PANEL_FULL_HEIGHT + WINDOW_TITLE_HEIGHT;
+ s_rect.origin.y -= OPEN_PANEL_FULL_HEIGHT - OPEN_PANEL_SHORT_HEIGHT;
+ [o_panel setFrame: s_rect display: YES animate: NO];
+ }
+ else
+ {
+ NSPoint s_point;
+ s_point.x = 0;
+ s_point.y = OPEN_PANEL_FULL_HEIGHT - OPEN_PANEL_SHORT_HEIGHT;
+ [[o_panel contentView] setBoundsOrigin: s_point];
+ [[o_panel contentView] setNeedsDisplay: YES];
+
+ NSRect s_rect = [o_panel frame];
+ s_rect.size.height = OPEN_PANEL_SHORT_HEIGHT + WINDOW_TITLE_HEIGHT;
+ s_rect.origin.y += OPEN_PANEL_FULL_HEIGHT - OPEN_PANEL_SHORT_HEIGHT;
+ [o_panel setFrame: s_rect display: YES animate:NO];
+ }
+}
+
+- (IBAction)soutFileBrowse:(id)sender
+{
+ NSSavePanel *o_save_panel = [NSSavePanel savePanel];
+ NSString *o_mux_string;
+ if ( [[[o_sout_mux selectedCell] title] isEqualToString: _NS("PS")] )
+ o_mux_string = @"vob";
+ else
+ o_mux_string = @"ts";
+
+ NSString * o_name = [NSString stringWithFormat: @"vlc-output.%@",
+ o_mux_string];
+
+ [o_save_panel setTitle: _NS("Save File")];
+ [o_save_panel setPrompt: _NS("Save")];
+
+ if( [o_save_panel runModalForDirectory: nil
+ file: o_name] == NSOKButton )
+ {
+ NSString *o_filename = [o_save_panel filename];
+ [o_sout_file_path setStringValue: o_filename];
+ [self soutInfoChanged: nil];
+ }
+}
+
+- (void)soutModeChanged:(NSNotification *)o_notification
+{
+ NSString *o_mode;
+ BOOL b_file = FALSE;
+ BOOL b_net = FALSE;
+
+ o_mode = [[o_sout_access selectedCell] title];
+
+ if( [o_mode isEqualToString: _NS("File")] ) b_file = TRUE;
+ else if( [o_mode isEqualToString: _NS("UDP")] ) b_net = TRUE;
+ else if( [o_mode isEqualToString: _NS("RTP")] ) b_net = TRUE;
+
+ [o_sout_file_path setEnabled: b_file];
+ [o_sout_file_btn_browse setEnabled: b_file];
+ [o_sout_udp_addr setEnabled: b_net];
+ [o_sout_udp_port setEnabled: b_net];
+ [o_sout_udp_port_stp setEnabled: b_net];
+ [[o_sout_mux cellAtRow:0 column: 0] setEnabled: !b_net];
+ [[o_sout_mux cellAtRow:0 column: 1] setEnabled: !b_net];
+
+ if ( b_net )
+ {
+ [[o_sout_mux cellAtRow: 0 column:2] setState: YES];
+ }
+
+ [self soutInfoChanged: nil];
+}
+
+- (void)soutInfoChanged:(NSNotification *)o_notification
+{
+ NSString *o_mode;
+ NSString *o_mux;
+ NSString *o_mrl_string;
+ NSString *o_mux_string;
+
+ o_mode = [[o_sout_access selectedCell] title];
+ o_mux = [[o_sout_mux selectedCell] title];
+
+ if ( [o_mux isEqualToString: _NS("AVI")] ) o_mux_string = @"avi";
+ else if ( [o_mux isEqualToString: _NS("PS")] ) o_mux_string = @"ps";
+ else o_mux_string = @"ts";
+
+ if ( [o_mode isEqualToString: _NS("File")] )
+ {
+ o_mrl_string = [NSString stringWithFormat: @"file/%@://%@",
+ o_mux_string, [o_sout_file_path stringValue]];
+ }
+ else if ( [o_mode isEqualToString: _NS("UDP")] )
+ {
+ o_mrl_string = [NSString stringWithFormat: @"udp/%@://%@:%i",
+ o_mux_string, [o_sout_udp_addr stringValue],
+ [o_sout_udp_port intValue]];
+ }
+ else
+ {
+ o_mrl_string = [NSString stringWithFormat: @"rtp/%@://%@:%i",
+ o_mux_string, [o_sout_udp_addr stringValue],
+ [o_sout_udp_port intValue]];
+ }
+
+
+ [o_sout_mrl setStringValue: o_mrl_string];
+}
+
+- (IBAction)soutStepperChanged:(id)sender
+{
+ [o_sout_udp_port setIntValue: [o_net_udp_port_stp intValue]];
+
+ [self soutInfoChanged: nil];
+}
+
+- (IBAction)openFile:(id)sender