1 /*****************************************************************************
2 * dummy_dvdcss.h: Dummy libdvdcss header.
3 *****************************************************************************
4 * Copyright (C) 2001 VideoLAN
5 * $Id: dummy_dvdcss.h,v 1.3 2001/11/12 20:16:33 sam Exp $
7 * Authors: Samuel Hocevar <sam@zoy.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
25 * The libdvdcss structure
26 *****************************************************************************/
27 typedef struct dvdcss_s* dvdcss_handle;
29 /*****************************************************************************
31 *****************************************************************************/
32 #define DVDCSS_NOFLAGS 0
34 #define DVDCSS_READ_DECRYPT (1 << 0)
36 #define DVDCSS_SEEK_INI (1 << 0)
37 #define DVDCSS_SEEK_MPEG (2 << 0)
39 #define DVDCSS_BLOCK_SIZE 2048
41 /*****************************************************************************
42 * libdvdcss method: used like init flags
43 *****************************************************************************/
46 #define DVDCSS_TITLE 2
48 /*****************************************************************************
50 *****************************************************************************/
51 dvdcss_handle dummy_dvdcss_open ( char * );
52 int dummy_dvdcss_close ( dvdcss_handle );
53 int dummy_dvdcss_title ( dvdcss_handle, int );
54 int dummy_dvdcss_seek ( dvdcss_handle, int, int );
55 int dummy_dvdcss_read ( dvdcss_handle, void *, int, int );
56 int dummy_dvdcss_readv ( dvdcss_handle, void *, int, int );
57 char * dummy_dvdcss_error ( dvdcss_handle );
59 /*****************************************************************************
60 * Pointers which will be filled either with dummy_dvdcss functions or
61 * with the dlopen()ed ones.
62 *****************************************************************************/
63 dvdcss_handle (* dvdcss_open ) ( char * );
64 int (* dvdcss_close ) ( dvdcss_handle );
65 int (* dvdcss_title ) ( dvdcss_handle, int );
66 int (* dvdcss_seek ) ( dvdcss_handle, int, int );
67 int (* dvdcss_read ) ( dvdcss_handle, void *, int, int );
68 int (* dvdcss_readv ) ( dvdcss_handle, void *, int, int );
69 char * (* dvdcss_error ) ( dvdcss_handle );