]> git.sesse.net Git - vlc/commitdiff
* All :
authorBenjamin Pracht <bigben@videolan.org>
Fri, 6 Aug 2004 20:56:46 +0000 (20:56 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Fri, 6 Aug 2004 20:56:46 +0000 (20:56 +0000)
- added a sdp=file option
- it is now possible to have a sap and a rtsp/http/file announce at the same time

extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/output.h
modules/gui/macosx/output.m

index 9371a3c4f8f6173cb5e55a5ae4b2ab88f8c79b62..7f5028f8d8a9adc7564424aee6082ae519f1cd5c 100644 (file)
                 "o_channel_name_lbl" = id; 
                 "o_display" = id; 
                 "o_dump_chkbox" = id; 
+                "o_file_chkbox" = id; 
                 "o_file_field" = id; 
                 "o_http_chkbox" = id; 
                 "o_method" = id; 
index a8c7254ff2491e73cfe82954385e3b464ce48b75..5b65e137bba41f8de2eb60e5f6b989a47e4d08eb 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>514 222 505 517 0 0 1024 746 </string>
+       <string>571 224 505 517 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1617</key>
        </array>
        <key>IBOpenObjects</key>
        <array>
-               <integer>29</integer>
-               <integer>1617</integer>
                <integer>21</integer>
+               <integer>1617</integer>
+               <integer>29</integer>
+               <integer>1411</integer>
        </array>
        <key>IBSystem Version</key>
        <string>7H63</string>
index 2da29999391850813a2d1a95fbc896b76e4ceb77..874ee3f70d508885d04e8a021c77a900d6b58d8d 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 68e53000b5518cf953890778179db0722ffc2cab..fb914a00361f56783cdf74612a84df4bd0249770 100644 (file)
@@ -76,6 +76,7 @@
     IBOutlet id o_sdp_url_lbl;
     IBOutlet id o_rtsp_chkbox;
     IBOutlet id o_http_chkbox;
+    IBOutlet id o_file_chkbox;
     
     NSString *o_mrl;
     NSString *o_transcode;
index 87cb58e77b2ead0230d1f29470e87ebae8c2e7b8..e5363f36794567d4a8c4a14a15052eb241dfda97 100644 (file)
@@ -4,15 +4,16 @@
  * Copyright (C) 2002-2003 VideoLAN
  * $Id$
  *
- * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
+ * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
  *          Derk-Jan Hartman <thedj@users.sourceforge.net>
+ *          Benjamin Pracht <bigben AT videolan DOT org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     [o_slp_chkbox setTitle: _NS("SLP announce")];
     [o_rtsp_chkbox setTitle: _NS("RTSP announce")];
     [o_http_chkbox setTitle:_NS("HTTP announce")];
+    [o_file_chkbox setTitle:_NS("Export SDP as file")];
 
     [o_channel_name_lbl setStringValue: _NS("Channel Name")];
-    [o_sdp_url_lbl setStringValue: _NS("SDP file address")];
+    [o_sdp_url_lbl setStringValue: _NS("SDP URL")];
 }
 
 - (IBAction)outputChanged:(id)sender;
     [o_slp_chkbox setEnabled: NO];
     [o_http_chkbox setEnabled: NO];
     [o_rtsp_chkbox setEnabled: NO];
+    [o_file_chkbox setEnabled: NO];
     [o_channel_name setEnabled: NO];
     [o_sdp_url setEnabled: NO];
     [[o_mux_selector itemAtIndex: 0] setEnabled: YES];
             [o_slp_chkbox setEnabled: NO];
             [o_rtsp_chkbox setEnabled: YES];
             [o_http_chkbox setEnabled: YES];
