dvdcss.h   dvdcss.h 
/** /**
* \file dvdcss.h * \file dvdcss.h
* \author Stéphane Borel <stef@via.ecp.fr> * \author Stéphane Borel <stef@via.ecp.fr>
* \author Sam Hocevar <sam@zoy.org> * \author Sam Hocevar <sam@zoy.org>
*
* \brief The \e libdvdcss public header. * \brief The \e libdvdcss public header.
* *
* This header contains the public types and functions that applications * Public types and functions that describe the API of the \e libdvdcss lib
* using \e libdvdcss may use. rary.
*/ */
/* /*
* Copyright (C) 1998-2008 VideoLAN * Copyright (C) 1998-2008 VideoLAN
* *
* This program is free software; you can redistribute it and/or modify * libdvdcss is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * libdvdcss is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with libdvdcss; if not, write to the Free Software Foundation, Inc., * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef DVDCSS_DVDCSS_H #ifndef DVDCSS_DVDCSS_H
#ifndef _DOXYGEN_SKIP_ME #ifndef _DOXYGEN_SKIP_ME
#define DVDCSS_DVDCSS_H 1 #define DVDCSS_DVDCSS_H 1
#endif #endif
#include <stdint.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** Library instance handle, to be used for each library call. */ /** Library instance handle, to be used for each library call. */
typedef struct dvdcss_s* dvdcss_t; typedef struct dvdcss_s* dvdcss_t;
/** Set of callbacks to access DVDs in custom ways. */
typedef struct dvdcss_stream_cb
{
/** custom seek callback */
int ( *pf_seek ) ( void *p_stream, uint64_t i_pos);
/** custom read callback */
int ( *pf_read ) ( void *p_stream, void *buffer, int i_read);
/** custom vectored read callback */
int ( *pf_readv ) ( void *p_stream, const void *p_iovec, int i_blocks);
} dvdcss_stream_cb;
/** The block size of a DVD. */ /** The block size of a DVD. */
#define DVDCSS_BLOCK_SIZE 2048 #define DVDCSS_BLOCK_SIZE 2048
/** The default flag to be used by \e libdvdcss functions. */ /** The default flag to be used by \e libdvdcss functions. */
#define DVDCSS_NOFLAGS 0 #define DVDCSS_NOFLAGS 0
/** Flag to ask dvdcss_read() to decrypt the data it reads. */ /** Flag to ask dvdcss_read() to decrypt the data it reads. */
#define DVDCSS_READ_DECRYPT (1 << 0) #define DVDCSS_READ_DECRYPT (1 << 0)
/** Flag to tell dvdcss_seek() it is seeking in MPEG data. */ /** Flag to tell dvdcss_seek() it is seeking in MPEG data. */
#define DVDCSS_SEEK_MPEG (1 << 0) #define DVDCSS_SEEK_MPEG (1 << 0)
/** Flag to ask dvdcss_seek() to check the current title key. */ /** Flag to ask dvdcss_seek() to check the current title key. */
#define DVDCSS_SEEK_KEY (1 << 1) #define DVDCSS_SEEK_KEY (1 << 1)
/** Macro for setting symbol storage-class or visibility.
* Define LIBDVDCSS_IMPORTS before importing this header to get the
* correct DLL storage-class when using \e libdvdcss from MSVC. */
#if defined(LIBDVDCSS_EXPORTS) #if defined(LIBDVDCSS_EXPORTS)
#define LIBDVDCSS_EXPORT __declspec(dllexport) extern #define LIBDVDCSS_EXPORT __declspec(dllexport) extern
#elif defined(LIBDVDCSS_IMPORTS) #elif defined(LIBDVDCSS_IMPORTS)
#define LIBDVDCSS_EXPORT __declspec(dllimport) extern #define LIBDVDCSS_EXPORT __declspec(dllimport) extern
#elif defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT) #elif defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
#define LIBDVDCSS_EXPORT __attribute__((visibility("default"))) extern #define LIBDVDCSS_EXPORT __attribute__((visibility("default"))) extern
#else #else
#define LIBDVDCSS_EXPORT extern #define LIBDVDCSS_EXPORT extern
#endif #endif
/* /*
* Exported prototypes. * Exported prototypes.
*/ */
LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ); LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target );
LIBDVDCSS_EXPORT dvdcss_t dvdcss_open_stream( void *p_stream,
dvdcss_stream_cb *p_stream_cb
);
LIBDVDCSS_EXPORT int dvdcss_close ( dvdcss_t ); LIBDVDCSS_EXPORT int dvdcss_close ( dvdcss_t );
LIBDVDCSS_EXPORT int dvdcss_seek ( dvdcss_t, LIBDVDCSS_EXPORT int dvdcss_seek ( dvdcss_t,
int i_blocks, int i_blocks,
int i_flags ); int i_flags );
LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t, LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t,
void *p_buffer, void *p_buffer,
int i_blocks, int i_blocks,
int i_flags ); int i_flags );
LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t, LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t,
void *p_iovec, void *p_iovec,
int i_blocks, int i_blocks,
int i_flags ); int i_flags );
LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t ); LIBDVDCSS_EXPORT const char *dvdcss_error ( const dvdcss_t );
LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t ); LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* DVDCSS_DVDCSS_H */ #endif /* DVDCSS_DVDCSS_H */
 End of changes. 9 change blocks. 
6 lines changed or deleted 26 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/