]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/opencv_example.cpp
jvlc: code formatted
[vlc] / modules / video_filter / opencv_example.cpp
index 8a5b1705a51f7bb1c8e1acbbd576fd1ea15b7d87..d4ba06c3490e666353d0c3b017fe990a339f282a 100644 (file)
@@ -34,8 +34,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
-#include <vlc_decoder.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_filter.h>
 #include "filter_common.h"
 #include <vlc_image.h>
@@ -64,8 +64,8 @@ static picture_t *Filter( filter_t *, picture_t * );
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("OpenCV face detection example filter") );
-    set_shortname( _( "OpenCV example" ));
+    set_description( N_("OpenCV face detection example filter") );
+    set_shortname( N_( "OpenCV example" ));
     set_capability( "opencv example", 1 );
     add_shortcut( "opencv_example" );
 
@@ -75,7 +75,7 @@ vlc_module_begin();
 
     add_string( "opencv-haarcascade-file", "c:\\haarcascade_frontalface_alt.xml", NULL,
                           N_("Haar cascade filename"),
-                          N_("Name of XML file containing Haar cascade description"), VLC_FALSE);
+                          N_("Name of XML file containing Haar cascade description"), false);
 vlc_module_end();
 
 /*****************************************************************************
@@ -90,8 +90,7 @@ static int OpenFilter( vlc_object_t *p_this )
     if( ( p_filter->p_sys = p_sys =
           (filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
     {
-        msg_Err( p_filter, "out of memory" );
-        return VLC_EGENERIC;
+        return VLC_ENOMEM;
     }
 
     //init the video_filter_event_info_t struct
@@ -206,7 +205,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
             if( NULL == ( p_filter->p_sys->event_info.p_region =
                   (video_filter_region_info_t *)malloc(faces->total*sizeof(video_filter_region_info_t))))
             {
-                msg_Err( p_filter, "out of memory" );
                 return NULL;
             }
             memset(p_filter->p_sys->event_info.p_region, 0, faces->total*sizeof(video_filter_region_info_t));