mirror of https://github.com/mpv-player/mpv
video: rename VDCTRL_RESET_ASPECT to VDCTRL_REINIT_VO
Same thing, and VDCTRL_REINIT_VO implies more generic use.
This commit is contained in:
parent
f921a675ae
commit
c970f5c328
|
@ -1205,7 +1205,7 @@ static int mp_property_aspect(m_option_t *prop, int action, void *arg,
|
||||||
if (f < 0.1)
|
if (f < 0.1)
|
||||||
f = (float)mpctx->sh_video->disp_w / mpctx->sh_video->disp_h;
|
f = (float)mpctx->sh_video->disp_w / mpctx->sh_video->disp_h;
|
||||||
mpctx->opts.movie_aspect = f;
|
mpctx->opts.movie_aspect = f;
|
||||||
video_reset_aspect(mpctx->sh_video);
|
video_reinit_vo(mpctx->sh_video);
|
||||||
return M_PROPERTY_OK;
|
return M_PROPERTY_OK;
|
||||||
}
|
}
|
||||||
case M_PROPERTY_GET:
|
case M_PROPERTY_GET:
|
||||||
|
|
|
@ -162,9 +162,9 @@ void resync_video_stream(sh_video_t *sh_video)
|
||||||
sh_video->prev_sorted_pts = MP_NOPTS_VALUE;
|
sh_video->prev_sorted_pts = MP_NOPTS_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void video_reset_aspect(struct sh_video *sh_video)
|
void video_reinit_vo(struct sh_video *sh_video)
|
||||||
{
|
{
|
||||||
sh_video->vd_driver->control(sh_video, VDCTRL_RESET_ASPECT, NULL);
|
sh_video->vd_driver->control(sh_video, VDCTRL_REINIT_VO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_current_video_decoder_lag(sh_video_t *sh_video)
|
int get_current_video_decoder_lag(sh_video_t *sh_video)
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct mp_csp_details;
|
||||||
void get_detected_video_colorspace(struct sh_video *sh, struct mp_csp_details *csp);
|
void get_detected_video_colorspace(struct sh_video *sh, struct mp_csp_details *csp);
|
||||||
void set_video_colorspace(struct sh_video *sh);
|
void set_video_colorspace(struct sh_video *sh);
|
||||||
void resync_video_stream(sh_video_t *sh_video);
|
void resync_video_stream(sh_video_t *sh_video);
|
||||||
void video_reset_aspect(struct sh_video *sh_video);
|
void video_reinit_vo(struct sh_video *sh_video);
|
||||||
int get_current_video_decoder_lag(sh_video_t *sh_video);
|
int get_current_video_decoder_lag(sh_video_t *sh_video);
|
||||||
|
|
||||||
extern int divx_quality;
|
extern int divx_quality;
|
||||||
|
|
|
@ -42,7 +42,7 @@ extern const vd_functions_t *const mpcodecs_vd_drivers[];
|
||||||
|
|
||||||
#define VDCTRL_RESYNC_STREAM 8 // reset decode state after seeking
|
#define VDCTRL_RESYNC_STREAM 8 // reset decode state after seeking
|
||||||
#define VDCTRL_QUERY_UNSEEN_FRAMES 9 // current decoder lag
|
#define VDCTRL_QUERY_UNSEEN_FRAMES 9 // current decoder lag
|
||||||
#define VDCTRL_RESET_ASPECT 10 // reinit filter/VO chain for new aspect ratio
|
#define VDCTRL_REINIT_VO 10 // reinit filter/VO chain
|
||||||
|
|
||||||
int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int outfmt);
|
int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int outfmt);
|
||||||
|
|
||||||
|
|
|
@ -772,7 +772,7 @@ static int control(sh_video_t *sh, int cmd, void *arg)
|
||||||
delay += avctx->thread_count - 1;
|
delay += avctx->thread_count - 1;
|
||||||
*(int *)arg = delay;
|
*(int *)arg = delay;
|
||||||
return CONTROL_TRUE;
|
return CONTROL_TRUE;
|
||||||
case VDCTRL_RESET_ASPECT:
|
case VDCTRL_REINIT_VO:
|
||||||
if (ctx->vo_initialized)
|
if (ctx->vo_initialized)
|
||||||
ctx->vo_initialized = false;
|
ctx->vo_initialized = false;
|
||||||
init_vo(sh, ctx->pic);
|
init_vo(sh, ctx->pic);
|
||||||
|
|
Loading…
Reference in New Issue