]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/opencv_example.c
Visual: remove 5 translation text
[vlc] / modules / video_filter / opencv_example.c
index 906ed857f8f1f00195322ff806078ae6c1f057f3..b32cdcd2804a9dd7df13c4a1bb468eb5fa918b30 100644 (file)
@@ -34,7 +34,6 @@
 #include <vlc_plugin.h>
 #include <vlc_filter.h>
 #include <vlc_vout.h>
-#include "filter_common.h"
 #include <vlc_image.h>
 #include "filter_event_info.h"
 
@@ -73,7 +72,7 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_VIDEO_VFILTER2 )
     set_callbacks( OpenFilter, CloseFilter )
 
-    add_string( "opencv-haarcascade-file", "c:\\haarcascade_frontalface_alt.xml", NULL,
+    add_string( "opencv-haarcascade-file", "c:\\haarcascade_frontalface_alt.xml",
                           N_("Haar cascade filename"),
                           N_("Name of XML file containing Haar cascade description"), false);
 vlc_module_end ()
@@ -140,9 +139,6 @@ static void CloseFilter( vlc_object_t *p_this )
 
 /****************************************************************************
  * Filter: Check for faces and raises an event when one is found.
- ****************************************************************************
- * p_pic: A picture_t with its p_data_orig member set to an array of
- * IplImages (one image for each picture_t plane).
  ****************************************************************************/
 static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 {
@@ -157,13 +153,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         msg_Err( p_filter, "no image array" );
         return NULL;
     }
-    if (!(p_pic->p_data_orig))
-    {
-        msg_Err( p_filter, "no image array" );
-        return NULL;
-    }
     //(hack) cast the picture_t to array of IplImage*
-    p_img = (IplImage**) p_pic->p_data_orig;
+    p_img = (IplImage**) p_pic->p[0].p_pixels;
     i_planes = p_pic->i_planes;
 
     //check the image array for validity