diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-16 06:54:22 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-16 07:01:46 +0200 |
commit | 287b62163eed8811b6cd33716c0691d328947d48 (patch) | |
tree | 3143d2cb17b32a19e3e7e0aa428210d1bba3eb0b /stream/tvi_v4l.c | |
parent | 507f4fe6c7811558b1367e4b64855ae7f9bc8da8 (diff) | |
parent | b411278fbb00767b8013604157a43e0203f66f4c (diff) | |
download | mpv-287b62163eed8811b6cd33716c0691d328947d48.tar.bz2 mpv-287b62163eed8811b6cd33716c0691d328947d48.tar.xz |
Merge svn changes up to r29912
Diffstat (limited to 'stream/tvi_v4l.c')
-rw-r--r-- | stream/tvi_v4l.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c index ea7064762c..e46f13797c 100644 --- a/stream/tvi_v4l.c +++ b/stream/tvi_v4l.c @@ -40,6 +40,7 @@ #include "mp_msg.h" #include "libaf/af_format.h" #include "libmpcodecs/img_format.h" +#include "libmpcodecs/dec_teletext.h" #include "libvo/fastmemcpy.h" #include "libvo/videodev_mjpeg.h" @@ -141,14 +142,12 @@ typedef struct { long audio_recv_blocks_total; long audio_sent_blocks_total; long mjpeg_bufsize; -#ifdef CONFIG_TV_TELETEXT char *vbi_dev; int vbi_fd; int vbi_bufsize; int vbi_shutdown; pthread_t vbi_grabber_thread; void *priv_vbi; -#endif tv_param_t *tv_param; } priv_t; @@ -675,7 +674,6 @@ static int uninit(priv_t *priv) { unsigned long num; -#ifdef CONFIG_TV_TELETEXT priv->vbi_shutdown=1; if(priv->vbi_grabber_thread) pthread_join(priv->vbi_grabber_thread, NULL); @@ -693,8 +691,6 @@ static int uninit(priv_t *priv) priv->vbi_dev=0; } -#endif - priv->shutdown = 1; mp_msg(MSGT_TV, MSGL_V, "Waiting for threads to finish... "); @@ -781,7 +777,6 @@ static int get_capture_buffer_size(priv_t *priv) return cnt; } -#ifdef CONFIG_TV_TELETEXT static int vbi_init(priv_t* priv,char* device) { int vbi_fd=0; @@ -897,7 +892,6 @@ static void *vbi_grabber(void *data) free(buf); return NULL; } -#endif /* CONFIG_TV_TELETEXT */ static int start(priv_t *priv) { @@ -1111,13 +1105,11 @@ static int start(priv_t *priv) ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]); } -#ifdef CONFIG_TV_TELETEXT /* start vbi thread */ if(priv->priv_vbi){ priv->vbi_shutdown = 0; pthread_create(&priv->vbi_grabber_thread, NULL, vbi_grabber, priv); } -#endif /* launch capture threads */ priv->shutdown = 0; @@ -1511,7 +1503,6 @@ static int control(priv_t *priv, int cmd, void *arg) priv->immediate_mode = 1; return TVI_CONTROL_TRUE; } -#ifdef CONFIG_TV_TELETEXT case TVI_CONTROL_VBI_INIT: { void* ptr; @@ -1522,16 +1513,16 @@ static int control(priv_t *priv, int cmd, void *arg) if(vbi_get_props(priv,&tsp)==TVI_CONTROL_TRUE) { ptr=&tsp; - if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==TVI_CONTROL_TRUE) + if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==VBI_CONTROL_TRUE) priv->priv_vbi=ptr; else priv->priv_vbi=NULL; } return TVI_CONTROL_TRUE; } - default: - return teletext_control(priv->priv_vbi,cmd,arg); -#endif + case TVI_CONTROL_GET_VBI_PTR: + *(void **)arg=priv->priv_vbi; + return TVI_CONTROL_TRUE; } return TVI_CONTROL_UNKNOWN; |