/*****************************************************************************
* opencv_wrapper.c : OpenCV wrapper video filter
*****************************************************************************
- * Copyright (C) 2006-2012 the VideoLAN team
+ * Copyright (C) 2006-2012 VLC authors and VideoLAN
* Copyright (C) 2012 Edward Wang
*
* Authors: Dugal Harris <dugalh@protoclea.co.za>
* Edward Wang <edward.c.wang@compdigitec.com>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
#include <vlc_vout.h>
#include <vlc_modules.h>
-#include <math.h>
-#include <time.h>
-
#include <vlc_filter.h>
#include <vlc_image.h>
-#include <vlc_input.h>
#include "filter_picture.h"
#include <cxcore.h>
add_string( "opencv-chroma", "input",
N_("OpenCV filter chroma"),
N_("Chroma to convert picture to before sending it to the internal OpenCV filter"), false);
- change_string_list( chroma_list, chroma_list_text, 0);
+ change_string_list( chroma_list, chroma_list_text )
add_string( "opencv-output", "input",
N_("Wrapper filter output"),
N_("Determines what (if any) video is displayed by the wrapper filter"), false);
- change_string_list( output_list, output_list_text, 0);
+ change_string_list( output_list, output_list_text )
add_string( "opencv-filter-name", "none",
N_("OpenCV internal filter name"),
N_("Name of internal OpenCV plugin filter to use"), false);
static int Create( vlc_object_t *p_this )
{
filter_t* p_filter = (filter_t*)p_this;
- char *psz_chroma, *psz_output, *psz_verbosity;
+ char *psz_chroma, *psz_output;
/* Allocate structure */
p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
// input video size
CvSize sz = cvSize(abs(p_in->format.i_width), abs(p_in->format.i_height));
video_format_t fmt_out;
- double duration;
filter_sys_t* p_sys = p_filter->p_sys;
memset( &fmt_out, 0, sizeof(video_format_t) );
VlcPictureToIplImage( p_filter, p_pic );
// Pass the image (as a pointer to the first IplImage*) to the
// internal OpenCV filter for processing.
- p_filter->p_sys->p_opencv->pf_video_filter( p_filter->p_sys->p_opencv, &(p_filter->p_sys->p_cv_image[0]) );
+ p_filter->p_sys->p_opencv->pf_video_filter( p_filter->p_sys->p_opencv, (picture_t*)&(p_filter->p_sys->p_cv_image[0]) );
if(p_filter->p_sys->i_wrapper_output == PROCESSED) {
// Processed video