diff options
author | wm4 <wm4@nowhere> | 2012-11-04 15:56:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 17:39:31 +0100 |
commit | 191bcbd1f2a0aa7ab64ed0e2768f29fedf2f4c30 (patch) | |
tree | 5051c40e3342b47369953605ea0a7edf3d1599eb /video/out/vo_opengl.c | |
parent | 97032f1b58cc4c5c17002939703ee16904691675 (diff) | |
download | mpv-191bcbd1f2a0aa7ab64ed0e2768f29fedf2f4c30.tar.bz2 mpv-191bcbd1f2a0aa7ab64ed0e2768f29fedf2f4c30.tar.xz |
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.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index d1808af265..dfd368fb3e 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -1298,8 +1298,9 @@ static uint32_t get_image(struct vo *vo, mp_image_t *mpi) return VO_TRUE; } -static uint32_t draw_image(struct gl_priv *p, mp_image_t *mpi) +static void draw_image(struct vo *vo, mp_image_t *mpi) { + struct gl_priv *p = vo->priv; GL *gl = p->gl; int n; @@ -1348,7 +1349,6 @@ static uint32_t draw_image(struct gl_priv *p, mp_image_t *mpi) gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); skip_upload: do_render(p); - return VO_TRUE; } static mp_image_t *get_screenshot(struct gl_priv *p) @@ -1737,8 +1737,6 @@ static int control(struct vo *vo, uint32_t request, void *data) switch (request) { case VOCTRL_QUERY_FORMAT: return query_format(*(uint32_t *)data); - case VOCTRL_DRAW_IMAGE: - return draw_image(p, data); case VOCTRL_ONTOP: if (!p->glctx->ontop) break; @@ -2252,7 +2250,6 @@ err_out: } const struct vo_driver video_out_opengl = { - .is_new = true, .info = &(const vo_info_t) { "Extended OpenGL Renderer", "opengl", @@ -2262,6 +2259,7 @@ const struct vo_driver video_out_opengl = { .preinit = preinit, .config = config, .control = control, + .draw_image = draw_image, .draw_slice = draw_slice, .draw_osd = draw_osd, .flip_page = flip_page, @@ -2270,7 +2268,6 @@ const struct vo_driver video_out_opengl = { }; const struct vo_driver video_out_opengl_hq = { - .is_new = true, .info = &(const vo_info_t) { "Extended OpenGL Renderer (high quality rendering preset)", "opengl-hq", @@ -2280,6 +2277,7 @@ const struct vo_driver video_out_opengl_hq = { .preinit = preinit, .config = config, .control = control, + .draw_image = draw_image, .draw_slice = draw_slice, .draw_osd = draw_osd, .flip_page = flip_page, |