From: Antoine Cellerier Date: Tue, 1 Mar 2005 15:33:51 +0000 (+0000) Subject: * add svn Id support and some copyright info in picture.h X-Git-Tag: 0.8.2~1030 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3c53e7b2030b2acbc072426d0ee7ab7b17822f0e;p=vlc * add svn Id support and some copyright info in picture.h --- diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c index 502d21d30f..004f5d1095 100644 --- a/modules/video_filter/mosaic.c +++ b/modules/video_filter/mosaic.c @@ -2,7 +2,7 @@ * mosaic.c : Mosaic video plugin for vlc ***************************************************************************** * Copyright (C) 2004-2005 VideoLAN -* $Id: $ +* $Id$ * * Authors: Antoine Cellerier * @@ -239,6 +239,8 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) return NULL; } + p_picture_vout = val.p_address; + /* Allocate the subpicture internal data. */ p_spu = p_filter->pf_sub_buffer_new( p_filter ); if( !p_spu ) @@ -246,7 +248,12 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) return NULL; } - p_picture_vout = val.p_address; + /* Initialize subpicture */ + p_spu->i_channel = 0; + p_spu->i_start = date; + p_spu->i_stop = 0; + p_spu->b_ephemer = VLC_TRUE; + p_spu->i_alpha = p_sys->i_alpha; vlc_mutex_lock( &p_picture_vout->lock ); @@ -327,6 +334,8 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) p_picture_vout->p_pic[i_index].p_picture, &fmt_in, &fmt_middle ); if( !p_middle ) { + msg_Err( p_filter, "image resizing failed" ); + p_filter->pf_sub_buffer_del( p_filter, p_spu ); vlc_mutex_unlock( &p_picture_vout->lock ); return NULL; } @@ -335,6 +344,8 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) p_middle, &fmt_middle, &fmt_out ); if( !p_converted ) { + msg_Err( p_filter, "image chroma convertion failed" ); + p_filter->pf_sub_buffer_del( p_filter, p_spu ); vlc_mutex_unlock( &p_picture_vout->lock ); return NULL; } @@ -376,6 +387,19 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) * ( p_sys->i_height / p_sys->i_rows + p_sys->i_hborder ); } + + if( 1 ) + { + uint8_t *p_a = p_region->picture.A_PIXELS; + int i_pitch = p_region->picture.Y_PITCH; + int x,y; + + for( x = 0, y=0; x+y < 20; x++, y++){ + p_a[ x + i_pitch * y ] = 0xff; + } + + } + if( p_region_prev == NULL ){ p_spu->p_region = p_region; } else { @@ -392,13 +416,6 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) vlc_mutex_unlock( &p_picture_vout->lock ); - /* Initialize subpicture */ - p_spu->i_channel = 0; - p_spu->i_start = date; - p_spu->i_stop = 0; - p_spu->b_ephemer = VLC_TRUE; - p_spu->i_alpha = p_sys->i_alpha; - return p_spu; } @@ -406,7 +423,6 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) * Callback to update params on the fly *****************************************************************************/ - static int MosaicCallback( vlc_object_t *p_this, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data ) diff --git a/modules/video_output/picture.h b/modules/video_output/picture.h index 712553e353..f8e8abc5f9 100644 --- a/modules/video_output/picture.h +++ b/modules/video_output/picture.h @@ -1,3 +1,26 @@ +/***************************************************************************** + * picture.h: + ***************************************************************************** + * Copyright (C) 2004-2005 VideoLAN + * $Id$ + * + * Authors: Antoine Cellerier + * + * 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. + *****************************************************************************/ + #ifndef _PICTURE_VOUT_H #define _PICTURE_VOUT_H 1