/*****************************************************************************
* clone.c : Clone video plugin for vlc
*****************************************************************************
- * Copyright (C) 2002-2009 the VideoLAN team
+ * Copyright (C) 2002-2009 VLC authors and VideoLAN
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
- * 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.
*****************************************************************************/
/*****************************************************************************
#define VOUTLIST_LONGTEXT N_("You can use specific video output modules " \
"for the clones. Use a comma-separated list of modules." )
+#define CLONE_HELP N_("Duplicate your video to multiple windows " \
+ "and/or video output modules")
#define CFG_PREFIX "clone-"
static int Open ( vlc_object_t * );
set_description( N_("Clone video filter") )
set_capability( "video splitter", 0 )
set_shortname( N_("Clone" ))
+ set_help(CLONE_HELP)
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VFILTER )
- add_integer( CFG_PREFIX "count", 2, NULL, COUNT_TEXT, COUNT_LONGTEXT, false )
- add_string ( CFG_PREFIX "vout-list", NULL, NULL, VOUTLIST_TEXT, VOUTLIST_LONGTEXT, true )
+ add_integer( CFG_PREFIX "count", 2, COUNT_TEXT, COUNT_LONGTEXT, false )
+ add_module_list( CFG_PREFIX "vout-list", "vout display", NULL,
+ VOUTLIST_TEXT, VOUTLIST_LONGTEXT, true )
add_shortcut( "clone" )
set_callbacks( Open, Close )
"count", "vout-list", NULL
};
-#define VOUTSEPARATOR ','
+#define VOUTSEPARATOR ':'
static int Filter( video_splitter_t *, picture_t *pp_dst[], picture_t * );
{
video_splitter_output_t *p_cfg = &p_splitter->p_output[i];
video_format_Copy( &p_cfg->fmt, &p_splitter->fmt );
- p_cfg->window.i_x = -1;
- p_cfg->window.i_y = -1;
+ p_cfg->window.i_x = 0;
+ p_cfg->window.i_y = 0;
p_cfg->window.i_align = 0;
}
picture_t *pp_dst[], picture_t *p_src )
{
if( video_splitter_NewPicture( p_splitter, pp_dst ) )
+ {
+ picture_Release( p_src );
return VLC_EGENERIC;
+ }
for( int i = 0; i < p_splitter->i_output; i++ )
picture_Copy( pp_dst[i], p_src );
+
picture_Release( p_src );
return VLC_SUCCESS;
}