diff options
author | wm4 <wm4@nowhere> | 2013-12-07 19:32:44 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-07 19:32:44 +0100 |
commit | bb6165342db0ba60fefa97afe770b393fd6cb463 (patch) | |
tree | e97e2a9ab048dd339ff6bfd7112ab9e23bb6e7e6 /mpvcore/player/command.c | |
parent | 75d3bf4711f88a79af5fd3246a9503dbd6e01586 (diff) | |
download | mpv-bb6165342db0ba60fefa97afe770b393fd6cb463.tar.bz2 mpv-bb6165342db0ba60fefa97afe770b393fd6cb463.tar.xz |
video: create a separate context for video filter chain
This adds vf_chain, which unlike vf_instance refers to the filter chain
as a whole. This makes the filter API less awkward, and will allow
handling format negotiation better.
Diffstat (limited to 'mpvcore/player/command.c')
-rw-r--r-- | mpvcore/player/command.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mpvcore/player/command.c b/mpvcore/player/command.c index 05742e0da6..728e01c636 100644 --- a/mpvcore/player/command.c +++ b/mpvcore/player/command.c @@ -1189,13 +1189,13 @@ static int probe_deint_filters(struct MPContext *mpctx, const char *cmd) static int get_deinterlacing(struct MPContext *mpctx) { - vf_instance_t *vf = mpctx->d_video->vfilter; + struct vf_chain *c = mpctx->d_video->vfilter; int enabled = 0; - if (vf->control(vf, VFCTRL_GET_DEINTERLACE, &enabled) != CONTROL_OK) + if (vf_control_any(c, VFCTRL_GET_DEINTERLACE, &enabled) != CONTROL_OK) enabled = -1; if (enabled < 0) { // vf_lavfi doesn't support VFCTRL_GET_DEINTERLACE - if (vf_find_by_label(vf, VF_DEINTERLACE_LABEL)) + if (vf_find_by_label(c, VF_DEINTERLACE_LABEL)) enabled = 1; } return enabled; @@ -1203,14 +1203,14 @@ static int get_deinterlacing(struct MPContext *mpctx) static void set_deinterlacing(struct MPContext *mpctx, bool enable) { - vf_instance_t *vf = mpctx->d_video->vfilter; - if (vf_find_by_label(vf, VF_DEINTERLACE_LABEL)) { + struct vf_chain *c = mpctx->d_video->vfilter; + if (vf_find_by_label(c, VF_DEINTERLACE_LABEL)) { if (!enable) edit_filters(mpctx, STREAM_VIDEO, "del", "@" VF_DEINTERLACE_LABEL); } else { if ((get_deinterlacing(mpctx) > 0) != enable) { int arg = enable; - if (vf->control(vf, VFCTRL_SET_DEINTERLACE, &arg) != CONTROL_OK) + if (vf_control_any(c, VFCTRL_SET_DEINTERLACE, &arg) != CONTROL_OK) probe_deint_filters(mpctx, "pre"); } } |