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

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

?? magnify.c

?? VLC Player Source Code
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************** * magnify.c : Magnify/Zoom interactive effect ***************************************************************************** * Copyright (C) 2005 the VideoLAN team * $Id$ * * Authors: Antoine Cellerier <dionoea -at- videolan -dot- 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 *****************************************************************************/#ifdef HAVE_CONFIG_H# include "config.h"#endif#include <vlc_common.h>#include <vlc_plugin.h>#include <vlc_vout.h>#include <math.h>#include "filter_common.h"#include "filter_picture.h"#include "vlc_image.h"/***************************************************************************** * Module descriptor *****************************************************************************/static int  Create    ( vlc_object_t * );static void Destroy   ( vlc_object_t * );vlc_module_begin();    set_description( N_("Magnify/Zoom interactive video filter") );    set_shortname( N_( "Magnify" ));    set_capability( "video filter", 0 );    set_category( CAT_VIDEO );    set_subcategory( SUBCAT_VIDEO_VFILTER );    set_callbacks( Create, Destroy );vlc_module_end();/***************************************************************************** * Local prototypes *****************************************************************************/static int  Init      ( vout_thread_t * );static void End       ( vout_thread_t * );static void Render    ( vout_thread_t *, picture_t * );static int  SendEvents   ( vlc_object_t *, char const *,                           vlc_value_t, vlc_value_t, void * );static int  MouseEvent   ( vlc_object_t *, char const *,                           vlc_value_t, vlc_value_t, void * );static void DrawZoomStatus( uint8_t *, int i_pitch, int i_width, int i_height,                            int i_offset_x, int i_offset_y, bool b_visible );static void DrawRectangle( uint8_t *, int i_pitch, int i_width, int i_height,                           int x, int y, int i_w, int i_h );/***************************************************************************** * vout_sys_t: Magnify video output method descriptor *****************************************************************************/struct vout_sys_t{    vout_thread_t *p_vout;    image_handler_t *p_image;    int64_t i_hide_timeout;    vlc_mutex_t lock;    int i_zoom; /* zoom level in percent */    int i_x, i_y; /* top left corner coordinates in original image */    bool b_visible; /* is "interface" visible ? */    int64_t i_last_activity;};#define VIS_ZOOM 4#define ZOOM_FACTOR 8/***************************************************************************** * Control: control facility for the vout (forwards to child vout) *****************************************************************************/static int Control( vout_thread_t *p_vout, int i_query, va_list args ){    return vout_vaControl( p_vout->p_sys->p_vout, i_query, args );}/***************************************************************************** * Create: allocates Magnify video thread output method *****************************************************************************/static int Create( vlc_object_t *p_this ){    vout_thread_t *p_vout = (vout_thread_t *)p_this;    switch( p_vout->fmt_in.i_chroma )    {        CASE_PLANAR_YUV        case VLC_FOURCC('G','R','E','Y'):            break;        default:            msg_Err( p_vout, "Unsupported chroma" );            return VLC_EGENERIC;    }    /* Allocate structure */    p_vout->p_sys = malloc( sizeof( vout_sys_t ) );    if( p_vout->p_sys == NULL )        return VLC_ENOMEM;    p_vout->p_sys->p_image = image_HandlerCreate( p_vout );    p_vout->pf_init = Init;    p_vout->pf_end = End;    p_vout->pf_manage = NULL;    p_vout->pf_render = Render;    p_vout->pf_display = NULL;    p_vout->pf_control = Control;    return VLC_SUCCESS;}/***************************************************************************** * Init: initialize Magnify video thread output method *****************************************************************************/static int Init( vout_thread_t *p_vout ){    int i_index;    picture_t *p_pic;    video_format_t fmt;    memset( &fmt, 0, sizeof(video_format_t) );    I_OUTPUTPICTURES = 0;    /* Initialize the output structure */    p_vout->output.i_chroma = p_vout->render.i_chroma;    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;    fmt = p_vout->fmt_out;    /* Try to open the real video output */    msg_Dbg( p_vout, "spawning the real video output" );    p_vout->p_sys->p_vout = vout_Create( p_vout, &fmt );    /* Everything failed */    if( p_vout->p_sys->p_vout == NULL )    {        msg_Err( p_vout, "cannot open vout, aborting" );        return VLC_EGENERIC;    }    vlc_mutex_init( &p_vout->p_sys->lock );    p_vout->p_sys->i_x = 0;    p_vout->p_sys->i_y = 0;    p_vout->p_sys->i_zoom = 2*ZOOM_FACTOR;    p_vout->p_sys->b_visible = true;    p_vout->p_sys->i_last_activity = mdate();    p_vout->p_sys->i_hide_timeout = 1000 * var_GetInteger( p_vout, "mouse-hide-timeout" );    var_AddCallback( p_vout->p_sys->p_vout, "mouse-x", MouseEvent, p_vout );    var_AddCallback( p_vout->p_sys->p_vout, "mouse-y", MouseEvent, p_vout );    var_AddCallback( p_vout->p_sys->p_vout, "mouse-clicked",                     MouseEvent, p_vout);    ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );    ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );    ADD_PARENT_CALLBACKS( SendEventsToChild );    return VLC_SUCCESS;}/***************************************************************************** * End: terminate Magnify video thread output method *****************************************************************************/static void End( vout_thread_t *p_vout ){    int i_index;    DEL_PARENT_CALLBACKS( SendEventsToChild );    DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );    /* Free the fake output buffers we allocated */    for( i_index = I_OUTPUTPICTURES ; i_index ; )    {        i_index--;        free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );    }    var_DelCallback( p_vout->p_sys->p_vout, "mouse-x", MouseEvent, p_vout);    var_DelCallback( p_vout->p_sys->p_vout, "mouse-y", MouseEvent, p_vout);    var_DelCallback( p_vout->p_sys->p_vout, "mouse-clicked", MouseEvent, p_vout);    vlc_mutex_destroy( &p_vout->p_sys->lock );    vout_CloseAndRelease( p_vout->p_sys->p_vout );}/***************************************************************************** * Destroy: destroy Magnify video thread output method *****************************************************************************/static void Destroy( vlc_object_t *p_this ){    vout_thread_t *p_vout = (vout_thread_t *)p_this;    image_HandlerDelete( p_vout->p_sys->p_image );    free( p_vout->p_sys );}/***************************************************************************** * Render: displays previously rendered output *****************************************************************************/static void Render( vout_thread_t *p_vout, picture_t *p_pic ){    vout_sys_t *p_sys = p_vout->p_sys;    picture_t *p_outpic;    int v_w, v_h;    picture_t *p_converted;    plane_t *p_oyp;    int i_plane;    /* This is a new frame. Get a structure from the video_output. */    while( ( p_outpic = vout_CreatePicture( p_sys->p_vout, 0, 0, 0 ) )              == NULL )    {        if( !vlc_object_alive (p_vout) || p_vout->b_error )        {            return;        }        msleep( VOUT_OUTMEM_SLEEP );    }    vout_DatePicture( p_sys->p_vout, p_outpic, p_pic->date );    vlc_mutex_lock( &p_sys->lock );    const bool b_visible = p_sys->b_visible;    const int o_x = p_sys->i_x;    const int o_y = p_sys->i_y;    const int o_zoom = p_sys->i_zoom;    const int64_t i_last_activity = p_sys->i_last_activity;    vlc_mutex_unlock( &p_sys->lock );    /* background magnified image */    if( o_zoom != ZOOM_FACTOR )    {        video_format_t fmt_in;        video_format_t fmt_out;        picture_t crop;        crop = *p_pic;        for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )        {            const int o_yp = o_y * p_outpic->p[i_plane].i_lines / p_outpic->p[Y_PLANE].i_lines;            const int o_xp = o_x * p_outpic->p[i_plane].i_pitch / p_outpic->p[Y_PLANE].i_pitch;            crop.p[i_plane].p_pixels += o_yp * p_outpic->p[i_plane].i_pitch + o_xp;        }        /* */        fmt_in = p_vout->fmt_out;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久超碰国产精品电影| 成人av免费在线播放| 国产欧美日韩在线观看| 欧美三级一区二区| 粉嫩aⅴ一区二区三区四区五区| 亚洲一区二区三区四区在线免费观看| 日韩三级免费观看| 欧美亚洲免费在线一区| 成人av资源在线| 国产麻豆日韩欧美久久| 婷婷久久综合九色综合绿巨人| 欧美国产乱子伦 | 国产成人精品影视| 午夜精品福利一区二区蜜股av| 欧美激情综合网| 精品久久久久香蕉网| 欧美日免费三级在线| 91在线观看美女| 国产91丝袜在线18| 韩国毛片一区二区三区| 日韩成人一级片| 日日夜夜精品视频免费| 一区二区激情小说| 亚洲欧美韩国综合色| 中文一区二区完整视频在线观看| 精品国产3级a| 欧美一区二区国产| 91精品国产色综合久久不卡电影| 在线观看亚洲专区| 日本国产一区二区| 91在线视频免费91| 99精品1区2区| 国产不卡免费视频| 国产999精品久久久久久| 国产在线精品一区二区| 精品一区中文字幕| 国产资源在线一区| 国产美女精品一区二区三区| 激情深爱一区二区| 国产美女视频一区| 成人性生交大合| 97精品国产露脸对白| 97久久精品人人澡人人爽| 色综合天天综合网天天看片| av男人天堂一区| 在线观看国产日韩| 4438x亚洲最大成人网| 欧美高清视频一二三区| 日韩一区二区电影在线| 久久综合国产精品| 国产精品第五页| 亚洲精品欧美激情| 日日噜噜夜夜狠狠视频欧美人| 日韩主播视频在线| 激情综合一区二区三区| 国产不卡视频在线播放| 91同城在线观看| 精品视频在线免费| 精品捆绑美女sm三区| 久久精品亚洲国产奇米99| 中日韩免费视频中文字幕| 亚洲你懂的在线视频| 亚洲高清视频的网址| 久久国产精品无码网站| 高清成人在线观看| 在线日韩国产精品| 日韩一区二区麻豆国产| 日本一区二区三区久久久久久久久不 | 国产精品系列在线播放| 成人精品国产免费网站| 欧美日韩在线播放一区| 久久综合色综合88| 亚洲三级免费电影| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产一区视频导航| 在线观看视频91| 精品国精品国产尤物美女| 中文字幕日韩av资源站| 丝袜诱惑亚洲看片| 成人午夜免费电影| 678五月天丁香亚洲综合网| 国产农村妇女精品| 日韩高清一区在线| www.视频一区| 精品久久久久久综合日本欧美 | 一区二区三区欧美日韩| 蜜臀91精品一区二区三区| 99这里都是精品| 亚洲精品在线观看视频| 亚洲一区电影777| 国产精品一区二区久激情瑜伽| 欧美中文字幕久久| 日本一区二区三区国色天香| 亚洲一区二区在线观看视频| 国产99久久久国产精品潘金网站| 欧美高清性hdvideosex| 亚洲欧美在线观看| 国产一区二区久久| 欧美人伦禁忌dvd放荡欲情| 亚洲欧洲精品天堂一级| 久久综合综合久久综合| 欧美性受xxxx黑人xyx| 国产精品蜜臀在线观看| 久久99精品久久久久久国产越南| 欧美午夜影院一区| 亚洲日韩欧美一区二区在线| 久久99精品国产91久久来源| 欧美三级在线看| 一区二区久久久| 91婷婷韩国欧美一区二区| 中文在线一区二区| 国产麻豆精品theporn| 日韩欧美国产精品一区| 香蕉久久一区二区不卡无毒影院 | 激情综合色播激情啊| 欧美人狂配大交3d怪物一区| 亚洲免费观看高清完整| 国产精品夜夜爽| 精品国产乱码久久久久久久久 | 麻豆91在线播放| 欧美日韩在线精品一区二区三区激情| 18欧美亚洲精品| 成人av在线一区二区三区| 久久网站热最新地址| 久久成人久久鬼色| 欧美大片日本大片免费观看| 视频一区二区不卡| 在线电影国产精品| 日一区二区三区| 欧美肥胖老妇做爰| 视频精品一区二区| 欧美一区二区三区小说| 亚洲v日本v欧美v久久精品| 欧美色涩在线第一页| 亚洲午夜精品一区二区三区他趣| 91在线高清观看| 亚洲日本一区二区三区| 91丨porny丨最新| 亚洲一区日韩精品中文字幕| 色天使久久综合网天天| 樱花草国产18久久久久| 欧美午夜精品一区| 天天综合日日夜夜精品| 欧美一级理论片| 久久福利视频一区二区| 精品国产一区二区三区久久影院| 精品一区二区三区av| 久久久久久久综合色一本| 国产成人免费视频| 综合久久久久综合| 欧美体内she精视频| 秋霞午夜鲁丝一区二区老狼| 精品久久久久一区| 成人一区二区三区视频在线观看| 国产精品久久网站| 91黄色在线观看| 奇米综合一区二区三区精品视频| 欧美成人aa大片| 成人激情免费网站| 亚洲一级二级三级在线免费观看| 欧美日韩成人在线| 国产一区二区网址| 国产精品色一区二区三区| 日本精品裸体写真集在线观看| 夜夜操天天操亚洲| 日韩欧美一区中文| 成人高清视频在线| 亚洲成人免费电影| 精品国产第一区二区三区观看体验| 成人一区在线观看| 丝袜美腿亚洲一区| 欧美国产欧美综合| 欧美久久高跟鞋激| 国产精品一区在线观看乱码| 亚洲欧美aⅴ...| 日韩一级精品视频在线观看| 成人夜色视频网站在线观看| 亚洲v日本v欧美v久久精品| 久久精品一区四区| 欧美性猛交xxxxxxxx| 国模一区二区三区白浆| 亚洲男女毛片无遮挡| 精品少妇一区二区三区日产乱码 | 欧美日韩精品欧美日韩精品一 | 免费成人av资源网| 国产精品乱码妇女bbbb| 6080午夜不卡| 99久久亚洲一区二区三区青草| 三级成人在线视频| 亚洲日本va午夜在线影院| 欧美电视剧免费观看| 色综合视频一区二区三区高清| 久久99最新地址| 亚洲一区二区av在线| 国产精品另类一区| 精品国产亚洲在线| 欧美性淫爽ww久久久久无| 99久久99久久综合| 国产一区二区三区免费在线观看| 亚洲最色的网站|