From fd63f2f0377f30fb66ee8e78d36dffeb9c4a549a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Apr 2014 15:12:38 +0200 Subject: vdpau_mixer: allow overriding frame opts So a caller can override the filter options dictated by vf_vdpaupp. --- video/vdpau_mixer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'video/vdpau_mixer.c') diff --git a/video/vdpau_mixer.c b/video/vdpau_mixer.c index f5743c5db3..1a53374622 100644 --- a/video/vdpau_mixer.c +++ b/video/vdpau_mixer.c @@ -204,7 +204,9 @@ static int create_vdp_mixer(struct mp_vdpau_mixer *mixer) return 0; } +// If opts is NULL, use the opts as implied by the video image. int mp_vdpau_mixer_render(struct mp_vdpau_mixer *mixer, + struct mp_vdpau_mixer_opts *opts, VdpOutputSurface output, VdpRect *output_rect, struct mp_image *video, VdpRect *video_rect) { @@ -223,13 +225,16 @@ int mp_vdpau_mixer_render(struct mp_vdpau_mixer *mixer, frame->field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; } + if (!opts) + opts = &frame->opts; + if (mixer->video_mixer == VDP_INVALID_HANDLE) mixer->initialized = false; - if (!mixer->initialized || !opts_equal(&frame->opts, &mixer->opts) || + if (!mixer->initialized || !opts_equal(opts, &mixer->opts) || !mp_image_params_equals(&video->params, &mixer->image_params)) { - mixer->opts = frame->opts; + mixer->opts = *opts; mixer->image_params = video->params; if (mixer->video_mixer != VDP_INVALID_HANDLE) { vdp_st = vdp->video_mixer_destroy(mixer->video_mixer); -- cgit v1.2.3