1 /*****************************************************************************
2 * dummy_dvdcss.h: Dummy libdvdcss header.
3 *****************************************************************************
4 * Copyright (C) 2001 VideoLAN
5 * $Id: dummy_dvdcss.h,v 1.2 2001/10/23 23:41:00 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_INIT_QUIET (1 << 0)
35 #define DVDCSS_INIT_DEBUG (1 << 1)
37 #define DVDCSS_READ_DECRYPT (1 << 0)
39 #define DVDCSS_SEEK_INI (1 << 0)
40 #define DVDCSS_SEEK_MPEG (2 << 0)
42 #define DVDCSS_BLOCK_SIZE 2048
44 /*****************************************************************************
45 * libdvdcss method: used like init flags
46 *****************************************************************************/
49 #define DVDCSS_TITLE 2
51 /*****************************************************************************
53 *****************************************************************************/
54 dvdcss_handle dummy_dvdcss_open ( char *, int i_flags );
55 int dummy_dvdcss_close ( dvdcss_handle );
56 int dummy_dvdcss_title ( dvdcss_handle, int );
57 int dummy_dvdcss_seek ( dvdcss_handle, int, int );
58 int dummy_dvdcss_read ( dvdcss_handle, void *, int, int );
59 int dummy_dvdcss_readv ( dvdcss_handle, void *, int, int );
60 char * dummy_dvdcss_error ( dvdcss_handle );
62 /*****************************************************************************
63 * Pointers which will be filled either with dummy_dvdcss functions or
64 * with the dlopen()ed ones.
65 *****************************************************************************/
66 dvdcss_handle (* dvdcss_open ) ( char *, int i_flags );
67 int (* dvdcss_close ) ( dvdcss_handle );
68 int (* dvdcss_title ) ( dvdcss_handle, int );
69 int (* dvdcss_seek ) ( dvdcss_handle, int, int );
70 int (* dvdcss_read ) ( dvdcss_handle, void *, int, int );
71 int (* dvdcss_readv ) ( dvdcss_handle, void *, int, int );
72 char * (* dvdcss_error ) ( dvdcss_handle );