static void filter_video(struct MPContext *mpctx, struct mp_image *frame, bool reconfig_ok) { struct dec_video *d_video = mpctx->d_video; struct mp_image_params params; mp_image_params_from_image(¶ms, frame); if (!mp_image_params_equals(&d_video->decoder_output, ¶ms) || d_video->vfilter->initialized < 1) { // In case we want to wait until filter chain is drained if (!reconfig_ok) { talloc_free(d_video->waiting_decoded_mpi); d_video->waiting_decoded_mpi = frame; return; } reconfig_video(mpctx, ¶ms, false); if (d_video->vfilter->initialized > 0) init_filter_params(mpctx); } if (d_video->vfilter->initialized < 1) { talloc_free(frame); return; } mp_image_set_params(frame, &d_video->vf_input); // force csp/aspect overrides vf_filter_frame(d_video->vfilter, frame); filter_output_queued_frame(mpctx); }
static bool load_next_vo_frame(struct MPContext *mpctx, bool eof) { if (vo_get_buffered_frame(mpctx->video_out, eof) >= 0) return true; if (filter_output_queued_frame(mpctx)) return true; return false; }
static void filter_video(struct MPContext *mpctx, struct mp_image *frame) { struct sh_video *sh_video = mpctx->sh_video; init_filter_params(mpctx); frame->pts = sh_video->pts; mp_image_set_params(frame, sh_video->vf_input); vf_filter_frame(sh_video->vfilter, frame); filter_output_queued_frame(mpctx); }
static void filter_video(struct MPContext *mpctx, struct mp_image *frame) { struct dec_video *d_video = mpctx->d_video; init_filter_params(mpctx); frame->pts = d_video->pts; mp_image_set_params(frame, &d_video->vf_input); // force csp/aspect overrides vf_filter_frame(d_video->vfilter, frame); filter_output_queued_frame(mpctx); }