playing dvds from the network

Miguel Freitas <[email protected]>
Newsgroups gmane.comp.video.ogle.devel
Message-ID <1048290003.25180.145.camel@miguel>
hi folks,

i wrote a patch to be able to play dvds across the network (from a
remote dvdrom unit) by modifying libdvdcss:

http://www.via.ecp.fr/via/ml/libdvdcss-devel/200303/msg00027.html

in case you are wondering why i didn't used nbd, it's just because the
user space solution is better:

- better control of driver locking
- more reliable (no kernel hanging due network problems)
- nbd doesn't support remote ioctls (enbd do, but requires patching)

however i still had to made a small change at libdvdread to avoid
failing due unexistent device. perhaps you might want to include the
small patch i'm attaching?

obs: patch is for xine copy of libdvdread but it's trivial enough that
it will probably apply to unmodified libdvdread as well.

regards,

Miguel
xine-lib-dvdnetwork.patch (text/x-patch, 1.1 KB)
Index: libdvdread/dvd_reader.c
===================================================================
RCS file: /cvsroot/xine/xine-lib/src/input/libdvdread/dvd_reader.c,v
retrieving revision 1.5
diff -u -r1.5 dvd_reader.c
--- libdvdread/dvd_reader.c	28 Feb 2003 15:54:38 -0000	1.5
+++ libdvdread/dvd_reader.c	20 Mar 2003 14:51:44 -0000
@@ -304,16 +304,22 @@
     if( path == NULL )
       return 0;
 
+    /* Try to open libdvdcss or fall back to standard functions */
+    have_css = dvdinput_setup();
+    
     ret = stat( path, &fileinfo );
     if( ret < 0 ) {
+
+        /* maybe "host:port" url? try opening it with acCeSS library */
+        if( strchr(path,':') ) {
+          return DVDOpenImageFile( path, have_css );
+        }
+      
 	/* If we can't stat the file, give up */
 	fprintf( stderr, "libdvdread: Can't stat %s\n", path );
 	perror("");
 	return 0;
     }
-
-    /* Try to open libdvdcss or fall back to standard functions */
-    have_css = dvdinput_setup();
 
     /* First check if this is a block/char device or a file*/
     if( S_ISBLK( fileinfo.st_mode ) ||
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.