]> git.sesse.net Git - vlc/commitdiff
macosx: implement RTP stream selection. Closes #2497, while #2496 is invalid as RTMP...
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 30 Mar 2009 23:12:38 +0000 (01:12 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 30 Mar 2009 23:12:50 +0000 (01:12 +0200)
extras/package/macosx/Resources/English.lproj/Open.nib/classes.nib
extras/package/macosx/Resources/English.lproj/Open.nib/info.nib
extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib
modules/gui/macosx/open.h
modules/gui/macosx/open.m

index 268cf582a96474d1484d60c3a91c49035f9f8f8f..4f046510d393945ef09fba70fd931f932051c0d8 100644 (file)
                 "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;
index 488a41e2314096aea9b776ed5d316ded2cdadc8d..58e936b2ebe1e8feff4683f8c13345e6b784a726 100644 (file)
@@ -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>
        <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>
index 805e8acb60b2f37893c98f373c60a30ecdb8d573..19e4122fcd5dc22d43718018e2e4fd1899232f3b 100644 (file)
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
index 7c17507e6d2cc8161af80d4c50135514993dea40..17762dd80cc6c04187edb3575d32b12321eb79dc 100644 (file)
@@ -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;
index 0333993256fc8135def4709fca03eae427e9c4cd..d125a22497d32041599dd3ffcd69dc3736a66f28 100644 (file)
@@ -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 =