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

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

?? mga.c

?? VLC媒體播放程序
?? C
字號:
/***************************************************************************** * mga.c : Matrox Graphic Array plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN * $Id: mga.c,v 1.3 2003/10/25 00:49:14 sam Exp $ * * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca> *          Samuel Hocevar <sam@zoy.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 <unistd.h>                                               /* close() */#include <stdlib.h>                                                /* free() */#include <string.h>                                            /* strerror() */#include <fcntl.h>                                                 /* open() */#include <sys/ioctl.h>                                            /* ioctl() */#include <sys/mman.h>                                          /* PROT_WRITE */#include <vlc/vlc.h>#include <vlc/vout.h>#ifdef SYS_BSD#include <sys/types.h>                                     /* typedef ushort */#endif/***************************************************************************** * 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 void Display   ( vout_thread_t *, picture_t * );static int  NewPicture     ( vout_thread_t *, picture_t * );/***************************************************************************** * Module descriptor *****************************************************************************/vlc_module_begin();    set_description( _("Matrox Graphic Array video output") );    set_capability( "video output", 10 );    set_callbacks( Create, Destroy );vlc_module_end();/***************************************************************************** * vout_sys_t: video output MGA method descriptor ***************************************************************************** * This structure is part of the video output thread descriptor. * It describes the MGA specific properties of an output thread. *****************************************************************************/#ifndef __LINUX_MGAVID_H#   define __LINUX_MGAVID_H#   define MGA_VID_CONFIG _IOR('J', 1, mga_vid_config_t)#   define MGA_VID_ON     _IO ('J', 2)#   define MGA_VID_OFF    _IO ('J', 3)#   define MGA_VID_FSEL   _IOR('J', 4, int)#   define MGA_G200 0x1234#   define MGA_G400 0x5678#   define MGA_VID_FORMAT_YV12 0x32315659#   define MGA_VID_FORMAT_IYUV (('I'<<24)|('Y'<<16)|('U'<<8)|'V')#   define MGA_VID_FORMAT_I420 (('I'<<24)|('4'<<16)|('2'<<8)|'0')#   define MGA_VID_FORMAT_YUY2 (('Y'<<24)|('U'<<16)|('Y'<<8)|'2')#   define MGA_VID_FORMAT_UYVY (('U'<<24)|('Y'<<16)|('V'<<8)|'Y')#   define MGA_VID_VERSION     0x0201#   define MGA_NUM_FRAMES      1typedef struct mga_vid_config_t{    uint16_t version;    uint16_t card_type;    uint32_t ram_size;    uint32_t src_width;    uint32_t src_height;    uint32_t dest_width;    uint32_t dest_height;    uint32_t x_org;    uint32_t y_org;    uint8_t  colkey_on;    uint8_t  colkey_red;    uint8_t  colkey_green;    uint8_t  colkey_blue;    uint32_t format;    uint32_t frame_size;    uint32_t num_frames;} mga_vid_config_t;#endifstruct vout_sys_t{    mga_vid_config_t    mga;    int                 i_fd;    byte_t *            p_video;};struct picture_sys_t{    int     i_frame;};#define CEIL32(x) (((x)+31)&~31)/***************************************************************************** * Create: allocates dummy video thread output method ***************************************************************************** * This function allocates and initializes a dummy vout method. *****************************************************************************/static int Create( vlc_object_t *p_this ){    vout_thread_t *p_vout = (vout_thread_t *)p_this;    /* 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( 1 );    }    p_vout->p_sys->i_fd = open( "/dev/mga_vid", O_RDWR );    if( p_vout->p_sys->i_fd == -1 )    {        msg_Err( p_vout, "cannot open MGA driver /dev/mga_vid" );        free( p_vout->p_sys );        return( 1 );    }    p_vout->pf_init = Init;    p_vout->pf_end = End;    p_vout->pf_manage = NULL;    p_vout->pf_render = NULL;    p_vout->pf_display = Display;    return( 0 );}/***************************************************************************** * Init: initialize dummy video thread output method *****************************************************************************/static int Init( vout_thread_t *p_vout ){    int i_index;    picture_t *p_pic;    I_OUTPUTPICTURES = 0;    /* create the MGA output */    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;    /* Set coordinates and aspect ratio */    p_vout->p_sys->mga.src_width = CEIL32(p_vout->output.i_width);    p_vout->p_sys->mga.src_height = p_vout->output.i_height;    vout_PlacePicture( p_vout, 1024, 768,                       &p_vout->p_sys->mga.x_org, &p_vout->p_sys->mga.y_org,                       &p_vout->p_sys->mga.dest_width,                       &p_vout->p_sys->mga.dest_height );    /* Initialize a video buffer */    p_vout->p_sys->mga.colkey_on = 0;    p_vout->p_sys->mga.num_frames = MGA_NUM_FRAMES;    p_vout->p_sys->mga.frame_size = CEIL32(p_vout->output.i_width)                                     * p_vout->output.i_height * 2;    p_vout->p_sys->mga.version = MGA_VID_VERSION;    /* Assume we only do YMGA for the moment. XXX: mga_vid calls this     * YV12, but it's actually some strange format with packed UV. */    p_vout->output.i_chroma = VLC_FOURCC('Y','M','G','A');    p_vout->p_sys->mga.format = MGA_VID_FORMAT_YV12;    if( ioctl(p_vout->p_sys->i_fd, MGA_VID_CONFIG, &p_vout->p_sys->mga) )    {        msg_Err( p_vout, "MGA config ioctl failed" );        return -1;    }    if( p_vout->p_sys->mga.card_type == MGA_G200 )    {        msg_Dbg( p_vout, "detected MGA G200 (%d MB Ram)",                         p_vout->p_sys->mga.ram_size );    }    else    {        msg_Dbg( p_vout, "detected MGA G400/G450 (%d MB Ram)",                         p_vout->p_sys->mga.ram_size );    }    p_vout->p_sys->p_video = mmap( 0, p_vout->p_sys->mga.frame_size                                       * MGA_NUM_FRAMES,                                   PROT_WRITE, MAP_SHARED,                                   p_vout->p_sys->i_fd, 0 );    /* Try to initialize up to MGA_NUM_FRAMES direct buffers */    while( I_OUTPUTPICTURES < MGA_NUM_FRAMES )    {        p_pic = NULL;        /* 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 == NULL || NewPicture( p_vout, p_pic ) )        {            break;        }        p_pic->i_status = DESTROYED_PICTURE;        p_pic->i_type   = DIRECT_PICTURE;        PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;        I_OUTPUTPICTURES++;    }    /* Blank the windows */    for( i_index = 0; i_index < I_OUTPUTPICTURES; i_index++ )    {        memset( p_vout->p_sys->p_video                 + p_vout->p_sys->mga.frame_size * i_index,                0x00, p_vout->p_sys->mga.frame_size / 2 );        memset( p_vout->p_sys->p_video                 + p_vout->p_sys->mga.frame_size * ( 2*i_index + 1 ) / 2,                0x80, p_vout->p_sys->mga.frame_size / 2 );    }    /* Display the image */    ioctl( p_vout->p_sys->i_fd, MGA_VID_ON, 0 );    return( 0 );}/***************************************************************************** * End: terminate dummy video thread output method *****************************************************************************/static void End( vout_thread_t *p_vout ){    int i_index;    ioctl( p_vout->p_sys->i_fd, MGA_VID_OFF, 0 );    /* Free the output buffers we allocated */    for( i_index = I_OUTPUTPICTURES ; i_index ; )    {        i_index--;    }}/***************************************************************************** * Destroy: destroy dummy video thread output method ***************************************************************************** * Terminate an output method created by DummyCreateOutputMethod *****************************************************************************/static void Destroy( vlc_object_t *p_this ){    vout_thread_t *p_vout = (vout_thread_t *)p_this;    close( p_vout->p_sys->i_fd );    free( p_vout->p_sys );}/***************************************************************************** * Display: displays previously rendered output *****************************************************************************/static void Display( vout_thread_t *p_vout, picture_t *p_pic ){    ioctl( p_vout->p_sys->i_fd, MGA_VID_FSEL, &p_pic->p_sys->i_frame );}/* Following functions are local *//***************************************************************************** * NewPicture: allocate a picture ***************************************************************************** * Returns 0 on success, -1 otherwise *****************************************************************************/static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ){    /* We know the chroma, allocate a buffer which will be used     * directly by the decoder */    p_pic->p_data = p_vout->p_sys->p_video + I_OUTPUTPICTURES                                              * p_vout->p_sys->mga.frame_size;    p_pic->p_sys = malloc( sizeof( picture_sys_t ) );    if( p_pic->p_sys == NULL )    {        return -1;    }    p_pic->Y_PIXELS = p_pic->p_data;    p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;    p_pic->p[Y_PLANE].i_pitch = CEIL32( p_vout->output.i_width );    p_pic->p[Y_PLANE].i_pixel_pitch = 1;    p_pic->p[Y_PLANE].i_visible_pitch = p_vout->output.i_width;    p_pic->U_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 2/4;    p_pic->p[U_PLANE].i_lines = p_vout->output.i_height / 2;    p_pic->p[U_PLANE].i_pitch = CEIL32( p_vout->output.i_width ) / 2;    p_pic->p[U_PLANE].i_pixel_pitch = 1;    p_pic->p[U_PLANE].i_visible_pitch = p_pic->p[U_PLANE].i_pitch;    p_pic->V_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 3/4;    p_pic->p[V_PLANE].i_lines = p_vout->output.i_height / 2;    p_pic->p[V_PLANE].i_pitch = CEIL32( p_vout->output.i_width ) / 2;    p_pic->p[V_PLANE].i_pixel_pitch = 1;    p_pic->p[V_PLANE].i_visible_pitch = p_pic->p[V_PLANE].i_pitch;    p_pic->p_sys->i_frame = I_OUTPUTPICTURES;    p_pic->i_planes = 3;    return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区在线| 久久狠狠亚洲综合| 成人不卡免费av| 日韩伦理av电影| 色爱区综合激月婷婷| 久久久99精品久久| 亚洲午夜在线电影| 在线观看亚洲a| 国产精品萝li| 99久久精品情趣| 亚洲综合色丁香婷婷六月图片| 91麻豆高清视频| 久久久久国产成人精品亚洲午夜| 麻豆国产欧美日韩综合精品二区| 精品久久久久一区二区国产| 国产高清久久久久| 亚洲国产日产av| 亚洲欧洲精品一区二区三区| 51久久夜色精品国产麻豆| 懂色av一区二区夜夜嗨| 美女尤物国产一区| 一区二区三区蜜桃| 中文字幕亚洲成人| 精品久久久久香蕉网| 欧美日韩成人综合天天影院| 成人亚洲一区二区一| 美女在线视频一区| 日韩av在线播放中文字幕| 国产精品久久久久一区二区三区 | 亚洲永久免费视频| 中文字幕欧美日韩一区| 精品国产乱码久久| 这里只有精品视频在线观看| jizz一区二区| 久久这里都是精品| 欧美日韩在线一区二区| 一本色道久久综合狠狠躁的推荐 | 精品一区二区三区在线视频| 亚洲一二三四在线| 亚洲第一综合色| 丝袜a∨在线一区二区三区不卡| 综合久久给合久久狠狠狠97色| 国产精品免费网站在线观看| 中文字幕亚洲电影| 一区二区三区日韩精品视频| 一区二区三区资源| 秋霞午夜av一区二区三区| 麻豆91精品91久久久的内涵| 狠狠色丁香久久婷婷综合丁香| 韩国三级中文字幕hd久久精品| 国产精品三级视频| 亚洲蜜桃精久久久久久久| 一区二区三区**美女毛片| 天堂一区二区在线免费观看| 激情综合五月婷婷| 91蜜桃视频在线| 久久影院视频免费| 亚洲精品国产品国语在线app| 一区二区三区在线免费| 久久av中文字幕片| 精一区二区三区| 国产91精品在线观看| 国产黑丝在线一区二区三区| 成人黄色大片在线观看| 欧美日韩高清在线播放| 亚洲国产精品99久久久久久久久| 一区二区三区影院| 97se亚洲国产综合自在线观| 精品国产露脸精彩对白| 首页综合国产亚洲丝袜| 在线观看区一区二| 亚洲一区二区三区在线播放| av资源网一区| 亚洲欧洲av另类| 91视视频在线观看入口直接观看www| 精品人伦一区二区色婷婷| 婷婷夜色潮精品综合在线| 欧美三级乱人伦电影| 一区二区三区不卡视频| 99久久777色| 亚洲二区在线观看| 欧美日本在线播放| 亚洲 欧美综合在线网络| 欧美一区二区三区白人| 婷婷成人激情在线网| 国产成人在线看| 国产精品区一区二区三区| 丁香婷婷综合激情五月色| 久久久精品国产免费观看同学| 国产真实乱偷精品视频免| 中文字幕电影一区| 高清国产午夜精品久久久久久| 欧美日韩1234| 成人高清视频在线观看| 亚洲综合丝袜美腿| 久久久亚洲高清| 日本道精品一区二区三区| 青青草成人在线观看| 日本一区二区三区视频视频| 日本韩国欧美在线| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲日本乱码在线观看| 日韩一区二区免费视频| 日本久久一区二区| 成人高清免费观看| 精品在线观看免费| 首页国产丝袜综合| 亚洲第一久久影院| 亚洲综合在线观看视频| 国产精品乱人伦| 久久精品亚洲精品国产欧美kt∨| 欧美午夜精品一区二区三区| 香蕉av福利精品导航| 久久久久成人黄色影片| 日韩欧美一级在线播放| 在线精品视频一区二区| 色婷婷综合久久久中文一区二区 | 一本到一区二区三区| 成a人片国产精品| 91啪在线观看| 91国在线观看| 91麻豆精品国产综合久久久久久| 成人免费不卡视频| 韩日av一区二区| 亚洲超碰精品一区二区| 亚洲视频图片小说| 亚洲精品欧美专区| 亚洲一区二区四区蜜桃| 亚洲国产视频在线| 精品一区二区三区不卡| 黑人巨大精品欧美黑白配亚洲| 国产精品一区二区在线看| 成人午夜短视频| 91亚洲男人天堂| 欧美一区二区精品| 国产精品天干天干在观线| 洋洋av久久久久久久一区| 麻豆一区二区99久久久久| 丰满亚洲少妇av| 欧美一区二区三区性视频| 国产日韩精品视频一区| 亚洲一区在线观看网站| 九色综合国产一区二区三区| 色哟哟国产精品免费观看| 精品入口麻豆88视频| 亚洲h动漫在线| 不卡欧美aaaaa| 久久精品水蜜桃av综合天堂| 亚洲成人免费在线| 欧美性极品少妇| 亚洲女人****多毛耸耸8| 国产自产v一区二区三区c| 777奇米四色成人影色区| 亚洲乱码日产精品bd| www.欧美日韩国产在线| 日本一区二区三区视频视频| 国产一区啦啦啦在线观看| 国产亚洲欧美日韩俺去了| 在线观看欧美黄色| 日本一区二区在线不卡| 狠狠网亚洲精品| 久久综合色婷婷| 成人在线视频一区二区| 国产欧美综合色| 91一区二区在线| 亚洲一区二区三区四区在线观看 | 色偷偷一区二区三区| 亚洲六月丁香色婷婷综合久久 | 成熟亚洲日本毛茸茸凸凹| 中文字幕不卡在线播放| 成人免费视频caoporn| 欧美韩国日本一区| 精品视频在线视频| 亚洲人成网站在线| 欧美日韩在线播放三区| 精油按摩中文字幕久久| 国产精品麻豆久久久| 欧美美女网站色| 国产福利一区在线| 亚洲国产一区视频| 亚洲国产精品激情在线观看| 色国产综合视频| 国产成人av一区| 婷婷丁香久久五月婷婷| 国产精品色一区二区三区| 91精品在线观看入口| 国产精品一级在线| 亚洲成av人片一区二区梦乃| 国产一区二区h| 亚洲伊人色欲综合网| 国产视频一区不卡| 日韩亚洲欧美成人一区| 欧洲av一区二区嗯嗯嗯啊| 99精品热视频| 北条麻妃一区二区三区| 国产精品自拍毛片| 国产一区在线精品| 美国精品在线观看| 午夜久久久久久电影| 亚洲成人动漫精品|