00001
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
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
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