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

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

?? directfb.c

?? uclinux 下的vlc播放器源代碼
?? C
字號:
/***************************************************************************** * directfb.c: DirectFB video output display method ***************************************************************************** * Copyright (C) 2005 the VideoLAN team * * Authors: Iuri Diniz <iuri@digizap.com.br> * * This code is based in sdl.c and fb.c, thanks for VideoLAN team. *  * 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 *****************************************************************************/#include <errno.h>                                                 /* ENOMEM */#include <stdlib.h>                                                /* free() */#include <string.h>                                            /* strerror() */#include <vlc/vlc.h>#include <vlc/vout.h>#include <directfb.h>/***************************************************************************** * Local prototypes *****************************************************************************/static int  Create    ( vlc_object_t * );static void Destroy   ( 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  OpenDisplay    ( vout_thread_t * );static void CloseDisplay   ( vout_thread_t * );struct vout_sys_t{    IDirectFB *p_directfb;    IDirectFBSurface *p_primary;    DFBSurfacePixelFormat p_pixel_format;    int i_width;    int i_height;    byte_t* p_pixels;};/***************************************************************************** * Module descriptor *****************************************************************************/vlc_module_begin();    set_shortname( "DirectFB" );    set_category( CAT_VIDEO );    set_subcategory( SUBCAT_VIDEO_VOUT );    set_description( _("DirectFB video output http://www.directfb.org/") );    set_capability( "video output", 60 );    add_shortcut( "directfb" );    set_callbacks( Create, Destroy );vlc_module_end();static int Create( vlc_object_t *p_this ) {    vout_thread_t *p_vout = (vout_thread_t *)p_this;    vout_sys_t *p_sys = NULL;    p_vout->pf_init = Init;    p_vout->pf_end = End;    p_vout->pf_manage = Manage;    p_vout->pf_render = NULL;    p_vout->pf_display = Display;    /* Allocate structure */    p_vout->p_sys = p_sys = malloc( sizeof( vout_sys_t ) );    if( !p_sys )    {        msg_Err( p_vout, "out of memory" );        return VLC_ENOMEM;    }    p_sys->p_directfb = NULL;    p_sys->p_primary = NULL;    p_sys->p_pixels = NULL;    p_sys->i_width = 0;    p_sys->i_height = 0;    /* Init DirectFB */    if( DirectFBInit(NULL,NULL) != DFB_OK )    {        msg_Err(p_vout, "Cannot init DirectFB");        return VLC_EGENERIC;    }    if( OpenDisplay( p_vout ) )    {        msg_Err(p_vout, "Cannot create primary surface");        free( p_sys );        return VLC_EGENERIC;    }    return VLC_SUCCESS;}static int Init( vout_thread_t *p_vout ){    vout_sys_t *p_sys = p_vout->p_sys;    IDirectFBSurface *p_primary = (IDirectFBSurface *) p_vout->p_sys->p_primary;    byte_t* p_pixels = NULL;    picture_t *p_pic = NULL;    int i_rlength, i_glength, i_blength;    int i_roffset, i_goffset, i_boffset;    int i_line_pitch;    int i_size;    int i_index;    I_OUTPUTPICTURES = 0;    switch( p_sys->p_pixel_format )    {        case DSPF_RGB332:             /* 8 bit RGB (1 byte, red 3@5, green 3@2, blue 2@0) */            /* i_pixel_pitch = 1; */            i_rlength = 3;            i_roffset = 5;            i_glength = 3;            i_goffset = 2;            i_blength = 2;            i_boffset = 0;            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');            break;        case DSPF_RGB16:            /* 16 bit RGB (2 byte, red 5@11, green 6@5, blue 5@0) */            /* i_pixel_pitch = 2; */            i_rlength = 5;            i_roffset = 11;            i_glength = 6;            i_goffset = 5;            i_blength = 5;            i_boffset = 0;            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');            break;        case DSPF_RGB24:            /* 24 bit RGB (3 byte, red 8@16, green 8@8, blue 8@0) */            /* i_pixel_pitch = 3; */            i_rlength = 8;            i_roffset = 16;            i_glength = 8;            i_goffset = 8;            i_blength = 8;            i_boffset = 0;            p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');            break;        case DSPF_RGB32:            /* 24 bit RGB (4 byte, nothing@24, red 8@16, green 8@8, blue 8@0) */            /* i_pixel_pitch = 4; */            i_rlength = 8;            i_roffset = 16;            i_glength = 8;            i_goffset = 8;            i_blength = 8;            i_boffset = 0;            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');            break;        default:            msg_Err( p_vout, "unknown screen depth %i",                     p_sys->p_pixel_format );            return VLC_EGENERIC;    }    /* Set the RGB masks */    p_vout->output.i_rmask = ( (1 << i_rlength) - 1 ) << i_roffset;    p_vout->output.i_gmask = ( (1 << i_glength) - 1 ) << i_goffset;    p_vout->output.i_bmask = ( (1 << i_blength) - 1 ) << i_boffset;    /* Width and height */    p_vout->output.i_width  = p_sys->i_width;    p_vout->output.i_height = p_sys->i_height;    /* The aspect */    p_vout->output.i_aspect = (p_sys->i_width * VOUT_ASPECT_FACTOR) /                               p_sys->i_height;    /* Try to initialize 1 buffer */    /* Find an empty picture slot */    for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )    {        if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )        {            p_pic = p_vout->p_picture + i_index;            break;        }    }    /* Allocate the picture */    if( !p_pic )        return VLC_EGENERIC;    /* get the pixels */    if( p_primary->Lock( p_primary, DSLF_READ, (void **) &p_pixels,                         &i_line_pitch) != DFB_OK )        return VLC_EGENERIC;    /* allocate p_pixels */    i_size = i_line_pitch * p_sys->i_height;    p_sys->p_pixels = malloc( sizeof(byte_t) * i_size );    if( p_sys->p_pixels == NULL )    {        p_primary->Unlock(p_primary);        return VLC_ENOMEM;    }    /* copy pixels */    memcpy( p_sys->p_pixels,  p_pixels, i_size );    if( p_primary->Unlock(p_primary) != DFB_OK )    {        return VLC_EGENERIC;    }    p_pic->p->p_pixels = p_sys->p_pixels;    p_pic->p->i_pixel_pitch = i_line_pitch / p_sys->i_width;    p_pic->p->i_lines = p_sys->i_height;    p_pic->p->i_visible_lines = p_sys->i_height;    p_pic->p->i_pitch = i_line_pitch;    p_pic->p->i_visible_pitch = i_line_pitch;    p_pic->i_planes = 1;    p_pic->i_status = DESTROYED_PICTURE;    p_pic->i_type   = DIRECT_PICTURE;    PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;    I_OUTPUTPICTURES++;    return VLC_SUCCESS;}static void End( vout_thread_t *p_vout ){    vout_sys_t *p_sys = p_vout->p_sys;    if( p_sys->p_pixels )        free( p_sys->p_pixels );}static void Destroy( vlc_object_t *p_this ){    vout_thread_t *p_vout = (vout_thread_t *)p_this;    vout_sys_t *p_sys = p_vout->p_sys;    CloseDisplay( p_vout );    if( p_sys ) free( p_sys );    p_sys = NULL;}static int Manage( vout_thread_t *p_vout ){    return VLC_SUCCESS;}static void Display( vout_thread_t *p_vout, picture_t *p_pic ){    vout_sys_t *p_sys = p_vout->p_sys;    IDirectFBSurface *p_primary = (IDirectFBSurface *) p_sys->p_primary;    byte_t* p_pixels = NULL;    int i_size;    int i_line_pitch;    /* get the pixels */    if( p_primary->Lock( p_primary, DSLF_WRITE,                         (void **) &p_pixels,                         &i_line_pitch) == DFB_OK )    {        i_size = i_line_pitch * p_vout->p_sys->i_height;        /* copy pixels */        memcpy( p_pixels, p_pic->p->p_pixels, i_size);        if( p_primary->Unlock(p_primary) == DFB_OK )        {            p_primary->Flip(p_primary, NULL, 0);        }    }}static int OpenDisplay( vout_thread_t *p_vout ){    vout_sys_t *p_sys = p_vout->p_sys;    IDirectFB *p_directfb = NULL;    IDirectFBSurface *p_primary = NULL;    DFBSurfaceDescription dsc;    /*dsc.flags = DSDESC_CAPS | DSDESC_HEIGHT | DSDESC_WIDTH;*/    dsc.flags = DSDESC_CAPS;    dsc.caps  = DSCAPS_PRIMARY | DSCAPS_FLIPPING;    /*dsc.width = 352;*/    /*dsc.height = 240;*/    if( DirectFBCreate( &p_directfb ) != DFB_OK )        return VLC_EGENERIC;    p_sys->p_directfb = p_directfb;    if( !p_directfb )        return VLC_EGENERIC;    if( p_directfb->CreateSurface( p_directfb, &dsc, &p_primary ) )        return VLC_EGENERIC;    p_sys->p_primary = p_primary;    if( !p_primary )        return VLC_EGENERIC;    p_primary->GetSize( p_primary, &p_sys->i_width,                        &p_sys->i_height );    p_primary->GetPixelFormat( p_primary, &p_sys->p_pixel_format );    p_primary->FillRectangle( p_primary, 0, 0, p_sys->i_width,                              p_sys->i_height );    p_primary->Flip( p_primary, NULL, 0 );    return VLC_SUCCESS;}static void CloseDisplay( vout_thread_t *p_vout ){    vout_sys_t *p_sys = p_vout->p_sys;    IDirectFB *p_directfb = p_sys->p_directfb;    IDirectFBSurface *p_primary = p_sys->p_primary;    if( p_primary )        p_primary->Release( p_primary );    if( p_directfb )        p_directfb->Release( p_directfb );}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩国产精品91| 91在线免费视频观看| 精品视频1区2区3区| 91久久精品国产91性色tv| 欧美久久高跟鞋激| 精品粉嫩aⅴ一区二区三区四区| 欧美精品一区二区三区蜜桃 | 国产精品久久久久久久久快鸭 | 欧美sm美女调教| 久久精品一级爱片| 亚洲国产精品ⅴa在线观看| 国产精品久久久久四虎| 亚洲成av人片一区二区梦乃| 国产一区二区三区最好精华液| 久久99久久久久| 色综合天天做天天爱| 欧美日韩一级片在线观看| 欧美精品色综合| ...xxx性欧美| 国内精品久久久久影院一蜜桃| 色综合天天综合色综合av| 7777精品伊人久久久大香线蕉完整版| 精品嫩草影院久久| 亚洲综合色区另类av| 国产suv精品一区二区三区| 欧美一区二区啪啪| 一区二区三区成人在线视频| 丁香啪啪综合成人亚洲小说| 精品久久五月天| 蜜桃一区二区三区四区| 欧美成人免费网站| 精品一区二区在线视频| 久久综合色鬼综合色| 国产精品一区二区三区乱码| 久久久久久黄色| 国产1区2区3区精品美女| 国产色产综合产在线视频| 国产成人在线视频免费播放| 中文字幕亚洲综合久久菠萝蜜| 久久99久久精品| 久久久欧美精品sm网站| 韩国中文字幕2020精品| 久久亚洲综合色一区二区三区| 激情小说亚洲一区| 337p日本欧洲亚洲大胆精品| 国产一区二区三区在线观看免费视频| 久久日韩精品一区二区五区| 成人av午夜电影| 亚洲黄色尤物视频| 日韩三级在线观看| 国产麻豆视频一区二区| 国产精品日产欧美久久久久| 欧洲一区在线观看| 免费视频最近日韩| 国产无遮挡一区二区三区毛片日本| 成人av午夜影院| 午夜精品福利一区二区三区av| 精品对白一区国产伦| 91香蕉国产在线观看软件| 亚洲一区中文日韩| 久久久精品综合| 精品婷婷伊人一区三区三| 精品综合久久久久久8888| 国产精品美女久久久久高潮| 777欧美精品| 国产精品888| 日韩avvvv在线播放| 国产精品理伦片| 久久久久久久电影| 一本久久综合亚洲鲁鲁五月天| 日本怡春院一区二区| 亚洲欧美一区二区久久| 国产人成亚洲第一网站在线播放| 欧美日韩精品一区二区三区| 国产69精品久久久久毛片| 青青草国产精品亚洲专区无| 亚洲色图欧洲色图婷婷| 国产精品免费视频观看| 欧美大尺度电影在线| 在线成人小视频| 精品视频全国免费看| 色婷婷久久久久swag精品 | 日精品一区二区| 成人一级黄色片| 成人午夜在线播放| 国内精品久久久久影院色| 麻豆国产精品777777在线| 亚洲.国产.中文慕字在线| 亚洲午夜久久久久久久久电影网 | 国产精品色婷婷| 中文字幕高清不卡| 国产精品麻豆欧美日韩ww| 久久久不卡网国产精品二区| 久久青草欧美一区二区三区| 久久久精品影视| 欧美国产乱子伦| 亚洲三级视频在线观看| 亚洲综合网站在线观看| 亚洲1区2区3区4区| 麻豆精品一区二区| 国产成人免费视频网站高清观看视频| 国模无码大尺度一区二区三区| 粉嫩在线一区二区三区视频| www.在线欧美| 精品视频1区2区| xnxx国产精品| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 日韩理论片中文av| 日韩av一区二区三区四区| 狠狠久久亚洲欧美| 91麻豆123| 欧美精品在线一区二区三区| 精品国产污网站| 日韩理论片中文av| 亚洲午夜激情网页| 狠狠久久亚洲欧美| 91免费国产在线| 日韩午夜精品电影| 亚洲精品菠萝久久久久久久| 五月婷婷久久丁香| 美女视频黄a大片欧美| 97se亚洲国产综合在线| 91精品国产一区二区三区| 国产精品理伦片| 日本不卡在线视频| 日本二三区不卡| 国产精品电影一区二区三区| 精品一区二区三区免费| 欧美日本一道本在线视频| 亚洲美女一区二区三区| 成人精品国产免费网站| 亚洲精品一区二区三区在线观看| 洋洋av久久久久久久一区| 国产一区二区三区日韩| 欧美久久一二三四区| 一卡二卡欧美日韩| 色999日韩国产欧美一区二区| 国产肉丝袜一区二区| 经典三级视频一区| 911精品国产一区二区在线| 一区二区在线电影| 欧美综合视频在线观看| 亚洲午夜精品网| 欧美视频一区二区三区| 日本欧美一区二区三区乱码| 7777精品伊人久久久大香线蕉的 | 一区二区三区国产豹纹内裤在线| 不卡一区二区中文字幕| 国产精品久久久久桃色tv| 成人激情视频网站| 亚洲欧洲另类国产综合| 99久久伊人精品| 亚洲精品久久7777| 欧美日韩精品综合在线| 美女一区二区在线观看| 国产亚洲综合色| 99re热视频这里只精品| 亚洲女同一区二区| 欧美日韩高清在线| 久久av资源网| 中文字幕综合网| 日韩丝袜美女视频| av亚洲产国偷v产偷v自拍| 亚洲国产欧美在线人成| 精品国产凹凸成av人网站| 成人在线综合网| 亚洲综合无码一区二区| 日韩精品资源二区在线| 99精品热视频| 久久国产精品99精品国产 | 久久伊人蜜桃av一区二区| 成人蜜臀av电影| 秋霞电影网一区二区| 国产精品美女久久久久久| 欧美喷潮久久久xxxxx| 不卡一区二区三区四区| 午夜电影一区二区三区| 亚洲国产精品成人综合色在线婷婷| 欧美日韩一区二区在线观看视频| 国产一区在线观看视频| 亚洲va韩国va欧美va| 欧美国产日韩亚洲一区| 日韩精品中文字幕一区| 91网站最新地址| 国产精品一区在线观看你懂的| 亚洲国产毛片aaaaa无费看| 国产亚洲精品aa| 久久一夜天堂av一区二区三区 | 久久66热re国产| 亚洲成人黄色影院| 亚洲精品一二三| 综合欧美亚洲日本| 国产欧美一区二区精品性| 欧美一区二区三区四区五区| 91免费国产在线| 在线观看亚洲精品| 在线观看欧美日本| 在线视频欧美区| 欧美喷水一区二区| 欧美一区二区三区四区五区|