/*****************************************************************************
* audiobargraph_a.c : audiobargraph audio plugin for vlc
*****************************************************************************
- * Copyright (C) 2002-2009 the VideoLAN team
+ * Copyright (C) 2002-2009 VLC authors and VideoLAN
* $Id$
*
* Authors: Clement CHESNIN <clement.chesnin@gmail.com>
* Philippe COENT <philippe.coent@tdf.fr>
*
- * 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 ADDRESS_TEXT N_("TCP address to use (default localhost)")
#define ADDRESS_LONGTEXT N_("TCP address to use to communicate with the video "\
- "part of the Bar Graph (default localhost)." \
+ "part of the Bar Graph (default localhost). " \
"In the case of bargraph incrustation, use localhost." )
#define PORT_TEXT N_("TCP port to use (default 12345)")
#define PORT_LONGTEXT N_("TCP port to use to communicate with the video "\
- "part of the Bar Graph (default 12345)." \
+ "part of the Bar Graph (default 12345). " \
"Use the same port as the one used in the rc interface." )
#define BARGRAPH_TEXT N_("Defines if BarGraph information should be sent (default 1)")
#define BARGRAPH_LONGTEXT N_("Defines if BarGraph information should be sent. "\
static int Open( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
- filter_sys_t *p_sys;
-
- if ( !AOUT_FMTS_SIMILAR( &p_filter->fmt_in.audio, &p_filter->fmt_out.audio ) )
- {
- msg_Err( p_filter, "input and output formats are not similar" );
- return VLC_EGENERIC;
- }
-
- if( p_filter->fmt_in.audio.i_format != VLC_CODEC_FL32 ||
- p_filter->fmt_out.audio.i_format != VLC_CODEC_FL32 )
- {
- p_filter->fmt_in.audio.i_format = VLC_CODEC_FL32;
- p_filter->fmt_out.audio.i_format = VLC_CODEC_FL32;
- msg_Warn( p_filter, "bad input or output format" );
- }
-
- p_filter->pf_audio_filter = DoWork;
-
- p_sys = p_filter->p_sys = malloc( sizeof( *p_sys ) );
+ filter_sys_t *p_sys = p_filter->p_sys = malloc( sizeof( *p_sys ) );
if( !p_sys )
return VLC_ENOMEM;
p_sys->started = 0;
p_sys->lastAlarm = 0;
+ p_filter->fmt_in.audio.i_format = VLC_CODEC_FL32;
+ p_filter->fmt_out.audio = p_filter->fmt_in.audio;
+ p_filter->pf_audio_filter = DoWork;
+
return VLC_SUCCESS;
}