libdvdcss read error

Mike Kelland mkelland at engsoc.org
Tue Jul 13 17:10:45 CEST 2004


Hi,

Any help with this little problem would be most appreciated!

I'm trying to do a simple low level DVD read.  But I'm getting an error
with very little explanation.  The code I'm using, the response I"m
getting (with DVDCSS_VERBOSE=2) and some specs on my machine are below:

CODE:

#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/cdrom.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

#include "dvdcss.h"

#define TRUE 1
int bytes_read;
void *buf;



main (int argc, char** argv)
{

        struct dvdcss_s* dvdcss_t;

        dvdcss_t = dvdcss_open("/dev/cdrom");
        if (dvdcss_t == NULL)
        {
                printf ("Couldn't open DVD due to: %s", dvdcss_error(dvdcss_t));
                exit;
        }
        bytes_read = dvdcss_read(dvdcss_t,buf,10,DVDCSS_NOFLAGS);
        if (bytes_read >= 0)
        {
                printf("Success!\n");
        }
        else
        {
                printf("Error: %s", dvdcss_error(dvdcss_t));
                printf("\nbytes_read: %d\n", bytes_read);
        }

        dvdcss_close(dvdcss_t);
}

OUTPUT:
libdvdcss debug: opening target `/dev/cdrom'
libdvdcss debug: using libc for access
libdvdcss debug: disc is scrambled
libdvdcss debug: requesting AGID
libdvdcss debug: drive authenticated, using variant 0
libdvdcss debug: authentication established
libdvdcss debug: GetASF authenticated, ASF=1
libdvdcss debug: decrypting disc key with player keys
libdvdcss debug: decrypted disc key is 17:48:ca:0d:37
libdvdcss error: read error
Error: read error
bytes_read: -1

SPECS:
uname -a
Linux hermes 2.6.4acpi #2 Sun Apr 25 22:33:55 EDT 2004 i686 GNU/Linux

Any comments would be greatly appreciated! Thanks!
Mike

-- 
This is the libdvdcss-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the libdvdcss-devel mailing list