[MPlayer-cvslog] CVS: main/libmpdvdkit2 dvd_reader.c, 1.15, 1.16 libdvdread_changes.diff, 1.3, 1.4

Bohdan 'Nexus' Horst CVS syncmail at mplayerhq.hu
Sat Sep 17 22:53:23 CEST 2005


CVS change done by Bohdan 'Nexus' Horst CVS

Update of /cvsroot/mplayer/main/libmpdvdkit2
In directory mail:/var2/tmp/cvs-serv8657

Modified Files:
	dvd_reader.c libdvdread_changes.diff 
Log Message:
add FreeBSD default cd/dvd devices

Index: dvd_reader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/dvd_reader.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- dvd_reader.c	30 Jun 2005 22:48:26 -0000	1.15
+++ dvd_reader.c	17 Sep 2005 20:53:20 -0000	1.16
@@ -301,6 +301,11 @@
    Darwin  /dev/rdisk0,  it needs to be the raw device
    BSD/OS  /dev/sr0c (if not mounted) or /dev/rsr0c ('c' any letter will do) */
 static char *bsd_block2char( const char *path )
+#if defined(__FreeBSD__)
+{
+    return (char *) strdup( path );
+}
+#else
 {
     char *new_path;
 
@@ -315,6 +320,7 @@
 
     return new_path;
 }
+#endif /* __FreeBSD__ */
 #endif
 
 dvd_reader_t *DVDOpen( const char *path )

Index: libdvdread_changes.diff
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/libdvdread_changes.diff,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- libdvdread_changes.diff	30 Jun 2005 22:52:59 -0000	1.3
+++ libdvdread_changes.diff	17 Sep 2005 20:53:20 -0000	1.4
@@ -160,7 +160,16 @@
  
  /**
   * Open a DVD image or block device file.
-@@ -282,7 +305,7 @@
+@@ -278,11 +301,16 @@
+    Darwin  /dev/rdisk0,  it needs to be the raw device
+    BSD/OS  /dev/sr0c (if not mounted) or /dev/rsr0c ('c' any letter will do) */
+ static char *bsd_block2char( const char *path )
++#if defined(__FreeBSD__)
++{
++    return (char *) strdup( path );
++}
++#else
+ {
      char *new_path;
  
      /* If it doesn't start with "/dev/" or does start with "/dev/r" exit */ 
@@ -169,7 +178,15 @@
        return (char *) strdup( path );
  
      /* Replace "/dev/" with "/dev/r" */
-@@ -303,6 +326,16 @@
+@@ -292,6 +320,7 @@
+ 
+     return new_path;
+ }
++#endif /* __FreeBSD__ */
+ #endif
+ 
+ dvd_reader_t *DVDOpen( const char *path )
+@@ -303,6 +332,16 @@
      if( path == NULL )
        return 0;
  
@@ -186,7 +203,7 @@
      ret = stat( path, &fileinfo );
      if( ret < 0 ) {
  	/* If we can't stat the file, give up */
-@@ -310,6 +343,7 @@
+@@ -310,6 +349,7 @@
  	perror("");
  	return 0;
      }
@@ -194,7 +211,7 @@
  
      /* Try to open libdvdcss or fall back to standard functions */
      have_css = dvdinput_setup();
-@@ -335,7 +369,7 @@
+@@ -335,7 +375,7 @@
  	char *path_copy;
  #if defined(SYS_BSD)
  	struct fstab* fe;
@@ -203,7 +220,7 @@
  	FILE *mntfile;
  #endif
  
-@@ -350,7 +384,9 @@
+@@ -350,7 +390,9 @@
  	    if( cdir >= 0 ) {
  		chdir( path_copy );
  		new_path = getcwd( NULL, PATH_MAX );
@@ -213,7 +230,7 @@
  		close( cdir );
  		if( new_path ) {
  		    free( path_copy );
-@@ -406,7 +442,7 @@
+@@ -406,7 +448,7 @@
  	    }
  	    fclose( mntfile );
  	}
@@ -222,7 +239,7 @@
          mntfile = fopen( MOUNTED, "r" );
          if( mntfile ) {
              struct mntent *me;
-@@ -425,6 +461,9 @@
+@@ -425,6 +467,9 @@
              }
              fclose( mntfile );
  	}
@@ -232,7 +249,7 @@
  #endif
  	if( !dev_name ) {
  	  fprintf( stderr, "libdvdread: Couldn't find device name.\n" );
-@@ -615,8 +654,8 @@
+@@ -615,8 +660,8 @@
      }
      
      if( dvd->css_state == 1 /* Need key init */ ) {
@@ -243,7 +260,7 @@
      }
      /*    
      if( dvdinput_title( dvd_file->dvd->dev, (int)start ) < 0 ) {
-@@ -915,7 +954,7 @@
+@@ -915,7 +960,7 @@
      return (ssize_t)ret;
  }
  




More information about the MPlayer-cvslog mailing list