changeset 31322:016194f71de3

Fix function pointer types in tvi_functions struct to be proper declarations.
author reimar
date Sun, 13 Jun 2010 17:20:29 +0000
parents 22713e4fde5f
children c674bb16fa6d
files stream/tv.h stream/tvi_bsdbt848.c stream/tvi_dshow.c stream/tvi_dummy.c stream/tvi_v4l.c stream/tvi_v4l2.c
diffstat 6 files changed, 16 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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 {
--- 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;
--- 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)
--- 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;
--- 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;
--- 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;