# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_vout.h>
#include <math.h>
* Module descriptor
*****************************************************************************/
-static char *chroma_list[] = { "input", "I420", "RGB32"};
-static char *chroma_list_text[] = { N_("Use input chroma unaltered"),
+static const char *const chroma_list[] = { "input", "I420", "RGB32"};
+static const char *const chroma_list_text[] = { N_("Use input chroma unaltered"),
N_("I420 - first plane is greyscale"), N_("RGB32")};
-static char *output_list[] = { "none", "input", "processed"};
-static char *output_list_text[] = { N_("Don't display any video"),
+static const char *const output_list[] = { "none", "input", "processed"};
+static const char *const output_list_text[] = { N_("Don't display any video"),
N_("Display the input video"), N_("Display the processed video")};
-static char *verbosity_list[] = { "error", "warning", "debug"};
-static char *verbosity_list_text[] = { N_("Show only errors"),
+static const char *const verbosity_list[] = { "error", "warning", "debug"};
+static const char *const verbosity_list_text[] = { N_("Show only errors"),
N_("Show errors and warnings"), N_("Show everything including debug messages")};
vlc_module_begin();
- set_description( _("OpenCV video filter wrapper") );
- set_shortname( _("OpenCV" ));
+ set_description( N_("OpenCV video filter wrapper") );
+ set_shortname( N_("OpenCV" ));
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VFILTER );
set_capability( "video filter", 0 );
/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
- {
- msg_Err( p_vout, "out of memory" );
return VLC_ENOMEM;
- }
/* Init structure */
p_vout->p_sys->p_image = image_HandlerCreate( p_vout );
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
- vout_Destroy( p_vout->p_sys->p_vout );
+ vlc_object_release( p_vout->p_sys->p_vout );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{ return; }
msleep( VOUT_OUTMEM_SLEEP );
}