dvdcss.h

Go to the documentation of this file.
00001 
00011 /*
00012  * Copyright (C) 1998-2008 VideoLAN
00013  *
00014  * This program is free software; you can redistribute it and/or modify
00015  * it under the terms of the GNU General Public License as published by
00016  * the Free Software Foundation; either version 2 of the License, or
00017  * (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU General Public License along
00025  * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
00026  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00027  */
00028 
00029 #ifndef DVDCSS_DVDCSS_H
00030 #ifndef _DOXYGEN_SKIP_ME
00031 #define DVDCSS_DVDCSS_H 1
00032 #endif
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00039 typedef struct dvdcss_s* dvdcss_t;
00040 
00041 
00043 #define DVDCSS_BLOCK_SIZE      2048
00044 
00046 #define DVDCSS_NOFLAGS         0
00047 
00049 #define DVDCSS_READ_DECRYPT    (1 << 0)
00050 
00052 #define DVDCSS_SEEK_MPEG       (1 << 0)
00053 
00055 #define DVDCSS_SEEK_KEY        (1 << 1)
00056 
00057 
00058 #if defined(LIBDVDCSS_EXPORTS)
00059 #define LIBDVDCSS_EXPORT __declspec(dllexport) extern
00060 #elif defined(LIBDVDCSS_IMPORTS)
00061 #define LIBDVDCSS_EXPORT __declspec(dllimport) extern
00062 #elif defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
00063 #define LIBDVDCSS_EXPORT __attribute__((visibility("default"))) extern
00064 #else
00065 #define LIBDVDCSS_EXPORT extern
00066 #endif
00067 
00068 /*
00069  * Our version number. The variable name contains the interface version.
00070  */
00071 LIBDVDCSS_EXPORT char *        dvdcss_interface_2;
00072 
00073 
00074 /*
00075  * Exported prototypes.
00076  */
00077 LIBDVDCSS_EXPORT dvdcss_t dvdcss_open  ( char *psz_target );
00078 LIBDVDCSS_EXPORT int      dvdcss_close ( dvdcss_t );
00079 LIBDVDCSS_EXPORT int      dvdcss_seek  ( dvdcss_t,
00080                                int i_blocks,
00081                                int i_flags );
00082 LIBDVDCSS_EXPORT int      dvdcss_read  ( dvdcss_t,
00083                                void *p_buffer,
00084                                int i_blocks,
00085                                int i_flags );
00086 LIBDVDCSS_EXPORT int      dvdcss_readv ( dvdcss_t,
00087                                void *p_iovec,
00088                                int i_blocks,
00089                                int i_flags );
00090 LIBDVDCSS_EXPORT char *   dvdcss_error ( dvdcss_t );
00091 
00092 LIBDVDCSS_EXPORT int      dvdcss_is_scrambled ( dvdcss_t );
00093 
00094 
00095 /*
00096  * Deprecated stuff.
00097  */
00098 #ifndef _DOXYGEN_SKIP_ME
00099 #define dvdcss_title(a,b) dvdcss_seek(a,b,DVDCSS_SEEK_KEY)
00100 #define dvdcss_handle dvdcss_t
00101 #endif
00102 
00103 
00104 #ifdef __cplusplus
00105 }
00106 #endif
00107 
00108 #endif /* DVDCSS_DVDCSS_H  */