xine-lib: xine-lib-1.2.13/src/video_out/opengl/xine_egl.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
xine_egl.c File Reference
`#include "xine_gl.h"`
`#include <stdlib.h>`
`#include <xine.h>`
`#include <xine/xine_internal.h>`
`#include "xine_gl_plugin.h"`
`#include <EGL/egl.h>`
`#include <EGL/eglext.h>`

## Data Structures
struct | xine_egl_t

## Macros
#define | EGL(_gl) xine_container_of(_gl, xine_egl_t, p.gl)

## Functions
static const char * | _egl_error_str (EGLint error)
static void | _egl_log_error (xine_t *xine, const char *msg)
static int | _egl_make_current (xine_gl_t *gl)
static void | _egl_release_current (xine_gl_t *gl)
static void | _egl_swap_buffers (xine_gl_t *gl)
static void | _egl_set_native_window (xine_gl_t *gl, void *drawable)
static void | _egl_resize (xine_gl_t *gl, int w, int h)
static const char * | _egl_query_string (xine_gl_t *gl, int type)
static const char * | _egl_query_extensions (xine_gl_t *gl)
static void * | _egl_get_proc_address (xine_gl_t *gl, const char *procname)
static int | _egl_init (xine_egl_t *egl, EGLNativeDisplayType native_display, int api)
static void | _egl_dispose (xine_gl_t *gl)
static void | _module_dispose (xine_module_t *module)
static xine_module_t * | _egl_get_instance (xine_module_class_t *class_gen, const void *data)
static void * | egl_init_class (xine_t *xine, const void *params)

## Variables
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ EGL

#define EGL | ( |  | _gl | ) | xine_container_of(_gl, xine_egl_t, p.gl)

Referenced by _egl_dispose(), _egl_make_current(), _egl_query_string(), _egl_release_current(), _egl_resize(), _egl_set_native_window(), and _egl_swap_buffers().

## Function Documentation

## ◆ _egl_dispose()

static void _egl_dispose | ( | xine_gl_t * | gl | ) |
| static

References _x_assert, xine_egl_t::context, xine_egl_t::display, EGL, xine_egl_t::is_current, lprintf, and xine_egl_t::surface.

Referenced by _module_dispose().

## ◆ _egl_error_str()

static const char * _egl_error_str | ( | EGLint | error | ) |
| static

Referenced by _egl_log_error().

## ◆ _egl_get_instance()

static xine_module_t * _egl_get_instance | ( | xine_module_class_t * | class_gen,
|  | const void * | data )
| static

References _egl_get_proc_address(), _egl_init(), _egl_log_error(), _egl_make_current(), _egl_query_extensions(), _egl_release_current(), _egl_resize(), _egl_set_native_window(), _egl_swap_buffers(), _module_dispose(), _x_assert, xine_egl_t::config, xine_egl_t::context, x11_visual_t::d, x11_visual_t::display, xine_egl_t::display, xine_gl::dispose, xine_module_s::dispose, xine_gl::eglCreateImageKHR, xine_gl::eglDestroyImageKHR, gl_plugin_params_t::flags, xine_gl::get_proc_address, xine_gl_plugin_s::gl, xine_gl::make_current, xine_gl_plugin_s::module, NULL, xine_egl_t::p, xine_gl::query_extensions, xine_gl::release_current, xine_gl::resize, xine_gl::set_native_window, xine_egl_t::surface, xine_gl::swap_buffers, gl_plugin_params_t::visual, gl_plugin_params_t::visual_type, gl_plugin_params_t::xine, xine_gl_plugin_s::xine, XINE_GL_API_OPENGL, XINE_GL_API_OPENGLES, XINE_VISUAL_TYPE_WAYLAND, XINE_VISUAL_TYPE_X11, and XINE_VISUAL_TYPE_X11_2.

Referenced by egl_init_class().

## ◆ _egl_get_proc_address()

static void * _egl_get_proc_address | ( | xine_gl_t * | gl,
|  | const char * | procname )
| static

Referenced by _egl_get_instance().

## ◆ _egl_init()

static int _egl_init | ( | xine_egl_t * | egl,
|  | EGLNativeDisplayType | native_display,
|  | int | api )
| static

References _egl_log_error(), xine_egl_t::config, xine_egl_t::context, xine_egl_t::display, NULL, xine_egl_t::p, and xine_gl_plugin_s::xine.

Referenced by _egl_get_instance().

## ◆ _egl_log_error()

static void _egl_log_error | ( | xine_t * | xine,
|  | const char * | msg )
| inlinestatic

References _egl_error_str(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by _egl_get_instance(), _egl_init(), _egl_make_current(), and _egl_set_native_window().

## ◆ _egl_make_current()

static int _egl_make_current | ( | xine_gl_t * | gl | ) |
| static

References _egl_log_error(), _x_assert, xine_egl_t::context, xine_egl_t::display, EGL, xine_egl_t::is_current, xine_egl_t::p, xine_egl_t::surface, and xine_gl_plugin_s::xine.

Referenced by _egl_get_instance().

## ◆ _egl_query_extensions()

static const char * _egl_query_extensions | ( | xine_gl_t * | gl | ) |
| static

References _egl_query_string().

Referenced by _egl_get_instance().

## ◆ _egl_query_string()

static const char * _egl_query_string | ( | xine_gl_t * | gl,
|  | int | type )
| static

References xine_egl_t::display, EGL, and type.

Referenced by _egl_query_extensions().

## ◆ _egl_release_current()

static void _egl_release_current | ( | xine_gl_t * | gl | ) |
| static

References _x_assert, xine_egl_t::display, EGL, and xine_egl_t::is_current.

Referenced by _egl_get_instance().

## ◆ _egl_resize()

static void _egl_resize | ( | xine_gl_t * | gl,
|  | int | w,
|  | int | h )
| static

References EGL.

Referenced by _egl_get_instance().

## ◆ _egl_set_native_window()

static void _egl_set_native_window | ( | xine_gl_t * | gl,
|  | void * | drawable )
| static

References _egl_log_error(), _x_assert, xine_egl_t::config, xine_egl_t::display, EGL, xine_egl_t::is_current, NULL, xine_egl_t::p, xine_egl_t::surface, and xine_gl_plugin_s::xine.

Referenced by _egl_get_instance().

## ◆ _egl_swap_buffers()

static void _egl_swap_buffers | ( | xine_gl_t * | gl | ) |
| static

References xine_egl_t::display, EGL, and xine_egl_t::surface.

Referenced by _egl_get_instance().

## ◆ _module_dispose()

static void _module_dispose | ( | xine_module_t * | module | ) |
| static

References _egl_dispose(), xine_gl_plugin_s::gl, xine_egl_t::p, and xine_container_of.

Referenced by _egl_get_instance().

## ◆ egl_init_class()

static void * egl_init_class | ( | xine_t * | xine,
|  | const void * | params )
| static

References _egl_get_instance(), xine_module_s::dispose, xine_module_class_s::get_instance, and NULL.

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_XINE_MODULE, 1, "egl", XINE_VERSION_CODE, &module_info_egl, egl_init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL },
}
egl_init_class
static void * egl_init_class(xine_t *xine, const void *params)
Definition xine_egl.c:383
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29
PLUGIN_XINE_MODULE
#define PLUGIN_XINE_MODULE
Definition xine_plugin.h:41