dvdcss.h

Go to the documentation of this file.
00001 
00011 /*
00012  * Copyright (C) 1998-2008 VideoLAN
00013  *
00014  * libdvdcss 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  * libdvdcss 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 #include <stdint.h>
00035 
00036 #include "version.h"
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00043 typedef struct dvdcss_s* dvdcss_t;
00044 
00046 typedef struct dvdcss_stream_cb
00047 {
00049     int ( *pf_seek )  ( void *p_stream, uint64_t i_pos);
00051     int ( *pf_read )  ( void *p_stream, void *buffer, int i_read);
00053     int ( *pf_readv ) ( void *p_stream, const void *p_iovec, int i_blocks);
00054 } dvdcss_stream_cb;
00055 
00056 
00058 #define DVDCSS_BLOCK_SIZE      2048
00059 
00061 #define DVDCSS_NOFLAGS         0
00062 
00064 #define DVDCSS_READ_DECRYPT    (1 << 0)
00065 
00067 #define DVDCSS_SEEK_MPEG       (1 << 0)
00068 
00070 #define DVDCSS_SEEK_KEY        (1 << 1)
00071 
00072 
00076 #if defined(LIBDVDCSS_EXPORTS)
00077 #define LIBDVDCSS_EXPORT __declspec(dllexport) extern
00078 #elif defined(LIBDVDCSS_IMPORTS)
00079 #define LIBDVDCSS_EXPORT __declspec(dllimport) extern
00080 #elif defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
00081 #define LIBDVDCSS_EXPORT __attribute__((visibility("default"))) extern
00082 #else
00083 #define LIBDVDCSS_EXPORT extern
00084 #endif
00085 
00086 
00087 /*
00088  * Exported prototypes.
00089  */
00090 LIBDVDCSS_EXPORT dvdcss_t dvdcss_open  ( const char *psz_target );
00091 LIBDVDCSS_EXPORT dvdcss_t dvdcss_open_stream( void *p_stream,
00092                                               dvdcss_stream_cb *p_stream_cb );
00093 LIBDVDCSS_EXPORT int      dvdcss_close ( dvdcss_t );
00094 LIBDVDCSS_EXPORT int      dvdcss_seek  ( dvdcss_t,
00095                                int i_blocks,
00096                                int i_flags );
00097 LIBDVDCSS_EXPORT int      dvdcss_read  ( dvdcss_t,
00098                                void *p_buffer,
00099                                int i_blocks,
00100                                int i_flags );
00101 LIBDVDCSS_EXPORT int      dvdcss_readv ( dvdcss_t,
00102                                void *p_iovec,
00103                                int i_blocks,
00104                                int i_flags );
00105 LIBDVDCSS_EXPORT const char *dvdcss_error ( const dvdcss_t );
00106 
00107 LIBDVDCSS_EXPORT int      dvdcss_is_scrambled ( dvdcss_t );
00108 
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112 
00113 #endif /* DVDCSS_DVDCSS_H  */

Generated on Mon Jul 26 15:36:13 2021 for libdvdcss by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001