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

* Updated the Output dialog.

  - support for slp
  - support for theora
  - support for demuxdump
parent 98bee728
...@@ -258,13 +258,13 @@ ...@@ -258,13 +258,13 @@
}, },
{ {
ACTIONS = { ACTIONS = {
announceChanged = id;
outputChanged = id; outputChanged = id;
outputCloseSheet = id; outputCloseSheet = id;
outputFileBrowse = id; outputFileBrowse = id;
outputInfoChanged = id; outputInfoChanged = id;
outputMethodChanged = id; outputMethodChanged = id;
outputSettings = id; outputSettings = id;
sapChanged = id;
streamPortStepperChanged = id; streamPortStepperChanged = id;
streamTTLStepperChanged = id; streamTTLStepperChanged = id;
transcodeChanged = id; transcodeChanged = id;
...@@ -275,7 +275,10 @@ ...@@ -275,7 +275,10 @@
OUTLETS = { OUTLETS = {
"o_btn_browse" = id; "o_btn_browse" = id;
"o_btn_ok" = id; "o_btn_ok" = id;
"o_channel_name" = id;
"o_channel_name_lbl" = id;
"o_display" = id; "o_display" = id;
"o_dump_chkbox" = id;
"o_file_field" = id; "o_file_field" = id;
"o_method" = id; "o_method" = id;
"o_misc_lbl" = id; "o_misc_lbl" = id;
...@@ -287,7 +290,7 @@ ...@@ -287,7 +290,7 @@
"o_output_settings" = id; "o_output_settings" = id;
"o_output_sheet" = id; "o_output_sheet" = id;
"o_sap_chkbox" = id; "o_sap_chkbox" = id;
"o_sap_name" = id; "o_slp_chkbox" = id;
"o_stream_address" = id; "o_stream_address" = id;
"o_stream_address_lbl" = id; "o_stream_address_lbl" = id;
"o_stream_port" = id; "o_stream_port" = id;
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
</array> </array>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>29</integer>
<integer>21</integer> <integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.98 2003/11/03 15:27:28 hartman Exp $ * $Id: intf.m,v 1.99 2003/11/06 18:35:19 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>
...@@ -376,8 +376,8 @@ int CocoaConvertKey( unichar i_key ) ...@@ -376,8 +376,8 @@ int CocoaConvertKey( unichar i_key )
[o_mi_quit setTitle: _NS("Quit VLC")]; [o_mi_quit setTitle: _NS("Quit VLC")];
[o_mu_file setTitle: _ANS("1:File")]; [o_mu_file setTitle: _ANS("1:File")];
[o_mi_open_generic setTitle: _NS("Open...")]; [o_mi_open_generic setTitle: _NS("Open File...")];
[o_mi_open_file setTitle: _NS("Open File...")]; [o_mi_open_file setTitle: _NS("Quick Open File...")];
[o_mi_open_disc setTitle: _NS("Open Disc...")]; [o_mi_open_disc setTitle: _NS("Open Disc...")];
[o_mi_open_net setTitle: _NS("Open Network...")]; [o_mi_open_net setTitle: _NS("Open Network...")];
[o_mi_open_recent setTitle: _NS("Open Recent")]; [o_mi_open_recent setTitle: _NS("Open Recent")];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc * open.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: open.m,v 1.40 2003/10/31 15:54:53 hartman Exp $ * $Id: open.m,v 1.41 2003/11/06 18:35:19 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>
...@@ -245,7 +245,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -245,7 +245,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
} }
if( [o_output_ckbox state] == NSOnState ) if( [o_output_ckbox state] == NSOnState )
{ {
[o_options addObject: [NSString stringWithFormat: @"sout=%@", [(VLCOutput *)o_sout_options getMRL]]]; [o_options addObject: [NSString stringWithString: [(VLCOutput *)o_sout_options getMRL]]];
} }
[o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"]; [o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"];
[o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO]; [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* output.h: MacOS X Output Dialog * output.h: MacOS X Output Dialog
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: output.h,v 1.3 2003/07/27 23:05:41 hartman Exp $ * $Id: output.h,v 1.4 2003/11/06 18:35:19 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>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
IBOutlet id o_display; IBOutlet id o_display;
IBOutlet id o_method; IBOutlet id o_method;
IBOutlet id o_file_field; IBOutlet id o_file_field;
IBOutlet id o_dump_chkbox;
IBOutlet id o_btn_browse; IBOutlet id o_btn_browse;
IBOutlet id o_stream_address; IBOutlet id o_stream_address;
IBOutlet id o_stream_address_lbl; IBOutlet id o_stream_address_lbl;
...@@ -67,7 +68,9 @@ ...@@ -67,7 +68,9 @@
IBOutlet id o_misc_lbl; IBOutlet id o_misc_lbl;
IBOutlet id o_sap_chkbox; IBOutlet id o_sap_chkbox;
IBOutlet id o_sap_name; IBOutlet id o_slp_chkbox;
IBOutlet id o_channel_name;
IBOutlet id o_channel_name_lbl;
NSString *o_mrl; NSString *o_mrl;
NSString *o_transcode; NSString *o_transcode;
...@@ -88,5 +91,5 @@ ...@@ -88,5 +91,5 @@
- (IBAction)outputFileBrowse:(id)sender; - (IBAction)outputFileBrowse:(id)sender;
- (void)transcodeChanged:(NSNotification *)o_notification; - (void)transcodeChanged:(NSNotification *)o_notification;
- (void)transcodeInfoChanged:(NSNotification *)o_notification; - (void)transcodeInfoChanged:(NSNotification *)o_notification;
- (IBAction)sapChanged:(id)sender; - (IBAction)announceChanged:(id)sender;
@end @end
...@@ -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.15 2003/09/22 03:40:05 hartman Exp $ * $Id: output.m,v 1.16 2003/11/06 18:35:19 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>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
[[NSNotificationCenter defaultCenter] addObserver: self [[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(transcodeInfoChanged:) selector: @selector(transcodeInfoChanged:)
name: NSControlTextDidChangeNotification name: NSControlTextDidChangeNotification
object: o_sap_name]; object: o_channel_name];
[o_mux_selector setAutoenablesItems: NO]; [o_mux_selector setAutoenablesItems: NO];
[self transcodeChanged:nil]; [self transcodeChanged:nil];
...@@ -115,13 +115,13 @@ ...@@ -115,13 +115,13 @@
NSArray *o_muxers = [NSArray arrayWithObjects: @"MPEG TS", @"MPEG PS", @"MPEG 1", NSArray *o_muxers = [NSArray arrayWithObjects: @"MPEG TS", @"MPEG PS", @"MPEG 1",
@"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", nil]; @"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", nil];
NSArray *o_a_channels = [NSArray arrayWithObjects: @"1", @"2", @"4", @"6", nil]; NSArray *o_a_channels = [NSArray arrayWithObjects: @"1", @"2", @"4", @"6", nil];
NSArray *o_a_bitrates = [NSArray arrayWithObjects: @"96", @"128", @"192", @"256", @"512", nil]; NSArray *o_a_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96",
NSArray *o_v_bitrates = [NSArray arrayWithObjects: @"128", @"192", @"256", @"512", nil];
@"100", @"150", @"200", @"400", @"500", @"750", @"1000", @"2000", @"3000", nil]; NSArray *o_v_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96",
NSArray *o_a_codecs = [NSArray arrayWithObjects: @"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072", nil];
@"mpga", @"mp3 ", @"a52 ", @"vorb", nil]; NSArray *o_a_codecs = [NSArray arrayWithObjects: @"mpga", @"mp3 ", @"a52 ", @"vorb", nil];
NSArray *o_v_codecs = [NSArray arrayWithObjects: NSArray *o_v_codecs = [NSArray arrayWithObjects: @"mp1v", @"mp2v", @"mp4v", @"DIV1",
@"mp1v", @"mp2v", @"mp4v", @"DIV1", @"DIV2", @"DIV3", @"H263", @"I263", @"WMV1", @"WMV2", @"MJPG", nil]; @"DIV2", @"DIV3", @"H263", @"I263", @"WMV1", @"WMV2", @"MJPG", @"theo", nil];
[o_output_ckbox setTitle: _NS("Advanced output:")]; [o_output_ckbox setTitle: _NS("Advanced output:")];
[o_output_settings setTitle: _NS("Settings...")]; [o_output_settings setTitle: _NS("Settings...")];
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
[o_display setTitle: _NS("Screen")]; [o_display setTitle: _NS("Screen")];
[[o_method cellAtRow:0 column:0] setTitle: _NS("File")]; [[o_method cellAtRow:0 column:0] setTitle: _NS("File")];
[[o_method cellAtRow:1 column:0] setTitle: _NS("Stream")]; [[o_method cellAtRow:1 column:0] setTitle: _NS("Stream")];
[o_dump_chkbox setTitle: _NS("Dump raw input")];
[o_btn_browse setTitle: _NS("Browse...")]; [o_btn_browse setTitle: _NS("Browse...")];
[o_stream_address_lbl setStringValue: _NS("Address")]; [o_stream_address_lbl setStringValue: _NS("Address")];
[o_stream_port_lbl setStringValue: _NS("Port")]; [o_stream_port_lbl setStringValue: _NS("Port")];
...@@ -162,8 +163,10 @@ ...@@ -162,8 +163,10 @@
[o_transcode_audio_channels removeAllItems]; [o_transcode_audio_channels removeAllItems];
[o_transcode_audio_channels addItemsWithObjectValues: o_a_channels]; [o_transcode_audio_channels addItemsWithObjectValues: o_a_channels];
[o_misc_lbl setTitle: _NS("Miscellaneous Options")]; [o_misc_lbl setTitle: _NS("Stream Announcing")];
[o_sap_chkbox setTitle: _NS("Announce streams via SAP Channel:")]; [o_sap_chkbox setTitle: _NS("SAP announce")];
[o_slp_chkbox setTitle: _NS("SLP announce")];
[o_channel_name_lbl setStringValue: _NS("Channel Name")];
} }
- (IBAction)outputChanged:(id)sender; - (IBAction)outputChanged:(id)sender;
...@@ -199,13 +202,15 @@ ...@@ -199,13 +202,15 @@
o_mode = [[o_method selectedCell] title]; o_mode = [[o_method selectedCell] title];
[o_sap_chkbox setEnabled: NO]; [o_sap_chkbox setEnabled: NO];
[o_sap_name setEnabled: NO]; [o_slp_chkbox setEnabled: NO];
[o_channel_name setEnabled: NO];
[[o_mux_selector itemAtIndex: 0] setEnabled: YES]; [[o_mux_selector itemAtIndex: 0] setEnabled: YES];
if( [o_mode isEqualToString: _NS("File")] ) if( [o_mode isEqualToString: _NS("File")] )
{ {
[o_file_field setEnabled: YES]; [o_file_field setEnabled: YES];
[o_btn_browse setEnabled: YES]; [o_btn_browse setEnabled: YES];
[o_dump_chkbox setEnabled: YES];
[o_stream_address setEnabled: NO]; [o_stream_address setEnabled: NO];
[o_stream_port setEnabled: NO]; [o_stream_port setEnabled: NO];
[o_stream_ttl setEnabled: NO]; [o_stream_ttl setEnabled: NO];
...@@ -224,6 +229,7 @@ ...@@ -224,6 +229,7 @@
else if( [o_mode isEqualToString: _NS("Stream")] ) else if( [o_mode isEqualToString: _NS("Stream")] )
{ {
[o_file_field setEnabled: NO]; [o_file_field setEnabled: NO];
[o_dump_chkbox setEnabled: NO];
[o_btn_browse setEnabled: NO]; [o_btn_browse setEnabled: NO];
[o_stream_port setEnabled: YES]; [o_stream_port setEnabled: YES];
[o_stream_port_stp setEnabled: YES]; [o_stream_port_stp setEnabled: YES];
...@@ -272,7 +278,8 @@ ...@@ -272,7 +278,8 @@
[[o_mux_selector itemAtIndex: 6] setEnabled: NO]; [[o_mux_selector itemAtIndex: 6] setEnabled: NO];
[[o_mux_selector itemAtIndex: 7] setEnabled: NO]; [[o_mux_selector itemAtIndex: 7] setEnabled: NO];
[o_sap_chkbox setEnabled: YES]; [o_sap_chkbox setEnabled: YES];
[o_sap_name setEnabled: YES]; [o_slp_chkbox setEnabled: YES];
[o_channel_name setEnabled: YES];
} }
else if( [o_mode isEqualToString: _NS("RTP")] ) else if( [o_mode isEqualToString: _NS("RTP")] )
{ {
...@@ -297,8 +304,8 @@ ...@@ -297,8 +304,8 @@
- (void)outputInfoChanged:(NSNotification *)o_notification - (void)outputInfoChanged:(NSNotification *)o_notification
{ {
NSString *o_mode, *o_mux, *o_mux_string, *o_sap; NSString *o_mode, *o_mux, *o_mux_string, *o_announce;
NSMutableString *o_mrl_string = [NSMutableString stringWithString:@"#"]; NSMutableString *o_mrl_string = [NSMutableString stringWithString:@":sout=#"];
[o_mrl_string appendString: o_transcode]; [o_mrl_string appendString: o_transcode];
if( [o_display state] == NSOnState ) if( [o_display state] == NSOnState )
...@@ -320,14 +327,25 @@ ...@@ -320,14 +327,25 @@
if( [o_mode isEqualToString: _NS("File")] ) if( [o_mode isEqualToString: _NS("File")] )
{ {
[o_mrl_string appendFormat: if( [o_dump_chkbox state] == NSOnState )
{
o_mrl_string = [NSMutableString stringWithFormat:
@":demux=demuxdump :demuxdump-file=\"%@\"",
[o_file_field stringValue]];
[self setMRL:o_mrl_string];
return;
}
else
{
[o_mrl_string appendFormat:
@"std{access=file,mux=%@,url=\"%@\"}", @"std{access=file,mux=%@,url=\"%@\"}",
o_mux_string, [o_file_field stringValue]]; o_mux_string, [o_file_field stringValue]];
}
} }
else if( [o_mode isEqualToString: _NS("Stream")] ) else if( [o_mode isEqualToString: _NS("Stream")] )
{ {
o_mode = [o_stream_type titleOfSelectedItem]; o_mode = [o_stream_type titleOfSelectedItem];
o_sap = @""; o_announce = @"";
if ( [o_mode isEqualToString: _NS("HTTP")] ) if ( [o_mode isEqualToString: _NS("HTTP")] )
o_mode = @"http"; o_mode = @"http";
...@@ -341,9 +359,18 @@ ...@@ -341,9 +359,18 @@
o_mode = @"udp"; o_mode = @"udp";
if( [o_sap_chkbox state] == NSOnState ) if( [o_sap_chkbox state] == NSOnState )
{ {
o_sap = @",sap"; if ( ![[o_channel_name stringValue] isEqualToString: @""] )
if ( ![[o_sap_name stringValue] isEqualToString: @""] ) o_announce = [NSString stringWithFormat:@",sap=%@", [o_channel_name stringValue]];
o_sap = [NSString stringWithFormat:@",sap=%@", [o_sap_name stringValue]]; else
o_announce = @",sap";
}
if( [o_slp_chkbox state] == NSOnState )
{
if ( ![[o_channel_name stringValue] isEqualToString: @""] )
o_announce = [o_announce stringByAppendingFormat:@",slp=%@",
[o_channel_name stringValue]];
else
o_announce = [o_announce stringByAppendingString: @",slp"];
} }
} }
else if ( [o_mode isEqualToString: _NS("RTP")] ) else if ( [o_mode isEqualToString: _NS("RTP")] )
...@@ -352,7 +379,7 @@ ...@@ -352,7 +379,7 @@
[o_mrl_string appendFormat: [o_mrl_string appendFormat:
@"std{access=%@,mux=%@,url=\"%@:%@\"%@}", @"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_sap]; [o_stream_port stringValue], o_announce];
} }
if( [o_display state] == NSOnState ) if( [o_display state] == NSOnState )
{ {
...@@ -477,12 +504,10 @@ ...@@ -477,12 +504,10 @@
[self outputInfoChanged:nil]; [self outputInfoChanged:nil];
} }
- (IBAction)sapChanged:(id)sender - (IBAction)announceChanged:(id)sender
{ {
[o_sap_name setEnabled: [o_sap_chkbox state]]; [o_channel_name setEnabled: [o_sap_chkbox state] || [o_slp_chkbox state]];
[self outputInfoChanged: nil]; [self outputInfoChanged: nil];
} }
@end @end
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