+            [o_file_chkbox setEnabled: YES];
             [o_channel_name setEnabled: YES];
         }
     }
 
 - (void)outputInfoChanged:(NSNotification *)o_notification
 {
-    NSString *o_mode, *o_mux, *o_mux_string, *o_announce;
+    NSString *o_mode, *o_mux, *o_mux_string;
+    NSMutableString *o_announce = [NSMutableString stringWithString:@""];
     NSMutableString *o_mrl_string = [NSMutableString stringWithString:@":sout=#"];
 
     [o_mrl_string appendString: o_transcode];
     else if( [o_mode isEqualToString: _NS("Stream")] )
     {
         o_mode = [o_stream_type titleOfSelectedItem];
-        o_announce = @"";
 
         if ( [o_mode isEqualToString: @"HTTP"] )
             o_mode = @"http";
             if( [o_sap_chkbox state] == NSOnState )
             {
                 if ( ![[o_channel_name stringValue] isEqualToString: @""] )
-                    o_announce = [NSString stringWithFormat:@",sap,name=%@", 
-                        [o_channel_name stringValue]];
+                    [o_announce appendFormat:
+                        @",sap,name=%@", [o_channel_name stringValue]];
                 else
-                    o_announce = @",sap";
+                    [o_announce appendFormat:@",sap"];
             }
             if( [o_slp_chkbox state] == NSOnState )
             {
                if ( ![[o_channel_name stringValue] isEqualToString: @""] )
-                    o_announce = [o_announce stringByAppendingFormat:@
+                    [o_announce appendFormat:@
                             "slp,name=%@",[o_channel_name stringValue]];
                 else
-                    o_announce = [o_announce stringByAppendingString: @",slp"];
+                    [o_announce appendString: @",slp"];
             }
         }
         if ( ![o_mode isEqualToString: @"RTP"] )
         else
         {
             NSString * o_stream_name;
+
             if (![[o_channel_name stringValue] isEqualToString: @""] )
             {
                 o_stream_name = [NSString stringWithFormat:@",name=%@",
 
             if ( [o_sap_chkbox state] == NSOnState )
             {
-                o_announce = @",sdp=sap";
+                [o_announce appendString: @",sdp=sap"];
             }
-            else if ([o_rtsp_chkbox state] == NSOnState )
+            if ([o_rtsp_chkbox state] == NSOnState )
             {
-                o_announce = [NSString stringWithFormat:@",sdp=\"rtsp://%@\"",[o_sdp_url stringValue]];
+                [o_announce appendFormat:@",sdp=\"rtsp://%@\"",[o_sdp_url stringValue]];
 
             }
-            else if ([o_http_chkbox state] == NSOnState )
+            if ([o_http_chkbox state] == NSOnState )
             {
-                o_announce = [NSString stringWithFormat:@",sdp=\"http://%@\"",[o_sdp_url stringValue]];
+                [o_announce appendFormat:@",sdp=\"http://%@\"",[o_sdp_url stringValue]];
+            }
+            if ([o_file_chkbox state] == NSOnState )
+            {
+                [o_announce appendFormat:@",sdp=\"file://%@\"",[o_sdp_url stringValue]];
             }
             [o_mrl_string appendFormat:
                         @"rtp{dst=\"%@\",port=%@%@%@}",[o_stream_address stringValue],
 
     if ([o_mode isEqualToString: @"RTP"])
     {
-        if ([[sender title] isEqualToString: _NS("SAP announce")])
+/*        if ([[sender title] isEqualToString: _NS("SAP announce")])
         {
             [o_rtsp_chkbox setState:NSOffState];
             [o_http_chkbox setState:NSOffState];
-        }
-        else if ([[sender title] isEqualToString:_NS("RTSP announce")])
+        }*/
+        if ([[sender title] isEqualToString:_NS("RTSP announce")])
         {
-            [o_sap_chkbox setState:NSOffState];
+//            [o_sap_chkbox setState:NSOffState];
             [o_http_chkbox setState:NSOffState];
+            [o_file_chkbox setState:NSOffState];
         }
         else if ([[sender title] isEqualToString:_NS("HTTP announce")])
         {
-            [o_sap_chkbox setState:NSOffState];
+//            [o_sap_chkbox setState:NSOffState];
             [o_rtsp_chkbox setState:NSOffState];
+            [o_file_chkbox setState:NSOffState];
+        }
+        else if ([[sender title] isEqualToString:_NS("Export SDP as file")])
+        {
+            [o_rtsp_chkbox setState:NSOffState];
+            [o_http_chkbox setState:NSOffState];
         }
 
         if ( [o_rtsp_chkbox state] == NSOnState ||
-                                    [o_http_chkbox state] == NSOnState)
+                            [o_http_chkbox state] == NSOnState ||
+                            [o_file_chkbox state] == NSOnState )
         {
             [o_sdp_url setEnabled: YES];
         }