* Authors: Cedric Cocquebert <cedric.cocquebert@supelec.fr>
* based on 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., 59 Temple Place - Suite 330, Boston, MA 02111, 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.
*****************************************************************************/
/*****************************************************************************
#ifdef OVERLAP
/* OS CODE DEPENDENT to get display dimensions */
-# ifdef WIN32
+# ifdef _WIN32
# include <windows.h>
# else
# include <xcb/xcb.h>
# endif
#endif
+#define ROW_MAX (15)
+#define COL_MAX (15)
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
"which to split the video")
#define ACTIVE_TEXT N_("Active windows")
-#define ACTIVE_LONGTEXT N_("Comma separated list of active windows, " \
+#define ACTIVE_LONGTEXT N_("Comma-separated list of active windows, " \
"defaults to all")
#define CFG_PREFIX "panoramix-"
set_subcategory( SUBCAT_VIDEO_VFILTER )
add_integer( CFG_PREFIX "cols", -1, COLS_TEXT, COLS_LONGTEXT, true )
+ change_integer_range( -1, COL_MAX )
add_integer( CFG_PREFIX "rows", -1, ROWS_TEXT, ROWS_LONGTEXT, true )
+ change_integer_range( -1, ROW_MAX )
#ifdef OVERLAP
#define LENGTH_TEXT N_("length of the overlapping area (in %)")
add_bool( CFG_PREFIX "attenuate", true, ATTENUATION_TEXT, ATTENUATION_LONGTEXT, false )
#define BEGIN_TEXT N_("Attenuation, begin (in %)")
-#define BEGIN_LONGTEXT N_("Select in percent the Lagrange coeff of the beginning blended zone")
+#define BEGIN_LONGTEXT N_("Select in percent the Lagrange coefficient of the beginning blended zone")
add_integer_with_range( CFG_PREFIX "bz-begin", 0, 0, 100, BEGIN_TEXT, BEGIN_LONGTEXT, true )
#define MIDDLE_TEXT N_("Attenuation, middle (in %)")
-#define MIDDLE_LONGTEXT N_("Select in percent the Lagrange coeff of the middle of blended zone")
+#define MIDDLE_LONGTEXT N_("Select in percent the Lagrange coefficient of the middle of blended zone")
add_integer_with_range( CFG_PREFIX "bz-middle", 50, 0, 100, MIDDLE_TEXT, MIDDLE_LONGTEXT, false )
#define END_TEXT N_("Attenuation, end (in %)")
-#define END_LONGTEXT N_("Select in percent the Lagrange coeff of the end of blended zone")
+#define END_LONGTEXT N_("Select in percent the Lagrange coefficient of the end of blended zone")
add_integer_with_range( CFG_PREFIX "bz-end", 100, 0, 100, END_TEXT, END_LONGTEXT, true )
#define MIDDLE_POS_TEXT N_("middle position (in %)")
add_integer_with_range( CFG_PREFIX "bz-whitelevel-red", 0, 0, 255, RGAMMA_WL_TEXT, RGAMMA_WL_LONGTEXT, true )
add_integer_with_range( CFG_PREFIX "bz-whitelevel-green", 0, 0, 255, GGAMMA_WL_TEXT, GGAMMA_WL_LONGTEXT, true )
add_integer_with_range( CFG_PREFIX "bz-whitelevel-blue", 0, 0, 255, BGAMMA_WL_TEXT, BGAMMA_WL_LONGTEXT, true )
-#ifndef WIN32
+#ifndef _WIN32
add_obsolete_bool( CFG_PREFIX "xinerama" );
#endif
add_obsolete_bool( CFG_PREFIX "offset-x" )
NULL
};
-#define ROW_MAX (15)
-#define COL_MAX (15)
-
#define ACCURACY 1000
/* */
{ 0, {0, }, { 0, }, { 0, 0, 0 }, false }
};
-#ifndef WIN32
+#ifndef _WIN32
/* Get the number of outputs */
static unsigned CountMonitors( vlc_object_t *obj )
{
/* Autodetect number of displays */
if( p_sys->i_col < 0 || p_sys->i_row < 0 )
{
-#ifdef WIN32
+#ifdef _WIN32
const int i_monitor_count = GetSystemMetrics(SM_CMONITORS);
if( i_monitor_count > 1 )
{
p_sys->a_0 = p_sys->bz_begin;
/* */
- p_sys->i_col = __MAX( 1, __MIN( COL_MAX, p_sys->i_col ) );
- p_sys->i_row = __MAX( 1, __MIN( ROW_MAX, p_sys->i_row ) );
+ p_sys->i_col = VLC_CLIP( COL_MAX, 1, p_sys->i_col );
+ p_sys->i_row = VLC_CLIP( ROW_MAX, 1, p_sys->i_row );
msg_Dbg( p_splitter, "opening a %i x %i wall",
p_sys->i_col, p_sys->i_row );
p_gamma[1] = p_gamma[2];
p_gamma[2] = t;
}
-
+
for( int i_index = 0; i_index < 256; i_index++ )
{
for( int i_index2 = 0; i_index2 <= ACCURACY; i_index2++ )
{
for( int x = 0; x < p_sys->i_col; x++ )
{
- const panoramix_output_t *p_output = p_output = &p_sys->pp_output[x][y];
+ const panoramix_output_t *p_output = &p_sys->pp_output[x][y];
if( p_output->b_active && p_output->i_output == i_index )
{
const int i_x = p_new->i_x - p_output->filter.black.i_left;
/* Top black border */
for( int b = 0; b < p_cfg->black.i_top; b++ )
{
- vlc_memset( p_out, i_pixel_black, i_out_width );
+ memset( p_out, i_pixel_black, i_out_width );
p_out += i_out_pitch;
}
/* Unmodified video */
const int i_unmodified_width = i_copy_pitch - p_cfg->attenuate.i_left - p_cfg->attenuate.i_right;
- vlc_memcpy( p_dst, p_src, i_unmodified_width );
+ memcpy( p_dst, p_src, i_unmodified_width );
p_dst += i_unmodified_width;
p_src += i_unmodified_width;
/* Bottom black border */
for( int b = 0; b < p_cfg->black.i_bottom; b++ )
{
- vlc_memset( p_out, i_pixel_black, i_out_width );
+ memset( p_out, i_pixel_black, i_out_width );
p_out += i_out_pitch;
}
}