[vlc-devel] commit: macosx: implement RTP stream selection. Closes #2497, while #2496 is invalid as RTMP streams can easily opened by pasting the respective URL in the 'URL' field... ( Felix Paul Kühne )
git version control
git at videolan.org
Tue Mar 31 01:12:53 CEST 2009
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Mar 31 01:12:38 2009 +0200| [0ca0b5f94118f7196b649983bd4f60a49abe1bd1] | committer: Felix Paul Kühne
macosx: implement RTP stream selection. Closes #2497, while #2496 is invalid as RTMP streams can easily opened by pasting the respective URL in the 'URL' field...
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ca0b5f94118f7196b649983bd4f60a49abe1bd1
---
.../Resources/English.lproj/Open.nib/classes.nib | 4 ++
.../Resources/English.lproj/Open.nib/info.nib | 6 +-
.../English.lproj/Open.nib/keyedobjects.nib | Bin 92226 -> 94471 bytes
modules/gui/macosx/open.h | 10 +++-
modules/gui/macosx/open.m | 56 +++++++++++++-------
5 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/extras/package/macosx/Resources/English.lproj/Open.nib/classes.nib b/extras/package/macosx/Resources/English.lproj/Open.nib/classes.nib
index 268cf58..4f04651 100644
--- a/extras/package/macosx/Resources/English.lproj/Open.nib/classes.nib
+++ b/extras/package/macosx/Resources/English.lproj/Open.nib/classes.nib
@@ -113,12 +113,16 @@
"o_net_http_url_lbl" = id;
"o_net_mode" = id;
"o_net_openUDP_btn" = id;
+ "o_net_udp_address_lbl" = id;
"o_net_udp_cancel_btn" = id;
+ "o_net_udp_mode_lbl" = id;
"o_net_udp_ok_btn" = id;
"o_net_udp_panel" = id;
"o_net_udp_port" = id;
"o_net_udp_port_lbl" = id;
"o_net_udp_port_stp" = id;
+ "o_net_udp_protocol_lbl" = id;
+ "o_net_udp_protocol_mat" = id;
"o_net_udpm_addr" = id;
"o_net_udpm_addr_lbl" = id;
"o_net_udpm_port" = id;
diff --git a/extras/package/macosx/Resources/English.lproj/Open.nib/info.nib b/extras/package/macosx/Resources/English.lproj/Open.nib/info.nib
index 488a41e..58e936b 100644
--- a/extras/package/macosx/Resources/English.lproj/Open.nib/info.nib
+++ b/extras/package/macosx/Resources/English.lproj/Open.nib/info.nib
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>63 88 356 240 0 0 1280 778 </string>
+ <string>129 203 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>2297</key>
@@ -11,7 +11,7 @@
<key>2346</key>
<string>366 401 548 264 0 0 1280 778 </string>
<key>2837</key>
- <string>353 532 573 94 0 0 1280 778 </string>
+ <string>353 528 573 94 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>489.0</string>
@@ -20,10 +20,10 @@
<key>IBOpenObjects</key>
<array>
<integer>2792</integer>
- <integer>2346</integer>
<integer>636</integer>
<integer>2297</integer>
<integer>2837</integer>
+ <integer>2346</integer>
</array>
<key>IBSystem Version</key>
<string>9G55</string>
diff --git a/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib b/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib
index 805e8ac..19e4122 100644
Binary files a/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib and b/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib differ
diff --git a/modules/gui/macosx/open.h b/modules/gui/macosx/open.h
index 7c17507..17762dd 100644
--- a/modules/gui/macosx/open.h
+++ b/modules/gui/macosx/open.h
@@ -67,10 +67,16 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
IBOutlet id o_disc_dvd_menus;
/* open network */
- IBOutlet id o_net_help_lbl;
- IBOutlet id o_net_help_udp_lbl;
IBOutlet id o_net_http_url;
IBOutlet id o_net_http_url_lbl;
+ IBOutlet id o_net_help_lbl;
+
+ /* open UDP stuff panel */
+ IBOutlet id o_net_help_udp_lbl;
+ IBOutlet id o_net_udp_protocol_mat;
+ IBOutlet id o_net_udp_protocol_lbl;
+ IBOutlet id o_net_udp_address_lbl;
+ IBOutlet id o_net_udp_mode_lbl;
IBOutlet id o_net_mode;
IBOutlet id o_net_openUDP_btn;
IBOutlet id o_net_udp_cancel_btn;
diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 0333993..d125a22 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -194,9 +194,12 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_net_udp_cancel_btn setTitle: _NS("Cancel")];
[o_net_udp_ok_btn setTitle: _NS("Open")];
[o_net_openUDP_btn setTitle: _NS("Open RTP/UDP Stream")];
+ [o_net_udp_mode_lbl setStringValue: _NS("Mode")];
+ [o_net_udp_protocol_lbl setStringValue: _NS("Protocol")];
+ [o_net_udp_address_lbl setStringValue: _NS("Address")];
- [[o_net_mode cellAtRow:0 column:0] setTitle: _NS("UDP/RTP")];
- [[o_net_mode cellAtRow:1 column:0] setTitle: _NS("UDP/RTP Multicast")];
+ [[o_net_mode cellAtRow:0 column:0] setTitle: _NS("Unicast")];
+ [[o_net_mode cellAtRow:1 column:0] setTitle: _NS("Multicast")];
[o_net_udp_port setIntValue: config_GetInt( p_intf, "server-port" )];
[o_net_udp_port_stp setIntValue: config_GetInt( p_intf, "server-port" )];
@@ -759,13 +762,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)openNetModeChanged:(id)sender
{
- if( [[sender selectedCell] tag] == 0 )
- [o_panel makeFirstResponder: o_net_udp_port];
- else if ( [[sender selectedCell] tag] == 1 )
- [o_panel makeFirstResponder: o_net_udpm_addr];
- else
- msg_Warn( p_intf, "Unknown sender tried to change UDP/RTP mode" );
-
+ if( sender == o_net_mode )
+ {
+ if( [[sender selectedCell] tag] == 0 )
+ [o_panel makeFirstResponder: o_net_udp_port];
+ else if ( [[sender selectedCell] tag] == 1 )
+ [o_panel makeFirstResponder: o_net_udpm_addr];
+ else
+ msg_Warn( p_intf, "Unknown sender tried to change UDP/RTP mode" );
+ }
[self openNetInfoChanged: nil];
}
@@ -801,11 +806,14 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSString *o_mode;
o_mode = [[o_net_mode selectedCell] title];
- if( [o_mode isEqualToString: _NS("UDP/RTP")] )
+ if( [o_mode isEqualToString: _NS("Unicast")] )
{
int i_port = [o_net_udp_port intValue];
- o_mrl_string = [NSString stringWithString: @"udp://"];
+ if( [[o_net_udp_protocol_mat selectedCell] tag] == 0 )
+ o_mrl_string = [NSString stringWithString: @"udp://"];
+ else
+ o_mrl_string = [NSString stringWithString: @"rtp://"];
if( i_port != config_GetInt( p_intf, "server-port" ) )
{
@@ -813,12 +821,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_mrl_string stringByAppendingFormat: @"@:%i", i_port];
}
}
- else if( [o_mode isEqualToString: _NS("UDP/RTP Multicast")] )
+ else if( [o_mode isEqualToString: _NS("Multicast")] )
{
NSString *o_addr = [o_net_udpm_addr stringValue];
int i_port = [o_net_udpm_port intValue];
- o_mrl_string = [NSString stringWithFormat: @"udp://@%@", o_addr];
+ if( [[o_net_udp_protocol_mat selectedCell] tag] == 0 )
+ o_mrl_string = [NSString stringWithFormat: @"udp://@%@", o_addr];
+ else
+ o_mrl_string = [NSString stringWithFormat: @"rtp://@%@", o_addr];
if( i_port != config_GetInt( p_intf, "server-port" ) )
{
@@ -849,6 +860,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
modalDelegate: self
didEndSelector: NULL
contextInfo: nil];
+ [self openNetInfoChanged: nil];
}
else if( sender == o_net_udp_cancel_btn )
{
@@ -858,25 +870,31 @@ static VLCOpen *_o_sharedMainInstance = nil;
else if( sender == o_net_udp_ok_btn )
{
NSString *o_mrl_string = [NSString string];
- if( [[[o_net_mode selectedCell] title] isEqualToString: _NS("UDP/RTP")] )
+ if( [[[o_net_mode selectedCell] title] isEqualToString: _NS("Unicast")] )
{
int i_port = [o_net_udp_port intValue];
- o_mrl_string = [NSString stringWithString: @"udp://"];
-
+ if( [[o_net_udp_protocol_mat selectedCell] tag] == 0 )
+ o_mrl_string = [NSString stringWithString: @"udp://"];
+ else
+ o_mrl_string = [NSString stringWithString: @"rtp://"];
+
if( i_port != config_GetInt( p_intf, "server-port" ) )
{
o_mrl_string =
[o_mrl_string stringByAppendingFormat: @"@:%i", i_port];
}
}
- else if( [[[o_net_mode selectedCell] title] isEqualToString: _NS("UDP/RTP Multicast")] )
+ else if( [[[o_net_mode selectedCell] title] isEqualToString: _NS("Multicast")] )
{
NSString *o_addr = [o_net_udpm_addr stringValue];
int i_port = [o_net_udpm_port intValue];
- o_mrl_string = [NSString stringWithFormat: @"udp://@%@", o_addr];
-
+ if( [[o_net_udp_protocol_mat selectedCell] tag] == 0 )
+ o_mrl_string = [NSString stringWithFormat: @"udp://@%@", o_addr];
+ else
+ o_mrl_string = [NSString stringWithFormat: @"rtp://@%@", o_addr];
+
if( i_port != config_GetInt( p_intf, "server-port" ) )
{
o_mrl_string =
More information about the vlc-devel
mailing list