xine-lib 1.2.11
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <errno.h>
#include <ctype.h>
#include <pthread.h>
#include <GL/gl.h>
#include "myglext.h"
#include <GL/glx.h>
#include <dlfcn.h>
#include "xine.h"
#include <xine/video_out.h>
#include <xine/xine_internal.h>
#include "yuv2rgb.h"
#include <xine/xineutils.h>
#include "x11osd.h"
#include "color_matrix.c"
Data Structures | |
struct | opengl_frame_t |
struct | opengl_driver_t |
struct | opengl_class_t |
struct | opengl_render_t |
Macros | |
#define | LOG_MODULE "video_out_opengl" |
#define | BYTES_PER_PIXEL 4 |
#define | NUM_FRAMES_BACKLOG 4 /* Allow thread some time to render frames */ |
#define | SECONDS_PER_CYCLE 60 /* Animation parameters */ |
#define | CYCLE_FACTOR1 3 |
#define | CYCLE_FACTOR2 5 |
#define | GLchar MYGLChar |
#define | GLintptr MYGLintptr |
#define | GLsizeiptr MYGLsizeiptr |
#define | GLintptrARB MYGLintptrARB |
#define | GLsizeiptrARB MYGLsizeiptrARB |
#define | GLcharARB MYGLcharARB |
#define | GLhandleARB MYGLhandleARB |
#define | GLhalfARB MYGLhalfARB |
#define | GLhalfNV MYGLhalfNV |
#define | CHECKERR(a) ((void)0) |
#define | RGB_TEXTURE_FORMAT GL_BGRA |
#define | YUV_FORMAT MODE_32_RGB |
#define | YUV_SWAP_MODE 0 |
#define | MY_2PI (M_PI * 2) |
#define | CM_LUT |
#define | CM_DRIVER_T opengl_driver_t |
#define | CYL_TESSELATION 128 |
#define | CYL_WIDTH 2.5 |
#define | CYL_HEIGHT 3.0 |
#define | DIST_FACTOR 16.568542 /* 2 * (sqrt(2)-1) * 20 */ |
#define | gluPerspective myGluPerspective |
#define | TOR_TESSELATION_B 128 |
#define | TOR_TESSELATION_S 64 |
#define | TOR_RADIUS_B 2.5 |
#define | TOR_RADIUS_S 1.0 |
Typedefs | |
typedef void *(* | thread_run_t) (void *) |
Enumerations | |
enum | render_e { RENDER_NONE =0 , RENDER_DRAW , RENDER_CLEAN , RENDER_SETUP , RENDER_CREATE , RENDER_VISUAL , RENDER_RELEASE , RENDER_EXIT } |
Functions | |
static void | render_tex2d (opengl_driver_t *this, opengl_frame_t *frame) |
static void | render_tex2dtiled (opengl_driver_t *this, opengl_frame_t *frame) |
static void | render_draw (opengl_driver_t *this, opengl_frame_t *frame) |
static void | render_cyl (opengl_driver_t *this, opengl_frame_t *frame) |
static void | render_env_tor (opengl_driver_t *this, opengl_frame_t *frame) |
static int | render_help_image_tex (opengl_driver_t *this, int new_w, int new_h, GLint glformat, GLint texformat) |
static int | render_help_image_tiledtex (opengl_driver_t *this, int new_w, int new_h, GLint glformat, GLint texformat) |
static int | render_image_nop (opengl_driver_t *this, opengl_frame_t *frame) |
static int | render_image_tex (opengl_driver_t *this, opengl_frame_t *frame) |
static int | render_image_tiledtex (opengl_driver_t *this, opengl_frame_t *frame) |
static int | render_image_fp_yuv (opengl_driver_t *this, opengl_frame_t *frame) |
static int | render_image_envtex (opengl_driver_t *this, opengl_frame_t *frame) |
static int | render_help_verify_ext (opengl_driver_t *this, const char *ext) |
static void * | getdladdr (const GLubyte *_funcName) |
static void * | getaddr (const char *funcName) |
static void | render_help_check_exts (opengl_driver_t *this) |
static int | render_help_setup_tex (opengl_driver_t *this) |
static void | myGluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) |
static int | render_setup_2d (opengl_driver_t *this) |
static int | render_setup_tex2d (opengl_driver_t *this) |
static int | render_setup_3d (opengl_driver_t *this) |
static int | render_setup_cyl (opengl_driver_t *this) |
static int | render_setup_torus (opengl_driver_t *this) |
static int | render_setup_fp_yuv (opengl_driver_t *this) |
static void | render_gfx_vinfo (opengl_driver_t *this) |
static void * | render_run (opengl_driver_t *this) |
static uint32_t | opengl_get_capabilities (vo_driver_t *this_gen) |
static void | opengl_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src) |
static void | opengl_frame_field (vo_frame_t *vo_img, int which_field) |
static void | opengl_frame_dispose (vo_frame_t *vo_img) |
static vo_frame_t * | opengl_alloc_frame (vo_driver_t *this_gen) |
static void | opengl_compute_ideal_size (opengl_driver_t *this) |
static void | opengl_compute_rgb_size (opengl_driver_t *this) |
static void | opengl_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, double ratio, int format, int flags) |
static void | opengl_overlay_clut_yuv2rgb (opengl_driver_t *this, vo_overlay_t *overlay, opengl_frame_t *frame) |
static void | opengl_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen, int changed) |
static void | opengl_overlay_end (vo_driver_t *this_gen, vo_frame_t *vo_img) |
static void | opengl_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) |
static int | opengl_redraw_needed (vo_driver_t *this_gen) |
static void | opengl_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) |
static int | opengl_get_property (vo_driver_t *this_gen, int property) |
static int | opengl_set_property (vo_driver_t *this_gen, int property, int value) |
static void | opengl_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max) |
static int | opengl_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data) |
static void | opengl_dispose_internal (opengl_driver_t *this, int thread_running) |
static void | opengl_dispose (vo_driver_t *this_gen) |
static void | opengl_cb_render_fun (void *this_gen, xine_cfg_entry_t *entry) |
static void | opengl_cb_default (void *val_gen, xine_cfg_entry_t *entry) |
static vo_driver_t * | opengl_open_plugin (video_driver_class_t *class_gen, const void *visual_gen) |
static int | opengl_verify_direct (x11_visual_t *vis) |
static void * | opengl_init_class (xine_t *xine, const void *visual_gen) |
Variables | |
static const int32_t | Inverse_Table_6_9 [8][4] |
static const opengl_render_t | opengl_rb [] |
static const vo_info_t | vo_info_opengl |
const plugin_info_t xine_plugin_info[] | EXPORTED |
#define BYTES_PER_PIXEL 4 |
#define CHECKERR | ( | a | ) | ((void)0) |
#define CM_DRIVER_T opengl_driver_t |
#define CM_LUT |
#define CYCLE_FACTOR1 3 |
#define CYCLE_FACTOR2 5 |
#define CYL_HEIGHT 3.0 |
#define CYL_TESSELATION 128 |
#define CYL_WIDTH 2.5 |
#define DIST_FACTOR 16.568542 /* 2 * (sqrt(2)-1) * 20 */ |
#define GLchar MYGLChar |
#define GLcharARB MYGLcharARB |
#define GLhalfARB MYGLhalfARB |
#define GLhalfNV MYGLhalfNV |
#define GLhandleARB MYGLhandleARB |
#define GLintptr MYGLintptr |
#define GLintptrARB MYGLintptrARB |
#define GLsizeiptr MYGLsizeiptr |
#define GLsizeiptrARB MYGLsizeiptrARB |
#define gluPerspective myGluPerspective |
#define LOG_MODULE "video_out_opengl" |
#define MY_2PI (M_PI * 2) |
#define NUM_FRAMES_BACKLOG 4 /* Allow thread some time to render frames */ |
#define RGB_TEXTURE_FORMAT GL_BGRA |
#define SECONDS_PER_CYCLE 60 /* Animation parameters */ |
#define TOR_RADIUS_B 2.5 |
#define TOR_RADIUS_S 1.0 |
#define TOR_TESSELATION_B 128 |
#define TOR_TESSELATION_S 64 |
#define YUV_FORMAT MODE_32_RGB |
#define YUV_SWAP_MODE 0 |
typedef void *(* thread_run_t) (void *) |
enum render_e |
|
static |
References getdladdr().
Referenced by render_help_check_exts().
|
static |
References _x_asprintf(), and NULL.
Referenced by getaddr().
|
static |
|
static |
References vo_frame_s::dispose, vo_frame_s::driver, vo_frame_s::field, vo_frame_s::mutex, NULL, opengl_frame_dispose(), opengl_frame_field(), opengl_frame_proc_slice(), vo_frame_s::proc_frame, vo_frame_s::proc_slice, opengl_frame_t::vo_frame, and opengl_frame_t::yuv2rgb.
Referenced by opengl_open_plugin().
|
static |
References xine_cfg_entry_s::num_value.
Referenced by opengl_open_plugin().
|
static |
References xine_cfg_entry_s::num_value, and RENDER_SETUP.
Referenced by opengl_open_plugin().
|
static |
References _x_vo_scale_compute_ideal_size().
Referenced by opengl_redraw_needed(), and opengl_set_property().
|
static |
References _x_vo_scale_compute_output_size().
Referenced by opengl_redraw_needed().
|
static |
References vo_frame_s::free, opengl_frame_t::height, NUM_FRAMES_BACKLOG, opengl_redraw_needed(), opengl_frame_t::ratio, RENDER_DRAW, opengl_frame_t::vo_frame, and opengl_frame_t::width.
Referenced by opengl_open_plugin().
|
static |
References opengl_dispose_internal().
Referenced by opengl_open_plugin().
|
static |
References _x_alphablend_free(), _x_vo_scale_cleanup(), NULL, NUM_FRAMES_BACKLOG, RENDER_EXIT, and x11osd_destroy().
Referenced by opengl_dispose(), and opengl_open_plugin().
|
static |
References vo_frame_s::base, yuv2rgb_s::dispose, vo_frame_s::mutex, opengl_frame_t::rgb, opengl_frame_t::vo_frame, xine_free_aligned(), and opengl_frame_t::yuv2rgb.
Referenced by opengl_alloc_frame().
|
static |
References BYTES_PER_PIXEL, vo_frame_s::driver, yuv2rgb_s::next_slice, NULL, opengl_rb, opengl_frame_t::rgb, opengl_frame_t::rgb_dst, VO_BOTH_FIELDS, VO_BOTTOM_FIELD, VO_TOP_FIELD, opengl_frame_t::width, and opengl_frame_t::yuv2rgb.
Referenced by opengl_alloc_frame(), and opengl_update_frame_format().
|
static |
References cm_names, contrast, vo_frame_s::crop_bottom, vo_frame_s::crop_left, vo_frame_s::crop_right, vo_frame_s::crop_top, vo_frame_s::driver, opengl_frame_t::format, vo_frame_s::proc_called, opengl_frame_t::rgb_dst, opengl_frame_t::vo_frame, XINE_IMGFMT_YV12, XINE_VERBOSITY_LOG, xprintf, opengl_frame_t::yuv2rgb, yuv2rgb_s::yuv2rgb_fun, and yuv2rgb_s::yuy22rgb_fun.
Referenced by opengl_alloc_frame().
|
static |
References VO_CAP_BRIGHTNESS, VO_CAP_COLOR_MATRIX, VO_CAP_CONTRAST, VO_CAP_FULLRANGE, VO_CAP_SATURATION, VO_CAP_YUY2, and VO_CAP_YV12.
Referenced by opengl_open_plugin().
|
static |
References contrast, VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, VO_PROP_MAX_NUM_FRAMES, VO_PROP_SATURATION, VO_PROP_WINDOW_HEIGHT, VO_PROP_WINDOW_WIDTH, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by opengl_open_plugin().
|
static |
References VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, and VO_PROP_SATURATION.
Referenced by opengl_open_plugin().
|
static |
References _x_vo_scale_translate_gui2video(), x11_rectangle_t::h, RENDER_CLEAN, RENDER_CREATE, RENDER_RELEASE, RENDER_VISUAL, x11_rectangle_t::w, x11_rectangle_t::x, x11osd_drawable_changed(), x11osd_expose(), XINE_GUI_SEND_COMPLETION_EVENT, XINE_GUI_SEND_DRAWABLE_CHANGED, XINE_GUI_SEND_EXPOSE_EVENT, XINE_GUI_SEND_SELECT_VISUAL, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, XINE_GUI_SEND_WILL_DESTROY_DRAWABLE, XINE_VERBOSITY_NONE, xprintf, and x11_rectangle_t::y.
Referenced by opengl_open_plugin().
|
static |
References default_video_driver_class_dispose, video_driver_class_s::description, video_driver_class_s::dispose, opengl_class_t::driver_class, video_driver_class_s::identifier, N_, NULL, video_driver_class_s::open_plugin, opengl_open_plugin(), opengl_verify_direct(), opengl_class_t::xine, XINE_VERBOSITY_LOG, and xprintf.
|
static |
References _, _x_alphablend_init(), _x_vo_scale_init(), xine_s::config, contrast, x11_visual_t::d, x11_visual_t::dest_size_cb, x11_visual_t::display, x11_visual_t::frame_output_cb, LOG_MODULE, name, NULL, opengl_alloc_frame(), opengl_cb_default(), opengl_cb_render_fun(), opengl_display_frame(), opengl_dispose(), opengl_dispose_internal(), opengl_get_capabilities(), opengl_get_property(), opengl_get_property_min_max(), opengl_gui_data_exchange(), opengl_overlay_begin(), opengl_overlay_blend(), opengl_overlay_end(), opengl_rb, opengl_redraw_needed(), opengl_set_property(), opengl_update_frame_format(), RENDER_CREATE, render_run(), RENDER_VISUAL, x11_visual_t::screen, x11_visual_t::user_data, x11osd_create(), X11OSD_SHAPED, config_values_s::xine, opengl_class_t::xine, XINE_VERBOSITY_LOG, XINE_VO_ASPECT_AUTO, xprintf, yuv2rgb_factory_init(), YUV_FORMAT, and YUV_SWAP_MODE.
Referenced by opengl_init_class().
|
static |
References vo_frame_s::overlay_offset_x, vo_frame_s::overlay_offset_y, and x11osd_clear().
Referenced by opengl_open_plugin().
|
static |
References _x_blend_rgb24(), _x_blend_rgb32(), _x_blend_yuv(), _x_blend_yuy2(), vo_frame_s::base, opengl_frame_t::format, opengl_frame_t::height, vo_overlay_s::hili_rgb_clut, opengl_overlay_clut_yuv2rgb(), vo_frame_s::pitches, opengl_frame_t::rgb, vo_overlay_s::rgb_clut, opengl_frame_t::rgb_dst, vo_overlay_s::rle, vo_overlay_s::unscaled, opengl_frame_t::vo_frame, opengl_frame_t::width, x11osd_blend(), and XINE_IMGFMT_YV12.
Referenced by opengl_open_plugin().
|
static |
|
static |
References x11osd_expose().
Referenced by opengl_open_plugin().
|
static |
References _x_vo_scale_redraw_needed(), opengl_compute_ideal_size(), opengl_compute_rgb_size(), and RENDER_CLEAN.
Referenced by opengl_display_frame(), and opengl_open_plugin().
|
static |
References _x_vo_scale_aspect_ratio_name_table, contrast, NULL, NUM_FRAMES_BACKLOG, opengl_compute_ideal_size(), VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, VO_PROP_DISCARD_FRAMES, VO_PROP_SATURATION, XINE_VERBOSITY_DEBUG, XINE_VO_ASPECT_AUTO, XINE_VO_ASPECT_NUM_RATIOS, and xprintf.
Referenced by opengl_open_plugin().
|
static |
References vo_frame_s::base, BYTES_PER_PIXEL, yuv2rgb_s::configure, opengl_frame_t::flags, opengl_frame_t::format, height, opengl_frame_t::height, opengl_frame_field(), vo_frame_s::pitches, opengl_frame_t::ratio, RENDER_SETUP, opengl_frame_t::rgb, VO_BOTH_FIELDS, VO_BOTTOM_FIELD, opengl_frame_t::vo_frame, VO_TOP_FIELD, width, opengl_frame_t::width, xine_freep_aligned, XINE_IMGFMT_YV12, xine_mallocz_aligned(), and opengl_frame_t::yuv2rgb.
Referenced by opengl_open_plugin().
|
static |
References x11_visual_t::display, NULL, and x11_visual_t::screen.
Referenced by opengl_init_class().
|
static |
References CYCLE_FACTOR1, CYCLE_FACTOR2, CYL_HEIGHT, CYL_TESSELATION, CYL_WIDTH, opengl_frame_t::height, MY_2PI, NULL, SECONDS_PER_CYCLE, and opengl_frame_t::width.
|
static |
References opengl_frame_t::height, opengl_frame_t::rgb, RGB_TEXTURE_FORMAT, and opengl_frame_t::width.
|
static |
References CYCLE_FACTOR1, CYCLE_FACTOR2, DIST_FACTOR, opengl_frame_t::height, NULL, SECONDS_PER_CYCLE, and opengl_frame_t::width.
|
static |
References CHECKERR.
Referenced by render_run().
|
static |
References getaddr(), render_help_verify_ext(), RGB_TEXTURE_FORMAT, XINE_VERBOSITY_NONE, and xprintf.
Referenced by render_setup_2d(), and render_setup_3d().
|
static |
References lprintf.
Referenced by render_image_fp_yuv(), and render_image_tex().
|
static |
References lprintf.
Referenced by render_image_tiledtex().
|
static |
References CHECKERR.
Referenced by render_setup_cyl(), render_setup_tex2d(), and render_setup_torus().
|
static |
References XINE_VERBOSITY_LOG, and xprintf.
Referenced by render_help_check_exts().
|
static |
References opengl_frame_t::height, render_image_tex(), and opengl_frame_t::width.
|
static |
|
static |
|
static |
References opengl_frame_t::height, render_help_image_tex(), opengl_frame_t::rgb, RGB_TEXTURE_FORMAT, and opengl_frame_t::width.
Referenced by render_image_envtex().
|
static |
|
static |
References _x_assert, CHECKERR, opengl_render_t::defaction, vo_frame_s::id, lprintf, NULL, opengl_rb, RENDER_CLEAN, RENDER_CREATE, RENDER_DRAW, RENDER_EXIT, render_gfx_vinfo(), RENDER_NONE, RENDER_RELEASE, RENDER_SETUP, RENDER_VISUAL, opengl_frame_t::vo_frame, XINE_VERBOSITY_NONE, and xprintf.
Referenced by opengl_open_plugin().
|
static |
References CHECKERR, MYGL_FRAGMENT_PROGRAM_ARB, and render_help_check_exts().
Referenced by render_setup_tex2d().
|
static |
References CHECKERR, gluPerspective, MYGL_FRAGMENT_PROGRAM_ARB, and render_help_check_exts().
Referenced by render_setup_cyl(), and render_setup_torus().
|
static |
References render_help_setup_tex(), and render_setup_3d().
|
static |
|
static |
References render_help_setup_tex(), and render_setup_2d().
Referenced by render_setup_fp_yuv().
|
static |
References MY_2PI, render_help_setup_tex(), render_setup_3d(), TOR_RADIUS_B, TOR_RADIUS_S, TOR_TESSELATION_B, and TOR_TESSELATION_S.
|
static |
References opengl_frame_t::height, and opengl_frame_t::width.
|
static |
References opengl_frame_t::height, and opengl_frame_t::width.
const plugin_info_t xine_plugin_info [] EXPORTED |
|
static |
Referenced by render_setup_fp_yuv().
|
static |
Referenced by opengl_frame_field(), opengl_open_plugin(), and render_run().
|
static |