#!/usr/bin/perl

use strict;
use warnings;
use diagnostics -verbose;

use Data::Dumper;
use DVD::Read::DVDCSS qw(:all);

my $dvdcss = {};
my $a = '';

$dvdcss = DVD::Read::DVDCSS->new('file-not-exists');

$dvdcss = DVD::Read::DVDCSS->new('example.sector');

#$dvdcss->open('example.sector');

#$dvdcss = dvdcss_open('example.sector');
$dvdcss->is_scrambled(3,0);

$dvdcss->seek(3,0);

$dvdcss->seek(32,0);

$a = $dvdcss->read(2,0);

print length $a;
print "<-\n";

$a = $dvdcss->read(1,0);
print length $a;
printf "<-\n\n%d<-\n", DVDCSS_BLOCK_SIZE;
print Dumper($dvdcss);
$dvdcss->close;
#dvdcss_close($dvdcss);

print "\n";