# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_vout.h>
#include <vlc_filter.h>
+#include "filter_picture.h"
/*****************************************************************************
* Local protypes
set_callbacks( Create, Destroy );
vlc_module_end();
-static const char *ppsz_filter_options[] = {
+static const char *const ppsz_filter_options[] = {
"factor", 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_filter->pf_video_filter = Filter;
free( p_filter->p_sys );
}
-#define RELEASE( pic ) \
- if( pic ->pf_release ) \
- pic ->pf_release( pic );
-
-#define INITPIC( dst, src ) \
- dst ->date = src ->date; \
- dst ->b_force = src ->b_force; \
- dst ->i_nb_fields = src ->i_nb_fields; \
- dst ->b_progressive = src->b_progressive; \
- dst ->b_top_field_first = src ->b_top_field_first;
-
/*****************************************************************************
* Filter
*****************************************************************************/
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" );
- RELEASE( p_pic );
+ picture_Release( p_pic );
return NULL;
}
- INITPIC( p_outpic, p_pic );
if( !p_sys->pp_planes )
{
RenderBlur( p_sys, p_pic, p_outpic );
Copy( p_filter, p_outpic );
- RELEASE( p_pic );
- return p_outpic;
+ return CopyInfoAndRelease( p_outpic, p_pic );
}
/*****************************************************************************