summaryrefslogtreecommitdiffstats
path: root/libmpdemux/tv.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-27 23:52:48 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-27 23:52:48 +0000
commitb0b22ba9b01abdb71cf19483fc2e613f2b9b8a3b (patch)
tree1a91e338c770d25a3461712d8987360317423d4f /libmpdemux/tv.c
parent193c7cf04ab371b2b159af3afed585f89e8d331e (diff)
downloadmpv-b0b22ba9b01abdb71cf19483fc2e613f2b9b8a3b.tar.bz2
mpv-b0b22ba9b01abdb71cf19483fc2e613f2b9b8a3b.tar.xz
updated
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3816 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/tv.c')
-rw-r--r--libmpdemux/tv.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c
index a76f474146..144230ff91 100644
--- a/libmpdemux/tv.c
+++ b/libmpdemux/tv.c
@@ -113,6 +113,8 @@ int stream_open_tv(stream_t *stream, tvi_handle_t *tvh)
picture_format = IMGFMT_I420;
else if (!strcasecmp(tv_param_outfmt, "uyvy"))
picture_format = IMGFMT_UYVY;
+// else if (!strcasecmp(tv_param_outfmt, "yuy2"))
+// picture_format = IMGFMT_YUY2;
else if (!strcasecmp(tv_param_outfmt, "rgb32"))
picture_format = IMGFMT_RGB32;
else if (!strcasecmp(tv_param_outfmt, "rgb24"))
@@ -258,6 +260,8 @@ int demux_open_tv(demuxer_t *demuxer, tvi_handle_t *tvh)
sh_video->fps = tv_param_fps;
sh_video->frametime = 1.0f/sh_video->fps;
+ printf("fps: %f, frametime: %f\n", sh_video->fps, sh_video->frametime);
+
/* set width */
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_WIDTH, &sh_video->disp_w);
@@ -285,6 +289,8 @@ int demux_open_tv(demuxer_t *demuxer, tvi_handle_t *tvh)
/* yeah, audio is present */
if (funcs->control(tvh->priv, TVI_CONTROL_AUD_GET_FORMAT, &audio_format) != TVI_CONTROL_TRUE)
goto no_audio;
+ sh_audio->sample_format = audio_format;
+ sh_audio->wf->wBitsPerSample = 16;
switch(audio_format)
{
case AFMT_U8:
@@ -336,21 +342,13 @@ tvi_handle_t *tv_begin(void)
int tv_init(tvi_handle_t *tvh)
{
- tvi_param_t *params;
-
mp_msg(MSGT_TV, MSGL_INFO, "Selected driver: %s\n", tvh->info->short_name);
mp_msg(MSGT_TV, MSGL_INFO, " name: %s\n", tvh->info->name);
mp_msg(MSGT_TV, MSGL_INFO, " author: %s\n", tvh->info->author);
if (tvh->info->comment)
mp_msg(MSGT_TV, MSGL_INFO, " comment: %s\n", tvh->info->comment);
- params = malloc(sizeof(tvi_param_t)*2);
- params[0].opt = strdup("input");
- params[0].value = malloc(sizeof(int));
- (int)*(void **)params[0].value = tv_param_input;
- params[1].opt = params[1].value = NULL;
-
- return(tvh->functions->init(tvh->priv, params));
+ return(tvh->functions->init(tvh->priv));
}
int tv_uninit(tvi_handle_t *tvh)