From 191bcbd1f2a0aa7ab64ed0e2768f29fedf2f4c30 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 4 Nov 2012 15:56:04 +0100 Subject: video/out: make draw_image mandatory, remove VOCTRL_DRAW_IMAGE Remove VOCTRL_DRAW_IMAGE and always set vo_driver.draw_image in VOs. Make draw_image mandatory: change some VOs (like vo_x11) to support it, and remove the image-to-slices fallback in vf_vo. Remove vo_driver.is_new. This member indicated whether draw_image is supported unconditionally, which is now always the case. draw_image_pts is a hack until the video filter chain is changed to include the PTS as field in mp_image. Then vo_vdpau and vo_lavc will be changed to use draw_image. --- video/out/vo_image.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'video/out/vo_image.c') diff --git a/video/out/vo_image.c b/video/out/vo_image.c index e4d8636038..570955ca98 100644 --- a/video/out/vo_image.c +++ b/video/out/vo_image.c @@ -96,7 +96,7 @@ static void flip_page(struct vo *vo) { } -static uint32_t draw_image(struct vo *vo, mp_image_t *mpi) +static void draw_image(struct vo *vo, mp_image_t *mpi) { struct priv *p = vo->priv; @@ -118,8 +118,6 @@ static uint32_t draw_image(struct vo *vo, mp_image_t *mpi) talloc_free(t); (p->frame)++; - - return VO_TRUE; } static int query_format(struct vo *vo, uint32_t fmt) @@ -150,8 +148,6 @@ static int control(struct vo *vo, uint32_t request, void *data) switch (request) { case VOCTRL_QUERY_FORMAT: return query_format(vo, *(uint32_t *)data); - case VOCTRL_DRAW_IMAGE: - return draw_image(vo, data); case VOCTRL_SET_YUV_COLORSPACE: p->colorspace = *(struct mp_csp_details *)data; return true; @@ -170,7 +166,6 @@ static int control(struct vo *vo, uint32_t request, void *data) const struct vo_driver video_out_image = { - .is_new = true, .info = &(const vo_info_t) { "Write video frames to image files", "image", @@ -189,6 +184,7 @@ const struct vo_driver video_out_image = .preinit = preinit, .config = config, .control = control, + .draw_image = draw_image, .draw_osd = draw_osd, .flip_page = flip_page, .check_events = check_events, -- cgit v1.2.3