diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-29 10:18:38 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-29 10:18:38 +0000 |
commit | 7cdc5ad4fe61b7fd8cc6648256ab952409fd6846 (patch) | |
tree | 1fd3222bfd5b1252c3daadd2bd34f6f4283e7f98 /stream/tvi_v4l.c | |
parent | b7adae655fe83b1b6609ba1f699b6e61c9a7bf12 (diff) | |
download | mpv-7cdc5ad4fe61b7fd8cc6648256ab952409fd6846.tar.bz2 mpv-7cdc5ad4fe61b7fd8cc6648256ab952409fd6846.tar.xz |
Removing global variables from tv://
Step 2: fixing tv subdrivers initialization.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23903 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tvi_v4l.c')
-rw-r--r-- | stream/tvi_v4l.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c index aaf3aab1dc..1a190fd9ff 100644 --- a/stream/tvi_v4l.c +++ b/stream/tvi_v4l.c @@ -48,7 +48,7 @@ #include "audio_in.h" -static tvi_handle_t *tvi_init_v4l(char *device, char *adevice); +static tvi_handle_t *tvi_init_v4l(tv_param_t* tv_param); tvi_info_t tvi_info_v4l = { tvi_init_v4l, @@ -143,6 +143,7 @@ typedef struct { long audio_sent_blocks_total; long mjpeg_bufsize; + tv_param_t *tv_param; } priv_t; #include "tvi_def.h" @@ -269,7 +270,7 @@ static void setup_audio_buffer_sizes(priv_t *priv) priv->audio_buffer_size, priv->audio_in.blocksize, priv->aud_skew_cnt); } -static tvi_handle_t *tvi_init_v4l(char *device, char *adevice) +static tvi_handle_t *tvi_init_v4l(tv_param_t* tv_param) { tvi_handle_t *h; priv_t *priv; @@ -281,16 +282,16 @@ static tvi_handle_t *tvi_init_v4l(char *device, char *adevice) priv = h->priv; /* set video device name */ - if (!device) + if (!tv_param->device) priv->video_device = strdup("/dev/video0"); else - priv->video_device = strdup(device); + priv->video_device = strdup(tv_param->device); /* set video device name */ - if (!adevice) + if (!tv_param->adevice) priv->audio_device = NULL; else { - priv->audio_device = strdup(adevice); + priv->audio_device = strdup(tv_param->adevice); } /* allocation failed */ @@ -299,6 +300,7 @@ static tvi_handle_t *tvi_init_v4l(char *device, char *adevice) return(NULL); } + h->tv_param=tv_param; return(h); } |