diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-06-13 17:20:29 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:07:42 +0200 |
commit | 7bc5b0253f659bccb6cd4268832ace7f1796e4be (patch) | |
tree | 934e184ab65682b9c8b35570929abb3100c799a5 | |
parent | ba6c59ddc53497565d34205b5fa85999c3a2dc4e (diff) | |
download | mpv-7bc5b0253f659bccb6cd4268832ace7f1796e4be.tar.bz2 mpv-7bc5b0253f659bccb6cd4268832ace7f1796e4be.tar.xz |
tv.h: Change function pointer types to proper declarations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31388 b3059339-0415-0410-9bf9-f77b7e298cf2
Note that the code is still questionable after this commit - the
shared data structure has pointers to "struct priv", but different
files use different incompatible definitions for that struct.
-rw-r--r-- | stream/tv.h | 19 | ||||
-rw-r--r-- | stream/tvi_bsdbt848.c | 2 | ||||
-rw-r--r-- | stream/tvi_dshow.c | 2 | ||||
-rw-r--r-- | stream/tvi_dummy.c | 2 | ||||
-rw-r--r-- | stream/tvi_v4l.c | 2 | ||||
-rw-r--r-- | stream/tvi_v4l2.c | 2 |
6 files changed, 16 insertions, 13 deletions
diff --git a/stream/tv.h b/stream/tv.h index 48ff88ecc2..c2e8e05120 100644 --- a/stream/tv.h +++ b/stream/tv.h @@ -109,16 +109,19 @@ typedef struct tvi_info_s 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 --git a/stream/tvi_bsdbt848.c b/stream/tvi_bsdbt848.c index f095bbc070..1fd6b879d4 100644 --- a/stream/tvi_bsdbt848.c +++ b/stream/tvi_bsdbt848.c @@ -100,7 +100,7 @@ typedef struct { } RBFRAME; /* private data's */ -typedef struct { +typedef struct priv { /* Audio */ char *dspdev; diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c index 54b8b43f27..0b60fff255 100644 --- a/stream/tvi_dshow.c +++ b/stream/tvi_dshow.c @@ -166,7 +166,7 @@ typedef struct { 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 --git a/stream/tvi_dummy.c b/stream/tvi_dummy.c index 8924c79220..50941a2925 100644 --- a/stream/tvi_dummy.c +++ b/stream/tvi_dummy.c @@ -35,7 +35,7 @@ const tvi_info_t tvi_info_dummy = { }; /* private data's */ -typedef struct { +typedef struct priv { int width; int height; } priv_t; diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c index be02c1176c..819f0e2e01 100644 --- a/stream/tvi_v4l.c +++ b/stream/tvi_v4l.c @@ -87,7 +87,7 @@ const tvi_info_t tvi_info_v4l = { #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 --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index 6166a1fe16..c189a861ba 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -85,7 +85,7 @@ typedef struct { } video_buffer_entry; /* private data */ -typedef struct { +typedef struct priv { /* video */ char *video_dev; int video_fd; |