This improves readability a lot and prevent us from reinventing the wheel.
/* Messages */
msg_bank_t msg_bank; ///< The message bank
int i_verbose; ///< info messages
- vlc_bool_t b_color; ///< color messages?
+ bool b_color; ///< color messages?
module_t * p_memcpy_module; ///< Fast memcpy plugin used
void* ( *pf_memcpy ) ( void *, const void *, size_t ); ///< fast memcpy
void* ( *pf_memset ) ( void *, int, size_t ); ///< fast memset
- vlc_bool_t b_stats; ///< Should we collect stats ?
+ bool b_stats; ///< Should we collect stats ?
vlc_mutex_t timer_lock; ///< Lock to protect timers
int i_timers; ///< Number of timers
counter_t **pp_timers; ///< Array of all timers
typedef union
{
int i_int;
- vlc_bool_t b_bool;
+ bool b_bool;
float f_float;
char * psz_string;
void * p_address;
#define VLC_EEXITSUCCESS -999 /* Program exited successfully */
#define VLC_EGENERIC -666 /* Generic error */
-/*****************************************************************************
- * Booleans
- *****************************************************************************/
-#define VLC_FALSE false
-#define VLC_TRUE true
-
-/**
- * \defgroup var_type Variable types
- * These are the different types a vlc variable can have.
- * @{
- */
-#define VLC_VAR_VOID 0x0010
-#define VLC_VAR_BOOL 0x0020
-#define VLC_VAR_INTEGER 0x0030
-#define VLC_VAR_HOTKEY 0x0031
-#define VLC_VAR_STRING 0x0040
-#define VLC_VAR_MODULE 0x0041
-#define VLC_VAR_FILE 0x0042
-#define VLC_VAR_DIRECTORY 0x0043
-#define VLC_VAR_VARIABLE 0x0044
-#define VLC_VAR_FLOAT 0x0050
-#define VLC_VAR_TIME 0x0060
-#define VLC_VAR_ADDRESS 0x0070
-#define VLC_VAR_MUTEX 0x0080
-#define VLC_VAR_LIST 0x0090
-/**@}*/
#if !defined( __LIBVLC__ )
* \param b_play start playing when the interface is done loading
* \return VLC_SUCCESS on success
*/
-VLC_DEPRECATED_API int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t );
+VLC_DEPRECATED_API int VLC_AddIntf( int, char const *, bool, bool );
/**
* Ask vlc to die
*
- * This function sets p_libvlc->b_die to VLC_TRUE, but does not do any other
+ * This function sets p_libvlc->b_die to true, but does not do any other
* task. It is your duty to call VLC_CleanUp and VLC_Destroy afterwards.
*
* \param i_object a vlc object id
* Tell if VLC is playing
*
* If an item is currently playing, it returns
- * VLC_TRUE, else VLC_FALSE
+ * true, else false
*
* \param i_object a vlc object id
- * \return VLC_TRUE or VLC_FALSE
+ * \return true or false
*/
-VLC_DEPRECATED_API vlc_bool_t VLC_IsPlaying( int );
+VLC_DEPRECATED_API bool VLC_IsPlaying( int );
/**
* Get the current position in a input
* \param b_relative seek relative from current position
* \return VLC_SUCCESS on success
*/
-VLC_DEPRECATED_API int VLC_TimeSet( int, int, vlc_bool_t );
+VLC_DEPRECATED_API int VLC_TimeSet( int, int, bool );
/**
* Get the total length of a input
* Set mute status.
*
* \param p_instance libvlc instance
- * \param status If status is VLC_TRUE then mute, otherwise unmute
+ * \param status If status is true then mute, otherwise unmute
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
* \param visual_id the Xid or HWND, depending on the platform
* \param exception an initialized exception pointer
*/
-VLC_PUBLIC_API vlc_bool_t mediacontrol_set_visual( mediacontrol_Instance *self,
+VLC_PUBLIC_API bool mediacontrol_set_visual( mediacontrol_Instance *self,
WINDOWHANDLE visual_id,
mediacontrol_Exception *exception );
enum access_query_e
{
/* capabilities */
- ACCESS_CAN_SEEK, /* arg1= vlc_bool_t* cannot fail */
- ACCESS_CAN_FASTSEEK, /* arg1= vlc_bool_t* cannot fail */
- ACCESS_CAN_PAUSE, /* arg1= vlc_bool_t* cannot fail */
- ACCESS_CAN_CONTROL_PACE,/* arg1= vlc_bool_t* cannot fail */
+ ACCESS_CAN_SEEK, /* arg1= bool* cannot fail */
+ ACCESS_CAN_FASTSEEK, /* arg1= bool* cannot fail */
+ ACCESS_CAN_PAUSE, /* arg1= bool* cannot fail */
+ ACCESS_CAN_CONTROL_PACE,/* arg1= bool* cannot fail */
/* */
ACCESS_GET_MTU, /* arg1= int* cannot fail(0 if no sense)*/
ACCESS_GET_META, /* arg1= vlc_meta_t ** res=can fail */
/* */
- ACCESS_SET_PAUSE_STATE, /* arg1= vlc_bool_t can fail */
+ ACCESS_SET_PAUSE_STATE, /* arg1= bool can fail */
/* */
ACCESS_SET_TITLE, /* arg1= int can fail */
/* Special mode for access/demux communication
* XXX: avoid to use it unless you can't */
- ACCESS_SET_PRIVATE_ID_STATE, /* arg1= int i_private_data, vlc_bool_t b_selected can fail */
+ ACCESS_SET_PRIVATE_ID_STATE, /* arg1= int i_private_data, bool b_selected can fail */
ACCESS_SET_PRIVATE_ID_CA, /* arg1= int i_program_number, uint16_t i_vpid, uint16_t i_apid1, uint16_t i_apid2, uint16_t i_apid3, uint8_t i_length, uint8_t *p_data */
- ACCESS_GET_PRIVATE_ID_STATE, /* arg1=int i_private_data arg2=vlc_bool_t * res=can fail */
+ ACCESS_GET_PRIVATE_ID_STATE, /* arg1=int i_private_data arg2=bool * res=can fail */
ACCESS_GET_CONTENT_TYPE, /* arg1=char **ppsz_content_type */
};
int64_t i_size; /* Write only for access, read only for input */
int64_t i_pos; /* idem */
- vlc_bool_t b_eof; /* idem */
+ bool b_eof; /* idem */
int i_title; /* idem, start from 0 (could be menu) */
int i_seekpoint;/* idem, start from 0 */
- vlc_bool_t b_prebuffered; /* Read only for input */
+ bool b_prebuffered; /* Read only for input */
} info;
access_sys_t *p_sys;
};
p_a->info.i_update = 0;
p_a->info.i_size = 0;
p_a->info.i_pos = 0;
- p_a->info.b_eof = VLC_FALSE;
+ p_a->info.b_eof = false;
p_a->info.i_title = 0;
p_a->info.i_seekpoint = 0;
}
#define ACL_Duplicate(a,b) __ACL_Duplicate(VLC_OBJECT(a),b)
VLC_EXPORT( int, ACL_Check, ( vlc_acl_t *p_acl, const char *psz_ip ) );
-VLC_EXPORT( vlc_acl_t *, __ACL_Create, ( vlc_object_t *p_this, vlc_bool_t b_allow ) );
+VLC_EXPORT( vlc_acl_t *, __ACL_Create, ( vlc_object_t *p_this, bool b_allow ) );
VLC_EXPORT( vlc_acl_t *, __ACL_Duplicate, ( vlc_object_t *p_this, const vlc_acl_t *p_acl ) );
VLC_EXPORT( void, ACL_Destroy, ( vlc_acl_t *p_acl ) );
#define ACL_AddHost(a,b,c) ACL_AddNet(a,b,-1,c)
-VLC_EXPORT( int, ACL_AddNet, ( vlc_acl_t *p_acl, const char *psz_ip, int i_len, vlc_bool_t b_allow ) );
+VLC_EXPORT( int, ACL_AddNet, ( vlc_acl_t *p_acl, const char *psz_ip, int i_len, bool b_allow ) );
VLC_EXPORT( int, ACL_LoadFile, ( vlc_acl_t *p_acl, const char *path ) );
#endif
size_t i_size, i_nb_bytes;
unsigned int i_nb_samples;
mtime_t start_date, end_date;
- vlc_bool_t b_discontinuity; /* Set on discontinuity (for non pcm stream) */
+ bool b_discontinuity; /* Set on discontinuity (for non pcm stream) */
struct aout_buffer_t * p_next;
struct aout_buffer_t * );
/** If b_error == 1, there is no mixer. */
- vlc_bool_t b_error;
+ bool b_error;
/** Multiplier used to raise or lower the volume of the sound in
* software. Beware, this creates sound distortion and should be avoided
* as much as possible. This isn't available for non-float32 mixer. */
struct aout_filter_t *,
struct aout_buffer_t *,
struct aout_buffer_t * );
- vlc_bool_t b_in_place;
- vlc_bool_t b_continuity;
+ bool b_in_place;
+ bool b_continuity;
};
#define AOUT_RESAMPLING_NONE 0
float f_multiplier;
/* If b_restart == 1, the input pipeline will be re-created. */
- vlc_bool_t b_restart;
+ bool b_restart;
/* If b_error == 1, there is no input pipeline. */
- vlc_bool_t b_error;
+ bool b_error;
/* Did we just change the output format? (expect buffer inconsistencies) */
- vlc_bool_t b_changed;
+ bool b_changed;
/* last rate from input */
int i_last_input_rate;
audio_sample_format_t output;
/* Indicates whether the audio output is currently starving, to avoid
* printing a 1,000 "output is starving" messages. */
- vlc_bool_t b_starving;
+ bool b_starving;
/* post-filters */
aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
audio_volume_t i_volume;
/* If b_error == 1, there is no audio output pipeline. */
- vlc_bool_t b_error;
+ bool b_error;
} aout_output_t;
/** audio output thread descriptor */
VLC_EXPORT( mtime_t, aout_DateGet, ( const audio_date_t * ) );
VLC_EXPORT( mtime_t, aout_DateIncrement, ( audio_date_t *, uint32_t ) );
-VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) );
+VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, bool ) );
VLC_EXPORT( int, aout_CheckChannelReorder, ( const uint32_t *, const uint32_t *, uint32_t, int, int * ) );
VLC_EXPORT( void, aout_ChannelReorder, ( uint8_t *, int, int, const int *, int ) );
VLC_EXPORT( int, aout_FindAndRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
VLC_EXPORT( int, aout_ChannelsRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
-VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, vlc_bool_t ));
+VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, bool ));
#define aout_VisualNext(a) aout_VisualChange( VLC_OBJECT(a),1 )
#define aout_VisualPrev(a) aout_VisualChange( VLC_OBJECT(a),-1 )
static inline void
__vlc_dictionary_insert( vlc_dictionary_t * p_dict, const char * psz_key,
- void * p_value, vlc_bool_t rebuild )
+ void * p_value, bool rebuild )
{
if( !p_dict->p_entries )
vlc_dictionary_init( p_dict, 1 );
#endif
VLC_INTERNAL( char *, vlc_fix_readdir, ( const char * ) );
-VLC_INTERNAL( vlc_bool_t, vlc_current_charset, ( char ** ) );
+VLC_INTERNAL( bool, vlc_current_charset, ( char ** ) );
VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) );
es_format_t fmt_out;
/* Some decoders only accept packetized data (ie. not truncated) */
- vlc_bool_t b_need_packetized;
+ bool b_need_packetized;
/* Tell the decoder if it is allowed to drop frames */
- vlc_bool_t b_pace_control;
+ bool b_pace_control;
/* */
picture_t * ( * pf_decode_video )( decoder_t *, block_t ** );
* last pf_packetize/pf_decode_video call only,
* pb_present will be used to known which cc channel are present (but
* globaly, not necessary for the current packet */
- block_t * ( * pf_get_cc ) ( decoder_t *, vlc_bool_t pb_present[4] );
+ block_t * ( * pf_get_cc ) ( decoder_t *, bool pb_present[4] );
/*
* Buffers allocation
VLC_EXPORT( decoder_synchro_t *, decoder_SynchroInit, ( decoder_t *, int ) );
VLC_EXPORT( void, decoder_SynchroRelease, ( decoder_synchro_t * ) );
VLC_EXPORT( void, decoder_SynchroReset, ( decoder_synchro_t * ) );
-VLC_EXPORT( vlc_bool_t, decoder_SynchroChoose, ( decoder_synchro_t *, int, int, vlc_bool_t ) );
+VLC_EXPORT( bool, decoder_SynchroChoose, ( decoder_synchro_t *, int, int, bool ) );
VLC_EXPORT( void, decoder_SynchroTrash, ( decoder_synchro_t * ) );
VLC_EXPORT( void, decoder_SynchroDecode, ( decoder_synchro_t * ) );
-VLC_EXPORT( void, decoder_SynchroEnd, ( decoder_synchro_t *, int, vlc_bool_t ) );
+VLC_EXPORT( void, decoder_SynchroEnd, ( decoder_synchro_t *, int, bool ) );
VLC_EXPORT( mtime_t, decoder_SynchroDate, ( decoder_synchro_t * ) );
-VLC_EXPORT( void, decoder_SynchroNewPicture, ( decoder_synchro_t *, int, int, mtime_t, mtime_t, int, vlc_bool_t ) );
+VLC_EXPORT( void, decoder_SynchroNewPicture, ( decoder_synchro_t *, int, int, mtime_t, mtime_t, int, bool ) );
unsigned int i_scale_h;
unsigned int i_scale_v;
unsigned int i_alpha;
- vlc_bool_t b_smooth;
+ bool b_smooth;
mtime_t i_fade_in;
mtime_t i_fade_out;
unsigned int i_align;
mtime_t i_time_offset;
- vlc_bool_t b_forced_subs;
+ bool b_forced_subs;
unsigned int palette[16];
unsigned int colors[4];
vlc_cond_t object_wait; \
\
/* Object properties */ \
- volatile vlc_bool_t b_error; /**< set by the object */ \
- volatile vlc_bool_t b_die; /**< set by the outside */ \
- volatile vlc_bool_t b_dead; /**< set by the object */ \
- vlc_bool_t b_force; /**< set by the outside (eg. module_Need()) */ \
+ volatile bool b_error; /**< set by the object */ \
+ volatile bool b_die; /**< set by the outside */ \
+ volatile bool b_dead; /**< set by the object */ \
+ bool b_force; /**< set by the outside (eg. module_Need()) */ \
\
/* Stuff related to the libvlc structure */ \
libvlc_int_t *p_libvlc; /**< (root of all evil) - 1 */ \
# include <tchar.h>
#endif
-VLC_EXPORT( vlc_bool_t, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) );
+VLC_EXPORT( bool, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) );
VLC_EXPORT( char **, vlc_parse_cmdline, ( const char *, int * ) );
/* vlc_wraptext (defined in src/extras/libc.c) */
/* Misc */
vlc_mutex_t *p_lock; /* Lock to use when modifying the config */
- vlc_bool_t b_dirty; /* Dirty flag to indicate a config change */
- vlc_bool_t b_advanced; /* Flag to indicate an advanced option */
- vlc_bool_t b_internal; /* Flag to indicate option is not to be shown */
- vlc_bool_t b_restart; /* Flag to indicate the option needs a restart */
+ bool b_dirty; /* Dirty flag to indicate a config change */
+ bool b_advanced; /* Flag to indicate an advanced option */
+ bool b_internal; /* Flag to indicate option is not to be shown */
+ bool b_restart; /* Flag to indicate the option needs a restart */
/* to take effect */
/* Deprecated */
char *psz_oldname; /* Old option name */
- vlc_bool_t b_removed;
+ bool b_removed;
/* Option values loaded from config file */
- vlc_bool_t b_autosave; /* Config will be auto-saved at exit time */
- vlc_bool_t b_unsaveable; /* Config should not be saved */
+ bool b_autosave; /* Config will be auto-saved at exit time */
+ bool b_unsaveable; /* Config should not be saved */
- vlc_bool_t b_safe;
+ bool b_safe;
};
/*****************************************************************************
VLC_EXPORT( void, __config_AddIntf, ( vlc_object_t *, const char * ) );
VLC_EXPORT( void, __config_RemoveIntf, ( vlc_object_t *, const char * ) );
-VLC_EXPORT( vlc_bool_t, __config_ExistIntf, ( vlc_object_t *, const char * ) );
+VLC_EXPORT( bool, __config_ExistIntf, ( vlc_object_t *, const char * ) );
#define config_GetType(a,b) __config_GetType(VLC_OBJECT(a),b)
#define config_GetInt(a,b) __config_GetInt(VLC_OBJECT(a),b)
#define add_bool( name, v, p_callback, text, longtext, advc ) \
add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc, p_callback ); \
- if (v) vlc_config_set (p_config, VLC_CONFIG_VALUE, (int)VLC_TRUE)
+ if (v) vlc_config_set (p_config, VLC_CONFIG_VALUE, (int)true)
/* For removed option */
#define add_obsolete_inner( name, type ) \
/* Meta data */
DEMUX_GET_META, /* arg1= vlc_meta_t ** res=can fail */
- DEMUX_HAS_UNSUPPORTED_META, /* arg1= vlc_bool_t * res can fail */
+ DEMUX_HAS_UNSUPPORTED_META, /* arg1= bool * res can fail */
/* Attachments */
DEMUX_GET_ATTACHMENTS, /* arg1=input_attachment_t***, int* res=can fail */
/* II. Specific access_demux queries */
- DEMUX_CAN_PAUSE, /* arg1= vlc_bool_t* can fail (assume false)*/
- DEMUX_SET_PAUSE_STATE, /* arg1= vlc_bool_t can fail */
+ DEMUX_CAN_PAUSE, /* arg1= bool* can fail (assume false)*/
+ DEMUX_SET_PAUSE_STATE, /* arg1= bool can fail */
DEMUX_GET_PTS_DELAY, /* arg1= int64_t* cannot fail */
/* DEMUX_CAN_CONTROL_PACE returns true (*pb_pace) if we can read the
* data at our pace */
- DEMUX_CAN_CONTROL_PACE, /* arg1= vlc_bool_t*pb_pace can fail (assume false) */
+ DEMUX_CAN_CONTROL_PACE, /* arg1= bool*pb_pace can fail (assume false) */
/* DEMUX_CAN_CONTROL_RATE is called only if DEMUX_CAN_CONTROL_PACE has returned false.
* *pb_rate should be true when the rate can be changed (using DEMUX_SET_RATE)
* *pb_ts_rescale should be true when the timestamps (pts/dts/pcr) have to be rescaled */
- DEMUX_CAN_CONTROL_RATE, /* arg1= vlc_bool_t*pb_rate arg2= vlc_bool_t*pb_ts_rescale can fail(assume false) */
+ DEMUX_CAN_CONTROL_RATE, /* arg1= bool*pb_rate arg2= bool*pb_ts_rescale can fail(assume false) */
/* DEMUX_SET_RATE is called only if DEMUX_CAN_CONTROL_RATE has returned true.
* It should return the value really used in *pi_rate */
DEMUX_SET_RATE, /* arg1= int*pi_rate can fail */
- DEMUX_CAN_SEEK, /* arg1= vlc_bool_t* can fail (assume false)*/
+ DEMUX_CAN_SEEK, /* arg1= bool* can fail (assume false)*/
};
VLC_EXPORT( int, demux2_vaControlHelper, ( stream_t *, int64_t i_start, int64_t i_end, int i_bitrate, int i_align, int i_query, va_list args ) );
* Miscellaneous helpers for demuxers
*************************************************************************/
-static inline vlc_bool_t demux2_IsPathExtension( demux_t *p_demux, const char *psz_extension )
+static inline bool demux2_IsPathExtension( demux_t *p_demux, const char *psz_extension )
{
const char *psz_ext = strrchr ( p_demux->psz_path, '.' );
if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
- return VLC_FALSE;
- return VLC_TRUE;
+ return false;
+ return true;
}
-static inline vlc_bool_t demux2_IsForced( demux_t *p_demux, const char *psz_name )
+static inline bool demux2_IsForced( demux_t *p_demux, const char *psz_name )
{
if( !p_demux->psz_demux || strcmp( p_demux->psz_demux, psz_name ) )
- return VLC_FALSE;
- return VLC_TRUE;
+ return false;
+ return true;
}
#define DEMUX_INIT_COMMON() do { \
{
int i_capabilities;
int i_media_type;
- vlc_bool_t b_seen;
+ bool b_seen;
char *psz_uri;
char *psz_name;
};
typedef struct
{
/* true if we have the peak value */
- vlc_bool_t pb_peak[AUDIO_REPLAY_GAIN_MAX];
+ bool pb_peak[AUDIO_REPLAY_GAIN_MAX];
/* peak value where 1.0 means full sample value */
float pf_peak[AUDIO_REPLAY_GAIN_MAX];
/* true if we have the gain value */
- vlc_bool_t pb_gain[AUDIO_REPLAY_GAIN_MAX];
+ bool pb_gain[AUDIO_REPLAY_GAIN_MAX];
/* gain value in dB */
float pf_gain[AUDIO_REPLAY_GAIN_MAX];
} audio_replay_gain_t;
unsigned int i_bitrate;
- vlc_bool_t b_packetized; /* wether the data is packetized
+ bool b_packetized; /* wether the data is packetized
(ie. not truncated) */
int i_extra;
void *p_extra;
memset( &fmt->video, 0, sizeof(video_format_t) );
memset( &fmt->subs, 0, sizeof(subs_format_t) );
- fmt->b_packetized = VLC_TRUE;
+ fmt->b_packetized = true;
fmt->i_bitrate = 0;
fmt->i_extra = 0;
fmt->p_extra = NULL;
enum es_out_query_e
{
/* activate apply of mode */
- ES_OUT_SET_ACTIVE, /* arg1= vlc_bool_t */
+ ES_OUT_SET_ACTIVE, /* arg1= bool */
/* see if mode is currently aplied or not */
- ES_OUT_GET_ACTIVE, /* arg1= vlc_bool_t* */
+ ES_OUT_GET_ACTIVE, /* arg1= bool* */
/* set/get mode */
ES_OUT_SET_MODE, /* arg1= int */
ES_OUT_SET_DEFAULT, /* arg1= es_out_id_t* */
/* force selection/unselection of the ES (bypass current mode)*/
- ES_OUT_SET_ES_STATE,/* arg1= es_out_id_t* arg2=vlc_bool_t */
- ES_OUT_GET_ES_STATE,/* arg1= es_out_id_t* arg2=vlc_bool_t* */
+ ES_OUT_SET_ES_STATE,/* arg1= es_out_id_t* arg2=bool */
+ ES_OUT_GET_ES_STATE,/* arg1= es_out_id_t* arg2=bool* */
/* */
ES_OUT_SET_GROUP, /* arg1= int */
int (*pf_send) ( es_out_t *, es_out_id_t *, block_t * );
void (*pf_del) ( es_out_t *, es_out_id_t * );
int (*pf_control)( es_out_t *, int i_query, va_list );
- vlc_bool_t b_sout;
+ bool b_sout;
es_out_sys_t *p_sys;
};
char *psz_name; /**< text describing this item */
char *psz_uri; /**< mrl of this item */
- vlc_bool_t b_fixed_name; /**< Can the interface change the name ?*/
+ bool b_fixed_name; /**< Can the interface change the name ?*/
int i_options; /**< Number of input options */
char **ppsz_options; /**< Array of input options */
mtime_t i_duration; /**< Duration in milliseconds*/
uint8_t i_type; /**< Type (file, disc, ...) */
- vlc_bool_t b_prefers_tree; /**< Do we prefer being displayed as tree*/
+ bool b_prefers_tree; /**< Do we prefer being displayed as tree*/
int i_categories; /**< Number of info categories */
info_category_t **pp_categories; /**< Pointer to the first info category */
VLC_EXPORT( void, input_item_SetMeta, ( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz_val ));
-static inline vlc_bool_t input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz )
+static inline bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz )
{
vlc_mutex_lock( &p_i->lock );
if( !p_i->p_meta )
{
vlc_mutex_unlock( &p_i->lock );
- return VLC_FALSE;
+ return false;
}
const char * meta = vlc_meta_Get( p_i->p_meta, meta_type );
- vlc_bool_t ret = meta && strcasestr( meta, psz );
+ bool ret = meta && strcasestr( meta, psz );
vlc_mutex_unlock( &p_i->lock );
return ret;
static inline void input_item_SetDuration( input_item_t * p_i, mtime_t i_duration )
{
- vlc_bool_t send_event = VLC_FALSE;
+ bool send_event = false;
vlc_mutex_lock( &p_i->lock );
if( p_i->i_duration != i_duration )
{
p_i->i_duration = i_duration;
- send_event = VLC_TRUE;
+ send_event = true;
}
vlc_mutex_unlock( &p_i->lock );
- if ( send_event == VLC_TRUE )
+ if ( send_event == true )
{
vlc_event_t event;
event.type = vlc_InputItemDurationChanged;
}
-static inline vlc_bool_t input_item_IsPreparsed( input_item_t *p_i )
+static inline bool input_item_IsPreparsed( input_item_t *p_i )
{
- return p_i->p_meta ? p_i->p_meta->i_status & ITEM_PREPARSED : VLC_FALSE ;
+ return p_i->p_meta ? p_i->p_meta->i_status & ITEM_PREPARSED : false ;
}
-static inline vlc_bool_t input_item_IsMetaFetched( input_item_t *p_i )
+static inline bool input_item_IsMetaFetched( input_item_t *p_i )
{
- return p_i->p_meta ? p_i->p_meta->i_status & ITEM_META_FETCHED : VLC_FALSE ;
+ return p_i->p_meta ? p_i->p_meta->i_status & ITEM_META_FETCHED : false ;
}
-static inline vlc_bool_t input_item_IsArtFetched( input_item_t *p_i )
+static inline bool input_item_IsArtFetched( input_item_t *p_i )
{
- return p_i->p_meta ? p_i->p_meta->i_status & ITEM_ART_FETCHED : VLC_FALSE ;
+ return p_i->p_meta ? p_i->p_meta->i_status & ITEM_ART_FETCHED : false ;
}
static inline const vlc_meta_t * input_item_GetMetaObject( input_item_t *p_i )
if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_GAIN" )) ||
(psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_RADIO" )) )
{
- p_dst->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+ p_dst->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = true;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_PEAK" )) ||
(psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_PEAK" )) )
{
- p_dst->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+ p_dst->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = true;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_GAIN" )) ||
(psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_AUDIOPHILE" )) )
{
- p_dst->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+ p_dst->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = true;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_PEAK" )) )
{
- p_dst->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+ p_dst->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = true;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
}
{
char *psz_name;
- vlc_bool_t b_menu; /* Is it a menu or a normal entry */
+ bool b_menu; /* Is it a menu or a normal entry */
int64_t i_length; /* Length(microsecond) if known, else 0 */
int64_t i_size; /* Size (bytes) if known, else 0 */
input_title_t *t = (input_title_t*)malloc( sizeof( input_title_t ) );
t->psz_name = NULL;
- t->b_menu = VLC_FALSE;
+ t->b_menu = false;
t->i_length = 0;
t->i_size = 0;
t->i_seekpoint = 0;
{
VLC_COMMON_MEMBERS;
- vlc_bool_t b_eof;
- vlc_bool_t b_preparsing;
+ bool b_eof;
+ bool b_preparsing;
int i_state;
- vlc_bool_t b_can_pace_control;
+ bool b_can_pace_control;
int64_t i_time; /* Current time */
/* Internal caching common to all inputs */
VLC_EXPORT( int, __input_Preparse, ( vlc_object_t *, input_item_t * ) );
#define input_Read(a,b,c) __input_Read(VLC_OBJECT(a),b, c)
-VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, vlc_bool_t ) );
+VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, bool ) );
VLC_EXPORT( void, input_StopThread, ( input_thread_t * ) );
enum input_query_e
VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list ) );
VLC_EXPORT( int, input_Control, ( input_thread_t *, int i_query, ... ) );
-VLC_EXPORT( decoder_t *, input_DecoderNew, ( input_thread_t *, es_format_t *, vlc_bool_t b_force_decoder ) );
+VLC_EXPORT( decoder_t *, input_DecoderNew, ( input_thread_t *, es_format_t *, bool b_force_decoder ) );
VLC_EXPORT( void, input_DecoderDelete, ( decoder_t * ) );
VLC_EXPORT( void, input_DecoderDecode,( decoder_t *, block_t * ) );
-VLC_EXPORT( vlc_bool_t, input_AddSubtitles, ( input_thread_t *, char *, vlc_bool_t ) );
+VLC_EXPORT( bool, input_AddSubtitles, ( input_thread_t *, char *, bool ) );
#endif
VLC_COMMON_MEMBERS
/* Thread properties and locks */
- vlc_bool_t b_play;
- vlc_bool_t b_should_run_on_first_thread;
+ bool b_play;
+ bool b_should_run_on_first_thread;
/* Specific interfaces */
intf_console_t * p_console; /** console */
intf_dialog_args_t * );
/** Interaction stuff */
- vlc_bool_t b_interaction;
+ bool b_interaction;
/** Video window callbacks */
void * ( *pf_request_window ) ( intf_thread_t *, vout_thread_t *,
/* XXX: new message passing stuff will go here */
vlc_mutex_t change_lock;
- vlc_bool_t b_menu_change;
- vlc_bool_t b_menu;
+ bool b_menu_change;
+ bool b_menu;
/* Provides the ability to switch an interface on the fly */
char *psz_switch_intf;
/* Specifically for INTF_DIALOG_FILE_GENERIC */
char *psz_extensions;
- vlc_bool_t b_save;
- vlc_bool_t b_multiple;
+ bool b_save;
+ bool b_multiple;
/* Specific to INTF_DIALOG_INTERACTION */
interaction_dialog_t *p_dialog;
vlc_value_t val; ///< value coming from core for dialogue
int i_timeToGo; ///< time (in sec) until shown progress is finished
- vlc_bool_t b_cancelled; ///< was the dialogue cancelled ?
+ bool b_cancelled; ///< was the dialogue cancelled ?
void * p_private; ///< Private interface data
***************************************************************************/
#define intf_UserFatal( a, b, c, d, e... ) __intf_UserFatal( VLC_OBJECT(a),b,c,d, ## e )
-VLC_EXPORT( int, __intf_UserFatal,( vlc_object_t*, vlc_bool_t, const char*, const char*, ...) ATTRIBUTE_FORMAT( 4, 5 ) );
+VLC_EXPORT( int, __intf_UserFatal,( vlc_object_t*, bool, const char*, const char*, ...) ATTRIBUTE_FORMAT( 4, 5 ) );
#define intf_UserWarn( a, c, d, e... ) __intf_UserWarn( VLC_OBJECT(a),c,d, ## e )
VLC_EXPORT( int, __intf_UserWarn,( vlc_object_t*, const char*, const char*, ...) ATTRIBUTE_FORMAT( 3, 4 ) );
#define intf_UserLoginPassword( a, b, c, d, e... ) __intf_UserLoginPassword( VLC_OBJECT(a),b,c,d,e)
#define intf_ProgressUpdate( a, b, c, d, e ) __intf_ProgressUpdate( VLC_OBJECT(a),b,c,d,e )
VLC_EXPORT( void, __intf_ProgressUpdate,( vlc_object_t*, int, const char*, float, int) );
#define intf_ProgressIsCancelled( a, b ) __intf_UserProgressIsCancelled( VLC_OBJECT(a),b )
-VLC_EXPORT( vlc_bool_t, __intf_UserProgressIsCancelled,( vlc_object_t*, int ) );
+VLC_EXPORT( bool, __intf_UserProgressIsCancelled,( vlc_object_t*, int ) );
#define intf_UserHide( a, b ) __intf_UserHide( VLC_OBJECT(a), b )
VLC_EXPORT( void, __intf_UserHide,( vlc_object_t *, int ));
/** Message queue lock */
vlc_mutex_t lock;
- vlc_bool_t b_overflow;
+ bool b_overflow;
/* Message queue */
msg_item_t msg[VLC_MSG_QSIZE]; /**< message queue */
* Exported functions.
*****************************************************************************/
#define module_Need(a,b,c,d) __module_Need(VLC_OBJECT(a),b,c,d)
-VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, vlc_bool_t ) );
+VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, bool ) );
#define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) );
#define module_Exists(a,b) __module_Exists(VLC_OBJECT(a),b)
-VLC_EXPORT( vlc_bool_t, __module_Exists, ( vlc_object_t *, const char * ) );
+VLC_EXPORT( bool, __module_Exists, ( vlc_object_t *, const char * ) );
#define module_Find(a,b) __module_Find(VLC_OBJECT(a),b)
VLC_EXPORT( module_t *, __module_Find, ( vlc_object_t *, const char * ) );
VLC_MODULE_NAME,
};
-VLC_EXPORT( vlc_bool_t, module_IsCapable, ( const module_t *m, const char *cap ) );
+VLC_EXPORT( bool, module_IsCapable, ( const module_t *m, const char *cap ) );
VLC_EXPORT( const char *, module_GetObjName, ( const module_t *m ) );
-VLC_EXPORT( const char *, module_GetName, ( const module_t *m, vlc_bool_t long_name ) );
-#define module_GetLongName( m ) module_GetName( m, VLC_TRUE )
+VLC_EXPORT( const char *, module_GetName, ( const module_t *m, bool long_name ) );
+#define module_GetLongName( m ) module_GetName( m, true )
VLC_EXPORT( const char *, module_GetHelp, ( const module_t *m ) );
};
#define net_Read(a,b,c,d,e,f) __net_Read(VLC_OBJECT(a),b,c,d,e,f)
-VLC_EXPORT( ssize_t, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, size_t i_data, vlc_bool_t b_retry ) );
+VLC_EXPORT( ssize_t, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, size_t i_data, bool b_retry ) );
#define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT( ssize_t, __net_Write, ( vlc_object_t *p_this, int fd, const v_socket_t *, const uint8_t *p_data, size_t i_data ) );
VLC_EXPORT( void, vlc_freeaddrinfo, ( struct addrinfo * ) );
-static inline vlc_bool_t
+static inline bool
net_SockAddrIsMulticast (const struct sockaddr *addr, socklen_t len)
{
switch (addr->sa_family)
{
const struct sockaddr_in *v4 = (const struct sockaddr_in *)addr;
if ((size_t)len < sizeof (*v4))
- return VLC_FALSE;
+ return false;
return IN_MULTICAST (ntohl (v4->sin_addr.s_addr)) != 0;
}
#endif
{
const struct sockaddr_in6 *v6 = (const struct sockaddr_in6 *)addr;
if ((size_t)len < sizeof (*v6))
- return VLC_FALSE;
+ return false;
return IN6_IS_ADDR_MULTICAST (&v6->sin6_addr) != 0;
}
#endif
}
- return VLC_FALSE;
+ return false;
}
#define vlc_object_unlock( obj ) \
__vlc_object_unlock( VLC_OBJECT( obj ) )
-VLC_EXPORT( vlc_bool_t, __vlc_object_wait, ( vlc_object_t * ) );
+VLC_EXPORT( bool, __vlc_object_wait, ( vlc_object_t * ) );
#define vlc_object_wait( obj ) \
__vlc_object_wait( VLC_OBJECT( obj ) )
#define vlc_object_kill(a) \
__vlc_object_kill( VLC_OBJECT(a) )
-VLC_EXPORT( vlc_bool_t, __vlc_object_alive, ( vlc_object_t * ) );
+VLC_EXPORT( bool, __vlc_object_alive, ( vlc_object_t * ) );
#define vlc_object_alive(a) \
__vlc_object_alive( VLC_OBJECT(a) )
* See the vlc_object_alive() documentation for a better alternative.
*/
static inline
-vlc_bool_t __vlc_object_lock_and_wait( vlc_object_t *obj )
+bool __vlc_object_lock_and_wait( vlc_object_t *obj )
{
- vlc_bool_t b = VLC_TRUE;
+ bool b = true;
vlc_object_lock( obj );
if( vlc_object_alive( obj ) )
filter_t *p_blend; /**< alpha blending module */
filter_t *p_text; /**< text renderer module */
filter_t *p_scale; /**< scaling module */
- vlc_bool_t b_force_crop; /**< force cropping of subpicture */
+ bool b_force_crop; /**< force cropping of subpicture */
int i_crop_x, i_crop_y, i_crop_width, i_crop_height; /**< cropping */
int i_margin; /**< force position of a subpicture */
- vlc_bool_t b_force_palette; /**< force palette of subpicture */
+ bool b_force_palette; /**< force palette of subpicture */
uint8_t palette[4][4]; /**< forced palette */
int ( *pf_control ) ( spu_t *, int, va_list );
VLC_EXPORT( spu_t *, __spu_Create, ( vlc_object_t * ) );
VLC_EXPORT( int, spu_Init, ( spu_t * ) );
VLC_EXPORT( void, spu_Destroy, ( spu_t * ) );
-void spu_Attach( spu_t *, vlc_object_t *, vlc_bool_t );
+void spu_Attach( spu_t *, vlc_object_t *, bool );
VLC_EXPORT( subpicture_t *, spu_CreateSubpicture, ( spu_t * ) );
VLC_EXPORT( void, spu_DestroySubpicture, ( spu_t *, subpicture_t * ) );
VLC_EXPORT( subpicture_region_t *,__spu_MakeRegion, ( vlc_object_t *, video_format_t *, picture_t * ) );
#define spu_DestroyRegion(a,b) __spu_DestroyRegion(VLC_OBJECT(a),b)
VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * ) );
-VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t, vlc_bool_t ) );
+VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t, bool ) );
VLC_EXPORT( void, spu_RenderSubpictures, ( spu_t *, video_format_t *, picture_t *, picture_t *, subpicture_t *, int, int ) );
/** @}*/
int i_height; /*< height of button visible state image */
/* range style button */
- vlc_bool_t b_range; /*< button should be interpreted as range */
+ bool b_range; /*< button should be interpreted as range */
int i_ranges; /*< number of states */
};
picture_t *p_pic; /*< pointer to picture to display */
osd_button_t *p_visible; /*< shortcut to visible button */
- vlc_bool_t b_menu_visible; /*< menu currently visible? */
- vlc_bool_t b_update; /*< update OSD Menu when VLC_TRUE */
+ bool b_menu_visible; /*< menu currently visible? */
+ bool b_update; /*< update OSD Menu when true */
/* quick hack to volume state. */
osd_button_t *p_volume; /*< pointer to volume range object. */
*
* Returns 0 when no key has been pressed or the value of the key pressed.
*/
-static inline vlc_bool_t osd_GetKeyPressed( osd_menu_t *p_osd )
+static inline bool osd_GetKeyPressed( osd_menu_t *p_osd )
{
return( p_osd->p_state->b_update );
}
/**
* Update the OSD Menu visibility flag.
*
- * VLC_TRUE means OSD Menu should be shown. VLC_FALSE means OSD Menu
+ * true means OSD Menu should be shown. false means OSD Menu
* should not be shown.
*/
-static inline void osd_SetMenuVisible( osd_menu_t *p_osd, vlc_bool_t b_value )
+static inline void osd_SetMenuVisible( osd_menu_t *p_osd, bool b_value )
{
vlc_value_t val;
* Update the OSD Menu update flag
*
* If the OSD Menu should be updated then set the update flag to
- * VLC_TRUE, else to VLC_FALSE.
+ * true, else to false.
*/
-static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, vlc_bool_t b_value )
+static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, bool b_value )
{
vlc_value_t val;
playlist_item_array_t current; /**< Items currently being played */
int i_current_index; /**< Index in current array */
/** Reset current item array */
- vlc_bool_t b_reset_currently_playing;
+ bool b_reset_currently_playing;
mtime_t last_rebuild_date;
int i_last_playlist_id; /**< Last id to an item */
playlist_item_t * p_local_onelevel; /** < "Playlist" in ONELEVEL view */
playlist_item_t * p_ml_onelevel; /** < "Library" in ONELEVEL view */
- vlc_bool_t b_always_tree;/**< Always display as tree */
- vlc_bool_t b_never_tree;/**< Never display as tree */
+ bool b_always_tree;/**< Always display as tree */
+ bool b_never_tree;/**< Never display as tree */
- vlc_bool_t b_doing_ml; /**< Doing media library stuff,
+ bool b_doing_ml; /**< Doing media library stuff,
* get quicker */
- vlc_bool_t b_auto_preparse;
+ bool b_auto_preparse;
/* Runtime */
input_thread_t * p_input; /**< the input thread associated
int i_sort; /**< Last sorting applied to the playlist */
int i_order; /**< Last ordering applied to the playlist */
mtime_t gc_date;
- vlc_bool_t b_cant_sleep;
+ bool b_cant_sleep;
playlist_preparse_t *p_preparse; /**< Preparser object */
playlist_fetcher_t *p_fetcher;/**< Meta and art fetcher object */
int i_skip; /**< Number of items to skip */
- vlc_bool_t b_request;/**< Set to true by the requester
+ bool b_request;/**< Set to true by the requester
The playlist sets it back to false
when processing the request */
vlc_mutex_t lock; /**< Lock to protect request */
#define pl_Release(a) __pl_Release( VLC_OBJECT(a) )
/* Playlist control */
-#define playlist_Play(p) playlist_Control(p,PLAYLIST_PLAY, VLC_FALSE )
-#define playlist_Pause(p) playlist_Control(p,PLAYLIST_PAUSE, VLC_FALSE )
-#define playlist_Stop(p) playlist_Control(p,PLAYLIST_STOP, VLC_FALSE )
-#define playlist_Next(p) playlist_Control(p,PLAYLIST_SKIP, VLC_FALSE, 1)
-#define playlist_Prev(p) playlist_Control(p,PLAYLIST_SKIP, VLC_FALSE, -1)
-#define playlist_Skip(p,i) playlist_Control(p,PLAYLIST_SKIP, VLC_FALSE, i)
+#define playlist_Play(p) playlist_Control(p,PLAYLIST_PLAY, false )
+#define playlist_Pause(p) playlist_Control(p,PLAYLIST_PAUSE, false )
+#define playlist_Stop(p) playlist_Control(p,PLAYLIST_STOP, false )
+#define playlist_Next(p) playlist_Control(p,PLAYLIST_SKIP, false, 1)
+#define playlist_Prev(p) playlist_Control(p,PLAYLIST_SKIP, false, -1)
+#define playlist_Skip(p,i) playlist_Control(p,PLAYLIST_SKIP, false, i)
/**
* Do a playlist action.
* \param variable number of arguments
* \return VLC_SUCCESS or an error
*/
-VLC_EXPORT( int, playlist_Control, ( playlist_t *p_playlist, int i_query, vlc_bool_t b_locked, ... ) );
+VLC_EXPORT( int, playlist_Control, ( playlist_t *p_playlist, int i_query, bool b_locked, ... ) );
/** Clear the playlist
* \param b_locked TRUE if playlist is locked when entering this function
*/
-VLC_EXPORT( void, playlist_Clear, ( playlist_t *, vlc_bool_t ) );
+VLC_EXPORT( void, playlist_Clear, ( playlist_t *, bool ) );
/** Enqueue an input item for preparsing */
VLC_EXPORT( int, playlist_PreparseEnqueue, (playlist_t *, input_item_t *) );
/** Remove a services discovery module by name */
VLC_EXPORT( int, playlist_ServicesDiscoveryRemove, (playlist_t *, const char *));
/** Check whether a given SD is loaded */
-VLC_EXPORT( vlc_bool_t, playlist_IsServicesDiscoveryLoaded, ( playlist_t *,const char *));
+VLC_EXPORT( bool, playlist_IsServicesDiscoveryLoaded, ( playlist_t *,const char *));
/* Playlist sorting */
VLC_EXPORT( int, playlist_TreeMove, ( playlist_t *, playlist_item_t *, playlist_item_t *, int ) );
VLC_EXPORT( playlist_item_t *, __playlist_ItemNewFromInput, ( vlc_object_t *p_obj,input_item_t *p_input ) );
/*************************** Item deletion **************************/
-VLC_EXPORT( int, playlist_DeleteFromInput, ( playlist_t *, int, vlc_bool_t ) );
-VLC_EXPORT( int, playlist_DeleteInputInParent, ( playlist_t *, int, playlist_item_t *, vlc_bool_t ) );
+VLC_EXPORT( int, playlist_DeleteFromInput, ( playlist_t *, int, bool ) );
+VLC_EXPORT( int, playlist_DeleteInputInParent, ( playlist_t *, int, playlist_item_t *, bool ) );
/*************************** Item fields accessors **************************/
VLC_EXPORT( int, playlist_ItemSetName, (playlist_item_t *, const char * ) );
/******************** Item addition ********************/
-VLC_EXPORT( int, playlist_Add, ( playlist_t *, const char *, const char *, int, int, vlc_bool_t, vlc_bool_t ) );
-VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, vlc_bool_t, vlc_bool_t ) );
-VLC_EXPORT( int, playlist_AddInput, ( playlist_t *, input_item_t *, int, int, vlc_bool_t, vlc_bool_t ) );
-VLC_EXPORT( playlist_item_t *, playlist_NodeAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int, vlc_bool_t ) );
-VLC_EXPORT( int, playlist_BothAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int, int*, int*, vlc_bool_t ) );
+VLC_EXPORT( int, playlist_Add, ( playlist_t *, const char *, const char *, int, int, bool, bool ) );
+VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, bool, bool ) );
+VLC_EXPORT( int, playlist_AddInput, ( playlist_t *, input_item_t *, int, int, bool, bool ) );
+VLC_EXPORT( playlist_item_t *, playlist_NodeAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int, bool ) );
+VLC_EXPORT( int, playlist_BothAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int, int*, int*, bool ) );
/********************** Misc item operations **********************/
-VLC_EXPORT( playlist_item_t*, playlist_ItemToNode, (playlist_t *,playlist_item_t *, vlc_bool_t) );
+VLC_EXPORT( playlist_item_t*, playlist_ItemToNode, (playlist_t *,playlist_item_t *, bool) );
playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
int i_input_id, playlist_item_t *p_root,
- vlc_bool_t );
+ bool );
/********************************** Item search *************************/
-VLC_EXPORT( playlist_item_t *, playlist_ItemGetById, (playlist_t *, int, vlc_bool_t ) );
-VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInput, (playlist_t *,input_item_t *, vlc_bool_t ) );
+VLC_EXPORT( playlist_item_t *, playlist_ItemGetById, (playlist_t *, int, bool ) );
+VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInput, (playlist_t *,input_item_t *, bool ) );
VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInputId, (playlist_t *, int, playlist_item_t *) );
VLC_EXPORT( int, playlist_LiveSearchUpdate, (playlist_t *, playlist_item_t *, const char *) );
VLC_EXPORT( int, playlist_NodeInsert, (playlist_t *,playlist_item_t*,playlist_item_t *, int) );
VLC_EXPORT( int, playlist_NodeRemoveItem, (playlist_t *,playlist_item_t*,playlist_item_t *) );
VLC_EXPORT( playlist_item_t *, playlist_ChildSearchName, (playlist_item_t*, const char* ) );
-VLC_EXPORT( int, playlist_NodeDelete, ( playlist_t *, playlist_item_t *, vlc_bool_t , vlc_bool_t ) );
-VLC_EXPORT( int, playlist_NodeEmpty, ( playlist_t *, playlist_item_t *, vlc_bool_t ) );
-VLC_EXPORT( void, playlist_NodesPairCreate, (playlist_t *, const char *, playlist_item_t **, playlist_item_t **, vlc_bool_t ) );
+VLC_EXPORT( int, playlist_NodeDelete, ( playlist_t *, playlist_item_t *, bool , bool ) );
+VLC_EXPORT( int, playlist_NodeEmpty, ( playlist_t *, playlist_item_t *, bool ) );
+VLC_EXPORT( void, playlist_NodesPairCreate, (playlist_t *, const char *, playlist_item_t **, playlist_item_t **, bool ) );
VLC_EXPORT( playlist_item_t *, playlist_GetPreferredNode, ( playlist_t *p_playlist, playlist_item_t *p_node ) );
-VLC_EXPORT( playlist_item_t *, playlist_GetNextLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, vlc_bool_t b_ena, vlc_bool_t b_unplayed ) );
-VLC_EXPORT( playlist_item_t *, playlist_GetPrevLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, vlc_bool_t b_ena, vlc_bool_t b_unplayed ) );
+VLC_EXPORT( playlist_item_t *, playlist_GetNextLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed ) );
+VLC_EXPORT( playlist_item_t *, playlist_GetPrevLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed ) );
VLC_EXPORT( playlist_item_t *, playlist_GetLastLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root ) );
/***********************************************************************
p_input = input_ItemNewExt( p_playlist, psz_uri, psz_file,
1, &psz_option, -1 );
playlist_AddInput( p_playlist, p_input, PLAYLIST_APPEND, PLAYLIST_END,
- VLC_TRUE, VLC_FALSE );
- input_Read( p_playlist, p_input, VLC_TRUE );
+ true, false );
+ input_Read( p_playlist, p_input, true );
return VLC_SUCCESS;
}
/* XXX private to stream_output.c */
/* if muxer doesn't support adding stream at any time then we first wait
* for stream then we refuse all stream and start muxing */
- vlc_bool_t b_add_stream_any_time;
- vlc_bool_t b_waiting_stream;
+ bool b_add_stream_any_time;
+ bool b_waiting_stream;
/* we wait one second after first stream added */
mtime_t i_add_stream_start;
};
enum sout_mux_query_e
{
/* capabilities */
- MUX_CAN_ADD_STREAM_WHILE_MUXING, /* arg1= vlc_bool_t *, res=cannot fail */
+ MUX_CAN_ADD_STREAM_WHILE_MUXING, /* arg1= bool *, res=cannot fail */
/* properties */
- MUX_GET_ADD_STREAM_WAIT, /* arg1= vlc_bool_t *, res=cannot fail */
+ MUX_GET_ADD_STREAM_WAIT, /* arg1= bool *, res=cannot fail */
MUX_GET_MIME, /* arg1= char ** res=can fail */
};
/** SDP */
VLC_EXPORT( char *, vlc_sdp_Start, ( vlc_object_t *obj, const char *cfgpref, const struct sockaddr *src, size_t srclen, const struct sockaddr *addr, size_t addrlen ) );
-VLC_EXPORT( char *, sdp_AddMedia, (char **sdp, const char *type, const char *protocol, int dport, unsigned pt, vlc_bool_t bw_indep, unsigned bw, const char *ptname, unsigned clockrate, unsigned channels, const char *fmtp) );
+VLC_EXPORT( char *, sdp_AddMedia, (char **sdp, const char *type, const char *protocol, int dport, unsigned pt, bool bw_indep, unsigned bw, const char *ptname, unsigned clockrate, unsigned channels, const char *fmtp) );
VLC_EXPORT( char *, sdp_AddAttribute, (char **sdp, const char *name, const char *fmt, ...) ATTRIBUTE_FORMAT( 3, 4 ) );
enum stream_query_e
{
/* capabilities */
- STREAM_CAN_SEEK, /**< arg1= vlc_bool_t * res=cannot fail*/
- STREAM_CAN_FASTSEEK, /**< arg1= vlc_bool_t * res=cannot fail*/
+ STREAM_CAN_SEEK, /**< arg1= bool * res=cannot fail*/
+ STREAM_CAN_FASTSEEK, /**< arg1= bool * res=cannot fail*/
/* */
STREAM_SET_POSITION, /**< arg1= int64_t res=can fail */
#define stream_MemoryNew( a, b, c, d ) __stream_MemoryNew( VLC_OBJECT(a), b, c, d )
-VLC_EXPORT( stream_t *,__stream_MemoryNew, (vlc_object_t *p_obj, uint8_t *p_buffer, int64_t i_size, vlc_bool_t i_preserve_memory ) );
+VLC_EXPORT( stream_t *,__stream_MemoryNew, (vlc_object_t *p_obj, uint8_t *p_buffer, int64_t i_size, bool i_preserve_memory ) );
#define stream_UrlNew( a, b ) __stream_UrlNew( VLC_OBJECT(a), b )
VLC_EXPORT( stream_t *,__stream_UrlNew, (vlc_object_t *p_this, const char *psz_url ) );
};
void streaming_ParameterApply( sout_param_t *p_param, char **ppsz_dest,
- int *pi_dest, float *pf_dest, vlc_bool_t *pb_dest );
+ int *pi_dest, float *pf_dest, bool *pb_dest );
/******** Module types definitions and parametrable elements ***************/
int32_t i_ab;
int32_t i_channels;
float f_scale;
- vlc_bool_t b_soverlay;
+ bool b_soverlay;
char *psz_vcodec;
char *psz_acodec;
char *psz_scodec;
struct sout_gui_descr_t
{
/* Access types */
- vlc_bool_t b_local; /*< local access module */
- vlc_bool_t b_file; /*< file access module */
- vlc_bool_t b_http; /*< http access module */
- vlc_bool_t b_mms; /*< mms access module */
- vlc_bool_t b_rtp; /*< rtp access module */
- vlc_bool_t b_udp; /*< udp access module */
- vlc_bool_t b_dump; /*< dump access module */
- vlc_bool_t b_icecast; /*< icecast access module */
+ bool b_local; /*< local access module */
+ bool b_file; /*< file access module */
+ bool b_http; /*< http access module */
+ bool b_mms; /*< mms access module */
+ bool b_rtp; /*< rtp access module */
+ bool b_udp; /*< udp access module */
+ bool b_dump; /*< dump access module */
+ bool b_icecast; /*< icecast access module */
char *psz_file; /*< filename */
char *psz_http; /*< HTTP servername or ipaddress */
char *psz_mux; /*< name of muxer to use in streaming */
/* Transcode */
- vlc_bool_t b_soverlay; /*< enable burning overlay in the video */
+ bool b_soverlay; /*< enable burning overlay in the video */
char *psz_vcodec; /*< video codec to use in transcoding */
char *psz_acodec; /*< audio codec to use in transcoding */
char *psz_scodec; /*< subtitle codec to use in transcoding */
float f_scale; /*< scaling factor to use in transcoding */
/* Misc */
- vlc_bool_t b_sap; /*< send SAP announcement */
- vlc_bool_t b_all_es;/*< send all elementary streams from source stream */
+ bool b_sap; /*< send SAP announcement */
+ bool b_all_es;/*< send all elementary streams from source stream */
char *psz_group; /*< SAP Group name */
char *psz_name; /*< SAP name */
int32_t i_ttl; /*< Time To Live (TTL) for network traversal */
VLC_EXPORT( int, __vlc_cond_init, ( vlc_cond_t * ) );
VLC_EXPORT( void, __vlc_cond_destroy, ( const char *, int, vlc_cond_t * ) );
VLC_EXPORT( int, __vlc_threadvar_create, (vlc_threadvar_t * ) );
-VLC_EXPORT( int, __vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( void * ), int, vlc_bool_t ) );
+VLC_EXPORT( int, __vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( void * ), int, bool ) );
VLC_EXPORT( int, __vlc_thread_set_priority, ( vlc_object_t *, const char *, int, int ) );
VLC_EXPORT( void, __vlc_thread_ready, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, const char *, int ) );
VLC_EXPORT( update_t *, __update_New, ( vlc_object_t * ) );
VLC_EXPORT( void, update_Delete, ( update_t * ) );
-VLC_EXPORT( void, update_Check, ( update_t *, void (*callback)( void*, vlc_bool_t ), void * ) );
+VLC_EXPORT( void, update_Check, ( update_t *, void (*callback)( void*, bool ), void * ) );
VLC_EXPORT( int, update_CompareReleaseToCurrent, ( update_t * ) );
VLC_EXPORT( void, update_Download, ( update_t *, char* ) );
* \param psz_name The name of the variable
* \param b The new boolean value of this variable
*/
-static inline int __var_SetBool( vlc_object_t *p_obj, const char *psz_name, vlc_bool_t b )
+static inline int __var_SetBool( vlc_object_t *p_obj, const char *psz_name, bool b )
{
vlc_value_t val;
val.b_bool = b;
static inline int __var_SetVoid( vlc_object_t *p_obj, const char *psz_name )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
return __var_Set( p_obj, psz_name, val );
}
#define var_SetVoid(a,b) __var_SetVoid( VLC_OBJECT(a),b)
*/
static inline int __var_GetBool( vlc_object_t *p_obj, const char *psz_name )
{
- vlc_value_t val; val.b_bool = VLC_FALSE;
+ vlc_value_t val; val.b_bool = false;
if( !__var_Get( p_obj, psz_name, &val ) )
return val.b_bool;
else
- return VLC_FALSE;
+ return false;
}
/**
typedef struct
{
int64_t id;
- vlc_bool_t b_enabled;
+ bool b_enabled;
/* */
char *psz_name;
char *psz_output;
/* */
- vlc_bool_t b_vod;
+ bool b_vod;
struct
{
- vlc_bool_t b_loop;
+ bool b_loop;
} broadcast;
struct
{
int64_t i_time;
int64_t i_length;
double d_position;
- vlc_bool_t b_paused;
+ bool b_paused;
int i_rate; // normal is INPUT_RATE_DEFAULT
} vlm_media_instance_t;
TAB_INIT( p_media->i_input, p_media->ppsz_input );
TAB_INIT( p_media->i_option, p_media->ppsz_option );
p_media->psz_output = NULL;
- p_media->b_vod = VLC_FALSE;
+ p_media->b_vod = false;
p_media->vod.psz_mux = NULL;
- p_media->broadcast.b_loop = VLC_FALSE;
+ p_media->broadcast.b_loop = false;
}
static inline void vlm_media_Copy( vlm_media_t *p_dst, vlm_media_t *p_src )
p_instance->i_time = 0;
p_instance->i_length = 0;
p_instance->d_position = 0.0;
- p_instance->b_paused = VLC_FALSE;
+ p_instance->b_paused = false;
p_instance->i_rate = INPUT_RATE_DEFAULT;
}
static inline void vlm_media_instance_Clean( vlm_media_instance_t *p_instance )
* @{*/
int i_status; /**< picture flags */
int i_type; /**< is picture a direct buffer ? */
- vlc_bool_t b_slow; /**< is picture in slow memory ? */
+ bool b_slow; /**< is picture in slow memory ? */
int i_matrix_coefficients; /**< in YUV type, encoding type */
/**@}*/
/**@{*/
unsigned i_refcount; /**< link reference counter */
mtime_t date; /**< display date */
- vlc_bool_t b_force;
+ bool b_force;
/**@}*/
/** \name Picture dynamic properties
* Those properties can be changed by the decoder
* @{
*/
- vlc_bool_t b_progressive; /**< is it a progressive frame ? */
+ bool b_progressive; /**< is it a progressive frame ? */
unsigned int i_nb_fields; /**< # of displayed fields */
- vlc_bool_t b_top_field_first; /**< which field is first */
+ bool b_top_field_first; /**< which field is first */
/**@}*/
/** The picture heap we are attached to */
/* Real pictures */
picture_t* pp_picture[VOUT_MAX_PICTURES]; /**< pictures */
int i_last_used_pic; /**< last used pic in heap */
- vlc_bool_t b_allow_modify_pics;
+ bool b_allow_modify_pics;
/* Stuff used for truecolor RGB planes */
uint32_t i_rmask; int i_rrshift, i_lrshift;
/**@{*/
mtime_t i_start; /**< beginning of display date */
mtime_t i_stop; /**< end of display date */
- vlc_bool_t b_ephemer; /**< If this flag is set to true the subtitle
+ bool b_ephemer; /**< If this flag is set to true the subtitle
will be displayed untill the next one appear */
- vlc_bool_t b_fade; /**< enable fading */
- vlc_bool_t b_pausable; /**< subpicture will be paused if
+ bool b_fade; /**< enable fading */
+ bool b_pausable; /**< subpicture will be paused if
stream is paused */
/**@}*/
int i_alpha; /**< transparency */
int i_original_picture_width; /**< original width of the movie */
int i_original_picture_height;/**< original height of the movie */
- vlc_bool_t b_absolute; /**< position is absolute */
+ bool b_absolute; /**< position is absolute */
int i_flags; /**< position flags */
/**@}*/
uint16_t i_changes; /**< changes made to the thread.
\see \ref vout_changes */
float f_gamma; /**< gamma */
- vlc_bool_t b_grayscale; /**< color or grayscale display */
- vlc_bool_t b_info; /**< print additional information */
- vlc_bool_t b_interface; /**< render interface */
- vlc_bool_t b_scale; /**< allow picture scaling */
- vlc_bool_t b_fullscreen; /**< toogle fullscreen display */
+ bool b_grayscale; /**< color or grayscale display */
+ bool b_info; /**< print additional information */
+ bool b_interface; /**< render interface */
+ bool b_scale; /**< allow picture scaling */
+ bool b_fullscreen; /**< toogle fullscreen display */
uint32_t render_time; /**< last picture render time */
unsigned int i_window_width; /**< video window width */
unsigned int i_window_height; /**< video window height */
int i_heap_size; /**< heap size */
picture_heap_t render; /**< rendered pictures */
picture_heap_t output; /**< direct buffers */
- vlc_bool_t b_direct; /**< rendered are like direct ? */
+ bool b_direct; /**< rendered are like direct ? */
vout_chroma_t chroma; /**< translation tables */
video_format_t fmt_render; /* render format (from the decoder) */
/* Filter chain */
char *psz_filter_chain;
- vlc_bool_t b_filter_change;
+ bool b_filter_change;
/* Video filter2 chain
* these are handled like in transcode.c
filter_t *pp_vfilters[MAX_VFILTERS];
int i_vfilters;
- vlc_bool_t b_vfilter_change;
+ bool b_vfilter_change;
/* Misc */
- vlc_bool_t b_snapshot; /**< take one snapshot on the next loop */
+ bool b_snapshot; /**< take one snapshot on the next loop */
/* Video output configuration */
config_chain_t *p_cfg;
/* Show media title on videoutput */
- vlc_bool_t b_title_show;
+ bool b_title_show;
mtime_t i_title_timeout;
int i_title_position;
};
VLC_EXPORT( int, vout_ChromaCmp, ( uint32_t, uint32_t ) );
-VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, vlc_bool_t, vlc_bool_t, unsigned int ) );
+VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, bool, bool, unsigned int ) );
VLC_EXPORT( void, vout_InitFormat, ( video_frame_format_t *, uint32_t, int, int, int ) );
VLC_EXPORT( void, vout_DestroyPicture, ( vout_thread_t *, picture_t * ) );
VLC_EXPORT( void, vout_DisplayPicture, ( vout_thread_t *, picture_t * ) );
VLC_EXPORT( int, vout_ControlWindow, ( vout_thread_t *, void *, int, va_list ) );
void vout_IntfInit( vout_thread_t * );
VLC_EXPORT( int, vout_Snapshot, ( vout_thread_t *p_vout, picture_t *p_pic ) );
-VLC_EXPORT( void, vout_EnableFilter, ( vout_thread_t *, char *,vlc_bool_t , vlc_bool_t ) );
+VLC_EXPORT( void, vout_EnableFilter, ( vout_thread_t *, char *,bool , bool ) );
static inline int vout_vaControl( vout_thread_t *p_vout, int i_query,
{
VOUT_GET_SIZE, /* arg1= unsigned int*, arg2= unsigned int*, res= */
VOUT_SET_SIZE, /* arg1= unsigned int, arg2= unsigned int, res= */
- VOUT_SET_STAY_ON_TOP, /* arg1= vlc_bool_t res= */
+ VOUT_SET_STAY_ON_TOP, /* arg1= bool res= */
VOUT_REPARENT,
VOUT_SNAPSHOT,
VOUT_CLOSE,
- VOUT_SET_FOCUS, /* arg1= vlc_bool_t res= */
+ VOUT_SET_FOCUS, /* arg1= bool res= */
VOUT_SET_VIEWPORT, /* arg1= view rect, arg2=clip rect, res= */
VOUT_REDRAW_RECT, /* arg1= area rect, res= */
};
char * (*pf_value) ( xml_reader_t * );
int (*pf_next_attr) ( xml_reader_t * );
- int (*pf_use_dtd) ( xml_reader_t *, vlc_bool_t );
+ int (*pf_use_dtd) ( xml_reader_t *, bool );
};
#define xml_ReaderRead( a ) a->pf_read( a )
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "dvb-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
add_integer( "dvb-frequency", 11954000, NULL, FREQ_TEXT, FREQ_LONGTEXT,
- VLC_FALSE );
+ false );
# if defined(WIN32) || defined(WINCE)
# else
add_integer( "dvb-adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "dvb-device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
- VLC_TRUE );
- add_bool( "dvb-probe", 1, NULL, PROBE_TEXT, PROBE_LONGTEXT, VLC_TRUE );
+ true );
+ add_bool( "dvb-probe", 1, NULL, PROBE_TEXT, PROBE_LONGTEXT, true );
add_bool( "dvb-budget-mode", 0, NULL, BUDGET_TEXT, BUDGET_LONGTEXT,
- VLC_TRUE );
+ true );
# endif
/* DVB-S (satellite) */
add_integer( "dvb-inversion", 2, NULL, INVERSION_TEXT,
- INVERSION_LONGTEXT, VLC_TRUE );
+ INVERSION_LONGTEXT, true );
change_integer_list( i_inversion_list, ppsz_inversion_text, 0 );
# if defined(WIN32) || defined(WINCE)
add_string( "dvb-polarisation", NULL, NULL, POLARISATION_TEXT,
- POLARISATION_LONGTEXT, VLC_TRUE );
+ POLARISATION_LONGTEXT, true );
change_string_list( ppsz_polar_list, ppsz_polar_text, 0 );
add_integer( "dvb-network-id", 0, NULL, NETID_TEXT, NETID_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "dvb-azimuth", 0, NULL, AZIMUTH_TEXT, AZIMUTH_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "dvb-elevation", 0, NULL, ELEVATION_TEXT,
- ELEVATION_LONGTEXT, VLC_TRUE );
+ ELEVATION_LONGTEXT, true );
add_integer( "dvb-longitude", 0, NULL, LONGITUDE_TEXT,
- LONGITUDE_LONGTEXT, VLC_TRUE );
+ LONGITUDE_LONGTEXT, true );
/* Note: Polaristion H = voltage 18; V = voltage 13; */
# else
add_integer( "dvb-satno", 0, NULL, SATNO_TEXT, SATNO_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "dvb-voltage", 13, NULL, VOLTAGE_TEXT, VOLTAGE_LONGTEXT,
- VLC_TRUE );
+ true );
add_bool( "dvb-high-voltage", 0, NULL, HIGH_VOLTAGE_TEXT,
- HIGH_VOLTAGE_LONGTEXT, VLC_TRUE );
+ HIGH_VOLTAGE_LONGTEXT, true );
add_integer( "dvb-tone", -1, NULL, TONE_TEXT, TONE_LONGTEXT,
- VLC_TRUE );
+ true );
# endif
add_integer( "dvb-lnb-lof1", 0, NULL, LNB_LOF1_TEXT,
- LNB_LOF1_LONGTEXT, VLC_TRUE );
+ LNB_LOF1_LONGTEXT, true );
add_integer( "dvb-lnb-lof2", 0, NULL, LNB_LOF2_TEXT,
- LNB_LOF2_LONGTEXT, VLC_TRUE );
+ LNB_LOF2_LONGTEXT, true );
add_integer( "dvb-lnb-slof", 0, NULL, LNB_SLOF_TEXT,
- LNB_SLOF_LONGTEXT, VLC_TRUE );
+ LNB_SLOF_LONGTEXT, true );
- add_integer( "dvb-fec", 9, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_TRUE );
+ add_integer( "dvb-fec", 9, NULL, FEC_TEXT, FEC_LONGTEXT, true );
add_integer( "dvb-srate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
- VLC_FALSE );
+ false );
/* DVB-C (cable) */
add_integer( "dvb-modulation", -1, NULL, MODULATION_TEXT,
- MODULATION_LONGTEXT, VLC_TRUE );
+ MODULATION_LONGTEXT, true );
change_integer_list( i_qam_list, ppsz_qam_text, 0 );
/* DVB-T (terrestrial) */
add_integer( "dvb-code-rate-hp", -1, NULL, CODE_RATE_HP_TEXT,
- CODE_RATE_HP_LONGTEXT, VLC_TRUE );
+ CODE_RATE_HP_LONGTEXT, true );
change_integer_list( i_hp_fec_list, ppsz_hp_fec_text, 0 );
add_integer( "dvb-code-rate-lp", -1, NULL, CODE_RATE_LP_TEXT,
- CODE_RATE_LP_LONGTEXT, VLC_TRUE );
+ CODE_RATE_LP_LONGTEXT, true );
change_integer_list( i_lp_fec_list, ppsz_lp_fec_text, 0 );
add_integer( "dvb-bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT,
- VLC_TRUE );
+ true );
change_integer_list( i_band_list, ppsz_band_text, 0 );
- add_integer( "dvb-guard", -1, NULL, GUARD_TEXT, GUARD_LONGTEXT, VLC_TRUE );
+ add_integer( "dvb-guard", -1, NULL, GUARD_TEXT, GUARD_LONGTEXT, true );
change_integer_list( i_guard_list, ppsz_guard_text, 0 );
add_integer( "dvb-transmission", -1, NULL, TRANSMISSION_TEXT,
- TRANSMISSION_LONGTEXT, VLC_TRUE );
+ TRANSMISSION_LONGTEXT, true );
change_integer_list( i_transmission_list, ppsz_transmission_text, 0 );
add_integer( "dvb-hierarchy", -1, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT,
- VLC_TRUE );
+ true );
change_integer_list( i_hierarchy_list, ppsz_hierarchy_text, 0 );
set_capability( "access2", 0 );
p_access->info.i_update = 0;
p_access->info.i_size = 0;
p_access->info.i_pos = 0;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_access->info.i_title = 0;
p_access->info.i_seekpoint = 0;
p_access->p_sys = p_sys = (access_sys_t *)malloc( sizeof( access_sys_t ) );
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
- vlc_bool_t *pb_bool, b_bool;
+ bool *pb_bool, b_bool;
int *pi_int, i_int;
int64_t *pi_64;
case ACCESS_CAN_FASTSEEK: /* 1 */
case ACCESS_CAN_PAUSE: /* 2 */
case ACCESS_CAN_CONTROL_PACE: /* 3 */
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false;
break;
case ACCESS_GET_MTU: /* 4 */
pi_int = (int*)va_arg( args, int * );
l_buffer_len = dvb_GetBufferSize( p_access );
if( l_buffer_len < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return NULL;
}
p_block = block_New( p_access, l_buffer_len );
if( dvb_ReadBuffer( p_access, &l_buffer_len, p_block->p_buffer ) < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return NULL;
}
add_usage_hint( N_("[cdda:][device][@[track]]") );
add_integer( "cdda-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
- add_integer( "cdda-track", -1 , NULL, NULL, NULL, VLC_TRUE );
+ add_integer( "cdda-track", -1 , NULL, NULL, NULL, true );
change_internal();
- add_integer( "cdda-first-sector", -1, NULL, NULL, NULL, VLC_TRUE );
+ add_integer( "cdda-first-sector", -1, NULL, NULL, NULL, true );
change_internal();
- add_integer( "cdda-last-sector", -1, NULL, NULL, NULL, VLC_TRUE );
+ add_integer( "cdda-last-sector", -1, NULL, NULL, NULL, true );
change_internal();
add_string( "cddb-server", "freedb.freedb.org", NULL,
N_( "CDDB Server" ), N_( "Address of the CDDB server to use." ),
- VLC_TRUE );
+ true );
add_integer( "cddb-port", 8880, NULL,
N_( "CDDB port" ), N_( "CDDB Server port to use." ),
- VLC_TRUE );
+ true );
add_shortcut( "cdda" );
add_shortcut( "cddasimple" );
vlc_module_end();
/* Wave header for the output data */
WAVEHEADER waveheader;
- vlc_bool_t b_header;
+ bool b_header;
int i_track;
int i_first_sector;
if( p_playlist->status.p_item->p_input == p_current )
p_item = p_playlist->status.p_item;
else
- p_item = playlist_ItemGetByInput( p_playlist, p_current, VLC_FALSE );
+ p_item = playlist_ItemGetByInput( p_playlist, p_current, false );
if( p_item )
i_ret = GetTracks( p_access, p_playlist, p_item );
int i_blocks = CDDA_BLOCKS_ONCE;
block_t *p_block;
- if( p_sys->i_track < 0 ) p_access->info.b_eof = VLC_TRUE;
+ if( p_sys->i_track < 0 ) p_access->info.b_eof = true;
/* Check end of file */
if( p_access->info.b_eof ) return NULL;
/* Return only the header */
p_block = block_New( p_access, sizeof( WAVEHEADER ) );
memcpy( p_block->p_buffer, &p_sys->waveheader, sizeof(WAVEHEADER) );
- p_sys->b_header = VLC_TRUE;
+ p_sys->b_header = true;
return p_block;
}
if( p_sys->i_sector >= p_sys->i_last_sector )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return NULL;
}
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int *pi_int;
int64_t *pi_64;
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true;
break;
case ACCESS_GET_MTU:
return VLC_EGENERIC;
}
- p_item_in_category = playlist_ItemToNode( p_playlist, p_parent, VLC_FALSE );
+ p_item_in_category = playlist_ItemToNode( p_playlist, p_parent, false );
playlist_ItemSetName( p_parent, "Audio CD" );
var_SetInteger( p_playlist, "item-change", p_parent->p_input->i_id );
int i_ret = playlist_BothAddInput( p_playlist, p_input_item,
p_item_in_category,
PLAYLIST_APPEND, PLAYLIST_END, NULL, NULL,
- VLC_FALSE );
+ false );
vlc_gc_decref( p_input_item );
free( psz_uri ); free( psz_opt ); free( psz_name );
free( psz_first ); free( psz_last );
/* Return only the dummy RIFF header we created in Open/Init */
p_block = block_New( p_access, sizeof( WAVEHEADER ) );
memcpy( p_block->p_buffer, &p_cdda->waveheader, sizeof(WAVEHEADER) );
- p_cdda->b_header = VLC_TRUE;
+ p_cdda->b_header = true;
return p_block;
}
if( go_on )
{
dbg_print( (INPUT_DBG_LSN), "EOF");
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return NULL;
}
{
msg_Err( p_access, "cannot get a new block of size: %i",
i_blocks * CDIO_CD_FRAMESIZE_RAW );
- intf_UserFatal( p_access, VLC_FALSE, _("CD reading failed"),
+ intf_UserFatal( p_access, false, _("CD reading failed"),
_("VLC could not get a new block of size: %i."),
i_blocks * CDIO_CD_FRAMESIZE_RAW );
return NULL;
if( p_cdda->i_track >= p_cdda->i_first_track + p_cdda->i_titles - 1 )
{
dbg_print( (INPUT_DBG_LSN), "EOF");
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
p_access->info.i_update |= INPUT_UPDATE_TITLE;
}
p_access->info.i_pos = i_pos;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
return VLC_SUCCESS;
}
cdda_data_t *p_cdda = NULL;
CdIo_t *p_cdio;
track_t i_track = 1;
- vlc_bool_t b_single_track = false;
+ bool b_single_track = false;
int i_rc = VLC_EGENERIC;
p_access->p_sys = NULL;
#endif
p_cdda->psz_source = strdup( psz_source );
- p_cdda->b_header = VLC_FALSE;
+ p_cdda->b_header = false;
p_cdda->p_cdio = p_cdio;
p_cdda->i_tracks = 0;
p_cdda->i_titles = 0;
}
p_access->info.i_update = 0;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_access->info.i_title = 0;
p_access->info.i_seekpoint = 0;
case ACCESS_CAN_CONTROL_PACE:
{
- vlc_bool_t *pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = p_cdda->b_audio_ctl ? VLC_FALSE : VLC_TRUE;
+ bool *pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = p_cdda->b_audio_ctl ? false : true;
dbg_print( INPUT_DBG_META, "can control pace? %d", *pb_bool);
return VLC_SUCCESS;
}
dbg_print( INPUT_DBG_META, "can pause?");
common:
{
- vlc_bool_t *pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE;
+ bool *pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true;
return VLC_SUCCESS;
}
/* Configuration options */
add_integer ( MODULE_STRING "-debug", 0, CDDADebugCB,
N_("Additional debug"),
- DEBUG_LONGTEXT, VLC_TRUE );
+ DEBUG_LONGTEXT, true );
add_integer( MODULE_STRING "-caching",
DEFAULT_PTS_DELAY / MILLISECONDS_PER_SEC, NULL,
N_("Caching value in microseconds"),
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
add_integer( MODULE_STRING "-blocks-per-read",
DEFAULT_BLOCKS_PER_READ, CDDABlocksPerReadCB,
N_("Number of blocks per CD read"),
- BLOCKS_PER_READ_LONGTEXT, VLC_TRUE );
+ BLOCKS_PER_READ_LONGTEXT, true );
add_string( MODULE_STRING "-title-format",
"Track %T. %t", NULL,
N_("Format to use in playlist \"title\" field when no CDDB"),
- TITLE_FMT_LONGTEXT, VLC_TRUE );
+ TITLE_FMT_LONGTEXT, true );
#if LIBCDIO_VERSION_NUM >= 73
- add_bool( MODULE_STRING "-analog-output", VLC_FALSE, NULL,
+ add_bool( MODULE_STRING "-analog-output", false, NULL,
N_("Use CD audio controls and output?"),
N_("If set, audio controls and audio jack output are used"),
- VLC_FALSE );
+ false );
#endif
- add_bool( MODULE_STRING "-cdtext-enabled", VLC_TRUE, CDTextEnabledCB,
+ add_bool( MODULE_STRING "-cdtext-enabled", true, CDTextEnabledCB,
N_("Do CD-Text lookups?"),
N_("If set, get CD-Text information"),
- VLC_FALSE );
+ false );
- add_bool( MODULE_STRING "-navigation-mode", VLC_TRUE,
+ add_bool( MODULE_STRING "-navigation-mode", true,
#if FIXED
CDDANavModeCB,
#else
N_("Use Navigation-style playback?"),
N_("Tracks are navigated via Navagation rather than "
"a playlist entries"),
- VLC_FALSE );
+ false );
#if LIBCDIO_VERSION_NUM >= 72
add_string( MODULE_STRING "-paranoia", NULL, NULL,
PARANOIA_TEXT,
PARANOIA_LONGTEXT,
- VLC_FALSE );
+ false );
change_string_list( psz_paranoia_list, psz_paranoia_list_text, 0 );
#endif /* LIBCDIO_VERSION_NUM >= 72 */
add_string( MODULE_STRING "-cddb-title-format",
"Track %T. %t - %p %A", NULL,
N_("Format to use in playlist \"title\" field when using CDDB"),
- CDDB_TITLE_FMT_LONGTEXT, VLC_TRUE );
+ CDDB_TITLE_FMT_LONGTEXT, true );
- add_bool( MODULE_STRING "-cddb-enabled", VLC_TRUE, CDDBEnabledCB,
+ add_bool( MODULE_STRING "-cddb-enabled", true, CDDBEnabledCB,
N_("CDDB lookups"),
N_("If set, lookup CD-DA track information using the CDDB "
"protocol"),
- VLC_FALSE );
+ false );
add_string( MODULE_STRING "-cddb-server", "freedb.freedb.org", NULL,
N_("CDDB server"),
N_( "Contact this CDDB server look up CD-DA information"),
- VLC_TRUE );
+ true );
add_integer( MODULE_STRING "-cddb-port", 8880, NULL,
N_("CDDB server port"),
N_("CDDB server uses this port number to communicate on"),
- VLC_TRUE );
+ true );
add_string( MODULE_STRING "-cddb-email", "me@home", NULL,
N_("email address reported to CDDB server"),
N_("email address reported to CDDB server"),
- VLC_TRUE );
+ true );
- add_bool( MODULE_STRING "-cddb-enable-cache", VLC_TRUE, NULL,
+ add_bool( MODULE_STRING "-cddb-enable-cache", true, NULL,
N_("Cache CDDB lookups?"),
N_("If set cache CDDB information about this CD"),
- VLC_FALSE );
+ false );
- add_bool( MODULE_STRING "-cddb-httpd", VLC_FALSE, NULL,
+ add_bool( MODULE_STRING "-cddb-httpd", false, NULL,
N_("Contact CDDB via the HTTP protocol?"),
N_("If set, the CDDB server gets information via the CDDB HTTP "
"protocol"),
- VLC_TRUE );
+ true );
add_integer( MODULE_STRING "-cddb-timeout", 10, NULL,
N_("CDDB server timeout"),
N_("Time (in seconds) to wait for a response from the "
"CDDB server"),
- VLC_FALSE );
+ false );
add_string( MODULE_STRING "-cddb-cachedir", "~/.cddbslave", NULL,
N_("Directory to cache CDDB requests"),
N_("Directory to cache CDDB requests"),
- VLC_TRUE );
+ true );
- add_bool( MODULE_STRING "-cdtext-prefer", VLC_TRUE, CDTextPreferCB,
+ add_bool( MODULE_STRING "-cdtext-prefer", true, CDTextPreferCB,
N_("Prefer CD-Text info to CDDB info?"),
N_("If set, CD-Text information will be preferred "
"to CDDB information when both are available"),
- VLC_FALSE );
+ false );
#endif /*HAVE_LIBCDDB*/
vlc_module_end();
#endif
#ifdef HAVE_LIBCDDB
- vlc_bool_t b_cddb_enabled; /* Use CDDB at all? */
+ bool b_cddb_enabled; /* Use CDDB at all? */
struct {
- vlc_bool_t have_info; /* True if we have any info */
+ bool have_info; /* True if we have any info */
cddb_disc_t *disc; /* libcdio uses this to get disc
info */
int disc_length; /* Length in frames of cd. Used
} cddb;
#endif
- vlc_bool_t b_audio_ctl; /* Use CD-Text audio controls and
+ bool b_audio_ctl; /* Use CD-Text audio controls and
audio output? */
- vlc_bool_t b_cdtext; /* Use CD-Text at all? If not,
+ bool b_cdtext; /* Use CD-Text at all? If not,
cdtext_preferred is meaningless. */
- vlc_bool_t b_cdtext_prefer; /* Prefer CD-Text info over
+ bool b_cdtext_prefer; /* Prefer CD-Text info over
CDDB? If no CDDB, the issue
is moot. */
*/
WAVEHEADER waveheader; /* Wave header for the output data */
- vlc_bool_t b_header;
- vlc_bool_t b_nav_mode; /* If false we view the entire CD as
+ bool b_header;
+ bool b_nav_mode; /* If false we view the entire CD as
as a unit rather than each track
as a unit. If b_nav_mode then the
slider area represents the Disc rather
static char temp_str[TEMP_STR_SIZE];
size_t i;
char * tp = temp_str;
- vlc_bool_t saw_control_prefix = false;
+ bool saw_control_prefix = false;
size_t format_len = strlen(format_str);
memset(temp_str, 0, TEMP_STR_SIZE);
int CDDAAddMetaToItem( access_t *p_access, cdda_data_t *p_cdda,
playlist_item_t *p_item, int i_track,
- vlc_bool_t b_single )
+ bool b_single )
{
#if 0
add_playlist_track_info_str("Source", p_cdda->psz_source);
*/
int
CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
- vlc_bool_t b_single_track )
+ bool b_single_track )
{
int i;
playlist_t * p_playlist = NULL;
const track_t i_first_track = p_cdda->i_first_track;
playlist_item_t *p_item = NULL;
- vlc_bool_t b_play = VLC_FALSE;
+ bool b_play = false;
track_t i_track;
#ifdef HAVE_LIBCDDB
input_thread_t *p_input = (input_thread_t*)vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT );
if( p_input )
{
- p_item = playlist_ItemGetByInput( p_playlist, input_GetItem(p_input), VLC_FALSE );
+ p_item = playlist_ItemGetByInput( p_playlist, input_GetItem(p_input), false );
if( p_item == p_playlist->status.p_item && !b_single_track )
- b_play = VLC_TRUE;
+ b_play = true;
else
- b_play = VLC_FALSE;
+ b_play = false;
vlc_object_release( p_input );
}
}
if( p_item )
{
- CDDAAddMetaToItem( p_access, p_cdda, p_item, i_track, VLC_FALSE );
+ CDDAAddMetaToItem( p_access, p_cdda, p_item, i_track, false );
input_item_SetDuration( p_item->p_input, (mtime_t) i_track_frames
* (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC) );
input_item_SetURI( p_item->p_input,
input_title_t *t;
if ( !p_cdda->b_nav_mode )
- playlist_ItemToNode( p_playlist, p_item, VLC_FALSE );
+ playlist_ItemToNode( p_playlist, p_item, false );
for( i = 0 ; i < p_cdda->i_tracks ; i++ )
{
p_item,
i_track );
CDDAAddMetaToItem( p_access, p_cdda, p_child, i_track,
- VLC_TRUE );
+ true );
}
}
if( b_play )
{
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
p_playlist->status.p_item, NULL );
}
Fills out playlist information.
*/
int CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
- vlc_bool_t b_single_track );
+ bool b_single_track );
/*
Sets CDDA Meta Information. In the Control routine,
*****************************************************************************/
static int Control( demux_t *p_demux, int i_query, va_list args )
{
- vlc_bool_t *pb;
+ bool *pb;
int64_t *pi64;
switch( i_query )
case DEMUX_CAN_SEEK:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
- pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *pb = VLC_FALSE;
+ pb = (bool*)va_arg( args, bool * );
+ *pb = false;
return VLC_SUCCESS;
case DEMUX_GET_PTS_DELAY:
add_shortcut( "dir" );
add_shortcut( "file" );
add_string( "recursive", "expand" , NULL, RECURSIVE_TEXT,
- RECURSIVE_LONGTEXT, VLC_FALSE );
+ RECURSIVE_LONGTEXT, false );
change_string_list( psz_recursive_list, psz_recursive_list_text, 0 );
add_string( "ignore-filetypes", "m3u,db,nfo,jpg,gif,sfv,txt,sub,idx,srt,cue",
- NULL, IGNORE_TEXT, IGNORE_LONGTEXT, VLC_FALSE );
+ NULL, IGNORE_TEXT, IGNORE_LONGTEXT, false );
set_callbacks( Open, Close );
add_submodule();
}
p_current_input = input_GetItem( p_input );
- p_current = playlist_ItemGetByInput( p_playlist, p_current_input, VLC_FALSE );
+ p_current = playlist_ItemGetByInput( p_playlist, p_current_input, false );
if( !p_current )
{
p_current->p_input->i_type = ITEM_TYPE_DIRECTORY;
p_item_in_category = playlist_ItemToNode( p_playlist, p_current,
- VLC_FALSE );
+ false );
i_activity = var_GetInteger( p_playlist, "activity" );
var_SetInteger( p_playlist, "activity", i_activity +
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int *pi_int;
int64_t *pi_64;
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE; /* FIXME */
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false; /* FIXME */
break;
/* */
PLAYLIST_APPEND|PLAYLIST_PREPARSE|
PLAYLIST_NO_REBUILD,
PLAYLIST_END, NULL, NULL,
- VLC_FALSE );
+ false );
vlc_gc_decref( p_input );
if( i_ret != VLC_SUCCESS )
return VLC_EGENERIC;
int i_width;
int i_height;
int i_chroma;
- vlc_bool_t b_chroma; /* Force a specific chroma on the dshow input */
+ bool b_chroma; /* Force a specific chroma on the dshow input */
};
static int Demux ( demux_t * );
static int DemuxControl( demux_t *, int, va_list );
-static int OpenDevice( vlc_object_t *, access_sys_t *, string, vlc_bool_t );
+static int OpenDevice( vlc_object_t *, access_sys_t *, string, bool );
static IBaseFilter *FindCaptureDevice( vlc_object_t *, string *,
- list<string> *, vlc_bool_t );
+ list<string> *, bool );
static size_t EnumDeviceCaps( vlc_object_t *, IBaseFilter *,
int, int, int, int, int, int,
AM_MEDIA_TYPE *mt, size_t );
static void ShowPropertyPage( IUnknown * );
static void ShowDeviceProperties( vlc_object_t *, ICaptureGraphBuilder2 *,
- IBaseFilter *, vlc_bool_t );
+ IBaseFilter *, bool );
static void ShowTunerProperties( vlc_object_t *, ICaptureGraphBuilder2 *,
- IBaseFilter *, vlc_bool_t );
+ IBaseFilter *, bool );
static void ConfigTuner( vlc_object_t *, ICaptureGraphBuilder2 *,
IBaseFilter * );
#define AMTUNER_MODE_LONGTEXT N_( \
"AM Tuner mode. Can be one of DEFAULT, TV, AM_RADIO, FM_RADIO or DSS.")
-static int CommonOpen ( vlc_object_t *, access_sys_t *, vlc_bool_t );
+static int CommonOpen ( vlc_object_t *, access_sys_t *, bool );
static void CommonClose( vlc_object_t *, access_sys_t * );
static int AccessOpen ( vlc_object_t * );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "dshow-caching", (mtime_t)(0.2*CLOCK_FREQ) / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
- add_string( "dshow-vdev", NULL, NULL, VDEV_TEXT, VDEV_LONGTEXT, VLC_FALSE);
+ add_string( "dshow-vdev", NULL, NULL, VDEV_TEXT, VDEV_LONGTEXT, false);
change_string_list( ppsz_vdev, ppsz_vdev_text, FindDevicesCallback );
change_action_add( FindDevicesCallback, N_("Refresh list") );
change_action_add( ConfigDevicesCallback, N_("Configure") );
- add_string( "dshow-adev", NULL, NULL, ADEV_TEXT, ADEV_LONGTEXT, VLC_FALSE);
+ add_string( "dshow-adev", NULL, NULL, ADEV_TEXT, ADEV_LONGTEXT, false);
change_string_list( ppsz_adev, ppsz_adev_text, FindDevicesCallback );
change_action_add( FindDevicesCallback, N_("Refresh list") );
change_action_add( ConfigDevicesCallback, N_("Configure") );
- add_string( "dshow-size", NULL, NULL, SIZE_TEXT, SIZE_LONGTEXT, VLC_FALSE);
+ add_string( "dshow-size", NULL, NULL, SIZE_TEXT, SIZE_LONGTEXT, false);
add_string( "dshow-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_TRUE );
+ true );
add_float( "dshow-fps", 0.0f, NULL, FPS_TEXT, FPS_LONGTEXT,
- VLC_TRUE );
+ true );
- add_bool( "dshow-config", VLC_FALSE, NULL, CONFIG_TEXT, CONFIG_LONGTEXT,
- VLC_TRUE );
+ add_bool( "dshow-config", false, NULL, CONFIG_TEXT, CONFIG_LONGTEXT,
+ true );
- add_bool( "dshow-tuner", VLC_FALSE, NULL, TUNER_TEXT, TUNER_LONGTEXT,
- VLC_TRUE );
+ add_bool( "dshow-tuner", false, NULL, TUNER_TEXT, TUNER_LONGTEXT,
+ true );
add_integer( "dshow-tuner-channel", 0, NULL, CHANNEL_TEXT,
- CHANNEL_LONGTEXT, VLC_TRUE );
+ CHANNEL_LONGTEXT, true );
add_integer( "dshow-tuner-country", 0, NULL, COUNTRY_TEXT,
- COUNTRY_LONGTEXT, VLC_TRUE );
+ COUNTRY_LONGTEXT, true );
add_integer( "dshow-tuner-input", 0, NULL, TUNER_INPUT_TEXT,
- TUNER_INPUT_LONGTEXT, VLC_TRUE );
+ TUNER_INPUT_LONGTEXT, true );
change_integer_list( pi_tuner_input, ppsz_tuner_input_text, 0 );
add_integer( "dshow-video-input", -1, NULL, VIDEO_IN_TEXT,
- VIDEO_IN_LONGTEXT, VLC_TRUE );
+ VIDEO_IN_LONGTEXT, true );
add_integer( "dshow-audio-input", -1, NULL, AUDIO_IN_TEXT,
- AUDIO_IN_LONGTEXT, VLC_TRUE );
+ AUDIO_IN_LONGTEXT, true );
add_integer( "dshow-video-output", -1, NULL, VIDEO_OUT_TEXT,
- VIDEO_OUT_LONGTEXT, VLC_TRUE );
+ VIDEO_OUT_LONGTEXT, true );
add_integer( "dshow-audio-output", -1, NULL, AUDIO_OUT_TEXT,
- AUDIO_OUT_LONGTEXT, VLC_TRUE );
+ AUDIO_OUT_LONGTEXT, true );
add_integer( "dshow-amtuner-mode", AMTUNER_MODE_TV, NULL,
- AMTUNER_MODE_TEXT, AMTUNER_MODE_LONGTEXT, VLC_FALSE);
+ AMTUNER_MODE_TEXT, AMTUNER_MODE_LONGTEXT, false);
change_integer_list( pi_amtuner_mode, ppsz_amtuner_mode_text, 0 );
add_shortcut( "dshow" );
int i_fourcc;
es_out_id_t *p_es;
- vlc_bool_t b_pts;
+ bool b_pts;
} dshow_stream_t;
/*****************************************************************************
* CommonOpen: open direct show device
*****************************************************************************/
static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
- vlc_bool_t b_access_demux )
+ bool b_access_demux )
{
vlc_value_t val;
int i;
/* Get/parse options and open device(s) */
string vdevname, adevname;
int i_width = 0, i_height = 0, i_chroma = 0;
- vlc_bool_t b_audio = VLC_TRUE;
+ bool b_audio = true;
var_Create( p_this, "dshow-config", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Create( p_this, "dshow-tuner", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
}
free( val.psz_string );
- p_sys->b_chroma = VLC_FALSE;
+ p_sys->b_chroma = false;
var_Create( p_this, "dshow-chroma", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Get( p_this, "dshow-chroma", &val );
if( val.psz_string && strlen( val.psz_string ) >= 4 )
{
i_chroma = VLC_FOURCC( val.psz_string[0], val.psz_string[1],
val.psz_string[2], val.psz_string[3] );
- p_sys->b_chroma = VLC_TRUE;
+ p_sys->b_chroma = true;
}
free( val.psz_string );
/* Raw MPEG video stream */
p_stream->i_fourcc == VLC_FOURCC('m','p','2','v') )
{
- b_audio = VLC_FALSE;
+ b_audio = false;
if( b_access_demux )
{
if( p_stream->mt.majortype == MEDIATYPE_Stream )
{
- b_audio = VLC_FALSE;
+ b_audio = false;
if( b_access_demux )
{
memset( p_sys, 0, sizeof( access_sys_t ) );
p_demux->p_sys = (demux_sys_t *)p_sys;
- if( CommonOpen( p_this, p_sys, VLC_TRUE ) != VLC_SUCCESS )
+ if( CommonOpen( p_this, p_sys, true ) != VLC_SUCCESS )
{
CommonClose( p_this, p_sys );
return VLC_EGENERIC;
p_access->p_sys = p_sys = (access_sys_t *)malloc( sizeof( access_sys_t ) );
memset( p_sys, 0, sizeof( access_sys_t ) );
- if( CommonOpen( p_this, p_sys, VLC_FALSE ) != VLC_SUCCESS )
+ if( CommonOpen( p_this, p_sys, false ) != VLC_SUCCESS )
{
CommonClose( p_this, p_sys );
return VLC_EGENERIC;
p_access->info.i_update = 0;
p_access->info.i_size = 0;
p_access->info.i_pos = 0;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_access->info.i_title = 0;
p_access->info.i_seekpoint = 0;
p_access->p_sys = p_sys;
#define MAX_MEDIA_TYPES 32
static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
- string devicename, vlc_bool_t b_audio )
+ string devicename, bool b_audio )
{
/* See if device is already opened */
for( int i = 0; i < p_sys->i_streams; i++ )
{
msg_Err( p_this, "can't use device: %s, unsupported device type",
devicename.c_str() );
- intf_UserFatal( p_this, VLC_FALSE, _("Capturing failed"),
+ intf_UserFatal( p_this, false, _("Capturing failed"),
_("VLC cannot use the device \"%s\", because its "
"type is not supported.") );
return VLC_EGENERIC;
else {
/* capture device */
msg_Err( p_this, "capture device '%s' does not support required parameters !", devicename.c_str() );
- intf_UserFatal( p_this, VLC_FALSE, _("Capturing failed"),
+ intf_UserFatal( p_this, false, _("Capturing failed"),
_("The capture device \"%s\" does not support the "
"required parameters."), devicename.c_str() );
p_device_filter->Release();
msg_Dbg( p_this, "filters connected successfully !" );
dshow_stream_t dshow_stream;
- dshow_stream.b_pts = VLC_FALSE;
+ dshow_stream.b_pts = false;
dshow_stream.p_es = 0;
dshow_stream.mt =
p_capture_filter->CustomGetPin()->CustomGetMediaType();
static IBaseFilter *
FindCaptureDevice( vlc_object_t *p_this, string *p_devicename,
- list<string> *p_listdevices, vlc_bool_t b_audio )
+ list<string> *p_listdevices, bool b_audio )
{
IBaseFilter *p_base_filter = NULL;
IMoniker *p_moniker = NULL;
{
/* Use our data timestamp */
i_pts = sample.i_timestamp;
- p_stream->b_pts = VLC_TRUE;
+ p_stream->b_pts = true;
}
}
*****************************************************************************/
static int AccessControl( access_t *p_access, int i_query, va_list args )
{
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int *pi_int;
int64_t *pi_64;
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false;
break;
/* */
****************************************************************************/
static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
{
- vlc_bool_t *pb;
+ bool *pb;
int64_t *pi64;
switch( i_query )
case DEMUX_CAN_SEEK:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
- pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *pb = VLC_FALSE;
+ pb = (bool*)va_arg( args, bool * );
+ *pb = false;
return VLC_SUCCESS;
case DEMUX_GET_PTS_DELAY:
vlc_value_t newval, vlc_value_t oldval, void * )
{
module_config_t *p_item;
- vlc_bool_t b_audio = VLC_FALSE;
+ bool b_audio = false;
int i;
p_item = config_FindConfig( p_this, psz_name );
if( !p_item ) return VLC_SUCCESS;
- if( !strcmp( psz_name, "dshow-adev" ) ) b_audio = VLC_TRUE;
+ if( !strcmp( psz_name, "dshow-adev" ) ) b_audio = true;
/* Clear-up the current list */
if( p_item->i_list )
p_item->ppsz_list_text[i] = NULL;
/* Signal change to the interface */
- p_item->b_dirty = VLC_TRUE;
+ p_item->b_dirty = true;
return VLC_SUCCESS;
}
vlc_value_t newval, vlc_value_t oldval, void * )
{
module_config_t *p_item;
- vlc_bool_t b_audio = VLC_FALSE;
+ bool b_audio = false;
/* Initialize OLE/COM */
CoInitialize( 0 );
p_item = config_FindConfig( p_this, psz_name );
if( !p_item ) return VLC_SUCCESS;
- if( !strcmp( psz_name, "dshow-adev" ) ) b_audio = VLC_TRUE;
+ if( !strcmp( psz_name, "dshow-adev" ) ) b_audio = true;
string devicename;
static void ShowDeviceProperties( vlc_object_t *p_this,
ICaptureGraphBuilder2 *p_graph,
IBaseFilter *p_device_filter,
- vlc_bool_t b_audio )
+ bool b_audio )
{
HRESULT hr;
msg_Dbg( p_this, "configuring Device Properties" );
static void ShowTunerProperties( vlc_object_t *p_this,
ICaptureGraphBuilder2 *p_graph,
IBaseFilter *p_device_filter,
- vlc_bool_t b_audio )
+ bool b_audio )
{
HRESULT hr;
msg_Dbg( p_this, "configuring Tuner Properties" );
set_shortname( _("dv") );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
- add_integer( "dv-caching", 60000 / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ add_integer( "dv-caching", 60000 / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true );
set_capability( "access2", 0 );
add_shortcut( "dv" );
add_shortcut( "dv1394" );
/* Set up p_access */
access_InitFields( p_access );
ACCESS_SET_CALLBACKS( NULL, Block, Control, NULL );
- p_access->info.b_prebuffered = VLC_FALSE;
+ p_access->info.b_prebuffered = false;
p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
if( !p_sys )
p_sys->p_ev->p_access = p_access;
vlc_mutex_init( p_access, &p_sys->p_ev->lock );
vlc_thread_create( p_sys->p_ev, "dv event thread handler", Raw1394EventThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE );
+ VLC_THREAD_PRIORITY_OUTPUT, false );
free( psz_name );
return VLC_SUCCESS;
static int Control( access_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int64_t *pi_64;
switch( i_query )
{
/* */
case ACCESS_CAN_PAUSE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true;
break;
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false;
break;
case ACCESS_GET_PTS_DELAY:
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "dvb-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
add_integer( "dvb-adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "dvb-device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "dvb-frequency", 11954000, NULL, FREQ_TEXT, FREQ_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "dvb-inversion", 2, NULL, INVERSION_TEXT, INVERSION_LONGTEXT,
- VLC_TRUE );
- add_bool( "dvb-probe", 1, NULL, PROBE_TEXT, PROBE_LONGTEXT, VLC_TRUE );
+ true );
+ add_bool( "dvb-probe", 1, NULL, PROBE_TEXT, PROBE_LONGTEXT, true );
add_bool( "dvb-budget-mode", 0, NULL, BUDGET_TEXT, BUDGET_LONGTEXT,
- VLC_TRUE );
+ true );
/* DVB-S (satellite) */
add_integer( "dvb-satno", 0, NULL, SATNO_TEXT, SATNO_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "dvb-voltage", 13, NULL, VOLTAGE_TEXT, VOLTAGE_LONGTEXT,
- VLC_TRUE );
+ true );
add_bool( "dvb-high-voltage", 0, NULL, HIGH_VOLTAGE_TEXT,
- HIGH_VOLTAGE_LONGTEXT, VLC_TRUE );
+ HIGH_VOLTAGE_LONGTEXT, true );
add_integer( "dvb-tone", -1, NULL, TONE_TEXT, TONE_LONGTEXT,
- VLC_TRUE );
- add_integer( "dvb-fec", 9, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_TRUE );
+ true );
+ add_integer( "dvb-fec", 9, NULL, FEC_TEXT, FEC_LONGTEXT, true );
add_integer( "dvb-srate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "dvb-lnb-lof1", 0, NULL, LNB_LOF1_TEXT,
- LNB_LOF1_LONGTEXT, VLC_TRUE );
+ LNB_LOF1_LONGTEXT, true );
add_integer( "dvb-lnb-lof2", 0, NULL, LNB_LOF2_TEXT,
- LNB_LOF2_LONGTEXT, VLC_TRUE );
+ LNB_LOF2_LONGTEXT, true );
add_integer( "dvb-lnb-slof", 0, NULL, LNB_SLOF_TEXT,
- LNB_SLOF_LONGTEXT, VLC_TRUE );
+ LNB_SLOF_LONGTEXT, true );
/* DVB-C (cable) */
add_integer( "dvb-modulation", 0, NULL, MODULATION_TEXT,
- MODULATION_LONGTEXT, VLC_TRUE );
+ MODULATION_LONGTEXT, true );
/* DVB-T (terrestrial) */
add_integer( "dvb-code-rate-hp", 9, NULL, CODE_RATE_HP_TEXT,
- CODE_RATE_HP_LONGTEXT, VLC_TRUE );
+ CODE_RATE_HP_LONGTEXT, true );
add_integer( "dvb-code-rate-lp", 9, NULL, CODE_RATE_LP_TEXT,
- CODE_RATE_LP_LONGTEXT, VLC_TRUE );
+ CODE_RATE_LP_LONGTEXT, true );
add_integer( "dvb-bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT,
- VLC_TRUE );
- add_integer( "dvb-guard", 0, NULL, GUARD_TEXT, GUARD_LONGTEXT, VLC_TRUE );
+ true );
+ add_integer( "dvb-guard", 0, NULL, GUARD_TEXT, GUARD_LONGTEXT, true );
add_integer( "dvb-transmission", 0, NULL, TRANSMISSION_TEXT,
- TRANSMISSION_LONGTEXT, VLC_TRUE );
+ TRANSMISSION_LONGTEXT, true );
add_integer( "dvb-hierarchy", 0, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT,
- VLC_TRUE );
+ true );
#ifdef ENABLE_HTTPD
/* MMI HTTP interface */
set_section( N_("HTTP server" ), 0 );
add_string( "dvb-http-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "dvb-http-user", NULL, NULL, USER_TEXT, USER_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "dvb-http-password", NULL, NULL, PASSWORD_TEXT,
- PASSWORD_LONGTEXT, VLC_TRUE );
+ PASSWORD_LONGTEXT, true );
add_string( "dvb-http-acl", NULL, NULL, ACL_TEXT, ACL_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "dvb-http-intf-cert", NULL, NULL, CERT_TEXT, CERT_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "dvb-http-intf-key", NULL, NULL, KEY_TEXT, KEY_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "dvb-http-intf-ca", NULL, NULL, CA_TEXT, CA_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "dvb-http-intf-crl", NULL, NULL, CRL_TEXT, CRL_LONGTEXT,
- VLC_TRUE );
+ true );
#endif
set_capability( "access2", 0 );
p_access->info.i_update = 0;
p_access->info.i_size = 0;
p_access->info.i_pos = 0;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_access->info.i_title = 0;
p_access->info.i_seekpoint = 0;
if ( p_sys->b_request_frontend_info )
{
msg_Warn( p_access, "frontend timeout for HTTP interface" );
- p_sys->b_request_frontend_info = VLC_FALSE;
+ p_sys->b_request_frontend_info = false;
p_sys->psz_frontend_info = strdup( "Timeout getting info\n" );
}
if ( p_sys->b_request_mmi_info )
{
msg_Warn( p_access, "MMI timeout for HTTP interface" );
- p_sys->b_request_mmi_info = VLC_FALSE;
+ p_sys->b_request_mmi_info = false;
p_sys->psz_mmi_info = strdup( "Timeout getting info\n" );
}
vlc_cond_signal( &p_sys->httpd_cond );
static int Control( access_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
- vlc_bool_t *pb_bool, b_bool;
+ bool *pb_bool, b_bool;
int *pi_int, i_int;
int64_t *pi_64;
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false;
break;
/* */
case ACCESS_GET_MTU:
{
msg_Err( p_access, "the DVB input old syntax is deprecated, use vlc "
"-p dvb to see an explanation of the new syntax" );
- intf_UserFatal( p_access, VLC_TRUE, _("Input syntax is deprecated"),
+ intf_UserFatal( p_access, true, _("Input syntax is deprecated"),
_("The given syntax is deprecated. Run \"vlc -p dvb\" to see an " \
"explanation of the new syntax.") );
free( psz_dup );
else
{
msg_Err( p_access, "illegal polarization %c", *psz_parser );
- intf_UserFatal( p_access, VLC_FALSE, _("Illegal Polarization"),
+ intf_UserFatal( p_access, false, _("Illegal Polarization"),
_("The provided polarization \"%c\" is not valid."),
*psz_parser );
free( psz_dup );
{
struct
{
- vlc_bool_t b_blind;
+ bool b_blind;
char *psz_text;
} enq;
struct
{
- vlc_bool_t b_ok;
+ bool b_ok;
char *psz_answ;
} answ;
int i_handle, i_frontend_handle;
demux_handle_t p_demux_handles[MAX_DEMUX];
frontend_t *p_frontend;
- vlc_bool_t b_budget_mode;
+ bool b_budget_mode;
/* CA management */
int i_ca_handle;
int i_ca_type;
int i_nb_slots;
- vlc_bool_t pb_active_slot[MAX_CI_SLOTS];
- vlc_bool_t pb_tc_has_data[MAX_CI_SLOTS];
- vlc_bool_t pb_slot_mmi_expected[MAX_CI_SLOTS];
- vlc_bool_t pb_slot_mmi_undisplayed[MAX_CI_SLOTS];
+ bool pb_active_slot[MAX_CI_SLOTS];
+ bool pb_tc_has_data[MAX_CI_SLOTS];
+ bool pb_slot_mmi_expected[MAX_CI_SLOTS];
+ bool pb_slot_mmi_undisplayed[MAX_CI_SLOTS];
en50221_session_t p_sessions[MAX_SESSIONS];
mtime_t i_ca_timeout, i_ca_next_event, i_frontend_timeout;
dvbpsi_pmt_t *pp_selected_programs[MAX_PROGRAMS];
vlc_mutex_t httpd_mutex;
vlc_cond_t httpd_cond;
mtime_t i_httpd_timeout;
- vlc_bool_t b_request_frontend_info, b_request_mmi_info;
+ bool b_request_frontend_info, b_request_mmi_info;
char *psz_frontend_info, *psz_mmi_info;
char *psz_request;
#endif
#define T_DATA_LAST 0xA0
#define T_DATA_MORE 0xA1
-static void Dump( vlc_bool_t b_outgoing, uint8_t *p_data, int i_size )
+static void Dump( bool b_outgoing, uint8_t *p_data, int i_size )
{
#ifdef DEBUG_TPDU
int i;
default:
break;
}
- Dump( VLC_TRUE, p_data, i_size );
+ Dump( true, p_data, i_size );
if ( write( p_sys->i_ca_handle, p_data, i_size ) != i_size )
{
&& p_data[i_size - 4] == T_SB
&& p_data[i_size - 3] == 2
&& (p_data[i_size - 1] & DATA_INDICATOR))
- ? VLC_TRUE : VLC_FALSE;
+ ? true : false;
- Dump( VLC_FALSE, p_data, i_size );
+ Dump( false, p_data, i_size );
if ( pi_size == NULL )
free( p_data );
msg_Dbg( p_access, "entering MMI menus on session %d", i_session_id );
APDUSend( p_access, i_session_id, AOT_ENTER_MENU, NULL, 0 );
- p_sys->pb_slot_mmi_expected[i_slot] = VLC_TRUE;
+ p_sys->pb_slot_mmi_expected[i_slot] = true;
}
/*****************************************************************************
uint16_t pi_system_ids[MAX_CASYSTEM_IDS + 1];
} system_ids_t;
-static vlc_bool_t CheckSystemID( system_ids_t *p_ids, uint16_t i_id )
+static bool CheckSystemID( system_ids_t *p_ids, uint16_t i_id )
{
int i = 0;
- if( !p_ids ) return VLC_TRUE;
+ if( !p_ids ) return true;
while ( p_ids->pi_system_ids[i] )
{
if ( p_ids->pi_system_ids[i] == i_id )
- return VLC_TRUE;
+ return true;
i++;
}
- return VLC_FALSE;
+ return false;
}
/*****************************************************************************
* CAPMTNeedsDescrambling
*****************************************************************************/
-static vlc_bool_t CAPMTNeedsDescrambling( dvbpsi_pmt_t *p_pmt )
+static bool CAPMTNeedsDescrambling( dvbpsi_pmt_t *p_pmt )
{
dvbpsi_descriptor_t *p_dr;
dvbpsi_pmt_es_t *p_es;
{
if( p_dr->i_tag == 0x9 )
{
- return VLC_TRUE;
+ return true;
}
}
{
if( p_dr->i_tag == 0x9 )
{
- return VLC_TRUE;
+ return true;
}
}
}
- return VLC_FALSE;
+ return false;
}
/*****************************************************************************
i_tag = AOT_ANSW;
i_size = 1 + strlen( p_object->u.answ.psz_answ );
p_data = malloc( i_size );
- p_data[0] = (p_object->u.answ.b_ok == VLC_TRUE) ? 0x1 : 0x0;
+ p_data[0] = (p_object->u.answ.b_ok == true) ? 0x1 : 0x0;
strncpy( (char *)&p_data[1], p_object->u.answ.psz_answ, i_size - 1 );
break;
APDUSend( p_access, i_session_id, i_tag, p_data, i_size );
free( p_data );
- p_sys->pb_slot_mmi_expected[i_slot] = VLC_TRUE;
+ p_sys->pb_slot_mmi_expected[i_slot] = true;
}
/*****************************************************************************
APDUSend( p_access, i_session_id, AOT_CLOSE_MMI, NULL, 0 );
- p_sys->pb_slot_mmi_expected[i_slot] = VLC_TRUE;
+ p_sys->pb_slot_mmi_expected[i_slot] = true;
}
/*****************************************************************************
en50221_MMIFree( &p_mmi->last_object );
p_mmi->last_object.i_object_type = EN50221_MMI_ENQ;
- p_mmi->last_object.u.enq.b_blind = (*d & 0x1) ? VLC_TRUE : VLC_FALSE;
+ p_mmi->last_object.u.enq.b_blind = (*d & 0x1) ? true : false;
d += 2; /* skip answer_text_length because it is not mandatory */
l -= 2;
p_mmi->last_object.u.enq.psz_text = malloc( l + 1 );
p_mmi->last_object.u.enq.psz_text[l] = '\0';
msg_Dbg( p_access, "MMI enq: %s%s", p_mmi->last_object.u.enq.psz_text,
- p_mmi->last_object.u.enq.b_blind == VLC_TRUE ? " (blind)" : "" );
- p_sys->pb_slot_mmi_expected[i_slot] = VLC_FALSE;
- p_sys->pb_slot_mmi_undisplayed[i_slot] = VLC_TRUE;
+ p_mmi->last_object.u.enq.b_blind == true ? " (blind)" : "" );
+ p_sys->pb_slot_mmi_expected[i_slot] = false;
+ p_sys->pb_slot_mmi_undisplayed[i_slot] = true;
}
/*****************************************************************************
msg_Dbg( p_access, "MMI choice: %s", psz_text );
}
}
- p_sys->pb_slot_mmi_expected[i_slot] = VLC_FALSE;
- p_sys->pb_slot_mmi_undisplayed[i_slot] = VLC_TRUE;
+ p_sys->pb_slot_mmi_expected[i_slot] = false;
+ p_sys->pb_slot_mmi_undisplayed[i_slot] = true;
}
/*****************************************************************************
free( p_sys->p_sessions[i_session_id - 1].p_sys );
msg_Dbg( p_access, "closing MMI session (%d)", i_session_id );
- p_sys->pb_slot_mmi_expected[i_slot] = VLC_FALSE;
- p_sys->pb_slot_mmi_undisplayed[i_slot] = VLC_TRUE;
+ p_sys->pb_slot_mmi_expected[i_slot] = false;
+ p_sys->pb_slot_mmi_undisplayed[i_slot] = true;
}
/*****************************************************************************
if ( TPDURecv( p_access, i_slot, &i_tag, NULL, NULL ) == VLC_SUCCESS
&& i_tag == T_CTC_REPLY )
{
- p_sys->pb_active_slot[i_slot] = VLC_TRUE;
+ p_sys->pb_active_slot[i_slot] = true;
break;
}
{
msg_Dbg( p_access, "en50221_Poll: slot %d has been removed",
i_slot );
- p_sys->pb_active_slot[i_slot] = VLC_FALSE;
- p_sys->pb_slot_mmi_expected[i_slot] = VLC_FALSE;
- p_sys->pb_slot_mmi_undisplayed[i_slot] = VLC_FALSE;
+ p_sys->pb_active_slot[i_slot] = false;
+ p_sys->pb_slot_mmi_expected[i_slot] = false;
+ p_sys->pb_slot_mmi_undisplayed[i_slot] = false;
/* Close all sessions for this slot. */
for ( i_session_id = 1; i_session_id <= MAX_SESSIONS;
{
access_sys_t *p_sys = p_access->p_sys;
int i, i_session_id;
- vlc_bool_t b_update = VLC_FALSE;
- vlc_bool_t b_needs_descrambling = CAPMTNeedsDescrambling( p_pmt );
+ bool b_update = false;
+ bool b_needs_descrambling = CAPMTNeedsDescrambling( p_pmt );
for ( i = 0; i < MAX_PROGRAMS; i++ )
{
&& p_sys->pp_selected_programs[i]->i_program_number
== p_pmt->i_program_number )
{
- b_update = VLC_TRUE;
+ b_update = true;
if ( !b_needs_descrambling )
{
access_sys_t *p_sys = p_access->p_sys;
int i_session_id;
- if ( p_sys->pb_slot_mmi_expected[i_slot] == VLC_TRUE )
+ if ( p_sys->pb_slot_mmi_expected[i_slot] == true )
return NULL; /* should not happen */
for ( i_session_id = 1; i_session_id <= MAX_SESSIONS; i_session_id++ )
vlc_mutex_init( p_access, &p_sys->httpd_mutex );
vlc_cond_init( p_access, &p_sys->httpd_cond );
- p_sys->b_request_frontend_info = p_sys->b_request_mmi_info = VLC_FALSE;
+ p_sys->b_request_frontend_info = p_sys->b_request_mmi_info = false;
p_sys->i_httpd_timeout = 0;
psz_address = var_GetNonEmptyString( p_access, "dvb-http-host" );
if ( psz_acl != NULL )
{
- p_acl = ACL_Create( p_access, VLC_FALSE );
+ p_acl = ACL_Create( p_access, false );
if( ACL_LoadFile( p_acl, psz_acl ) )
{
ACL_Destroy( p_acl );
{
/* Unlock the thread if it is stuck in HttpCallback */
vlc_mutex_lock( &p_sys->httpd_mutex );
- if ( p_sys->b_request_frontend_info == VLC_TRUE )
+ if ( p_sys->b_request_frontend_info == true )
{
- p_sys->b_request_frontend_info = VLC_FALSE;
+ p_sys->b_request_frontend_info = false;
p_sys->psz_frontend_info = strdup("");
}
- if ( p_sys->b_request_mmi_info == VLC_TRUE )
+ if ( p_sys->b_request_mmi_info == true )
{
- p_sys->b_request_mmi_info = VLC_FALSE;
+ p_sys->b_request_mmi_info = false;
p_sys->psz_mmi_info = strdup("");
}
vlc_cond_signal( &p_sys->httpd_cond );
p_sys->i_httpd_timeout = mdate() + I64C(3000000); /* 3 s */
p_sys->psz_request = psz_request;
- p_sys->b_request_frontend_info = VLC_TRUE;
+ p_sys->b_request_frontend_info = true;
if ( p_sys->i_ca_handle )
{
- p_sys->b_request_mmi_info = VLC_TRUE;
+ p_sys->b_request_mmi_info = true;
}
else
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t * p_frontend;
unsigned int i_adapter, i_device;
- vlc_bool_t b_probe;
+ bool b_probe;
char frontend[128];
i_adapter = var_GetInteger( p_access, "dvb-adapter" );
out:
vlc_mutex_lock( &p_sys->httpd_mutex );
- p_sys->b_request_frontend_info = VLC_FALSE;
+ p_sys->b_request_frontend_info = false;
vlc_cond_signal( &p_sys->httpd_cond );
vlc_mutex_unlock( &p_sys->httpd_mutex );
}
}
p_sys->i_nb_slots = caps.slot_num;
- memset( p_sys->pb_active_slot, 0, sizeof(vlc_bool_t) * MAX_CI_SLOTS );
- memset( p_sys->pb_slot_mmi_expected, 0, sizeof(vlc_bool_t) * MAX_CI_SLOTS );
+ memset( p_sys->pb_active_slot, 0, sizeof(bool) * MAX_CI_SLOTS );
+ memset( p_sys->pb_slot_mmi_expected, 0, sizeof(bool) * MAX_CI_SLOTS );
memset( p_sys->pb_slot_mmi_undisplayed, 0,
- sizeof(vlc_bool_t) * MAX_CI_SLOTS );
+ sizeof(bool) * MAX_CI_SLOTS );
return E_(en50221_Init)( p_access );
}
* the user input to avoid confusing the CAM. */
for ( i_slot = 0; i_slot < p_sys->i_nb_slots; i_slot++ )
{
- if ( p_sys->pb_slot_mmi_undisplayed[i_slot] == VLC_TRUE )
+ if ( p_sys->pb_slot_mmi_undisplayed[i_slot] == true )
{
p_sys->psz_request = NULL;
msg_Dbg( p_access,
char *psz_request = p_sys->psz_request;
char psz_value[255];
int i_slot;
- vlc_bool_t b_ok = VLC_FALSE;
+ bool b_ok = false;
p_sys->psz_request = NULL;
if ( E_(HTTPExtractValue)( psz_request, "cancel", psz_value,
sizeof(psz_value) ) == NULL )
{
- b_ok = VLC_TRUE;
+ b_ok = true;
}
if ( E_(HTTPExtractValue)( psz_request, "type", psz_value,
{
mmi_object.i_object_type = EN50221_MMI_ANSW;
mmi_object.u.answ.b_ok = b_ok;
- if ( b_ok == VLC_FALSE )
+ if ( b_ok == false )
{
mmi_object.u.answ.psz_answ = strdup("");
}
else
{
mmi_object.i_object_type = EN50221_MMI_MENU_ANSW;
- if ( b_ok == VLC_FALSE )
+ if ( b_ok == false )
{
mmi_object.u.menu_answ.i_choice = 0;
}
/* Check that we have all necessary MMI information. */
for ( i_slot = 0; i_slot < p_sys->i_nb_slots; i_slot++ )
{
- if ( p_sys->pb_slot_mmi_expected[i_slot] == VLC_TRUE )
+ if ( p_sys->pb_slot_mmi_expected[i_slot] == true )
return;
}
{
ca_slot_info_t sinfo;
- p_sys->pb_slot_mmi_undisplayed[i_slot] = VLC_FALSE;
+ p_sys->pb_slot_mmi_undisplayed[i_slot] = false;
p += sprintf( p, "<p>CA slot #%d: ", i_slot );
sinfo.num = i_slot;
p += sprintf( p, "<input type=hidden name=type value=enq>\n" );
p += sprintf( p, "<table border=1><tr><th>%s</th></tr>\n",
p_object->u.enq.psz_text );
- if ( p_object->u.enq.b_blind == VLC_FALSE )
+ if ( p_object->u.enq.b_blind == false )
p += sprintf( p, "<tr><td><input type=text name=answ></td></tr>\n" );
else
p += sprintf( p, "<tr><td><input type=password name=answ></td></tr>\n" );
out:
vlc_mutex_lock( &p_sys->httpd_mutex );
- p_sys->b_request_mmi_info = VLC_FALSE;
+ p_sys->b_request_mmi_info = false;
vlc_cond_signal( &p_sys->httpd_cond );
vlc_mutex_unlock( &p_sys->httpd_mutex );
}
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "dvdnav-angle", 1, NULL, ANGLE_TEXT,
- ANGLE_LONGTEXT, VLC_FALSE );
+ ANGLE_LONGTEXT, false );
add_integer( "dvdnav-caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
- add_bool( "dvdnav-menu", VLC_TRUE, NULL,
- MENU_TEXT, MENU_LONGTEXT, VLC_FALSE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
+ add_bool( "dvdnav-menu", true, NULL,
+ MENU_TEXT, MENU_LONGTEXT, false );
set_capability( "access_demux", 5 );
add_shortcut( "dvd" );
add_shortcut( "dvdnav" );
demux_t *p_demux;
vlc_mutex_t lock;
- vlc_bool_t b_moved;
- vlc_bool_t b_clicked;
+ bool b_moved;
+ bool b_clicked;
int i_key_action;
- vlc_bool_t b_still;
+ bool b_still;
int64_t i_still_end;
} event_thread_t;
/* palette for menus */
uint32_t clut[16];
uint8_t palette[4][4];
- vlc_bool_t b_spu_change;
+ bool b_spu_change;
/* */
int i_aspect;
static void DemuxTitles( demux_t * );
static void ESSubtitleUpdate( demux_t * );
-static void ButtonUpdate( demux_t *, vlc_bool_t );
+static void ButtonUpdate( demux_t *, bool );
static void ESNew( demux_t *, int );
static int ProbeDVD( demux_t *, char * );
p_sys->i_aspect = -1;
p_sys->i_mux_rate = 0;
p_sys->i_pgc_length = 0;
- p_sys->b_spu_change = VLC_FALSE;
+ p_sys->b_spu_change = false;
if( 1 )
{
if( dvdnav_title_play( p_sys->dvdnav, 1 ) != DVDNAV_STATUS_OK )
{
msg_Err( p_demux, "cannot set title (can't decrypt DVD?)" );
- intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"),
+ intf_UserFatal( p_demux, false, _("Playback failure"),
_("VLC cannot set the DVD's title. It possibly "
"cannot decrypt the entire disk.") );
dvdnav_close( p_sys->dvdnav );
p_sys->p_ev = vlc_object_create( p_demux, sizeof( event_thread_t ) );
&nbs