summaryrefslogtreecommitdiffstats
path: root/stream/tv.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 06:54:22 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 07:01:46 +0200
commit287b62163eed8811b6cd33716c0691d328947d48 (patch)
tree3143d2cb17b32a19e3e7e0aa428210d1bba3eb0b /stream/tv.c
parent507f4fe6c7811558b1367e4b64855ae7f9bc8da8 (diff)
parentb411278fbb00767b8013604157a43e0203f66f4c (diff)
downloadmpv-287b62163eed8811b6cd33716c0691d328947d48.tar.bz2
mpv-287b62163eed8811b6cd33716c0691d328947d48.tar.xz
Merge svn changes up to r29912
Diffstat (limited to 'stream/tv.c')
-rw-r--r--stream/tv.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/stream/tv.c b/stream/tv.c
index 324e059c5d..85a79267b6 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -29,6 +29,7 @@
#include "libaf/af_format.h"
#include "libmpcodecs/img_format.h"
+#include "libmpcodecs/dec_teletext.h"
#include "libavutil/avstring.h"
#include "osdep/timer.h"
@@ -333,7 +334,8 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm)
mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
- tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
+ teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
+ &tvh->tv_param->teletext);
return 1;
}
@@ -347,8 +349,9 @@ static int tv_set_norm_i(tvi_handle_t *tvh, int norm)
return 0;
}
- tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
- return(1);
+ teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
+ &tvh->tv_param->teletext);
+ return 1;
}
static int open_tv(tvi_handle_t *tvh)
@@ -675,7 +678,11 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer)
if(!(tvh=tv_begin(demuxer->stream->priv))) return NULL;
if (!tvh->functions->init(tvh->priv)) return NULL;
- tvh->functions->control(tvh->priv,TVI_CONTROL_VBI_INIT,&(tvh->tv_param->tdevice));
+ tvh->demuxer = demuxer;
+ tvh->functions->control(tvh->priv,TVI_CONTROL_VBI_INIT,
+ &(tvh->tv_param->teletext.device));
+ tvh->functions->control(tvh->priv,TVI_CONTROL_GET_VBI_PTR,
+ &demuxer->teletext);
if (!open_tv(tvh)){
tv_uninit(tvh);
@@ -818,7 +825,8 @@ no_audio:
if(funcs->control(tvh->priv,TVI_CONTROL_VID_SET_GAIN,&tvh->tv_param->gain)!=TVI_CONTROL_TRUE)
mp_msg(MSGT_TV,MSGL_WARN,"Unable to set gain control!\n");
- funcs->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
+ teletext_control(demuxer->teletext,TV_VBI_CONTROL_RESET,
+ &tvh->tv_param->teletext);
return demuxer;
}
@@ -830,6 +838,7 @@ static void demux_close_tv(demuxer_t *demuxer)
tv_uninit(tvh);
free(tvh);
demuxer->priv=NULL;
+ demuxer->teletext=NULL;
}
/* utilities for mplayer (not mencoder!!) */
@@ -899,7 +908,8 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq)
mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
freq, (float)freq/16);
}
- tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
+ teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
+ &tvh->tv_param->teletext);
return 1;
}
@@ -1080,7 +1090,8 @@ int tv_step_norm(tvi_handle_t *tvh)
return 0;
}
}
- tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
+ teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
+ &tvh->tv_param->teletext);
return 1;
}