2012-03-30 23:13:38 +00:00
|
|
|
/*
|
|
|
|
* This file is part of MPlayer.
|
|
|
|
*
|
|
|
|
* MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MPlayer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* You can alternatively redistribute this file and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <assert.h>
|
|
|
|
|
2012-08-15 20:23:02 +00:00
|
|
|
#include <libavutil/common.h>
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
#include "config.h"
|
2012-03-30 23:13:38 +00:00
|
|
|
|
|
|
|
#include "talloc.h"
|
2012-11-09 00:06:43 +00:00
|
|
|
#include "core/mp_common.h"
|
|
|
|
#include "core/bstr.h"
|
|
|
|
#include "core/mp_msg.h"
|
2013-03-01 20:19:20 +00:00
|
|
|
#include "core/m_config.h"
|
2012-11-09 00:06:43 +00:00
|
|
|
#include "vo.h"
|
|
|
|
#include "video/vfcap.h"
|
|
|
|
#include "video/mp_image.h"
|
2012-03-30 23:13:38 +00:00
|
|
|
#include "sub/sub.h"
|
|
|
|
|
|
|
|
#include "gl_common.h"
|
2012-10-03 16:25:41 +00:00
|
|
|
#include "gl_osd.h"
|
2012-03-30 23:13:38 +00:00
|
|
|
#include "filter_kernels.h"
|
2012-11-09 00:06:43 +00:00
|
|
|
#include "video/memcpy_pic.h"
|
2013-03-01 20:19:20 +00:00
|
|
|
#include "gl_video.h"
|
|
|
|
#include "gl_lcms.h"
|
2012-03-30 23:13:38 +00:00
|
|
|
|
|
|
|
struct gl_priv {
|
|
|
|
struct vo *vo;
|
|
|
|
MPGLContext *glctx;
|
|
|
|
GL *gl;
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
struct gl_video *renderer;
|
|
|
|
|
|
|
|
// Options
|
|
|
|
struct gl_video_opts *renderer_opts;
|
|
|
|
struct mp_icc_opts *icc_opts;
|
2012-03-30 23:13:38 +00:00
|
|
|
int use_glFinish;
|
|
|
|
int use_gl_debug;
|
2012-10-02 23:54:13 +00:00
|
|
|
int allow_sw;
|
2012-03-30 23:13:38 +00:00
|
|
|
int swap_interval;
|
2013-03-01 20:19:20 +00:00
|
|
|
char *backend;
|
2012-03-30 23:13:38 +00:00
|
|
|
|
|
|
|
int vo_flipped;
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
int frames_rendered;
|
|
|
|
};
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
// Always called under mpgl_lock
|
2012-03-30 23:13:38 +00:00
|
|
|
static void resize(struct gl_priv *p)
|
|
|
|
{
|
|
|
|
struct vo *vo = p->vo;
|
|
|
|
|
|
|
|
mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n", vo->dwidth, vo->dheight);
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
struct mp_rect wnd = {0, 0, vo->dwidth, vo->dheight};
|
|
|
|
struct mp_rect src, dst;
|
|
|
|
struct mp_osd_res osd;
|
|
|
|
vo_get_src_dst_rects(vo, &src, &dst, &osd);
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
gl_video_resize(p->renderer, &wnd, &src, &dst, &osd);
|
2012-03-30 23:13:38 +00:00
|
|
|
|
|
|
|
vo->want_redraw = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void flip_page(struct vo *vo)
|
|
|
|
{
|
|
|
|
struct gl_priv *p = vo->priv;
|
|
|
|
GL *gl = p->gl;
|
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
|
|
|
|
2012-03-30 23:13:38 +00:00
|
|
|
if (p->use_glFinish)
|
|
|
|
gl->Finish();
|
|
|
|
|
|
|
|
p->glctx->swapGlBuffers(p->glctx);
|
|
|
|
|
2012-09-23 18:28:05 +00:00
|
|
|
p->frames_rendered++;
|
2013-03-01 20:19:20 +00:00
|
|
|
if (p->frames_rendered > 5)
|
|
|
|
gl_video_set_debug(p->renderer, false);
|
2013-03-05 00:20:43 +00:00
|
|
|
|
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
static void draw_osd(struct vo *vo, struct osd_state *osd)
|
2012-03-30 23:13:38 +00:00
|
|
|
{
|
|
|
|
struct gl_priv *p = vo->priv;
|
2012-12-12 22:55:41 +00:00
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
gl_video_draw_osd(p->renderer, osd);
|
2013-03-05 00:20:43 +00:00
|
|
|
|
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
|
2012-11-04 14:56:04 +00:00
|
|
|
static void draw_image(struct vo *vo, mp_image_t *mpi)
|
2012-03-30 23:13:38 +00:00
|
|
|
{
|
2012-11-04 14:56:04 +00:00
|
|
|
struct gl_priv *p = vo->priv;
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
if (p->vo_flipped)
|
|
|
|
mp_image_vflip(mpi);
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
gl_video_upload_image(p->renderer, mpi);
|
|
|
|
gl_video_render_frame(p->renderer);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
|
2012-11-04 15:24:18 +00:00
|
|
|
static int query_format(struct vo *vo, uint32_t format)
|
2012-03-30 23:13:38 +00:00
|
|
|
{
|
2013-03-01 10:16:01 +00:00
|
|
|
int caps = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_FLIP;
|
2013-03-01 20:19:20 +00:00
|
|
|
if (!gl_video_check_format(format))
|
2012-03-30 23:13:38 +00:00
|
|
|
return 0;
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
2013-02-24 22:32:51 +00:00
|
|
|
static bool config_window(struct gl_priv *p, uint32_t d_width,
|
2012-03-30 23:13:38 +00:00
|
|
|
uint32_t d_height, uint32_t flags)
|
|
|
|
{
|
2013-03-01 20:19:20 +00:00
|
|
|
if (p->renderer_opts->stereo_mode == GL_3D_QUADBUFFER)
|
2012-03-30 23:13:38 +00:00
|
|
|
flags |= VOFLAG_STEREO;
|
|
|
|
|
2013-03-28 20:44:27 +00:00
|
|
|
if (p->renderer_opts->enable_alpha)
|
|
|
|
flags |= VOFLAG_ALPHA;
|
|
|
|
|
2012-10-02 23:54:13 +00:00
|
|
|
if (p->use_gl_debug)
|
|
|
|
flags |= VOFLAG_GL_DEBUG;
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2012-10-02 23:54:13 +00:00
|
|
|
int mpgl_caps = MPGL_CAP_GL21 | MPGL_CAP_TEX_RG;
|
|
|
|
if (!p->allow_sw)
|
|
|
|
mpgl_caps |= MPGL_CAP_NO_SW;
|
2013-02-24 22:32:51 +00:00
|
|
|
return mpgl_config_window(p->glctx, mpgl_caps, d_width, d_height, flags);
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
|
2013-03-04 13:23:06 +00:00
|
|
|
static void video_resize_redraw_callback(struct vo *vo, int w, int h)
|
|
|
|
{
|
|
|
|
struct gl_priv *p = vo->priv;
|
|
|
|
gl_video_resize_redraw(p->renderer, w, h);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-06-07 23:35:44 +00:00
|
|
|
static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
2012-03-30 23:13:38 +00:00
|
|
|
{
|
|
|
|
struct gl_priv *p = vo->priv;
|
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
|
|
|
|
2013-06-07 23:35:44 +00:00
|
|
|
if (!config_window(p, vo->dwidth, vo->dheight, flags)) {
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
return -1;
|
2013-03-05 00:20:43 +00:00
|
|
|
}
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-04 13:23:06 +00:00
|
|
|
if (p->glctx->register_resize_callback) {
|
|
|
|
p->glctx->register_resize_callback(vo, video_resize_redraw_callback);
|
|
|
|
}
|
|
|
|
|
2013-06-07 23:35:44 +00:00
|
|
|
gl_video_config(p->renderer, params);
|
2012-10-02 23:54:13 +00:00
|
|
|
|
2012-03-30 23:13:38 +00:00
|
|
|
p->vo_flipped = !!(flags & VOFLAG_FLIPPING);
|
|
|
|
|
|
|
|
resize(p);
|
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
|
|
|
|
2012-03-30 23:13:38 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
static bool reparse_cmdline(struct gl_priv *p, char *args)
|
|
|
|
{
|
|
|
|
struct m_config *cfg = NULL;
|
2013-07-27 19:26:00 +00:00
|
|
|
struct gl_video_opts *opts = NULL;
|
2013-03-01 20:19:20 +00:00
|
|
|
int r = 0;
|
|
|
|
|
|
|
|
if (strcmp(args, "-") == 0) {
|
2013-07-27 19:26:00 +00:00
|
|
|
opts = p->renderer_opts;
|
2013-03-01 20:19:20 +00:00
|
|
|
} else {
|
2013-07-27 19:26:00 +00:00
|
|
|
cfg = m_config_new(NULL, sizeof(*opts), gl_video_conf.defaults,
|
|
|
|
gl_video_conf.opts);
|
|
|
|
opts = cfg->optstruct;
|
2013-03-01 20:19:20 +00:00
|
|
|
const char *init = p->vo->driver->init_option_string;
|
|
|
|
if (init)
|
|
|
|
m_config_parse_suboptions(cfg, "opengl", (char *)init);
|
|
|
|
r = m_config_parse_suboptions(cfg, "opengl", args);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (r >= 0) {
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2013-07-27 19:26:00 +00:00
|
|
|
gl_video_set_options(p->renderer, opts);
|
2013-03-01 20:19:20 +00:00
|
|
|
resize(p);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
talloc_free(cfg);
|
|
|
|
return r >= 0;
|
|
|
|
}
|
|
|
|
|
2012-03-30 23:13:38 +00:00
|
|
|
static int control(struct vo *vo, uint32_t request, void *data)
|
|
|
|
{
|
|
|
|
struct gl_priv *p = vo->priv;
|
|
|
|
|
|
|
|
switch (request) {
|
|
|
|
case VOCTRL_GET_PANSCAN:
|
|
|
|
return VO_TRUE;
|
|
|
|
case VOCTRL_SET_PANSCAN:
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
resize(p);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
return VO_TRUE;
|
|
|
|
case VOCTRL_GET_EQUALIZER: {
|
|
|
|
struct voctrl_get_equalizer_args *args = data;
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
bool r = gl_video_get_equalizer(p->renderer, args->name,
|
|
|
|
args->valueptr);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
return r ? VO_TRUE : VO_NOTIMPL;
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
case VOCTRL_SET_EQUALIZER: {
|
|
|
|
struct voctrl_set_equalizer_args *args = data;
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
bool r = gl_video_set_equalizer(p->renderer, args->name, args->value);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
if (r)
|
|
|
|
vo->want_redraw = true;
|
|
|
|
return r ? VO_TRUE : VO_NOTIMPL;
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
case VOCTRL_SET_YUV_COLORSPACE: {
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
gl_video_set_csp_override(p->renderer, data);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
vo->want_redraw = true;
|
2012-03-30 23:13:38 +00:00
|
|
|
return VO_TRUE;
|
|
|
|
}
|
|
|
|
case VOCTRL_GET_YUV_COLORSPACE:
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
gl_video_get_csp_override(p->renderer, data);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
return VO_TRUE;
|
|
|
|
case VOCTRL_SCREENSHOT: {
|
|
|
|
struct voctrl_screenshot_args *args = data;
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
if (args->full_window)
|
2012-10-21 14:25:42 +00:00
|
|
|
args->out_image = glGetWindowScreenshot(p->gl);
|
2012-03-30 23:13:38 +00:00
|
|
|
else
|
2013-03-01 20:19:20 +00:00
|
|
|
args->out_image = gl_video_download_image(p->renderer);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
case VOCTRL_REDRAW_FRAME:
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_lock(p->glctx);
|
2013-03-01 20:19:20 +00:00
|
|
|
gl_video_render_frame(p->renderer);
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unlock(p->glctx);
|
2012-03-30 23:13:38 +00:00
|
|
|
return true;
|
2012-07-31 23:35:58 +00:00
|
|
|
case VOCTRL_SET_COMMAND_LINE: {
|
|
|
|
char *arg = data;
|
2013-03-01 20:19:20 +00:00
|
|
|
return reparse_cmdline(p, arg);
|
2012-07-31 23:35:58 +00:00
|
|
|
}
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
2013-05-15 16:17:18 +00:00
|
|
|
|
|
|
|
mpgl_lock(p->glctx);
|
|
|
|
int events = 0;
|
|
|
|
int r = p->glctx->vo_control(vo, &events, request, data);
|
|
|
|
if (events & VO_EVENT_RESIZE)
|
|
|
|
resize(p);
|
|
|
|
if (events & VO_EVENT_EXPOSE)
|
|
|
|
vo->want_redraw = true;
|
|
|
|
mpgl_unlock(p->glctx);
|
|
|
|
|
|
|
|
return r;
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void uninit(struct vo *vo)
|
|
|
|
{
|
|
|
|
struct gl_priv *p = vo->priv;
|
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
if (p->glctx) {
|
|
|
|
if (p->renderer)
|
|
|
|
gl_video_uninit(p->renderer);
|
|
|
|
mpgl_uninit(p->glctx);
|
|
|
|
}
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
|
2013-07-22 20:52:42 +00:00
|
|
|
static int preinit(struct vo *vo)
|
2012-03-30 23:13:38 +00:00
|
|
|
{
|
2013-03-01 20:19:20 +00:00
|
|
|
struct gl_priv *p = vo->priv;
|
|
|
|
p->vo = vo;
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
p->glctx = mpgl_init(vo, p->backend);
|
|
|
|
if (!p->glctx)
|
|
|
|
goto err_out;
|
|
|
|
p->gl = p->glctx->gl;
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
if (!config_window(p, 320, 200, VOFLAG_HIDDEN))
|
|
|
|
goto err_out;
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-04 13:23:06 +00:00
|
|
|
mpgl_set_context(p->glctx);
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
if (p->gl->SwapInterval)
|
|
|
|
p->gl->SwapInterval(p->swap_interval);
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
p->renderer = gl_video_init(p->gl);
|
|
|
|
gl_video_set_output_depth(p->renderer, p->glctx->depth_r, p->glctx->depth_g,
|
|
|
|
p->glctx->depth_b);
|
|
|
|
gl_video_set_options(p->renderer, p->renderer_opts);
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
if (p->icc_opts->profile) {
|
|
|
|
struct lut3d *lut3d = mp_load_icc(p->icc_opts);
|
|
|
|
if (!lut3d)
|
|
|
|
goto err_out;
|
|
|
|
gl_video_set_lut3d(p->renderer, lut3d);
|
|
|
|
talloc_free(lut3d);
|
2012-03-30 23:13:38 +00:00
|
|
|
}
|
|
|
|
|
2013-03-05 00:20:43 +00:00
|
|
|
mpgl_unset_context(p->glctx);
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
return 0;
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
err_out:
|
|
|
|
uninit(vo);
|
2012-03-30 23:13:38 +00:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
#define OPT_BASE_STRUCT struct gl_priv
|
|
|
|
const struct m_option options[] = {
|
|
|
|
OPT_FLAG("glfinish", use_glFinish, 0),
|
|
|
|
OPT_INT("swapinterval", swap_interval, 0, OPTDEF_INT(1)),
|
|
|
|
OPT_FLAG("debug", use_gl_debug, 0),
|
2013-07-21 23:21:39 +00:00
|
|
|
OPT_STRING_VALIDATE("backend", backend, 0, mpgl_validate_backend_opt),
|
2013-03-01 20:19:20 +00:00
|
|
|
OPT_FLAG("sw", allow_sw, 0),
|
2012-09-29 16:36:05 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
OPT_SUBSTRUCT("", renderer_opts, gl_video_conf, 0),
|
|
|
|
OPT_SUBSTRUCT("", icc_opts, mp_icc_conf, 0),
|
|
|
|
{0},
|
|
|
|
};
|
2012-03-30 23:13:38 +00:00
|
|
|
|
2012-09-23 14:10:00 +00:00
|
|
|
const struct vo_driver video_out_opengl = {
|
|
|
|
.info = &(const vo_info_t) {
|
|
|
|
"Extended OpenGL Renderer",
|
|
|
|
"opengl",
|
|
|
|
"Based on vo_gl.c by Reimar Doeffinger",
|
|
|
|
""
|
|
|
|
},
|
|
|
|
.preinit = preinit,
|
2012-11-04 15:24:18 +00:00
|
|
|
.query_format = query_format,
|
2013-06-07 23:35:44 +00:00
|
|
|
.reconfig = reconfig,
|
2012-09-23 14:10:00 +00:00
|
|
|
.control = control,
|
2012-11-04 14:56:04 +00:00
|
|
|
.draw_image = draw_image,
|
VO, sub: refactor
Remove VFCTRL_DRAW_OSD, VFCAP_EOSD_FILTER, VFCAP_EOSD_RGBA, VFCAP_EOSD,
VOCTRL_DRAW_EOSD, VOCTRL_GET_EOSD_RES, VOCTRL_QUERY_EOSD_FORMAT.
Remove draw_osd_with_eosd(), which rendered the OSD by calling
VOCTRL_DRAW_EOSD. Change VOs to call osd_draw() directly, which takes
a callback as argument. (This basically works like the old OSD API,
except multiple OSD bitmap formats are supported and caching is
possible.)
Remove all mentions of "eosd". It's simply "osd" now.
Make OSD size per-OSD-object, as they can be different when using
vf_sub. Include display_par/video_par in resolution change detection.
Fix the issue with margin borders in vo_corevideo.
2012-10-19 17:25:18 +00:00
|
|
|
.draw_osd = draw_osd,
|
2012-09-23 14:10:00 +00:00
|
|
|
.flip_page = flip_page,
|
|
|
|
.uninit = uninit,
|
2013-03-01 20:19:20 +00:00
|
|
|
.priv_size = sizeof(struct gl_priv),
|
|
|
|
.options = options,
|
2012-09-23 14:10:00 +00:00
|
|
|
};
|
|
|
|
|
2012-09-29 16:36:05 +00:00
|
|
|
const struct vo_driver video_out_opengl_hq = {
|
2012-03-30 23:13:38 +00:00
|
|
|
.info = &(const vo_info_t) {
|
2012-09-29 16:36:05 +00:00
|
|
|
"Extended OpenGL Renderer (high quality rendering preset)",
|
|
|
|
"opengl-hq",
|
2012-03-30 23:13:38 +00:00
|
|
|
"Based on vo_gl.c by Reimar Doeffinger",
|
|
|
|
""
|
|
|
|
},
|
|
|
|
.preinit = preinit,
|
2012-11-04 15:24:18 +00:00
|
|
|
.query_format = query_format,
|
2013-06-07 23:35:44 +00:00
|
|
|
.reconfig = reconfig,
|
2012-03-30 23:13:38 +00:00
|
|
|
.control = control,
|
2012-11-04 14:56:04 +00:00
|
|
|
.draw_image = draw_image,
|
VO, sub: refactor
Remove VFCTRL_DRAW_OSD, VFCAP_EOSD_FILTER, VFCAP_EOSD_RGBA, VFCAP_EOSD,
VOCTRL_DRAW_EOSD, VOCTRL_GET_EOSD_RES, VOCTRL_QUERY_EOSD_FORMAT.
Remove draw_osd_with_eosd(), which rendered the OSD by calling
VOCTRL_DRAW_EOSD. Change VOs to call osd_draw() directly, which takes
a callback as argument. (This basically works like the old OSD API,
except multiple OSD bitmap formats are supported and caching is
possible.)
Remove all mentions of "eosd". It's simply "osd" now.
Make OSD size per-OSD-object, as they can be different when using
vf_sub. Include display_par/video_par in resolution change detection.
Fix the issue with margin borders in vo_corevideo.
2012-10-19 17:25:18 +00:00
|
|
|
.draw_osd = draw_osd,
|
2012-03-30 23:13:38 +00:00
|
|
|
.flip_page = flip_page,
|
|
|
|
.uninit = uninit,
|
2013-03-01 20:19:20 +00:00
|
|
|
.priv_size = sizeof(struct gl_priv),
|
|
|
|
.options = options,
|
2013-03-28 20:39:17 +00:00
|
|
|
.init_option_string = "lscale=lanczos2:dither-depth=auto:pbo:fbo-format=rgb16",
|
2012-03-30 23:13:38 +00:00
|
|
|
};
|