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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? direct3d.c

?? uclinux 下的vlc播放器源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/***************************************************************************** * direct3d.c: Windows Direct3D video output module ***************************************************************************** * Copyright (C) 2006 the VideoLAN team *$Id: direct3d.c 17676 2006-11-11 21:44:34Z damienf $ * * Authors: Damien Fouilleul <damienf@videolan.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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************//***************************************************************************** * Preamble: * * This plugin will use YUV surface if supported, using YUV will result in * the best video quality (hardware filering when rescaling the picture) * and the fastest display as it requires less processing. * * If YUV overlay is not supported this plugin will use RGB offscreen video * surfaces that will be blitted onto the primary surface (display) to * effectively display the pictures. * *****************************************************************************/#include <errno.h>                                                 /* ENOMEM */#include <stdlib.h>                                                /* free() */#include <string.h>                                            /* strerror() */#include <vlc/vlc.h>#include <vlc/intf.h>#include <vlc/vout.h>#include <windows.h>#include <d3d9.h>#include "vout.h"/***************************************************************************** * Local prototypes. *****************************************************************************/static int  OpenVideo  ( vlc_object_t * );static void CloseVideo ( vlc_object_t * );static int  Init      ( vout_thread_t * );static void End       ( vout_thread_t * );static int  Manage    ( vout_thread_t * );static void Display   ( vout_thread_t *, picture_t * );static int Direct3DVoutCreate     ( vout_thread_t * );static void Direct3DVoutRelease   ( vout_thread_t * );static int  Direct3DVoutOpen      ( vout_thread_t * );static void Direct3DVoutClose     ( vout_thread_t * );static int Direct3DVoutResetDevice( vout_thread_t * );static int Direct3DVoutCreatePictures   ( vout_thread_t *, size_t );static void Direct3DVoutReleasePictures ( vout_thread_t * );static int Direct3DVoutLockSurface  ( vout_thread_t *, picture_t * );static int Direct3DVoutUnlockSurface( vout_thread_t *, picture_t * );static int Direct3DVoutCreateScene      ( vout_thread_t * );static void Direct3DVoutReleaseScene    ( vout_thread_t * );static void Direct3DVoutRenderScene     ( vout_thread_t *, picture_t * );/***************************************************************************** * Module descriptor *****************************************************************************/static vlc_bool_t _got_vista_or_above;static int get_capability_for_osversion(void){    OSVERSIONINFO winVer;    winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);    if( GetVersionEx(&winVer) )    {        if( winVer.dwMajorVersion > 5 )        {            /* Windows Vista or above, make this module the default */	    _got_vista_or_above = VLC_TRUE;            return 150;        }    }    /* Windows XP or lower, make sure this module isn't the default */    _got_vista_or_above = VLC_FALSE;    return 50;}vlc_module_begin();    set_shortname( "Direct3D" );    set_category( CAT_VIDEO );    set_subcategory( SUBCAT_VIDEO_VOUT );    set_description( _("DirectX 3D video output") );    set_capability( "video output", get_capability_for_osversion() );    add_shortcut( "direct3d" );    set_callbacks( OpenVideo, CloseVideo );    /* FIXME: Hack to avoid unregistering our window class */    linked_with_a_crap_library_which_uses_atexit( );vlc_module_end();#if 0 /* FIXME */    /* check if we registered a window class because we need to     * unregister it */    WNDCLASS wndclass;    if( GetClassInfo( GetModuleHandle(NULL), "VLC DirectX", &wndclass ) )        UnregisterClass( "VLC DirectX", GetModuleHandle(NULL) );#endif/***************************************************************************** * CUSTOMVERTEX:  ***************************************************************************** *****************************************************************************/typedef struct {    FLOAT       x,y,z;      // vertex untransformed position     FLOAT       rhw;        // eye distance    D3DCOLOR    diffuse;    // diffuse color    FLOAT       tu, tv;     // texture relative coordinates} CUSTOMVERTEX;#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)/***************************************************************************** * OpenVideo: allocate DirectX video thread output method ***************************************************************************** * This function allocates and initialize the Direct3D vout method. *****************************************************************************/static int OpenVideo( vlc_object_t *p_this ){    vout_thread_t * p_vout = (vout_thread_t *)p_this;    vlc_value_t val;    /* Allocate structure */    p_vout->p_sys = malloc( sizeof( vout_sys_t ) );    if( p_vout->p_sys == NULL )    {        msg_Err( p_vout, "out of memory" );        return VLC_ENOMEM;    }    memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) );    if( VLC_SUCCESS != Direct3DVoutCreate( p_vout ) )    {        msg_Err( p_vout, "Direct3D could not be initialized !");        goto error;    }    /* Initialisations */    p_vout->pf_init = Init;    p_vout->pf_end = End;    p_vout->pf_manage = Manage;    p_vout->pf_render = Direct3DVoutRenderScene;    p_vout->pf_display = Display;    p_vout->p_sys->hwnd = p_vout->p_sys->hvideownd = NULL;    p_vout->p_sys->hparent = p_vout->p_sys->hfswnd = NULL;    p_vout->p_sys->i_changes = 0;    p_vout->p_sys->b_wallpaper = 0;    vlc_mutex_init( p_vout, &p_vout->p_sys->lock );    SetRectEmpty( &p_vout->p_sys->rect_display );    SetRectEmpty( &p_vout->p_sys->rect_parent );    var_Create( p_vout, "directx-hw-yuv", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );    var_Create( p_vout, "directx-device", VLC_VAR_STRING | VLC_VAR_DOINHERIT );    var_Create( p_vout, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT );    var_Create( p_vout, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );    p_vout->p_sys->b_cursor_hidden = 0;    p_vout->p_sys->i_lastmoved = mdate();    var_Create( p_vout, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT );    var_Create( p_vout, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );    /* Set main window's size */    p_vout->p_sys->i_window_width = p_vout->i_window_width;    p_vout->p_sys->i_window_height = p_vout->i_window_height;    /* Create the DirectXEventThread, this thread is created by us to isolate     * the Win32 PeekMessage function calls. We want to do this because     * Windows can stay blocked inside this call for a long time, and when     * this happens it thus blocks vlc's video_output thread.     * DirectXEventThread will take care of the creation of the video     * window (because PeekMessage has to be called from the same thread which     * created the window). */    msg_Dbg( p_vout, "creating DirectXEventThread" );    p_vout->p_sys->p_event =        vlc_object_create( p_vout, sizeof(event_thread_t) );    p_vout->p_sys->p_event->p_vout = p_vout;    if( vlc_thread_create( p_vout->p_sys->p_event, "DirectX Events Thread",                           E_(DirectXEventThread), 0, 1 ) )    {        msg_Err( p_vout, "cannot create DirectXEventThread" );        vlc_object_destroy( p_vout->p_sys->p_event );        p_vout->p_sys->p_event = NULL;        goto error;    }    if( p_vout->p_sys->p_event->b_error )    {        msg_Err( p_vout, "DirectXEventThread failed" );        goto error;    }    vlc_object_attach( p_vout->p_sys->p_event, p_vout );    msg_Dbg( p_vout, "DirectXEventThread running" );    /* Variable to indicate if the window should be on top of others */    /* Trigger a callback right now */    var_Get( p_vout, "video-on-top", &val );    var_Set( p_vout, "video-on-top", val );    /* disable screensaver by temporarily changing system settings */    p_vout->p_sys->i_spi_lowpowertimeout = 0;    p_vout->p_sys->i_spi_powerofftimeout = 0;    p_vout->p_sys->i_spi_screensavetimeout = 0;    var_Get( p_vout, "disable-screensaver", &val);    if( val.b_bool ) {        msg_Dbg(p_vout, "disabling screen saver");        SystemParametersInfo(SPI_GETLOWPOWERTIMEOUT,            0, &(p_vout->p_sys->i_spi_lowpowertimeout), 0);        if( 0 != p_vout->p_sys->i_spi_lowpowertimeout ) {            SystemParametersInfo(SPI_SETLOWPOWERTIMEOUT, 0, NULL, 0);        }        SystemParametersInfo(SPI_GETPOWEROFFTIMEOUT, 0,            &(p_vout->p_sys->i_spi_powerofftimeout), 0);        if( 0 != p_vout->p_sys->i_spi_powerofftimeout ) {            SystemParametersInfo(SPI_SETPOWEROFFTIMEOUT, 0, NULL, 0);        }        SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0,            &(p_vout->p_sys->i_spi_screensavetimeout), 0);        if( 0 != p_vout->p_sys->i_spi_screensavetimeout ) {            SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, 0, NULL, 0);        }    }    return VLC_SUCCESS; error:    CloseVideo( VLC_OBJECT(p_vout) );    return VLC_EGENERIC;}/***************************************************************************** * CloseVideo: destroy Sys video thread output method ***************************************************************************** * Terminate an output method created by Create *****************************************************************************/static void CloseVideo( vlc_object_t *p_this ){    vout_thread_t * p_vout = (vout_thread_t *)p_this;    Direct3DVoutRelease( p_vout );    if( p_vout->p_sys->p_event )    {        vlc_object_detach( p_vout->p_sys->p_event );        /* Kill DirectXEventThread */        p_vout->p_sys->p_event->b_die = VLC_TRUE;        /* we need to be sure DirectXEventThread won't stay stuck in         * GetMessage, so we send a fake message */        if( p_vout->p_sys->hwnd )        {            PostMessage( p_vout->p_sys->hwnd, WM_NULL, 0, 0);        }        vlc_thread_join( p_vout->p_sys->p_event );        vlc_object_destroy( p_vout->p_sys->p_event );    }    vlc_mutex_destroy( &p_vout->p_sys->lock );    /* restore screensaver system settings */    if( 0 != p_vout->p_sys->i_spi_lowpowertimeout ) {        SystemParametersInfo(SPI_SETLOWPOWERTIMEOUT,            p_vout->p_sys->i_spi_lowpowertimeout, NULL, 0);    }    if( 0 != p_vout->p_sys->i_spi_powerofftimeout ) {        SystemParametersInfo(SPI_SETPOWEROFFTIMEOUT,            p_vout->p_sys->i_spi_powerofftimeout, NULL, 0);    }    if( 0 != p_vout->p_sys->i_spi_screensavetimeout ) {        SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,            p_vout->p_sys->i_spi_screensavetimeout, NULL, 0);    }    if( p_vout->p_sys )    {        free( p_vout->p_sys );        p_vout->p_sys = NULL;    }}/***************************************************************************** * Init: initialize Direct3D video thread output method *****************************************************************************/static int Init( vout_thread_t *p_vout ){    int i_ret;    vlc_value_t val;    var_Get( p_vout, "directx-hw-yuv", &val );    p_vout->p_sys->b_hw_yuv = val.b_bool;    /* Initialise Direct3D */    if( VLC_SUCCESS != Direct3DVoutOpen( p_vout ) )    {        msg_Err( p_vout, "cannot initialize Direct3D" );        return VLC_EGENERIC;    }    /* Initialize the output structure.     * Since Direct3D 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;    p_vout->fmt_out = p_vout->fmt_in;    E_(DirectXUpdateRects)( p_vout, VLC_TRUE );    /*  create picture pool */    i_ret = Direct3DVoutCreatePictures(p_vout, 1);    if( VLC_SUCCESS != i_ret )    {        msg_Err(p_vout, "Direct3D picture pool initialization failed !");        return i_ret;    }    /* create scene */    i_ret = Direct3DVoutCreateScene(p_vout);    if( VLC_SUCCESS != i_ret )    {        msg_Err(p_vout, "Direct3D scene initialization failed !");        Direct3DVoutReleasePictures(p_vout);        return i_ret;    }    /* Change the window title bar text */    PostMessage( p_vout->p_sys->hwnd, WM_VLC_CHANGE_TEXT, 0, 0 );    p_vout->fmt_out.i_chroma = p_vout->output.i_chroma;    return VLC_SUCCESS;}/***************************************************************************** * End: terminate Sys video thread output method ***************************************************************************** * Terminate an output method created by Create. * It is called at the end of the thread. *****************************************************************************/static void End( vout_thread_t *p_vout ){    Direct3DVoutReleaseScene(p_vout);    Direct3DVoutReleasePictures(p_vout);    Direct3DVoutClose( p_vout );}/***************************************************************************** * Manage: handle Sys events ***************************************************************************** * This function should be called regularly by the video output thread. * It returns a non null value if an error occurred. *****************************************************************************/static int Manage( vout_thread_t *p_vout ){    WINDOWPLACEMENT window_placement;    /* If we do not control our window, we check for geometry changes     * ourselves because the parent might not send us its events. */    vlc_mutex_lock( &p_vout->p_sys->lock );    if( p_vout->p_sys->hparent && !p_vout->b_fullscreen )    {        RECT rect_parent;        POINT point;        vlc_mutex_unlock( &p_vout->p_sys->lock );

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产99精品视频| 亚洲精品国产a久久久久久 | 国产乱理伦片在线观看夜一区| 欧美精品高清视频| 日韩精品一二三区| 久久人人超碰精品| 东方aⅴ免费观看久久av| 国产精品久久久久久妇女6080| 99国产精品久久久| 一区二区三区在线高清| 欧美日韩精品一区二区三区四区 | 欧美日韩亚洲不卡| 日本成人在线视频网站| 久久欧美中文字幕| 波多野洁衣一区| 丝袜美腿成人在线| 国产视频一区在线观看| 国产三级精品三级在线专区| 国产美女娇喘av呻吟久久| 国产精品成人午夜| 欧美精品 日韩| 国产在线精品一区二区不卡了| 国产精品久久福利| 欧美美女激情18p| 国产精品一区专区| 一区二区三区四区视频精品免费 | 欧美一区二区免费视频| 国产精品2024| 亚洲超碰精品一区二区| 久久天堂av综合合色蜜桃网| 色婷婷久久综合| 蜜臂av日日欢夜夜爽一区| 国产精品妹子av| 91精品国产欧美日韩| aaa国产一区| 久久超碰97人人做人人爱| 三级久久三级久久| 亚洲国产成人在线| 欧美一区永久视频免费观看| 成人黄色片在线观看| 免费成人在线视频观看| 亚洲美女屁股眼交| 国产三级欧美三级日产三级99 | 亚洲精品五月天| 精品国产污污免费网站入口| 日本韩国一区二区| 亚洲色欲色欲www在线观看| 6080午夜不卡| 色婷婷av一区二区三区软件| 狠狠色综合日日| 丝袜亚洲另类丝袜在线| 亚洲精品国产高清久久伦理二区| 亚洲精品一区二区三区影院 | 大胆亚洲人体视频| 麻豆精品一二三| 亚洲成人综合网站| 亚洲精品中文在线| 1024成人网色www| 国产欧美精品区一区二区三区 | 欧美一区二区三区四区视频| 99久久精品国产一区| 国产精品18久久久久久久网站| 日本亚洲免费观看| 午夜精品爽啪视频| 亚洲午夜日本在线观看| 亚洲免费色视频| 亚洲乱码国产乱码精品精的特点 | 欧美电影免费观看高清完整版在线| 色88888久久久久久影院野外| 成人短视频下载| 粉嫩av亚洲一区二区图片| 九一久久久久久| 麻豆精品一区二区三区| 免费成人你懂的| 蜜臀久久99精品久久久久久9| 性做久久久久久| 日韩国产欧美一区二区三区| 亚洲国产日产av| 偷拍一区二区三区| 日韩av不卡一区二区| 轻轻草成人在线| 精品一区二区三区在线观看| 麻豆91精品视频| 狠狠久久亚洲欧美| 精品一区二区精品| 国产成人在线色| 成人av网址在线| 色综合一区二区| 欧美性生活大片视频| 欧美精品日韩综合在线| 欧美一区二区大片| 精品福利视频一区二区三区| 久久综合精品国产一区二区三区 | 粉嫩av一区二区三区| 99久久久精品| 在线观看国产一区二区| 欧美理论片在线| www国产亚洲精品久久麻豆| 久久精品亚洲精品国产欧美| 欧美国产精品一区| 一区二区成人在线观看| 婷婷综合在线观看| 国产一区在线视频| 91在线播放网址| 欧美久久一区二区| 欧美xfplay| 中文字幕日韩精品一区| 亚洲成人高清在线| 国产一区二区不卡在线| 91蜜桃网址入口| 欧美一区二区三区四区高清| 欧美国产国产综合| 亚洲一级二级在线| 精品一区二区三区在线观看| 91影视在线播放| 欧美一区二区视频免费观看| 国产欧美日韩在线看| 亚洲午夜av在线| 国产精品99久久久久久宅男| 91高清在线观看| 久久日韩粉嫩一区二区三区| 亚洲精品久久嫩草网站秘色| 麻豆精品久久精品色综合| 99久久婷婷国产综合精品电影| 911精品国产一区二区在线| 国产欧美综合在线| 偷拍一区二区三区| jlzzjlzz亚洲日本少妇| 欧美一级免费大片| 亚洲色图.com| 国产乱妇无码大片在线观看| 欧美日韩成人综合在线一区二区| 久久女同互慰一区二区三区| 亚洲午夜一区二区三区| 国产aⅴ综合色| 91精品国产全国免费观看| 自拍偷拍亚洲激情| 国产一区二区三区香蕉| 欧美剧在线免费观看网站| 国产精品福利一区| 国内精品第一页| 在线播放/欧美激情| 亚洲综合色成人| av高清久久久| 久久久久久久久伊人| 美女视频一区在线观看| 欧美亚洲愉拍一区二区| 亚洲视频每日更新| 成人开心网精品视频| 精品电影一区二区三区| 青青草成人在线观看| 欧美性色欧美a在线播放| 18成人在线观看| av毛片久久久久**hd| 国产三级精品三级| 国产一区二区精品久久99| 日韩欧美综合一区| 蜜臀av国产精品久久久久| 精品视频全国免费看| 亚洲自拍偷拍欧美| 一本久久综合亚洲鲁鲁五月天| 国产精品色一区二区三区| 国产传媒一区在线| 久久久久久久免费视频了| 国内不卡的二区三区中文字幕 | 在线视频观看一区| 亚洲欧美电影院| 一本大道久久精品懂色aⅴ | 亚洲国产日韩a在线播放性色| 91农村精品一区二区在线| 国产精品福利一区| 91在线观看污| 亚洲男人的天堂av| 色综合激情五月| 亚洲综合网站在线观看| 欧美亚洲国产一区在线观看网站| 亚洲综合色成人| 欧美另类一区二区三区| 热久久国产精品| 久久综合五月天婷婷伊人| 国产一区二区三区不卡在线观看| 精品99一区二区| 成人综合婷婷国产精品久久 | 成人黄色a**站在线观看| 亚洲国产岛国毛片在线| 一本一道波多野结衣一区二区| 夜夜揉揉日日人人青青一国产精品| 欧美亚洲丝袜传媒另类| 日韩中文字幕亚洲一区二区va在线| 91精品视频网| 狠狠色综合日日| 国产精品国产三级国产aⅴ无密码| 一本在线高清不卡dvd| 手机精品视频在线观看| 久久先锋影音av鲁色资源| 不卡一区中文字幕| 五月天久久比比资源色| 欧美不卡一区二区三区| jlzzjlzz亚洲女人18| 日韩国产精品久久|