[libdvdcss-devel] [PATCH 2/2] Add dvdcss_open_stream() API function

Diego Biurrun diego at biurrun.de
Fri Nov 7 19:40:25 CET 2014


On Fri, Nov 07, 2014 at 07:34:13PM +0100, Diego Biurrun wrote:
> --- a/src/dvdcss/dvdcss.h
> +++ b/src/dvdcss/dvdcss.h
> @@ -31,6 +31,8 @@
>  
> +#include <stdint.h>
> +
> @@ -38,6 +40,17 @@ extern "C" {
>  
> +/** 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);

Using stdint.h and uint64_t in the public header endangers support for old
MSVC versions I believe.  Not that I care particularly, but it is an issue
to consider.

> +    /** 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);

This could be const struct iovec *p_iovec, but we would need either the
right #include or a gratuitious "struct iovec;" declaration in the header.

Diego


More information about the libdvdcss-devel mailing list