xine-lib  1.2.10
xine_gl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018-2019 the xine project
3  * Copyright (C) 2018-2019 Petri Hintukainen <phintuka@users.sourceforge.net>
4  *
5  * This file is part of xine, a free video player.
6  *
7  * xine is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * xine is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  * xine_gl.h, Interface between OpenGL and native windowing system
22  *
23  * GL provider API, used in vo drivers
24  *
25  */
26 
27 #ifndef XINE_GL_H_
28 #define XINE_GL_H_
29 
30 #include <xine.h>
31 
32 typedef struct xine_gl xine_gl_t;
33 
34 struct xine_gl {
35  int (*make_current) (xine_gl_t *);
37  void (*swap_buffers) (xine_gl_t *);
38 
39  /* resize is needed only with WAYLAND visual */
40  void (*resize) (xine_gl_t *, int width, int height);
41  /* set_native_window is used only with X11 */
42  void (*set_native_window)(xine_gl_t *, void *);
43 
44  void (*dispose) (xine_gl_t **);
45 };
46 
47 xine_gl_t *_x_load_gl(xine_t *xine, unsigned visual_type, const void *visual, unsigned flags);
48 
49 /* flags */
50 #define XINE_GL_API_OPENGL 0x0001
51 
52 #endif /* XINE_GL_H_ */
xine_s
Definition: xine_internal.h:80
_x_find_module
xine_module_t * _x_find_module(xine_t *xine, const char *type, const char *id, unsigned sub_type, const void *params)
Definition: load_plugins.c:1769
_egl_init
static int _egl_init(xine_egl_t *egl, EGLNativeDisplayType native_display)
Definition: xine_egl.c:164
egl_init_class
static void * egl_init_class(xine_t *xine, const void *params)
Definition: xine_egl.c:316
xine_container_of
#define xine_container_of(ptr, type, member)
Definition: xineutils.h:247
xine_egl_t::surface
EGLSurface surface
Definition: xine_egl.c:54
xine_gl.h
gl_plugin_params_t::xine
xine_t * xine
Definition: xine_gl_plugin.h:48
gl_plugin_params_t::visual
const void * visual
Definition: xine_gl_plugin.h:50
xine_module_s
Definition: xine_module.h:62
xine_gl::set_native_window
void(* set_native_window)(xine_gl_t *, void *)
Definition: xine_gl.h:42
_x_load_gl
xine_gl_t * _x_load_gl(xine_t *xine, unsigned visual_type, const void *visual, unsigned flags)
Definition: xine_gl.c:56
xine_egl_t::p
xine_gl_plugin_t p
Definition: xine_egl.c:50
_egl_set_native_window
static void _egl_set_native_window(xine_gl_t *gl, void *drawable)
Definition: xine_egl.c:129
xine_gl_plugin_s::xine
xine_t * xine
Definition: xine_gl_plugin.h:44
xine_egl_t
Definition: xine_egl.c:49
_x_free_module
void _x_free_module(xine_t *xine, xine_module_t **pmodule)
Definition: load_plugins.c:1807
xine_module_class_s
Definition: xine_module.h:29
xine_gl
Definition: xine_gl.h:34
xine_egl_t::display
EGLDisplay display
Definition: xine_egl.c:52
xine_gl::resize
void(* resize)(xine_gl_t *, int width, int height)
Definition: xine_gl.h:40
gl_plugin_params_t
Definition: xine_gl_plugin.h:47
_egl_resize
static void _egl_resize(xine_gl_t *gl, int w, int h)
Definition: xine_egl.c:150
xine_egl_t::context
EGLContext context
Definition: xine_egl.c:53
GL_PLUGIN_TYPE
#define GL_PLUGIN_TYPE
Definition: xine_gl_plugin.h:37
xine_egl_t::config
EGLConfig config
Definition: xine_egl.c:55
_egl_log_error
static void _egl_log_error(xine_t *xine, const char *msg)
Definition: xine_egl.c:88
lprintf
#define lprintf(...)
Definition: xineutils.h:620
xine_module_s::dispose
void(* dispose)(xine_module_t *)
Definition: xine_module.h:75
xine_gl::swap_buffers
void(* swap_buffers)(xine_gl_t *)
Definition: xine_gl.h:37
xine_gl::make_current
int(* make_current)(xine_gl_t *)
Definition: xine_gl.h:35
XINE_GL_API_OPENGL
#define XINE_GL_API_OPENGL
Definition: xine_gl.h:50
xine_wayland_visual_t
Definition: xine.h:1417
xine_gl_plugin.h
xine_wayland_visual_t::display
struct wl_display * display
Definition: xine.h:1419
NULL
NULL
Definition: xine_plugin.c:78
XINE_VERBOSITY_LOG
#define XINE_VERBOSITY_LOG
Definition: xine.h:425
gl_plugin_params_t::flags
unsigned flags
Definition: xine_gl_plugin.h:51
_x_assert
#define _x_assert(exp)
Definition: xineutils.h:550
EXPORTED
const plugin_info_t xine_plugin_info[] EXPORTED
Definition: xine_egl.c:349
_egl_make_current
static int _egl_make_current(xine_gl_t *gl)
Definition: xine_egl.c:95
xine_module_class_s::get_instance
xine_module_t *(* get_instance)(xine_module_class_t *, const void *params)
Definition: xine_module.h:35
width
unsigned int width
Definition: gfontrle.c:4
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
XINE_VISUAL_TYPE_X11_2
#define XINE_VISUAL_TYPE_X11_2
Definition: xine.h:155
xine_module_info_t::priority
int priority
Definition: xine_plugin.h:104
x11_visual_t
Definition: xine.h:1237
_x_load_gl
xine_gl_t * _x_load_gl(xine_t *xine, unsigned visual_type, const void *visual, unsigned flags)
Definition: xine_gl.c:56
xine_gl::dispose
void(* dispose)(xine_gl_t **)
Definition: xine_gl.h:44
xine_wayland_visual_t::surface
struct wl_surface * surface
Definition: xine.h:1420
xine_gl_plugin_s::gl
xine_gl_t gl
Definition: xine_gl_plugin.h:43
EGL
#define EGL(_gl)
Definition: xine_egl.c:47
XINE_VISUAL_TYPE_WAYLAND
#define XINE_VISUAL_TYPE_WAYLAND
Definition: xine.h:166
_egl_error_str
static const char * _egl_error_str(EGLint error)
Definition: xine_egl.c:66
_egl_get_instance
static xine_module_t * _egl_get_instance(xine_module_class_t *class_gen, const void *data)
Definition: xine_egl.c:243
_module_dispose
static void _module_dispose(xine_module_t *module)
Definition: xine_egl.c:236
xine_gl_plugin_s
Definition: xine_gl_plugin.h:41
height
unsigned int height
Definition: gfontrle.c:5
xine_module_info_t
Definition: xine_plugin.h:103
xine_gl_plugin_s::module
xine_module_t module
Definition: xine_gl_plugin.h:42
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
gl_plugin_params_t::visual_type
unsigned visual_type
Definition: xine_gl_plugin.h:49
XINE_VISUAL_TYPE_X11
#define XINE_VISUAL_TYPE_X11
Definition: xine.h:154
_egl_swap_buffers
static void _egl_swap_buffers(xine_gl_t *gl)
Definition: xine_egl.c:122
xine_internal.h
config.h
_egl_dispose
static void _egl_dispose(xine_gl_t *gl)
Definition: xine_egl.c:211
xine_egl_t::is_current
int is_current
Definition: xine_egl.c:63
_egl_release_current
static void _egl_release_current(xine_gl_t *gl)
Definition: xine_egl.c:112
PLUGIN_XINE_MODULE
#define PLUGIN_XINE_MODULE
Definition: xine_plugin.h:41
xine.h
plugin_info_t
Definition: xine_plugin.h:55
default_gl_dispose
static void default_gl_dispose(xine_gl_t **pgl)
Definition: xine_gl.c:42
xprintf
#define xprintf(xine, verbose,...)
Definition: xineutils.h:664
PLUGIN
#define PLUGIN(_gl)
Definition: xine_gl.c:36
xine_gl::release_current
void(* release_current)(xine_gl_t *)
Definition: xine_gl.h:36