* Preamble
*****************************************************************************/
-#include <math.h> /* sin(), cos() */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#include <math.h> /* sin(), cos() */
+
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_vout.h>
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-vlc_module_begin();
- set_description( N_("Rotate video filter") );
- set_shortname( N_( "Rotate" ));
- set_capability( "video filter2", 0 );
- set_category( CAT_VIDEO );
- set_subcategory( SUBCAT_VIDEO_VFILTER );
+vlc_module_begin ()
+ set_description( N_("Rotate video filter") )
+ set_shortname( N_( "Rotate" ))
+ set_capability( "video filter2", 0 )
+ set_category( CAT_VIDEO )
+ set_subcategory( SUBCAT_VIDEO_VFILTER )
add_integer_with_range( FILTER_PREFIX "angle", 30, 0, 359, NULL,
- ANGLE_TEXT, ANGLE_LONGTEXT, false );
+ ANGLE_TEXT, ANGLE_LONGTEXT, false )
- add_shortcut( "rotate" );
- set_callbacks( Create, Destroy );
-vlc_module_end();
+ add_shortcut( "rotate" )
+ set_callbacks( Create, Destroy )
+vlc_module_end ()
static const char *const ppsz_filter_options[] = {
"angle", NULL
/* 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_sys = p_filter->p_sys;
config_ChainParse( p_filter, FILTER_PREFIX, ppsz_filter_options,
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;
}
{
msg_Warn( p_filter, "Unsupported input chroma (%4s)",
(char*)&(p_pic->format.i_chroma) );
- if( p_pic->pf_release )
- p_pic->pf_release( p_pic );
+ picture_Release( 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;
}