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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? opengl.c

?? video linux conference
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/***************************************************************************** * 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 ) )    {

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲va欧美va人人爽午夜| 国产精品视频观看| 91美女视频网站| 久久国产精品99久久人人澡| 亚洲裸体xxx| 日本一区二区成人在线| 日韩一区二区三区电影在线观看| 91久久精品国产91性色tv| 国产精品一卡二卡| 日韩av网站免费在线| 亚洲电影中文字幕在线观看| 一区二区三区免费| 亚洲综合男人的天堂| 一区二区三区产品免费精品久久75| 国产日韩成人精品| 中文字幕不卡在线播放| 中文字幕乱码一区二区免费| 久久精品综合网| 最新不卡av在线| 一区二区三区中文字幕| 亚洲123区在线观看| 日韩精品亚洲一区| 亚洲成人av福利| 久久国产福利国产秒拍| 国产精品123| www.亚洲色图| 欧美久久久久久久久中文字幕| 欧美久久高跟鞋激| www日韩大片| 亚洲精品乱码久久久久久黑人 | 日韩欧美在线网站| 精品播放一区二区| 一区在线中文字幕| 亚洲mv在线观看| 国产精品香蕉一区二区三区| 91麻豆6部合集magnet| 欧美一级搡bbbb搡bbbb| 国产精品午夜在线| 午夜精品福利视频网站| 国产成人免费9x9x人网站视频| 在线观看av一区| 日本一区二区三区四区| 亚洲高清免费视频| 成人国产亚洲欧美成人综合网| 欧美日韩一区在线| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲在线视频一区| www.欧美.com| 国产精品私人自拍| 久久99日本精品| 欧美日韩国产一级片| 国产精品福利一区| 寂寞少妇一区二区三区| 亚洲欧洲日韩女同| 国产成人精品免费在线| 日韩视频免费直播| 亚洲第一二三四区| 日本精品裸体写真集在线观看| 久久久国产午夜精品| 九一久久久久久| 精品国免费一区二区三区| 亚洲一级二级三级在线免费观看| 色婷婷综合久色| 亚洲欧美日韩小说| 色94色欧美sute亚洲线路一ni| 国产精品网站在线播放| 国产毛片一区二区| 国产欧美一区二区三区鸳鸯浴 | 国产成人精品亚洲午夜麻豆| 日韩免费性生活视频播放| 久久成人精品无人区| 欧美mv日韩mv亚洲| 国产精品亚洲成人| 中文字幕av一区二区三区| 不卡的看片网站| 一区二区三区国产豹纹内裤在线| 在线精品视频小说1| 亚洲v精品v日韩v欧美v专区| 91精品国产入口在线| 国产曰批免费观看久久久| 国产清纯美女被跳蛋高潮一区二区久久w | 久久久久久夜精品精品免费| 国产激情偷乱视频一区二区三区| 中文字幕一区二区视频| 欧美少妇bbb| 久久国产精品无码网站| 国产精品不卡在线| 欧美丝袜丝nylons| 国产成人亚洲综合a∨婷婷| 中文字幕在线不卡| 日韩精品一区二区三区视频在线观看| 国产精品主播直播| 一区二区三区毛片| 久久久精品黄色| 欧美精品久久久久久久多人混战 | 天天操天天色综合| 欧洲一区在线电影| 国内精品免费**视频| 亚洲一区二区在线免费观看视频| 91.麻豆视频| 国产一区福利在线| 亚洲激情五月婷婷| 91精品国产入口在线| 国产盗摄精品一区二区三区在线| 亚洲成人av福利| 亚洲天堂免费看| 中文字幕免费一区| 久久久久久久久99精品| 欧美群妇大交群的观看方式| 色哟哟国产精品| 成年人午夜久久久| 国产91丝袜在线18| 国产精品一区二区三区乱码| 久久激情五月婷婷| 美女在线视频一区| 极品销魂美女一区二区三区| 视频一区视频二区在线观看| 亚洲免费在线看| 久久久久综合网| 精品成人私密视频| 国产香蕉久久精品综合网| 日韩三级视频在线看| 日韩你懂的在线播放| 精品国产乱码久久久久久牛牛| 欧美一区二区三区男人的天堂| 欧美日韩久久不卡| 91精品福利在线一区二区三区 | 亚洲中国最大av网站| 一区二区三区 在线观看视频| 亚洲第一在线综合网站| 日韩中文字幕区一区有砖一区| 日本亚洲三级在线| 国产乱码精品1区2区3区| 成人97人人超碰人人99| 欧美系列一区二区| 日韩欧美在线综合网| 国产精品久久久久久久久晋中| 中文字幕一区二区视频| 日韩高清不卡一区二区三区| 久久 天天综合| 欧美在线观看一区二区| 日韩欧美一卡二卡| 亚洲精品久久久蜜桃| 精品亚洲成a人| 色婷婷av一区二区三区gif | 激情综合一区二区三区| 99re66热这里只有精品3直播 | 日日夜夜免费精品视频| 国产高清亚洲一区| 欧美日产在线观看| 国产精品久久久久毛片软件| 蜜桃久久av一区| 欧美性色aⅴ视频一区日韩精品| 久久久亚洲精品石原莉奈| 婷婷开心激情综合| 91官网在线免费观看| 国产日韩成人精品| 黄色日韩三级电影| 4hu四虎永久在线影院成人| 悠悠色在线精品| 成人午夜免费av| 久久久国产一区二区三区四区小说 | 国产精品综合一区二区| 欧美一级精品在线| 日韩精品三区四区| 欧美日韩国产高清一区二区三区| 中文字幕欧美激情| 国产精品18久久久久久久久 | 久久午夜老司机| 久久99热这里只有精品| 日韩欧美国产成人一区二区| 男人操女人的视频在线观看欧美| 欧美亚男人的天堂| 蜜臀va亚洲va欧美va天堂| 欧美日韩视频在线观看一区二区三区| 中文字幕一区二区在线播放| 一本到不卡免费一区二区| 亚洲免费av网站| 欧美美女直播网站| 免费三级欧美电影| 久久美女高清视频| 国产成人日日夜夜| 国产欧美综合在线观看第十页| 国产福利一区在线观看| 久久精品人人做人人综合| 国产精品91一区二区| 久久精品在线免费观看| 国产精品亚洲人在线观看| 国产精品系列在线| 色综合视频一区二区三区高清| 国产精品第13页| 欧美三级电影一区| 日本不卡在线视频| 亚洲精品一区二区三区四区高清| 国产呦萝稀缺另类资源| 亚洲国产成人午夜在线一区| 另类人妖一区二区av| 欧美国产丝袜视频| 色综合天天做天天爱| 蜜臀久久99精品久久久画质超高清|