mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
add tv fps support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3286 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1b902e0a66
commit
08fa1f628d
@ -109,6 +109,7 @@ struct config tvopts_conf[]={
|
|||||||
{"height", &tv_param_height, CONF_TYPE_INT, 0, 0, 4096},
|
{"height", &tv_param_height, CONF_TYPE_INT, 0, 0, 4096},
|
||||||
{"input", &tv_param_input, CONF_TYPE_INT, 0, 0, 20},
|
{"input", &tv_param_input, CONF_TYPE_INT, 0, 0, 20},
|
||||||
{"outfmt", &tv_param_outfmt, CONF_TYPE_STRING, 0, 0, 0},
|
{"outfmt", &tv_param_outfmt, CONF_TYPE_STRING, 0, 0, 0},
|
||||||
|
{"fps", &tv_param_fps, CONF_TYPE_FLOAT, 0, 0, 100.0},
|
||||||
{NULL, NULL, 0, 0, 0, 0}
|
{NULL, NULL, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@ int tv_param_width = -1;
|
|||||||
int tv_param_height = -1;
|
int tv_param_height = -1;
|
||||||
int tv_param_input = 0; /* used in v4l and bttv */
|
int tv_param_input = 0; /* used in v4l and bttv */
|
||||||
char *tv_param_outfmt = "yv12";
|
char *tv_param_outfmt = "yv12";
|
||||||
|
float tv_param_fps = -1.0;
|
||||||
|
|
||||||
/* ================== DEMUX_TV ===================== */
|
/* ================== DEMUX_TV ===================== */
|
||||||
/*
|
/*
|
||||||
@ -251,7 +251,9 @@ int demux_open_tv(demuxer_t *demuxer, tvi_handle_t *tvh)
|
|||||||
{
|
{
|
||||||
if (funcs->control(tvh->priv, TVI_CONTROL_VID_GET_FPS, &sh_video->fps) != TVI_CONTROL_TRUE)
|
if (funcs->control(tvh->priv, TVI_CONTROL_VID_GET_FPS, &sh_video->fps) != TVI_CONTROL_TRUE)
|
||||||
sh_video->fps = 25.0f; /* on PAL */
|
sh_video->fps = 25.0f; /* on PAL */
|
||||||
}
|
}
|
||||||
|
if (tv_param_fps != -1.0f)
|
||||||
|
sh_video->fps = tv_param_fps;
|
||||||
sh_video->frametime = 1.0f/sh_video->fps;
|
sh_video->frametime = 1.0f/sh_video->fps;
|
||||||
|
|
||||||
/* set width */
|
/* set width */
|
||||||
|
@ -19,6 +19,7 @@ extern int tv_param_width;
|
|||||||
extern int tv_param_height;
|
extern int tv_param_height;
|
||||||
extern int tv_param_input;
|
extern int tv_param_input;
|
||||||
extern char *tv_param_outfmt;
|
extern char *tv_param_outfmt;
|
||||||
|
extern float tv_param_fps;
|
||||||
|
|
||||||
typedef struct tvi_info_s
|
typedef struct tvi_info_s
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user