]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/open.m
FSF address change.
[vlc] / modules / gui / macosx / open.m
index 38dd2bc9380817fcd15228dbe9fc9ab40f4d1a0d..0e27c657df7cf5eb8f9c3e08cfc0d3ee8a079c1c 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * open.m: MacOS X module for vlc
  *****************************************************************************
- * Copyright (C) 2002-2003 VideoLAN
+ * Copyright (C) 2002-2005 the VideoLAN team
  * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -81,7 +81,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
     p_list = [NSMutableArray arrayWithCapacity: 1];
     
     next_media = IOIteratorNext( media_iterator );
-    if( next_media != NULL )
+    if( next_media != nil )
     {
         char psz_buf[0x32];
         size_t dev_path_length;
@@ -114,7 +114,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
             
             IOObjectRelease( next_media );
         
-        } while( ( next_media = IOIteratorNext( media_iterator ) ) != NULL );
+        } while( ( next_media = IOIteratorNext( media_iterator ) ) != nil );
     }
     
     IOObjectRelease( media_iterator );
@@ -183,6 +183,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
     [[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:2 column:0] setTitle: _NS("HTTP/FTP/MMS/RTSP")];
+    [o_net_timeshift_ckbox setTitle: _NS("Allow timeshifting")];
 
     [o_net_udp_port setIntValue: config_GetInt( p_intf, "server-port" )];
     [o_net_udp_port_stp setIntValue: config_GetInt( p_intf, "server-port" )];
@@ -322,7 +323,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
             intf_thread_t * p_intf = VLCIntf;
             module_config_t * p_item;
 
-            [o_options addObject: [NSString stringWithFormat: @"sub-file=%s", [[o_file_sub_path stringValue] fileSystemRepresentation]]];
+            [o_options addObject: [NSString stringWithFormat: @"sub-file=%@", [o_file_sub_path stringValue]]];
             if( [o_file_sub_override state] == NSOnState )
             {
                 [o_options addObject: [NSString stringWithFormat: @"sub-delay=%i", (int)( [o_file_sub_delay intValue] * 10 )]];
@@ -353,6 +354,11 @@ static VLCOpen *_o_sharedMainInstance = nil;
                       [[(VLCOutput *)o_sout_options getMRL] objectAtIndex: i]]];
             }
         }
+        if( [o_net_timeshift_ckbox state] == NSOnState )
+        {
+            [o_options addObject: [NSString stringWithString:
+                                                @"access-filter=timeshift"]];
+        }
         [o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"];
         [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO];
     }
@@ -595,7 +601,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
             o_mrl_string = [NSString stringWithFormat: @"dvdnav://%@",
                             o_device]; 
         else
-            o_mrl_string = [NSString stringWithFormat: @"dvdread://%@@%i:%i",
+            o_mrl_string = [NSString stringWithFormat: @"dvdread://%@@%i:%i-",
                             o_device, i_title, i_chapter]; 
     }
     else /* VIDEO_TS folder */
@@ -645,7 +651,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
     o_mode = [[o_net_mode selectedCell] title];
 
-    if( [o_mode isEqualToString: _NS("UDP/RTP")] ) b_udp = TRUE;   
+    if( [o_mode isEqualToString: _NS("UDP/RTP")] ) b_udp = TRUE;
     else if( [o_mode isEqualToString: _NS("UDP/RTP Multicast")] ) b_udpm = TRUE;
     else if( [o_mode isEqualToString: _NS("HTTP/FTP/MMS/RTSP")] ) b_http = TRUE;
 
@@ -718,7 +724,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
         else
             o_mrl_string = o_url;
     }
-
     [o_mrl setStringValue: o_mrl_string];
 }