亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? opengl.c

?? video linux conference
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************** * opengl.c: OpenGL video output ***************************************************************************** * Copyright (C) 2004 VideoLAN * $Id: opengl.c 11543 2005-06-25 14:35:55Z dionoea $ * * Authors: Cyril Deguet <asmax@videolan.org> *          Gildas Bazin <gbazin@videolan.org> *          Eric Petit <titer@m0k.org> * * This program 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. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. *****************************************************************************//***************************************************************************** * Preamble *****************************************************************************/#include <errno.h>                                                 /* ENOMEM */#include <stdlib.h>                                      /* malloc(), free() */#include <string.h>#include <vlc/vlc.h>#include <vlc/vout.h>#ifdef SYS_DARWIN#include <OpenGL/gl.h>#include <OpenGL/glext.h>/* On OS X, use GL_TEXTURE_RECTANGLE_EXT instead of GL_TEXTURE_2D.   This allows sizes which are not powers of 2 */#define VLCGL_TARGET GL_TEXTURE_RECTANGLE_EXT/* OS X OpenGL supports YUV. Hehe. */#define VLCGL_FORMAT GL_YCBCR_422_APPLE#define VLCGL_TYPE   GL_UNSIGNED_SHORT_8_8_APPLE#else#include <GL/gl.h>#define VLCGL_TARGET GL_TEXTURE_2D/* RV16 */#ifndef GL_UNSIGNED_SHORT_5_6_5#define GL_UNSIGNED_SHORT_5_6_5 0x8363#endif//#define VLCGL_RGB_FORMAT GL_RGB//#define VLCGL_RGB_TYPE GL_UNSIGNED_SHORT_5_6_5/* RV24 *///#define VLCGL_RGB_FORMAT GL_RGB//#define VLCGL_RGB_TYPE GL_UNSIGNED_BYTE/* RV32 */#define VLCGL_RGB_FORMAT GL_RGBA#define VLCGL_RGB_TYPE GL_UNSIGNED_BYTE/* Use RGB on Win32/GLX */#define VLCGL_FORMAT VLCGL_RGB_FORMAT#define VLCGL_TYPE   VLCGL_RGB_TYPE#endif#ifndef GL_CLAMP_TO_EDGE#   define GL_CLAMP_TO_EDGE 0x812F#endif/* OpenGL effects */#define OPENGL_EFFECT_NONE             1#define OPENGL_EFFECT_CUBE             2#define OPENGL_EFFECT_TRANSPARENT_CUBE 4/***************************************************************************** * Vout interface *****************************************************************************/static int  CreateVout   ( vlc_object_t * );static void DestroyVout  ( vlc_object_t * );static int  Init         ( vout_thread_t * );static void End          ( vout_thread_t * );static int  Manage       ( vout_thread_t * );static void Render       ( vout_thread_t *, picture_t * );static void DisplayVideo ( vout_thread_t *, picture_t * );static int  Control      ( vout_thread_t *, int, va_list );static inline int GetAlignedSize( int );static int InitTextures( vout_thread_t * );static int SendEvents( vlc_object_t *, char const *,                       vlc_value_t, vlc_value_t, void * );/***************************************************************************** * Module descriptor *****************************************************************************/#define SPEED_TEXT N_( "OpenGL cube rotation speed" )/***************************************************************************** * Module descriptor *****************************************************************************/#define SPEED_TEXT N_( "OpenGL cube rotation speed" )#define SPEED_LONGTEXT N_( "If the OpenGL cube effect is enabled, this " \                           "controls its rotation speed." )#define EFFECT_TEXT N_("Select effect")#define EFFECT_LONGTEXT N_( \    "Allows you to select different visual effects.")static char *ppsz_effects[] = {        "none", "cube", "transparent-cube" };static char *ppsz_effects_text[] = {        N_("None"), N_("Cube"), N_("Transparent Cube") };vlc_module_begin();    set_shortname( "OpenGL" );    set_category( CAT_VIDEO );    set_subcategory( SUBCAT_VIDEO_VOUT );    set_description( _("OpenGL video output") );#ifdef SYS_DARWIN    set_capability( "video output", 200 );#else    set_capability( "video output", 20 );#endif    add_shortcut( "opengl" );    add_float( "opengl-cube-speed", 2.0, NULL, SPEED_TEXT,                    SPEED_LONGTEXT, VLC_TRUE );    set_callbacks( CreateVout, DestroyVout );    add_string( "opengl-effect", "none", NULL, EFFECT_TEXT,                 EFFECT_LONGTEXT, VLC_FALSE );        change_string_list( ppsz_effects, ppsz_effects_text, 0 );vlc_module_end();/***************************************************************************** * vout_sys_t: video output method descriptor ***************************************************************************** * This structure is part of the video output thread descriptor. * It describes the OpenGL specific properties of the output thread. *****************************************************************************/struct vout_sys_t{    vout_thread_t *p_vout;    uint8_t    *pp_buffer[2];    int         i_index;    int         i_tex_width;    int         i_tex_height;    GLuint      p_textures[2];    int         i_effect;    float       f_speed;};/***************************************************************************** * CreateVout: This function allocates and initializes the OpenGL vout method. *****************************************************************************/static int CreateVout( vlc_object_t *p_this ){    vout_thread_t *p_vout = (vout_thread_t *)p_this;    vout_sys_t *p_sys;    /* Allocate structure */    p_vout->p_sys = p_sys = malloc( sizeof( vout_sys_t ) );    if( p_sys == NULL )    {        msg_Err( p_vout, "out of memory" );        return VLC_EGENERIC;    }    var_Create( p_vout, "opengl-effect", VLC_VAR_STRING | VLC_VAR_DOINHERIT );    p_sys->i_index = 0;#ifdef SYS_DARWIN    p_sys->i_tex_width  = p_vout->render.i_width;    p_sys->i_tex_height = p_vout->render.i_height;#else    /* A texture must have a size aligned on a power of 2 */    p_sys->i_tex_width  = GetAlignedSize( p_vout->render.i_width );    p_sys->i_tex_height = GetAlignedSize( p_vout->render.i_height );#endif    msg_Dbg( p_vout, "Texture size: %dx%d", p_sys->i_tex_width,             p_sys->i_tex_height );    /* Get window */    p_sys->p_vout =        (vout_thread_t *)vlc_object_create( p_this, VLC_OBJECT_OPENGL );    if( p_sys->p_vout == NULL )    {        msg_Err( p_vout, "out of memory" );        return VLC_ENOMEM;    }    vlc_object_attach( p_sys->p_vout, p_this );    p_sys->p_vout->i_window_width = p_vout->i_window_width;    p_sys->p_vout->i_window_height = p_vout->i_window_height;    p_sys->p_vout->b_fullscreen = p_vout->b_fullscreen;    p_sys->p_vout->render.i_width = p_vout->render.i_width;    p_sys->p_vout->render.i_height = p_vout->render.i_height;    p_sys->p_vout->render.i_aspect = p_vout->render.i_aspect;    p_sys->p_vout->b_scale = p_vout->b_scale;    p_sys->p_vout->i_alignment = p_vout->i_alignment;    p_sys->p_vout->p_module =        module_Need( p_sys->p_vout, "opengl provider", NULL, 0 );    if( p_sys->p_vout->p_module == NULL )    {        msg_Warn( p_vout, "No OpenGL provider found" );        vlc_object_detach( p_sys->p_vout );        vlc_object_destroy( p_sys->p_vout );        return VLC_ENOOBJ;    }    p_sys->f_speed = var_CreateGetFloat( p_vout, "opengl-cube-speed" );    p_vout->pf_init = Init;    p_vout->pf_end = End;    p_vout->pf_manage = Manage;    p_vout->pf_render = Render;    p_vout->pf_display = DisplayVideo;    p_vout->pf_control = Control;    /* Forward events from the opengl provider */    var_Create( p_sys->p_vout, "mouse-x", VLC_VAR_INTEGER );    var_Create( p_sys->p_vout, "mouse-y", VLC_VAR_INTEGER );    var_Create( p_sys->p_vout, "mouse-moved", VLC_VAR_BOOL );    var_Create( p_sys->p_vout, "mouse-clicked", VLC_VAR_INTEGER );    var_Create( p_sys->p_vout, "video-on-top",                VLC_VAR_BOOL | VLC_VAR_DOINHERIT );    var_AddCallback( p_sys->p_vout, "mouse-x", SendEvents, p_vout );    var_AddCallback( p_sys->p_vout, "mouse-y", SendEvents, p_vout );    var_AddCallback( p_sys->p_vout, "mouse-moved", SendEvents, p_vout );    var_AddCallback( p_sys->p_vout, "mouse-clicked", SendEvents, p_vout );    return VLC_SUCCESS;}/***************************************************************************** * Init: initialize the OpenGL video thread output method *****************************************************************************/static int Init( vout_thread_t *p_vout ){    vout_sys_t *p_sys = p_vout->p_sys;    int i_pixel_pitch;    vlc_value_t val;    p_sys->p_vout->pf_init( p_sys->p_vout );#ifdef SYS_DARWIN    p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');    p_vout->output.i_rmask = 0x00ff0000;    p_vout->output.i_gmask = 0x0000ff00;    p_vout->output.i_bmask = 0x000000ff;    i_pixel_pitch = 2;#else#if VLCGL_RGB_FORMAT == GL_RGB#   if VLCGL_RGB_TYPE == GL_UNSIGNED_BYTE    p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');    p_vout->output.i_rmask = 0x000000ff;    p_vout->output.i_gmask = 0x0000ff00;    p_vout->output.i_bmask = 0x00ff0000;    i_pixel_pitch = 3;#   else    p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');    p_vout->output.i_rmask = 0xf800;    p_vout->output.i_gmask = 0x07e0;    p_vout->output.i_bmask = 0x001f;    i_pixel_pitch = 2;#   endif#else    p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');    p_vout->output.i_rmask = 0x000000ff;    p_vout->output.i_gmask = 0x0000ff00;    p_vout->output.i_bmask = 0x00ff0000;    i_pixel_pitch = 4;#endif#endif    /* Since OpenGL can do rescaling for us, stick to the default     * coordinates and aspect. */    p_vout->output.i_width  = p_vout->render.i_width;    p_vout->output.i_height = p_vout->render.i_height;    p_vout->output.i_aspect = p_vout->render.i_aspect;    /* We know the chroma, allocate one buffer which will be used     * directly by the decoder */    p_sys->pp_buffer[0] =        malloc( p_sys->i_tex_width * p_sys->i_tex_height * i_pixel_pitch );    if( !p_sys->pp_buffer[0] )    {        msg_Err( p_vout, "Out of memory" );        return -1;    }    p_sys->pp_buffer[1] =        malloc( p_sys->i_tex_width * p_sys->i_tex_height * i_pixel_pitch );    if( !p_sys->pp_buffer[1] )    {        msg_Err( p_vout, "Out of memory" );        return -1;    }    p_vout->p_picture[0].i_planes = 1;    p_vout->p_picture[0].p->p_pixels = p_sys->pp_buffer[0];    p_vout->p_picture[0].p->i_lines = p_vout->output.i_height;    p_vout->p_picture[0].p->i_visible_lines = p_vout->output.i_height;    p_vout->p_picture[0].p->i_pixel_pitch = i_pixel_pitch;    p_vout->p_picture[0].p->i_pitch = p_vout->output.i_width *        p_vout->p_picture[0].p->i_pixel_pitch;    p_vout->p_picture[0].p->i_visible_pitch = p_vout->output.i_width *        p_vout->p_picture[0].p->i_pixel_pitch;    p_vout->p_picture[0].i_status = DESTROYED_PICTURE;    p_vout->p_picture[0].i_type   = DIRECT_PICTURE;    PP_OUTPUTPICTURE[ 0 ] = &p_vout->p_picture[0];    I_OUTPUTPICTURES = 1;    if( p_sys->p_vout->pf_lock &&        p_sys->p_vout->pf_lock( p_sys->p_vout ) )    {        msg_Warn( p_vout, "could not lock OpenGL provider" );        return 0;    }    InitTextures( p_vout );    glDisable(GL_BLEND);    glDisable(GL_DEPTH_TEST);    glDepthMask(GL_FALSE);    glDisable(GL_CULL_FACE);    glClear( GL_COLOR_BUFFER_BIT );    /* Check if the user asked for useless visual effects */    var_Get( p_vout, "opengl-effect", &val );    if( !val.psz_string || !strcmp( val.psz_string, "none" ))    {        p_sys->i_effect = OPENGL_EFFECT_NONE;    }    else if( !strcmp( val.psz_string, "cube" ) )    {        p_sys->i_effect = OPENGL_EFFECT_CUBE;        glEnable( GL_CULL_FACE);        //glEnable( GL_DEPTH_TEST );    }    else if( !strcmp( val.psz_string, "transparent-cube" ) )    {        p_sys->i_effect = OPENGL_EFFECT_TRANSPARENT_CUBE;        glDisable( GL_DEPTH_TEST );        glEnable( GL_BLEND );        glBlendFunc( GL_SRC_ALPHA, GL_ONE );    }    else    {        msg_Warn( p_vout, "no valid opengl effect provided, using "                  "\"none\"" );        p_sys->i_effect = OPENGL_EFFECT_NONE;    }    if( val.psz_string ) free( val.psz_string );    if( p_sys->i_effect & ( OPENGL_EFFECT_CUBE |                OPENGL_EFFECT_TRANSPARENT_CUBE ) )    {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区在线| 4438成人网| 国产91精品精华液一区二区三区 | 中文字幕免费不卡在线| 日韩精品综合一本久道在线视频| 在线观看91视频| 九九九久久久精品| 亚洲美腿欧美偷拍| 日本vs亚洲vs韩国一区三区二区| 亚洲一区二区三区四区的| 免费成人美女在线观看.| 日韩精品一二三| 国产精品综合视频| 色综合天天综合网国产成人综合天| 91亚洲资源网| 国产午夜精品久久久久久免费视| 久久天堂av综合合色蜜桃网| 国产女人18毛片水真多成人如厕 | 不卡一卡二卡三乱码免费网站| 国产区在线观看成人精品| 国产一区二区三区香蕉 | 国产免费久久精品| 午夜精品一区二区三区三上悠亚| 国内精品嫩模私拍在线| 欧美无乱码久久久免费午夜一区 | 欧美变态tickling挠脚心| 国产蜜臀97一区二区三区| 日韩精品乱码av一区二区| 成人国产精品免费观看视频| 在线观看www91| 亚洲欧美日韩久久| 国产精品资源在线观看| 精品国产一区二区三区忘忧草 | 日韩成人精品视频| 91热门视频在线观看| 555www色欧美视频| 欧美va在线播放| 美女一区二区在线观看| 日韩一区二区免费电影| 天堂av在线一区| 日韩欧美成人午夜| 六月丁香综合在线视频| 51久久夜色精品国产麻豆| 亚洲欧美激情插 | 国产一区二区三区综合| 久久久久久久av麻豆果冻| 国产成人日日夜夜| 亚洲精品成人天堂一二三| 一本色道a无线码一区v| 日本三级亚洲精品| 日韩写真欧美这视频| 激情欧美一区二区| 亚洲裸体xxx| 欧美福利一区二区| 成人精品电影在线观看| 性做久久久久久免费观看欧美| 日韩欧美在线观看一区二区三区| 久久99精品一区二区三区| 一区二区三区四区乱视频| 日韩欧美高清一区| 色婷婷综合久久| 成人蜜臀av电影| 国产在线精品免费| 午夜欧美大尺度福利影院在线看| 国产欧美精品一区| 欧美一区二区福利视频| 色8久久人人97超碰香蕉987| 精品亚洲成a人| 麻豆成人91精品二区三区| 亚洲va欧美va人人爽午夜 | 国产精品污www在线观看| 欧美日韩亚洲综合一区二区三区 | 狠狠v欧美v日韩v亚洲ⅴ| 欧美在线影院一区二区| 国产成人精品免费在线| 久久er99精品| 国产精品亚洲午夜一区二区三区| 日韩毛片视频在线看| 久久久精品综合| 国产精品美女久久久久aⅴ | 欧美精品vⅰdeose4hd| 成人黄色a**站在线观看| 国产寡妇亲子伦一区二区| 狠狠色狠狠色合久久伊人| 国产精品一区二区三区乱码| 国产河南妇女毛片精品久久久| 国产毛片一区二区| 欧美性生活久久| 精品国内片67194| 国产精品久久久久久久久晋中| 国产精品网站在线观看| 亚洲18色成人| 97超碰欧美中文字幕| 欧美中文字幕亚洲一区二区va在线| 一本色道久久综合亚洲aⅴ蜜桃| 欧美亚洲精品一区| 国产精品美女一区二区| 亚洲高清久久久| 粉嫩一区二区三区在线看| 欧美肥妇free| 亚洲一区二区三区影院| 99热国产精品| 国产视频一区二区三区在线观看| 国产精品小仙女| 日韩一区二区影院| 亚洲成人www| 欧美mv日韩mv| 亚洲一区二区三区中文字幕在线| 一区二区三区免费| www.亚洲人| 亚洲高清在线精品| 国产麻豆91精品| 欧美午夜不卡在线观看免费| 久久久久久久久久久黄色| 美日韩一级片在线观看| 欧美在线看片a免费观看| 亚洲精品国产a久久久久久| 成人av资源站| 国产电影一区二区三区| 欧美色偷偷大香| 青青草国产成人99久久| 欧美sm极限捆绑bd| 成人精品电影在线观看| 久久综合久久久久88| 成人污污视频在线观看| 亚洲一区二三区| 精品国产凹凸成av人导航| 99这里都是精品| 日日摸夜夜添夜夜添亚洲女人| 欧美一区二区三区爱爱| 国产乱码精品一区二区三区av| 国产精品丝袜91| 欧美三级视频在线播放| 国产成人精品免费视频网站| 亚洲一区二区三区中文字幕| 久久综合中文字幕| 欧美性色aⅴ视频一区日韩精品| 免费观看成人鲁鲁鲁鲁鲁视频| 中文字幕乱码亚洲精品一区| 欧美人狂配大交3d怪物一区| 久久成人久久爱| 日本美女一区二区三区| 亚洲天堂网中文字| 欧美mv日韩mv| 2021久久国产精品不只是精品| 欧美中文字幕一二三区视频| 东方欧美亚洲色图在线| 久久9热精品视频| 精品影视av免费| 狠狠色丁香久久婷婷综合_中 | 丁香婷婷综合网| 国产一区二区三区久久悠悠色av| 日韩和欧美一区二区| 激情伊人五月天久久综合| 久久综合狠狠综合久久激情 | 欧美日韩国产一区| 欧美性猛交xxxx黑人交| 欧美日韩午夜在线视频| 欧美日韩精品一区二区三区四区| 欧美在线观看视频一区二区| 色老头久久综合| 日韩欧美中文字幕制服| 亚洲国产成人私人影院tom| 国产精品嫩草99a| 亚洲精品成人精品456| 奇米色一区二区三区四区| 精品影视av免费| 一本一道综合狠狠老| 在线综合亚洲欧美在线视频| 亚洲精品午夜久久久| 亚洲主播在线观看| 国产尤物一区二区| 91福利小视频| 国产精品视频免费看| 麻豆专区一区二区三区四区五区| 国产69精品久久99不卡| 欧美性高清videossexo| 国产精品美女久久久久久久久久久 | 免费三级欧美电影| 欧美日韩一区精品| 中文字幕一区二区不卡| 日韩av在线发布| 3751色影院一区二区三区| 中文字幕综合网| av电影天堂一区二区在线观看| 69堂国产成人免费视频| 一区二区三区日韩在线观看| 99久久婷婷国产| 国产精品天天看| 99久久精品免费看国产| 久久精品日韩一区二区三区| 久久精品国产精品青草| 欧美一级免费大片| 麻豆成人久久精品二区三区红| 欧美日高清视频| 天堂久久一区二区三区| 在线综合+亚洲+欧美中文字幕| 亚洲sss视频在线视频| 欧美一区二区三区日韩| 免费欧美日韩国产三级电影|