/*****************************************************************************
* bda.c : BDA access module for vlc
*****************************************************************************
- * Copyright (C) 2007 the VideoLAN team
+ * Copyright (C) 2007-2009 the VideoLAN team
*
* Author: Ken Self <kenself(at)optusnet(dot)com(dot)au>
*
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU 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 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "bda.h"
+
#include <vlc_plugin.h>
+
/*****************************************************************************
* Access: local prototypes
*****************************************************************************/
add_integer( "dvb-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
CACHING_LONGTEXT, true )
+ change_safe()
add_integer( "dvb-frequency", 0, NULL, FREQ_TEXT, FREQ_LONGTEXT,
false )
+ change_safe()
# if defined(WIN32) || defined(WINCE)
add_string( "dvb-network-name", NULL, NULL, NAME_TEXT, NAME_LONGTEXT,
true )
/* dvb-device refers to a frontend within an adapter */
add_integer( "dvb-device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
true )
- add_bool( "dvb-probe", 1, NULL, PROBE_TEXT, PROBE_LONGTEXT, true )
- add_bool( "dvb-budget-mode", 0, NULL, BUDGET_TEXT, BUDGET_LONGTEXT,
+ add_bool( "dvb-probe", true, NULL, PROBE_TEXT, PROBE_LONGTEXT, true )
+ add_bool( "dvb-budget-mode", false, NULL, BUDGET_TEXT, BUDGET_LONGTEXT,
true )
# endif
true )
add_integer( "dvb-voltage", 13, NULL, VOLTAGE_TEXT, VOLTAGE_LONGTEXT,
true )
- add_bool( "dvb-high-voltage", 0, NULL, HIGH_VOLTAGE_TEXT,
+ add_bool( "dvb-high-voltage", false, NULL, HIGH_VOLTAGE_TEXT,
HIGH_VOLTAGE_LONGTEXT, true )
add_integer( "dvb-tone", -1, NULL, TONE_TEXT, TONE_LONGTEXT,
true )
add_integer( "dvb-bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT,
false )
change_integer_list( i_band_list, ppsz_band_text, NULL )
+ change_safe()
add_integer( "dvb-guard", -1, NULL, GUARD_TEXT, GUARD_LONGTEXT, true )
change_integer_list( i_guard_list, ppsz_guard_text, NULL )
add_integer( "dvb-transmission", -1, NULL, TRANSMISSION_TEXT,
for( int i = 0; i < i_param_count; i++ )
{
- snprintf( psz_full_name, 128, "%s-%s\0", psz_module,
+ snprintf( psz_full_name, 128, "%s-%s", psz_module,
psz_param[i] );
var_Create( p_access, psz_full_name, i_type[i] | VLC_VAR_DOINHERIT );
}
}
if( !i_ret )
+ {
+ free( p_access->psz_demux );
p_access->psz_demux = strdup( "ts" );
+ }
else
+ {
msg_Warn( p_access, "DVB_Open: Unsupported Network %s",
p_access->psz_access);
+ }
return i_ret;
}
v_value.psz_string = strdup( psz_value );
if( i_type[i_this_param] == VLC_VAR_INTEGER )
v_value.i_int = atol( psz_value );
- snprintf( psz_full_name, 128, "%s-%s\0", psz_module,
+ snprintf( psz_full_name, 128, "%s-%s", psz_module,
psz_param[i_this_param] );
var_Set( p_access, psz_full_name, v_value );
static int Control( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool, b_bool;
- int *pi_int, i_int;
+ int i_int;
int64_t *pi_64;
switch( i_query )
break;
case ACCESS_GET_PTS_DELAY: /* 5 */
pi_64 = (int64_t*)va_arg( args, int64_t * );
- *pi_64 = var_GetInteger( p_access, "dvb-caching" ) * 1000;
+ *pi_64 = (int64_t)var_GetInteger( p_access, "dvb-caching" ) * 1000;
break;
/* */
case ACCESS_GET_TITLE_INFO: /* 6 */
b_bool = (bool)va_arg( args, int );
break;
case ACCESS_SET_PRIVATE_ID_CA: /* 12 -From Demux */
- break;
+ return VLC_EGENERIC;
default:
msg_Warn( p_access,
"DVB_Control: Unimplemented query in control %d", i_query );