X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fripple.c;h=a8ce70fcc42ec3522648c5bf69b69b6c4f8d6a9a;hb=fe5ba7a24296d5ad14852385ab91eb24b04737dc;hp=6963ba3da9faceb3d332107837f1da6a4a26ac5a;hpb=497087466251d63b5245082c5200f5df21a5af4f;p=vlc diff --git a/modules/video_filter/ripple.c b/modules/video_filter/ripple.c index 6963ba3da9..a8ce70fcc4 100644 --- a/modules/video_filter/ripple.c +++ b/modules/video_filter/ripple.c @@ -26,16 +26,16 @@ * Preamble *****************************************************************************/ -#include /* sin(), cos() */ - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include /* sin(), cos() */ + #include #include -#include #include +#include "filter_picture.h" /***************************************************************************** * Local prototypes @@ -48,19 +48,19 @@ static picture_t *Filter( filter_t *, picture_t * ); /***************************************************************************** * Module descriptor *****************************************************************************/ -vlc_module_begin(); - set_description( N_("Ripple video filter") ); - set_shortname( N_( "Ripple" )); - set_capability( "video filter2", 0 ); - set_category( CAT_VIDEO ); - set_subcategory( SUBCAT_VIDEO_VFILTER ); +vlc_module_begin () + set_description( N_("Ripple video filter") ) + set_shortname( N_( "Ripple" )) + set_capability( "video filter2", 0 ) + set_category( CAT_VIDEO ) + set_subcategory( SUBCAT_VIDEO_VFILTER ) - add_shortcut( "ripple" ); - set_callbacks( Create, Destroy ); -vlc_module_end(); + add_shortcut( "ripple" ) + set_callbacks( Create, Destroy ) +vlc_module_end () /***************************************************************************** - * vout_sys_t: Distort video output method descriptor + * filter_sys_t: Distort video output method descriptor ***************************************************************************** * This structure is part of the video output thread descriptor. * It describes the Distort specific properties of an output thread. @@ -83,10 +83,7 @@ static int Create( vlc_object_t *p_this ) /* Allocate structure */ p_filter->p_sys = malloc( sizeof( filter_sys_t ) ); if( p_filter->p_sys == NULL ) - { - msg_Err( p_filter, "out of memory" ); return VLC_ENOMEM; - } p_filter->pf_video_filter = Filter; @@ -123,12 +120,10 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) if( !p_pic ) return NULL; - p_outpic = p_filter->pf_vout_buffer_new( p_filter ); + p_outpic = filter_NewPicture( p_filter ); if( !p_outpic ) { - msg_Warn( p_filter, "can't get output picture" ); - if( p_pic->pf_release ) - p_pic->pf_release( p_pic ); + picture_Release( p_pic ); return NULL; } @@ -203,14 +198,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) } } - p_outpic->date = p_pic->date; - p_outpic->b_force = p_pic->b_force; - p_outpic->i_nb_fields = p_pic->i_nb_fields; - p_outpic->b_progressive = p_pic->b_progressive; - p_outpic->b_top_field_first = p_pic->b_top_field_first; - - if( p_pic->pf_release ) - p_pic->pf_release( p_pic ); - - return p_outpic; + return CopyInfoAndRelease( p_outpic, p_pic ); }