# HG changeset patch # User reimar # Date 1276449629 0 # Node ID 016194f71de3493ca04419192200ef0cd5559472 # Parent 22713e4fde5f814a67772ff87e31662843dacffc Fix function pointer types in tvi_functions struct to be proper declarations. diff -r 22713e4fde5f -r 016194f71de3 stream/tv.h --- a/stream/tv.h Sun Jun 13 17:18:48 2010 +0000 +++ b/stream/tv.h Sun Jun 13 17:20:29 2010 +0000 @@ -109,16 +109,19 @@ const char *comment; } tvi_info_t; + +struct priv; + typedef struct tvi_functions_s { - int (*init)(); - int (*uninit)(); - int (*control)(); - int (*start)(); - double (*grab_video_frame)(); - int (*get_video_framesize)(); - double (*grab_audio_frame)(); - int (*get_audio_framesize)(); + int (*init)(struct priv *priv); + int (*uninit)(struct priv *priv); + int (*control)(struct priv *priv, int cmd, void *arg); + int (*start)(struct priv *priv); + double (*grab_video_frame)(struct priv *priv, char *buffer, int len); + int (*get_video_framesize)(struct priv *priv); + double (*grab_audio_frame)(struct priv *priv, char *buffer, int len); + int (*get_audio_framesize)(struct priv *priv); } tvi_functions_t; typedef struct tvi_handle_s { diff -r 22713e4fde5f -r 016194f71de3 stream/tvi_bsdbt848.c --- a/stream/tvi_bsdbt848.c Sun Jun 13 17:18:48 2010 +0000 +++ b/stream/tvi_bsdbt848.c Sun Jun 13 17:20:29 2010 +0000 @@ -101,7 +101,7 @@ } RBFRAME; /* private data's */ -typedef struct { +typedef struct priv { /* Audio */ char *dspdev; diff -r 22713e4fde5f -r 016194f71de3 stream/tvi_dshow.c --- a/stream/tvi_dshow.c Sun Jun 13 17:18:48 2010 +0000 +++ b/stream/tvi_dshow.c Sun Jun 13 17:20:29 2010 +0000 @@ -167,7 +167,7 @@ void** arStreamCaps; ///< VIDEO_STREAM_CONFIG_CAPS or AUDIO_STREAM_CONFIG_CAPS } chain_t; -typedef struct { +typedef struct priv { int dev_index; ///< capture device index in device list (defaul: 0, first available device) int adev_index; ///< audio capture device index in device list (default: -1, not used) int immediate_mode; ///< immediate mode (no sound capture) diff -r 22713e4fde5f -r 016194f71de3 stream/tvi_dummy.c --- a/stream/tvi_dummy.c Sun Jun 13 17:18:48 2010 +0000 +++ b/stream/tvi_dummy.c Sun Jun 13 17:20:29 2010 +0000 @@ -35,7 +35,7 @@ }; /* private data's */ -typedef struct { +typedef struct priv { int width; int height; } priv_t; diff -r 22713e4fde5f -r 016194f71de3 stream/tvi_v4l.c --- a/stream/tvi_v4l.c Sun Jun 13 17:18:48 2010 +0000 +++ b/stream/tvi_v4l.c Sun Jun 13 17:20:29 2010 +0000 @@ -87,7 +87,7 @@ #define VID_BUF_SIZE_IMMEDIATE 2 #define VIDEO_AVG_BUFFER_SIZE 600 -typedef struct { +typedef struct priv { /* general */ char *video_device; int video_fd; diff -r 22713e4fde5f -r 016194f71de3 stream/tvi_v4l2.c --- a/stream/tvi_v4l2.c Sun Jun 13 17:18:48 2010 +0000 +++ b/stream/tvi_v4l2.c Sun Jun 13 17:20:29 2010 +0000 @@ -85,7 +85,7 @@ } video_buffer_entry; /* private data */ -typedef struct { +typedef struct priv { /* video */ char *video_dev; int video_fd;