From 2d8fb838d7823137661b420b98e68188532bb36f Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 6 Nov 2012 15:27:44 +0100 Subject: video: make vdpau hardware decoding not use DR code path vdpau hardware decoding used the DR (direct rendering) path to let the decoder query a surface from the VO. Special-case the HW decoding path instead, to make it separate from DR. --- video/filter/vf.h | 1 + video/filter/vf_vo.c | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'video/filter') diff --git a/video/filter/vf.h b/video/filter/vf.h index 29727259ba..1a850995f3 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -98,6 +98,7 @@ struct vf_ctrl_screenshot { #define VFCTRL_SET_EQUALIZER 6 // set color options (brightness,contrast etc) #define VFCTRL_GET_EQUALIZER 8 // get color options (brightness,contrast etc) #define VFCTRL_HWDEC_DECODER_RENDER 9 // vdpau hw decoding +#define VFCTRL_HWDEC_GET_SURFACE 10 // vdpau hw decoding #define VFCTRL_SCREENSHOT 14 // Take screenshot, arg is vf_ctrl_screenshot #define VFCTRL_INIT_OSD 15 // Filter OSD renderer present? #define VFCTRL_SET_DEINTERLACE 18 // Set deinterlacing status diff --git a/video/filter/vf_vo.c b/video/filter/vf_vo.c index b8eb7bb13d..731d1bbcff 100644 --- a/video/filter/vf_vo.c +++ b/video/filter/vf_vo.c @@ -105,6 +105,8 @@ static int control(struct vf_instance *vf, int request, void *data) } case VFCTRL_HWDEC_DECODER_RENDER: return vo_control(video_out, VOCTRL_HWDEC_DECODER_RENDER, data); + case VFCTRL_HWDEC_GET_SURFACE: + return vo_control(video_out, VOCTRL_HWDEC_GET_SURFACE, data); } return CONTROL_UNKNOWN; } @@ -119,16 +121,6 @@ static int query_format(struct vf_instance *vf, unsigned int fmt) return flags; } -static void get_image(struct vf_instance *vf, - mp_image_t *mpi) -{ - if (!video_out->config_ok) - return; - // GET_IMAGE is required for hardware-accelerated formats - if (IMGFMT_IS_HWACCEL(mpi->imgfmt)) - vo_control(video_out, VOCTRL_GET_IMAGE, mpi); -} - static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { if (!video_out->config_ok) @@ -151,7 +143,6 @@ static int vf_open(vf_instance_t *vf, char *args) vf->config = config; vf->control = control; vf->query_format = query_format; - vf->get_image = get_image; vf->put_image = put_image; vf->uninit = uninit; vf->priv = calloc(1, sizeof(struct vf_priv_s)); -- cgit v1.2.3