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 ) );
p_sys->p_ev->p_demux = p_demux;
vlc_thread_create( p_sys->p_ev, "dvdnav event thread handler", EventThread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE );
+ VLC_THREAD_PRIORITY_LOW, false );
return VLC_SUCCESS;
}
{
demux_sys_t *p_sys = p_demux->p_sys;
double f, *pf;
- vlc_bool_t *pb;
+ bool *pb;
int64_t *pi64;
input_title_t ***ppp_title;
int *pi_int;
case DEMUX_CAN_SEEK:
case DEMUX_CAN_CONTROL_PACE:
/* TODO */
- pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *pb = VLC_TRUE;
+ pb = (bool*)va_arg( args, bool * );
+ *pb = true;
return VLC_SUCCESS;
case DEMUX_SET_PAUSE_STATE:
{
msg_Dbg( p_demux, "DVDNAV_STILL_FRAME" );
msg_Dbg( p_demux, " - length=0x%x", event->length );
- p_sys->p_ev->b_still = VLC_TRUE;
+ p_sys->p_ev->b_still = true;
if( event->length == 0xff )
{
p_sys->p_ev->i_still_end = 0;
event->physical_pan_scan );
ESSubtitleUpdate( p_demux );
- p_sys->b_spu_change = VLC_TRUE;
+ p_sys->b_spu_change = true;
/* HACK to get the SPU tracks registered in the right order */
for( i = 0; i < 0x1f; i++ )
es_format_Clean( &tk->fmt );
if( tk->es ) es_out_Del( p_demux->out, tk->es );
}
- tk->b_seen = VLC_FALSE;
+ tk->b_seen = false;
}
if( dvdnav_current_title_info( p_sys->dvdnav, &i_title,
DemuxBlock( p_demux, packet, i_len );
if( p_sys->b_spu_change )
{
- ButtonUpdate( p_demux, VLC_FALSE );
- p_sys->b_spu_change = VLC_FALSE;
+ ButtonUpdate( p_demux, false );
+ p_sys->b_spu_change = false;
}
break;
}
msg_Dbg( p_demux, "DVDNAV_HIGHLIGHT" );
msg_Dbg( p_demux, " - display=%d", event->display );
msg_Dbg( p_demux, " - buttonN=%d", event->buttonN );
- ButtonUpdate( p_demux, VLC_FALSE );
+ ButtonUpdate( p_demux, false );
break;
}
/* Menu */
t = vlc_input_title_New();
- t->b_menu = VLC_TRUE;
+ t->b_menu = true;
t->psz_name = strdup( "DVD Menu" );
s = vlc_seekpoint_New();
/*****************************************************************************
* Update functions:
*****************************************************************************/
-static void ButtonUpdate( demux_t *p_demux, vlc_bool_t b_mode )
+static void ButtonUpdate( demux_t *p_demux, bool b_mode )
{
demux_sys_t *p_sys = p_demux->p_sys;
vlc_value_t val;
val.p_address = (void *)p_sys->palette;
var_Set( p_sys->p_input, "menu-palette", val );
- val.b_bool = VLC_TRUE; var_Set( p_sys->p_input, "highlight", val );
+ val.b_bool = true; var_Set( p_sys->p_input, "highlight", val );
vlc_mutex_unlock( p_mutex );
msg_Dbg( p_demux, "buttonUpdate %d", i_button );
/* Show all */
vlc_mutex_lock( p_mutex );
- val.b_bool = VLC_FALSE;
+ val.b_bool = false;
var_Set( p_sys->p_input, "highlight", val );
vlc_mutex_unlock( p_mutex );
}
int i_spu = dvdnav_get_active_spu_stream( p_sys->dvdnav );
int32_t i_title, i_part;
- ButtonUpdate( p_demux, VLC_FALSE );
+ ButtonUpdate( p_demux, false );
dvdnav_current_title_info( p_sys->dvdnav, &i_title, &i_part );
if( i_title > 0 ) return;
/* be sure to unselect it (reset) */
es_out_Control( p_demux->out, ES_OUT_SET_ES_STATE, tk->es,
- (vlc_bool_t)VLC_FALSE );
+ (bool)false );
/* now select it */
es_out_Control( p_demux->out, ES_OUT_SET_ES, tk->es );
if( tk->b_seen )
{
es_out_Control( p_demux->out, ES_OUT_SET_ES_STATE, tk->es,
- (vlc_bool_t)VLC_FALSE );
+ (bool)false );
}
}
}
{
demux_sys_t *p_sys = p_demux->p_sys;
ps_track_t *tk = &p_sys->tk[PS_ID_TO_TK(i_id)];
- vlc_bool_t b_select = VLC_FALSE;
+ bool b_select = false;
if( tk->b_seen ) return;
tk->fmt.video.i_aspect = 0;
break;
}
- b_select = VLC_TRUE;
+ b_select = true;
}
else if( tk->fmt.i_cat == AUDIO_ES )
{
}
if( dvdnav_get_active_audio_stream( p_sys->dvdnav ) == i_audio )
{
- b_select = VLC_TRUE;
+ b_select = true;
}
}
}
if( i_title > 0 &&
dvdnav_get_active_spu_stream( p_sys->dvdnav ) == (i_id&0x1f) )
{
- b_select = VLC_TRUE;
+ b_select = true;
}
}
{
es_out_Control( p_demux->out, ES_OUT_SET_ES, tk->es );
}
- tk->b_seen = VLC_TRUE;
+ tk->b_seen = true;
- if( tk->fmt.i_cat == VIDEO_ES ) ButtonUpdate( p_demux, VLC_FALSE );
+ if( tk->fmt.i_cat == VIDEO_ES ) ButtonUpdate( p_demux, false );
}
/*****************************************************************************
vlc_object_t *p_vout = NULL;
vlc_mutex_init( p_ev, &p_ev->lock );
- p_ev->b_moved = VLC_FALSE;
- p_ev->b_clicked = VLC_FALSE;
+ p_ev->b_moved = false;
+ p_ev->b_clicked = false;
p_ev->i_key_action = 0;
- p_ev->b_still = VLC_FALSE;
+ p_ev->b_still = false;
/* catch all key event */
var_AddCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
/* main loop */
while( !p_ev->b_die )
{
- vlc_bool_t b_activated = VLC_FALSE;
+ bool b_activated = false;
/* KEY part */
if( p_ev->i_key_action != 0 )
dvdnav_lower_button_select( p_sys->dvdnav, pci );
break;
case ACTIONID_NAV_ACTIVATE:
- b_activated = VLC_TRUE;
+ b_activated = true;
dvdnav_button_activate( p_sys->dvdnav, pci );
- ButtonUpdate( p_ev->p_demux, VLC_TRUE );
+ ButtonUpdate( p_ev->p_demux, true );
break;
default:
break;
}
if( p_ev->b_clicked )
{
- b_activated = VLC_TRUE;
+ b_activated = true;
dvdnav_mouse_activate( p_sys->dvdnav, pci, valx.i_int,
valy.i_int );
- ButtonUpdate( p_ev->p_demux, VLC_TRUE );
+ ButtonUpdate( p_ev->p_demux, true );
}
- p_ev->b_moved = VLC_FALSE;
- p_ev->b_clicked = VLC_FALSE;
+ p_ev->b_moved = false;
+ p_ev->b_clicked = false;
vlc_mutex_unlock( &p_ev->lock );
}
if( p_vout && p_vout->b_die )
if( /* b_activated || // This breaks menus */
( p_ev->i_still_end > 0 && p_ev->i_still_end < mdate() ))
{
- p_ev->b_still = VLC_FALSE;
+ p_ev->b_still = false;
dvdnav_still_skip( p_sys->dvdnav );
}
}
event_thread_t *p_ev = p_data;
vlc_mutex_lock( &p_ev->lock );
if( psz_var[6] == 'c' )
- p_ev->b_clicked = VLC_TRUE;
+ p_ev->b_clicked = true;
else if( psz_var[6] == 'm' )
- p_ev->b_moved = VLC_TRUE;
+ p_ev->b_moved = true;
vlc_mutex_unlock( &p_ev->lock );
return VLC_SUCCESS;
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "dvdread-angle", 1, NULL, ANGLE_TEXT,
- ANGLE_LONGTEXT, VLC_FALSE );
+ ANGLE_LONGTEXT, false );
add_integer( "dvdread-caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
add_string( "dvdread-css-method", NULL, NULL, CSSMETHOD_TEXT,
- CSSMETHOD_LONGTEXT, VLC_TRUE );
+ CSSMETHOD_LONGTEXT, true );
change_string_list( psz_css_list, psz_css_list_text, 0 );
set_capability( "access_demux", 0 );
add_shortcut( "dvd" );
if( !(p_dvdread = DVDOpen( psz_name )) )
{
msg_Err( p_demux, "DVDRead cannot open source: %s", psz_name );
- intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"),
+ intf_UserFatal( p_demux, false, _("Playback failure"),
_("DVDRead could not open the disk \"%s\"."), psz_name );
free( psz_name );
return VLC_EGENERIC;
{
demux_sys_t *p_sys = p_demux->p_sys;
double f, *pf;
- vlc_bool_t *pb;
+ bool *pb;
int64_t *pi64;
input_title_t ***ppp_title;
int *pi_int;
case DEMUX_CAN_SEEK:
case DEMUX_CAN_CONTROL_PACE:
/* TODO */
- pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *pb = VLC_TRUE;
+ pb = (bool*)va_arg( args, bool * );
+ *pb = true;
return VLC_SUCCESS;
case DEMUX_SET_PAUSE_STATE:
{
msg_Err( p_demux, "read failed for %d/%d blocks at 0x%02x",
i_read, i_blocks_once, p_sys->i_cur_block );
- intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"),
+ intf_UserFatal( p_demux, false, _("Playback failure"),
_("DVDRead could not read %d/%d blocks at 0x%02x."),
i_read, i_blocks_once, p_sys->i_cur_block );
return -1;
}
tk->es = es_out_Add( p_demux->out, &tk->fmt );
- tk->b_seen = VLC_TRUE;
+ tk->b_seen = true;
}
/*****************************************************************************
es_format_Clean( &tk->fmt );
if( tk->es ) es_out_Del( p_demux->out, tk->es );
}
- tk->b_seen = VLC_FALSE;
+ tk->b_seen = false;
}
if( p_demux->info.i_title != i_title )
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "eyetv-channel", 0, NULL,
- CHANNEL_TEXT, CHANNEL_LONGTEXT, VLC_FALSE );
+ CHANNEL_TEXT, CHANNEL_LONGTEXT, false );
set_capability( "access2", 0 );
add_shortcut( "eyetv" );
return 0;
i_read = net_Read( p_access, p_sys->eyetvSock, NULL, p_buffer, i_len,
- VLC_FALSE );
+ false );
if( i_read == 0 )
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
else if( i_read > 0 )
p_access->info.i_pos += i_read;
*****************************************************************************/
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;
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "fake-caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
- add_float( "fake-fps", 25.0, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_TRUE );
- add_integer( "fake-id", 0, NULL, ID_TEXT, ID_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
+ add_float( "fake-fps", 25.0, NULL, FPS_TEXT, FPS_LONGTEXT, true );
+ add_integer( "fake-id", 0, NULL, ID_TEXT, ID_LONGTEXT, true );
add_integer( "fake-duration", 0, NULL, DURATION_TEXT, DURATION_LONGTEXT,
- VLC_TRUE );
+ true );
add_shortcut( "fake" );
set_capability( "access_demux", 0 );
static int Control( demux_t *p_demux, int i_query, va_list args )
{
demux_sys_t *p_sys = p_demux->p_sys;
- vlc_bool_t *pb, b;
+ bool *pb, b;
int64_t *pi64, i64;
double *pf, f;
case DEMUX_CAN_PAUSE:
case DEMUX_CAN_SEEK:
case DEMUX_CAN_CONTROL_PACE:
- pb = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
- *pb = VLC_TRUE;
+ pb = (bool *)va_arg( args, bool * );
+ *pb = true;
return VLC_SUCCESS;
case DEMUX_SET_PAUSE_STATE:
set_shortname( _("File") );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
- add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true );
add_obsolete_string( "file-cat" );
set_capability( "access2", 50 );
add_shortcut( "file" );
struct access_sys_t
{
unsigned int i_nb_reads;
- vlc_bool_t b_kfir;
+ bool b_kfir;
int fd;
/* */
- vlc_bool_t b_seekable;
- vlc_bool_t b_pace_control;
+ bool b_seekable;
+ bool b_pace_control;
};
/*****************************************************************************
access_t *p_access = (access_t*)p_this;
access_sys_t *p_sys;
- vlc_bool_t b_stdin = !strcmp (p_access->psz_path, "-");
+ bool b_stdin = !strcmp (p_access->psz_path, "-");
/* Update default_pts to a suitable value for file access */
var_Create( p_access, "file-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
STANDARD_READ_ACCESS_INIT;
p_sys->i_nb_reads = 0;
- p_sys->b_kfir = VLC_FALSE;
+ p_sys->b_kfir = false;
int fd = p_sys->fd = -1;
if (!strcasecmp (p_access->psz_access, "stream"))
{
- p_sys->b_seekable = VLC_FALSE;
- p_sys->b_pace_control = VLC_FALSE;
+ p_sys->b_seekable = false;
+ p_sys->b_pace_control = false;
}
else if (!strcasecmp (p_access->psz_access, "kfir"))
{
- p_sys->b_seekable = VLC_FALSE;
- p_sys->b_pace_control = VLC_FALSE;
- p_sys->b_kfir = VLC_TRUE;
+ p_sys->b_seekable = false;
+ p_sys->b_pace_control = false;
+ p_sys->b_kfir = true;
}
else
{
- p_sys->b_seekable = VLC_TRUE;
- p_sys->b_pace_control = VLC_TRUE;
+ p_sys->b_seekable = true;
+ p_sys->b_pace_control = true;
}
/* Open file */
if (!S_ISREG (st.st_mode)
&& !S_ISBLK (st.st_mode)
&& !S_ISCHR (st.st_mode))
- p_sys->b_seekable = VLC_FALSE;
+ p_sys->b_seekable = false;
#else
p_sys->b_seekable = !b_stdin;
# warning File size not known!
default:
msg_Err (p_access, "read failed (%m)");
- intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"),
+ intf_UserFatal (p_access, false, _("File reading failed"),
_("VLC could not read the file."));
}
if( i_ret > 0 )
p_access->info.i_pos += i_ret;
else if( i_ret == 0 )
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return i_ret;
}
static int Seek (access_t *p_access, int64_t i_pos)
{
p_access->info.i_pos = i_pos;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
lseek (p_access->p_sys->fd, i_pos, SEEK_SET);
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;
int *pi_int;
int64_t *pi_64;
/* */
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_seekable;
break;
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_pace_control;
break;
if ( !p_sys->fd )
{
msg_Err( p_access, "cannot open file %s", path );
- intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"),
+ intf_UserFatal( p_access, false, _("File reading failed"),
_("VLC could not open the file \"%s\"."), path );
return VLC_EGENERIC;
}
if (fd == -1)
{
msg_Err (p_access, "cannot open file %s (%m)", path);
- intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"),
+ intf_UserFatal (p_access, false, _("File reading failed"),
_("VLC could not open the file \"%s\"."), path);
return -1;
}
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "ftp-caching", 2 * DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
add_string( "ftp-user", "anonymous", NULL, USER_TEXT, USER_LONGTEXT,
- VLC_FALSE );
+ false );
add_string( "ftp-pwd", "anonymous@example.com", NULL, PASS_TEXT,
- PASS_LONGTEXT, VLC_FALSE );
+ PASS_LONGTEXT, false );
add_string( "ftp-account", "anonymous", NULL, ACCOUNT_TEXT,
- ACCOUNT_LONGTEXT, VLC_FALSE );
+ ACCOUNT_LONGTEXT, false );
add_shortcut( "ftp" );
set_callbacks( InOpen, InClose );
if( fd == -1 )
{
msg_Err( p_access, "connection failed" );
- intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"),
+ intf_UserFatal( p_access, false, _("Network interaction failed"),
_("VLC could not connect with the given server.") );
return -1;
}
if( i_answer / 100 != 2 )
{
msg_Err( p_access, "connection rejected" );
- intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"),
+ intf_UserFatal( p_access, false, _("Network interaction failed"),
_("VLC's connection to the given server was rejected.") );
return -1;
}
if( i_answer / 100 != 2 )
{
msg_Err( p_access, "account rejected" );
- intf_UserFatal( p_access, VLC_FALSE,
+ intf_UserFatal( p_access, false,
_("Network interaction failed"),
_("Your account was rejected.") );
return -1;
default:
msg_Err( p_access, "password rejected" );
- intf_UserFatal( p_access, VLC_FALSE,
+ intf_UserFatal( p_access, false,
_("Network interaction failed"),
_("Your password was rejected.") );
return -1;
break;
default:
msg_Err( p_access, "user rejected" );
- intf_UserFatal( p_access, VLC_FALSE,
+ intf_UserFatal( p_access, false,
_("Network interaction failed"),
_("Your connection attempt to the server was rejected.") );
return -1;
if( val )
return val;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_access->info.i_pos = i_pos;
return VLC_SUCCESS;
return 0;
i_read = net_Read( p_access, p_sys->fd_data, NULL, p_buffer, i_len,
- VLC_FALSE );
+ false );
if( i_read == 0 )
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
else if( i_read > 0 )
p_access->info.i_pos += i_read;
*****************************************************************************/
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;
vlc_value_t val;
{
/* */
case ACCESS_CAN_SEEK:
- 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_FASTSEEK:
- 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_CAN_PAUSE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE; /* FIXME */
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true; /* FIXME */
break;
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE; /* FIXME */
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true; /* FIXME */
break;
/* */
/* */
case ACCESS_SET_PAUSE_STATE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
if ( !pb_bool )
return Seek( p_access, p_access->info.i_pos );
break;
set_shortname( "GnomeVFS" );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
- add_integer( "gnomevfs-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ add_integer( "gnomevfs-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true );
set_capability( "access2", 10 );
add_shortcut( "gnomevfs" );
set_callbacks( Open, Close );
GnomeVFSHandle *p_handle;
GnomeVFSFileInfo *p_file_info;
- vlc_bool_t b_local;
- vlc_bool_t b_seekable;
- vlc_bool_t b_pace_control;
+ bool b_local;
+ bool b_seekable;
+ bool b_pace_control;
};
/*****************************************************************************
p_sys->p_handle = p_handle;
p_sys->i_nb_reads = 0;
- p_sys->b_pace_control = VLC_TRUE;
+ p_sys->b_pace_control = true;
if( strcmp( "gnomevfs", p_access->psz_access ) &&
*(p_access->psz_access) != '\0')
if (GNOME_VFS_FILE_INFO_LOCAL( p_sys->p_file_info ))
{
- p_sys->b_local = VLC_TRUE;
+ p_sys->b_local = true;
}
if( p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_REGULAR ||
p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_CHARACTER_DEVICE ||
p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_BLOCK_DEVICE )
{
- p_sys->b_seekable = VLC_TRUE;
+ p_sys->b_seekable = true;
p_access->info.i_size = (int64_t)(p_sys->p_file_info->size);
}
else if( p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_FIFO
|| p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_SOCKET )
{
- p_sys->b_seekable = VLC_FALSE;
+ p_sys->b_seekable = false;
}
else
{
(GnomeVFSFileSize)i_len, &i_read_len );
if( i_ret )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
if( i_ret != GNOME_VFS_ERROR_EOF )
{
msg_Err( p_access, "read failed (%s)",
/* Some Acces (http) never return EOF and loop on the file */
if( p_access->info.i_pos > p_access->info.i_size )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
return (int)i_read_len;
}
}
/* Reset eof */
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
/* FIXME */
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;
int *pi_int;
int64_t *pi_64;
/* */
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_seekable;
break;
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_pace_control;
break;
set_subcategory( SUBCAT_INPUT_ACCESS );
add_string( "http-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
add_string( "http-user-agent", COPYRIGHT_MESSAGE , NULL, AGENT_TEXT,
- AGENT_LONGTEXT, VLC_TRUE );
+ AGENT_LONGTEXT, true );
add_bool( "http-reconnect", 0, NULL, RECONNECT_TEXT,
- RECONNECT_LONGTEXT, VLC_TRUE );
+ RECONNECT_LONGTEXT, true );
add_bool( "http-continuous", 0, NULL, CONTINUOUS_TEXT,
- CONTINUOUS_LONGTEXT, VLC_TRUE );
+ CONTINUOUS_LONGTEXT, true );
add_bool( "http-forward-cookies", 0, NULL, FORWARD_COOKIES_TEXT,
- FORWARD_COOKIES_LONGTEXT, VLC_TRUE );
+ FORWARD_COOKIES_LONGTEXT, true );
add_obsolete_string("http-user");
add_obsolete_string("http-pwd");
add_shortcut( "http" );
http_auth_t auth;
/* Proxy */
- vlc_bool_t b_proxy;
+ bool b_proxy;
vlc_url_t proxy;
http_auth_t proxy_auth;
char *psz_mime;
char *psz_pragma;
char *psz_location;
- vlc_bool_t b_mms;
- vlc_bool_t b_icecast;
- vlc_bool_t b_ssl;
+ bool b_mms;
+ bool b_icecast;
+ bool b_ssl;
#ifdef HAVE_ZLIB_H
- vlc_bool_t b_compressed;
+ bool b_compressed;
struct
{
z_stream stream;
} inflate;
#endif
- vlc_bool_t b_chunked;
+ bool b_chunked;
int64_t i_chunk;
int i_icy_meta;
int i_remaining;
- vlc_bool_t b_seekable;
- vlc_bool_t b_reconnect;
- vlc_bool_t b_continuous;
- vlc_bool_t b_pace_control;
+ bool b_seekable;
+ bool b_reconnect;
+ bool b_continuous;
+ bool b_pace_control;
vlc_array_t * cookies;
};
access_sys_t *p_sys;
char *psz, *p;
/* Only forward an store cookies if the corresponding option is activated */
- vlc_bool_t b_forward_cookies = var_CreateGetBool( p_access, "http-forward-cookies" );
+ bool b_forward_cookies = var_CreateGetBool( p_access, "http-forward-cookies" );
vlc_array_t * saved_cookies = b_forward_cookies ? (cookies ?: vlc_array_new()) : NULL;
/* Set up p_access */
p_access->pf_read = ReadCompressed;
#endif
p_sys->fd = -1;
- p_sys->b_proxy = VLC_FALSE;
+ p_sys->b_proxy = false;
p_sys->i_version = 1;
- p_sys->b_seekable = VLC_TRUE;
+ p_sys->b_seekable = true;
p_sys->psz_mime = NULL;
p_sys->psz_pragma = NULL;
- p_sys->b_mms = VLC_FALSE;
- p_sys->b_icecast = VLC_FALSE;
+ p_sys->b_mms = false;
+ p_sys->b_icecast = false;
p_sys->psz_location = NULL;
p_sys->psz_user_agent = NULL;
- p_sys->b_pace_control = VLC_TRUE;
- p_sys->b_ssl = VLC_FALSE;
+ p_sys->b_pace_control = true;
+ p_sys->b_ssl = false;
#ifdef HAVE_ZLIB_H
- p_sys->b_compressed = VLC_FALSE;
+ p_sys->b_compressed = false;
/* 15 is the max windowBits, +32 to enable optional gzip decoding */
if( inflateInit2( &p_sys->inflate.stream, 32+15 ) != Z_OK )
msg_Warn( p_access, "Error during zlib initialisation: %s",
if( !strncmp( p_access->psz_access, "https", 5 ) )
{
/* HTTP over SSL */
- p_sys->b_ssl = VLC_TRUE;
+ p_sys->b_ssl = true;
if( p_sys->url.i_port <= 0 )
p_sys->url.i_port = 443;
}
psz = var_CreateGetString( p_access, "http-proxy" );
if( *psz )
{
- p_sys->b_proxy = VLC_TRUE;
+ p_sys->b_proxy = true;
vlc_UrlParse( &p_sys->proxy, psz, 0 );
}
#ifdef HAVE_GETENV
char *psz_proxy = getenv( "http_proxy" );
if( psz_proxy && *psz_proxy )
{
- p_sys->b_proxy = VLC_TRUE;
+ p_sys->b_proxy = true;
vlc_UrlParse( &p_sys->proxy, psz_proxy, 0 );
}
}
/* Retry with http 1.0 */
msg_Dbg( p_access, "switching to HTTP version 1.0" );
p_sys->i_version = 0;
- p_sys->b_seekable = VLC_FALSE;
+ p_sys->b_seekable = false;
if( p_access->b_die || Connect( p_access, 0 ) )
goto error;
#if 0 /* Doesn't work really well because of the pre-buffering in
* shoutcast servers (the buffer content will be sent as fast as
* possible). */
- p_sys->b_pace_control = VLC_FALSE;
+ p_sys->b_pace_control = false;
#endif
}
else if( !p_sys->psz_mime )
if( p_sys->fd < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
{
if( ( i_len = p_access->info.i_size - p_access->info.i_pos ) == 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
}
{
if( p_sys->i_chunk < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
if( p_sys->i_chunk <= 0 ) /* eof */
{
p_sys->i_chunk = -1;
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
}
{
if( ReadICYMeta( p_access ) )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return -1;
}
}
i_len = i_next;
}
- i_read = net_Read( p_access, p_sys->fd, p_sys->p_vs, p_buffer, i_len, VLC_FALSE );
+ i_read = net_Read( p_access, p_sys->fd, p_sys->p_vs, p_buffer, i_len, false );
if( i_read > 0 )
{
if( p_sys->b_continuous )
{
Request( p_access, 0 );
- p_sys->b_continuous = VLC_FALSE;
+ p_sys->b_continuous = false;
i_read = Read( p_access, p_buffer, i_len );
- p_sys->b_continuous = VLC_TRUE;
+ p_sys->b_continuous = true;
}
Disconnect( p_access );
if( p_sys->b_reconnect )
}
else
{
- p_sys->b_reconnect = VLC_FALSE;
+ p_sys->b_reconnect = false;
i_read = Read( p_access, p_buffer, i_len );
- p_sys->b_reconnect = VLC_TRUE;
+ p_sys->b_reconnect = true;
}
}
- if( i_read == 0 ) p_access->info.b_eof = VLC_TRUE;
+ if( i_read == 0 ) p_access->info.b_eof = true;
}
if( p_sys->b_continuous )
/* Read meta data length */
i_read = net_Read( p_access, p_sys->fd, p_sys->p_vs, &buffer, 1,
- VLC_TRUE );
+ true );
if( i_read <= 0 )
return VLC_EGENERIC;
if( buffer == 0 )
psz_meta = malloc( i_read + 1 );
if( net_Read( p_access, p_sys->fd, p_sys->p_vs,
- (uint8_t *)psz_meta, i_read, VLC_TRUE ) != i_read )
+ (uint8_t *)psz_meta, i_read, true ) != i_read )
return VLC_EGENERIC;
psz_meta[i_read] = '\0'; /* Just in case */
if( Connect( p_access, i_pos ) )
{
msg_Err( p_access, "seek failed" );
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return VLC_EGENERIC;
}
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;
int *pi_int;
int64_t *pi_64;
vlc_meta_t *p_meta;
{
/* */
case ACCESS_CAN_SEEK:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_seekable;
break;
case ACCESS_CAN_FASTSEEK:
- 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_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
#if 0 /* Disable for now until we have a clock synchro algo
* which works with something else than MPEG over UDP */
*pb_bool = p_sys->b_pace_control;
#endif
- *pb_bool = VLC_TRUE;
+ *pb_bool = true;
break;
/* */
p_sys->psz_location = NULL;
p_sys->psz_mime = NULL;
p_sys->psz_pragma = NULL;
- p_sys->b_mms = VLC_FALSE;
- p_sys->b_chunked = VLC_FALSE;
+ p_sys->b_mms = false;
+ p_sys->b_chunked = false;
p_sys->i_chunk = 0;
p_sys->i_icy_meta = 0;
p_sys->psz_icy_name = NULL;
p_access->info.i_size = 0;
p_access->info.i_pos = i_tell;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
/* Open connection */
}
/* Initialize TLS/SSL session */
- if( p_sys->b_ssl == VLC_TRUE )
+ if( p_sys->b_ssl == true )
{
/* CONNECT to establish TLS tunnel through HTTP proxy */
if( p_sys->b_proxy )
assert( psz_cookie_content );
/* FIXME: This is clearly not conforming to the rfc */
- vlc_bool_t is_in_right_domain = (!psz_cookie_domain || strstr( p_sys->url.psz_host, psz_cookie_domain ));
+ bool is_in_right_domain = (!psz_cookie_domain || strstr( p_sys->url.psz_host, psz_cookie_domain ));
if( is_in_right_domain )
{
{
p_sys->psz_protocol = "ICY";
p_sys->i_code = atoi( &psz[4] );
- p_sys->b_reconnect = VLC_TRUE;
+ p_sys->b_reconnect = true;
}
else
{
p_sys->psz_protocol, p_sys->i_code );
if( !strcmp( p_sys->psz_protocol, "ICY" ) )
{
- p_sys->b_seekable = VLC_FALSE;
+ p_sys->b_seekable = false;
}
if( p_sys->i_code != 206 && p_sys->i_code != 401 )
{
- p_sys->b_seekable = VLC_FALSE;
+ p_sys->b_seekable = false;
}
/* Authentication error - We'll have to display the dialog */
if( p_sys->i_code == 401 )
msg_Dbg( p_access, "Content-Encoding: %s", p );
if( strcasecmp( p, "identity" ) )
#ifdef HAVE_ZLIB_H
- p_sys->b_compressed = VLC_TRUE;
+ p_sys->b_compressed = true;
#else
msg_Warn( p_access, "Compressed content not supported. Rebuild with zlib support." );
#endif
else if( !strcasecmp( psz, "Pragma" ) )
{
if( !strcasecmp( psz, "Pragma: features" ) )
- p_sys->b_mms = VLC_TRUE;
+ p_sys->b_mms = true;
free( p_sys->psz_pragma );
p_sys->psz_pragma = strdup( p );
msg_Dbg( p_access, "Pragma: %s", p_sys->psz_pragma );
/* Let live 365 streams (nanocaster) piggyback on the icecast
* routine. They look very similar */
- p_sys->b_reconnect = VLC_TRUE;
- p_sys->b_pace_control = VLC_FALSE;
- p_sys->b_icecast = VLC_TRUE;
+ p_sys->b_reconnect = true;
+ p_sys->b_pace_control = false;
+ p_sys->b_icecast = true;
}
}
else if( !strcasecmp( psz, "Transfer-Encoding" ) )
msg_Dbg( p_access, "Transfer-Encoding: %s", p );
if( !strncasecmp( p, "chunked", 7 ) )
{
- p_sys->b_chunked = VLC_TRUE;
+ p_sys->b_chunked = true;
}
}
else if( !strcasecmp( psz, "Icy-MetaInt" ) )
p_sys->psz_icy_name = strdup( p );
msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name );
- p_sys->b_icecast = VLC_TRUE; /* be on the safeside. set it here as well. */
- p_sys->b_reconnect = VLC_TRUE;
- p_sys->b_pace_control = VLC_FALSE;
+ p_sys->b_icecast = true; /* be on the safeside. set it here as well. */
+ p_sys->b_reconnect = true;
+ p_sys->b_pace_control = false;
}
else if( !strcasecmp( psz, "Icy-Genre" ) )
{
assert( current_cookie_name );
- vlc_bool_t is_domain_matching = ( cookie_domain && current_cookie_domain &&
+ bool is_domain_matching = ( cookie_domain && current_cookie_domain &&
!strcmp( cookie_domain, current_cookie_domain ) );
if( is_domain_matching && !strcmp( cookie_name, current_cookie_name ) )
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "jack-input-caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
- add_bool( "jack-input-use-vlc-pace", VLC_FALSE, NULL,
- PACE_TEXT, PACE_LONGTEXT, VLC_TRUE );
- add_bool( "jack-input-auto-connect", VLC_FALSE, NULL,
- PACE_TEXT, PACE_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
+ add_bool( "jack-input-use-vlc-pace", false, NULL,
+ PACE_TEXT, PACE_LONGTEXT, true );
+ add_bool( "jack-input-auto-connect", false, NULL,
+ PACE_TEXT, PACE_LONGTEXT, true );
add_shortcut( "jack" );
set_callbacks( Open, Close );
*****************************************************************************/
static int Control( demux_t *p_demux, int i_query, va_list args )
{
- vlc_bool_t *pb;
+ bool *pb;
int64_t *pi64;
demux_sys_t *p_sys = p_demux->p_sys;
/* Special for access_demux */
case DEMUX_CAN_PAUSE:
case DEMUX_CAN_SEEK:
- pb = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
- *pb = VLC_TRUE;
+ pb = (bool *)va_arg( args, bool * );
+ *pb = true;
return VLC_SUCCESS;
case DEMUX_SET_PAUSE_STATE:
return VLC_SUCCESS;
case DEMUX_CAN_CONTROL_PACE:
- pb = ( vlc_bool_t* )va_arg( args, vlc_bool_t * );
+ pb = ( bool* )va_arg( args, bool * );
*pb = var_GetBool( p_demux, "jack-input-use-vlc-pace" );
return VLC_SUCCESS;
add_shortcut ("file");
set_callbacks (Open, Close);
- add_bool ("file-mmap", VLC_TRUE, NULL,
- FILE_MMAP_TEXT, FILE_MMAP_LONGTEXT, VLC_TRUE);
+ add_bool ("file-mmap", true, NULL,
+ FILE_MMAP_TEXT, FILE_MMAP_LONGTEXT, true);
vlc_module_end();
static block_t *Block (access_t *);
/* Really at end of file then */
if ((uint64_t)p_access->info.i_pos >= (uint64_t)p_access->info.i_size)
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
msg_Dbg (p_access, "at end of memory mapped file");
return NULL;
}
if (addr == MAP_FAILED)
{
msg_Err (p_access, "memory mapping failed (%m)");
- intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"),
+ intf_UserFatal (p_access, false, _("File reading failed"),
_("VLC could not read the file."));
msleep (INPUT_ERROR_SLEEP);
return NULL;
#endif
p_access->info.i_pos = i_pos;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
return VLC_SUCCESS;
}
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- *((vlc_bool_t *)va_arg (args, vlc_bool_t *)) = VLC_TRUE;
+ *((bool *)va_arg (args, bool *)) = true;
return VLC_SUCCESS;
case ACCESS_GET_MTU:
void E_( asf_StreamSelect ) ( asf_header_t *hdr,
int i_bitrate_max,
- vlc_bool_t b_all, vlc_bool_t b_audio, vlc_bool_t b_video )
+ bool b_all, bool b_audio, bool b_video )
{
/* XXX FIXME use mututal eclusion information */
int i;
void E_( GenerateGuid ) ( guid_t * );
void E_( asf_HeaderParse ) ( asf_header_t *, uint8_t *, int );
void E_( asf_StreamSelect ) ( asf_header_t *,
- int i_bitrate_max, vlc_bool_t b_all, vlc_bool_t b_audio,
- vlc_bool_t b_video );
+ int i_bitrate_max, bool b_all, bool b_audio,
+ bool b_video );
#define GUID_FMT "%8.8x-%4.4x-%4.4x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
#define GUID_PRINT( guid ) \
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "mms-caching", 19 * DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
add_integer( "mms-timeout", 5000, NULL, TIMEOUT_TEXT, TIMEOUT_LONGTEXT,
- VLC_TRUE );
+ true );
- add_bool( "mms-all", 0, NULL, ALL_TEXT, ALL_LONGTEXT, VLC_TRUE );
+ add_bool( "mms-all", 0, NULL, ALL_TEXT, ALL_LONGTEXT, true );
add_integer( "mms-maxbitrate", 0, NULL, BITRATE_TEXT, BITRATE_LONGTEXT ,
- VLC_FALSE );
+ false );
add_string( "mmsh-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT,
- VLC_FALSE );
+ false );
add_shortcut( "mms" );
add_shortcut( "mmsu" );
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_sys->i_start= 0;
/* Handle proxy */
- p_sys->b_proxy = VLC_FALSE;
+ p_sys->b_proxy = false;
memset( &p_sys->proxy, 0, sizeof(p_sys->proxy) );
/* Check proxy */
if( *psz_proxy )
{
- p_sys->b_proxy = VLC_TRUE;
+ p_sys->b_proxy = true;
vlc_UrlParse( &p_sys->proxy, psz_proxy, 0 );
}
#ifdef HAVE_GETENV
char *psz_proxy = getenv( "http_proxy" );
if( psz_proxy && *psz_proxy )
{
- p_sys->b_proxy = VLC_TRUE;
+ p_sys->b_proxy = true;
vlc_UrlParse( &p_sys->proxy, psz_proxy, 0 );
}
}
/** \bug we do not autodelete here */
playlist_Add( p_playlist, psz_location, psz_location,
- PLAYLIST_INSERT | PLAYLIST_GO, PLAYLIST_END, VLC_TRUE,
- VLC_FALSE );
+ PLAYLIST_INSERT | PLAYLIST_GO, PLAYLIST_END, true,
+ false );
vlc_object_release( p_playlist );
free( psz_location );
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;
int *pi_int;
int64_t *pi_64;
int i_int;
{
/* */
case ACCESS_CAN_SEEK:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = !p_sys->b_broadcast;
break;
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
- 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_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_PRIVATE_ID_STATE:
i_int = (int)va_arg( args, int );
- pb_bool = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
+ pb_bool = (bool *)va_arg( args, bool * );
if( (i_int < 0) || (i_int > 127) )
return VLC_EGENERIC;
- *pb_bool = p_sys->asfh.stream[i_int].i_selected ? VLC_TRUE : VLC_FALSE;
+ *pb_bool = p_sys->asfh.stream[i_int].i_selected ? true : false;
break;
/* */
}
p_access->info.i_pos = i_pos;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_sys->i_packet_used += i_offset;
return VLC_SUCCESS;
}
if( i_ret )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
}
int i_code;
/* Reinit context */
- p_sys->b_broadcast = VLC_TRUE;
+ p_sys->b_broadcast = true;
p_sys->i_request_context = 1;
p_sys->i_packet_sequence = 0;
p_sys->i_packet_used = 0;
if( strstr( p, "broadcast" ) )
{
msg_Dbg( p_access, "stream type = broadcast" );
- p_sys->b_broadcast = VLC_TRUE;
+ p_sys->b_broadcast = true;
}
else if( strstr( p, "seekable" ) )
{
msg_Dbg( p_access, "stream type = seekable" );
- p_sys->b_broadcast = VLC_FALSE;
+ p_sys->b_broadcast = false;
}
else
{
msg_Warn( p_access, "unknow stream types (%s)", p );
- p_sys->b_broadcast = VLC_FALSE;
+ p_sys->b_broadcast = false;
}
}
}
* (4 bytes), decode and then read up to 8 additional bytes to get the
* entire header.
*/
- if( net_Read( p_access, p_sys->fd, NULL, p_sys->buffer, 4, VLC_TRUE ) < 4 )
+ if( net_Read( p_access, p_sys->fd, NULL, p_sys->buffer, 4, true ) < 4 )
{
msg_Err( p_access, "cannot read data 2" );
return VLC_EGENERIC;
if( restsize > 8 )
restsize = 8;
- if( net_Read( p_access, p_sys->fd, NULL, p_sys->buffer + 4, restsize, VLC_TRUE ) < restsize )
+ if( net_Read( p_access, p_sys->fd, NULL, p_sys->buffer + 4, restsize, true ) < restsize )
{
msg_Err( p_access, "cannot read data 3" );
return VLC_EGENERIC;
if( (p_ck->i_data > 0) &&
(net_Read( p_access, p_sys->fd, NULL, &p_sys->buffer[12],
- p_ck->i_data, VLC_TRUE ) < p_ck->i_data) )
+ p_ck->i_data, true ) < p_ck->i_data) )
{
msg_Err( p_access, "cannot read data 4" );
return VLC_EGENERIC;
int fd;
vlc_url_t url;
- vlc_bool_t b_proxy;
+ bool b_proxy;
vlc_url_t proxy;
int i_request_context;
uint8_t buffer[BUFFER_SIZE + 1];
- vlc_bool_t b_broadcast;
+ bool b_broadcast;
uint8_t *p_header;
int i_header;
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 = malloc( sizeof( access_sys_t ) );
}
if( p_sys->i_packet_count <= 0 || ( p_sys->i_flags_broadcast >> 24 ) == 0x02 )
{
- p_sys->b_seekable = VLC_FALSE;
+ p_sys->b_seekable = false;
}
else
{
- p_sys->b_seekable = VLC_TRUE;
+ p_sys->b_seekable = true;
p_access->info.i_size =
(uint64_t)p_sys->i_header +
(uint64_t)p_sys->i_packet_count * (uint64_t)p_sys->i_packet_length;
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;
int *pi_int;
int64_t *pi_64;
int i_int;
{
/* */
case ACCESS_CAN_SEEK:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_seekable;
break;
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
- 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_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ pb_bool = (bool*)va_arg( args, bool* );
#if 0 /* Disable for now until we have a clock synchro algo
* which works with something else than MPEG over UDP */
- *pb_bool = VLC_FALSE;
+ *pb_bool = false;
#endif
- *pb_bool = VLC_TRUE;
+ *pb_bool = true;
break;
/* */
case ACCESS_GET_PRIVATE_ID_STATE:
i_int = (int)va_arg( args, int );
- pb_bool = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
+ pb_bool = (bool *)va_arg( args, bool * );
if( i_int < 0 || i_int > 127 )
return VLC_EGENERIC;
- *pb_bool = p_sys->asfh.stream[i_int].i_selected ? VLC_TRUE : VLC_FALSE;
+ *pb_bool = p_sys->asfh.stream[i_int].i_selected ? true : false;
break;
/* */
{
if( mms_HeaderMediaRead( p_access, MMS_PACKET_CMD ) < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return VLC_EGENERIC;
}
{
if( mms_HeaderMediaRead( p_access, MMS_PACKET_CMD ) < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return VLC_EGENERIC;
}
if( p_sys->i_command == 0x05 )
/* get a packet */
if( mms_HeaderMediaRead( p_access, MMS_PACKET_MEDIA ) < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return VLC_EGENERIC;
}
p_sys->i_media_used += i_offset;
p_access->info.i_pos = i_pos;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
return VLC_SUCCESS;
}
p_sys->i_buffer_udp = 0;
p_sys->p_cmd = NULL;
p_sys->i_cmd = 0;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
/* *** send command 1 : connection request *** */
var_buffer_initwrite( &buffer, 0 );
for( ;; )
{
- vlc_bool_t b_refill = VLC_TRUE;
+ bool b_refill = true;
/* first if we need to refill buffer */
if( p_sys->i_buffer_tcp >= MMS_CMD_HEADERSIZE )
if( GetDWLE( p_sys->buffer_tcp + 8 ) + 16 <=
(uint32_t)p_sys->i_buffer_tcp )
{
- b_refill = VLC_FALSE;
+ b_refill = false;
}
}
else if( GetWLE( p_sys->buffer_tcp + 6 ) <= p_sys->i_buffer_tcp )
{
- b_refill = VLC_FALSE;
+ b_refill = false;
}
}
if( p_sys->i_proto == MMS_PROTO_UDP && p_sys->i_buffer_udp >= 8 &&
GetWLE( p_sys->buffer_udp + 6 ) <= p_sys->i_buffer_udp )
{
- b_refill = VLC_FALSE;
+ b_refill = false;
}
if( b_refill && NetFillBuffer( p_access ) < 0 )
{
case 0x03:
msg_Warn( p_access, "socket closed by server" );
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return VLC_EGENERIC;
case 0x1e:
msg_Warn( p_access, "end of media stream" );
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return VLC_EGENERIC;
default:
break;
}
}
}
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
msg_Warn( p_access, "failed to receive command (aborting)" );
return VLC_EGENERIC;
{
case 0x03:
msg_Warn( p_access, "socket closed by server" );
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return -1;
case 0x1e:
msg_Warn( p_access, "end of media stream" );
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return -1;
case 0x20:
/* XXX not too dificult to be done EXCEPT that we
* could do that :p */
msg_Err( p_access,
"reinitialization needed --> unsupported" );
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return -1;
default:
break;
msg_Err( p_access, "cannot receive %s (aborting)",
( i_type == MMS_PACKET_HEADER ) ? "header" : "media data" );
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return -1;
}
int i_header_size;
/* misc */
- vlc_bool_t b_seekable;
+ bool b_seekable;
};
#endif
add_shortcut( "pvr" );
add_integer( "pvr-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
add_string( "pvr-device", "/dev/video0", NULL, DEVICE_TEXT,
- DEVICE_LONGTEXT, VLC_FALSE );
+ DEVICE_LONGTEXT, false );
add_string( "pvr-radio-device", "/dev/radio0", NULL, RADIO_DEVICE_TEXT,
- RADIO_DEVICE_LONGTEXT, VLC_FALSE );
+ RADIO_DEVICE_LONGTEXT, false );
add_integer( "pvr-norm", V4L2_STD_UNKNOWN , NULL, NORM_TEXT,
- NORM_LONGTEXT, VLC_FALSE );
+ NORM_LONGTEXT, false );
change_integer_list( i_norm_list, psz_norm_list_text, 0 );
- add_integer( "pvr-width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE );
+ add_integer( "pvr-width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, true );
add_integer( "pvr-height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "pvr-frequency", -1, NULL, FREQUENCY_TEXT, FREQUENCY_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "pvr-framerate", -1, NULL, FRAMERATE_TEXT, FRAMERATE_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "pvr-keyint", -1, NULL, KEYINT_TEXT, KEYINT_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "pvr-bframes", -1, NULL, FRAMERATE_TEXT, FRAMERATE_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "pvr-bitrate", -1, NULL, BITRATE_TEXT, BITRATE_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "pvr-bitrate-peak", -1, NULL, BITRATE_PEAK_TEXT,
- BITRATE_PEAK_LONGTEXT, VLC_TRUE );
+ BITRATE_PEAK_LONGTEXT, true );
add_integer( "pvr-bitrate-mode", -1, NULL, BITRATE_MODE_TEXT,
- BITRATE_MODE_LONGTEXT, VLC_TRUE );
+ BITRATE_MODE_LONGTEXT, true );
change_integer_list( i_bitrates, psz_bitrates_list_text, 0 );
add_integer( "pvr-audio-bitmask", -1, NULL, BITMASK_TEXT,
- BITMASK_LONGTEXT, VLC_TRUE );
+ BITMASK_LONGTEXT, true );
add_integer( "pvr-audio-volume", -1, NULL, VOLUME_TEXT,
- VOLUME_LONGTEXT, VLC_TRUE );
- add_integer( "pvr-channel", -1, NULL, CHAN_TEXT, CHAN_LONGTEXT, VLC_TRUE );
+ VOLUME_LONGTEXT, true );
+ add_integer( "pvr-channel", -1, NULL, CHAN_TEXT, CHAN_LONGTEXT, true );
set_callbacks( Open, Close );
vlc_module_end();
int i_volume;
/* driver version */
- vlc_bool_t b_v4l2_api;
+ bool b_v4l2_api;
};
/*****************************************************************************
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;
{
/* Drivers > 0.8.0 use v4l2 API instead of IVTV ioctls */
msg_Dbg( p_access, "this driver uses the v4l2 API" );
- p_sys->b_v4l2_api = VLC_TRUE;
+ p_sys->b_v4l2_api = true;
}
else
{
- p_sys->b_v4l2_api = VLC_FALSE;
+ p_sys->b_v4l2_api = false;
}
/* set the input */
i_ret = read( p_sys->i_fd, p_buffer, i_len );
if( i_ret == 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
}
else if( i_ret > 0 )
{
*****************************************************************************/
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_SEEK:
case ACCESS_CAN_FASTSEEK:
- 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_CAN_PAUSE:
- 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_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;
/* */
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "rtmp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
set_capability( "access2", 10 );
set_callbacks( Open, Close );
}
if( vlc_thread_create( p_sys->p_thread, "rtmp control thread", ThreadControl,
- VLC_THREAD_PRIORITY_INPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_INPUT, false ) )
{
msg_Err( p_access, "cannot spawn rtmp control thread" );
vlc_UrlClean( &p_sys->url );
if( p_sys->fd < 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
{
if( p_sys->active && block_FifoCount( p_sys->p_thread->p_fifo_media ) == 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
break;
}
*****************************************************************************/
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_SEEK:
case ACCESS_CAN_FASTSEEK:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE; /* TODO */
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false; /* TODO */
break;
case ACCESS_CAN_PAUSE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE; /* TODO */
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false; /* TODO */
break;
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;
/* */
int i;
/* Receive handshake */
- i_ret = net_Read( p_access, p_sys->fd, NULL, p_read, RTMP_HANDSHAKE_BODY_SIZE + 1, VLC_TRUE );
+ i_ret = net_Read( p_access, p_sys->fd, NULL, p_read, RTMP_HANDSHAKE_BODY_SIZE + 1, true );
if( i_ret != RTMP_HANDSHAKE_BODY_SIZE + 1 )
{
msg_Err( p_access, "failed to receive handshake" );
}
/* Receive acknowledge */
- i_ret = net_Read( p_access, p_sys->fd, NULL, p_read, RTMP_HANDSHAKE_BODY_SIZE, VLC_TRUE );
+ i_ret = net_Read( p_access, p_sys->fd, NULL, p_read, RTMP_HANDSHAKE_BODY_SIZE, true );
if( i_ret != RTMP_HANDSHAKE_BODY_SIZE )
{
msg_Err( p_access, "failed to receive acknowledge" );
}
/* Receive handshake */
- i_ret = net_Read( p_access, p_sys->fd, NULL, p_read, RTMP_HANDSHAKE_BODY_SIZE * 2 + 1, VLC_TRUE );
+ i_ret = net_Read( p_access, p_sys->fd, NULL, p_read, RTMP_HANDSHAKE_BODY_SIZE * 2 + 1, true );
if( i_ret != RTMP_HANDSHAKE_BODY_SIZE * 2 + 1 )
{
msg_Err( p_access, "failed to receive handshake" );
ssize_t i_ret;
int i;
- i_ret = net_Read( p_thread, p_thread->fd, NULL, p_read, 1, VLC_TRUE );
+ i_ret = net_Read( p_thread, p_thread->fd, NULL, p_read, 1, true );
if( i_ret != 1 )
{
msg_Err( p_thread, "rtmp_read_net_packet: net_Read error");
rtmp_packet->length_header = rtmp_decode_header_size( (vlc_object_t *) p_thread, p_read[0] & RTMP_HEADER_SIZE_MASK );
rtmp_packet->stream_index = p_read[0] & RTMP_HEADER_STREAM_INDEX_MASK;
- i_ret = net_Read( p_thread, p_thread->fd, NULL, p_read + 1, rtmp_packet->length_header - 1, VLC_TRUE );
+ i_ret = net_Read( p_thread, p_thread->fd, NULL, p_read + 1, rtmp_packet->length_header - 1, true );
if( i_ret != rtmp_packet->length_header - 1 )
goto error;
for(i = 0; i < interchunk_headers; i++)
{
i_ret = net_Read( p_thread, p_thread->fd, NULL,
- rtmp_packet->body->body + (i * AMF_PACKET_SIZE_VIDEO), AMF_PACKET_SIZE_VIDEO, VLC_TRUE );
+ rtmp_packet->body->body + (i * AMF_PACKET_SIZE_VIDEO), AMF_PACKET_SIZE_VIDEO, true );
if( i_ret != AMF_PACKET_SIZE_VIDEO )
goto error2;
- i_ret = net_Read( p_thread, p_thread->fd, NULL, &trash, 1, VLC_TRUE );
+ i_ret = net_Read( p_thread, p_thread->fd, NULL, &trash, 1, true );
if( i_ret != 1 )
goto error2;
}
i_ret = net_Read( p_thread, p_thread->fd, NULL,
rtmp_packet->body->body + (i * AMF_PACKET_SIZE_VIDEO),
- rtmp_packet->body->length_body - (i * AMF_PACKET_SIZE_VIDEO), VLC_TRUE );
+ rtmp_packet->body->length_body - (i * AMF_PACKET_SIZE_VIDEO), true );
if( i_ret != rtmp_packet->body->length_body - (i * AMF_PACKET_SIZE_VIDEO) )
goto error2;
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "realrtsp-caching", 3000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
set_capability( "access2", 10 );
set_callbacks( Open, Close );
add_shortcut( "realrtsp" );
struct access_sys_t
{
- vlc_bool_t b_seekable;
- vlc_bool_t b_pace_control;
+ bool b_seekable;
+ bool b_pace_control;
rtsp_client_t *p_rtsp;
if( p_sys->fd < 0 )
{
msg_Err( p_access, "cannot connect to %s:%d", psz_server, i_port );
- intf_UserFatal( p_access, VLC_FALSE, _("Connection failed"),
+ intf_UserFatal( p_access, false, _("Connection failed"),
_("VLC could not connect to \"%s:%d\"."), psz_server, i_port );
return VLC_EGENERIC;
}
access_t *p_access = (access_t *)p_userdata;
access_sys_t *p_sys = p_access->p_sys;
- return net_Read( p_access, p_sys->fd, 0, p_buffer, i_buffer, VLC_TRUE );
+ return net_Read( p_access, p_sys->fd, 0, p_buffer, i_buffer, true );
}
static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer )
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 = malloc( sizeof( access_sys_t ) );
msg_Err( p_access, "rtsp session can not be established" );
- intf_UserFatal( p_access, VLC_FALSE, _("Session failed"),
+ intf_UserFatal( p_access, false, _("Session failed"),
_("The requested RTSP session could not be established.") );
goto error;
}
*****************************************************************************/
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_SEEK:
case ACCESS_CAN_FASTSEEK:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_FALSE;//p_sys->b_seekable;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false;//p_sys->b_seekable;
break;
case ACCESS_CAN_PAUSE:
- 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_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE;//p_sys->b_pace_control;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true;//p_sys->b_pace_control;
break;
/* */
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "screen-caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
- add_float( "screen-fps", SCREEN_FPS, 0, FPS_TEXT, FPS_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
+ add_float( "screen-fps", SCREEN_FPS, 0, FPS_TEXT, FPS_LONGTEXT, true );
#ifdef WIN32
add_integer( "screen-fragment-size", 0, NULL, FRAGS_TEXT,
- FRAGS_LONGTEXT, VLC_TRUE );
+ FRAGS_LONGTEXT, true );
#endif
set_capability( "access_demux", 0 );
*****************************************************************************/
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_CAN_CONTROL_PACE:
/* TODO */
- 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:
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "smb-caching", 2 * DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
add_string( "smb-user", NULL, NULL, USER_TEXT, USER_LONGTEXT,
- VLC_FALSE );
+ false );
add_string( "smb-pwd", NULL, NULL, PASS_TEXT,
- PASS_LONGTEXT, VLC_FALSE );
+ PASS_LONGTEXT, false );
add_string( "smb-domain", NULL, NULL, DOMAIN_TEXT,
- DOMAIN_LONGTEXT, VLC_FALSE );
+ DOMAIN_LONGTEXT, false );
add_shortcut( "smb" );
set_callbacks( Open, Close );
vlc_module_end();
return VLC_EGENERIC;
}
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_access->info.i_pos = i_ret;
return VLC_SUCCESS;
return -1;
}
- if( i_read == 0 ) p_access->info.b_eof = VLC_TRUE;
+ if( i_read == 0 ) p_access->info.b_eof = true;
else if( i_read > 0 ) p_access->info.i_pos += i_read;
return i_read;
*****************************************************************************/
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;
switch( i_query )
{
case ACCESS_CAN_SEEK:
- 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_FASTSEEK:
- 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_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_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:
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "tcp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
set_capability( "access2", 0 );
add_shortcut( "tcp" );
return 0;
i_read = net_Read( p_access, p_sys->fd, NULL, p_buffer, i_len,
- VLC_FALSE );
+ false );
if( i_read == 0 )
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
else if( i_read > 0 )
p_access->info.i_pos += i_read;
*****************************************************************************/
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_SEEK:
case ACCESS_CAN_FASTSEEK:
- 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_CAN_PAUSE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE; /* FIXME */
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true; /* FIXME */
break;
case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE; /* FIXME */
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true; /* FIXME */
break;
/* */
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "udp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
- add_integer( "rtp-late", 100, NULL, RTP_LATE_TEXT, RTP_LATE_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
+ add_integer( "rtp-late", 100, NULL, RTP_LATE_TEXT, RTP_LATE_LONGTEXT, true );
add_obsolete_bool( "udp-auto-mtu" );
set_capability( "access2", 0 );
{
int fd;
- vlc_bool_t b_framed_rtp, b_comedia;
+ bool b_framed_rtp, b_comedia;
/* reorder rtp packets when out-of-sequence */
uint16_t i_last_seqno;
/* Set up p_access */
access_InitFields( p_access );
ACCESS_SET_CALLBACKS( NULL, BlockStartRTP, Control, NULL );
- p_access->info.b_prebuffered = VLC_FALSE;
+ p_access->info.b_prebuffered = false;
MALLOC_ERR( p_access->p_sys, access_sys_t ); p_sys = p_access->p_sys;
memset (p_sys, 0, sizeof (*p_sys));
case IPPROTO_TCP:
p_sys->fd = net_ConnectTCP( p_access, psz_server_addr, i_server_port );
p_access->pf_block = BlockRTP;
- p_sys->b_comedia = p_sys->b_framed_rtp = VLC_TRUE;
+ p_sys->b_comedia = p_sys->b_framed_rtp = true;
break;
case IPPROTO_DCCP:
p_sys->fd = -1;
msg_Err( p_access, "DCCP support not compiled-in!" );
#endif
- p_sys->b_comedia = VLC_TRUE;
+ p_sys->b_comedia = true;
break;
}
free (psz_name);
*****************************************************************************/
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;
+ pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = false;
break;
/* */
case ACCESS_GET_MTU:
/* Read data */
p_block = block_New( p_access, MTU );
len = net_Read( p_access, p_sys->fd, NULL,
- p_block->p_buffer, MTU, VLC_FALSE );
+ p_block->p_buffer, MTU, false );
if( ( len < 0 )
|| ( p_sys->b_comedia && ( len == 0 ) ) )
{
if( p_sys->b_comedia )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
msg_Dbg( p_access, "connection-oriented media hangup" );
}
block_Release( p_block );
{
int i_read = net_Read( p_access, p_sys->fd, NULL,
p_block->p_buffer + p_block->i_buffer,
- 2 - p_block->i_buffer, VLC_FALSE );
+ 2 - p_block->i_buffer, false );
if( i_read <= 0 )
goto error;
{
int i_read = net_Read( p_access, p_sys->fd, NULL,
p_block->p_buffer + p_block->i_buffer,
- 2 + framelen - p_block->i_buffer, VLC_FALSE );
+ 2 + framelen - p_block->i_buffer, false );
if( i_read <= 0 )
goto error;
return p_block;
error:
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
block_Release( p_block );
p_sys->p_partial_frame = NULL;
return NULL;
* rtp_ChainInsert - insert a p_block in the chain and
* look at the sequence numbers.
*/
-static inline vlc_bool_t rtp_ChainInsert( access_t *p_access, block_t *p_block )
+static inline bool rtp_ChainInsert( access_t *p_access, block_t *p_block )
{
access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
block_t *p_prev = NULL;
{
p_sys->p_list = p_block;
p_sys->p_end = p_block;
- return VLC_TRUE;
+ return true;
}
/* walk through the queue from top down since the new packet is in
most cases just appended to the end */
{
p_sys->p_end = p_block;
}
- return VLC_TRUE;
+ return true;
}
if( p == p_sys->p_list )
{ /* we've reached bottom of chain */
p_block->p_next = p;
p->p_prev = p_block;
p_sys->p_list = p_block;
- return VLC_TRUE;
+ return true;
}
if( !i_tmp ) /* trash duplicate */
p_sys->p_end->p_next = p_block;
p_block->p_prev = p_sys->p_end;
p_sys->p_end = p_block;
- return VLC_TRUE;
+ return true;
}
p_prev = p;
p = p->p_prev;
}
block_Release( p_block );
- return VLC_FALSE;
+ return false;
}
/*****************************************************************************
}
msg_Dbg( p_access, "RTP: prebuffered %d packets", i_count - 1 );
- p_access->info.b_prebuffered = VLC_TRUE;
+ p_access->info.b_prebuffered = true;
p = p_sys->p_list;
p_sys->p_list = p_sys->p_list->p_next;
p_sys->i_last_seqno = (uint16_t) p->i_dts;
{
msg_Dbg( p_access, "detected TS over raw UDP" );
p_access->pf_block = BlockUDP;
- p_access->info.b_prebuffered = VLC_TRUE;
+ p_access->info.b_prebuffered = true;
return p_block;
}
{
msg_Dbg( p_access, "no supported RTP header detected" );
p_access->pf_block = BlockUDP;
- p_access->info.b_prebuffered = VLC_TRUE;
+ p_access->info.b_prebuffered = true;
return p_block;
}
default:
msg_Dbg( p_access, "no RTP header detected" );
p_access->pf_block = BlockUDP;
- p_access->info.b_prebuffered = VLC_TRUE;
+ p_access->info.b_prebuffered = true;
return p_block;
}
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "v4l-caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
add_string( "v4l-vdev", "/dev/video", 0, VDEV_TEXT, VDEV_LONGTEXT,
- VLC_FALSE );
+ false );
add_string( "v4l-adev", "/dev/dsp", 0, ADEV_TEXT, ADEV_LONGTEXT,
- VLC_FALSE );
+ false );
add_string( "v4l-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_TRUE );
- add_float( "v4l-fps", -1.0, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_TRUE );
+ true );
+ add_float( "v4l-fps", -1.0, NULL, FPS_TEXT, FPS_LONGTEXT, true );
add_integer( "v4l-samplerate", 44100, NULL, SAMPLERATE_TEXT,
- SAMPLERATE_LONGTEXT, VLC_TRUE );
+ SAMPLERATE_LONGTEXT, true );
add_integer( "v4l-channel", 0, NULL, CHANNEL_TEXT, CHANNEL_LONGTEXT,
- VLC_TRUE );
- add_integer( "v4l-tuner", -1, NULL, TUNER_TEXT, TUNER_LONGTEXT, VLC_TRUE );
+ true );
+ add_integer( "v4l-tuner", -1, NULL, TUNER_TEXT, TUNER_LONGTEXT, true );
add_integer( "v4l-norm", VIDEO_MODE_AUTO, NULL, NORM_TEXT, NORM_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_list( i_norm_list, psz_norm_list_text, 0 );
add_integer( "v4l-frequency", -1, NULL, FREQUENCY_TEXT, FREQUENCY_LONGTEXT,
- VLC_FALSE );
- add_integer( "v4l-audio", -1, NULL, AUDIO_TEXT, AUDIO_LONGTEXT, VLC_TRUE );
- add_bool( "v4l-stereo", VLC_TRUE, NULL, STEREO_TEXT, STEREO_LONGTEXT,
- VLC_TRUE );
- add_integer( "v4l-width", 0, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE );
+ false );
+ add_integer( "v4l-audio", -1, NULL, AUDIO_TEXT, AUDIO_LONGTEXT, true );
+ add_bool( "v4l-stereo", true, NULL, STEREO_TEXT, STEREO_LONGTEXT,
+ true );
+ add_integer( "v4l-width", 0, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, true );
add_integer( "v4l-height", 0, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( "v4l-brightness", -1, NULL, BRIGHTNESS_TEXT,
- BRIGHTNESS_LONGTEXT, VLC_TRUE );
+ BRIGHTNESS_LONGTEXT, true );
add_integer( "v4l-colour", -1, NULL, COLOUR_TEXT, COLOUR_LONGTEXT,
- VLC_TRUE );
- add_integer( "v4l-hue", -1, NULL, HUE_TEXT, HUE_LONGTEXT, VLC_TRUE );
+ true );
+ add_integer( "v4l-hue", -1, NULL, HUE_TEXT, HUE_LONGTEXT, true );
add_integer( "v4l-contrast", -1, NULL, CONTRAST_TEXT, CONTRAST_LONGTEXT,
- VLC_TRUE );
- add_bool( "v4l-mjpeg", VLC_FALSE, NULL, MJPEG_TEXT, MJPEG_LONGTEXT,
- VLC_TRUE );
+ true );
+ add_bool( "v4l-mjpeg", false, NULL, MJPEG_TEXT, MJPEG_LONGTEXT,
+ true );
add_integer( "v4l-decimation", 1, NULL, DECIMATION_TEXT,
- DECIMATION_LONGTEXT, VLC_TRUE );
+ DECIMATION_LONGTEXT, true );
add_integer( "v4l-quality", 100, NULL, QUALITY_TEXT, QUALITY_LONGTEXT,
- VLC_TRUE );
+ true );
add_shortcut( "v4l" );
set_capability( "access_demux", 10 );
float f_fps; /* <= 0.0 mean to grab at full rate */
mtime_t i_video_pts; /* only used when f_fps > 0 */
- vlc_bool_t b_mjpeg;
+ bool b_mjpeg;
int i_decimation;
int i_quality;
/* Audio properties */
vlc_fourcc_t i_acodec_raw;
int i_sample_rate;
- vlc_bool_t b_stereo;
+ bool b_stereo;
int i_audio_max_frame_size;
block_t *p_block_audio;
es_out_id_t *p_es_audio;
*****************************************************************************/
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:
{
psz_parser += strlen( "stereo" );
- p_sys->b_stereo = VLC_TRUE;
+ p_sys->b_stereo = true;
}
else if( !strncmp( psz_parser, "mono", strlen( "mono" ) ) )
{
psz_parser += strlen( "mono" );
- p_sys->b_stereo = VLC_FALSE;
+ p_sys->b_stereo = false;
}
else if( !strncmp( psz_parser, "mjpeg", strlen( "mjpeg" ) ) )
{
psz_parser += strlen( "mjpeg" );
- p_sys->b_mjpeg = VLC_TRUE;
+ p_sys->b_mjpeg = true;
}
else if( !strncmp( psz_parser, "decimation=",
strlen( "decimation=" ) ) )
set_section( N_( "Video input" ), NULL );
add_string( CFG_PREFIX "dev", "/dev/video0", 0, DEV_TEXT, DEV_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( CFG_PREFIX "standard", 0, NULL, STANDARD_TEXT,
- STANDARD_LONGTEXT, VLC_FALSE );
+ STANDARD_LONGTEXT, false );
change_integer_list( i_standards_list, psz_standards_list_text, 0 );
add_string( CFG_PREFIX "chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( CFG_PREFIX "input", 0, NULL, INPUT_TEXT, INPUT_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( CFG_PREFIX "audio-input", 0, NULL, AUDIO_INPUT_TEXT,
- AUDIO_INPUT_LONGTEXT, VLC_TRUE );
+ AUDIO_INPUT_LONGTEXT, true );
add_integer( CFG_PREFIX "io", IO_METHOD_MMAP, NULL, IOMETHOD_TEXT,
- IOMETHOD_LONGTEXT, VLC_TRUE );
+ IOMETHOD_LONGTEXT, true );
change_integer_list( i_iomethod_list, psz_iomethod_list_text, 0 );
add_integer( CFG_PREFIX "width", 0, NULL, WIDTH_TEXT,
- WIDTH_LONGTEXT, VLC_TRUE );
+ WIDTH_LONGTEXT, true );
add_integer( CFG_PREFIX "height", 0, NULL, HEIGHT_TEXT,
- HEIGHT_LONGTEXT, VLC_TRUE );
- add_float( CFG_PREFIX "fps", 0, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_TRUE );
+ HEIGHT_LONGTEXT, true );
+ add_float( CFG_PREFIX "fps", 0, NULL, FPS_TEXT, FPS_LONGTEXT, true );
set_section( N_( "Audio input" ), NULL );
add_string( CFG_PREFIX "adev", NULL, 0, ADEV_TEXT, ADEV_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( CFG_PREFIX "audio-method", AUDIO_METHOD_OSS|AUDIO_METHOD_ALSA,
- NULL, AUDIO_METHOD_TEXT, AUDIO_METHOD_LONGTEXT, VLC_TRUE );
- add_bool( CFG_PREFIX "stereo", VLC_TRUE, NULL, STEREO_TEXT, STEREO_LONGTEXT,
- VLC_TRUE );
+ NULL, AUDIO_METHOD_TEXT, AUDIO_METHOD_LONGTEXT, true );
+ add_bool( CFG_PREFIX "stereo", true, NULL, STEREO_TEXT, STEREO_LONGTEXT,
+ true );
add_integer( CFG_PREFIX "samplerate", 48000, NULL, SAMPLERATE_TEXT,
- SAMPLERATE_LONGTEXT, VLC_TRUE );
+ SAMPLERATE_LONGTEXT, true );
add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
set_section( N_( "Tuner" ), NULL );
add_integer( CFG_PREFIX "tuner", 0, NULL, TUNER_TEXT, TUNER_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( CFG_PREFIX "tuner-frequency", -1, NULL, FREQUENCY_TEXT,
- FREQUENCY_LONGTEXT, VLC_TRUE );
+ FREQUENCY_LONGTEXT, true );
add_integer( CFG_PREFIX "tuner-audio-mode", -1, NULL, TUNER_AUDIO_MODE_TEXT,
- TUNER_AUDIO_MODE_LONGTEXT, VLC_TRUE );
+ TUNER_AUDIO_MODE_LONGTEXT, true );
change_integer_list( i_tuner_audio_modes_list,
psz_tuner_audio_modes_list_text, 0 );
set_section( N_( "Controls" ),
N_( "v4l2 driver controls, if supported by your v4l2 driver." ) );
- add_bool( CFG_PREFIX "controls-reset", VLC_FALSE, NULL, CTRL_RESET_TEXT,
- CTRL_RESET_LONGTEXT, VLC_TRUE );
+ add_bool( CFG_PREFIX "controls-reset", false, NULL, CTRL_RESET_TEXT,
+ CTRL_RESET_LONGTEXT, true );
add_integer( CFG_PREFIX "brightness", -1, NULL, BRIGHTNESS_TEXT,
- BRIGHTNESS_LONGTEXT, VLC_TRUE );
+ BRIGHTNESS_LONGTEXT, true );
add_integer( CFG_PREFIX "contrast", -1, NULL, CONTRAST_TEXT,
- CONTRAST_LONGTEXT, VLC_TRUE );
+ CONTRAST_LONGTEXT, true );
add_integer( CFG_PREFIX "saturation", -1, NULL, SATURATION_TEXT,
- SATURATION_LONGTEXT, VLC_TRUE );
+ SATURATION_LONGTEXT, true );
add_integer( CFG_PREFIX "hue", -1, NULL, HUE_TEXT,
- HUE_LONGTEXT, VLC_TRUE );
+ HUE_LONGTEXT, true );
add_integer( CFG_PREFIX "black-level", -1, NULL, BLACKLEVEL_TEXT,
- BLACKLEVEL_LONGTEXT, VLC_TRUE );
+ BLACKLEVEL_LONGTEXT, true );
add_integer( CFG_PREFIX "auto-white-balance", -1, NULL,
- AUTOWHITEBALANCE_TEXT, AUTOWHITEBALANCE_LONGTEXT, VLC_TRUE );
+ AUTOWHITEBALANCE_TEXT, AUTOWHITEBALANCE_LONGTEXT, true );
add_integer( CFG_PREFIX "do-white-balance", -1, NULL, DOWHITEBALANCE_TEXT,
- DOWHITEBALANCE_LONGTEXT, VLC_TRUE );
+ DOWHITEBALANCE_LONGTEXT, true );
add_integer( CFG_PREFIX "red-balance", -1, NULL, REDBALANCE_TEXT,
- REDBALANCE_LONGTEXT, VLC_TRUE );
+ REDBALANCE_LONGTEXT, true );
add_integer( CFG_PREFIX "blue-balance", -1, NULL, BLUEBALANCE_TEXT,
- BLUEBALANCE_LONGTEXT, VLC_TRUE );
+ BLUEBALANCE_LONGTEXT, true );
add_integer( CFG_PREFIX "gamma", -1, NULL, GAMMA_TEXT,
- GAMMA_LONGTEXT, VLC_TRUE );
+ GAMMA_LONGTEXT, true );
add_integer( CFG_PREFIX "exposure", -1, NULL, EXPOSURE_TEXT,
- EXPOSURE_LONGTEXT, VLC_TRUE );
+ EXPOSURE_LONGTEXT, true );
add_integer( CFG_PREFIX "autogain", -1, NULL, AUTOGAIN_TEXT,
- AUTOGAIN_LONGTEXT, VLC_TRUE );
+ AUTOGAIN_LONGTEXT, true );
add_integer( CFG_PREFIX "gain", -1, NULL, GAIN_TEXT,
- GAIN_LONGTEXT, VLC_TRUE );
+ GAIN_LONGTEXT, true );
add_integer( CFG_PREFIX "hflip", -1, NULL, HFLIP_TEXT,
- HFLIP_LONGTEXT, VLC_TRUE );
+ HFLIP_LONGTEXT, true );
add_integer( CFG_PREFIX "vflip", -1, NULL, VFLIP_TEXT,
- VFLIP_LONGTEXT, VLC_TRUE );
+ VFLIP_LONGTEXT, true );
add_integer( CFG_PREFIX "hcenter", -1, NULL, HCENTER_TEXT,
- HCENTER_LONGTEXT, VLC_TRUE );
+ HCENTER_LONGTEXT, true );
add_integer( CFG_PREFIX "vcenter", -1, NULL, VCENTER_TEXT,
- VCENTER_LONGTEXT, VLC_TRUE );
+ VCENTER_LONGTEXT, true );
add_integer( CFG_PREFIX "audio-volume", -1, NULL, AUDIO_VOLUME_TEXT,
- AUDIO_VOLUME_LONGTEXT, VLC_TRUE );
+ AUDIO_VOLUME_LONGTEXT, true );
add_integer( CFG_PREFIX "audio-balance", -1, NULL, AUDIO_BALANCE_TEXT,
- AUDIO_BALANCE_LONGTEXT, VLC_TRUE );
- add_bool( CFG_PREFIX "audio-mute", VLC_FALSE, NULL, AUDIO_MUTE_TEXT,
- AUDIO_MUTE_LONGTEXT, VLC_TRUE );
+ AUDIO_BALANCE_LONGTEXT, true );
+ add_bool( CFG_PREFIX "audio-mute", false, NULL, AUDIO_MUTE_TEXT,
+ AUDIO_MUTE_LONGTEXT, true );
add_integer( CFG_PREFIX "audio-bass", -1, NULL, AUDIO_BASS_TEXT,
- AUDIO_BASS_LONGTEXT, VLC_TRUE );
+ AUDIO_BASS_LONGTEXT, true );
add_integer( CFG_PREFIX "audio-treble", -1, NULL, AUDIO_TREBLE_TEXT,
- AUDIO_TREBLE_LONGTEXT, VLC_TRUE );
+ AUDIO_TREBLE_LONGTEXT, true );
add_integer( CFG_PREFIX "audio-loudness", -1, NULL, AUDIO_LOUDNESS_TEXT,
- AUDIO_LOUDNESS_LONGTEXT, VLC_TRUE );
+ AUDIO_LOUDNESS_LONGTEXT, true );
add_string( CFG_PREFIX "set-ctrls", NULL, NULL, S_CTRLS_TEXT,
- S_CTRLS_LONGTEXT, VLC_TRUE );
+ S_CTRLS_LONGTEXT, true );
add_shortcut( "v4l2" );
set_capability( "access_demux", 10 );
static block_t* ProcessVideoFrame( demux_t *p_demux, uint8_t *p_frame, size_t );
static block_t* GrabAudio( demux_t *p_demux );
-static vlc_bool_t IsPixelFormatSupported( demux_t *p_demux,
+static bool IsPixelFormatSupported( demux_t *p_demux,
unsigned int i_pixelformat );
#ifdef HAVE_ALSA
static char* ResolveALSADeviceName( const char *psz_device );
#endif
-static int OpenVideoDev( vlc_object_t *, demux_sys_t *, vlc_bool_t );
-static int OpenAudioDev( vlc_object_t *, demux_sys_t *, vlc_bool_t );
-static vlc_bool_t ProbeVideoDev( vlc_object_t *, demux_sys_t *,
+static int OpenVideoDev( vlc_object_t *, demux_sys_t *, bool );
+static int OpenAudioDev( vlc_object_t *, demux_sys_t *, bool );
+static bool ProbeVideoDev( vlc_object_t *, demux_sys_t *,
char *psz_device );
-static vlc_bool_t ProbeAudioDev( vlc_object_t *, demux_sys_t *,
+static bool ProbeAudioDev( vlc_object_t *, demux_sys_t *,
char *psz_device );
-static int ControlList( vlc_object_t *, int , vlc_bool_t, vlc_bool_t );
+static int ControlList( vlc_object_t *, int , bool, bool );
static int Control( vlc_object_t *, int i_fd,
const char *psz_name, int i_cid, int i_value );
/* Audio */
unsigned int i_sample_rate;
- vlc_bool_t b_stereo;
+ bool b_stereo;
size_t i_audio_max_frame_size;
block_t *p_block_audio;
es_out_id_t *p_es_audio;
};
static int FindMainDevice( vlc_object_t *p_this, demux_sys_t *p_sys,
- int i_flags, vlc_bool_t b_demux,
- vlc_bool_t b_forced )
+ int i_flags, bool b_demux,
+ bool b_forced )
{
/* Find main device (video or audio) */
if( p_sys->psz_device && *p_sys->psz_device )
{
msg_Dbg( p_this, "main device='%s'", p_sys->psz_device );
- vlc_bool_t b_maindevice_is_video = VLC_FALSE;
+ bool b_maindevice_is_video = false;
/* Try to open as video device */
if( i_flags & FIND_VIDEO )
p_sys->i_fd_video = OpenVideoDev( p_this, p_sys, b_demux );
if( p_sys->i_fd_video < 0 )
return VLC_EGENERIC;
- b_maindevice_is_video = VLC_TRUE;
+ b_maindevice_is_video = true;
/* If successful we carry on to try the audio if access is forced */
}
}
}
/* If no device opened, only continue if the access was forced */
- if( b_forced == VLC_FALSE
+ if( b_forced == false
&& !( ( i_flags & FIND_VIDEO && p_sys->i_fd_video >= 0 )
|| ( i_flags & FIND_AUDIO && p_sys->i_fd_audio >= 0 ) ) )
{
#endif
if( FindMainDevice( p_this, p_sys, FIND_VIDEO|FIND_AUDIO,
- VLC_TRUE, !strncmp( p_demux->psz_access, "v4l2", 4 ) ) != VLC_SUCCESS )
+ true, !strncmp( p_demux->psz_access, "v4l2", 4 ) ) != VLC_SUCCESS )
{
DemuxClose( p_this );
return VLC_EGENERIC;
else if( !strncmp( psz_parser, "controls-reset",
strlen( "controls-reset" ) ) )
{
- var_SetBool( p_obj, "v4l2-controls-reset", VLC_TRUE );
+ var_SetBool( p_obj, "v4l2-controls-reset", true );
psz_parser += strlen( "controls-reset" );
}
#if 0
else if( !strncmp( psz_parser, "stereo", strlen( "stereo" ) ) )
{
psz_parser += strlen( "stereo" );
- p_sys->b_stereo = VLC_TRUE;
+ p_sys->b_stereo = true;
}
else if( !strncmp( psz_parser, "mono", strlen( "mono" ) ) )
{
psz_parser += strlen( "mono" );
- p_sys->b_stereo = VLC_FALSE;
+ p_sys->b_stereo = false;
}
else if( !strncmp( psz_parser, "caching=", strlen( "caching=" ) ) )
{
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;
ParseMRL( p_sys, p_access->psz_path, (vlc_object_t *) p_access );
if( FindMainDevice( p_this, p_sys, FIND_VIDEO,
- VLC_FALSE, !strncmp( p_access->psz_access, "v4l2", 4 ) ) != VLC_SUCCESS )
+ false, !strncmp( p_access->psz_access, "v4l2", 4 ) ) != VLC_SUCCESS )
{
AccessClose( p_this );
return VLC_EGENERIC;
static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
{
demux_sys_t *p_sys = p_demux->p_sys;
- 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:
*****************************************************************************/
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;
demux_sys_t *p_sys = (demux_sys_t *) p_access->p_sys;
/* */
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
- 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_CAN_PAUSE:
- 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_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;
/* */
i_ret = read( p_sys->i_fd_video, p_buffer, i_len );
if( i_ret == 0 )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
}
else if( i_ret > 0 )
{
* IsPixelFormatSupported: returns true if the specified V4L2 pixel format is
* in the array of supported formats returned by the driver
*****************************************************************************/
-static vlc_bool_t IsPixelFormatSupported( demux_t *p_demux, unsigned int i_pixelformat )
+static bool IsPixelFormatSupported( demux_t *p_demux, unsigned int i_pixelformat )
{
demux_sys_t *p_sys = p_demux->p_sys;
for( int i_index = 0; i_index < p_sys->i_codec; i_index++ )
{
if( p_sys->p_codecs[i_index].pixelformat == i_pixelformat )
- return VLC_TRUE;
+ return true;
}
- return VLC_FALSE;
+ return false;
}
/*****************************************************************************
* OpenVideoDev: open and set up the video device and probe for capabilities
*****************************************************************************/
-static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, vlc_bool_t b_demux )
+static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
{
int i_fd;
struct v4l2_cropcap cropcap;
ControlList( p_obj, i_fd,
var_GetBool( p_obj, "v4l2-controls-reset" ), b_demux );
SetAvailControlsByString( p_obj, p_sys, i_fd );
- if( VLC_FALSE == b_demux)
+ if( false == b_demux)
{
return i_fd;
}
*****************************************************************************/
#ifdef HAVE_ALSA
static int OpenAudioDevAlsa( vlc_object_t *p_this, demux_sys_t *p_sys,
- vlc_bool_t b_demux )
+ bool b_demux )
{
char *psz_device = p_sys->psz_adev;
int i_fd = 0;
#endif
static int OpenAudioDevOss( vlc_object_t *p_this, demux_sys_t *p_sys,
- vlc_bool_t b_demux )
+ bool b_demux )
{
int i_fd = 0;
int i_format;
}
static int OpenAudioDev( vlc_object_t *p_this, demux_sys_t *p_sys,
- vlc_bool_t b_demux )
+ bool b_demux )
{
char *psz_device;
int i_fd = -1;
/*****************************************************************************
* ProbeVideoDev: probe video for capabilities
*****************************************************************************/
-static vlc_bool_t ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
+static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
char *psz_device )
{
int i_index;
memset( &psz_fourcc_v4l2, 0, sizeof( psz_fourcc_v4l2 ) );
vlc_fourcc_to_char( p_sys->p_codecs[i_index].pixelformat,
&psz_fourcc_v4l2 );
- vlc_bool_t b_codec_supported = VLC_FALSE;
+ bool b_codec_supported = false;
for( int i = 0; v4l2chroma_to_fourcc[i].i_v4l2 != 0; i++ )
{
if( v4l2chroma_to_fourcc[i].i_v4l2 == p_sys->p_codecs[i_index].pixelformat )
{
- b_codec_supported = VLC_TRUE;
+ b_codec_supported = true;
char psz_fourcc[5];
memset( &psz_fourcc, 0, sizeof( psz_fourcc ) );
if( i_fd >= 0 ) close( i_fd );
- return VLC_TRUE;
+ return true;
open_failed:
if( i_fd >= 0 ) close( i_fd );
- return VLC_FALSE;
+ return false;
}
* ProbeAudioDev: probe audio for capabilities
*****************************************************************************/
#ifdef HAVE_ALSA
-static vlc_bool_t ProbeAudioDevAlsa( vlc_object_t *p_this, demux_sys_t *p_sys,
+static bool ProbeAudioDevAlsa( vlc_object_t *p_this, demux_sys_t *p_sys,
char *psz_device )
{
int i_err;
{
msg_Err( p_this, "cannot open device %s for ALSA audio (%s)", psz_alsa_device_name, snd_strerror( i_err ) );
free( psz_alsa_device_name );
- return VLC_FALSE;
+ return false;
}
snd_pcm_close( p_alsa_pcm );
free( psz_alsa_device_name );
- return VLC_TRUE;
+ return true;
}
#endif
-static vlc_bool_t ProbeAudioDevOss( vlc_object_t *p_this, demux_sys_t *p_sys,
+static bool ProbeAudioDevOss( vlc_object_t *p_this, demux_sys_t *p_sys,
char *psz_device )
{
int i_fd = 0;
free( psz_oss_device_name );
if( i_fd >= 0 ) close( i_fd );
- return VLC_TRUE;
+ return true;
open_failed:
free( psz_oss_device_name );
if( i_fd >= 0 ) close( i_fd );
- return VLC_FALSE;
+ return false;
}
-static vlc_bool_t ProbeAudioDev( vlc_object_t *p_this, demux_sys_t *p_sys,
+static bool ProbeAudioDev( vlc_object_t *p_this, demux_sys_t *p_sys,
char *psz_device )
{
#ifdef HAVE_ALSA
&& ProbeAudioDevAlsa( p_this, p_sys, psz_device ) )
{
p_sys->i_audio_method = AUDIO_METHOD_ALSA;
- return VLC_TRUE;
+ return true;
}
#endif
&& ProbeAudioDevOss( p_this, p_sys, psz_device ) )
{
p_sys->i_audio_method = AUDIO_METHOD_OSS;
- return VLC_TRUE;
+ return true;
}
p_sys->i_audio_method = 0;
- return VLC_FALSE;
+ return false;
}
static void name2var( unsigned char *name )
*****************************************************************************/
static void ControlListPrint( vlc_object_t *p_obj, int i_fd,
struct v4l2_queryctrl queryctrl,
- vlc_bool_t b_reset, vlc_bool_t b_demux )
+ bool b_reset, bool b_demux )
{
struct v4l2_querymenu querymenu;
unsigned int i_mid;
* value and create the relevant variables to enable runtime changes
*****************************************************************************/
static int ControlList( vlc_object_t *p_obj, int i_fd,
- vlc_bool_t b_reset, vlc_bool_t b_demux )
+ bool b_reset, bool b_demux )
{
struct v4l2_queryctrl queryctrl;
int i_cid;
add_usage_hint( N_("[vcd:][device][@[title][,[chapter]]]") );
add_integer( "vcd-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
- CACHING_LONGTEXT, VLC_TRUE );
+ CACHING_LONGTEXT, true );
add_shortcut( "vcd" );
add_shortcut( "svcd" );
vlc_module_end();
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 = malloc( sizeof( access_sys_t ) );
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;
int *pi_int;
int64_t *pi_64;
input_title_t ***ppp_title;
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;
/* */
{
if( p_access->info.i_title + 2 >= p_sys->i_titles )
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return NULL;
}
}
/* Reset eof */
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
return VLC_SUCCESS;
}
va_list args );
/* Now those which are strictly internal */
-static vlc_bool_t VCDEntryPoints ( access_t * );
-static vlc_bool_t VCDLIDs ( access_t * );
-static vlc_bool_t VCDSegments ( access_t * );
+static bool VCDEntryPoints ( access_t * );
+static bool VCDLIDs ( access_t * );
+static bool VCDSegments ( access_t * );
static int VCDTitles ( access_t * );
static char *VCDParse ( access_t *,
/*out*/ vcdinfo_itemid_t * p_itemid ,
- /*out*/ vlc_bool_t *play_single_item );
+ /*out*/ bool *play_single_item );
static void VCDUpdateVar( access_t *p_access, int i_entry, int i_action,
const char *p_varname, char *p_label,
msleep( MILLISECONDS_PER_SEC * *p_buf );
VCDSetOrigin(p_access, p_vcdplayer->origin_lsn, p_vcdplayer->i_track,
&(p_vcdplayer->play_item));
- // p_vcd->in_still = VLC_FALSE;
+ // p_vcd->in_still = false;
dbg_print(INPUT_DBG_STILL, "still wait time done");
#else
vcdIntfStillTime(p_vcdplayer->p_intf, *p_buf);
case VCDINFO_ITEM_TYPE_ENTRY:
break ;
default:
- p_vcdplayer->b_valid_ep = VLC_FALSE;
+ p_vcdplayer->b_valid_ep = false;
}
/* Find entry */
}
}
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
return VLC_SUCCESS;
}
and initializes area information with that.
Before calling this track information should have been read in.
*****************************************************************************/
-static vlc_bool_t
+static bool
VCDEntryPoints( access_t * p_access )
{
- if (!p_access || !p_access->p_sys) return VLC_FALSE;
+ if (!p_access || !p_access->p_sys) return false;
{
vcdplayer_t *p_vcdplayer = (vcdplayer_t *) p_access->p_sys;
if (0 == i_entries) {
LOG_ERR ("no entires found -- something is wrong" );
- return VLC_FALSE;
+ return false;
}
p_vcdplayer->p_entries = malloc( sizeof( lsn_t ) * i_entries );
if( p_vcdplayer->p_entries == NULL )
{
LOG_ERR ("not enough memory for entry points treatment" );
- return VLC_FALSE;
+ return false;
}
p_vcdplayer->i_entries = i_entries;
} else
msg_Warn( p_access, "wrong track number found in entry points" );
}
- p_vcdplayer->b_valid_ep = VLC_TRUE;
- return VLC_TRUE;
+ p_vcdplayer->b_valid_ep = true;
+ return true;
}
}
/*****************************************************************************
* VCDSegments: Reads the information about the segments the disc.
*****************************************************************************/
-static vlc_bool_t
+static bool
VCDSegments( access_t * p_access )
{
vcdplayer_t *p_vcdplayer = (vcdplayer_t *) p_access->p_sys;
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_MRL),
"Segments: %d", p_vcdplayer->i_segments);
- if ( 0 == p_vcdplayer->i_segments ) return VLC_FALSE;
+ if ( 0 == p_vcdplayer->i_segments ) return false;
t = p_vcdplayer->p_title[p_vcdplayer->i_titles] = vlc_input_title_New();
p_vcdplayer->i_titles++;
if( p_vcdplayer->p_segments == NULL )
{
LOG_ERR ("not enough memory for segment treatment" );
- return VLC_FALSE;
+ return false;
}
for( i = 0 ; i < p_vcdplayer->i_segments ; i++ )
vcdinfo_get_seg_sector_count(p_vcdplayer->vcd,
p_vcdplayer->i_segments-1);
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
/*****************************************************************************
VCDLIDs: Reads the LIST IDs from the LOT.
*****************************************************************************/
-static vlc_bool_t
+static bool
VCDLIDs( access_t * p_access )
{
vcdplayer_t *p_vcdplayer = (vcdplayer_t *) p_access->p_sys;
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_MRL),
"LIDs: %d", p_vcdplayer->i_lids);
- if ( 0 == p_vcdplayer->i_lids ) return VLC_FALSE;
+ if ( 0 == p_vcdplayer->i_lids ) return false;
if (vcdinfo_read_psd (p_vcdplayer->vcd)) {
it's best then to not try to read this at all.
*/
if (vcdinfo_get_psd_x_size(p_vcdplayer->vcd))
- vcdinfo_visit_lot (p_vcdplayer->vcd, VLC_TRUE);
+ vcdinfo_visit_lot (p_vcdplayer->vcd, true);
#endif
}
/* Set up LIDs Navigation Menu */
t = vlc_input_title_New();
- t->b_menu = VLC_TRUE;
+ t->b_menu = true;
t->psz_name = strdup( "LIDs" );
i_title = p_vcdplayer->i_tracks;
p_vcdplayer->i_titles++;
#endif
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
*****************************************************************************/
static char *
VCDParse( access_t * p_access, /*out*/ vcdinfo_itemid_t * p_itemid,
- /*out*/ vlc_bool_t *play_single_item )
+ /*out*/ bool *play_single_item )
{
vcdplayer_t *p_vcdplayer = (vcdplayer_t *)p_access->p_sys;
char *psz_parser;
if( config_GetInt( p_access, MODULE_STRING "-PBC" ) ) {
p_itemid->type = VCDINFO_ITEM_TYPE_LID;
p_itemid->num = 1;
- *play_single_item = VLC_FALSE;
+ *play_single_item = false;
}
else
{
case 'E':
p_itemid->type = VCDINFO_ITEM_TYPE_ENTRY;
++psz_parser;
- *play_single_item = VLC_TRUE;
+ *play_single_item = true;
break;
case 'P':
p_itemid->type = VCDINFO_ITEM_TYPE_LID;
++psz_parser;
- *play_single_item = VLC_FALSE;
+ *play_single_item = false;
break;
case 'S':
p_itemid->type = VCDINFO_ITEM_TYPE_SEGMENT;
++psz_parser;
- *play_single_item = VLC_TRUE;
+ *play_single_item = true;
break;
case 'T':
p_itemid->type = VCDINFO_ITEM_TYPE_TRACK;
++psz_parser;
- *play_single_item = VLC_TRUE;
+ *play_single_item = true;
break;
default: ;
}
char **cd_drives = cdio_get_devices_with_cap( NULL,
( CDIO_FS_ANAL_SVCD | CDIO_FS_ANAL_CVD
|CDIO_FS_ANAL_VIDEOCD | CDIO_FS_UNKNOWN ),
- VLC_TRUE );
+ true );
if( NULL == cd_drives ) return NULL;
if( cd_drives[0] == NULL )
{
vcdplayer_t *p_vcdplayer;
char *psz_source;
vcdinfo_itemid_t itemid;
- vlc_bool_t play_single_item = VLC_FALSE;
+ bool play_single_item = false;
p_access->pf_read = NULL;
p_access->pf_block = VCDReadBlock;
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;
"-blocks-per-read" );
p_vcdplayer->b_track_length = config_GetInt( p_this, MODULE_STRING
"-track-length" );
- p_vcdplayer->in_still = VLC_FALSE;
+ p_vcdplayer->in_still = false;
p_vcdplayer->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND;
p_vcdplayer->p_input = vlc_object_find( p_access,
VLC_OBJECT_INPUT,
goto err_exit;
}
- p_vcdplayer->b_svd= (vlc_bool_t) vcdinfo_get_tracksSVD(p_vcdplayer->vcd);;
+ p_vcdplayer->b_svd= (bool) vcdinfo_get_tracksSVD(p_vcdplayer->vcd);;
/* Get track information. */
p_vcdplayer->i_tracks = vcdinfo_get_num_tracks(p_vcdplayer->vcd);
if( ! VCDEntryPoints( p_access ) )
{
msg_Warn( p_access, "could not read entry points, will not use them" );
- p_vcdplayer->b_valid_ep = VLC_FALSE;
+ p_vcdplayer->b_valid_ep = false;
}
/* Initialize LID info and add that as a menu item */
#if FIXED
p_vcdplayer->p_intf = intf_Create( p_access, "vcdx" );
- p_vcdplayer->p_intf->b_block = VLC_FALSE;
+ p_vcdplayer->p_intf->b_block = false;
#endif
p_vcdplayer->p_access = p_access;
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
{
- vlc_bool_t *pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+ bool *pb_bool = (bool*)va_arg( args, bool* );
dbg_print( INPUT_DBG_EVENT,
"seek/fastseek/pause/can_control_pace" );
- *pb_bool = VLC_TRUE;
+ *pb_bool = true;
return VLC_SUCCESS;
break;
}
strncat(tp, str, TEMP_STR_LEN-(tp-temp_str)); \
tp += len; \
} \
- saw_control_prefix = VLC_FALSE; \
+ saw_control_prefix = false; \
} \
}
strncat(tp, num_str, TEMP_STR_LEN-(tp-temp_str)); \
tp += len; \
} \
- saw_control_prefix = VLC_FALSE; \
+ saw_control_prefix = false; \
}
/*!
static char temp_str[TEMP_STR_SIZE];
size_t i;
char * tp = temp_str;
- vlc_bool_t saw_control_prefix = VLC_FALSE;
+ bool saw_control_prefix = false;
size_t format_len = strlen(format_str);
memset(temp_str, 0, TEMP_STR_SIZE);
if (!saw_control_prefix && format_str[i] != '%') {
*tp++ = format_str[i];
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
continue;
}
/* What to do? */
;
}
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
}
break;
strncat(tp, num_str, TEMP_STR_LEN-(tp-temp_str));
tp += strlen(num_str);
}
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
break;
case 'M':
strncat(tp, seg_type_str, TEMP_STR_LEN-(tp-temp_str));
tp += strlen(seg_type_str);
}
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
break;
case 'T':
default:
*tp++ = '%';
*tp++ = format_str[i];
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
}
}
return strdup(temp_str);
int i, i_action = -1;
struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys;
- p_intf->p_sys->b_key_pressed = VLC_FALSE;
+ p_intf->p_sys->b_key_pressed = false;
/* Find action triggered by hotkey (if any) */
var_Get( p_intf->p_libvlc, "key-pressed", &val );
p_intf->p_sys->p_input = p_input;
p_intf->p_sys->p_vcdplayer = NULL;
- p_intf->p_sys->b_move = VLC_FALSE;
- p_intf->p_sys->b_click = VLC_FALSE;
- p_intf->p_sys->b_key_pressed = VLC_FALSE;
+ p_intf->p_sys->b_move = false;
+ p_intf->p_sys->b_click = false;
+ p_intf->p_sys->b_key_pressed = false;
vlc_mutex_unlock( &p_intf->change_lock );
intf_thread_t *p_intf = (intf_thread_t *)p_data;
vlc_mutex_lock( &p_intf->change_lock );
- p_intf->p_sys->b_key_pressed = VLC_TRUE;
+ p_intf->p_sys->b_key_pressed = true;
vlc_mutex_unlock( &p_intf->change_lock );
p_intf->p_sys->b_still = 1;
if( 255 == i_sec )
{
- p_intf->p_sys->b_infinite_still = VLC_TRUE;
+ p_intf->p_sys->b_infinite_still = true;
}
else
{
input_thread_t *p_input;
vcdplayer_t *p_vcdplayer;
- vlc_bool_t b_still; /* True if we are in a still frame */
- vlc_bool_t b_infinite_still; /* True if still wait time is infinite */
+ bool b_still; /* True if we are in a still frame */
+ bool b_infinite_still; /* True if still wait time is infinite */
mtime_t m_still_time; /* Time in microseconds remaining
to wait in still frame.
*/
#else
int control;
#endif
- vlc_bool_t b_click, b_move, b_key_pressed;
+ bool b_click, b_move, b_key_pressed;
};
int vcdIntfStillTime( struct intf_thread_t * p_intf, uint8_t wait_time);
/* Configuration options */
add_integer ( MODULE_STRING "-debug", 0, NULL,
N_("If nonzero, this gives additional debug information."),
- DEBUG_LONGTEXT, VLC_TRUE );
+ DEBUG_LONGTEXT, true );
add_integer ( MODULE_STRING "-blocks-per-read", 20,
NULL,
N_("Number of CD blocks to get in a single read."),
N_("Number of CD blocks to get in a single read."),
- VLC_TRUE );
+ true );
add_bool( MODULE_STRING "-PBC", 0, NULL,
N_("Use playback control?"),
N_("If VCD is authored with playback control, use it. "
"Otherwise we play by tracks."),
- VLC_FALSE );
+ false );
- add_bool( MODULE_STRING "-track-length", VLC_TRUE,
+ add_bool( MODULE_STRING "-track-length", true,
NULL,
N_("Use track length as maximum unit in seek?"),
N_("If set, the length of the seek bar is the track rather than "
"the length of an entry."),
- VLC_FALSE );
+ false );
add_bool( MODULE_STRING "-extended-info", 0, NULL,
N_("Show extended VCD info?"),
N_("Show the maximum amount of information under Stream and "
"Media Info. Shows for example playback control navigation."),
- VLC_FALSE );
+ false );
add_string( MODULE_STRING "-author-format",
"%v - %F disc %c of %C",
NULL,
N_("Format to use in the playlist's \"author\" field."),
- VCD_TITLE_FMT_LONGTEXT, VLC_TRUE );
+ VCD_TITLE_FMT_LONGTEXT, true );
add_string( MODULE_STRING "-title-format",
"%I %N %L%S - %M %A %v - disc %c of %C %F",
NULL,
N_("Format to use in the playlist's \"title\" field."),
- VCD_TITLE_FMT_LONGTEXT, VLC_FALSE );
+ VCD_TITLE_FMT_LONGTEXT, false );
vlc_module_end();
#endif
int i_still_time;
- vlc_bool_t b_end_of_cell;
+ bool b_end_of_cell;
#if FINISHED
vcdplay_event_t event;
set_callbacks (Open, Close);
add_integer ("access-bandwidth", 65536, NULL, BANDWIDTH_TEXT,
- BANDWIDTH_LONGTEXT, VLC_FALSE);
+ BANDWIDTH_LONGTEXT, false);
vlc_module_end();
static ssize_t Read (access_t *access, uint8_t *buffer, size_t len);
add_shortcut ("dump");
set_callbacks (Open, Close);
- add_bool ("dump-force", VLC_FALSE, NULL, FORCE_TEXT,
- FORCE_LONGTEXT, VLC_FALSE);
+ add_bool ("dump-force", false, NULL, FORCE_TEXT,
+ FORCE_LONGTEXT, false);
add_integer ("dump-margin", DEFAULT_MARGIN, NULL, MARGIN_TEXT,
- MARGIN_LONGTEXT, VLC_FALSE);
+ MARGIN_LONGTEXT, false);
vlc_module_end();
static ssize_t Read (access_t *access, uint8_t *buffer, size_t len);
if (!var_CreateGetBool (access, "dump-force"))
{
- vlc_bool_t b;
+ bool b;
if ((access2_Control (src, ACCESS_CAN_FASTSEEK, &b) == 0) && b)
{
msg_Dbg (obj, "dump filter useless");
add_shortcut( "record" );
add_directory( "record-path", NULL, NULL,
- RECORD_PATH_TXT, RECORD_PATH_LONGTXT, VLC_TRUE );
+ RECORD_PATH_TXT, RECORD_PATH_LONGTXT, true );
change_unsafe();
set_callbacks( Open, Close );
struct access_sys_t
{
- vlc_bool_t b_dump;
+ bool b_dump;
char *psz_path;
const char *psz_ext;
p_sys->i_size = 0;
p_sys->psz_file = NULL;
p_sys->psz_ext = "dat";
- p_sys->b_dump = VLC_FALSE;
+ p_sys->b_dump = false;
p_sys->p_vout = NULL;
p_sys->i_vout_chan = -1;
p_sys->i_update_sav = p_access->info.i_update;
if( newval.i_int == ACTIONID_RECORD )
{
if( p_sys->b_dump )
- p_sys->b_dump = VLC_FALSE;
+ p_sys->b_dump = false;
else
- p_sys->b_dump = VLC_TRUE;
+ p_sys->b_dump = true;
}
return VLC_SUCCESS;
/*****************************************************************************
*
*****************************************************************************/
-static void Notify( access_t *p_access, vlc_bool_t b_dump )
+static void Notify( access_t *p_access, bool b_dump )
{
access_sys_t *p_sys = p_access->p_sys;
vout_thread_t *p_vout;
msg_Dbg( p_access, "dumped "I64Fd" kb (%s)",
p_sys->i_size/1024, p_sys->psz_file );
- Notify( p_access, VLC_FALSE );
+ Notify( p_access, false );
fclose( p_sys->f );
p_sys->f = NULL;
free( psz_name );
if( p_sys->psz_file == NULL )
{
- p_sys->b_dump = VLC_FALSE;
+ p_sys->b_dump = false;
return;
}
free( psz_name );
if( p_sys->psz_file == NULL )
{
- p_sys->b_dump = VLC_FALSE;
+ p_sys->b_dump = false;
return;
}
p_sys->psz_file );
free( p_sys->psz_file );
p_sys->psz_file = NULL;
- p_sys->b_dump = VLC_FALSE;
+ p_sys->b_dump = false;
return;
}
- Notify( p_access, VLC_TRUE );
+ Notify( p_access, true );
p_sys->i_size = 0;
}
set_callbacks( Open, Close );
add_integer( "timeshift-granularity", 50, NULL, GRANULARITY_TEXT,
- GRANULARITY_LONGTEXT, VLC_TRUE );
- add_directory( "timeshift-dir", 0, 0, DIR_TEXT, DIR_LONGTEXT, VLC_FALSE );
+ GRANULARITY_LONGTEXT, true );
+ add_directory( "timeshift-dir", 0, 0, DIR_TEXT, DIR_LONGTEXT, false );
change_unsafe();
- add_bool( "timeshift-force", VLC_FALSE, NULL, FORCE_TEXT, FORCE_LONGTEXT,
- VLC_FALSE );
+ add_bool( "timeshift-force", false, NULL, FORCE_TEXT, FORCE_LONGTEXT,
+ false );
vlc_module_end();
/*****************************************************************************
access_t *p_access = (access_t*)p_this;
access_t *p_src = p_access->p_source;
access_sys_t *p_sys;
- vlc_bool_t b_bool;
+ bool b_bool;
var_Create( p_access, "timeshift-force", VLC_VAR_BOOL|VLC_VAR_DOINHERIT );
if( var_GetBool( p_access, "timeshift-force" ) )
p_sys->psz_filename = malloc( strlen( p_sys->psz_filename_base ) + 1000 );
if( vlc_thread_create( p_access, "timeshift thread", Thread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Err( p_access, "cannot spawn timeshift access thread" );
return VLC_EGENERIC;
}
msg_Dbg( p_access, "timeshift: EOF" );
- p_src->info.b_eof = VLC_TRUE;
+ p_src->info.b_eof = true;
/* Send dummy packet to avoid deadlock in Block() */
block_FifoPut( p_sys->p_fifo, block_New( p_access, 0 ) );
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int *pi_int;
switch( i_query )
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
- 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_CONTROL_PACE: /* Not really true */
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_GET_MTU:
if( vlc_thread_create( p_sys->poll_thread, "Avahi Poll Iterate Thread",
poll_iterate_thread,
- VLC_THREAD_PRIORITY_HIGHEST, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_HIGHEST, false ) )
{
msg_Err( p_sys->p_log, "failed to create poll iterate thread" );
goto error;
add_shortcut( "file" );
add_shortcut( "stream" );
add_bool( SOUT_CFG_PREFIX "append", 0, NULL, APPEND_TEXT,APPEND_LONGTEXT,
- VLC_TRUE );
+ true );
set_callbacks( Open, Close );
vlc_module_end();
set_category( CAT_SOUT );
set_subcategory( SUBCAT_SOUT_ACO );
add_string( SOUT_CFG_PREFIX "user", "", NULL,
- USER_TEXT, USER_LONGTEXT, VLC_TRUE );
+ USER_TEXT, USER_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "pwd", "", NULL,
- PASS_TEXT, PASS_LONGTEXT, VLC_TRUE );
+ PASS_TEXT, PASS_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "mime", "", NULL,
- MIME_TEXT, MIME_LONGTEXT, VLC_TRUE );
+ MIME_TEXT, MIME_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "cert", "vlc.pem", NULL,
- CERT_TEXT, CERT_LONGTEXT, VLC_TRUE );
+ CERT_TEXT, CERT_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "key", NULL, NULL,
- KEY_TEXT, KEY_LONGTEXT, VLC_TRUE );
+ KEY_TEXT, KEY_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "ca", NULL, NULL,
- CA_TEXT, CA_LONGTEXT, VLC_TRUE );
+ CA_TEXT, CA_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "crl", NULL, NULL,
- CRL_TEXT, CRL_LONGTEXT, VLC_TRUE );
- add_bool( SOUT_CFG_PREFIX "bonjour", VLC_FALSE, NULL,
- BONJOUR_TEXT, BONJOUR_LONGTEXT, VLC_TRUE);
+ CRL_TEXT, CRL_LONGTEXT, true );
+ add_bool( SOUT_CFG_PREFIX "bonjour", false, NULL,
+ BONJOUR_TEXT, BONJOUR_LONGTEXT, true);
set_callbacks( Open, Close );
vlc_module_end();
int i_header_allocated;
int i_header_size;
uint8_t *p_header;
- vlc_bool_t b_header_complete;
+ bool b_header_complete;
#ifdef HAVE_AVAHI_CLIENT
void *p_bonjour;
p_sys->i_header_allocated = 1024;
p_sys->i_header_size = 0;
p_sys->p_header = malloc( p_sys->i_header_allocated );
- p_sys->b_header_complete = VLC_FALSE;
+ p_sys->b_header_complete = false;
p_access->pf_write = Write;
p_access->pf_seek = Seek;
{
/* free previously gathered header */
p_sys->i_header_size = 0;
- p_sys->b_header_complete = VLC_FALSE;
+ p_sys->b_header_complete = false;
}
if( (int)(p_buffer->i_buffer + p_sys->i_header_size) >
p_sys->i_header_allocated )
}
else if( !p_sys->b_header_complete )
{
- p_sys->b_header_complete = VLC_TRUE;
+ p_sys->b_header_complete = true;
httpd_StreamHeader( p_sys->p_httpd_stream, p_sys->p_header,
p_sys->i_header_size );
set_subcategory( SUBCAT_SOUT_ACO );
add_shortcut( "shout" );
add_string( SOUT_CFG_PREFIX "name", "VLC media player - Live stream", NULL,
- NAME_TEXT, NAME_LONGTEXT, VLC_FALSE );
+ NAME_TEXT, NAME_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "description",
"Live stream from VLC media player", NULL,
- DESCRIPTION_TEXT, DESCRIPTION_LONGTEXT, VLC_FALSE );
- add_bool( SOUT_CFG_PREFIX "mp3", VLC_FALSE, NULL,
- MP3_TEXT, MP3_LONGTEXT, VLC_TRUE );
+ DESCRIPTION_TEXT, DESCRIPTION_LONGTEXT, false );
+ add_bool( SOUT_CFG_PREFIX "mp3", false, NULL,
+ MP3_TEXT, MP3_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "genre", "Alternative", NULL,
- GENRE_TEXT, GENRE_LONGTEXT, VLC_FALSE );
+ GENRE_TEXT, GENRE_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "url", "http://www.videolan.org/vlc", NULL,
- URL_TEXT, URL_LONGTEXT, VLC_FALSE );
+ URL_TEXT, URL_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "bitrate", "", NULL,
- BITRATE_TEXT, BITRATE_LONGTEXT, VLC_FALSE );
+ BITRATE_TEXT, BITRATE_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "samplerate", "", NULL,
- SAMPLERATE_TEXT, SAMPLERATE_LONGTEXT, VLC_FALSE );
+ SAMPLERATE_TEXT, SAMPLERATE_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "channels", "", NULL,
- CHANNELS_TEXT, CHANNELS_LONGTEXT, VLC_FALSE );
+ CHANNELS_TEXT, CHANNELS_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "quality", "", NULL,
- QUALITY_TEXT, QUALITY_LONGTEXT, VLC_FALSE );
- add_bool( SOUT_CFG_PREFIX "public", VLC_FALSE, NULL,
- PUBLIC_TEXT, PUBLIC_LONGTEXT, VLC_TRUE );
+ QUALITY_TEXT, QUALITY_LONGTEXT, false );
+ add_bool( SOUT_CFG_PREFIX "public", false, NULL,
+ PUBLIC_TEXT, PUBLIC_LONGTEXT, true );
set_callbacks( Open, Close );
vlc_module_end();
free( psz_url );
var_Get( p_access, SOUT_CFG_PREFIX "mp3", &val );
- if( val.b_bool == VLC_TRUE )
+ if( val.b_bool == true )
i_ret = shout_set_format( p_shout, SHOUT_FORMAT_MP3 );
else
i_ret = shout_set_format( p_shout, SHOUT_FORMAT_OGG );
free( val.psz_string );
var_Get( p_access, SOUT_CFG_PREFIX "public", &val );
- if( val.b_bool == VLC_TRUE )
+ if( val.b_bool == true )
{
i_ret = shout_set_public( p_shout, 1 );
if( i_ret != SHOUTERR_SUCCESS )
set_shortname( "UDP" );
set_category( CAT_SOUT );
set_subcategory( SUBCAT_SOUT_ACO );
- add_integer( SOUT_CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
+ add_integer( SOUT_CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "group", 1, NULL, GROUP_TEXT, GROUP_LONGTEXT,
- VLC_TRUE );
+ true );
add_obsolete_integer( SOUT_CFG_PREFIX "late" );
add_obsolete_bool( SOUT_CFG_PREFIX "raw" );
- add_bool( SOUT_CFG_PREFIX "auto-mcast", VLC_FALSE, NULL, AUTO_MCAST_TEXT,
- AUTO_MCAST_LONGTEXT, VLC_TRUE );
+ add_bool( SOUT_CFG_PREFIX "auto-mcast", false, NULL, AUTO_MCAST_TEXT,
+ AUTO_MCAST_LONGTEXT, true );
set_capability( "sout access", 100 );
add_shortcut( "udp" );
struct sout_access_out_sys_t
{
int i_mtu;
- vlc_bool_t b_mtu_warning;
+ bool b_mtu_warning;
block_t *p_buffer;
p_sys->p_buffer = NULL;
if( vlc_thread_create( p_sys->p_thread, "sout write thread", ThreadWrite,
- VLC_THREAD_PRIORITY_HIGHEST, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_HIGHEST, false ) )
{
msg_Err( p_access->p_sout, "cannot spawn sout access thread" );
net_Close (i_handle);
{
msg_Warn( p_access, "packet size > MTU, you should probably "
"increase the MTU" );
- p_sys->b_mtu_warning = VLC_TRUE;
+ p_sys->b_mtu_warning = true;
}
/* Check if there is enough space in the buffer */
set_subcategory( SUBCAT_AUDIO_AFILTER );
add_integer( "headphone-dim", 10, NULL, HEADPHONE_DIM_TEXT,
- HEADPHONE_DIM_LONGTEXT, VLC_FALSE );
+ HEADPHONE_DIM_LONGTEXT, false );
add_bool( "headphone-compensate", 0, NULL, HEADPHONE_COMPENSATE_TEXT,
- HEADPHONE_COMPENSATE_LONGTEXT, VLC_TRUE );
+ HEADPHONE_COMPENSATE_LONGTEXT, true );
add_bool( "headphone-dolby", 0, NULL, HEADPHONE_DOLBY_TEXT,
- HEADPHONE_DOLBY_LONGTEXT, VLC_TRUE );
+ HEADPHONE_DOLBY_LONGTEXT, true );
set_capability( "audio filter", 0 );
set_callbacks( Create, Destroy );
static int Create( vlc_object_t *p_this )
{
aout_filter_t * p_filter = (aout_filter_t *)p_this;
- vlc_bool_t b_fit = VLC_TRUE;
+ bool b_fit = true;
/* Activate this filter only with stereo devices */
if( p_filter->output.i_physical_channels
if( p_filter->input.i_original_channels
!= p_filter->output.i_original_channels )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_original_channels =
p_filter->output.i_original_channels;
}
if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
|| p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
}
if( p_filter->input.i_rate != p_filter->output.i_rate )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_rate = p_filter->output.i_rate;
}
if( p_filter->input.i_physical_channels == (AOUT_CHAN_LEFT|AOUT_CHAN_RIGHT)
&& ( p_filter->input.i_original_channels & AOUT_CHAN_DOLBYSTEREO )
&& ! config_GetInt ( p_filter , "headphone-dolby" ) )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
AOUT_CHAN_CENTER |
AOUT_CHAN_REARLEFT |
static int OpenFilter( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
- vlc_bool_t b_fit = VLC_TRUE;
+ bool b_fit = true;
/* Activate this filter only with stereo devices */
if( p_filter->fmt_out.audio.i_physical_channels
if( p_filter->fmt_in.audio.i_original_channels
!= p_filter->fmt_out.audio.i_original_channels )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->fmt_in.audio.i_original_channels =
p_filter->fmt_out.audio.i_original_channels;
}
if( p_filter->fmt_in.audio.i_format != VLC_FOURCC('f','l','3','2')
|| p_filter->fmt_out.audio.i_format != VLC_FOURCC('f','l','3','2') )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->fmt_in.audio.i_format = VLC_FOURCC('f','l','3','2');
p_filter->fmt_out.audio.i_format = VLC_FOURCC('f','l','3','2');
}
if( p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->fmt_in.audio.i_rate = p_filter->fmt_out.audio.i_rate;
}
if( p_filter->fmt_in.audio.i_physical_channels == (AOUT_CHAN_LEFT|AOUT_CHAN_RIGHT)
&& ( p_filter->fmt_in.audio.i_original_channels & AOUT_CHAN_DOLBYSTEREO )
&& !config_GetInt( p_filter, "headphone-dolby" ) )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->fmt_in.audio.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
AOUT_CHAN_CENTER |
AOUT_CHAN_REARLEFT |
struct filter_sys_t
{
- vlc_bool_t b_downmix;
+ bool b_downmix;
unsigned int i_nb_channels; /* number of int16_t per sample */
int i_channel_selected;
set_description( _("Audio filter for stereo to mono conversion") );
set_capability( "audio filter2", 0 );
- add_bool( MONO_CFG "downmix", VLC_FALSE, NULL, MONO_DOWNMIX_TEXT,
- MONO_DOWNMIX_LONGTEXT, VLC_FALSE );
+ add_bool( MONO_CFG "downmix", false, NULL, MONO_DOWNMIX_TEXT,
+ MONO_DOWNMIX_LONGTEXT, false );
add_integer( MONO_CFG "channel", -1, NULL, MONO_CHANNEL_TEXT,
- MONO_CHANNEL_LONGTEXT, VLC_FALSE );
+ MONO_CHANNEL_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
set_category( CAT_AUDIO );
struct filter_sys_t
{
a52_state_t * p_liba52; /* liba52 internal structure */
- vlc_bool_t b_dynrng; /* see below */
+ bool b_dynrng; /* see below */
int i_flags; /* liba52 flags, see a52dec/doc/liba52.txt */
- vlc_bool_t b_dontwarn;
+ bool b_dontwarn;
int i_nb_channels; /* number of float32 per sample */
int pi_chan_table[AOUT_CHAN_MAX]; /* channel reordering */
set_description( _("ATSC A/52 (AC-3) audio decoder") );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACODEC );
- add_bool( "a52-dynrng", 1, NULL, DYNRNG_TEXT, DYNRNG_LONGTEXT, VLC_FALSE );
- add_bool( "a52-upmix", 0, NULL, UPMIX_TEXT, UPMIX_LONGTEXT, VLC_TRUE );
+ add_bool( "a52-dynrng", 1, NULL, DYNRNG_TEXT, DYNRNG_LONGTEXT, false );
+ add_bool( "a52-upmix", 0, NULL, UPMIX_TEXT, UPMIX_LONGTEXT, true );
set_capability( "audio filter", 100 );
set_callbacks( Create, Destroy );
struct filter_sys_t
{
dca_state_t * p_libdca; /* libdca internal structure */
- vlc_bool_t b_dynrng; /* see below */
+ bool b_dynrng; /* see below */
int i_flags; /* libdca flags, see dtsdec/doc/libdts.txt */
- vlc_bool_t b_dontwarn;
+ bool b_dontwarn;
int i_nb_channels; /* number of float32 per sample */
int pi_chan_table[AOUT_CHAN_MAX]; /* channel reordering */
set_subcategory( SUBCAT_INPUT_ACODEC );
set_shortname( "DCA" );
set_description( _("DTS Coherent Acoustics audio decoder") );
- add_bool( "dts-dynrng", 1, NULL, DYNRNG_TEXT, DYNRNG_LONGTEXT, VLC_FALSE );
+ add_bool( "dts-dynrng", 1, NULL, DYNRNG_TEXT, DYNRNG_LONGTEXT, false );
set_capability( "audio filter", 100 );
set_callbacks( Create, Destroy );
}
p_filter->pf_do_work = Do_U8ToF32;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return 0;
}
else
p_filter->pf_do_work = Do_S16ToFL32;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return 0;
}
&& p_filter->input.i_format != AOUT_FMT_S16_NE )
{
p_filter->pf_do_work = Do_S16ToFL32_SW;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return 0;
}
&& p_filter->input.i_format != AOUT_FMT_S24_NE )
{
p_filter->pf_do_work = Do_S16ToFL24_SW;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return 0;
}
}
p_filter->pf_do_work = Do_S8ToFL32;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return 0;
}
}
p_filter->pf_do_work = Do_U8ToFL32;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return 0;
}
aout_filter.output.i_format = p_filter->fmt_out.i_codec;
in_buf.p_buffer = p_block->p_buffer;
- in_buf.b_discontinuity = VLC_FALSE;
+ in_buf.b_discontinuity = false;
in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_samples;
out_buf.p_buffer = p_out->p_buffer;
set_subcategory( SUBCAT_AUDIO_AFILTER );
add_string( "equalizer-preset", "flat", NULL, PRESET_TEXT,
- PRESET_LONGTEXT, VLC_FALSE );
+ PRESET_LONGTEXT, false );
change_string_list( preset_list, preset_list_text, 0 );
add_string( "equalizer-bands", NULL, NULL, BANDS_TEXT,
- BANDS_LONGTEXT, VLC_TRUE );
+ BANDS_LONGTEXT, true );
add_bool( "equalizer-2pass", 0, NULL, TWOPASS_TEXT,
- TWOPASS_LONGTEXT, VLC_TRUE );
+ TWOPASS_LONGTEXT, true );
add_float( "equalizer-preamp", 12.0, NULL, PREAMP_TEXT,
- PREAMP_LONGTEXT, VLC_TRUE );
+ PREAMP_LONGTEXT, true );
set_callbacks( Open, Close );
add_shortcut( "equalizer" );
vlc_module_end();
float f_newpreamp;
char *psz_newbands;
- vlc_bool_t b_first;
+ bool b_first;
/* Filter dyn config */
float *f_amp; /* Per band amp */
float f_gamp; /* Global preamp */
- vlc_bool_t b_2eqz;
+ bool b_2eqz;
/* Filter state */
float x[32][2];
{
aout_filter_t *p_filter = (aout_filter_t *)p_this;
aout_filter_sys_t *p_sys;
- vlc_bool_t b_fit = VLC_TRUE;
+ bool b_fit = true;
if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
msg_Warn( p_filter, "bad input or output format" );
}
if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
memcpy( &p_filter->output, &p_filter->input,
sizeof(audio_sample_format_t) );
msg_Warn( p_filter, "input and output formats are not similar" );
}
p_filter->pf_do_work = DoWork;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
/* Allocate structure */
p_sys = p_filter->p_sys = malloc( sizeof( aout_filter_sys_t ) );
}
/* Filter dyn config */
- p_sys->b_2eqz = VLC_FALSE;
+ p_sys->b_2eqz = false;
p_sys->f_gamp = 1.0;
p_sys->f_amp = malloc( p_sys->i_band * sizeof(float) );
for( i = 0; i < p_sys->i_band; i++ )
var_Get( p_aout, "equalizer-bands", &val2 );
var_Get( p_aout, "equalizer-preamp", &val3 );
- p_sys->b_first = VLC_TRUE;
+ p_sys->b_first = true;
PresetCallback( VLC_OBJECT( p_aout ), NULL, val1, val1, p_sys );
BandsCallback( VLC_OBJECT( p_aout ), NULL, val2, val2, p_sys );
PreampCallback( VLC_OBJECT( p_aout ), NULL, val3, val3, p_sys );
- p_sys->b_first = VLC_FALSE;
+ p_sys->b_first = false;
/* Register preset bands (for intf) if : */
/* We have no bands info --> the preset info must be given to the intf */
sprintf( psz_newbands, "%s "I64Fd".%07u", psz_newbands,
(int64_t)div.quot, (unsigned int) div.rem );
}
- if( p_sys->b_first == VLC_FALSE )
+ if( p_sys->b_first == false )
{
var_SetString( p_aout, "equalizer-bands", psz_newbands );
var_SetFloat( p_aout, "equalizer-preamp",
set_subcategory( SUBCAT_AUDIO_AFILTER );
add_shortcut( "volnorm" );
add_integer( "norm-buff-size", 20 ,NULL ,BUFF_TEXT, BUFF_LONGTEXT,
- VLC_TRUE);
+ true);
add_float( "norm-max-level", 2.0, NULL, LEVEL_TEXT,
- LEVEL_LONGTEXT, VLC_TRUE );
+ LEVEL_LONGTEXT, true );
set_capability( "audio filter", 0 );
set_callbacks( Open, Close );
vlc_module_end();
static int Open( vlc_object_t *p_this )
{
aout_filter_t *p_filter = (aout_filter_t*)p_this;
- vlc_bool_t b_fit = VLC_TRUE;
+ bool b_fit = true;
int i_channels;
aout_filter_sys_t *p_sys;
if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
msg_Warn( p_filter, "bad input or output format" );
if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
memcpy( &p_filter->output, &p_filter->input,
sizeof(audio_sample_format_t) );
msg_Warn( p_filter, "input and output formats are not similar" );
}
p_filter->pf_do_work = DoWork;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
i_channels = aout_FormatNbChannels( &p_filter->input );
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AFILTER );
- add_float( "param-eq-lowf", 100, NULL, N_("Low freq (Hz)"),"", VLC_FALSE );
+ add_float( "param-eq-lowf", 100, NULL, N_("Low freq (Hz)"),"", false );
add_float_with_range( "param-eq-lowgain", 0, -20.0, 20.0, NULL,
- N_("Low freq gain (dB)"), "",VLC_FALSE );
- add_float( "param-eq-highf", 10000, NULL, N_("High freq (Hz)"),"", VLC_FALSE );
+ N_("Low freq gain (dB)"), "",false );
+ add_float( "param-eq-highf", 10000, NULL, N_("High freq (Hz)"),"", false );
add_float_with_range( "param-eq-highgain", 0, -20.0, 20.0, NULL,
- N_("High freq gain (dB)"),"",VLC_FALSE );
- add_float( "param-eq-f1", 300, NULL, N_("Freq 1 (Hz)"),"", VLC_FALSE );
+ N_("High freq gain (dB)"),"",false );
+ add_float( "param-eq-f1", 300, NULL, N_("Freq 1 (Hz)"),"", false );
add_float_with_range( "param-eq-gain1", 0, -20.0, 20.0, NULL,
- N_("Freq 1 gain (dB)"), "",VLC_FALSE );
+ N_("Freq 1 gain (dB)"), "",false );
add_float_with_range( "param-eq-q1", 3, 0.1, 100.0, NULL,
- N_("Freq 1 Q"), "",VLC_FALSE );
- add_float( "param-eq-f2", 1000, NULL, N_("Freq 2 (Hz)"),"", VLC_FALSE );
+ N_("Freq 1 Q"), "",false );
+ add_float( "param-eq-f2", 1000, NULL, N_("Freq 2 (Hz)"),"", false );
add_float_with_range( "param-eq-gain2", 0, -20.0, 20.0, NULL,
- N_("Freq 2 gain (dB)"),"",VLC_FALSE );
+ N_("Freq 2 gain (dB)"),"",false );
add_float_with_range( "param-eq-q2", 3, 0.1, 100.0, NULL,
- N_("Freq 2 Q"),"",VLC_FALSE );
- add_float( "param-eq-f3", 3000, NULL, N_("Freq 3 (Hz)"),"", VLC_FALSE );
+ N_("Freq 2 Q"),"",false );
+ add_float( "param-eq-f3", 3000, NULL, N_("Freq 3 (Hz)"),"", false );
add_float_with_range( "param-eq-gain3", 0, -20.0, 20.0, NULL,
- N_("Freq 3 gain (dB)"),"",VLC_FALSE );
+ N_("Freq 3 gain (dB)"),"",false );
add_float_with_range( "param-eq-q3", 3, 0.1, 100.0, NULL,
- N_("Freq 3 Q"),"",VLC_FALSE );
+ N_("Freq 3 Q"),"",false );
set_callbacks( Open, Close );
vlc_module_end();
{
aout_filter_t *p_filter = (aout_filter_t *)p_this;
aout_filter_sys_t *p_sys;
- vlc_bool_t b_fit = VLC_TRUE;
+ bool b_fit = true;
int i_samplerate;
if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
msg_Warn( p_filter, "bad input or output format" );
}
if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
memcpy( &p_filter->output, &p_filter->input,
sizeof(audio_sample_format_t) );
msg_Warn( p_filter, "input and output formats are not similar" );
}
p_filter->pf_do_work = DoWork;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
/* Allocate structure */
p_sys = p_filter->p_sys = malloc( sizeof( aout_filter_sys_t ) );
/* We don't want a new buffer to be created because we're not sure we'll
* actually need to resample anything. */
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return VLC_SUCCESS;
}
p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples *
p_filter->input.i_bytes_per_frame;
}
- p_filter->b_continuity = VLC_FALSE;
+ p_filter->b_continuity = false;
p_filter->p_sys->i_old_wing = 0;
return;
}
{
/* Continuity in sound samples has been broken, we'd better reset
* everything. */
- p_filter->b_continuity = VLC_TRUE;
+ p_filter->b_continuity = true;
p_filter->p_sys->i_remainder = 0;
aout_DateInit( &p_filter->p_sys->end_date, p_filter->output.i_rate );
aout_DateSet( &p_filter->p_sys->end_date, p_in_buf->start_date );
/* We don't want a new buffer to be created because we're not sure we'll
* actually need to resample anything. */
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return VLC_SUCCESS;
}
memcpy( p_in_buf->p_buffer, p_prev_sample,
i_nb_channels * sizeof(float) );
}
- p_filter->b_continuity = VLC_FALSE;
+ p_filter->b_continuity = false;
return;
}
/* Take care of the previous input sample (if any) */
if( !p_filter->b_continuity )
{
- p_filter->b_continuity = VLC_TRUE;
+ p_filter->b_continuity = true;
p_sys->i_remainder = 0;
aout_DateInit( &p_sys->end_date, p_filter->output.i_rate );
}
aout_filter.p_sys = (struct aout_filter_sys_t *)p_filter->p_sys;
aout_filter.input = p_filter->fmt_in.audio;
aout_filter.output = p_filter->fmt_out.audio;
- aout_filter.b_continuity = VLC_FALSE;
+ aout_filter.b_continuity = false;
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_nb_bytes = p_block->i_buffer;
}
p_filter->pf_do_work = DoWork;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return 0;
}
/* We don't want a new buffer to be created because we're not sure we'll
* actually need to resample anything. */
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
return VLC_SUCCESS;
}
set_callbacks( Open, Close );
add_shortcut( "spatializer" );
- add_float( "Roomsize", 1.05, NULL, NULL,NULL, VLC_TRUE);
- add_float( "Width", 10.0, NULL, NULL,NULL, VLC_TRUE);
- add_float( "Wet", 3.0, NULL, NULL,NULL, VLC_TRUE);
- add_float( "Dry", 2.0, NULL, NULL,NULL, VLC_TRUE);
- add_float( "Damp", 1.0, NULL, NULL,NULL, VLC_TRUE);
+ add_float( "Roomsize", 1.05, NULL, NULL,NULL, true);
+ add_float( "Width", 10.0, NULL, NULL,NULL, true);
+ add_float( "Wet", 3.0, NULL, NULL,NULL, true);
+ add_float( "Dry", 2.0, NULL, NULL,NULL, true);
+ add_float( "Damp", 1.0, NULL, NULL,NULL, true);
vlc_module_end();
/*****************************************************************************
typedef struct aout_filter_sys_t
{
/* reverb static config */
- vlc_bool_t b_first;
+ bool b_first;
} aout_filter_sys_t;
{
aout_filter_t *p_filter = (aout_filter_t *)p_this;
aout_filter_sys_t *p_sys;
- vlc_bool_t b_fit = VLC_TRUE;
+ bool b_fit = true;
msg_Dbg(p_this, "Opening filter spatializer %s %s %d\n", __FILE__,__func__,__LINE__);
if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
msg_Warn( p_filter, "bad input or output format" );
}
if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
{
- b_fit = VLC_FALSE;
+ b_fit = false;
memcpy( &p_filter->output, &p_filter->input,
sizeof(audio_sample_format_t) );
msg_Warn( p_filter, "input and output formats are not similar" );
}
p_filter->pf_do_work = DoWork;
- p_filter->b_in_place = VLC_TRUE;
+ p_filter->b_in_place = true;
/* Allocate structure */
p_sys = p_filter->p_sys = (aout_filter_sys_t*)malloc( sizeof( aout_filter_sys_t ) );
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_string( "alsadev", DEFAULT_ALSA_DEVICE, aout_FindAndRestart,
- N_("ALSA Device Name"), NULL, VLC_FALSE );
+ N_("ALSA Device Name"), NULL, false );
change_string_list( ppsz_devices, ppsz_devices_text, FindDevicesCallback );
change_action_add( FindDevicesCallback, N_("Refresh list") );
/* Add final settings to the variable */
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
}
int i_snd_rc = -1;
unsigned int i_old_rate;
- vlc_bool_t b_retry = VLC_TRUE;
+ bool b_retry = true;
/* Allocate structures */
p_aout->output.p_sys = p_sys = malloc( sizeof( aout_sys_t ) );
msg_Err( p_aout, "out of memory" );
return VLC_ENOMEM;
}
- p_sys->b_playing = VLC_FALSE;
+ p_sys->b_playing = false;
p_sys->start_date = 0;
vlc_cond_init( p_aout, &p_sys->wait );
vlc_mutex_init( p_aout, &p_sys->lock );
if( (psz_device = config_GetPsz( p_aout, "alsadev" )) == NULL )
{
msg_Err( p_aout, "no audio device given (maybe \"default\" ?)" );
- intf_UserFatal( p_aout, VLC_FALSE, _("No Audio Device"),
+ intf_UserFatal( p_aout, false, _("No Audio Device"),
_("No audio device name was given. You might want to " \
"enter \"default\".") );
free( p_sys );
{
msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
psz_iec_device, snd_strerror( i_snd_rc ) );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ intf_UserFatal( p_aout, false, _("Audio output failed"),
_("VLC could not open the ALSA device \"%s\" (%s)."),
psz_iec_device, snd_strerror( i_snd_rc ) );
free( p_sys );
{
msg_Err( p_aout, "audio device: %s is already in use",
psz_device );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ intf_UserFatal( p_aout, false, _("Audio output failed"),
_("The audio device \"%s\" is already in use."),
psz_device );
}
{
msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
psz_device, snd_strerror( i_snd_rc ) );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ intf_UserFatal( p_aout, false, _("Audio output failed"),
_("VLC could not open the ALSA device \"%s\" (%s)."),
psz_device, snd_strerror( i_snd_rc ) );
free( p_sys );
if snd_pcm_hw_params fails in fl32 */
while ( b_retry )
{
- b_retry = VLC_FALSE;
+ b_retry = false;
/* Get Initial hardware parameters */
if ( ( i_snd_rc = snd_pcm_hw_params_any( p_sys->p_snd_pcm, p_hw ) ) < 0 )
/* Commit hardware parameters. */
if ( ( i_snd_rc = snd_pcm_hw_params( p_sys->p_snd_pcm, p_hw ) ) < 0 )
{
- if ( b_retry == VLC_FALSE &&
+ if ( b_retry == false &&
i_snd_pcm_format == SND_PCM_FORMAT_FLOAT)
{
- b_retry = VLC_TRUE;
+ b_retry = true;
i_snd_pcm_format = SND_PCM_FORMAT_S16;
p_aout->output.output.i_format = AOUT_FMT_S16_NE;
msg_Warn( p_aout, "unable to commit hardware configuration "
/* Create ALSA thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", ALSAThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_OUTPUT, false ) )
{
msg_Err( p_aout, "cannot create ALSA thread (%m)" );
goto error;
vlc_object_kill( p_aout );
vlc_thread_join( p_aout );
- p_aout->b_die = VLC_FALSE;
+ p_aout->b_die = false;
i_snd_rc = snd_pcm_close( p_sys->p_snd_pcm );
GetDevices( p_item );
/* Signal change to the interface */
- p_item->b_dirty = VLC_TRUE;
+ p_item->b_dirty = true;
return VLC_SUCCESS;
AudioDeviceID i_default_dev; /* Keeps DeviceID of defaultOutputDevice */
AudioDeviceID i_selected_dev; /* Keeps DeviceID of the selected device */
UInt32 i_devices; /* Number of CoreAudio Devices */
- vlc_bool_t b_supports_digital;/* Does the currently selected device support digital mode? */
- vlc_bool_t b_digital; /* Are we running in digital mode? */
+ bool b_supports_digital;/* Does the currently selected device support digital mode? */
+ bool b_digital; /* Are we running in digital mode? */
mtime_t clock_diff; /* Difference between VLC clock and Device clock */
/* AUHAL specific */
int i_stream_index; /* The index of i_stream_id in an AudioBufferList */
AudioStreamBasicDescription stream_format; /* The format we changed the stream to */
AudioStreamBasicDescription sfmt_revert; /* The original format of the stream */
- vlc_bool_t b_revert; /* Wether we need to revert the stream format */
- vlc_bool_t b_changed_mixing;/* Wether we need to set the mixing mode back */
+ bool b_revert; /* Wether we need to revert the stream format */
+ bool b_changed_mixing;/* Wether we need to set the mixing mode back */
};
/*****************************************************************************
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
set_callbacks( Open, Close );
- add_integer( "macosx-audio-device", 0, NULL, ADEV_TEXT, ADEV_LONGTEXT, VLC_FALSE );
+ add_integer( "macosx-audio-device", 0, NULL, ADEV_TEXT, ADEV_LONGTEXT, false );
vlc_module_end();
/*****************************************************************************
/* Use int here, to match kAudioDevicePropertyDeviceIsAlive
* property size */
- int b_alive = VLC_FALSE;
+ int b_alive = false;
/* Allocate structure */
p_aout->output.p_sys = malloc( sizeof( aout_sys_t ) );
p_sys->i_default_dev = 0;
p_sys->i_selected_dev = 0;
p_sys->i_devices = 0;
- p_sys->b_supports_digital = VLC_FALSE;
- p_sys->b_digital = VLC_FALSE;
+ p_sys->b_supports_digital = false;
+ p_sys->b_digital = false;
p_sys->au_component = NULL;
p_sys->au_unit = NULL;
p_sys->clock_diff = (mtime_t) 0;
p_sys->i_hog_pid = -1;
p_sys->i_stream_id = 0;
p_sys->i_stream_index = -1;
- p_sys->b_revert = VLC_FALSE;
- p_sys->b_changed_mixing = VLC_FALSE;
+ p_sys->b_revert = false;
+ p_sys->b_changed_mixing = false;
memset( p_sys->p_remainder_buffer, 0, sizeof(uint8_t) * BUFSIZE );
p_aout->output.pf_play = Play;
}
p_sys->i_selected_dev = val.i_int & ~AOUT_VAR_SPDIF_FLAG; /* remove SPDIF flag to get the true DeviceID */
- p_sys->b_supports_digital = ( val.i_int & AOUT_VAR_SPDIF_FLAG ) ? VLC_TRUE : VLC_FALSE;
+ p_sys->b_supports_digital = ( val.i_int & AOUT_VAR_SPDIF_FLAG ) ? true : false;
/* Check if the desired device is alive and usable */
/* TODO: add a callback to the device to alert us if the device dies */
{
/* Be tolerant, only give a warning here */
msg_Warn( p_aout, "could not check whether device [0x%x] is alive: %4.4s", p_sys->i_selected_dev, (char *)&err );
- b_alive = VLC_FALSE;
+ b_alive = false;
}
- if( b_alive == VLC_FALSE )
+ if( b_alive == false )
{
msg_Warn( p_aout, "selected audio device is not alive, switching to default device" );
p_sys->i_selected_dev = p_sys->i_default_dev;
if( p_sys->i_hog_pid != -1 && p_sys->i_hog_pid != getpid() )
{
msg_Err( p_aout, "Selected audio device is exclusively in use by another program." );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ intf_UserFatal( p_aout, false, _("Audio output failed"),
_("The selected audio output device is exclusively in "
"use by another program.") );
goto error;
if( p_sys->au_component == NULL )
{
msg_Warn( p_aout, "we cannot find our HAL component" );
- return VLC_FALSE;
+ return false;
}
err = OpenAComponent( p_sys->au_component, &p_sys->au_unit );
if( err != noErr )
{
msg_Warn( p_aout, "we cannot open our HAL component" );
- return VLC_FALSE;
+ return false;
}
/* Set the device we will use for this output unit */
if( err != noErr )
{
msg_Warn( p_aout, "we cannot select the audio device" );
- return VLC_FALSE;
+ return false;
}
/* Get the current format */
&DeviceFormat,
&i_param_size );
- if( err != noErr ) return VLC_FALSE;
+ if( err != noErr ) return false;
else msg_Dbg( p_aout, STREAM_FORMAT_MSG( "current format is: ", DeviceFormat ) );
/* Get the channel layout of the device side of the unit (vlc -> unit -> device) */
{
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
msg_Err( p_aout, "You should configure your speaker layout with Audio Midi Setup Utility in /Applications/Utilities. Now using Stereo mode." );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio device is not configured"),
+ intf_UserFatal( p_aout, false, _("Audio device is not configured"),
_("You should configure your speaker layout with "
"the \"Audio Midi Setup\" utility in /Applications/"
"Utilities. Stereo mode is being used now.") );
/* Start the AU */
verify_noerr( AudioOutputUnitStart(p_sys->au_unit) );
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
struct aout_sys_t *p_sys = p_aout->output.p_sys;
OSStatus err = noErr;
UInt32 i_param_size = 0, b_mix = 0;
- Boolean b_writeable = VLC_FALSE;
+ Boolean b_writeable = false;
AudioStreamID *p_streams = NULL;
int i = 0, i_streams = 0;
/* Start doing the SPDIF setup proces */
- p_sys->b_digital = VLC_TRUE;
+ p_sys->b_digital = true;
/* Hog the device */
i_param_size = sizeof( p_sys->i_hog_pid );
if( err != noErr )
{
msg_Err( p_aout, "failed to set hogmode: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
/* Set mixable to false if we are allowed to */
b_mix = 0;
err = AudioDeviceSetProperty( p_sys->i_selected_dev, 0, 0, FALSE,
kAudioDevicePropertySupportsMixing, i_param_size, &b_mix );
- p_sys->b_changed_mixing = VLC_TRUE;
+ p_sys->b_changed_mixing = true;
}
if( err != noErr )
{
msg_Err( p_aout, "failed to set mixmode: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
/* Get a list of all the streams on this device */
if( err != noErr )
{
msg_Err( p_aout, "could not get number of streams: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
i_streams = i_param_size / sizeof( AudioStreamID );
if( p_streams == NULL )
{
msg_Err( p_aout, "out of memory" );
- return VLC_FALSE;
+ return false;
}
err = AudioDeviceGetProperty( p_sys->i_selected_dev, 0, FALSE,
{
msg_Err( p_aout, "could not get number of streams: [%4.4s]", (char *)&err );
free( p_streams );
- return VLC_FALSE;
+ return false;
}
for( i = 0; i < i_streams && p_sys->i_stream_index < 0 ; i++ )
/* Find a stream with a cac3 stream */
AudioStreamBasicDescription *p_format_list = NULL;
int i_formats = 0, j = 0;
- vlc_bool_t b_digital = VLC_FALSE;
+ bool b_digital = false;
/* Retrieve all the stream formats supported by each output stream */
err = AudioStreamGetPropertyInfo( p_streams[i], 0,
if( p_format_list[j].mFormatID == 'IAC3' ||
p_format_list[j].mFormatID == kAudioFormat60958AC3 )
{
- b_digital = VLC_TRUE;
+ b_digital = true;
break;
}
}
p_sys->i_stream_id = p_streams[i];
p_sys->i_stream_index = i;
- if( p_sys->b_revert == VLC_FALSE )
+ if( p_sys->b_revert == false )
{
/* Retrieve the original format of this stream first if not done so already */
i_param_size = sizeof( p_sys->sfmt_revert );
msg_Err( p_aout, "could not retrieve the original streamformat: [%4.4s]", (char *)&err );
continue;
}
- p_sys->b_revert = VLC_TRUE;
+ p_sys->b_revert = true;
}
for( j = 0; j < i_formats; j++ )
msg_Dbg( p_aout, STREAM_FORMAT_MSG( "original stream format: ", p_sys->sfmt_revert ) );
if( !AudioStreamChangeFormat( p_aout, p_sys->i_stream_id, p_sys->stream_format ) )
- return VLC_FALSE;
+ return false;
/* Set the format flags */
if( p_sys->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian )
if( err != noErr )
{
msg_Err( p_aout, "AudioDeviceAddIOProc failed: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
/* Check for the difference between the Device clock and mdate */
{
msg_Err( p_aout, "AudioDeviceRemoveIOProc failed: [%4.4s]", (char *)&err );
}
- return VLC_FALSE;
+ return false;
}
- return VLC_TRUE;
+ return true;
}
/* Retrieve the length of the device name */
err = AudioDeviceGetPropertyInfo(
- p_devices[i], 0, VLC_FALSE,
+ p_devices[i], 0, false,
kAudioDevicePropertyDeviceName,
&i_param_size, NULL);
if( err ) goto error;
/* Retrieve the name of the device */
psz_name = (char *)malloc( i_param_size );
err = AudioDeviceGetProperty(
- p_devices[i], 0, VLC_FALSE,
+ p_devices[i], 0, false,
kAudioDevicePropertyDeviceName,
&i_param_size, psz_name);
if( err ) goto error;
UInt32 i_param_size = 0;
AudioStreamID *p_streams = NULL;
int i = 0, i_streams = 0;
- vlc_bool_t b_return = VLC_FALSE;
+ bool b_return = false;
/* Retrieve all the output streams */
err = AudioDeviceGetPropertyInfo( i_dev_id, 0, FALSE,
if( err != noErr )
{
msg_Err( p_aout, "could not get number of streams: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
i_streams = i_param_size / sizeof( AudioStreamID );
if( err != noErr )
{
msg_Err( p_aout, "could not get number of streams: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
for( i = 0; i < i_streams; i++ )
{
if( AudioStreamSupportsDigital( p_aout, p_streams[i] ) )
- b_return = VLC_TRUE;
+ b_return = true;
}
free( p_streams );
UInt32 i_param_size = 0;
AudioStreamBasicDescription *p_format_list = NULL;
int i = 0, i_formats = 0;
- vlc_bool_t b_return = VLC_FALSE;
+ bool b_return = false;
/* Retrieve all the stream formats supported by each output stream */
err = AudioStreamGetPropertyInfo( i_stream_id, 0,
if( err != noErr )
{
msg_Err( p_aout, "could not get number of streamformats: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
i_formats = i_param_size / sizeof( AudioStreamBasicDescription );
if( p_format_list == NULL )
{
msg_Err( p_aout, "could not malloc the memory" );
- return VLC_FALSE;
+ return false;
}
err = AudioStreamGetProperty( i_stream_id, 0,
msg_Err( p_aout, "could not get the list of streamformats: [%4.4s]", (char *)&err );
free( p_format_list);
p_format_list = NULL;
- return VLC_FALSE;
+ return false;
}
for( i = 0; i < i_formats; i++ )
if( p_format_list[i].mFormatID == 'IAC3' ||
p_format_list[i].mFormatID == kAudioFormat60958AC3 )
{
- b_return = VLC_TRUE;
+ b_return = true;
}
}
if( err != noErr )
{
msg_Err( p_aout, "AudioStreamAddPropertyListener failed: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
/* change the format */
if( err != noErr )
{
msg_Err( p_aout, "could not set the stream format: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
/* The AudioStreamSetProperty is not only asynchronious (requiring the locks)
if( err != noErr )
{
msg_Err( p_aout, "AudioStreamRemovePropertyListener failed: [%4.4s]", (char *)&err );
- return VLC_FALSE;
+ return false;
}
/* Destroy the lock and condition */
vlc_mutex_destroy( &w.lock );
vlc_cond_destroy( &w.cond );
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
{
/* We don't have enough data yet */
aout_buffer_t * p_buffer;
- p_buffer = aout_OutputNextBuffer( p_aout, current_date , VLC_FALSE );
+ p_buffer = aout_OutputNextBuffer( p_aout, current_date , false );
if( p_buffer != NULL )
{
AudioConvertHostTimeToNanos( inOutputTime->mHostTime ) / 1000;
//- ((mtime_t) 1000000 / p_aout->output.output.i_rate * 31 ); // 31 = Latency in Frames. retrieve somewhere
- p_buffer = aout_OutputNextBuffer( p_aout, current_date, VLC_TRUE );
+ p_buffer = aout_OutputNextBuffer( p_aout, current_date, true );
#define BUFFER outOutputData->mBuffers[p_sys->i_stream_index]
if( p_buffer != NULL )
int i_frame_size; /* Size in bytes of one frame */
- vlc_bool_t b_chan_reorder; /* do we need channel reordering */
+ bool b_chan_reorder; /* do we need channel reordering */
int pi_chan_table[AOUT_CHAN_MAX];
uint32_t i_channel_mask;
uint32_t i_bits_per_sample;
/* local functions */
static void Probe ( aout_instance_t * );
static int InitDirectSound ( aout_instance_t * );
-static int CreateDSBuffer ( aout_instance_t *, int, int, int, int, int, vlc_bool_t );
-static int CreateDSBufferPCM ( aout_instance_t *, int*, int, int, int, vlc_bool_t );
+static int CreateDSBuffer ( aout_instance_t *, int, int, int, int, int, bool );
+static int CreateDSBufferPCM ( aout_instance_t *, int*, int, int, int, bool );
static void DestroyDSBuffer ( aout_instance_t * );
static void DirectSoundThread ( notification_thread_t * );
static int FillBuffer ( aout_instance_t *, int, aout_buffer_t * );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_shortcut( "directx" );
add_integer( "directx-audio-device", 0, NULL, DEVICE_TEXT,
- DEVICE_LONGTEXT, VLC_TRUE );
+ DEVICE_LONGTEXT, true );
add_bool( "directx-audio-float32", 0, 0, FLOAT_TEXT,
- FLOAT_LONGTEXT, VLC_TRUE );
+ FLOAT_LONGTEXT, true );
set_callbacks( OpenAudio, CloseAudio );
vlc_module_end();
p_aout->output.output.i_physical_channels,
aout_FormatNbChannels( &p_aout->output.output ),
p_aout->output.output.i_rate,
- p_aout->output.p_sys->i_frame_size, VLC_FALSE )
+ p_aout->output.p_sys->i_frame_size, false )
!= VLC_SUCCESS )
{
msg_Err( p_aout, "cannot open directx audio device" );
if( CreateDSBufferPCM( p_aout, &p_aout->output.output.i_format,
p_aout->output.output.i_physical_channels,
aout_FormatNbChannels( &p_aout->output.output ),
- p_aout->output.output.i_rate, VLC_FALSE )
+ p_aout->output.output.i_rate, false )
!= VLC_SUCCESS )
{
msg_Err( p_aout, "cannot open directx audio device" );
if( vlc_thread_create( p_aout->output.p_sys->p_notif,
"DirectSound Notification Thread",
DirectSoundThread,
- VLC_THREAD_PRIORITY_HIGHEST, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_HIGHEST, false ) )
{
msg_Err( p_aout, "cannot create DirectSoundThread" );
CloseHandle( p_aout->output.p_sys->p_notif->event );
if( p_aout->output.output.i_physical_channels == i_physical_channels )
{
if( CreateDSBufferPCM( p_aout, &i_format, i_physical_channels, 6,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_5_1;
if( p_aout->output.output.i_physical_channels == i_physical_channels )
{
if( CreateDSBufferPCM( p_aout, &i_format, i_physical_channels, 5,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_3F2R;
== i_physical_channels )
{
if( CreateDSBufferPCM( p_aout, &i_format, i_physical_channels, 4,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_2F2R;
/* Test for stereo support */
i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
if( CreateDSBufferPCM( p_aout, &i_format, i_physical_channels, 2,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_STEREO;
/* Test for mono support */
i_physical_channels = AOUT_CHAN_CENTER;
if( CreateDSBufferPCM( p_aout, &i_format, i_physical_channels, 1,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_MONO;
p_aout->output.output.i_physical_channels,
aout_FormatNbChannels( &p_aout->output.output ),
p_aout->output.output.i_rate,
- AOUT_SPDIF_SIZE, VLC_TRUE )
+ AOUT_SPDIF_SIZE, true )
== VLC_SUCCESS )
{
msg_Dbg( p_aout, "device supports A/52 over S/PDIF" );
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
}
*****************************************************************************/
static int CreateDSBuffer( aout_instance_t *p_aout, int i_format,
int i_channels, int i_nb_channels, int i_rate,
- int i_bytes_per_frame, vlc_bool_t b_probe )
+ int i_bytes_per_frame, bool b_probe )
{
WAVEFORMATEXTENSIBLE waveformat;
DSBUFFERDESC dsbdesc;
****************************************************************************/
static int CreateDSBufferPCM( aout_instance_t *p_aout, int *i_format,
int i_channels, int i_nb_channels, int i_rate,
- vlc_bool_t b_probe )
+ bool b_probe )
{
vlc_value_t val;
static void DirectSoundThread( notification_thread_t *p_notif )
{
aout_instance_t *p_aout = p_notif->p_aout;
- vlc_bool_t b_sleek;
+ bool b_sleek;
mtime_t last_time;
HRESULT dsresult;
long l_queued = 0;
set_description( _("EsounD audio output") );
set_shortname( "EsounD" );
set_capability( "audio output", 50 );
- add_string( "esdserver", "", NULL, N_("Esound server"), NULL, VLC_FALSE );
+ add_string( "esdserver", "", NULL, N_("Esound server"), NULL, false );
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
set_callbacks( Open, Close );
struct aout_sys_t
{
FILE * p_file;
- vlc_bool_t b_add_wav_header;
+ bool b_add_wav_header;
WAVEHEADER waveh; /* Wave header of the output file */
};
set_subcategory( SUBCAT_AUDIO_AOUT );
add_string( "audiofile-format", "s16", NULL,
- FORMAT_TEXT, FORMAT_LONGTEXT, VLC_TRUE );
+ FORMAT_TEXT, FORMAT_LONGTEXT, true );
change_string_list( format_list, 0, 0 );
add_integer( "audiofile-channels", 0, NULL,
- CHANNELS_TEXT, CHANNELS_LONGTEXT, VLC_TRUE );
+ CHANNELS_TEXT, CHANNELS_LONGTEXT, true );
add_file( "audiofile-file", "audiofile.wav", NULL, FILE_TEXT,
- FILE_LONGTEXT, VLC_FALSE );
+ FILE_LONGTEXT, false );
change_unsafe();
- add_bool( "audiofile-wav", 1, NULL, WAV_TEXT, WAV_LONGTEXT, VLC_TRUE );
+ add_bool( "audiofile-wav", 1, NULL, WAV_TEXT, WAV_LONGTEXT, true );
set_capability( "audio output", 0 );
add_shortcut( "file" );
/* Create thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", Thread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_OUTPUT, false ) )
{
msg_Err( p_aout, "cannot create OSS thread (%m)" );
pPlayer->Close();
vlc_object_kill( p_aout );
vlc_thread_join( p_aout );
- p_aout->b_die = VLC_FALSE;
+ p_aout->b_die = false;
do
{
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_bool( AUTO_CONNECT_OPTION, 0, NULL, AUTO_CONNECT_TEXT,
- AUTO_CONNECT_LONGTEXT, VLC_TRUE );
+ AUTO_CONNECT_LONGTEXT, true );
add_string( CONNECT_REGEX_OPTION, NULL, NULL, CONNECT_REGEX_TEXT,
- CONNECT_REGEX_LONGTEXT, VLC_TRUE );
+ CONNECT_REGEX_LONGTEXT, true );
set_callbacks( Open, Close );
vlc_module_end();
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_file( "dspdev", "/dev/dsp", aout_FindAndRestart,
- N_("OSS DSP device"), NULL, VLC_FALSE );
- add_bool( "oss-buggy", 0, NULL, BUGGY_TEXT, BUGGY_LONGTEXT, VLC_TRUE );
+ N_("OSS DSP device"), NULL, false );
+ add_bool( "oss-buggy", 0, NULL, BUGGY_TEXT, BUGGY_LONGTEXT, true );
set_capability( "audio output", 100 );
add_shortcut( "oss" );
return VLC_EGENERIC;
}
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
/* Reset the DSP device */
/* Create OSS thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", OSSThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_OUTPUT, false ) )
{
msg_Err( p_aout, "cannot create OSS thread (%m)" );
close( p_sys->i_fd );
vlc_object_kill( p_aout );
vlc_thread_join( p_aout );
- p_aout->b_die = VLC_FALSE;
+ p_aout->b_die = false;
ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL );
close( p_sys->i_fd );
/* Next buffer will be played at mdate() + buffered */
p_buffer = aout_OutputNextBuffer( p_aout, mdate() + buffered,
- VLC_FALSE );
+ false );
if( p_buffer == NULL &&
buffered > ( p_aout->output.p_sys->max_buffer_duration
}
while( !p_aout->b_die && ! ( p_buffer =
- aout_OutputNextBuffer( p_aout, next_date, VLC_TRUE ) ) )
+ aout_OutputNextBuffer( p_aout, next_date, true ) ) )
{
msleep( 1000 );
next_date = mdate();
vlc_cond_t wait;
vlc_mutex_t lock_wait;
- vlc_bool_t b_wait;
+ bool b_wait;
vlc_cond_t signal;
vlc_mutex_t lock_signal;
- vlc_bool_t b_signal;
+ bool b_signal;
} pa_thread_t;
PaDeviceIndex i_device_id;
const PaDeviceInfo *deviceInfo;
- vlc_bool_t b_chan_reorder; /* do we need channel reordering */
+ bool b_chan_reorder; /* do we need channel reordering */
int pi_chan_table[AOUT_CHAN_MAX];
uint32_t i_channel_mask;
uint32_t i_bits_per_sample;
AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT, 0 };
#ifdef PORTAUDIO_IS_SERIOUSLY_BROKEN
-static vlc_bool_t b_init = 0;
+static bool b_init = 0;
static pa_thread_t *pa_thread;
static void PORTAUDIOThread( pa_thread_t * );
#endif
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_integer( "portaudio-device", 0, NULL,
- DEVICE_TEXT, DEVICE_LONGTEXT, VLC_FALSE );
+ DEVICE_TEXT, DEVICE_LONGTEXT, false );
set_capability( "audio output", 0 );
set_callbacks( Open, Close );
vlc_module_end();
out_date = mdate() + (mtime_t) ( 1000000 *
( paDate->outputBufferDacTime - paDate->currentTime ) );
- p_buffer = aout_OutputNextBuffer( p_aout, out_date, VLC_TRUE );
+ p_buffer = aout_OutputNextBuffer( p_aout, out_date, true );
if ( p_buffer != NULL )
{
msg_Err( p_aout, "closing the device returned %d", i_err );
}
- b_init = VLC_TRUE;
+ b_init = true;
/* Now we need to setup our DirectSound play notification structure */
pa_thread = vlc_object_create( p_aout, sizeof(pa_thread_t) );
pa_thread->p_aout = p_aout;
- pa_thread->b_error = VLC_FALSE;
+ pa_thread->b_error = false;
vlc_mutex_init( p_aout, &pa_thread->lock_wait );
vlc_cond_init( p_aout, &pa_thread->wait );
- pa_thread->b_wait = VLC_FALSE;
+ pa_thread->b_wait = false;
vlc_mutex_init( p_aout, &pa_thread->lock_signal );
vlc_cond_init( p_aout, &pa_thread->signal );
- pa_thread->b_signal = VLC_FALSE;
+ pa_thread->b_signal = false;
/* Create PORTAUDIOThread */
if( vlc_thread_create( pa_thread, "aout", PORTAUDIOThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_OUTPUT, false ) )
{
msg_Err( p_aout, "cannot create PORTAUDIO thread" );
return VLC_EGENERIC;
else
{
pa_thread->p_aout = p_aout;
- pa_thread->b_wait = VLC_FALSE;
- pa_thread->b_signal = VLC_FALSE;
- pa_thread->b_error = VLC_FALSE;
+ pa_thread->b_wait = false;
+ pa_thread->b_signal = false;
+ pa_thread->b_error = false;
}
/* Signal start of stream */
vlc_mutex_lock( &pa_thread->lock_signal );
- pa_thread->b_signal = VLC_TRUE;
+ pa_thread->b_signal = true;
vlc_cond_signal( &pa_thread->signal );
vlc_mutex_unlock( &pa_thread->lock_signal );
if( !pa_thread->b_wait )
vlc_cond_wait( &pa_thread->wait, &pa_thread->lock_wait );
vlc_mutex_unlock( &pa_thread->lock_wait );
- pa_thread->b_wait = VLC_FALSE;
+ pa_thread->b_wait = false;
if( pa_thread->b_error )
{
/* Signal end of stream */
vlc_mutex_lock( &pa_thread->lock_signal );
- pa_thread->b_signal = VLC_TRUE;
+ pa_thread->b_signal = true;
vlc_cond_signal( &pa_thread->signal );
vlc_mutex_unlock( &pa_thread->lock_signal );
if( !pa_thread->b_wait )
vlc_cond_wait( &pa_thread->wait, &pa_thread->lock_wait );
vlc_mutex_unlock( &pa_thread->lock_wait );
- pa_thread->b_wait = VLC_FALSE;
+ pa_thread->b_wait = false;
#else
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
}
if( !pa_thread->b_signal )
vlc_cond_wait( &pa_thread->signal, &pa_thread->lock_signal );
vlc_mutex_unlock( &pa_thread->lock_signal );
- pa_thread->b_signal = VLC_FALSE;
+ pa_thread->b_signal = false;
p_aout = pa_thread->p_aout;
p_sys = p_aout->output.p_sys;
if( PAOpenDevice( p_aout ) != VLC_SUCCESS )
{
msg_Err( p_aout, "cannot open portaudio device" );
- pa_thread->b_error = VLC_TRUE;
+ pa_thread->b_error = true;
}
if( !pa_thread->b_error && PAOpenStream( p_aout ) != VLC_SUCCESS )
{
msg_Err( p_aout, "cannot open portaudio device" );
- pa_thread->b_error = VLC_TRUE;
+ pa_thread->b_error = true;
i_err = Pa_Terminate();
if( i_err != paNoError )
/* Tell the main thread that we are ready */
vlc_mutex_lock( &pa_thread->lock_wait );
- pa_thread->b_wait = VLC_TRUE;
+ pa_thread->b_wait = true;
vlc_cond_signal( &pa_thread->wait );
vlc_mutex_unlock( &pa_thread->lock_wait );
if( !pa_thread->b_signal )
vlc_cond_wait( &pa_thread->signal, &pa_thread->lock_signal );
vlc_mutex_unlock( &pa_thread->lock_signal );
- pa_thread->b_signal = VLC_FALSE;
+ pa_thread->b_signal = false;
if( pa_thread->b_error ) continue;
/* Tell the main thread that we are ready */
vlc_mutex_lock( &pa_thread->lock_wait );
- pa_thread->b_wait = VLC_TRUE;
+ pa_thread->b_wait = true;
vlc_cond_signal( &pa_thread->wait );
vlc_mutex_unlock( &pa_thread->lock_wait );
}
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
}
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
p_aout->output.output.i_rate = obtained.freq;
/* local functions */
static void Probe ( aout_instance_t * );
static int OpenWaveOut ( aout_instance_t *, uint32_t,
- int, int, int, int, vlc_bool_t );
+ int, int, int, int, bool );
static int OpenWaveOutPCM( aout_instance_t *, uint32_t,
- int*, int, int, int, vlc_bool_t );
+ int*, int, int, int, bool );
static int PlayWaveOut ( aout_instance_t *, HWAVEOUT, WAVEHDR *,
- aout_buffer_t *, vlc_bool_t );
+ aout_buffer_t *, bool );
static void CALLBACK WaveOutCallback ( HWAVEOUT, UINT, DWORD, DWORD, DWORD );
static void WaveOutThread( notification_thread_t * );
set_capability( "audio output", 50 );
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
- add_bool( "waveout-float32", 1, 0, FLOAT_TEXT, FLOAT_LONGTEXT, VLC_TRUE );
+ add_bool( "waveout-float32", 1, 0, FLOAT_TEXT, FLOAT_LONGTEXT, true );
add_string( "waveout-dev", "wavemapper", NULL,
- DEVICE_TEXT, DEVICE_LONG, VLC_FALSE );
+ DEVICE_TEXT, DEVICE_LONG, false );
change_string_list( ppsz_adev, ppsz_adev_text, ReloadWaveoutDevices );
change_need_restart();
change_action_add( ReloadWaveoutDevices, N_("Refresh list") );
byte_t *p_silence_buffer; /* buffer we use to play silence */
- vlc_bool_t b_chan_reorder; /* do we need channel reordering */
+ bool b_chan_reorder; /* do we need channel reordering */
int pi_chan_table[AOUT_CHAN_MAX];
};
}
p_aout->output.pf_play = Play;
- p_aout->b_die = VLC_FALSE;
+ p_aout->b_die = false;
/*
VLC_FOURCC('s','p','d','i'),
p_aout->output.output.i_physical_channels,
aout_FormatNbChannels( &p_aout->output.output ),
- p_aout->output.output.i_rate, VLC_FALSE )
+ p_aout->output.output.i_rate, false )
!= VLC_SUCCESS )
{
msg_Err( p_aout, "cannot open waveout audio device" );
&p_aout->output.output.i_format,
p_aout->output.output.i_physical_channels,
aout_FormatNbChannels( &p_aout->output.output ),
- p_aout->output.output.i_rate, VLC_FALSE )
+ p_aout->output.output.i_rate, false )
!= VLC_SUCCESS )
{
msg_Err( p_aout, "cannot open waveout audio device" );
/* Then launch the notification thread */
if( vlc_thread_create( p_aout->output.p_sys->p_notif,
"waveOut Notification Thread", WaveOutThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_OUTPUT, false ) )
{
msg_Err( p_aout, "cannot create WaveOutThread" );
}
p_aout->output.p_sys->i_wave_device_id,
&i_format,
i_physical_channels, 6,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_5_1;
p_aout->output.p_sys->i_wave_device_id,
&i_format,
i_physical_channels, 4,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_2F2R;
p_aout->output.p_sys->i_wave_device_id,
&i_format,
i_physical_channels, 2,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_STEREO;
p_aout->output.p_sys->i_wave_device_id,
&i_format,
i_physical_channels, 1,
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
val.i_int = AOUT_VAR_MONO;
VLC_FOURCC('s','p','d','i'),
p_aout->output.output.i_physical_channels,
aout_FormatNbChannels( &p_aout->output.output ),
- p_aout->output.output.i_rate, VLC_TRUE )
+ p_aout->output.output.i_rate, true )
== VLC_SUCCESS )
{
msg_Dbg( p_aout, "device supports A/52 over S/PDIF" );
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
}
****************************************************************************/
static int OpenWaveOut( aout_instance_t *p_aout, uint32_t i_device_id, int i_format,
int i_channels, int i_nb_channels, int i_rate,
- vlc_bool_t b_probe )
+ bool b_probe )
{
MMRESULT result;
unsigned int i;
****************************************************************************/
static int OpenWaveOutPCM( aout_instance_t *p_aout, uint32_t i_device_id, int *i_format,
int i_channels, int i_nb_channels, int i_rate,
- vlc_bool_t b_probe )
+ bool b_probe )
{
- vlc_bool_t b_use_float32 = var_CreateGetBool( p_aout, "waveout-float32");
+ bool b_use_float32 = var_CreateGetBool( p_aout, "waveout-float32");
if( !b_use_float32 || OpenWaveOut( p_aout, i_device_id, VLC_FOURCC('f','l','3','2'),
i_channels, i_nb_channels, i_rate, b_probe )
*****************************************************************************/
static int PlayWaveOut( aout_instance_t *p_aout, HWAVEOUT h_waveout,
WAVEHDR *p_waveheader, aout_buffer_t *p_buffer,
- vlc_bool_t b_spdif)
+ bool b_spdif)
{
MMRESULT result;
aout_buffer_t *p_buffer = NULL;
WAVEHDR *p_waveheader = p_sys->waveheader;
int i, i_queued_frames;
- vlc_bool_t b_sleek;
+ bool b_sleek;
mtime_t next_date;
uint32_t i_buffer_length = 64;
p_item->ppsz_list_text[j] = NULL;
/* Signal change to the interface */
- p_item->b_dirty = VLC_TRUE;
+ p_item->b_dirty = true;
return VLC_SUCCESS;
}
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Input properties
}
/* Misc init */
- p_sys->b_packetizer = VLC_FALSE;
+ p_sys->b_packetizer = false;
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
int i_ret = OpenDecoder( p_this );
- if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = VLC_TRUE;
+ if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = true;
return i_ret;
}
case STATE_SEND_DATA:
if( !(p_buf = GetOutBuffer( p_dec, &p_out_buffer )) )
{
- //p_dec->b_error = VLC_TRUE;
+ //p_dec->b_error = true;
return NULL;
}
} eia608_t;
static void Eia608Init( eia608_t * );
-static vlc_bool_t Eia608Parse( eia608_t *h, int i_channel_selected, const uint8_t data[2] );
-static char *Eia608Text( eia608_t *h, vlc_bool_t b_html );
+static bool Eia608Parse( eia608_t *h, int i_channel_selected, const uint8_t data[2] );
+static char *Eia608Text( eia608_t *h, bool b_html );
static void Eia608Exit( eia608_t * );
/* It will be enough up to 63 B frames, which is far too high for
return NULL;
}
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_pausable = true;
/* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) );
p_spu->i_start = i_pts;
p_spu->i_stop = i_pts + 10000000; /* 10s max */
- p_spu->b_ephemer = VLC_TRUE;
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_ephemer = true;
+ p_spu->b_absolute = false;
return p_spu;
}
{
decoder_sys_t *p_sys = p_dec->p_sys;
const int64_t i_pts = p_block->i_pts;
- vlc_bool_t b_changed = VLC_FALSE;
+ bool b_changed = false;
/* TODO do the real decoding here */
while( p_block->i_buffer >= 3 )
static int64_t i_last = 0;
if( b_changed )//&& i_pts - i_last > 100*1000 )
{
- char *psz_subtitle = Eia608Text( &p_sys->eia608, VLC_FALSE );
- char *psz_html = NULL;//Eia608Text( &p_sys->eia608, VLC_TRUE );
+ char *psz_subtitle = Eia608Text( &p_sys->eia608, false );
+ char *psz_html = NULL;//Eia608Text( &p_sys->eia608, true );
i_last = i_pts;
return Subtitle( p_dec, psz_subtitle, psz_html, i_pts );
}
if( x == 0 )
{
- screen->row_used[i_row] = VLC_FALSE;
+ screen->row_used[i_row] = false;
}
else
{
- screen->row_used[i_row] = VLC_FALSE;
+ screen->row_used[i_row] = false;
for( i = 0; i < x; i++ )
{
if( screen->characters[i_row][i] != ' ' ||
screen->colors[i_row][i] != EIA608_COLOR_DEFAULT ||
screen->fonts[i_row][i] != EIA608_FONT_REGULAR )
{
- screen->row_used[i_row] = VLC_TRUE;
+ screen->row_used[i_row] = true;
break;
}
}
}
}
-static void Eia608EraseScreen( eia608_t *h, vlc_bool_t b_displayed )
+static void Eia608EraseScreen( eia608_t *h, bool b_displayed )
{
Eia608ClearScreen( h, b_displayed ? h->i_screen : (1-h->i_screen) );
}
screen->characters[i_row][i_column] = c;
screen->colors[i_row][i_column] = h->color;
screen->fonts[i_row][i_column] = h->font;
- screen->row_used[i_row] = VLC_TRUE;
+ screen->row_used[i_row] = true;
Eia608Cursor( h, 1 );
}
static void Eia608Erase( eia608_t *h )
else if( d1 == 0x1d )
h->i_channel = 4;
}
-static vlc_bool_t Eia608ParseTextAttribute( eia608_t *h, uint8_t d2 )
+static bool Eia608ParseTextAttribute( eia608_t *h, uint8_t d2 )
{
const int i_index = d2 - 0x20;
assert( d2 >= 0x20 && d2 <= 0x2f );
h->font = pac2_attribs[i_index].i_font;
Eia608Cursor( h, 1 );
- return VLC_FALSE;
+ return false;
}
-static vlc_bool_t Eia608ParseSingle( eia608_t *h, const uint8_t dx )
+static bool Eia608ParseSingle( eia608_t *h, const uint8_t dx )
{
assert( dx >= 0x20 );
Eia608Write( h, dx );
- return VLC_TRUE;
+ return true;
}
-static vlc_bool_t Eia608ParseDouble( eia608_t *h, uint8_t d2 )
+static bool Eia608ParseDouble( eia608_t *h, uint8_t d2 )
{
assert( d2 >= 0x30 && d2 <= 0x3f );
Eia608Write( h, d2 + 0x50 ); /* We use charaters 0x80...0x8f */
- return VLC_TRUE;
+ return true;
}
-static vlc_bool_t Eia608ParseExtended( eia608_t *h, uint8_t d1, uint8_t d2 )
+static bool Eia608ParseExtended( eia608_t *h, uint8_t d1, uint8_t d2 )
{
assert( d2 >= 0x20 && d2 <= 0x3f );
assert( d1 == 0x12 || d1 == 0x13 );
* advanced one */
Eia608Cursor( h, -1 );
Eia608Write( h, d2 );
- return VLC_TRUE;
+ return true;
}
-static vlc_bool_t Eia608ParseCommand0x14( eia608_t *h, uint8_t d2 )
+static bool Eia608ParseCommand0x14( eia608_t *h, uint8_t d2 )
{
- vlc_bool_t b_changed = VLC_FALSE;
+ bool b_changed = false;
switch( d2 )
{
break;
case 0x21: /* Backspace */
Eia608Erase( h );
- b_changed = VLC_TRUE;
+ b_changed = true;
break;
case 0x22: /* Reserved */
case 0x23:
case 0x27: /* Rollup 4 */
if( h->mode == EIA608_MODE_POPUP || h->mode == EIA608_MODE_PAINTON )
{
- Eia608EraseScreen( h, VLC_TRUE );
- Eia608EraseScreen( h, VLC_FALSE );
- b_changed = VLC_TRUE;
+ Eia608EraseScreen( h, true );
+ Eia608EraseScreen( h, false );
+ b_changed = true;
}
if( d2 == 0x25 )
break;
case 0x2c: /* Erase displayed memory */
- Eia608EraseScreen( h, VLC_TRUE );
- b_changed = VLC_TRUE;
+ Eia608EraseScreen( h, true );
+ b_changed = true;
break;
case 0x2d: /* Carriage return */
Eia608RollUp(h);
- b_changed = VLC_TRUE;
+ b_changed = true;
break;
case 0x2e: /* Erase non displayed memory */
- Eia608EraseScreen( h, VLC_FALSE );
+ Eia608EraseScreen( h, false );
break;
case 0x2f: /* End of caption (flip screen if not paint on) */
if( h->mode != EIA608_MODE_PAINTON )
h->cursor.i_row = 0;
h->color = EIA608_COLOR_DEFAULT;
h->font = EIA608_FONT_REGULAR;
- b_changed = VLC_TRUE;
+ b_changed = true;
break;
}
return b_changed;
}
-static vlc_bool_t Eia608ParseCommand0x17( eia608_t *h, uint8_t d2 )
+static bool Eia608ParseCommand0x17( eia608_t *h, uint8_t d2 )
{
switch( d2 )
{
Eia608Cursor( h, 3 );
break;
}
- return VLC_FALSE;
+ return false;
}
-static vlc_bool_t Eia608ParsePac( eia608_t *h, uint8_t d1, uint8_t d2 )
+static bool Eia608ParsePac( eia608_t *h, uint8_t d1, uint8_t d2 )
{
static const int pi_row[] = {
11, -1, 1, 2, 3, 4, 12, 13, 14, 15, 5, 6, 7, 8, 9, 10
assert( d2 >= 0x40 && d2 <= 0x7f );
if( pi_row[i_row_index] <= 0 )
- return VLC_FALSE;
+ return false;
/* Row */
if( h->mode != EIA608_MODE_TEXT )
else if( d2 >= 0x40 )
d2 -= 0x40;
h->cursor.i_column = pac2_attribs[d2].i_column;
- return VLC_FALSE;
+ return false;
}
-static vlc_bool_t Eia608ParseData( eia608_t *h, uint8_t d1, uint8_t d2 )
+static bool Eia608ParseData( eia608_t *h, uint8_t d1, uint8_t d2 )
{
- vlc_bool_t b_changed = VLC_FALSE;
+ bool b_changed = false;
if( d1 >= 0x18 && d1 <= 0x1f )
d1 -= 8;
d[i_max-1] = '\0';
}
-static void Eia608TextLine( struct eia608_screen *screen, char *psz_text, int i_text_max, int i_row, vlc_bool_t b_html )
+static void Eia608TextLine( struct eia608_screen *screen, char *psz_text, int i_text_max, int i_row, bool b_html )
{
const uint8_t *p_char = screen->characters[i_row];
const eia608_color_t *p_color = screen->colors[i_row];
int i_end;
int x;
eia608_color_t last_color = EIA608_COLOR_DEFAULT;
- vlc_bool_t b_last_italics = VLC_FALSE;
- vlc_bool_t b_last_underline = VLC_FALSE;
+ bool b_last_italics = false;
+ bool b_last_underline = false;
/* Search the start */
i_start = 0;
for( x = i_start; x <= i_end; x++ )
{
eia608_color_t color = p_color[x];
- vlc_bool_t b_italics = p_font[x] & EIA608_FONT_ITALICS;
- vlc_bool_t b_underline = p_font[x] & EIA608_FONT_UNDERLINE;
+ bool b_italics = p_font[x] & EIA608_FONT_ITALICS;
+ bool b_underline = p_font[x] & EIA608_FONT_UNDERLINE;
char utf8[4];
/* */
if( b_html )
{
- vlc_bool_t b_close_color, b_close_italics, b_close_underline;
+ bool b_close_color, b_close_italics, b_close_underline;
/* We create the tags font / i / u in that orders */
b_close_color = color != last_color && last_color != EIA608_COLOR_DEFAULT;
h->font = EIA608_FONT_REGULAR;
h->i_row_rollup = EIA608_SCREEN_ROWS-1;
}
-static vlc_bool_t Eia608Parse( eia608_t *h, int i_channel_selected, const uint8_t data[2] )
+static bool Eia608Parse( eia608_t *h, int i_channel_selected, const uint8_t data[2] )
{
const uint8_t d1 = data[0] & 0x7f; /* Removed parity bit TODO we might want to check them */
const uint8_t d2 = data[1] & 0x7f;
- vlc_bool_t b_screen_changed = VLC_FALSE;
+ bool b_screen_changed = false;
if( d1 == 0 && d2 == 0 )
- return VLC_FALSE; /* Ignore padding */
+ return false; /* Ignore padding */
Eia608ParseChannel( h, d1 );
if( h->i_channel != i_channel_selected )
- return VLC_FALSE;
+ return false;
//fprintf( stderr, "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC %x %x\n", data[0], data[1] );
if( d1 >= 0x10 )
return b_screen_changed;
}
-static char *Eia608Text( eia608_t *h, vlc_bool_t b_html )
+static char *Eia608Text( eia608_t *h, bool b_html )
{
const int i_size = EIA608_SCREEN_ROWS * 3 * EIA608_SCREEN_COLUMNS+1;
struct eia608_screen *screen = &h->screen[h->i_screen];
- vlc_bool_t b_first = VLC_TRUE;
+ bool b_first = true;
char *psz;
int i;
if( !b_first )
Eia608Strlcat( psz, b_html ? "<br />" : "\n", i_size );
- b_first = VLC_FALSE;
+ b_first = false;
Eia608TextLine( screen, psz, i_size, i, b_html );
}
typedef struct
{
/* Which channel are present */
- vlc_bool_t pb_present[4];
+ bool pb_present[4];
/* */
- vlc_bool_t b_reorder;
+ bool b_reorder;
/* CC data per field
* byte[x+0]: field (0/1)
int i;
for( i = 0; i < 4; i++ )
- c-> pb_present[i] = VLC_FALSE;
+ c-> pb_present[i] = false;
c->i_data = 0;
- c->b_reorder = VLC_FALSE;
+ c->b_reorder = false;
}
static inline void cc_Exit( cc_data_t *c )
{
i_channel = cc_Channel( i_field, &cc[1] );
if( i_channel >= 0 && i_channel < 4 )
- c->pb_present[i_channel] = VLC_TRUE;
+ c->pb_present[i_channel] = true;
c->p_data[c->i_data++] = i_field;
c->p_data[c->i_data++] = cc[1];
c->p_data[c->i_data++] = cc[2];
}
- c->b_reorder = VLC_TRUE;
+ c->b_reorder = true;
}
else if( !memcmp( p_cc_dvd, p_src, 4 ) && i_src > 4+1 )
{
i_channel = cc_Channel( i_field, &cc[1] );
if( i_channel >= 0 && i_channel < 4 )
- c->pb_present[i_channel] = VLC_TRUE;
+ c->pb_present[i_channel] = true;
c->p_data[c->i_data++] = i_field;
c->p_data[c->i_data++] = cc[1];
c->p_data[c->i_data++] = cc[2];
}
}
- c->b_reorder = VLC_FALSE;
+ c->b_reorder = false;
}
else if( i_src >= 2+2 + 2+2 &&
( ( !memcmp( p_cc_replaytv4a, &p_src[0], 2 ) && !memcmp( p_cc_replaytv4b, &p_src[4], 2 ) ) ||
const int i_field = i == 0 ? 1 : 0;
int i_channel = cc_Channel( i_field, &cc[2] );
if( i_channel >= 0 && i_channel < 4 )
- c->pb_present[i_channel] = VLC_TRUE;
+ c->pb_present[i_channel] = true;
c->p_data[c->i_data++] = i_field;
c->p_data[c->i_data++] = cc[2];
c->p_data[c->i_data++] = cc[3];
}
- c->b_reorder = VLC_FALSE;
+ c->b_reorder = false;
}
else
{
return p_new_history;
}
-vlc_bool_t history_GoBackSavingCurrentItem ( history_t *p_history,
+bool history_GoBackSavingCurrentItem ( history_t *p_history,
history_item_t *p_item )
{
history_PruneAndInsert( p_history, p_item );
#ifdef HISTORY_DEBUG
history_Dump( p_history );
#endif
- return VLC_TRUE;
+ return true;
}
static void history_Dump( history_t *p_history )
}
}
-vlc_bool_t history_GoForwardSavingCurrentItem ( history_t *p_history,
+bool history_GoForwardSavingCurrentItem ( history_t *p_history,
history_item_t *p_item )
{
#ifdef HISTORY_DEBUG
== XARRAY_SUCCESS )
{
p_history->i_index++;
- return VLC_TRUE;
+ return true;
}
else
{
- return VLC_FALSE;
+ return false;
}
}
-vlc_bool_t history_CanGoBack( history_t *p_history )
+bool history_CanGoBack( history_t *p_history )
{
if( p_history->i_index > 0 )
- return VLC_TRUE;
+ return true;
else
- return VLC_FALSE;
+ return false;
}
-vlc_bool_t history_CanGoForward( history_t *p_history )
+bool history_CanGoForward( history_t *p_history )
{
unsigned int i_count;
if( xarray_Count( p_history->p_xarray, &i_count ) != XARRAY_SUCCESS )
- return VLC_FALSE;
+ return false;
if( p_history->i_index < i_count )
- return VLC_TRUE;
+ return true;
else
- return VLC_FALSE;
+ return false;
}
history_item_t *history_Item( history_t *p_history )
* Exported prototypes
*****************************************************************************/
history_t * history_New ( void );
-vlc_bool_t history_GoBackSavingCurrentItem ( history_t *,
+bool history_GoBackSavingCurrentItem ( history_t *,
history_item_t * );
-vlc_bool_t history_GoForwardSavingCurrentItem ( history_t *,
+bool history_GoForwardSavingCurrentItem ( history_t *,
history_item_t * );
-vlc_bool_t history_CanGoBack ( history_t * );
-vlc_bool_t history_CanGoForward ( history_t * );
+bool history_CanGoBack ( history_t * );
+bool history_CanGoForward ( history_t * );
history_item_t * history_Item ( history_t * );
void history_Prune ( history_t * );
void history_PruneAndInsert ( history_t *,
if( var_Get( p_cmml_decoder, "psz-current-anchor-description", &val )
!= VLC_SUCCESS )
{
- return VLC_TRUE;
+ return true;
}
if( !val.p_address )
- return VLC_TRUE;
+ return true;
psz_description = val.p_address;
if( var_Get( p_primary_intf, "intf-displays-cmml-description", &val )
== VLC_SUCCESS )
{
- if( val.b_bool == VLC_TRUE )
+ if( val.b_bool == true )
{
vlc_object_release( p_primary_intf );
- return VLC_TRUE;
+ return true;
}
}
!= VLC_SUCCESS )
{
/* text render unsuccessful: do nothing */
- return VLC_FALSE;
+ return false;
}
/* text render successful: clear description */
psz_url = NULL;
}
- return VLC_TRUE;
+ return true;
}
msg_Dbg( p_intf, "calling browser_Open with \"%s\"", psz_url );
#endif
(void) browser_Open( psz_url );
- playlist_Control( p_playlist, PLAYLIST_PAUSE, VLC_TRUE, 0 );
+ playlist_Control( p_playlist, PLAYLIST_PAUSE, true, 0 );
}
free( psz_uri_to_load );
free( psz_uri );
/* Get current time as a string */
- if( XURL_IsFileURL( psz_url ) == VLC_TRUE )
+ if( XURL_IsFileURL( psz_url ) == true )
psz_url = xstrcat( psz_url, "#" );
else
psz_url = xstrcat( psz_url, "?" );
#endif
/* Check whether we can go back in the history */
- if( history_CanGoBack( p_history ) == VLC_FALSE )
+ if( history_CanGoBack( p_history ) == false )
{
msg_Warn( p_intf, "can't go back: already at beginning of history" );
vlc_object_release( p_playlist );
#endif
/* Check whether we can go forward in the history */
- if( history_CanGoForward( p_history ) == VLC_FALSE )
+ if( history_CanGoForward( p_history ) == false )
{
msg_Warn( p_intf, "can't go forward: already at end of history" );
vlc_object_release( p_playlist );
{
playlist_Stop( p_playlist );
(void) playlist_Add( p_playlist, psz_uri, psz_uri,
- PLAYLIST_INSERT /* FIXME: used to be PLAYLIST_REPLACE */, PLAYLIST_END|PLAYLIST_GO, VLC_TRUE /* FIXME: p_playlist->status.i_index */,
- VLC_FALSE);
+ PLAYLIST_INSERT /* FIXME: used to be PLAYLIST_REPLACE */, PLAYLIST_END|PLAYLIST_GO, true /* FIXME: p_playlist->status.i_index */,
+ false);
}
/****************************************************************************
#include <vlc/vlc.h>
/* Specialise boolean definitions to VLC's boolean types */
-typedef vlc_bool_t XURL_Bool;
-#define XURL_FALSE VLC_FALSE
-#define XURL_TRUE VLC_TRUE
+typedef bool XURL_Bool;
+#define XURL_FALSE false
+#define XURL_TRUE true
/* Specialise general C functions to VLC's standards */
#define xurl_malloc malloc
p_spu->i_y = 0;
p_spu->i_start = p_block->i_pts;
p_spu->i_stop = p_block->i_pts + p_block->i_length;
- p_spu->b_ephemer = VLC_FALSE;
- p_spu->b_absolute = VLC_FALSE;
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_ephemer = false;
+ p_spu->b_absolute = false;
+ p_spu->b_pausable = true;
msg_Dbg( p_dec, "BS %lf..%lf", p_spu->i_start * 0.000001, p_spu->i_stop * 0.000001);
p_dec->p_sys->pf_push_packet(p_dec->p_sys->p_instance,
p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) );
- p_sys->b_packetizer = VLC_FALSE;
+ p_sys->b_packetizer = false;
p_sys->i_state = SUBTITLE_BLOCK_EMPTY;
p_sys->p_spu = NULL;
if( DecoderOpen( p_this ) != VLC_SUCCESS ) return VLC_EGENERIC;
- p_dec->p_sys->b_packetizer = VLC_TRUE;
+ p_dec->p_sys->b_packetizer = true;
return VLC_SUCCESS;
}
p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL;
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_pausable = true;
p_spu->i_x = p_sys->i_x_start;
p_spu->i_x = p_spu->i_x * 3 / 4; /* FIXME: use aspect ratio for x? */
p_spu->i_y = p_sys->i_y_start;
p_spu->i_start = p_data->i_pts;
p_spu->i_stop = p_data->i_pts + p_sys->i_duration;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
/* Create new SPU region */
memset( &fmt, 0, sizeof(video_format_t) );
set_capability( "encoder", 100 );
set_callbacks( OpenEncoder, CloseEncoder );
add_float( ENC_CFG_PREFIX "quality", 7.0, NULL, ENC_QUALITY_TEXT,
- ENC_QUALITY_LONGTEXT, VLC_FALSE );
+ ENC_QUALITY_LONGTEXT, false );
vlc_module_end();
}
CMediaBuffer *CMediaBufferCreate( block_t *p_block, int i_max_size,
- vlc_bool_t b_own )
+ bool b_own )
{
CMediaBuffer *p_mb = (CMediaBuffer *)malloc( sizeof(CMediaBuffer) );
if( !p_mb ) return NULL;
static block_t *EncodeBlock( encoder_t *, void * );
static int LoadDMO( vlc_object_t *, HINSTANCE *, IMediaObject **,
- es_format_t *, vlc_bool_t );
+ es_format_t *, bool );
static void CopyPicture( decoder_t *, picture_t *, uint8_t * );
vlc_module_begin();
CoInitialize( 0 );
#endif /* LOADER */
- if( LoadDMO( p_this, &hmsdmo_dll, &p_dmo, &p_dec->fmt_in, VLC_FALSE )
+ if( LoadDMO( p_this, &hmsdmo_dll, &p_dmo, &p_dec->fmt_in, false )
!= VLC_SUCCESS )
{
hmsdmo_dll = 0;
dmo_output_type.formattype = FORMAT_VideoInfo;
dmo_output_type.subtype = dmo_output_type.majortype;
dmo_output_type.subtype.Data1 = p_bih->biCompression;
- dmo_output_type.bFixedSizeSamples = VLC_TRUE;
+ dmo_output_type.bFixedSizeSamples = true;
dmo_output_type.bTemporalCompression = 0;
dmo_output_type.lSampleSize = p_bih->biSizeImage;
dmo_output_type.cbFormat = sizeof(VIDEOINFOHEADER);
*****************************************************************************/
static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
IMediaObject **pp_dmo, es_format_t *p_fmt,
- vlc_bool_t b_out )
+ bool b_out )
{
DMO_PARTIAL_MEDIATYPE dmo_partial_type;
int i_err;
{
CMediaBuffer *p_in;
- p_in = CMediaBufferCreate( p_block, p_block->i_buffer, VLC_TRUE );
+ p_in = CMediaBufferCreate( p_block, p_block->i_buffer, true );
i_result = p_sys->p_dmo->vt->ProcessInput( p_sys->p_dmo, 0,
(IMediaBuffer *)p_in, DMO_INPUT_DATA_BUFFERF_SYNCPOINT,
block_out.p_buffer = p_sys->p_buffer;
block_out.i_buffer = 0;
- p_out = CMediaBufferCreate( &block_out, p_sys->i_min_output, VLC_FALSE );
+ p_out = CMediaBufferCreate( &block_out, p_sys->i_min_output, false );
memset( &db, 0, sizeof(db) );
db.pBuffer = (IMediaBuffer *)p_out;
CoInitialize( 0 );
#endif /* LOADER */
- if( LoadDMO( p_this, &hmsdmo_dll, &p_dmo, &p_enc->fmt_out, VLC_TRUE )
+ if( LoadDMO( p_this, &hmsdmo_dll, &p_dmo, &p_enc->fmt_out, true )
!= VLC_SUCCESS )
{
hmsdmo_dll = 0;
}
/* Feed input to the DMO */
- p_in = CMediaBufferCreate( p_block_in, p_block_in->i_buffer, VLC_TRUE );
+ p_in = CMediaBufferCreate( p_block_in, p_block_in->i_buffer, true );
i_result = p_sys->p_dmo->vt->ProcessInput( p_sys->p_dmo, 0,
(IMediaBuffer *)p_in, DMO_INPUT_DATA_BUFFERF_TIME, i_pts * 10, 0 );
p_block_out = block_New( p_enc, p_sys->i_min_output );
p_block_out->i_buffer = 0;
- p_out = CMediaBufferCreate(p_block_out, p_sys->i_min_output, VLC_FALSE);
+ p_out = CMediaBufferCreate(p_block_out, p_sys->i_min_output, false);
memset( &db, 0, sizeof(db) );
db.pBuffer = (IMediaBuffer *)p_out;
int i_ref;
block_t *p_block;
int i_max_size;
- vlc_bool_t b_own;
+ bool b_own;
} CMediaBuffer;
-CMediaBuffer *CMediaBufferCreate( block_t *, int, vlc_bool_t );
+CMediaBuffer *CMediaBufferCreate( block_t *, int, bool );
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Input properties
}
/* Misc init */
- p_sys->b_packetizer = VLC_FALSE;
+ p_sys->b_packetizer = false;
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
int i_ret = OpenDecoder( p_this );
- if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = VLC_TRUE;
+ if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = true;
return i_ret;
}
case STATE_SEND_DATA:
if( !(p_buf = GetOutBuffer( p_dec, &p_out_buffer )) )
{
- //p_dec->b_error = VLC_TRUE;
+ //p_dec->b_error = true;
return NULL;
}
set_subcategory( SUBCAT_INPUT_SCODEC );
set_callbacks( Open, Close );
- add_integer( DVBSUB_CFG_PREFIX "position", 8, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE );
+ add_integer( DVBSUB_CFG_PREFIX "position", 8, NULL, POS_TEXT, POS_LONGTEXT, true );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
- add_integer( DVBSUB_CFG_PREFIX "x", -1, NULL, POSX_TEXT, POSX_LONGTEXT, VLC_FALSE );
- add_integer( DVBSUB_CFG_PREFIX "y", -1, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_FALSE );
+ add_integer( DVBSUB_CFG_PREFIX "x", -1, NULL, POSX_TEXT, POSX_LONGTEXT, false );
+ add_integer( DVBSUB_CFG_PREFIX "y", -1, NULL, POSY_TEXT, POSY_LONGTEXT, false );
# define ENC_CFG_PREFIX "sout-dvbsub-"
add_submodule();
set_capability( "encoder", 100 );
set_callbacks( OpenEncoder, CloseEncoder );
- add_integer( ENC_CFG_PREFIX "x", -1, NULL, ENC_POSX_TEXT, ENC_POSX_LONGTEXT, VLC_FALSE );
- add_integer( ENC_CFG_PREFIX "y", -1, NULL, ENC_POSY_TEXT, ENC_POSY_LONGTEXT, VLC_FALSE );
+ add_integer( ENC_CFG_PREFIX "x", -1, NULL, ENC_POSX_TEXT, ENC_POSX_LONGTEXT, false );
+ add_integer( ENC_CFG_PREFIX "y", -1, NULL, ENC_POSY_TEXT, ENC_POSY_LONGTEXT, false );
add_obsolete_integer( ENC_CFG_PREFIX "timeout" ); /* Suppressed since 0.8.5 */
vlc_module_end();
int i_width;
int i_height;
- vlc_bool_t b_windowed;
+ bool b_windowed;
int i_x;
int i_y;
int i_max_x;
int i_ancillary_id;
mtime_t i_pts;
- vlc_bool_t b_absolute;
+ bool b_absolute;
int i_spu_position;
int i_spu_x;
int i_spu_y;
- vlc_bool_t b_page;
+ bool b_page;
dvbsub_page_t *p_page;
dvbsub_region_t *p_regions;
dvbsub_clut_t *p_cluts;
i_posy = val.i_int;
/* Check if subpicture position was overridden */
- p_sys->b_absolute = VLC_FALSE;
+ p_sys->b_absolute = false;
p_sys->i_spu_x = p_sys->i_spu_y = 0;
if( ( i_posx >= 0 ) && ( i_posy >= 0 ) )
{
- p_sys->b_absolute = VLC_TRUE;
+ p_sys->b_absolute = true;
p_sys->i_spu_x = i_posx;
p_sys->i_spu_y = i_posy;
}
msg_Dbg( p_dec, "subtitle packet received: "I64Fd, p_sys->i_pts );
#endif
- p_sys->b_page = VLC_FALSE;
+ p_sys->b_page = false;
while( bs_show( &p_sys->bs, 8 ) == 0x0f ) /* Sync byte */
{
decode_segment( p_dec, &p_sys->bs );
p_sys->p_page->i_version = i_version;
p_sys->p_page->i_timeout = i_timeout;
- p_sys->b_page = VLC_TRUE;
+ p_sys->b_page = true;
/* Number of regions */
p_sys->p_page->i_region_defs = (i_segment_length - 2) / 6;
int i_segment_length, i_processed_length, i_id, i_version;
int i_width, i_height, i_level_comp, i_depth, i_clut;
int i_8_bg, i_4_bg, i_2_bg;
- vlc_bool_t b_fill;
+ bool b_fill;
i_segment_length = bs_read( s, 16 );
i_id = bs_read( s, 8 );
p_region->p_pixbuf = malloc( i_height * i_width );
p_region->i_depth = 0;
- b_fill = VLC_TRUE;
+ b_fill = true;
}
if( p_region->i_depth &&
( ( p_region->i_depth != i_depth ) ||
decoder_sys_t *p_sys = p_dec->p_sys;
dvbsub_region_t *p_region;
int i_segment_length, i_coding_method, i_version, i_id, i;
- vlc_bool_t b_non_modify_color;
+ bool b_non_modify_color;
/* ETSI 300-743 paragraph 7.2.4
* sync_byte, segment_type and page_id have already been processed.
static void dvbsub_pdata2bpp( bs_t *s, uint8_t *p, int i_width, int *pi_off )
{
- vlc_bool_t b_stop = VLC_FALSE;
+ bool b_stop = false;
while( !b_stop && !bs_eof( s ) )
{
switch( bs_read( s, 2 ) ) //Switch3
{
case 0x00:
- b_stop = VLC_TRUE;
+ b_stop = true;
break;
case 0x01:
i_count = 2;
static void dvbsub_pdata4bpp( bs_t *s, uint8_t *p, int i_width, int *pi_off )
{
- vlc_bool_t b_stop = VLC_FALSE;
+ bool b_stop = false;
while( !b_stop && !bs_eof( s ) )
{
else
{
bs_skip( s, 3 );
- b_stop = VLC_TRUE;
+ b_stop = true;
}
}
else
static void dvbsub_pdata8bpp( bs_t *s, uint8_t *p, int i_width, int *pi_off )
{
- vlc_bool_t b_stop = VLC_FALSE;
+ bool b_stop = false;
while( !b_stop && !bs_eof( s ) )
{
else
{
bs_skip( s, 7 );
- b_stop = VLC_TRUE;
+ b_stop = true;
}
}
else
/* Set the pf_render callback */
p_spu->i_start = (mtime_t) p_sys->i_pts;
//p_spu->i_stop = (mtime_t) 0;
- p_spu->b_ephemer = VLC_TRUE;
- p_spu->b_pausable = VLC_TRUE;
- //p_spu->b_fade = VLC_TRUE;
+ p_spu->b_ephemer = true;
+ p_spu->b_pausable = true;
+ //p_spu->b_fade = true;
//p_spu->i_stop = p_spu->i_start + (mtime_t) (i_timeout * 1000000);
/* Correct positioning of SPU */
/* Count colors, build best palette */
for( i_tolerance = 0; i_tolerance < 128; i_tolerance++ )
{
- vlc_bool_t b_success = VLC_TRUE;
+ bool b_success = true;
p_fmt->p_palette->i_entries = 0;
for( i = 0; i < i_pixels ; )
}
if( p_fmt->p_palette->i_entries >= i_max_entries )
{
- b_success = VLC_FALSE;
+ b_success = false;
break;
}
i += i_iterator;
{
encoder_sys_t *p_sys = p_enc->p_sys;
subpicture_region_t *p_region;
- vlc_bool_t b_mode_change = VLC_FALSE;
+ bool b_mode_change = false;
int i_regions, i_timeout;
bs_write( s, 8, 0x0f ); /* Sync byte */
( p_sys->p_regions[i_regions].i_width >
(int)p_region->fmt.i_visible_width ) )
{
- b_mode_change = VLC_TRUE;
+ b_mode_change = true;
msg_Dbg( p_enc, "region %i width change: %i -> %i",
i_regions, p_sys->p_regions[i_regions].i_width,
p_region->fmt.i_visible_width );
if( p_sys->p_regions[i_regions].i_height <
(int)p_region->fmt.i_visible_height )
{
- b_mode_change = VLC_TRUE;
+ b_mode_change = true;
msg_Dbg( p_enc, "region %i height change: %i -> %i",
i_regions, p_sys->p_regions[i_regions].i_height,
p_region->fmt.i_visible_height );
p_region = p_region->p_next, i_region++ )
{
int i_entries = 4, i_depth = 0x1, i_bg = 0;
- vlc_bool_t b_text =
+ bool b_text =
( p_region->fmt.i_chroma == VLC_FOURCC('T','E','X','T') );
if( !b_text )
static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
subpicture_region_t *p_region,
- vlc_bool_t b_top );
+ bool b_top );
static void encode_object( encoder_t *p_enc, bs_t *s, subpicture_t *p_subpic )
{
/* Top field */
i_pixel_data_pos = bs_pos( s );
- encode_pixel_data( p_enc, s, p_region, VLC_TRUE );
+ encode_pixel_data( p_enc, s, p_region, true );
i_pixel_data_pos = ( bs_pos( s ) - i_pixel_data_pos ) / 8;
SetWBE( &s->p_start[i_update_pos/8], i_pixel_data_pos );
/* Bottom field */
i_pixel_data_pos = bs_pos( s );
- encode_pixel_data( p_enc, s, p_region, VLC_FALSE );
+ encode_pixel_data( p_enc, s, p_region, false );
i_pixel_data_pos = ( bs_pos( s ) - i_pixel_data_pos ) / 8;
SetWBE( &s->p_start[i_update_pos/8+2], i_pixel_data_pos );
int i_line );
static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
subpicture_region_t *p_region,
- vlc_bool_t b_top )
+ bool b_top )
{
unsigned int i_line;
/* Channel positions of the current stream (for re-ordering) */
uint32_t pi_channel_positions[MAX_CHANNEL_POSITIONS];
- vlc_bool_t b_sbr, b_ps;
+ bool b_sbr, b_ps;
int i_input_rate;
};
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
/* Faad2 can't deal with truncated data (eg. from MPEG TS) */
- p_dec->b_need_packetized = VLC_TRUE;
+ p_dec->b_need_packetized = true;
- p_sys->b_sbr = p_sys->b_ps = VLC_FALSE;
+ p_sys->b_sbr = p_sys->b_ps = false;
return VLC_SUCCESS;
}
add_shortcut( "fake" );
add_file( "fake-file", "", NULL, FILE_TEXT,
- FILE_LONGTEXT, VLC_FALSE );
+ FILE_LONGTEXT, false );
add_integer( "fake-file-reload", 0, NULL, RELOAD_TEXT,
- RELOAD_LONGTEXT, VLC_FALSE );
+ RELOAD_LONGTEXT, false );
add_integer( "fake-width", 0, NULL, WIDTH_TEXT,
- WIDTH_LONGTEXT, VLC_TRUE );
+ WIDTH_LONGTEXT, true );
add_integer( "fake-height", 0, NULL, HEIGHT_TEXT,
- HEIGHT_LONGTEXT, VLC_TRUE );
+ HEIGHT_LONGTEXT, true );
add_bool( "fake-keep-ar", 0, NULL, KEEP_AR_TEXT, KEEP_AR_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "fake-aspect-ratio", "", NULL,
- ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, VLC_TRUE );
+ ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true );
add_bool( "fake-deinterlace", 0, NULL, DEINTERLACE_TEXT,
- DEINTERLACE_LONGTEXT, VLC_FALSE );
+ DEINTERLACE_LONGTEXT, false );
add_string( "fake-deinterlace-module", "deinterlace", NULL,
DEINTERLACE_MODULE_TEXT, DEINTERLACE_MODULE_LONGTEXT,
- VLC_FALSE );
+ false );
change_string_list( ppsz_deinterlace_type, 0, 0 );
add_string( "fake-chroma", "I420", NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_TRUE );
+ true );
vlc_module_end();
struct decoder_sys_t
picture_t *p_image;
vlc_mutex_t lock;
- vlc_bool_t b_reload;
+ bool b_reload;
mtime_t i_reload;
mtime_t i_next;
};
video_format_t fmt_in, fmt_out;
picture_t *p_image;
char *psz_file, *psz_chroma;
- vlc_bool_t b_keep_ar;
+ bool b_keep_ar;
int i_aspect = 0;
if( p_dec->fmt_in.i_codec != VLC_FOURCC('f','a','k','e') )
val.i_int = var_CreateGetIntegerCommand( p_dec, "fake-file-reload" );
if( val.i_int > 0)
{
- p_dec->p_sys->b_reload = VLC_TRUE;
+ p_dec->p_sys->b_reload = true;
p_dec->p_sys->i_reload = (mtime_t)(val.i_int * 1000000);
p_dec->p_sys->i_next = (mtime_t)(p_dec->p_sys->i_reload + mdate());
}
{
if( newval.i_int > 0)
{
- p_dec->p_sys->b_reload = VLC_TRUE;
+ p_dec->p_sys->b_reload = true;
p_dec->p_sys->i_reload = (mtime_t)(newval.i_int * 1000000);
p_dec->p_sys->i_next = (mtime_t)(p_dec->p_sys->i_reload + mdate());
}
else
{
- p_dec->p_sys->b_reload = VLC_FALSE;
+ p_dec->p_sys->b_reload = false;
}
}
*****************************************************************************/
struct filter_sys_t
{
- vlc_bool_t b_resize;
- vlc_bool_t b_convert;
- vlc_bool_t b_resize_first;
- vlc_bool_t b_enable_croppadd;
+ bool b_resize;
+ bool b_convert;
+ bool b_resize_first;
+ bool b_enable_croppadd;
es_format_t fmt_in;
int i_src_ffmpeg_chroma;
p_pic_dst->date = p_pic->date;
p_pic_dst->b_force = p_pic->b_force;
p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
- p_pic_dst->b_progressive = VLC_TRUE;
+ p_pic_dst->b_progressive = true;
p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
p_pic->pf_release( p_pic );
AVProbeData pd;
AVInputFormat *fmt;
unsigned int i;
- vlc_bool_t b_avfmt_nofile;
+ bool b_avfmt_nofile;
/* Init Probe data */
pd.filename = p_demux->psz_path;
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- vlc_bool_t b_avfmt_nofile;
+ bool b_avfmt_nofile;
FREENULL( p_sys->tk );
vlc_mutex_t lock;
vlc_cond_t cond;
- vlc_bool_t b_work, b_done;
+ bool b_work, b_done;
};
/*****************************************************************************
mtime_t i_last_ref_pts;
mtime_t i_buggy_pts_detect;
mtime_t i_last_pts;
- vlc_bool_t b_inited;
+ bool b_inited;
/*
* Audio properties
int i_qmin;
int i_qmax;
int i_hq;
- vlc_bool_t b_strict_rc;
+ bool b_strict_rc;
int i_rc_buffer_size;
float f_rc_buffer_aggressivity;
- vlc_bool_t b_pre_me;
- vlc_bool_t b_hurry_up;
- vlc_bool_t b_interlace, b_interlace_me;
+ bool b_pre_me;
+ bool b_hurry_up;
+ bool b_interlace, b_interlace_me;
float f_i_quant_factor;
int i_noise_reduction;
- vlc_bool_t b_mpeg4_matrix;
- vlc_bool_t b_trellis;
+ bool b_mpeg4_matrix;
+ bool b_trellis;
int i_quality; /* for VBR */
float f_lumi_masking, f_dark_masking, f_p_masking, f_border_masking;
int i_luma_elim, i_chroma_elim;
if( p_enc->fmt_out.i_cat == VIDEO_ES && i_cat != VIDEO_ES )
{
msg_Err( p_enc, "\"%s\" is not a video encoder", psz_namecodec );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, false, _("Streaming / Transcoding failed"),
_("\"%s\" is no video encoder."), psz_namecodec );
return VLC_EGENERIC;
}
if( p_enc->fmt_out.i_cat == AUDIO_ES && i_cat != AUDIO_ES )
{
msg_Err( p_enc, "\"%s\" is not an audio encoder", psz_namecodec );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, false, _("Streaming / Transcoding failed"),
_("\"%s\" is no audio encoder."), psz_namecodec );
return VLC_EGENERIC;
}
if( !p_codec )
{
msg_Err( p_enc, "cannot find encoder %s", psz_namecodec );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, false, _("Streaming / Transcoding failed"),
_("VLC could not find encoder \"%s\"."), psz_namecodec );
return VLC_EGENERIC;
}
{
vlc_mutex_unlock( lock );
msg_Err( p_enc, "cannot open encoder" );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, false, _("Streaming / Transcoding failed"),
_("VLC could not open the encoder.") );
free( p_sys );
return VLC_EGENERIC;
else
{
msg_Err( p_enc, "cannot open encoder" );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, false, _("Streaming / Transcoding failed"),
_("VLC could not open the encoder.") );
free( p_sys );
return VLC_EGENERIC;
pp_contexts[i]->b_work = 0;
pp_contexts[i]->b_done = 0;
if ( vlc_thread_create( pp_contexts[i], "encoder", FfmpegThread,
- VLC_THREAD_PRIORITY_VIDEO, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_VIDEO, false ) )
{
msg_Err( p_enc, "cannot spawn encoder thread, expect to die soon" );
return NULL;
set_callbacks( OpenDecoder, CloseDecoder );
- add_bool( "ffmpeg-dr", 1, NULL, DR_TEXT, DR_TEXT, VLC_TRUE );
+ add_bool( "ffmpeg-dr", 1, NULL, DR_TEXT, DR_TEXT, true );
add_integer ( "ffmpeg-error-resilience", 1, NULL, ERROR_TEXT,
- ERROR_LONGTEXT, VLC_TRUE );
+ ERROR_LONGTEXT, true );
add_integer ( "ffmpeg-workaround-bugs", 1, NULL, BUGS_TEXT, BUGS_LONGTEXT,
- VLC_FALSE );
+ false );
add_bool( "ffmpeg-hurry-up", 1, NULL, HURRYUP_TEXT, HURRYUP_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "ffmpeg-skip-frame", 0, NULL, SKIP_FRAME_TEXT,
- SKIP_FRAME_LONGTEXT, VLC_TRUE );
+ SKIP_FRAME_LONGTEXT, true );
change_integer_range( -1, 4 );
add_integer( "ffmpeg-skip-idct", 0, NULL, SKIP_IDCT_TEXT,
- SKIP_IDCT_LONGTEXT, VLC_TRUE );
+ SKIP_IDCT_LONGTEXT, true );
change_integer_range( -1, 4 );
add_integer ( "ffmpeg-vismv", 0, NULL, VISMV_TEXT, VISMV_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer ( "ffmpeg-lowres", 0, NULL, LOWRES_TEXT, LOWRES_LONGTEXT,
- VLC_TRUE );
+ true );
change_integer_range( 0, 2 );
add_integer ( "ffmpeg-skiploopfilter", 0, NULL, SKIPLOOPF_TEXT,
- SKIPLOOPF_LONGTEXT, VLC_TRUE );
+ SKIPLOOPF_LONGTEXT, true );
change_integer_list( nloopf_list, nloopf_list_text, 0 );
- add_integer( "ffmpeg-pp-q", 0, NULL, PP_Q_TEXT, PP_Q_LONGTEXT, VLC_FALSE );
+ add_integer( "ffmpeg-pp-q", 0, NULL, PP_Q_TEXT, PP_Q_LONGTEXT, false );
add_string( "ffmpeg-pp-name", "default", NULL, LIBAVCODEC_PP_TEXT,
- LIBAVCODEC_PP_LONGTEXT, VLC_TRUE );
+ LIBAVCODEC_PP_LONGTEXT, true );
add_integer( "ffmpeg-debug", 0, NULL, DEBUG_TEXT, DEBUG_LONGTEXT,
- VLC_TRUE );
+ true );
/* encoder submodule */
add_submodule();
set_callbacks( E_(OpenEncoder), E_(CloseEncoder) );
add_string( ENC_CFG_PREFIX "hq", "simple", NULL, ENC_HQ_TEXT,
- ENC_HQ_LONGTEXT, VLC_FALSE );
+ ENC_HQ_LONGTEXT, false );
change_string_list( enc_hq_list, enc_hq_list_text, 0 );
add_integer( ENC_CFG_PREFIX "keyint", 0, NULL, ENC_KEYINT_TEXT,
- ENC_KEYINT_LONGTEXT, VLC_FALSE );
+ ENC_KEYINT_LONGTEXT, false );
add_integer( ENC_CFG_PREFIX "bframes", 0, NULL, ENC_BFRAMES_TEXT,
- ENC_BFRAMES_LONGTEXT, VLC_FALSE );
+ ENC_BFRAMES_LONGTEXT, false );
add_bool( ENC_CFG_PREFIX "hurry-up", 0, NULL, ENC_HURRYUP_TEXT,
- ENC_HURRYUP_LONGTEXT, VLC_FALSE );
+ ENC_HURRYUP_LONGTEXT, false );
add_bool( ENC_CFG_PREFIX "interlace", 0, NULL, ENC_INTERLACE_TEXT,
- ENC_INTERLACE_LONGTEXT, VLC_TRUE );
+ ENC_INTERLACE_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "interlace-me", 1, NULL, ENC_INTERLACE_ME_TEXT,
- ENC_INTERLACE_ME_LONGTEXT, VLC_TRUE );
+ ENC_INTERLACE_ME_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "vt", 0, NULL, ENC_VT_TEXT,
- ENC_VT_LONGTEXT, VLC_TRUE );
+ ENC_VT_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "pre-me", 0, NULL, ENC_PRE_ME_TEXT,
- ENC_PRE_ME_LONGTEXT, VLC_TRUE );
+ ENC_PRE_ME_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "strict-rc", 0, NULL, ENC_RC_STRICT_TEXT,
- ENC_RC_STRICT_LONGTEXT, VLC_TRUE );
+ ENC_RC_STRICT_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "rc-buffer-size", 224*1024*8, NULL,
- ENC_RC_BUF_TEXT, ENC_RC_BUF_LONGTEXT, VLC_TRUE );
+ ENC_RC_BUF_TEXT, ENC_RC_BUF_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "rc-buffer-aggressivity", 1.0, NULL,
- ENC_RC_BUF_AGGR_TEXT, ENC_RC_BUF_AGGR_LONGTEXT, VLC_TRUE );
+ ENC_RC_BUF_AGGR_TEXT, ENC_RC_BUF_AGGR_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "i-quant-factor", 0, NULL,
- ENC_IQUANT_FACTOR_TEXT, ENC_IQUANT_FACTOR_LONGTEXT, VLC_TRUE );
+ ENC_IQUANT_FACTOR_TEXT, ENC_IQUANT_FACTOR_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "noise-reduction", 0, NULL,
- ENC_NOISE_RED_TEXT, ENC_NOISE_RED_LONGTEXT, VLC_TRUE );
+ ENC_NOISE_RED_TEXT, ENC_NOISE_RED_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "mpeg4-matrix", 0, NULL,
- ENC_MPEG4_MATRIX_TEXT, ENC_MPEG4_MATRIX_LONGTEXT, VLC_TRUE );
+ ENC_MPEG4_MATRIX_TEXT, ENC_MPEG4_MATRIX_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "qmin", 0, NULL,
- ENC_QMIN_TEXT, ENC_QMIN_LONGTEXT, VLC_TRUE );
+ ENC_QMIN_TEXT, ENC_QMIN_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "qmax", 0, NULL,
- ENC_QMAX_TEXT, ENC_QMAX_LONGTEXT, VLC_TRUE );
+ ENC_QMAX_TEXT, ENC_QMAX_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "trellis", 0, NULL,
- ENC_TRELLIS_TEXT, ENC_TRELLIS_LONGTEXT, VLC_TRUE );
+ ENC_TRELLIS_TEXT, ENC_TRELLIS_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "qscale", 0, NULL,
- ENC_QSCALE_TEXT, ENC_QSCALE_LONGTEXT, VLC_TRUE );
+ ENC_QSCALE_TEXT, ENC_QSCALE_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "strict", 0, NULL,
- ENC_STRICT_TEXT, ENC_STRICT_LONGTEXT, VLC_TRUE );
+ ENC_STRICT_TEXT, ENC_STRICT_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "lumi-masking", 0.0, NULL,
- ENC_LUMI_MASKING_TEXT, ENC_LUMI_MASKING_LONGTEXT, VLC_TRUE );
+ ENC_LUMI_MASKING_TEXT, ENC_LUMI_MASKING_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "dark-masking", 0.0, NULL,
- ENC_DARK_MASKING_TEXT, ENC_DARK_MASKING_LONGTEXT, VLC_TRUE );
+ ENC_DARK_MASKING_TEXT, ENC_DARK_MASKING_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "p-masking", 0.0, NULL,
- ENC_P_MASKING_TEXT, ENC_P_MASKING_LONGTEXT, VLC_TRUE );
+ ENC_P_MASKING_TEXT, ENC_P_MASKING_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "border-masking", 0.0, NULL,
- ENC_BORDER_MASKING_TEXT, ENC_BORDER_MASKING_LONGTEXT, VLC_TRUE );
+ ENC_BORDER_MASKING_TEXT, ENC_BORDER_MASKING_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "luma-elim-threshold", 0, NULL,
- ENC_LUMA_ELIM_TEXT, ENC_LUMA_ELIM_LONGTEXT, VLC_TRUE );
+ ENC_LUMA_ELIM_TEXT, ENC_LUMA_ELIM_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "chroma-elim-threshold", 0, NULL,
- ENC_CHROMA_ELIM_TEXT, ENC_CHROMA_ELIM_LONGTEXT, VLC_TRUE );
+ ENC_CHROMA_ELIM_TEXT, ENC_CHROMA_ELIM_LONGTEXT, true );
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
/* Audio AAC encoder profile */
add_string( ENC_CFG_PREFIX "aac-profile", "main", NULL,
- ENC_PROFILE_TEXT, ENC_PROFILE_LONGTEXT, VLC_TRUE );
+ ENC_PROFILE_TEXT, ENC_PROFILE_LONGTEXT, true );
#endif
#if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
set_description( _("FFmpeg muxer" ) );
set_capability( "sout mux", 2 );
add_string( "ffmpeg-mux", NULL, NULL, MUX_TEXT,
- MUX_LONGTEXT, VLC_TRUE );
+ MUX_LONGTEXT, true );
set_callbacks( E_(OpenMux), E_(CloseMux) );
#endif
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VFILTER );
set_callbacks( E_(OpenScaler), E_(CloseScaler) );
- add_integer( "swscale-mode", 0, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, VLC_TRUE );
+ add_integer( "swscale-mode", 0, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, true );
change_integer_list( pi_mode_values, ppsz_mode_descriptions, 0 );
#else
p_context->dsp_mask |= FF_MM_SSE2;
}
- p_dec->b_need_packetized = VLC_TRUE;
+ p_dec->b_need_packetized = true;
switch( i_cat )
{
case VIDEO_ES:
if( pi_ffmpeg_codec ) *pi_ffmpeg_codec = codecs_table[i].i_codec;
if( ppsz_name ) *ppsz_name = (char *)codecs_table[i].psz_name;
- return VLC_TRUE;
+ return true;
}
}
- return VLC_FALSE;
+ return false;
}
int E_(GetVlcFourcc)( int i_ffmpeg_codec, int *pi_cat,
if( pi_fourcc ) *pi_fourcc = codecs_table[i].i_fourcc;
if( ppsz_name ) *ppsz_name = codecs_table[i].psz_name;
- return VLC_TRUE;
+ return true;
}
}
- return VLC_FALSE;
+ return false;
}
void E_(CloseScaler)( vlc_object_t * );
/* Postprocessing module */
-void *E_(OpenPostproc)( decoder_t *, vlc_bool_t * );
+void *E_(OpenPostproc)( decoder_t *, bool * );
int E_(InitPostproc)( void *, int, int, int );
int E_(PostprocPict)( void *, picture_t *, struct AVFrame * );
void E_(ClosePostproc)( decoder_t *, void * );
URLContext url;
URLProtocol prot;
- vlc_bool_t b_write_header;
- vlc_bool_t b_error;
+ bool b_write_header;
+ bool b_error;
int64_t i_initial_dts;
};
#endif
p_sys->oc->nb_streams = 0;
- p_sys->b_write_header = VLC_TRUE;
- p_sys->b_error = VLC_FALSE;
+ p_sys->b_write_header = true;
+ p_sys->b_error = false;
p_sys->i_initial_dts = 0;
return VLC_SUCCESS;
if( av_write_header( p_sys->oc ) < 0 )
{
msg_Err( p_mux, "could not write header" );
- p_sys->b_write_header = VLC_FALSE;
- p_sys->b_error = VLC_TRUE;
+ p_sys->b_write_header = false;
+ p_sys->b_error = true;
return VLC_EGENERIC;
}
#else
put_flush_packet( &p_sys->oc->pb );
#endif
- p_sys->b_write_header = VLC_FALSE;
+ p_sys->b_write_header = false;
}
for( ;; )
*****************************************************************************/
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
pp_context_t *pp_context;
pp_mode_t *pp_mode;
- vlc_bool_t *pb_pp;
+ bool *pb_pp;
int i_width;
int i_height;
/*****************************************************************************
* OpenPostproc: probe and open the postproc
*****************************************************************************/
-void *E_(OpenPostproc)( decoder_t *p_dec, vlc_bool_t *pb_pp )
+void *E_(OpenPostproc)( decoder_t *p_dec, bool *pb_pp )
{
video_postproc_sys_t *p_sys;
vlc_value_t val, val_orig, text;
p_sys->pp_context = NULL;
p_sys->pp_mode = NULL;
- *pb_pp = VLC_FALSE;
+ *pb_pp = false;
p_sys->pb_pp = pb_pp;
/* Create object variable if not already done */
var_Get( p_dec, "ffmpeg-pp-q", &val );
var_Set( p_dec, "ffmpeg-pp-q", val_orig );
if( val_orig.i_int )
- *pb_pp = VLC_TRUE;
+ *pb_pp = true;
return p_sys;
}
/* for direct rendering */
int b_direct_rendering;
- vlc_bool_t b_has_b_frames;
+ bool b_has_b_frames;
/* Hack to force display of still pictures */
- vlc_bool_t b_first_frame;
+ bool b_first_frame;
int i_buffer_orig, i_buffer;
char *p_buffer_orig, *p_buffer;
/* Postprocessing handle */
void *p_pp;
- vlc_bool_t b_pp;
- vlc_bool_t b_pp_async;
- vlc_bool_t b_pp_init;
+ bool b_pp;
+ bool b_pp_async;
+ bool b_pp_init;
};
/* FIXME (dummy palette for now) */
{
E_(InitPostproc)( p_sys->p_pp, p_context->width,
p_context->height, p_context->pix_fmt );
- p_sys->b_pp_init = VLC_TRUE;
+ p_sys->b_pp_init = true;
}
return p_pic;
}
p_sys->p_pp = NULL;
- p_sys->b_pp = p_sys->b_pp_async = p_sys->b_pp_init = VLC_FALSE;
+ p_sys->b_pp = p_sys->b_pp_async = p_sys->b_pp_init = false;
p_sys->p_pp = E_(OpenPostproc)( p_dec, &p_sys->b_pp_async );
/* ffmpeg doesn't properly release old pictures when frames are skipped */
/* ***** misc init ***** */
p_sys->input_pts = p_sys->input_dts = 0;
p_sys->i_pts = 0;
- p_sys->b_has_b_frames = VLC_FALSE;
- p_sys->b_first_frame = VLC_TRUE;
+ p_sys->b_has_b_frames = false;
+ p_sys->b_first_frame = true;
p_sys->i_late_frames = 0;
p_sys->i_buffer = 0;
p_sys->i_buffer_orig = 1;
{
decoder_sys_t *p_sys = p_dec->p_sys;
int b_drawpicture;
- int b_null_size = VLC_FALSE;
+ int b_null_size = false;
block_t *p_block;
if( !pp_block || !*pp_block ) return NULL;
{
if( p_sys->b_hurry_up )
p_sys->p_context->skip_frame = p_sys->i_skip_frame;
- b_null_size = VLC_TRUE;
+ b_null_size = true;
}
/*
p_sys->p_context->height > 0 )
{
/* Reparse it to not drop the I frame */
- b_null_size = VLC_FALSE;
+ b_null_size = false;
if( p_sys->b_hurry_up )
p_sys->p_context->skip_frame = p_sys->i_skip_frame;
i_used = avcodec_decode_video( p_sys->p_context, p_sys->p_ff_pic,
/* Sanity check (seems to be needed for some streams) */
if( p_sys->p_ff_pic->pict_type == FF_B_TYPE )
{
- p_sys->b_has_b_frames = VLC_TRUE;
+ p_sys->b_has_b_frames = true;
}
if( !p_dec->fmt_in.video.i_aspect )
if( p_sys->b_first_frame )
{
/* Hack to force display of still pictures */
- p_sys->b_first_frame = VLC_FALSE;
- p_pic->b_force = VLC_TRUE;
+ p_sys->b_first_frame = false;
+ p_pic->b_force = true;
}
p_pic->i_nb_fields = 2 + p_sys->p_ff_pic->repeat_pict;
*****************************************************************************/
struct filter_sys_t
{
- vlc_bool_t b_resize;
- vlc_bool_t b_convert;
- vlc_bool_t b_resize_first;
- vlc_bool_t b_enable_croppadd;
+ bool b_resize;
+ bool b_convert;
+ bool b_resize_first;
+ bool b_enable_croppadd;
es_format_t fmt_in;
int i_src_ffmpeg_chroma;
/*****************************************************************************
* OpenFilterEx: common code to OpenFilter and OpenCropPadd
*****************************************************************************/
-static int OpenFilterEx( vlc_object_t *p_this, vlc_bool_t b_enable_croppadd )
+static int OpenFilterEx( vlc_object_t *p_this, bool b_enable_croppadd )
{
filter_t *p_filter = (filter_t*)p_this;
filter_sys_t *p_sys;
- vlc_bool_t b_convert, b_resize;
+ bool b_convert, b_resize;
/* Check if we can handle that formats */
if( E_(GetFfmpegChroma)( p_filter->fmt_in.video.i_chroma ) < 0 ||
*****************************************************************************/
int E_(OpenFilter)( vlc_object_t *p_this )
{
- return OpenFilterEx( p_this, VLC_FALSE );
+ return OpenFilterEx( p_this, false );
}
/*****************************************************************************
*****************************************************************************/
int E_(OpenCropPadd)( vlc_object_t *p_this )
{
- return OpenFilterEx( p_this, VLC_TRUE );
+ return OpenFilterEx( p_this, true );
}
static int CheckInit( filter_t *p_filter )
{
filter_sys_t *p_sys = p_filter->p_sys;
- vlc_bool_t b_change;
+ bool b_change;
int i_croptop=0;
int i_cropbottom=0;
int i_cropleft=0;
else if( ( p_sys->i_src_ffmpeg_chroma != PIX_FMT_YUV420P ) &&
( p_sys->i_src_ffmpeg_chroma != PIX_FMT_YUVJ420P ) )
{
- p_sys->b_resize_first = VLC_FALSE;
+ p_sys->b_resize_first = false;
}
else if( ( p_sys->i_dst_ffmpeg_chroma != PIX_FMT_YUV420P ) &&
( p_sys->i_dst_ffmpeg_chroma != PIX_FMT_YUVJ420P ) )
{
- p_sys->b_resize_first = VLC_TRUE;
+ p_sys->b_resize_first = true;
}
if ( p_sys->b_enable_croppadd )
} stream_info;
#endif
- vlc_bool_t b_stream_info;
+ bool b_stream_info;
/*
* Common properties
/* Misc init */
aout_DateSet( &p_sys->end_date, 0 );
p_sys->i_state = STATE_NOSYNC;
- p_sys->b_stream_info = VLC_FALSE;
+ p_sys->b_stream_info = false;
p_sys->p_block=NULL;
p_sys->bytestream = block_BytestreamInit();
p_dec->fmt_out.audio.i_channels, p_dec->fmt_out.audio.i_rate,
p_dec->fmt_out.audio.i_bitspersample );
- p_sys->b_stream_info = VLC_TRUE;
+ p_sys->b_stream_info = true;
p_sys->stream_info = metadata->data.stream_info;
return;
int i_blocksize = 0, i_blocksize_hint = 0, i_sample_rate_hint = 0;
uint64_t i_sample_number = 0;
- vlc_bool_t b_variable_blocksize = ( p_sys->b_stream_info &&
+ bool b_variable_blocksize = ( p_sys->b_stream_info &&
p_sys->stream_info.min_blocksize != p_sys->stream_info.max_blocksize );
- vlc_bool_t b_fixed_blocksize = ( p_sys->b_stream_info &&
+ bool b_fixed_blocksize = ( p_sys->b_stream_info &&
p_sys->stream_info.min_blocksize == p_sys->stream_info.max_blocksize );
/* Check syncword */
set_subcategory (SUBCAT_INPUT_ACODEC);
set_callbacks (Open, Close);
add_file ("soundfont", "", NULL,
- SOUNDFONT_TEXT, SOUNDFONT_LONGTEXT, VLC_FALSE);
+ SOUNDFONT_TEXT, SOUNDFONT_LONGTEXT, false);
vlc_module_end();
*/
mpeg2dec_t *p_mpeg2dec;
const mpeg2_info_t *p_info;
- vlc_bool_t b_skip;
+ bool b_skip;
/*
* Input properties
mtime_t i_current_dts;
int i_current_rate;
picture_t * p_picture_to_destroy;
- vlc_bool_t b_garbage_pic;
- vlc_bool_t b_after_sequence_header; /* is it the next frame after
+ bool b_garbage_pic;
+ bool b_after_sequence_header; /* is it the next frame after
* the sequence header ? */
- vlc_bool_t b_slice_i; /* intra-slice refresh stream */
- vlc_bool_t b_second_field;
+ bool b_slice_i; /* intra-slice refresh stream */
+ bool b_second_field;
- vlc_bool_t b_preroll;
+ bool b_preroll;
/*
* Output properties
p_sys->b_slice_i = 0;
p_sys->b_second_field = 0;
p_sys->b_skip = 0;
- p_sys->b_preroll = VLC_FALSE;
+ p_sys->b_preroll = false;
#if defined( __i386__ ) || defined( __x86_64__ )
if( vlc_CPU() & CPU_CAPABILITY_MMX )
if( p_block->i_flags & BLOCK_FLAG_PREROLL )
{
- p_sys->b_preroll = VLC_TRUE;
+ p_sys->b_preroll = true;
}
else if( p_sys->b_preroll )
{
- p_sys->b_preroll = VLC_FALSE;
+ p_sys->b_preroll = false;
/* Reset synchro */
decoder_SynchroReset( p_sys->p_synchro );
}
}
/* For still frames */
- if( state == STATE_END && p_pic ) p_pic->b_force = VLC_TRUE;
+ if( state == STATE_END && p_pic ) p_pic->b_force = true;
if( p_pic )
{
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Output properties
}
/* Misc init */
- p_sys->b_packetizer = VLC_FALSE;
+ p_sys->b_packetizer = false;
aout_DateSet( &p_sys->end_date, 0 );
/* Set output properties */
if( i_ret != VLC_SUCCESS ) return i_ret;
- p_dec->p_sys->b_packetizer = VLC_TRUE;
+ p_dec->p_sys->b_packetizer = true;
p_dec->fmt_out.i_codec = VLC_FOURCC('l','p','c','m');
*/
mtime_t i_pts;
IntraP64Decoder *p_decoder;
- vlc_bool_t b_inited;
+ bool b_inited;
int i_counter;
};
}
/* Misc init */
p_sys->i_pts = 0;
- p_sys->b_inited = VLC_FALSE;
+ p_sys->b_inited = false;
p_sys->i_counter = 0;
/* Set output properties */
vout_InitFormat( &p_dec->fmt_out.video, VLC_FOURCC('I','4','2','0'),
i_width, i_height,
VOUT_ASPECT_FACTOR * i_width / i_height );
- p_sys->b_inited = VLC_TRUE;
+ p_sys->b_inited = true;
}
p_pic = NULL;
p_sys->i_counter++;
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Input properties
unsigned int i_rate, i_max_frame_size, i_frame_length;
unsigned int i_layer, i_bit_rate;
- vlc_bool_t b_discontinuity;
+ bool b_discontinuity;
int i_input_rate;
};
}
/* Misc init */
- p_sys->b_packetizer = VLC_FALSE;
+ p_sys->b_packetizer = false;
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
p_sys->bytestream = block_BytestreamInit();
- p_sys->b_discontinuity = VLC_FALSE;
+ p_sys->b_discontinuity = false;
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
/* Set output properties */
int i_ret = OpenDecoder( p_this );
- if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = VLC_TRUE;
+ if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = true;
return i_ret;
}
}
// aout_DateSet( &p_sys->end_date, 0 );
block_Release( *pp_block );
- p_sys->b_discontinuity = VLC_TRUE;
+ p_sys->b_discontinuity = true;
return NULL;
}
msg_Dbg( p_dec, "emulated startcode" );
block_SkipByte( &p_sys->bytestream );
p_sys->i_state = STATE_NOSYNC;
- p_sys->b_discontinuity = VLC_TRUE;
+ p_sys->b_discontinuity = true;
break;
}
msg_Dbg( p_dec, "emulated startcode on next frame" );
block_SkipByte( &p_sys->bytestream );
p_sys->i_state = STATE_NOSYNC;
- p_sys->b_discontinuity = VLC_TRUE;
+ p_sys->b_discontinuity = true;
break;
}
case STATE_SEND_DATA:
if( !(p_buf = GetOutBuffer( p_dec, &p_out_buffer )) )
{
- //p_dec->b_error = VLC_TRUE;
+ //p_dec->b_error = true;
return NULL;
}
aout_DateIncrement( &p_sys->end_date,
p_sys->i_frame_length * p_sys->i_input_rate / INPUT_RATE_DEFAULT );
p_buf->b_discontinuity = p_sys->b_discontinuity;
- p_sys->b_discontinuity = VLC_FALSE;
+ p_sys->b_discontinuity = false;
/* Hack for libmad filter */
p_buf->i_nb_bytes = p_sys->i_frame_size + MAD_BUFFER_GUARD;
};
int i_version, i_mode, i_emphasis;
- vlc_bool_t b_padding, b_mpeg_2_5, b_crc;
+ bool b_padding, b_mpeg_2_5, b_crc;
int i_frame_size = 0;
int i_bitrate_index, i_samplerate_index;
int i_max_bit_rate;
*****************************************************************************/
struct decoder_sys_t
{
- vlc_bool_t b_error;
+ bool b_error;
};
/*****************************************************************************
static void user_error( png_structp p_png, png_const_charp error_msg )
{
decoder_t *p_dec = (decoder_t *)png_get_error_ptr( p_png );
- p_dec->p_sys->b_error = VLC_TRUE;
+ p_dec->p_sys->b_error = true;
msg_Err( p_dec, error_msg );
}
if( !pp_block || !*pp_block ) return NULL;
p_block = *pp_block;
- p_sys->b_error = VLC_FALSE;
+ p_sys->b_error = false;
p_png = png_create_read_struct( PNG_LIBPNG_VER_STRING, 0, 0, 0 );
if( p_png == NULL )
if( OpenAudio( p_dec ) )
{
/* Fatal */
- p_dec->b_error = VLC_TRUE;
+ p_dec->b_error = true;
return NULL;
}
if( OpenVideo( p_dec ) )
{
/* Fatal */
- p_dec->b_error = VLC_TRUE;
+ p_dec->b_error = true;
return NULL;
}
p_sys = p_dec->p_sys;
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Input properties
*/
size_t i_raw_size;
- vlc_bool_t b_invert;
+ bool b_invert;
/*
* Common properties
return VLC_EGENERIC;
}
/* Misc init */
- p_dec->p_sys->b_packetizer = VLC_FALSE;
+ p_dec->p_sys->b_packetizer = false;
p_sys->i_pts = 0;
p_sys->b_invert = 0;
/* Frames are coded from bottom to top */
p_dec->fmt_in.video.i_height =
(unsigned int)(-(int)p_dec->fmt_in.video.i_height);
- p_sys->b_invert = VLC_TRUE;
+ p_sys->b_invert = true;
}
if( p_dec->fmt_in.video.i_width <= 0 || p_dec->fmt_in.video.i_height <= 0 )
int i_ret = OpenDecoder( p_this );
- if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = VLC_TRUE;
+ if( i_ret == VLC_SUCCESS ) p_dec->p_sys->b_packetizer = true;
return i_ret;
}
if( OpenDll( p_dec ) != VLC_SUCCESS )
{
/* Fatal */
- p_dec->b_error = VLC_TRUE;
+ p_dec->b_error = true;
return NULL;
}
}
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Input properties
return VLC_EGENERIC;
}
p_dec->p_sys->bits.buf_size = 0;
- p_dec->p_sys->b_packetizer = VLC_FALSE;
+ p_dec->p_sys->b_packetizer = false;
p_dec->p_sys->rtp_rate = p_dec->fmt_in.audio.i_rate;
aout_DateSet( &p_sys->end_date, 0 );
if( i_ret == VLC_SUCCESS )
{
- p_dec->p_sys->b_packetizer = VLC_TRUE;
+ p_dec->p_sys->b_packetizer = true;
p_dec->fmt_out.i_codec = VLC_FOURCC('s','p','x',' ');
}
p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL;
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_pausable = true;
/* Rationale for the "p_spudec->i_rle_size * 4": we are going to
* expand the RLE stuff so that we won't need to read nibbles later
* this stupid interlacing stuff once. */
p_spu_data = malloc( sizeof(subpicture_data_t) + 4 * p_sys->i_rle_size );
p_spu_data->p_data = (uint8_t *)p_spu_data + sizeof(subpicture_data_t);
- p_spu_data->b_palette = VLC_FALSE;
- p_spu_data->b_auto_crop = VLC_FALSE;
+ p_spu_data->b_palette = false;
+ p_spu_data->b_auto_crop = false;
p_spu_data->i_y_top_offset = 0;
p_spu_data->i_y_bottom_offset = 0;
/* Initialize the structure */
p_spu->i_start = p_spu->i_stop = 0;
- p_spu->b_ephemer = VLC_FALSE;
+ p_spu->b_ephemer = false;
for( i_index = 4 + p_sys->i_rle_size; i_index < p_sys->i_spu_size ; )
{
{
case SPU_CMD_FORCE_DISPLAY: /* 00 (force displaying) */
p_spu->i_start = p_spu_data->i_pts + date;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
i_index += 1;
break;
unsigned int idx[4];
int i;
- p_spu_data->b_palette = VLC_TRUE;
+ p_spu_data->b_palette = true;
idx[0] = (p_sys->buffer[i_index+1]>>4)&0x0f;
idx[1] = (p_sys->buffer[i_index+1])&0x0f;
/* Auto crop fullscreen subtitles */
if( p_spu->i_height > 250 )
- p_spu_data->b_auto_crop = VLC_TRUE;
+ p_spu_data->b_auto_crop = true;
i_index += 7;
break;
{
/* This subtitle will live for 5 seconds or until the next subtitle */
p_spu->i_stop = p_spu->i_start + (mtime_t)500 * 11000;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
}
/* Get rid of padding bytes */
unsigned int *pi_offset;
/* Cropping */
- vlc_bool_t b_empty_top = VLC_TRUE;
+ bool b_empty_top = true;
unsigned int i_skipped_top = 0, i_skipped_bottom = 0;
unsigned int i_transparent_code = 0;
}
else
{
- p_spu_data->b_auto_crop = VLC_FALSE;
+ p_spu_data->b_auto_crop = false;
}
}
*p_dest++ = i_code;
/* Valid code means no blank line */
- b_empty_top = VLC_FALSE;
+ b_empty_top = false;
i_skipped_bottom = 0;
}
}
p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) );
- p_sys->b_packetizer = VLC_FALSE;
+ p_sys->b_packetizer = false;
p_sys->i_spu_size = 0;
p_sys->i_spu = 0;
p_sys->p_block = NULL;
return VLC_EGENERIC;
}
p_dec->pf_packetize = Packetize;
- p_dec->p_sys->b_packetizer = VLC_TRUE;
+ p_dec->p_sys->b_packetizer = true;
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
p_dec->fmt_out.i_codec = VLC_FOURCC( 's','p','u',' ' );
void *p_data;
/* Color information */
- vlc_bool_t b_palette;
+ bool b_palette;
uint8_t pi_alpha[4];
uint8_t pi_yuv[4][3];
/* Auto crop fullscreen subtitles */
- vlc_bool_t b_auto_crop;
+ bool b_auto_crop;
int i_y_top_offset;
int i_y_bottom_offset;
p_sys->i_original_height = ( temp > 0 ) ? temp : -1;
else if( sscanf( psz_parser, "Script Type: %8192s", buffer_text ) == 1 )
{
- if( !strcasecmp( buffer_text, "V4.00+" ) ) p_sys->b_ass = VLC_TRUE;
+ if( !strcasecmp( buffer_text, "V4.00+" ) ) p_sys->b_ass = true;
}
else if( !strncasecmp( psz_parser, "[V4 Styles]", 11 ) )
i_section_type = 1;
else if( !strncasecmp( psz_parser, "[V4+ Styles]", 12) )
{
i_section_type = 2;
- p_sys->b_ass = VLC_TRUE;
+ p_sys->b_ass = true;
}
else if( !strncasecmp( psz_parser, "[Events]", 8 ) )
i_section_type = 4;
set_subcategory( SUBCAT_INPUT_SCODEC );
add_integer( "subsdec-align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_list( pi_justification, ppsz_justification_text, 0 );
add_string( "subsdec-encoding", DEFAULT_NAME, NULL,
- ENCODING_TEXT, ENCODING_LONGTEXT, VLC_FALSE );
+ ENCODING_TEXT, ENCODING_LONGTEXT, false );
change_string_list( ppsz_encodings, 0, 0 );
- add_bool( "subsdec-autodetect-utf8", VLC_TRUE, NULL,
- AUTODETECT_UTF8_TEXT, AUTODETECT_UTF8_LONGTEXT, VLC_FALSE );
- add_bool( "subsdec-formatted", VLC_TRUE, NULL, FORMAT_TEXT, FORMAT_LONGTEXT,
- VLC_FALSE );
+ add_bool( "subsdec-autodetect-utf8", true, NULL,
+ AUTODETECT_UTF8_TEXT, AUTODETECT_UTF8_LONGTEXT, false );
+ add_bool( "subsdec-formatted", true, NULL, FORMAT_TEXT, FORMAT_LONGTEXT,
+ false );
vlc_module_end();
/*****************************************************************************
memset( p_sys, 0, sizeof( *p_sys ) );
p_sys->i_align = 0;
p_sys->iconv_handle = (vlc_iconv_t)-1;
- p_sys->b_autodetect_utf8 = VLC_FALSE;
- p_sys->b_ass = VLC_FALSE;
+ p_sys->b_autodetect_utf8 = false;
+ p_sys->b_ass = false;
p_sys->i_original_height = -1;
p_sys->i_original_width = -1;
TAB_INIT( p_sys->i_ssa_styles, p_sys->pp_ssa_styles );
if (var_CreateGetBool (p_dec, "subsdec-autodetect-utf8"))
{
msg_Dbg (p_dec, "using automatic UTF-8 detection");
- p_sys->b_autodetect_utf8 = VLC_TRUE;
+ p_sys->b_autodetect_utf8 = true;
}
}
{
msg_Dbg( p_dec, "invalid UTF-8 sequence: "
"disabling UTF-8 subtitles autodetection" );
- p_sys->b_autodetect_utf8 = VLC_FALSE;
+ p_sys->b_autodetect_utf8 = false;
}
}
return NULL;
}
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_pausable = true;
/* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) );
p_spu->i_start = p_block->i_pts;
p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == 0);
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_absolute = false;
}
else
{
p_spu->i_start = p_block->i_pts;
p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == 0);
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_absolute = false;
p_spu->i_original_picture_width = p_sys->i_original_width;
p_spu->i_original_picture_height = p_sys->i_original_height;
}
}
else if( !strncmp( psz_subtitle, "</", 2 ))
{
- vlc_bool_t b_match = VLC_FALSE;
+ bool b_match = false;
int i_len = strlen( psz_tag ) - 1;
char *psz_lastTag = NULL;
*****************************************************************************/
struct decoder_sys_t
{
- vlc_bool_t b_ass; /* The subs are ASS */
+ bool b_ass; /* The subs are ASS */
int i_original_height;
int i_original_width;
int i_align; /* Subtitles alignment on the vout */
vlc_iconv_t iconv_handle; /* handle to iconv instance */
- vlc_bool_t b_autodetect_utf8;
+ bool b_autodetect_utf8;
ssa_style_t **pp_ssa_styles;
int i_ssa_styles;
}
/* Unused fields of p_sys - not needed for USF decoding */
- p_sys->b_ass = VLC_FALSE;
+ p_sys->b_ass = false;
p_sys->iconv_handle = (vlc_iconv_t)-1;
- p_sys->b_autodetect_utf8 = VLC_FALSE;
+ p_sys->b_autodetect_utf8 = false;
/* init of p_sys */
p_sys->i_align = 0;
return NULL;
}
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_pausable = true;
/* Decode USF strings */
p_spu->p_region = ParseUSFString( p_dec, psz_subtitle, p_spu );
p_spu->i_start = p_block->i_pts;
p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == 0);
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_absolute = false;
p_spu->i_original_picture_width = p_sys->i_original_width;
p_spu->i_original_picture_height = p_sys->i_original_height;
p_sub = stream_MemoryNew( VLC_OBJECT(p_dec),
p_dec->fmt_in.p_extra,
p_dec->fmt_in.i_extra,
- VLC_TRUE );
+ true );
if( !p_sub )
return;
set_callbacks( DecoderOpen, DecoderClose );
add_integer ( MODULE_STRING "-debug", 0, NULL,
- DEBUG_TEXT, DEBUG_LONGTEXT, VLC_TRUE );
+ DEBUG_TEXT, DEBUG_LONGTEXT, true );
add_submodule();
set_description( _("Philips OGT (SVCD subtitle) packetizer") );
p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL;
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_pausable = true;
p_spu->i_x = p_sys->i_x_start;
p_spu->i_y = p_sys->i_y_start;
p_spu->i_start = p_data->i_pts;
p_spu->i_stop = p_data->i_pts + p_sys->i_duration;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
/* Create new subtitle region */
memset( &fmt, 0, sizeof(video_format_t) );
set_callbacks( Open, Close );
add_integer( "telx-override-page", -1, NULL,
- OVERRIDE_PAGE_TEXT, OVERRIDE_PAGE_LONGTEXT, VLC_TRUE );
+ OVERRIDE_PAGE_TEXT, OVERRIDE_PAGE_LONGTEXT, true );
add_bool( "telx-ignore-subtitle-flag", 0, NULL,
- IGNORE_SUB_FLAG_TEXT, IGNORE_SUB_FLAG_LONGTEXT, VLC_TRUE );
+ IGNORE_SUB_FLAG_TEXT, IGNORE_SUB_FLAG_LONGTEXT, true );
add_bool( "telx-french-workaround", 0, NULL,
- FRENCH_WORKAROUND_TEXT, FRENCH_WORKAROUND_LONGTEXT, VLC_TRUE );
+ FRENCH_WORKAROUND_TEXT, FRENCH_WORKAROUND_LONGTEXT, true );
vlc_module_end();
struct decoder_sys_t
{
int i_align;
- vlc_bool_t b_is_subtitle[9];
+ bool b_is_subtitle[9];
char ppsz_lines[32][128];
char psz_prev_text[512];
mtime_t prev_pts;
int i_page[9];
- vlc_bool_t b_erase[9];
+ bool b_erase[9];
uint16_t * pi_active_national_set[9];
int i_wanted_page, i_wanted_magazine;
- vlc_bool_t b_ignore_sub_flag;
+ bool b_ignore_sub_flag;
};
/****************************************************************************
int i_wanted_page = 0x10 * ((i_conf_wanted_page % 100) / 10)
| (i_conf_wanted_page % 10);
#endif
- vlc_bool_t b_update = VLC_FALSE;
+ bool b_update = false;
char psz_text[512], *pt = psz_text;
char psz_line[256];
int i, total;
for ( i = 1; i < 32; i++ )
{
if ( !p_sys->ppsz_lines[i][0] ) continue;
- /* b_update = VLC_TRUE; */
+ /* b_update = true; */
p_sys->ppsz_lines[i][0] = 0;
}
}
strncpy( p_sys->ppsz_lines[row], psz_line,
sizeof(p_sys->ppsz_lines[row]) - 1);
}
- b_update = VLC_TRUE;
+ b_update = true;
}
else if ( row < 24 )
{
strncpy( p_sys->ppsz_lines[row], t,
sizeof(p_sys->ppsz_lines[row]) - 1 );
- b_update = VLC_TRUE;
+ b_update = true;
}
if (t[0])
{
strncpy( p_sys->ppsz_lines[0], psz_line,
sizeof(p_sys->ppsz_lines[0]) - 1 );
- /* b_update = VLC_TRUE; */
+ /* b_update = true; */
}
}
/* else if (row == 26) { */
p_spu->i_start = p_block->i_pts;
p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == 0);
- p_spu->b_absolute = VLC_FALSE;
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_absolute = false;
+ p_spu->b_pausable = true;
dbg((p_dec, "%ld --> %ld\n", (long int) p_block->i_pts/100000, (long int)p_block->i_length/100000));
block_Release( p_block );
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Input properties
/*
* Decoding properties
*/
- vlc_bool_t b_decoded_first_keyframe;
+ bool b_decoded_first_keyframe;
/*
* Common properties
# define ENC_CFG_PREFIX "sout-theora-"
add_integer( ENC_CFG_PREFIX "quality", 2, NULL, ENC_QUALITY_TEXT,
- ENC_QUALITY_LONGTEXT, VLC_FALSE );
+ ENC_QUALITY_LONGTEXT, false );
vlc_module_end();
static const char *ppsz_enc_options[] = {
msg_Err( p_dec, "out of memory" );
return VLC_EGENERIC;
}
- p_dec->p_sys->b_packetizer = VLC_FALSE;
+ p_dec->p_sys->b_packetizer = false;
p_sys->i_pts = 0;
- p_sys->b_decoded_first_keyframe = VLC_FALSE;
+ p_sys->b_decoded_first_keyframe = false;
/* Set output properties */
p_dec->fmt_out.i_cat = VIDEO_ES;
if( i_ret == VLC_SUCCESS )
{
- p_dec->p_sys->b_packetizer = VLC_TRUE;
+ p_dec->p_sys->b_packetizer = true;
p_dec->fmt_out.i_codec = VLC_FOURCC( 't', 'h', 'e', 'o' );
}
/* Check for keyframe */
if( !(p_oggpacket->packet[0] & 0x80) /* data packet */ &&
!(p_oggpacket->packet[0] & 0x40) /* intra frame */ )
- p_sys->b_decoded_first_keyframe = VLC_TRUE;
+ p_sys->b_decoded_first_keyframe = true;
/* If we haven't seen a single keyframe yet, don't let Theora decode
* anything, otherwise we'll get display artifacts. (This is impossible
/*
* Input properties
*/
- vlc_bool_t b_headers;
+ bool b_headers;
/*
* Theora properties
set_subcategory( SUBCAT_INPUT_ACODEC );
add_float( ENC_CFG_PREFIX "quality", 0.0, NULL, ENC_QUALITY_TEXT,
- ENC_QUALITY_LONGTEXT, VLC_FALSE );
+ ENC_QUALITY_LONGTEXT, false );
add_integer( ENC_CFG_PREFIX "mode", 0, NULL, ENC_MODE_TEXT,
- ENC_MODE_LONGTEXT, VLC_FALSE );
+ ENC_MODE_LONGTEXT, false );
change_integer_list( pi_stereo_values, ppsz_stereo_descriptions, 0 );
add_bool( ENC_CFG_PREFIX "vbr", 0, NULL, ENC_VBR_TEXT,
- ENC_VBR_LONGTEXT, VLC_FALSE );
+ ENC_VBR_LONGTEXT, false );
add_integer( ENC_CFG_PREFIX "psy", 3, NULL, ENC_PSY_TEXT,
- ENC_PSY_LONGTEXT, VLC_FALSE );
+ ENC_PSY_LONGTEXT, false );
vlc_module_end();
static const char *ppsz_enc_options[] = {
struct decoder_sys_t
{
/* Module mode */
- vlc_bool_t b_packetizer;
+ bool b_packetizer;
/*
* Input properties
static void ParseVorbisComments( decoder_t * );
-static void ConfigureChannelOrder(int *, int, uint32_t, vlc_bool_t );
+static void ConfigureChannelOrder(int *, int, uint32_t, bool );
#ifdef MODULE_NAME_IS_tremor
static void Interleave ( int32_t *, const int32_t **, int, int, int * );
#endif
add_integer( ENC_CFG_PREFIX "quality", 0, NULL, ENC_QUALITY_TEXT,
- ENC_QUALITY_LONGTEXT, VLC_FALSE );
+ ENC_QUALITY_LONGTEXT, false );
add_integer( ENC_CFG_PREFIX "max-bitrate", 0, NULL, ENC_MAXBR_TEXT,
- ENC_MAXBR_LONGTEXT, VLC_FALSE );
+ ENC_MAXBR_LONGTEXT, false );
add_integer( ENC_CFG_PREFIX "min-bitrate", 0, NULL, ENC_MINBR_TEXT,
- ENC_MINBR_LONGTEXT, VLC_FALSE );
+ ENC_MINBR_LONGTEXT, false );
add_bool( ENC_CFG_PREFIX "cbr", 0, NULL, ENC_CBR_TEXT,
- ENC_CBR_LONGTEXT, VLC_FALSE );
+ ENC_CBR_LONGTEXT, false );
#endif
vlc_module_end();
/* Misc init */
aout_DateSet( &p_sys->end_date, 0 );
p_sys->i_last_block_size = 0;
- p_sys->b_packetizer = VLC_FALSE;
+ p_sys->b_packetizer = false;
p_sys->i_headers = 0;
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
if( i_ret == VLC_SUCCESS )
{
- p_dec->p_sys->b_packetizer = VLC_TRUE;
+ p_dec->p_sys->b_packetizer = true;
p_dec->fmt_out.i_codec = VLC_FOURCC('v','o','r','b');
}
}
ConfigureChannelOrder(p_sys->pi_chan_table, p_sys->vi.channels,
- p_dec->fmt_out.audio.i_physical_channels, VLC_TRUE);
+ p_dec->fmt_out.audio.i_physical_channels, true);
return VLC_SUCCESS;
}
{
audio_replay_gain_t *r = &p_dec->fmt_out.audio_replay_gain;
- r->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+ r->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = true;
r->pf_gain[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( !strcasecmp( psz_name, "REPLAYGAIN_TRACK_PEAK" ) ||
{
audio_replay_gain_t *r = &p_dec->fmt_out.audio_replay_gain;
- r->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+ r->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = true;
r->pf_peak[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( !strcasecmp( psz_name, "REPLAYGAIN_ALBUM_GAIN" ) ||
{
audio_replay_gain_t *r = &p_dec->fmt_out.audio_replay_gain;
- r->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+ r->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = true;
r->pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
else if( !strcasecmp( psz_name, "REPLAYGAIN_ALBUM_PEAK" ) )
{
audio_replay_gain_t *r = &p_dec->fmt_out.audio_replay_gain;
- r->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+ r->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = true;
r->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
}
/*****************************************************************************
* Interleave: helper function to interleave channels
*****************************************************************************/
-static void ConfigureChannelOrder(int *pi_chan_table, int i_channels, uint32_t i_channel_mask, vlc_bool_t b_decode)
+static void ConfigureChannelOrder(int *pi_chan_table, int i_channels, uint32_t i_channel_mask, bool b_decode)
{
const uint32_t *pi_channels_in;
switch( i_channels )
p_sys->i_pts = 0;
ConfigureChannelOrder(p_sys->pi_chan_table, p_sys->vi.channels,
- p_enc->fmt_in.audio.i_physical_channels, VLC_TRUE);
+ p_enc->fmt_in.audio.i_physical_channels, true);
return VLC_SUCCESS;
}
/* Frame-type options */
add_integer( SOUT_CFG_PREFIX "keyint", 250, NULL, KEYINT_TEXT,
- KEYINT_LONGTEXT, VLC_FALSE );
+ KEYINT_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "min-keyint", 25, NULL, MIN_KEYINT_TEXT,
- MIN_KEYINT_LONGTEXT, VLC_FALSE );
+ MIN_KEYINT_LONGTEXT, false );
add_deprecated_alias( SOUT_CFG_PREFIX "keyint-min" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "scenecut", 40, NULL, SCENE_TEXT,
- SCENE_LONGTEXT, VLC_FALSE );
+ SCENE_LONGTEXT, false );
change_integer_range( -1, 100 );
#if X264_BUILD >= 55 /* r607 */
add_bool( SOUT_CFG_PREFIX "pre-scenecut", 0, NULL, PRESCENE_TEXT,
- PRESCENE_LONGTEXT, VLC_FALSE );
+ PRESCENE_LONGTEXT, false );
#endif
add_integer( SOUT_CFG_PREFIX "bframes", 0, NULL, BFRAMES_TEXT,
- BFRAMES_LONGTEXT, VLC_FALSE );
+ BFRAMES_LONGTEXT, false );
change_integer_range( 0, 16 );
#if X264_BUILD >= 0x0013 /* r137 */
add_bool( SOUT_CFG_PREFIX "b-adapt", 1, NULL, B_ADAPT_TEXT,
- B_ADAPT_LONGTEXT, VLC_FALSE );
+ B_ADAPT_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "b-bias", 0, NULL, B_BIAS_TEXT,
- B_BIAS_LONGTEXT, VLC_FALSE );
+ B_BIAS_LONGTEXT, false );
change_integer_range( -100, 100 );
#endif
add_bool( SOUT_CFG_PREFIX "bpyramid", 0, NULL, BPYRAMID_TEXT,
- BPYRAMID_LONGTEXT, VLC_FALSE );
+ BPYRAMID_LONGTEXT, false );
add_bool( SOUT_CFG_PREFIX "cabac", 1, NULL, CABAC_TEXT, CABAC_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( SOUT_CFG_PREFIX "ref", 1, NULL, REF_TEXT,
- REF_LONGTEXT, VLC_FALSE );
+ REF_LONGTEXT, false );
change_integer_range( 1, 16 );
add_deprecated_alias( SOUT_CFG_PREFIX "frameref" ); /* Deprecated since 0.8.5 */
add_bool( SOUT_CFG_PREFIX "nf", 0, NULL, NF_TEXT,
- NF_LONGTEXT, VLC_FALSE );
+ NF_LONGTEXT, false );
add_deprecated_alias( SOUT_CFG_PREFIX "loopfilter" ); /* Deprecated since 0.8.5 */
add_string( SOUT_CFG_PREFIX "deblock", "0:0", NULL, FILTER_TEXT,
- FILTER_LONGTEXT, VLC_FALSE );
+ FILTER_LONGTEXT, false );
add_deprecated_alias( SOUT_CFG_PREFIX "filter" ); /* Deprecated since 0.8.6 */
add_string( SOUT_CFG_PREFIX "level", "5.1", NULL, LEVEL_TEXT,
- LEVEL_LONGTEXT, VLC_FALSE );
+ LEVEL_LONGTEXT, false );
#if X264_BUILD >= 51 /* r570 */
add_bool( SOUT_CFG_PREFIX "interlaced", 0, NULL, INTERLACED_TEXT, INTERLACED_LONGTEXT,
- VLC_FALSE );
+ false );
#endif
/* Ratecontrol */
add_integer( SOUT_CFG_PREFIX "qp", 26, NULL, QP_TEXT, QP_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_range( 0, 51 ); /* QP 0 -> lossless encoding */
#if X264_BUILD >= 37 /* r334 */
add_integer( SOUT_CFG_PREFIX "crf", 0, NULL, CRF_TEXT,
- CRF_LONGTEXT, VLC_FALSE );
+ CRF_LONGTEXT, false );
change_integer_range( 0, 51 );
#endif
add_integer( SOUT_CFG_PREFIX "qpmin", 10, NULL, QPMIN_TEXT,
- QPMIN_LONGTEXT, VLC_FALSE );
+ QPMIN_LONGTEXT, false );
change_integer_range( 0, 51 );
add_deprecated_alias( SOUT_CFG_PREFIX "qp-min" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "qpmax", 51, NULL, QPMAX_TEXT,
- QPMAX_LONGTEXT, VLC_FALSE );
+ QPMAX_LONGTEXT, false );
change_integer_range( 0, 51 );
add_deprecated_alias( SOUT_CFG_PREFIX "qp-max" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "qpstep", 4, NULL, QPSTEP_TEXT,
- QPSTEP_LONGTEXT, VLC_FALSE );
+ QPSTEP_LONGTEXT, false );
change_integer_range( 0, 51 );
add_float( SOUT_CFG_PREFIX "ratetol", 1.0, NULL, RATETOL_TEXT,
- RATETOL_LONGTEXT, VLC_FALSE );
+ RATETOL_LONGTEXT, false );
change_float_range( 0, 100 );
add_deprecated_alias( SOUT_CFG_PREFIX "tolerance" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "vbv-maxrate", 0, NULL, VBV_MAXRATE_TEXT,
- VBV_MAXRATE_LONGTEXT, VLC_FALSE );
+ VBV_MAXRATE_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "vbv-bufsize", 0, NULL, VBV_BUFSIZE_TEXT,
- VBV_BUFSIZE_LONGTEXT, VLC_FALSE );
+ VBV_BUFSIZE_LONGTEXT, false );
add_float( SOUT_CFG_PREFIX "vbv-init", 0.9, NULL, VBV_INIT_TEXT,
- VBV_INIT_LONGTEXT, VLC_FALSE );
+ VBV_INIT_LONGTEXT, false );
change_float_range( 0, 1 );
add_float( SOUT_CFG_PREFIX "ipratio", 1.40, NULL, IPRATIO_TEXT,
- IPRATIO_LONGTEXT, VLC_FALSE );
+ IPRATIO_LONGTEXT, false );
change_float_range( 1, 2 );
add_float( SOUT_CFG_PREFIX "pbratio", 1.30, NULL, PBRATIO_TEXT,
- PBRATIO_LONGTEXT, VLC_FALSE );
+ PBRATIO_LONGTEXT, false );
change_float_range( 1, 2 );
#if X264_BUILD >= 23 /* r190 */
add_integer( SOUT_CFG_PREFIX "chroma-qp-offset", 0, NULL, CHROMA_QP_OFFSET_TEXT,
- CHROMA_QP_OFFSET_LONGTEXT, VLC_FALSE );
+ CHROMA_QP_OFFSET_LONGTEXT, false );
#endif
add_integer( SOUT_CFG_PREFIX "pass", 0, NULL, PASS_TEXT,
- PASS_LONGTEXT, VLC_FALSE );
+ PASS_LONGTEXT, false );
change_integer_range( 0, 3 );
add_float( SOUT_CFG_PREFIX "qcomp", 0.60, NULL, QCOMP_TEXT,
- QCOMP_LONGTEXT, VLC_FALSE );
+ QCOMP_LONGTEXT, false );
change_float_range( 0, 1 );
add_float( SOUT_CFG_PREFIX "cplxblur", 20.0, NULL, CPLXBLUR_TEXT,
- CPLXBLUR_LONGTEXT, VLC_FALSE );
+ CPLXBLUR_LONGTEXT, false );
add_float( SOUT_CFG_PREFIX "qblur", 0.5, NULL, QBLUR_TEXT,
- QBLUR_LONGTEXT, VLC_FALSE );
+ QBLUR_LONGTEXT, false );
#if X264_BUILD >= 59
add_integer( SOUT_CFG_PREFIX "aq-mode", 2, NULL, AQ_MODE_TEXT,
- AQ_MODE_LONGTEXT, VLC_FALSE );
+ AQ_MODE_LONGTEXT, false );
change_integer_range( 0, 2 );
add_float( SOUT_CFG_PREFIX "aq-strength", 1.0, NULL, AQ_STRENGTH_TEXT,
- AQ_STRENGTH_LONGTEXT, VLC_FALSE );
+ AQ_STRENGTH_LONGTEXT, false );
#endif
/* Analysis */
/* x264 partitions = none (default). set at least "normal" mode. */
add_string( SOUT_CFG_PREFIX "partitions", "normal", NULL, ANALYSE_TEXT,
- ANALYSE_LONGTEXT, VLC_FALSE );
+ ANALYSE_LONGTEXT, false );
change_string_list( enc_analyse_list, enc_analyse_list_text, 0 );
add_deprecated_alias( SOUT_CFG_PREFIX "analyse" ); /* Deprecated since 0.8.6 */
add_string( SOUT_CFG_PREFIX "direct", "spatial", NULL, DIRECT_PRED_TEXT,
- DIRECT_PRED_LONGTEXT, VLC_FALSE );
+ DIRECT_PRED_LONGTEXT, false );
change_string_list( direct_pred_list, direct_pred_list_text, 0 );
#if X264_BUILD >= 52 /* r573 */
add_integer( SOUT_CFG_PREFIX "direct-8x8", -1, NULL, DIRECT_PRED_SIZE_TEXT,
- DIRECT_PRED_SIZE_LONGTEXT, VLC_FALSE );
+ DIRECT_PRED_SIZE_LONGTEXT, false );
change_integer_range( -1, 1 );
#endif
#if X264_BUILD >= 0x0012 /* r134 */
add_bool( SOUT_CFG_PREFIX "weightb", 0, NULL, WEIGHTB_TEXT,
- WEIGHTB_LONGTEXT, VLC_FALSE );
+ WEIGHTB_LONGTEXT, false );
#endif
#if X264_BUILD >= 24 /* r221 */
add_string( SOUT_CFG_PREFIX "me", "hex", NULL, ME_TEXT,
- ME_LONGTEXT, VLC_FALSE );
+ ME_LONGTEXT, false );
change_string_list( enc_me_list, enc_me_list_text, 0 );
add_integer( SOUT_CFG_PREFIX "merange", 16, NULL, MERANGE_TEXT,
- MERANGE_LONGTEXT, VLC_FALSE );
+ MERANGE_LONGTEXT, false );
change_integer_range( 1, 64 );
#endif
add_integer( SOUT_CFG_PREFIX "mvrange", -1, NULL, MVRANGE_TEXT,
- MVRANGE_LONGTEXT, VLC_FALSE );
+ MVRANGE_LONGTEXT, false );
#if X264_BUILD >= 55 /* r607 */
add_integer( SOUT_CFG_PREFIX "mvrange-thread", -1, NULL, MVRANGE_THREAD_TEXT,
- MVRANGE_THREAD_LONGTEXT, VLC_FALSE );
+ MVRANGE_THREAD_LONGTEXT, false );
#endif
add_integer( SOUT_CFG_PREFIX "subme", 5, NULL, SUBME_TEXT,
- SUBME_LONGTEXT, VLC_FALSE );
+ SUBME_LONGTEXT, false );
change_integer_range( 1, SUBME_MAX );
add_deprecated_alias( SOUT_CFG_PREFIX "subpel" ); /* Deprecated since 0.8.5 */
#if X264_BUILD >= 41 /* r368 */
add_bool( SOUT_CFG_PREFIX "b-rdo", 0, NULL, B_RDO_TEXT,
- B_RDO_LONGTEXT, VLC_FALSE );
+ B_RDO_LONGTEXT, false );
#endif
#if X264_BUILD >= 36 /* r318 */
add_bool( SOUT_CFG_PREFIX "mixed-refs", 0, NULL, MIXED_REFS_TEXT,
- MIXED_REFS_LONGTEXT, VLC_FALSE );
+ MIXED_REFS_LONGTEXT, false );
#endif
#if X264_BUILD >= 23 /* r171 */
add_bool( SOUT_CFG_PREFIX "chroma-me", 1, NULL, CHROMA_ME_TEXT,
- CHROMA_ME_LONGTEXT, VLC_FALSE );
+ CHROMA_ME_LONGTEXT, false );
#endif
#if X264_BUILD >= 43 /* r390 */
add_bool( SOUT_CFG_PREFIX "bime", 0, NULL, BIME_TEXT,
- BIME_LONGTEXT, VLC_FALSE );
+ BIME_LONGTEXT, false );
#endif
#if X264_BUILD >= 30 /* r251 */
add_bool( SOUT_CFG_PREFIX "8x8dct", 0, NULL, TRANSFORM_8X8DCT_TEXT,
- TRANSFORM_8X8DCT_LONGTEXT, VLC_FALSE );
+ TRANSFORM_8X8DCT_LONGTEXT, false );
#endif
#if X264_BUILD >= 39 /* r360 */
add_integer( SOUT_CFG_PREFIX "trellis", 0, NULL, TRELLIS_TEXT,
- TRELLIS_LONGTEXT, VLC_FALSE );
+ TRELLIS_LONGTEXT, false );
change_integer_range( 0, 2 );
#endif
#if X264_BUILD >= 42 /* r384 */
add_bool( SOUT_CFG_PREFIX "fast-pskip", 1, NULL, FAST_PSKIP_TEXT,
- FAST_PSKIP_LONGTEXT, VLC_FALSE );
+ FAST_PSKIP_LONGTEXT, false );
#endif
#if X264_BUILD >= 46 /* r503 */
add_bool( SOUT_CFG_PREFIX "dct-decimate", 1, NULL, DCT_DECIMATE_TEXT,
- DCT_DECIMATE_LONGTEXT, VLC_FALSE );
+ DCT_DECIMATE_LONGTEXT, false );
#endif
#if X264_BUILD >= 44 /* r398 */
add_integer( SOUT_CFG_PREFIX "nr", 0, NULL, NR_TEXT,
- NR_LONGTEXT, VLC_FALSE );
+ NR_LONGTEXT, false );
change_integer_range( 0, 1000 );
#endif
#if X264_BUILD >= 52 /* r573 */
add_integer( SOUT_CFG_PREFIX "deadzone-inter", 21, NULL, DEADZONE_INTER_TEXT,
- DEADZONE_INTRA_LONGTEXT, VLC_FALSE );
+ DEADZONE_INTRA_LONGTEXT, false );
change_integer_range( 0, 32 );
add_integer( SOUT_CFG_PREFIX "deadzone-intra", 11, NULL, DEADZONE_INTRA_TEXT,
- DEADZONE_INTRA_LONGTEXT, VLC_FALSE );
+ DEADZONE_INTRA_LONGTEXT, false );
change_integer_range( 0, 32 );
#endif
#if X264_BUILD >= 55 /* r607 */
add_bool( SOUT_CFG_PREFIX "non-deterministic", 0, NULL, NON_DETERMINISTIC_TEXT,
- NON_DETERMINISTIC_LONGTEXT, VLC_FALSE );
+ NON_DETERMINISTIC_LONGTEXT, false );
#endif
add_bool( SOUT_CFG_PREFIX "asm", 1, NULL, ASM_TEXT,
- ASM_LONGTEXT, VLC_FALSE );
+ ASM_LONGTEXT, false );
/* x264 psnr = 1 (default). disable PSNR computation for speed. */
add_bool( SOUT_CFG_PREFIX "psnr", 0, NULL, PSNR_TEXT,
- PSNR_LONGTEXT, VLC_FALSE );
+ PSNR_LONGTEXT, false );
#if X264_BUILD >= 50 /* r554 */
/* x264 ssim = 1 (default). disable SSIM computation for speed. */
add_bool( SOUT_CFG_PREFIX "ssim", 0, NULL, SSIM_TEXT,
- SSIM_LONGTEXT, VLC_FALSE );
+ SSIM_LONGTEXT, false );
#endif
add_bool( SOUT_CFG_PREFIX "quiet", 0, NULL, QUIET_TEXT,
- QUIET_LONGTEXT, VLC_FALSE );
+ QUIET_LONGTEXT, false );
#if X264_BUILD >= 47 /* r518 */
add_integer( SOUT_CFG_PREFIX "sps-id", 0, NULL, SPS_ID_TEXT,
- SPS_ID_LONGTEXT, VLC_FALSE );
+ SPS_ID_LONGTEXT, false );
#endif
add_bool( SOUT_CFG_PREFIX "aud", 0, NULL, AUD_TEXT,
- AUD_LONGTEXT, VLC_FALSE );
+ AUD_LONGTEXT, false );
#if X264_BUILD >= 0x000e /* r81 */
add_bool( SOUT_CFG_PREFIX "verbose", 0, NULL, VERBOSE_TEXT,
- VERBOSE_LONGTEXT, VLC_FALSE );
+ VERBOSE_LONGTEXT, false );
#endif
add_string( SOUT_CFG_PREFIX "stats", "x264_2pass.log", NULL, STATS_TEXT,
- STATS_LONGTEXT, VLC_FALSE );
+ STATS_LONGTEXT, false );
vlc_module_end();
*/
mpeg2dec_t *p_mpeg2dec;
const mpeg2_info_t *p_info;
- vlc_bool_t b_skip;
+ bool b_skip;
/*
* Input properties
mtime_t i_current_dts;
int i_current_rate;
picture_t * p_picture_to_destroy;
- vlc_bool_t b_garbage_pic;
- vlc_bool_t b_after_sequence_header; /* is it the next frame after
+ bool b_garbage_pic;
+ bool b_after_sequence_header; /* is it the next frame after
* the sequence header ? */
- vlc_bool_t b_slice_i; /* intra-slice refresh stream */
+ bool b_slice_i; /* intra-slice refresh stream */
/*
* Output properties
p_dec->pf_picture_unlink( p_dec, p_sys->p_info->discard_fbuf->id );
}
/* For still frames */
- //if( state == STATE_END && p_pic ) p_pic->b_force = VLC_TRUE;
+ //if( state == STATE_END && p_pic ) p_pic->b_force = true;
if( p_pic )
{
set_callbacks( Open, Close );
add_integer( "vbi-page", 100, NULL,
- PAGE_TEXT, PAGE_LONGTEXT, VLC_FALSE );
- add_bool( "vbi-opaque", VLC_TRUE, NULL,
- OPAQUE_TEXT, OPAQUE_LONGTEXT, VLC_FALSE );
- add_integer( "vbi-position", 4, NULL, POS_TEXT, POS_LONGTEXT, VLC_FALSE );
+ PAGE_TEXT, PAGE_LONGTEXT, false );
+ add_bool( "vbi-opaque", true, NULL,
+ OPAQUE_TEXT, OPAQUE_LONGTEXT, false );
+ add_integer( "vbi-position", 4, NULL, POS_TEXT, POS_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
- add_bool( "vbi-text", VLC_FALSE, NULL,
- TELX_TEXT, TELX_LONGTEXT, VLC_FALSE );
+ add_bool( "vbi-text", false, NULL,
+ TELX_TEXT, TELX_LONGTEXT, false );
vlc_module_end();
/****************************************************************************
vbi_dvb_demux * p_dvb_demux;
unsigned int i_wanted_page;
unsigned int i_last_page;
- vlc_bool_t b_update;
- vlc_bool_t b_opaque;
+ bool b_update;
+ bool b_opaque;
/* Subtitles as text */
- vlc_bool_t b_text;
+ bool b_text;
/* Positioning of Teletext images */
int i_align;
}
#endif
- p_sys->b_update = VLC_FALSE;
+ p_sys->b_update = false;
p_sys->p_vbi_dec = vbi_decoder_new();
p_sys->p_dvb_demux = vbi_dvb_pes_demux_new( NULL, NULL );
block_t *p_block;
subpicture_t *p_spu = NULL;
video_format_t fmt;
- vlc_bool_t b_cached = VLC_FALSE;
+ bool b_cached = false;
vbi_page p_page;
const uint8_t *p_pos;
unsigned int i_left;
goto error;
if( ( p_sys->i_wanted_page == p_sys->i_last_page ) &&
- ( p_sys->b_update != VLC_TRUE ) )
+ ( p_sys->b_update != true ) )
goto error;
- p_sys->b_update = VLC_FALSE;
+ p_sys->b_update = false;
p_sys->i_last_page = p_sys->i_wanted_page;
#if 0
msg_Dbg( p_dec, "we now have page: %d ready for display",
p_spu->i_start = (mtime_t) p_block->i_dts;
p_spu->i_stop = (mtime_t) 0;
- p_spu->b_ephemer = VLC_TRUE;
- p_spu->b_absolute = VLC_FALSE;
- p_spu->b_pausable = VLC_TRUE;
+ p_spu->b_ephemer = true;
+ p_spu->b_absolute = false;
+ p_spu->b_pausable = true;
p_spu->i_width = fmt.i_width;
p_spu->i_height = fmt.i_height;
p_spu->i_original_picture_width = p_page.columns * 12;
ev->ev.ttx_page.subno & 0xFF);
*/
if( p_sys->i_last_page == vbi_bcd2dec( ev->ev.ttx_page.pgno ) )
- p_sys->b_update = VLC_TRUE;
+ p_sys->b_update = true;
if( ev->ev.ttx_page.clock_update )
msg_Dbg( p_dec, "clock" );
*p_begin = 0;
break;
/* To make the boxed text "closed captioning" transparent
- * change VLC_TRUE to VLC_FALSE.
+ * change true to false.
*/
case VBI_OPAQUE:
if( p_sys->b_opaque )
*p_begin = 0;
break;
/* To make the boxed text "closed captioning" transparent
- * change VLC_TRUE to VLC_FALSE.
+ * change true to false.
*/
case VBI_OPAQUE:
if( p_sys->b_opaque )
vlc_value_t, void * );
static int GetInputMeta ( input_item_t *, DBusMessageIter * );
-static int MarshalStatus ( intf_thread_t *, DBusMessageIter *, vlc_bool_t );
-static int UpdateCaps( intf_thread_t*, vlc_bool_t );
+static int MarshalStatus ( intf_thread_t *, DBusMessageIter *, bool );
+static int UpdateCaps( intf_thread_t*, bool );
/* GetCaps() capabilities */
enum
struct intf_sys_t
{
DBusConnection *p_conn;
- vlc_bool_t b_meta_read;
+ bool b_meta_read;
dbus_int32_t i_caps;
};
REPLY_INIT;
OUT_ARGUMENTS;
- MarshalStatus( p_this, &args, VLC_TRUE );
+ MarshalStatus( p_this, &args, true );
REPLY_SEND;
}
p_playlist = pl_Yield( (vlc_object_t*) p_this );
playlist_Add( p_playlist, psz_mrl, NULL, PLAYLIST_APPEND |
( ( b_play == TRUE ) ? PLAYLIST_GO : 0 ) ,
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
pl_Release( p_playlist );
REPLY_SEND;
{
playlist_DeleteFromInput( p_playlist,
p_playlist->items.p_elems[i_position*2-1]->i_id,
- VLC_FALSE );
+ false );
}
pl_Release( p_playlist );
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- val.b_bool = ( b_loop == TRUE ) ? VLC_TRUE : VLC_FALSE ;
+ val.b_bool = ( b_loop == TRUE ) ? true : false ;
p_playlist = pl_Yield( (vlc_object_t*) p_this );
var_Set ( p_playlist, "loop", val );
pl_Release( ((vlc_object_t*) p_this) );
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- val.b_bool = ( b_repeat == TRUE ) ? VLC_TRUE : VLC_FALSE ;
+ val.b_bool = ( b_repeat == TRUE ) ? true : false ;
p_playlist = pl_Yield( (vlc_object_t*) p_this );
var_Set ( p_playlist, "repeat", val );
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- val.b_bool = ( b_random == TRUE ) ? VLC_TRUE : VLC_FALSE ;
+ val.b_bool = ( b_random == TRUE ) ? true : false ;
p_playlist = pl_Yield( (vlc_object_t*) p_this );
var_Set ( p_playlist, "random", val );
if( !p_sys )
return VLC_ENOMEM;
- p_sys->b_meta_read = VLC_FALSE;
+ p_sys->b_meta_read = false;
p_sys->i_caps = CAPS_NONE;
dbus_error_init( &error );
p_intf->p_sys = p_sys;
p_sys->p_conn = p_conn;
- UpdateCaps( p_intf, VLC_FALSE );
+ UpdateCaps( p_intf, false );
return VLC_SUCCESS;
}
playlist_t *p_playlist = pl_Yield( p_intf );;
input_thread_t *p_input;
- p_this->b_dead = VLC_TRUE;
+ p_this->b_dead = true;
PL_LOCK;
var_DelCallback( p_playlist, "playlist-current", TrackChange, p_intf );
playlist_t *p_playlist = (playlist_t*)p_this;
playlist_add_t *p_add = newval.p_address;
playlist_item_t *p_item;
- p_item = playlist_ItemGetById( p_playlist, p_add->i_node, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_add->i_node, true );
assert( p_item );
while( p_item->p_parent )
p_item = p_item->p_parent;
if( p_intf->b_dead )
return VLC_SUCCESS;
- UpdateCaps( p_intf, VLC_TRUE );
+ UpdateCaps( p_intf, true );
TrackListChangeSignal( p_intf->p_sys->p_conn, p_data );
return VLC_SUCCESS;
}
/* we're called from a callback of input_thread_t, so it can not be
* destroyed before we return */
- MarshalStatus( (intf_thread_t*) p_data, &args, VLC_FALSE );
+ MarshalStatus( (intf_thread_t*) p_data, &args, false );
SIGNAL_SEND;
}
if( p_intf->b_dead )
return VLC_SUCCESS;
- UpdateCaps( p_intf, VLC_FALSE );
+ UpdateCaps( p_intf, false );
if( !p_sys->b_meta_read && newval.i_int == PLAYING_S )
{
input_item_t *p_item = input_GetItem( (input_thread_t*)p_this );
if( p_item )
{
- p_sys->b_meta_read = VLC_TRUE;
+ p_sys->b_meta_read = true;
TrackChangeSignal( p_sys->p_conn, p_item );
}
}
if( p_intf->b_dead )
return VLC_SUCCESS;
- UpdateCaps( p_intf, VLC_FALSE );
+ UpdateCaps( p_intf, false );
StatusChangeSignal( p_intf->p_sys->p_conn, p_data );
return VLC_SUCCESS;
}
if( p_intf->b_dead )
return VLC_SUCCESS;
- p_sys->b_meta_read = VLC_FALSE;
+ p_sys->b_meta_read = false;
p_playlist = pl_Yield( p_intf );
PL_LOCK;
if( input_item_IsPreparsed( p_item ) )
{
- p_sys->b_meta_read = VLC_TRUE;
+ p_sys->b_meta_read = true;
TrackChangeSignal( p_sys->p_conn, p_item );
}
/*****************************************************************************
* UpdateCaps: update p_sys->i_caps
****************************************************************************/
-static int UpdateCaps( intf_thread_t* p_intf, vlc_bool_t b_playlist_locked )
+static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked )
{
intf_sys_t* p_sys = p_intf->p_sys;
dbus_int32_t i_caps = CAPS_CAN_HAS_TRACKLIST;
*****************************************************************************/
static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args,
- vlc_bool_t lock )
+ bool lock )
{ /* This is NOT the right way to do that, it would be better to sore
the status information in p_sys and update it on change, thus
avoiding a long lock */
struct intf_sys_t
{
vlc_object_t * p_vout;
- vlc_bool_t b_got_gesture;
- vlc_bool_t b_button_pressed;
+ bool b_got_gesture;
+ bool b_button_pressed;
int i_mouse_x, i_mouse_y;
int i_last_x, i_last_y;
unsigned int i_pattern;
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_CONTROL );
add_integer( "gestures-threshold", 30, NULL,
- THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE );
+ THRESHOLD_TEXT, THRESHOLD_LONGTEXT, true );
add_string( "gestures-button", "right", NULL,
- BUTTON_TEXT, BUTTON_LONGTEXT, VLC_FALSE );
+ BUTTON_TEXT, BUTTON_LONGTEXT, false );
change_string_list( button_list, button_list_text, 0 );
set_description( _("Mouse gestures control interface") );
}
p_intf->p_sys->i_num_gestures = 0;
p_intf->p_sys->i_pattern = 0;
- p_intf->p_sys->b_got_gesture = VLC_FALSE;
+ p_intf->p_sys->b_got_gesture = false;
}
/*
* during those operations */
vlc_mutex_lock( &p_intf->change_lock );
- p_intf->p_sys->b_got_gesture = VLC_FALSE;
- p_intf->p_sys->b_button_pressed = VLC_FALSE;
+ p_intf->p_sys->b_got_gesture = false;
+ p_intf->p_sys->b_button_pressed = false;
p_intf->p_sys->i_threshold =
config_GetInt( p_intf, "gestures-threshold" );
psz_button = config_GetPsz( p_intf, "gestures-button" );
&& newval.i_int & p_intf->p_sys->i_button_mask
&& !p_intf->p_sys->b_button_pressed )
{
- p_intf->p_sys->b_button_pressed = VLC_TRUE;
+ p_intf->p_sys->b_button_pressed = true;
var_Get( p_intf->p_sys->p_vout, "mouse-x", &val );
p_intf->p_sys->i_last_x = val.i_int;
var_Get( p_intf->p_sys->p_vout, "mouse-y", &val );
&& !( newval.i_int & p_intf->p_sys->i_button_mask )
&& p_intf->p_sys->b_button_pressed )
{
- p_intf->p_sys->b_button_pressed = VLC_FALSE;
- p_intf->p_sys->b_got_gesture = VLC_TRUE;
+ p_intf->p_sys->b_button_pressed = false;
+ p_intf->p_sys->b_got_gesture = true;
}
vlc_mutex_unlock( &p_intf->change_lock );
}
/* Interface showing */
else if( i_action == ACTIONID_INTF_SHOW )
- var_SetBool( p_playlist, "intf-show", VLC_TRUE );
+ var_SetBool( p_playlist, "intf-show", true );
else if( i_action == ACTIONID_INTF_HIDE )
- var_SetBool( p_playlist, "intf-show", VLC_FALSE );
+ var_SetBool( p_playlist, "intf-show", false );
/* Video Output actions */
else if( i_action == ACTIONID_SNAPSHOT )
{
{
if( p_vout && var_GetBool( p_vout, "fullscreen" ) )
{
- var_SetBool( p_vout, "fullscreen", VLC_FALSE );
+ var_SetBool( p_vout, "fullscreen", false );
}
}
else if( i_action == ACTIONID_ZOOM_QUARTER ||
vlc_value_t val2;
var_Get( p_playlist, "loop", &val );
var_Get( p_playlist, "repeat", &val2 );
- if( val2.b_bool == VLC_TRUE )
+ if( val2.b_bool == true )
{
- val.b_bool = VLC_FALSE;
- val2.b_bool = VLC_FALSE;
+ val.b_bool = false;
+ val2.b_bool = false;
}
- else if( val.b_bool == VLC_TRUE )
+ else if( val.b_bool == true )
{
- val.b_bool = VLC_FALSE;
- val2.b_bool = VLC_TRUE;
+ val.b_bool = false;
+ val2.b_bool = true;
}
else
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
}
var_Set( p_playlist, "loop", val );
var_Set( p_playlist, "repeat", val2 );
* How to get a valid value ?
* That's not that easy with some special stream
*/
- vlc_bool_t b_seekable = VLC_TRUE;
+ bool b_seekable = true;
int i_interval =0;
if( i_action == ACTIONID_PAUSE )
if( !strcmp( psz_bookmark, psz_uri ) )
{
free( psz_uri );
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
NULL, p_item );
break;
}
set_description( _("HTTP remote control interface") );
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
- add_string ( "http-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE );
- add_string ( "http-src", NULL, NULL, SRC_TEXT, SRC_LONGTEXT, VLC_TRUE );
+ add_string ( "http-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT, true );
+ add_string ( "http-src", NULL, NULL, SRC_TEXT, SRC_LONGTEXT, true );
add_obsolete_string ( "http-charset" );
#if defined( HAVE_FORK ) || defined( WIN32 )
- add_string ( "http-handlers", NULL, NULL, HANDLERS_TEXT, HANDLERS_LONGTEXT, VLC_TRUE );
+ add_string ( "http-handlers", NULL, NULL, HANDLERS_TEXT, HANDLERS_LONGTEXT, true );
#endif
- add_bool ( "http-album-art", VLC_FALSE, NULL, ART_TEXT, ART_LONGTEXT, VLC_TRUE );
+ add_bool ( "http-album-art", false, NULL, ART_TEXT, ART_LONGTEXT, true );
set_section( N_("HTTP SSL" ), 0 );
- add_string ( "http-intf-cert", NULL, NULL, CERT_TEXT, CERT_LONGTEXT, VLC_TRUE );
- add_string ( "http-intf-key", NULL, NULL, KEY_TEXT, KEY_LONGTEXT, VLC_TRUE );
- add_string ( "http-intf-ca", NULL, NULL, CA_TEXT, CA_LONGTEXT, VLC_TRUE );
- add_string ( "http-intf-crl", NULL, NULL, CRL_TEXT, CRL_LONGTEXT, VLC_TRUE );
+ add_string ( "http-intf-cert", NULL, NULL, CERT_TEXT, CERT_LONGTEXT, true );
+ add_string ( "http-intf-key", NULL, NULL, KEY_TEXT, KEY_LONGTEXT, true );
+ add_string ( "http-intf-ca", NULL, NULL, CA_TEXT, CA_LONGTEXT, true );
+ add_string ( "http-intf-crl", NULL, NULL, CRL_TEXT, CRL_LONGTEXT, true );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
vlc_module_end();
if( i_id )
{
playlist_item_t *p_pl_item = playlist_ItemGetById( p_sys->p_playlist,
- i_id, VLC_FALSE );
+ i_id, false );
if( p_pl_item )
p_item = p_pl_item->p_input;
}
/** This function loads a file into a buffer */
int E_(FileLoad)( FILE *f, char **pp_data, int *pi_data );
/** This function creates a suitable URL for a filename */
-char *E_(FileToUrl)( char *name, vlc_bool_t *pb_index );
+char *E_(FileToUrl)( char *name, bool *pb_index );
/** This function returns the real path of a file or directory */
char *E_(RealPath)( intf_thread_t *p_intf, const char *psz_src );
char *file;
char *name;
- vlc_bool_t b_html, b_handler;
+ bool b_html, b_handler;
/* inited for each access */
rpn_stack_t stack;
break;
}
playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY,
- VLC_TRUE, NULL,
+ true, NULL,
playlist_ItemGetById( p_sys->p_playlist,
- i_item, VLC_TRUE ) );
+ i_item, true ) );
msg_Dbg( p_intf, "requested playlist item: %i", i_item );
break;
}
case MVLC_STOP:
playlist_Control( p_sys->p_playlist, PLAYLIST_STOP,
- VLC_TRUE );
+ true );
msg_Dbg( p_intf, "requested playlist stop" );
break;
case MVLC_PAUSE:
playlist_Control( p_sys->p_playlist, PLAYLIST_PAUSE,
- VLC_TRUE );
+ true );
msg_Dbg( p_intf, "requested playlist pause" );
break;
case MVLC_NEXT:
playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP,
- VLC_TRUE, 1 );
+ true, 1 );
msg_Dbg( p_intf, "requested playlist next" );
break;
case MVLC_PREVIOUS:
playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP,
- VLC_TRUE, -1 );
+ true, -1 );
msg_Dbg( p_intf, "requested playlist previous" );
break;
case MVLC_FULLSCREEN:
{
int i_ret = playlist_AddInput( p_sys->p_playlist,
p_input,
- PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE,
- VLC_FALSE);
+ PLAYLIST_APPEND, PLAYLIST_END, true,
+ false);
vlc_gc_decref( p_input );
if( i_ret == VLC_SUCCESS )
msg_Dbg( p_intf, "requested mrl add: %s", mrl );
for( i = 0; i < i_nb_items; i++ )
{
playlist_DeleteFromInput( p_sys->p_playlist,
- p_items[i], VLC_FALSE );
+ p_items[i], false );
msg_Dbg( p_intf, "requested playlist delete: %d",
p_items[i] );
p_items[i] = -1;
{
playlist_DeleteFromInput( p_sys->p_playlist,
p_sys->p_playlist->items.p_elems[i]->i_id,
- VLC_FALSE );
+ false );
msg_Dbg( p_intf, "requested playlist delete: %d",
i );
}
}
case MVLC_EMPTY:
{
- playlist_Clear( p_sys->p_playlist, VLC_FALSE );
+ playlist_Clear( p_sys->p_playlist, false );
msg_Dbg( p_intf, "requested playlist empty" );
break;
}
}
static
-char *MacroSearch( char *src, char *end, int i_mvlc, vlc_bool_t b_after )
+char *MacroSearch( char *src, char *end, int i_mvlc, bool b_after )
{
int i_id;
int i_level = 0;
}
case MVLC_IF:
{
- vlc_bool_t i_test;
+ bool i_test;
char *endif;
E_(EvaluateRPN)( p_intf, p_args->vars, &p_args->stack, m.param1 );
{
i_test = 0;
}
- endif = MacroSearch( src, end, MVLC_END, VLC_TRUE );
+ endif = MacroSearch( src, end, MVLC_END, true );
if( i_test == 0 )
{
- char *start = MacroSearch( src, endif, MVLC_ELSE, VLC_TRUE );
+ char *start = MacroSearch( src, endif, MVLC_ELSE, true );
if( start )
{
- char *stop = MacroSearch( start, endif, MVLC_END, VLC_FALSE );
+ char *stop = MacroSearch( start, endif, MVLC_END, false );
if( stop )
{
E_(Execute)( p_args, p_request, i_request,
else if( i_test == 1 )
{
char *stop;
- if( ( stop = MacroSearch( src, endif, MVLC_ELSE, VLC_FALSE ) ) == NULL )
+ if( ( stop = MacroSearch( src, endif, MVLC_ELSE, false ) ) == NULL )
{
- stop = MacroSearch( src, endif, MVLC_END, VLC_FALSE );
+ stop = MacroSearch( src, endif, MVLC_END, false );
}
if( stop )
{
}
case MVLC_FOREACH:
{
- char *endfor = MacroSearch( src, end, MVLC_END, VLC_TRUE );
+ char *endfor = MacroSearch( src, end, MVLC_END, true );
char *start = src;
- char *stop = MacroSearch( src, end, MVLC_END, VLC_FALSE );
+ char *stop = MacroSearch( src, end, MVLC_END, false );
if( stop )
{
{
mvar_t *sd = E_(mvar_New)( "sd", module_GetObjName( p_parser ) );
E_(mvar_AppendNewVar)( sd, "name",
- module_GetName( p_parser, VLC_TRUE ) );
+ module_GetName( p_parser, true ) );
E_(mvar_AppendVar)( s, sd );
}
}
return s;
}
-void E_(mvar_VlmSetNewLoop)( char *name, vlm_t *vlm, mvar_t *s, vlm_message_t *el, vlc_bool_t b_name );
-void E_(mvar_VlmSetNewLoop)( char *name, vlm_t *vlm, mvar_t *s, vlm_message_t *el, vlc_bool_t b_name )
+void E_(mvar_VlmSetNewLoop)( char *name, vlm_t *vlm, mvar_t *s, vlm_message_t *el, bool b_name );
+void E_(mvar_VlmSetNewLoop)( char *name, vlm_t *vlm, mvar_t *s, vlm_message_t *el, bool b_name )
{
/* Over name */
mvar_t *set;
/* Add a node with name and info */
set = E_(mvar_New)( name, "set" );
- if( b_name == VLC_TRUE )
+ if( b_name == true )
{
E_(mvar_AppendNewVar)( set, "name", el->psz_name );
}
vlm_message_t *ch = el->child[k];
if( ch->i_child > 0 )
{
- E_(mvar_VlmSetNewLoop)( ch->psz_name, vlm, set, ch, VLC_FALSE );
+ E_(mvar_VlmSetNewLoop)( ch->psz_name, vlm, set, ch, false );
}
else
{
continue;
desc = inf->child[0];
- E_(mvar_VlmSetNewLoop)( el->psz_name, vlm, s, desc, VLC_TRUE );
+ E_(mvar_VlmSetNewLoop)( el->psz_name, vlm, s, desc, true );
vlm_MessageDelete( inf );
}
static vlc_object_t *GetVLCObject( intf_thread_t *p_intf,
const char *psz_object,
- vlc_bool_t *pb_need_release )
+ bool *pb_need_release )
{
intf_sys_t *p_sys = p_intf->p_sys;
int i_object_type = 0;
vlc_object_t *p_object = NULL;
- *pb_need_release = VLC_FALSE;
+ *pb_need_release = false;
if( !strcmp( psz_object, "VLC_OBJECT_LIBVLC" ) )
p_object = VLC_OBJECT(p_intf->p_libvlc);
if( p_object == NULL && i_object_type )
{
- *pb_need_release = VLC_TRUE;
+ *pb_need_release = true;
p_object = vlc_object_find( p_intf, i_object_type, FIND_ANYWHERE );
}
int i_ret;
i_ret = playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY,
- VLC_TRUE, NULL,
+ true, NULL,
playlist_ItemGetById( p_sys->p_playlist,
- i_id, VLC_TRUE ) );
+ i_id, true ) );
msg_Dbg( p_intf, "requested playlist item: %i", i_id );
E_(SSPushN)( st, i_ret );
}
else if( !strcmp( s, "vlc_stop" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_STOP, VLC_TRUE );
+ playlist_Control( p_sys->p_playlist, PLAYLIST_STOP, true );
msg_Dbg( p_intf, "requested playlist stop" );
}
else if( !strcmp( s, "vlc_pause" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_PAUSE, VLC_TRUE );
+ playlist_Control( p_sys->p_playlist, PLAYLIST_PAUSE, true );
msg_Dbg( p_intf, "requested playlist pause" );
}
else if( !strcmp( s, "vlc_next" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP, VLC_TRUE, 1 );
+ playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP, true, 1 );
msg_Dbg( p_intf, "requested playlist next" );
}
else if( !strcmp( s, "vlc_previous" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP, VLC_TRUE, -1 );
+ playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP, true, -1 );
msg_Dbg( p_intf, "requested playlist previous" );
}
else if( !strcmp( s, "vlc_seek" ) )
{
char *psz_object = E_(SSPop)( st );
char *psz_variable = E_(SSPop)( st );
- vlc_bool_t b_need_release;
+ bool b_need_release;
p_object = GetVLCObject( p_intf, psz_object, &b_need_release );
{
char *psz_object = E_(SSPop)( st );
char *psz_variable = E_(SSPop)( st );
- vlc_bool_t b_need_release;
+ bool b_need_release;
vlc_object_t *p_object = GetVLCObject( p_intf, psz_object,
&b_need_release );
if( p_object != NULL )
{
- vlc_bool_t b_error = VLC_FALSE;
+ bool b_error = false;
char *psz_value = NULL;
vlc_value_t val;
int i_type;
E_(SSPopN)( st, vars );
msg_Warn( p_intf, "invalid %s variable type %d (%s)",
psz_object, i_type & VLC_VAR_TYPE, psz_variable );
- b_error = VLC_TRUE;
+ b_error = true;
}
if( !b_error )
{
char *psz_object = E_(SSPop)( st );
char *psz_variable = E_(SSPop)( st );
- vlc_bool_t b_need_release;
+ bool b_need_release;
vlc_object_t *p_object = GetVLCObject( p_intf, psz_object,
&b_need_release );
else if( !strcmp( s, "vlc_object_exists" ) )
{
char *psz_object = E_(SSPop)( st );
- vlc_bool_t b_need_release;
+ bool b_need_release;
vlc_object_t *p_object = GetVLCObject( p_intf, psz_object,
&b_need_release );
else
{
i_ret = playlist_AddInput( p_sys->p_playlist, p_input,
- PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE,
- VLC_FALSE);
+ PLAYLIST_APPEND, PLAYLIST_END, true,
+ false);
vlc_gc_decref( p_input );
if( i_ret == VLC_SUCCESS )
msg_Dbg( p_intf, "requested mrl add: %s", mrl );
}
else if( !strcmp( s, "playlist_empty" ) )
{
- playlist_Clear( p_sys->p_playlist, VLC_FALSE );
+ playlist_Clear( p_sys->p_playlist, false );
msg_Dbg( p_intf, "requested playlist empty" );
}
else if( !strcmp( s, "playlist_delete" ) )
{
int i_id = E_(SSPopN)( st, vars );
playlist_item_t *p_item = playlist_ItemGetById( p_sys->p_playlist,
- i_id, VLC_FALSE );
+ i_id, false );
if( p_item )
{
playlist_DeleteFromInput( p_sys->p_playlist,
- p_item->p_input->i_id, VLC_FALSE );
+ p_item->p_input->i_id, false );
msg_Dbg( p_intf, "requested playlist delete: %d", i_id );
}
else
****************************************************************************/
/* ToUrl: create a good name for an url from filename */
-char *E_(FileToUrl)( char *name, vlc_bool_t *pb_index )
+char *E_(FileToUrl)( char *name, bool *pb_index )
{
char *url, *p;
url = p = malloc( strlen( name ) + 1 );
- *pb_index = VLC_FALSE;
+ *pb_index = false;
if( !url || !p )
{
return NULL;
if( !strncmp( p, "/index.", 7 ) )
{
p[1] = '\0';
- *pb_index = VLC_TRUE;
+ *pb_index = true;
}
}
return url;
}
snprintf( dir, sizeof( dir ), "%s%c.hosts", psz_dir, sep );
- p_acl = ACL_Create( p_intf, VLC_FALSE );
+ p_acl = ACL_Create( p_intf, false );
if( ACL_LoadFile( p_acl, dir ) )
{
ACL_Destroy( p_acl );
{
httpd_file_sys_t *f = NULL;
httpd_handler_sys_t *h = NULL;
- vlc_bool_t b_index;
+ bool b_index;
char *psz_name, *psz_ext;
psz_name = E_(FileToUrl)( &dir[strlen( psz_root )], &b_index );
{
f = malloc( sizeof( httpd_handler_sys_t ) );
h = (httpd_handler_sys_t *)f;
- f->b_handler = VLC_TRUE;
+ f->b_handler = true;
h->p_association = p_sys->pp_handlers[i];
}
}
if( f == NULL )
{
f = malloc( sizeof( httpd_file_sys_t ) );
- f->b_handler = VLC_FALSE;
+ f->b_handler = false;
}
f->p_intf = p_intf;
f->p_redir2 = NULL;
f->file = strdup (dir);
f->name = psz_name;
- f->b_html = strstr( &dir[strlen( psz_root )], ".htm" ) || strstr( &dir[strlen( psz_root )], ".xml" ) ? VLC_TRUE : VLC_FALSE;
+ f->b_html = strstr( &dir[strlen( psz_root )], ".htm" ) || strstr( &dir[strlen( psz_root )], ".xml" ) ? true : false;
if( !f->name )
{
if( (p == psz_uri || *(p - 1) == '&' || *(p - 1) == '\n')
&& p[strlen(psz_name)] == '=' )
{
- return VLC_TRUE;
+ return true;
}
p++;
}
- return VLC_FALSE;
+ return false;
}
static char *FindURIValue( char *psz_uri, const char *restrict psz_name,
* string, the function returns the remaining string. */
char *E_(FirstWord)( char *psz, char *new )
{
- vlc_bool_t b_end;
+ bool b_end;
while( *psz == ' ' )
psz++;
* of space to delimit option boundaries. */
static char *FirstOption( char *psz, char *new )
{
- vlc_bool_t b_end, b_start = VLC_TRUE;
+ bool b_end, b_start = true;
while( *psz == ' ' )
psz++;
if( *psz == '\\' && psz[1] != '\0' )
psz++;
*new++ = *psz++;
- b_start = VLC_FALSE;
+ b_start = false;
}
if( *psz == c )
psz++;
if( *psz == '\\' && psz[1] != '\0' )
psz++;
*new++ = *psz++;
- b_start = VLC_FALSE;
+ b_start = false;
}
}
b_end = !*psz;
set_callbacks( Open, Close );
add_string( "lirc-file", NULL, NULL,
- LIRC_TEXT, LIRC_LONGTEXT, VLC_TRUE );
+ LIRC_TEXT, LIRC_LONGTEXT, true );
vlc_module_end();
/*****************************************************************************
#endif
int i_calibrate;
- vlc_bool_t b_use_rotate;
+ bool b_use_rotate;
};
/*****************************************************************************
set_description( _("motion control interface") );
add_bool( "motion-use-rotate", 0, NULL,
- USE_ROTATE_TEXT, USE_ROTATE_TEXT, VLC_FALSE );
+ USE_ROTATE_TEXT, USE_ROTATE_TEXT, false );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
{
vout_thread_t *p_vout;
const char *psz_filter, *psz_type;
- vlc_bool_t b_change = VLC_FALSE;
+ bool b_change = false;
/* Wait a bit, get orientation, change filter if necessary */
msleep( INTF_IDLE_SLEEP );
if( i_x < -HIGH_THRESHOLD && i_oldx > -LOW_THRESHOLD )
{
- b_change = VLC_TRUE;
+ b_change = true;
psz_filter = "transform";
psz_type = "270";
}
else if( ( i_x > -LOW_THRESHOLD && i_oldx < -HIGH_THRESHOLD )
|| ( i_x < LOW_THRESHOLD && i_oldx > HIGH_THRESHOLD ) )
{
- b_change = VLC_TRUE;
+ b_change = true;
psz_filter = "";
psz_type = "";
}
else if( i_x > HIGH_THRESHOLD && i_oldx < LOW_THRESHOLD )
{
- b_change = VLC_TRUE;
+ b_change = true;
psz_filter = "transform";
psz_type = "90";
}
set_subcategory( SUBCAT_ADVANCED_MISC );
add_bool( "netsync-master", 0, NULL,
- NETSYNC_TEXT, NETSYNC_LONGTEXT, VLC_TRUE );
+ NETSYNC_TEXT, NETSYNC_LONGTEXT, true );
add_string( "netsync-master-ip", NULL, NULL, MIP_TEXT, MIP_LONGTEXT,
- VLC_TRUE );
+ true );
set_capability( "interface", 0 );
set_callbacks( Activate, Close );
{
#define MAX_MSG_LENGTH (2 * sizeof(int64_t))
- vlc_bool_t b_master = config_GetInt( p_intf, "netsync-master" );
+ bool b_master = config_GetInt( p_intf, "netsync-master" );
char *psz_master = NULL;
char p_data[MAX_MSG_LENGTH];
int i_socket;
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_CONTROL );
add_bool( "ntservice-install", 0, NULL,
- INSTALL_TEXT, INSTALL_LONGTEXT, VLC_TRUE );
+ INSTALL_TEXT, INSTALL_LONGTEXT, true );
add_bool( "ntservice-uninstall", 0, NULL,
- UNINSTALL_TEXT, UNINSTALL_LONGTEXT, VLC_TRUE );
+ UNINSTALL_TEXT, UNINSTALL_LONGTEXT, true );
add_string ( "ntservice-name", VLCSERVICENAME, NULL,
- NAME_TEXT, NAME_LONGTEXT, VLC_TRUE );
+ NAME_TEXT, NAME_LONGTEXT, true );
add_string ( "ntservice-options", NULL, NULL,
- OPTIONS_TEXT, OPTIONS_LONGTEXT, VLC_TRUE );
+ OPTIONS_TEXT, OPTIONS_LONGTEXT, true );
add_string ( "ntservice-extraintf", NULL, NULL,
- EXTRAINTF_TEXT, EXTRAINTF_LONGTEXT, VLC_TRUE );
+ EXTRAINTF_TEXT, EXTRAINTF_LONGTEXT, true );
set_capability( "interface", 0 );
set_callbacks( Activate, Close );
static void Deactivate ( vlc_object_t * );
static void Run ( intf_thread_t * );
-static void Help ( intf_thread_t *, vlc_bool_t );
+static void Help ( intf_thread_t *, bool );
static void RegisterCallbacks( intf_thread_t * );
-static vlc_bool_t ReadCommand( intf_thread_t *, char *, int * );
+static bool ReadCommand( intf_thread_t *, char *, int * );
static input_item_t *parse_MRL( intf_thread_t *, char * );
#ifdef WIN32
HANDLE hConsoleIn;
- vlc_bool_t b_quiet;
+ bool b_quiet;
#endif
};
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
set_description( _("Remote control interface") );
- add_bool( "rc-show-pos", 0, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE );
+ add_bool( "rc-show-pos", 0, NULL, POS_TEXT, POS_LONGTEXT, true );
#ifdef WIN32
- add_bool( "rc-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, VLC_FALSE );
+ add_bool( "rc-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, false );
#else
#if defined (HAVE_ISATTY)
- add_bool( "rc-fake-tty", 0, NULL, TTY_TEXT, TTY_LONGTEXT, VLC_TRUE );
+ add_bool( "rc-fake-tty", 0, NULL, TTY_TEXT, TTY_LONGTEXT, true );
#endif
- add_string( "rc-unix", 0, NULL, UNIX_TEXT, UNIX_LONGTEXT, VLC_TRUE );
+ add_string( "rc-unix", 0, NULL, UNIX_TEXT, UNIX_LONGTEXT, true );
#endif
- add_string( "rc-host", 0, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE );
+ add_string( "rc-host", 0, NULL, HOST_TEXT, HOST_LONGTEXT, true );
set_capability( "interface", 20 );
playlist_t * p_playlist;
char p_buffer[ MAX_LINE_LENGTH + 1 ];
- vlc_bool_t b_showpos = config_GetInt( p_intf, "rc-show-pos" );
- vlc_bool_t b_longhelp = VLC_FALSE;
+ bool b_showpos = config_GetInt( p_intf, "rc-show-pos" );
+ bool b_longhelp = false;
int i_size = 0;
int i_oldpos = 0;
while( !intf_ShouldDie( p_intf ) )
{
char *psz_cmd, *psz_arg;
- vlc_bool_t b_complete;
+ bool b_complete;
if( p_intf->p_sys->pi_socket_listen != NULL &&
p_intf->p_sys->i_socket == -1 )
|| !strncmp( psz_cmd, "H", 1 ) || !strncmp( psz_cmd, "?", 1 ) )
{
if( !strcmp( psz_cmd, "longhelp" ) || !strncmp( psz_cmd, "H", 1 ) )
- b_longhelp = VLC_TRUE;
- else b_longhelp = VLC_FALSE;
+ b_longhelp = true;
+ else b_longhelp = false;
Help( p_intf, b_longhelp );
}
if( p_vout )
{
vlc_value_t val;
- vlc_bool_t b_update = VLC_FALSE;
+ bool b_update = false;
var_Get( p_vout, "fullscreen", &val );
val.b_bool = !val.b_bool;
if( !strncmp( psz_arg, "on", 2 )
- && ( val.b_bool == VLC_TRUE ) )
+ && ( val.b_bool == true ) )
{
- b_update = VLC_TRUE;
- val.b_bool = VLC_TRUE;
+ b_update = true;
+ val.b_bool = true;
}
else if( !strncmp( psz_arg, "off", 3 )
- && ( val.b_bool == VLC_FALSE ) )
+ && ( val.b_bool == false ) )
{
- b_update = VLC_TRUE;
- val.b_bool = VLC_FALSE;
+ b_update = true;
+ val.b_bool = false;
}
else if( strncmp( psz_arg, "off", 3 )
&& strncmp( psz_arg, "on", 2 ) )
- b_update = VLC_TRUE;
+ b_update = true;
if( b_update ) var_Set( p_vout, "fullscreen", val );
vlc_object_release( p_vout );
}
var_DelCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, p_intf );
}
-static void Help( intf_thread_t *p_intf, vlc_bool_t b_longhelp)
+static void Help( intf_thread_t *p_intf, bool b_longhelp)
{
msg_rc(_("+----[ Remote control commands ]"));
msg_rc( "| ");
}
else if( !strcmp( psz_cmd, "chapter_n" ) )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "next-chapter", val );
}
else if( !strcmp( psz_cmd, "chapter_p" ) )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "prev-chapter", val );
}
vlc_object_release( p_input );
}
else if( !strcmp( psz_cmd, "title_n" ) )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "next-title", val );
}
else if( !strcmp( psz_cmd, "title_p" ) )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "prev-title", val );
}
}
else if( !strcmp( psz_cmd, "repeat" ) )
{
- vlc_bool_t b_update = VLC_TRUE;
+ bool b_update = true;
var_Get( p_playlist, "repeat", &val );
if( strlen( newval.psz_string ) > 0 )
{
- if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == VLC_TRUE ) ) ||
- ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == VLC_FALSE ) ) )
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == true ) ) ||
+ ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
{
- b_update = VLC_FALSE;
+ b_update = false;
}
}
}
else if( !strcmp( psz_cmd, "loop" ) )
{
- vlc_bool_t b_update = VLC_TRUE;
+ bool b_update = true;
var_Get( p_playlist, "loop", &val );
if( strlen( newval.psz_string ) > 0 )
{
- if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == VLC_TRUE ) ) ||
- ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == VLC_FALSE ) ) )
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == true ) ) ||
+ ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
{
- b_update = VLC_FALSE;
+ b_update = false;
}
}
}
else if( !strcmp( psz_cmd, "random" ) )
{
- vlc_bool_t b_update = VLC_TRUE;
+ bool b_update = true;
var_Get( p_playlist, "random", &val );
if( strlen( newval.psz_string ) > 0 )
{
- if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == VLC_TRUE ) ) ||
- ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == VLC_FALSE ) ) )
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == true ) ) ||
+ ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
{
- b_update = VLC_FALSE;
+ b_update = false;
}
}
p_item = p_parent = p_playlist->items.p_elems[i_pos*2-1];
while( p_parent->p_parent )
p_parent = p_parent->p_parent;
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
p_parent, p_item );
}
else
else if( !strcmp( psz_cmd, "clear" ) )
{
playlist_Stop( p_playlist );
- playlist_Clear( p_playlist, VLC_FALSE );
+ playlist_Clear( p_playlist, false );
}
else if( !strcmp( psz_cmd, "add" ) &&
newval.psz_string && *newval.psz_string )
{
msg_rc( "Trying to add %s to playlist.", newval.psz_string );
if( playlist_AddInput( p_playlist, p_item,
- PLAYLIST_GO|PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE,
- VLC_FALSE ) != VLC_SUCCESS )
+ PLAYLIST_GO|PLAYLIST_APPEND, PLAYLIST_END, true,
+ false ) != VLC_SUCCESS )
{
return VLC_EGENERIC;
}
{
msg_rc( "trying to enqueue %s to playlist", newval.psz_string );
if( playlist_AddInput( p_playlist, p_item,
- PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE,
- VLC_FALSE ) != VLC_SUCCESS )
+ PLAYLIST_APPEND, PLAYLIST_END, true,
+ false ) != VLC_SUCCESS )
{
return VLC_EGENERIC;
}
else if( !strcmp( psz_cmd, "snapshot" ) )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
i_error = var_Set( p_vout, psz_variable, val );
}
else
}
#ifdef WIN32
-vlc_bool_t ReadWin32( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
+bool ReadWin32( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
{
INPUT_RECORD input_record;
DWORD i_dw;
p_buffer[ *pi_size ] == '\r' || p_buffer[ *pi_size ] == '\n' )
{
p_buffer[ *pi_size ] = 0;
- return VLC_TRUE;
+ return true;
}
}
- return VLC_FALSE;
+ return false;
}
#endif
-vlc_bool_t ReadCommand( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
+bool ReadCommand( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
{
int i_read = 0;
else if( p_intf->p_sys->i_socket == -1 )
{
msleep( INTF_IDLE_SLEEP );
- return VLC_FALSE;
+ return false;
}
#endif
while( !intf_ShouldDie( p_intf ) && *pi_size < MAX_LINE_LENGTH &&
(i_read = net_Read( p_intf, p_intf->p_sys->i_socket == -1 ?
0 /*STDIN_FILENO*/ : p_intf->p_sys->i_socket, NULL,
- (uint8_t *)p_buffer + *pi_size, 1, VLC_FALSE ) ) > 0 )
+ (uint8_t *)p_buffer + *pi_size, 1, false ) ) > 0 )
{
if( p_buffer[ *pi_size ] == '\r' || p_buffer[ *pi_size ] == '\n' )
break;
}
p_buffer[ *pi_size ] = 0;
- return VLC_TRUE;
+ return true;
}
if( *pi_size == MAX_LINE_LENGTH ||
p_buffer[ *pi_size ] == '\r' || p_buffer[ *pi_size ] == '\n' )
{
p_buffer[ *pi_size ] = 0;
- return VLC_TRUE;
+ return true;
}
- return VLC_FALSE;
+ return false;
}
/*****************************************************************************
struct intf_sys_t
{
vlc_object_t * p_vout;
- vlc_bool_t b_button_pressed;
- vlc_bool_t b_triggered;
+ bool b_button_pressed;
+ bool b_triggered;
int i_threshold;
};
vlc_module_begin();
set_shortname( "Showintf" );
- add_integer( "showintf-threshold", 10, NULL, THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE );
+ add_integer( "showintf-threshold", 10, NULL, THRESHOLD_TEXT, THRESHOLD_LONGTEXT, true );
set_description( _("Show interface with mouse") );
set_capability( "interface", 0 );
if( p_intf->p_sys->b_triggered )
{
playlist_t *p_playlist = pl_Yield( p_intf );
- var_SetBool( p_playlist, "intf-show", VLC_TRUE );
+ var_SetBool( p_playlist, "intf-show", true );
vlc_object_release( p_playlist );
- p_intf->p_sys->b_triggered = VLC_FALSE;
+ p_intf->p_sys->b_triggered = false;
}
vlc_mutex_unlock( &p_intf->change_lock );
{
vlc_mutex_lock( &p_intf->change_lock );
- p_intf->p_sys->b_triggered = VLC_FALSE;
- p_intf->p_sys->b_button_pressed = VLC_FALSE;
+ p_intf->p_sys->b_triggered = false;
+ p_intf->p_sys->b_button_pressed = false;
p_intf->p_sys->i_threshold =
config_GetInt( p_intf, "showintf-threshold" );
if ( i_mouse_y < p_intf->p_sys->i_threshold )
{
msg_Dbg( p_intf, "interface showing requested" );
- p_intf->p_sys->b_triggered = VLC_TRUE;
+ p_intf->p_sys->b_triggered = true;
}
}
if( !p_intf->p_sys->b_button_pressed &&
!strcmp( psz_var, "mouse-button-down" ) )
{
- p_intf->p_sys->b_button_pressed = VLC_TRUE;
+ p_intf->p_sys->b_button_pressed = true;
}
if( p_intf->p_sys->b_button_pressed &&
!strcmp( psz_var, "mouse-button-down" ) )
{
- p_intf->p_sys->b_button_pressed = VLC_FALSE;
+ p_intf->p_sys->b_button_pressed = false;
}
vlc_mutex_unlock( &p_intf->change_lock );
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_CONTROL );
add_string( "telnet-host", "", NULL, TELNETHOST_TEXT,
- TELNETHOST_LONGTEXT, VLC_TRUE );
+ TELNETHOST_LONGTEXT, true );
add_integer( "telnet-port", TELNETPORT_DEFAULT, NULL, TELNETPORT_TEXT,
- TELNETPORT_LONGTEXT, VLC_TRUE );
+ TELNETPORT_LONGTEXT, true );
add_password( "telnet-password", TELNETPWD_DEFAULT, NULL, TELNETPWD_TEXT,
- TELNETPWD_LONGTEXT, VLC_TRUE );
+ TELNETPWD_LONGTEXT, true );
set_description( _("VLM remote control interface") );
- add_category_hint( "VLM", NULL, VLC_FALSE );
+ add_category_hint( "VLM", NULL, false );
set_capability( "interface", 0 );
set_callbacks( Open , Close );
vlc_module_end();
struct demux_sys_t
{
- vlc_bool_t b_start;
+ bool b_start;
es_out_id_t *p_es;
/* Packetizer */
decoder_t *p_packetizer;
int i_mux_rate;
- vlc_bool_t b_big_endian;
+ bool b_big_endian;
};
-static int CheckSync( const uint8_t *p_peek, vlc_bool_t *p_big_endian );
+static int CheckSync( const uint8_t *p_peek, bool *p_big_endian );
#define PCM_FRAME_SIZE (1536 * 4)
#define A52_PACKET_SIZE (4 * PCM_FRAME_SIZE)
demux_sys_t *p_sys;
const byte_t*p_peek;
int i_peek = 0;
- vlc_bool_t b_big_endian = 0; /* Arbitrary initialisation */
+ bool b_big_endian = 0; /* Arbitrary initialisation */
/* Check if we are dealing with a WAV file */
if( stream_Peek( p_demux->s, &p_peek, 12 ) == 12 &&
/* Fill p_demux fields */
DEMUX_INIT_COMMON(); p_sys = p_demux->p_sys;
- p_sys->b_start = VLC_TRUE;
+ p_sys->b_start = true;
p_sys->i_mux_rate = 0;
p_sys->b_big_endian = b_big_endian;
while( (p_block_out = p_sys->p_packetizer->pf_packetize(
p_sys->p_packetizer, &p_block_in )) )
{
- p_sys->b_start = VLC_FALSE;
+ p_sys->b_start = false;
while( p_block_out )
{
}
else if( i_query == DEMUX_HAS_UNSUPPORTED_META )
{
- 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;
}
else
/*****************************************************************************
* CheckSync: Check if buffer starts with an A52 sync code
*****************************************************************************/
-static int CheckSync( const uint8_t *p_peek, vlc_bool_t *p_big_endian )
+static int CheckSync( const uint8_t *p_peek, bool *p_big_endian )
{
/* Little endian version of the bitstream */
if( p_peek[0] == 0x77 && p_peek[1] == 0x0b &&
p_peek[4] < 0x60 /* bsid < 12 */ )
{
- *p_big_endian = VLC_FALSE;
+ *p_big_endian = false;
return VLC_SUCCESS;
}
/* Big endian version of the bitstream */
else if( p_peek[0] == 0x0b && p_peek[1] == 0x77 &&
p_peek[5] < 0x60 /* bsid < 12 */ )
{
- *p_big_endian = VLC_TRUE;
+ *p_big_endian = true;
return VLC_SUCCESS;
}
int64_t i_data_begin;
int64_t i_data_end;
- vlc_bool_t b_index;
+ bool b_index;
vlc_meta_t *meta;
};
if( DemuxInit( p_demux ) )
{
msg_Err( p_demux, "failed to load the new header" );
- intf_UserFatal( p_demux, VLC_FALSE, _("Could not demux ASF stream"),
+ intf_UserFatal( p_demux, false, _("Could not demux ASF stream"),
_("VLC failed to load the ASF header.") );
return 0;
}
static int DemuxInit( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
- vlc_bool_t b_seekable;
+ bool b_seekable;
unsigned int i_stream, i;
asf_object_content_description_t *p_cd;
asf_object_index_t *p_index;
- vlc_bool_t b_index;
+ bool b_index;
/* init context */
p_sys->i_time = -1;
{
asf_track_t *tk;
asf_object_stream_properties_t *p_sp;
- vlc_bool_t b_access_selected;
+ bool b_access_selected;
p_sp = ASF_FindObject( p_sys->p_root->p_hdr,
&asf_object_stream_properties_guid,
{
/* DVR-MS special ASF */
fmt.i_codec = VLC_FOURCC( 'm','p','g','2' ) ;
- fmt.b_packetized = VLC_FALSE;
+ fmt.b_packetized = false;
}
if( p_sp->i_type_specific_data_length > 11 +
fmt.i_bitrate = GetDWLE( &p_data[8] ) * 8;
fmt.audio.i_blockalign = GetWLE( &p_data[12] );
fmt.audio.i_bitspersample = GetWLE( &p_data[14] );
- fmt.b_packetized = VLC_TRUE;
+ fmt.b_packetized = true;
if( p_sp->i_type_specific_data_length > sizeof( WAVEFORMATEX ) &&
i_format != WAVE_FORMAT_MPEGLAYER3 &&
set_subcategory( SUBCAT_INPUT_DEMUX );
add_bool( "avi-interleaved", 0, NULL,
- INTERLEAVE_TEXT, INTERLEAVE_LONGTEXT, VLC_TRUE );
+ INTERLEAVE_TEXT, INTERLEAVE_LONGTEXT, true );
add_integer( "avi-index", 0, NULL,
- INDEX_TEXT, INDEX_LONGTEXT, VLC_FALSE );
+ INDEX_TEXT, INDEX_LONGTEXT, false );
change_integer_list( pi_index, ppsz_indexes, 0 );
set_callbacks( Open, Close );
typedef struct
{
- vlc_bool_t b_activated;
+ bool b_activated;
unsigned int i_cat; /* AUDIO_ES, VIDEO_ES */
vlc_fourcc_t i_codec;
mtime_t i_time;
mtime_t i_length;
- vlc_bool_t b_seekable;
- vlc_bool_t b_muxed;
+ bool b_seekable;
+ bool b_muxed;
avi_chunk_t ck_root;
- vlc_bool_t b_odml;
+ bool b_odml;
off_t i_movi_begin;
off_t i_movi_lastchunk_pos; /* XXX position of last valid chunk */
demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys;
- vlc_bool_t b_index = VLC_FALSE;
+ bool b_index = false;
int i_do_index;
avi_chunk_t ck_riff;
p_sys->i_time = 0;
p_sys->i_length = 0;
p_sys->i_movi_lastchunk_pos = 0;
- p_sys->b_odml = VLC_FALSE;
- p_sys->b_muxed = VLC_FALSE;
+ p_sys->b_odml = false;
+ p_sys->b_muxed = false;
p_sys->i_track = 0;
p_sys->track = NULL;
p_sys->meta = NULL;
if( p_sysx->i_type == AVIFOURCC_AVIX )
{
msg_Warn( p_demux, "detected OpenDML file" );
- p_sys->b_odml = VLC_TRUE;
+ p_sys->b_odml = true;
break;
}
}
case( AVIFOURCC_iavs):
case( AVIFOURCC_ivas):
- p_sys->b_muxed = VLC_TRUE;
+ p_sys->b_muxed = true;
msg_Dbg( p_demux, "stream[%d] iavs with handler %4.4s", i, (char *)&p_strh->i_handler );
if( p_strh->i_handler == FOURCC_dvsd ||
p_strh->i_handler == FOURCC_dvhd ||
_( "Repair" ), _( "Don't repair" ), _( "Cancel") );
if( i_create == DIALOG_OK_YES )
{
- b_index = VLC_TRUE;
+ b_index = true;
msg_Dbg( p_demux, "Fixing AVI index" );
goto aviindex;
}
*****************************************************************************/
typedef struct
{
- vlc_bool_t b_ok;
+ bool b_ok;
int i_toread;
unsigned int i_track_count = 0;
unsigned int i_track;
- vlc_bool_t b_stream;
+ bool b_stream;
/* cannot be more than 100 stream (dcXX or wbXX) */
avi_track_toread_t toread[100];
for( i_track = 0; i_track < p_sys->i_track; i_track++ )
{
avi_track_t *tk = p_sys->track[i_track];
- vlc_bool_t b;
+ bool b;
if( p_sys->b_muxed && tk->p_out_muxed )
{
i_track_count++;
- tk->b_activated = VLC_TRUE;
+ tk->b_activated = true;
continue;
}
{
AVI_TrackSeek( p_demux, i_track, p_sys->i_time );
}
- tk->b_activated = VLC_TRUE;
+ tk->b_activated = true;
}
else if( !b && tk->b_activated )
{
- tk->b_activated = VLC_FALSE;
+ tk->b_activated = false;
}
if( b )
{
}
}
- b_stream = VLC_FALSE;
+ b_stream = false;
for( ;; )
{
avi_track_t *tk;
- vlc_bool_t b_done;
+ bool b_done;
block_t *p_frame;
off_t i_pos;
unsigned int i;
size_t i_size;
/* search for first chunk to be read */
- for( i = 0, b_done = VLC_TRUE, i_pos = -1; i < p_sys->i_track; i++ )
+ for( i = 0, b_done = true, i_pos = -1; i < p_sys->i_track; i++ )
{
if( !toread[i].b_ok ||
AVI_GetDPTS( p_sys->track[i],
if( toread[i].i_toread > 0 )
{
- b_done = VLC_FALSE; /* not yet finished */
+ b_done = false; /* not yet finished */
}
if( toread[i].i_posf > 0 )
{
if( ( p_frame = stream_Block( p_demux->s, __EVEN( i_size ) ) )==NULL )
{
msg_Warn( p_demux, "failed reading data" );
- tk->b_activated = VLC_FALSE;
- toread[i_track].b_ok = VLC_FALSE;
+ tk->b_activated = false;
+ toread[i_track].b_ok = false;
continue;
}
if( i_size % 2 ) /* read was padded on word boundary */
toread[i_track].i_posf = -1;
}
- b_stream = VLC_TRUE; /* at least one read succeed */
+ b_stream = true; /* at least one read succeed */
if( tk->i_cat != VIDEO_ES )
p_frame->i_dts = p_frame->i_pts;
for( i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
{
avi_track_t *tk = p_sys->track[i_stream];
- vlc_bool_t b;
+ bool b;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
}
/****************************************************************************
- * Return VLC_TRUE if it's a key frame
+ * Return true if it's a key frame
****************************************************************************/
static int AVI_GetKeyFlag( vlc_fourcc_t i_fourcc, uint8_t *p_byte )
{
off_t i_offset;
unsigned int i;
- vlc_bool_t b_keyset[100];
+ bool b_keyset[100];
p_riff = AVI_ChunkFind( &p_sys->ck_root, AVIFOURCC_RIFF, 0);
p_idx1 = AVI_ChunkFind( p_riff, AVIFOURCC_idx1, 0);
/* Reset b_keyset */
for( i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
- b_keyset[i_stream] = VLC_FALSE;
+ b_keyset[i_stream] = false;
for( i_index = 0; i_index < p_idx1->i_entry_count; i_index++ )
{
AVI_IndexAddEntry( p_sys, i_stream, &index );
if( index.i_flags&AVIIF_KEYFRAME )
- b_keyset[i_stream] = VLC_TRUE;
+ b_keyset[i_stream] = true;
}
}
{
demux_sys_t *p_sys = p_demux->p_sys;
unsigned int i;
- int b_end = VLC_TRUE;
+ int b_end = true;
for( i = 0; i < p_sys->i_track; i++ )
{
avi_track_t *tk = p_sys->track[i];
if( tk->i_idxposc >= tk->i_idxnb )
{
- tk->b_activated = VLC_FALSE;
- if( tk->p_es ) es_out_Control( p_demux->out, ES_OUT_SET_ES_STATE, tk->p_es, VLC_FALSE );
+ tk->b_activated = false;
+ if( tk->p_es ) es_out_Control( p_demux->out, ES_OUT_SET_ES_STATE, tk->p_es, false );
}
else
{
- b_end = VLC_FALSE;
+ b_end = false;
}
}
return( b_end );
{
avi_chunk_t *p_chk;
const uint8_t *p_peek;
- vlc_bool_t b_seekable;
+ bool b_seekable;
if( p_container->common.i_chunk_size > 0 && p_container->common.i_chunk_size < 8 )
{
{
avi_chunk_list_t *p_list = (avi_chunk_list_t*)p_root;
avi_chunk_t *p_chk;
- vlc_bool_t b_seekable;
+ bool b_seekable;
stream_Control( s, STREAM_CAN_FASTSEEK, &b_seekable );
set_description( _("File dumper") );
set_capability( "demux2", 0 );
add_file( "demuxdump-file", "stream-demux.dump", NULL, FILE_TEXT,
- FILE_LONGTEXT, VLC_FALSE );
+ FILE_LONGTEXT, false );
change_unsafe();
add_bool( "demuxdump-append", 0, NULL, APPEND_TEXT, APPEND_LONGTEXT,
- VLC_FALSE );
+ false );
set_callbacks( Open, Close );
add_shortcut( "dump" );
vlc_module_end();
demux_sys_t *p_sys;
const char *psz_mode;
vlc_value_t val;
- vlc_bool_t b_append;
+ bool b_append;
/* Accept only if forced */
if( !p_demux->b_force )
struct demux_sys_t
{
- vlc_bool_t b_start;
+ bool b_start;
es_out_id_t *p_es;
/* Packetizer */
while( (p_block_out = p_sys->p_packetizer->pf_packetize(
p_sys->p_packetizer, &p_block_in )) )
{
- p_sys->b_start = VLC_FALSE;
+ p_sys->b_start = false;
while( p_block_out )
{
struct demux_sys_t
{
- vlc_bool_t b_start;
+ bool b_start;
es_out_id_t *p_es;
/* Packetizer */
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
- p_sys->b_start = VLC_TRUE;
+ p_sys->b_start = true;
p_sys->p_meta = NULL;
memset( &p_sys->replay_gain, 0, sizeof(p_sys->replay_gain) );
p_sys->i_length = 0;
return 0;
p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start ? 1 : 0;
- p_sys->b_start = VLC_FALSE;
+ p_sys->b_start = false;
while( (p_block_out = p_sys->p_packetizer->pf_packetize(
p_sys->p_packetizer, &p_block_in )) )
if( p_sys->p_es == NULL )
{
- p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
+ p_sys->p_packetizer->fmt_out.b_packetized = true;
p_sys->p_packetizer->fmt_out.audio_replay_gain = p_sys->replay_gain;
p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
}
int64_t i_next_offset;
int64_t i_delta_time;
int64_t i_delta_offset;
- vlc_bool_t b_seekable;
+ bool b_seekable;
int i;
/* */
}
else if( i_query == DEMUX_HAS_UNSUPPORTED_META )
{
- 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;
}
else if( i_query == DEMUX_GET_LENGTH )
demux_sys_t *p_sys = p_demux->p_sys;
int i_peek;
const uint8_t *p_peek;
- vlc_bool_t b_last;
+ bool b_last;
int i_sample_rate;
int64_t i_sample_count;
seekpoint_t *s;
set_callbacks( Open, Close );
add_bool( "rtsp-tcp", 0, NULL,
N_("Use RTP over RTSP (TCP)"),
- N_("Use RTP over RTSP (TCP)"), VLC_TRUE );
+ N_("Use RTP over RTSP (TCP)"), true );
add_integer( "rtp-client-port", -1, NULL,
N_("Client port"),
- N_("Port to use for the RTP source of the session"), VLC_TRUE );
+ N_("Port to use for the RTP source of the session"), true );
add_bool( "rtsp-http", 0, NULL,
N_("Tunnel RTSP and RTP over HTTP"),
- N_("Tunnel RTSP and RTP over HTTP"), VLC_TRUE );
+ N_("Tunnel RTSP and RTP over HTTP"), true );
add_integer( "rtsp-http-port", 80, NULL,
N_("HTTP tunnel port"),
N_("Port to use for tunneling the RTSP/RTP over HTTP."),
- VLC_TRUE );
+ true );
add_integer("rtsp-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
- add_bool( "rtsp-kasenna", VLC_FALSE, NULL, KASENNA_TEXT,
- KASENNA_LONGTEXT, VLC_TRUE );
+ CACHING_TEXT, CACHING_LONGTEXT, true );
+ add_bool( "rtsp-kasenna", false, NULL, KASENNA_TEXT,
+ KASENNA_LONGTEXT, true );
add_string( "rtsp-user", NULL, NULL, USER_TEXT,
- USER_LONGTEXT, VLC_TRUE );
+ USER_LONGTEXT, true );
add_string( "rtsp-pwd", NULL, NULL, PASS_TEXT,
- PASS_LONGTEXT, VLC_TRUE );
+ PASS_LONGTEXT, true );
vlc_module_end();
es_format_t fmt;
es_out_id_t *p_es;
- vlc_bool_t b_muxed;
- vlc_bool_t b_quicktime;
- vlc_bool_t b_asf;
+ bool b_muxed;
+ bool b_quicktime;
+ bool b_asf;
stream_t *p_out_muxed; /* for muxed stream */
uint8_t *p_buffer;
unsigned int i_buffer;
- vlc_bool_t b_rtcp_sync;
+ bool b_rtcp_sync;
char waiting;
int64_t i_pts;
u_int32_t i_start_seq;
VLC_COMMON_MEMBERS
int64_t i_remain;
- vlc_bool_t b_handle_keep_alive;
+ bool b_handle_keep_alive;
demux_sys_t *p_sys;
};
/* Weird formats */
asf_header_t asfh;
stream_t *p_out_asf;
- vlc_bool_t b_real;
+ bool b_real;
/* */
int64_t i_pcr; /* The clock */
/* timeout thread information */
int i_timeout; /* session timeout value in seconds */
- vlc_bool_t b_timeout_call;/* mark to send an RTSP call to prevent server timeout */
+ bool b_timeout_call;/* mark to send an RTSP call to prevent server timeout */
timeout_thread_t *p_timeout; /* the actual thread that makes sure we don't timeout */
/* */
- vlc_bool_t b_multicast; /* true if one of the tracks is multicasted */
- vlc_bool_t b_no_data; /* true if we never receive any data */
+ bool b_multicast; /* true if one of the tracks is multicasted */
+ bool b_no_data; /* true if we never receive any data */
int i_no_data_ti; /* consecutive number of TaskInterrupt */
char event;
p_sys->i_npt_start = 0;
p_sys->i_npt_length = 0;
p_sys->p_out_asf = NULL;
- p_sys->b_no_data = VLC_TRUE;
+ p_sys->b_no_data = true;
p_sys->i_no_data_ti = 0;
p_sys->p_timeout = NULL;
p_sys->i_timeout = 0;
- p_sys->b_timeout_call = VLC_FALSE;
- p_sys->b_multicast = VLC_FALSE;
- p_sys->b_real = VLC_FALSE;
+ p_sys->b_timeout_call = false;
+ p_sys->b_multicast = false;
+ p_sys->b_real = false;
p_sys->psz_path = strdup( p_demux->psz_path );
/* parse URL for rtsp://[user:[passwd]@]serverip:port/options */
{
demux_sys_t *p_sys = p_demux->p_sys;
Authenticator authenticator;
- vlc_bool_t b_firstpass = VLC_TRUE;
+ bool b_firstpass = true;
char *psz_user = NULL;
char *psz_pwd = NULL;
* first time. This is a workaround to avoid asking for a
* user/passwd the first time the code passess here. */
i_code = 0;
- b_firstpass = VLC_FALSE;
+ b_firstpass = false;
}
if( i_code == 401 )
{
/* Perhaps a firewall is being annoying. Try HTTP tunneling mode */
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
msg_Dbg( p_demux, "we will now try HTTP tunneling mode" );
var_Set( p_demux, "rtsp-http", val );
if( p_sys->rtsp ) RTSPClient::close( p_sys->rtsp );
MediaSubsessionIterator *iter = NULL;
MediaSubsession *sub = NULL;
- vlc_bool_t b_rtsp_tcp = VLC_FALSE;
+ bool b_rtsp_tcp = false;
int i_client_port;
int i_return = VLC_SUCCESS;
unsigned int i_buffer = 0;
if( strcasestr( sub->codecName(), "REAL" ) )
{
msg_Info( p_demux, "real codec detected, using real-RTSP instead" );
- p_sys->b_real = VLC_TRUE; /* This is a problem, we'll handle it later */
+ p_sys->b_real = true; /* This is a problem, we'll handle it later */
continue;
}
tk->p_demux = p_demux;
tk->sub = sub;
tk->p_es = NULL;
- tk->b_quicktime = VLC_FALSE;
- tk->b_asf = VLC_FALSE;
- tk->b_muxed = VLC_FALSE;
+ tk->b_quicktime = false;
+ tk->b_asf = false;
+ tk->b_muxed = false;
tk->p_out_muxed = NULL;
tk->waiting = 0;
- tk->b_rtcp_sync = VLC_FALSE;
+ tk->b_rtcp_sync = false;
tk->i_pts = 0;
tk->i_buffer = 65536;
tk->p_buffer = (uint8_t *)malloc( 65536 );
}
else if( !strcmp( sub->codecName(), "X-ASF-PF" ) )
{
- tk->b_asf = VLC_TRUE;
+ tk->b_asf = true;
if( p_sys->p_out_asf == NULL )
p_sys->p_out_asf = stream_DemuxNew( p_demux, "asf",
p_demux->out );
else if( !strcmp( sub->codecName(), "X-QT" ) ||
!strcmp( sub->codecName(), "X-QUICKTIME" ) )
{
- tk->b_quicktime = VLC_TRUE;
+ tk->b_quicktime = true;
}
else if( !strcmp( sub->codecName(), "SPEEX" ) )
{
uint8_t *p_extra = NULL;
tk->fmt.i_codec = VLC_FOURCC( 'h', '2', '6', '4' );
- tk->fmt.b_packetized = VLC_FALSE;
+ tk->fmt.b_packetized = false;
if((p_extra=parseH264ConfigStr( sub->fmtp_spropparametersets(),
i_extra ) ) )
!strcmp( sub->codecName(), "X-SV3V-ES" ) ||
!strcmp( sub->codecName(), "X-SORENSONVIDEO" ) )
{
- tk->b_quicktime = VLC_TRUE;
+ tk->b_quicktime = true;
}
else if( !strcmp( sub->codecName(), "MP2T" ) )
{
- tk->b_muxed = VLC_TRUE;
+ tk->b_muxed = true;
tk->p_out_muxed = stream_DemuxNew( p_demux, "ts", p_demux->out );
}
else if( !strcmp( sub->codecName(), "MP2P" ) ||
!strcmp( sub->codecName(), "MP1S" ) )
{
- tk->b_muxed = VLC_TRUE;
+ tk->b_muxed = true;
tk->p_out_muxed = stream_DemuxNew( p_demux, "ps",
p_demux->out );
}
else if( !strcmp( sub->codecName(), "X-ASF-PF" ) )
{
- tk->b_asf = VLC_TRUE;
+ tk->b_asf = true;
if( p_sys->p_out_asf == NULL )
p_sys->p_out_asf = stream_DemuxNew( p_demux, "asf",
p_demux->out );;
p_sys->p_timeout = (timeout_thread_t *)vlc_object_create( p_demux, sizeof(timeout_thread_t) );
p_sys->p_timeout->p_sys = p_demux->p_sys; /* lol, object recursion :D */
if( vlc_thread_create( p_sys->p_timeout, "liveMedia-timeout", TimeoutPrevention,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_LOW, true ) )
{
msg_Err( p_demux, "cannot spawn liveMedia timeout thread" );
vlc_object_release( p_sys->p_timeout );
demux_sys_t *p_sys = p_demux->p_sys;
TaskToken task;
- vlc_bool_t b_send_pcr = VLC_TRUE;
+ bool b_send_pcr = true;
int64_t i_pcr = 0;
int i;
{
char *psz_bye = NULL;
p_sys->rtsp->getMediaSessionParameter( *p_sys->ms, NULL, psz_bye );
- p_sys->b_timeout_call = VLC_FALSE;
+ p_sys->b_timeout_call = false;
}
live_track_t *tk = p_sys->track[i];
if( tk->b_asf || tk->b_muxed )
- b_send_pcr = VLC_FALSE;
+ b_send_pcr = false;
#if 0
if( i_pcr == 0 )
{
msg_Dbg( p_demux, "tk->rtpSource->hasBeenSynchronizedUsingRTCP()" );
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
- tk->b_rtcp_sync = VLC_TRUE;
+ tk->b_rtcp_sync = true;
/* reset PCR */
tk->i_pts = 0;
p_sys->i_pcr = 0;
else if( !p_sys->b_multicast && p_sys->b_no_data &&
( p_sys->i_no_data_ti > 34 ) )
{
- vlc_bool_t b_rtsp_tcp = var_GetBool( p_demux, "rtsp-tcp" ) ||
+ bool b_rtsp_tcp = var_GetBool( p_demux, "rtsp-tcp" ) ||
var_GetBool( p_demux, "rtsp-http" );
if( !b_rtsp_tcp && p_sys->rtsp && p_sys->ms )
demux_sys_t *p_sys = p_demux->p_sys;
int64_t *pi64;
double *pf, f;
- vlc_bool_t *pb, *pb2, b_bool;
+ bool *pb, *pb2, b_bool;
int *pi_int;
switch( i_query )
for( i = 0; i < p_sys->i_track; i++ )
{
//if( !p_sys->track[i]->b_rtcp_sync )
- p_sys->track[i]->b_rtcp_sync = VLC_FALSE;
+ p_sys->track[i]->b_rtcp_sync = false;
p_sys->track[i]->i_pts = (int64_t) ( p_sys->track[i]->sub->rtpInfo.timestamp * (double)1000000.0 );
p_sys->track[i]->i_start_seq = p_sys->track[i]->sub->rtpInfo.seqNum;
msg_Info( p_demux, "set pos startseq: %u", p_sys->track[i]->i_start_seq );
/* Special for access_demux */
case DEMUX_CAN_PAUSE:
case DEMUX_CAN_SEEK:
- pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
+ pb = (bool*)va_arg( args, bool * );
if( p_sys->rtsp && p_sys->i_npt_length )
/* Not always true, but will be handled in SET_PAUSE_STATE */
- *pb = VLC_TRUE;
+ *pb = true;
else
- *pb = VLC_FALSE;
+ *pb = false;
return VLC_SUCCESS;
case DEMUX_CAN_CONTROL_PACE:
- pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
+ pb = (bool*)va_arg( args, bool * );
#if 1 /* Disable for now until we have a clock synchro algo
* which works with something else than MPEG over UDP */
- *pb = VLC_FALSE;
+ *pb = false;
#else
- *pb = VLC_TRUE;
+ *pb = true;
#endif
return VLC_SUCCESS;
#if 0
case DEMUX_CAN_CONTROL_RATE:
- pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- pb2 = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
+ pb = (bool*)va_arg( args, bool * );
+ pb2 = (bool*)va_arg( args, bool * );
*pb = p_sys->rtsp != NULL && p_sys->i_npt_length > 0 && !var_GetBool( p_demux, "rtsp-kasenna" );
- *pb2 = VLC_FALSE;
+ *pb2 = false;
return VLC_SUCCESS;
case DEMUX_SET_RATE:
* we set a flag that the TimeoutPrevention function will check
* and if it's set, it will trigger the GET_PARAMETER message */
if( b_bool && p_sys->p_timeout != NULL )
- p_sys->p_timeout->b_handle_keep_alive = VLC_TRUE;
+ p_sys->p_timeout->b_handle_keep_alive = true;
else if( !b_bool && p_sys->p_timeout != NULL )
- p_sys->p_timeout->b_handle_keep_alive = VLC_FALSE;
+ p_sys->p_timeout->b_handle_keep_alive = false;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
p_sys->i_pcr = 0;
demux_sys_t *p_sys = p_demux->p_sys;
int i, i_return;
- var_SetBool( p_demux, "rtsp-tcp", VLC_TRUE );
+ var_SetBool( p_demux, "rtsp-tcp", true );
/* We close the old RTSP session */
for( i = 0; i < p_sys->i_track; i++ )
/* we have read data */
tk->waiting = 0;
- p_demux->p_sys->b_no_data = VLC_FALSE;
+ p_demux->p_sys->b_no_data = false;
p_demux->p_sys->i_no_data_ti = 0;
if( i_pts > 0 && !tk->b_muxed )
msg_Dbg( p_demux, "StreamClose" );
p_sys->event = 0xff;
- p_demux->b_error = VLC_TRUE;
+ p_demux->b_error = true;
}
*****************************************************************************/
static void TimeoutPrevention( timeout_thread_t *p_timeout )
{
- p_timeout->b_die = VLC_FALSE;
+ p_timeout->b_die = false;
p_timeout->i_remain = (int64_t)p_timeout->p_sys->i_timeout -2;
p_timeout->i_remain *= 1000000;
p_timeout->i_remain = (int64_t)p_timeout->p_sys->i_timeout -2;
p_timeout->i_remain *= 1000000;
msg_Dbg( p_timeout, "reset the timeout timer" );
- if( p_timeout->b_handle_keep_alive == VLC_TRUE )
+ if( p_timeout->b_handle_keep_alive == true )
{
#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1138089600
p_timeout->p_sys->rtsp->getMediaSessionParameter( *p_timeout->p_sys->ms, NULL, psz_bye );
#endif
- p_timeout->p_sys->b_timeout_call = VLC_FALSE;
+ p_timeout->p_sys->b_timeout_call = false;
}
else
{
- p_timeout->p_sys->b_timeout_call = VLC_TRUE;
+ p_timeout->p_sys->b_timeout_call = true;
}
}
p_timeout->i_remain -= 200000;
set_callbacks( Open, Close );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
- add_float( "mjpeg-fps", 0.0, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_FALSE );
+ add_float( "mjpeg-fps", 0.0, NULL, FPS_TEXT, FPS_LONGTEXT, false );
vlc_module_end();
/*****************************************************************************
es_format_t fmt;
es_out_id_t *p_es;
- vlc_bool_t b_still;
+ bool b_still;
mtime_t i_still_end;
mtime_t i_still_length;
/*****************************************************************************
* Peek: Helper function to peek data with incremental size.
- * \return VLC_FALSE if peek no more data, VLC_TRUE otherwise.
+ * \return false if peek no more data, true otherwise.
*****************************************************************************/
-static vlc_bool_t Peek( demux_t *p_demux, vlc_bool_t b_first )
+static bool Peek( demux_t *p_demux, bool b_first )
{
int i_data;
demux_sys_t *p_sys = p_demux->p_sys;
if( i_data == p_sys->i_data_peeked )
{
msg_Warn( p_demux, "no more data" );
- return VLC_FALSE;
+ return false;
}
p_sys->i_data_peeked = i_data;
if( i_data <= 0 )
{
msg_Warn( p_demux, "cannot peek data" );
- return VLC_FALSE;
+ return false;
}
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
while( *p_pos > p_sys->i_data_peeked )
{
- if( ! Peek( p_demux, VLC_FALSE ) )
+ if( ! Peek( p_demux, false ) )
{
return NULL;
}
i++;
if( i == i_size )
{
- if( ! Peek( p_demux, VLC_FALSE ) )
+ if( ! Peek( p_demux, false ) )
{
return NULL;
}
* CheckMimeHeader: Internal function used to verify and skip mime header
* \param p_header_size Return size of MIME header, 0 if no MIME header
* detected, minus value if error
- * \return VLC_TRUE if content type is image/jpeg, VLC_FALSE otherwise
+ * \return true if content type is image/jpeg, false otherwise
*****************************************************************************/
-static vlc_bool_t CheckMimeHeader( demux_t *p_demux, int *p_header_size )
+static bool CheckMimeHeader( demux_t *p_demux, int *p_header_size )
{
- vlc_bool_t b_jpeg = VLC_FALSE;
+ bool b_jpeg = false;
int i_pos;
char *psz_line;
char *p_ch;
demux_sys_t *p_sys = p_demux->p_sys;
- if( !Peek( p_demux, VLC_TRUE ) )
+ if( !Peek( p_demux, true ) )
{
msg_Err( p_demux, "cannot peek" );
*p_header_size = -1;
- return VLC_FALSE;
+ return false;
}
if( p_sys->i_data_peeked < 3)
{
msg_Err( p_demux, "data shortage" );
*p_header_size = -2;
- return VLC_FALSE;
+ return false;
}
if( strncmp( (char *)p_sys->p_peek, "--", 2 ) )
{
*p_header_size = 0;
- return VLC_FALSE;
+ return false;
}
i_pos = 2;
psz_line = GetLine( p_demux, &i_pos );
{
msg_Err( p_demux, "no EOL" );
*p_header_size = -3;
- return VLC_FALSE;
+ return false;
}
/* Read the separator and remember it if not yet stored */
if( strncasecmp( p_ch, "image/jpeg", 10 ) )
{
msg_Warn( p_demux, "%s, image/jpeg is expected", psz_line );
- b_jpeg = VLC_FALSE;
+ b_jpeg = false;
}
else
{
- b_jpeg = VLC_TRUE;
+ b_jpeg = true;
}
}
else
{
msg_Err( p_demux, "no EOL" );
*p_header_size = -3;
- return VLC_FALSE;
+ return false;
}
free( psz_line );
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
int i_size;
- int b_matched = VLC_FALSE;
+ int b_matched = false;
vlc_value_t val;
p_demux->pf_control = Control;
p_sys->i_frame_length = 0;
/* Check for jpeg file extension */
- p_sys->b_still = VLC_FALSE;
+ p_sys->b_still = false;
p_sys->i_still_end = 0;
if( demux2_IsPathExtension( p_demux, ".jpeg" ) ||
demux2_IsPathExtension( p_demux, ".jpg" ) )
{
- p_sys->b_still = VLC_TRUE;
+ p_sys->b_still = true;
if( val.f_float)
{
p_sys->i_still_length =1000000.0 / val.f_float;
return 1;
}
- if( !Peek( p_demux, VLC_TRUE ) )
+ if( !Peek( p_demux, true ) )
{
msg_Warn( p_demux, "cannot peek data" );
return 0;
{
msg_Dbg( p_demux, "did not find JPEG EOI in %d bytes",
p_sys->i_data_peeked );
- if( !Peek( p_demux, VLC_FALSE ) )
+ if( !Peek( p_demux, false ) )
{
msg_Warn( p_demux, "no more data is available at the moment" );
return 0;
{
demux_sys_t *p_sys = p_demux->p_sys;
int i_size, i;
- vlc_bool_t b_match;
- vlc_bool_t b_done;
+ bool b_match;
+ bool b_done;
b_match = CheckMimeHeader( p_demux, &i_size );
if( i_size > 0 )
else
{
// No MIME header, assume OK
- b_match = VLC_TRUE;
+ b_match = true;
}
- if( !Peek( p_demux, VLC_TRUE ) )
+ if( !Peek( p_demux, true ) )
{
msg_Warn( p_demux, "cannot peek data" );
return 0;
msg_Warn( p_demux, "data shortage" );
return 0;
}
- b_done = VLC_FALSE;
+ b_done = false;
while( !b_done )
{
while( !( p_sys->p_peek[i] == '-' && p_sys->p_peek[i+1] == '-' ) )
msg_Dbg( p_demux, "MIME boundary not found in %d bytes of "
"data", p_sys->i_data_peeked );
- if( !Peek( p_demux, VLC_FALSE ) )
+ if( !Peek( p_demux, false ) )
{
msg_Warn( p_demux, "no more data is available at the "
"moment" );
if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i + 2),
strlen( p_sys->psz_separator ) ) )
{
- b_done = VLC_TRUE;
+ b_done = true;
}
else
{
add_bool( "mkv-use-ordered-chapters", 1, NULL,
N_("Ordered chapters"),
- N_("Play ordered chapters as specified in the segment."), VLC_TRUE );
+ N_("Play ordered chapters as specified in the segment."), true );
add_bool( "mkv-use-chapter-codec", 1, NULL,
N_("Chapter codecs"),
- N_("Use chapter codecs found in the segment."), VLC_TRUE );
+ N_("Use chapter codecs found in the segment."), true );
add_bool( "mkv-preload-local-dir", 1, NULL,
N_("Preload Directory"),
- N_("Preload matroska files from the same family in the same directory (not good for broken files)."), VLC_TRUE );
+ N_("Preload matroska files from the same family in the same directory (not good for broken files)."), true );
add_bool( "mkv-seek-percent", 0, NULL,
N_("Seek based on percent not time"),
- N_("Seek based on percent not time."), VLC_TRUE );
+ N_("Seek based on percent not time."), true );
add_bool( "mkv-use-dummy", 0, NULL,
N_("Dummy Elements"),
- N_("Read and discard unknown EBML elements (not good for broken files)."), VLC_TRUE );
+ N_("Read and discard unknown EBML elements (not good for broken files)."), true );
add_shortcut( "mka" );
add_shortcut( "mkv" );
{
private:
stream_t *s;
- vlc_bool_t mb_eof;
- vlc_bool_t b_owner;
+ bool mb_eof;
+ bool b_owner;
public:
- vlc_stream_io_callback( stream_t *, vlc_bool_t );
+ vlc_stream_io_callback( stream_t *, bool );
virtual ~vlc_stream_io_callback()
{
EbmlElement *m_got;
int mi_user_level;
- vlc_bool_t mb_keep;
- vlc_bool_t mb_dummy;
+ bool mb_keep;
+ bool mb_dummy;
};
{
// ~mkv_track_t();
- vlc_bool_t b_default;
- vlc_bool_t b_enabled;
+ bool b_default;
+ bool b_enabled;
unsigned int i_number;
int i_extra_data;
/* audio */
unsigned int i_original_rate;
- vlc_bool_t b_inited;
+ bool b_inited;
/* data to be send first */
int i_data_init;
uint8_t *p_data_init;
/* hack : it's for seek */
- vlc_bool_t b_search_keyframe;
- vlc_bool_t b_silent;
+ bool b_search_keyframe;
+ bool b_silent;
/* informative */
const char *psz_codec_name;
int64_t i_position;
int64_t i_time;
- vlc_bool_t b_key;
+ bool b_key;
} mkv_index_t;
class demux_sys_t;
,p_segment_uid(NULL)
,p_prev_segment_uid(NULL)
,p_next_segment_uid(NULL)
- ,b_cues(VLC_FALSE)
+ ,b_cues(false)
,i_index(0)
,i_index_max(1024)
,psz_muxing_application(NULL)
KaxPrevUID *p_prev_segment_uid;
KaxNextUID *p_next_segment_uid;
- vlc_bool_t b_cues;
+ bool b_cues;
int i_index;
int i_index_max;
mkv_index_t *p_indexes;
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;
} event_thread_t;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = new demux_sys_t( *p_demux );
- p_io_callback = new vlc_stream_io_callback( p_demux->s, VLC_FALSE );
+ p_io_callback = new vlc_stream_io_callback( p_demux->s, false );
p_io_stream = new EbmlStream( *p_io_callback );
if( p_io_stream == NULL )
if ( file_ok )
{
- vlc_stream_io_callback *p_file_io = new vlc_stream_io_callback( p_file_stream, VLC_TRUE );
+ vlc_stream_io_callback *p_file_io = new vlc_stream_io_callback( p_file_stream, true );
EbmlStream *p_estream = new EbmlStream(*p_file_io);
p_stream = p_sys->AnalyseAllSegmentsFound( p_demux, p_estream );
else
#endif
idx.i_time = (*pp_block).GlobalTimecode() / (mtime_t)1000;
- idx.b_key = *pi_ref1 == 0 ? VLC_TRUE : VLC_FALSE;
+ idx.b_key = *pi_ref1 == 0 ? true : false;
}
#undef idx
return VLC_SUCCESS;
// reset silent tracks
for (size_t i=0; i<tracks.size(); i++)
{
- tracks[i]->b_silent = VLC_FALSE;
+ tracks[i]->b_silent = false;
}
ep->Down();
{
if ( tracks[i]->i_number == uint32(track_num))
{
- tracks[i]->b_silent = VLC_TRUE;
+ tracks[i]->b_silent = true;
break;
}
}
size_t i_track;
unsigned int i;
- vlc_bool_t b;
+ bool b;
#define tk p_segment->tracks[i_track]
for( i_track = 0; i_track < p_segment->tracks.size(); i_track++ )
if( !b )
{
- tk->b_inited = VLC_FALSE;
+ tk->b_inited = false;
return;
}
}
p_init = MemToBlock( p_demux, tk->p_data_init, tk->i_data_init, 0 );
if( p_init ) es_out_Send( p_demux->out, tk->p_es, p_init );
}
- tk->b_inited = VLC_TRUE;
+ tk->b_inited = true;
#if LIBMATROSKA_VERSION >= 0x000800
stream_t *p_mp4_stream = stream_MemoryNew( VLC_OBJECT(&sys.demuxer),
tracks[i_track]->p_extra_data,
tracks[i_track]->i_extra_data,
- VLC_FALSE );
+ false );
MP4_ReadBoxCommon( p_mp4_stream, p_box );
MP4_ReadBox_sample_vide( p_mp4_stream, p_box );
tracks[i_track]->fmt.i_codec = p_box->i_type;
/* Now create our event thread catcher */
p_ev = (event_thread_t *) vlc_object_create( &demuxer, sizeof( event_thread_t ) );
p_ev->p_demux = &demuxer;
- p_ev->b_die = VLC_FALSE;
+ p_ev->b_die = false;
vlc_mutex_init( p_ev, &p_ev->lock );
vlc_thread_create( p_ev, "mkv event thread handler", EventThread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE );
+ VLC_THREAD_PRIORITY_LOW, false );
}
}
vlc_mutex_lock( &p_ev->lock );
if( psz_var[6] == 'c' )
{
- p_ev->b_clicked = VLC_TRUE;
+ p_ev->b_clicked = true;
msg_Dbg( p_this, "Event Mouse: clicked");
}
else if( psz_var[6] == 'm' )
- p_ev->b_moved = VLC_TRUE;
+ p_ev->b_moved = true;
vlc_mutex_unlock( &p_ev->lock );
return VLC_SUCCESS;
demux_sys_t *p_sys = p_ev->p_demux->p_sys;
vlc_object_t *p_vout = NULL;
- p_ev->b_moved = VLC_FALSE;
- p_ev->b_clicked = VLC_FALSE;
+ p_ev->b_moved = false;
+ p_ev->b_clicked = false;
p_ev->i_key_action = 0;
/* catch all key event */
continue;
}
- vlc_bool_t b_activated = VLC_FALSE;
+ bool b_activated = false;
/* KEY part */
if( p_ev->i_key_action )
}
break;
case ACTIONID_NAV_ACTIVATE:
- b_activated = VLC_TRUE;
+ b_activated = true;
if ( i_curr_button > 0 && i_curr_button <= pci->hli.hl_gi.btn_ns )
{
msg_Dbg( p_ev->p_demux, "Handle Mouse Event: Mouse clicked x(%d)*y(%d)", (unsigned)valx.i_int, (unsigned)valy.i_int);
- b_activated = VLC_TRUE;
+ b_activated = true;
// get current button
best = 0;
dist = 0x08000000; /* >> than (720*720)+(567*567); */
val.p_address = (void *)p_sys->palette;
var_Set( p_sys->p_input, "menu-palette", val );
- val.b_bool = VLC_TRUE; var_Set( p_sys->p_input, "highlight", val );
+ val.b_bool = true; var_Set( p_sys->p_input, "highlight", val );
vlc_mutex_unlock( p_mutex );
}
}
// dvdnav_mouse_select( NULL, pci, valx.i_int, valy.i_int );
}
- p_ev->b_moved = VLC_FALSE;
- p_ev->b_clicked = VLC_FALSE;
+ p_ev->b_moved = false;
+ p_ev->b_clicked = false;
vlc_mutex_unlock( &p_ev->lock );
}
/*****************************************************************************
* Stream managment
*****************************************************************************/
-vlc_stream_io_callback::vlc_stream_io_callback( stream_t *s_, vlc_bool_t b_owner_ )
+vlc_stream_io_callback::vlc_stream_io_callback( stream_t *s_, bool b_owner_ )
{
s = s_;
b_owner = b_owner_;
- mb_eof = VLC_FALSE;
+ mb_eof = false;
}
uint32 vlc_stream_io_callback::read( void *p_buffer, size_t i_size )
if( i_pos < 0 || i_pos >= stream_Size( s ) )
{
- mb_eof = VLC_TRUE;
+ mb_eof = true;
return;
}
- mb_eof = VLC_FALSE;
+ mb_eof = false;
if( stream_Seek( s, i_pos ) )
{
- mb_eof = VLC_TRUE;
+ mb_eof = true;
}
return;
}
}
mi_level = 1;
mi_user_level = 1;
- mb_keep = VLC_FALSE;
+ mb_keep = false;
mb_dummy = config_GetInt( p_demux, "mkv-use-dummy" );
}
{
delete m_el[i];
}
- mb_keep = VLC_FALSE;
+ mb_keep = false;
}
}
}
}
m_got = NULL;
- mb_keep = VLC_FALSE;
+ mb_keep = false;
if ( m_el[1]->GetElementPosition() == i_cluster_pos )
{
m_es->I_O().setFilePointer( i_block_pos, seek_beginning );
void EbmlParser::Keep( void )
{
- mb_keep = VLC_TRUE;
+ mb_keep = true;
}
int EbmlParser::GetLevel( void )
{
delete m_el[mi_level];
}
- mb_keep = VLC_FALSE;
+ mb_keep = false;
}
m_el[mi_level] = m_es->FindNextElement( m_el[mi_level - 1]->Generic().Context, i_ulev, 0xFFFFFFFFL, mb_dummy != 0, 1 );
// IndexAppendCluster( cluster );
}
- vlc_bool_t b_seekable;
+ bool b_seekable;
stream_Control( sys.demuxer.s, STREAM_CAN_FASTSEEK, &b_seekable );
if( !b_seekable )
idx.i_block_number= -1;
idx.i_position = -1;
idx.i_time = 0;
- idx.b_key = VLC_TRUE;
+ idx.b_key = true;
ep->Down();
while( ( el = ep->Get() ) != NULL )
delete ep;
delete cues;
- b_cues = VLC_TRUE;
+ b_cues = true;
msg_Dbg( &sys.demuxer, "loading cues done." );
es.I_O().setFilePointer( i_sav_position, seek_beginning );
tk->fmt.psz_language = strdup("English");
tk->fmt.psz_description = NULL;
- tk->b_default = VLC_TRUE;
- tk->b_enabled = VLC_TRUE;
- tk->b_silent = VLC_FALSE;
+ tk->b_default = true;
+ tk->b_enabled = true;
+ tk->b_silent = false;
tk->i_number = tracks.size() - 1;
tk->i_extra_data = 0;
tk->p_extra_data = NULL;
tk->i_default_duration = 0;
tk->f_timecodescale = 1.0;
- tk->b_inited = VLC_FALSE;
+ tk->b_inited = false;
tk->i_data_init = 0;
tk->p_data_init = NULL;
if( i_tags_position >= 0 )
{
- vlc_bool_t b_seekable;
+ bool b_seekable;
stream_Control( sys.demuxer.s, STREAM_CAN_FASTSEEK, &b_seekable );
if( b_seekable )
idx.i_block_number= -1;
idx.i_position = cluster->GetElementPosition();
idx.i_time = -1;
- idx.b_key = VLC_TRUE;
+ idx.b_key = true;
i_index++;
if( i_index >= i_index_max )
{
if( tracks[i_track]->fmt.i_cat == VIDEO_ES )
{
- tracks[i_track]->b_search_keyframe = VLC_TRUE;
+ tracks[i_track]->b_search_keyframe = true;
i_track_skipping++;
}
es_out_Control( sys.demuxer.out, ES_OUT_SET_NEXT_DISPLAY_TIME, tracks[i_track]->p_es, i_date );
{
if( i_block_ref1 == 0 && tracks[i_track]->b_search_keyframe )
{
- tracks[i_track]->b_search_keyframe = VLC_FALSE;
+ tracks[i_track]->b_search_keyframe = false;
i_track_skipping--;
}
if( !tracks[i_track]->b_search_keyframe )
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
- add_bool( "mod-noisereduction", VLC_TRUE, NULL, N_("Noise reduction"),
- NOISE_LONGTEXT, VLC_FALSE );
+ add_bool( "mod-noisereduction", true, NULL, N_("Noise reduction"),
+ NOISE_LONGTEXT, false );
- add_bool( "mod-reverb", VLC_FALSE, NULL, N_("Reverb"),
- REVERB_LONGTEXT, VLC_FALSE );
+ add_bool( "mod-reverb", false, NULL, N_("Reverb"),
+ REVERB_LONGTEXT, false );
add_integer_with_range( "mod-reverb-level", 0, 0, 100, NULL,
- N_("Reverberation level"), REVERB_LEVEL_LONGTEXT, VLC_TRUE );
+ N_("Reverberation level"), REVERB_LEVEL_LONGTEXT, true );
add_integer_with_range( "mod-reverb-delay", 40, 0, 1000, NULL,
- N_("Reverberation delay"), REVERB_DELAY_LONGTEXT, VLC_TRUE );
+ N_("Reverberation delay"), REVERB_DELAY_LONGTEXT, true );
- add_bool( "mod-megabass", VLC_FALSE, NULL, N_("Mega bass"),
- MEGABASS_LONGTEXT, VLC_FALSE );
+ add_bool( "mod-megabass", false, NULL, N_("Mega bass"),
+ MEGABASS_LONGTEXT, false );
add_integer_with_range( "mod-megabass-level", 0, 0, 100, NULL,
- N_("Mega bass level"), MEGABASS_LEVEL_LONGTEXT, VLC_TRUE );
+ N_("Mega bass level"), MEGABASS_LEVEL_LONGTEXT, true );
add_integer_with_range( "mod-megabass-range", 10, 10, 100, NULL,
- N_("Mega bass cutoff"), MEGABASS_RANGE_LONGTEXT, VLC_TRUE );
+ N_("Mega bass cutoff"), MEGABASS_RANGE_LONGTEXT, true );
- add_bool( "mod-surround", VLC_FALSE, NULL, N_("Surround"), N_("Surround"),
- VLC_FALSE );
+ add_bool( "mod-surround", false, NULL, N_("Surround"), N_("Surround"),
+ false );
add_integer_with_range( "mod-surround-level", 0, 0, 100, NULL,
- N_("Surround level"), SURROUND_LEVEL_LONGTEXT, VLC_TRUE );
+ N_("Surround level"), SURROUND_LEVEL_LONGTEXT, true );
add_integer_with_range( "mod-surround-delay", 5, 0, 1000, NULL,
- N_("Surround delay (ms)"), SURROUND_DELAY_LONGTEXT, VLC_TRUE );
+ N_("Surround delay (ms)"), SURROUND_DELAY_LONGTEXT, true );
set_callbacks( Open, Close );
add_shortcut( "mod" );
static void TinyShuffle8 ( uint32_t * );
static void DoExtShuffle ( uint32_t * );
-static int GetSystemKey ( uint32_t *, vlc_bool_t );
+static int GetSystemKey ( uint32_t *, bool );
static int WriteUserKey ( void *, uint32_t * );
static int ReadUserKey ( void *, uint32_t * );
static int GetUserKey ( void *, uint32_t * );
*****************************************************************************
* Compute the system key from various system information, see HashSystemInfo.
*****************************************************************************/
-static int GetSystemKey( uint32_t *p_sys_key, vlc_bool_t b_ipod )
+static int GetSystemKey( uint32_t *p_sys_key, bool b_ipod )
{
static char const p_secret5[ 8 ] = "YuaFlafu";
static char const p_secret6[ 8 ] = "zPif98ga";
psz_ipod = getenv( "IPOD" );
- if( GetSystemKey( p_sys_key, psz_ipod ? VLC_TRUE : VLC_FALSE ) )
+ if( GetSystemKey( p_sys_key, psz_ipod ? true : false ) )
{
return -3;
}
/* now create a memory stream */
p_stream_memory =
stream_MemoryNew( VLC_OBJECT(p_stream), p_cmvd->data.p_cmvd->p_data,
- p_cmvd->data.p_cmvd->i_uncompressed_size, VLC_TRUE );
+ p_cmvd->data.p_cmvd->i_uncompressed_size, true );
/* and read uncompressd moov */
p_box->data.p_cmov->p_moov = MP4_ReadBox( p_stream_memory, NULL );
int b_ok; /* The track is usable */
int b_enable; /* is the trak enable by default */
- vlc_bool_t b_selected; /* is the trak being played */
- vlc_bool_t b_chapter; /* True when used for chapter only */
+ bool b_selected; /* is the trak being played */
+ bool b_chapter; /* True when used for chapter only */
es_format_t fmt;
es_out_id_t *p_es;
MP4_Box_t *p_stsd; /* will contain all data to initialize decoder */
MP4_Box_t *p_sample;/* point on actual sdsd */
- vlc_bool_t b_drms;
+ bool b_drms;
void *p_drms;
} mp4_track_t;
}
/* Function to lookup the currently playing item */
-static vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
+static bool FindItem( demux_t *p_demux, playlist_t *p_playlist,
playlist_item_t **pp_item );
static void LoadChapter( demux_t *p_demux );
MP4_Box_t *p_trak;
unsigned int i;
- vlc_bool_t b_seekable;
+ bool b_seekable;
/* A little test to see if it could be a mp4 */
if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) return VLC_EGENERIC;
playlist_item_t *p_current, *p_item_in_category;
int i_count = MP4_BoxCount( p_rmra, "rmda" );
int i;
- vlc_bool_t b_play = VLC_FALSE;
+ bool b_play = false;
msg_Dbg( p_demux, "detected playlist mov file (%d ref)", i_count );
if( p_playlist )
{
b_play = FindItem( p_demux, p_playlist, &p_current );
- p_item_in_category = playlist_ItemToNode( p_playlist, p_current, VLC_TRUE );
+ p_item_in_category = playlist_ItemToNode( p_playlist, p_current, true );
p_current->p_input->i_type = ITEM_TYPE_PLAYLIST;
for( i = 0; i < i_count; i++ )
playlist_BothAddInput( p_playlist, p_input,
p_item_in_category,
PLAYLIST_APPEND, PLAYLIST_END,
- NULL, NULL, VLC_FALSE );
+ NULL, NULL, false );
vlc_gc_decref( p_input );
}
}
if( b_play && p_item_in_category &&
p_item_in_category->i_children > 0 )
{
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
p_item_in_category, NULL );
}
vlc_object_release( p_playlist );
i_track++ )
{
mp4_track_t *tk = &p_sys->track[i_track];
- vlc_bool_t b;
+ bool b;
if( !tk->b_ok || tk->b_chapter ||
( tk->b_selected && tk->i_sample >= tk->i_sample_count ) )
static int TrackGotoChunkSample( demux_t *p_demux, mp4_track_t *p_track,
unsigned int i_chunk, unsigned int i_sample )
{
- vlc_bool_t b_reselect = VLC_FALSE;
+ bool b_reselect = false;
/* now see if actual es is ok */
if( (p_track->i_chunk >= p_track->i_chunk_count - 1) ||
msg_Err( p_demux, "cannot create es for track[Id 0x%x]",
p_track->i_track_ID );
- p_track->b_ok = VLC_FALSE;
- p_track->b_selected = VLC_FALSE;
+ p_track->b_ok = false;
+ p_track->b_selected = false;
return VLC_EGENERIC;
}
}
/* hint track unsupported */
/* set default value (-> track unusable) */
- p_track->b_ok = VLC_FALSE;
- p_track->b_enable = VLC_FALSE;
- p_track->b_selected = VLC_FALSE;
- p_track->b_chapter = VLC_FALSE;
+ p_track->b_ok = false;
+ p_track->b_enable = false;
+ p_track->b_selected = false;
+ p_track->b_chapter = false;
es_format_Init( &p_track->fmt, UNKNOWN_ES, 0 );
{
if( p_track->i_track_ID == p_chap->i_track_ID[i] )
{
- p_track->b_chapter = VLC_TRUE;
+ p_track->b_chapter = true;
break;
}
}
p_track->i_track_ID );
return;
}
- p_track->b_ok = VLC_TRUE;
+ p_track->b_ok = true;
#if 0
{
int i;
{
unsigned int i_chunk;
- p_track->b_ok = VLC_FALSE;
- p_track->b_enable = VLC_FALSE;
- p_track->b_selected = VLC_FALSE;
+ p_track->b_ok = false;
+ p_track->b_enable = false;
+ p_track->b_selected = false;
es_format_Clean( &p_track->fmt );
if( p_track->p_es )
{
es_out_Control( p_demux->out, ES_OUT_SET_ES_STATE,
- p_track->p_es, VLC_FALSE );
+ p_track->p_es, false );
}
- p_track->b_selected = VLC_FALSE;
+ p_track->b_selected = false;
}
static int MP4_TrackSeek( demux_t *p_demux, mp4_track_t *p_track,
if( !p_track->b_ok || p_track->b_chapter )
return VLC_EGENERIC;
- p_track->b_selected = VLC_FALSE;
+ p_track->b_selected = false;
if( TrackTimeToSampleChunk( p_demux, p_track, i_start,
&i_chunk, &i_sample ) )
return VLC_EGENERIC;
}
- p_track->b_selected = VLC_TRUE;
+ p_track->b_selected = true;
if( TrackGotoChunkSample( p_demux, p_track, i_chunk, i_sample ) ==
VLC_SUCCESS )
{
- p_track->b_selected = VLC_TRUE;
+ p_track->b_selected = true;
es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
p_track->p_es, i_start );
}
}
-static vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
+static bool FindItem( demux_t *p_demux, playlist_t *p_playlist,
playlist_item_t **pp_item )
{
input_thread_t *p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
- vlc_bool_t b_play = var_CreateGetBool( p_demux, "playlist-autostart" );
+ bool b_play = var_CreateGetBool( p_demux, "playlist-autostart" );
*pp_item = NULL;
if( p_input )
{
msg_Dbg( p_playlist, "starting playlist playback" );
*pp_item = p_playlist->status.p_item;
- b_play = VLC_TRUE;
+ b_play = true;
}
else
{
input_item_t *p_current = input_GetItem( p_input );
- *pp_item = playlist_ItemGetByInput( p_playlist, p_current, VLC_FALSE );
+ *pp_item = playlist_ItemGetByInput( p_playlist, p_current, false );
if( !*pp_item )
msg_Dbg( p_playlist, "unable to find item in playlist");
msg_Dbg( p_playlist, "not starting playlist playback");
- b_play = VLC_FALSE;
+ b_play = false;
}
vlc_object_release( p_input );
}
fmt.audio.i_bitspersample;
if( p_sys->info.peak_title > 0 )
{
- fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+ fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_TRACK] = true;
fmt.audio_replay_gain.pf_peak[AUDIO_REPLAY_GAIN_TRACK] = (float)p_sys->info.peak_title / 32767.0;
- fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+ fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_TRACK] = true;
fmt.audio_replay_gain.pf_gain[AUDIO_REPLAY_GAIN_TRACK] = (float)p_sys->info.gain_title / 100.0;
}
if( p_sys->info.peak_album > 0 )
{
- fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+ fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = true;
fmt.audio_replay_gain.pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = (float)p_sys->info.peak_album / 32767.0;
- fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+ fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = true;
fmt.audio_replay_gain.pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = (float)p_sys->info.gain_album / 100.0;
}
demux_sys_t *p_sys = p_demux->p_sys;
double f, *pf;
int64_t i64, *pi64;
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
switch( i_query )
{
case DEMUX_HAS_UNSUPPORTED_META:
- 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;
return VLC_SUCCESS;
case DEMUX_GET_LENGTH:
mpc_bool_t ReaderCanSeek( void *p_private )
{
demux_t *p_demux = (demux_t*)p_private;
- vlc_bool_t b_canseek;
+ bool b_canseek;
stream_Control( p_demux->s, STREAM_CAN_SEEK, &b_canseek );
return b_canseek;
set_subcategory( SUBCAT_INPUT_DEMUX );
set_description( _("H264 video demuxer" ) );
set_capability( "demux2", 0 );
- add_float( "h264-fps", 25.0, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_TRUE );
+ add_float( "h264-fps", 25.0, NULL, FPS_TEXT, FPS_LONGTEXT, true );
set_callbacks( Open, Close );
add_shortcut( "h264" );
vlc_module_end();
if( p_sys->p_es == NULL )
{
- p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
+ p_sys->p_packetizer->fmt_out.b_packetized = true;
p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
}
*****************************************************************************/
struct demux_sys_t
{
- vlc_bool_t b_start;
+ bool b_start;
es_out_id_t *p_es;
decoder_t *p_packetizer;
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
const uint8_t *p_peek;
- int b_forced = VLC_FALSE;
+ int b_forced = false;
if( demux2_IsPathExtension( p_demux, ".aac" ) )
- b_forced = VLC_TRUE;
+ b_forced = true;
if( !p_demux->b_force && !b_forced )
return VLC_EGENERIC;
p_demux->pf_demux = Demux;
p_demux->pf_control= Control;
p_demux->p_sys = p_sys = calloc( sizeof( demux_sys_t ), 1 );
- p_sys->b_start = VLC_TRUE;
+ p_sys->b_start = true;
/* Load the mpeg 4 audio packetizer */
INIT_APACKETIZER( p_sys->p_packetizer, 'm', 'p', '4', 'a' );
}
p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start ? M4A_PTS_START : 0;
- p_sys->b_start = VLC_FALSE;
+ p_sys->b_start = false;
while( (p_block_out = p_sys->p_packetizer->pf_packetize(
p_sys->p_packetizer, &p_block_in )) )
if( p_sys->p_es == NULL )
{
- p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
+ p_sys->p_packetizer->fmt_out.b_packetized = true;
p_sys->p_es = es_out_Add( p_demux->out,
&p_sys->p_packetizer->fmt_out);
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
demux_sys_t *p_sys = p_demux->p_sys;
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int64_t *pi64;
int i_ret;
switch( i_query )
{
case DEMUX_HAS_UNSUPPORTED_META:
- 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;
return VLC_SUCCESS;
case DEMUX_GET_TIME:
set_callbacks( Open, Close );
add_shortcut( "m4v" );
add_shortcut( "mp4v" );
- add_float( "m4v-fps", 25, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_FALSE );
+ add_float( "m4v-fps", 25, NULL, FPS_TEXT, FPS_LONGTEXT, false );
vlc_module_end();
/*****************************************************************************
if( p_sys->p_es == NULL )
{
- p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
+ p_sys->p_packetizer->fmt_out.b_packetized = true;
p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
}
{
es_out_id_t *p_es;
- vlc_bool_t b_start;
+ bool b_start;
decoder_t *p_packetizer;
mtime_t i_pts;
mtime_t i_time_offset;
int i_bitrate_avg; /* extracted from Xing header */
- vlc_bool_t b_initial_sync_failed;
+ bool b_initial_sync_failed;
int i_xing_frames;
int i_xing_bytes;
|| (((h >> 10) & 0x03) == 0x03 ) /* valide sampling freq ? */
|| ((h & 0x03) == 0x02 )) /* valid emphasis ? */
{
- return VLC_FALSE;
+ return false;
}
- return VLC_TRUE;
+ return true;
}
#define MPGA_VERSION( h ) ( 1 - (((h)>>19)&0x01) )
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
- vlc_bool_t b_forced = VLC_FALSE;
+ bool b_forced = false;
uint32_t header;
const uint8_t *p_peek;
block_t *p_block_in, *p_block_out;
if( demux2_IsPathExtension( p_demux, ".mp3" ) )
- b_forced = VLC_TRUE;
+ b_forced = true;
if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC;
if( !HeaderCheck( header = GetDWBE( p_peek ) ) )
{
- vlc_bool_t b_ok = VLC_FALSE;
+ bool b_ok = false;
int i_peek;
if( !p_demux->b_force && !b_forced ) return VLC_EGENERIC;
{
if( HeaderCheck( header = GetDWBE( p_peek ) ) )
{
- b_ok = VLC_TRUE;
+ b_ok = true;
break;
}
p_peek += 1;
DEMUX_INIT_COMMON(); p_sys = p_demux->p_sys;
memset( p_sys, 0, sizeof( demux_sys_t ) );
p_sys->p_es = 0;
- p_sys->b_start = VLC_TRUE;
+ p_sys->b_start = true;
/* Load the mpeg audio packetizer */
INIT_APACKETIZER( p_sys->p_packetizer, 'm', 'p', 'g', 'a' );
if( p_block_out == NULL )
{
msg_Dbg( p_demux, "did not sync on first block" );
- p_sys->b_initial_sync_failed = VLC_TRUE;
+ p_sys->b_initial_sync_failed = true;
}
else
- p_sys->b_initial_sync_failed = VLC_FALSE;
+ p_sys->b_initial_sync_failed = false;
p_sys->i_bitrate_avg = p_sys->p_packetizer->fmt_out.i_bitrate;
p_sys->p_block_out = p_block_out;
/* */
- p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
+ p_sys->p_packetizer->fmt_out.b_packetized = true;
p_sys->p_es = es_out_Add( p_demux->out,
&p_sys->p_packetizer->fmt_out);
return VLC_SUCCESS;
block_t *p_block_in, *p_block_out;
if( p_sys->b_start )
{
- p_sys->b_start = VLC_FALSE;
+ p_sys->b_start = false;
p_block_in = p_sys->p_block_in;
p_sys->p_block_in = NULL;
p_block_out = p_sys->p_block_out;
{
return 0;
}
- if( p_demux->p_sys->b_initial_sync_failed == VLC_TRUE )
+ if( p_demux->p_sys->b_initial_sync_failed == true )
{
p_block_in->i_pts = p_block_in->i_dts = 1;
/* Only try to resync once */
{
demux_sys_t *p_sys = p_demux->p_sys;
int64_t *pi64;
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int i_ret;
va_list args_save;
switch( i_query )
{
case DEMUX_HAS_UNSUPPORTED_META:
- 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;
return VLC_SUCCESS;
case DEMUX_GET_TIME:
*****************************************************************************/
struct demux_sys_t
{
- vlc_bool_t b_start;
+ bool b_start;
es_out_id_t *p_es;
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
- vlc_bool_t b_forced = VLC_FALSE;
+ bool b_forced = false;
const uint8_t *p_peek;
}
if( p_demux->b_force )
- b_forced = VLC_TRUE;
+ b_forced = true;
if( p_peek[0] != 0x00 || p_peek[1] != 0x00 || p_peek[2] != 0x01 )
{
p_demux->pf_demux = Demux;
p_demux->pf_control= Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
- p_sys->b_start = VLC_TRUE;
+ p_sys->b_start = true;
p_sys->p_es = NULL;
/* Load the mpegvideo packetizer */
while( (p_block_out = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer, &p_block_in )) )
{
- p_sys->b_start = VLC_FALSE;
+ p_sys->b_start = false;
while( p_block_out )
{
demux_sys_t *p_sys;
const uint8_t *p_peek;
frame_header_t fh;
- vlc_bool_t b_extended;
+ bool b_extended;
/* Check id */
if( stream_Peek( p_demux->s, &p_peek, 12 ) != 12 ||
goto error;
if( p_peek[0] == 'X' )
{
- b_extended = VLC_TRUE;
+ b_extended = true;
if( FrameHeaderLoad( p_demux, &fh ) )
goto error;
}
else
{
- b_extended = VLC_FALSE;
+ b_extended = false;
/* XXX: for now only file with extended chunk are supported
* why: because else we need to have support for rtjpeg+stupid nuv shit */
{
demux_sys_t *p_sys = p_demux->p_sys;
int64_t *pi64;
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
int i;
switch( i_query )
{
case DEMUX_HAS_UNSUPPORTED_META:
- 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;
return VLC_SUCCESS;
case DEMUX_GET_TIME:
ogg_packet *p_oggpacket )
{
block_t *p_block;
- vlc_bool_t b_selected;
+ bool b_selected;
int i_header_len = 0;
mtime_t i_pts = -1, i_interpolated_pts;
if( p_stream->b_force_backup )
{
uint8_t *p_extra;
- vlc_bool_t b_store_size = VLC_TRUE;
+ bool b_store_size = true;
p_stream->i_packets_backup++;
switch( p_stream->fmt.i_codec )
p_oggpacket->bytes -= 9;
}
}
- b_store_size = VLC_FALSE;
+ b_store_size = false;
break;
default:
p_stream->p_es, &p_stream->fmt );
}
- b_selected = VLC_FALSE; /* Discard the header packet */
+ b_selected = false; /* Discard the header packet */
}
/* Convert the pcr into a pts */
char *psz_prefix;
char *psz_data;
int64_t i_data_len;
- vlc_bool_t b_utf8;
- vlc_bool_t b_skip_ads;
+ bool b_utf8;
+ bool b_skip_ads;
};
/*****************************************************************************
p_demux->p_sys->psz_prefix = E_(FindPrefix)( p_demux );
p_demux->p_sys->psz_data = NULL;
p_demux->p_sys->i_data_len = -1;
- p_demux->p_sys->b_utf8 = VLC_FALSE;
+ p_demux->p_sys->b_utf8 = false;
p_demux->p_sys->b_skip_ads = config_GetInt( p_demux, "playlist-skip-ads" );
return VLC_SUCCESS;
demux_sys_t *p_sys = p_demux->p_sys;
char *psz_parse = NULL;
char *psz_backup = NULL;
- vlc_bool_t b_entry = VLC_FALSE;
+ bool b_entry = false;
input_item_t *p_input;
INIT_PLAYLIST_STUFF;
char *psz_moreinfo_entry = NULL;
char *psz_abstract_entry = NULL;
int i_entry_count = 0;
- vlc_bool_t b_skip_entry = VLC_FALSE;
+ bool b_skip_entry = false;
char *psz_href = NULL;
int i_starttime = 0;
}
else if( !strncasecmp( psz_parse, "<PARAM ", 7 ) )
{
- vlc_bool_t b_encoding_flag = VLC_FALSE;
+ bool b_encoding_flag = false;
psz_parse = SkipBlanks(psz_parse+7, (unsigned)-1);
if( !strncasecmp( psz_parse, "name", 4 ) )
{
memcpy( psz_string, psz_backup, i_strlen );
psz_string[i_strlen] = '\0';
msg_Dbg( p_demux, "param value: %s", psz_string);
- if( b_encoding_flag && !strcasecmp( psz_string, "utf-8" ) ) p_sys->b_utf8 = VLC_TRUE;
+ if( b_encoding_flag && !strcasecmp( psz_string, "utf-8" ) ) p_sys->b_utf8 = true;
free( psz_string );
}
else continue;
FREENULL( psz_copyright_entry );
FREENULL( psz_moreinfo_entry );
FREENULL( psz_abstract_entry );
- b_entry = VLC_FALSE;
+ b_entry = false;
}
else if( !strncasecmp( psz_parse, "<Entry", 6 ) )
{
continue;
}
i_entry_count += 1;
- b_entry = VLC_TRUE;
+ b_entry = true;
psz_clientskip = strcasestr( psz_parse, "clientskip=\"no\"" );
psz_parse = strcasestr( psz_parse, ">" );
if( *psz_string != ' ' && *psz_string != '\t' && *psz_string != '\r' &&
*psz_string != '\n' )
{
- return VLC_FALSE;
+ return false;
}
psz_string++;
}
- return VLC_TRUE;
+ return true;
}
demux_t *p_demux = (demux_t *)p_this;
const uint8_t *p_peek;
int i_peek;
- vlc_bool_t b_valid = VLC_FALSE;
+ bool b_valid = false;
if( !demux2_IsPathExtension( p_demux, ".conf" ) && !p_demux->b_force )
return VLC_EGENERIC;
}
psz_line[i] = 0;
- if( ParseLine( psz_line, 0, 0, 0 ) ) b_valid = VLC_TRUE;
+ if( ParseLine( psz_line, 0, 0, 0 ) ) b_valid = true;
}
if( !b_valid ) return VLC_EGENERIC;
{
char *psz_name = 0, *psz_parse = psz_line;
int i_count = 0, i_program = 0, i_frequency = 0;
- vlc_bool_t b_valid = VLC_FALSE;
+ bool b_valid = false;
if( pppsz_options ) *pppsz_options = 0;
if( pi_options ) *pi_options = 0;
*psz_parse == '\n' || *psz_parse == '\r' ) psz_parse++;
/* Ignore comments */
- if( *psz_parse == '#' ) return VLC_FALSE;
+ if( *psz_parse == '#' ) return false;
while( psz_parse )
{
/* If we recognize one of the strings, then we are sure
* the data is really valid (ie. a channels file). */
- b_valid = VLC_TRUE;
+ b_valid = true;
break;
}
}
int E_(Import_GVP)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
- int i_peek, i, b_found = VLC_FALSE;
+ int i_peek, i, b_found = false;
const byte_t *p_peek;
i_peek = stream_Peek( p_demux->s, &p_peek, MAX_LINE );
if( p_peek[i] == 'g' && p_peek[i+1] == 'v' && p_peek[i+2] == 'p' &&
!memcmp( p_peek+i, "gvp_version:", sizeof("gvp_version:") - 1 ) )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
/**
* \brief parse the root node of the playlist
*/
-static vlc_bool_t parse_plist_node COMPLEX_INTERFACE
+static bool parse_plist_node COMPLEX_INTERFACE
{
VLC_UNUSED(p_track); VLC_UNUSED(psz_element);
char *psz_name = NULL;
char *psz_value = NULL;
- vlc_bool_t b_version_found = VLC_FALSE;
+ bool b_version_found = false;
/* read all playlist attributes */
while( xml_ReaderNextAttr( p_xml_reader ) == VLC_SUCCESS )
{
msg_Err( p_demux, "invalid xml stream @ <plist>" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* attribute: version */
if( !strcmp( psz_name, "version" ) )
{
- b_version_found = VLC_TRUE;
+ b_version_found = true;
if( strcmp( psz_value, "1.0" ) )
msg_Warn( p_demux, "unsupported iTunes Media Library version" );
}
* \brief parse a <dict>
* \param COMPLEX_INTERFACE
*/
-static vlc_bool_t parse_dict COMPLEX_INTERFACE
+static bool parse_dict COMPLEX_INTERFACE
{
int i_node;
char *psz_name = NULL;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
/* choose handler */
for( p_handler = p_handlers;
{
msg_Err( p_demux, "unexpected element <%s>", psz_name );
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
/* complex content is parsed in a separate function */
else
{
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
/* leave if the current parent node <track> is terminated */
if( !strcmp( psz_name, psz_element ) )
{
FREE_ATT_KEY();
- return VLC_TRUE;
+ return true;
}
/* there MUST have been a start tag for that element name */
if( !p_handler || !p_handler->name
msg_Err( p_demux, "there's no open element left for <%s>",
psz_name );
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
/* special case: key */
if( !strcmp( p_handler->name, "key" ) )
/* unknown/unexpected xml node */
msg_Err( p_demux, "unexpected xml node %i", i_node );
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
}
msg_Err( p_demux, "unexpected end of xml data" );
FREE_ATT_KEY();
- return VLC_FALSE;
+ return false;
}
-static vlc_bool_t parse_plist_dict COMPLEX_INTERFACE
+static bool parse_plist_dict COMPLEX_INTERFACE
{
VLC_UNUSED(p_track); VLC_UNUSED(psz_element); VLC_UNUSED(p_handlers);
xml_elem_hnd_t pl_elements[] =
"dict", pl_elements );
}
-static vlc_bool_t parse_tracks_dict COMPLEX_INTERFACE
+static bool parse_tracks_dict COMPLEX_INTERFACE
{
VLC_UNUSED(p_track); VLC_UNUSED(psz_element); VLC_UNUSED(p_handlers);
xml_elem_hnd_t tracks_elements[] =
msg_Info( p_demux, "added %i tracks successfully",
p_demux->p_sys->i_ntracks );
- return VLC_TRUE;
+ return true;
}
-static vlc_bool_t parse_track_dict COMPLEX_INTERFACE
+static bool parse_track_dict COMPLEX_INTERFACE
{
VLC_UNUSED(psz_element); VLC_UNUSED(p_handlers);
input_item_t *p_new_input = NULL;
{
msg_Err( p_demux, "Track needs Location" );
free_track( p_track );
- return VLC_FALSE;
+ return false;
}
psz_uri = decode_URI_duplicate( p_track->location );
free( p_track );
}
-static vlc_bool_t save_data SIMPLE_INTERFACE
+static bool save_data SIMPLE_INTERFACE
{
/* exit if setting is impossible */
if( !psz_name || !psz_value || !p_track )
- return VLC_FALSE;
+ return false;
/* re-convert xml special characters inside psz_value */
resolve_xml_special_chars( psz_value );
long i_num = atol( psz_value );
p_track->duration = (mtime_t) i_num*1000;
}
- return VLC_TRUE;
+ return true;
}
/**
* \brief handles the supported <track> sub-elements
*/
-static vlc_bool_t add_meta( input_item_t *p_input_item,
+static bool add_meta( input_item_t *p_input_item,
track_elem_t *p_track )
{
/* exit if setting is impossible */
if( !p_input_item || !p_track )
- return VLC_FALSE;
+ return false;
#define SET_INFO( func, prop ) \
if( p_track->prop ) { func( p_input_item, p_track->prop ); }
SET_INFO( input_item_SetGenre, genre )
SET_INFO( input_item_SetTrackNum, trackNum )
SET_INFO( input_item_SetDuration, duration )
- return VLC_TRUE;
+ return true;
}
/**
* \brief skips complex element content that we can't manage
*/
-static vlc_bool_t skip_element COMPLEX_INTERFACE
+static bool skip_element COMPLEX_INTERFACE
{
VLC_UNUSED(p_demux); VLC_UNUSED(p_playlist); VLC_UNUSED(p_input_item);
VLC_UNUSED(p_track); VLC_UNUSED(p_handlers);
{
psz_endname = xml_ReaderName( p_xml_reader );
if( !psz_endname )
- return VLC_FALSE;
+ return false;
if( !strcmp( psz_element, psz_endname ) )
{
free( psz_endname );
- return VLC_TRUE;
+ return true;
}
else
free( psz_endname );
}
}
- return VLC_FALSE;
+ return false;
}
int type;
union
{
- vlc_bool_t (*smpl) SIMPLE_INTERFACE;
- vlc_bool_t (*cmplx) COMPLEX_INTERFACE;
+ bool (*smpl) SIMPLE_INTERFACE;
+ bool (*cmplx) COMPLEX_INTERFACE;
} pf_handler;
};
typedef struct xml_elem_hnd xml_elem_hnd_t;
/* prototypes */
-static vlc_bool_t parse_plist_node COMPLEX_INTERFACE;
-static vlc_bool_t skip_element COMPLEX_INTERFACE;
-static vlc_bool_t parse_dict COMPLEX_INTERFACE;
-static vlc_bool_t parse_plist_dict COMPLEX_INTERFACE;
-static vlc_bool_t parse_tracks_dict COMPLEX_INTERFACE;
-static vlc_bool_t parse_track_dict COMPLEX_INTERFACE;
-static vlc_bool_t save_data SIMPLE_INTERFACE;
-static vlc_bool_t add_meta( input_item_t*, track_elem_t* );
+static bool parse_plist_node COMPLEX_INTERFACE;
+static bool skip_element COMPLEX_INTERFACE;
+static bool parse_dict COMPLEX_INTERFACE;
+static bool parse_plist_dict COMPLEX_INTERFACE;
+static bool parse_tracks_dict COMPLEX_INTERFACE;
+static bool parse_track_dict COMPLEX_INTERFACE;
+static bool save_data SIMPLE_INTERFACE;
+static bool add_meta( input_item_t*, track_elem_t* );
static track_elem_t *new_track( void );
static void free_track( track_elem_t* );
mtime_t i_duration = -1;
const char**ppsz_options = NULL;
int i_options = 0;
- vlc_bool_t b_cleanup = VLC_FALSE;
+ bool b_cleanup = false;
input_item_t *p_input;
INIT_PLAYLIST_STUFF;
psz_mrl = E_(ProcessMRL)( psz_parse, p_demux->p_sys->psz_prefix );
MaybeFromLocaleRep( &psz_mrl );
- b_cleanup = VLC_TRUE;
+ b_cleanup = true;
if( !psz_mrl ) goto error;
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
/* Fetch another line */
free( psz_line );
psz_line = stream_ReadLine( p_demux->s );
- if( !psz_line ) b_cleanup = VLC_TRUE;
+ if( !psz_line ) b_cleanup = true;
if( b_cleanup )
{
i_parsed_duration = 0;
i_duration = -1;
- b_cleanup = VLC_FALSE;
+ b_cleanup = false;
}
}
HANDLE_PLAY_AND_RELEASE;
set_subcategory( SUBCAT_INPUT_DEMUX );
add_bool( "playlist-autostart", 1, NULL,
- AUTOSTART_TEXT, AUTOSTART_LONGTEXT, VLC_FALSE );
+ AUTOSTART_TEXT, AUTOSTART_LONGTEXT, false );
- add_integer( "parent-item", 0, NULL, NULL, NULL, VLC_TRUE );
+ add_integer( "parent-item", 0, NULL, NULL, NULL, true );
change_internal();
add_bool( "playlist-skip-ads", 1, NULL,
- SKIP_ADS_TEXT, SKIP_ADS_LONGTEXT, VLC_FALSE );
+ SKIP_ADS_TEXT, SKIP_ADS_LONGTEXT, false );
set_shortname( _("Playlist") );
set_description( _("Playlist") );
add_shortcut( "shout-winamp" );
set_capability( "demux2", 10 );
set_callbacks( E_(Import_Shoutcast), E_(Close_Shoutcast) );
- add_bool( "shoutcast-show-adult", VLC_FALSE, NULL,
- SHOW_ADULT_TEXT, SHOW_ADULT_LONGTEXT, VLC_FALSE );
+ add_bool( "shoutcast-show-adult", false, NULL,
+ SHOW_ADULT_TEXT, SHOW_ADULT_LONGTEXT, false );
add_submodule();
set_description( _("ASX playlist import") );
add_shortcut( "asx-open" );
char *E_(ProcessMRL)( char *, char * );
char *E_(FindPrefix)( demux_t * );
-vlc_bool_t E_(FindItem)( demux_t *, playlist_t *, playlist_item_t **);
+bool E_(FindItem)( demux_t *, playlist_t *, playlist_item_t **);
void E_(AddToPlaylist)( demux_t *, playlist_t*,input_item_t*,playlist_item_t*,int );
{
demux_sys_t *p_sys = p_demux->p_sys;
- vlc_bool_t b_item = VLC_FALSE;
- vlc_bool_t b_image = VLC_FALSE;
+ bool b_item = false;
+ bool b_image = false;
int i_ret;
xml_t *p_xml;
if( !strcmp( psz_elname, "item" ) )
{
- b_item = VLC_TRUE;
+ b_item = true;
}
else if( !strcmp( psz_elname, "image" ) )
{
- b_item = VLC_TRUE;
+ b_item = true;
}
// Read the attributes
}
case XML_READER_TEXT:
{
-#define SET_DATA( field, name ) else if( b_item == VLC_TRUE \
+#define SET_DATA( field, name ) else if( b_item == true \
&& !strcmp( psz_elname, name ) ) \
{ \
field = strdup( psz_text ); \
}
char *psz_text = xml_ReaderValue( p_xml_reader );
/* item specific meta data */
- if( b_item == VLC_TRUE && !strcmp( psz_elname, "title" ) )
+ if( b_item == true && !strcmp( psz_elname, "title" ) )
{
psz_item_name = strdup( psz_text );
}
- else if( b_item == VLC_TRUE
+ else if( b_item == true
&& ( !strcmp( psz_elname, "itunes:author" )
||!strcmp( psz_elname, "author" ) ) )
{ /* <author> isn't standard iTunes podcast stuff */
psz_item_author = strdup( psz_text );
}
- else if( b_item == VLC_TRUE
+ else if( b_item == true
&& ( !strcmp( psz_elname, "itunes:summary" )
||!strcmp( psz_elname, "description" ) ) )
{ /* <description> isn't standard iTunes podcast stuff */
SET_DATA( psz_item_keywords, "itunes:keywords" )
SET_DATA( psz_item_subtitle, "itunes:subtitle" )
/* toplevel meta data */
- else if( b_item == VLC_FALSE && b_image == VLC_FALSE
+ else if( b_item == false && b_image == false
&& !strcmp( psz_elname, "title" ) )
{
input_item_SetName( p_current_input, psz_text );
ADD_GINFO( "Podcast Keywords", "itunes:keywords" )
ADD_GINFO( "Podcast Subtitle", "itunes:subtitle" )
#undef ADD_GINFO
- else if( b_item == VLC_FALSE && b_image == VLC_FALSE
+ else if( b_item == false && b_image == false
&& ( !strcmp( psz_elname, "itunes:summary" )
||!strcmp( psz_elname, "description" ) ) )
{ /* <description> isn't standard iTunes podcast stuff */
FREENULL( psz_item_keywords );
FREENULL( psz_item_subtitle );
FREENULL( psz_item_summary );
- b_item = VLC_FALSE;
+ b_item = false;
}
else if( !strcmp( psz_elname, "image" ) )
{
- b_image = VLC_FALSE;
+ b_image = false;
}
free( psz_elname );
psz_elname = strdup("");
input_item_t *p_input;
/* List of all possible attributes. The only required one is "src" */
- vlc_bool_t b_autoplay = VLC_FALSE;
- vlc_bool_t b_controler = VLC_TRUE;
- qtl_fullscreen_t fullscreen = VLC_FALSE;
+ bool b_autoplay = false;
+ bool b_controler = true;
+ qtl_fullscreen_t fullscreen = false;
char *psz_href = NULL;
- vlc_bool_t b_kioskmode = VLC_FALSE;
+ bool b_kioskmode = false;
qtl_loop_t loop = LOOP_FALSE;
int i_movieid = -1;
char *psz_moviename = NULL;
- vlc_bool_t b_playeveryframe = VLC_FALSE;
+ bool b_playeveryframe = false;
char *psz_qtnext = NULL;
- vlc_bool_t b_quitwhendone = VLC_FALSE;
+ bool b_quitwhendone = false;
char *psz_src = NULL;
char *psz_mimetype = NULL;
int i_volume = 100;
{
if( !strcmp( psz_attrvalue, "true" ) )
{
- b_autoplay = VLC_TRUE;
+ b_autoplay = true;
}
else
{
- b_autoplay = VLC_FALSE;
+ b_autoplay = false;
}
}
else if( !strcmp( psz_attrname, "controler" ) )
{
if( !strcmp( psz_attrvalue, "false" ) )
{
- b_controler = VLC_FALSE;
+ b_controler = false;
}
else
{
- b_controler = VLC_TRUE;
+ b_controler = true;
}
}
else if( !strcmp( psz_attrname, "fullscreen" ) )
{
if( !strcmp( psz_attrvalue, "true" ) )
{
- b_kioskmode = VLC_TRUE;
+ b_kioskmode = true;
}
else
{
- b_kioskmode = VLC_FALSE;
+ b_kioskmode = false;
}
}
else if( !strcmp( psz_attrname, "loop" ) )
{
if( !strcmp( psz_attrvalue, "true" ) )
{
- b_playeveryframe = VLC_TRUE;
+ b_playeveryframe = true;
}
else
{
- b_playeveryframe = VLC_FALSE;
+ b_playeveryframe = false;
}
}
else if( !strcmp( psz_attrname, "qtnext" ) )
{
if( !strcmp( psz_attrvalue, "true" ) )
{
- b_quitwhendone = VLC_TRUE;
+ b_quitwhendone = true;
}
else
{
- b_quitwhendone = VLC_FALSE;
+ b_quitwhendone = false;
}
}
else if( !strcmp( psz_attrname, "src" ) )
}
msg_Dbg( p_demux, "autoplay: %s (unused by VLC)",
- b_autoplay==VLC_TRUE ? "true": "false" );
+ b_autoplay==true ? "true": "false" );
msg_Dbg( p_demux, "controler: %s (unused by VLC)",
- b_controler==VLC_TRUE?"true": "false" );
+ b_controler==true?"true": "false" );
msg_Dbg( p_demux, "fullscreen: %s (unused by VLC)",
ppsz_fullscreen[fullscreen] );
msg_Dbg( p_demux, "href: %s", psz_href );
msg_Dbg( p_demux, "kioskmode: %s (unused by VLC)",
- b_kioskmode==VLC_TRUE?"true":"false" );
+ b_kioskmode==true?"true":"false" );
msg_Dbg( p_demux, "loop: %s (unused by VLC)", ppsz_loop[loop] );
msg_Dbg( p_demux, "movieid: %d (unused by VLC)", i_movieid );
msg_Dbg( p_demux, "moviename: %s", psz_moviename );
msg_Dbg( p_demux, "playeverframe: %s (unused by VLC)",
- b_playeveryframe==VLC_TRUE?"true":"false" );
+ b_playeveryframe==true?"true":"false" );
msg_Dbg( p_demux, "qtnext: %s", psz_qtnext );
msg_Dbg( p_demux, "quitwhendone: %s (unused by VLC)",
- b_quitwhendone==VLC_TRUE?"true":"false" );
+ b_quitwhendone==true?"true":"false" );
msg_Dbg( p_demux, "src: %s", psz_src );
msg_Dbg( p_demux, "mimetype: %s", psz_mimetype );
msg_Dbg( p_demux, "volume: %d (unused by VLC)", i_volume );
mtime_t i_duration; /* sgiDuration= */
int i_port; /* sgiRtspPort= */
int i_sid; /* sgiSid= */
- vlc_bool_t b_concert; /* DeliveryService=cds */
- vlc_bool_t b_rtsp_kasenna; /* kasenna style RTSP */
+ bool b_concert; /* DeliveryService=cds */
+ bool b_rtsp_kasenna; /* kasenna style RTSP */
};
static int Demux ( demux_t *p_demux );
p_demux->p_sys->i_duration = 0;
p_demux->p_sys->i_port = 0;
p_demux->p_sys->i_sid = 0;
- p_demux->p_sys->b_rtsp_kasenna = VLC_FALSE;
- p_demux->p_sys->b_concert = VLC_FALSE;
+ p_demux->p_sys->b_rtsp_kasenna = false;
+ p_demux->p_sys->b_concert = false;
return VLC_SUCCESS;
}
{
psz_bol += sizeof("sgiFormatName=") - 1;
if( strcasestr( psz_bol, "MPEG-4") == NULL ) /*not mpeg4 found in string */
- p_sys->b_rtsp_kasenna = VLC_TRUE;
+ p_sys->b_rtsp_kasenna = true;
}
else if( !strncasecmp( psz_bol, "sgiMulticastAddress=", sizeof("sgiMulticastAddress=") - 1 ) )
{
}
else if( !strncasecmp( psz_bol, "DeliveryService=cds", sizeof("DeliveryService=cds") - 1 ) )
{
- p_sys->b_concert = VLC_TRUE;
+ p_sys->b_concert = true;
}
else
{
xml_t *p_xml;
xml_reader_t *p_xml_reader;
- vlc_bool_t b_adult;
+ bool b_adult;
};
/* duplicate from modules/services_discovery/shout.c */
* \param p_xml_reader xml reader instance
* \param psz_element name of element to parse
*/
-static vlc_bool_t parse_playlist_node COMPLEX_INTERFACE
+static bool parse_playlist_node COMPLEX_INTERFACE
{
char *psz_name=NULL;
char *psz_value=NULL;
- vlc_bool_t b_version_found = VLC_FALSE;
+ bool b_version_found = false;
int i_node;
xml_elem_hnd_t *p_handler=NULL;
{
msg_Err( p_demux, "invalid xml stream @ <playlist>" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* attribute: version */
if( !strcmp( psz_name, "version" ) )
{
- b_version_found = VLC_TRUE;
+ b_version_found = true;
if( strcmp( psz_value, "0" ) && strcmp( psz_value, "1" ) )
msg_Warn( p_demux, "unsupported XSPF version" );
}
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* choose handler */
for( p_handler = pl_elements;
{
msg_Err( p_demux, "unexpected element <%s>", psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
/* complex content is parsed in a separate function */
else
{
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* leave if the current parent node <playlist> is terminated */
if( !strcmp( psz_name, psz_element ) )
{
FREE_ATT();
- return VLC_TRUE;
+ return true;
}
/* there MUST have been a start tag for that element name */
if( !p_handler || !p_handler->name
msg_Err( p_demux, "there's no open element left for <%s>",
psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
if( p_handler->pf_handler.smpl )
/* unknown/unexpected xml node */
msg_Err( p_demux, "unexpected xml node %i", i_node );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
}
- return VLC_FALSE;
+ return false;
}
/**
* \brief parses the tracklist node which only may contain <track>s
*/
-static vlc_bool_t parse_tracklist_node COMPLEX_INTERFACE
+static bool parse_tracklist_node COMPLEX_INTERFACE
{
VLC_UNUSED(psz_element);
char *psz_name=NULL;
{
msg_Err( p_demux, "unexpected end of xml data" );
FREE_NAME();
- return VLC_FALSE;
+ return false;
}
if( strcmp( psz_name, "track") )
{
msg_Err( p_demux, "unexpected child of <trackList>: <%s>",
psz_name );
FREE_NAME();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
/* parse the track data in a separate function */
if( parse_track_node( p_demux, p_playlist, p_input_item,
- p_xml_reader,"track" ) == VLC_TRUE )
+ p_xml_reader,"track" ) == true )
i_ntracks++;
}
else if( i_node == XML_READER_ENDELEM )
{
msg_Err( p_demux, "there's a missing </trackList>" );
FREE_NAME();
- return VLC_FALSE;
+ return false;
}
psz_name = xml_ReaderName( p_xml_reader );
if( !psz_name || strcmp( psz_name, "trackList" ) )
{
msg_Err( p_demux, "expected: </trackList>, found: </%s>", psz_name );
FREE_NAME();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
msg_Dbg( p_demux, "parsed %i tracks successfully", i_ntracks );
- return VLC_TRUE;
+ return true;
}
/**
* \brief parse one track element
* \param COMPLEX_INTERFACE
*/
-static vlc_bool_t parse_track_node COMPLEX_INTERFACE
+static bool parse_track_node COMPLEX_INTERFACE
{
input_item_t *p_new_input = NULL;
int i_node;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* choose handler */
for( p_handler = track_elements;
{
msg_Err( p_demux, "unexpected element <%s>", psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
/* complex content is parsed in a separate function */
"at <%s> level no new item has been allocated",
p_handler->name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
if( p_handler->pf_handler.cmplx( p_demux,
p_playlist,
else
{
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* leave if the current parent node <track> is terminated */
if( !strcmp( psz_name, psz_element ) )
p_demux->p_sys->i_tracklist_entries,
p_new_input );
}
- return VLC_TRUE;
+ return true;
}
/* there MUST have been a start tag for that element name */
if( !p_handler || !p_handler->name
msg_Err( p_demux, "there's no open element left for <%s>",
psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* special case: location */
msg_Err( p_demux, "item <%s> already created",
psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
psz_uri = decode_URI_duplicate( psz_value );
if( !psz_tmp )
{
msg_Err( p_demux, "out of memory");
- return VLC_FALSE;
+ return false;
}
sprintf( psz_tmp, "%s%s",
p_demux->p_sys->psz_base, psz_uri );
else
{
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
}
else if( !strcmp( p_handler->name, "identifier" ) )
msg_Err( p_demux, "item not yet created at <%s>",
psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
if( p_handler->pf_handler.smpl )
{
/* unknown/unexpected xml node */
msg_Err( p_demux, "unexpected xml node %i", i_node );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
}
msg_Err( p_demux, "unexpected end of xml data" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/**
* \brief handles the supported <track> sub-elements
*/
-static vlc_bool_t set_item_info SIMPLE_INTERFACE
+static bool set_item_info SIMPLE_INTERFACE
{
/* exit if setting is impossible */
if( !psz_name || !psz_value || !p_input )
- return VLC_FALSE;
+ return false;
/* re-convert xml special characters inside psz_value */
input_item_SetArtURL( p_input, psz_uri );
free( psz_uri );
}
- return VLC_TRUE;
+ return true;
}
/**
* \brief parse the extension node of a XSPF playlist
*/
-static vlc_bool_t parse_extension_node COMPLEX_INTERFACE
+static bool parse_extension_node COMPLEX_INTERFACE
{
char *psz_name = NULL;
char *psz_value = NULL;
{
msg_Err( p_demux, "invalid xml stream @ <node>" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* attribute: title */
if( !strcmp( psz_name, "title" ) )
if( !psz_title )
{
msg_Warn( p_demux, "<node> requires \"title\" attribute" );
- return VLC_FALSE;
+ return false;
}
p_new_input = input_ItemNewWithType( VLC_OBJECT( p_playlist ), "vlc://nop",
psz_title, 0, NULL, -1, ITEM_TYPE_DIRECTORY );
if( !psz_application )
{
msg_Warn( p_demux, "<extension> requires \"application\" attribute" );
- return VLC_FALSE;
+ return false;
}
else if( strcmp( psz_application, "http://www.videolan.org/vlc/playlist/0" ) )
{
msg_Dbg( p_demux, "Skipping \"%s\" extension tag", psz_application );
free( psz_application );
- return VLC_FALSE;
+ return false;
}
}
free( psz_application );
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* choose handler */
for( p_handler = pl_elements;
{
msg_Err( p_demux, "unexpected element <%s>", psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
/* complex content is parsed in a separate function */
else
{
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
break;
{
msg_Err( p_demux, "invalid xml stream" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* leave if the current parent node is terminated */
if( !strcmp( psz_name, psz_element ) )
{
FREE_ATT();
- return VLC_TRUE;
+ return true;
}
/* there MUST have been a start tag for that element name */
if( !p_handler || !p_handler->name
msg_Err( p_demux, "there's no open element left for <%s>",
psz_name );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
if( p_handler->pf_handler.smpl )
/* unknown/unexpected xml node */
msg_Err( p_demux, "unexpected xml node %i", i_node );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
FREE_NAME();
}
- return VLC_FALSE;
+ return false;
}
/**
* \brief parse the extension item node of a XSPF playlist
*/
-static vlc_bool_t parse_extitem_node COMPLEX_INTERFACE
+static bool parse_extitem_node COMPLEX_INTERFACE
{
VLC_UNUSED(p_playlist); VLC_UNUSED(psz_element);
input_item_t *p_new_input = NULL;
{
msg_Err( p_demux, "invalid xml stream @ <item>" );
FREE_ATT();
- return VLC_FALSE;
+ return false;
}
/* attribute: href */
if( !strcmp( psz_name, "href" ) )
if( i_href < 0 )
{
msg_Warn( p_demux, "<item> requires \"href\" attribute" );
- return VLC_FALSE;
+ return false;
}
if( i_href >= p_demux->p_sys->i_tracklist_entries )
{
msg_Warn( p_demux, "invalid \"href\" attribute" );
- return VLC_FALSE;
+ return false;
}
p_new_input = p_demux->p_sys->pp_tracklist[ i_href ];
/* (libxml sends NONE) */
xml_ReaderRead( p_xml_reader );
- return VLC_TRUE;
+ return true;
}
/**
* \brief skips complex element content that we can't manage
*/
-static vlc_bool_t skip_element COMPLEX_INTERFACE
+static bool skip_element COMPLEX_INTERFACE
{
VLC_UNUSED(p_demux); VLC_UNUSED(p_playlist); VLC_UNUSED(p_input_item);
char *psz_endname;
{
psz_endname = xml_ReaderName( p_xml_reader );
if( !psz_endname )
- return VLC_FALSE;
+ return false;
if( !strcmp( psz_element, psz_endname ) )
{
free( psz_endname );
- return VLC_TRUE;
+ return true;
}
else
free( psz_endname );
}
}
- return VLC_FALSE;
+ return false;
}
const char *psz_element)
/* prototypes */
-static vlc_bool_t parse_playlist_node COMPLEX_INTERFACE;
-static vlc_bool_t parse_tracklist_node COMPLEX_INTERFACE;
-static vlc_bool_t parse_track_node COMPLEX_INTERFACE;
-static vlc_bool_t parse_extension_node COMPLEX_INTERFACE;
-static vlc_bool_t parse_extitem_node COMPLEX_INTERFACE;
-static vlc_bool_t set_item_info SIMPLE_INTERFACE;
-static vlc_bool_t skip_element COMPLEX_INTERFACE;
+static bool parse_playlist_node COMPLEX_INTERFACE;
+static bool parse_tracklist_node COMPLEX_INTERFACE;
+static bool parse_track_node COMPLEX_INTERFACE;
+static bool parse_extension_node COMPLEX_INTERFACE;
+static bool parse_extitem_node COMPLEX_INTERFACE;
+static bool set_item_info SIMPLE_INTERFACE;
+static bool skip_element COMPLEX_INTERFACE;
/* datatypes */
typedef struct
int type;
union
{
- vlc_bool_t (*smpl) SIMPLE_INTERFACE;
- vlc_bool_t (*cmplx) COMPLEX_INTERFACE;
+ bool (*smpl) SIMPLE_INTERFACE;
+ bool (*cmplx) COMPLEX_INTERFACE;
} pf_handler;
} xml_elem_hnd_t;
set_callbacks( OpenForce, Close );
add_shortcut( "ps" );
- add_bool( "ps-trust-timestamps", VLC_TRUE, NULL, TIME_TEXT,
- TIME_LONGTEXT, VLC_TRUE );
+ add_bool( "ps-trust-timestamps", true, NULL, TIME_TEXT,
+ TIME_LONGTEXT, true );
add_submodule();
set_description( _("MPEG-PS demuxer") );
int i_time_track;
int64_t i_current_pts;
- vlc_bool_t b_lost_sync;
- vlc_bool_t b_have_pack;
- vlc_bool_t b_seekable;
+ bool b_lost_sync;
+ bool b_have_pack;
+ bool b_seekable;
};
static int Demux ( demux_t *p_demux );
/*****************************************************************************
* Open
*****************************************************************************/
-static int OpenCommon( vlc_object_t *p_this, vlc_bool_t b_force )
+static int OpenCommon( vlc_object_t *p_this, bool b_force )
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
p_sys->i_current_pts = (mtime_t) 0;
p_sys->i_time_track = -1;
- p_sys->b_lost_sync = VLC_FALSE;
- p_sys->b_have_pack = VLC_FALSE;
- p_sys->b_seekable = VLC_FALSE;
+ p_sys->b_lost_sync = false;
+ p_sys->b_have_pack = false;
+ p_sys->b_seekable = false;
stream_Control( p_demux->s, STREAM_CAN_SEEK, &p_sys->b_seekable );
static int OpenForce( vlc_object_t *p_this )
{
- return OpenCommon( p_this, VLC_TRUE );
+ return OpenCommon( p_this, true );
}
static int Open( vlc_object_t *p_this )
free( p_sys );
}
-static int Demux2( demux_t *p_demux, vlc_bool_t b_end )
+static int Demux2( demux_t *p_demux, bool b_end )
{
demux_sys_t *p_sys = p_demux->p_sys;
int i_ret, i_id;
if( !p_sys->b_lost_sync )
msg_Warn( p_demux, "garbage at input, trying to resync..." );
- p_sys->b_lost_sync = VLC_TRUE;
+ p_sys->b_lost_sync = true;
return 1;
}
if( p_sys->b_lost_sync ) msg_Warn( p_demux, "found sync code" );
- p_sys->b_lost_sync = VLC_FALSE;
+ p_sys->b_lost_sync = false;
if( ( p_pkt = ps_pkt_read( p_demux->s, i_code ) ) == NULL )
{
/* Check beginning */
i = 0;
i_current_pos = stream_Tell( p_demux->s );
- while( !p_demux->b_die && i < 40 && Demux2( p_demux, VLC_FALSE ) > 0 ) i++;
+ while( !p_demux->b_die && i < 40 && Demux2( p_demux, false ) > 0 ) i++;
/* Check end */
i_size = stream_Size( p_demux->s );
i_end = __MAX( 0, __MIN( 200000, i_size ) );
stream_Seek( p_demux->s, i_size - i_end );
- while( !p_demux->b_die && Demux2( p_demux, VLC_TRUE ) > 0 );
+ while( !p_demux->b_die && Demux2( p_demux, true ) > 0 );
if( i_current_pos >= 0 ) stream_Seek( p_demux->s, i_current_pos );
}
if( !p_sys->b_lost_sync )
msg_Warn( p_demux, "garbage at input, trying to resync..." );
- p_sys->b_lost_sync = VLC_TRUE;
+ p_sys->b_lost_sync = true;
return 1;
}
if( p_sys->b_lost_sync ) msg_Warn( p_demux, "found sync code" );
- p_sys->b_lost_sync = VLC_FALSE;
+ p_sys->b_lost_sync = false;
if( p_sys->i_length < 0 && p_sys->b_seekable )
FindLength( p_demux );
case 0x1ba:
if( !ps_pkt_parse_pack( p_pkt, &p_sys->i_scr, &i_mux_rate ) )
{
- if( !p_sys->b_have_pack ) p_sys->b_have_pack = VLC_TRUE;
+ if( !p_sys->b_have_pack ) p_sys->b_have_pack = true;
/* done later on to work around bad vcd/svcd streams */
/* es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_scr ); */
if( i_mux_rate > 0 ) p_sys->i_mux_rate = i_mux_rate;
default:
if( (i_id = ps_pkt_id( p_pkt )) >= 0xc0 )
{
- vlc_bool_t b_new = VLC_FALSE;
+ bool b_new = false;
ps_track_t *tk = &p_sys->tk[PS_ID_TO_TK(i_id)];
if( !tk->b_seen )
if( !ps_track_fill( tk, &p_sys->psm, i_id ) )
{
tk->es = es_out_Add( p_demux->out, &tk->fmt );
- b_new = VLC_TRUE;
+ b_new = true;
}
else
{
msg_Dbg( p_demux, "es id=0x%x format unknown", i_id );
}
- tk->b_seen = VLC_TRUE;
+ tk->b_seen = true;
}
/* The popular VCD/SVCD subtitling WinSubMux does not
typedef struct
{
- vlc_bool_t b_seen;
+ bool b_seen;
int i_skip;
int i_id;
es_out_id_t *es;
int i;
for( i = 0; i < PS_TK_COUNT; i++ )
{
- tk[i].b_seen = VLC_FALSE;
+ tk[i].b_seen = false;
tk[i].i_skip = 0;
tk[i].i_id = 0;
tk[i].es = NULL;
}
/* PES packets usually contain truncated frames */
- tk->fmt.b_packetized = VLC_FALSE;
+ tk->fmt.b_packetized = false;
if( ps_id_to_lang( p_psm, i_id ) )
{
{
if( !ps_track_fill( &tk[i_tk], p_psm, i_id ) )
{
- tk[i_tk].b_seen = VLC_TRUE;
+ tk[i_tk].b_seen = true;
}
}
}
es_out_Del( out, tk[i].es );
tk[i] = tk_tmp;
- tk[i].b_seen = VLC_TRUE;
+ tk[i].b_seen = true;
tk[i].es = es_out_Add( out, &tk[i].fmt );
}
p_sys->p_pes = NULL;
p_sys->p_es = NULL;
- p_sys->b_pcr_audio = VLC_FALSE;
+ p_sys->b_pcr_audio = false;
return VLC_SUCCESS;
}
if( p_pes->i_pts > 0 )
{
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_pes->i_pts);
- p_sys->b_pcr_audio = VLC_TRUE;
+ p_sys->b_pcr_audio = true;
}
es_out_Send( p_demux->out, p_sys->p_audio, p_pes );
}
set_capability( "demux2", 3 );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
- add_bool( "rawdv-hurry-up", 0, NULL, HURRYUP_TEXT, HURRYUP_LONGTEXT, VLC_FALSE );
+ add_bool( "rawdv-hurry-up", 0, NULL, HURRYUP_TEXT, HURRYUP_LONGTEXT, false );
set_callbacks( Open, Close );
add_shortcut( "rawdv" );
vlc_module_end();
/* program clock reference (in units of 90kHz) */
mtime_t i_pcr;
- vlc_bool_t b_hurry_up;
+ bool b_hurry_up;
};
/*****************************************************************************
{
demux_sys_t *p_sys = p_demux->p_sys;
block_t *p_block;
- vlc_bool_t b_audio = VLC_FALSE;
+ bool b_audio = false;
if( p_sys->b_hurry_up )
{
set_subcategory( SUBCAT_INPUT_DEMUX );
set_callbacks( Open, Close );
add_shortcut( "rawvideo" );
- add_float( "rawvid-fps", 0, 0, FPS_TEXT, FPS_LONGTEXT, VLC_FALSE );
+ add_float( "rawvid-fps", 0, 0, FPS_TEXT, FPS_LONGTEXT, false );
add_integer( "rawvid-width", 0, 0, WIDTH_TEXT, WIDTH_LONGTEXT, 0 );
add_integer( "rawvid-height", 0, 0, HEIGHT_TEXT, HEIGHT_LONGTEXT, 0 );
add_string( "rawvid-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "rawvid-aspect-ratio", NULL, NULL,
- ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, VLC_TRUE );
+ ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true );
vlc_module_end();
/*****************************************************************************
mtime_t i_pcr;
- vlc_bool_t b_y4m;
+ bool b_y4m;
};
/*****************************************************************************
unsigned int i_aspect = 0;
struct preset_t *p_preset = NULL;
const uint8_t *p_peek;
- vlc_bool_t b_valid = VLC_FALSE;
- vlc_bool_t b_y4m = VLC_FALSE;
+ bool b_valid = false;
+ bool b_y4m = false;
if( stream_Peek( p_demux->s, &p_peek, 9 ) == 9 )
{
/* http://wiki.multimedia.cx/index.php?title=YUV4MPEG2 */
if( !strncmp( (char *)p_peek, "YUV4MPEG2", 9 ) )
{
- b_valid = VLC_TRUE;
- b_y4m = VLC_TRUE;
+ b_valid = true;
+ b_y4m = true;
}
}
for( p_preset = p_presets; *p_preset->psz_ext; p_preset++ )
if( !strcasecmp( psz_ext, p_preset->psz_ext ) )
{
- b_valid = VLC_TRUE;
+ b_valid = true;
break;
}
}
int i_size, i_id, i_flags, i;
int64_t i_pts;
real_track_t *tk = NULL;
- vlc_bool_t b_selected;
+ bool b_selected;
if( p_sys->i_data_packets >= p_sys->i_data_packets_count &&
p_sys->i_data_packets_count )
demux_sys_t *p_sys;
const uint8_t *peek;
unsigned tracks, ppqn;
- vlc_bool_t multitrack;
+ bool multitrack;
/* (Try to) parse the SMF header */
/* Header chunk always has 6 bytes payload */
switch (GetWBE (peek))
{
case 0:
- multitrack = VLC_FALSE;
+ multitrack = false;
break;
case 1:
- multitrack = VLC_TRUE;
+ multitrack = true;
break;
default:
/* We don't implement SMF2 (as do many) */
set_subcategory( SUBCAT_INPUT_DEMUX );
add_float( "sub-fps", 0.0, NULL,
N_("Frames per second"),
- SUB_FPS_LONGTEXT, VLC_TRUE );
+ SUB_FPS_LONGTEXT, true );
add_integer( "sub-delay", 0, NULL,
N_("Subtitles delay"),
- SUB_DELAY_LONGTEXT, VLC_TRUE );
+ SUB_DELAY_LONGTEXT, true );
add_string( "sub-type", "auto", NULL, N_("Subtitles format"),
- SUB_TYPE_LONGTEXT, VLC_TRUE );
+ SUB_TYPE_LONGTEXT, true );
change_string_list( ppsz_sub_type, NULL, NULL );
set_callbacks( Open, Close );
static void Fix( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
- vlc_bool_t b_done;
+ bool b_done;
int i_index;
/* *** fix order (to be sure...) *** */
*/
do
{
- b_done = VLC_TRUE;
+ b_done = true;
for( i_index = 1; i_index < p_sys->i_subtitles; i_index++ )
{
if( p_sys->subtitle[i_index].i_start <
memcpy( p_sys->subtitle + i_index,
&sub_xch,
sizeof( subtitle_t ) );
- b_done = VLC_FALSE;
+ b_done = false;
}
}
} while( !b_done );
*/
static int ParseSubRipSubViewer( demux_t *p_demux, subtitle_t *p_subtitle,
const char *psz_fmt,
- vlc_bool_t b_replace_br )
+ bool b_replace_br )
{
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
{
return ParseSubRipSubViewer( p_demux, p_subtitle,
"%d:%d:%d,%d --> %d:%d:%d,%d",
- VLC_FALSE );
+ false );
}
/* ParseSubViewer
*/
{
return ParseSubRipSubViewer( p_demux, p_subtitle,
"%d:%d:%d.%d,%d:%d:%d.%d",
- VLC_TRUE );
+ true );
}
/* ParseSSA
set_subcategory( SUBCAT_INPUT_DEMUX );
add_float( "sub-fps", 0.0, NULL,
N_("Frames per second"),
- SUB_FPS_LONGTEXT, VLC_TRUE );
+ SUB_FPS_LONGTEXT, true );
add_integer( "sub-delay", 0, NULL,
N_("Subtitles delay"),
- SUB_DELAY_LONGTEXT, VLC_TRUE );
+ SUB_DELAY_LONGTEXT, true );
add_string( "sub-type", "auto", NULL, N_("Subtitles format"),
- SUB_TYPE_LONGTEXT, VLC_TRUE );
+ SUB_TYPE_LONGTEXT, true );
set_callbacks( Open, Close );
add_shortcut( "asademux" );
static void Fix( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
- vlc_bool_t b_done;
+ bool b_done;
int i_index;
/* *** fix order (to be sure...) *** */
*/
do
{
- b_done = VLC_TRUE;
+ b_done = true;
for( i_index = 1; i_index < p_sys->i_subtitles; i_index++ )
{
if( p_sys->subtitle[i_index].i_start <
memcpy( p_sys->subtitle + i_index,
&sub_xch,
sizeof( subtitle_t ) );
- b_done = VLC_FALSE;
+ b_done = false;
}
}
} while( !b_done );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
- add_string( "ts-extra-pmt", NULL, NULL, PMT_TEXT, PMT_LONGTEXT, VLC_TRUE );
- add_bool( "ts-es-id-pid", 1, NULL, PID_TEXT, PID_LONGTEXT, VLC_TRUE );
- add_string( "ts-out", NULL, NULL, TSOUT_TEXT, TSOUT_LONGTEXT, VLC_TRUE );
+ add_string( "ts-extra-pmt", NULL, NULL, PMT_TEXT, PMT_LONGTEXT, true );
+ add_bool( "ts-es-id-pid", 1, NULL, PID_TEXT, PID_LONGTEXT, true );
+ add_string( "ts-out", NULL, NULL, TSOUT_TEXT, TSOUT_LONGTEXT, true );
add_integer( "ts-out-mtu", 1400, NULL, MTUOUT_TEXT,
- MTUOUT_LONGTEXT, VLC_TRUE );
- add_string( "ts-csa-ck", NULL, NULL, CSA_TEXT, CSA_LONGTEXT, VLC_TRUE );
- add_integer( "ts-csa-pkt", 188, NULL, CPKT_TEXT, CPKT_LONGTEXT, VLC_TRUE );
- add_bool( "ts-silent", 0, NULL, SILENT_TEXT, SILENT_LONGTEXT, VLC_TRUE );
+ MTUOUT_LONGTEXT, true );
+ add_string( "ts-csa-ck", NULL, NULL, CSA_TEXT, CSA_LONGTEXT, true );
+ add_integer( "ts-csa-pkt", 188, NULL, CPKT_TEXT, CPKT_LONGTEXT, true );
+ add_bool( "ts-silent", 0, NULL, SILENT_TEXT, SILENT_LONGTEXT, true );
- add_file( "ts-dump-file", NULL, NULL, TSDUMP_TEXT, TSDUMP_LONGTEXT, VLC_FALSE );
+ add_file( "ts-dump-file", NULL, NULL, TSDUMP_TEXT, TSDUMP_LONGTEXT, false );
change_unsafe();
- add_bool( "ts-dump-append", 0, NULL, APPEND_TEXT, APPEND_LONGTEXT, VLC_FALSE );
+ add_bool( "ts-dump-append", 0, NULL, APPEND_TEXT, APPEND_LONGTEXT, false );
add_integer( "ts-dump-size", 16384, NULL, DUMPSIZE_TEXT,
- DUMPSIZE_LONGTEXT, VLC_TRUE );
+ DUMPSIZE_LONGTEXT, true );
set_capability( "demux2", 10 );
set_callbacks( Open, Close );
{
uint8_t i_objectTypeIndication;
uint8_t i_streamType;
- vlc_bool_t b_upStream;
+ bool b_upStream;
uint32_t i_bufferSizeDB;
uint32_t i_maxBitrate;
uint32_t i_avgBitrate;
typedef struct
{
- vlc_bool_t b_useAccessUnitStartFlag;
- vlc_bool_t b_useAccessUnitEndFlag;
- vlc_bool_t b_useRandomAccessPointFlag;
- vlc_bool_t b_useRandomAccessUnitsOnlyFlag;
- vlc_bool_t b_usePaddingFlag;
- vlc_bool_t b_useTimeStampsFlags;
- vlc_bool_t b_useIdleFlag;
- vlc_bool_t b_durationFlag;
+ bool b_useAccessUnitStartFlag;
+ bool b_useAccessUnitEndFlag;
+ bool b_useRandomAccessPointFlag;
+ bool b_useRandomAccessUnitsOnlyFlag;
+ bool b_usePaddingFlag;
+ bool b_useTimeStampsFlags;
+ bool b_useIdleFlag;
+ bool b_durationFlag;
uint32_t i_timeStampResolution;
uint32_t i_OCRResolution;
uint8_t i_timeStampLength;
typedef struct
{
- vlc_bool_t b_ok;
+ bool b_ok;
uint16_t i_es_id;
- vlc_bool_t b_streamDependenceFlag;
- vlc_bool_t b_OCRStreamFlag;
+ bool b_streamDependenceFlag;
+ bool b_OCRStreamFlag;
uint8_t i_streamPriority;
char *psz_url;
{
int i_pid;
- vlc_bool_t b_seen;
- vlc_bool_t b_valid;
+ bool b_seen;
+ bool b_valid;
int i_cc; /* countinuity counter */
/* PSI owner (ie PMT -> PAT, ES -> PMT */
ts_pid_t **pmt;
/* */
- vlc_bool_t b_es_id_pid;
+ bool b_es_id_pid;
csa_t *csa;
int i_csa_pkt_size;
- vlc_bool_t b_silent;
+ bool b_silent;
- vlc_bool_t b_udp_out;
+ bool b_udp_out;
int fd; /* udp socket */
uint8_t *buffer;
- vlc_bool_t b_dvb_control;
+ bool b_dvb_control;
int i_dvb_program;
int64_t i_dvb_start;
int64_t i_dvb_length;
char *psz_file; /* file to dump data in */
FILE *p_file; /* filehandle */
uint64_t i_write; /* bytes written */
- vlc_bool_t b_file_out; /* dump mode enabled */
+ bool b_file_out; /* dump mode enabled */
/* */
- vlc_bool_t b_meta;
+ bool b_meta;
};
static int Demux ( demux_t *p_demux );
static int DemuxFile( demux_t *p_demux );
static int Control( demux_t *p_demux, int i_query, va_list args );
-static void PIDInit ( ts_pid_t *pid, vlc_bool_t b_psi, ts_psi_t *p_owner );
+static void PIDInit ( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner );
static void PIDClean( es_out_t *out, ts_pid_t *pid );
static int PIDFillFormat( ts_pid_t *pid, int i_stream_type );
return ( (p->p_buffer[1]&0x1f)<<8 )|p->p_buffer[2];
}
-static vlc_bool_t GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk );
+static bool GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk );
static void PCRHandle( demux_t *p_demux, ts_pid_t *, block_t * );
ts_pid_t *pat;
const char *psz_mode;
- vlc_bool_t b_append;
- vlc_bool_t b_topfield = VLC_FALSE;
+ bool b_append;
+ bool b_topfield = false;
vlc_value_t val;
if( memcmp( p_peek, "TFrc", 4 ) == 0 )
{
- b_topfield = VLC_TRUE;
+ b_topfield = true;
msg_Dbg( p_demux, "this is a topfield file" );
}
/* Fill dump mode fields */
p_sys->i_write = 0;
p_sys->p_file = NULL;
- p_sys->b_file_out = VLC_FALSE;
+ p_sys->b_file_out = false;
p_sys->psz_file = var_CreateGetString( p_demux, "ts-dump-file" );
if( *p_sys->psz_file != '\0' )
{
- p_sys->b_file_out = VLC_TRUE;
+ p_sys->b_file_out = true;
var_Create( p_demux, "ts-dump-append", VLC_VAR_BOOL|VLC_VAR_DOINHERIT );
var_Get( p_demux, "ts-dump-append", &val );
else if( ( p_sys->p_file = utf8_fopen( p_sys->psz_file, psz_mode ) ) == NULL )
{
msg_Err( p_demux, "cannot create `%s' for writing", p_sys->psz_file );
- p_sys->b_file_out = VLC_FALSE;
+ p_sys->b_file_out = false;
}
if( p_sys->b_file_out )
p_demux->pf_control = Control;
/* Init p_sys field */
- p_sys->b_meta = VLC_TRUE;
- p_sys->b_dvb_control = VLC_TRUE;
+ p_sys->b_meta = true;
+ p_sys->b_dvb_control = true;
p_sys->i_dvb_program = 0;
p_sys->i_dvb_start = 0;
p_sys->i_dvb_length = 0;
ts_pid_t *pid = &p_sys->pid[i];
pid->i_pid = i;
- pid->b_seen = VLC_FALSE;
- pid->b_valid = VLC_FALSE;
+ pid->b_seen = false;
+ pid->b_valid = false;
}
/* PID 8191 is padding */
- p_sys->pid[8191].b_seen = VLC_TRUE;
+ p_sys->pid[8191].b_seen = true;
p_sys->i_packet_size = i_packet_size;
- p_sys->b_udp_out = VLC_FALSE;
+ p_sys->b_udp_out = false;
p_sys->i_ts_read = 50;
p_sys->csa = NULL;
/* Init PAT handler */
pat = &p_sys->pid[0];
- PIDInit( pat, VLC_TRUE, NULL );
+ PIDInit( pat, true, NULL );
pat->psi->handle = dvbpsi_AttachPAT( (dvbpsi_pat_callback)PATCallBack,
p_demux );
#ifdef TS_USE_DVB_SI
ts_pid_t *sdt = &p_sys->pid[0x11];
ts_pid_t *eit = &p_sys->pid[0x12];
- PIDInit( sdt, VLC_TRUE, NULL );
+ PIDInit( sdt, true, NULL );
sdt->psi->handle =
dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
p_demux );
- PIDInit( eit, VLC_TRUE, NULL );
+ PIDInit( eit, true, NULL );
eit->psi->handle =
dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
p_demux );
if( p_sys->b_dvb_control )
{
if( stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
- ACCESS_SET_PRIVATE_ID_STATE, 0x11, VLC_TRUE ) ||
+ ACCESS_SET_PRIVATE_ID_STATE, 0x11, true ) ||
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
- ACCESS_SET_PRIVATE_ID_STATE, 0x12, VLC_TRUE ) )
- p_sys->b_dvb_control = VLC_FALSE;
+ ACCESS_SET_PRIVATE_ID_STATE, 0x12, true ) )
+ p_sys->b_dvb_control = false;
}
}
#endif
char *psz = strchr( val.psz_string, ':' );
int i_port = 0;
- p_sys->b_udp_out = VLC_TRUE;
+ p_sys->b_udp_out = true;
if( psz )
{
if( p_sys->fd < 0 )
{
msg_Err( p_demux, "failed to open udp socket, send disabled" );
- p_sys->b_udp_out = VLC_FALSE;
+ p_sys->b_udp_out = false;
}
else
{
ts_prg_psi_t *prg;
msg_Dbg( p_demux, "extra pmt specified (pid=%d)", i_pid );
- PIDInit( pmt, VLC_TRUE, NULL );
+ PIDInit( pmt, true, NULL );
/* Dummy PMT */
prg = malloc( sizeof( ts_prg_psi_t ) );
{
ts_pid_t *pid = &p_sys->pid[i_pid];
- PIDInit( pid, VLC_FALSE, pmt->psi);
+ PIDInit( pid, false, pmt->psi);
if( pmt->psi->prg[0]->i_pid_pcr <= 0 )
{
pmt->psi->prg[0]->i_pid_pcr = i_pid;
/* too much */
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, pid->i_pid,
- VLC_FALSE );
+ false );
}
}
while( i_pos < i_data )
{
ts_pid_t *p_pid; /* point to a PID structure */
- vlc_bool_t b_payload; /* indicates a packet with payload */
- vlc_bool_t b_adaptation; /* adaptation field */
+ bool b_payload; /* indicates a packet with payload */
+ bool b_adaptation; /* adaptation field */
int i_cc = 0; /* continuity counter */
if( p_sys->buffer[i_pos] != 0x47 )
/* We read at most 100 TS packet or until a frame is completed */
for( i_pkt = 0; i_pkt < p_sys->i_ts_read; i_pkt++ )
{
- vlc_bool_t b_frame = VLC_FALSE;
+ bool b_frame = false;
block_t *p_pkt;
ts_pid_t *p_pid;
PCRHandle( p_demux, p_pid, p_pkt );
block_Release( p_pkt );
}
- p_pid->b_seen = VLC_TRUE;
+ p_pid->b_seen = true;
if( b_frame )
{
{
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, i_pmt_pid,
- VLC_FALSE );
+ false );
/* All ES */
for( i = 2; i < 8192; i++ )
{
stream_Control( p_demux->s,
STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE,
- i, VLC_FALSE );
+ i, false );
break;
}
}
{
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, i_pmt_pid,
- VLC_TRUE );
+ true );
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, p_prg->i_pid_pcr,
- VLC_TRUE );
+ true );
for( i = 2; i < 8192; i++ )
{
stream_Control( p_demux->s,
STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE,
- i, VLC_TRUE );
+ i, true );
break;
}
}
}
}
-static void PIDInit( ts_pid_t *pid, vlc_bool_t b_psi, ts_psi_t *p_owner )
+static void PIDInit( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner )
{
- vlc_bool_t b_old_valid = pid->b_valid;
+ bool b_old_valid = pid->b_valid;
- pid->b_valid = VLC_TRUE;
+ pid->b_valid = true;
pid->i_cc = 0xff;
pid->p_owner = p_owner;
pid->i_owner_number = 0;
pid->es->i_pes_gathered= 0;
pid->es->pp_last = &pid->es->p_pes;
pid->es->p_mpeg4desc = NULL;
- pid->es->b_gather = VLC_FALSE;
+ pid->es->b_gather = false;
}
}
}
if( pid->i_extra_es ) free( pid->extra_es );
}
- pid->b_valid = VLC_FALSE;
+ pid->b_valid = false;
}
/****************************************************************************
}
}
-static vlc_bool_t GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
+static bool GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
{
const uint8_t *p = p_bk->p_buffer;
- const vlc_bool_t b_unit_start = p[1]&0x40;
- const vlc_bool_t b_adaptation = p[3]&0x20;
- const vlc_bool_t b_payload = p[3]&0x10;
+ const bool b_unit_start = p[1]&0x40;
+ const bool b_adaptation = p[3]&0x20;
+ const bool b_payload = p[3]&0x10;
const int i_cc = p[3]&0x0f; /* continuity counter */
- vlc_bool_t b_discontinuity = VLC_FALSE;/* discontinuity */
+ bool b_discontinuity = false;/* discontinuity */
/* transport_scrambling_control is ignored */
int i_skip = 0;
- vlc_bool_t i_ret = VLC_FALSE;
+ bool i_ret = false;
int i_diff;
#if 0
if( p[4] > 0 )
{
/* discontinuity indicator found in stream */
- b_discontinuity = (p[5]&0x80) ? VLC_TRUE : VLC_FALSE;
+ b_discontinuity = (p[5]&0x80) ? true : false;
if( b_discontinuity && pid->es->p_pes )
{
msg_Warn( p_demux, "discontinuity indicator (pid=%d) ",
if( pid->es->p_pes )
{
ParsePES( p_demux, pid );
- i_ret = VLC_TRUE;
+ i_ret = true;
}
block_ChainLastAppend( &pid->es->pp_last, p_bk );
pid->es->i_pes_gathered >= pid->es->i_pes_size )
{
ParsePES( p_demux, pid );
- i_ret = VLC_TRUE;
+ i_ret = true;
}
}
else
pid->es->i_pes_gathered >= pid->es->i_pes_size )
{
ParsePES( p_demux, pid );
- i_ret = VLC_TRUE;
+ i_ret = true;
}
}
}
break;
case 0x10: /* MPEG4 (video) */
es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', '4', 'v' ) );
- pid->es->b_gather = VLC_TRUE;
+ pid->es->b_gather = true;
break;
case 0x1B: /* H264 <- check transport syntax/needed descriptor */
es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'h', '2', '6', '4' ) );
case 0xa0: /* MSCODEC vlc (video) (fixed later) */
es_format_Init( fmt, UNKNOWN_ES, 0 );
- pid->es->b_gather = VLC_TRUE;
+ pid->es->b_gather = true;
break;
case 0x06: /* PES_PRIVATE (fixed later) */
}
/* PES packets usually contain truncated frames */
- fmt->b_packetized = VLC_FALSE;
+ fmt->b_packetized = false;
return fmt->i_cat == UNKNOWN_ES ? VLC_EGENERIC : VLC_SUCCESS ;
}
int i;
int i_es_index;
uint8_t i_flags, i_iod_tag, byte1, byte2, byte3;
- vlc_bool_t b_url;
+ bool b_url;
int i_iod_length;
p_iod = malloc( sizeof( iod_descriptor_t ) );
** libdvbpsi callbacks
****************************************************************************
****************************************************************************/
-static vlc_bool_t DVBProgramIsSelected( demux_t *p_demux, uint16_t i_pgrm )
+static bool DVBProgramIsSelected( demux_t *p_demux, uint16_t i_pgrm )
{
demux_sys_t *p_sys = p_demux->p_sys;
- if ( !p_sys->b_dvb_control ) return VLC_FALSE;
+ if ( !p_sys->b_dvb_control ) return false;
if ( (p_sys->i_dvb_program == -1 && p_sys->p_programs_list == NULL)
|| p_sys->i_dvb_program == 0 )
- return VLC_TRUE;
- if ( p_sys->i_dvb_program == i_pgrm ) return VLC_TRUE;
+ return true;
+ if ( p_sys->i_dvb_program == i_pgrm ) return true;
if ( p_sys->p_programs_list != NULL )
{
for ( i = 0; i < p_sys->p_programs_list->i_count; i++ )
{
if ( i_pgrm == p_sys->p_programs_list->p_values[i].i_int )
- return VLC_TRUE;
+ return true;
}
}
- return VLC_FALSE;
+ return false;
}
#ifdef TS_USE_DVB_SI
/* Set demux filter */
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, prg->i_pid_pcr,
- VLC_TRUE );
+ true );
}
else if ( p_sys->b_dvb_control )
{
}
}
- PIDInit( pid, VLC_FALSE, pmt->psi );
+ PIDInit( pid, false, pmt->psi );
PIDFillFormat( pid, p_es->i_type );
pid->i_owner_number = prg->i_number;
pid->i_pid = p_es->i_pid;
/* For such stream we will gather them ourself and don't launch a
* packetizer.
* Yes it's ugly but it's the only way to have DIV3 working */
- pid->es->fmt.b_packetized = VLC_TRUE;
+ pid->es->fmt.b_packetized = true;
}
if( pid->es->fmt.i_cat == AUDIO_ES ||
/* Set demux filter */
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, p_es->i_pid,
- VLC_TRUE );
+ true );
}
}
{
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, pp_clean[i]->i_pid,
- VLC_FALSE );
+ false );
}
PIDClean( p_demux->out, pp_clean[i] );
for( i = 0; i < p_sys->i_pmt; i++ )
{
ts_pid_t *pmt = p_sys->pmt[i];
- vlc_bool_t b_keep = VLC_FALSE;
+ bool b_keep = false;
for( p_program = p_pat->p_first_program; p_program != NULL;
p_program = p_program->p_next )
if( p_program->i_number ==
pmt->psi->prg[i_prg]->i_number )
{
- b_keep = VLC_TRUE;
+ b_keep = true;
break;
}
}
{
if( stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE, i,
- VLC_FALSE ) )
- p_sys->b_dvb_control = VLC_FALSE;
+ false ) )
+ p_sys->b_dvb_control = false;
}
PIDClean( p_demux->out, pid );
{
if( stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE,
- pmt_rm[i]->i_pid, VLC_FALSE ) )
- p_sys->b_dvb_control = VLC_FALSE;
+ pmt_rm[i]->i_pid, false ) )
+ p_sys->b_dvb_control = false;
}
for( i_prg = 0; i_prg < pmt_rm[i]->psi->i_prg; i_prg++ )
if( p_program->i_number != 0 )
{
ts_pid_t *pmt = &p_sys->pid[p_program->i_pid];
- vlc_bool_t b_add = VLC_TRUE;
+ bool b_add = true;
if( pmt->b_valid )
{
{
if( pmt->psi->prg[i_prg]->i_number == p_program->i_number )
{
- b_add = VLC_FALSE;
+ b_add = false;
break;
}
}
if( b_add )
{
- PIDInit( pmt, VLC_TRUE, pat->psi );
+ PIDInit( pmt, true, pat->psi );
pmt->psi->prg[pmt->psi->i_prg-1]->handle =
dvbpsi_AttachPMT( p_program->i_number,
(dvbpsi_pmt_callback)PMTCallBack,
if( stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_STATE,
- p_program->i_pid, VLC_TRUE ) )
- p_sys->b_dvb_control = VLC_FALSE;
+ p_program->i_pid, true ) )
+ p_sys->b_dvb_control = false;
}
}
}
uint8_t ex1, ex2;
uint8_t rec_type;
uint8_t subrec_type;
- vlc_bool_t b_ext;
+ bool b_ext;
uint64_t l_ty_pts; /* TY PTS in the record header */
} ty_rec_hdr_t;
} xds_class_t;
typedef struct
{
- vlc_bool_t b_started;
+ bool b_started;
int i_data;
uint8_t p_data[XDS_MAX_DATA_SIZE];
int i_sum;
typedef struct
{
/* Are we in XDS mode */
- vlc_bool_t b_xds;
+ bool b_xds;
/* Current class type */
xds_class_t i_class;
int i_type;
- vlc_bool_t b_future;
+ bool b_future;
/* */
xds_packet_t pkt[XDS_MAX_CLASS_COUNT][128]; /* XXX it is way too much, but simpler */
/* */
- vlc_bool_t b_meta_changed;
+ bool b_meta_changed;
xds_meta_t meta;
} xds_t;
int i_stuff_cnt;
size_t i_stream_size; /* size of input stream (if known) */
//uint64_t l_program_len; /* length of this stream in msec */
- vlc_bool_t b_seekable; /* is this stream seekable? */
- vlc_bool_t b_have_master; /* are master chunks present? */
+ bool b_seekable; /* is this stream seekable? */
+ bool b_have_master; /* are master chunks present? */
tivo_type_t tivo_type; /* tivo type (SA / DTiVo) */
tivo_series_t tivo_series; /* Series1 or Series2 */
tivo_audio_t audio_type; /* AC3 or MPEG */
int i_num_recs; /* number of recs in this chunk */
int i_seq_rec; /* record number where seq start is */
ty_seq_table_t *seq_table; /* table of SEQ entries from mstr chk */
- vlc_bool_t eof;
- vlc_bool_t b_first_chunk;
+ bool eof;
+ bool b_first_chunk;
};
static int get_chunk_header(demux_t *);
memset(p_sys, 0, sizeof(demux_sys_t));
/* set up our struct (most were zero'd out with the memset above) */
- p_sys->b_first_chunk = VLC_TRUE;
+ p_sys->b_first_chunk = true;
p_sys->b_have_master = (U32_AT(p_peek) == TIVO_PES_FILEID);
p_sys->firstAudioPTS = -1;
p_sys->i_stream_size = stream_Size(p_demux->s);
i_channel = cc_Channel( i_field, &p_sys->cc.p_data[p_sys->cc.i_data-3 + 1] );
if( i_channel >= 0 && i_channel < 4 )
- p_sys->cc.pb_present[i_channel] = VLC_TRUE;
+ p_sys->cc.pb_present[i_channel] = true;
return 0;
}
{
int i, j;
- h->b_xds = VLC_FALSE;
+ h->b_xds = false;
h->i_class = XDS_MAX_CLASS_COUNT;
h->i_type = 0;
- h->b_future = VLC_FALSE;
+ h->b_future = false;
for( i = 0; i < XDS_MAX_CLASS_COUNT; i++ )
{
for( j = 0; j < 128; j++ )
- h->pkt[i][j].b_started = VLC_FALSE;
+ h->pkt[i][j].b_started = false;
}
- h->b_meta_changed = VLC_FALSE;
+ h->b_meta_changed = false;
memset( &h->meta, 0, sizeof(h->meta) );
}
static void XdsExit( xds_t *h )
}
dst[i_dst++] = '\0';
}
-static vlc_bool_t XdsChangeString( xds_t *h, char **ppsz_dst, const char *psz_new )
+static bool XdsChangeString( xds_t *h, char **ppsz_dst, const char *psz_new )
{
if( *ppsz_dst && psz_new && !strcmp( *ppsz_dst, psz_new ) )
- return VLC_FALSE;
+ return false;
if( *ppsz_dst == NULL && psz_new == NULL )
- return VLC_FALSE;
+ return false;
free( *ppsz_dst );
if( psz_new )
else
*ppsz_dst = NULL;
- h->b_meta_changed = VLC_TRUE;
- return VLC_TRUE;
+ h->b_meta_changed = true;
+ return true;
}
static void XdsDecodeCurrentFuture( xds_t *h, xds_packet_t *pk )
{
const xds_class_t i_class = ( d1 - 1 ) >> 1;
const int i_type = d2;
- const vlc_bool_t b_start = d1 & 0x01;
+ const bool b_start = d1 & 0x01;
xds_packet_t *pk = &h->pkt[i_class][i_type];
if( !b_start && !pk->b_started )
{
//fprintf( stderr, "xxxxxxxxxxxxxxxXDS Continuying a non started packet, ignoring\n" );
- h->b_xds = VLC_FALSE;
+ h->b_xds = false;
return;
}
- h->b_xds = VLC_TRUE;
+ h->b_xds = true;
h->i_class = i_class;
h->i_type = i_type;
h->b_future = !b_start;
- pk->b_started = VLC_TRUE;
+ pk->b_started = true;
if( b_start )
{
pk->i_data = 0;
if( pk->i_sum & 0x7f )
{
//fprintf( stderr, "xxxxxxxxxxxxxxxXDS invalid checksum, ignoring ---------------------------------\n" );
- pk->b_started = VLC_FALSE;
+ pk->b_started = false;
return;
}
if( pk->i_data <= 0 )
{
//fprintf( stderr, "xxxxxxxxxxxxxxxXDS empty packet, ignoring ---------------------------------\n" );
- pk->b_started = VLC_FALSE;
+ pk->b_started = false;
return;
}
XdsDecode( h, pk );
/* Reset it */
- pk->b_started = VLC_FALSE;
+ pk->b_started = false;
}
else if( d1 >= 0x20 && h->b_xds )
{
{
/* Broken -> reinit */
//fprintf( stderr, "xxxxxxxxxxxxxxxXDS broken, reset\n" );
- h->b_xds = VLC_FALSE;
- pk->b_started = VLC_FALSE;
+ h->b_xds = false;
+ pk->b_started = false;
return;
}
/* TODO check parity bit */
}
else
{
- h->b_xds = VLC_FALSE;
+ h->b_xds = false;
}
}
es_out_Control( p_demux->out, ES_OUT_SET_GROUP_EPG, TY_ES_GROUP, p_epg );
vlc_epg_Delete( p_epg );
}
- p_demux->p_sys->xds.b_meta_changed = VLC_FALSE;
+ p_demux->p_sys->xds.b_meta_changed = false;
}
/* seek to an exact time position within the stream, if possible.
p_sys->l_first_ty_pts = p_sys->seq_table[0].l_timestamp;
p_sys->l_final_ty_pts =
p_sys->seq_table[p_sys->i_seq_table_size - 1].l_timestamp;
- p_sys->b_have_master = VLC_TRUE;
+ p_sys->b_have_master = true;
i_pts_secs = p_sys->l_first_ty_pts / 1000000000;
msg_Dbg( p_demux, "first TY pts in master is %02d:%02d:%02d",
demux_sys_t *p_sys = p_demux->p_sys;
const uint8_t *p_buf;
int i;
- vlc_bool_t b_probe_error = VLC_FALSE;
+ bool b_probe_error = false;
/* we need CHUNK_PEEK_COUNT chunks of data, first one might be a Part header, so ... */
if (stream_Peek( p_demux->s, &p_buf, CHUNK_PEEK_COUNT * CHUNK_SIZE ) <
/* the final tally */
if (p_sys->tivo_series == TIVO_SERIES_UNKNOWN) {
msg_Err(p_demux, "Can't determine Tivo Series.");
- b_probe_error = VLC_TRUE;
+ b_probe_error = true;
}
if (p_sys->audio_type == TIVO_AUDIO_UNKNOWN) {
msg_Err(p_demux, "Can't determine Tivo Audio Type.");
- b_probe_error = VLC_TRUE;
+ b_probe_error = true;
}
if (p_sys->tivo_type == TIVO_TYPE_UNKNOWN) {
msg_Err(p_demux, "Can't determine Tivo Type (SA/DTivo).");
- b_probe_error = VLC_TRUE;
+ b_probe_error = true;
}
return b_probe_error?VLC_EGENERIC:VLC_SUCCESS;
}
p_sys->i_seq_rec = p_peek[1];
}
p_sys->i_cur_rec = 0;
- p_sys->b_first_chunk = VLC_FALSE;
+ p_sys->b_first_chunk = false;
/*msg_Dbg( p_demux, "chunk has %d records", i_num_recs );*/
p_hdr_buf = malloc(i_num_recs * 16);
if (stream_Read(p_demux->s, p_hdr_buf, i_num_recs * 16) < i_num_recs * 16) {
free( p_hdr_buf );
- p_sys->eof = VLC_TRUE;
+ p_sys->eof = true;
return 0;
}
/* parse them */
p_rec_hdr->ex2 = b2;
p_rec_hdr->l_rec_size = 0;
p_rec_hdr->l_ty_pts = 0;
- p_rec_hdr->b_ext = VLC_TRUE;
+ p_rec_hdr->b_ext = true;
}
else
{
p_rec_hdr->l_rec_size = ( record_header[ 0 ] << 8 |
record_header[ 1 ] ) << 4 | ( record_header[ 2 ] >> 4 );
*pi_payload_size += p_rec_hdr->l_rec_size;
- p_rec_hdr->b_ext = VLC_FALSE;
+ p_rec_hdr->b_ext = false;
p_rec_hdr->l_ty_pts = U64_AT( &record_header[ 8 ] );
}
//fprintf( stderr, "parse_chunk_headers[%d] t=0x%x s=%d\n", i, p_rec_hdr->rec_type, p_rec_hdr->subrec_type );
set_subcategory( SUBCAT_INPUT_DEMUX );
set_description( _("VC1 video demuxer" ) );
set_capability( "demux2", 0 );
- add_float( "vc1-fps", 25.0, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_TRUE );
+ add_float( "vc1-fps", 25.0, NULL, FPS_TEXT, FPS_LONGTEXT, true );
set_callbacks( Open, Close );
add_shortcut( "vc1" );
vlc_module_end();
if( p_sys->p_es == NULL )
{
- p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
+ p_sys->p_packetizer->fmt_out.b_packetized = true;
p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
}
int i_original_frame_width;
int i_original_frame_height;
- vlc_bool_t b_palette;
+ bool b_palette;
uint32_t palette[16];
};
p_sys->track = (vobsub_track_t *)malloc( sizeof( vobsub_track_t ) );
p_sys->i_original_frame_width = -1;
p_sys->i_original_frame_height = -1;
- p_sys->b_palette = VLC_FALSE;
+ p_sys->b_palette = false;
memset( p_sys->palette, 0, 16 * sizeof( uint32_t ) );
/* Load the whole file */
pi64 = (int64_t*)va_arg( args, int64_t * );
for( i = 0; i < p_sys->i_tracks; i++ )
{
- vlc_bool_t b_selected;
+ bool b_selected;
/* Check the ES is selected */
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_sys->track[i].p_es, &b_selected );
pf = (double*)va_arg( args, double * );
for( i = 0; i < p_sys->i_tracks; i++ )
{
- vlc_bool_t b_selected;
+ bool b_selected;
/* Check the ES is selected */
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_sys->track[i].p_es, &b_selected );
/* msg_Dbg( p_demux, "palette %d: y=%x, u=%x, v=%x", i, y, u, v ); */
}
- p_sys->b_palette = VLC_TRUE;
+ p_sys->b_palette = true;
msg_Dbg( p_demux, "vobsub palette read" );
}
else
date_t pts;
uint32_t i_channel_mask;
- vlc_bool_t b_chan_reorder; /* do we need channel reordering */
+ bool b_chan_reorder; /* do we need channel reordering */
int pi_chan_table[AOUT_CHAN_MAX];
};
p_aout_buffer = aout_OutputNextBuffer( p_aout,
mdate() + p_sys->latency,
- VLC_FALSE );
+ false );
if( p_aout_buffer != NULL )
{
vlc_module_begin();
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
- add_bool( "beos-dvdmenus", 0, NULL, _("Use DVD Menus"), "", VLC_TRUE );
+ add_bool( "beos-dvdmenus", 0, NULL, _("Use DVD Menus"), "", true );
set_shortname( "BeOS" );
set_description( _("BeOS standard API interface") );
set_capability( "interface", 100 );
memset( psz_uri, 0, 1024 );
snprintf( psz_uri, 1024, "dvdnav:%s", psz_device );
playlist_Add( p_playlist, psz_uri, psz_device,
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, VLC_TRUE );
+ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true );
}
UpdatePlaylist();
}
break;
}
- vlc_bool_t b_remove = ( p_message->WasDropped() &&
+ bool b_remove = ( p_message->WasDropped() &&
!( modifiers() & B_SHIFT_KEY ) );
if( b_remove && p_playlist )
{
- playlist_Clear( p_playlist, VLC_TRUE );
+ playlist_Clear( p_playlist, true );
}
entry_ref ref;
if( p_playlist )
{
playlist_Add( p_playlist, path.Path(), NULL,
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, VLC_TRUE );
+ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true );
}
}
VLCView::MouseUp( BPoint where )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
}
var_Set( p_vout, "mouse-x", val );
val.i_int = ( (int)point.y - i_y ) * p_vout->render.i_height / i_height;
var_Set( p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
}
static void DeAllocatePicture( vlc_object_t *, picture_t *,
video_format_t * );
static void SetOverlayTransparency( intf_thread_t *,
- vlc_bool_t );
+ bool );
static picture_t *LoadImage( intf_thread_t *, video_format_t *,
char * );
set_subcategory( SUBCAT_INTERFACE_MAIN );
add_file( "fbosd-dev", "/dev/fb1", NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
- VLC_FALSE );
+ false );
add_string( "fbosd-aspect-ratio", "", NULL, ASPECT_RATIO_TEXT,
- ASPECT_RATIO_LONGTEXT, VLC_TRUE );
+ ASPECT_RATIO_LONGTEXT, true );
add_string( "fbosd-image", NULL, NULL, FBOSD_IMAGE_TEXT,
- FBOSD_IMAGE_LONGTEXT, VLC_TRUE );
+ FBOSD_IMAGE_LONGTEXT, true );
add_string( "fbosd-text", NULL, NULL, FBOSD_TEXT,
- FBOSD_LONGTEXT, VLC_TRUE );
+ FBOSD_LONGTEXT, true );
#ifdef FBOSD_BLENDING
add_integer_with_range( "fbosd-alpha", 255, 0, 255, NULL, ALPHA_TEXT,
- ALPHA_LONGTEXT, VLC_TRUE );
+ ALPHA_LONGTEXT, true );
#endif
set_section( N_("Position"), NULL );
add_integer( "fbosd-x", 0, NULL, POSX_TEXT,
- POSX_LONGTEXT, VLC_FALSE );
+ POSX_LONGTEXT, false );
add_integer( "fbosd-y", 0, NULL, POSY_TEXT,
- POSY_LONGTEXT, VLC_FALSE );
- add_integer( "fbosd-position", 8, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE );
+ POSY_LONGTEXT, false );
+ add_integer( "fbosd-position", 8, NULL, POS_TEXT, POS_LONGTEXT, true );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
set_section( N_("Font"), NULL );
add_integer_with_range( "fbosd-font-opacity", 255, 0, 255, NULL,
- OPACITY_TEXT, OPACITY_LONGTEXT, VLC_FALSE );
+ OPACITY_TEXT, OPACITY_LONGTEXT, false );
add_integer( "fbosd-font-color", 0x00FFFFFF, NULL, COLOR_TEXT, COLOR_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_list( pi_color_values, ppsz_color_descriptions, 0 );
add_integer( "fbosd-font-size", -1, NULL, SIZE_TEXT, SIZE_LONGTEXT,
- VLC_FALSE );
+ false );
set_section( N_("Commands"), NULL );
- add_bool( "fbosd-clear", VLC_FALSE, NULL, CLEAR_TEXT, CLEAR_LONGTEXT, VLC_TRUE );
- add_bool( "fbosd-render", VLC_FALSE, NULL, RENDER_TEXT, RENDER_LONGTEXT, VLC_TRUE );
- add_bool( "fbosd-display", VLC_FALSE, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
+ add_bool( "fbosd-clear", false, NULL, CLEAR_TEXT, CLEAR_LONGTEXT, true );
+ add_bool( "fbosd-render", false, NULL, RENDER_TEXT, RENDER_LONGTEXT, true );
+ add_bool( "fbosd-display", false, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true );
set_description( _("GNU/Linux osd/overlay framebuffer interface") );
set_capability( "interface", 10 );
char *psz_string;
/* Positon */
- vlc_bool_t b_absolute;
+ bool b_absolute;
int i_x;
int i_y;
int i_pos;
/* Framebuffer information */
int i_fd; /* device handle */
struct fb_var_screeninfo var_info; /* current mode information */
- vlc_bool_t b_pan; /* does device supports panning ? */
+ bool b_pan; /* does device supports panning ? */
struct fb_cmap fb_cmap; /* original colormap */
uint16_t *p_palette; /* original palette */
text_style_t *p_style; /* font control */
/* Positon */
- vlc_bool_t b_absolute;
+ bool b_absolute;
int i_x;
int i_y;
int i_pos;
int i_alpha; /* transparency for images */
/* commands control */
- vlc_bool_t b_need_update; /* update display with \overlay buffer */
- vlc_bool_t b_clear; /* clear overlay buffer make it tranparent */
- vlc_bool_t b_render; /* render an image or text in overlay buffer */
+ bool b_need_update; /* update display with \overlay buffer */
+ bool b_clear; /* clear overlay buffer make it tranparent */
+ bool b_render; /* render an image or text in overlay buffer */
};
/*****************************************************************************
var_AddCallback( p_intf, "fbosd-display", OverlayCallback, NULL );
/* Check if picture position was overridden */
- p_sys->b_absolute = VLC_TRUE;
+ p_sys->b_absolute = true;
if( ( p_sys->i_x >= 0 ) && ( p_sys->i_y >= 0 ) )
{
- p_sys->b_absolute = VLC_FALSE;
+ p_sys->b_absolute = false;
p_sys->i_y = (p_sys->i_y < p_sys->i_height) ?
p_sys->i_y : p_sys->i_height;
p_sys->i_x = (p_sys->i_x < p_sys->i_width) ?
return VLC_EGENERIC;
}
#endif
- p_sys->b_render = VLC_TRUE;
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_render = true;
+ p_sys->b_need_update = true;
return VLC_SUCCESS;
}
intf_sys_t *p_sys = (intf_sys_t *) p_intf->p_sys;
int i;
- p_sys->b_need_update = VLC_FALSE;
- p_sys->b_render = VLC_FALSE;
- p_sys->b_clear = VLC_FALSE;
+ p_sys->b_need_update = false;
+ p_sys->b_render = false;
+ p_sys->b_clear = false;
#ifdef FBOSD_BLENDING
var_DelCallback( p_intf, "fbosd-alpha", OverlayCallback, NULL );
{
p_intf->p_sys->p_text->p_module =
module_Need( p_intf->p_sys->p_text, "text renderer",
- psz_modulename, VLC_TRUE );
+ psz_modulename, true );
}
if( !p_intf->p_sys->p_text->p_module )
{
/*****************************************************************************
* SetOverlayTransparency: Set the transparency for this overlay fb,
- * - VLC_TRUE is make transparent
- * - VLC_FALSE is make non tranparent
+ * - true is make transparent
+ * - false is make non tranparent
*****************************************************************************/
static void SetOverlayTransparency( intf_thread_t *p_intf,
- vlc_bool_t b_transparent )
+ bool b_transparent )
{
intf_sys_t *p_sys = (intf_sys_t *) p_intf->p_sys;
size_t i_size = p_sys->fmt_out.i_width * p_sys->fmt_out.i_height
&p_sys->fmt_out );
if( !p_sys->p_overlay ) return VLC_EGENERIC;
- SetOverlayTransparency( p_intf, VLC_TRUE );
+ SetOverlayTransparency( p_intf, true );
/* We know the chroma, allocate a buffer which will be used
* to write to the overlay framebuffer */
intf_sys_t *p_sys = (intf_sys_t *) p_intf->p_sys;
/* CleanUp */
- SetOverlayTransparency( p_intf, VLC_FALSE );
+ SetOverlayTransparency( p_intf, false );
if( p_sys->p_overlay )
{
int ret;
render->i_state = FBOSD_STATE_FREE;
}
-static vlc_bool_t isRendererReady( intf_thread_t *p_intf )
+static bool isRendererReady( intf_thread_t *p_intf )
{
intf_sys_t *p_sys = (intf_sys_t*) p_intf->p_sys;
int i;
for( i = 0; i < FBOSD_RENDER_MAX; i++ )
{
if( p_sys->render[i].i_state == FBOSD_STATE_RESERVED )
- return VLC_FALSE;
+ return false;
}
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
if( p_sys->b_clear )
{
- SetOverlayTransparency( p_intf, VLC_TRUE );
+ SetOverlayTransparency( p_intf, true );
var_SetString( p_intf, "fbosd-image", "" );
var_SetString( p_intf, "fbosd-text", "" );
- p_sys->b_clear = VLC_FALSE;
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_clear = false;
+ p_sys->b_need_update = true;
}
if( p_sys->b_need_update && p_sys->p_overlay &&
/* clear the picture */
memset( p_sys->p_overlay->p[0].p_pixels, 0xFF, p_sys->i_page_size );
- p_sys->b_need_update = VLC_FALSE;
+ p_sys->b_need_update = false;
}
if( vlc_CPU() & CPU_CAPABILITY_FPU )
if( !strncmp( psz_cmd, "fbosd-display", 13 ) )
{
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
}
else if( !strncmp( psz_cmd, "fbosd-clear", 11 ) )
{
{
RenderClear( p_intf, &p_sys->render[i] );
}
- p_sys->b_clear = VLC_TRUE;
+ p_sys->b_clear = true;
}
else if( !strncmp( psz_cmd, "fbosd-render", 12 ) )
{
}
else if( !strncmp( psz_cmd, "fbosd-x", 7 ) )
{
- p_sys->render[i].b_absolute = VLC_FALSE;
+ p_sys->render[i].b_absolute = false;
p_sys->render[i].i_x = (newval.i_int < p_sys->i_width) ?
newval.i_int : p_sys->i_width;
}
else if( !strncmp( psz_cmd, "fbosd-y", 7 ) )
{
- p_sys->render[i].b_absolute = VLC_FALSE;
+ p_sys->render[i].b_absolute = false;
p_sys->render[i].i_y = (newval.i_int < p_sys->i_height) ?
newval.i_int : p_sys->i_height;
}
else if( !strncmp( psz_cmd, "fbosd-position", 14 ) )
{
- p_sys->render[i].b_absolute = VLC_TRUE;
+ p_sys->render[i].b_absolute = true;
p_sys->render[i].i_pos = newval.i_int;
}
else if( !strncmp( psz_cmd, "fbosd-font-size", 15 ) )
displayNameAtPath: o_urlString] UTF8String] );
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT,
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
vlc_gc_decref( p_input );
config_PutInt( p_playlist, "random", 0 );
}
- p_intf->p_sys->b_playmode_update = VLC_TRUE;
- p_intf->p_sys->b_intf_update = VLC_TRUE;
+ p_intf->p_sys->b_playmode_update = true;
+ p_intf->p_sys->b_intf_update = true;
vlc_object_release( p_playlist );
}
[self repeatOne];
/* prepare core communication */
- repeating.b_bool = VLC_TRUE;
- looping.b_bool = VLC_FALSE;
+ repeating.b_bool = true;
+ looping.b_bool = false;
config_PutInt( p_playlist, "repeat", 1 );
config_PutInt( p_playlist, "loop", 0 );
[self repeatAll];
/* prepare core communication */
- repeating.b_bool = VLC_FALSE;
- looping.b_bool = VLC_TRUE;
+ repeating.b_bool = false;
+ looping.b_bool = true;
config_PutInt( p_playlist, "repeat", 0 );
config_PutInt( p_playlist, "loop", 1 );
[self repeatOff];
/* prepare core communication */
- repeating.b_bool = VLC_FALSE;
- looping.b_bool = VLC_FALSE;
+ repeating.b_bool = false;
+ looping.b_bool = false;
config_PutInt( p_playlist, "repeat", 0 );
config_PutInt( p_playlist, "loop", 0 );
/* communicate with core and the main intf loop */
var_Set( p_playlist, "repeat", repeating );
var_Set( p_playlist, "loop", looping );
- p_intf->p_sys->b_playmode_update = VLC_TRUE;
- p_intf->p_sys->b_intf_update = VLC_TRUE;
+ p_intf->p_sys->b_playmode_update = true;
+ p_intf->p_sys->b_intf_update = true;
vlc_object_release( p_playlist );
}
config_PutInt( p_playlist, "repeat", 0 );
}
- p_intf->p_sys->b_playmode_update = VLC_TRUE;
- p_intf->p_sys->b_intf_update = VLC_TRUE;
+ p_intf->p_sys->b_playmode_update = true;
+ p_intf->p_sys->b_intf_update = true;
vlc_object_release( p_playlist );
}
config_PutInt( p_playlist, "loop", 0 );
}
- p_intf->p_sys->b_playmode_update = VLC_TRUE;
- p_intf->p_sys->b_intf_update = VLC_TRUE;
+ p_intf->p_sys->b_playmode_update = true;
+ p_intf->p_sys->b_intf_update = true;
vlc_object_release( p_playlist );
}
var_Set( p_object, strdup([o_data name]), [o_data value] );
vlc_object_release( p_object );
[o_pool release];
- return VLC_TRUE;
+ return true;
}
[o_pool release];
return VLC_EGENERIC;
@implementation VLCEqualizer
static void ChangeFiltersString( intf_thread_t *p_intf,
- char *psz_name, vlc_bool_t b_add )
+ char *psz_name, bool b_add )
{
char *psz_parser, *psz_string;
int i;
{
for( i = 0; i < p_aout->i_nb_inputs; i++ )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
}
}
vlc_object_release( p_object );
}
-static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
+static bool GetFiltersStatus( intf_thread_t *p_intf,
char *psz_name )
{
char *psz_parser, *psz_string;
p_object = vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_object == NULL )
- return VLC_FALSE;
+ return false;
if( (BOOL)config_GetInt( p_intf, "macosx-eq-keep" ) == YES )
psz_string = config_GetPsz( p_intf, "audio-filter" );
vlc_object_release( p_object );
- if( !psz_string ) return VLC_FALSE;
+ if( !psz_string ) return false;
psz_parser = strstr( psz_string, psz_name );
free( psz_string );
if ( psz_parser )
- return VLC_TRUE;
+ return true;
else
- return VLC_FALSE;
+ return false;
}
- (void)initStrings
intf_thread_t *p_intf = VLCIntf;
float f_preamp, f_band[10];
char *psz_bands, *psz_bands_init, *p_next;
- vlc_bool_t b_2p;
+ bool b_2p;
int i;
- vlc_bool_t b_enabled = GetFiltersStatus( p_intf, (char *)"equalizer" );
+ bool b_enabled = GetFiltersStatus( p_intf, (char *)"equalizer" );
vlc_object_t *p_object = vlc_object_find( p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE );
- (IBAction)twopass:(id)sender
{
intf_thread_t *p_intf = VLCIntf;
- vlc_bool_t b_2p = [sender state] ? VLC_TRUE : VLC_FALSE;
+ bool b_2p = [sender state] ? true : false;
vlc_object_t *p_object= vlc_object_find( p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE );
aout_instance_t *p_aout = (aout_instance_t *)p_object;
int i;
for( i = 0; i < p_aout->i_nb_inputs; i++ )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
}
}
- (void)showPanel;
- (void)initStrings;
-- (void)changeVoutFiltersString: (char *)psz_name onOrOff: (vlc_bool_t )b_add;
-- (void)changeVideoFiltersString: (char *)psz_name onOrOff: (vlc_bool_t )b_add;
-- (void)changeAFiltersString: (char *)psz_name onOrOff: (vlc_bool_t )b_add;
+- (void)changeVoutFiltersString: (char *)psz_name onOrOff: (bool )b_add;
+- (void)changeVideoFiltersString: (char *)psz_name onOrOff: (bool )b_add;
+- (void)changeAFiltersString: (char *)psz_name onOrOff: (bool )b_add;
- (void)savePrefs;
@end
[o_sld_gamma setEnabled: YES];
[o_sld_hue setEnabled: YES];
[o_sld_saturation setEnabled: YES];
- [self changeVideoFiltersString: "adjust" onOrOff: VLC_TRUE];
+ [self changeVideoFiltersString: "adjust" onOrOff: true];
}
else
{
[o_sld_gamma setEnabled: NO];
[o_sld_hue setEnabled: NO];
[o_sld_saturation setEnabled: NO];
- [self changeVideoFiltersString: "adjust" onOrOff: VLC_FALSE];
+ [self changeVideoFiltersString: "adjust" onOrOff: false];
}
}
{
/* en-/disable headphone virtualisation */
if ([o_ckb_hdphnVirt state] == NSOnState)
- [self changeAFiltersString: "headphone_channel_mixer" onOrOff: VLC_TRUE ];
+ [self changeAFiltersString: "headphone_channel_mixer" onOrOff: true ];
else
- [self changeAFiltersString: "headphone_channel_mixer" onOrOff: VLC_FALSE ];
+ [self changeAFiltersString: "headphone_channel_mixer" onOrOff: false ];
}
- (IBAction)sliderActionMaximumAudioLevel:(id)sender
* methods to communicate changes to VLC's core
*****************************************************************************/
-- (void)changeVoutFiltersString:(char *)psz_name onOrOff:(vlc_bool_t )b_add
+- (void)changeVoutFiltersString:(char *)psz_name onOrOff:(bool )b_add
{
/* copied from ../wxwidgets/extrapanel.cpp
* renamed to conform with Cocoa's rules */
}
-- (void)changeVideoFiltersString:(char *)psz_name onOrOff:(vlc_bool_t )b_add
+- (void)changeVideoFiltersString:(char *)psz_name onOrOff:(bool )b_add
{
/* same as changeVoutFiltersString but addressing the "video-filter"
* variable which represents the video filter 2 modules */
o_config_changed = YES;
}
-- (void)changeAFiltersString: (char *)psz_name onOrOff: (vlc_bool_t )b_add;
+- (void)changeAFiltersString: (char *)psz_name onOrOff: (bool )b_add;
{
/* copied from ../wxwidgets/extrapanel.cpp
* renamed to conform with Cocoa's rules */
int i = 0;
while( i < p_aout->i_nb_inputs )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
i = (i + 1);
}
vlc_object_release( p_aout );
/* tell core that the user wishes to cancel the dialogue
* Use this function if cancelling is optionally like in the progress-dialogue */
vlc_mutex_lock( &p_dialog->p_interaction->object_lock );
- p_dialog->b_cancelled = VLC_TRUE;
+ p_dialog->b_cancelled = true;
vlc_mutex_unlock( &p_dialog->p_interaction->object_lock );
msg_Dbg( p_intf, "cancelling dialog, will close it later on" );
}
input_thread_t * p_input;
/* special actions */
- vlc_bool_t b_mute;
+ bool b_mute;
int i_play_status;
/* interface update */
- vlc_bool_t b_intf_update;
- vlc_bool_t b_playlist_update;
- vlc_bool_t b_playmode_update;
- vlc_bool_t b_current_title_update;
- vlc_bool_t b_fullscreen_update;
- vlc_bool_t b_volume_update;
- vlc_bool_t b_intf_show;
+ bool b_intf_update;
+ bool b_playlist_update;
+ bool b_playmode_update;
+ bool b_current_title_update;
+ bool b_fullscreen_update;
+ bool b_volume_update;
+ bool b_intf_show;
/* menus handlers */
- vlc_bool_t b_input_update;
- vlc_bool_t b_aout_update;
- vlc_bool_t b_vout_update;
+ bool b_input_update;
+ bool b_aout_update;
+ bool b_vout_update;
/* The messages window */
msg_subscription_t * p_sub;
p_intf->p_sys->o_sendport = [[NSPort port] retain];
p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
- p_intf->b_play = VLC_TRUE;
+ p_intf->b_play = true;
p_intf->pf_run = Run;
- p_intf->b_should_run_on_first_thread = VLC_TRUE;
+ p_intf->b_should_run_on_first_thread = true;
return( 0 );
}
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
intf_thread_t * p_intf = VLCIntf;
- p_intf->p_sys->b_playlist_update = VLC_TRUE;
- p_intf->p_sys->b_intf_update = VLC_TRUE;
- p_intf->p_sys->b_playmode_update = VLC_TRUE;
- p_intf->p_sys->b_current_title_update = VLC_TRUE;
+ p_intf->p_sys->b_playlist_update = true;
+ p_intf->p_sys->b_intf_update = true;
+ p_intf->p_sys->b_playmode_update = true;
+ p_intf->p_sys->b_current_title_update = true;
return VLC_SUCCESS;
}
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
intf_thread_t * p_intf = VLCIntf;
- p_intf->p_sys->b_intf_show = VLC_TRUE;
+ p_intf->p_sys->b_intf_show = true;
return VLC_SUCCESS;
}
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
intf_thread_t * p_intf = VLCIntf;
- p_intf->p_sys->b_fullscreen_update = VLC_TRUE;
+ p_intf->p_sys->b_fullscreen_update = true;
return VLC_SUCCESS;
}
/* Check if we need to start playing */
if( p_intf->b_play )
{
- playlist_Control( p_playlist, PLAYLIST_PLAY, VLC_FALSE );
+ playlist_Control( p_playlist, PLAYLIST_PLAY, false );
}
var_Create( p_playlist, "fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
- val.b_bool = VLC_FALSE;
+ val.b_bool = false;
var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self);
var_AddCallback( p_playlist, "intf-show", ShowController, self);
var_Create( p_intf, "interaction", VLC_VAR_ADDRESS );
var_AddCallback( p_intf, "interaction", InteractCallback, self );
- p_intf->b_interaction = VLC_TRUE;
+ p_intf->b_interaction = true;
/* update the playmode stuff */
- p_intf->p_sys->b_playmode_update = VLC_TRUE;
+ p_intf->p_sys->b_playmode_update = true;
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(refreshVoutDeviceMenu:)
if( p_intf->p_sys->p_input )
{
msg_Dbg( p_intf, "input has changed, refreshing interface" );
- p_intf->p_sys->b_input_update = VLC_TRUE;
+ p_intf->p_sys->b_input_update = true;
}
}
else if( p_intf->p_sys->p_input->b_die || p_intf->p_sys->p_input->b_dead )
{
/* input stopped */
- p_intf->p_sys->b_intf_update = VLC_TRUE;
+ p_intf->p_sys->b_intf_update = true;
p_intf->p_sys->i_play_status = END_S;
msg_Dbg( p_intf, "input has stopped, refreshing interface" );
p_intf->p_sys->p_input = NULL;
playlist_t * p_playlist;
input_thread_t * p_input;
- if( p_intf->p_libvlc->b_die == VLC_TRUE )
+ if( p_intf->p_libvlc->b_die == true )
{
[o_timer invalidate];
return;
if( p_intf->p_sys->b_input_update )
{
/* Called when new input is opened */
- p_intf->p_sys->b_current_title_update = VLC_TRUE;
- p_intf->p_sys->b_intf_update = VLC_TRUE;
- p_intf->p_sys->b_input_update = VLC_FALSE;
+ p_intf->p_sys->b_current_title_update = true;
+ p_intf->p_sys->b_intf_update = true;
+ p_intf->p_sys->b_input_update = false;
}
if( p_intf->p_sys->b_intf_update )
{
- vlc_bool_t b_input = VLC_FALSE;
- vlc_bool_t b_plmul = VLC_FALSE;
- vlc_bool_t b_control = VLC_FALSE;
- vlc_bool_t b_seekable = VLC_FALSE;
- vlc_bool_t b_chapters = VLC_FALSE;
+ bool b_input = false;
+ bool b_plmul = false;
+ bool b_control = false;
+ bool b_seekable = false;
+ bool b_chapters = false;
playlist_t * p_playlist = pl_Yield( p_intf );
/* TODO: fix i_size use */
[o_embedded_window setSeekable: b_seekable];
- p_intf->p_sys->b_current_title_update = VLC_TRUE;
+ p_intf->p_sys->b_current_title_update = true;
- p_intf->p_sys->b_intf_update = VLC_FALSE;
+ p_intf->p_sys->b_intf_update = false;
}
if( p_intf->p_sys->b_playmode_update )
{
[o_playlist playModeUpdated];
- p_intf->p_sys->b_playmode_update = VLC_FALSE;
+ p_intf->p_sys->b_playmode_update = false;
}
if( p_intf->p_sys->b_playlist_update )
{
[o_playlist playlistUpdated];
- p_intf->p_sys->b_playlist_update = VLC_FALSE;
+ p_intf->p_sys->b_playlist_update = false;
}
if( p_intf->p_sys->b_fullscreen_update )
{
- p_intf->p_sys->b_fullscreen_update = VLC_FALSE;
+ p_intf->p_sys->b_fullscreen_update = false;
}
if( p_intf->p_sys->b_intf_show )
{
[o_window makeKeyAndOrderFront: self];
- p_intf->p_sys->b_intf_show = VLC_FALSE;
+ p_intf->p_sys->b_intf_show = false;
}
p_playlist = pl_Yield( p_intf );
else
{
p_intf->p_sys->i_play_status = END_S;
- p_intf->p_sys->b_intf_update = VLC_TRUE;
+ p_intf->p_sys->b_intf_update = true;
[self playStatusUpdated: p_intf->p_sys->i_play_status];
[o_embedded_window playStatusUpdated: p_intf->p_sys->i_play_status];
[self setSubmenusEnabled: FALSE];
[o_extended savePrefs];
}
- p_intf->b_interaction = VLC_FALSE;
+ p_intf->b_interaction = false;
var_DelCallback( p_intf, "interaction", InteractCallback, self );
/* remove global observer watching for vout device changes correctly */
[o_update showUpdateWindow];
#else
msg_Err( VLCIntf, "Update checker wasn't enabled in this build" );
- intf_UserFatal( VLCIntf, VLC_FALSE, _("Update check failed"), _("Checking for updates was not enabled in this build.") );
+ intf_UserFatal( VLCIntf, false, _("Update check failed"), _("Checking for updates was not enabled in this build.") );
#endif
}
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
add_bool( "macosx-autoplay", 1, NULL, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT,
- VLC_FALSE );
+ false );
add_bool( "macosx-recentitems", 1, NULL, RECENT_ITEMS_TEXT, RECENT_ITEMS_LONGTEXT,
- VLC_FALSE );
+ false );
add_bool( "macosx-eq-keep", 1, NULL, EQ_KEEP_TEXT, EQ_KEEP_LONGTEXT,
- VLC_FALSE );
+ false );
add_bool( "macosx-fspanel", 1, NULL, FSPANEL_TEXT, FSPANEL_LONGTEXT,
- VLC_FALSE );
+ false );
add_submodule();
set_description( _("Quartz video") );
set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
- VLC_FALSE );
+ false );
add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
- VLC_FALSE );
+ false );
add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
- OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
+ OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true );
add_bool( "macosx-black", 1, NULL, BLACK_TEXT, BLACK_LONGTEXT,
- VLC_FALSE );
+ false );
add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
- VLC_FALSE );
+ false );
add_submodule();
set_description( "Mac OS X OpenGL" );
set_capability( "opengl provider", 100 );
NSString *o_mrl_string;
NSString *o_filename = [o_file_path stringValue];
NSString *o_ext = [o_filename pathExtension];
- vlc_bool_t b_stream = [o_file_stream state];
+ bool b_stream = [o_file_stream state];
BOOL b_dir = NO;
[[NSFileManager defaultManager] fileExistsAtPath:o_filename isDirectory:&b_dir];
for( i = 0; ppsz_services[i]; i++ )
{
- vlc_bool_t b_enabled;
+ bool b_enabled;
char *objectname;
NSMenuItem *o_lmi;
var_Get( p_playlist, "loop", &val2 );
var_Get( p_playlist, "repeat", &val );
- if( val.b_bool == VLC_TRUE )
+ if( val.b_bool == true )
{
[[[VLCMain sharedInstance] getControls] repeatOne];
}
- else if( val2.b_bool == VLC_TRUE )
+ else if( val2.b_bool == true )
{
[[[VLCMain sharedInstance] getControls] repeatAll];
}
p_item = NULL;
}
}
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_node, p_item );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, p_node, p_item );
}
vlc_object_release( p_playlist );
}
// if current item is in selected node and is playing then stop playlist
playlist_Stop( p_playlist );
- playlist_NodeDelete( p_playlist, p_item, VLC_TRUE, VLC_FALSE );
+ playlist_NodeDelete( p_playlist, p_item, true, false );
}
else
- playlist_DeleteFromInput( p_playlist, p_item->p_input->i_id, VLC_TRUE );
+ playlist_DeleteFromInput( p_playlist, p_item->p_input->i_id, true );
}
PL_UNLOCK;
/* Add the item */
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT,
- i_position == -1 ? PLAYLIST_END : i_position + i_item, VLC_TRUE,
- VLC_FALSE );
+ i_position == -1 ? PLAYLIST_END : i_position + i_item, true,
+ false );
if( i_item == 0 && !b_enqueue )
{
playlist_item_t *p_item;
- p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE );
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, NULL, p_item );
+ p_item = playlist_ItemGetByInput( p_playlist, p_input, true );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL, p_item );
}
else
{
playlist_item_t *p_item;
- p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE );
- playlist_Control( p_playlist, PLAYLIST_SKIP, VLC_TRUE, p_item );
+ p_item = playlist_ItemGetByInput( p_playlist, p_input, true );
+ playlist_Control( p_playlist, PLAYLIST_SKIP, true, p_item );
}
vlc_gc_decref( p_input );
}
playlist_NodeAddInput( p_playlist, p_input, p_node,
PLAYLIST_INSERT,
i_position == -1 ?
- PLAYLIST_END : i_position + i_item, VLC_FALSE );
+ PLAYLIST_END : i_position + i_item, false );
if( i_item == 0 && !b_enqueue )
{
playlist_item_t *p_item;
- p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE );
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, NULL, p_item );
+ p_item = playlist_ItemGetByInput( p_playlist, p_input, true );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL, p_item );
}
else
{
playlist_item_t *p_item;
- p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE );
- playlist_Control( p_playlist, PLAYLIST_SKIP, VLC_TRUE, p_item );
+ p_item = playlist_ItemGetByInput( p_playlist, p_input, true );
+ playlist_Control( p_playlist, PLAYLIST_SKIP, true, p_item );
}
vlc_gc_decref( p_input );
}
- (NSMenu *)menuForEvent:(NSEvent *)o_event
{
NSPoint pt;
- vlc_bool_t b_rows;
- vlc_bool_t b_item_sel;
+ bool b_rows;
+ bool b_item_sel;
pt = [o_outline_view convertPoint: [o_event locationInWindow]
fromView: nil];
}
else
{
- b_isSortDescending = VLC_FALSE;
+ b_isSortDescending = false;
}
if( o_tc == o_tc_name )
module_Unneed( p_playlist, p_mod );
PL_UNLOCK;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_playlist, "intf-change", val );
[self updatePanel];
}
- (NSString *)getTitle;
- (NSString *)getHelp;
- (BOOL)hasPrefs:(NSString *)o_module_name;
-- (NSView *)showView:(NSScrollView *)o_prefs_view advancedView:(vlc_bool_t) b_advanced;
+- (NSView *)showView:(NSScrollView *)o_prefs_view advancedView:(bool) b_advanced;
- (void)applyChanges;
- (void)resetView;
@interface VLCPrefs : NSObject
{
intf_thread_t *p_intf;
- vlc_bool_t b_advanced;
+ bool b_advanced;
VLCTreeItem *o_config_tree;
NSView *o_empty_view;
NSMutableDictionary *o_save_prefs;
[[VLCTreeItem rootItem] resetView];
[[o_tree itemAtRow:[o_tree selectedRow]]
showView:o_prefs_view advancedView:
- ( [o_advanced_ckb state] == NSOnState ) ? VLC_TRUE : VLC_FALSE];
+ ( [o_advanced_ckb state] == NSOnState ) ? true : false];
}
}
[o_advanced_ckb setState: b_advanced];
/* refresh the view of the current treeitem */
[[o_tree itemAtRow:[o_tree selectedRow]] showView:o_prefs_view advancedView:
- ( [o_advanced_ckb state] == NSOnState ) ? VLC_TRUE : VLC_FALSE];
+ ( [o_advanced_ckb state] == NSOnState ) ? true : false];
}
- (void)loadConfigTree
{
[[o_tree itemAtRow:[o_tree selectedRow]] showView: o_prefs_view
advancedView:( [o_advanced_ckb state] == NSOnState ) ?
- VLC_TRUE : VLC_FALSE];
+ true : false];
}
@end
/* Find the right category item */
long cookie;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
unsigned int i;
VLCTreeItem* p_category_item, * p_subcategory_item;
for (i = 0 ; i < [o_children count] ; i++)
p_category_item = [o_children objectAtIndex: i];
if( p_category_item->i_object_id == i_category )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
if( !b_found ) continue;
/* Find subcategory item */
- b_found = VLC_FALSE;
+ b_found = false;
cookie = -1;
for (i = 0 ; i < [p_category_item->o_children count] ; i++)
{
objectAtIndex: i];
if( p_subcategory_item->i_object_id == i_subcategory )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
[p_subcategory_item->o_children addObject:[[VLCTreeItem alloc]
initWithName:[[VLCMain sharedInstance]
- localizedString: module_GetName( p_module, VLC_FALSE ) ]
+ localizedString: module_GetName( p_module, false ) ]
withTitle:[[VLCMain sharedInstance]
localizedString: module_GetLongName( p_module ) ]
withHelp: @""
}
- (NSView *)showView:(NSScrollView *)o_prefs_view
- advancedView:(vlc_bool_t) b_advanced
+ advancedView:(bool) b_advanced
{
NSRect s_vrc;
NSView *o_view;
NSTextField *o_label;
int i_type;
int i_view_type;
- vlc_bool_t b_advanced;
+ bool b_advanced;
}
+ (VLCConfigControl *)newControl: (module_config_t *)_p_item
- (void)showAsPanel;
- (void)initStrings;
-- (void)changeFiltersString: (char *)psz_name onOrOff: (vlc_bool_t )b_add;
+- (void)changeFiltersString: (char *)psz_name onOrOff: (bool )b_add;
- (void)enableTime;
- (void)enableLogo;
- (void)enableMarq;
[o_logo_pos_radio setEnabled: [o_logo_enabled_ckb state]];
}
-- (void)changeFiltersString:(char *)psz_name onOrOff:(vlc_bool_t )b_add
+- (void)changeFiltersString:(char *)psz_name onOrOff:(bool )b_add
{
/* copied from ../wxwidgets/extrapanel.cpp
* renamed to conform with Cocoa's rules
IBOutlet id o_chk_updateOnStartup;
update_t * p_u;
- vlc_bool_t b_checked;
+ bool b_checked;
}
- (IBAction)download:(id)sender;
[self dealloc];
} else {
_o_sharedInstance = [super init];
- b_checked = VLC_FALSE;
+ b_checked = false;
/* clean the interface */
[o_fld_releaseNote setString: @""];
{
[o_bar_checking startAnimation: self];
[self checkForUpdate];
- b_checked = VLC_TRUE;
+ b_checked = true;
[o_bar_checking stopAnimation: self];
}
}
[pool release];
}
-static void updateCallback( void * p_data, vlc_bool_t b_success )
+static void updateCallback( void * p_data, bool b_success )
{
[(id)p_data setUpToDate: !b_success || update_CompareReleaseToCurrent( ((VLCUpdate*)p_data)->p_u ) == UpdateReleaseStatusNewer ];
}
NSRect * s_frame;
vout_thread_t * p_real_vout;
- vlc_bool_t b_init_ok;
- vlc_bool_t b_black;
- vlc_bool_t b_embedded;
+ bool b_init_ok;
+ bool b_black;
+ bool b_embedded;
}
- (id) initWithVout: (vout_thread_t *) p_vout view: (VLCVoutView *) view
var_Create( p_vout->p_libvlc, "video-device", VLC_VAR_INTEGER );
var_Set( p_vout->p_libvlc, "video-device", new_val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
}
var_AddCallback( p_real_vout, "video-device", DeviceCallback,
NULL );
- val2.b_bool = VLC_TRUE;
+ val2.b_bool = true;
var_Set( p_real_vout, "intf-change", val2 );
}
if( !p_real_vout ) return;
if( var_Get( p_real_vout, "video-on-top", &val )>=0 && val.b_bool)
{
- val.b_bool = VLC_FALSE;
+ val.b_bool = false;
}
else
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
}
var_Set( p_real_vout, "video-on-top", val );
}
if( p_vout && [o_event type] == NSLeftMouseUp )
{
vlc_value_t b_val;
- b_val.b_bool = VLC_TRUE;
+ b_val.b_bool = true;
var_Set( p_vout, "mouse-clicked", b_val );
var_Get( p_vout, "mouse-button-down", &val );
}
var_Set( p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
}
if( [self isFullscreen] )
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
NSArray *o_screens = [NSScreen screens];
NSScreen *o_screen;
- vlc_bool_t b_menubar_screen = VLC_FALSE;
+ bool b_menubar_screen = false;
int i_device;
- b_init_ok = VLC_FALSE;
+ b_init_ok = false;
p_real_vout = [VLCVoutView getRealVout: p_vout];
i_device = var_GetInteger( p_real_vout->p_libvlc, "video-device" );
o_screen = [NSScreen mainScreen];
if( [o_screen isMainScreen] )
- b_menubar_screen = VLC_TRUE;
+ b_menubar_screen = true;
if( p_vout->b_fullscreen )
{
{
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
}
- if( b_black == VLC_TRUE )
+ if( b_black == true )
{
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 0.6 , kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
[o_pool release];
- b_init_ok = VLC_TRUE;
+ b_init_ok = true;
return self;
}
- (id)closeReal:(id)sender
{
- if( b_black == VLC_TRUE )
+ if( b_black == true )
{
CGDisplayFadeReservationToken token;
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
SetSystemUIMode( kUIModeNormal, 0);
[super close];
/* this does only work in embedded mode */
- if( b_embedded == VLC_TRUE )
+ if( b_embedded == true )
[[[[VLCMain sharedInstance] getControls] getFSPanel] orderOut: self];
return NULL;
NSAutoreleasePool * o_pool;
VLCGLView * o_glview;
VLCVoutView * o_vout_view;
- vlc_bool_t b_saved_frame;
+ bool b_saved_frame;
NSRect s_frame;
- vlc_bool_t b_got_frame;
+ bool b_got_frame;
/* Mozilla plugin-related variables */
- vlc_bool_t b_embedded;
+ bool b_embedded;
AGLContext agl_ctx;
AGLDrawable agl_drawable;
int i_offx, i_offy;
int i_width, i_height;
WindowRef theWindow;
WindowGroupRef winGroup;
- vlc_bool_t b_clipped_out;
+ bool b_clipped_out;
Rect clipBounds, viewBounds;
};
AGLPixelFormat pixFormat;
- p_vout->p_sys->b_embedded = VLC_TRUE;
+ p_vout->p_sys->b_embedded = true;
pixFormat = aglChoosePixelFormat(NULL, 0, ATTRIBUTES);
if( NULL == pixFormat )
{
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
- p_vout->p_sys->b_embedded = VLC_FALSE;
+ p_vout->p_sys->b_embedded = false;
[VLCGLView performSelectorOnMainThread:@selector(initVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES];
p_vout->pf_lock = Lock;
p_vout->pf_unlock = Unlock;
}
- p_vout->p_sys->b_got_frame = VLC_FALSE;
+ p_vout->p_sys->b_got_frame = false;
return VLC_SUCCESS;
}
*****************************************************************************/
static int Control( vout_thread_t *p_vout, int i_query, va_list args )
{
- vlc_bool_t b_arg;
+ bool b_arg;
switch( i_query )
{
static void Swap( vout_thread_t * p_vout )
{
- p_vout->p_sys->b_got_frame = VLC_TRUE;
+ p_vout->p_sys->b_got_frame = true;
[[p_vout->p_sys->o_glview openGLContext] flushBuffer];
}
[p_vout->p_sys->o_vout_view frame].size;
p_vout->p_sys->s_frame.origin =
[[p_vout->p_sys->o_vout_view getWindow ]frame].origin;
- p_vout->p_sys->b_saved_frame = VLC_TRUE;
+ p_vout->p_sys->b_saved_frame = true;
}
[p_vout->p_sys->o_vout_view closeVout];
{
if( ! p_vout->p_sys->b_clipped_out )
{
- p_vout->p_sys->b_got_frame = VLC_TRUE;
+ p_vout->p_sys->b_got_frame = true;
aglSwapBuffers(p_vout->p_sys->agl_ctx);
}
else
{
vlc_value_t val;
- val.b_bool = VLC_FALSE;
+ val.b_bool = false;
var_Set((vout_thread_t *) p_vout->p_parent, "fullscreen", val);
}
else
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
var_Get( p_vout, "mouse-button-down", &val );
var_Set( p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
break;
VLCQTView * o_qtview;
VLCVoutView * o_vout_view;
- vlc_bool_t b_saved_frame;
- vlc_bool_t b_cpu_has_simd; /* does CPU supports Altivec, MMX, etc... */
+ bool b_saved_frame;
+ bool b_cpu_has_simd; /* does CPU supports Altivec, MMX, etc... */
NSRect s_frame;
CodecType i_codec;
int i_origx, i_origy;
int i_width, i_height;
/* Mozilla plugin-related variables */
- vlc_bool_t b_embedded;
+ bool b_embedded;
RgnHandle clip_mask;
};
* CGrafPtr that we're expected to use */
var_Get( p_vout->p_libvlc, "drawable", &value_drawable );
if( value_drawable.i_int != 0 )
- p_vout->p_sys->b_embedded = VLC_TRUE;
+ p_vout->p_sys->b_embedded = true;
else
- p_vout->p_sys->b_embedded = VLC_FALSE;
+ p_vout->p_sys->b_embedded = false;
p_vout->p_sys->b_cpu_has_simd =
vlc_CPU() & (CPU_CAPABILITY_ALTIVEC|CPU_CAPABILITY_MMXEXT);
*****************************************************************************/
static int ControlVideo( vout_thread_t *p_vout, int i_query, va_list args )
{
- vlc_bool_t b_arg;
+ bool b_arg;
switch( i_query )
{
[p_vout->p_sys->o_vout_view frame].size;
p_vout->p_sys->s_frame.origin =
[[p_vout->p_sys->o_vout_view getWindow] frame].origin;
- p_vout->p_sys->b_saved_frame = VLC_TRUE;
+ p_vout->p_sys->b_saved_frame = true;
}
else
{
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP,
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
if( x == 0 )
{
/* play the first item and add the others afterwards */
- playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE );
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, NULL,
+ playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, true );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL,
p_item );
}
msg_Warn( p_vout, "No drawable!, spawing a window" );
}
- p_vout->p_sys->b_embedded = VLC_FALSE;
+ p_vout->p_sys->b_embedded = false;
/* Create the GL view */
*****************************************************************************/
int cocoaglvoutviewControl( vout_thread_t *p_vout, int i_query, va_list args )
{
- vlc_bool_t b_arg;
+ bool b_arg;
switch( i_query )
{
*****************************************************************************/
void cocoaglvoutviewSwap( vout_thread_t * p_vout )
{
- p_vout->p_sys->b_got_frame = VLC_TRUE;
+ p_vout->p_sys->b_got_frame = true;
[[p_vout->p_sys->o_glview openGLContext] flushBuffer];
}
memset( p_intf->p_sys, 0, sizeof( *p_intf->p_sys ) );
p_intf->pf_run = Run;
- p_intf->b_should_run_on_first_thread = VLC_TRUE;
+ p_intf->b_should_run_on_first_thread = true;
return VLC_SUCCESS;
}
AGLPixelFormat pixFormat;
- p_vout->p_sys->b_embedded = VLC_TRUE;
+ p_vout->p_sys->b_embedded = true;
pixFormat = aglChoosePixelFormat(NULL, 0, ATTRIBUTES);
if( NULL == pixFormat )
{
if( ! p_vout->p_sys->b_clipped_out )
{
- p_vout->p_sys->b_got_frame = VLC_TRUE;
+ p_vout->p_sys->b_got_frame = true;
aglSwapBuffers(p_vout->p_sys->agl_ctx);
}
else
{
vlc_value_t val;
- val.b_bool = VLC_FALSE;
+ val.b_bool = false;
var_Set((vout_thread_t *) p_vout->p_parent, "fullscreen", val);
}
else
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
var_Get( p_vout, "mouse-button-down", &val );
var_Set( p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
break;
{
NSAutoreleasePool * o_pool;
VLCOpenGLVoutView * o_glview;
- vlc_bool_t b_saved_frame;
+ bool b_saved_frame;
NSRect s_frame;
- vlc_bool_t b_got_frame;
+ bool b_got_frame;
/* Mozilla plugin-related variables */
- vlc_bool_t b_embedded;
+ bool b_embedded;
AGLContext agl_ctx;
AGLDrawable agl_drawable;
int i_offx, i_offy;
int i_width, i_height;
WindowRef theWindow;
WindowGroupRef winGroup;
- vlc_bool_t b_clipped_out;
+ bool b_clipped_out;
Rect clipBounds, viewBounds;
};
p_vout->pf_lock = cocoaglvoutviewLock;
p_vout->pf_unlock = cocoaglvoutviewUnlock;
}
- p_vout->p_sys->b_got_frame = VLC_FALSE;
+ p_vout->p_sys->b_got_frame = false;
return VLC_SUCCESS;
}
static void PlaylistDestroy( intf_thread_t * );
static int PlaylistChanged( vlc_object_t *, const char *, vlc_value_t,
vlc_value_t, void * );
-static inline vlc_bool_t PlaylistIsPlaying( intf_thread_t *,
+static inline bool PlaylistIsPlaying( intf_thread_t *,
playlist_item_t * );
static void FindIndex ( intf_thread_t * );
static void SearchPlaylist ( intf_thread_t *, char * );
set_subcategory( SUBCAT_INTERFACE_MAIN );
set_callbacks( Open, Close );
add_shortcut( "curses" );
- add_directory( "browse-dir", NULL, NULL, BROWSE_TEXT, BROWSE_LONGTEXT, VLC_FALSE );
+ add_directory( "browse-dir", NULL, NULL, BROWSE_TEXT, BROWSE_LONGTEXT, false );
vlc_module_end();
/*****************************************************************************
};
struct dir_entry_t
{
- vlc_bool_t b_file;
+ bool b_file;
char *psz_path;
};
struct pl_item_t
{
input_thread_t *p_input;
- vlc_bool_t b_color;
- vlc_bool_t b_color_started;
+ bool b_color;
+ bool b_color_started;
float f_slider;
float f_slider_old;
char *psz_current_dir;
int i_dir_entries;
struct dir_entry_t **pp_dir_entries;
- vlc_bool_t b_show_hidden_files;
+ bool b_show_hidden_files;
int i_current_view; /* playlist view */
struct pl_item_t **pp_plist;
int i_plist_entries;
- vlc_bool_t b_need_update; /* for playlist view */
+ bool b_need_update; /* for playlist view */
int i_verbose; /* stores verbosity level */
};
-static void DrawBox( WINDOW *win, int y, int x, int h, int w, const char *title, vlc_bool_t b_color );
+static void DrawBox( WINDOW *win, int y, int x, int h, int w, const char *title, bool b_color );
static void DrawLine( WINDOW *win, int y, int x, int w );
static void DrawEmptyLine( WINDOW *win, int y, int x, int w );
p_sys->i_box_lines = 0;
p_sys->i_box_start= 0;
p_sys->i_box_lines_total = 0;
- p_sys->b_box_plidx_follow = VLC_TRUE;
- p_sys->b_box_cleared = VLC_FALSE;
+ p_sys->b_box_plidx_follow = true;
+ p_sys->b_box_cleared = false;
p_sys->i_box_plidx = 0;
p_sys->i_box_bidx = 0;
p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
p_sys->b_color = p_this->p_libvlc->b_color;
- p_sys->b_color_started = VLC_FALSE;
+ p_sys->b_color_started = false;
#ifndef HAVE_NCURSESW
memset( p_sys->psz_partial_keys, 0, sizeof( p_sys->psz_partial_keys ) );
p_sys->i_current_view = VIEW_CATEGORY;
p_sys->pp_plist = NULL;
p_sys->i_plist_entries = 0;
- p_sys->b_need_update = VLC_FALSE;
+ p_sys->b_need_update = false;
/* Initialize search chain */
p_sys->psz_search_chain = (char *)malloc( SEARCH_CHAIN_SIZE + 1 );
p_sys->i_dir_entries = 0;
p_sys->pp_dir_entries = NULL;
- p_sys->b_show_hidden_files = VLC_FALSE;
+ p_sys->b_show_hidden_files = false;
ReadDir( p_intf );
return VLC_SUCCESS;
vlc_object_release( p_sys->p_input );
p_sys->p_input = NULL;
p_sys->f_slider = p_sys->f_slider_old = 0.0;
- p_sys->b_box_cleared = VLC_FALSE;
+ p_sys->b_box_cleared = false;
}
PL_UNLOCK;
{
clear();
Redraw( p_intf, &t_last_refresh );
- p_sys->b_box_cleared = VLC_TRUE;
+ p_sys->b_box_cleared = true;
}
/*
if( !has_colors() )
{
- p_intf->p_sys->b_color = VLC_FALSE;
+ p_intf->p_sys->b_color = false;
msg_Warn( p_intf, "Terminal doesn't support colors" );
return;
}
/* Folder (BOX_BROWSE) */
init_pair( C_FOLDER, COLOR_RED, COLOR_BLACK );
- p_intf->p_sys->b_color_started = VLC_TRUE;
+ p_intf->p_sys->b_color_started = true;
}
#ifndef HAVE_NCURSESW
if( p_sys->i_box_type == BOX_PLAYLIST )
{
- int b_ret = VLC_TRUE;
- vlc_bool_t b_box_plidx_follow = VLC_FALSE;
+ int b_ret = true;
+ bool b_box_plidx_follow = false;
switch( i_key )
{
playlist_RecursiveNodeSort( p_playlist,
PlaylistGetRoot( p_intf ),
SORT_TITLE_NODES_FIRST, ORDER_NORMAL );
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
return 1;
case 'O':
playlist_RecursiveNodeSort( p_playlist,
PlaylistGetRoot( p_intf ),
SORT_TITLE_NODES_FIRST, ORDER_REVERSE );
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
return 1;
/* Playlist view */
default:
p_sys->i_current_view = VIEW_CATEGORY;
}
- //p_sys->b_need_update = VLC_TRUE;
+ //p_sys->b_need_update = true;
PlaylistRebuild( p_intf );
return 1;
if( p_item->i_children == -1 )
{
playlist_DeleteFromInput( p_playlist,
- p_item->p_input->i_id, VLC_TRUE );
+ p_item->p_input->i_id, true );
}
else
{
playlist_NodeDelete( p_playlist, p_item,
- VLC_TRUE , VLC_FALSE );
+ true , false );
}
PL_UNLOCK;
PlaylistRebuild( p_intf );
case '\n':
if( !p_sys->pp_plist[p_sys->i_box_plidx] )
{
- b_ret = VLC_FALSE;
+ b_ret = false;
break;
}
if( p_sys->pp_plist[p_sys->i_box_plidx]->p_item->i_children
while( p_parent->p_parent )
p_parent = p_parent->p_parent;
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
- VLC_TRUE, p_parent, p_item );
+ true, p_parent, p_item );
}
else if( p_sys->pp_plist[p_sys->i_box_plidx]->p_item->i_children
== 0 )
else
{
p_sys->p_node = p_sys->pp_plist[p_sys->i_box_plidx]->p_item;
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
p_sys->pp_plist[p_sys->i_box_plidx]->p_item, NULL );
}
- b_box_plidx_follow = VLC_TRUE;
+ b_box_plidx_follow = true;
break;
default:
- b_ret = VLC_FALSE;
+ b_ret = false;
break;
}
if( p_sys->i_box_plidx < 0 ) p_sys->i_box_plidx = 0;
if( PlaylistIsPlaying( p_intf,
p_sys->pp_plist[p_sys->i_box_plidx]->p_item ) )
- b_box_plidx_follow = VLC_TRUE;
+ b_box_plidx_follow = true;
p_sys->b_box_plidx_follow = b_box_plidx_follow;
return 1;
}
}
if( p_sys->i_box_type == BOX_BROWSE )
{
- vlc_bool_t b_ret = VLC_TRUE;
+ bool b_ret = true;
/* Browser navigation */
switch( i_key )
{
break;
case '.': /* Toggle show hidden files */
p_sys->b_show_hidden_files = ( p_sys->b_show_hidden_files ==
- VLC_TRUE ? VLC_FALSE : VLC_TRUE );
+ true ? false : true );
ReadDir( p_intf );
break;
PLAYLIST_END,
p_parent->p_input ==
p_playlist->p_local_onelevel->p_input
- , VLC_FALSE );
+ , false );
p_sys->i_box_type = BOX_PLAYLIST;
free( psz_uri );
}
break;
default:
- b_ret = VLC_FALSE;
+ b_ret = false;
break;
}
if( b_ret )
PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END,
p_parent->p_input ==
p_playlist->p_local_onelevel->p_input
- , VLC_FALSE );
+ , false );
- p_sys->b_box_plidx_follow = VLC_TRUE;
+ p_sys->b_box_plidx_follow = true;
}
p_sys->i_box_type = BOX_PLAYLIST;
return 1;
return 1;
}
p_sys->psz_search_chain[0] = '\0';
- p_sys->b_box_plidx_follow = VLC_FALSE;
+ p_sys->b_box_plidx_follow = false;
p_sys->i_before_search = p_sys->i_box_plidx;
p_sys->i_box_type = BOX_SEARCH;
}
case '[':
if( p_sys->p_input )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_sys->p_input, "prev-title", val );
}
return 1;
case ']':
if( p_sys->p_input )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_sys->p_input, "next-title", val );
}
return 1;
case '<':
if( p_sys->p_input )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_sys->p_input, "prev-chapter", val );
}
return 1;
case '>':
if( p_sys->p_input )
{
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_sys->p_input, "next-chapter", val );
}
return 1;
for( i_item = i_start; i_item < i_stop; i_item++ )
{
- vlc_bool_t b_selected = ( p_sys->i_box_bidx == i_item );
+ bool b_selected = ( p_sys->i_box_bidx == i_item );
if( y >= y_end ) break;
if( b_selected )
}
if( p_sys->b_color && !p_sys->pp_dir_entries[i_item]->b_file )
wcolor_set( p_sys->w, C_FOLDER, NULL );
- mvnprintw( y++, 1, COLS - 2, " %c %s", p_sys->pp_dir_entries[i_item]->b_file == VLC_TRUE ? ' ' : '+',
+ mvnprintw( y++, 1, COLS - 2, " %c %s", p_sys->pp_dir_entries[i_item]->b_file == true ? ' ' : '+',
p_sys->pp_dir_entries[i_item]->psz_path );
if( p_sys->b_color && !p_sys->pp_dir_entries[i_item]->b_file )
wcolor_set( p_sys->w, C_DEFAULT, NULL );
for( i_item = i_start; i_item < i_stop; i_item++ )
{
- vlc_bool_t b_selected = ( p_sys->i_box_plidx == i_item );
+ bool b_selected = ( p_sys->i_box_plidx == i_item );
playlist_item_t *p_item = p_sys->pp_plist[i_item]->p_item;
playlist_item_t *p_node = p_sys->p_node;
int c = ' ';
/* Build the new one */
PlaylistAddNode( p_intf, PlaylistGetRoot( p_intf ), 0, "" );
- p_sys->b_need_update = VLC_FALSE;
+ p_sys->b_need_update = false;
PL_UNLOCK;
}
VLC_UNUSED(oval); VLC_UNUSED(nval);
intf_thread_t *p_intf = (intf_thread_t *)param;
playlist_t *p_playlist = pl_Get( p_intf );
- p_intf->p_sys->b_need_update = VLC_TRUE;
+ p_intf->p_sys->b_need_update = true;
p_intf->p_sys->p_node = p_playlist->status.p_node;
return VLC_SUCCESS;
}
/* Playlist suxx */
-static inline vlc_bool_t PlaylistIsPlaying( intf_thread_t *p_intf,
+static inline bool PlaylistIsPlaying( intf_thread_t *p_intf,
playlist_item_t *p_item )
{
playlist_t *p_playlist = pl_Get( p_intf );
strlen( psz_entry ) + 2;
char *psz_uri;
- if( p_sys->b_show_hidden_files == VLC_FALSE &&
+ if( p_sys->b_show_hidden_files == false &&
( strlen( psz_entry ) && psz_entry[0] == '.' ) &&
strcmp( psz_entry, ".." ) )
{
#endif
{
p_dir_entry->psz_path = strdup( psz_entry );
- p_dir_entry->b_file = VLC_FALSE;
+ p_dir_entry->b_file = false;
INSERT_ELEM( p_sys->pp_dir_entries, p_sys->i_dir_entries,
p_sys->i_dir_entries, p_dir_entry );
}
else
{
p_dir_entry->psz_path = strdup( psz_entry );
- p_dir_entry->b_file = VLC_TRUE;
+ p_dir_entry->b_file = true;
INSERT_ELEM( p_sys->pp_dir_entries, p_sys->i_dir_entries,
p_sys->i_dir_entries, p_dir_entry );
}
/****************************************************************************
*
****************************************************************************/
-static void DrawBox( WINDOW *win, int y, int x, int h, int w, const char *title, vlc_bool_t b_color )
+static void DrawBox( WINDOW *win, int y, int x, int h, int w, const char *title, bool b_color )
{
int i;
int i_len;
set_description( _("PDA Linux Gtk2+ interface") );
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
-// add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, VLC_TRUE );
+// add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, true );
set_capability( "interface", 70 );
set_callbacks( Open, Close );
add_shortcut( "pda" );
#ifdef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Using gui-helper" );
p_intf->p_sys->p_gtk_main =
- module_Need( p_this, "gui-helper", "gtk2", VLC_TRUE );
+ module_Need( p_this, "gui-helper", "gtk2", true );
if( p_intf->p_sys->p_gtk_main == NULL )
{
free( p_intf->p_sys );
if( !config_GetInt( p_this, "pda-autoplayfile" ) )
{
- p_intf->p_sys->b_autoplayfile = VLC_FALSE;
+ p_intf->p_sys->b_autoplayfile = false;
}
else
{
- p_intf->p_sys->b_autoplayfile = VLC_TRUE;
+ p_intf->p_sys->b_autoplayfile = true;
}
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( cbautoplay ),
p_intf->p_sys->b_autoplayfile );
gint E_(GtkModeManage)( intf_thread_t * p_intf )
{
GtkWidget * p_slider = NULL;
- vlc_bool_t b_control;
+ bool b_control;
if ( p_intf->p_sys->p_window == NULL )
msg_Err( p_intf, "Main widget not found" );
float f_adj_oldvalue; /* previous value -with FPU hardware*/
/* special actions */
- vlc_bool_t b_playing;
- vlc_bool_t b_window_changed; /* window display toggled ? */
- vlc_bool_t b_slider_free; /* slider status */
+ bool b_playing;
+ bool b_window_changed; /* window display toggled ? */
+ bool b_slider_free; /* slider status */
/* Preference settings */
- vlc_bool_t b_autoplayfile;
+ bool b_autoplayfile;
/* The input thread */
input_thread_t * p_input;
PLAYLIST_APPEND, PLAYLIST_END,
(mtime_t) 0,
(const char **) ppsz_options, i_pos,
- VLC_TRUE, VLC_FALSE );
+ true, false );
}
/* Cleanup memory */
vlc_mutex_lock( &p_playlist->object_lock );
for( i_dummy = 0; i_dummy < playlist_CurrentSize(p_intf) ; i_dummy++ )
{
- playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_dummy, VLC_TRUE );
+ playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_dummy, true );
if( p_item )
{
ppsz_text[0] = p_item->p_input->psz_name;
/* Create audio thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", QNXaoutThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_OUTPUT, false ) )
{
msg_Err( p_aout, "cannot create QNX audio thread (%m)" );
E_(CloseAudio)( p_this );
* p_aout->output.output.i_frame_length;
next_date += mdate();
- p_buffer = aout_OutputNextBuffer( p_aout, next_date, VLC_FALSE );
+ p_buffer = aout_OutputNextBuffer( p_aout, next_date, false );
}
else
{
- p_buffer = aout_OutputNextBuffer( p_aout, 0, VLC_TRUE );
+ p_buffer = aout_OutputNextBuffer( p_aout, 0, true );
}
if ( p_buffer != NULL )
{
int i_ev, i_buflen;
PhEvent_t *p_event;
- vlc_bool_t b_repos = 0;
+ bool b_repos = 0;
if (p_vout->b_die)
{
switch( p_ev->event_f )
{
case Ph_WM_CLOSE:
- p_vout->p_libvlc->b_die = VLC_TRUE;
+ p_vout->p_libvlc->b_die = true;
break;
case Ph_WM_MOVE:
{
case Pk_q:
case Pk_Q:
- p_vout->p_libvlc->b_die = VLC_TRUE;
+ p_vout->p_libvlc->b_die = true;
break;
case Pk_f:
module_data->help.clear();
// TODO image
QTreeWidgetItem *module_item = new QTreeWidgetItem();
- module_item->setText( 0, qtr( module_GetName( p_module, VLC_FALSE ) ) );
+ module_item->setText( 0, qtr( module_GetName( p_module, false ) ) );
//item->setIcon( 0 , XXX );
module_item->setData( 0, Qt::UserRole,
QVariant::fromValue( module_data) );
( p_item->i_type == CONFIG_CATEGORY ||
p_item->i_type == CONFIG_SUBCATEGORY ) )
break;
- if( p_item->b_internal == VLC_TRUE ) continue;
+ if( p_item->b_internal == true ) continue;
if( p_item->i_type == CONFIG_SECTION )
{
}
}
-void ExtVideo::ChangeVFiltersString( char *psz_name, vlc_bool_t b_add )
+void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
{
char *psz_parser, *psz_string;
const char *psz_filter_type;
{
bool en = ui.enableCheck->isChecked();
aout_EnableFilter( VLC_OBJECT( p_intf ), "equalizer",
- en ? VLC_TRUE : VLC_FALSE );
+ en ? true : false );
// aout_EnableFilter( VLC_OBJECT( p_intf ), "upmixer",
-// en ? VLC_TRUE : VLC_FALSE );
+// en ? true : false );
// aout_EnableFilter( VLC_OBJECT( p_intf ), "vsurround",
-// en ? VLC_TRUE : VLC_FALSE );
+// en ? true : false );
enable( en );
}
{
aout_instance_t *p_aout= ( aout_instance_t * )vlc_object_find( p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE );
- vlc_bool_t b_2p = ui.eq2PassCheck->isChecked();
+ bool b_2p = ui.eq2PassCheck->isChecked();
if( p_aout == NULL )
config_PutInt( p_intf, "equalizer-2pass", b_2p );
config_PutInt( p_intf, "equalizer-2pass", b_2p );
for( int i = 0; i < p_aout->i_nb_inputs; i++ )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
}
vlc_object_release( p_aout );
}
{
bool en = enableCheck->isChecked();
aout_EnableFilter( VLC_OBJECT( p_intf ), "spatializer",
- en ? VLC_TRUE : VLC_FALSE );
+ en ? true : false );
enable( en );
}
vout_thread_t *p_vout;
void initComboBoxItems( QObject* );
void setWidgetValue( QObject* );
- void ChangeVFiltersString( char *psz_name, vlc_bool_t b_add );
+ void ChangeVFiltersString( char *psz_name, bool b_add );
private slots:
void updateFilters();
void updateFilterOptions();
PL_LOCK;
playlist_item_t *p_target =
playlist_ItemGetById( p_playlist, targetItem->i_id,
- VLC_TRUE );
+ true );
playlist_item_t *p_src = playlist_ItemGetById( p_playlist, srcId,
- VLC_TRUE );
+ true );
if( !p_target || !p_src )
{
assert( parentItem );
playlist_item_t *p_parent =
playlist_ItemGetById( p_playlist, parentItem->i_id,
- VLC_TRUE );
+ true );
if( !p_parent )
{
PL_UNLOCK;
assert( item );
PL_LOCK;
playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id,
- VLC_TRUE);
+ true);
activateItem( p_item );
PL_UNLOCK;
}
p_parent = p_parent->p_parent;
}
if( p_parent )
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
p_parent, p_item );
}
}
void PLModel::setLoop( bool on )
{
- var_SetBool( p_playlist, "loop", on ? VLC_TRUE:VLC_FALSE );
+ var_SetBool( p_playlist, "loop", on ? true:false );
config_PutInt( p_playlist, "loop", on ? 1: 0 );
}
void PLModel::setRepeat( bool on )
{
- var_SetBool( p_playlist, "repeat", on ? VLC_TRUE:VLC_FALSE );
+ var_SetBool( p_playlist, "repeat", on ? true:false );
config_PutInt( p_playlist, "repeat", on ? 1: 0 );
}
void PLModel::setRandom( bool on )
{
- var_SetBool( p_playlist, "random", on ? VLC_TRUE:VLC_FALSE );
+ var_SetBool( p_playlist, "random", on ? true:false );
config_PutInt( p_playlist, "random", on ? 1: 0 );
}
PL_LOCK;
if( !nodeItem ) goto end;
- p_item = playlist_ItemGetById( p_playlist, p_add->i_item, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_add->i_item, true );
if( !p_item || p_item->i_flags & PLAYLIST_DBL_FLAG ) goto end;
if( i_depth == DEPTH_SEL && p_item->p_parent &&
p_item->p_parent->i_id != rootItem->i_id )
void PLModel::UpdateNodeChildren( PLItem *root )
{
playlist_item_t *p_node = playlist_ItemGetById( p_playlist, root->i_id,
- VLC_TRUE );
+ true );
UpdateNodeChildren( p_node, root );
}
void PLModel::UpdateTreeItem( PLItem *item, bool signal, bool force )
{
playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id,
- VLC_TRUE );
+ true );
UpdateTreeItem( p_item, item, signal, force );
}
PL_LOCK;
playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id,
- VLC_TRUE );
+ true );
if( !p_item )
{
PL_UNLOCK; return;
}
if( p_item->i_children == -1 )
- playlist_DeleteFromInput( p_playlist, item->i_input_id, VLC_TRUE );
+ playlist_DeleteFromInput( p_playlist, item->i_input_id, true );
else
- playlist_NodeDelete( p_playlist, p_item, VLC_TRUE, VLC_FALSE );
+ playlist_NodeDelete( p_playlist, p_item, true, false );
/* And finally, remove it from the tree */
item->remove( item );
PL_UNLOCK;
{
playlist_item_t *p_root = playlist_ItemGetById( p_playlist,
rootItem->i_id,
- VLC_TRUE );
+ true );
int i_mode;
switch( i_flag )
{
playlist_RecursiveNodeSort( p_playlist, p_root, i_mode,
order == Qt::AscendingOrder ?
ORDER_NORMAL : ORDER_REVERSE );
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
}
}
PL_UNLOCK;
{
playlist_item_t *p_root = playlist_ItemGetById( p_playlist,
rootItem->i_id,
- VLC_TRUE );
+ true );
assert( p_root );
char *psz_name = search_text.toUtf8().data();
playlist_LiveSearchUpdate( p_playlist , p_root, psz_name );
assert( index.isValid() );
PL_LOCK;
playlist_item_t *p_item = playlist_ItemGetById( p_playlist,
- itemId( index ), VLC_TRUE );
+ itemId( index ), true );
if( p_item )
{
i_popup_item = p_item->i_id;
PL_LOCK;
{
playlist_item_t *p_item = playlist_ItemGetById( p_playlist,
- i_popup_item,VLC_TRUE );
+ i_popup_item,true );
activateItem( p_item );
}
PL_UNLOCK;
{
playlist_item_t *p_item = playlist_ItemGetById( p_playlist,
i_popup_item,
- VLC_TRUE );
+ true );
if( p_item )
{
MediaInfoDialog *mid = new MediaInfoDialog( p_intf, p_item->p_input );
if( ++p_model->i_items_to_append >= 50 )
{
-// p_model->b_need_update = VLC_TRUE;
+// p_model->b_need_update = true;
// return VLC_SUCCESS;
}
PLEvent *event = new PLEvent( p_add );
void StandardPLPanel::setRoot( int i_root_id )
{
playlist_item_t *p_item = playlist_ItemGetById( THEPL, i_root_id,
- VLC_TRUE );
+ true );
assert( p_item );
p_item = playlist_GetPreferredNode( THEPL, p_item );
assert( p_item );
p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
- // assume in any case that dirty was set to VLC_TRUE
+ // assume in any case that dirty was set to true
// because lazy programmes will use the same callback for
// this, like the one behind the refresh push button?
- p_module_config->b_dirty = VLC_FALSE;
+ p_module_config->b_dirty = false;
free( val.psz_string );
}
{
combo->clear();
finish( p_module_config, true );
- p_module_config->b_dirty = VLC_FALSE;
+ p_module_config->b_dirty = false;
}
}
StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
vlc_value_t val;
val.i_int = p_config->value.i;
p_config->pf_update_list(VLC_OBJECT(p_intf), configname, val, val, NULL);
- // assume in any case that dirty was set to VLC_TRUE
+ // assume in any case that dirty was set to true
// because lazy programmes will use the same callback for
// this, like the one behind the refresh push button?
- p_config->b_dirty = VLC_FALSE;
+ p_config->b_dirty = false;
}
for ( int i_index = 0; i_index < p_config->i_list; i_index++ )
p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
- // assume in any case that dirty was set to VLC_TRUE
+ // assume in any case that dirty was set to true
// because lazy programmes will use the same callback for
// this, like the one behind the refresh push button?
- p_module_config->b_dirty = VLC_FALSE;
+ p_module_config->b_dirty = false;
}
{
combo->clear();
finish( p_module_config, true );
- p_module_config->b_dirty = VLC_FALSE;
+ p_module_config->b_dirty = false;
}
}
void BoolConfigControl::finish()
{
- checkbox->setCheckState( p_item->value.i == VLC_TRUE ? Qt::Checked
+ checkbox->setCheckState( p_item->value.i == true ? Qt::Checked
: Qt::Unchecked );
checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int BoolConfigControl::getValue()
{
- return checkbox->checkState() == Qt::Checked ? VLC_TRUE : VLC_FALSE;
+ return checkbox->checkState() == Qt::Checked ? true : false;
}
/**************************************************************************
* UpdateDialog
*****************************************************************************/
/* callback to get information from the core */
-static void UpdateCallback( void *data, vlc_bool_t b_ret )
+static void UpdateCallback( void *data, bool b_ret )
{
UpdateDialog* UDialog = (UpdateDialog *)data;
QEvent* event;
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input,
PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
vlc_gc_decref( p_input );
}
}
QString s = url.toString();
if( s.length() > 0 ) {
playlist_Add( THEPL, qtu(s), NULL,
- PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_APPEND, PLAYLIST_END, true, false );
}
}
event->acceptProposedAction();
( i ? PLAYLIST_PREPARSE : 0 ) )
: ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
PLAYLIST_END,
- pl ? VLC_TRUE : VLC_FALSE, VLC_FALSE );
+ pl ? true : false, false );
i++;
}
}
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input,
go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
- PLAYLIST_END, pl, VLC_FALSE );
- input_Read( THEPL, p_input, VLC_FALSE );
+ PLAYLIST_END, pl, false );
+ input_Read( THEPL, p_input, false );
vlc_gc_decref( p_input );
}
}
playlist_AddExt( THEPL, qtu( mrl ), "Streaming",
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END,
- -1, &psz_option, 1, VLC_TRUE, VLC_FALSE );
+ -1, &psz_option, 1, true, false );
}
}
if( hasInput() )
{
int i_type = var_Type( p_input, "next-chapter" );
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
"prev-chapter":"prev-title", val );
}
if( hasInput() )
{
int i_type = var_Type( p_input, "next-chapter" );
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
"next-chapter":"next-title", val );
}
**/
var_Create( p_intf, "interaction", VLC_VAR_ADDRESS );
var_AddCallback( p_intf, "interaction", InteractCallback, this );
- p_intf->b_interaction = VLC_TRUE;
+ p_intf->b_interaction = true;
/* Register callback for the intf-popupmenu variable */
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
vlc_object_release( p_playlist );
}
- p_intf->b_interaction = VLC_FALSE;
+ p_intf->b_interaction = false;
var_DelCallback( p_intf, "interaction", InteractCallback, this );
p_intf->pf_request_window = NULL;
{
if( input_AddSubtitles( THEMIM->getInput(),
qtu( mimeData->urls()[0].toString() ),
- VLC_TRUE ) )
+ true ) )
{
event->acceptProposedAction();
return;
if( s.length() > 0 ) {
playlist_Add( THEPL, qtu(s), NULL,
PLAYLIST_APPEND | (first ? PLAYLIST_GO:0),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
first = false;
}
}
currentGroup = NULL;
vlc_object_t *p_object;
- vlc_bool_t b_section_empty = VLC_FALSE;
+ bool b_section_empty = false;
int i;
#define APPEND_EMPTY { QAction *action = menu->addAction( qtr( "Empty" ) ); \
if( b_section_empty )
APPEND_EMPTY;
menu->addSeparator();
- b_section_empty = VLC_TRUE;
+ b_section_empty = true;
continue;
}
{
/// \bug What is this ?
// Append( menu, varnames[i], NULL );
- b_section_empty = VLC_FALSE;
+ b_section_empty = false;
continue;
}
p_object = ( vlc_object_t * )vlc_object_get( objects[i] );
if( p_object == NULL ) continue;
- b_section_empty = VLC_FALSE;
+ b_section_empty = false;
/* Ugly specific stuff */
if( strstr( varnames[i], "intf-add" ) )
CreateItem( menu, varnames[i], p_object, false );
set_capability( "dialogs provider", 51 );
add_integer( "qt-display-mode", QT_NORMAL_MODE, NULL,
- QT_MODE_TEXT, QT_MODE_LONGTEXT, VLC_FALSE );
+ QT_MODE_TEXT, QT_MODE_LONGTEXT, false );
change_integer_list( i_mode_list, psz_mode_list_text, 0 );
- add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT,
- NOTIFICATION_LONGTEXT, VLC_FALSE );
+ add_bool( "qt-notification", true, NULL, NOTIFICATION_TEXT,
+ NOTIFICATION_LONGTEXT, false );
add_float_with_range( "qt-opacity", 1., 0.1, 1., NULL, OPACITY_TEXT,
- OPACITY_LONGTEXT, VLC_FALSE );
- add_bool( "qt-blingbling", VLC_TRUE, NULL, BLING_TEXT,
- BLING_TEXT, VLC_FALSE );
-
- add_bool( "qt-system-tray", VLC_TRUE, NULL, SYSTRAY_TEXT,
- SYSTRAY_LONGTEXT, VLC_FALSE);
- add_bool( "qt-start-minimized", VLC_FALSE, NULL, MINIMIZED_TEXT,
- MINIMIZED_LONGTEXT, VLC_TRUE);
- add_bool( "qt-name-in-title", VLC_TRUE, NULL, TITLE_TEXT,
- TITLE_LONGTEXT, VLC_FALSE );
-
- add_bool( "qt-volume-complete", VLC_FALSE, NULL, COMPLETEVOL_TEXT,
- COMPLETEVOL_LONGTEXT, VLC_TRUE );
- add_bool( "qt-autosave-volume", VLC_FALSE, NULL, SAVEVOL_TEXT,
- SAVEVOL_TEXT, VLC_TRUE );
+ OPACITY_LONGTEXT, false );
+ add_bool( "qt-blingbling", true, NULL, BLING_TEXT,
+ BLING_TEXT, false );
+
+ add_bool( "qt-system-tray", true, NULL, SYSTRAY_TEXT,
+ SYSTRAY_LONGTEXT, false);
+ add_bool( "qt-start-minimized", false, NULL, MINIMIZED_TEXT,
+ MINIMIZED_LONGTEXT, true);
+ add_bool( "qt-name-in-title", true, NULL, TITLE_TEXT,
+ TITLE_LONGTEXT, false );
+
+ add_bool( "qt-volume-complete", false, NULL, COMPLETEVOL_TEXT,
+ COMPLETEVOL_LONGTEXT, true );
+ add_bool( "qt-autosave-volume", false, NULL, SAVEVOL_TEXT,
+ SAVEVOL_TEXT, true );
add_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT,
- FILEDIALOG_PATH_TEXT, VLC_TRUE );
+ FILEDIALOG_PATH_TEXT, true );
change_autosave();
change_internal();
- add_bool( "qt-adv-options", VLC_FALSE, NULL, ADVANCED_OPTIONS_TEXT,
- ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE );
- add_bool( "qt-advanced-pref", VLC_FALSE, NULL, ADVANCED_PREFS_TEXT,
- ADVANCED_PREFS_LONGTEXT, VLC_FALSE );
- add_bool( "qt-error-dialogs", VLC_TRUE, NULL, ERROR_TEXT,
- ERROR_TEXT, VLC_FALSE );
+ add_bool( "qt-adv-options", false, NULL, ADVANCED_OPTIONS_TEXT,
+ ADVANCED_OPTIONS_LONGTEXT, true );
+ add_bool( "qt-advanced-pref", false, NULL, ADVANCED_PREFS_TEXT,
+ ADVANCED_PREFS_LONGTEXT, false );
+ add_bool( "qt-error-dialogs", true, NULL, ERROR_TEXT,
+ ERROR_TEXT, false );
#ifdef UPDATE_CHECK
- add_bool( "qt-updates-notif", VLC_TRUE, NULL, UPDATER_TEXT,
- UPDATER_LONGTEXT, VLC_FALSE );
+ add_bool( "qt-updates-notif", true, NULL, UPDATER_TEXT,
+ UPDATER_LONGTEXT, false );
add_integer( "qt-updates-days", 14, NULL, UPDATER_DAYS_TEXT,
- UPDATER_DAYS_TEXT, VLC_FALSE );
+ UPDATER_DAYS_TEXT, false );
#endif
add_string( "qt-slider-colours",
"255;255;255;20;226;20;255;176;15;235;30;20",
- NULL, SLIDERCOL_TEXT, SLIDERCOL_LONGTEXT, VLC_FALSE );
+ NULL, SLIDERCOL_TEXT, SLIDERCOL_LONGTEXT, false );
- add_bool( "qt-open-detail", VLC_FALSE, NULL, VIEWDETAIL_TEXT,
- VIEWDETAIL_TEXT, VLC_FALSE );
+ add_bool( "qt-open-detail", false, NULL, VIEWDETAIL_TEXT,
+ VIEWDETAIL_TEXT, false );
- add_bool( "qt-privacy-ask", VLC_TRUE, NULL, PRIVACY_TEXT, PRIVACY_TEXT,
- VLC_FALSE );
+ add_bool( "qt-privacy-ask", true, NULL, PRIVACY_TEXT, PRIVACY_TEXT,
+ false );
set_callbacks( OpenDialogs, Close );
vlc_module_end();
p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
/* We support play on start */
- p_intf->b_play = VLC_TRUE;
+ p_intf->b_play = true;
return VLC_SUCCESS;
}
intf_thread_t *p_intf = (intf_thread_t *)p_this;
vlc_mutex_lock( &p_intf->object_lock );
- p_intf->b_dead = VLC_TRUE;
+ p_intf->b_dead = true;
vlc_mutex_unlock( &p_intf->object_lock );
if( p_intf->p_sys->b_isDialogProvider )
{
if( p_intf->pf_show_dialog )
{
- if( vlc_thread_create( p_intf, "Qt dialogs", Init, 0, VLC_TRUE ) )
+ if( vlc_thread_create( p_intf, "Qt dialogs", Init, 0, true ) )
msg_Err( p_intf, "failed to create Qt dialogs thread" );
}
else
/* Start playing if needed */
if( !p_intf->pf_show_dialog && p_intf->b_play )
{
- playlist_Control( THEPL, PLAYLIST_PLAY, VLC_FALSE );
+ playlist_Control( THEPL, PLAYLIST_PLAY, false );
}
/* Explain to the core how to show a dialog :D */
use this method only for restoring window state of non docked
windows!
*/
- static vlc_bool_t restoreWidgetPosition(QSettings *settings,
+ static bool restoreWidgetPosition(QSettings *settings,
QWidget *widget,
QSize defSize = QSize( 0, 0 ),
QPoint defPos = QPoint( 0, 0 ))
if(defPos.x() == 0 && defPos.y()==0)
centerWidgetOnScreen(widget);
- return VLC_TRUE;
+ return true;
}
- return VLC_FALSE;
+ return false;
}
- static vlc_bool_t restoreWidgetPosition(QString configName,
+ static bool restoreWidgetPosition(QString configName,
QWidget *widget,
QSize defSize = QSize( 0, 0 ),
QPoint defPos = QPoint( 0, 0 ) )
{
QSettings *settings = new QSettings( "vlc", "vlc-qt-interface" );
settings->beginGroup( configName );
- vlc_bool_t defaultUsed = QVLCTools::restoreWidgetPosition(settings,
+ bool defaultUsed = QVLCTools::restoreWidgetPosition(settings,
widget,
defSize,
defPos);
{
// Enqueue and play the item
playlist_Add( pPlaylist, m_name.c_str(), NULL,
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, VLC_TRUE,
- VLC_FALSE );
+ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true,
+ false );
}
else
{
// Enqueue the item only
playlist_Add( pPlaylist, m_name.c_str(), NULL,
- PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_APPEND, PLAYLIST_END, true, false );
}
}
var_SetString( pAout, "audio-filter", (char*)filters.c_str() );
for( int i = 0; i < pAout->i_nb_inputs; i++ )
{
- pAout->pp_inputs[i]->b_restart = VLC_TRUE;
+ pAout->pp_inputs[i]->b_restart = true;
}
vlc_object_release( pAout );
}
if( p_input )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "next-title", val );
vlc_object_release( p_input );
}
if( p_input )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "prev-title", val );
vlc_object_release( p_input );
}
if( p_input )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "next-chapter", val );
vlc_object_release( p_input );
}
if( p_input )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "prev-chapter", val );
vlc_object_release( p_input );
}
if( pInput )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( pInput, "rate-slower", val );
vlc_object_release( pInput );
if( pInput )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( pInput, "rate-faster", val );
vlc_object_release( pInput );
return;
}
- xml_ReaderUseDTD( m_pReader, useDTD ? VLC_TRUE : VLC_FALSE );
+ xml_ReaderUseDTD( m_pReader, useDTD ? true : false );
}
ThemeRepository::instance( p_intf );
// We support play on start
- p_intf->b_play = VLC_TRUE;
+ p_intf->b_play = true;
return( VLC_SUCCESS );
}
FIND_ANYWHERE );
if( p_playlist )
{
- playlist_Control( p_playlist, PLAYLIST_PLAY, VLC_FALSE );
+ playlist_Control( p_playlist, PLAYLIST_PLAY, false );
vlc_object_release( p_playlist );
}
}
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
add_file( "skins2-last", "", NULL, SKINS2_LAST, SKINS2_LAST_LONG,
- VLC_TRUE );
+ true );
change_autosave();
add_string( "skins2-config", "", NULL, SKINS2_CONFIG, SKINS2_CONFIG_LONG,
- VLC_TRUE );
+ true );
change_autosave();
change_internal();
#ifdef WIN32
- add_bool( "skins2-systray", VLC_FALSE, onSystrayChange, SKINS2_SYSTRAY,
- SKINS2_SYSTRAY_LONG, VLC_FALSE );
- add_bool( "skins2-taskbar", VLC_TRUE, onTaskBarChange, SKINS2_TASKBAR,
- SKINS2_TASKBAR_LONG, VLC_FALSE );
- add_bool( "skins2-transparency", VLC_FALSE, NULL, SKINS2_TRANSPARENCY,
- SKINS2_TRANSPARENCY_LONG, VLC_FALSE );
+ add_bool( "skins2-systray", false, onSystrayChange, SKINS2_SYSTRAY,
+ SKINS2_SYSTRAY_LONG, false );
+ add_bool( "skins2-taskbar", true, onTaskBarChange, SKINS2_TASKBAR,
+ SKINS2_TASKBAR_LONG, false );
+ add_bool( "skins2-transparency", false, NULL, SKINS2_TRANSPARENCY,
+ SKINS2_TRANSPARENCY_LONG, false );
#endif
- add_bool( "skinned-playlist", VLC_TRUE, NULL, SKINS2_PLAYLIST,
- SKINS2_PLAYLIST_LONG, VLC_FALSE );
+ add_bool( "skinned-playlist", true, NULL, SKINS2_PLAYLIST,
+ SKINS2_PLAYLIST_LONG, false );
set_shortname( _("Skins"));
set_description( _("Skinnable Interface") );
set_capability( "interface", 30 );
// Called when we have an interaction dialog to display
var_Create( pIntf, "interaction", VLC_VAR_ADDRESS );
var_AddCallback( pIntf, "interaction", onInteraction, this );
- pIntf->b_interaction = VLC_TRUE;
+ pIntf->b_interaction = true;
// Callbacks for vout requests
getIntf()->pf_request_window = &getWindow;
if( p_item->i_children == -1 )
{
playlist_DeleteFromInput( getIntf()->p_sys->p_playlist,
- p_item->p_input->i_id, VLC_TRUE );
+ p_item->p_input->i_id, true );
it2 = getNextVisibleItem( it ) ;
it->parent()->removeChild( it );
it = it2;
else
{
playlist_NodeDelete( getIntf()->p_sys->p_playlist, p_item,
- VLC_TRUE, VLC_FALSE );
+ true, false );
it2 = getNextSibling( it );
it->parent()->removeChild( it );
it = it2;
if( p_parent )
{
- playlist_Control( m_pPlaylist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_parent, p_item );
+ playlist_Control( m_pPlaylist, PLAYLIST_VIEWPLAY, true, p_parent, p_item );
}
vlc_mutex_unlock( &m_pPlaylist->object_lock );
}
if( item == end() )
{
playlist_item_t *p_item = playlist_ItemGetById(
- m_pPlaylist, p_add->i_item, VLC_TRUE );
+ m_pPlaylist, p_add->i_item, true );
if( !p_item ) return;
UString *pName = new UString( getIntf(),
p_item->p_input->psz_name );
var_Set( p_input, "position", pos );
}
- p_intf->p_sys->b_slider_free = VLC_TRUE;
+ p_intf->p_sys->b_slider_free = true;
}
else
{
- p_intf->p_sys->b_slider_free = VLC_FALSE;
+ p_intf->p_sys->b_slider_free = false;
if( p_input )
{
if( LOWORD(wp) == SB_THUMBPOSITION || LOWORD(wp) == SB_ENDSCROLL )
{
VolumeChange( 200 - (int)dwPos );
- b_volume_hold = VLC_FALSE;
+ b_volume_hold = false;
}
else
{
- b_volume_hold = VLC_TRUE;
+ b_volume_hold = true;
}
}
if( p_input == NULL ) return;
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, "rate-slower", val );
vlc_object_release( p_input );
}
if( p_input == NULL ) return;
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, "rate-faster", val );
vlc_object_release( p_input );
}
*****************************************************************************/
void ItemInfoDialog::OnOk()
{
- int b_state = VLC_FALSE;
+ int b_state = false;
TCHAR psz_name[MAX_PATH];
Edit_GetText( name_text, psz_name, MAX_PATH );
input_item_SetURI( &p_item->input, _TOMB(psz_uri) );
vlc_mutex_lock( &p_item->input.lock );
- vlc_bool_t b_old_enabled = p_item->b_enabled;
+ bool b_old_enabled = p_item->b_enabled;
playlist_t * p_playlist = (playlist_t *)
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist != NULL )
{
b_state = SendMessage( enabled_checkbox, BM_GETCHECK, 0, 0 );
- if( b_old_enabled == VLC_FALSE && (b_state & BST_CHECKED) )
+ if( b_old_enabled == false && (b_state & BST_CHECKED) )
p_playlist->i_enabled ++;
- else if( b_old_enabled == VLC_TRUE && (b_state & BST_UNCHECKED) )
+ else if( b_old_enabled == true && (b_state & BST_UNCHECKED) )
p_playlist->i_enabled --;
vlc_object_release( p_playlist );
}
- p_item->b_enabled = (b_state & BST_CHECKED) ? VLC_TRUE : VLC_FALSE ;
+ p_item->b_enabled = (b_state & BST_CHECKED) ? true : false ;
vlc_mutex_unlock( &p_item->input.lock );
}
int *pi_objects, int i_start_id )
{
vlc_object_t *p_object;
- vlc_bool_t b_section_empty = VLC_FALSE;
+ bool b_section_empty = false;
int i;
/* Initializations */
}
AppendMenu( hMenu, MF_SEPARATOR, 0, _T("") );
- b_section_empty = VLC_TRUE;
+ b_section_empty = true;
continue;
}
AppendMenu( hMenu, MF_GRAYED | MF_STRING,
MenuDummy_Event, _FROMMB(ppsz_varnames[i]) );
- b_section_empty = VLC_FALSE;
+ b_section_empty = false;
continue;
}
p_object = (vlc_object_t *)vlc_object_get( pi_objects[i] );
if( p_object == NULL ) continue;
- b_section_empty = VLC_FALSE;
+ b_section_empty = false;
CreateMenuItem( p_intf, p_menu_list, hMenu, ppsz_varnames[i],
p_object, &i_item_id );
vlc_object_release( p_object );
for( int i = 0; i < i_args; i++ )
{
- vlc_bool_t b_start = !i && i_open_arg;
+ bool b_start = !i && i_open_arg;
playlist_item_t *p_item =
playlist_ItemNew( p_intf, pp_args[i], pp_args[i] );
i_title_sorted = 1;
i_author_sorted = 1;
- b_need_update = VLC_TRUE;
+ b_need_update = true;
}
/***********************************************************************
case ID_MANAGE_OPENPL:
OnOpen();
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case ID_MANAGE_SAVEPL:
case ID_MANAGE_ADDFILE:
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_FILE_SIMPLE,
0, 0 );
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case ID_MANAGE_ADDDIRECTORY:
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_DIRECTORY,
0, 0 );
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case ID_MANAGE_ADDMRL:
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_FILE, 0, 0 );
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case ID_SEL_DELETE:
OnDeleteSelection();
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case Infos_Event:
OnPopupInfo( hwnd );
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case Up_Event:
OnUp();
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case Down_Event:
OnDown();
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case Random_Event:
case PopupPlay_Event:
OnPopupPlay();
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case PopupDel_Event:
OnPopupDel();
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case PopupEna_Event:
OnPopupEna();
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
case PopupInfo_Event:
OnPopupInfo( hwnd );
- b_need_update = VLC_TRUE;
+ b_need_update = true;
break;
default:
vlc_object_release(p_playlist);
return CDRF_DODEFAULT;
}
- if( p_item->b_enabled == VLC_FALSE )
+ if( p_item->b_enabled == false )
{
lplvcd->clrText = RGB(192,192,192);
vlc_object_release(p_playlist);
if( b_need_update )
{
Rebuild();
- b_need_update = VLC_FALSE;
+ b_need_update = false;
}
playlist_t *p_playlist = (playlist_t *)
p_arg->psz_title = strdup( "Save playlist" );
p_arg->psz_extensions = strdup( psz_filters );
- p_arg->b_save = VLC_TRUE;
+ p_arg->b_save = true;
p_arg->p_arg = p_intf;
p_arg->pf_callback = OnSaveCB;
{
vlc_value_t val;
int bState = SendMessage( hwndTB, TB_GETSTATE, Random_Event, 0 );
- val.b_bool = (bState & TBSTATE_CHECKED) ? VLC_TRUE : VLC_FALSE;
+ val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
playlist_t *p_playlist = (playlist_t *)
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
{
vlc_value_t val;
int bState = SendMessage( hwndTB, TB_GETSTATE, Loop_Event, 0 );
- val.b_bool = (bState & TBSTATE_CHECKED) ? VLC_TRUE : VLC_FALSE;
+ val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
playlist_t *p_playlist = (playlist_t *)
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
{
vlc_value_t val;
int bState = SendMessage( hwndTB, TB_GETSTATE, Repeat_Event, 0 );
- val.b_bool = (bState & TBSTATE_CHECKED) ? VLC_TRUE : VLC_FALSE;
+ val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
playlist_t *p_playlist = (playlist_t *)
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
vlc_object_release( p_playlist );
- b_need_update = VLC_TRUE;
+ b_need_update = true;
return;
}
vlc_object_release( p_playlist );
- b_need_update = VLC_TRUE;
+ b_need_update = true;
return;
}
private:
intf_thread_t *p_intf;
PrefsDialog *p_prefs_dialog;
- vlc_bool_t b_advanced;
+ bool b_advanced;
HTREEITEM general_item;
HTREEITEM plugins_item;
intf_thread_t *p_intf;
PrefsDialog *p_prefs_dialog;
- vlc_bool_t b_advanced;
+ bool b_advanced;
HWND label;
free( psz_section );
free( psz_help ); }
- vlc_bool_t b_submodule;
+ bool b_submodule;
PrefsPanel *panel;
int i_object_id;
/* Initializations */
p_intf = _p_intf;
p_prefs_dialog = _p_prefs_dialog;
- b_advanced = VLC_FALSE;
+ b_advanced = false;
/* Create a tree view */
// Initialize the INITCOMMONCONTROLSEX structure.
p_intf = _p_intf;
p_prefs_dialog = _p_prefs_dialog;
- b_advanced = VLC_TRUE;
+ b_advanced = true;
if( i_object_id == PLUGIN_ID || i_object_id == GENERAL_ID ||
i_object_id == CAPABILITY_ID )
return i_type;
}
-vlc_bool_t ConfigControl::IsAdvanced()
+bool ConfigControl::IsAdvanced()
{
return b_advanced;
}
{
combo->Clear();
UpdateCombo( p_item );
- p_item->b_dirty = VLC_FALSE;
+ p_item->b_dirty = false;
}
}
{
combo->Clear();
UpdateCombo( p_item );
- p_item->b_dirty = VLC_FALSE;
+ p_item->b_dirty = false;
}
}
char *GetName();
int GetType();
- vlc_bool_t IsAdvanced();
+ bool IsAdvanced();
void SetUpdateCallback( void (*)( void * ), void * );
char *name;
int i_type;
- vlc_bool_t b_advanced;
+ bool b_advanced;
};
ConfigControl *CreateConfigControl( vlc_object_t *,
{
case WM_KILLFOCUS:
if( p_vout )
- vout_Control( p_vout, VOUT_SET_FOCUS, (vlc_bool_t)VLC_FALSE );
+ vout_Control( p_vout, VOUT_SET_FOCUS, (bool)false );
return TRUE;
case WM_SETFOCUS:
if( p_vout )
- vout_Control( p_vout, VOUT_SET_FOCUS, (vlc_bool_t)VLC_TRUE );
+ vout_Control( p_vout, VOUT_SET_FOCUS, (bool)true );
return TRUE;
default:
add_shortcut( "wince" );
add_bool( "wince-embed", 1, NULL,
- EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
+ EMBED_TEXT, EMBED_LONGTEXT, false );
add_submodule();
set_description( _("WinCE dialogs provider") );
/* Create a new thread for the dialogs provider */
if( vlc_thread_create( p_intf, "Skins Dialogs Thread",
- MainLoop, 0, VLC_TRUE ) )
+ MainLoop, 0, true ) )
{
msg_Err( p_intf, "cannot create Skins Dialogs Thread" );
p_intf->pf_show_dialog = NULL;
CBaseWindow *p_window;
/* special actions */
- vlc_bool_t b_playing;
+ bool b_playing;
/* The input thread */
input_thread_t * p_input;
/* The slider */
int i_slider_pos; /* slider position */
int i_slider_oldpos; /* previous position */
- vlc_bool_t b_slider_free; /* slider status */
+ bool b_slider_free; /* slider status */
/* The messages window */
msg_subscription_t* p_sub; /* message bank subscription */
HMENU menu_audio;
HMENU menu_navigation;
- vlc_bool_t b_volume_hold;
+ bool b_volume_hold;
};
/* File Info */
virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
HWND hListView;
- vlc_bool_t b_verbose;
+ bool b_verbose;
};
/* ItemInfo Dialog */
playlist_Add( p_playlist, psz_utf8, NULL,
PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO) |
(i ? PLAYLIST_PREPARSE : 0 ),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
else
playlist_Add( p_playlist, psz_utf8, NULL,
- PLAYLIST_APPEND | PLAYLIST_PREPARSE , PLAYLIST_END , VLC_TRUE, VLC_FALSE );
+ PLAYLIST_APPEND | PLAYLIST_PREPARSE , PLAYLIST_END , true, false );
wxLocaleFree( psz_utf8 );
}
}
char *psz_utf8 = wxFromLocale( path );
playlist_Add( p_playlist, psz_utf8, NULL,
PLAYLIST_APPEND | (event.GetInt() ? PLAYLIST_GO : 0),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
wxLocaleFree( psz_utf8 );
}
}
last_update = 0L;
- b_need_update = VLC_TRUE;
+ b_need_update = true;
Update();
}
vlc_object_yield( p_input );
vlc_mutex_lock( &input_GetItem(p_input)->lock );
- if( b_need_update == VLC_TRUE )
+ if( b_need_update == true )
{
vlc_mutex_unlock( &input_GetItem(p_input)->lock );
item_info->Update( input_GetItem(p_input) );
vlc_object_release(p_input);
vlc_object_release( p_playlist );
- b_need_update = VLC_FALSE;
+ b_need_update = false;
panel_sizer->Layout();
return;
vlc_value_t oldval, vlc_value_t newval, void *param )
{
FileInfo *p_fileinfo = (FileInfo *)param;
- p_fileinfo->b_need_update = VLC_TRUE;
+ p_fileinfo->b_need_update = true;
return VLC_SUCCESS;
}
virtual ~FileInfo();
void Update();
- vlc_bool_t b_need_update;
+ bool b_need_update;
private:
void OnButtonClose( wxCommandEvent& event );
{
/* Initializations */
p_intf = _p_intf;
- b_verbose = VLC_FALSE;
+ b_verbose = false;
SetIcon( *p_intf->p_sys->p_icon );
save_log_dialog = NULL;
- b_verbose = VLC_FALSE;
+ b_verbose = false;
/* Create a panel to put everything in */
wxPanel *messages_panel = new wxPanel( this, -1 );
wxFileDialog *save_log_dialog;
- vlc_bool_t b_verbose;
+ bool b_verbose;
};
};
for( int i = 0; i < (int)mrl.GetCount(); i++ )
{
- vlc_bool_t b_start = !i && i_open_arg;
+ bool b_start = !i && i_open_arg;
input_item_t *p_input;
char *psz_utf8;
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input,
PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
vlc_gc_decref( p_input );
}
*****************************************************************************/
wxArrayString SeparateEntries( wxString entries )
{
- vlc_bool_t b_quotes_mode = VLC_FALSE;
+ bool b_quotes_mode = false;
wxArrayString entries_array;
wxString entry;
{
/* Enters quotes mode */
entry.RemoveLast();
- b_quotes_mode = VLC_TRUE;
+ b_quotes_mode = true;
}
else if( b_quotes_mode && entry.Last() == wxT('\"') )
{
/* Finished the quotes mode */
entry.RemoveLast();
- b_quotes_mode = VLC_FALSE;
+ b_quotes_mode = false;
}
else if( !b_quotes_mode && entry.Last() != wxT('\"') )
{
pp_sds = NULL;
i_update_counter = 0;
i_sort_mode = MODE_NONE;
- b_need_update = VLC_FALSE;
+ b_need_update = false;
i_items_to_append = 0;
p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
/* Update the playlist */
p_current_treeroot = p_playlist->p_local_category;
- Rebuild( VLC_TRUE );
+ Rebuild( true );
}
Playlist::~Playlist()
if( !p_data ) return;
playlist_item_t *p_item = playlist_ItemGetById( p_playlist,
- ((PlaylistItem *)p_data)->i_id, VLC_TRUE );
+ ((PlaylistItem *)p_data)->i_id, true );
if( !p_item )
{
UnlockPlaylist( p_intf->p_sys, p_playlist );
wxU( " )" ) );
}
- if( !psz_artist || !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE )
+ if( !psz_artist || !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == true )
{
msg = wxString( wxU( psz_name ) ) + duration;
}
node = FindItem( treectrl->GetRootItem(), p_add->i_node );
if( !node.IsOk() ) goto update;
- p_item = playlist_ItemGetById( p_playlist, p_add->i_item, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_add->i_item, true );
if( !p_item ) goto update;
if( (p_item->i_flags & PLAYLIST_DBL_FLAG ) ) goto update;
{
playlist_item_t *p_item;
LockPlaylist( p_intf->p_sys, p_playlist );
- p_item = playlist_ItemGetById( p_playlist, ((PlaylistItem *)treectrl->GetItemData( item ))->i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, ((PlaylistItem *)treectrl->GetItemData( item ))->i_id, true );
if( p_item && p_item->i_children == -1 )
count++;
UnlockPlaylist( p_intf->p_sys, p_playlist );
}
/* Find a wxItem from a name (from current) */
-wxTreeItemId Playlist::FindItemByName( wxTreeItemId root, wxString search_string, wxTreeItemId current, vlc_bool_t *pb_current_found )
+wxTreeItemId Playlist::FindItemByName( wxTreeItemId root, wxString search_string, wxTreeItemId current, bool *pb_current_found )
{
wxTreeItemIdValue cookie;
wxTreeItemId search;
if( treectrl->GetItemText( item).Lower().Contains(
search_string.Lower() ) )
{
- if( !current.IsOk() || *pb_current_found == VLC_TRUE )
+ if( !current.IsOk() || *pb_current_found == true )
{
return item;
}
else if( current.IsOk() && item == current )
{
- *pb_current_found = VLC_TRUE;
+ *pb_current_found = true;
}
}
if( treectrl->ItemHasChildren( item ) )
/**********************************************************************
* Rebuild the playlist
**********************************************************************/
-void Playlist::Rebuild( vlc_bool_t b_root )
+void Playlist::Rebuild( bool b_root )
{
i_items_to_append = 0;
void Playlist::ShowPlaylist( bool show )
{
- if( show ) Rebuild( VLC_TRUE );
+ if( show ) Rebuild( true );
Show( show );
}
if( this->b_need_update )
{
- this->b_need_update = VLC_FALSE;
- Rebuild( VLC_TRUE );
+ this->b_need_update = false;
+ Rebuild( true );
}
/* Updating the playing status every 0.5s is enough */
p_wxitem = (PlaylistItem *)treectrl->GetItemData( item );
LockPlaylist( p_intf->p_sys, p_playlist );
- p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, true );
if( !p_item )
{
void Playlist::DeleteItem( int item_id )
{
- playlist_DeleteFromInput( p_playlist, item_id, VLC_TRUE );
+ playlist_DeleteFromInput( p_playlist, item_id, true );
}
void Playlist::DeleteNode( playlist_item_t *p_item )
{
- playlist_NodeDelete( p_playlist, p_item, VLC_TRUE , VLC_FALSE );
+ playlist_NodeDelete( p_playlist, p_item, true , false );
}
void Playlist::OnMenuClose( wxCommandEvent& event )
case SortTitle_Event:
playlist_RecursiveNodeSort( p_playlist,
playlist_ItemGetById( p_playlist, p_wxitem->i_id,
- VLC_TRUE ),
+ true ),
SORT_TITLE_NODES_FIRST, ORDER_NORMAL );
break;
case RSortTitle_Event:
playlist_RecursiveNodeSort( p_playlist,
playlist_ItemGetById( p_playlist, p_wxitem->i_id,
- VLC_TRUE ),
+ true ),
SORT_TITLE_NODES_FIRST, ORDER_REVERSE );
}
UnlockPlaylist( p_intf->p_sys, p_playlist );
- Rebuild( VLC_TRUE );
+ Rebuild( true );
}
/**********************************************************************
PlaylistItem *p_wxroot;
p_wxroot = (PlaylistItem *)treectrl->GetItemData( treectrl->GetRootItem() );
playlist_item_t *p_root = playlist_ItemGetById( p_playlist, p_wxroot->i_id,
- VLC_TRUE );
+ true );
assert( p_root );
char *psz_name = wxFromLocale( search_string );
playlist_LiveSearchUpdate( p_playlist, p_root, psz_name );
- Rebuild( VLC_TRUE );
+ Rebuild( true );
wxLocaleFree( psz_name );
}
UnlockPlaylist( p_intf->p_sys, p_playlist );
return;
}
- p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, true );
p_parent = p_item;
while( p_parent )
if( p_parent )
{
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_parent, p_item );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, p_parent, p_item );
}
UnlockPlaylist( p_intf->p_sys, p_playlist );
}
}
playlist_item_t *p_drageditem =
- playlist_ItemGetById(p_playlist, p_wxdrageditem->i_id, VLC_TRUE );
+ playlist_ItemGetById(p_playlist, p_wxdrageditem->i_id, true );
playlist_item_t *p_destitem =
- playlist_ItemGetById(p_playlist, p_wxdestitem->i_id, VLC_TRUE );
+ playlist_ItemGetById(p_playlist, p_wxdestitem->i_id, true );
if( !p_drageditem || !p_destitem )
{
UnlockPlaylist( p_intf->p_sys, p_playlist );
return;
}
playlist_item_t *p_destitem2 =
- playlist_ItemGetById( p_playlist, p_parent->i_id, VLC_TRUE );
+ playlist_ItemGetById( p_playlist, p_parent->i_id, true );
if( !p_destitem2 )
{
UnlockPlaylist( p_intf->p_sys, p_playlist );
UnlockPlaylist( p_intf->p_sys, p_playlist );
/* FIXME: having this Rebuild() is dirty */
- Rebuild( VLC_TRUE );
+ Rebuild( true );
}
#if wxUSE_DRAG_AND_DROP
{
PlaylistItem *p_plitem =
(PlaylistItem *)p->treectrl->GetItemData( item );
- p_dest = playlist_ItemGetById( p->p_playlist, p_plitem->i_id, VLC_TRUE );
+ p_dest = playlist_ItemGetById( p->p_playlist, p_plitem->i_id, true );
if( p_dest->i_children == -1 )
{
return FALSE;
}
playlist_item_t *p_node =
- playlist_ItemGetById( p->p_playlist, p_parent->i_id, VLC_TRUE );
+ playlist_ItemGetById( p->p_playlist, p_parent->i_id, true );
if( !p_node )
{
UnlockPlaylist( p->p_intf->p_sys, p->p_playlist );
input_item_t *p_input = input_ItemNew( p->p_playlist,
psz_utf8, psz_utf8 );
int i_ret = ( playlist_NodeAddInput( p->p_playlist, p_input, p_dest,
- PLAYLIST_PREPARSE, i_pos, VLC_FALSE ) != VLC_SUCCESS );
+ PLAYLIST_PREPARSE, i_pos, false ) != VLC_SUCCESS );
wxDnDLocaleFree( psz_utf8 );
if( i_ret != VLC_SUCCESS )
return FALSE;
}
/* FIXME: having this Rebuild() is dirty */
- p->Rebuild( VLC_TRUE );
+ p->Rebuild( true );
return TRUE;
}
treectrl->SelectItem( i_wx_popup_item );
LockPlaylist( p_intf->p_sys, p_playlist );
- p_item = playlist_ItemGetById( p_playlist, i_popup_item, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, i_popup_item, true );
if( !p_item )
{
{
playlist_item_t *p_popup_item, *p_popup_parent;
LockPlaylist( p_intf->p_sys, p_playlist );
- p_popup_item = playlist_ItemGetById( p_playlist, i_popup_item, VLC_TRUE );
+ p_popup_item = playlist_ItemGetById( p_playlist, i_popup_item, true );
p_popup_parent = p_popup_item;
while( p_popup_parent )
if( p_popup_parent )
{
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_popup_parent,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, p_popup_parent,
p_popup_item );
}
UnlockPlaylist( p_intf->p_sys, p_playlist );
{
playlist_item_t *p_popup_item;
LockPlaylist( p_intf->p_sys, p_playlist );
- p_popup_item = playlist_ItemGetById( p_playlist, i_popup_item, VLC_TRUE );
+ p_popup_item = playlist_ItemGetById( p_playlist, i_popup_item, true );
if( p_popup_item != NULL )
{
p_wxitem = (PlaylistItem *)treectrl->GetItemData( i_wx_popup_item );
LockPlaylist( p_intf->p_sys, p_playlist );
- p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, true );
if( p_item->i_children >= 0 )
{
playlist_RecursiveNodeSort( p_playlist, p_item,
LockPlaylist( p_intf->p_sys, p_playlist );
playlist_item_t *p_popup_item = playlist_ItemGetById( p_playlist,
i_popup_item,
- VLC_TRUE );
+ true );
if( p_popup_item )
{
iteminfo_dialog = new ItemInfoDialog( p_intf, p_popup_item, this );
p_wxitem = (PlaylistItem *)treectrl->GetItemData( i_wx_popup_item );
- p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, true );
playlist_NodeCreate( p_playlist, psz_name, p_item, 0, NULL );
UnlockPlaylist( p_intf->p_sys, p_playlist );
- Rebuild( VLC_TRUE );
+ Rebuild( true );
wxLocaleFree( psz_name );
}
if( !p_current_treeroot || i_id != p_current_treeroot->i_id )
{
playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id,
- VLC_TRUE );
+ true );
if( p_item ) p_current_treeroot = p_item;
- Rebuild( VLC_TRUE );
+ Rebuild( true );
}
}
vlc_value_t oval, vlc_value_t nval, void *param )
{
Playlist *p_playlist_dialog = (Playlist *)param;
- p_playlist_dialog->b_need_update = VLC_TRUE;
+ p_playlist_dialog->b_need_update = true;
return VLC_SUCCESS;
}
{
/* Too many items waiting to be added, it will be quicker to rebuild
* the whole playlist */
- p_playlist_dialog->b_need_update = VLC_TRUE;
+ p_playlist_dialog->b_need_update = true;
return VLC_SUCCESS;
}
/* List */
void OnSourceSelected( wxListEvent &event );
protected:
- void Rebuild( vlc_bool_t );
+ void Rebuild( bool );
private:
void Preparse();
wxTreeItemId FindItemByInput( wxTreeItemId, int );
wxTreeItemId FindItemInner( wxTreeItemId, int , bool );
wxTreeItemId FindItemByName( wxTreeItemId, wxString,
- wxTreeItemId, vlc_bool_t *);
+ wxTreeItemId, bool *);
wxTreeItemId saved_tree_item;
wxTreeItemId saved_input_tree_item;
int i_update_counter;
- vlc_bool_t b_changed_view;
+ bool b_changed_view;
const char **pp_sds;
protected:
PrefsDialog *p_prefs_dialog;
wxBoxSizer *p_sizer;
wxWindow *p_parent;
- vlc_bool_t b_advanced;
+ bool b_advanced;
wxPanel *p_current;
virtual ~PrefsPanel() {}
void ApplyChanges();
- void SwitchAdvanced( vlc_bool_t );
+ void SwitchAdvanced( bool );
private:
intf_thread_t *p_intf;
PrefsDialog *p_prefs_dialog;
- vlc_bool_t b_advanced;
+ bool b_advanced;
wxStaticText *hidden_text;
wxBoxSizer *config_sizer;
free( psz_help );
};
- vlc_bool_t b_submodule;
+ bool b_submodule;
PrefsPanel *panel;
wxBoxSizer *sizer;
p_prefs_dialog = _p_prefs_dialog;
p_sizer = _p_sizer;
p_parent = _p_parent;
- b_advanced = VLC_FALSE;
+ b_advanced = false;
root_item = AddRoot( wxT("") );
wxASSERT_MSG(root_item.IsOk(), wxT("Could not add root item"));
/* Find the right category item */
wxTreeItemIdValue cookie;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
wxTreeItemId category_item = GetFirstChild( root_item , cookie);
while( category_item.IsOk() )
(ConfigTreeData *)GetItemData( category_item );
if( config_data->i_object_id == i_category )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
category_item = GetNextChild( root_item, cookie );
if( !b_found ) continue;
/* Find subcategory item */
- b_found = VLC_FALSE;
+ b_found = false;
//cookie = -1;
wxTreeItemId subcategory_item = GetFirstChild( category_item, cookie );
while( subcategory_item.IsOk() )
(ConfigTreeData *)GetItemData( subcategory_item );
if( config_data->i_object_id == i_subcategory )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
subcategory_item = GetNextChild( category_item, cookie );
p_intf = _p_intf;
p_prefs_dialog =_p_prefs_dialog,
- b_advanced = VLC_TRUE;
+ b_advanced = true;
SetAutoLayout( TRUE );
Hide();
{
/* List the plugins */
int i_index;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
if( !p_list ) return;
p_module = (module_t *)p_list->p_values[i_index].p_object;
if( !strcmp( module_GetObjName(p_module), "main" ) )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
}
}
-void PrefsPanel::SwitchAdvanced( vlc_bool_t b_new_advanced )
+void PrefsPanel::SwitchAdvanced( bool b_new_advanced )
{
bool hidden = false;
return i_type;
}
-vlc_bool_t ConfigControl::IsAdvanced()
+bool ConfigControl::IsAdvanced()
{
return b_advanced;
}
p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
- // assume in a×y case that dirty was set to VLC_TRUE
+ // assume in a×y case that dirty was set to true
// because lazy programmes will use the same callback for
// this, like the one behind the refresh push button?
- p_module_config->b_dirty = VLC_FALSE;
+ p_module_config->b_dirty = false;
free( val.psz_string );
}
void StringListConfigControl::UpdateCombo( module_config_t *p_item )
{
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
int i_index;
/* build a list of available options */
p_item->ppsz_list_text[i_index] ) ?
wxU(p_item->ppsz_list_text[i_index]) :
wxL2U(p_item->ppsz_list[i_index]) );
- b_found = VLC_TRUE;
+ b_found = true;
}
}
{
combo->Clear();
UpdateCombo( p_item );
- p_item->b_dirty = VLC_FALSE;
+ p_item->b_dirty = false;
}
}
p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
- // assume in any case that dirty was set to VLC_TRUE
+ // assume in any case that dirty was set to true
// because lazy programmes will use the same callback for
// this, like the one behind the refresh push button?
- p_module_config->b_dirty = VLC_FALSE;
+ p_module_config->b_dirty = false;
}
UpdateCombo( p_module_config );
{
combo->Clear();
UpdateCombo( p_item );
- p_item->b_dirty = VLC_FALSE;
+ p_item->b_dirty = false;
}
}
wxString GetName();
int GetType();
- vlc_bool_t IsAdvanced();
+ bool IsAdvanced();
void SetUpdateCallback( void (*)( void * ), void * );
private:
wxString name;
int i_type;
- vlc_bool_t b_advanced;
+ bool b_advanced;
};
ConfigControl *CreateConfigControl( vlc_object_t *,
unsigned int i;
for( i = 0 ; i < broadcasts.size(); i++ )
{
- ((VLMBroadcastStreamPanel *)broadcasts[i])->b_found = VLC_FALSE;
+ ((VLMBroadcastStreamPanel *)broadcasts[i])->b_found = false;
}
for( i = 0 ; i < vods.size(); i++ )
{
- ((VLMVODStreamPanel *)vods[i])->b_found = VLC_FALSE;
+ ((VLMVODStreamPanel *)vods[i])->b_found = false;
}
p_vlm->LockVLM();
if( p_media->i_type == BROADCAST_TYPE )
{
- vlc_bool_t b_foundthis = VLC_FALSE;
+ bool b_foundthis = false;
for( unsigned int j = 0 ; j < broadcasts.size(); j++ )
{
VLMBroadcastStreamPanel *p_streamp =
/* FIXME: dangerous .. */
if( p_streamp->GetStream()->p_media == p_media )
{
- p_streamp->b_found = VLC_TRUE;
- b_foundthis = VLC_TRUE;
+ p_streamp->b_found = true;
+ b_foundthis = true;
break;
}
}
}
else if( p_media->i_type == VOD_TYPE )
{
- vlc_bool_t b_foundthis = VLC_FALSE;
+ bool b_foundthis = false;
for( unsigned int j = 0 ; i < vods.size(); i++ )
{
VLMVODStreamPanel *p_streamp = (VLMVODStreamPanel *)( vods[j] );
if( p_streamp->GetStream()->p_media == p_media )
{
- p_streamp->b_found = VLC_TRUE;
- b_foundthis = VLC_TRUE;
+ p_streamp->b_found = true;
+ b_foundthis = true;
break;
}
}
vector<VLMBroadcastStreamPanel *>::iterator it = broadcasts.begin();
while( it < broadcasts.end() )
{
- if( (*it)->b_found == VLC_FALSE )
+ if( (*it)->b_found == false )
{
vector<VLMBroadcastStreamPanel *>::iterator rem = it;
it++;
vector<VLMVODStreamPanel *>::iterator it2 = vods.begin();
while( it2 < vods.end() )
{
- if( (*it2)->b_found == VLC_FALSE )
+ if( (*it2)->b_found == false )
{
vector<VLMVODStreamPanel *>::iterator rem = it2;
it2++;
wxPanel * VLMPanel::AddBroadcastPanel( wxPanel *panel )
{
- return new VLMAddStreamPanel( p_intf, panel, p_vlm, VLC_FALSE,
- VLC_TRUE );
+ return new VLMAddStreamPanel( p_intf, panel, p_vlm, false,
+ true );
}
void VLMPanel::AppendBroadcast( VLMBroadcastStream *p_broadcast )
VLMBroadcastStreamPanel *p_new =
new VLMBroadcastStreamPanel( p_intf, scrolled_broadcasts,
p_broadcast );
- p_new->b_found = VLC_TRUE;
+ p_new->b_found = true;
scrolled_broadcasts_sizer->Add( p_new, 0, wxEXPAND | wxALL, 5 );
scrolled_broadcasts_sizer->Layout();
scrolled_broadcasts->FitInside();
wxPanel * VLMPanel::AddVODPanel( wxPanel *panel )
{
- return new VLMAddStreamPanel( p_intf, panel, p_vlm, VLC_FALSE,
- VLC_FALSE );
+ return new VLMAddStreamPanel( p_intf, panel, p_vlm, false,
+ false );
}
void VLMPanel::AppendVOD( VLMVODStream *p_vod )
{
VLMVODStreamPanel *p_new =
new VLMVODStreamPanel( p_intf, scrolled_vods, p_vod );
- p_new->b_found = VLC_TRUE;
+ p_new->b_found = true;
scrolled_vods_sizer->Add( p_new, 0, wxEXPAND | wxALL, 5 );
scrolled_vods_sizer->Layout();
scrolled_vods->FitInside();
VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
wxWindow *_p_parent, VLMWrapper *_p_vlm,
- vlc_bool_t _b_edit, vlc_bool_t _b_broadcast ):
+ bool _b_edit, bool _b_broadcast ):
wxPanel( _p_parent, -1, wxDefaultPosition, wxDefaultSize )
{
p_intf = _p_intf;
if( b_broadcast && ! b_edit )
{
p_vlm->AddBroadcast( psz_name, psz_input, psz_output,
- enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
- loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
+ enabled_checkbox->IsChecked() ? true: false,
+ loop_checkbox->IsChecked() ? true : false );
}
else if( b_broadcast && b_edit )
{
p_vlm->EditBroadcast( psz_name, psz_input, psz_output,
- enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
- loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
+ enabled_checkbox->IsChecked() ? true: false,
+ loop_checkbox->IsChecked() ? true : false );
}
else if( !b_broadcast && !b_edit )
{
p_vlm->AddVod( psz_name, psz_input, psz_output,
- enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
- loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
+ enabled_checkbox->IsChecked() ? true: false,
+ loop_checkbox->IsChecked() ? true : false );
}
else
{
p_vlm->EditVod( psz_name, psz_input, psz_output,
- enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
- loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
+ enabled_checkbox->IsChecked() ? true: false,
+ loop_checkbox->IsChecked() ? true : false );
}
wxLocaleFree( psz_name) ; wxLocaleFree( psz_input ) ;
wxLocaleFree( psz_output);
* VLM Add stream Frame implementation
****************************************************************************/
VLMEditStreamFrame::VLMEditStreamFrame( intf_thread_t *_p_intf,
- wxWindow *_p_parent, VLMWrapper *_p_vlm, vlc_bool_t _b_broadcast,
+ wxWindow *_p_parent, VLMWrapper *_p_vlm, bool _b_broadcast,
VLMStream *p_stream ) :
wxFrame( _p_parent, -1, wxU( _("VLM stream") ),
wxDefaultPosition, wxSize( 640,480 ), wxDEFAULT_FRAME_STYLE )
wxBoxSizer *main_sizer = new wxBoxSizer( wxHORIZONTAL );
vlm_panel = new VLMAddStreamPanel( _p_intf, this, _p_vlm ,
- VLC_TRUE, _b_broadcast );
+ true, _b_broadcast );
vlm_panel->Load( p_stream );
{
public:
VLMAddStreamPanel( intf_thread_t *, wxWindow *, VLMWrapper *,
- vlc_bool_t, vlc_bool_t );
+ bool, bool );
virtual ~VLMAddStreamPanel();
void Load( VLMStream *);
private:
wxWindow *p_parent;
- vlc_bool_t b_edit, b_broadcast;
+ bool b_edit, b_broadcast;
OpenDialog *p_open_dialog;
SoutDialog *p_sout_dialog;
{
public:
VLMEditStreamFrame( intf_thread_t *p_intf, wxWindow *,
- VLMWrapper * , vlc_bool_t, VLMStream * );
+ VLMWrapper * , bool, VLMStream * );
virtual ~VLMEditStreamFrame();
private:
p_sp = _p_sp;
slider = p_sp->p_slider;
- b_slider_free = VLC_TRUE;
+ b_slider_free = true;
time_string = wxU( "0:00:00 / 0:00:00");
}
if( p_input )
{
slider->SetValue( 0 );
- UpdateButtons( VLC_TRUE );
+ UpdateButtons( true );
}
}
else if( p_input->b_dead )
{
HideSlider();
- UpdateButtons( VLC_FALSE );
+ UpdateButtons( false );
vlc_object_release( p_input );
p_input = NULL;
p_input = p_sp->GetStream()->p_media->instance[0]->p_input;
}
-void VLMSliderManager::UpdateButtons( vlc_bool_t b_play )
+void VLMSliderManager::UpdateButtons( bool b_play )
{
if( b_play )
{
}
}
-vlc_bool_t VLMSliderManager::IsShown()
+bool VLMSliderManager::IsShown()
{
return slider->IsEnabled();
}
UpdateTime( "0:00:00", "0:00:00" );
}
-vlc_bool_t VLMSliderManager::IsFree()
+bool VLMSliderManager::IsFree()
{
return b_slider_free;
}
-vlc_bool_t VLMSliderManager::IsPlaying()
+bool VLMSliderManager::IsPlaying()
{
- return VLC_TRUE; /* Is it really useful ? */
+ return true; /* Is it really useful ? */
}
void VLMSliderManager::UpdateTime( char *psz_time, char *psz_total )
}
#ifdef WIN32
- b_slider_free = VLC_TRUE;
+ b_slider_free = true;
}
else
{
- b_slider_free = VLC_FALSE;
+ b_slider_free = false;
if( p_input )
{
void ProcessUpdate( wxScrollEvent & );
protected:
- vlc_bool_t b_slider_free;
+ bool b_slider_free;
virtual void UpdateInput();
- virtual void UpdateButtons( vlc_bool_t );
+ virtual void UpdateButtons( bool );
virtual void UpdateTime( char *, char *);
- virtual vlc_bool_t IsShown();
- virtual vlc_bool_t IsFree();
- virtual vlc_bool_t IsPlaying();
+ virtual bool IsShown();
+ virtual bool IsFree();
+ virtual bool IsPlaying();
virtual void HideSlider();
virtual void ShowSlider();
void VLMStream::Enable()
{
- p_media->b_enabled = VLC_TRUE;
+ p_media->b_enabled = true;
}
void VLMStream::Disable()
{
- p_media->b_enabled = VLC_FALSE;
+ p_media->b_enabled = false;
}
void VLMStream::Delete()
void VLMBroadcastStreamPanel::OnEdit( wxCommandEvent &event )
{
VLMEditStreamFrame *p_frame =
- new VLMEditStreamFrame( p_intf, this, p_stream->p_vlm, VLC_TRUE,
+ new VLMEditStreamFrame( p_intf, this, p_stream->p_vlm, true,
p_stream );
p_frame->Show();
}
virtual void Update() = 0;
protected:
intf_thread_t *p_intf;
- vlc_bool_t b_free;
- vlc_bool_t b_new; ///< Is it a new stream ?
- vlc_bool_t b_found; ///< Have we found the stream here ?
+ bool b_free;
+ bool b_new; ///< Is it a new stream ?
+ bool b_found; ///< Have we found the stream here ?
friend class VLMPanel;
virtual ~VLMBroadcastStreamPanel();
VLMBroadcastStream *GetStream() { return p_stream; }
- vlc_bool_t b_slider_free;
+ bool b_slider_free;
VLMSliderManager *p_sm;
vlm_Delete( p_vlm );
}
-vlc_bool_t VLMWrapper::AttachVLM()
+bool VLMWrapper::AttachVLM()
{
p_vlm = vlm_New( p_intf );
- return p_vlm ? VLC_TRUE: VLC_FALSE ;
+ return p_vlm ? true: false ;
}
void VLMWrapper::LockVLM()
void VLMWrapper::AddBroadcast( const char* name, const char* input,
const char* output,
- vlc_bool_t b_enabled, vlc_bool_t b_loop )
+ bool b_enabled, bool b_loop )
{
vlm_message_t *message;
string command = "new \"" + string(name) + "\" broadcast";
void VLMWrapper::EditBroadcast( const char* name, const char* input,
const char* output,
- vlc_bool_t b_enabled, vlc_bool_t b_loop )
+ bool b_enabled, bool b_loop )
{
vlm_message_t *message;
string command;
void VLMWrapper::AddVod( const char* name, const char* input,
const char* output,
- vlc_bool_t b_enabled, vlc_bool_t b_loop )
+ bool b_enabled, bool b_loop )
{
vlm_message_t *message;
string command = "new \"" + string(name) + "\" vod";
void VLMWrapper::EditVod( const char* name, const char* input,
const char* output,
- vlc_bool_t b_enabled, vlc_bool_t b_loop )
+ bool b_enabled, bool b_loop )
{
vlm_message_t *message;
string command;
VLMWrapper( intf_thread_t * );
virtual ~VLMWrapper();
- vlc_bool_t AttachVLM();
+ bool AttachVLM();
void LockVLM();
void UnlockVLM();
void AddBroadcast( const char*, const char*, const char*,
- vlc_bool_t b_enabled = VLC_TRUE,
- vlc_bool_t b_loop = VLC_TRUE );
+ bool b_enabled = true,
+ bool b_loop = true );
void EditBroadcast( const char*, const char*, const char*,
- vlc_bool_t b_enabled = VLC_TRUE,
- vlc_bool_t b_loop = VLC_TRUE );
+ bool b_enabled = true,
+ bool b_loop = true );
void AddVod( const char*, const char*, const char*,
- vlc_bool_t b_enabled = VLC_TRUE,
- vlc_bool_t b_loop = VLC_TRUE );
+ bool b_enabled = true,
+ bool b_loop = true );
void EditVod( const char*, const char*, const char*,
- vlc_bool_t b_enabled = VLC_TRUE,
- vlc_bool_t b_loop = VLC_TRUE );
+ bool b_enabled = true,
+ bool b_loop = true );
unsigned int NbMedia() { if( p_vlm ) return p_vlm->i_media; return 0; }
vlm_media_t *GetMedia( int i )
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE);
if( p_playlist )
{
- playlist_item_t * p_item = playlist_ItemGetById( p_playlist, (int)data, VLC_FALSE );
+ playlist_item_t * p_item = playlist_ItemGetById( p_playlist, (int)data, false );
if( p_item )
{
const char *psz_uri = input_item_GetURI( p_item->p_input );
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input,
- PLAYLIST_GO, PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_GO, PLAYLIST_END, true, false );
vlc_object_release(p_playlist);
}
else
static int IntfPreampCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static void ChangeFiltersString( intf_thread_t *, aout_instance_t *,
- char *, vlc_bool_t );
-static void ChangeVFiltersString( intf_thread_t *, char *, vlc_bool_t );
+ char *, bool );
+static void ChangeVFiltersString( intf_thread_t *, char *, bool );
/* IDs for the controls and the menu commands */
if( f_value > 0 && f_value < 10 )
gamma_slider->SetValue( (int)(10 * f_value) );
- b_update = VLC_FALSE;
+ b_update = false;
return panel;
}
void ExtraPanel::OnIdle( wxIdleEvent &event )
{
CheckAout();
- if( b_update == VLC_TRUE )
+ if( b_update == true )
{
- if( b_my_update == VLC_TRUE )
+ if( b_my_update == true )
{
- b_update = b_my_update = VLC_FALSE;
+ b_update = b_my_update = false;
return;
}
char *p = psz_bands;
const wxString preamp = wxT("Preamp\n");
preamp_text->SetLabel( preamp + wxU( psz_val ) + wxT( "dB" ) );
eq_chkbox->SetValue( TRUE );
- b_update = VLC_FALSE;
+ b_update = false;
}
}
aout_instance_t *p_aout= (aout_instance_t *)vlc_object_find(p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE);
ChangeFiltersString( p_intf,p_aout, "equalizer",
- event.IsChecked() ? VLC_TRUE : VLC_FALSE );
+ event.IsChecked() ? true : false );
if( event.IsChecked() )
{
if( p_aout == NULL )
{
vlc_value_t val;
- vlc_bool_t b_previous = eq_chkbox->IsChecked();
+ bool b_previous = eq_chkbox->IsChecked();
val.f_float = 12.0;
IntfPreampCallback( NULL, NULL, val,val, this );
config_PutFloat( p_intf, "equalizer-preamp", 12.0 );
aout_instance_t *p_aout= (aout_instance_t *)vlc_object_find(p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE);
- vlc_bool_t b_2p = event.IsChecked() ? VLC_TRUE : VLC_FALSE;
+ bool b_2p = event.IsChecked() ? true : false;
if( p_aout == NULL )
{
{
for( int i = 0; i < p_aout->i_nb_inputs; i++ )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
}
}
vlc_object_release( p_aout );
{
var_SetFloat( p_aout, "equalizer-preamp", f );
config_PutFloat( p_intf, "equalizer-preamp", f );
- b_my_update = VLC_TRUE;
+ b_my_update = true;
vlc_object_release( p_aout );
}
}
{
var_SetString( p_aout, "equalizer-bands", psz_values );
config_PutPsz( p_intf, "equalizer-bands", psz_values );
- b_my_update = VLC_TRUE;
+ b_my_update = true;
vlc_object_release( p_aout );
}
}
aout_instance_t *p_aout= (aout_instance_t *)vlc_object_find(p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE);
ChangeFiltersString( p_intf , p_aout, "headphone_channel_mixer",
- event.IsChecked() ? VLC_TRUE : VLC_FALSE );
+ event.IsChecked() ? true : false );
if( p_aout != NULL )
vlc_object_release( p_aout );
}
aout_instance_t *p_aout= (aout_instance_t *)vlc_object_find(p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE);
ChangeFiltersString( p_intf , p_aout, "normvol",
- event.IsChecked() ? VLC_TRUE : VLC_FALSE );
+ event.IsChecked() ? true : false );
if( p_aout != NULL )
vlc_object_release( p_aout );
}
void ExtraPanel::OnEnableAdjust(wxCommandEvent& event)
{
ChangeVFiltersString( p_intf, "adjust",
- event.IsChecked() ? VLC_TRUE : VLC_FALSE );
+ event.IsChecked() ? true : false );
if( event.IsChecked() )
{
if( vfilters[i_filter].psz_filter )
{
ChangeVFiltersString( p_intf, vfilters[i_filter].psz_filter ,
- event.IsChecked() ? VLC_TRUE : VLC_FALSE );
+ event.IsChecked() ? true : false );
}
}
psz_bands = var_GetNonEmptyString( p_aout, "equalizer-bands" );
if( psz_bands == NULL )
psz_bands = strdup("");
- b_update = VLC_TRUE;
+ b_update = true;
}
vlc_object_release( p_aout );
}
static void ChangeVFiltersString( intf_thread_t *p_intf,
- char *psz_name, vlc_bool_t b_add )
+ char *psz_name, bool b_add )
{
vout_thread_t *p_vout;
char *psz_parser, *psz_string;
static void ChangeFiltersString( intf_thread_t *p_intf,
aout_instance_t * p_aout,
- char *psz_name, vlc_bool_t b_add )
+ char *psz_name, bool b_add )
{
char *psz_parser, *psz_string;
var_SetString( p_aout, "audio-filter", psz_string );
for( int i = 0; i < p_aout->i_nb_inputs; i++ )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
}
}
free( psz_string );
ExtraPanel *p_panel = (ExtraPanel *)param;
p_panel->psz_bands = strdup( newval.psz_string );
- p_panel->b_update = VLC_TRUE;
+ p_panel->b_update = true;
return VLC_SUCCESS;
}
ExtraPanel *p_panel = (ExtraPanel *)param;
p_panel->f_preamp = newval.f_float;
- p_panel->b_update = VLC_TRUE;
+ p_panel->b_update = true;
return VLC_SUCCESS;
}
char *psz_bands;
float f_preamp;
- vlc_bool_t b_update;
+ bool b_update;
private:
/* General layout */
wxPanel *VideoPanel( wxWindow * );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
- vlc_bool_t b_my_update;
+ bool b_my_update;
wxWindow *p_parent;
};
};
p_input = NULL;
i_old_playing_status = STATUS_STOP;
i_old_rate = INPUT_RATE_DEFAULT;
- b_slider_free = VLC_TRUE;
+ b_slider_free = true;
i_input_hide_delay = 0;
/* Create slider */
/*****************************************************************************
* Public methods.
*****************************************************************************/
-vlc_bool_t InputManager::IsPlaying()
+bool InputManager::IsPlaying()
{
return (p_input && !p_input->b_die);
}
free( psz_now_playing );
}
-void InputManager::UpdateButtons( vlc_bool_t b_play )
+void InputManager::UpdateButtons( bool b_play )
{
if( !b_play )
{
}
else if( p_input->b_dead )
{
- UpdateButtons( VLC_FALSE );
+ UpdateButtons( false );
vlc_object_release( p_input );
p_input = NULL;
}
vlc_value_t pos, len;
UpdateTime();
- UpdateButtons( VLC_TRUE );
+ UpdateButtons( true );
UpdateNowPlaying();
UpdateDiscButtons();
if( p_input )
{
int i_type = var_Type( p_input, "prev-chapter" );
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, ( i_type & VLC_VAR_TYPE ) != 0 ?
"prev-chapter" : "prev-title", val );
if( p_input )
{
int i_type = var_Type( p_input, "next-chapter" );
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, ( i_type & VLC_VAR_TYPE ) != 0 ?
"next-chapter" : "next-title", val );
}
#ifdef WIN32
- b_slider_free = VLC_TRUE;
+ b_slider_free = true;
}
else
{
- b_slider_free = VLC_FALSE;
+ b_slider_free = false;
if( p_intf->p_sys->p_input ) UpdateTime();
}
#endif
virtual ~InputManager();
void Update();
- vlc_bool_t IsPlaying();
+ bool IsPlaying();
protected:
void UpdateInput();
void UpdateNowPlaying();
- void UpdateButtons( vlc_bool_t );
+ void UpdateButtons( bool );
void UpdateDiscButtons();
void UpdateTime();
wxSlider *slider; ///< Slider for this input
int i_slider_pos; ///< Current slider position
- vlc_bool_t b_slider_free; ///< Slider status
+ bool b_slider_free; ///< Slider status
wxBoxSizer *sizer;
p_intf->p_sys->p_video_sizer->GetMinSize() != wxSize(0,0) )
{
if( !b_video ) i_delay = mdate() + 1000000;
- b_video = VLC_TRUE;
+ b_video = true;
SetSashSize( -1 );
wxSize size = GetWindow1()->GetSizer()->GetMinSize();
if( b_video ) i_delay = mdate() + 1000000;
- b_video = VLC_FALSE;
+ b_video = false;
if( event.GetSize().GetHeight() - size.GetHeight() )
{
intf_thread_t *p_intf;
int i_sash_position;
int i_width;
- vlc_bool_t b_video;
+ bool b_video;
mtime_t i_delay;
- vlc_bool_t b_show_on_start;
+ bool b_show_on_start;
};
BEGIN_EVENT_TABLE(Splitter, wxSplitterWindow)
{
/* Initializations */
p_intf = _p_intf;
- b_extra = VLC_FALSE;
+ b_extra = false;
extra_frame = 0;
playlist_manager = 0;
i_update_counter = 0;
var_Create( p_intf, "interaction", VLC_VAR_ADDRESS );
var_AddCallback( p_intf, "interaction", InteractCallback, this );
- p_intf->b_interaction = VLC_TRUE;
+ p_intf->b_interaction = true;
/* Show embedded playlist if requested */
if( splitter->ShowOnStart() ) OnSmallPlaylist( dummy );
#endif
#endif
- p_intf->b_interaction = VLC_FALSE;
+ p_intf->b_interaction = false;
var_DelCallback( p_intf, "interaction", InteractCallback, this );
delete p_intf->p_sys->p_wxwindow;
FIND_ANYWHERE );
if( p_input )
{
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, "rate-slower", val );
vlc_object_release( p_input );
FIND_ANYWHERE );
if( p_input )
{
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, "rate-faster", val );
vlc_object_release( p_input );
/*****************************************************************************
* Definition of DragAndDrop class.
*****************************************************************************/
-DragAndDrop::DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t _b_enqueue )
+DragAndDrop::DragAndDrop( intf_thread_t *_p_intf, bool _b_enqueue )
{
p_intf = _p_intf;
b_enqueue = _b_enqueue;
VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( p_input )
{
- if( input_AddSubtitles( p_input, psz_utf8, VLC_TRUE ) )
+ if( input_AddSubtitles( p_input, psz_utf8, true ) )
{
vlc_object_release( p_input );
wxDnDLocaleFree( psz_utf8 );
playlist_Add( p_playlist, psz_utf8, NULL,
PLAYLIST_APPEND | ((i | b_enqueue) ? 0 : PLAYLIST_GO),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
wxDnDLocaleFree( psz_utf8 );
}
class DragAndDrop: public wxFileDropTarget
{
public:
- DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t b_enqueue = VLC_FALSE );
+ DragAndDrop( intf_thread_t *_p_intf, bool b_enqueue = false );
virtual bool OnDropFiles( wxCoord x, wxCoord y,
const wxArrayString& filenames );
private:
intf_thread_t *p_intf;
- vlc_bool_t b_enqueue;
+ bool b_enqueue;
};
#endif
wxMenu *p_navig_menu;
/* Extended panel */
- vlc_bool_t b_extra;
+ bool b_extra;
wxPanel *extra_frame;
/* Playlist panel */
ArrayOfInts & rai_objects )
{
vlc_object_t *p_object;
- vlc_bool_t b_section_empty = VLC_FALSE;
+ bool b_section_empty = false;
int i;
i_item_id = i_start_id;
Enable( MenuDummy_Event + i, FALSE );
}
AppendSeparator();
- b_section_empty = VLC_TRUE;
+ b_section_empty = true;
continue;
}
if( rai_objects[i] == 0 )
{
Append( MenuDummy_Event, wxU(ras_varnames[i]) );
- b_section_empty = VLC_FALSE;
+ b_section_empty = false;
continue;
}
p_object = (vlc_object_t *)vlc_object_get( rai_objects[i] );
if( p_object == NULL ) continue;
- b_section_empty = VLC_FALSE;
+ b_section_empty = false;
CreateMenuItem( this, ras_varnames[i], p_object );
vlc_object_release( p_object );
}
{
/* Initializations */
p_intf = _p_intf;
- b_need_update = VLC_FALSE;
+ b_need_update = false;
i_items_to_append = 0;
i_cached_item_id = -1;
i_update_counter = 0;
#if wxUSE_DRAG_AND_DROP
/* Associate drop targets with the playlist */
- SetDropTarget( new DragAndDrop( p_intf, VLC_TRUE ) );
+ SetDropTarget( new DragAndDrop( p_intf, true ) );
#endif
/* Update the playlist */
- Rebuild( VLC_TRUE );
+ Rebuild( true );
/*
* We want to be notified of playlist changes
vlc_value_t oval, vlc_value_t nval, void *param )
{
PlaylistManager *p_playlist = (PlaylistManager *)param;
- p_playlist->b_need_update = VLC_TRUE;
+ p_playlist->b_need_update = true;
return VLC_SUCCESS;
}
LockPlaylist( p_intf->p_sys, p_playlist );
playlist_item_t *p_item =
playlist_ItemGetById( p_playlist, ((PlaylistItem *)p_data)->i_id,
- VLC_TRUE );
+ true );
if( !p_item )
{
UnlockPlaylist( p_intf->p_sys, p_playlist );
wxU( " )" ) );
}
- if( !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE )
+ if( !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == true )
{
msg = wxString( wxU( psz_name ) ) + duration;
}
node = FindItem( treectrl->GetRootItem(), p_add->i_node );
if( !node.IsOk() ) goto update;
- p_item = playlist_ItemGetById( p_playlist, p_add->i_item, VLC_FALSE );
+ p_item = playlist_ItemGetById( p_playlist, p_add->i_item, false );
if( !p_item ) goto update;
item = FindItem( treectrl->GetRootItem(), p_add->i_item );
if( this->b_need_update )
{
- this->b_need_update = VLC_FALSE;
- Rebuild( VLC_TRUE );
+ this->b_need_update = false;
+ Rebuild( true );
}
/* Updating the playing status every 0.5s is enough */
/**********************************************************************
* Rebuild the playlist
**********************************************************************/
-void PlaylistManager::Rebuild( vlc_bool_t b_root )
+void PlaylistManager::Rebuild( bool b_root )
{
i_items_to_append = 0;
i_cached_item_id = -1;
if( !p_wxparent ) return;
LockPlaylist( p_intf->p_sys, p_playlist );
- p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, VLC_TRUE );
- p_node = playlist_ItemGetById( p_playlist, p_wxparent->i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, p_wxitem->i_id, true );
+ p_node = playlist_ItemGetById( p_playlist, p_wxparent->i_id, true );
if( !p_item || p_item->i_children >= 0 )
{
p_node = p_item;
p_item = NULL;
}
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_node, p_item );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, p_node, p_item );
UnlockPlaylist( p_intf->p_sys, p_playlist );
}
{
/* Too many items waiting to be added, it will be quicker to rebuild
* the whole playlist */
- p_playlist->b_need_update = VLC_TRUE;
+ p_playlist->b_need_update = true;
return VLC_SUCCESS;
}
DECLARE_EVENT_TABLE();
/* Update */
- void Rebuild( vlc_bool_t );
+ void Rebuild( bool );
void CreateNode( playlist_item_t*, wxTreeItemId );
void UpdateNode( playlist_item_t*, wxTreeItemId );
void UpdateNodeChildren( playlist_item_t*, wxTreeItemId );
if( !b_init )
{
p_main_interface->Init();
- b_init = VLC_TRUE;
+ b_init = true;
}
#endif
{
p_main_interface->Raise();
p_main_interface->Show();
- p_intf->p_sys->b_intf_show = VLC_FALSE;
+ p_intf->p_sys->b_intf_show = false;
}
if( intf_ShouldDie( p_intf ) )
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
intf_thread_t *p_intf = (intf_thread_t *)param;
- p_intf->p_sys->b_intf_show = VLC_TRUE;
+ p_intf->p_sys->b_intf_show = true;
return VLC_SUCCESS;
}
private:
intf_thread_t *p_intf;
Interface *p_main_interface;
- vlc_bool_t b_init;
+ bool b_init;
int i_old_playing_status;
int i_old_rate;
if( p_child_window ) p_child_window->Show();
Show();
- b_shown = VLC_TRUE;
+ b_shown = true;
p_intf->p_sys->p_video_sizer = new wxBoxSizer( wxHORIZONTAL );
#if (wxCHECK_VERSION(2,5,3))
p_intf->p_sys->p_video_sizer->Show( this, TRUE );
p_intf->p_sys->p_video_sizer->Layout();
SetFocus();
- b_shown = VLC_TRUE;
+ b_shown = true;
}
p_intf->p_sys->p_video_sizer->SetMinSize( event->GetSize() );
p_intf->p_sys->p_video_sizer->Show( this, FALSE );
SetSize( 0, 0 );
p_intf->p_sys->p_video_sizer->Layout();
- b_shown = VLC_FALSE;
+ b_shown = false;
}
p_intf->p_sys->p_video_sizer->SetMinSize( wxSize(0,0) );
vout_thread_t *p_vout;
wxWindow *p_parent;
vlc_mutex_t lock;
- vlc_bool_t b_shown;
- vlc_bool_t b_auto_size;
+ bool b_shown;
+ bool b_auto_size;
wxWindow *p_child_window;
add_shortcut( "wxwidgets" );
add_bool( "wx-embed", 1, NULL,
- EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
+ EMBED_TEXT, EMBED_LONGTEXT, false );
add_deprecated_alias( "wxwin-enbed" ); /*Deprecated since 0.8.4*/
add_bool( "wx-bookmarks", 0, NULL,
- BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
+ BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, false );
add_deprecated_alias( "wxwin-bookmarks" ); /*Deprecated since 0.8.4*/
add_bool( "wx-taskbar", 1, NULL,
- TASKBAR_TEXT, TASKBAR_LONGTEXT, VLC_FALSE );
+ TASKBAR_TEXT, TASKBAR_LONGTEXT, false );
add_deprecated_alias( "wxwin-taskbar" ); /*Deprecated since 0.8.4*/
add_bool( "wx-extended", 0, NULL,
- EXTENDED_TEXT, EXTENDED_LONGTEXT, VLC_FALSE );
+ EXTENDED_TEXT, EXTENDED_LONGTEXT, false );
add_bool( "wx-minimal", 0, NULL,
- MINIMAL_TEXT, MINIMAL_LONGTEXT, VLC_TRUE );
+ MINIMAL_TEXT, MINIMAL_LONGTEXT, true );
add_deprecated_alias( "wxwin-minimal" ); /*Deprecated since 0.8.4*/
add_bool( "wx-autosize", 1, NULL,
- SIZE_TO_VIDEO_TEXT, SIZE_TO_VIDEO_LONGTEXT, VLC_TRUE );
+ SIZE_TO_VIDEO_TEXT, SIZE_TO_VIDEO_LONGTEXT, true );
add_deprecated_alias( "wxwin-autosize" ); /*Deprecated since 0.8.4*/
add_integer( "wx-playlist-view", 0, NULL, PLAYLIST_TEXT, PLAYLIST_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_list( pi_playlist_views, psz_playlist_views, 0 );
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON
add_bool( "wx-systray", 0, NULL,
- SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE );
+ SYSTRAY_TEXT, SYSTRAY_LONGTEXT, false );
add_deprecated_alias( "wxwin-systray" ); /*Deprecated since 0.8.4*/
#endif
#endif
- add_bool( "wx-labels", 0, NULL, LABEL_TEXT, LABEL_LONGTEXT, VLC_TRUE);
+ add_bool( "wx-labels", 0, NULL, LABEL_TEXT, LABEL_LONGTEXT, true);
add_string( "wx-config-last", NULL, NULL,
- N_("last config"), N_("last config"), VLC_TRUE );
+ N_("last config"), N_("last config"), true );
change_autosave();
change_internal();
add_deprecated_alias( "wxwin-config-last" ); /*Deprecated since 0.8.4*/
p_intf->pf_show_dialog = NULL;
/* We support play on start */
- p_intf->b_play = VLC_TRUE;
+ p_intf->b_play = true;
p_intf->p_sys->b_video_autosize =
config_GetInt( p_intf, "wx-autosize" );
intf_thread_t *p_intf = (intf_thread_t *)p_this;
vlc_mutex_lock( &p_intf->object_lock );
- p_intf->b_dead = VLC_TRUE;
+ p_intf->b_dead = true;
vlc_mutex_unlock( &p_intf->object_lock );
if( p_intf->pf_show_dialog )
/* Create a new thread for wxWidgets */
if( vlc_thread_create( p_intf, "Skins Dialogs Thread",
- Init, 0, VLC_TRUE ) )
+ Init, 0, true ) )
{
msg_Err( p_intf, "cannot create Skins Dialogs Thread" );
p_intf->pf_show_dialog = NULL;
FIND_ANYWHERE );
if( p_playlist )
{
- playlist_Control( p_playlist, PLAYLIST_PLAY, VLC_FALSE );
+ playlist_Control( p_playlist, PLAYLIST_PLAY, false );
vlc_object_release( p_playlist );
}
}
WindowSettings *p_window_settings;
/* special actions */
- vlc_bool_t b_playing;
- vlc_bool_t b_intf_show; /* interface to be shown */
+ bool b_playing;
+ bool b_intf_show; /* interface to be shown */
/* The input thread */
input_thread_t * p_input;
/* Embedded vout */
VideoWindow *p_video_window;
wxBoxSizer *p_video_sizer;
- vlc_bool_t b_video_autosize;
+ bool b_video_autosize;
/* Aout */
aout_instance_t *p_aout;
{
playlist_t *p_playlist = (playlist_t *)p_this;
input_item_t *p_item = (input_item_t *)(p_playlist->p_private);
- vlc_bool_t b_have_art = VLC_FALSE;
+ bool b_have_art = false;
int i = 0;
struct stat a;
if( !strncmp( psz_path, "file://", 7 ) )
psz_path += 7;
- for( i = 0; b_have_art == VLC_FALSE && i < 3; i++ )
+ for( i = 0; b_have_art == false && i < 3; i++ )
{
switch( i )
{
if( utf8_stat( psz_filename+7, &a ) != -1 )
{
input_item_SetArtURL( p_item, psz_filename );
- b_have_art = VLC_TRUE;
+ b_have_art = true;
}
}
{
demux_meta_t *p_demux_meta = (demux_meta_t*)p_demux->p_private;
vlc_meta_t *p_meta;
- vlc_bool_t b_start;
- vlc_bool_t b_end;
+ bool b_start;
+ bool b_end;
const uint8_t *p_header = NULL;
int i_entry;
{
demux_t *p_demux = (demux_t *)p_this;
demux_meta_t *p_demux_meta = (demux_meta_t*)p_demux->p_private;
- vlc_bool_t b_seekable;
+ bool b_seekable;
int64_t i_init;
msg_Dbg( p_demux, "checking for ID3v1/2 and APEv1/2 tags" );
*****************************************************************************/
static int GetData( vlc_object_t *p_obj, input_item_t *p_item,
- vlc_bool_t b_art )
+ bool b_art )
{
char psz_buf[256];
char psz_data[256];
char i_album_count, i;
char *ppsz_args[4];
- vlc_bool_t b_art_found = VLC_FALSE;
+ bool b_art_found = false;
char *psz_artist;
char *psz_album;
psz_buf );
msg_Dbg( p_obj, "Album art URL: %s", psz_data );
input_item_SetArtURL( p_item, psz_data );
- b_art_found = VLC_TRUE;
+ b_art_found = true;
break;
}
}
input_item_t *p_item = (input_item_t *)(p_playlist->p_private);
assert( p_item );
- return GetData( VLC_OBJECT(p_playlist), p_item, VLC_TRUE );
+ return GetData( VLC_OBJECT(p_playlist), p_item, true );
}
int i_nowp_port; /**< port to which submit */
char *psz_nowp_file; /**< file to which submit */
#endif
- vlc_bool_t b_handshaked; /**< are we authenticated ? */
+ bool b_handshaked; /**< are we authenticated ? */
char psz_auth_token[33]; /**< Authentication token */
/* data about song currently playing */
mtime_t time_pause; /**< time when vlc paused */
mtime_t time_total_pauses; /**< total time in pause */
- vlc_bool_t b_submit; /**< do we have to submit ? */
+ bool b_submit; /**< do we have to submit ? */
- vlc_bool_t b_state_cb; /**< if we registered the
+ bool b_state_cb; /**< if we registered the
* "state" callback */
- vlc_bool_t b_meta_read; /**< if we read the song's
+ bool b_meta_read; /**< if we read the song's
* metadata already */
};
set_shortname( N_( "Audioscrobbler" ) );
set_description( N_("Submission of played songs to last.fm") );
add_string( "lastfm-username", "", NULL,
- USERNAME_TEXT, USERNAME_LONGTEXT, VLC_FALSE );
+ USERNAME_TEXT, USERNAME_LONGTEXT, false );
add_password( "lastfm-password", "", NULL,
- PASSWORD_TEXT, PASSWORD_LONGTEXT, VLC_FALSE );
+ PASSWORD_TEXT, PASSWORD_LONGTEXT, false );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
vlc_module_end();
PL_UNLOCK;
pl_Release( p_playlist );
- p_intf->b_dead = VLC_TRUE;
+ p_intf->b_dead = true;
/* we lock the mutex in case p_sys is being accessed from a callback */
vlc_mutex_lock ( &p_sys->lock );
int i;
/* main loop */
for( ;; )
{
- vlc_bool_t b_die = VLC_FALSE, b_wait = VLC_FALSE;
+ bool b_die = false, b_wait = false;
vlc_object_lock( p_intf );
if( vlc_object_alive( p_intf ) )
continue; /* holding on until next_exchange */
/* handshake if needed */
- if( p_sys->b_handshaked == VLC_FALSE )
+ if( p_sys->b_handshaked == false )
{
msg_Dbg( p_intf, "Handshaking with last.fm ..." );
case VLC_ENOVAR:
/* username not set */
- intf_UserFatal( p_intf, VLC_FALSE,
+ intf_UserFatal( p_intf, false,
_("Last.fm username not set"),
_("Please set a username or disable the "
"audioscrobbler plugin, and restart VLC.\n"
case VLC_SUCCESS:
msg_Dbg( p_intf, "Handshake successfull :)" );
- p_sys->b_handshaked = VLC_TRUE;
+ p_sys->b_handshaked = true;
p_sys->i_interval = 0;
p_sys->next_exchange = mdate();
break;
break;
}
/* if handshake failed let's restart the loop */
- if( p_sys->b_handshaked == VLC_FALSE )
+ if( p_sys->b_handshaked == false )
continue;
}
{
/* If connection fails, we assume we must handshake again */
HandleInterval( &p_sys->next_exchange, &p_sys->i_interval );
- p_sys->b_handshaked = VLC_FALSE;
+ p_sys->b_handshaked = false;
free( psz_submit );
continue;
}
{
/* If connection fails, we assume we must handshake again */
HandleInterval( &p_sys->next_exchange, &p_sys->i_interval );
- p_sys->b_handshaked = VLC_FALSE;
+ p_sys->b_handshaked = false;
continue;
}
i_net_ret = net_Read( p_intf, i_post_socket, NULL,
- p_buffer, 1023, VLC_FALSE );
+ p_buffer, 1023, false );
if ( i_net_ret <= 0 )
{
/* if we get no answer, something went wrong : try again */
if ( p_buffer_pos )
{
msg_Err( p_intf, "Authentication failed (BADSESSION), are you connected to last.fm with another program ?" );
- p_sys->b_handshaked = VLC_FALSE;
+ p_sys->b_handshaked = false;
HandleInterval( &p_sys->next_exchange, &p_sys->i_interval );
continue;
}
{
msg_Err( p_intf, "Authentication failed, handshaking again (%s)",
p_buffer );
- p_sys->b_handshaked = VLC_FALSE;
+ p_sys->b_handshaked = false;
HandleInterval( &p_sys->next_exchange, &p_sys->i_interval );
continue;
}
if( p_intf->b_dead )
return VLC_SUCCESS;
- if( p_sys->b_meta_read == VLC_FALSE && newval.i_int >= PLAYING_S )
+ if( p_sys->b_meta_read == false && newval.i_int >= PLAYING_S )
{
ReadMetaData( p_intf );
return VLC_SUCCESS;
if( p_intf->b_dead )
return VLC_SUCCESS;
- p_sys->b_state_cb = VLC_FALSE;
- p_sys->b_meta_read = VLC_FALSE;
- p_sys->b_submit = VLC_FALSE;
+ p_sys->b_state_cb = false;
+ p_sys->b_meta_read = false;
+ p_sys->b_submit = false;
p_playlist = pl_Yield( p_intf );
PL_LOCK;
p_sys->p_current_song.i_start = mdate(); /* only used locally */
var_AddCallback( p_input, "state", PlayingChange, p_intf );
- p_sys->b_state_cb = VLC_TRUE;
+ p_sys->b_state_cb = true;
if( input_item_IsPreparsed( p_item ) )
ReadMetaData( p_intf );
end:
DeleteSong( &p_sys->p_current_song );
- p_sys->b_submit = VLC_FALSE;
+ p_sys->b_submit = false;
vlc_mutex_unlock( &p_sys->lock );
}
if ( p_buffer_pos )
{
/* authentication failed, bad username/password combination */
- intf_UserFatal( p_this, VLC_FALSE,
+ intf_UserFatal( p_this, false,
_("last.fm: Authentication failed"),
_("last.fm username or password is incorrect. "
"Please verify your settings and relaunch VLC." ) );
vlc_mutex_lock( &p_sys->lock );
- p_sys->b_meta_read = VLC_TRUE;
+ p_sys->b_meta_read = true;
ALLOC_ITEM_META( p_sys->p_current_song.psz_a, Artist )
else
}
/* Now we have read the mandatory meta data, so we can submit that info */
- p_sys->b_submit = VLC_TRUE;
+ p_sys->b_submit = true;
ALLOC_ITEM_META( p_sys->p_current_song.psz_b, Album )
else
set_callbacks( E_(OpenIntf), NULL );
#ifdef WIN32
set_section( N_( "Dummy Interface" ), NULL );
- add_category_hint( N_("Interface"), NULL, VLC_FALSE );
- add_bool( "dummy-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, VLC_FALSE );
+ add_category_hint( N_("Interface"), NULL, false );
+ add_bool( "dummy-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, false );
#endif
add_submodule();
set_description( _("Dummy access function") );
set_description( _("Dummy decoder function") );
set_capability( "decoder", 0 );
set_callbacks( E_(OpenDecoder), E_(CloseDecoder) );
- add_bool( "dummy-save-es", 0, NULL, SAVE_TEXT, SAVE_LONGTEXT, VLC_TRUE );
+ add_bool( "dummy-save-es", 0, NULL, SAVE_TEXT, SAVE_LONGTEXT, true );
add_submodule();
set_description( _("Dummy encoder function") );
set_capability( "encoder", 0 );
set_section( N_( "Dummy Video output" ), NULL );
set_capability( "video output", 1 );
set_callbacks( E_(OpenVideo), NULL );
- add_category_hint( N_("Video"), NULL, VLC_FALSE );
- add_string( "dummy-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, VLC_TRUE );
+ add_category_hint( N_("Video"), NULL, false );
+ add_string( "dummy-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true );
add_submodule();
set_description( _("Dummy font renderer function") );
set_capability( "text renderer", 1 );
}
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;
/* */
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 = NULL;
{
demux_sys_t *p_sys = p_demux->p_sys;
playlist_t *p_playlist;
- vlc_bool_t b_eof = VLC_FALSE;
+ bool b_eof = false;
p_playlist = vlc_object_find( p_demux, VLC_OBJECT_PLAYLIST, FIND_PARENT );
switch( p_sys->i_command )
{
case COMMAND_QUIT:
- b_eof = VLC_TRUE;
+ b_eof = true;
vlc_object_kill( p_demux->p_libvlc );
break;
case COMMAND_PAUSE:
if( mdate() >= p_sys->expiration )
- b_eof = VLC_TRUE;
+ b_eof = true;
else
msleep( 10000 );
break;
case COMMAND_NOP:
default:
- b_eof = VLC_TRUE;
+ b_eof = true;
break;
}
intf_thread_t *p_intf = (intf_thread_t*) p_this;
#ifdef WIN32
- vlc_bool_t b_quiet;
+ bool b_quiet;
b_quiet = config_GetInt( p_intf, "dummy-quiet" );
if( !b_quiet )
CONSOLE_INTRO_MSG;
int i_index, i_chroma;
char *psz_chroma;
picture_t *p_pic;
- vlc_bool_t b_chroma = 0;
+ bool b_chroma = 0;
psz_chroma = config_GetPsz( p_vout, "dummy-chroma" );
if( psz_chroma )
static int RenderHtml( filter_t *, subpicture_region_t *,
subpicture_region_t * );
static char *FontConfig_Select( FcConfig *, const char *,
- vlc_bool_t, vlc_bool_t, int * );
+ bool, bool, int * );
static int CheckIfFontBuildComplete( filter_t *p_filter );
#endif
static line_desc_t *NewLine( int );
set_subcategory( SUBCAT_VIDEO_SUBPIC );
add_file( "freetype-font", DEFAULT_FONT, NULL, FONT_TEXT, FONT_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "freetype-fontsize", 0, NULL, FONTSIZE_TEXT,
- FONTSIZE_LONGTEXT, VLC_TRUE );
+ FONTSIZE_LONGTEXT, true );
/* opacity valid on 0..255, with default 255 = fully opaque */
add_integer_with_range( "freetype-opacity", 255, 0, 255, NULL,
- OPACITY_TEXT, OPACITY_LONGTEXT, VLC_TRUE );
+ OPACITY_TEXT, OPACITY_LONGTEXT, true );
/* hook to the color values list, with default 0x00ffffff = white */
add_integer( "freetype-color", 0x00FFFFFF, NULL, COLOR_TEXT,
- COLOR_LONGTEXT, VLC_FALSE );
+ COLOR_LONGTEXT, false );
change_integer_list( pi_color_values, ppsz_color_descriptions, 0 );
add_integer( "freetype-rel-fontsize", 16, NULL, FONTSIZER_TEXT,
- FONTSIZER_LONGTEXT, VLC_FALSE );
+ FONTSIZER_LONGTEXT, false );
change_integer_list( pi_sizes, ppsz_sizes_text, 0 );
add_integer( "freetype-effect", 2, NULL, EFFECT_TEXT,
- EFFECT_LONGTEXT, VLC_FALSE );
+ EFFECT_LONGTEXT, false );
change_integer_list( pi_effects, ppsz_effects_text, 0 );
add_bool( "freetype-yuvp", 0, NULL, YUVP_TEXT,
- YUVP_LONGTEXT, VLC_TRUE );
+ YUVP_LONGTEXT, true );
set_capability( "text renderer", 100 );
add_shortcut( "text" );
set_callbacks( Create, Destroy );
uint32_t *p_fg_rgb;
uint32_t *p_bg_rgb;
uint8_t *p_fg_bg_ratio; /* 0x00=100% FG --> 0x7F=100% BG */
- vlc_bool_t b_new_color_mode;
+ bool b_new_color_mode;
/** underline information -- only supplied if text should be underlined */
uint16_t *pi_underline_offset;
uint16_t *pi_underline_thickness;
int i_font_size;
uint32_t i_font_color; /* ARGB */
uint32_t i_karaoke_bg_color; /* ARGB */
- vlc_bool_t b_italic;
- vlc_bool_t b_bold;
- vlc_bool_t b_underline;
+ bool b_italic;
+ bool b_bold;
+ bool b_underline;
char *psz_fontname;
} ft_style_t;
{
FT_Library p_library; /* handle to library */
FT_Face p_face; /* handle to face object */
- vlc_bool_t i_use_kerning;
+ bool i_use_kerning;
uint8_t i_font_opacity;
int i_font_color;
int i_font_size;
int i_display_height;
#ifdef HAVE_FONTCONFIG
FcConfig *p_fontconfig;
- vlc_bool_t b_fontconfig_ok;
+ bool b_fontconfig_ok;
vlc_mutex_t fontconfig_lock;
#endif
#ifdef HAVE_FONTCONFIG
vlc_mutex_init( p_filter, &p_sys->fontconfig_lock );
- p_sys->b_fontconfig_ok = VLC_FALSE;
+ p_sys->b_fontconfig_ok = false;
p_sys->p_fontconfig = NULL;
/* Check for an existing Fontbuilder thread */
vlc_object_attach( p_fontbuilder, p_filter->p_libvlc );
var_Create( p_fontbuilder, "build-done", VLC_VAR_BOOL );
- var_SetBool( p_fontbuilder, "build-done", VLC_FALSE );
+ var_SetBool( p_fontbuilder, "build-done", false );
if( vlc_thread_create( p_fontbuilder,
"fontlist builder",
FontBuilder,
VLC_THREAD_PRIORITY_LOW,
- VLC_FALSE ) )
+ false ) )
{
/* Don't destroy the fontconfig object - we won't be able to do
* italics or bold or change the font face, but we will still
msg_Dbg( p_this, "Took %ld seconds", (long)((t2 - t1)/1000000) );
lock = var_AcquireMutex( "fontbuilder" );
- var_SetBool( p_this, "build-done", VLC_TRUE );
+ var_SetBool( p_this, "build-done", true );
FcConfigDestroy( p_fontconfig );
vlc_mutex_unlock( lock );
return VLC_SUCCESS;
}
-static void UnderlineGlyphYUVA( int i_line_thickness, int i_line_offset, vlc_bool_t b_ul_next_char,
+static void UnderlineGlyphYUVA( int i_line_thickness, int i_line_offset, bool b_ul_next_char,
FT_BitmapGlyph p_this_glyph, FT_Vector *p_this_glyph_pos,
FT_BitmapGlyph p_next_glyph, FT_Vector *p_next_glyph_pos,
int i_glyph_tmax, int i_align_offset,
}
for( x = 0; x < i_extra; x++ )
{
- vlc_bool_t b_ok = VLC_TRUE;
+ bool b_ok = true;
/* break the underline around the tails of any glyphs which cross it */
for( z = x - i_line_thickness;
if( ( p_next_glyph->bitmap.rows > i_row ) &&
p_next_glyph->bitmap.buffer[p_next_glyph->bitmap.width * i_row + z-i_extra] )
{
- b_ok = VLC_FALSE;
+ b_ok = false;
}
}
else if ((z > 0 ) && (z < p_this_glyph->bitmap.width))
if( ( p_this_glyph->bitmap.rows > i_row ) &&
p_this_glyph->bitmap.buffer[p_this_glyph->bitmap.width * i_row + z] )
{
- b_ok = VLC_FALSE;
+ b_ok = false;
}
}
}
#ifdef HAVE_FONTCONFIG
static ft_style_t *CreateStyle( char *psz_fontname, int i_font_size,
- uint32_t i_font_color, uint32_t i_karaoke_bg_color, vlc_bool_t b_bold,
- vlc_bool_t b_italic, vlc_bool_t b_uline )
+ uint32_t i_font_color, uint32_t i_karaoke_bg_color, bool b_bold,
+ bool b_italic, bool b_uline )
{
ft_style_t *p_style = malloc( sizeof( ft_style_t ));
}
}
-static vlc_bool_t StyleEquals( ft_style_t *s1, ft_style_t *s2 )
+static bool StyleEquals( ft_style_t *s1, ft_style_t *s2 )
{
if( !s1 || !s2 )
- return VLC_FALSE;
+ return false;
if( s1 == s2 )
- return VLC_TRUE;
+ return true;
if(( s1->i_font_size == s2->i_font_size ) &&
( s1->i_font_color == s2->i_font_color ) &&
( s1->b_underline == s2->b_underline ) &&
( !strcmp( s1->psz_fontname, s2->psz_fontname )))
{
- return VLC_TRUE;
+ return true;
}
- return VLC_FALSE;
+ return false;
}
static int PushFont( font_stack_t **p_font, const char *psz_name, int i_size,
}
static ft_style_t *GetStyleFromFontStack( filter_sys_t *p_sys,
- font_stack_t **p_fonts, vlc_bool_t b_bold, vlc_bool_t b_italic,
- vlc_bool_t b_uline )
+ font_stack_t **p_fonts, bool b_bold, bool b_italic,
+ bool b_uline )
{
ft_style_t *p_style = NULL;
}
static int RenderTag( filter_t *p_filter, FT_Face p_face, int i_font_color,
- vlc_bool_t b_uline, int i_karaoke_bgcolor,
+ bool b_uline, int i_karaoke_bgcolor,
line_desc_t *p_line, uint32_t *psz_unicode,
int *pi_pen_x, int i_pen_y, int *pi_start,
FT_Vector *p_result )
FT_BBox line;
int i_yMin, i_yMax;
int i;
- vlc_bool_t b_first_on_line = VLC_TRUE;
+ bool b_first_on_line = true;
int i_previous = 0;
int i_pen_x_start = *pi_pen_x;
i_yMax = line.yMax;
if( line.xMax > 0 )
- b_first_on_line = VLC_FALSE;
+ b_first_on_line = false;
while( *psz_unicode && ( *psz_unicode != '\n' ) )
{
uint32_t **ppi_run_lengths,
ft_style_t ***ppp_styles,
- vlc_bool_t b_karaoke,
+ bool b_karaoke,
uint32_t *pi_k_runs,
uint32_t **ppi_k_run_lengths,
uint32_t **ppi_k_durations )
char *psz_node = NULL;
- vlc_bool_t b_italic = VLC_FALSE;
- vlc_bool_t b_bold = VLC_FALSE;
- vlc_bool_t b_uline = VLC_FALSE;
+ bool b_italic = false;
+ bool b_bold = false;
+ bool b_uline = false;
if( VLC_SUCCESS == var_Get( p_filter, "scale", &val ))
i_scale = val.i_int;
((p_font_style->i_karaoke_background_alpha & 0xff) << 24));
if( p_font_style->i_style_flags & STYLE_BOLD )
- b_bold = VLC_TRUE;
+ b_bold = true;
if( p_font_style->i_style_flags & STYLE_ITALIC )
- b_italic = VLC_TRUE;
+ b_italic = true;
if( p_font_style->i_style_flags & STYLE_UNDERLINE )
- b_uline = VLC_TRUE;
+ b_uline = true;
}
else
{
if( !strcasecmp( "font", psz_node ) )
PopFont( &p_fonts );
else if( !strcasecmp( "b", psz_node ) )
- b_bold = VLC_FALSE;
+ b_bold = false;
else if( !strcasecmp( "i", psz_node ) )
- b_italic = VLC_FALSE;
+ b_italic = false;
else if( !strcasecmp( "u", psz_node ) )
- b_uline = VLC_FALSE;
+ b_uline = false;
free( psz_node );
}
if( !strcasecmp( "font", psz_node ) )
rv = HandleFontAttributes( p_xml_reader, &p_fonts, i_scale );
else if( !strcasecmp( "b", psz_node ) )
- b_bold = VLC_TRUE;
+ b_bold = true;
else if( !strcasecmp( "i", psz_node ) )
- b_italic = VLC_TRUE;
+ b_italic = true;
else if( !strcasecmp( "u", psz_node ) )
- b_uline = VLC_TRUE;
+ b_uline = true;
else if( !strcasecmp( "br", psz_node ) )
{
SetupLine( p_filter, "\n", &psz_text,
{
if( p_face )
{
- vlc_bool_t match = !strcasecmp( p_face->family_name,
+ bool match = !strcasecmp( p_face->family_name,
p_style->psz_fontname );
if( p_face->style_flags & FT_STYLE_FLAG_BOLD )
FT_Vector *p_result,
- vlc_bool_t b_karaoke,
+ bool b_karaoke,
uint32_t i_k_runs,
uint32_t *pi_k_run_lengths,
uint32_t *pi_k_durations )
* (RGB mode has palette constraints on it). We therefore
* need to populate the legacy colour fields also.
*/
- p_line->b_new_color_mode = VLC_TRUE;
+ p_line->b_new_color_mode = true;
p_line->i_alpha = ( p_style->i_font_color & 0xff000000 ) >> 24;
p_line->i_red = ( p_style->i_font_color & 0x00ff0000 ) >> 16;
p_line->i_green = ( p_style->i_font_color & 0x0000ff00 ) >> 8;
p_sub = stream_MemoryNew( VLC_OBJECT(p_filter),
(uint8_t *) p_region_in->psz_html,
strlen( p_region_in->psz_html ),
- VLC_TRUE );
+ true );
if( p_sub )
{
p_xml = xml_Create( p_filter );
if( p_xml )
{
- vlc_bool_t b_karaoke = VLC_FALSE;
+ bool b_karaoke = false;
p_xml_reader = xml_ReaderCreate( p_xml, p_sub );
if( p_xml_reader )
/* We're going to have to render the text a number
* of times to show the progress marker on the text.
*/
- var_SetBool( p_filter, "text-rerender", VLC_TRUE );
- b_karaoke = VLC_TRUE;
+ var_SetBool( p_filter, "text-rerender", true );
+ b_karaoke = true;
}
else if( !strcasecmp( "text", psz_node ) )
{
- b_karaoke = VLC_FALSE;
+ b_karaoke = false;
}
else
{
}
static char* FontConfig_Select( FcConfig* priv, const char* family,
- vlc_bool_t b_bold, vlc_bool_t b_italic, int *i_idx )
+ bool b_bold, bool b_italic, int *i_idx )
{
FcResult result;
FcPattern *pat, *p_pat;
return NULL;
}
p_line->pp_glyphs[0] = NULL;
- p_line->b_new_color_mode = VLC_FALSE;
+ p_line->b_new_color_mode = false;
return p_line;
}
add_obsolete_integer( "gnutls-dh-bits" );
add_integer( "gnutls-cache-timeout", CACHE_TIMEOUT, NULL,
- CACHE_TIMEOUT_TEXT, CACHE_TIMEOUT_LONGTEXT, VLC_TRUE );
+ CACHE_TIMEOUT_TEXT, CACHE_TIMEOUT_LONGTEXT, true );
add_integer( "gnutls-cache-size", CACHE_SIZE, NULL, CACHE_SIZE_TEXT,
- CACHE_SIZE_LONGTEXT, VLC_TRUE );
+ CACHE_SIZE_LONGTEXT, true );
vlc_module_end();
{
gnutls_session_t session;
char *psz_hostname;
- vlc_bool_t b_handshaked;
+ bool b_handshaked;
};
return -1;
}
- p_sys->b_handshaked = VLC_TRUE;
+ p_sys->b_handshaked = true;
return 0;
}
static int
gnutls_Addx509File( vlc_object_t *p_this,
gnutls_certificate_credentials_t cred,
- const char *psz_path, vlc_bool_t b_priv );
+ const char *psz_path, bool b_priv );
static int
gnutls_Addx509Directory( vlc_object_t *p_this,
gnutls_certificate_credentials_t cred,
const char *psz_dirname,
- vlc_bool_t b_priv )
+ bool b_priv )
{
DIR* dir;
static int
gnutls_Addx509File( vlc_object_t *p_this,
gnutls_certificate_credentials cred,
- const char *psz_path, vlc_bool_t b_priv )
+ const char *psz_path, bool b_priv )
{
struct stat st;
p_session->sock.pf_recv = gnutls_Recv;
p_session->pf_set_fd = gnutls_SetFD;
- p_sys->session.b_handshaked = VLC_FALSE;
+ p_sys->session.b_handshaked = false;
const char *homedir = obj->p_libvlc->psz_datadir,
*datadir = config_GetDataDir ();
sprintf (path, "%s/ssl/certs", homedir);
gnutls_Addx509Directory (VLC_OBJECT (p_session),
- p_sys->x509_cred, path, VLC_FALSE);
+ p_sys->x509_cred, path, false);
sprintf (path, "%s/ca-certificates.crt", datadir);
gnutls_Addx509File (VLC_OBJECT (p_session),
- p_sys->x509_cred, path, VLC_FALSE);
+ p_sys->x509_cred, path, false);
p_session->pf_handshake = gnutls_HandshakeAndValidate;
/*p_session->pf_handshake = gnutls_ContinueHandshake;*/
sprintf (path, "%s/ssl/private", homedir);
gnutls_Addx509Directory (VLC_OBJECT (p_session), p_sys->x509_cred,
- path, VLC_TRUE);
+ path, true);
i_val = gnutls_init (&p_sys->session.session, GNUTLS_CLIENT);
if (i_val != 0)
tls_session_t *client = (tls_session_t *)obj;
tls_client_sys_t *p_sys = (tls_client_sys_t *)(client->p_sys);
- if (p_sys->session.b_handshaked == VLC_TRUE)
+ if (p_sys->session.b_handshaked == true)
gnutls_bye (p_sys->session.session, GNUTLS_SHUT_WR);
gnutls_deinit (p_sys->session.session);
/* credentials must be free'd *after* gnutls_deinit() */
tls_session_sys_t *p_sys = p_session->p_sys;
(void)p_server;
- if( p_sys->b_handshaked == VLC_TRUE )
+ if( p_sys->b_handshaked == true )
gnutls_bye( p_sys->session, GNUTLS_SHUT_WR );
gnutls_deinit( p_sys->session );
p_session->pf_set_fd = gnutls_SetFD;
p_session->pf_handshake = p_server_sys->pf_handshake;
- p_session->p_sys->b_handshaked = VLC_FALSE;
+ p_session->p_sys->b_handshaked = false;
p_session->p_sys->psz_hostname = NULL;
i_val = gnutls_init( &session, GNUTLS_SERVER );
/* Launch the gtk_main() thread. It will not return until it has
* called gdk_threads_enter(), which ensures us thread safety. */
if( vlc_thread_create( p_gtk_main, "gtk_main", GtkMain,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_LOW, true ) )
{
vlc_object_release( p_gtk_main );
i_refcount--;
* Inhibit: Notify the power management daemon that it shouldn't suspend
* the computer because of inactivity
*
- * returns VLC_FALSE if Out of memory, else VLC_TRUE
+ * returns false if Out of memory, else true
*****************************************************************************/
static int Inhibit( intf_thread_t *p_intf )
{
p_msg = dbus_message_new_method_call( PM_SERVICE, PM_PATH, PM_INTERFACE,
"Inhibit" );
if( !p_msg )
- return VLC_FALSE;
+ return false;
dbus_message_iter_init_append( p_msg, &args );
{
free( psz_app );
dbus_message_unref( p_msg );
- return VLC_FALSE;
+ return false;
}
free( psz_app );
if( !psz_inhibit_reason )
{
dbus_message_unref( p_msg );
- return VLC_FALSE;
+ return false;
}
if( !dbus_message_iter_append_basic( &args, DBUS_TYPE_STRING,
&psz_inhibit_reason ) )
{
free( psz_inhibit_reason );
dbus_message_unref( p_msg );
- return VLC_FALSE;
+ return false;
}
free( psz_inhibit_reason );
dbus_message_unref( p_msg );
if( p_reply == NULL )
{ /* g-p-m is not active, or too slow. Better luck next time? */
- return VLC_TRUE;
+ return true;
}
/* extract the cookie from the reply */
DBUS_TYPE_UINT32, &i_cookie,
DBUS_TYPE_INVALID ) == FALSE )
{
- return VLC_FALSE;
+ return false;
}
/* Save the cookie */
p_intf->p_sys->i_cookie = i_cookie;
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
* UnInhibit: Notify the power management daemon that we aren't active anymore
*
- * returns VLC_FALSE if Out of memory, else VLC_TRUE
+ * returns false if Out of memory, else true
*****************************************************************************/
static int UnInhibit( intf_thread_t *p_intf )
{
p_msg = dbus_message_new_method_call( PM_SERVICE, PM_PATH, PM_INTERFACE,
"UnInhibit" );
if( !p_msg )
- return VLC_FALSE;
+ return false;
dbus_message_iter_init_append( p_msg, &args );
if( !dbus_message_iter_append_basic( &args, DBUS_TYPE_UINT32, &i_cookie ) )
{
dbus_message_unref( p_msg );
- return VLC_FALSE;
+ return false;
}
if( !dbus_connection_send( p_conn, p_msg, NULL ) )
- return VLC_FALSE;
+ return false;
dbus_connection_flush( p_conn );
dbus_message_unref( p_msg );
p_intf->p_sys->i_cookie = 0;
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
set_subcategory( SUBCAT_ADVANCED_MISC );
add_file( "logfile", NULL, NULL,
- N_("Log filename"), N_("Specify the log filename."), VLC_FALSE );
+ N_("Log filename"), N_("Specify the log filename."), false );
change_unsafe();
add_string( "logmode", "text", NULL, LOGMODE_TEXT, LOGMODE_LONGTEXT,
- VLC_FALSE );
+ false );
change_string_list( mode_list, mode_list_text, 0 );
add_file( "rrd-file", NULL, NULL, N_("RRD output file") ,
- N_("Output data for RRDTool in this file." ), VLC_TRUE );
+ N_("Output data for RRDTool in this file." ), true );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
int vlclua_acl_create( lua_State *L )
{
vlc_object_t *p_this = vlclua_get_this( L );
- vlc_bool_t b_allow = luaL_checkboolean( L, 1 ) ? VLC_TRUE : VLC_FALSE;
+ bool b_allow = luaL_checkboolean( L, 1 ) ? true : false;
vlc_acl_t *p_acl = ACL_Create( p_this, b_allow );
if( !p_acl )
return luaL_error( L, "ACL creation failed." );
{
vlc_acl_t *p_acl = (vlc_acl_t*)luaL_checklightuserdata( L, 1 );
const char *psz_ip = luaL_checkstring( L, 2 );
- vlc_bool_t b_allow = luaL_checkboolean( L, 3 ) ? VLC_TRUE : VLC_FALSE;
+ bool b_allow = luaL_checkboolean( L, 3 ) ? true : false;
lua_pushinteger( L, ACL_AddHost( p_acl, psz_ip, b_allow ) );
return 1;
}
vlc_acl_t *p_acl = (vlc_acl_t*)luaL_checklightuserdata( L, 1 );
const char *psz_ip = luaL_checkstring( L, 2 );
int i_len = luaL_checkint( L, 3 );
- vlc_bool_t b_allow = luaL_checkboolean( L, 4 ) ? VLC_TRUE : VLC_FALSE;
+ bool b_allow = luaL_checkboolean( L, 4 ) ? true : false;
lua_pushinteger( L, ACL_AddNet( p_acl, psz_ip, i_len, b_allow ) );
return 1;
}
int vlclua_del_callback( lua_State *L )
{
vlclua_callback_t *p_callback;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
vlc_object_t *p_obj = vlclua_checkobject( L, 1, 0 );
const char *psz_var = luaL_checkstring( L, 2 );
lua_settop( L, 4 ); /* makes sure that optional data arg is set */
p_callback = (vlclua_callback_t*)luaL_checklightuserdata( L, -1 );
lua_pop( L, 2 );
/* obj var func data callbacks index */
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
else
lua_pop( L, 1 );
/* obj var func data callbacks index */
}
- if( b_found == VLC_FALSE )
+ if( b_found == false )
/* obj var func data callbacks */
return luaL_error( L, "Couldn't find matching callback." );
/* else */
static int __vlclua_var_toggle_or_set( lua_State *L, vlc_object_t *p_obj,
const char *psz_name )
{
- vlc_bool_t b_bool;
+ bool b_bool;
if( lua_gettop( L ) > 1 ) return vlclua_error( L );
if( lua_gettop( L ) == 0 )
b_bool = !var_GetBool( p_obj, psz_name );
else /* lua_gettop( L ) == 1 */
{
- b_bool = luaL_checkboolean( L, -1 )?VLC_TRUE:VLC_FALSE;
+ b_bool = luaL_checkboolean( L, -1 )?true:false;
lua_pop( L, 1 );
}
{
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
playlist_Stop( p_playlist ); /* Isn't this already implied by Clear? */
- playlist_Clear( p_playlist, VLC_FALSE );
+ playlist_Clear( p_playlist, false );
vlc_object_release( p_playlist );
return 0;
}
int i_id = luaL_checkint( L, 1 );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
int i_ret = playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
- VLC_TRUE, NULL,
+ true, NULL,
playlist_ItemGetById( p_playlist, i_id,
- VLC_TRUE ) );
+ true ) );
vlc_object_release( p_playlist );
return vlclua_push_ret( L, i_ret );
}
vlc_object_t *p_this = vlclua_get_this( L );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
i_count = vlclua_playlist_add_internal( p_this, L, p_playlist,
- NULL, VLC_TRUE );
+ NULL, true );
vlc_object_release( p_playlist );
lua_pushinteger( L, i_count );
return 1;
vlc_object_t *p_this = vlclua_get_this( L );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
i_count = vlclua_playlist_add_internal( p_this, L, p_playlist,
- NULL, VLC_FALSE );
+ NULL, false );
vlc_object_release( p_playlist );
lua_pushinteger( L, i_count );
return 1;
if( lua_isnumber( L, 1 ) )
{
int i_id = lua_tointeger( L, 1 );
- p_item = playlist_ItemGetById( p_playlist, i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, i_id, true );
if( !p_item )
{
vlc_object_release( p_playlist );
/* { "http", "http" }, */
{ NULL, NULL } };
-static vlc_bool_t WordInList( const char *psz_list, const char *psz_word )
+static bool WordInList( const char *psz_list, const char *psz_word )
{
const char *psz_str = strstr( psz_list, psz_word );
int i_len = strlen( psz_word );
/* it doesn't start in middle of a word */
/* it doest end in middle of a word */
&& ( psz_str[i_len] == '\0' || psz_str[i_len] == ',' ) )
- return VLC_TRUE;
+ return true;
psz_str = strstr( psz_str, psz_word );
}
- return VLC_FALSE;
+ return false;
}
static const char *GetModuleName( intf_thread_t *p_intf )
const char *psz_name = GetModuleName( p_intf );
const char *psz_config;
- vlc_bool_t b_config_set = VLC_FALSE;
+ bool b_config_set = false;
if( !psz_name ) psz_name = "dummy";
p_intf->p_sys = (intf_sys_t*)malloc( sizeof(intf_sys_t*) );
if( lua_istable( L, -1 ) )
{
lua_setglobal( L, "config" );
- b_config_set = VLC_TRUE;
+ b_config_set = true;
}
}
}
}
- if( b_config_set == VLC_FALSE )
+ if( b_config_set == false )
{
lua_newtable( L );
lua_setglobal( L, "config" );
p_intf->p_sys->psz_filename,
lua_tostring( L, lua_gettop( L ) ) );
lua_pop( L, 1 );
- p_intf->b_die = VLC_TRUE;
+ p_intf->b_die = true;
return;
}
- p_intf->b_die = VLC_TRUE;
+ p_intf->b_die = true;
}
set_description( _("Lua Interface Module") );
set_capability( "interface", 0 );
add_string( "lua-intf", "dummy", NULL,
- INTF_TEXT, INTF_LONGTEXT, VLC_FALSE );
+ INTF_TEXT, INTF_LONGTEXT, false );
add_string( "lua-config", "", NULL,
- CONFIG_TEXT, CONFIG_LONGTEXT, VLC_FALSE );
+ CONFIG_TEXT, CONFIG_LONGTEXT, false );
set_callbacks( E_(Open_LuaIntf), E_(Close_LuaIntf) );
vlc_module_end();
int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
playlist_t *p_playlist,
- input_item_t *p_parent, vlc_bool_t b_play )
+ input_item_t *p_parent, bool b_play )
{
int i_count = 0;
playlist_AddInput( p_playlist, p_input,
PLAYLIST_APPEND |
( b_play ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, false );
i_count ++; /* increment counter */
vlc_gc_decref( p_input );
while( i_options > 0 )
input_item_t *);
#define vlclua_read_custom_meta_data(a,b,c) __vlclua_read_custom_meta_data(VLC_OBJECT(a),b,c)
int __vlclua_playlist_add_internal( vlc_object_t *, lua_State *, playlist_t *,
- input_item_t *, vlc_bool_t );
+ input_item_t *, bool );
#define vlclua_playlist_add_internal(a,b,c,d,e) __vlclua_playlist_add_internal(VLC_OBJECT(a),b,c,d,e)
set_description( _("Growl UDP Notification Plugin") );
add_string( "growl-server", SERVER_DEFAULT, NULL,
- SERVER_TEXT, SERVER_LONGTEXT, VLC_FALSE );
+ SERVER_TEXT, SERVER_LONGTEXT, false );
add_password( "growl-password", PASS_DEFAULT, NULL,
- PASS_TEXT, PASS_LONGTEXT, VLC_FALSE );
+ PASS_TEXT, PASS_LONGTEXT, false );
add_integer( "growl-port", 9887, NULL,
- PORT_TEXT, PORT_LONGTEXT, VLC_TRUE );
+ PORT_TEXT, PORT_LONGTEXT, true );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
uint8_t *psz_encoded = malloc(100);
uint8_t i_defaults = 0;
static const char *psz_notifications[] = {"Now Playing", NULL};
- vlc_bool_t pb_defaults[] = {VLC_TRUE, VLC_FALSE};
+ bool pb_defaults[] = {true, false};
int i = 0, j;
if( psz_encoded == NULL )
- return VLC_FALSE;
+ return false;
memset( psz_encoded, 0, sizeof(psz_encoded) );
psz_encoded[i++] = GROWL_PROTOCOL_VERSION;
}
psz_encoded[4] = j;
for( j = 0 ; psz_notifications[j] != NULL ; j++)
- if(pb_defaults[j] == VLC_TRUE)
+ if(pb_defaults[j] == true)
{
psz_encoded[i++] = (uint8_t)j;
i_defaults++;
uint16_t flags;
int i = 0;
if( psz_encoded == NULL )
- return VLC_FALSE;
+ return false;
memset( psz_encoded, 0, sizeof(psz_encoded) );
psz_encoded[i++] = GROWL_PROTOCOL_VERSION;
set_description( _("MSN Now-Playing") );
add_string( "msn-format", FORMAT_DEFAULT, NULL,
- FORMAT_TEXT, FORMAT_LONGTEXT, VLC_FALSE );
+ FORMAT_TEXT, FORMAT_LONGTEXT, false );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
set_description( _("LibNotify Notification Plugin") );
add_integer( "notify-timeout", 4000,NULL,
- TIMEOUT_TEXT, TIMEOUT_LONGTEXT, VLC_TRUE );
+ TIMEOUT_TEXT, TIMEOUT_LONGTEXT, true );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
set_description( _("Telepathy \"Now Playing\" using MissionControl") );
add_string( "telepathy-format", FORMAT_DEFAULT, NULL,
- FORMAT_TEXT, FORMAT_LONGTEXT, VLC_FALSE );
+ FORMAT_TEXT, FORMAT_LONGTEXT, false );
set_capability( "interface", 0 );
set_callbacks( Open, Close );
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
- p_this->b_dead = VLC_TRUE;
+ p_this->b_dead = true;
intf_thread_t *p_intf = (intf_thread_t *)p_this;
playlist_t *p_playlist = pl_Yield( p_this );
struct intf_sys_t
{
xosd * p_osd; /* libxosd handle */
- vlc_bool_t b_need_update; /* Update display ? */
+ bool b_need_update; /* Update display ? */
};
#define MAX_LINE_LENGTH 256
set_subcategory( SUBCAT_INTERFACE_CONTROL );
set_description( _("XOSD interface") );
set_shortname( "XOSD" );
- add_bool( "xosd-position", 1, NULL, POSITION_TEXT, POSITION_LONGTEXT, VLC_TRUE );
- add_integer( "xosd-text-offset", 30, NULL, TXT_OFS_TEXT, TXT_OFS_LONGTEXT, VLC_TRUE );
+ add_bool( "xosd-position", 1, NULL, POSITION_TEXT, POSITION_LONGTEXT, true );
+ add_integer( "xosd-text-offset", 30, NULL, TXT_OFS_TEXT, TXT_OFS_LONGTEXT, true );
add_integer( "xosd-shadow-offset", 2, NULL,
- SHD_OFS_TEXT, SHD_OFS_LONGTEXT, VLC_TRUE );
+ SHD_OFS_TEXT, SHD_OFS_LONGTEXT, true );
add_string( "xosd-font",
"-adobe-helvetica-bold-r-normal-*-*-160-*-*-p-*-iso8859-1",
- NULL, FONT_TEXT, FONT_LONGTEXT, VLC_TRUE );
+ NULL, FONT_TEXT, FONT_LONGTEXT, true );
add_string( "xosd-colour", "LawnGreen",
- NULL, COLOUR_TEXT, COLOUR_LONGTEXT, VLC_TRUE );
+ NULL, COLOUR_TEXT, COLOUR_LONGTEXT, true );
set_capability( "interface", 10 );
set_callbacks( Open, Close );
vlc_module_end();
p_intf->pf_run = Run;
- p_intf->p_sys->b_need_update = VLC_TRUE;
+ p_intf->p_sys->b_need_update = true;
return VLC_SUCCESS;
}
while( !p_intf->b_die )
{
- if( p_intf->p_sys->b_need_update == VLC_TRUE )
+ if( p_intf->p_sys->b_need_update == true )
{
- p_intf->p_sys->b_need_update = VLC_FALSE;
+ p_intf->p_sys->b_need_update = false;
p_playlist = pl_Yield( p_intf );
if( playlist_IsEmpty( p_playlist ) )
{
intf_thread_t *p_intf = (intf_thread_t *)param;
- p_intf->p_sys->b_need_update = VLC_TRUE;
+ p_intf->p_sys->b_need_update = true;
return VLC_SUCCESS;
}
osd_state_t *p_range_prev = NULL; /* previous state processed range */
int i_index = 0;
- p_up->b_range = VLC_TRUE;
+ p_up->b_range = true;
result = fscanf( fd, "\t%24s", &action[0] );
if( result == 0 )
osd_state_t *p_range_prev = NULL; /* previous state processed range */
int i_index = 0;
- p_current->b_range = VLC_TRUE;
+ p_current->b_range = true;
result = fscanf( fd, "\t%24s", &action[0] );
if( result == 0 )
{
char *psz_ret = NULL; /**< the new result buffer to return */
char *psz_s = NULL, *psz_d = NULL; /**< src & dest pointers for URI conversion */
- vlc_bool_t b_uri_is_file = VLC_FALSE; /**< we do additional %-encoding if the URI is a file:// one */
+ bool b_uri_is_file = false; /**< we do additional %-encoding if the URI is a file:// one */
if( !psz_name || !*psz_name )
return NULL;
psz_d = psz_ret + i_delim;
if( !strncmp( psz_s, "file://", 7 ) )
- b_uri_is_file = VLC_TRUE;
+ b_uri_is_file = true;
psz_s += i_delim;
}
{
strcpy( psz_ret, "file://" );
psz_d = psz_ret + 7;
- b_uri_is_file = VLC_TRUE;
+ b_uri_is_file = true;
}
while( *psz_s )
probe_sys_t *p_sys = p_probe->p_sys;
int i, i_devices, j;
char **devices;
- vlc_bool_t b_exists;
+ bool b_exists;
for ( j = 0 ; j < p_sys->i_devices; j++ )
- p_sys->pp_devices[j]->b_seen = VLC_FALSE;
+ p_sys->pp_devices[j]->b_seen = false;
/* CD/DVD */
if( ( devices = libhal_find_device_by_capability( p_sys->p_ctx,
for( i = 0; i < i_devices; i++ )
{
device_t *p_dev = ParseDisc( p_probe, devices[ i ] );
- b_exists = VLC_FALSE;
+ b_exists = false;
for ( j = 0 ; j < p_sys->i_devices; j++ )
{
if( !strcmp( p_sys->pp_devices[j]->psz_uri,
p_dev->psz_uri ) )
{
- b_exists = VLC_TRUE;
- p_dev->b_seen = VLC_TRUE;
+ b_exists = true;
+ p_dev->b_seen = true;
UpdateMedia( p_probe, p_dev );
break;
}
probe_sys_t *p_sys = p_probe->p_sys;
char **matching_media;
int i_matching, i;
- vlc_bool_t b_changed = VLC_FALSE;;
+ bool b_changed = false;;
int i_old_type = p_dev->i_media_type;
p_dev->i_media_type = 0;
{
free( p_dev->psz_name );
p_dev->psz_name = NULL;
- b_changed = VLC_TRUE;
+ b_changed = true;
}
if( !p_dev->psz_name )
p_dev->psz_name = strdup( psz_media_name );
vlc_module_begin();
set_description( _("Qt Embedded GUI helper") );
set_capability( "gui-helper", 90 );
- add_bool( "qte-guiserver", 0, NULL, STANDALONE_TEXT, STANDALONE_LONGTEXT, VLC_FALSE );
+ add_bool( "qte-guiserver", 0, NULL, STANDALONE_TEXT, STANDALONE_LONGTEXT, false );
add_shortcut( "qte" );
set_callbacks( Open, Close );
vlc_module_end();
/* Launch the QApplication::exec() thread. It will not return until the
* application is properly initialized, which ensures us thread safety. */
if( vlc_thread_create( p_qte_main, "qte_main", QteMain,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_LOW, true ) )
{
vlc_object_release( p_qte_main );
i_refcount--;
{
int i_argc = 1;
- p_this->b_gui_server = VLC_FALSE;
+ p_this->b_gui_server = false;
if( config_GetInt( p_this, "qte-guiserver" ) )
{
msg_Dbg( p_this, "Running as Qt Embedded standalone GuiServer" );
- p_this->b_gui_server = VLC_TRUE;
+ p_this->b_gui_server = true;
}
/* Run as standalone GuiServer or as GuiClient. */
ATSUStyle *pp_styles );
static ATSUStyle CreateStyle( char *psz_fontname, int i_font_size,
uint32_t i_font_color,
- vlc_bool_t b_bold, vlc_bool_t b_italic,
- vlc_bool_t b_uline );
+ bool b_bold, bool b_italic,
+ bool b_uline );
//////////////////////////////////////////////////////////////////////////////
// Module descriptor
//////////////////////////////////////////////////////////////////////////////
ATSUStyle p_style = CreateStyle( p_sys->psz_font_name, i_font_size,
(i_font_color & 0xffffff) |
((i_font_alpha & 0xff) << 24),
- VLC_FALSE, VLC_FALSE, VLC_FALSE );
+ false, false, false );
if( p_style )
{
RenderYUVA( p_filter, p_region_out, psz_utf16_str, i_string_length,
static ATSUStyle CreateStyle( char *psz_fontname, int i_font_size, uint32_t i_font_color,
- vlc_bool_t b_bold, vlc_bool_t b_italic, vlc_bool_t b_uline )
+ bool b_bold, bool b_italic, bool b_uline )
{
ATSUStyle p_style;
OSStatus status;
}
static ATSUStyle GetStyleFromFontStack( filter_sys_t *p_sys,
- font_stack_t **p_fonts, vlc_bool_t b_bold, vlc_bool_t b_italic,
- vlc_bool_t b_uline )
+ font_stack_t **p_fonts, bool b_bold, bool b_italic,
+ bool b_uline )
{
ATSUStyle p_style = NULL;
char *psz_node = NULL;
- vlc_bool_t b_italic = VLC_FALSE;
- vlc_bool_t b_bold = VLC_FALSE;
- vlc_bool_t b_uline = VLC_FALSE;
+ bool b_italic = false;
+ bool b_bold = false;
+ bool b_uline = false;
if( VLC_SUCCESS == var_Get( p_filter, "scale", &val ))
i_scale = val.i_int;
((p_font_style->i_font_alpha & 0xff) << 24) );
if( p_font_style->i_style_flags & STYLE_BOLD )
- b_bold = VLC_TRUE;
+ b_bold = true;
if( p_font_style->i_style_flags & STYLE_ITALIC )
- b_italic = VLC_TRUE;
+ b_italic = true;
if( p_font_style->i_style_flags & STYLE_UNDERLINE )
- b_uline = VLC_TRUE;
+ b_uline = true;
}
else
{
if( !strcasecmp( "font", psz_node ) )
PopFont( &p_fonts );
else if( !strcasecmp( "b", psz_node ) )
- b_bold = VLC_FALSE;
+ b_bold = false;
else if( !strcasecmp( "i", psz_node ) )
- b_italic = VLC_FALSE;
+ b_italic = false;
else if( !strcasecmp( "u", psz_node ) )
- b_uline = VLC_FALSE;
+ b_uline = false;
free( psz_node );
}
if( !strcasecmp( "font", psz_node ) )
rv = HandleFontAttributes( p_xml_reader, &p_fonts, i_scale );
else if( !strcasecmp( "b", psz_node ) )
- b_bold = VLC_TRUE;
+ b_bold = true;
else if( !strcasecmp( "i", psz_node ) )
- b_italic = VLC_TRUE;
+ b_italic = true;
else if( !strcasecmp( "u", psz_node ) )
- b_uline = VLC_TRUE;
+ b_uline = true;
else if( !strcasecmp( "br", psz_node ) )
{
uint32_t i_string_length;
p_sub = stream_MemoryNew( VLC_OBJECT(p_filter),
(uint8_t *) p_region_in->psz_html,
strlen( p_region_in->psz_html ),
- VLC_TRUE );
+ true );
if( p_sub )
{
p_xml = xml_Create( p_filter );
if( p_xml )
{
- vlc_bool_t b_karaoke = VLC_FALSE;
+ bool b_karaoke = false;
p_xml_reader = xml_ReaderCreate( p_xml, p_sub );
if( p_xml_reader )
/* We're going to have to render the text a number
* of times to show the progress marker on the text.
*/
- var_SetBool( p_filter, "text-rerender", VLC_TRUE );
- b_karaoke = VLC_TRUE;
+ var_SetBool( p_filter, "text-rerender", true );
+ b_karaoke = true;
}
else if( !strcasecmp( "text", psz_node ) )
{
- b_karaoke = VLC_FALSE;
+ b_karaoke = false;
}
else
{
set_capability( "vod server", 1 );
set_callbacks( Open, Close );
add_shortcut( "rtsp" );
- add_string ( "rtsp-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE );
+ add_string ( "rtsp-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT, true );
add_string( "rtsp-raw-mux", "ts", NULL, RAWMUX_TEXT,
- RAWMUX_TEXT, VLC_TRUE );
+ RAWMUX_TEXT, true );
add_integer( "rtsp-throttle-users", 0, NULL, THROTLE_TEXT,
- THROTLE_LONGTEXT, VLC_TRUE );
+ THROTLE_LONGTEXT, true );
add_integer( "rtsp-session-timeout", 5, NULL, SESSION_TIMEOUT_TEXT,
- SESSION_TIMEOUT_LONGTEXT, VLC_TRUE );
+ SESSION_TIMEOUT_LONGTEXT, true );
vlc_module_end();
/*****************************************************************************
char *psz_session;
int64_t i_last; /* for timeout */
- vlc_bool_t b_playing; /* is it in "play" state */
- vlc_bool_t b_paused; /* is it in "pause" state */
+ bool b_playing; /* is it in "play" state */
+ bool b_paused; /* is it in "pause" state */
int i_es;
rtsp_client_es_t **es;
int64_t i_sdp_id;
int i_sdp_version;
- vlc_bool_t b_multicast;
+ bool b_multicast;
vlc_mutex_t lock;
int i_es;
media_es_t **es;
char *psz_mux;
- vlc_bool_t b_raw;
+ bool b_raw;
/* RTSP client */
int i_rtsp;
p_sys->p_fifo_cmd = block_FifoNew( p_vod );
if( vlc_thread_create( p_vod, "rtsp vod thread", CommandThread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Err( p_vod, "cannot spawn rtsp vod thread" );
block_FifoRelease( p_sys->p_fifo_cmd );
TAB_INIT( p_media->i_es, p_media->es );
p_media->psz_mux = 0;
TAB_INIT( p_media->i_rtsp, p_media->rtsp );
- p_media->b_raw = VLC_FALSE;
+ p_media->b_raw = false;
if( asprintf( &p_media->psz_rtsp_path, "%s%s",
p_sys->psz_path, psz_name ) <0 )
free( p_media->psz_mux );
p_media->psz_mux = NULL;
p_media->psz_mux = strdup( p_vod->p_sys->psz_raw_mux );
- p_media->b_raw = VLC_TRUE;
+ p_media->b_raw = true;
}
if( httpd_ClientIP( cl, ip ) == NULL )
psz_session, f_scale, NULL );
}
- if( p_rtsp->b_paused == VLC_TRUE )
+ if( p_rtsp->b_paused == true )
{
- p_rtsp->b_paused = VLC_FALSE;
+ p_rtsp->b_paused = false;
CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media,
psz_session, 0, NULL );
}
{
CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media,
psz_session, 0, NULL );
- p_rtsp->b_paused = VLC_FALSE;
+ p_rtsp->b_paused = false;
break;
}
else if( p_rtsp->b_playing ) break;
if( httpd_ClientIP( cl, ip ) == NULL ) break;
- p_rtsp->b_playing = VLC_TRUE;
+ p_rtsp->b_playing = true;
/* FIXME for != 1 video and 1 audio */
for( i = 0; i < p_rtsp->i_es; i++ )
CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, psz_session,
0, NULL );
- p_rtsp->b_paused = VLC_TRUE;
+ p_rtsp->b_paused = true;
answer->i_status = 200;
answer->i_body = 0;
CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, psz_session,
0, NULL );
- p_rtsp->b_paused = VLC_TRUE;
+ p_rtsp->b_paused = true;
answer->i_status = 200;
answer->i_body = 0;
static void screensaver_send_message_void ( intf_thread_t *p_intf,
DBusConnection *p_connection,
const char *psz_name );
-static vlc_bool_t screensaver_is_running( DBusConnection *p_connection );
+static bool screensaver_is_running( DBusConnection *p_connection );
struct intf_sys_t
dbus_message_unref( p_message );
}
-static vlc_bool_t screensaver_is_running( DBusConnection *p_connection )
+static bool screensaver_is_running( DBusConnection *p_connection )
{
DBusError error;
- vlc_bool_t b_return;
+ bool b_return;
- if( !p_connection ) return VLC_FALSE;
+ if( !p_connection ) return false;
dbus_error_init( &error );
b_return = dbus_bus_name_has_owner( p_connection, GS_SERVICE, &error );
set_category( SUBCAT_INPUT_SCODEC );
set_capability( "text renderer", 99 );
add_shortcut( "svg" );
- add_string( "svg-template-file", "", NULL, TEMPLATE_TEXT, TEMPLATE_LONGTEXT, VLC_TRUE );
+ add_string( "svg-template-file", "", NULL, TEMPLATE_TEXT, TEMPLATE_LONGTEXT, true );
set_callbacks( Create, Destroy );
vlc_module_end();
{
pp_objects[i] = vlc_object_create( p_this, VLC_OBJECT_GENERIC );
vlc_object_attach( pp_objects[i], p_this );
- vlc_thread_create( pp_objects[i], "foo", MyThread, 0, VLC_TRUE );
+ vlc_thread_create( pp_objects[i], "foo", MyThread, 0, true );
}
msleep( 3000000 );
for( i = 0; i < MAXTH * i_level; i++ )
{
pp_objects[i] = vlc_object_create( p_this, VLC_OBJECT_GENERIC );
- vlc_thread_create( pp_objects[i], "foo", Dummy, 0, VLC_TRUE );
+ vlc_thread_create( pp_objects[i], "foo", Dummy, 0, true );
}
printf( " - killing the threads (LIFO)\n" );
for( i = MAXTH * i_level; i--; )
{
- pp_objects[i]->b_die = VLC_TRUE;
+ pp_objects[i]->b_die = true;
vlc_thread_join( pp_objects[i] );
vlc_object_release( pp_objects[i] );
}
set_subcategory( SUBCAT_VIDEO_SUBPIC );
add_integer( "win32text-fontsize", 0, NULL, FONTSIZE_TEXT,
- FONTSIZE_LONGTEXT, VLC_TRUE );
+ FONTSIZE_LONGTEXT, true );
/* opacity valid on 0..255, with default 255 = fully opaque */
add_integer_with_range( "win32-opacity", 255, 0, 255, NULL,
- OPACITY_TEXT, OPACITY_LONGTEXT, VLC_FALSE );
+ OPACITY_TEXT, OPACITY_LONGTEXT, false );
/* hook to the color values list, with default 0x00ffffff = white */
add_integer( "win32text-color", 0x00FFFFFF, NULL, COLOR_TEXT,
- COLOR_LONGTEXT, VLC_TRUE );
+ COLOR_LONGTEXT, true );
change_integer_list( pi_color_values, ppsz_color_descriptions, 0 );
add_integer( "win32text-rel-fontsize", 16, NULL, FONTSIZER_TEXT,
- FONTSIZER_LONGTEXT, VLC_FALSE );
+ FONTSIZER_LONGTEXT, false );
change_integer_list( pi_sizes, ppsz_sizes_text, 0 );
set_capability( "text renderer", 50 );
video_format_t fmt;
int i, i_pitch;
subpicture_region_t *p_region_tmp;
- vlc_bool_t b_outline = VLC_TRUE;
+ bool b_outline = true;
/* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) );
static char *ReaderValue( xml_reader_t * );
static int ReaderNextAttr( xml_reader_t * );
-static int ReaderUseDTD ( xml_reader_t *, vlc_bool_t );
+static int ReaderUseDTD ( xml_reader_t *, bool );
static void CatalogLoad( xml_t *, const char * );
static void CatalogAdd( xml_t *, const char *, const char *, const char * );
free( p_reader );
}
-static int ReaderUseDTD ( xml_reader_t *p_reader, vlc_bool_t b_use )
+static int ReaderUseDTD ( xml_reader_t *p_reader, bool b_use )
{
/* Activate DTD validation */
xmlTextReaderSetParserProp( p_reader->p_sys->p_reader,
XTag *p_root; /* Root tag */
XTag *p_curtag; /* Current tag */
XList *p_curattr; /* Current attribute */
- vlc_bool_t b_endtag;
+ bool b_endtag;
};
static xml_reader_t *ReaderCreate( xml_t *, stream_t * );
static char *ReaderValue( xml_reader_t * );
static int ReaderNextAttr( xml_reader_t * );
-static int ReaderUseDTD ( xml_reader_t *, vlc_bool_t );
+static int ReaderUseDTD ( xml_reader_t *, bool );
static void CatalogLoad( xml_t *, const char * );
static void CatalogAdd( xml_t *, const char *, const char *, const char * );
p_reader->p_sys->p_root = p_root;
p_reader->p_sys->p_curtag = NULL;
p_reader->p_sys->p_curattr = NULL;
- p_reader->p_sys->b_endtag = VLC_FALSE;
+ p_reader->p_sys->b_endtag = false;
p_reader->p_xml = p_xml;
p_reader->pf_read = ReaderRead;
free( p_reader );
}
-static int ReaderUseDTD ( xml_reader_t *p_reader, vlc_bool_t b_use )
+static int ReaderUseDTD ( xml_reader_t *p_reader, bool b_use )
{
VLC_UNUSED(p_reader); VLC_UNUSED(b_use);
return VLC_EGENERIC;
{
p_reader->p_sys->p_curtag = p_child;
p_reader->p_sys->p_curattr = 0;
- p_reader->p_sys->b_endtag = VLC_FALSE;
+ p_reader->p_sys->b_endtag = false;
return 1;
}
if( p_reader->p_sys->p_curtag->name && /* no end tag for pcdata */
!p_reader->p_sys->b_endtag )
{
- p_reader->p_sys->b_endtag = VLC_TRUE;
+ p_reader->p_sys->b_endtag = true;
return 1;
}
- p_reader->p_sys->b_endtag = VLC_FALSE;
+ p_reader->p_sys->b_endtag = false;
if( !p_reader->p_sys->p_curtag->parent ) return 0;
p_reader->p_sys->p_curtag = p_reader->p_sys->p_curtag->parent;
}
static int xtag_cin( char c, int char_class )
{
- if( char_class & X_WHITESPACE ) if( isspace(c) ) return VLC_TRUE;
- if( char_class & X_OPENTAG ) if( c == '<' ) return VLC_TRUE;
- if( char_class & X_CLOSETAG ) if( c == '>' ) return VLC_TRUE;
- if( char_class & X_DQUOTE ) if( c == '"' ) return VLC_TRUE;
- if( char_class & X_SQUOTE ) if( c == '\'' ) return VLC_TRUE;
- if( char_class & X_EQUAL ) if( c == '=' ) return VLC_TRUE;
- if( char_class & X_SLASH ) if( c == '/' ) return VLC_TRUE;
- if( char_class & X_QMARK ) if( c == '?' ) return VLC_TRUE;
- if( char_class & X_DASH ) if( c == '-' ) return VLC_TRUE;
- if( char_class & X_EMARK ) if( c == '!' ) return VLC_TRUE;
-
- return VLC_FALSE;
+ if( char_class & X_WHITESPACE ) if( isspace(c) ) return true;
+ if( char_class & X_OPENTAG ) if( c == '<' ) return true;
+ if( char_class & X_CLOSETAG ) if( c == '>' ) return true;
+ if( char_class & X_DQUOTE ) if( c == '"' ) return true;
+ if( char_class & X_SQUOTE ) if( c == '\'' ) return true;
+ if( char_class & X_EQUAL ) if( c == '=' ) return true;
+ if( char_class & X_SLASH ) if( c == '/' ) return true;
+ if( char_class & X_QMARK ) if( c == '?' ) return true;
+ if( char_class & X_DASH ) if( c == '-' ) return true;
+ if( char_class & X_EMARK ) if( c == '!' ) return true;
+
+ return false;
}
static int xtag_index( XTagParser *parser, int char_class )
{
char *s = parser->start;
- if( !parser->valid ) return VLC_FALSE;
+ if( !parser->valid ) return false;
if( !xtag_cin( s[0], char_class ) )
{
- parser->valid = VLC_FALSE;
- return VLC_FALSE;
+ parser->valid = false;
+ return false;
}
parser->start = &s[1];
- return VLC_TRUE;
+ return true;
}
static char *xtag_slurp_quoted( XTagParser *parser )
err_free_name:
free (name);
- parser->valid = VLC_FALSE;
+ parser->valid = false;
return NULL;
}
#ifdef XTAG_DEBUG
printf ("got %s expected %s\n", name, tag->name);
#endif
- parser->valid = VLC_FALSE;
+ parser->valid = false;
}
free( name );
}
XTagParser parser;
XTag *tag, *ttag, *wrapper;
- parser.valid = VLC_TRUE;
+ parser.valid = true;
parser.current_tag = NULL;
parser.start = (char *)s;
set_callbacks( Open, Close );
add_string( SOUT_CFG_PREFIX "title", "", NULL, TITLE_TEXT, TITLE_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( SOUT_CFG_PREFIX "author", "", NULL, AUTHOR_TEXT,
- AUTHOR_LONGTEXT, VLC_TRUE );
+ AUTHOR_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "copyright","", NULL, COPYRIGHT_TEXT,
- COPYRIGHT_LONGTEXT, VLC_TRUE );
+ COPYRIGHT_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "comment", "", NULL, COMMENT_TEXT,
- COMMENT_LONGTEXT, VLC_TRUE );
+ COMMENT_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "rating", "", NULL, RATING_TEXT,
- RATING_LONGTEXT, VLC_TRUE );
- add_integer( "sout-asf-packet-size", 4096, NULL, PACKETSIZE_TEXT, PACKETSIZE_LONGTEXT, VLC_TRUE );
+ RATING_LONGTEXT, true );
+ add_integer( "sout-asf-packet-size", 4096, NULL, PACKETSIZE_TEXT, PACKETSIZE_LONGTEXT, true );
vlc_module_end();
vlc_fourcc_t i_fourcc; /* for video */
const char *psz_name; /* codec name */
int i_blockalign; /* for audio only */
- vlc_bool_t b_audio_correction;
+ bool b_audio_correction;
int i_sequence;
int i_track;
asf_track_t track[MAX_ASF_TRACKS];
- vlc_bool_t b_write_header;
+ bool b_write_header;
block_t *pk;
int i_pk_used;
int i_pk_frame;
mtime_t i_pk_dts;
- vlc_bool_t b_asf_http;
+ bool b_asf_http;
int i_seq;
/* meta data */
static int MuxGetStream( sout_mux_t *, int *pi_stream, mtime_t *pi_dts );
-static block_t *asf_header_create( sout_mux_t *, vlc_bool_t );
+static block_t *asf_header_create( sout_mux_t *, bool );
static block_t *asf_packet_create( sout_mux_t *, asf_track_t *, block_t * );
static block_t *asf_stream_end_create( sout_mux_t *);
static block_t *asf_packet_flush( sout_mux_t * );
p_sys->i_bitrate = 0;
p_sys->i_seq = 0;
- p_sys->b_write_header = VLC_TRUE;
+ p_sys->b_write_header = true;
p_sys->i_track = 0;
p_sys->i_packet_size = config_GetInt( p_mux, "sout-asf-packet-size" );
msg_Dbg( p_mux, "Packet size %d", p_sys->i_packet_size);
/* rewrite header */
if( sout_AccessOutSeek( p_mux->p_access, 0 ) == VLC_SUCCESS )
{
- out = asf_header_create( p_mux, VLC_FALSE );
+ out = asf_header_create( p_mux, false );
sout_AccessOutWrite( p_mux->p_access, out );
}
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- if( p_sys->b_asf_http ) *pb_bool = VLC_TRUE;
- else *pb_bool = VLC_FALSE;
+ pb_bool = (bool*)va_arg( args, bool * );
+ if( p_sys->b_asf_http ) *pb_bool = true;
+ else *pb_bool = false;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
case VLC_FOURCC( 'w', 'm', 'a', '1' ):
tk->psz_name = "Windows Media Audio v1";
tk->i_tag = WAVE_FORMAT_WMA1;
- tk->b_audio_correction = VLC_TRUE;
+ tk->b_audio_correction = true;
break;
case VLC_FOURCC( 'w', 'm', 'a', ' ' ):
case VLC_FOURCC( 'w', 'm', 'a', '2' ):
tk->psz_name= "Windows Media Audio (v2) 7, 8 and 9 Series";
tk->i_tag = WAVE_FORMAT_WMA2;
- tk->b_audio_correction = VLC_TRUE;
+ tk->b_audio_correction = true;
break;
case VLC_FOURCC( 'w', 'm', 'a', 'p' ):
tk->psz_name = "Windows Media Audio 9 Professional";
tk->i_tag = WAVE_FORMAT_WMAP;
- tk->b_audio_correction = VLC_TRUE;
+ tk->b_audio_correction = true;
break;
case VLC_FOURCC( 'w', 'm', 'a', 'l' ):
tk->psz_name = "Windows Media Audio 9 Lossless";
tk->i_tag = WAVE_FORMAT_WMAL;
- tk->b_audio_correction = VLC_TRUE;
+ tk->b_audio_correction = true;
break;
/* raw codec */
case VLC_FOURCC( 'u', '8', ' ', ' ' ):
if( p_sys->b_write_header )
{
- block_t *out = asf_header_create( p_mux, VLC_TRUE );
+ block_t *out = asf_header_create( p_mux, true );
out->i_flags |= BLOCK_FLAG_HEADER;
sout_AccessOutWrite( p_mux->p_access, out );
- p_sys->b_write_header = VLC_FALSE;
+ p_sys->b_write_header = false;
}
for( ;; )
bo_addle_u16( bo, i_len + 8 );
}
-static block_t *asf_header_create( sout_mux_t *p_mux, vlc_bool_t b_broadcast )
+static block_t *asf_header_create( sout_mux_t *p_mux, bool b_broadcast )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
asf_track_t *tk;
struct sout_mux_sys_t
{
- vlc_bool_t b_write_header;
+ bool b_write_header;
int i_streams;
int i_stream_video;
p_sys->idx1.i_entry_max = 10000;
p_sys->idx1.entry = calloc( p_sys->idx1.i_entry_max,
sizeof( avi_idx1_entry_t ) );
- p_sys->b_write_header = VLC_TRUE;
+ p_sys->b_write_header = true;
p_mux->pf_control = Control;
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
p_hdr = avi_HeaderCreateRIFF( p_mux );
sout_AccessOutWrite( p_mux->p_access, p_hdr );
- p_sys->b_write_header = VLC_FALSE;
+ p_sys->b_write_header = false;
}
for( i = 0; i < p_mux->i_nb_inputs; i++ )
{
/* Some streams have special initialization data, we'll output this
* data as an header in the stream. */
- vlc_bool_t b_header;
+ bool b_header;
};
/*****************************************************************************
p_mux->pf_mux = Mux;
p_mux->p_sys = p_sys = malloc( sizeof( sout_mux_sys_t ) );
- p_sys->b_header = VLC_TRUE;
+ p_sys->b_header = true;
return VLC_SUCCESS;
}
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME: /* Unknown */
i_count--;
}
}
- p_sys->b_header = VLC_FALSE;
+ p_sys->b_header = false;
return VLC_SUCCESS;
}
add_bool( SOUT_CFG_PREFIX "faststart", 1, NULL,
FASTSTART_TEXT, FASTSTART_LONGTEXT,
- VLC_TRUE );
+ true );
set_capability( "sout mux", 5 );
add_shortcut( "mp4" );
add_shortcut( "mov" );
/* for later stco fix-up (fast start files) */
uint64_t i_stco_pos;
- vlc_bool_t b_stco64;
+ bool b_stco64;
/* for spu */
int64_t i_last_dts;
struct sout_mux_sys_t
{
- vlc_bool_t b_mov;
- vlc_bool_t b_3gp;
- vlc_bool_t b_64_ext;
- vlc_bool_t b_fast_start;
+ bool b_mov;
+ bool b_3gp;
+ bool b_64_ext;
+ bool b_fast_start;
uint64_t i_mdat_pos;
uint64_t i_pos;
typedef struct bo_t
{
- vlc_bool_t b_grow;
+ bool b_grow;
int i_buffer_size;
int i_buffer;
} bo_t;
-static void bo_init ( bo_t *, int , uint8_t *, vlc_bool_t );
+static void bo_init ( bo_t *, int , uint8_t *, bool );
static void bo_add_8 ( bo_t *, uint8_t );
static void bo_add_16be ( bo_t *, uint16_t );
static void bo_add_24be ( bo_t *, uint32_t );
/* FIXME FIXME
* Quicktime actually doesn't like the 64 bits extensions !!! */
- p_sys->b_64_ext = VLC_FALSE;
+ p_sys->b_64_ext = false;
/* Now add mdat header */
box = box_new( "mdat" );
msg_Dbg( p_mux, "Close" );
/* Update mdat size */
- bo_init( &bo, 0, NULL, VLC_TRUE );
+ bo_init( &bo, 0, NULL, true );
if( p_sys->i_pos - p_sys->i_mdat_pos >= (((uint64_t)1)<<32) )
{
/* Extended size */
{
msg_Warn( p_this, "read() not supported by access output, "
"won't create a fast start file" );
- p_sys->b_fast_start = VLC_FALSE;
+ p_sys->b_fast_start = false;
block_Release( p_buf );
break;
}
moov->i_buffer = i_moov_size;
i_moov_pos = p_sys->i_mdat_pos;
- p_sys->b_fast_start = VLC_FALSE;
+ p_sys->b_fast_start = false;
}
/* Write MOOV header */
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME: /* Not needed, as not streamable */
static bo_t *GetSounBox( sout_mux_t *p_mux, mp4_stream_t *p_stream )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
- vlc_bool_t b_descr = VLC_FALSE;
+ bool b_descr = false;
bo_t *soun;
char fcc[4] = " ";
int i;
{
case VLC_FOURCC('m','p','4','a'):
memcpy( fcc, "mp4a", 4 );
- b_descr = VLC_TRUE;
+ b_descr = true;
break;
case VLC_FOURCC('s','a','m','r'):
case VLC_FOURCC('s','a','w','b'):
memcpy( fcc, (char*)&p_stream->fmt.i_codec, 4 );
- b_descr = VLC_TRUE;
+ b_descr = true;
break;
case VLC_FOURCC('m','p','g','a'):
else
{
memcpy( fcc, "mp4a", 4 );
- b_descr = VLC_TRUE;
+ b_descr = true;
}
break;
if( p_sys->i_pos >= (((uint64_t)0x1) << 32) )
{
/* 64 bits version */
- p_stream->b_stco64 = VLC_TRUE;
+ p_stream->b_stco64 = true;
stco = box_full_new( "co64", 0, 0 );
}
else
{
/* 32 bits version */
- p_stream->b_stco64 = VLC_FALSE;
+ p_stream->b_stco64 = false;
stco = box_full_new( "stco", 0, 0 );
}
bo_add_32be( stco, 0 ); // entry-count (fixed latter)
/****************************************************************************/
static void bo_init( bo_t *p_bo, int i_size, uint8_t *p_buffer,
- vlc_bool_t b_grow )
+ bool b_grow )
{
if( !p_buffer )
{
if( ( box = malloc( sizeof( bo_t ) ) ) )
{
- bo_init( box, 0, NULL, VLC_TRUE );
+ bo_init( box, 0, NULL, true );
bo_add_32be ( box, 0 );
bo_add_fourcc( box, fcc );
if( ( box = malloc( sizeof( bo_t ) ) ) )
{
- bo_init( box, 0, NULL, VLC_TRUE );
+ bo_init( box, 0, NULL, true );
bo_add_32be ( box, 0 );
bo_add_fourcc( box, fcc );
static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
int i_es_size, es_format_t *p_fmt,
int i_stream_id, int i_private_id,
- vlc_bool_t b_mpeg2, vlc_bool_t b_data_alignment,
+ bool b_mpeg2, bool b_data_alignment,
int i_header_size )
{
bits_buffer_t bits;
set_callbacks( Open, Close );
add_integer( SOUT_CFG_PREFIX "dts-delay", 200, NULL, DTS_TEXT,
- DTS_LONGTEXT, VLC_TRUE );
+ DTS_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "pes-max-size", PES_PAYLOAD_SIZE_MAX, NULL,
- PES_SIZE_TEXT, PES_SIZE_LONGTEXT, VLC_TRUE );
+ PES_SIZE_TEXT, PES_SIZE_LONGTEXT, true );
vlc_module_end();
/*****************************************************************************
static void MuxWriteSystemHeader( sout_mux_t *, block_t **, mtime_t );
static void MuxWritePSM ( sout_mux_t *, block_t **, mtime_t );
-static void StreamIdInit ( vlc_bool_t *id, int i_range );
-static int StreamIdGet ( vlc_bool_t *id, int i_id_min, int i_id_max );
-static void StreamIdRelease ( vlc_bool_t *id, int i_id_min, int i_id );
+static void StreamIdInit ( bool *id, int i_range );
+static int StreamIdGet ( bool *id, int i_id_min, int i_id_max );
+static void StreamIdRelease ( bool *id, int i_id_min, int i_id );
typedef struct ps_stream_s
{
struct sout_mux_sys_t
{
/* Which id are unused */
- vlc_bool_t stream_id_mpga[16]; /* 0xc0 -> 0xcf */
- vlc_bool_t stream_id_mpgv[16]; /* 0xe0 -> 0xef */
- vlc_bool_t stream_id_a52[8]; /* 0x80 -> 0x87 <- FIXME I'm not sure */
- vlc_bool_t stream_id_spu[32]; /* 0x20 -> 0x3f */
- vlc_bool_t stream_id_dts[8]; /* 0x88 -> 0x8f */
- vlc_bool_t stream_id_lpcm[16]; /* 0xa0 -> 0xaf */
+ bool stream_id_mpga[16]; /* 0xc0 -> 0xcf */
+ bool stream_id_mpgv[16]; /* 0xe0 -> 0xef */
+ bool stream_id_a52[8]; /* 0x80 -> 0x87 <- FIXME I'm not sure */
+ bool stream_id_spu[32]; /* 0x20 -> 0x3f */
+ bool stream_id_dts[8]; /* 0x88 -> 0x8f */
+ bool stream_id_lpcm[16]; /* 0xa0 -> 0xaf */
int i_audio_bound;
int i_video_bound;
int64_t i_instant_size;
int64_t i_instant_dts;
- vlc_bool_t b_mpeg2;
+ bool b_mpeg2;
int i_pes_max_size;
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
/*****************************************************************************
*
*****************************************************************************/
-static void StreamIdInit( vlc_bool_t *id, int i_range )
+static void StreamIdInit( bool *id, int i_range )
{
int i;
for( i = 0; i < i_range; i++ )
{
- id[i] = VLC_TRUE;
+ id[i] = true;
}
}
-static int StreamIdGet( vlc_bool_t *id, int i_id_min, int i_id_max )
+static int StreamIdGet( bool *id, int i_id_min, int i_id_max )
{
int i;
{
if( id[i] )
{
- id[i] = VLC_FALSE;
+ id[i] = false;
return i_id_min + i;
}
}
return -1;
}
-static void StreamIdRelease( vlc_bool_t *id, int i_id_min, int i_id )
+static void StreamIdRelease( bool *id, int i_id_min, int i_id )
{
- id[i_id - i_id_min] = VLC_TRUE;
+ id[i_id - i_id_min] = true;
}
static void MuxWritePackHeader( sout_mux_t *p_mux, block_t **p_buf,
sout_mux_sys_t *p_sys = p_mux->p_sys;
block_t *p_hdr;
bits_buffer_t bits;
- vlc_bool_t b_private;
+ bool b_private;
int i_rate_bound;
int i_nb_private, i_nb_stream;
bits_write( &bits, 7, 0xff ); // reserved bits
/* stream_id table */
- for( i = 0, b_private = VLC_FALSE; i < p_mux->i_nb_inputs; i++ )
+ for( i = 0, b_private = false; i < p_mux->i_nb_inputs; i++ )
{
sout_input_t *p_input;
ps_stream_t *p_stream;
{
continue;
}
- b_private = VLC_TRUE;
+ b_private = true;
/* Write stream id */
bits_write( &bits, 8, 0xbd );
}
add_shortcut( "ts" );
add_integer( SOUT_CFG_PREFIX "pid-video", 0, NULL,VPID_TEXT, VPID_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( SOUT_CFG_PREFIX "pid-audio", 0, NULL, APID_TEXT,
- APID_LONGTEXT, VLC_TRUE );
+ APID_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "pid-spu", 0, NULL, SPUPID_TEXT,
- SPUPID_LONGTEXT, VLC_TRUE );
+ SPUPID_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "pid-pmt", 0, NULL, PMTPID_TEXT,
- PMTPID_LONGTEXT, VLC_TRUE );
+ PMTPID_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "tsid", 0, NULL, TSID_TEXT,
- TSID_LONGTEXT, VLC_TRUE );
+ TSID_LONGTEXT, true );
#ifdef HAVE_DVBPSI_SDT
add_integer( SOUT_CFG_PREFIX "netid", 0, NULL, NETID_TEXT,
- NETID_LONGTEXT, VLC_TRUE );
+ NETID_LONGTEXT, true );
#endif
add_string( SOUT_CFG_PREFIX "program-pmt", NULL, NULL, PMTPROG_TEXT,
- PMTPROG_LONGTEXT, VLC_TRUE );
+ PMTPROG_LONGTEXT, true );
add_bool( SOUT_CFG_PREFIX "es-id-pid", 0, NULL, PID_TEXT, PID_LONGTEXT,
- VLC_TRUE );
- add_string( SOUT_CFG_PREFIX "muxpmt", NULL, NULL, MUXPMT_TEXT, MUXPMT_LONGTEXT, VLC_TRUE );
+ true );
+ add_string( SOUT_CFG_PREFIX "muxpmt", NULL, NULL, MUXPMT_TEXT, MUXPMT_LONGTEXT, true );
#ifdef HAVE_DVBPSI_SDT
- add_string( SOUT_CFG_PREFIX "sdtdesc", NULL, NULL, SDTDESC_TEXT, SDTDESC_LONGTEXT, VLC_TRUE );
+ add_string( SOUT_CFG_PREFIX "sdtdesc", NULL, NULL, SDTDESC_TEXT, SDTDESC_LONGTEXT, true );
#endif
- add_bool( SOUT_CFG_PREFIX "alignment", VLC_TRUE, NULL, ALIGNMENT_TEXT,
- ALIGNMENT_LONGTEXT, VLC_TRUE );
+ add_bool( SOUT_CFG_PREFIX "alignment", true, NULL, ALIGNMENT_TEXT,
+ ALIGNMENT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "shaping", 200, NULL, SHAPING_TEXT,
- SHAPING_LONGTEXT, VLC_TRUE );
- add_bool( SOUT_CFG_PREFIX "use-key-frames", VLC_FALSE, NULL, KEYF_TEXT,
- KEYF_LONGTEXT, VLC_TRUE );
+ SHAPING_LONGTEXT, true );
+ add_bool( SOUT_CFG_PREFIX "use-key-frames", false, NULL, KEYF_TEXT,
+ KEYF_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "pcr", 70, NULL, PCR_TEXT, PCR_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( SOUT_CFG_PREFIX "bmin", 0, NULL, BMIN_TEXT, BMIN_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( SOUT_CFG_PREFIX "bmax", 0, NULL, BMAX_TEXT, BMAX_LONGTEXT,
- VLC_TRUE );
+ true );
add_integer( SOUT_CFG_PREFIX "dts-delay", 400, NULL, DTS_TEXT,
- DTS_LONGTEXT, VLC_TRUE );
+ DTS_LONGTEXT, true );
- add_bool( SOUT_CFG_PREFIX "crypt-audio", VLC_TRUE, NULL, ACRYPT_TEXT,
- ACRYPT_LONGTEXT, VLC_TRUE );
- add_bool( SOUT_CFG_PREFIX "crypt-video", VLC_TRUE, NULL, VCRYPT_TEXT,
- VCRYPT_LONGTEXT, VLC_TRUE );
+ add_bool( SOUT_CFG_PREFIX "crypt-audio", true, NULL, ACRYPT_TEXT,
+ ACRYPT_LONGTEXT, true );
+ add_bool( SOUT_CFG_PREFIX "crypt-video", true, NULL, VCRYPT_TEXT,
+ VCRYPT_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "csa-ck", NULL, NULL, CK_TEXT, CK_LONGTEXT,
- VLC_TRUE );
- add_integer( SOUT_CFG_PREFIX "csa-pkt", 188, NULL, CPKT_TEXT, CPKT_LONGTEXT, VLC_TRUE );
+ true );
+ add_integer( SOUT_CFG_PREFIX "csa-pkt", 188, NULL, CPKT_TEXT, CPKT_LONGTEXT, true );
set_callbacks( Open, Close );
vlc_module_end();
int i_stream_type;
int i_stream_id;
int i_continuity_counter;
- vlc_bool_t b_discontinuity;
+ bool b_discontinuity;
/* to be used for carriege of DIV3 */
vlc_fourcc_t i_bih_codec;
mtime_t i_pes_dts;
mtime_t i_pes_length;
int i_pes_used;
- vlc_bool_t b_key_frame;
+ bool b_key_frame;
} ts_stream_t;
int i_audio_bound;
int i_video_bound;
- vlc_bool_t b_es_id_pid;
- vlc_bool_t b_sdt;
+ bool b_es_id_pid;
+ bool b_sdt;
int i_pid_video;
int i_pid_audio;
int i_pid_spu;
pmt_map_t pmtmap[MAX_PMT_PID];
int i_pmt_program_number[MAX_PMT];
sdt_desc_t sdt_descriptors[MAX_PMT];
- vlc_bool_t b_data_alignment;
+ bool b_data_alignment;
int i_mpeg4_streams;
int64_t i_dts_delay;
- vlc_bool_t b_use_key_frames;
+ bool b_use_key_frames;
mtime_t i_pcr; /* last PCR emited */
csa_t *csa;
int i_csa_pkt_size;
- vlc_bool_t b_crypt_audio;
- vlc_bool_t b_crypt_video;
+ bool b_crypt_audio;
+ bool b_crypt_video;
};
/* Reserve a pid and return it */
static void GetPAT( sout_mux_t *p_mux, sout_buffer_chain_t *c );
static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c );
-static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream, vlc_bool_t b_pcr );
+static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream, bool b_pcr );
static void TSSetPCR( block_t *p_ts, mtime_t i_dts );
static void PEStoTS ( sout_instance_t *, sout_buffer_chain_t *, block_t *, ts_stream_t * );
p_sys->i_pat_version_number = rand() % 32;
p_sys->pat.i_pid = 0;
p_sys->pat.i_continuity_counter = 0;
- p_sys->pat.b_discontinuity = VLC_FALSE;
+ p_sys->pat.b_discontinuity = false;
var_Get( p_mux, SOUT_CFG_PREFIX "tsid", &val );
if ( val.i_int )
for( i = 0; i < p_sys->i_num_pmt; i++ )
{
p_sys->pmt[i].i_continuity_counter = 0;
- p_sys->pmt[i].b_discontinuity = VLC_FALSE;
+ p_sys->pmt[i].b_discontinuity = false;
}
p_sys->sdt.i_pid = 0x11;
p_sys->sdt.i_continuity_counter = 0;
- p_sys->sdt.b_discontinuity = VLC_FALSE;
+ p_sys->sdt.b_discontinuity = false;
#ifdef HAVE_DVBPSI_SDT
var_Get( p_mux, SOUT_CFG_PREFIX "sdtdesc", &val );
- p_sys->b_sdt = val.psz_string && *val.psz_string ? VLC_TRUE : VLC_FALSE;
+ p_sys->b_sdt = val.psz_string && *val.psz_string ? true : false;
/* Syntax is provider_sdt1,service_name_sdt1,provider_sdt2,service_name_sdt2... */
if( p_sys->b_sdt )
}
free( val.psz_string );
#else
- p_sys->b_sdt = VLC_FALSE;
+ p_sys->b_sdt = false;
#endif
var_Get( p_mux, SOUT_CFG_PREFIX "alignment", &val );
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
p_stream->i_pid = AllocatePID( p_sys, p_input->p_fmt->i_cat );
p_stream->i_codec = p_input->p_fmt->i_codec;
p_stream->i_continuity_counter = 0;
- p_stream->b_discontinuity = VLC_FALSE;
+ p_stream->b_discontinuity = false;
p_stream->i_decoder_specific_info = 0;
p_stream->p_decoder_specific_info = NULL;
/* 1: get enough PES packet for all input */
for( ;; )
{
- vlc_bool_t b_ok = VLC_TRUE;
+ bool b_ok = true;
block_t *p_data;
/* Accumulate enough data in the pcr stream (>i_shaping_delay) */
}
}
}
- b_ok = VLC_FALSE;
+ b_ok = false;
if( p_stream == p_pcr_stream || p_sys->b_data_alignment
|| p_input->p_fmt->i_codec !=
ts_stream_t *p_stream;
sout_input_t *p_input;
block_t *p_ts;
- vlc_bool_t b_pcr;
+ bool b_pcr;
/* Select stream (lowest dts) */
for( i = 0, i_stream = -1, i_dts = 0; i < p_mux->i_nb_inputs; i++ )
p_input = p_mux->pp_inputs[i_stream];
/* do we need to issue pcr */
- b_pcr = VLC_FALSE;
+ b_pcr = false;
if( p_stream == p_pcr_stream &&
i_pcr_dts + i_packet_pos * i_pcr_length / i_packet_count >=
p_sys->i_pcr + p_sys->i_pcr_delay )
{
- b_pcr = VLC_TRUE;
+ b_pcr = true;
p_sys->i_pcr = i_pcr_dts + i_packet_pos *
i_pcr_length / i_packet_count;
}
}
static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream,
- vlc_bool_t b_pcr )
+ bool b_pcr )
{
block_t *p_pes = p_stream->chain_pes.p_first;
block_t *p_ts;
- vlc_bool_t b_new_pes = VLC_FALSE;
- vlc_bool_t b_adaptation_field = VLC_FALSE;
+ bool b_new_pes = false;
+ bool b_adaptation_field = false;
int i_payload_max = 184 - ( b_pcr ? 8 : 0 );
int i_payload;
if( p_stream->i_pes_used <= 0 )
{
- b_new_pes = VLC_TRUE;
+ b_new_pes = true;
}
i_payload = __MIN( (int)p_pes->i_buffer - p_stream->i_pes_used,
i_payload_max );
if( b_pcr || i_payload < i_payload_max )
{
- b_adaptation_field = VLC_TRUE;
+ b_adaptation_field = true;
}
p_ts = block_New( p_mux, 188 );
if( p_stream->b_discontinuity )
{
p_ts->p_buffer[5] |= 0x80; /* flag TS dicontinuity */
- p_stream->b_discontinuity = VLC_FALSE;
+ p_stream->b_discontinuity = false;
}
p_ts->p_buffer[6] = ( 0 )&0xff;
p_ts->p_buffer[7] = ( 0 )&0xff;
i_size = p_pes->i_buffer;
p_data = p_pes->p_buffer;
- b_new_pes = VLC_TRUE;
+ b_new_pes = true;
for( ;; )
{
*/
i_copy = __MIN( i_size, 184 );
- b_adaptation_field = i_size < 184 ? VLC_TRUE : VLC_FALSE;
+ b_adaptation_field = i_size < 184 ? true : false;
p_ts->p_buffer[0] = 0x47;
p_ts->p_buffer[1] = ( b_new_pes ? 0x40 : 0x00 )|
p_ts->p_buffer[3] = ( b_adaptation_field ? 0x30 : 0x10 )|
p_stream->i_continuity_counter;
- b_new_pes = VLC_FALSE;
+ b_new_pes = false;
p_stream->i_continuity_counter = (p_stream->i_continuity_counter+1)%16;
if( b_adaptation_field )
if( p_stream->b_discontinuity )
{
p_ts->p_buffer[5] |= 0x80;
- p_stream->b_discontinuity = VLC_FALSE;
+ p_stream->b_discontinuity = false;
}
for( i = 6; i < 6 + i_stuffing - 2; i++ )
{
{
break;
}
- b_new_pes = VLC_TRUE;
+ b_new_pes = true;
p_pes = p_next;
i_size = p_pes->i_buffer;
p_data = p_pes->p_buffer;
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
return VLC_EGENERIC;
}
- p_stream->b_new = VLC_TRUE;
+ p_stream->b_new = true;
p_sys->i_add_streams++;
{
sout_input_t *p_input = p_mux->pp_inputs[i];
ogg_stream_t *p_stream = (ogg_stream_t*)p_input->p_sys;
- p_stream->b_new = VLC_FALSE;
+ p_stream->b_new = false;
msg_Dbg( p_mux, "creating header for %4.4s",
(char *)&p_stream->i_fourcc );
if( !p_client )
return VLC_ENOMEM;
p_client->i_index = p_rtcp->i_clients + 1;
- p_client->b_deleted = VLC_FALSE;
+ p_client->b_deleted = false;
*i_pos = p_client->i_index ;
INSERT_ELEM( p_rtcp->pp_clients, p_rtcp->i_clients,
p_client->i_index, p_client );
{
rtcp_client_t *p_old = p_rtcp->pp_clients[i_pos];
- p_old->b_deleted = VLC_TRUE;
+ p_old->b_deleted = true;
p_old->i_timeout = 5 * (p_rtcp->i_date - p_rtcp->i_last_date) +
p_rtcp->i_next_date;
p_rtcp->u_clients--;
*--------------------------------------------------------------------------
*/
uint64_t rtcp_interval( vlc_object_t *p_this, uint64_t u_bandwidth, uint32_t u_ssrc,
- vlc_bool_t b_sender, vlc_bool_t b_first )
+ bool b_sender, bool b_first )
{
rtcp_t *p_rtcp = (rtcp_t *) p_this;
rtcp_client_t *p_client = NULL;
*--------------------------------------------------------------------------
*/
void rtcp_expire( vlc_object_t *p_this, rtcp_event_t rtcp_event, uint64_t u_bandwidth,
- uint32_t u_ssrc, vlc_bool_t b_sender, vlc_bool_t *b_first )
+ uint32_t u_ssrc, bool b_sender, bool *b_first )
{
rtcp_t *p_rtcp = (rtcp_t *) p_this;
rtcp_client_t *p_client = NULL;
i_interval = rtcp_interval( p_this, u_bandwidth,
u_ssrc, b_sender, *b_first );
rtcp_schedule( p_this, p_rtcp->i_next_date + i_interval, rtcp_event );
- *b_first = VLC_FALSE;
+ *b_first = false;
}
else
{
bs_init( p_rtcp->bs, p_block->p_buffer, p_block->i_buffer );
p_pkt->u_version = bs_read( p_rtcp->bs, 2 );
- p_pkt->b_padding = bs_read( p_rtcp->bs, 1 ) ? VLC_TRUE : VLC_FALSE;
+ p_pkt->b_padding = bs_read( p_rtcp->bs, 1 ) ? true : false;
p_pkt->u_report = bs_read( p_rtcp->bs, 5 );
p_pkt->u_payload_type = bs_read( p_rtcp->bs, 8 );
p_pkt->u_length = bs_read( p_rtcp->bs, 16 );
typedef struct
{
uint32_t u_version; /*< RTCP version number */
- vlc_bool_t b_padding; /*< indicates if packets has padding */
+ bool b_padding; /*< indicates if packets has padding */
uint32_t u_report; /*< reception packet count */
uint32_t u_payload_type; /*< type of RTCP payload */
uint32_t u_length; /*< length of packet */
uint32_t i_index;
uint32_t u_ssrc; /*< channel name */
- vlc_bool_t b_deleted; /*< channel deleted ? */
+ bool b_deleted; /*< channel deleted ? */
mtime_t i_timeout; /*< remove timeout before real deletion,
* this is recommended by RFC 3550 at
* page 27 to ignore out-of-order packets.
* of the initial waiting time
*/
uint64_t rtcp_interval( vlc_object_t *p_this, uint64_t u_bandwidth, uint32_t u_ssrc,
- vlc_bool_t b_sender, vlc_bool_t b_first );
+ bool b_sender, bool b_first );
/**
* rtcp_expire
* \param rtcp_event type of event received
* \param b_sender are we the sender or the receiver
* \param *b_first the first time this function is called use only half
- * of the initial waiting time. If b_first is VLC_TRUE, then
- * it will return *b_first = VLC_FALSE;
+ * of the initial waiting time. If b_first is true, then
+ * it will return *b_first = false;
*/
void rtcp_expire( vlc_object_t *p_this, rtcp_event_t rtcp_event, uint64_t u_bandwidth,
- uint32_t u_ssrc, vlc_bool_t b_sender, vlc_bool_t *b_first );
+ uint32_t u_ssrc, bool b_sender, bool *b_first );
/**
* rtcp_received
unsigned int u_version; /*< rtp version number */
unsigned int u_CSRC_count; /*< CSRC count */
unsigned int u_payload_type; /*< type of RTP payload stream */
- vlc_bool_t b_extension; /*< The header is followed by exactly one header extension */
+ bool b_extension; /*< The header is followed by exactly one header extension */
unsigned int u_marker; /*< marker field expect 1 */
unsigned int u_seq_no; /*< sequence number of RTP stream */
uint32_t i_timestamp; /*< timestamp of stream */
struct sout_mux_sys_t
{
- vlc_bool_t b_used;
- vlc_bool_t b_header;
- vlc_bool_t b_ext;
+ bool b_used;
+ bool b_header;
+ bool b_ext;
uint32_t i_data;
uint32_t waveheader2[2];
uint32_t i_channel_mask;
- vlc_bool_t b_chan_reorder; /* do we need channel reordering */
+ bool b_chan_reorder; /* do we need channel reordering */
int pi_chan_table[AOUT_CHAN_MAX];
};
p_mux->pf_mux = Mux;
p_mux->p_sys = p_sys = malloc( sizeof( sout_mux_sys_t ) );
- p_sys->b_used = VLC_FALSE;
- p_sys->b_header = VLC_TRUE;
+ p_sys->b_used = false;
+ p_sys->b_header = true;
p_sys->i_data = 0;
p_sys->b_chan_reorder = 0;
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
VLC_UNUSED(p_mux);
- vlc_bool_t *pb_bool;
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- 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;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- 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;
return VLC_SUCCESS;
case MUX_GET_MIME:
sout_mux_sys_t *p_sys = p_mux->p_sys;
WAVEFORMATEX *p_waveformat = &p_sys->waveformat.Format;
int i_bytes_per_sample, i_format;
- vlc_bool_t b_ext;
+ bool b_ext;
if( p_input->p_fmt->i_cat != AUDIO_ES )
{
p_sys->waveformat.SubFormat.Data1 = i_format;
- p_sys->b_used = VLC_TRUE;
+ p_sys->b_used = true;
return VLC_SUCCESS;
}
msg_Dbg( p_mux, "writing header data" );
sout_AccessOutWrite( p_mux->p_access, GetHeader( p_mux ) );
}
- p_sys->b_header = VLC_FALSE;
+ p_sys->b_header = false;
p_input = p_mux->pp_inputs[0];
while( block_FifoCount( p_input->p_fifo ) > 0 )
size_t i_offset;
uint8_t startcode[4];
- vlc_bool_t b_slice;
+ bool b_slice;
block_t *p_frame;
- vlc_bool_t b_sps;
- vlc_bool_t b_pps;
- vlc_bool_t b_header;
+ bool b_sps;
+ bool b_pps;
+ bool b_header;
/* avcC data */
int i_avcC_length_size;
p_sys->startcode[2] = 0;
p_sys->startcode[3] = 1;
p_sys->bytestream = block_BytestreamInit();
- p_sys->b_slice = VLC_FALSE;
+ p_sys->b_slice = false;
p_sys->p_frame = NULL;
- p_sys->b_sps = VLC_FALSE;
- p_sys->b_pps = VLC_FALSE;
+ p_sys->b_sps = false;
+ p_sys->b_pps = false;
p_sys->p_sps = 0;
p_sys->p_pps = 0;
- p_sys->b_header= VLC_FALSE;
+ p_sys->b_header= false;
p_sys->slice.i_nal_type = -1;
p_sys->slice.i_nal_ref_idc = -1;
{
memcpy( (uint8_t*)p_dec->fmt_out.p_extra, p_sys->p_sps->p_buffer, p_sys->p_sps->i_buffer);
memcpy( (uint8_t*)p_dec->fmt_out.p_extra+p_sys->p_sps->i_buffer, p_sys->p_pps->p_buffer, p_sys->p_pps->i_buffer);
- p_sys->b_header = VLC_TRUE;
+ p_sys->b_header = true;
}
else p_dec->fmt_out.i_extra = 0;
block_ChainRelease( p_sys->p_frame );
p_sys->p_frame = NULL;
p_sys->slice.i_frame_type = 0;
- p_sys->b_slice = VLC_FALSE;
+ p_sys->b_slice = false;
}
block_Release( *pp_block );
return NULL;
p_sps->i_pts = p_sys->p_frame->i_pts; \
block_ChainAppend( &p_sps, p_pps ); \
block_ChainAppend( &p_sps, p_sys->p_frame ); \
- p_sys->b_header = VLC_TRUE; \
+ p_sys->b_header = true; \
p_pic = block_ChainGather( p_sps ); \
} else { \
p_pic = block_ChainGather( p_sys->p_frame ); \
\
p_sys->slice.i_frame_type = 0; \
p_sys->p_frame = NULL; \
- p_sys->b_slice = VLC_FALSE; \
+ p_sys->b_slice = false; \
} while(0)
if( p_sys->b_slice && ( !p_sys->b_sps || !p_sys->b_pps ) )
/* Reset context */
p_sys->slice.i_frame_type = 0;
p_sys->p_frame = NULL;
- p_sys->b_slice = VLC_FALSE;
+ p_sys->b_slice = false;
}
if( ( !p_sys->b_sps || !p_sys->b_pps ) &&
i_nal_type >= NAL_SLICE && i_nal_type <= NAL_SLICE_IDR )
{
- p_sys->b_slice = VLC_TRUE;
+ p_sys->b_slice = true;
/* Fragment will be discarded later on */
}
else if( i_nal_type >= NAL_SLICE && i_nal_type <= NAL_SLICE_IDR )
uint8_t *dec = NULL;
int i_dec = 0, i_first_mb, i_slice_type;
slice_t slice;
- vlc_bool_t b_pic;
+ bool b_pic;
bs_t s;
/* do not convert the whole frame */
/* Detection of the first VCL NAL unit of a primary coded picture
* (cf. 7.4.1.2.4) */
- b_pic = VLC_FALSE;
+ b_pic = false;
if( slice.i_frame_num != p_sys->slice.i_frame_num ||
slice.i_pic_parameter_set_id != p_sys->slice.i_pic_parameter_set_id ||
slice.i_field_pic_flag != p_sys->slice.i_field_pic_flag ||
slice.i_nal_ref_idc != p_sys->slice.i_nal_ref_idc )
- b_pic = VLC_TRUE;
+ b_pic = true;
if( (slice.i_bottom_field_flag != -1) &&
(p_sys->slice.i_bottom_field_flag != -1) &&
(slice.i_bottom_field_flag != p_sys->slice.i_bottom_field_flag) )
- b_pic = VLC_TRUE;
+ b_pic = true;
if( p_sys->i_pic_order_cnt_type == 0 &&
( slice.i_pic_order_cnt_lsb != p_sys->slice.i_pic_order_cnt_lsb ||
slice.i_delta_pic_order_cnt_bottom != p_sys->slice.i_delta_pic_order_cnt_bottom ) )
- b_pic = VLC_TRUE;
+ b_pic = true;
else if( p_sys->i_pic_order_cnt_type == 1 &&
( slice.i_delta_pic_order_cnt0 != p_sys->slice.i_delta_pic_order_cnt0 ||
slice.i_delta_pic_order_cnt1 != p_sys->slice.i_delta_pic_order_cnt1 ) )
- b_pic = VLC_TRUE;
+ b_pic = true;
if( ( slice.i_nal_type == NAL_SLICE_IDR || p_sys->slice.i_nal_type == NAL_SLICE_IDR ) &&
( slice.i_nal_type != p_sys->slice.i_nal_type || slice.i_idr_pic_id != p_sys->slice.i_idr_pic_id ) )
- b_pic = VLC_TRUE;
+ b_pic = true;
/* */
p_sys->slice = slice;
if( b_pic && p_sys->b_slice )
OUTPUT;
- p_sys->b_slice = VLC_TRUE;
+ p_sys->b_slice = true;
free( dec );
}
if( !p_sys->b_sps ) msg_Dbg( p_dec, "found NAL_SPS" );
- p_sys->b_sps = VLC_TRUE;
+ p_sys->b_sps = true;
nal_get_decoded( &dec, &i_dec, &p_frag->p_buffer[5],
p_frag->i_buffer - 5 );
p_sys->i_pic_order_present_flag = bs_read( &s, 1 );
if( !p_sys->b_pps ) msg_Dbg( p_dec, "found NAL_PPS" );
- p_sys->b_pps = VLC_TRUE;
+ p_sys->b_pps = true;
/* TODO */
int i_input_rate;
/* LOAS */
- vlc_bool_t b_latm_cfg;
+ bool b_latm_cfg;
latm_mux_t latm;
};
aout_DateSet( &p_sys->end_date, 0 );
p_sys->bytestream = block_BytestreamInit();
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
- p_sys->b_latm_cfg = VLC_FALSE;
+ p_sys->b_latm_cfg = false;
/* Set output properties */
p_dec->fmt_out.i_cat = AUDIO_ES;
unsigned int * pi_header_size )
{
int i_profile, i_sample_rate_idx, i_frame_size;
- vlc_bool_t b_crc;
+ bool b_crc;
/* Fixed header between frames */
//int i_id = ( (p_buf[1] >> 3) & 0x01) ? 2 : 4; /* MPEG-2 or 4 */
for( i_layer = 0; i_layer < m->pi_layers[i_program]; i_layer++ )
{
latm_stream_t *st = &m->stream[m->i_streams];
- vlc_bool_t b_previous_cfg;
+ bool b_previous_cfg;
m->pi_stream[i_program][i_layer] = m->i_streams;
st->i_program = i_program;
st->i_layer = i_layer;
- b_previous_cfg = VLC_FALSE;
+ b_previous_cfg = false;
if( i_program != 0 || i_layer != 0 )
b_previous_cfg = bs_read1( s );
memcpy( p_dec->fmt_out.p_extra, st->extra, st->i_extra );
}
- p_sys->b_latm_cfg = VLC_TRUE;
+ p_sys->b_latm_cfg = true;
}
}
/* Wait for the configuration */
p_out_buffer = block_New( p_dec, p_sys->i_frame_size );
if( !p_out_buffer )
{
- //p_dec->b_error = VLC_TRUE;
+ //p_dec->b_error = true;
return NULL;
}
p_buf = p_out_buffer->p_buffer;
int i_last_incr;
int i_last_incr_diff;
- vlc_bool_t b_frame;
+ bool b_frame;
/* Current frame being built */
block_t *p_frame;
break;
case 2:
p_sys->i_flags = BLOCK_FLAG_TYPE_B;
- p_sys->b_frame = VLC_TRUE;
+ p_sys->b_frame = true;
break;
case 3: /* gni ? */
p_sys->i_flags = BLOCK_FLAG_TYPE_PB;
set_callbacks( Open, Close );
add_bool( "packetizer-mpegvideo-sync-iframe", 0, NULL, SYNC_INTRAFRAME_TEXT,
- SYNC_INTRAFRAME_LONGTEXT, VLC_TRUE );
+ SYNC_INTRAFRAME_LONGTEXT, true );
vlc_module_end();
/*****************************************************************************
*****************************************************************************/
static block_t *Packetize( decoder_t *, block_t ** );
static block_t *ParseMPEGBlock( decoder_t *, block_t * );
-static block_t *GetCc( decoder_t *p_dec, vlc_bool_t pb_present[4] );
+static block_t *GetCc( decoder_t *p_dec, bool pb_present[4] );
struct decoder_sys_t
{
block_t *p_frame;
block_t **pp_last;
- vlc_bool_t b_frame_slice;
+ bool b_frame_slice;
mtime_t i_pts;
mtime_t i_dts;
/* Sequence properties */
int i_frame_rate;
int i_frame_rate_base;
- vlc_bool_t b_seq_progressive;
- vlc_bool_t b_low_delay;
+ bool b_seq_progressive;
+ bool b_low_delay;
int i_aspect_ratio_info;
- vlc_bool_t b_inited;
+ bool b_inited;
/* Picture properties */
int i_temporal_ref;
mtime_t i_interpolated_dts;
mtime_t i_last_ref_pts;
- vlc_bool_t b_second_field;
+ bool b_second_field;
/* Number of pictures since last sequence header */
int i_seq_old;
/* Sync behaviour */
- vlc_bool_t b_sync_on_intra_frame;
- vlc_bool_t b_discontinuity;
+ bool b_sync_on_intra_frame;
+ bool b_discontinuity;
/* */
- vlc_bool_t b_cc_reset;
+ bool b_cc_reset;
uint32_t i_cc_flags;
mtime_t i_cc_pts;
mtime_t i_cc_dts;
p_sys->p_ext = NULL;
p_sys->p_frame = NULL;
p_sys->pp_last = &p_sys->p_frame;
- p_sys->b_frame_slice = VLC_FALSE;
+ p_sys->b_frame_slice = false;
p_sys->i_dts = p_sys->i_pts = 0;
p_sys->i_frame_rate = 1;
p_sys->i_frame_rate_base = 1;
- p_sys->b_seq_progressive = VLC_TRUE;
- p_sys->b_low_delay = VLC_TRUE;
+ p_sys->b_seq_progressive = true;
+ p_sys->b_low_delay = true;
p_sys->i_seq_old = 0;
p_sys->i_temporal_ref = 0;
p_sys->i_last_ref_pts = 0;
p_sys->b_second_field = 0;
- p_sys->b_discontinuity = VLC_FALSE;
+ p_sys->b_discontinuity = false;
p_sys->b_sync_on_intra_frame = var_CreateGetBool( p_dec, "packetizer-mpegvideo-sync-iframe" );
if( p_sys->b_sync_on_intra_frame )
msg_Dbg( p_dec, "syncing on intra frame now" );
- p_sys->b_cc_reset = VLC_FALSE;
+ p_sys->b_cc_reset = false;
p_sys->i_cc_pts = 0;
p_sys->i_cc_dts = 0;
p_sys->i_cc_flags = 0;
p_sys->i_state = STATE_NOSYNC;
block_BytestreamFlush( &p_sys->bytestream );
- p_sys->b_discontinuity = VLC_TRUE;
+ p_sys->b_discontinuity = true;
if( p_sys->p_frame )
block_ChainRelease( p_sys->p_frame );
p_sys->p_frame = NULL;
p_sys->pp_last = &p_sys->p_frame;
- p_sys->b_frame_slice = VLC_FALSE;
+ p_sys->b_frame_slice = false;
}
// p_sys->i_interpolated_dts =
// p_sys->i_last_ref_pts = 0;
if( p_pic->i_flags & BLOCK_FLAG_TYPE_I )
{
msg_Dbg( p_dec, "synced on intra frame" );
- p_sys->b_discontinuity = VLC_FALSE;
+ p_sys->b_discontinuity = false;
p_pic->i_flags |= BLOCK_FLAG_DISCONTINUITY;
}
else
/*****************************************************************************
* GetCc:
*****************************************************************************/
-static block_t *GetCc( decoder_t *p_dec, vlc_bool_t pb_present[4] )
+static block_t *GetCc( decoder_t *p_dec, bool pb_present[4] )
{
decoder_sys_t *p_sys = p_dec->p_sys;
block_t *p_cc;
if( p_sys->p_frame ) block_ChainRelease( p_sys->p_frame );
p_sys->p_frame = NULL;
p_sys->pp_last = &p_sys->p_frame;
- p_sys->b_frame_slice = VLC_FALSE;
+ p_sys->b_frame_slice = false;
}
else if( p_sys->b_frame_slice &&
/* Reset context */
p_sys->p_frame = NULL;
p_sys->pp_last = &p_sys->p_frame;
- p_sys->b_frame_slice = VLC_FALSE;
+ p_sys->b_frame_slice = false;
if( p_sys->i_picture_structure != 0x03 )
{
}
/* CC */
- p_sys->b_cc_reset = VLC_TRUE;
+ p_sys->b_cc_reset = true;
p_sys->i_cc_pts = p_pic->i_pts;
p_sys->i_cc_dts = p_pic->i_dts;
p_sys->i_cc_flags = p_pic->i_flags;
if( !p_pic && p_sys->b_cc_reset )
{
- p_sys->b_cc_reset = VLC_FALSE;
+ p_sys->b_cc_reset = false;
cc_Flush( &p_sys->cc );
}
p_dec->fmt_out.video.i_frame_rate = p_sys->i_frame_rate;
p_dec->fmt_out.video.i_frame_rate_base = p_sys->i_frame_rate_base;
- p_sys->b_seq_progressive = VLC_TRUE;
- p_sys->b_low_delay = VLC_TRUE;
+ p_sys->b_seq_progressive = true;
+ p_sys->b_low_delay = true;
if ( !p_sys->b_inited )
{
if( p_frag->i_buffer >= 10 )
{
p_sys->b_seq_progressive =
- p_frag->p_buffer[5]&0x08 ? VLC_TRUE : VLC_FALSE;
+ p_frag->p_buffer[5]&0x08 ? true : false;
p_sys->b_low_delay =
- p_frag->p_buffer[9]&0x80 ? VLC_TRUE : VLC_FALSE;
+ p_frag->p_buffer[9]&0x80 ? true : false;
}
/* Do not set aspect ratio : in case we're transcoding,
else if( p_frag->p_buffer[3] >= 0x01 && p_frag->p_buffer[3] <= 0xaf )
{
/* Slice start code */
- p_sys->b_frame_slice = VLC_TRUE;
+ p_sys->b_frame_slice = true;
}
/* Append the block */
uint8_t p_startcode[3];
/* Current sequence header */
- vlc_bool_t b_sequence_header;
+ bool b_sequence_header;
struct
{
block_t *p_sh;
- vlc_bool_t b_advanced_profile;
- vlc_bool_t b_interlaced;
- vlc_bool_t b_frame_interpolation;
- vlc_bool_t b_range_reduction;
- vlc_bool_t b_has_bframe;
+ bool b_advanced_profile;
+ bool b_interlaced;
+ bool b_frame_interpolation;
+ bool b_range_reduction;
+ bool b_has_bframe;
} sh;
- vlc_bool_t b_entry_point;
+ bool b_entry_point;
struct
{
block_t *p_ep;
} ep;
/* */
- vlc_bool_t b_frame;
+ bool b_frame;
/* Current frame being built */
block_t *p_frame;
p_sys->p_startcode[2] = 0x01;
p_sys->i_offset = 0;
- p_sys->b_sequence_header = VLC_FALSE;
+ p_sys->b_sequence_header = false;
p_sys->sh.p_sh = NULL;
- p_sys->b_entry_point = VLC_FALSE;
+ p_sys->b_entry_point = false;
p_sys->ep.p_ep = NULL;
- p_sys->b_frame = VLC_FALSE;
+ p_sys->b_frame = false;
p_sys->p_frame = NULL;
p_sys->pp_last = &p_sys->p_frame;
block_ChainRelease( p_sys->p_frame );
p_sys->p_frame = NULL;
p_sys->pp_last = &p_sys->p_frame;
- p_sys->b_frame = VLC_FALSE;
+ p_sys->b_frame = false;
}
// p_sys->i_interpolated_dts = 0;
block_Release( *pp_block );
const int i_level = bs_read( &s, 3 );
/* Advanced profile */
- p_sys->sh.b_advanced_profile = VLC_TRUE;
- p_sys->sh.b_range_reduction = VLC_FALSE;
- p_sys->sh.b_has_bframe = VLC_TRUE;
+ p_sys->sh.b_advanced_profile = true;
+ p_sys->sh.b_range_reduction = false;
+ p_sys->sh.b_has_bframe = true;
bs_skip( &s, 2+3+5+1 ); // chroma format + frame rate Q + bit rate Q + postprocflag
else
{
/* Simple and main profile */
- p_sys->sh.b_advanced_profile = VLC_FALSE;
- p_sys->sh.b_interlaced = VLC_FALSE;
+ p_sys->sh.b_advanced_profile = false;
+ p_sys->sh.b_interlaced = false;
if( !p_sys->b_sequence_header )
msg_Dbg( p_dec, "found sequence header for %s profile", i_profile == 0 ? "simple" : "main" );
1+1+1+1 ); // variable size transform + reserved + overlap + sync marker
p_sys->sh.b_range_reduction = bs_read( &s, 1 );
if( bs_read( &s, 3 ) > 0 )
- p_sys->sh.b_has_bframe = VLC_TRUE;
+ p_sys->sh.b_has_bframe = true;
else
- p_sys->sh.b_has_bframe = VLC_FALSE;
+ p_sys->sh.b_has_bframe = false;
bs_skip( &s, 2 ); // quantizer
p_sys->sh.b_frame_interpolation = bs_read( &s, 1 );
}
- p_sys->b_sequence_header = VLC_TRUE;
+ p_sys->b_sequence_header = true;
BuildExtraData( p_dec );
}
else if( idu == IDU_TYPE_ENTRY_POINT )
block_Release( p_sys->ep.p_ep );
p_sys->ep.p_ep = block_Duplicate( p_frag );
- p_sys->b_entry_point = VLC_TRUE;
+ p_sys->b_entry_point = true;
BuildExtraData( p_dec );
}
else if( idu == IDU_TYPE_FRAME )
else
p_sys->p_frame->i_flags |= BLOCK_FLAG_TYPE_B;
}
- p_sys->b_frame = VLC_TRUE;
+ p_sys->b_frame = true;
}
return p_pic;
}
set_subcategory( SUBCAT_PLAYLIST_SD );
add_string( "podcast-urls", NULL, NULL,
- URLS_TEXT, URLS_LONGTEXT, VLC_FALSE );
+ URLS_TEXT, URLS_LONGTEXT, false );
change_autosave();
set_capability( "services_discovery", 0 );
char **ppsz_urls;
int i_urls;
- vlc_bool_t b_update;
+ bool b_update;
};
/*****************************************************************************
p_sys->ppsz_urls = NULL;
p_sys->i_input = 0;
p_sys->pp_input = NULL;
- p_sys->b_update = VLC_TRUE;
+ p_sys->b_update = true;
p_sd->pf_run = Run;
p_sd->p_sys = p_sys;
while( !p_sd->b_die )
{
int i;
- if( p_sys->b_update == VLC_TRUE )
+ if( p_sys->b_update == true )
{
msg_Dbg( p_sd, "Update required" );
psz_urls = var_GetNonEmptyString( p_sd, "podcast-urls" );
if( psz_urls != NULL )
ParseUrls( p_sd, psz_urls );
free( psz_urls );
- p_sys->b_update = VLC_FALSE;
+ p_sys->b_update = false;
}
for( i = 0; i < p_sd->p_sys->i_input; i++ )
VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(oldval);
VLC_UNUSED(newval);
services_discovery_sys_t *p_sys = (services_discovery_sys_t *)p_data;
- p_sys->b_update = VLC_TRUE;
+ p_sys->b_update = true;
return VLC_SUCCESS;
}
set_subcategory( SUBCAT_PLAYLIST_SD );
add_string( "sap-addr", NULL, NULL,
- SAP_ADDR_TEXT, SAP_ADDR_LONGTEXT, VLC_TRUE );
+ SAP_ADDR_TEXT, SAP_ADDR_LONGTEXT, true );
add_bool( "sap-ipv4", 1 , NULL,
- SAP_IPV4_TEXT,SAP_IPV4_LONGTEXT, VLC_TRUE );
+ SAP_IPV4_TEXT,SAP_IPV4_LONGTEXT, true );
add_bool( "sap-ipv6", 1 , NULL,
- SAP_IPV6_TEXT, SAP_IPV6_LONGTEXT, VLC_TRUE );
+ SAP_IPV6_TEXT, SAP_IPV6_LONGTEXT, true );
add_integer( "sap-timeout", 1800, NULL,
- SAP_TIMEOUT_TEXT, SAP_TIMEOUT_LONGTEXT, VLC_TRUE );
+ SAP_TIMEOUT_TEXT, SAP_TIMEOUT_LONGTEXT, true );
add_bool( "sap-parse", 1 , NULL,
- SAP_PARSE_TEXT,SAP_PARSE_LONGTEXT, VLC_TRUE );
+ SAP_PARSE_TEXT,SAP_PARSE_LONGTEXT, true );
add_bool( "sap-strict", 0 , NULL,
- SAP_STRICT_TEXT,SAP_STRICT_LONGTEXT, VLC_TRUE );
+ SAP_STRICT_TEXT,SAP_STRICT_LONGTEXT, true );
#if 0
add_bool( "sap-cache", 0 , NULL,
- SAP_CACHE_TEXT,SAP_CACHE_LONGTEXT, VLC_TRUE );
+ SAP_CACHE_TEXT,SAP_CACHE_LONGTEXT, true );
#endif
add_bool( "sap-timeshift", 0 , NULL,
- SAP_TIMESHIFT_TEXT,SAP_TIMESHIFT_LONGTEXT, VLC_TRUE );
+ SAP_TIMESHIFT_TEXT,SAP_TIMESHIFT_LONGTEXT, true );
set_capability( "services_discovery", 0 );
set_callbacks( Open, Close );
struct sap_announce_t **pp_announces;
/* Modes */
- vlc_bool_t b_strict;
- vlc_bool_t b_parse;
- vlc_bool_t b_timeshift;
+ bool b_strict;
+ bool b_parse;
+ bool b_timeshift;
int i_timeout;
};
static const char *FindAttribute (const sdp_t *sdp, unsigned media,
const char *name);
- static vlc_bool_t IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 );
+ static bool IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 );
static int InitSocket( services_discovery_t *p_sd, const char *psz_address, int i_port );
static int Decompress( const unsigned char *psz_src, unsigned char **_dst, int i_len );
static void FreeSDP( sdp_t *p_sdp );
ssize_t i_read;
i_read = net_Read (p_sd, ufd[i].fd, NULL, p_buffer,
- MAX_SAP_BUFFER, VLC_FALSE);
+ MAX_SAP_BUFFER, false);
if (i_read < 0)
msg_Warn (p_sd, "receive error: %m");
if (i_read > 6)
if( p_playlist->status.p_item &&
p_playlist->status.p_item->p_input == p_parent_input )
{
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
p_playlist->status.p_node, p_playlist->status.p_item );
}
if ((flags >> 5) != 1)
return VLC_EGENERIC;
- vlc_bool_t b_ipv6 = (flags & 0x10) != 0;
- vlc_bool_t b_need_delete = (flags & 0x04) != 0;
+ bool b_ipv6 = (flags & 0x10) != 0;
+ bool b_need_delete = (flags & 0x04) != 0;
if (flags & 0x02)
{
return VLC_EGENERIC;
}
- vlc_bool_t b_compressed = (flags & 0x01) != 0;
+ bool b_compressed = (flags & 0x01) != 0;
uint16_t i_hash = U16_AT (buf + 2);
if( ( p_sdp->i_media_type != 14
&& p_sdp->i_media_type != 32
&& p_sdp->i_media_type != 33)
- || p_sd->p_sys->b_parse == VLC_FALSE )
+ || p_sd->p_sys->b_parse == false )
{
free( p_sdp->psz_uri );
if (asprintf( &p_sdp->psz_uri, "sdp://%s", p_sdp->psz_sdp ) == -1)
}
if( p_announce->i_input_id > -1 )
- playlist_DeleteFromInput( pl_Get(p_sd), p_announce->i_input_id, VLC_FALSE );
+ playlist_DeleteFromInput( pl_Get(p_sd), p_announce->i_input_id, false );
for( i = 0; i< p_sd->p_sys->i_announces; i++)
{
return VLC_SUCCESS;
}
-static vlc_bool_t IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 )
+static bool IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 )
{
/* A session is identified by
* - username,
|| (p_sdp1->session_id != p_sdp2->session_id)
|| (p_sdp1->orig_ip_version != p_sdp2->orig_ip_version)
|| strcmp (p_sdp1->orig_host, p_sdp2->orig_host))
- return VLC_FALSE;
+ return false;
- return VLC_TRUE;
+ return true;
}
/* Read every subitems, and add them in ItemAdded */
vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
ItemAdded, &category );
- input_Read( p_sd, p_input, VLC_TRUE );
+ input_Read( p_sd, p_input, true );
vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
ItemAdded, &category );
/* FIXME: playlist_AddInput() can fail */
playlist_BothAddInput( p_playlist, p_input, p_parent,
PLAYLIST_APPEND, PLAYLIST_END, NULL, NULL,
- VLC_FALSE );
+ false );
} else if ( node->isContainerNode() )
{
ContainerNode *conNode = (ContainerNode *)node;
playlist_item_t *p_item = FindDeviceNode( dev );
if( p_item != NULL )
- playlist_NodeDelete( p_playlist, p_item, VLC_TRUE, VLC_TRUE );
+ playlist_NodeDelete( p_playlist, p_item, true, true );
}
/* Create our playlist node */
playlist_NodesPairCreate( pl_Get( p_sd ), _("Devices"),
&p_sys->p_node_cat, &p_sys->p_node_one,
- VLC_TRUE );
+ true );
return VLC_SUCCESS;
}
services_discovery_t *p_sd = ( services_discovery_t* )p_this;
services_discovery_sys_t *p_sys = p_sd->p_sys;
- playlist_NodeDelete( pl_Get( p_sd ), p_sys->p_node_one, VLC_TRUE,
- VLC_TRUE );
- playlist_NodeDelete( pl_Get( p_sd ), p_sys->p_node_cat, VLC_TRUE,
- VLC_TRUE );
+ playlist_NodeDelete( pl_Get( p_sd ), p_sys->p_node_one, true,
+ true );
+ playlist_NodeDelete( pl_Get( p_sd ), p_sys->p_node_cat, true,
+ true );
free( p_sys );
}
if ( _contents )
{
playlist_NodeDelete( pl_Get( _cookie->serviceDiscovery ) ,
- _playlistNode, VLC_TRUE, VLC_TRUE );
+ _playlistNode, true, true );
}
delete _contents;
if ( _contents )
{
PL_LOCK;
- playlist_NodeEmpty( p_playlist, _playlistNode, VLC_TRUE );
+ playlist_NodeEmpty( p_playlist, _playlistNode, true );
PL_UNLOCK;
delete _contents;
}
/* FIXME: playlist_AddInput() can fail */
playlist_BothAddInput( p_playlist, p_input, parentNode,
PLAYLIST_APPEND, PLAYLIST_END, &i_cat, NULL,
- VLC_FALSE );
+ false );
/* TODO: do this better by storing ids */
- playlist_item_t *p_node = playlist_ItemGetById( p_playlist, i_cat, VLC_FALSE );
+ playlist_item_t *p_node = playlist_ItemGetById( p_playlist, i_cat, false );
assert( p_node );
item->setPlaylistNode( p_node );
}
sout_stream_id_t *id;
es_format_t fmt;
mtime_t i_last;
- vlc_bool_t b_error;
+ bool b_error;
};
struct sout_stream_sys_t
p_es->fmt = *p_fmt;
p_es->id = NULL;
p_es->i_last = 0;
- p_es->b_error = VLC_FALSE;
+ p_es->b_error = false;
TAB_APPEND( p_sys->i_es_num, p_sys->pp_es, p_es );
return p_es;
int i;
p_es->i_last = p_buffer->i_dts;
- if ( p_es->id == NULL && p_es->b_error != VLC_TRUE )
+ if ( p_es->id == NULL && p_es->b_error != true )
{
p_es->id = p_sys->p_out->pf_add( p_sys->p_out, &p_es->fmt );
if ( p_es->id == NULL )
{
- p_es->b_error = VLC_TRUE;
+ p_es->b_error = true;
msg_Err( p_stream, "couldn't create chain for id %d",
p_es->fmt.i_id );
}
}
- if ( p_es->b_error != VLC_TRUE )
+ if ( p_es->b_error != true )
p_sys->p_out->pf_send( p_sys->p_out, p_es->id, p_buffer );
else
block_ChainRelease( p_buffer );
set_category( CAT_SOUT );
set_subcategory( SUBCAT_SOUT_STREAM );*/
add_integer( SOUT_CFG_PREFIX_OUT "id", 0, NULL, ID_TEXT, ID_LONGTEXT,
- VLC_FALSE );
+ false );
set_callbacks( OpenOut, CloseOut );
add_submodule();
/*set_category( CAT_SOUT );
set_subcategory( SUBCAT_SOUT_STREAM );*/
add_integer( SOUT_CFG_PREFIX_IN "delay", 0, NULL, DELAY_TEXT,
- DELAY_LONGTEXT, VLC_FALSE );
+ DELAY_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX_IN "id-offset", 8192, NULL, ID_OFFSET_TEXT,
- ID_OFFSET_LONGTEXT, VLC_FALSE );
+ ID_OFFSET_LONGTEXT, false );
set_callbacks( OpenIn, CloseIn );
vlc_module_end();
es_format_t fmt;
block_t *p_block;
block_t **pp_last;
- vlc_bool_t b_empty;
+ bool b_empty;
/* bridge in part */
sout_stream_id_t *id;
mtime_t i_last;
- vlc_bool_t b_changed;
+ bool b_changed;
} bridged_es_t;
typedef struct bridge_t
vlc_mutex_t *p_lock;
bridged_es_t *p_es;
int i_id;
- vlc_bool_t b_inited;
+ bool b_inited;
} out_sout_stream_sys_t;
/*****************************************************************************
p_stream->p_cfg );
p_sys = malloc( sizeof( out_sout_stream_sys_t ) );
- p_sys->b_inited = VLC_FALSE;
+ p_sys->b_inited = false;
var_Create( p_this->p_libvlc, "bridge-lock", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc, "bridge-lock", &val );
{
return NULL;
}
- p_sys->b_inited = VLC_TRUE;
+ p_sys->b_inited = true;
vlc_mutex_lock( p_sys->p_lock );
p_es->fmt.i_id = p_sys->i_id;
p_es->p_block = NULL;
p_es->pp_last = &p_es->p_block;
- p_es->b_empty = VLC_FALSE;
+ p_es->b_empty = false;
p_es->id = NULL;
p_es->i_last = 0;
- p_es->b_changed = VLC_TRUE;
+ p_es->b_changed = true;
msg_Dbg( p_stream, "bridging out input codec=%4.4s id=%d pos=%d",
(char*)&p_es->fmt.i_codec, p_es->fmt.i_id, i );
p_es = p_sys->p_es;
- p_es->b_empty = VLC_TRUE;
+ p_es->b_empty = true;
block_ChainRelease( p_es->p_block );
- p_es->p_block = VLC_FALSE;
+ p_es->p_block = false;
- p_es->b_changed = VLC_TRUE;
+ p_es->b_changed = true;
vlc_mutex_unlock( p_sys->p_lock );
- p_sys->b_inited = VLC_FALSE;
+ p_sys->b_inited = false;
return VLC_SUCCESS;
}
{
in_sout_stream_sys_t *p_sys = (in_sout_stream_sys_t *)p_stream->p_sys;
bridge_t *p_bridge;
- vlc_bool_t b_no_es = VLC_TRUE;
+ bool b_no_es = true;
int i;
/* First forward the packet for our own ES */
for ( i = 0; i < p_bridge->i_es_num; i++ )
{
if ( !p_bridge->pp_es[i]->b_empty )
- b_no_es = VLC_FALSE;
+ b_no_es = false;
while ( p_bridge->pp_es[i]->p_block != NULL
&& (p_bridge->pp_es[i]->p_block->i_dts + p_sys->i_delay
p_bridge->pp_es[i]->fmt.i_id, i );
}
}
- p_bridge->pp_es[i]->b_changed = VLC_FALSE;
+ p_bridge->pp_es[i]->b_changed = false;
if ( p_bridge->pp_es[i]->b_empty )
continue;
{
p_sys->p_out->pf_del( p_sys->p_out, p_bridge->pp_es[i]->id );
p_bridge->pp_es[i]->fmt.i_id -= p_sys->i_id_offset;
- p_bridge->pp_es[i]->b_changed = VLC_TRUE;
+ p_bridge->pp_es[i]->b_changed = true;
p_bridge->pp_es[i]->id = NULL;
}
continue;
block_ChainRelease( p_buffer );
if( p_sys->p_input && p_sys->i_stream_start + 1500000 < mdate() )
- p_sys->p_input->b_eof = VLC_TRUE;
+ p_sys->p_input->b_eof = true;
return VLC_SUCCESS;
}
set_category( CAT_SOUT );
set_subcategory( SUBCAT_SOUT_STREAM );
add_bool( SOUT_CFG_PREFIX "audio", 1, NULL, AUDIO_TEXT,
- AUDIO_LONGTEXT, VLC_TRUE );
+ AUDIO_LONGTEXT, true );
add_bool( SOUT_CFG_PREFIX "video", 1, NULL, VIDEO_TEXT,
- VIDEO_LONGTEXT, VLC_TRUE );
+ VIDEO_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "delay", 100, NULL, DELAY_TEXT,
- DELAY_LONGTEXT, VLC_TRUE );
+ DELAY_LONGTEXT, true );
set_callbacks( Open, Close );
vlc_module_end();
input_thread_t *p_input;
unsigned i_es;
- vlc_bool_t b_audio;
- vlc_bool_t b_video;
+ bool b_audio;
+ bool b_video;
mtime_t i_delay;
};
}
}
- id->p_dec = input_DecoderNew( p_sys->p_input, p_fmt, VLC_TRUE );
+ id->p_dec = input_DecoderNew( p_sys->p_input, p_fmt, true );
if( id->p_dec == NULL )
{
msg_Err( p_stream, "cannot create decoder for fcc=`%4.4s'",
void **pp_ids;
};
-static vlc_bool_t ESSelected( es_format_t *fmt, char *psz_select );
+static bool ESSelected( es_format_t *fmt, char *psz_select );
/*****************************************************************************
* Open:
/*****************************************************************************
* Divers
*****************************************************************************/
-static vlc_bool_t NumInRange( char *psz_range, int i_num )
+static bool NumInRange( char *psz_range, int i_num )
{
char *psz = strchr( psz_range, '-' );
char *end;
i_start = i_stop = strtol( psz_range, NULL, 0 );
}
- return i_start <= i_num && i_num <= i_stop ? VLC_TRUE : VLC_FALSE;
+ return i_start <= i_num && i_num <= i_stop ? true : false;
}
-static vlc_bool_t ESSelected( es_format_t *fmt, char *psz_select )
+static bool ESSelected( es_format_t *fmt, char *psz_select )
{
char *psz_dup;
char *psz;
/* If empty all es are selected */
if( psz_select == NULL || *psz_select == '\0' )
{
- return VLC_TRUE;
+ return true;
}
psz_dup = strdup( psz_select );
psz = psz_dup;
if( i_cat == 1 || i_es == 1 || i_prgm == 1 )
{
- return VLC_TRUE;
+ return true;
}
- return VLC_FALSE;
+ return false;
}
set_subcategory( SUBCAT_SOUT_STREAM );
add_string( SOUT_CFG_PREFIX "access", "", NULL, ACCESS_TEXT,
- ACCESS_LONGTEXT, VLC_TRUE );
+ ACCESS_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "access-audio", "", NULL, ACCESSA_TEXT,
- ACCESSA_LONGTEXT, VLC_TRUE );
+ ACCESSA_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "access-video", "", NULL, ACCESSV_TEXT,
- ACCESSV_LONGTEXT, VLC_TRUE );
+ ACCESSV_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "mux", "", NULL, MUX_TEXT,
- MUX_LONGTEXT, VLC_TRUE );
+ MUX_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "mux-audio", "", NULL, MUXA_TEXT,
- MUXA_LONGTEXT, VLC_TRUE );
+ MUXA_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "mux-video", "", NULL, MUXV_TEXT,
- MUXV_LONGTEXT, VLC_TRUE );
+ MUXV_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "dst", "", NULL, DEST_TEXT,
- DEST_LONGTEXT, VLC_TRUE );
+ DEST_LONGTEXT, true );
change_unsafe();
add_string( SOUT_CFG_PREFIX "dst-audio", "", NULL, DESTA_TEXT,
- DESTA_LONGTEXT, VLC_TRUE );
+ DESTA_LONGTEXT, true );
change_unsafe();
add_string( SOUT_CFG_PREFIX "dst-video", "", NULL, DESTV_TEXT,
- DESTV_LONGTEXT, VLC_TRUE );
+ DESTV_LONGTEXT, true );
change_unsafe();
set_callbacks( Open, Close );
{
msg_Err( p_stream, "no suitable sout access module for `%s/%s://%s'",
psz_access, psz_mux, psz_dst );
- intf_UserFatal( p_stream, VLC_FALSE,
+ intf_UserFatal( p_stream, false,
_("Streaming / Transcoding failed"),
_("There is no suitable stream-output access module for \"%s/%s://%s\"."),
psz_access,
{
msg_Err( p_stream, "no suitable sout mux module for `%s/%s://%s'",
psz_access, psz_mux, psz_dst );
- intf_UserFatal( p_stream, VLC_FALSE,
+ intf_UserFatal( p_stream, false,
_("Streaming / Transcoding failed"),
_("There is no suitable stream-output access module "\
"for \"%s/%s://%s\"."),
struct sout_stream_id_t
{
- vlc_bool_t b_used;
+ bool b_used;
es_format_t fmt;
void *id;
/* */
msg_Dbg( p_stream, "reusing already opened output" );
- id->b_used = VLC_TRUE;
+ id->b_used = true;
return id;
}
if( id == NULL )
return NULL;
es_format_Copy( &id->fmt, p_fmt );
- id->b_used = VLC_TRUE;
+ id->b_used = true;
id->id = sout_StreamIdAdd( p_sys->p_out, &id->fmt );
if( id->id == NULL )
{
static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
{
VLC_UNUSED(p_stream);
- id->b_used = VLC_FALSE;
+ id->b_used = false;
return VLC_SUCCESS;
}
int i_height, i_width;
unsigned int i_sar_num, i_sar_den;
char *psz_id;
- vlc_bool_t b_inited;
+ bool b_inited;
int i_chroma; /* force image format chroma */
add_shortcut( "mosaic-bridge" );
add_string( CFG_PREFIX "id", "Id", NULL, ID_TEXT, ID_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( CFG_PREFIX "width", 0, NULL, WIDTH_TEXT,
- WIDTH_LONGTEXT, VLC_TRUE );
+ WIDTH_LONGTEXT, true );
add_integer( CFG_PREFIX "height", 0, NULL, HEIGHT_TEXT,
- HEIGHT_LONGTEXT, VLC_TRUE );
+ HEIGHT_LONGTEXT, true );
add_string( CFG_PREFIX "sar", "1:1", NULL, RATIO_TEXT,
- RATIO_LONGTEXT, VLC_FALSE );
+ RATIO_LONGTEXT, false );
add_string( CFG_PREFIX "chroma", 0, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_FALSE );
+ false );
add_module_list( CFG_PREFIX "vfilter", "video filter2",
- NULL, NULL, VFILTER_TEXT, VFILTER_LONGTEXT, VLC_FALSE );
+ NULL, NULL, VFILTER_TEXT, VFILTER_LONGTEXT, false );
set_callbacks( Open, Close );
vlc_module_end();
}
p_stream->p_sys = p_sys;
- p_sys->b_inited = VLC_FALSE;
+ p_sys->b_inited = false;
var_Create( p_libvlc, "mosaic-lock", VLC_VAR_MUTEX );
var_Get( p_libvlc, "mosaic-lock", &val );
vlc_object_attach( p_sys->p_decoder, p_stream );
p_sys->p_decoder->p_module = NULL;
p_sys->p_decoder->fmt_in = *p_fmt;
- p_sys->p_decoder->b_pace_control = VLC_FALSE;
+ p_sys->p_decoder->b_pace_control = false;
p_sys->p_decoder->fmt_out = p_sys->p_decoder->fmt_in;
p_sys->p_decoder->fmt_out.i_extra = 0;
p_sys->p_decoder->fmt_out.p_extra = 0;
return NULL;
}
- p_sys->b_inited = VLC_TRUE;
+ p_sys->b_inited = true;
vlc_mutex_lock( p_sys->p_lock );
p_bridge = GetBridge( p_stream );
p_es->psz_id = p_sys->psz_id;
p_es->p_picture = NULL;
p_es->pp_last = &p_es->p_picture;
- p_es->b_empty = VLC_FALSE;
+ p_es->b_empty = false;
vlc_mutex_unlock( p_sys->p_lock );
(*pp_vfilter)->fmt_out = (*pp_vfilter)->fmt_in;
(*pp_vfilter)->p_cfg = p_cfg;
(*pp_vfilter)->p_module =
- module_Need( *pp_vfilter, "video filter2", psz_name, VLC_TRUE );
+ module_Need( *pp_vfilter, "video filter2", psz_name, true );
if( (*pp_vfilter)->p_module )
{
/* It worked! */
sout_stream_sys_t *p_sys = p_stream->p_sys;
bridge_t *p_bridge;
bridged_es_t *p_es;
- vlc_bool_t b_last_es = VLC_TRUE;
+ bool b_last_es = true;
filter_t **pp_vfilter, **pp_end;
int i;
p_bridge = GetBridge( p_stream );
p_es = p_sys->p_es;
- p_es->b_empty = VLC_TRUE;
+ p_es->b_empty = true;
while ( p_es->p_picture )
{
picture_t *p_next = p_es->p_picture->p_next;
{
if ( !p_bridge->pp_es[i]->b_empty )
{
- b_last_es = VLC_FALSE;
+ b_last_es = false;
break;
}
}
image_HandlerDelete( p_sys->p_image );
}
- p_sys->b_inited = VLC_FALSE;
+ p_sys->b_inited = false;
return VLC_SUCCESS;
}
struct picture_sys_t
{
vlc_object_t *p_owner;
- vlc_bool_t b_dead;
+ bool b_dead;
};
static void video_release_buffer_decoder( picture_t *p_pic )
}
else
{
- pp_ring[i]->p_sys->b_dead = VLC_TRUE;
+ pp_ring[i]->p_sys->b_dead = true;
}
pp_ring[i] = NULL;
}
p_pic->pf_release = pf_release;
p_pic->p_sys = malloc( sizeof(picture_sys_t) );
p_pic->p_sys->p_owner = p_this;
- p_pic->p_sys->b_dead = VLC_FALSE;
+ p_pic->p_sys->b_dead = false;
p_pic->i_status = RESERVED_PICTURE;
pp_ring[i] = p_pic;
rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto,
- vlc_bool_t mux)
+ bool mux)
{
rtcp_sender_t *rtcp;
uint8_t *ptr;
set_subcategory( SUBCAT_SOUT_STREAM );
add_string( SOUT_CFG_PREFIX "dst", "", NULL, DEST_TEXT,
- DEST_LONGTEXT, VLC_TRUE );
+ DEST_LONGTEXT, true );
change_unsafe();
add_string( SOUT_CFG_PREFIX "sdp", "", NULL, SDP_TEXT,
- SDP_LONGTEXT, VLC_TRUE );
+ SDP_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "mux", "", NULL, MUX_TEXT,
- MUX_LONGTEXT, VLC_TRUE );
+ MUX_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "name", "", NULL, NAME_TEXT,
- NAME_LONGTEXT, VLC_TRUE );
+ NAME_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "description", "", NULL, DESC_TEXT,
- DESC_LONGTEXT, VLC_TRUE );
+ DESC_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "url", "", NULL, URL_TEXT,
- URL_LONGTEXT, VLC_TRUE );
+ URL_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "email", "", NULL, EMAIL_TEXT,
- EMAIL_LONGTEXT, VLC_TRUE );
+ EMAIL_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "phone", "", NULL, PHONE_TEXT,
- PHONE_LONGTEXT, VLC_TRUE );
+ PHONE_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "proto", "udp", NULL, PROTO_TEXT,
- PROTO_LONGTEXT, VLC_FALSE );
+ PROTO_LONGTEXT, false );
change_string_list( ppsz_protos, ppsz_protocols, NULL );
add_integer( SOUT_CFG_PREFIX "port", 50004, NULL, PORT_TEXT,
- PORT_LONGTEXT, VLC_TRUE );
+ PORT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "port-audio", 50000, NULL, PORT_AUDIO_TEXT,
- PORT_AUDIO_LONGTEXT, VLC_TRUE );
+ PORT_AUDIO_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "port-video", 50002, NULL, PORT_VIDEO_TEXT,
- PORT_VIDEO_LONGTEXT, VLC_TRUE );
+ PORT_VIDEO_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "ttl", 0, NULL, TTL_TEXT,
- TTL_LONGTEXT, VLC_TRUE );
- add_bool( SOUT_CFG_PREFIX "rtcp-mux", VLC_FALSE, NULL,
- RTCP_MUX_TEXT, RTCP_MUX_LONGTEXT, VLC_FALSE );
+ TTL_LONGTEXT, true );
+ add_bool( SOUT_CFG_PREFIX "rtcp-mux", false, NULL,
+ RTCP_MUX_TEXT, RTCP_MUX_LONGTEXT, false );
add_bool( SOUT_CFG_PREFIX "mp4a-latm", 0, NULL, RFC3016_TEXT,
- RFC3016_LONGTEXT, VLC_FALSE );
+ RFC3016_LONGTEXT, false );
set_callbacks( Open, Close );
vlc_module_end();
vlc_mutex_t lock_sdp;
/* SDP to disk */
- vlc_bool_t b_export_sdp_file;
+ bool b_export_sdp_file;
char *psz_sdp_file;
/* SDP via SAP */
- vlc_bool_t b_export_sap;
+ bool b_export_sap;
session_descriptor_t *p_session;
/* SDP via HTTP */
uint16_t i_port;
uint16_t i_port_audio;
uint16_t i_port_video;
- vlc_bool_t b_latm;
- vlc_bool_t rtcp_mux;
+ bool b_latm;
+ bool rtcp_mux;
/* when need to use a private one or when using muxer */
int i_payload_type;
sout_stream_sys_t *p_sys = NULL;
config_chain_t *p_cfg = NULL;
char *psz;
- vlc_bool_t b_rtsp = VLC_FALSE;
+ bool b_rtsp = false;
config_ChainParse( p_stream, SOUT_CFG_PREFIX,
ppsz_sout_options, p_stream->p_cfg );
&& ( p_cfg->psz_value != NULL )
&& !strncasecmp( p_cfg->psz_value, "rtsp:", 5 ) )
{
- b_rtsp = VLC_TRUE;
+ b_rtsp = true;
break;
}
}
if( psz != NULL )
{
if( !strncasecmp( psz, "rtsp:", 5 ) )
- b_rtsp = VLC_TRUE;
+ b_rtsp = true;
free( psz );
}
}
if (!strcasecmp (psz, "dccp"))
{
p_sys->proto = IPPROTO_DCCP;
- p_sys->rtcp_mux = VLC_TRUE; /* Force RTP/RTCP mux */
+ p_sys->rtcp_mux = true; /* Force RTP/RTCP mux */
}
#if 0
else
if (!strcasecmp (psz, "sctp"))
{
p_sys->proto = IPPROTO_TCP;
- p_sys->rtcp_mux = VLC_TRUE; /* Force RTP/RTCP mux */
+ p_sys->rtcp_mux = true; /* Force RTP/RTCP mux */
}
#endif
#if 0
if (!strcasecmp (psz, "tcp"))
{
p_sys->proto = IPPROTO_TCP;
- p_sys->rtcp_mux = VLC_TRUE; /* Force RTP/RTCP mux */
+ p_sys->rtcp_mux = true; /* Force RTP/RTCP mux */
}
#endif
else
p_sys->rtsp = NULL;
p_sys->psz_sdp = NULL;
- p_sys->b_export_sap = VLC_FALSE;
- p_sys->b_export_sdp_file = VLC_FALSE;
+ p_sys->b_export_sap = false;
+ p_sys->b_export_sdp_file = false;
p_sys->p_session = NULL;
p_sys->p_httpd_host = NULL;
else if( ( url.psz_protocol && !strcasecmp( url.psz_protocol, "sap" ) ) ||
( url.psz_host && !strcasecmp( url.psz_host, "sap" ) ) )
{
- p_sys->b_export_sap = VLC_TRUE;
+ p_sys->b_export_sap = true;
SapSetup( p_stream );
}
else if( url.psz_protocol && !strcasecmp( url.psz_protocol, "file" ) )
msg_Err( p_stream, "you can use sdp=file:// only once" );
goto out;
}
- p_sys->b_export_sdp_file = VLC_TRUE;
+ p_sys->b_export_sdp_file = true;
psz_url = &psz_url[5];
if( psz_url[0] == '/' && psz_url[1] == '/' )
psz_url += 2;
}
sdp_AddMedia( &psz_sdp, mime_major, proto, inclport * id->i_port,
- id->i_payload_type, VLC_FALSE, id->i_bitrate,
+ id->i_payload_type, false, id->i_bitrate,
id->psz_enc, id->i_clock_rate, id->i_channels,
id->psz_fmtp);
if( rtsp_url != NULL )
{
assert( strlen( rtsp_url ) > 0 );
- vlc_bool_t addslash = ( rtsp_url[strlen( rtsp_url ) - 1] != '/' );
+ bool addslash = ( rtsp_url[strlen( rtsp_url ) - 1] != '/' );
sdp_AddAttribute ( &psz_sdp, "control",
addslash ? "%s/trackID=%u" : "%strackID=%u",
rtsp_url, i );
id->p_fifo = block_FifoNew( p_stream );
if( vlc_thread_create( id, "RTP send thread", ThreadSend,
- VLC_THREAD_PRIORITY_HIGHEST, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_HIGHEST, false ) )
goto error;
/* Update p_sys context */
if( fd == -1 )
break;
msg_Dbg( id, "adding socket %d", fd );
- rtp_add_sink( id, fd, VLC_TRUE );
+ rtp_add_sink( id, fd, true );
}
}
#endif
}
-int rtp_add_sink( sout_stream_id_t *id, int fd, vlc_bool_t rtcp_mux )
+int rtp_add_sink( sout_stream_id_t *id, int fd, bool rtcp_mux )
{
rtp_sink_t sink = { fd, NULL };
sink.rtcp = OpenRTCP( VLC_OBJECT( id->p_stream ), fd, IPPROTO_UDP,
char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url );
-int rtp_add_sink( sout_stream_id_t *id, int fd, vlc_bool_t rtcp_mux );
+int rtp_add_sink( sout_stream_id_t *id, int fd, bool rtcp_mux );
void rtp_del_sink( sout_stream_id_t *id, int fd );
uint16_t rtp_get_seq( const sout_stream_id_t *id );
unsigned rtp_get_num( const sout_stream_id_t *id );
/* RTCP */
typedef struct rtcp_sender_t rtcp_sender_t;
rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto,
- vlc_bool_t mux);
+ bool mux);
void CloseRTCP (rtcp_sender_t *rtcp);
void SendRTCP (rtcp_sender_t *restrict rtcp, const block_t *rtp);
int
rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
const uint8_t *p_data, int i_data, int64_t i_pts,
- int64_t i_dts, vlc_bool_t b_last, int64_t i_length );
+ int64_t i_dts, bool b_last, int64_t i_length );
int rtp_packetize_mpa( sout_stream_t *p_stream, sout_stream_id_t *id,
block_t *in )
int
rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
const uint8_t *p_data, int i_data, int64_t i_pts,
- int64_t i_dts, vlc_bool_t b_last, int64_t i_length )
+ int64_t i_dts, bool b_last, int64_t i_length )
{
const int i_max = rtp_mtu (id); /* payload max in one packet */
int i_nal_hdr;
{
sout_stream_id_t *id;
int fd;
- vlc_bool_t playing;
+ bool playing;
};
tpt != NULL;
tpt = transport_next( tpt ) )
{
- vlc_bool_t b_multicast = VLC_TRUE, b_unsupp = VLC_FALSE;
+ bool b_multicast = true, b_unsupp = false;
unsigned loport = 5004, hiport = 5005; /* from RFC3551 */
/* Check transport protocol. */
opt = parameter_next( opt ) )
{
if( strncmp( opt, "multicast", 9 ) == 0)
- b_multicast = VLC_TRUE;
+ b_multicast = true;
else
if( strncmp( opt, "unicast", 7 ) == 0 )
- b_multicast = VLC_FALSE;
+ b_multicast = false;
else
if( sscanf( opt, "client_port=%u-%u", &loport, &hiport )
== 2 )
&& strncasecmp( opt + 5, "\"PLAY\"", 6 ) )
{
/* Not playing?! */
- b_unsupp = VLC_TRUE;
+ b_unsupp = true;
break;
}
}
if( strncmp( opt,"destination=", 12 ) == 0 )
{
answer->i_status = 403;
- b_unsupp = VLC_TRUE;
+ b_unsupp = true;
}
else
{
*
* "interleaved" is not implemented.
*/
- b_unsupp = VLC_TRUE;
+ b_unsupp = true;
break;
}
}
{
char ip[NI_MAXNUMERICHOST], src[NI_MAXNUMERICHOST];
rtsp_session_t *ses = NULL;
- rtsp_strack_t track = { id->sout_id, -1, VLC_FALSE };
+ rtsp_strack_t track = { id->sout_id, -1, false };
int sport;
if( httpd_ClientIP( cl, ip ) == NULL )
{
if( !tr->playing )
{
- tr->playing = VLC_TRUE;
- rtp_add_sink( tr->id, tr->fd, VLC_FALSE );
+ tr->playing = true;
+ rtp_add_sink( tr->id, tr->fd, false );
}
infolen += sprintf( info + infolen,
"%s/trackID=%u;seq=%u, ", control,
set_subcategory( SUBCAT_SOUT_STREAM );
add_string( SOUT_CFG_PREFIX "access", "", NULL, ACCESS_TEXT,
- ACCESS_LONGTEXT, VLC_FALSE );
+ ACCESS_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "mux", "", NULL, MUX_TEXT,
- MUX_LONGTEXT, VLC_FALSE );
+ MUX_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "dst", "", NULL, DEST_TEXT,
- DEST_LONGTEXT, VLC_FALSE );
+ DEST_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "bind", "", NULL, BIND_TEXT,
- BIND_LONGTEXT, VLC_FALSE );
+ BIND_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "path", "", NULL, PATH_TEXT,
- PATH_LONGTEXT, VLC_FALSE );
+ PATH_LONGTEXT, false );
change_unsafe();
- add_bool( SOUT_CFG_PREFIX "sap", VLC_FALSE, NULL, SAP_TEXT, SAP_LONGTEXT,
- VLC_TRUE );
+ add_bool( SOUT_CFG_PREFIX "sap", false, NULL, SAP_TEXT, SAP_LONGTEXT,
+ true );
add_string( SOUT_CFG_PREFIX "name", "", NULL, NAME_TEXT, NAME_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( SOUT_CFG_PREFIX "group", "", NULL, GROUP_TEXT, GROUP_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( SOUT_CFG_PREFIX "description", "", NULL, DESC_TEXT, DESC_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( SOUT_CFG_PREFIX "url", "", NULL, URL_TEXT, URL_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( SOUT_CFG_PREFIX "email", "", NULL, EMAIL_TEXT, EMAIL_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( SOUT_CFG_PREFIX "phone", "", NULL, PHONE_TEXT, PHONE_LONGTEXT,
- VLC_TRUE );
+ true );
add_obsolete_bool( SOUT_CFG_PREFIX "sap-ipv6" );
set_callbacks( Open, Close );
set_callbacks( Open, Close );
add_string( SOUT_CFG_PREFIX "files", "", NULL, FILES_TEXT,
- FILES_LONGTEXT, VLC_FALSE );
+ FILES_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "sizes", "", NULL, SIZES_TEXT,
- SIZES_LONGTEXT, VLC_FALSE );
+ SIZES_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "aspect-ratio", "4:3", NULL, RATIO_TEXT,
- RATIO_LONGTEXT, VLC_FALSE );
+ RATIO_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "port", 5001, NULL,
- PORT_TEXT, PORT_LONGTEXT, VLC_TRUE );
+ PORT_TEXT, PORT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "command", 0, NULL,
- COMMAND_TEXT, COMMAND_LONGTEXT, VLC_TRUE );
+ COMMAND_TEXT, COMMAND_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "gop", 8, NULL,
- GOP_TEXT, GOP_LONGTEXT, VLC_TRUE );
+ GOP_TEXT, GOP_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "qscale", 5, NULL,
- QSCALE_TEXT, QSCALE_LONGTEXT, VLC_TRUE );
+ QSCALE_TEXT, QSCALE_LONGTEXT, true );
add_bool( SOUT_CFG_PREFIX "mute-audio", 1, NULL,
- AUDIO_TEXT, AUDIO_LONGTEXT, VLC_TRUE );
+ AUDIO_TEXT, AUDIO_LONGTEXT, true );
vlc_module_end();
static const char *ppsz_sout_options[] = {
int i_qscale;
int i_aspect;
sout_stream_id_t *pp_audio_ids[MAX_AUDIO];
- vlc_bool_t b_audio;
+ bool b_audio;
/* Pictures */
picture_t p_pictures[MAX_PICTURES];
struct sout_stream_id_t
{
void *id;
- vlc_bool_t b_switcher_video;
- vlc_bool_t b_switcher_audio;
+ bool b_switcher_video;
+ bool b_switcher_audio;
es_format_t f_src;
block_t *p_queued;
&& (p_fmt->i_codec == VLC_FOURCC('m', 'p', 'g', 'v')
|| p_fmt->i_codec == VLC_FOURCC('f', 'a', 'k', 'e')) )
{
- id->b_switcher_video = VLC_TRUE;
+ id->b_switcher_video = true;
p_fmt->i_codec = VLC_FOURCC('m', 'p', 'g', 'v');
msg_Dbg( p_stream,
"creating video switcher for fcc=`%4.4s' cmd:%d",
int i_ff_codec = CODEC_ID_MP2;
int i;
- id->b_switcher_audio = VLC_TRUE;
+ id->b_switcher_audio = true;
msg_Dbg( p_stream,
"creating audio switcher for fcc=`%4.4s' cmd:%d",
(char*)&p_fmt->i_codec, p_sys->i_cmd );
set_subcategory( SUBCAT_SOUT_STREAM );
set_section( N_("Video"), NULL );
add_string( SOUT_CFG_PREFIX "venc", NULL, NULL, VENC_TEXT,
- VENC_LONGTEXT, VLC_FALSE );
+ VENC_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "vcodec", NULL, NULL, VCODEC_TEXT,
- VCODEC_LONGTEXT, VLC_FALSE );
+ VCODEC_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "vb", 800 * 1000, NULL, VB_TEXT,
- VB_LONGTEXT, VLC_FALSE );
+ VB_LONGTEXT, false );
add_float( SOUT_CFG_PREFIX "scale", 1, NULL, SCALE_TEXT,
- SCALE_LONGTEXT, VLC_FALSE );
+ SCALE_LONGTEXT, false );
add_float( SOUT_CFG_PREFIX "fps", 0, NULL, FPS_TEXT,
- FPS_LONGTEXT, VLC_FALSE );
- add_bool( SOUT_CFG_PREFIX "hurry-up", VLC_TRUE, NULL, HURRYUP_TEXT,
- HURRYUP_LONGTEXT, VLC_FALSE );
+ FPS_LONGTEXT, false );
+ add_bool( SOUT_CFG_PREFIX "hurry-up", true, NULL, HURRYUP_TEXT,
+ HURRYUP_LONGTEXT, false );
add_bool( SOUT_CFG_PREFIX "deinterlace", 0, NULL, DEINTERLACE_TEXT,
- DEINTERLACE_LONGTEXT, VLC_FALSE );
+ DEINTERLACE_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "deinterlace-module", "deinterlace", NULL,
DEINTERLACE_MODULE_TEXT, DEINTERLACE_MODULE_LONGTEXT,
- VLC_FALSE );
+ false );
change_string_list( ppsz_deinterlace_type, 0, 0 );
add_integer( SOUT_CFG_PREFIX "width", 0, NULL, WIDTH_TEXT,
- WIDTH_LONGTEXT, VLC_TRUE );
+ WIDTH_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "height", 0, NULL, HEIGHT_TEXT,
- HEIGHT_LONGTEXT, VLC_TRUE );
+ HEIGHT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "maxwidth", 0, NULL, MAXWIDTH_TEXT,
- MAXWIDTH_LONGTEXT, VLC_TRUE );
+ MAXWIDTH_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "maxheight", 0, NULL, MAXHEIGHT_TEXT,
- MAXHEIGHT_LONGTEXT, VLC_TRUE );
+ MAXHEIGHT_LONGTEXT, true );
add_module_list( SOUT_CFG_PREFIX "vfilter", "video filter2",
NULL, NULL,
- VFILTER_TEXT, VFILTER_LONGTEXT, VLC_FALSE );
+ VFILTER_TEXT, VFILTER_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "croptop", 0, NULL, CROPTOP_TEXT,
- CROPTOP_LONGTEXT, VLC_TRUE );
+ CROPTOP_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "cropleft", 0, NULL, CROPLEFT_TEXT,
- CROPLEFT_LONGTEXT, VLC_TRUE );
+ CROPLEFT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "cropbottom", 0, NULL, CROPBOTTOM_TEXT,
- CROPBOTTOM_LONGTEXT, VLC_TRUE );
+ CROPBOTTOM_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "cropright", 0, NULL, CROPRIGHT_TEXT,
- CROPRIGHT_LONGTEXT, VLC_TRUE );
+ CROPRIGHT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "paddtop", 0, NULL, PADDTOP_TEXT,
- PADDTOP_LONGTEXT, VLC_TRUE );
+ PADDTOP_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "paddleft", 0, NULL, PADDLEFT_TEXT,
- PADDLEFT_LONGTEXT, VLC_TRUE );
+ PADDLEFT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "paddbottom", 0, NULL, PADDBOTTOM_TEXT,
- PADDBOTTOM_LONGTEXT, VLC_TRUE );
+ PADDBOTTOM_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "paddright", 0, NULL, PADDRIGHT_TEXT,
- PADDRIGHT_LONGTEXT, VLC_TRUE );
+ PADDRIGHT_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "canvas-width", 0, NULL, CANVAS_WIDTH_TEXT,
- CANVAS_WIDTH_LONGTEXT, VLC_TRUE );
+ CANVAS_WIDTH_LONGTEXT, true );
add_integer( SOUT_CFG_PREFIX "canvas-height", 0, NULL, CANVAS_HEIGHT_TEXT,
- CANVAS_HEIGHT_LONGTEXT, VLC_TRUE );
+ CANVAS_HEIGHT_LONGTEXT, true );
add_string( SOUT_CFG_PREFIX "canvas-aspect", NULL, NULL, CANVAS_ASPECT_TEXT,
- CANVAS_ASPECT_LONGTEXT, VLC_FALSE );
+ CANVAS_ASPECT_LONGTEXT, false );
set_section( N_("Audio"), NULL );
add_string( SOUT_CFG_PREFIX "aenc", NULL, NULL, AENC_TEXT,
- AENC_LONGTEXT, VLC_FALSE );
+ AENC_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "acodec", NULL, NULL, ACODEC_TEXT,
- ACODEC_LONGTEXT, VLC_FALSE );
+ ACODEC_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "ab", 0, NULL, AB_TEXT,
- AB_LONGTEXT, VLC_FALSE );
+ AB_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "channels", 0, NULL, ACHANS_TEXT,
- ACHANS_LONGTEXT, VLC_FALSE );
+ ACHANS_LONGTEXT, false );
add_integer( SOUT_CFG_PREFIX "samplerate", 0, NULL, ARATE_TEXT,
- ARATE_LONGTEXT, VLC_TRUE );
+ ARATE_LONGTEXT, true );
add_bool( SOUT_CFG_PREFIX "audio-sync", 0, NULL, ASYNC_TEXT,
- ASYNC_LONGTEXT, VLC_FALSE );
+ ASYNC_LONGTEXT, false );
add_module_list( SOUT_CFG_PREFIX "afilter", "audio filter2",
NULL, NULL,
- AFILTER_TEXT, AFILTER_LONGTEXT, VLC_FALSE );
+ AFILTER_TEXT, AFILTER_LONGTEXT, false );
set_section( N_("Overlays/Subtitles"), NULL );
add_string( SOUT_CFG_PREFIX "senc", NULL, NULL, SENC_TEXT,
- SENC_LONGTEXT, VLC_FALSE );
+ SENC_LONGTEXT, false );
add_string( SOUT_CFG_PREFIX "scodec", NULL, NULL, SCODEC_TEXT,
- SCODEC_LONGTEXT, VLC_FALSE );
+ SCODEC_LONGTEXT, false );
add_bool( SOUT_CFG_PREFIX "soverlay", 0, NULL, SCODEC_TEXT,
- SCODEC_LONGTEXT, VLC_FALSE );
+ SCODEC_LONGTEXT, false );
add_module_list( SOUT_CFG_PREFIX "sfilter", "video filter",
NULL, NULL,
- SFILTER_TEXT, SFILTER_LONGTEXT, VLC_FALSE );
+ SFILTER_TEXT, SFILTER_LONGTEXT, false );
set_section( N_("On Screen Display"), NULL );
add_bool( SOUT_CFG_PREFIX "osd", 0, NULL, OSD_TEXT,
- OSD_LONGTEXT, VLC_FALSE );
+ OSD_LONGTEXT, false );
set_section( N_("Miscellaneous"), NULL );
add_integer( SOUT_CFG_PREFIX "threads", 0, NULL, THREADS_TEXT,
- THREADS_LONGTEXT, VLC_TRUE );
+ THREADS_LONGTEXT, true );
add_bool( SOUT_CFG_PREFIX "high-priority", 0, NULL, HP_TEXT, HP_LONGTEXT,
- VLC_TRUE );
+ true );
vlc_module_end();
double f_fps;
unsigned int i_width, i_maxwidth;
unsigned int i_height, i_maxheight;
- vlc_bool_t b_deinterlace;
+ bool b_deinterlace;
char *psz_deinterlace;
config_chain_t *p_deinterlace_cfg;
int i_threads;
- vlc_bool_t b_high_priority;
- vlc_bool_t b_hurry_up;
+ bool b_high_priority;
+ bool b_hurry_up;
char *psz_vfilters[TRANSCODE_FILTERS];
config_chain_t *p_vfilters_cfg[TRANSCODE_FILTERS];
int i_vfilters;
/* SPU */
vlc_fourcc_t i_scodec; /* codec spu (0 if not transcode) */
char *psz_senc;
- vlc_bool_t b_soverlay;
+ bool b_soverlay;
config_chain_t *p_spu_cfg;
spu_t *p_spu;
vlc_fourcc_t i_osdcodec; /* codec osd menu (0 if not transcode) */
char *psz_osdenc;
config_chain_t *p_osd_cfg;
- vlc_bool_t b_osd; /* VLC_TRUE when osd es is registered */
+ bool b_osd; /* true when osd es is registered */
/* Sync */
- vlc_bool_t b_master_sync;
+ bool b_master_sync;
mtime_t i_master_drift;
};
p_sys->psz_osdenc = NULL;
p_sys->p_osd_cfg = NULL;
p_sys->i_osdcodec = 0;
- p_sys->b_osd = VLC_FALSE;
+ p_sys->b_osd = false;
var_Get( p_stream, SOUT_CFG_PREFIX "osd", &val );
if( val.b_bool )
/* Audio settings */
var_Get( p_stream, SOUT_CFG_PREFIX "audio-sync", &val );
p_sys->b_master_sync = val.b_bool;
- if( p_sys->f_fps > 0 ) p_sys->b_master_sync = VLC_TRUE;
+ if( p_sys->f_fps > 0 ) p_sys->b_master_sync = true;
p_stream->pf_add = Add;
p_stream->pf_del = Del;
vlc_object_attach( id->p_decoder, p_stream );
id->p_decoder->p_module = NULL;
id->p_decoder->fmt_in = *p_fmt;
- id->p_decoder->b_pace_control = VLC_TRUE;
+ id->p_decoder->b_pace_control = true;
/* Create encoder object */
id->p_encoder = vlc_object_create( p_stream, VLC_OBJECT_ENCODER );
/* Open output stream */
id->id = p_sys->p_out->pf_add( p_sys->p_out, &id->p_encoder->fmt_out );
- id->b_transcode = VLC_TRUE;
+ id->b_transcode = true;
if( !id->id )
{
/* Stream will be added later on because we don't know
* all the characteristics of the decoded stream yet */
- id->b_transcode = VLC_TRUE;
+ id->b_transcode = true;
if( p_sys->f_fps > 0 )
{
/* open output stream */
id->id = p_sys->p_out->pf_add( p_sys->p_out, &id->p_encoder->fmt_out );
- id->b_transcode = VLC_TRUE;
+ id->b_transcode = true;
if( !id->id )
{
msg_Dbg( p_stream, "subtitles (fcc=`%4.4s') overlaying",
(char*)&p_fmt->i_codec );
- id->b_transcode = VLC_TRUE;
+ id->b_transcode = true;
/* Build decoder -> filter -> overlaying chain */
if( transcode_spu_new( p_stream, id ) )
"to fcc=`%4.4s'", (char*)&p_fmt->i_codec,
(char*)&p_sys->i_scodec );
- id->b_transcode = VLC_TRUE;
+ id->b_transcode = true;
/* Create a fake OSD menu elementary stream */
if( transcode_osd_new( p_stream, id ) )
msg_Err( p_stream, "cannot create osd chain" );
goto error;
}
- p_sys->b_osd = VLC_TRUE;
+ p_sys->b_osd = true;
}
else
{
msg_Dbg( p_stream, "not transcoding a stream (fcc=`%4.4s')",
(char*)&p_fmt->i_codec );
id->id = p_sys->p_out->pf_add( p_sys->p_out, p_fmt );
- id->b_transcode = VLC_FALSE;
+ id->b_transcode = false;
if( !id->id ) goto error;
}
p_filter->p_cfg = p_sys->p_afilters_cfg[id->i_ufilter];
p_filter->p_module = module_Need( p_filter, "audio filter2", psz_name,
- VLC_TRUE );
+ true );
if( p_filter->p_module )
{
p_filter->fmt_out.audio.i_bitspersample =
id->p_encoder->p_cfg = p_stream->p_sys->p_audio_cfg;
id->p_encoder->p_module =
- module_Need( id->p_encoder, "encoder", p_sys->psz_aenc, VLC_TRUE );
+ module_Need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
if( !id->p_encoder->p_module )
{
msg_Err( p_stream, "cannot find encoder (%s)", p_sys->psz_aenc );
/* reload encoder */
id->p_encoder->p_cfg = p_stream->p_sys->p_audio_cfg;
id->p_encoder->p_module =
- module_Need( id->p_encoder, "encoder", p_sys->psz_aenc, VLC_TRUE );
+ module_Need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
if( !id->p_encoder->p_module )
{
msg_Err( p_stream, "cannot find encoder (%s)", p_sys->psz_aenc );
p_buffer = malloc( sizeof(aout_buffer_t) );
if( !p_buffer ) return NULL;
- p_buffer->b_discontinuity = VLC_FALSE;
+ p_buffer->b_discontinuity = false;
p_buffer->pf_release = audio_release_buffer;
p_buffer->p_sys = p_block = block_New( p_dec, i_size );
p_filter->p_cfg = p_cfg;
p_filter->p_module = module_Need( p_filter, "video filter2",
- psz_name, VLC_TRUE );
+ psz_name, true );
if( !p_filter->p_module )
{
msg_Dbg( p_stream, "no video filter found" );
id->p_encoder->p_cfg = p_sys->p_video_cfg;
id->p_encoder->p_module =
- module_Need( id->p_encoder, "encoder", p_sys->psz_venc, VLC_TRUE );
+ module_Need( id->p_encoder, "encoder", p_sys->psz_venc, true );
if( !id->p_encoder->p_module )
{
msg_Err( p_stream, "cannot find encoder (%s)", p_sys->psz_venc );
p_sys->p_buffers = NULL;
p_sys->b_die = p_sys->b_error = 0;
if( vlc_thread_create( p_sys, "encoder", EncoderThread, i_priority,
- VLC_FALSE ) )
+ false ) )
{
msg_Err( p_stream, "cannot spawn encoder thread" );
module_Unneed( id->p_decoder, id->p_decoder->p_module );
msg_Dbg( p_stream, "encoder aspect is %i:%i", id->p_encoder->fmt_out.video.i_aspect, VOUT_ASPECT_FACTOR );
id->p_encoder->p_module =
- module_Need( id->p_encoder, "encoder", p_sys->psz_venc, VLC_TRUE );
+ module_Need( id->p_encoder, "encoder", p_sys->psz_venc, true );
if( !id->p_encoder->p_module )
{
msg_Err( p_stream, "cannot find encoder (%s)", p_sys->psz_venc );
{
p_pic->pf_release( p_pic );
transcode_video_close( p_stream, id );
- id->b_transcode = VLC_FALSE;
+ id->b_transcode = false;
return VLC_EGENERIC;
}
{
p_pic->pf_release( p_pic );
transcode_video_close( p_stream, id );
- id->b_transcode = VLC_FALSE;
+ id->b_transcode = false;
return VLC_EGENERIC;
}
id->i_filter++;
{
p_pic->pf_release( p_pic );
transcode_video_close( p_stream, id );
- id->b_transcode = VLC_FALSE;
+ id->b_transcode = false;
return VLC_EGENERIC;
}
if( p_sys->p_spu )
{
p_subpic = spu_SortSubpictures( p_sys->p_spu, p_pic->date,
- VLC_FALSE /* Fixme: check if stream is paused */ );
+ false /* Fixme: check if stream is paused */ );
/* TODO: get another pic */
}
id->p_encoder->p_cfg = p_sys->p_spu_cfg;
id->p_encoder->p_module =
- module_Need( id->p_encoder, "encoder", p_sys->psz_senc, VLC_TRUE );
+ module_Need( id->p_encoder, "encoder", p_sys->psz_senc, true );
if( !id->p_encoder->p_module )
{
id->p_encoder->p_cfg = p_sys->p_osd_cfg;
id->p_encoder->p_module =
- module_Need( id->p_encoder, "encoder", p_sys->psz_osdenc, VLC_TRUE );
+ module_Need( id->p_encoder, "encoder", p_sys->psz_osdenc, true );
if( !id->p_encoder->p_module )
{
/* open output stream */
id->id = p_sys->p_out->pf_add( p_sys->p_out, &id->p_encoder->fmt_out );
- id->b_transcode = VLC_TRUE;
+ id->b_transcode = true;
if( !id->id ) goto error;
}
msg_Dbg( p_stream, "not transcoding a stream (fcc=`%4.4s')",
(char*)&id->p_decoder->fmt_out.i_codec );
id->id = p_sys->p_out->pf_add( p_sys->p_out, &id->p_decoder->fmt_out );
- id->b_transcode = VLC_FALSE;
+ id->b_transcode = false;
if( !id->id ) goto error;
}
msg_Err( p_stream, "starting osd encoding thread failed" );
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module );
- p_sys->b_osd = VLC_FALSE;
+ p_sys->b_osd = false;
return VLC_EGENERIC;
}
if( id->p_encoder->p_module )
module_Unneed( id->p_encoder, id->p_encoder->p_module );
}
- p_sys->b_osd = VLC_FALSE;
+ p_sys->b_osd = false;
}
static int transcode_osd_process( sout_stream_t *p_stream,
/* Check if we have a subpicture to send */
if( p_sys->p_spu && in->i_dts > 0)
{
- p_subpic = spu_SortSubpictures( p_sys->p_spu, in->i_dts, VLC_FALSE );
+ p_subpic = spu_SortSubpictures( p_sys->p_spu, in->i_dts, false );
}
else
{
/* open output stream */
id->id = p_sys->p_out->pf_add( p_sys->p_out, p_fmt );
- id->b_transrate = VLC_TRUE;
+ id->b_transrate = true;
}
else
{
msg_Dbg( p_stream, "not transrating a stream (fcc=`%4.4s')", (char*)&p_fmt->i_codec );
id->id = p_sys->p_out->pf_add( p_sys->p_out, p_fmt );
- id->b_transrate = VLC_FALSE;
+ id->b_transrate = false;
if( id->id == NULL )
{
unsigned int new_quantizer_scale;
unsigned int last_coded_scale;
int h_offset, v_offset;
- vlc_bool_t b_error;
+ bool b_error;
// mb
double qrate;
struct sout_stream_id_t
{
void *id;
- vlc_bool_t b_transrate;
+ bool b_transrate;
block_t *p_current_buffer;
block_t *p_next_gop;
# include "i420_rgb_mmx.h"
#endif
-static void SetOffset( int, int, int, int, vlc_bool_t *,
+static void SetOffset( int, int, int, int, bool *,
unsigned int *, int * );
#if defined (MODULE_NAME_IS_i420_rgb)
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
unsigned int i_real_y; /* y % 4 */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
unsigned int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
* It will also set horizontal and vertical scaling indicators.
*****************************************************************************/
static void SetOffset( int i_width, int i_height, int i_pic_width,
- int i_pic_height, vlc_bool_t *pb_hscale,
+ int i_pic_height, bool *pb_hscale,
unsigned int *pi_vscale, int *p_offset )
{
int i_x; /* x position in destination */
#include "i420_rgb.h"
#include "i420_rgb_c.h"
-static void SetOffset( int, int, int, int, vlc_bool_t *, int *, int * );
+static void SetOffset( int, int, int, int, bool *, int *, int * );
/*****************************************************************************
* I420_RGB8: color YUV 4:2:0 to RGB 8 bpp
uint8_t *p_u = p_src->U_PIXELS;
uint8_t *p_v = p_src->V_PIXELS;
- vlc_bool_t b_hscale; /* horizontal scaling type */
+ bool b_hscale; /* horizontal scaling type */
int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
unsigned int i_real_y; /* y % 4 */
* structure has interleaved Y and U/V offsets.
*****************************************************************************/
static void SetOffset( int i_width, int i_height, int i_pic_width,
- int i_pic_height, vlc_bool_t *pb_hscale,
+ int i_pic_height, bool *pb_hscale,
int *pi_vscale, int *p_offset )
{
int i_x; /* x position in destination */
const int i_source_margin = p_source->p->i_pitch
- p_source->p->i_visible_pitch;
- vlc_bool_t b_skip = VLC_FALSE;
+ bool b_skip = false;
for( i_y = p_vout->output.i_height ; i_y-- ; )
{
const int i_source_margin = p_source->p->i_pitch
- p_source->p->i_visible_pitch;
- vlc_bool_t b_skip = VLC_FALSE;
+ bool b_skip = false;
for( i_y = p_vout->output.i_height ; i_y-- ; )
{
const int i_source_margin = p_source->p->i_pitch
- p_source->p->i_visible_pitch;
- vlc_bool_t b_skip = VLC_FALSE;
+ bool b_skip = false;
for( i_y = p_vout->output.i_height ; i_y-- ; )
{
const int i_source_margin = p_source->p->i_pitch
- p_source->p->i_visible_pitch;
- vlc_bool_t b_skip = VLC_FALSE;
+ bool b_skip = false;
for( i_y = p_vout->output.i_height ; i_y-- ; )
{
set_capability( "video filter2", 0 );
add_float_with_range( "contrast", 1.0, 0.0, 2.0, NULL,
- CONT_TEXT, CONT_LONGTEXT, VLC_FALSE );
+ CONT_TEXT, CONT_LONGTEXT, false );
add_float_with_range( "brightness", 1.0, 0.0, 2.0, NULL,
- LUM_TEXT, LUM_LONGTEXT, VLC_FALSE );
+ LUM_TEXT, LUM_LONGTEXT, false );
add_integer_with_range( "hue", 0, 0, 360, NULL,
- HUE_TEXT, HUE_LONGTEXT, VLC_FALSE );
+ HUE_TEXT, HUE_LONGTEXT, false );
add_float_with_range( "saturation", 1.0, 0.0, 3.0, NULL,
- SAT_TEXT, SAT_LONGTEXT, VLC_FALSE );
+ SAT_TEXT, SAT_LONGTEXT, false );
add_float_with_range( "gamma", 1.0, 0.01, 10.0, NULL,
- GAMMA_TEXT, GAMMA_LONGTEXT, VLC_FALSE );
+ GAMMA_TEXT, GAMMA_LONGTEXT, false );
add_bool( "brightness-threshold", 0, NULL,
- THRES_TEXT, THRES_LONGTEXT, VLC_FALSE );
+ THRES_TEXT, THRES_LONGTEXT, false );
add_shortcut( "adjust" );
set_callbacks( Create, Destroy );
int i_hue;
double f_saturation;
double f_gamma;
- vlc_bool_t b_brightness_threshold;
+ bool b_brightness_threshold;
};
/*****************************************************************************
uint8_t *p_in, *p_in_v, *p_in_end, *p_line_end;
uint8_t *p_out, *p_out_v;
- vlc_bool_t b_thres;
+ bool b_thres;
double f_hue;
double f_gamma;
int32_t i_cont, i_lum;
/*
* Threshold mode drops out everything about luma, contrast and gamma.
*/
- if( b_thres != VLC_TRUE )
+ if( b_thres != true )
{
/* Contrast is a fast but kludged function, so I put this gap to be
int i_lines, i_visible_lines, i_pitch, i_visible_pitch;
- vlc_bool_t b_thres;
+ bool b_thres;
double f_hue;
double f_gamma;
int32_t i_cont, i_lum;
/*
* Threshold mode drops out everything about luma, contrast and gamma.
*/
- if( b_thres != VLC_TRUE )
+ if( b_thres != true )
{
/* Contrast is a fast but kludged function, so I put this gap to be
set_callbacks( Create, Destroy );
add_string( CFG_PREFIX "mask", NULL, NULL, MASK_TEXT,
- MASK_LONGTEXT, VLC_FALSE );
+ MASK_LONGTEXT, false );
vlc_module_end();
static const char *ppsz_filter_options[] = {
/* some things need to be changed if this code is used inside VideoLan Filter Module */
# define _ATMO_VLC_PLUGIN_
-# define ATMO_BOOL vlc_bool_t
-# define ATMO_TRUE VLC_TRUE
-# define ATMO_FALSE VLC_FALSE
+# define ATMO_BOOL bool
+# define ATMO_TRUE true
+# define ATMO_FALSE false
#else
vlc_mutex_lock( &m_WakeupLock );
- while ((this->m_bTerminated == ATMO_FALSE) && (this->m_pAtmoThread->b_die == VLC_FALSE)) {
+ while ((this->m_bTerminated == ATMO_FALSE) && (this->m_pAtmoThread->b_die == false)) {
int value = vlc_cond_timedwait(&m_WakeupCond, &m_WakeupLock, mdate() + I64C(75000));
if(!value) {
/* DeliverNewSourceDataPaket delivered new work for me... get it! */
m_bTerminated = ATMO_FALSE;
#if defined(_ATMO_VLC_PLUGIN_)
- m_pAtmoThread->b_die = VLC_FALSE;
+ m_pAtmoThread->b_die = false;
if(vlc_thread_create( m_pAtmoThread,
"Atmo-CThread-Class",
CThread::ThreadProc,
VLC_THREAD_PRIORITY_LOW,
- VLC_FALSE ))
+ false ))
{
msg_Err( m_pOwner, "cannot launch one of the AtmoLight threads");
}
only on win32 exists the option to use the buildin driver or
the more flexible external driver application
*/
-add_bool(CFG_PREFIX "usebuildin", VLC_TRUE, NULL,
- USEBUILDIN_TEXT, USEBUILDIN_LONGTEXT, VLC_FALSE);
+add_bool(CFG_PREFIX "usebuildin", true, NULL,
+ USEBUILDIN_TEXT, USEBUILDIN_LONGTEXT, false);
add_string(CFG_PREFIX "serialdev", "COM1", NULL,
- SERIALDEV_TEXT, SERIALDEV_LONGTEXT, VLC_FALSE );
+ SERIALDEV_TEXT, SERIALDEV_LONGTEXT, false );
/*
on win32 the executeable external driver application
for automatic start if needed
*/
add_file(CFG_PREFIX "atmowinexe", NULL, NULL,
- ATMOWINEXE_TEXT, ATMOWINEXE_LONGTEXT, VLC_FALSE );
+ ATMOWINEXE_TEXT, ATMOWINEXE_LONGTEXT, false );
#else
set_section( N_("Enter connection of your AtmoLight hardware" ), 0 );
add_string(CFG_PREFIX "serialdev", "/dev/ttyS01", NULL,
- SERIALDEV_TEXT, SERIALDEV_LONGTEXT, VLC_FALSE );
+ SERIALDEV_TEXT, SERIALDEV_LONGTEXT, false );
#endif
/*
your movie ... used for both buildin / external
*/
set_section( N_("Illuminate the room with this color on pause" ), 0 );
-add_bool(CFG_PREFIX "usepausecolor", VLC_FALSE, NULL,
- PCOLOR_TEXT, PCOLOR_LONGTEXT, VLC_FALSE);
+add_bool(CFG_PREFIX "usepausecolor", false, NULL,
+ PCOLOR_TEXT, PCOLOR_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "pcolor-red", 0, 0, 255, NULL,
- PCOLOR_RED_TEXT, PCOLOR_RED_LONGTEXT, VLC_FALSE);
+ PCOLOR_RED_TEXT, PCOLOR_RED_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "pcolor-green", 0, 0, 255, NULL,
- PCOLOR_GREEN_TEXT, PCOLOR_GREEN_LONGTEXT, VLC_FALSE);
+ PCOLOR_GREEN_TEXT, PCOLOR_GREEN_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "pcolor-blue", 192, 0, 255, NULL,
- PCOLOR_BLUE_TEXT, PCOLOR_BLUE_LONGTEXT, VLC_FALSE);
+ PCOLOR_BLUE_TEXT, PCOLOR_BLUE_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "fadesteps", 50, 1, 250, NULL,
- FADESTEPS_TEXT, FADESTEPS_LONGTEXT, VLC_FALSE);
+ FADESTEPS_TEXT, FADESTEPS_LONGTEXT, false);
/*
color which is showed if you finished watching your movie ...
*/
set_section( N_("Illuminate the room with this color on shutdown" ), 0 );
add_integer_with_range(CFG_PREFIX "ecolor-red", 192, 0, 255, NULL,
- ECOLOR_RED_TEXT, ECOLOR_RED_LONGTEXT, VLC_FALSE);
+ ECOLOR_RED_TEXT, ECOLOR_RED_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "ecolor-green", 192, 0, 255, NULL,
- ECOLOR_GREEN_TEXT, ECOLOR_GREEN_LONGTEXT, VLC_FALSE);
+ ECOLOR_GREEN_TEXT, ECOLOR_GREEN_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "ecolor-blue", 192, 0, 255, NULL,
- ECOLOR_BLUE_TEXT, ECOLOR_BLUE_LONGTEXT, VLC_FALSE);
+ ECOLOR_BLUE_TEXT, ECOLOR_BLUE_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "efadesteps", 50, 1, 250, NULL,
- EFADESTEPS_TEXT, EFADESTEPS_LONGTEXT, VLC_FALSE);
+ EFADESTEPS_TEXT, EFADESTEPS_LONGTEXT, false);
/*
settings only for the buildin driver (if external driver app is used
set_section( N_("Settings only for buildin Live Video Processor" ), 0 );
add_integer_with_range(CFG_PREFIX "EdgeWeightning", 8, 1, 30, NULL,
- EDGE_TEXT, EDGE_LONGTEXT, VLC_FALSE);
+ EDGE_TEXT, EDGE_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "Brightness", 100, 50, 300, NULL,
- BRIGHTNESS_TEXT, BRIGHTNESS_LONGTEXT, VLC_FALSE);
+ BRIGHTNESS_TEXT, BRIGHTNESS_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "DarknessLimit", 5, 0, 10, NULL,
- DARKNESS_TEXT, DARKNESS_LONGTEXT, VLC_FALSE);
+ DARKNESS_TEXT, DARKNESS_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "HueWinSize", 3, 0, 5, NULL,
- HUEWINSIZE_TEXT, HUEWINSIZE_LONGTEXT, VLC_FALSE);
+ HUEWINSIZE_TEXT, HUEWINSIZE_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "SatWinSize", 3, 0, 5, NULL,
- SATWINSIZE_TEXT, SATWINSIZE_LONGTEXT, VLC_FALSE);
+ SATWINSIZE_TEXT, SATWINSIZE_LONGTEXT, false);
add_integer(CFG_PREFIX "filtermode", (int)afmCombined, NULL,
- FILTERMODE_TEXT, FILTERMODE_LONGTEXT, VLC_FALSE );
+ FILTERMODE_TEXT, FILTERMODE_LONGTEXT, false );
change_integer_list(pi_filtermode_values, ppsz_filtermode_descriptions, 0 );
add_integer_with_range(CFG_PREFIX "MeanLength", 300, 300, 5000, NULL,
- MEANLENGTH_TEXT, MEANLENGTH_LONGTEXT, VLC_FALSE);
+ MEANLENGTH_TEXT, MEANLENGTH_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "MeanThreshold", 40, 1, 100, NULL,
- MEANTHRESHOLD_TEXT, MEANTHRESHOLD_LONGTEXT, VLC_FALSE);
+ MEANTHRESHOLD_TEXT, MEANTHRESHOLD_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "PercentNew", 50, 1, 100, NULL,
- MEANPERCENTNEW_TEXT, MEANPERCENTNEW_LONGTEXT, VLC_FALSE);
+ MEANPERCENTNEW_TEXT, MEANPERCENTNEW_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "FrameDelay", 18, 0, 35, NULL,
- FRAMEDELAY_TEXT, FRAMEDELAY_LONGTEXT, VLC_FALSE);
+ FRAMEDELAY_TEXT, FRAMEDELAY_LONGTEXT, false);
/*
output channel reordering
*/
set_section( N_("Change channel assignment (fixes wrong wiring)" ), 0 );
add_integer( CFG_PREFIX "channel_0", 0, NULL,
- CHANNEL_0_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, VLC_FALSE );
+ CHANNEL_0_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, false );
change_integer_list( pi_channel_assignment_values,
ppsz_channel_assignment_descriptions, 0 );
add_integer( CFG_PREFIX "channel_1", 1, NULL,
- CHANNEL_1_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, VLC_FALSE );
+ CHANNEL_1_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, false );
change_integer_list( pi_channel_assignment_values,
ppsz_channel_assignment_descriptions, 0 );
add_integer( CFG_PREFIX "channel_2", 2, NULL,
- CHANNEL_2_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, VLC_FALSE );
+ CHANNEL_2_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, false );
change_integer_list( pi_channel_assignment_values,
ppsz_channel_assignment_descriptions, 0 );
add_integer( CFG_PREFIX "channel_3", 3, NULL,
- CHANNEL_3_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, VLC_FALSE );
+ CHANNEL_3_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, false );
change_integer_list( pi_channel_assignment_values,
ppsz_channel_assignment_descriptions, 0 );
add_integer( CFG_PREFIX "channel_4", 4, NULL,
- CHANNEL_4_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, VLC_FALSE );
+ CHANNEL_4_ASSIGN_TEXT, CHANNELASSIGN_LONGTEXT, false );
change_integer_list( pi_channel_assignment_values,
ppsz_channel_assignment_descriptions, 0 );
LED color white calibration
*/
set_section( N_("Adjust the white light to your LED stripes" ), 0 );
-add_bool(CFG_PREFIX "whiteadj", VLC_TRUE, NULL,
- USEWHITEADJ_TEXT, USEWHITEADJ_LONGTEXT, VLC_FALSE);
+add_bool(CFG_PREFIX "whiteadj", true, NULL,
+ USEWHITEADJ_TEXT, USEWHITEADJ_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "white-red", 255, 0, 255, NULL,
- WHITE_RED_TEXT, WHITE_RED_LONGTEXT, VLC_FALSE);
+ WHITE_RED_TEXT, WHITE_RED_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "white-green", 255, 0, 255, NULL,
- WHITE_GREEN_TEXT, WHITE_GREEN_LONGTEXT, VLC_FALSE);
+ WHITE_GREEN_TEXT, WHITE_GREEN_LONGTEXT, false);
add_integer_with_range(CFG_PREFIX "white-blue", 255, 0, 255, NULL,
- WHITE_BLUE_TEXT, WHITE_BLUE_LONGTEXT, VLC_FALSE);
+ WHITE_BLUE_TEXT, WHITE_BLUE_LONGTEXT, false);
/* end of definition of parameter for the buildin filter ... part 1 */
*/
set_section( N_("Change gradients" ), 0 );
add_file(CFG_PREFIX "gradient_zone_0", NULL, NULL,
- ZONE_0_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, VLC_TRUE );
+ ZONE_0_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, true );
add_file(CFG_PREFIX "gradient_zone_1", NULL, NULL,
- ZONE_1_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, VLC_TRUE );
+ ZONE_1_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, true );
add_file(CFG_PREFIX "gradient_zone_2", NULL, NULL,
- ZONE_2_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, VLC_TRUE );
+ ZONE_2_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, true );
add_file(CFG_PREFIX "gradient_zone_3", NULL, NULL,
- ZONE_3_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, VLC_TRUE );
+ ZONE_3_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, true );
add_file(CFG_PREFIX "gradient_zone_4", NULL, NULL,
- ZONE_4_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, VLC_TRUE );
+ ZONE_4_GRADIENT_TEXT, ZONE_X_GRADIENT_LONG_TEXT, true );
#if defined(__ATMO_DEBUG__)
-add_bool(CFG_PREFIX "saveframes", VLC_FALSE, NULL,
- SAVEFRAMES_TEXT, SAVEFRAMES_LONGTEXT, VLC_FALSE);
+add_bool(CFG_PREFIX "saveframes", false, NULL,
+ SAVEFRAMES_TEXT, SAVEFRAMES_LONGTEXT, false);
add_string(CFG_PREFIX "framepath", "", NULL,
- FRAMEPATH_TEXT, FRAMEPATH_LONGTEXT, VLC_FALSE );
+ FRAMEPATH_TEXT, FRAMEPATH_LONGTEXT, false );
#endif
/*
may be later if computers gets more power ;-) than now we increase
the samplesize from which we do the stats for output color calculation
*/
add_integer_with_range(CFG_PREFIX "width", 64, 64, 512, NULL,
- WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE);
+ WIDTH_TEXT, WIDTH_LONGTEXT, true);
add_integer_with_range(CFG_PREFIX "height", 48, 48, 384, NULL,
- HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE);
+ HEIGHT_TEXT, HEIGHT_LONGTEXT, true);
add_shortcut( "atmo" );
set_callbacks( CreateFilter, DestroyFilter );
*/
vlc_mutex_t filter_lock;
- vlc_bool_t b_enabled;
+ bool b_enabled;
int32_t i_AtmoOldEffect;
- vlc_bool_t b_pause_live;
+ bool b_pause_live;
int32_t i_atmo_width;
int32_t i_atmo_height;
#if defined(__ATMO_DEBUG__)
- vlc_bool_t b_saveframes;
+ bool b_saveframes;
int i_framecounter;
char sz_framepath[MAX_PATH];
#endif
/* light color durring movie pause ... */
- vlc_bool_t b_usepausecolor;
+ bool b_usepausecolor;
uint8_t ui_pausecolor_red;
uint8_t ui_pausecolor_green;
uint8_t ui_pausecolor_blue;
Return Values may be: -1 (failed for some reason - filter will be disabled)
1 Ok. lets rock
*/
-static int32_t AtmoInitialize(filter_t *p_filter, vlc_bool_t b_for_thread)
+static int32_t AtmoInitialize(filter_t *p_filter, bool b_for_thread)
{
filter_sys_t *p_sys = p_filter->p_sys;
if(p_sys->p_atmo_config)
{
- if(b_for_thread == VLC_FALSE)
+ if(b_for_thread == false)
{
/* open com port */
/* setup Output Threads ... */
{
filter_sys_t *p_sys = p_filter->p_sys;
- if(p_sys->b_enabled == VLC_TRUE)
+ if(p_sys->b_enabled == true)
{
/*
if there is a still running show pause color thread kill him!
assume that the static color will equal to this
one to get a soft change and no flash!
*/
- p_sys->b_pause_live = VLC_TRUE;
+ p_sys->b_pause_live = true;
// perpare spawn fadeing thread
vlc_mutex_lock( &p_sys->filter_lock );
"AtmoLight fadeing",
FadeToColorThread,
VLC_THREAD_PRIORITY_LOW,
- VLC_FALSE ) )
+ false ) )
{
msg_Err( p_filter, "cannot create FadeToColorThread" );
vlc_object_release( p_sys->p_fadethread );
AtmoFinalize(p_filter, 1);
/* disable filter method .. */
- p_sys->b_enabled = VLC_FALSE;
+ p_sys->b_enabled = false;
}
}
*/
static void Atmo_SetupParameters(filter_t *p_filter)
{
- vlc_bool_t b_use_buildin_driver = VLC_TRUE;
+ bool b_use_buildin_driver = true;
char *psz_path;
filter_sys_t *p_sys = p_filter->p_sys;
/* default filter disabled until DLL loaded and Init Success!*/
- p_sys->b_enabled = VLC_FALSE;
+ p_sys->b_enabled = false;
/* setup default mini image size (may be later a user option) */
p_sys->i_atmo_width = 64;
b_use_buildin_driver = var_CreateGetBoolCommand( p_filter,
CFG_PREFIX "usebuildin" );
- if(b_use_buildin_driver == VLC_FALSE) {
+ if(b_use_buildin_driver == false) {
/* Load the Com Wrapper Library (source available) */
p_sys->h_AtmoCtrl = LoadLibraryA("AtmoCtrlLib.dll");
} else {
/* the DLL is missing try internal filter ...*/
msg_Warn( p_filter, "AtmoCtrlLib.dll missing fallback to internal driver");
- b_use_buildin_driver = VLC_TRUE;
+ b_use_buildin_driver = true;
}
}
#endif
- if(b_use_buildin_driver == VLC_TRUE) {
+ if(b_use_buildin_driver == true) {
msg_Dbg( p_filter, "use buildin driver");
/*
now we have to read a lof of options from the config dialog
/* if the external DLL was loaded successfully call AtmoInitialize -
(must be done for each thread where you wan't to use AtmoLight!
*/
- int i = AtmoInitialize(p_filter, VLC_FALSE);
+ int i = AtmoInitialize(p_filter, false);
#if defined( WIN32 )
if((i != 1) && !b_use_buildin_driver)
{
retry to initialize the library COM ... functionality
after the server was launched
*/
- i = AtmoInitialize(p_filter, VLC_FALSE);
+ i = AtmoInitialize(p_filter, false);
} else {
msg_Err(p_filter,"failed to launch AtmoWin from %s", psz_path);
}
AtmoSetLiveSource(p_filter, lvsExternal);
/* enable other parts only if everything is fine */
- p_sys->b_enabled = VLC_TRUE;
+ p_sys->b_enabled = true;
}
}
{
msg_Err( p_filter, "AtmoLight no transferbuffer available. "\
"AtmoLight will be disabled!");
- p_sys->b_enabled = VLC_FALSE;
+ p_sys->b_enabled = false;
return;
}
/*
if debugging enabled save every 128th image to disk
*/
- if((p_sys->b_saveframes == VLC_TRUE) && (p_sys->sz_framepath[0] != 0 ))
+ if((p_sys->b_saveframes == true) && (p_sys->sz_framepath[0] != 0 ))
{
if((p_sys->i_framecounter & 127) == 0)
filter_sys_t *p_sys = p_filter->p_sys;
if( !p_pic ) return NULL;
- if((p_sys->b_enabled == VLC_TRUE) &&
+ if((p_sys->b_enabled == true) &&
(p_sys->pf_extract_mini_image != NULL) &&
- (p_sys->b_pause_live == VLC_FALSE))
+ (p_sys->b_pause_live == false))
{
CreateMiniImage(p_filter, p_pic);
}
uint8_t *p_source = NULL;
/* initialize AtmoWin for this thread! */
- AtmoInitialize(p_fadethread->p_filter , VLC_TRUE);
+ AtmoInitialize(p_fadethread->p_filter , true);
uint8_t *p_transfer = AtmoLockTransferBuffer( p_fadethread->p_filter );
if(p_transfer != NULL) {
{
msg_Dbg(p_filter, "kill still running fadeing thread...");
- p_sys->p_fadethread->b_die = VLC_TRUE;
+ p_sys->p_fadethread->b_die = true;
vlc_thread_join(p_sys->p_fadethread);
filter_t *p_filter = (filter_t *)p_data;
filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
- if((p_sys->b_usepausecolor == VLC_TRUE) && (p_sys->b_enabled == VLC_TRUE))
+ if((p_sys->b_usepausecolor == true) && (p_sys->b_enabled == true))
{
msg_Dbg(p_filter, "state change from: %d to %d", oldval.i_int,
newval.i_int);
{
/* tell the other thread to stop sending images to light
controller */
- p_sys->b_pause_live = VLC_TRUE;
+ p_sys->b_pause_live = true;
// ggf. alten Thread abräumen should not happen....
CheckAndStopFadeThread(p_filter);
"AtmoLight fadeing",
FadeToColorThread,
VLC_THREAD_PRIORITY_LOW,
- VLC_FALSE) )
+ false) )
{
msg_Err( p_filter, "cannot create FadeToColorThread" );
vlc_object_release( p_sys->p_fadethread );
/* playback continues check thread state */
CheckAndStopFadeThread(p_filter);
/* reactivate the Render function... to do its normal work */
- p_sys->b_pause_live = VLC_FALSE;
+ p_sys->b_pause_live = false;
}
}
uint8_t *p_src1_v, *p_src2_v, *p_dst_v;
uint8_t *p_trans;
int i_x, i_y, i_trans = 0;
- vlc_bool_t b_even_scanline = i_y_offset % 2;
+ bool b_even_scanline = i_y_offset % 2;
i_dst_pitch = p_dst->p[Y_PLANE].i_pitch;
p_dst_y = p_dst->p[Y_PLANE].p_pixels + i_x_offset +
uint8_t *p_src2_u, *p_src2_v;
uint8_t *p_trans;
int i_x, i_y, i_pix_pitch, i_trans = 0;
- vlc_bool_t b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
+ bool b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
int i_l_offset = 0, i_u_offset = 0, i_v_offset = 0;
if( p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','U','Y','2') )
uint8_t *p_src1_u, *p_src2_u, *p_dst_u;
uint8_t *p_src1_v, *p_src2_v, *p_dst_v;
int i_x, i_y;
- vlc_bool_t b_even_scanline = i_y_offset % 2;
+ bool b_even_scanline = i_y_offset % 2;
i_dst_pitch = p_dst->p[Y_PLANE].i_pitch;
p_dst_y = p_dst->p[Y_PLANE].p_pixels + i_x_offset +
uint8_t *p_src1_u, *p_src2_u, *p_dst_u;
uint8_t *p_src1_v, *p_src2_v, *p_dst_v;
int i_y;
- vlc_bool_t b_even_scanline = i_y_offset % 2;
+ bool b_even_scanline = i_y_offset % 2;
i_dst_pitch = p_dst->p[Y_PLANE].i_pitch;
p_dst_y = p_dst->p[Y_PLANE].p_pixels + i_x_offset +
uint8_t *p_dst, *p_src1, *p_src2_y;
uint8_t *p_src2_u, *p_src2_v;
int i_x, i_y, i_pix_pitch;
- vlc_bool_t b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
+ bool b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
int i_l_offset = 0, i_u_offset = 0, i_v_offset = 0;
if( p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','U','Y','2') )
uint8_t *p_src1_u, *p_dst_u;
uint8_t *p_src1_v, *p_dst_v;
int i_x, i_y, i_trans;
- vlc_bool_t b_even_scanline = i_y_offset % 2;
+ bool b_even_scanline = i_y_offset % 2;
i_dst_pitch = p_dst->p[Y_PLANE].i_pitch;
p_dst_y = p_dst->p[Y_PLANE].p_pixels + i_x_offset +
int i_src1_pitch, i_src2_pitch, i_dst_pitch;
uint8_t *p_src1, *p_src2, *p_dst;
int i_x, i_y, i_pix_pitch, i_trans;
- vlc_bool_t b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
+ bool b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
int i_l_offset = 0, i_u_offset = 0, i_v_offset = 0;
if( p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','U','Y','2') )
int i_x, i_y, i_trans;
uint8_t y, u, v;
- vlc_bool_t b_even_scanline = i_y_offset % 2;
+ bool b_even_scanline = i_y_offset % 2;
i_dst_pitch = p_dst->p[Y_PLANE].i_pitch;
p_dst_y = p_dst->p[Y_PLANE].p_pixels + i_x_offset +
uint8_t *p_dst, *p_src1, *p_src2;
uint8_t *p_trans;
int i_x, i_y, i_pix_pitch, i_trans;
- vlc_bool_t b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
+ bool b_even = !((i_x_offset + p_filter->fmt_out.video.i_x_offset)%2);
int i_l_offset = 0, i_u_offset = 0, i_v_offset = 0;
uint8_t y, u, v;
set_section( N_("Benchmarking"), NULL );
add_integer( CFG_PREFIX "loops", 1000, NULL, LOOPS_TEXT,
- LOOPS_LONGTEXT, VLC_FALSE );
+ LOOPS_LONGTEXT, false );
add_integer_with_range( CFG_PREFIX "alpha", 128, 0, 255, NULL, ALPHA_TEXT,
- ALPHA_LONGTEXT, VLC_FALSE );
+ ALPHA_LONGTEXT, false );
set_section( N_("Base image"), NULL );
add_file( CFG_PREFIX "base-image", NULL, NULL, BASE_IMAGE_TEXT,
- BASE_IMAGE_LONGTEXT, VLC_FALSE );
+ BASE_IMAGE_LONGTEXT, false );
add_string( CFG_PREFIX "base-chroma", "I420", NULL, BASE_CHROMA_TEXT,
- BASE_CHROMA_LONGTEXT, VLC_FALSE );
+ BASE_CHROMA_LONGTEXT, false );
set_section( N_("Blend image"), NULL );
add_file( CFG_PREFIX "blend-image", NULL, NULL, BLEND_IMAGE_TEXT,
- BLEND_IMAGE_LONGTEXT, VLC_FALSE );
+ BLEND_IMAGE_LONGTEXT, false );
add_string( CFG_PREFIX "blend-chroma", "YUVA", NULL, BLEND_CHROMA_TEXT,
- BLEND_CHROMA_LONGTEXT, VLC_FALSE );
+ BLEND_CHROMA_LONGTEXT, false );
set_callbacks( Create, Destroy );
vlc_module_end();
*****************************************************************************/
struct filter_sys_t
{
- vlc_bool_t b_done;
+ bool b_done;
int i_loops, i_alpha;
picture_t *p_base_image;
return VLC_ENOMEM;
p_sys = p_filter->p_sys;
- p_sys->b_done = VLC_FALSE;
+ p_sys->b_done = false;
p_filter->pf_video_filter = Filter;
vlc_object_detach( p_blend );
vlc_object_release( p_blend );
- p_sys->b_done = VLC_TRUE;
+ p_sys->b_done = true;
return p_pic;
}
set_callbacks( Create, Destroy );
add_integer_with_range( CFG_PREFIX "u", 120, 0, 255, NULL,
- BLUESCREENU_TEXT, BLUESCREENU_LONGTEXT, VLC_FALSE );
+ BLUESCREENU_TEXT, BLUESCREENU_LONGTEXT, false );
add_integer_with_range( CFG_PREFIX "v", 90, 0, 255, NULL,
- BLUESCREENV_TEXT, BLUESCREENV_LONGTEXT, VLC_FALSE );
+ BLUESCREENV_TEXT, BLUESCREENV_LONGTEXT, false );
add_integer_with_range( CFG_PREFIX "ut", 17, 0, 255, NULL,
BLUESCREENUTOL_TEXT, BLUESCREENUTOL_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer_with_range( CFG_PREFIX "vt", 17, 0, 255, NULL,
BLUESCREENVTOL_TEXT, BLUESCREENVTOL_LONGTEXT,
- VLC_FALSE );
+ false );
vlc_module_end();
static const char *ppsz_filter_options[] = {
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VFILTER );
- add_integer( CFG_PREFIX "count", 2, NULL, COUNT_TEXT, COUNT_LONGTEXT, VLC_FALSE );
- add_string ( CFG_PREFIX "vout-list", NULL, NULL, VOUTLIST_TEXT, VOUTLIST_LONGTEXT, VLC_TRUE );
+ add_integer( CFG_PREFIX "count", 2, NULL, COUNT_TEXT, COUNT_LONGTEXT, false );
+ add_string ( CFG_PREFIX "vout-list", NULL, NULL, VOUTLIST_TEXT, VOUTLIST_LONGTEXT, true );
add_shortcut( "clone" );
set_callbacks( Create, Destroy );
set_subcategory( SUBCAT_VIDEO_VFILTER );
set_capability( "video filter2", 0 );
add_integer( CFG_PREFIX "color", 0x00FF0000, NULL, COLOR_TEXT,
- COLOR_LONGTEXT, VLC_FALSE );
+ COLOR_LONGTEXT, false );
change_integer_list( pi_color_values, ppsz_color_descriptions, 0 );
add_integer( CFG_PREFIX "saturationthres", 20, NULL,
- _("Saturaton threshold"), "", VLC_FALSE );
+ _("Saturaton threshold"), "", false );
add_integer( CFG_PREFIX "similaritythres", 15, NULL,
- _("Similarity threshold"), "", VLC_FALSE );
+ _("Similarity threshold"), "", false );
set_callbacks( Create, Destroy );
vlc_module_end();
set_capability( "video filter", 0 );
add_string( "crop-geometry", NULL, NULL, GEOMETRY_TEXT,
- GEOMETRY_LONGTEXT, VLC_FALSE );
+ GEOMETRY_LONGTEXT, false );
add_bool( "autocrop", 0, NULL, AUTOCROP_TEXT,
- AUTOCROP_LONGTEXT, VLC_FALSE );
+ AUTOCROP_LONGTEXT, false );
#ifdef BEST_AUTOCROP
add_integer_with_range( "autocrop-ratio-max", 2405, 0, RATIO_MAX, NULL,
- RATIOMAX_TEXT, RATIOMAX_LONGTEXT, VLC_TRUE );
+ RATIOMAX_TEXT, RATIOMAX_LONGTEXT, true );
add_integer_with_range( "crop-ratio", 0, 0, RATIO_MAX, NULL, RATIO_TEXT,
- RATIO_LONGTEXT, VLC_FALSE );
+ RATIO_LONGTEXT, false );
add_integer( "autocrop-time", 25, NULL, TIME_TEXT,
- TIME_LONGTEXT, VLC_TRUE );
+ TIME_LONGTEXT, true );
add_integer( "autocrop-diff", 16, NULL, DIFF_TEXT,
- DIFF_LONGTEXT, VLC_TRUE );
+ DIFF_LONGTEXT, true );
add_integer( "autocrop-non-black-pixels", 3, NULL,
- NBP_TEXT, NBP_LONGTEXT, VLC_TRUE );
+ NBP_TEXT, NBP_LONGTEXT, true );
add_integer_with_range( "autocrop-skip-percent", 17, 0, 100, NULL,
- SKIP_TEXT, SKIP_LONGTEXT, VLC_TRUE );
+ SKIP_TEXT, SKIP_LONGTEXT, true );
add_integer_with_range( "autocrop-luminance-threshold", 40, 0, 128, NULL,
- LUM_TEXT, LUM_LONGTEXT, VLC_TRUE );
+ LUM_TEXT, LUM_LONGTEXT, true );
#endif //BEST_AUTOCROP
add_shortcut( "crop" );
unsigned int i_x, i_y;
unsigned int i_width, i_height, i_aspect;
- vlc_bool_t b_autocrop;
+ bool b_autocrop;
/* Autocrop specific variables */
unsigned int i_lastchange;
- vlc_bool_t b_changed;
+ bool b_changed;
#ifdef BEST_AUTOCROP
unsigned int i_ratio_max;
unsigned int i_threshold, i_skipPercent, i_nonBlackPixel, i_diff, i_time;
memset( &fmt, 0, sizeof(video_format_t) );
p_vout->p_sys->i_lastchange = 0;
- p_vout->p_sys->b_changed = VLC_FALSE;
+ p_vout->p_sys->b_changed = false;
/* Initialize the output structure */
p_vout->output.i_chroma = p_vout->render.i_chroma;
if( p_vout->p_sys->p_vout == NULL )
{
msg_Err( p_vout, "failed to create vout" );
- intf_UserFatal( p_vout, VLC_FALSE, _("Cropping failed"),
+ intf_UserFatal( p_vout, false, _("Cropping failed"),
_("VLC could not open the video output module.") );
return VLC_EGENERIC;
}
if( p_vout->p_sys->p_vout == NULL )
{
msg_Err( p_vout, "failed to create vout" );
- intf_UserFatal( p_vout, VLC_FALSE, _("Cropping failed"),
+ intf_UserFatal( p_vout, false, _("Cropping failed"),
_("VLC could not open the video output module.") );
return VLC_EGENERIC;
}
- p_vout->p_sys->b_changed = VLC_FALSE;
+ p_vout->p_sys->b_changed = false;
p_vout->p_sys->i_lastchange = 0;
return VLC_SUCCESS;
}
#ifdef BEST_AUTOCROP
-static vlc_bool_t NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
+static bool NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
int i_visible_pitch, int i_lines,
int i_lumThreshold, int i_skipCountPercent,
int i_nonBlackPixel, int i_chroma)
* p_vout->output.i_height / p_vout->p_sys->i_height
* p_vout->p_sys->i_width / p_vout->output.i_width;
- p_vout->p_sys->b_changed = VLC_TRUE;
+ p_vout->p_sys->b_changed = true;
}
/*****************************************************************************
{
p_vout->p_sys->i_ratio = (unsigned int)atoi(newval.psz_string);
p_vout->p_sys->i_lastchange = p_vout->p_sys->i_time;
- p_vout->p_sys->b_autocrop = VLC_TRUE;
+ p_vout->p_sys->b_autocrop = true;
}
if (p_vout->p_sys->i_ratio)
{
set_section( N_("Display"),NULL);
add_string( "deinterlace-mode", "discard", NULL, MODE_TEXT,
- MODE_LONGTEXT, VLC_FALSE );
+ MODE_LONGTEXT, false );
change_string_list( mode_list, mode_list_text, 0 );
add_shortcut( "deinterlace" );
set_capability( "video filter2", 0 );
set_section( N_("Streaming"),NULL);
add_string( FILTER_CFG_PREFIX "mode", "blend", NULL, SOUT_MODE_TEXT,
- SOUT_MODE_LONGTEXT, VLC_FALSE );
+ SOUT_MODE_LONGTEXT, false );
change_string_list( mode_list, mode_list_text, 0 );
set_callbacks( OpenFilter, CloseFilter );
vlc_module_end();
struct vout_sys_t
{
int i_mode; /* Deinterlace mode */
- vlc_bool_t b_double_rate; /* Shall we double the framerate? */
+ bool b_double_rate; /* Shall we double the framerate? */
mtime_t last_date;
mtime_t next_date;
p_vout->pf_control = Control;
p_vout->p_sys->i_mode = DEINTERLACE_DISCARD;
- p_vout->p_sys->b_double_rate = VLC_FALSE;
+ p_vout->p_sys->b_double_rate = false;
p_vout->p_sys->last_date = 0;
p_vout->p_sys->p_vout = 0;
vlc_mutex_init( p_vout, &p_vout->p_sys->filter_lock );
if( !strcmp( psz_method, "discard" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_DISCARD;
- p_vout->p_sys->b_double_rate = VLC_FALSE;
+ p_vout->p_sys->b_double_rate = false;
}
else if( !strcmp( psz_method, "mean" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_MEAN;
- p_vout->p_sys->b_double_rate = VLC_FALSE;
+ p_vout->p_sys->b_double_rate = false;
}
else if( !strcmp( psz_method, "blend" )
|| !strcmp( psz_method, "average" )
|| !strcmp( psz_method, "combine-fields" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_BLEND;
- p_vout->p_sys->b_double_rate = VLC_FALSE;
+ p_vout->p_sys->b_double_rate = false;
}
else if( !strcmp( psz_method, "bob" )
|| !strcmp( psz_method, "progressive-scan" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_BOB;
- p_vout->p_sys->b_double_rate = VLC_TRUE;
+ p_vout->p_sys->b_double_rate = true;
}
else if( !strcmp( psz_method, "linear" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_LINEAR;
- p_vout->p_sys->b_double_rate = VLC_TRUE;
+ p_vout->p_sys->b_double_rate = true;
}
else if( !strcmp( psz_method, "x" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_X;
- p_vout->p_sys->b_double_rate = VLC_FALSE;
+ p_vout->p_sys->b_double_rate = false;
}
else
{
src += 2*i_src;
}
- return fc < 1 ? VLC_FALSE : VLC_TRUE;
+ return fc < 1 ? false : true;
}
#ifdef CAN_COMPILE_MMXEXT
static inline int XDeint8x8DetectMMXEXT( uint8_t *src, int i_src )
fc++;
}
- return fc < 2 ? VLC_FALSE : VLC_TRUE;
+ return fc < 2 ? false : true;
}
static inline void XDeintNxNFrame( uint8_t *dst, int i_dst,
p_pic_dst->date = p_pic->date;
p_pic_dst->b_force = p_pic->b_force;
p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
- p_pic_dst->b_progressive = VLC_TRUE;
+ p_pic_dst->b_progressive = true;
p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
p_pic->pf_release( p_pic );
set_capability( "sub filter", 0 );
add_file( "overlay-input", NULL, NULL, INPUT_TEXT, INPUT_LONGTEXT,
- VLC_FALSE );
+ false );
add_file( "overlay-output", NULL, NULL, OUTPUT_TEXT, OUTPUT_LONGTEXT,
- VLC_FALSE );
+ false );
add_shortcut( "overlay" );
set_callbacks( Create, Destroy );
p_sys->i_inputfd = -1;
p_sys->i_outputfd = -1;
- p_sys->b_updated = VLC_TRUE;
- p_sys->b_atomic = VLC_FALSE;
+ p_sys->b_updated = true;
+ p_sys->b_atomic = false;
p_filter->pf_sub_filter = Filter;
p_sys->input.i_length ) ) )
{
commanddesc_t *p_cur = NULL;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
size_t i_index = 0;
*p_end = '\0';
if( !strncmp( p_cur->psz_command, p_cmd, strlen(p_cur->psz_command) ) )
{
p_cmd[strlen(p_cur->psz_command)] = '\0';
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
p_cmddesc->p_command->pf_parser( p_cmd, p_end,
&p_cmddesc->params );
- if( ( p_cmddesc->p_command->b_atomic == VLC_TRUE ) &&
- ( p_sys->b_atomic == VLC_TRUE ) )
+ if( ( p_cmddesc->p_command->b_atomic == true ) &&
+ ( p_sys->b_atomic == true ) )
QueueEnqueue( &p_sys->atomic, p_cmddesc );
else
QueueEnqueue( &p_sys->pending, p_cmddesc );
}
}
- if( p_sys->b_updated == VLC_FALSE )
+ if( p_sys->b_updated == false )
return NULL;
subpicture_t *p_spu = NULL;
p_spu->i_flags = OSD_ALIGN_LEFT | OSD_ALIGN_TOP;
p_spu->i_x = 0;
p_spu->i_y = 0;
- p_spu->b_absolute = VLC_TRUE;
+ p_spu->b_absolute = true;
p_spu->i_start = date;
p_spu->i_stop = 0;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
subpicture_region_t **pp_region = &p_spu->p_region;
while( (p_overlay = ListWalk( &p_sys->overlays )) )
pp_region = &(*pp_region)->p_next;
}
- p_sys->b_updated = VLC_FALSE;
+ p_sys->b_updated = false;
return p_spu;
}
struct text_style_t fontstyle; /*< text style */
- vlc_bool_t b_visible; /*< visibility flag of overlay */
+ bool b_visible; /*< visibility flag of overlay */
} commandparams_t;
typedef struct commanddesc_t
{
const char *psz_command;
- vlc_bool_t b_atomic;
+ bool b_atomic;
int ( *pf_parser ) ( char *psz_command, char *psz_end,
commandparams_t *p_params );
int ( *pf_execute ) ( filter_t *p_filter, const commandparams_t *p_params,
{
int i_x, i_y;
int i_alpha;
- vlc_bool_t b_active;
+ bool b_active;
video_format_t format;
struct text_style_t fontstyle;
commanddesc_t **pp_commands; /* array of commands */
size_t i_commands;
- vlc_bool_t b_updated, b_atomic;
+ bool b_updated, b_atomic;
queue_t atomic, pending, processed;
list_t overlays;
};
p_ovl->i_x = p_ovl->i_y = 0;
p_ovl->i_alpha = 0xFF;
- p_ovl->b_active = VLC_FALSE;
+ p_ovl->b_active = false;
vout_InitFormat( &p_ovl->format, VLC_FOURCC( '\0','\0','\0','\0') , 0, 0,
VOUT_ASPECT_FACTOR );
memcpy( &p_ovl->fontstyle, &default_text_style, sizeof(struct text_style_t) );
int32_t i_vis = 0;
if( parse_digit( &psz_command, &i_vis ) == VLC_EGENERIC )
return VLC_EGENERIC;
- p_params->b_visible = (i_vis == 1) ? VLC_TRUE : VLC_FALSE;
+ p_params->b_visible = (i_vis == 1) ? true : false;
}
return VLC_SUCCESS;
}
{
VLC_UNUSED(p_results);
filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
- p_sys->b_updated = VLC_TRUE;
+ p_sys->b_updated = true;
return ListRemove( &p_sys->overlays, p_params->i_id );
}
VLC_UNUSED(p_results);
filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
QueueTransfer( &p_sys->pending, &p_sys->atomic );
- p_sys->b_atomic = VLC_FALSE;
+ p_sys->b_atomic = false;
return VLC_SUCCESS;
}
if( p_ovl == NULL )
return VLC_EGENERIC;
- p_results->b_visible = ( p_ovl->b_active == VLC_TRUE ) ? 1 : 0;
+ p_results->b_visible = ( p_ovl->b_active == true ) ? 1 : 0;
return VLC_SUCCESS;
}
if( p_ovl == NULL )
return VLC_EGENERIC;
- p_ovl->b_active = p_params->b_visible;// ? VLC_FALSE : VLC_TRUE;
- p_sys->b_updated = VLC_TRUE;
+ p_ovl->b_active = p_params->b_visible;// ? false : true;
+ p_sys->b_updated = true;
return VLC_SUCCESS;
}
VLC_UNUSED(p_params);
VLC_UNUSED(p_results);
- p_sys->b_atomic = VLC_TRUE;
+ p_sys->b_atomic = true;
return VLC_SUCCESS;
}
static commanddesc_t p_commands[] =
{
{ .psz_command = "DataSharedMem",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_DataSharedMem,
.pf_execute = exec_DataSharedMem,
.pf_unparse = unparse_default,
},
{ .psz_command = "DeleteImage",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_Id,
.pf_execute = exec_DeleteImage,
.pf_unparse = unparse_default,
},
{ .psz_command = "EndAtomic",
- .b_atomic = VLC_FALSE,
+ .b_atomic = false,
.pf_parser = parser_None,
.pf_execute = exec_EndAtomic,
.pf_unparse = unparse_default,
},
{ .psz_command = "GenImage",
- .b_atomic = VLC_FALSE,
+ .b_atomic = false,
.pf_parser = parser_None,
.pf_execute = exec_GenImage,
.pf_unparse = unparse_GenImage,
},
{ .psz_command = "GetAlpha",
- .b_atomic = VLC_FALSE,
+ .b_atomic = false,
.pf_parser = parser_Id,
.pf_execute = exec_GetAlpha,
.pf_unparse = unparse_GetAlpha,
},
{ .psz_command = "GetPosition",
- .b_atomic = VLC_FALSE,
+ .b_atomic = false,
.pf_parser = parser_Id,
.pf_execute = exec_GetPosition,
.pf_unparse = unparse_GetPosition,
},
{ .psz_command = "GetTextAlpha",
- .b_atomic = VLC_FALSE,
+ .b_atomic = false,
.pf_parser = parser_Id,
.pf_execute = exec_GetTextAlpha,
.pf_unparse = unparse_GetTextAlpha,
},
{ .psz_command = "GetTextColor",
- .b_atomic = VLC_FALSE,
+ .b_atomic = false,
.pf_parser = parser_Id,
.pf_execute = exec_GetTextColor,
.pf_unparse = unparse_GetTextColor,
},
{ .psz_command = "GetTextSize",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_Id,
.pf_execute = exec_GetTextSize,
.pf_unparse = unparse_GetTextSize,
},
{ .psz_command = "GetVisibility",
- .b_atomic = VLC_FALSE,
+ .b_atomic = false,
.pf_parser = parser_Id,
.pf_execute = exec_GetVisibility,
.pf_unparse = unparse_GetVisibility,
},
{ .psz_command = "SetAlpha",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_SetAlpha,
.pf_execute = exec_SetAlpha,
.pf_unparse = unparse_default,
},
{ .psz_command = "SetPosition",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_SetPosition,
.pf_execute = exec_SetPosition,
.pf_unparse = unparse_default,
},
{ .psz_command = "SetTextAlpha",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_SetTextAlpha,
.pf_execute = exec_SetTextAlpha,
.pf_unparse = unparse_default,
},
{ .psz_command = "SetTextColor",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_SetTextColor,
.pf_execute = exec_SetTextColor,
.pf_unparse = unparse_default,
},
{ .psz_command = "SetTextSize",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_SetTextSize,
.pf_execute = exec_SetTextSize,
.pf_unparse = unparse_default,
},
{ .psz_command = "SetVisibility",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_SetVisibility,
.pf_execute = exec_SetVisibility,
.pf_unparse = unparse_default,
},
{ .psz_command = "StartAtomic",
- .b_atomic = VLC_TRUE,
+ .b_atomic = true,
.pf_parser = parser_None,
.pf_execute = exec_StartAtomic,
.pf_unparse = unparse_default,
for( ; pp_cur < p_list->pp_tail; ++pp_cur )
{
if( ( *pp_cur != NULL ) &&
- ( (*pp_cur)->b_active == VLC_TRUE )&&
+ ( (*pp_cur)->b_active == true )&&
( (*pp_cur)->format.i_chroma != VLC_FOURCC( '\0','\0','\0','\0') ) )
{
return *pp_cur;
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_file( CFG_PREFIX "mask", NULL, NULL,
- MASK_TEXT, MASK_LONGTEXT, VLC_FALSE );
- add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, VLC_FALSE );
- add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_FALSE );
+ MASK_TEXT, MASK_LONGTEXT, false );
+ add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, false );
+ add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, false );
add_shortcut( "erase" );
set_callbacks( Create, Destroy );
int i_height = i_mask_visible_lines;
int i_width = i_mask_visible_pitch;
- const vlc_bool_t b_line_factor = ( i_plane /* U_PLANE or V_PLANE */ &&
+ const bool b_line_factor = ( i_plane /* U_PLANE or V_PLANE */ &&
!( p_inpic->format.i_chroma == VLC_FOURCC('I','4','2','2')
|| p_inpic->format.i_chroma == VLC_FOURCC('J','4','2','2') ) );
add_shortcut( "extract" );
add_integer_with_range( FILTER_PREFIX "component", 0xFF0000, 1, 0xFFFFFF,
- NULL, COMPONENT_TEXT, COMPONENT_LONGTEXT, VLC_FALSE );
+ NULL, COMPONENT_TEXT, COMPONENT_LONGTEXT, false );
change_integer_list( pi_component_values, ppsz_component_descriptions, 0 );
set_callbacks( Create, Destroy );
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_float( FILTER_PREFIX "sigma", 2., NULL, SIGMA_TEXT, SIGMA_LONGTEXT,
- VLC_FALSE );
+ false );
set_callbacks( Create, Destroy );
vlc_module_end();
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_string( FILTER_PREFIX "mode", "gradient", NULL,
- MODE_TEXT, MODE_LONGTEXT, VLC_FALSE );
+ MODE_TEXT, MODE_LONGTEXT, false );
change_string_list( mode_list, mode_list_text, 0 );
add_integer_with_range( FILTER_PREFIX "type", 0, 0, 1, NULL,
- GRADIENT_TEXT, GRADIENT_LONGTEXT, VLC_FALSE );
+ GRADIENT_TEXT, GRADIENT_LONGTEXT, false );
add_bool( FILTER_PREFIX "cartoon", 1, NULL,
- CARTOON_TEXT, CARTOON_LONGTEXT, VLC_FALSE );
+ CARTOON_TEXT, CARTOON_LONGTEXT, false );
add_shortcut( "gradient" );
set_callbacks( Create, Destroy );
/* For the gradient mode */
int i_gradient_type;
- vlc_bool_t b_cartoon;
+ bool b_cartoon;
uint32_t *p_buf32;
uint32_t *p_buf32_bis;
add_shortcut( "logo" );
set_callbacks( Create, Destroy );
- add_file( CFG_PREFIX "file", NULL, NULL, FILE_TEXT, FILE_LONGTEXT, VLC_FALSE );
- add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, VLC_TRUE );
- add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_TRUE );
+ add_file( CFG_PREFIX "file", NULL, NULL, FILE_TEXT, FILE_LONGTEXT, false );
+ add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, true );
+ add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, true );
/* default to 1000 ms per image, continuously cycle through them */
- add_integer( CFG_PREFIX "delay", 1000, NULL, DELAY_TEXT, DELAY_LONGTEXT, VLC_TRUE );
- add_integer( CFG_PREFIX "repeat", -1, NULL, REPEAT_TEXT, REPEAT_LONGTEXT, VLC_TRUE );
+ add_integer( CFG_PREFIX "delay", 1000, NULL, DELAY_TEXT, DELAY_LONGTEXT, true );
+ add_integer( CFG_PREFIX "repeat", -1, NULL, REPEAT_TEXT, REPEAT_LONGTEXT, true );
add_integer_with_range( CFG_PREFIX "transparency", 255, 0, 255, NULL,
- TRANS_TEXT, TRANS_LONGTEXT, VLC_FALSE );
- add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, VLC_FALSE );
+ TRANS_TEXT, TRANS_LONGTEXT, false );
+ add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
/* subpicture filter submodule */
int pos, posx, posy;
- vlc_bool_t b_absolute;
+ bool b_absolute;
mtime_t i_last_date;
/* On the fly control variable */
- vlc_bool_t b_need_update;
+ bool b_need_update;
};
static subpicture_t *Filter( filter_t *, mtime_t );
/* Misc init */
p_filter->pf_sub_filter = Filter;
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
p_sys->i_last_date = 0;
p_spu->b_absolute = p_sys->b_absolute;
p_spu->i_start = p_sys->i_last_date = date;
p_spu->i_stop = 0;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
- p_sys->b_need_update = VLC_FALSE;
+ p_sys->b_need_update = false;
p_logo_list->i_next_pic = date +
( p_logo->i_delay != -1 ? p_logo->i_delay : p_logo_list->i_delay ) * 1000;
if( p_sys->pos < 0 )
{ /* set to an absolute xy */
p_region->i_align = OSD_ALIGN_RIGHT | OSD_ALIGN_TOP;
- p_spu->b_absolute = VLC_TRUE;
+ p_spu->b_absolute = true;
}
else
{ /* set to one of the 9 relative locations */
p_region->i_align = p_sys->pos;
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_absolute = false;
}
p_spu->i_x = p_sys->posx;
p_logo_list->psz_filename = strdup( newval.psz_string );
LoadLogoList( p_this, p_logo_list );
vlc_mutex_unlock( &p_logo_list->lock );
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
}
else if ( !strncmp( psz_var, "logo-x", 6 ) )
{
p_logo_list->i_repeat = newval.i_int;
vlc_mutex_unlock( &p_logo_list->lock );
}
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
return VLC_SUCCESS;
}
int i_zoom; /* zoom level in percent */
int i_x, i_y; /* top left corner coordinates in original image */
- vlc_bool_t b_visible; /* is "interface" visible ? */
+ bool b_visible; /* is "interface" visible ? */
};
/*****************************************************************************
p_vout->p_sys->i_y = 0;
#define ZOOM_FACTOR 8
p_vout->p_sys->i_zoom = 2*ZOOM_FACTOR;
- p_vout->p_sys->b_visible = VLC_TRUE;
+ p_vout->p_sys->b_visible = true;
var_AddCallback( p_vout->p_sys->p_vout, "mouse-x", MouseEvent, p_vout );
var_AddCallback( p_vout->p_sys->p_vout, "mouse-y", MouseEvent, p_vout );
&& mouse&MOUSE_CLICKED )
{
/* mouse is over the "VLC ZOOM HIDE" text */
- p_vout->p_sys->b_visible = VLC_FALSE;
+ p_vout->p_sys->b_visible = false;
}
else if( (int)p_vout->output.i_height/VIS_ZOOM + 9 <= valy.i_int
&& valy.i_int <= (int)p_vout->output.i_height/VIS_ZOOM + 90
&& valy.i_int <= 10 && mouse&MOUSE_CLICKED )
{
/* mouse is over the "VLC ZOOM SHOW" text */
- p_vout->p_sys->b_visible = VLC_TRUE;
+ p_vout->p_sys->b_visible = true;
}
else if( mouse&MOUSE_MOVE_X && !(mouse&MOUSE_CLICKED) )
{
mtime_t last_time;
mtime_t i_refresh;
- vlc_bool_t b_need_update;
+ bool b_need_update;
};
#define MSG_TEXT N_("Text")
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_SUBPIC );
add_string( CFG_PREFIX "marquee", "VLC", NULL, MSG_TEXT, MSG_LONGTEXT,
- VLC_FALSE );
+ false );
set_section( N_("Position"), NULL );
- add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, VLC_TRUE );
- add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_TRUE );
- add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, VLC_FALSE );
+ add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, true );
+ add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, true );
+ add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
set_section( N_("Font"), NULL );
/* 5 sets the default to top [1] left [4] */
add_integer_with_range( CFG_PREFIX "opacity", 255, 0, 255, NULL,
- OPACITY_TEXT, OPACITY_LONGTEXT, VLC_FALSE );
+ OPACITY_TEXT, OPACITY_LONGTEXT, false );
add_integer( CFG_PREFIX "color", 0xFFFFFF, NULL, COLOR_TEXT, COLOR_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_list( pi_color_values, ppsz_color_descriptions, 0 );
add_integer( CFG_PREFIX "size", -1, NULL, SIZE_TEXT, SIZE_LONGTEXT,
- VLC_FALSE );
+ false );
set_section( N_("Misc"), NULL );
add_integer( CFG_PREFIX "timeout", 0, NULL, TIMEOUT_TEXT, TIMEOUT_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( CFG_PREFIX "refresh", 1000, NULL, REFRESH_TEXT,
- REFRESH_LONGTEXT, VLC_FALSE );
+ REFRESH_LONGTEXT, false );
set_description( _("Marquee display") );
add_shortcut( "time" );
/* Misc init */
p_filter->pf_sub_filter = Filter;
p_sys->last_time = 0;
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
return VLC_SUCCESS;
}
return NULL;
}
- if( p_sys->b_need_update == VLC_FALSE )
+ if( p_sys->b_need_update == false )
{
return NULL;
}
if( strchr( p_sys->psz_marquee, '%' ) || strchr( p_sys->psz_marquee, '$' ) )
{
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
}
else
{
- p_sys->b_need_update = VLC_FALSE;
+ p_sys->b_need_update = false;
}
p_spu->p_region->psz_text = str_format( p_filter, p_sys->psz_marquee );
p_spu->i_start = date;
p_spu->i_stop = p_sys->i_timeout == 0 ? 0 : date + p_sys->i_timeout * 1000;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
/* where to locate the string: */
if( p_sys->i_pos < 0 )
{ /* set to an absolute xy */
p_spu->p_region->i_align = OSD_ALIGN_LEFT | OSD_ALIGN_TOP;
- p_spu->b_absolute = VLC_TRUE;
+ p_spu->b_absolute = true;
}
else
{ /* set to one of the 9 relative locations */
p_spu->p_region->i_align = p_sys->i_pos;
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_absolute = false;
}
p_spu->i_x = p_sys->i_xoff;
p_sys->i_pos = newval.i_int;
p_sys->i_xoff = -1; /* force to relative positioning */
}
- p_sys->b_need_update = VLC_TRUE;
+ p_sys->b_need_update = true;
return VLC_SUCCESS;
}
image_handler_t *p_image;
int i_position; /* Mosaic positioning method */
- vlc_bool_t b_ar; /* Do we keep the aspect ratio ? */
- vlc_bool_t b_keep; /* Do we keep the original picture format ? */
+ bool b_ar; /* Do we keep the aspect ratio ? */
+ bool b_keep; /* Do we keep the original picture format ? */
int i_width, i_height; /* Mosaic height and width */
int i_cols, i_rows; /* Mosaic rows and cols */
int i_align; /* Mosaic alignment in background video */
set_callbacks( CreateFilter, DestroyFilter );
add_integer( CFG_PREFIX "alpha", 255, NULL,
- ALPHA_TEXT, ALPHA_LONGTEXT, VLC_FALSE );
+ ALPHA_TEXT, ALPHA_LONGTEXT, false );
add_integer( CFG_PREFIX "height", 100, NULL,
- HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_FALSE );
+ HEIGHT_TEXT, HEIGHT_LONGTEXT, false );
add_integer( CFG_PREFIX "width", 100, NULL,
- WIDTH_TEXT, WIDTH_LONGTEXT, VLC_FALSE );
+ WIDTH_TEXT, WIDTH_LONGTEXT, false );
add_integer( CFG_PREFIX "align", 5, NULL,
- ALIGN_TEXT, ALIGN_LONGTEXT, VLC_TRUE);
+ ALIGN_TEXT, ALIGN_LONGTEXT, true);
change_integer_list( pi_align_values, ppsz_align_descriptions, 0 );
add_integer( CFG_PREFIX "xoffset", 0, NULL,
- XOFFSET_TEXT, XOFFSET_LONGTEXT, VLC_TRUE );
+ XOFFSET_TEXT, XOFFSET_LONGTEXT, true );
add_integer( CFG_PREFIX "yoffset", 0, NULL,
- YOFFSET_TEXT, YOFFSET_LONGTEXT, VLC_TRUE );
+ YOFFSET_TEXT, YOFFSET_LONGTEXT, true );
add_integer( CFG_PREFIX "borderw", 0, NULL,
- BORDERW_TEXT, BORDERW_LONGTEXT, VLC_TRUE );
+ BORDERW_TEXT, BORDERW_LONGTEXT, true );
add_deprecated_alias( CFG_PREFIX "vborder" );
add_integer( CFG_PREFIX "borderh", 0, NULL,
- BORDERH_TEXT, BORDERH_LONGTEXT, VLC_TRUE );
+ BORDERH_TEXT, BORDERH_LONGTEXT, true );
add_deprecated_alias( CFG_PREFIX "hborder" );
add_integer( CFG_PREFIX "position", 0, NULL,
- POS_TEXT, POS_LONGTEXT, VLC_FALSE );
+ POS_TEXT, POS_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
add_integer( CFG_PREFIX "rows", 2, NULL,
- ROWS_TEXT, ROWS_LONGTEXT, VLC_FALSE );
+ ROWS_TEXT, ROWS_LONGTEXT, false );
add_integer( CFG_PREFIX "cols", 2, NULL,
- COLS_TEXT, COLS_LONGTEXT, VLC_FALSE );
+ COLS_TEXT, COLS_LONGTEXT, false );
add_bool( CFG_PREFIX "keep-aspect-ratio", 0, NULL,
- AR_TEXT, AR_LONGTEXT, VLC_FALSE );
+ AR_TEXT, AR_LONGTEXT, false );
add_bool( CFG_PREFIX "keep-picture", 0, NULL,
- KEEP_TEXT, KEEP_LONGTEXT, VLC_FALSE );
+ KEEP_TEXT, KEEP_LONGTEXT, false );
add_string( CFG_PREFIX "order", "", NULL,
- ORDER_TEXT, ORDER_LONGTEXT, VLC_FALSE );
+ ORDER_TEXT, ORDER_LONGTEXT, false );
add_string( CFG_PREFIX "offsets", "", NULL,
- OFFSETS_TEXT, OFFSETS_LONGTEXT, VLC_FALSE );
+ OFFSETS_TEXT, OFFSETS_LONGTEXT, false );
add_integer( CFG_PREFIX "delay", 0, NULL, DELAY_TEXT, DELAY_LONGTEXT,
- VLC_FALSE );
+ false );
vlc_module_end();
static const char *ppsz_filter_options[] = {
p_spu->i_channel = 0;
p_spu->i_start = date;
p_spu->i_stop = 0;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
p_spu->i_alpha = p_sys->i_alpha;
p_spu->i_flags = p_sys->i_align;
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_absolute = false;
vlc_mutex_lock( &p_sys->lock );
vlc_mutex_lock( p_sys->p_lock );
es_format_t fmt;
picture_t *p_picture;
picture_t **pp_last;
- vlc_bool_t b_empty;
+ bool b_empty;
char *psz_id;
} bridged_es_t;
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_integer_with_range( FILTER_PREFIX "factor", 80, 1, 127, NULL,
- FACTOR_TEXT, FACTOR_LONGTEXT, VLC_FALSE );
+ FACTOR_TEXT, FACTOR_LONGTEXT, false );
add_shortcut( "blur" );
add_string( "opencv-haarcascade-file", "c:\\haarcascade_frontalface_alt.xml", NULL,
N_("Haar cascade filename"),
- N_("Name of XML file containing Haar cascade description"), VLC_FALSE);
+ N_("Name of XML file containing Haar cascade description"), false);
vlc_module_end();
/*****************************************************************************
add_float_with_range( "opencv-scale", 1.0, 0.1, 2.0, NULL,
N_("Scale factor (0.1-2.0)"),
N_("Ammount by which to scale the picture before sending it to the internal OpenCV filter"),
- VLC_FALSE );
+ false );
add_string( "opencv-chroma", "input", NULL,
N_("OpenCV filter chroma"),
- N_("Chroma to convert picture to before sending it to the internal OpenCV filter"), VLC_FALSE);
+ N_("Chroma to convert picture to before sending it to the internal OpenCV filter"), false);
change_string_list( chroma_list, chroma_list_text, 0);
add_string( "opencv-output", "input", NULL,
N_("Wrapper filter output"),
- N_("Determines what (if any) video is displayed by the wrapper filter"), VLC_FALSE);
+ N_("Determines what (if any) video is displayed by the wrapper filter"), false);
change_string_list( output_list, output_list_text, 0);
add_string( "opencv-verbosity", "error", NULL,
N_("Wrapper filter verbosity"),
- N_("Determines wrapper filter verbosity level"), VLC_FALSE);
+ N_("Determines wrapper filter verbosity level"), false);
change_string_list( verbosity_list, verbosity_list_text, 0);
add_string( "opencv-filter-name", "none", NULL,
N_("OpenCV internal filter name"),
- N_("Name of internal OpenCV plugin filter to use"), VLC_FALSE);
+ N_("Name of internal OpenCV plugin filter to use"), false);
vlc_module_end();
#define OSD_UPDATE_MAX 1000
vlc_module_begin();
- add_integer( OSD_CFG "x", -1, NULL, POSX_TEXT, POSX_LONGTEXT, VLC_FALSE );
- add_integer( OSD_CFG "y", -1, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_FALSE );
+ add_integer( OSD_CFG "x", -1, NULL, POSX_TEXT, POSX_LONGTEXT, false );
+ add_integer( OSD_CFG "y", -1, NULL, POSY_TEXT, POSY_LONGTEXT, false );
add_integer( OSD_CFG "position", 8, NULL, POS_TEXT, POS_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
add_string( OSD_CFG "file", OSD_DEFAULT_CFG, NULL, OSD_FILE_TEXT,
- OSD_FILE_LONGTEXT, VLC_FALSE );
+ OSD_FILE_LONGTEXT, false );
add_string( OSD_CFG "file-path", NULL, NULL, OSD_PATH_TEXT,
- OSD_PATH_LONGTEXT, VLC_FALSE );
+ OSD_PATH_LONGTEXT, false );
add_integer( OSD_CFG "timeout", 15, NULL, TIMEOUT_TEXT,
- TIMEOUT_LONGTEXT, VLC_FALSE );
+ TIMEOUT_LONGTEXT, false );
add_integer_with_range( OSD_CFG "update", OSD_UPDATE_DEFAULT,
OSD_UPDATE_MIN, OSD_UPDATE_MAX, NULL, OSD_UPDATE_TEXT,
- OSD_UPDATE_LONGTEXT, VLC_TRUE );
+ OSD_UPDATE_LONGTEXT, true );
add_integer_with_range( OSD_CFG "alpha", 255, 0, 255, NULL,
- OSD_ALPHA_TEXT, OSD_ALPHA_LONGTEXT, VLC_TRUE );
+ OSD_ALPHA_TEXT, OSD_ALPHA_LONGTEXT, true );
set_capability( "sub filter", 100 );
set_description( _("On Screen Display menu") );
mtime_t i_last_date; /* last mdate SPU object has been sent to SPU subsytem */
mtime_t i_timeout; /* duration SPU object is valid on the video output in seconds */
- vlc_bool_t b_absolute; /* do we use absolute positioning or relative? */
- vlc_bool_t b_update; /* Update OSD Menu by sending SPU objects */
- vlc_bool_t b_visible; /* OSD Menu is visible */
+ bool b_absolute; /* do we use absolute positioning or relative? */
+ bool b_update; /* Update OSD Menu by sending SPU objects */
+ bool b_visible; /* OSD Menu is visible */
mtime_t i_update; /* Update the OSD menu every n ms */
mtime_t i_end_date; /* End data of display OSD menu */
int i_alpha; /* alpha transparency value */
/* menu interaction */
vout_thread_t *p_vout;
- vlc_bool_t b_clicked;
+ bool b_clicked;
uint32_t i_mouse_x;
uint32_t i_mouse_y;
};
p_sys->p_menu->i_position = p_sys->i_position;
/* Check if menu position was overridden */
- p_sys->b_absolute = VLC_TRUE;
+ p_sys->b_absolute = true;
if( (p_sys->i_x < 0) || (p_sys->i_y < 0) )
{
- p_sys->b_absolute = VLC_FALSE;
+ p_sys->b_absolute = false;
p_sys->p_menu->i_x = 0;
p_sys->p_menu->i_y = 0;
}
else if( (p_sys->p_menu->i_x < 0) ||
(p_sys->p_menu->i_y < 0) )
{
- p_sys->b_absolute = VLC_FALSE;
+ p_sys->b_absolute = false;
p_sys->p_menu->i_x = 0;
p_sys->p_menu->i_y = 0;
}
p_sys->i_last_date = mdate();
/* Keep track of OSD Events */
- p_sys->b_update = VLC_FALSE;
- p_sys->b_visible = VLC_FALSE;
- p_sys->b_clicked = VLC_FALSE;
+ p_sys->b_update = false;
+ p_sys->b_visible = false;
+ p_sys->b_clicked = false;
/* Listen to osd menu core updates/visible settings. */
var_AddCallback( p_sys->p_menu, "osd-menu-update",
VLC_UNUSED(newval);
filter_t *p_filter = (filter_t *) p_data;
- p_filter->p_sys->b_visible = VLC_TRUE;
- p_filter->p_sys->b_update = VLC_TRUE;
+ p_filter->p_sys->b_visible = true;
+ p_filter->p_sys->b_update = true;
return VLC_SUCCESS;
}
filter_t *p_filter = (filter_t *) p_data;
filter_sys_t *p_sys = p_filter->p_sys;
- p_sys->b_update = p_sys->b_visible ? VLC_TRUE : VLC_FALSE;
+ p_sys->b_update = p_sys->b_visible ? true : false;
p_sys->i_end_date = (mtime_t) 0;
return VLC_SUCCESS;
}
p_spu = p_filter->pf_sub_buffer_new( p_filter );
if( !p_spu ) return NULL;
- p_spu->b_ephemer = VLC_TRUE;
- p_spu->b_fade = VLC_TRUE;
+ p_spu->b_ephemer = true;
+ p_spu->b_fade = true;
if( p_filter->p_sys->p_menu->i_style == OSD_MENU_STYLE_CONCAT )
- p_spu->b_absolute = VLC_TRUE;
+ p_spu->b_absolute = true;
else
p_spu->b_absolute = p_sys->b_absolute;
p_spu->i_flags = p_sys->i_position;
/* Display the subpicture again. */
p_spu->i_stop = p_sys->i_end_date - i_date;
if( ( i_date + p_sys->i_update ) >= p_sys->i_end_date )
- p_sys->b_update = VLC_FALSE;
+ p_sys->b_update = false;
}
else
{
* when OSD menu should be hidden and menu picture is not allocated.
*/
if( !p_filter->p_sys->p_menu->p_state->p_pic ||
- ( p_filter->p_sys->b_visible == VLC_FALSE ) )
+ ( p_filter->p_sys->b_visible == false ) )
{
/* Create new spu regions and allocate an empty picture in it. */
p_region = create_picture_region( p_filter, p_spu,
if( p_sys->p_vout && p_sys->b_clicked )
{
- p_sys->b_clicked = VLC_FALSE;
+ p_sys->b_clicked = false;
osd_MenuActivate( p_filter );
}
/* Create new spu regions
else if( !strncmp( psz_var, OSD_CFG"x", 9) ||
!strncmp( psz_var, OSD_CFG"y", 9))
{
- p_sys->b_absolute = VLC_TRUE;
+ p_sys->b_absolute = true;
if( (p_sys->i_x < 0) || (p_sys->i_y < 0) )
{
- p_sys->b_absolute = VLC_FALSE;
+ p_sys->b_absolute = false;
p_sys->p_menu->i_x = 0;
p_sys->p_menu->i_y = 0;
}
else if( !strncmp( psz_var, OSD_CFG"alpha", 13) )
p_sys->i_alpha = newval.i_int % 256;
- p_sys->b_update = p_sys->b_visible ? VLC_TRUE : VLC_FALSE;
+ p_sys->b_update = p_sys->b_visible ? true : false;
return VLC_SUCCESS;
}
if( p_button )
{
osd_ButtonSelect( p_this, p_button );
- p_sys->b_update = p_sys->b_visible ? VLC_TRUE : VLC_FALSE;
- p_sys->b_clicked = VLC_TRUE;
+ p_sys->b_update = p_sys->b_visible ? true : false;
+ p_sys->b_clicked = true;
msg_Dbg( p_this, "mouse clicked %s (%d,%d)\n", p_button->psz_name, i_x, i_y );
}
}
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_integer( CFG_PREFIX "cols", -1, NULL,
- COLS_TEXT, COLS_LONGTEXT, VLC_TRUE );
+ COLS_TEXT, COLS_LONGTEXT, true );
add_integer( CFG_PREFIX "rows", -1, NULL,
- ROWS_TEXT, ROWS_LONGTEXT, VLC_TRUE );
+ ROWS_TEXT, ROWS_LONGTEXT, true );
#ifdef OVERLAP
#define OFFSET_X_TEXT N_("Offset X offset (automatic compensation)")
#define OFFSET_X_LONGTEXT N_("Select if you want an automatic offset in horizontal (in case of misalignment due to autoratio control)")
- add_bool( CFG_PREFIX "offset-x", 1, NULL, OFFSET_X_TEXT, OFFSET_X_LONGTEXT, VLC_TRUE );
+ add_bool( CFG_PREFIX "offset-x", 1, NULL, OFFSET_X_TEXT, OFFSET_X_LONGTEXT, true );
#define LENGTH_TEXT N_("length of the overlapping area (in %)")
#define LENGTH_LONGTEXT N_("Select in percent the length of the blended zone")
- add_integer_with_range( CFG_PREFIX "bz-length", 100, 0, 100, NULL, LENGTH_TEXT, LENGTH_LONGTEXT, VLC_TRUE );
+ add_integer_with_range( CFG_PREFIX "bz-length", 100, 0, 100, NULL, LENGTH_TEXT, LENGTH_LONGTEXT, true );
#define HEIGHT_TEXT N_("height of the overlapping area (in %)")
#define HEIGHT_LONGTEXT N_("Select in percent the height of the blended zone (case of 2x2 wall)")
- add_integer_with_range( CFG_PREFIX "bz-height", 100, 0, 100, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE );
+ add_integer_with_range( CFG_PREFIX "bz-height", 100, 0, 100, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, true );
#define ATTENUATION_TEXT N_("Attenuation")
#define ATTENUATION_LONGTEXT N_("Check this option if you want attenuate blended zone by this plug-in (if option is unchecked, attenuate is made by opengl)")
- add_bool( CFG_PREFIX "attenuate", 1, NULL, ATTENUATION_TEXT, ATTENUATION_LONGTEXT, VLC_FALSE );
+ add_bool( CFG_PREFIX "attenuate", 1, NULL, ATTENUATION_TEXT, ATTENUATION_LONGTEXT, false );
#define BEGIN_TEXT N_("Attenuation, begin (in %)")
#define BEGIN_LONGTEXT N_("Select in percent the Lagrange coeff of the beginning blended zone")
- add_integer_with_range( CFG_PREFIX "bz-begin", 0, 0, 100, NULL, BEGIN_TEXT, BEGIN_LONGTEXT, VLC_TRUE );
+ add_integer_with_range( CFG_PREFIX "bz-begin", 0, 0, 100, NULL, BEGIN_TEXT, BEGIN_LONGTEXT, true );
#define MIDDLE_TEXT N_("Attenuation, middle (in %)")
#define MIDDLE_LONGTEXT N_("Select in percent the Lagrange coeff of the middle of blended zone")
- add_integer_with_range( CFG_PREFIX "bz-middle", 50, 0, 100, NULL, MIDDLE_TEXT, MIDDLE_LONGTEXT, VLC_FALSE );
+ add_integer_with_range( CFG_PREFIX "bz-middle", 50, 0, 100, NULL, MIDDLE_TEXT, MIDDLE_LONGTEXT, false );
#define END_TEXT N_("Attenuation, end (in %)")
#define END_LONGTEXT N_("Select in percent the Lagrange coeff of the end of blended zone")
- add_integer_with_range( CFG_PREFIX "bz-end", 100, 0, 100, NULL, END_TEXT, END_LONGTEXT, VLC_TRUE );
+ add_integer_with_range( CFG_PREFIX "bz-end", 100, 0, 100, NULL, END_TEXT, END_LONGTEXT, true );
#define MIDDLE_POS_TEXT N_("middle position (in %)")
#define MIDDLE_POS_LONGTEXT N_("Select in percent (50 is center) the position of the middle point (Lagrange) of blended zone")
- add_integer_with_range( CFG_PREFIX "bz-middle-pos", 50, 1, 99, NULL, MIDDLE_POS_TEXT, MIDDLE_POS_LONGTEXT, VLC_FALSE );
+ add_integer_with_range( CFG_PREFIX "bz-middle-pos", 50, 1, 99, NULL, MIDDLE_POS_TEXT, MIDDLE_POS_LONGTEXT, false );
#ifdef GAMMA
#define RGAMMA_TEXT N_("Gamma (Red) correction")
#define RGAMMA_LONGTEXT N_("Select the gamma for the correction of blended zone (Red or Y component)")
- add_float_with_range( CFG_PREFIX "bz-gamma-red", 1, 0, 5, NULL, RGAMMA_TEXT, RGAMMA_LONGTEXT, VLC_TRUE );
+ add_float_with_range( CFG_PREFIX "bz-gamma-red", 1, 0, 5, NULL, RGAMMA_TEXT, RGAMMA_LONGTEXT, true );
#define GGAMMA_TEXT N_("Gamma (Green) correction")
#define GGAMMA_LONGTEXT N_("Select the gamma for the correction of blended zone (Green or U component)")
- add_float_with_range( CFG_PREFIX "bz-gamma-green", 1, 0, 5, NULL, GGAMMA_TEXT, GGAMMA_LONGTEXT, VLC_TRUE );
+ add_float_with_range( CFG_PREFIX "bz-gamma-green", 1, 0, 5, NULL, GGAMMA_TEXT, GGAMMA_LONGTEXT, true );
#define BGAMMA_TEXT N_("Gamma (Blue) correction")
#define BGAMMA_LONGTEXT N_("Select the gamma for the correction of blended zone (Blue or V component)")
- add_float_with_range( CFG_PREFIX "bz-gamma-blue", 1, 0, 5, NULL, BGAMMA_TEXT, BGAMMA_LONGTEXT, VLC_TRUE );
+ add_float_with_range( CFG_PREFIX "bz-gamma-blue", 1, 0, 5, NULL, BGAMMA_TEXT, BGAMMA_LONGTEXT, true );
#endif
#define RGAMMA_BC_TEXT N_("Black Crush for Red")
#define RGAMMA_BC_LONGTEXT N_("Select the Black Crush of blended zone (Red or Y component)")
#define GGAMMA_WL_LONGTEXT N_("Select the White Level of blended zone (Green or U component)")
#define BGAMMA_WL_TEXT N_("White Level for Blue")
#define BGAMMA_WL_LONGTEXT N_("Select the White Level of blended zone (Blue or V component)")
- add_integer_with_range( CFG_PREFIX "bz-blackcrush-red", 140, 0, 255, NULL, RGAMMA_BC_TEXT, RGAMMA_BC_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-blackcrush-green", 140, 0, 255, NULL, GGAMMA_BC_TEXT, GGAMMA_BC_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-blackcrush-blue", 140, 0, 255, NULL, BGAMMA_BC_TEXT, BGAMMA_BC_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-whitecrush-red", 200, 0, 255, NULL, RGAMMA_WC_TEXT, RGAMMA_WC_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-whitecrush-green", 200, 0, 255, NULL, GGAMMA_WC_TEXT, GGAMMA_WC_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-whitecrush-blue", 200, 0, 255, NULL, BGAMMA_WC_TEXT, BGAMMA_WC_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-blacklevel-red", 150, 0, 255, NULL, RGAMMA_BL_TEXT, RGAMMA_BL_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-blacklevel-green", 150, 0, 255, NULL, GGAMMA_BL_TEXT, GGAMMA_BL_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-blacklevel-blue", 150, 0, 255, NULL, BGAMMA_BL_TEXT, BGAMMA_BL_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-whitelevel-red", 0, 0, 255, NULL, RGAMMA_WL_TEXT, RGAMMA_WL_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-whitelevel-green", 0, 0, 255, NULL, GGAMMA_WL_TEXT, GGAMMA_WL_LONGTEXT, VLC_TRUE );
- add_integer_with_range( CFG_PREFIX "bz-whitelevel-blue", 0, 0, 255, NULL, BGAMMA_WL_TEXT, BGAMMA_WL_LONGTEXT, VLC_TRUE );
+ add_integer_with_range( CFG_PREFIX "bz-blackcrush-red", 140, 0, 255, NULL, RGAMMA_BC_TEXT, RGAMMA_BC_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-blackcrush-green", 140, 0, 255, NULL, GGAMMA_BC_TEXT, GGAMMA_BC_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-blackcrush-blue", 140, 0, 255, NULL, BGAMMA_BC_TEXT, BGAMMA_BC_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-whitecrush-red", 200, 0, 255, NULL, RGAMMA_WC_TEXT, RGAMMA_WC_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-whitecrush-green", 200, 0, 255, NULL, GGAMMA_WC_TEXT, GGAMMA_WC_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-whitecrush-blue", 200, 0, 255, NULL, BGAMMA_WC_TEXT, BGAMMA_WC_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-blacklevel-red", 150, 0, 255, NULL, RGAMMA_BL_TEXT, RGAMMA_BL_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-blacklevel-green", 150, 0, 255, NULL, GGAMMA_BL_TEXT, GGAMMA_BL_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-blacklevel-blue", 150, 0, 255, NULL, BGAMMA_BL_TEXT, BGAMMA_BL_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-whitelevel-red", 0, 0, 255, NULL, RGAMMA_WL_TEXT, RGAMMA_WL_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-whitelevel-green", 0, 0, 255, NULL, GGAMMA_WL_TEXT, GGAMMA_WL_LONGTEXT, true );
+ add_integer_with_range( CFG_PREFIX "bz-whitelevel-blue", 0, 0, 255, NULL, BGAMMA_WL_TEXT, BGAMMA_WL_LONGTEXT, true );
#ifndef SYS_MINGW32
#define XINERAMA_TEXT N_("Xinerama option")
#define XINERAMA_LONGTEXT N_("Uncheck if you have not used xinerama")
- add_bool( CFG_PREFIX "xinerama", 1, NULL, XINERAMA_TEXT, XINERAMA_LONGTEXT, VLC_TRUE );
+ add_bool( CFG_PREFIX "xinerama", 1, NULL, XINERAMA_TEXT, XINERAMA_LONGTEXT, true );
#endif
#endif
- add_string( CFG_PREFIX "active", NULL, NULL, ACTIVE_TEXT, ACTIVE_LONGTEXT, VLC_TRUE );
+ add_string( CFG_PREFIX "active", NULL, NULL, ACTIVE_TEXT, ACTIVE_LONGTEXT, true );
add_shortcut( "panoramix" );
set_callbacks( Create, Destroy );
struct vout_sys_t
{
#ifdef OVERLAP
- vlc_bool_t b_autocrop;
- vlc_bool_t b_attenuate;
+ bool b_autocrop;
+ bool b_attenuate;
unsigned int bz_length, bz_height, bz_begin, bz_middle, bz_end, bz_middle_pos;
unsigned int i_ratio_max;
unsigned int i_ratio;
unsigned int a_0, a_1, a_2;
- vlc_bool_t b_has_changed;
+ bool b_has_changed;
int lambda[2][VOUT_MAX_PLANES][500];
int cstYUV[2][VOUT_MAX_PLANES][500];
int lambda2[2][VOUT_MAX_PLANES][500];
#endif
#endif
#ifndef SYS_MINGW32
- vlc_bool_t b_xinerama;
+ bool b_xinerama;
#endif
#endif
int i_col;
int i_vout;
struct vout_list_t
{
- vlc_bool_t b_active;
+ bool b_active;
int i_width;
int i_height;
vout_thread_t *p_vout;
*****************************************************************************/
static int AdjustHeight( vout_thread_t *p_vout )
{
- vlc_bool_t b_fullscreen = var_CreateGetInteger( p_vout, "fullscreen" );
+ bool b_fullscreen = var_CreateGetInteger( p_vout, "fullscreen" );
int i_window_width = p_vout->i_window_width;
int i_window_height = p_vout->i_window_height;
double d_halfLength = 0;
}
#ifdef OVERLAP
- if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = VLC_FALSE;
+ if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = false;
#endif
}
}
}
#ifdef OVERLAP
- if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = VLC_FALSE;
+ if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = false;
#endif
}
}
}
#ifdef OVERLAP
- if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = VLC_FALSE;
+ if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = false;
#endif
}
#endif
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_integer_with_range( CFG_PREFIX "rows", 4, 1, 128, NULL,
- ROWS_TEXT, ROWS_LONGTEXT, VLC_FALSE );
+ ROWS_TEXT, ROWS_LONGTEXT, false );
add_integer_with_range( CFG_PREFIX "cols", 4, 1, 128, NULL,
- COLS_TEXT, COLS_LONGTEXT, VLC_FALSE );
+ COLS_TEXT, COLS_LONGTEXT, false );
add_bool( CFG_PREFIX "black-slot", 0, NULL,
- BLACKSLOT_TEXT, BLACKSLOT_LONGTEXT, VLC_FALSE );
+ BLACKSLOT_TEXT, BLACKSLOT_LONGTEXT, false );
set_callbacks( Create, Destroy );
vlc_module_end();
int i_rows;
int *pi_order;
int i_selected;
- vlc_bool_t b_finished;
+ bool b_finished;
- vlc_bool_t b_blackslot;
+ bool b_blackslot;
};
/*****************************************************************************
/*****************************************************************************
* Misc stuff...
*****************************************************************************/
-static vlc_bool_t finished( vout_sys_t *p_sys )
+static bool finished( vout_sys_t *p_sys )
{
int i;
for( i = 0; i < p_sys->i_cols * p_sys->i_rows; i++ )
{
- if( i != p_sys->pi_order[i] ) return VLC_FALSE;
+ if( i != p_sys->pi_order[i] ) return false;
}
- return VLC_TRUE;
+ return true;
}
-static vlc_bool_t is_valid( vout_sys_t *p_sys )
+static bool is_valid( vout_sys_t *p_sys )
{
int i, j, d=0;
- if( p_sys->b_blackslot == VLC_FALSE ) return VLC_TRUE;
+ if( p_sys->b_blackslot == false ) return true;
for( i = 0; i < p_sys->i_cols * p_sys->i_rows; i++ )
{
if( p_sys->pi_order[i] == p_sys->i_cols * p_sys->i_rows - 1 )
if( p_sys->pi_order[i] > p_sys->pi_order[j] ) d++;
}
}
- if( d%2!=0 ) return VLC_FALSE;
- else return VLC_TRUE;
+ if( d%2!=0 ) return false;
+ else return true;
}
static void shuffle( vout_sys_t *p_sys )
{
}
}
p_sys->b_finished = finished( p_sys );
- } while( p_sys->b_finished == VLC_TRUE
- || is_valid( p_sys ) == VLC_FALSE );
+ } while( p_sys->b_finished == true
+ || is_valid( p_sys ) == false );
- if( p_sys->b_blackslot == VLC_TRUE )
+ if( p_sys->b_blackslot == true )
{
for( i = 0; i < p_sys->i_cols * p_sys->i_rows; i++ )
{
i_row *= p_in->i_lines / i_rows;
i_last_row *= p_in->i_lines / i_rows;
- if( p_vout->p_sys->b_blackslot == VLC_TRUE
- && p_vout->p_sys->b_finished == VLC_FALSE
+ if( p_vout->p_sys->b_blackslot == true
+ && p_vout->p_sys->b_finished == false
&& i == p_vout->p_sys->i_selected )
{
uint8_t color = ( i_plane == Y_PLANE ? 0x0 : 0x80 );
}
if( p_vout->p_sys->i_selected != -1
- && p_vout->p_sys->b_blackslot == VLC_FALSE )
+ && p_vout->p_sys->b_blackslot == false )
{
plane_t *p_in = p_pic->p+Y_PLANE;
plane_t *p_out = p_outpic->p+Y_PLANE;
0xff, i_pitch / i_cols );
}
- if( p_vout->p_sys->b_finished == VLC_TRUE )
+ if( p_vout->p_sys->b_finished == true )
{
int i, j;
plane_t *p_out = p_outpic->p+Y_PLANE;
if( mouse & MOUSE_CLICKED )
{
i_pos = p_vout->p_sys->i_cols * ( ( p_vout->p_sys->i_rows * i_y ) / v_h ) + (p_vout->p_sys->i_cols * i_x ) / v_w;
- if( p_vout->p_sys->b_finished == VLC_TRUE
+ if( p_vout->p_sys->b_finished == true
&& i_x < SHUFFLE_WIDTH && i_y < SHUFFLE_HEIGHT )
{
shuffle( p_vout->p_sys );
p_vout->p_sys->i_selected = i_pos;
}
else if( p_vout->p_sys->i_selected == i_pos
- && p_vout->p_sys->b_blackslot == VLC_FALSE )
+ && p_vout->p_sys->b_blackslot == false )
{
p_vout->p_sys->i_selected = -1;
}
p_vout->p_sys->pi_order[ p_vout->p_sys->i_selected ] =
p_vout->p_sys->pi_order[ i_pos ];
p_vout->p_sys->pi_order[ i_pos ] = a;
- if( p_vout->p_sys->b_blackslot == VLC_TRUE )
+ if( p_vout->p_sys->b_blackslot == true )
p_vout->p_sys->i_selected = i_pos;
else
p_vout->p_sys->i_selected = -1;
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_integer_with_range( FILTER_PREFIX "angle", 30, 0, 359, NULL,
- ANGLE_TEXT, ANGLE_LONGTEXT, VLC_FALSE );
+ ANGLE_TEXT, ANGLE_LONGTEXT, false );
add_shortcut( "rotate" );
set_callbacks( Create, Destroy );
int i_ttl;
time_t t_last_update;
- vlc_bool_t b_images;
+ bool b_images;
int i_title;
int i_cur_feed;
set_callbacks( CreateFilter, DestroyFilter );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_SUBPIC );
- add_string( CFG_PREFIX "urls", "rss", NULL, MSG_TEXT, MSG_LONGTEXT, VLC_FALSE );
+ add_string( CFG_PREFIX "urls", "rss", NULL, MSG_TEXT, MSG_LONGTEXT, false );
set_section( N_("Position"), NULL );
- add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, VLC_TRUE );
- add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_TRUE );
- add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, VLC_FALSE );
+ add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, true );
+ add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, true );
+ add_integer( CFG_PREFIX "position", -1, NULL, POS_TEXT, POS_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
set_section( N_("Font"), NULL );
/* 5 sets the default to top [1] left [4] */
add_integer_with_range( CFG_PREFIX "opacity", 255, 0, 255, NULL,
- OPACITY_TEXT, OPACITY_LONGTEXT, VLC_FALSE );
+ OPACITY_TEXT, OPACITY_LONGTEXT, false );
add_integer( CFG_PREFIX "color", 0xFFFFFF, NULL, COLOR_TEXT, COLOR_LONGTEXT,
- VLC_FALSE );
+ false );
change_integer_list( pi_color_values, ppsz_color_descriptions, 0 );
- add_integer( CFG_PREFIX "size", -1, NULL, SIZE_TEXT, SIZE_LONGTEXT, VLC_FALSE );
+ add_integer( CFG_PREFIX "size", -1, NULL, SIZE_TEXT, SIZE_LONGTEXT, false );
set_section( N_("Misc"), NULL );
add_integer( CFG_PREFIX "speed", 100000, NULL, SPEED_TEXT, SPEED_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( CFG_PREFIX "length", 60, NULL, LENGTH_TEXT, LENGTH_LONGTEXT,
- VLC_FALSE );
- add_integer( CFG_PREFIX "ttl", 1800, NULL, TTL_TEXT, TTL_LONGTEXT, VLC_FALSE );
- add_bool( CFG_PREFIX "images", 1, NULL, IMAGE_TEXT, IMAGE_LONGTEXT, VLC_FALSE );
- add_integer( CFG_PREFIX "title", default_title, NULL, TITLE_TEXT, TITLE_LONGTEXT, VLC_FALSE );
+ false );
+ add_integer( CFG_PREFIX "ttl", 1800, NULL, TTL_TEXT, TTL_LONGTEXT, false );
+ add_bool( CFG_PREFIX "images", 1, NULL, IMAGE_TEXT, IMAGE_LONGTEXT, false );
+ add_integer( CFG_PREFIX "title", default_title, NULL, TITLE_TEXT, TITLE_LONGTEXT, false );
change_integer_list( pi_title_modes, ppsz_title_modes, 0 );
set_description( _("RSS and Atom feed display") );
p_sys->p_style->i_font_color = var_CreateGetInteger( p_filter, CFG_PREFIX "color" );
p_sys->p_style->i_font_size = var_CreateGetInteger( p_filter, CFG_PREFIX "size" );
- if( p_sys->b_images == VLC_TRUE && p_sys->p_style->i_font_size == -1 )
+ if( p_sys->b_images == true && p_sys->p_style->i_font_size == -1 )
{
msg_Warn( p_filter, "rrs-size wasn't specified. Feed images will thus be displayed without being resized" );
}
p_spu->p_region->fmt.i_visible_height = p_sys->p_style->i_font_size;
p_spu->i_start = date;
p_spu->i_stop = 0;
- p_spu->b_ephemer = VLC_TRUE;
+ p_spu->b_ephemer = true;
/* where to locate the string: */
if( p_sys->i_pos < 0 )
{ /* set to an absolute xy */
p_spu->p_region->i_align = OSD_ALIGN_LEFT | OSD_ALIGN_TOP;
- p_spu->b_absolute = VLC_TRUE;
+ p_spu->b_absolute = true;
}
else
{ /* set to one of the 9 relative locations */
p_spu->p_region->i_align = p_sys->i_pos;
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_absolute = false;
}
p_spu->i_x = p_sys->i_xoff;
int i_feed;
int i_item;
- vlc_bool_t b_is_item;
- vlc_bool_t b_is_image;
+ bool b_is_item;
+ bool b_is_image;
int i_int;
FreeRSS( p_filter );
}
i_item = 0;
- b_is_item = VLC_FALSE;
- b_is_image = VLC_FALSE;
+ b_is_item = false;
+ b_is_image = false;
while( xml_ReaderRead( p_xml_reader ) == 1 )
{
if( !strcmp( psz_eltname, "item" ) /* rss */
|| !strcmp( psz_eltname, "entry" ) ) /* atom */
{
- b_is_item = VLC_TRUE;
+ b_is_item = true;
p_feed->i_items++;
p_feed->p_items = (struct rss_item_t *)realloc( p_feed->p_items, p_feed->i_items * sizeof( struct rss_item_t ) );
p_feed->p_items[p_feed->i_items-1].psz_title = NULL;
}
else if( !strcmp( psz_eltname, "image" ) ) /* rss */
{
- b_is_image = VLC_TRUE;
+ b_is_image = true;
}
else if( !strcmp( psz_eltname, "link" ) ) /* atom */
{
if( psz_rel && psz_href )
{
if( !strcmp( psz_rel, "alternate" )
- && b_is_item == VLC_FALSE
- && b_is_image == VLC_FALSE
+ && b_is_item == false
+ && b_is_image == false
&& !p_feed->psz_link )
{
p_feed->psz_link = psz_href;
/* this isn't in the rfc but i found some ... */
else if( ( !strcmp( psz_rel, "logo" )
|| !strcmp( psz_rel, "icon" ) )
- && b_is_item == VLC_FALSE
- && b_is_image == VLC_FALSE
+ && b_is_item == false
+ && b_is_image == false
&& !p_feed->psz_image )
{
p_feed->psz_image = psz_href;
if( !strcmp( psz_eltname, "item" ) /* rss */
|| !strcmp( psz_eltname, "entry" ) ) /* atom */
{
- b_is_item = VLC_FALSE;
+ b_is_item = false;
i_item++;
}
else if( !strcmp( psz_eltname, "image" ) ) /* rss */
{
- b_is_image = VLC_FALSE;
+ b_is_image = false;
}
free( psz_eltname );
psz_eltname = NULL;
# ifdef RSS_DEBUG
msg_Dbg( p_filter, " text : <%s>", psz_eltvalue );
# endif
- if( b_is_item == VLC_TRUE )
+ if( b_is_item == true )
{
struct rss_item_t *p_item;
p_item = p_feed->p_items+i_item;
psz_eltvalue = NULL;
}
}
- else if( b_is_image == VLC_TRUE )
+ else if( b_is_image == true )
{
if( !strcmp( psz_eltname, "url" ) /* rss */
&& !p_feed->psz_image )
}
}
- if( p_sys->b_images == VLC_TRUE
+ if( p_sys->b_images == true
&& p_feed->psz_image && !p_feed->p_pic )
{
p_feed->p_pic = LoadImage( p_filter, p_feed->psz_image );
set_subcategory( SUBCAT_VIDEO_VFILTER );
set_capability( "video filter2", 0 );
add_float_with_range( "sharpen-sigma", 0.05, 0.0, 2.0, NULL,
- SIG_TEXT, SIG_LONGTEXT, VLC_FALSE );
+ SIG_TEXT, SIG_LONGTEXT, false );
add_shortcut( "sharpen" );
set_callbacks( Create, Destroy );
vlc_module_end();
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_string( CFG_PREFIX "type", "90", NULL,
- TYPE_TEXT, TYPE_LONGTEXT, VLC_FALSE);
+ TYPE_TEXT, TYPE_LONGTEXT, false);
change_string_list( type_list, type_list_text, 0);
add_shortcut( "transform" );
struct vout_sys_t
{
int i_mode;
- vlc_bool_t b_rotation;
+ bool b_rotation;
vout_thread_t *p_vout;
void (*pf_filter)( vout_thread_t *, const picture_t *, picture_t * );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VFILTER );
- add_integer( CFG_PREFIX "cols", 3, NULL, COLS_TEXT, COLS_LONGTEXT, VLC_FALSE );
- add_integer( CFG_PREFIX "rows", 3, NULL, ROWS_TEXT, ROWS_LONGTEXT, VLC_FALSE );
+ add_integer( CFG_PREFIX "cols", 3, NULL, COLS_TEXT, COLS_LONGTEXT, false );
+ add_integer( CFG_PREFIX "rows", 3, NULL, ROWS_TEXT, ROWS_LONGTEXT, false );
add_string( CFG_PREFIX "active", NULL, NULL, ACTIVE_TEXT, ACTIVE_LONGTEXT,
- VLC_TRUE );
- add_string( CFG_PREFIX "element-aspect", "4:3", NULL, ASPECT_TEXT, ASPECT_LONGTEXT, VLC_FALSE );
+ true );
+ add_string( CFG_PREFIX "element-aspect", "4:3", NULL, ASPECT_TEXT, ASPECT_LONGTEXT, false );
add_shortcut( "wall" );
set_callbacks( Create, Destroy );
int i_vout;
struct vout_list_t
{
- vlc_bool_t b_active;
+ bool b_active;
int i_width;
int i_height;
int i_left;
}
if( i_height == 0 || i_width == 0 )
{
- p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].b_active = VLC_FALSE;
+ p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].b_active = false;
}
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].i_width = i_width;
* p_vout->render.i_height
/ cucul_get_canvas_height( p_vout->p_sys->p_cv );
var_Set( p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
break;
case CACA_EVENT_MOUSE_RELEASE:
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
break;
case CACA_EVENT_QUIT:
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
add_file( FB_DEV_VAR, "/dev/fb0", NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
- VLC_FALSE );
- add_bool( "fb-tty", 1, NULL, TTY_TEXT, TTY_LONGTEXT, VLC_TRUE );
+ false );
+ add_bool( "fb-tty", 1, NULL, TTY_TEXT, TTY_LONGTEXT, true );
add_string( "fb-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "fb-aspect-ratio", NULL, NULL, ASPECT_RATIO_TEXT,
- ASPECT_RATIO_LONGTEXT, VLC_TRUE );
+ ASPECT_RATIO_LONGTEXT, true );
add_integer( "fb-mode", 4, NULL, FB_MODE_TEXT, FB_MODE_LONGTEXT,
- VLC_TRUE );
- add_bool( "fb-hw-accel", VLC_TRUE, NULL, HW_ACCEL_TEXT, HW_ACCEL_LONGTEXT,
- VLC_TRUE );
+ true );
+ add_bool( "fb-hw-accel", true, NULL, HW_ACCEL_TEXT, HW_ACCEL_LONGTEXT,
+ true );
set_description( _("GNU/Linux console framebuffer video output") );
set_capability( "video output", 30 );
set_callbacks( Create, Destroy );
{
/* System information */
int i_tty; /* tty device handle */
- vlc_bool_t b_tty;
+ bool b_tty;
struct termios old_termios;
/* Original configuration information */
int i_fd; /* device handle */
struct fb_var_screeninfo old_info; /* original mode information */
struct fb_var_screeninfo var_info; /* current mode information */
- vlc_bool_t b_pan; /* does device supports panning ? */
+ bool b_pan; /* does device supports panning ? */
struct fb_cmap fb_cmap; /* original colormap */
uint16_t *p_palette; /* original palette */
- vlc_bool_t b_hw_accel; /* has hardware support */
+ bool b_hw_accel; /* has hardware support */
/* Video information */
uint32_t i_width;
uint32_t i_height;
int i_aspect;
int i_bytes_per_pixel;
- vlc_bool_t b_auto; /* Automatically adjust video size to fb size */
+ bool b_auto; /* Automatically adjust video size to fb size */
vlc_fourcc_t i_chroma;
/* Video memory */
psz_aspect = NULL;
}
- p_sys->b_auto = VLC_FALSE;
+ p_sys->b_auto = false;
i_mode = var_CreateGetInteger( p_vout, "fb-mode" );
switch( i_mode )
{
break;
case 4:
default:
- p_sys->b_auto = VLC_TRUE;
+ p_sys->b_auto = true;
break;
}
if( (p_sys->i_height != p_sys->var_info.yres) ||
(p_sys->i_width != p_sys->var_info.xres) )
{
- p_sys->b_auto = VLC_TRUE;
+ p_sys->b_auto = true;
msg_Warn( p_vout,
"using framebuffer native resolution instead of requested (%ix%i)",
p_sys->i_width, p_sys->i_height );
"environment variable.")
vlc_module_begin();
- add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
+ add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true );
set_description( "General Graphics Interface video output" );
set_capability( "video output", 30 );
set_callbacks( Create, Destroy );
ggi_directbuffer * pp_buffer[2]; /* buffers */
int i_index;
- vlc_bool_t b_must_acquire; /* must be acquired before writing */
+ bool b_must_acquire; /* must be acquired before writing */
};
/*****************************************************************************
switch( event.pbutton.button )
{
case GII_PBUTTON_LEFT:
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
break;
uint32_t i_width; /* width of main window */
uint32_t i_height; /* height of main window */
uint32_t i_screen_depth;
- vlc_bool_t b_double_buffered;
+ bool b_double_buffered;
uint32_t u_current; /* Current output resolution. */
CascadeScreen *p_screen;
(u32) p_vout->p_sys->i_height,
(u8) p_vout->p_sys->i_screen_depth,
b_double_buffered );
- p_vout->p_sys->b_double_buffered = (vlc_bool_t) b_double_buffered;
+ p_vout->p_sys->b_double_buffered = (bool) b_double_buffered;
msg_Dbg( p_vout, "using screen index = %u, width = %u, height = %u, depth = %u, double buffered = %d",
p_vout->p_sys->u_current, /* Current screen. */
p_vout->p_sys->i_width,
set_capability( "video output", 0 );
add_string( CFG_PREFIX "format", "png", NULL,
- FORMAT_TEXT, FORMAT_LONGTEXT, VLC_FALSE );
+ FORMAT_TEXT, FORMAT_LONGTEXT, false );
change_string_list( psz_format_list, psz_format_list_text, 0 );
add_integer( CFG_PREFIX "width", 0, NULL,
- WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE );
+ WIDTH_TEXT, WIDTH_LONGTEXT, true );
add_deprecated_alias( "image-width" ); /* since 0.9.0 */
add_integer( CFG_PREFIX "height", 0, NULL,
- HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE );
+ HEIGHT_TEXT, HEIGHT_LONGTEXT, true );
add_deprecated_alias( "image-height" ); /* since 0.9.0 */
add_integer( CFG_PREFIX "ratio", 3, NULL,
- RATIO_TEXT, RATIO_LONGTEXT, VLC_FALSE );
+ RATIO_TEXT, RATIO_LONGTEXT, false );
add_string( CFG_PREFIX "prefix", "img", NULL,
- PREFIX_TEXT, PREFIX_LONGTEXT, VLC_FALSE );
+ PREFIX_TEXT, PREFIX_LONGTEXT, false );
add_bool( CFG_PREFIX "replace", 0, NULL,
- REPLACE_TEXT, REPLACE_LONGTEXT, VLC_FALSE );
+ REPLACE_TEXT, REPLACE_LONGTEXT, false );
set_callbacks( Create, Destroy );
vlc_module_end();
int i_current; /* Current image */
int i_frames; /* Number of frames */
- vlc_bool_t b_replace;
+ bool b_replace;
- vlc_bool_t b_time;
- vlc_bool_t b_meta;
+ bool b_time;
+ bool b_meta;
image_handler_t *p_image;
};
p_vout->p_sys->psz_prefix =
var_CreateGetString( p_this, CFG_PREFIX "prefix" );
p_vout->p_sys->b_time = strchr( p_vout->p_sys->psz_prefix, '%' )
- ? VLC_TRUE : VLC_FALSE;
+ ? true : false;
p_vout->p_sys->b_meta = strchr( p_vout->p_sys->psz_prefix, '$' )
- ? VLC_TRUE : VLC_FALSE;
+ ? true : false;
p_vout->p_sys->psz_format =
var_CreateGetString( p_this, CFG_PREFIX "format" );
p_vout->p_sys->i_width =
* Module descriptor
*****************************************************************************/
-static vlc_bool_t _got_vista_or_above;
+static bool _got_vista_or_above;
static int get_capability_for_osversion(void)
{
if( winVer.dwMajorVersion > 5 )
{
/* Windows Vista or above, make this module the default */
- _got_vista_or_above = VLC_TRUE;
+ _got_vista_or_above = true;
return 150;
}
}
/* Windows XP or lower, make sure this module isn't the default */
- _got_vista_or_above = VLC_FALSE;
+ _got_vista_or_above = false;
return 50;
}
p_vout->output.i_height = p_vout->render.i_height;
p_vout->output.i_aspect = p_vout->render.i_aspect;
p_vout->fmt_out = p_vout->fmt_in;
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
/* create picture pool */
p_vout->output.i_chroma = 0;
p_vout->fmt_out.i_sar_num = p_vout->fmt_in.i_sar_num;
p_vout->fmt_out.i_sar_den = p_vout->fmt_in.i_sar_den;
p_vout->output.i_aspect = p_vout->fmt_in.i_aspect;
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
}
/* We used to call the Win32 PeekMessage function here to read the window
SWP_NOSIZE | SWP_NOMOVE );
}
- p_vout->p_sys->b_on_top_change = VLC_FALSE;
+ p_vout->p_sys->b_on_top_change = false;
}
/* Check if the event thread is still running */
}
p_pic->i_status = DESTROYED_PICTURE;
p_pic->i_type = DIRECT_PICTURE;
- p_pic->b_slow = VLC_TRUE;
+ p_pic->b_slow = true;
p_pic->pf_lock = Direct3DVoutLockSurface;
p_pic->pf_unlock = Direct3DVoutUnlockSurface;
PP_OUTPUTPICTURE[c] = p_pic;
static DWORD DirectXFindColorkey( vout_thread_t *p_vout, uint32_t *i_color );
-void SwitchWallpaperMode( vout_thread_t *, vlc_bool_t );
+void SwitchWallpaperMode( vout_thread_t *, bool );
/* Object variables callbacks */
static int FindDevicesCallback( vlc_object_t *, char const *,
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
add_bool( "directx-hw-yuv", 1, NULL, HW_YUV_TEXT, HW_YUV_LONGTEXT,
- VLC_TRUE );
+ true );
add_bool( "directx-use-sysmem", 0, NULL, SYSMEM_TEXT, SYSMEM_LONGTEXT,
- VLC_TRUE );
+ true );
add_bool( "directx-3buffering", 1, NULL, TRIPLEBUF_TEXT,
- TRIPLEBUF_LONGTEXT, VLC_TRUE );
+ TRIPLEBUF_LONGTEXT, true );
add_string( "directx-device", "", NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
- VLC_TRUE );
+ true );
change_string_list( ppsz_dev, ppsz_dev_text, FindDevicesCallback );
change_action_add( FindDevicesCallback, N_("Refresh list") );
add_bool( "directx-wallpaper", 0, NULL, WALLPAPER_TEXT, WALLPAPER_LONGTEXT,
- VLC_TRUE );
+ true );
set_description( _("DirectX video output") );
set_capability( "video output", 100 );
p_vout->output.i_height = p_vout->render.i_height;
p_vout->output.i_aspect = p_vout->render.i_aspect;
p_vout->fmt_out = p_vout->fmt_in;
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
#define MAX_DIRECTBUFFERS 1
/* Right now we use only 1 directbuffer because we don't want the
vlc_mutex_destroy( &p_vout->p_sys->lock );
/* Make sure the wallpaper is restored */
- SwitchWallpaperMode( p_vout, VLC_FALSE );
+ SwitchWallpaperMode( p_vout, false );
/* restore screensaver system settings */
if( 0 != p_vout->p_sys->i_spi_lowpowertimeout ) {
p_vout->fmt_out.i_sar_num = p_vout->fmt_in.i_sar_num;
p_vout->fmt_out.i_sar_den = p_vout->fmt_in.i_sar_den;
p_vout->output.i_aspect = p_vout->fmt_in.i_aspect;
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
}
/* We used to call the Win32 PeekMessage function here to read the window
SWP_NOSIZE | SWP_NOMOVE );
}
- p_vout->p_sys->b_on_top_change = VLC_FALSE;
+ p_vout->p_sys->b_on_top_change = false;
}
/* Check if the event thread is still running */
p_vout->p_sys->i_rgb_colorkey =
DirectXFindColorkey( p_vout, &p_vout->p_sys->i_colorkey );
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
return VLC_SUCCESS;
}
if( !b_overlay )
{
- vlc_bool_t b_rgb_surface =
+ bool b_rgb_surface =
( i_chroma == VLC_FOURCC('R','G','B','2') )
|| ( i_chroma == VLC_FOURCC('R','V','1','5') )
|| ( i_chroma == VLC_FOURCC('R','V','1','6') )
{
DWORD i_codes;
DWORD *pi_codes;
- vlc_bool_t b_result = VLC_FALSE;
+ bool b_result = false;
/* Check if the chroma is supported first. This is required
* because a few buggy drivers don't mind creating the surface
{
if( p_vout->output.i_chroma == pi_codes[i] )
{
- b_result = VLC_TRUE;
+ b_result = true;
break;
}
}
0 /* no overlay */,
0 /* no back buffers */ );
else
- p_vout->p_sys->b_hw_yuv = VLC_FALSE;
+ p_vout->p_sys->b_hw_yuv = false;
}
if( i_ret || !p_vout->p_sys->b_hw_yuv )
{
p_pic[i].i_status = DESTROYED_PICTURE;
p_pic[i].i_type = DIRECT_PICTURE;
- p_pic[i].b_slow = VLC_TRUE;
+ p_pic[i].b_slow = true;
p_pic[i].pf_lock = DirectXLockSurface;
p_pic[i].pf_unlock = DirectXUnlockSurface;
PP_OUTPUTPICTURE[i] = &p_pic[i];
}
else
{
- vlc_bool_t bHasOverlay, bHasOverlayFourCC, bCanDeinterlace,
+ bool bHasOverlay, bHasOverlayFourCC, bCanDeinterlace,
bHasColorKey, bCanStretch, bCanBltFourcc,
bAlignBoundarySrc, bAlignBoundaryDest,
bAlignSizeSrc, bAlignSizeDest;
/*****************************************************************************
* A few toolbox functions
*****************************************************************************/
-void SwitchWallpaperMode( vout_thread_t *p_vout, vlc_bool_t b_on )
+void SwitchWallpaperMode( vout_thread_t *p_vout, bool b_on )
{
HWND hwnd;
FreeLibrary( hddraw_dll );
/* Signal change to the interface */
- p_item->b_dirty = VLC_TRUE;
+ p_item->b_dirty = true;
return VLC_SUCCESS;
}
static int Control( vout_thread_t *p_vout, int i_query, va_list args );
-static void DirectXPopupMenu( event_thread_t *p_event, vlc_bool_t b_open )
+static void DirectXPopupMenu( event_thread_t *p_event, bool b_open )
{
playlist_t *p_playlist =
vlc_object_find( p_event, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( DirectXCreateWindow( p_event->p_vout ) )
{
msg_Err( p_event, "out of memory" );
- p_event->b_dead = VLC_TRUE;
+ p_event->b_dead = true;
}
/* Signal the creation of the window */
p_event->p_vout->fmt_in.i_y_offset;
var_Set( p_event->p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_event->p_vout, "mouse-moved", val );
}
case WM_VLC_HIDE_MOUSE:
if( p_event->p_vout->p_sys->b_cursor_hidden ) break;
- p_event->p_vout->p_sys->b_cursor_hidden = VLC_TRUE;
+ p_event->p_vout->p_sys->b_cursor_hidden = true;
GetCursorPos( &old_mouse_pos );
ShowCursor( FALSE );
break;
case WM_VLC_SHOW_MOUSE:
if( !p_event->p_vout->p_sys->b_cursor_hidden ) break;
- p_event->p_vout->p_sys->b_cursor_hidden = VLC_FALSE;
+ p_event->p_vout->p_sys->b_cursor_hidden = false;
GetCursorPos( &old_mouse_pos );
ShowCursor( TRUE );
break;
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int |= 1;
var_Set( p_event->p_vout, "mouse-button-down", val );
- DirectXPopupMenu( p_event, VLC_FALSE );
+ DirectXPopupMenu( p_event, false );
break;
case WM_LBUTTONUP:
val.i_int &= ~1;
var_Set( p_event->p_vout, "mouse-button-down", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_event->p_vout, "mouse-clicked", val );
break;
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int |= 2;
var_Set( p_event->p_vout, "mouse-button-down", val );
- DirectXPopupMenu( p_event, VLC_FALSE );
+ DirectXPopupMenu( p_event, false );
break;
case WM_MBUTTONUP:
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int |= 4;
var_Set( p_event->p_vout, "mouse-button-down", val );
- DirectXPopupMenu( p_event, VLC_FALSE );
+ DirectXPopupMenu( p_event, false );
break;
case WM_RBUTTONUP:
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int &= ~4;
var_Set( p_event->p_vout, "mouse-button-down", val );
- DirectXPopupMenu( p_event, VLC_TRUE );
+ DirectXPopupMenu( p_event, true );
break;
case WM_KEYDOWN:
* its job is to update the source and destination RECTs used to display the
* picture.
*****************************************************************************/
-void E_(UpdateRects)( vout_thread_t *p_vout, vlc_bool_t b_force )
+void E_(UpdateRects)( vout_thread_t *p_vout, bool b_force )
{
#define rect_src p_vout->p_sys->rect_src
#define rect_src_clipped p_vout->p_sys->rect_src_clipped
{
case WM_WINDOWPOSCHANGED:
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
return 0;
/* the user wants to close the window */
case WM_KILLFOCUS:
#ifdef MODULE_NAME_IS_wingapi
- p_vout->p_sys->b_focus = VLC_FALSE;
+ p_vout->p_sys->b_focus = false;
if( !p_vout->p_sys->b_parent_focus ) GXSuspend();
#endif
#ifdef UNDER_CE
case WM_SETFOCUS:
#ifdef MODULE_NAME_IS_wingapi
- p_vout->p_sys->b_focus = VLC_TRUE;
+ p_vout->p_sys->b_focus = true;
GXResume();
#endif
#ifdef UNDER_CE
return vout_ControlWindow( p_vout,
(void *)p_vout->p_sys->hparent, i_query, args );
- p_vout->p_sys->b_on_top_change = VLC_TRUE;
+ p_vout->p_sys->b_on_top_change = true;
return VLC_SUCCESS;
#ifdef MODULE_NAME_IS_wingapi
p_vout->fmt_out.i_sar_num = p_vout->fmt_in.i_sar_num;
p_vout->fmt_out.i_sar_den = p_vout->fmt_in.i_sar_den;
p_vout->output.i_aspect = p_vout->fmt_in.i_aspect;
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
}
/* We used to call the Win32 PeekMessage function here to read the window
SWP_NOSIZE | SWP_NOMOVE );
}
- p_vout->p_sys->b_on_top_change = VLC_FALSE;
+ p_vout->p_sys->b_on_top_change = false;
}
/* Check if the event thread is still running */
volatile uint16_t i_changes; /* changes made to the video display */
/* Mouse */
- volatile vlc_bool_t b_cursor_hidden;
+ volatile bool b_cursor_hidden;
volatile mtime_t i_lastmoved;
mtime_t i_mouse_hide_timeout;
/* Misc */
- vlc_bool_t b_on_top_change;
+ bool b_on_top_change;
#ifndef UNDER_CE
RECT rect_dest;
RECT rect_dest_clipped;
- vlc_bool_t b_hw_yuv; /* Should we use hardware YUV->RGB conversions */
+ bool b_hw_yuv; /* Should we use hardware YUV->RGB conversions */
#ifdef MODULE_NAME_IS_vout_directx
int i_align_dest_boundary;
int i_align_dest_size;
- vlc_bool_t b_wallpaper; /* show as desktop wallpaper ? */
+ bool b_wallpaper; /* show as desktop wallpaper ? */
- vlc_bool_t b_using_overlay; /* Are we using an overlay surface */
- vlc_bool_t b_use_sysmem; /* Should we use system memory for surfaces */
- vlc_bool_t b_3buf_overlay; /* Should we use triple buffered overlays */
+ bool b_using_overlay; /* Are we using an overlay surface */
+ bool b_use_sysmem; /* Should we use system memory for surfaces */
+ bool b_3buf_overlay; /* Should we use triple buffered overlays */
/* DDraw capabilities */
int b_caps_overlay_clipping;
int render_width;
int render_height;
- vlc_bool_t b_focus;
- vlc_bool_t b_parent_focus;
+ bool b_focus;
+ bool b_parent_focus;
HINSTANCE gapi_dll; /* handle of the opened gapi dll */
#ifndef UNDER_CE
/* suspend display */
- vlc_bool_t b_suspend_display;
+ bool b_suspend_display;
#endif
event_thread_t *p_event;
* Prototypes from events.c
*****************************************************************************/
void E_(EventThread) ( event_thread_t *p_event );
-void E_(UpdateRects) ( vout_thread_t *p_vout, vlc_bool_t b_force );
+void E_(UpdateRects) ( vout_thread_t *p_vout, bool b_force );
void Win32ToggleFullscreen ( vout_thread_t *p_vout );
/*****************************************************************************
/* Change the window title bar text */
PostMessage( p_vout->p_sys->hwnd, WM_VLC_CHANGE_TEXT, 0, 0 );
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
return VLC_SUCCESS;
}
p_vout->fmt_out.i_sar_num = p_vout->fmt_in.i_sar_num;
p_vout->fmt_out.i_sar_den = p_vout->fmt_in.i_sar_den;
p_vout->output.i_aspect = p_vout->fmt_in.i_aspect;
- E_(UpdateRects)( p_vout, VLC_TRUE );
+ E_(UpdateRects)( p_vout, true );
}
/*
SWP_NOSIZE | SWP_NOMOVE );
}
- p_vout->p_sys->b_on_top_change = VLC_FALSE;
+ p_vout->p_sys->b_on_top_change = false;
}
/* Check if the event thread is still running */
#endif
add_shortcut( "opengl" );
add_float( "opengl-cube-speed", 2.0, NULL, SPEED_TEXT,
- SPEED_LONGTEXT, VLC_TRUE );
+ SPEED_LONGTEXT, true );
#ifdef OPENGL_MORE_EFFECT
add_integer_with_range( "opengl-accuracy", 4, 1, 10, NULL, ACCURACY_TEXT,
- ACCURACY_LONGTEXT, VLC_TRUE );
+ ACCURACY_LONGTEXT, true );
add_float_with_range( "opengl-pov-x", 0.0, -1.0, 1.0, NULL, POV_X_TEXT,
- POV_X_LONGTEXT, VLC_TRUE );
+ POV_X_LONGTEXT, true );
add_float_with_range( "opengl-pov-y", 0.0, -1.0, 1.0, NULL, POV_Y_TEXT,
- POV_Y_LONGTEXT, VLC_TRUE );
+ POV_Y_LONGTEXT, true );
add_float_with_range( "opengl-pov-z", -1.0, -1.0, 1.0, NULL, POV_Z_TEXT,
- POV_Z_LONGTEXT, VLC_TRUE );
+ POV_Z_LONGTEXT, true );
add_float( "opengl-cylinder-radius", -100.0, NULL, RADIUS_TEXT,
- RADIUS_LONGTEXT, VLC_TRUE );
+ RADIUS_LONGTEXT, true );
#endif
/* Allow opengl provider plugin selection */
add_string( "opengl-provider", "default", NULL, PROVIDER_TEXT,
- PROVIDER_LONGTEXT, VLC_TRUE );
+ PROVIDER_LONGTEXT, true );
set_callbacks( CreateVout, DestroyVout );
add_string( "opengl-effect", "none", NULL, EFFECT_TEXT,
- EFFECT_LONGTEXT, VLC_FALSE );
+ EFFECT_LONGTEXT, false );
change_string_list( ppsz_effects, ppsz_effects_text, 0 );
vlc_module_end();
uint8_t *pp_buffer[2]; /* one last rendered, one to be rendered */
int i_index;
- vlc_bool_t b_frame_available;
+ bool b_frame_available;
CGLContextObj glContext;
return VLC_EGENERIC;
}
}
- p_sys->b_frame_available = VLC_FALSE;
+ p_sys->b_frame_available = false;
p_sys->i_index = 0;
p_vout->p_picture[0].i_planes = 1;
{
vout_sys_t *p_sys = p_vout->p_sys;
- p_vout->p_sys->b_frame_available = VLC_FALSE;
+ p_vout->p_sys->b_frame_available = false;
[p_vout->p_sys->o_cocoa_container performSelectorOnMainThread:@selector(removeVoutLayer:) withObject:p_vout->p_sys->o_layer waitUntilDone:YES];
p_pic->p->p_pixels = p_sys->pp_buffer[p_sys->i_index];
CGLUnlockContext(p_sys->glContext);
- p_sys->b_frame_available = VLC_TRUE;
+ p_sys->b_frame_available = true;
}
}
#ifdef NEED_QTE_MAIN
p_vout->p_sys->p_qte_main =
- module_Need( p_this, "gui-helper", "qte", VLC_TRUE );
+ module_Need( p_this, "gui-helper", "qte", true );
if( p_vout->p_sys->p_qte_main == NULL )
{
free( p_vout->p_sys );
/* Initializations */
#if 1 /* FIXME: I need an event queue to handle video output size changes. */
- p_vout->b_fullscreen = VLC_TRUE;
+ p_vout->b_fullscreen = true;
#endif
/* Set main window's size */
/* create thread to exec the qpe application */
if ( vlc_thread_create( p_vout->p_sys->p_event, "QT Embedded Thread",
RunQtThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_TRUE) )
+ VLC_THREAD_PRIORITY_OUTPUT, true) )
{
msg_Err( p_vout, "cannot create QT Embedded Thread" );
vlc_object_release( p_vout->p_sys->p_event );
/* For RGB output */
int i_surfaces;
- vlc_bool_t b_cursor;
- vlc_bool_t b_cursor_autohidden;
+ bool b_cursor;
+ bool b_cursor_autohidden;
mtime_t i_lastmoved;
mtime_t i_mouse_hide_timeout;
mtime_t i_lastpressed; /* to track dbl-clicks */
set_description( _("Simple DirectMedia Layer video output") );
set_capability( "video output", 60 );
add_shortcut( "sdl" );
- add_string( "sdl-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, VLC_TRUE );
+ add_string( "sdl-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true );
set_callbacks( Open, Close );
#if defined( __i386__ ) || defined( __x86_64__ )
/* On i386, SDL is linked against svgalib */
var_Set( p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
if( p_vout->p_sys->b_cursor )
val.i_int &= ~1;
var_Set( p_vout, "mouse-button-down", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
break;
if( p_playlist != NULL )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist );
}
set_subcategory( SUBCAT_VIDEO_VOUT );
set_capability( "video output", 1 );
- add_integer( "snapshot-width", 320, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, VLC_FALSE );
- add_integer( "snapshot-height", 200, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_FALSE );
- add_string( "snapshot-chroma", "RV32", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, VLC_TRUE );
- add_integer( "snapshot-cache-size", 50, NULL, CACHE_TEXT, CACHE_LONGTEXT, VLC_TRUE );
+ add_integer( "snapshot-width", 320, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, false );
+ add_integer( "snapshot-height", 200, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, false );
+ add_string( "snapshot-chroma", "RV32", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true );
+ add_integer( "snapshot-cache-size", 50, NULL, CACHE_TEXT, CACHE_LONGTEXT, true );
set_callbacks( Create, Destroy );
vlc_module_end();
set_subcategory( SUBCAT_VIDEO_VOUT );
set_capability( "video output", 0 );
- add_integer( "vmem-width", 320, NULL, T_WIDTH, LT_WIDTH, VLC_FALSE );
- add_integer( "vmem-height", 200, NULL, T_HEIGHT, LT_HEIGHT, VLC_FALSE );
- add_integer( "vmem-pitch", 640, NULL, T_PITCH, LT_PITCH, VLC_FALSE );
- add_string( "vmem-chroma", "RV16", NULL, T_CHROMA, LT_CHROMA, VLC_TRUE );
- add_string( "vmem-lock", "0", NULL, T_LOCK, LT_LOCK, VLC_TRUE );
- add_string( "vmem-unlock", "0", NULL, T_UNLOCK, LT_UNLOCK, VLC_TRUE );
- add_string( "vmem-data", "0", NULL, T_DATA, LT_DATA, VLC_TRUE );
+ add_integer( "vmem-width", 320, NULL, T_WIDTH, LT_WIDTH, false );
+ add_integer( "vmem-height", 200, NULL, T_HEIGHT, LT_HEIGHT, false );
+ add_integer( "vmem-pitch", 640, NULL, T_PITCH, LT_PITCH, false );
+ add_string( "vmem-chroma", "RV16", NULL, T_CHROMA, LT_CHROMA, true );
+ add_string( "vmem-lock", "0", NULL, T_LOCK, LT_LOCK, true );
+ add_string( "vmem-unlock", "0", NULL, T_UNLOCK, LT_UNLOCK, true );
+ add_string( "vmem-data", "0", NULL, T_DATA, LT_DATA, true );
set_callbacks( Create, Destroy );
vlc_module_end();
set_capability( "opengl provider", 50 );
set_callbacks( CreateOpenGL, DestroyOpenGL );
- add_string( "glx-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
- add_integer( "glx-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, VLC_TRUE );
- add_bool( "glx-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, VLC_TRUE );
+ add_string( "glx-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true );
+ add_integer( "glx-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, true );
+ add_bool( "glx-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, true );
#ifdef HAVE_XINERAMA
- add_integer ( "glx-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, VLC_TRUE );
+ add_integer ( "glx-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
#endif
vlc_module_end();
set_shortname( "X11" );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
- add_string( "x11-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
- add_bool( "x11-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, VLC_TRUE );
+ add_string( "x11-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true );
+ add_bool( "x11-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, true );
#ifdef HAVE_SYS_SHM_H
- add_bool( "x11-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, VLC_TRUE );
+ add_bool( "x11-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, true );
#endif
#ifdef HAVE_XINERAMA
- add_integer ( "x11-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, VLC_TRUE );
+ add_integer ( "x11-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
#endif
set_description( _("X11 video output") );
set_capability( "video output", 70 );
static void TestNetWMSupport( vout_thread_t * );
static int ConvertKey( int );
-static int WindowOnTop( vout_thread_t *, vlc_bool_t );
+static int WindowOnTop( vout_thread_t *, bool );
static int X11ErrorHandler( Display *, XErrorEvent * );
#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
char * psz_chroma;
vlc_fourcc_t i_chroma = 0;
- vlc_bool_t b_chroma = 0;
+ bool b_chroma = 0;
#endif
p_vout->pf_init = InitVideo;
}
if( i_maj <= 0 || ((i_maj == 1) && (i_min < 3)) )
{
- p_vout->p_sys->b_glx13 = VLC_FALSE;
+ p_vout->p_sys->b_glx13 = false;
msg_Dbg( p_this, "using GLX 1.2 API" );
}
else
{
- p_vout->p_sys->b_glx13 = VLC_TRUE;
+ p_vout->p_sys->b_glx13 = true;
msg_Dbg( p_this, "using GLX 1.3 API" );
}
}
val.i_int &= ~1;
var_Set( p_vout, "mouse-button-down", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
break;
FIND_ANYWHERE );
if( p_playlist != NULL )
{
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist );
}
var_Set( p_vout, "mouse-y", val );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
p_vout->p_sys->i_time_mouse_last_moved = mdate();
XGCValues xgcvalues;
XEvent xevent;
- vlc_bool_t b_expose = VLC_FALSE;
- vlc_bool_t b_configure_notify = VLC_FALSE;
- vlc_bool_t b_map_notify = VLC_FALSE;
+ bool b_expose = false;
+ bool b_configure_notify = false;
+ bool b_map_notify = false;
vlc_value_t val;
/* Prepare window manager hints and properties */
&dummy4, &dummy5 );
/* We are already configured */
- b_configure_notify = VLC_TRUE;
+ b_configure_notify = true;
/* From man XSelectInput: only one client at a time can select a
* ButtonPress event, so we need to open a new window anyway. */
if( (xevent.type == Expose)
&& (xevent.xexpose.window == p_win->base_window) )
{
- b_expose = VLC_TRUE;
+ b_expose = true;
/* ConfigureNotify isn't sent if there isn't a window manager.
* Expose should be the last event to be received so it should
* be fine to assume we won't receive it anymore. */
- b_configure_notify = VLC_TRUE;
+ b_configure_notify = true;
}
else if( (xevent.type == MapNotify)
&& (xevent.xmap.window == p_win->base_window) )
{
- b_map_notify = VLC_TRUE;
+ b_map_notify = true;
}
else if( (xevent.type == ConfigureNotify)
&& (xevent.xconfigure.window == p_win->base_window) )
{
- b_configure_notify = VLC_TRUE;
+ b_configure_notify = true;
p_win->i_width = xevent.xconfigure.width;
p_win->i_height = xevent.xconfigure.height;
}
*****************************************************************************/
static int Control( vout_thread_t *p_vout, int i_query, va_list args )
{
- vlc_bool_t b_arg;
+ bool b_arg;
unsigned int i_width, i_height;
unsigned int *pi_width, *pi_height;
Drawable d = 0;
p_vout->p_sys->b_net_wm_state_above =
p_vout->p_sys->b_net_wm_state_below =
p_vout->p_sys->b_net_wm_state_stays_on_top =
- VLC_FALSE;
+ false;
net_wm_supported =
XInternAtom( p_vout->p_sys->p_display, "_NET_SUPPORTED", False );
{
msg_Dbg( p_vout,
"Window manager supports _NET_WM_STATE_FULLSCREEN" );
- p_vout->p_sys->b_net_wm_state_fullscreen = VLC_TRUE;
+ p_vout->p_sys->b_net_wm_state_fullscreen = true;
}
else if( p_args.p_atom[i] == p_vout->p_sys->net_wm_state_above )
{
msg_Dbg( p_vout, "Window manager supports _NET_WM_STATE_ABOVE" );
- p_vout->p_sys->b_net_wm_state_above = VLC_TRUE;
+ p_vout->p_sys->b_net_wm_state_above = true;
}
else if( p_args.p_atom[i] == p_vout->p_sys->net_wm_state_below )
{
msg_Dbg( p_vout, "Window manager supports _NET_WM_STATE_BELOW" );
- p_vout->p_sys->b_net_wm_state_below = VLC_TRUE;
+ p_vout->p_sys->b_net_wm_state_below = true;
}
else if( p_args.p_atom[i] == p_vout->p_sys->net_wm_state_stays_on_top )
{
msg_Dbg( p_vout,
"Window manager supports _NET_WM_STATE_STAYS_ON_TOP" );
- p_vout->p_sys->b_net_wm_state_stays_on_top = VLC_TRUE;
+ p_vout->p_sys->b_net_wm_state_stays_on_top = true;
}
}
/*****************************************************************************
* WindowOnTop: Switches the "always on top" state of the video window.
*****************************************************************************/
-static int WindowOnTop( vout_thread_t *p_vout, vlc_bool_t b_on_top )
+static int WindowOnTop( vout_thread_t *p_vout, bool b_on_top )
{
if( p_vout->p_sys->b_net_wm_state_stays_on_top )
{
x11_window_t fullscreen_window;
/* X11 generic properties */
- vlc_bool_t b_altfullscreen; /* which fullscreen method */
+ bool b_altfullscreen; /* which fullscreen method */
#ifdef HAVE_SYS_SHM_H
int i_shm_opcode; /* shared memory extension opcode */
#endif
#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
int i_xvport;
- vlc_bool_t b_paint_colourkey;
+ bool b_paint_colourkey;
int i_colourkey;
#else
Colormap colormap; /* colormap used (8bpp only) */
#endif
/* Mouse pointer properties */
- vlc_bool_t b_mouse_pointer_visible;
+ bool b_mouse_pointer_visible;
mtime_t i_time_mouse_last_moved; /* used to auto-hide pointer*/
mtime_t i_mouse_hide_timeout; /* after time hide cursor */
Cursor blank_cursor; /* the hidden cursor */
/* Window manager properties */
Atom net_wm_state;
Atom net_wm_state_fullscreen;
- vlc_bool_t b_net_wm_state_fullscreen;
+ bool b_net_wm_state_fullscreen;
Atom net_wm_state_above;
- vlc_bool_t b_net_wm_state_above;
+ bool b_net_wm_state_above;
Atom net_wm_state_stays_on_top;
- vlc_bool_t b_net_wm_state_stays_on_top;
+ bool b_net_wm_state_stays_on_top;
Atom net_wm_state_below;
- vlc_bool_t b_net_wm_state_below;
+ bool b_net_wm_state_below;
#ifdef MODULE_NAME_IS_glx
/* GLX properties */
set_shortname( "XVideo" );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
- add_string( "xvideo-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
- add_integer( "xvideo-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, VLC_TRUE );
- add_bool( "xvideo-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, VLC_TRUE );
- add_string( "xvideo-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, VLC_TRUE );
+ add_string( "xvideo-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true );
+ add_integer( "xvideo-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, true );
+ add_bool( "xvideo-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, true );
+ add_string( "xvideo-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true );
#ifdef HAVE_SYS_SHM_H
- add_bool( "xvideo-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, VLC_TRUE );
+ add_bool( "xvideo-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, true );
#endif
#ifdef HAVE_XINERAMA
- add_integer ( "xvideo-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, VLC_TRUE );
+ add_integer ( "xvideo-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
#endif
set_description( _("XVideo extension video output") );
vlc_module_begin();
set_shortname( "XVMC" );
- add_string( "xvmc-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
- add_integer( "xvmc-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, VLC_TRUE );
- add_bool( "xvmc-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, VLC_TRUE );
- add_string( "xvmc-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, VLC_TRUE );
+ add_string( "xvmc-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true );
+ add_integer( "xvmc-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, true );
+ add_bool( "xvmc-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, true );
+ add_string( "xvmc-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true );
#ifdef HAVE_SYS_SHM_H
- add_bool( "xvmc-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, VLC_TRUE );
+ add_bool( "xvmc-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, true );
#endif
#ifdef HAVE_XINERAMA
- add_integer ( "xvmc-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, VLC_TRUE );
+ add_integer ( "xvmc-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
#endif
- add_string( "xvmc-deinterlace-mode", "bob", NULL, MODE_TEXT, MODE_LONGTEXT, VLC_FALSE );
- add_string( "xvmc-crop-style", "eq", NULL, CROP_TEXT, CROP_LONGTEXT, VLC_FALSE );
+ add_string( "xvmc-deinterlace-mode", "bob", NULL, MODE_TEXT, MODE_LONGTEXT, false );
+ add_string( "xvmc-crop-style", "eq", NULL, CROP_TEXT, CROP_LONGTEXT, false );
set_description( _("XVMC extension video output") );
set_capability( "video output", 10 );
unsigned int width, unsigned int height )
{
unsigned int i, k;
- vlc_bool_t found = VLC_FALSE;
+ bool found = false;
xvmc_capabilities_t *curCap = NULL;
unsigned int request_mpeg_flags, request_accel_flags;
(width <= curCap->max_width) &&
(height <= curCap->max_height) )
{
- found = VLC_TRUE;
+ found = true;
break;
}
curCap++;
p_thread->psz_title = TitleGet( VLC_OBJECT( p_filter ) );
if( vlc_thread_create( p_thread, "galaktos update thread", Thread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Err( p_filter, "cannot lauch galaktos thread" );
free( p_thread->psz_title );
p_thread->p_opengl->render.i_width = p_thread->i_width;
p_thread->p_opengl->render.i_height = p_thread->i_width;
p_thread->p_opengl->render.i_aspect = VOUT_ASPECT_FACTOR;
- p_thread->p_opengl->b_scale = VLC_TRUE;
- p_thread->p_opengl->b_fullscreen = VLC_FALSE;
+ p_thread->p_opengl->b_scale = true;
+ p_thread->p_opengl->b_fullscreen = false;
p_thread->p_opengl->i_alignment = 0;
p_thread->p_opengl->fmt_in.i_sar_num = 1;
p_thread->p_opengl->fmt_in.i_sar_den = 1;
set_subcategory( SUBCAT_AUDIO_VISUAL );
set_capability( "visualization", 0 );
add_integer( "goom-width", 320, NULL,
- WIDTH_TEXT, RES_LONGTEXT, VLC_FALSE );
+ WIDTH_TEXT, RES_LONGTEXT, false );
add_integer( "goom-height", 240, NULL,
- HEIGHT_TEXT, RES_LONGTEXT, VLC_FALSE );
+ HEIGHT_TEXT, RES_LONGTEXT, false );
add_integer( "goom-speed", 6, NULL,
- SPEED_TEXT, SPEED_LONGTEXT, VLC_FALSE );
+ SPEED_TEXT, SPEED_LONGTEXT, false );
set_callbacks( Open, Close );
add_shortcut( "goom" );
vlc_module_end();
p_thread->psz_title = TitleGet( VLC_OBJECT( p_filter ) );
if( vlc_thread_create( p_thread, "Goom Update Thread", Thread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Err( p_filter, "cannot lauch goom thread" );
vout_Destroy( p_thread->p_vout );
set_description( _("Visualizer filter") );
set_section( N_( "General") , NULL );
add_string("effect-list", "spectrum", NULL,
- ELIST_TEXT, ELIST_LONGTEXT, VLC_TRUE );
+ ELIST_TEXT, ELIST_LONGTEXT, true );
add_integer("effect-width",VOUT_WIDTH,NULL,
- WIDTH_TEXT, WIDTH_LONGTEXT, VLC_FALSE );
+ WIDTH_TEXT, WIDTH_LONGTEXT, false );
add_integer("effect-height" , VOUT_HEIGHT , NULL,
- HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_FALSE );
+ HEIGHT_TEXT, HEIGHT_LONGTEXT, false );
set_section( N_("Spectrum analyser") , NULL );
add_integer("visual-nbbands", 80, NULL,
- NBBANDS_TEXT, NBBANDS_LONGTEXT, VLC_TRUE );
+ NBBANDS_TEXT, NBBANDS_LONGTEXT, true );
add_integer("visual-separ", 1, NULL,
- SEPAR_TEXT, SEPAR_LONGTEXT, VLC_TRUE );
+ SEPAR_TEXT, SEPAR_LONGTEXT, true );
add_integer("visual-amp", 3, NULL,
- AMP_TEXT, AMP_LONGTEXT, VLC_TRUE );
- add_bool("visual-peaks", VLC_TRUE, NULL,
- PEAKS_TEXT, PEAKS_LONGTEXT, VLC_TRUE );
+ AMP_TEXT, AMP_LONGTEXT, true );
+ add_bool("visual-peaks", true, NULL,
+ PEAKS_TEXT, PEAKS_LONGTEXT, true );
set_section( N_("Spectrometer") , NULL );
- add_bool("spect-show-original", VLC_FALSE, NULL,
- ORIG_TEXT, ORIG_LONGTEXT, VLC_TRUE );
- add_bool("spect-show-base", VLC_TRUE, NULL,
- BASE_TEXT, BASE_LONGTEXT, VLC_TRUE );
+ add_bool("spect-show-original", false, NULL,
+ ORIG_TEXT, ORIG_LONGTEXT, true );
+ add_bool("spect-show-base", true, NULL,
+ BASE_TEXT, BASE_LONGTEXT, true );
add_integer("spect-radius", 42, NULL,
- RADIUS_TEXT, RADIUS_LONGTEXT, VLC_TRUE );
+ RADIUS_TEXT, RADIUS_LONGTEXT, true );
add_integer("spect-sections", 3, NULL,
- SSECT_TEXT, SSECT_LONGTEXT, VLC_TRUE );
+ SSECT_TEXT, SSECT_LONGTEXT, true );
add_integer("spect-color", 80, NULL,
- COLOR1_TEXT, COLOR1_LONGTEXT, VLC_TRUE );
- add_bool("spect-show-bands", VLC_TRUE, NULL,
- BANDS_TEXT, BANDS_LONGTEXT, VLC_TRUE );
+ COLOR1_TEXT, COLOR1_LONGTEXT, true );
+ add_bool("spect-show-bands", true, NULL,
+ BANDS_TEXT, BANDS_LONGTEXT, true );
add_integer("spect-nbbands", 32, NULL,
- NBBANDS_TEXT, SPNBBANDS_LONGTEXT, VLC_TRUE );
+ NBBANDS_TEXT, SPNBBANDS_LONGTEXT, true );
add_integer("spect-separ", 1, NULL,
- SEPAR_TEXT, SEPAR_LONGTEXT, VLC_TRUE );
+ SEPAR_TEXT, SEPAR_LONGTEXT, true );
add_integer("spect-amp", 8, NULL,
- AMP_TEXT, AMP_LONGTEXT, VLC_TRUE );
- add_bool("spect-show-peaks", VLC_TRUE, NULL,
- PEAKS_TEXT, PEAKS_LONGTEXT, VLC_TRUE );
+ AMP_TEXT, AMP_LONGTEXT, true );
+ add_bool("spect-show-peaks", true, NULL,
+ PEAKS_TEXT, PEAKS_LONGTEXT, true );
add_integer("spect-peak-width", 61, NULL,
- PEAK_WIDTH_TEXT, PEAK_WIDTH_LONGTEXT, VLC_TRUE );
+ PEAK_WIDTH_TEXT, PEAK_WIDTH_LONGTEXT, true );
add_integer("spect-peak-height", 1, NULL,
- PEAK_HEIGHT_TEXT, PEAK_HEIGHT_LONGTEXT, VLC_TRUE );
+ PEAK_HEIGHT_TEXT, PEAK_HEIGHT_LONGTEXT, true );
set_capability( "visualization", 0 );
set_callbacks( Open, Close );
add_shortcut( "visualizer");
result = _p_instance->getVLCObject(&i_vlc);
if( SUCCEEDED(result) )
{
- VLC_TimeSet(i_vlc, seconds, VLC_TRUE);
+ VLC_TimeSet(i_vlc, seconds, true);
}
}
return result;
case VLC_VAR_BOOL:
hr = VariantChangeType(&arg, &value, 0, VT_BOOL);
if( SUCCEEDED(hr) )
- val.b_bool = (VARIANT_TRUE == V_BOOL(&arg)) ? VLC_TRUE : VLC_FALSE;
+ val.b_bool = (VARIANT_TRUE == V_BOOL(&arg)) ? true : false;
break;
case VLC_VAR_INTEGER:
switch( V_VT(&value) )
{
case VT_BOOL:
- val.b_bool = (VARIANT_TRUE == V_BOOL(&value)) ? VLC_TRUE : VLC_FALSE;
+ val.b_bool = (VARIANT_TRUE == V_BOOL(&value)) ? true : false;
i_type = VLC_VAR_BOOL;
break;
case VT_I4:
{
case ID_audio_mute:
{
- vlc_bool_t muted = libvlc_audio_get_mute(p_plugin->getVLC(), &ex);
+ bool muted = libvlc_audio_get_mute(p_plugin->getVLC(), &ex);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
}
case ID_input_hasvout:
{
- vlc_bool_t val = libvlc_media_player_has_vout(p_md, &ex);
+ bool val = libvlc_media_player_has_vout(p_md, &ex);
libvlc_media_player_release(p_md);
if( libvlc_exception_raised(&ex) )
{
libvlc_playlist_play(p_vlc, 0, 0, NULL, NULL);
}
}
- p_plugin->b_stream = VLC_TRUE;
+ p_plugin->b_stream = true;
}
}
return NPERR_NO_ERROR;
(p_new_buffer)->i_size = i_alloc_size; \
(p_new_buffer)->p_buffer = (byte_t *)(p_new_buffer) \
+ sizeof(aout_buffer_t); \
- (p_new_buffer)->b_discontinuity = VLC_FALSE; \
+ (p_new_buffer)->b_discontinuity = false; \
if ( (p_previous_buffer) != NULL ) \
{ \
(p_new_buffer)->start_date = \
p_aout->output.b_starving = 1;
var_Create( p_aout, "intf-change", VLC_VAR_BOOL );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
return p_aout;
uint32_t i_channel_mask,
int i_channels, int *pi_chan_table )
{
- vlc_bool_t b_chan_reorder = VLC_FALSE;
+ bool b_chan_reorder = false;
int i, j, k, l;
- if( i_channels > AOUT_CHAN_MAX ) return VLC_FALSE;
+ if( i_channels > AOUT_CHAN_MAX ) return false;
for( i = 0, j = 0; pi_chan_order_in[i]; i++ )
{
for( i = 0; i < i_channels; i++ )
{
- if( pi_chan_table[i] != i ) b_chan_reorder = VLC_TRUE;
+ if( pi_chan_table[i] != i ) b_chan_reorder = true;
}
return b_chan_reorder;
return NULL;
}
- p_filter->b_continuity = VLC_FALSE;
+ p_filter->b_continuity = false;
return p_filter;
}
const audio_sample_format_t * p_output_format,
audio_sample_format_t * p_middle_format )
{
- vlc_bool_t b_format =
+ bool b_format =
(p_input_format->i_format != p_output_format->i_format);
- vlc_bool_t b_rate = (p_input_format->i_rate != p_output_format->i_rate);
- vlc_bool_t b_channels =
+ bool b_rate = (p_input_format->i_rate != p_output_format->i_rate);
+ bool b_channels =
(p_input_format->i_physical_channels
!= p_output_format->i_physical_channels)
|| (p_input_format->i_original_channels
if( *pi_nb_filters + 1 > AOUT_MAX_FILTERS )
{
msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"),
+ intf_UserFatal( p_aout, false, _("Audio filtering failed"),
_("The maximum number of filters (%d) was reached."),
AOUT_MAX_FILTERS );
return -1;
{
ReleaseFilter( pp_filters[0] );
msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"),
+ intf_UserFatal( p_aout, false, _("Audio filtering failed"),
_("The maximum number of filters (%d) was reached."),
AOUT_MAX_FILTERS );
return -1;
{
ReleaseFilter( pp_filters[0] );
msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"),
+ intf_UserFatal( p_aout, false, _("Audio filtering failed"),
_("The maximum number of filters (%d) was reached."),
AOUT_MAX_FILTERS );
return -1;
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter, "visualization",
- psz_parser, VLC_TRUE );
+ psz_parser, true );
}
else /* this can be a audio filter module as well as a visualization module */
{
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter, "audio filter",
- psz_parser, VLC_TRUE );
+ psz_parser, true );
if ( p_filter->p_module == NULL )
{
aout_FormatPrepare( &p_filter->output );
p_filter->p_module = module_Need( p_filter,
"audio filter",
- psz_parser, VLC_TRUE );
+ psz_parser, true );
}
/* try visual filters */
else
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter,
"visualization",
- psz_parser, VLC_TRUE );
+ psz_parser, true );
}
}
}
}
/* success */
- p_filter->b_continuity = VLC_FALSE;
+ p_filter->b_continuity = false;
p_input->pp_filters[p_input->i_nb_filters++] = p_filter;
memcpy( &chain_input_format, &p_filter->output,
sizeof( audio_sample_format_t ) );
ReplayGainSelect( p_aout, p_input );
/* Success */
- p_input->b_error = VLC_FALSE;
- p_input->b_restart = VLC_FALSE;
+ p_input->b_error = false;
+ p_input->b_restart = false;
p_input->i_last_input_rate = INPUT_RATE_DEFAULT;
return 0;
{
p_input->pp_resamplers[0]->input.i_rate = INPUT_RATE_DEFAULT *
p_input->input.i_rate / p_input->i_last_input_rate;
- p_input->pp_resamplers[0]->b_continuity = VLC_FALSE;
+ p_input->pp_resamplers[0]->b_continuity = false;
}
}
static int ChangeFiltersString( aout_instance_t * p_aout, const char* psz_variable,
- const char *psz_name, vlc_bool_t b_add )
+ const char *psz_name, bool b_add )
{
vlc_value_t val;
char *psz_parser;
if( !psz_mode || !*psz_mode )
{
- ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_FALSE );
- ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_FALSE );
- ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_FALSE );
+ ChangeFiltersString( p_aout, "audio-visual", "goom", false );
+ ChangeFiltersString( p_aout, "audio-visual", "visual", false );
+ ChangeFiltersString( p_aout, "audio-visual", "galaktos", false );
}
else
{
if( !strcmp( "goom", psz_mode ) )
{
- ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_FALSE );
- ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_TRUE );
- ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_FALSE);
+ ChangeFiltersString( p_aout, "audio-visual", "visual", false );
+ ChangeFiltersString( p_aout, "audio-visual", "goom", true );
+ ChangeFiltersString( p_aout, "audio-visual", "galaktos", false);
}
else if( !strcmp( "galaktos", psz_mode ) )
{
- ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_FALSE );
- ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_FALSE );
- ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_TRUE );
+ ChangeFiltersString( p_aout, "audio-visual", "visual", false );
+ ChangeFiltersString( p_aout, "audio-visual", "goom", false );
+ ChangeFiltersString( p_aout, "audio-visual", "galaktos", true );
}
else
{
var_Create( p_aout, "effect-list", VLC_VAR_STRING );
var_Set( p_aout, "effect-list", val );
- ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_FALSE );
- ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_TRUE );
- ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_FALSE);
+ ChangeFiltersString( p_aout, "audio-visual", "goom", false );
+ ChangeFiltersString( p_aout, "audio-visual", "visual", true );
+ ChangeFiltersString( p_aout, "audio-visual", "galaktos", false);
}
}
/* That sucks */
for( i = 0; i < p_aout->i_nb_inputs; i++ )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
}
return VLC_SUCCESS;
if( !psz_mode || !*psz_mode )
{
i_ret = ChangeFiltersString( p_aout, "audio-filter", "equalizer",
- VLC_FALSE );
+ false );
}
else
{
var_Create( p_aout, "equalizer-preset", VLC_VAR_STRING );
var_Set( p_aout, "equalizer-preset", val );
i_ret = ChangeFiltersString( p_aout, "audio-filter", "equalizer",
- VLC_TRUE );
+ true );
}
{
for( i = 0; i < p_aout->i_nb_inputs; i++ )
{
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
}
}
config_PutInt( p_object, "volume", i_volume );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_object->p_libvlc, "volume-change", val );
if ( p_aout == NULL ) return 0;
(audio_volume_t) i_volume );
if ( pi_volume != NULL ) *pi_volume = (audio_volume_t) i_volume;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_object->p_libvlc, "volume-change", val );
if ( p_aout == NULL ) return 0;
var_SetInteger( p_object->p_libvlc, "saved-volume", (audio_volume_t) i_volume );
if ( pi_volume != NULL ) *pi_volume = (audio_volume_t) i_volume;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_object->p_libvlc, "volume-change", val );
if ( p_aout == NULL ) return 0;
static int aout_Restart( aout_instance_t * p_aout )
{
int i;
- vlc_bool_t b_error = 0;
+ bool b_error = 0;
vlc_mutex_lock( &p_aout->mixer_lock );
* \param b_add are we adding or removing the filter ?
*/
void aout_EnableFilter( vlc_object_t *p_this, const char *psz_name,
- vlc_bool_t b_add )
+ bool b_add )
{
char *psz_parser, *psz_string;
aout_instance_t * p_aout = vlc_object_find( p_this, VLC_OBJECT_AOUT,
{
var_SetString( p_aout, "audio-filter", psz_string );
for( int i = 0; i < p_aout->i_nb_inputs; i++ )
- p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
+ p_aout->pp_inputs[i]->b_restart = true;
vlc_object_release( p_aout );
}
free( psz_string );
aout_fifo_t * p_fifo = &p_input->fifo;
aout_buffer_t * p_buffer;
mtime_t prev_date;
- vlc_bool_t b_drop_buffers;
+ bool b_drop_buffers;
if ( p_input->b_error )
{
int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier )
{
float f_old = p_aout->mixer.f_multiplier;
- vlc_bool_t b_new_mixer = 0;
+ bool b_new_mixer = 0;
if ( !p_aout->mixer.b_error )
{
var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
NULL );
}
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_aout, "intf-change", val );
aout_FormatPrepare( &p_aout->output.output );
aout_FifoDestroy( p_aout, &p_aout->output.fifo );
vlc_mutex_unlock( &p_aout->output_fifo_lock );
- p_aout->output.b_error = VLC_TRUE;
+ p_aout->output.b_error = true;
}
/*****************************************************************************
*****************************************************************************/
aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
mtime_t start_date,
- vlc_bool_t b_can_sleek )
+ bool b_can_sleek )
{
aout_buffer_t * p_buffer;
if( *p == '=' || *p == '{' )
{
const char *end;
- vlc_bool_t b_keep_brackets = (*p == '{');
+ bool b_keep_brackets = (*p == '{');
if( *p == '=' ) p++;
for(; cfg; cfg = cfg->p_next )
{
vlc_value_t val;
- vlc_bool_t b_yes = VLC_TRUE;
- vlc_bool_t b_once = VLC_FALSE;
+ bool b_yes = true;
+ bool b_once = false;
module_config_t *p_conf;
int i_type;
size_t i;
( !strncmp( cfg->psz_name, "no", 2 ) &&
!strcmp( ppsz_options[i], cfg->psz_name + 2 ) ) )
{
- b_yes = VLC_FALSE;
+ b_yes = false;
break;
}
if( *ppsz_options[i] == '*' &&
!strcmp( &ppsz_options[i][1], cfg->psz_name ) )
{
- b_once = VLC_TRUE;
+ b_once = true;
break;
}
*****************************************************************************/
int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
const char *ppsz_argv[],
- vlc_bool_t b_ignore_errors )
+ bool b_ignore_errors )
{
int i_cmd, i_index, i_opts, i_shortopts, flag, i_verbose = 0;
module_t *p_parser;
#define config_LoadCmdLine(a,b,c,d) __config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
#define config_LoadConfigFile(a,b) __config_LoadConfigFile(VLC_OBJECT(a),b)
-int __config_LoadCmdLine ( vlc_object_t *, int *, const char *[], vlc_bool_t );
+int __config_LoadCmdLine ( vlc_object_t *, int *, const char *[], bool );
char *config_GetHomeDir ( void );
char *config_GetConfigDir ( libvlc_int_t * );
char *config_GetUserDataDir( libvlc_int_t * );
else
p_config->value.psz = NULL;
- p_config->b_dirty = VLC_TRUE;
+ p_config->b_dirty = true;
val.psz_string = (char *)p_config->value.psz;
p_config->value.i = i_value;
}
- p_config->b_dirty = VLC_TRUE;
+ p_config->b_dirty = true;
val.i_int = p_config->value.i;
p_config->value.f = f_value;
}
- p_config->b_dirty = VLC_TRUE;
+ p_config->b_dirty = true;
val.f_float = p_config->value.f;
* Note that this function is not reentrant, it should be called only once
* at the beginning of main where the result will be stored for later use.
*****************************************************************************/
-static char *GetDir( vlc_bool_t b_appdata )
+static char *GetDir( bool b_appdata )
{
const char *psz_localhome = NULL;
*/
char *config_GetHomeDir( void )
{
- return GetDir( VLC_FALSE );
+ return GetDir( false );
}
/**
* --funman */
char *config_GetUserDir( void )
{
- return GetDir( VLC_TRUE );
+ return GetDir( true );
}
/**
* Really stupid no ?
*****************************************************************************/
static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
- vlc_bool_t b_autosave )
+ bool b_autosave )
{
module_t *p_parser;
vlc_list_t *p_list;
char p_line[1024], *p_index2;
int i_sizebuf = 0;
char *p_bigbuffer, *p_index;
- vlc_bool_t b_backup;
+ bool b_backup;
int i_index;
/* Acquire config file lock */
{
/* Do not save the new value in the configuration file
* if doing an autosave, and the item is not an "autosaved" one. */
- vlc_bool_t b_retain = b_autosave && !p_item->b_autosave;
+ bool b_retain = b_autosave && !p_item->b_autosave;
if ((p_item->i_type & CONFIG_HINT) /* ignore hint */
|| p_item->b_removed /* ignore deprecated option */
}
if (!b_retain)
- p_item->b_dirty = VLC_FALSE;
+ p_item->b_dirty = false;
}
}
vlc_mutex_unlock( &p_this->p_libvlc->config_lock );
if( i_index == i_count ) return VLC_SUCCESS;
- return SaveConfigFile( p_this, 0, VLC_TRUE );
+ return SaveConfigFile( p_this, 0, true );
}
int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
{
- return SaveConfigFile( p_this, psz_module_name, VLC_FALSE );
+ return SaveConfigFile( p_this, psz_module_name, false );
}
/**
}
/*
- * Returns VLC_TRUE if the specified extra interface is present in the
- * configuration, VLC_FALSE if not
+ * Returns true if the specified extra interface is present in the
+ * configuration, false if not
*/
-vlc_bool_t __config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
+bool __config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
{
assert( psz_intf );
if( !strncmp( psz_parser, psz_intf, i_len ) )
{
free( psz_config );
- return VLC_TRUE;
+ return true;
}
psz_parser = strchr( psz_parser, ':' );
if( psz_parser ) psz_parser++; /* skip the ':' */
if( !strncmp( psz_parser, psz_intf, i_len ) )
{
free( psz_config );
- return VLC_TRUE;
+ return true;
}
psz_parser = strchr( psz_parser, ':' );
if( psz_parser ) psz_parser++; /* skip the ':' */
}
free( psz_config );
- return VLC_FALSE;
+ return false;
}
i_volume = libvlc_audio_get_volume(p_instance, p_e);
if ( i_volume == 0 )
- return VLC_TRUE;
- return VLC_FALSE;
+ return true;
+ return false;
}
void libvlc_audio_set_mute( libvlc_instance_t *p_instance, int mute,
vlc_mutex_destroy( lock );
vlc_mutex_destroy( &p_instance->event_callback_lock );
libvlc_InternalCleanup( p_instance->p_libvlc_int );
- libvlc_InternalDestroy( p_instance->p_libvlc_int, VLC_FALSE );
+ libvlc_InternalDestroy( p_instance->p_libvlc_int, false );
free( p_instance );
}
}
* Private functions
*/
-static vlc_bool_t
+static bool
listeners_are_equal( libvlc_event_listener_t * listener1,
libvlc_event_listener_t * listener2 )
{
listener1->p_user_data == listener2->p_user_data;
}
-static vlc_bool_t
+static bool
group_contains_listener( libvlc_event_listeners_group_t * group,
libvlc_event_listener_t * searched_listener )
{
for( i = 0; i < vlc_array_count(&group->listeners); i++ )
{
if( listeners_are_equal(searched_listener, vlc_array_item_at_index(&group->listeners, i)) )
- return VLC_TRUE;
+ return true;
}
- return VLC_FALSE;
+ return false;
}
/*
vlc_mutex_lock( &p_em->event_sending_lock );
listener_cached = array_listeners_cached;
- listeners_group->b_sublistener_removed = VLC_FALSE;
+ listeners_group->b_sublistener_removed = false;
for( i = 0; i < i_cached_listeners; i++ )
{
if( listeners_group->b_sublistener_removed )
{
/* If a callback was removed, this gets called */
- vlc_bool_t valid_listener;
+ bool valid_listener;
vlc_mutex_lock( &p_em->object_lock );
valid_listener = group_contains_listener( listeners_group, listener_cached );
vlc_mutex_unlock( &p_em->object_lock );
/* Mark this group as edited so that libvlc_event_send
* will recheck what listener to call */
- listeners_group->b_sublistener_removed = VLC_FALSE;
+ listeners_group->b_sublistener_removed = false;
free( listener );
vlc_array_remove( &listeners_group->listeners, j );
return -1;
}
-static vlc_bool_t
+static bool
item_is_already_added( libvlc_media_t * p_md )
{
libvlc_media_list_t * p_submlist;
p_submlist = libvlc_media_subitems( p_md, NULL );
- if( !p_submlist ) return VLC_FALSE;
+ if( !p_submlist ) return false;
int count = libvlc_media_list_count( p_submlist, NULL );
libvlc_media_list_release( p_submlist );
return count > 1;
VLC_EXPORT (libvlc_int_t *, libvlc_InternalCreate, ( void ) );
VLC_EXPORT (int, libvlc_InternalInit, ( libvlc_int_t *, int, const char *ppsz_argv[] ) );
VLC_EXPORT (int, libvlc_InternalCleanup, ( libvlc_int_t * ) );
-VLC_EXPORT (int, libvlc_InternalDestroy, ( libvlc_int_t *, vlc_bool_t ) );
+VLC_EXPORT (int, libvlc_InternalDestroy, ( libvlc_int_t *, bool ) );
-VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char *, vlc_bool_t,
- vlc_bool_t, int, const char *const * ) );
+VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char *, bool,
+ bool, int, const char *const * ) );
VLC_EXPORT (void, libvlc_event_init, ( libvlc_instance_t *, libvlc_exception_t * ) );
VLC_EXPORT (void, libvlc_event_fini, ( libvlc_instance_t * ) );
/* This indicates if this media list is read-only
* from a user point of view */
- vlc_bool_t b_read_only;
+ bool b_read_only;
};
typedef libvlc_media_list_view_t * (*libvlc_media_list_view_constructor_func_t)( libvlc_media_list_t * p_mlist, libvlc_exception_t * p_e ) ;
libvlc_event_manager_t * p_event_manager;
libvlc_drawable_t drawable;
- vlc_bool_t b_own_its_input_thread;
+ bool b_own_its_input_thread;
};
struct libvlc_media_list_player_t
libvlc_instance_t * p_libvlc_instance;
services_discovery_t * p_sd;
libvlc_media_list_t * p_mlist;
- vlc_bool_t running;
+ bool running;
vlc_dictionary_t catname_to_submedialist;
};
{
libvlc_event_type_t event_type;
vlc_array_t listeners;
- vlc_bool_t b_sublistener_removed;
+ bool b_sublistener_removed;
} libvlc_event_listeners_group_t;
typedef struct libvlc_event_manager_t
playlist_PreparseEnqueue(
p_md->p_libvlc_instance->p_libvlc_int->p_playlist,
p_md->p_input_item );
- p_md->b_preparsed = VLC_TRUE;
+ p_md->b_preparsed = true;
}
}
p_md = malloc( sizeof(libvlc_media_t) );
p_md->p_libvlc_instance = p_instance;
p_md->p_input_item = p_input_item;
- p_md->b_preparsed = VLC_FALSE;
+ p_md->b_preparsed = false;
p_md->i_refcount = 1;
p_md->p_user_data = NULL;
}
else
{
- return VLC_FALSE;
+ return false;
}
}
libvlc_media_t * p_catmd;
p_catmd = libvlc_media_new_as_node( p_mdis->p_libvlc_instance, psz_cat, NULL );
p_mlist = libvlc_media_subitems( p_catmd, NULL );
- p_mlist->b_read_only = VLC_TRUE;
+ p_mlist->b_read_only = true;
/* Insert the newly created mlist in our dictionary */
__vlc_dictionary_insert( &p_mdis->catname_to_submedialist, psz_cat, p_mlist, 0 );
(void)p_event;
libvlc_media_discoverer_t * p_mdis = user_data;
libvlc_event_t event;
- p_mdis->running = VLC_TRUE;
+ p_mdis->running = true;
event.type = libvlc_MediaDiscovererStarted;
libvlc_event_send( p_mdis->p_event_manager, &event );
}
(void)p_event;
libvlc_media_discoverer_t * p_mdis = user_data;
libvlc_event_t event;
- p_mdis->running = VLC_FALSE;
+ p_mdis->running = false;
event.type = libvlc_MediaDiscovererEnded;
libvlc_event_send( p_mdis->p_event_manager, &event );
}
p_mdis->p_libvlc_instance = p_inst;
p_mdis->p_mlist = libvlc_media_list_new( p_inst, NULL );
- p_mdis->p_mlist->b_read_only = VLC_TRUE;
- p_mdis->running = VLC_FALSE;
+ p_mdis->p_mlist->b_read_only = true;
+ p_mdis->running = false;
vlc_dictionary_init( &p_mdis->catname_to_submedialist, 0 );
/* Code for that one should be handled in flat_media_list.c */
p_mlist->p_flat_mlist = NULL;
- p_mlist->b_read_only = VLC_FALSE;
+ p_mlist->b_read_only = false;
libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
libvlc_MediaListItemAdded, p_e );
if( libvlc_exception_raised( p_e ) )
return;
- input_Read( p_mlist->p_libvlc_instance->p_libvlc_int, p_input_item, VLC_TRUE );
+ input_Read( p_mlist->p_libvlc_instance->p_libvlc_int, p_input_item, true );
return;
}
* operation the refcount is 0, the object is destroyed.
* - Accessor _retain increase the refcount by 1 (XXX: to implement) */
p_mi->i_refcount = 1;
- p_mi->b_own_its_input_thread = VLC_TRUE;
+ p_mi->b_own_its_input_thread = true;
/* object_lock strategy:
* - No lock held in constructor
* - Lock when accessing all variable this lock is held
vlc_object_yield( p_input );
p_mi->p_input_thread = p_input;
- p_mi->b_own_its_input_thread = VLC_FALSE;
+ p_mi->b_own_its_input_thread = false;
return p_mi;
}
input_thread_t *p_input_thread =
libvlc_get_input_thread ( p_mi, p_e);
if ( !p_input_thread )
- return VLC_FALSE;
+ return false;
if ( !p_input_thread->b_die && !p_input_thread->b_dead )
{
vlc_object_release( p_input_thread );
- return VLC_TRUE;
+ return true;
}
vlc_object_release( p_input_thread );
- return VLC_FALSE;
+ return false;
}
void libvlc_media_player_set_rate(
/* We do return the right value, no need to throw an exception */
if( libvlc_exception_raised( p_e ) )
libvlc_exception_clear( p_e );
- return VLC_FALSE;
+ return false;
}
var_Get( p_input_thread, "seekable", &val );
vlc_object_release( p_input_thread );
/* We do return the right value, no need to throw an exception */
if( libvlc_exception_raised( p_e ) )
libvlc_exception_clear( p_e );
- return VLC_FALSE;
+ return false;
}
var_Get( p_input_thread, "can-pause", &val );
vlc_object_release( p_input_thread );
p_spu->p_region->i_align = i_flags & SUBPICTURE_ALIGN_MASK;
p_spu->i_start = i_start;
p_spu->i_stop = i_stop;
- p_spu->b_ephemer = VLC_FALSE;
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_ephemer = false;
+ p_spu->b_absolute = false;
p_spu->i_x = i_hmargin;
p_spu->i_y = i_vmargin;
HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
}
-vlc_bool_t mediacontrol_set_visual( mediacontrol_Instance *self,
+bool mediacontrol_set_visual( mediacontrol_Instance *self,
WINDOWHANDLE visual_id,
mediacontrol_Exception *exception )
{
libvlc_video_set_parent( self->p_instance, visual_id, &ex );
HANDLE_LIBVLC_EXCEPTION_ZERO( &ex );
- return VLC_TRUE;
+ return true;
}
int
RAISEVOID( "Unable to find item" );
}
- playlist_Control( PL, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( PL, PLAYLIST_VIEWPLAY, true,
PL->status.p_node, p_item );
if( did_lock == 1 )
{
}
return playlist_AddExt( PL, psz_uri, psz_name,
PLAYLIST_INSERT, PLAYLIST_END, -1, ppsz_options,
- i_options, 1, VLC_FALSE );
+ i_options, 1, false );
}
return;
}
- if( b_fullscreen ) val.b_bool = VLC_TRUE;
- else val.b_bool = VLC_FALSE;
+ if( b_fullscreen ) val.b_bool = true;
+ else val.b_bool = false;
i_ret = var_Set( p_vout1, "fullscreen", val );
if( i_ret )
libvlc_exception_raise( p_e,
"Unexpected error while looking up fullscreen value" );
- return val.b_bool == VLC_TRUE ? 1 : 0;
+ return val.b_bool == true ? 1 : 0;
}
void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi,
libvlc_exception_t *p_e )
{
input_thread_t *p_input_thread = libvlc_get_input_thread(p_mi, p_e);
- vlc_bool_t has_vout = VLC_FALSE;
+ bool has_vout = false;
if( p_input_thread )
{
p_vout = vlc_object_find( p_input_thread, VLC_OBJECT_VOUT, FIND_CHILD );
if( p_vout )
{
- has_vout = VLC_TRUE;
+ has_vout = true;
vlc_object_release( p_vout );
}
vlc_object_release( p_input_thread );
vlm_media_Init( &m );
m.psz_name = strdup( psz_name );
m.b_enabled = b_enabled;
- m.b_vod = VLC_FALSE;
+ m.b_vod = false;
m.broadcast.b_loop = b_loop;
if( psz_input )
TAB_APPEND( m.i_input, m.ppsz_input, strdup(psz_input) );
/* FIXME extend vlm_media_instance_t to be able to implement them */
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0, ret_value = 0 );
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0, ret_value = 0 );
-LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0, ret_value = VLC_FALSE );
+LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0, ret_value = false );
#undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
_WDIR *p_real_dir;
int i_drives;
struct _wdirent dd_dir;
- vlc_bool_t b_insert_back;
+ bool b_insert_back;
} vlc_DIR;
void *vlc_wopendir( const wchar_t *wpath )
p_dir->dd_dir.d_reclen = 0;
p_dir->dd_dir.d_namlen = 2;
wcscpy( p_dir->dd_dir.d_name, L".." );
- p_dir->b_insert_back = VLC_FALSE;
+ p_dir->b_insert_back = false;
return &p_dir->dd_dir;
}
* reduce a fraction
* (adapted from libavcodec, author Michael Niedermayer <michaelni@gmx.at>)
*****************************************************************************/
-vlc_bool_t vlc_ureduce( unsigned *pi_dst_nom, unsigned *pi_dst_den,
+bool vlc_ureduce( unsigned *pi_dst_nom, unsigned *pi_dst_den,
uint64_t i_nom, uint64_t i_den, uint64_t i_max )
{
- vlc_bool_t b_exact = 1;
+ bool b_exact = 1;
uint64_t i_gcd;
if( i_den == 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_prebuffered = VLC_FALSE;
+ p_access->info.b_eof = false;
+ p_access->info.b_prebuffered = false;
p_access->info.i_title = 0;
p_access->info.i_seekpoint = 0;
p_access->p_module =
module_Need( p_access, p_source ? "access_filter" : "access2",
- psz_access, VLC_TRUE );
+ psz_access, true );
if( p_access->p_module == NULL )
{
* input_ClockInit: reinitializes the clock reference after a stream
* discontinuity
*****************************************************************************/
-void input_ClockInit( input_clock_t *cl, vlc_bool_t b_master, int i_cr_average, int i_rate )
+void input_ClockInit( input_clock_t *cl, bool b_master, int i_cr_average, int i_rate )
{
cl->i_synchro_state = SYNCHRO_START;
void input_ClockSetPCR( input_thread_t *p_input,
input_clock_t *cl, mtime_t i_clock )
{
- const vlc_bool_t b_synchronize = p_input->b_can_pace_control && cl->b_master;
+ const bool b_synchronize = p_input->b_can_pace_control && cl->b_master;
const mtime_t i_mdate = mdate();
if( ( cl->i_synchro_state != SYNCHRO_OK ) ||
struct decoder_owner_sys_t
{
- vlc_bool_t b_own_thread;
+ bool b_own_thread;
int64_t i_preroll_end;
block_fifo_t *p_fifo;
/* CC */
- vlc_bool_t b_cc_supported;
+ bool b_cc_supported;
vlc_mutex_t lock_cc;
- vlc_bool_t pb_cc_present[4];
+ bool pb_cc_present[4];
decoder_t *pp_cc[4];
};
msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s'.\n"
"VLC probably does not support this sound or video format.",
(char*)&codec );
- intf_UserFatal( p_dec, VLC_FALSE, _("No suitable decoder module"),
+ intf_UserFatal( p_dec, false, _("No suitable decoder module"),
_("VLC does not support the audio or video format \"%4.4s\". "
"Unfortunately there is no way for you to fix this."), (char*)&codec );
}
* \return the spawned decoder object
*/
decoder_t *input_DecoderNew( input_thread_t *p_input,
- es_format_t *fmt, vlc_bool_t b_force_decoder )
+ es_format_t *fmt, bool b_force_decoder )
{
decoder_t *p_dec = NULL;
vlc_value_t val;
if( p_dec == NULL )
{
msg_Err( p_input, "could not create packetizer" );
- intf_UserFatal( p_input, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_input, false, _("Streaming / Transcoding failed"),
_("VLC could not open the packetizer module.") );
return NULL;
}
if( p_dec == NULL )
{
msg_Err( p_input, "could not create decoder" );
- intf_UserFatal( p_input, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_input, false, _("Streaming / Transcoding failed"),
_("VLC could not open the decoder module.") );
return NULL;
}
!b_force_decoder )
{
msg_Dbg( p_input, "stream out mode -> no decoder thread" );
- p_dec->p_owner->b_own_thread = VLC_FALSE;
+ p_dec->p_owner->b_own_thread = false;
}
else
{
/* Spawn the decoder thread */
if( vlc_thread_create( p_dec, "decoder", DecoderThread,
- i_priority, VLC_FALSE ) )
+ i_priority, false ) )
{
msg_Err( p_dec, "cannot spawn decoder thread" );
module_Unneed( p_dec, p_dec->p_module );
{
int i;
for( i = 0; i < 4; i++ )
- input_DecoderSetCcState( p_dec, VLC_FALSE, i );
+ input_DecoderSetCcState( p_dec, false, i );
}
/* Delete decoder configuration */
}
}
-void input_DecoderDiscontinuity( decoder_t * p_dec, vlc_bool_t b_flush )
+void input_DecoderDiscontinuity( decoder_t * p_dec, bool b_flush )
{
block_t *p_null;
input_DecoderDecode( p_dec, p_null );
}
-vlc_bool_t input_DecoderEmpty( decoder_t * p_dec )
+bool input_DecoderEmpty( decoder_t * p_dec )
{
if( p_dec->p_owner->b_own_thread
&& block_FifoCount( p_dec->p_owner->p_fifo ) > 0 )
{
- return VLC_FALSE;
+ return false;
}
- return VLC_TRUE;
+ return true;
}
-void input_DecoderIsCcPresent( decoder_t *p_dec, vlc_bool_t pb_present[4] )
+void input_DecoderIsCcPresent( decoder_t *p_dec, bool pb_present[4] )
{
int i;
pb_present[i] = p_dec->p_owner->pb_cc_present[i];
vlc_mutex_unlock( &p_dec->p_owner->lock_cc );
}
-int input_DecoderSetCcState( decoder_t *p_dec, vlc_bool_t b_decode, int i_channel )
+int input_DecoderSetCcState( decoder_t *p_dec, bool b_decode, int i_channel )
{
decoder_owner_sys_t *p_owner = p_dec->p_owner;
if( !p_cc )
{
msg_Err( p_dec, "could not create decoder" );
- intf_UserFatal( p_dec, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_dec, false, _("Streaming / Transcoding failed"),
_("VLC could not open the decoder module.") );
return VLC_EGENERIC;
}
}
return VLC_SUCCESS;
}
-int input_DecoderGetCcState( decoder_t *p_dec, vlc_bool_t *pb_decode, int i_channel )
+int input_DecoderGetCcState( decoder_t *p_dec, bool *pb_decode, int i_channel )
{
decoder_owner_sys_t *p_owner = p_dec->p_owner;
- *pb_decode = VLC_FALSE;
+ *pb_decode = false;
if( i_channel < 0 || i_channel >= 4 || !p_owner->pb_cc_present[i_channel] )
return VLC_EGENERIC;
msg_Err( p_dec, "out of memory" );
return NULL;
}
- p_dec->p_owner->b_own_thread = VLC_TRUE;
+ p_dec->p_owner->b_own_thread = true;
p_dec->p_owner->i_preroll_end = -1;
p_dec->p_owner->p_input = p_input;
p_dec->p_owner->p_aout = NULL;
}
}
/* */
- p_owner->b_cc_supported = VLC_FALSE;
+ p_owner->b_cc_supported = false;
if( i_object_type == VLC_OBJECT_DECODER )
{
if( p_owner->p_packetizer && p_owner->p_packetizer->pf_get_cc )
- p_owner->b_cc_supported = VLC_TRUE;
+ p_owner->b_cc_supported = true;
if( p_dec->pf_get_cc )
- p_owner->b_cc_supported = VLC_TRUE;
+ p_owner->b_cc_supported = true;
}
vlc_mutex_init( p_dec, &p_owner->lock_cc );
for( i = 0; i < 4; i++ )
{
- p_owner->pb_cc_present[i] = VLC_FALSE;
+ p_owner->pb_cc_present[i] = false;
p_owner->pp_cc[i] = NULL;
}
return p_dec;
static void DecoderGetCc( decoder_t *p_dec, decoder_t *p_dec_cc )
{
block_t *p_cc;
- vlc_bool_t pb_present[4];
+ bool pb_present[4];
int i;
int i_cc_decoder;
{
msg_Err( p_dec, "cannot create packetizer output (%4.4s)",
(char *)&p_dec->p_owner->sout.i_codec );
- p_dec->b_error = VLC_TRUE;
+ p_dec->b_error = true;
while( p_sout_block )
{
p_dec->p_owner->p_input->p->b_out_pace_control )
{
msg_Dbg( p_dec, "switching to sync mode" );
- p_dec->p_owner->p_input->p->b_out_pace_control = VLC_FALSE;
+ p_dec->p_owner->p_input->p->b_out_pace_control = false;
}
else if( p_dec->p_owner->p_sout->i_out_pace_nocontrol <= 0 &&
!p_dec->p_owner->p_input->p->b_out_pace_control )
{
msg_Dbg( p_dec, "switching to async mode" );
- p_dec->p_owner->p_input->p->b_out_pace_control = VLC_TRUE;
+ p_dec->p_owner->p_input->p->b_out_pace_control = true;
}
}
}
if( p_sys->p_aout_input == NULL )
{
msg_Err( p_dec, "failed to create audio output" );
- p_dec->b_error = VLC_TRUE;
+ p_dec->b_error = true;
return NULL;
}
p_dec->fmt_out.audio.i_bytes_per_frame =
if( p_sys->p_vout == NULL )
{
msg_Err( p_dec, "failed to create video output" );
- p_dec->b_error = VLC_TRUE;
+ p_dec->b_error = true;
return NULL;
}
/* */
int i_frame_rate;
int i_current_rate;
- vlc_bool_t b_no_skip;
- vlc_bool_t b_quiet;
+ bool b_no_skip;
+ bool b_quiet;
/* date of the beginning of the decoding of the current picture */
mtime_t decoding_start;
/*****************************************************************************
* decoder_SynchroChoose : Decide whether we will decode a picture or not
*****************************************************************************/
-vlc_bool_t decoder_SynchroChoose( decoder_synchro_t * p_synchro, int i_coding_type,
- int i_render_time, vlc_bool_t b_low_delay )
+bool decoder_SynchroChoose( decoder_synchro_t * p_synchro, int i_coding_type,
+ int i_render_time, bool b_low_delay )
{
#define TAU_PRIME( coding_type ) (p_synchro->p_tau[(coding_type)] \
+ (p_synchro->p_tau[(coding_type)] >> 1) \
#define S (*p_synchro)
mtime_t now, period;
mtime_t pts = 0;
- vlc_bool_t b_decode = 0;
+ bool b_decode = 0;
if ( p_synchro->b_no_skip )
return 1;
* decoder_SynchroEnd : Called when the image is totally decoded
*****************************************************************************/
void decoder_SynchroEnd( decoder_synchro_t * p_synchro, int i_coding_type,
- vlc_bool_t b_garbage )
+ bool b_garbage )
{
mtime_t tau;
void decoder_SynchroNewPicture( decoder_synchro_t * p_synchro, int i_coding_type,
int i_repeat_field, mtime_t next_pts,
mtime_t next_dts, int i_current_rate,
- vlc_bool_t b_low_delay )
+ bool b_low_delay )
{
mtime_t period = 1000000 * 1001 / p_synchro->i_frame_rate
* i_current_rate / INPUT_RATE_DEFAULT;
#include "input_internal.h"
-static vlc_bool_t SkipID3Tag( demux_t * );
-static vlc_bool_t SkipAPETag( demux_t *p_demux );
+static bool SkipID3Tag( demux_t * );
+static bool SkipAPETag( demux_t *p_demux );
/*****************************************************************************
* demux2_New:
demux_t *__demux2_New( vlc_object_t *p_obj,
const char *psz_access, const char *psz_demux,
const char *psz_path,
- stream_t *s, es_out_t *out, vlc_bool_t b_quick )
+ stream_t *s, es_out_t *out, bool b_quick )
{
demux_t *p_demux = vlc_object_create( p_obj, VLC_OBJECT_DEMUX );
const char *psz_module;
p_demux->p_module =
module_Need( p_demux, "demux2", psz_module,
!strcmp( psz_module, p_demux->psz_demux ) ?
- VLC_TRUE : VLC_FALSE );
+ true : false );
}
else
{
p_demux->p_module =
module_Need( p_demux, "access_demux", psz_module,
!strcmp( psz_module, p_demux->psz_access ) ?
- VLC_TRUE : VLC_FALSE );
+ true : false );
}
if( p_demux->p_module == NULL )
s->pf_control= DStreamControl;
s->i_char_width = 1;
- s->b_little_endian = VLC_FALSE;
+ s->b_little_endian = false;
s->p_sys = malloc( sizeof( d_stream_sys_t) );
p_sys = (d_stream_sys_t*)s->p_sys;
}
if( vlc_thread_create( s, "stream out", DStreamThread,
- VLC_THREAD_PRIORITY_INPUT, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_INPUT, false ) )
{
vlc_object_release( s );
free( p_sys );
{
d_stream_sys_t *p_sys = (d_stream_sys_t*)s->p_sys;
int64_t *p_i64;
- vlc_bool_t *p_b;
+ bool *p_b;
int *p_int;
switch( i_query )
return VLC_SUCCESS;
case STREAM_CAN_SEEK:
- p_b = (vlc_bool_t*) va_arg( args, vlc_bool_t * );
- *p_b = VLC_FALSE;
+ p_b = (bool*) va_arg( args, bool * );
+ *p_b = false;
return VLC_SUCCESS;
case STREAM_CAN_FASTSEEK:
- p_b = (vlc_bool_t*) va_arg( args, vlc_bool_t * );
- *p_b = VLC_FALSE;
+ p_b = (bool*) va_arg( args, bool * );
+ *p_b = false;
return VLC_SUCCESS;
case STREAM_GET_POSITION:
/* Create the demuxer */
if( !(p_demux = demux2_New( s, "", p_sys->psz_name, "", s, p_sys->out,
- VLC_FALSE )) )
+ false )) )
{
return VLC_EGENERIC;
}
/****************************************************************************
* Utility functions
****************************************************************************/
-static vlc_bool_t SkipID3Tag( demux_t *p_demux )
+static bool SkipID3Tag( demux_t *p_demux )
{
const uint8_t *p_peek;
uint8_t version, revision;
int b_footer;
if( !p_demux->s )
- return VLC_FALSE;
+ return false;
/* Get 10 byte id3 header */
if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 )
- return VLC_FALSE;
+ return false;
if( memcmp( p_peek, "ID3", 3 ) )
- return VLC_FALSE;
+ return false;
version = p_peek[3];
revision = p_peek[4];
msg_Dbg( p_demux, "ID3v2.%d revision %d tag found, skipping %d bytes",
version, revision, i_size );
- return VLC_TRUE;
+ return true;
}
-static vlc_bool_t SkipAPETag( demux_t *p_demux )
+static bool SkipAPETag( demux_t *p_demux )
{
const uint8_t *p_peek;
int i_version;
uint32_t flags;
if( !p_demux->s )
- return VLC_FALSE;
+ return false;
/* Get 32 byte ape header */
if( stream_Peek( p_demux->s, &p_peek, 32 ) < 32 )
- return VLC_FALSE;
+ return false;
if( memcmp( p_peek, "APETAGEX", 8 ) )
- return VLC_FALSE;
+ return false;
i_version = GetDWLE( &p_peek[8] );
flags = GetDWLE( &p_peek[8+4+4] );
if( ( i_version != 1000 && i_version != 2000 ) || !( flags & (1<<29) ) )
- return VLC_FALSE;
+ return false;
i_size = GetDWLE( &p_peek[8+4] ) + ( (flags&(1<<30)) ? 32 : 0 );
msg_Dbg( p_demux, "AP2 v%d tag found, skipping %d bytes",
i_version/1000, i_size );
- return VLC_TRUE;
+ return true;
}
/* Number of es for this pgrm */
int i_es;
- vlc_bool_t b_selected;
+ bool b_selected;
/* Clock for this program */
input_clock_t clock;
decoder_t *p_dec;
/* Fields for Video with CC */
- vlc_bool_t pb_cc_present[4];
+ bool pb_cc_present[4];
es_out_id_t *pp_cc_es[4];
/* Field for CC track from a master video */
es_out_id_t **es;
/* mode gestion */
- vlc_bool_t b_active;
+ bool b_active;
int i_mode;
/* es count */
static es_out_id_t *EsOutAdd ( es_out_t *, es_format_t * );
static int EsOutSend ( es_out_t *, es_out_id_t *, block_t * );
static void EsOutDel ( es_out_t *, es_out_id_t * );
-static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force );
+static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force );
static int EsOutControl( es_out_t *, int i_query, va_list );
static void EsOutAddInfo( es_out_t *, es_out_id_t *es );
-static vlc_bool_t EsIsSelected( es_out_id_t *es );
+static bool EsIsSelected( es_out_id_t *es );
static void EsSelect( es_out_t *out, es_out_id_t *es );
-static void EsUnselect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_update );
+static void EsUnselect( es_out_t *out, es_out_id_t *es, bool b_update );
static char *LanguageGetName( const char *psz_code );
static char *LanguageGetCode( const char *psz_lang );
static char **LanguageSplit( const char *psz_langs );
out->pf_del = EsOutDel;
out->pf_control = EsOutControl;
out->p_sys = p_sys;
- out->b_sout = (p_input->p->p_sout != NULL ? VLC_TRUE : VLC_FALSE);
+ out->b_sout = (p_input->p->p_sout != NULL ? true : false);
p_sys->p_input = p_input;
- p_sys->b_active = VLC_FALSE;
+ p_sys->b_active = false;
p_sys->i_mode = ES_OUT_MODE_AUTO;
return NULL;
}
-static void EsOutDiscontinuity( es_out_t *out, vlc_bool_t b_flush, vlc_bool_t b_audio )
+static void EsOutDiscontinuity( es_out_t *out, bool b_flush, bool b_audio )
{
es_out_sys_t *p_sys = out->p_sys;
int i;
int i;
p_sys->i_rate = i_rate;
- EsOutDiscontinuity( out, VLC_FALSE, VLC_FALSE );
+ EsOutDiscontinuity( out, false, false );
for( i = 0; i < p_sys->i_pgrm; i++ )
input_ClockSetRate( &p_sys->pgrm[i]->clock, i_rate );
{
/* Send discontinuity to decoders (it will allow them to flush
* * if implemented */
- EsOutDiscontinuity( out, VLC_FALSE, VLC_FALSE );
+ EsOutDiscontinuity( out, false, false );
}
else
{
//es_out_sys_t *p_sys = out->p_sys;
es_out_Control( out, ES_OUT_RESET_PCR );
- EsOutDiscontinuity( out, VLC_TRUE, VLC_FALSE );
+ EsOutDiscontinuity( out, true, false );
}
-vlc_bool_t input_EsOutDecodersEmpty( es_out_t *out )
+bool input_EsOutDecodersEmpty( es_out_t *out )
{
es_out_sys_t *p_sys = out->p_sys;
int i;
es_out_id_t *es = p_sys->es[i];
if( es->p_dec && !input_DecoderEmpty( es->p_dec ) )
- return VLC_FALSE;
+ return false;
}
- return VLC_TRUE;
+ return true;
}
/*****************************************************************************
*
*****************************************************************************/
static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt, const char *psz_language,
- vlc_bool_t b_delete )
+ bool b_delete )
{
es_out_sys_t *p_sys = out->p_sys;
input_thread_t *p_input = p_sys->p_input;
{
val.i_int = i_id;
var_Change( p_input, psz_var, VLC_VAR_DELCHOICE, &val, NULL );
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
return;
}
free( text.psz_string );
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
}
static void EsOutESVarUpdate( es_out_t *out, es_out_id_t *es,
- vlc_bool_t b_delete )
+ bool b_delete )
{
EsOutESVarUpdateGeneric( out, es->i_id, &es->fmt, es->psz_language, b_delete );
}
{
if( p_sys->es[i]->p_pgrm == old && EsIsSelected( p_sys->es[i] ) &&
p_sys->i_mode != ES_OUT_MODE_ALL )
- EsUnselect( out, p_sys->es[i], VLC_TRUE );
+ EsUnselect( out, p_sys->es[i], true );
}
p_sys->p_es_audio = NULL;
msg_Dbg( p_input, "selecting program id=%d", p_pgrm->i_id );
/* Mark it selected */
- p_pgrm->b_selected = VLC_TRUE;
+ p_pgrm->b_selected = true;
/* Switch master stream */
if( p_sys->p_pgrm && p_sys->p_pgrm->clock.b_master )
{
- p_sys->p_pgrm->clock.b_master = VLC_FALSE;
+ p_sys->p_pgrm->clock.b_master = false;
}
- p_pgrm->clock.b_master = VLC_TRUE;
+ p_pgrm->clock.b_master = true;
p_sys->p_pgrm = p_pgrm;
/* Update "program" */
for( i = 0; i < p_sys->i_es; i++ )
{
if( p_sys->es[i]->p_pgrm == p_sys->p_pgrm )
- EsOutESVarUpdate( out, p_sys->es[i], VLC_FALSE );
- EsOutSelect( out, p_sys->es[i], VLC_FALSE );
+ EsOutESVarUpdate( out, p_sys->es[i], false );
+ EsOutSelect( out, p_sys->es[i], false );
}
/* Update now playing */
input_item_SetPublisher( p_input->p->input.p_item,
p_pgrm->psz_publisher );
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
}
/* EsOutAddProgram:
/* Init */
p_pgrm->i_id = i_group;
p_pgrm->i_es = 0;
- p_pgrm->b_selected = VLC_FALSE;
+ p_pgrm->b_selected = false;
p_pgrm->psz_name = NULL;
p_pgrm->psz_now_playing = NULL;
p_pgrm->psz_publisher = NULL;
p_pgrm->p_epg = NULL;
- input_ClockInit( &p_pgrm->clock, VLC_FALSE, p_input->p->input.i_cr_average, p_sys->i_rate );
+ input_ClockInit( &p_pgrm->clock, false, p_input->p->input.i_cr_average, p_sys->i_rate );
/* Append it */
TAB_APPEND( p_sys->i_pgrm, p_sys->pgrm, p_pgrm );
}
else
{
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
}
return p_pgrm;
}
val.i_int = i_group;
var_Change( p_input, "program", VLC_VAR_DELCHOICE, &val, NULL );
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
return VLC_SUCCESS;
}
for( i = 0; i < p_src->i_event; i++ )
{
vlc_epg_event_t *p_evt = p_src->pp_event[i];
- vlc_bool_t b_add = VLC_TRUE;
+ bool b_add = true;
int j;
for( j = 0; j < p_dst->i_event; j++ )
{
if( p_dst->pp_event[j]->i_start == p_evt->i_start && p_dst->pp_event[j]->i_duration == p_evt->i_duration )
{
- b_add = VLC_FALSE;
+ b_add = false;
break;
}
if( p_dst->pp_event[j]->i_start > p_evt->i_start )
es->psz_language_code = LanguageGetCode( fmt->psz_language );
es->p_dec = NULL;
for( i = 0; i < 4; i++ )
- es->pb_cc_present[i] = VLC_FALSE;
- es->p_master = VLC_FALSE;
+ es->pb_cc_present[i] = false;
+ es->p_master = false;
if( es->p_pgrm == p_sys->p_pgrm )
- EsOutESVarUpdate( out, es, VLC_FALSE );
+ EsOutESVarUpdate( out, es, false );
/* Select it if needed */
- EsOutSelect( out, es, VLC_FALSE );
+ EsOutSelect( out, es, false );
TAB_APPEND( out->p_sys->i_es, out->p_sys->es, es );
return es;
}
-static vlc_bool_t EsIsSelected( es_out_id_t *es )
+static bool EsIsSelected( es_out_id_t *es )
{
if( es->p_master )
{
- vlc_bool_t b_decode = VLC_FALSE;
+ bool b_decode = false;
if( es->p_master->p_dec )
{
int i_channel = EsOutGetClosedCaptionsChannel( es->fmt.i_codec );
return;
i_channel = EsOutGetClosedCaptionsChannel( es->fmt.i_codec );
- if( i_channel == -1 || input_DecoderSetCcState( es->p_master->p_dec, VLC_TRUE, i_channel ) )
+ if( i_channel == -1 || input_DecoderSetCcState( es->p_master->p_dec, true, i_channel ) )
return;
}
else
}
es->i_preroll_end = -1;
- es->p_dec = input_DecoderNew( p_input, &es->fmt, VLC_FALSE );
+ es->p_dec = input_DecoderNew( p_input, &es->fmt, false );
if( es->p_dec == NULL || es->p_pgrm != p_sys->p_pgrm )
return;
}
val.i_int = es->i_id;
var_Change( p_input, psz_var, VLC_VAR_SETVALUE, &val, NULL );
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
}
-static void EsUnselect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_update )
+static void EsUnselect( es_out_t *out, es_out_id_t *es, bool b_update )
{
es_out_sys_t *p_sys = out->p_sys;
input_thread_t *p_input = p_sys->p_input;
{
int i_channel = EsOutGetClosedCaptionsChannel( es->fmt.i_codec );
if( i_channel != -1 )
- input_DecoderSetCcState( es->p_master->p_dec, VLC_FALSE, i_channel );
+ input_DecoderSetCcState( es->p_master->p_dec, false, i_channel );
}
}
else
val.i_int = -1;
var_Change( p_input, "spu-es", VLC_VAR_SETVALUE, &val, NULL );
if( !b_update )
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
}
EsOutDel( out, es->pp_cc_es[i] );
- es->pb_cc_present[i] = VLC_FALSE;
+ es->pb_cc_present[i] = false;
}
input_DecoderDelete( es->p_dec );
es->p_dec = NULL;
val.i_int = -1;
var_Change( p_input, psz_var, VLC_VAR_SETVALUE, &val, NULL );
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
}
/**
* \param b_force ...
* \return nothing
*/
-static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force )
+static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
{
es_out_sys_t *p_sys = out->p_sys;
p_sys->p_es_audio != es &&
EsIsSelected( p_sys->p_es_audio ) )
{
- EsUnselect( out, p_sys->p_es_audio, VLC_FALSE );
+ EsUnselect( out, p_sys->p_es_audio, false );
}
p_sys->p_es_audio = es;
}
p_sys->p_es_sub != es &&
EsIsSelected( p_sys->p_es_sub ) )
{
- EsUnselect( out, p_sys->p_es_sub, VLC_FALSE );
+ EsUnselect( out, p_sys->p_es_sub, false );
}
p_sys->p_es_sub = es;
}
( p_sys->i_rate >= INPUT_RATE_DEFAULT/AOUT_MAX_INPUT_RATE &&
p_sys->i_rate <= INPUT_RATE_DEFAULT*AOUT_MAX_INPUT_RATE ) ) )
{
- vlc_bool_t pb_cc[4];
- vlc_bool_t b_cc_new = VLC_FALSE;
+ bool pb_cc[4];
+ bool b_cc_new = false;
int i;
input_DecoderDecode( es->p_dec, p_block );
es_format_Clean( &fmt );
/* */
- es->pb_cc_present[i] = VLC_TRUE;
- b_cc_new = VLC_TRUE;
+ es->pb_cc_present[i] = true;
+ b_cc_new = true;
}
if( b_cc_new )
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
}
else
{
static void EsOutDel( es_out_t *out, es_out_id_t *es )
{
es_out_sys_t *p_sys = out->p_sys;
- vlc_bool_t b_reselect = VLC_FALSE;
+ bool b_reselect = false;
int i;
/* We don't try to reselect */
}
if( es->p_pgrm == p_sys->p_pgrm )
- EsOutESVarUpdate( out, es, VLC_TRUE );
+ EsOutESVarUpdate( out, es, true );
TAB_REMOVE( p_sys->i_es, p_sys->es, es );
}
if( p_sys->p_es_audio == es || p_sys->p_es_video == es ||
- p_sys->p_es_sub == es ) b_reselect = VLC_TRUE;
+ p_sys->p_es_sub == es ) b_reselect = true;
if( p_sys->p_es_audio == es ) p_sys->p_es_audio = NULL;
if( p_sys->p_es_video == es ) p_sys->p_es_video = NULL;
for( i = 0; i < p_sys->i_es; i++ )
{
if( es->fmt.i_cat == p_sys->es[i]->fmt.i_cat )
- EsOutSelect( out, p_sys->es[i], VLC_FALSE );
+ EsOutSelect( out, p_sys->es[i], false );
}
free( es->psz_language );
static int EsOutControl( es_out_t *out, int i_query, va_list args )
{
es_out_sys_t *p_sys = out->p_sys;
- vlc_bool_t b, *pb;
+ bool b, *pb;
int i, *pi;
es_out_id_t *es;
case ES_OUT_GET_ES_STATE:
es = (es_out_id_t*) va_arg( args, es_out_id_t * );
- pb = (vlc_bool_t*) va_arg( args, vlc_bool_t * );
+ pb = (bool*) va_arg( args, bool * );
*pb = EsIsSelected( es );
return VLC_SUCCESS;
p_sys->b_active = b;
/* Needed ? */
if( b )
- var_SetBool( p_sys->p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_sys->p_input, "intf-change", true );
return VLC_SUCCESS;
}
case ES_OUT_GET_ACTIVE:
- pb = (vlc_bool_t*) va_arg( args, vlc_bool_t * );
+ pb = (bool*) va_arg( args, bool * );
*pb = p_sys->b_active;
return VLC_SUCCESS;
}
for( i = 0; i < p_sys->i_es; i++ )
{
- EsOutSelect( out, p_sys->es[i], VLC_FALSE );
+ EsOutSelect( out, p_sys->es[i], false );
}
return VLC_SUCCESS;
}
{
if( es == p_sys->es[i] )
{
- EsOutSelect( out, es, VLC_TRUE );
+ EsOutSelect( out, es, true );
break;
}
}
#if 1
input_DecoderDelete( es->p_dec );
es->p_dec = input_DecoderNew( p_sys->p_input,
- &es->fmt, VLC_FALSE );
+ &es->fmt, false );
#else
es->p_dec->fmt_in.i_extra = p_fmt->i_extra;
static int RunAndDestroy ( input_thread_t *p_input );
static input_thread_t * Create ( vlc_object_t *, input_item_t *,
- const char *, vlc_bool_t, sout_instance_t * );
+ const char *, bool, sout_instance_t * );
static int Init ( input_thread_t *p_input );
static void Error ( input_thread_t *p_input );
static void End ( input_thread_t *p_input );
static inline int ControlPopNoLock( input_thread_t *, int *, vlc_value_t * );
static void ControlReduce( input_thread_t * );
-static vlc_bool_t Control( input_thread_t *, int, vlc_value_t );
+static bool Control( input_thread_t *, int, vlc_value_t );
static int UpdateFromAccess( input_thread_t * );
static int UpdateFromDemux( input_thread_t * );
static void InputMetaUser( input_thread_t *p_input, vlc_meta_t *p_meta );
static void InputUpdateMeta( input_thread_t *p_input, vlc_meta_t *p_meta );
-static sout_instance_t *SoutFind( vlc_object_t *p_parent, input_item_t *p_item, vlc_bool_t * );
+static sout_instance_t *SoutFind( vlc_object_t *p_parent, input_item_t *p_item, bool * );
static void SoutKeep( sout_instance_t * );
static void DemuxMeta( input_thread_t *p_input, vlc_meta_t *p_meta, demux_t *p_demux );
* TODO complete this list (?)
*****************************************************************************/
static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
- const char *psz_header, vlc_bool_t b_quick,
+ const char *psz_header, bool b_quick,
sout_instance_t *p_sout )
{
static const char input_name[] = "input";
p_input->psz_header = psz_header ? strdup( psz_header ) : NULL;
/* Init Common fields */
- p_input->b_eof = VLC_FALSE;
- p_input->b_can_pace_control = VLC_TRUE;
+ p_input->b_eof = false;
+ p_input->b_can_pace_control = true;
p_input->p->i_start = 0;
p_input->i_time = 0;
p_input->p->i_stop = 0;
TAB_INIT( p_input->p->i_attachment, p_input->p->attachment );
p_input->p->p_es_out = NULL;
p_input->p->p_sout = NULL;
- p_input->p->b_owns_its_sout = VLC_TRUE;
- p_input->p->b_sout_keep = VLC_FALSE;
- p_input->p->b_out_pace_control = VLC_FALSE;
+ p_input->p->b_owns_its_sout = true;
+ p_input->p->b_sout_keep = false;
+ p_input->p->b_out_pace_control = false;
p_input->i_pts_delay = 0;
/* Init Input fields */
p_input->p->input.p_access = NULL;
p_input->p->input.p_stream = NULL;
p_input->p->input.p_demux = NULL;
- p_input->p->input.b_title_demux = VLC_FALSE;
+ p_input->p->input.b_title_demux = false;
p_input->p->input.i_title = 0;
p_input->p->input.title = NULL;
p_input->p->input.i_title_offset = p_input->p->input.i_seekpoint_offset = 0;
- p_input->p->input.b_can_pace_control = VLC_TRUE;
- p_input->p->input.b_can_rate_control = VLC_TRUE;
- p_input->p->input.b_rescale_ts = VLC_TRUE;
- p_input->p->input.b_eof = VLC_FALSE;
+ p_input->p->input.b_can_pace_control = true;
+ p_input->p->input.b_can_rate_control = true;
+ p_input->p->input.b_rescale_ts = true;
+ p_input->p->input.b_eof = false;
p_input->p->input.i_cr_average = 0;
vlc_mutex_lock( &p_item->lock );
if( p_sout )
{
p_input->p->p_sout = p_sout;
- p_input->p->b_owns_its_sout = VLC_FALSE;
+ p_input->p->b_owns_its_sout = false;
}
memset( &p_input->p->counters, 0, sizeof( p_input->p->counters ) );
input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
input_item_t *p_item )
{
- vlc_bool_t b_sout_keep;
+ bool b_sout_keep;
sout_instance_t *p_sout = SoutFind( p_parent, p_item, &b_sout_keep );
input_thread_t *p_input = __input_CreateThreadExtended( p_parent, p_item, NULL, p_sout );
{
input_thread_t *p_input;
- p_input = Create( p_parent, p_item, psz_log, VLC_FALSE, p_sout );
+ p_input = Create( p_parent, p_item, psz_log, false, p_sout );
if( !p_input )
return NULL;
/* Create thread and wait for its readiness. */
if( vlc_thread_create( p_input, "input", Run,
- VLC_THREAD_PRIORITY_INPUT, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_INPUT, true ) )
{
input_ChangeState( p_input, ERROR_S );
msg_Err( p_input, "cannot create input thread" );
* \return the input object id if non blocking, an error code else
*/
int __input_Read( vlc_object_t *p_parent, input_item_t *p_item,
- vlc_bool_t b_block )
+ bool b_block )
{
- vlc_bool_t b_sout_keep;
+ bool b_sout_keep;
sout_instance_t *p_sout = SoutFind( p_parent, p_item, &b_sout_keep );
input_thread_t *p_input;
- p_input = Create( p_parent, p_item, NULL, VLC_FALSE, p_sout );
+ p_input = Create( p_parent, p_item, NULL, false, p_sout );
if( !p_input && p_sout )
{
SoutKeep( p_sout );
else
{
if( vlc_thread_create( p_input, "input", RunAndDestroy,
- VLC_THREAD_PRIORITY_INPUT, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_INPUT, true ) )
{
input_ChangeState( p_input, ERROR_S );
msg_Err( p_input, "cannot create input thread" );
input_thread_t *p_input;
/* Allocate descriptor */
- p_input = Create( p_parent, p_item, NULL, VLC_TRUE, NULL );
+ p_input = Create( p_parent, p_item, NULL, true, NULL );
if( !p_input )
return VLC_EGENERIC;
sout_instance_t * input_DetachSout( input_thread_t *p_input )
{
- p_input->p->b_owns_its_sout = VLC_FALSE;
+ p_input->p->b_owns_its_sout = false;
return p_input->p->p_sout;
}
if( Init( p_input ) )
{
/* If we failed, wait before we are killed, and exit */
- p_input->b_error = VLC_TRUE;
+ p_input->b_error = true;
/* FIXME: we don't want to depend on the playlist */
playlist_t * p_playlist = vlc_object_find( p_input,
Error( p_input );
/* Tell we're dead */
- p_input->b_dead = VLC_TRUE;
+ p_input->b_dead = true;
return 0;
}
}
/* We have finished */
- p_input->b_eof = VLC_TRUE;
+ p_input->b_eof = true;
playlist_Signal( pl_Get( p_input ) );
}
}
/* We have finished */
- p_input->b_eof = VLC_TRUE;
+ p_input->b_eof = true;
}
/* Clean up */
while( !p_input->b_die && !p_input->b_error && !p_input->p->input.b_eof )
{
- vlc_bool_t b_force_update = VLC_FALSE;
+ bool b_force_update = false;
int i_ret;
int i_type;
vlc_value_t val;
p_input->p->input.p_demux->info.i_update )
{
i_ret = UpdateFromDemux( p_input );
- b_force_update = VLC_TRUE;
+ b_force_update = true;
}
else if( !p_input->p->input.b_title_demux &&
p_input->p->input.p_access &&
p_input->p->input.p_access->info.i_update )
{
i_ret = UpdateFromAccess( p_input );
- b_force_update = VLC_TRUE;
+ b_force_update = true;
}
}
* playlist is allowed to do so. */
input_ChangeState( p_input, END_S );
msg_Dbg( p_input, "EOF reached" );
- p_input->p->input.b_eof = VLC_TRUE;
+ p_input->p->input.b_eof = true;
}
else
{
}
else if( i_ret < 0 )
{
- p_input->b_error = VLC_TRUE;
+ p_input->b_error = true;
}
if( i_ret > 0 && p_input->p->i_slave > 0 )
{
msg_Dbg( p_input, "control type=%d", i_type );
if( Control( p_input, i_type, val ) )
- b_force_update = VLC_TRUE;
+ b_force_update = true;
}
vlc_mutex_unlock( &p_input->p->lock_control );
}
}
- var_SetBool( p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_input, "intf-change", true );
i_intf_update = mdate() + I64C(150000);
}
/* 150ms * 8 = ~ 1 second */
{
msg_Dbg( p_input, "Input is a meta file: disabling unneeded options" );
var_SetString( p_input, "sout", "" );
- var_SetBool( p_input, "sout-all", VLC_FALSE );
+ var_SetBool( p_input, "sout-all", false );
var_SetString( p_input, "input-slave", "" );
var_SetInteger( p_input, "input-repeat", 0 );
var_SetString( p_input, "sub-file", "" );
- var_SetBool( p_input, "sub-autodetect-file", VLC_FALSE );
+ var_SetBool( p_input, "sub-autodetect-file", false );
}
}
/* Create es out */
p_input->p->p_es_out = input_EsOutNew( p_input, p_input->p->i_rate );
- es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, VLC_FALSE );
+ es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, false );
es_out_Control( p_input->p->p_es_out, ES_OUT_SET_MODE, ES_OUT_MODE_NONE );
var_Create( p_input, "bit-rate", VLC_VAR_INTEGER );
if( psz_subtitle != NULL )
{
msg_Dbg( p_input, "forced subtitle: %s", psz_subtitle );
- input_AddSubtitles( p_input, psz_subtitle, VLC_FALSE );
+ input_AddSubtitles( p_input, psz_subtitle, false );
}
var_Get( p_input, "sub-autodetect-file", &val );
* if no subtitles file was specified */
if( ( psz_subtitle == NULL ) && subs && subs[0] )
{
- input_AddSubtitles( p_input, subs[0], VLC_FALSE );
+ input_AddSubtitles( p_input, subs[0], false );
free( subs[0] );
i = 1;
}
/* Set up es_out */
if( !p_input->b_preparsing )
{
- es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, VLC_TRUE );
+ es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, true );
i_es_out_mode = ES_OUT_MODE_AUTO;
val.p_list = NULL;
if( p_input->p->p_sout )
{
if( p_input->p->p_sout->i_out_pace_nocontrol > 0 )
{
- p_input->p->b_out_pace_control = VLC_FALSE;
+ p_input->p->b_out_pace_control = false;
}
else
{
- p_input->p->b_out_pace_control = VLC_TRUE;
+ p_input->p->b_out_pace_control = true;
}
if( p_input->b_can_pace_control && p_input->p->b_out_pace_control )
}
/* Tell we're dead */
- p_input->b_dead = VLC_TRUE;
+ p_input->b_dead = true;
}
-static sout_instance_t *SoutFind( vlc_object_t *p_parent, input_item_t *p_item, vlc_bool_t *pb_sout_keep )
+static sout_instance_t *SoutFind( vlc_object_t *p_parent, input_item_t *p_item, bool *pb_sout_keep )
{
- vlc_bool_t b_keep_sout = var_CreateGetBool( p_parent, "sout-keep" );
+ bool b_keep_sout = var_CreateGetBool( p_parent, "sout-keep" );
sout_instance_t *p_sout = NULL;
int i;
psz_option++;
if( !strcmp( psz_option, "sout-keep" ) )
- b_keep_sout = VLC_TRUE;
+ b_keep_sout = true;
else if( !strcmp( psz_option, "no-sout-keep" ) || !strcmp( psz_option, "nosout-keep" ) )
- b_keep_sout = VLC_FALSE;
+ b_keep_sout = false;
}
vlc_mutex_unlock( &p_item->lock );
}
}
-static vlc_bool_t Control( input_thread_t *p_input, int i_type,
+static bool Control( input_thread_t *p_input, int i_type,
vlc_value_t val )
{
- vlc_bool_t b_force_update = VLC_FALSE;
+ bool b_force_update = false;
if( !p_input ) return b_force_update;
if( p_input->p->i_slave > 0 )
SlaveSeek( p_input );
- b_force_update = VLC_TRUE;
+ b_force_update = true;
}
break;
}
if( p_input->p->i_slave > 0 )
SlaveSeek( p_input );
- b_force_update = VLC_TRUE;
+ b_force_update = true;
}
break;
}
int i_ret;
if( p_input->p->input.p_access )
i_ret = access2_Control( p_input->p->input.p_access,
- ACCESS_SET_PAUSE_STATE, VLC_FALSE );
+ ACCESS_SET_PAUSE_STATE, false );
else
i_ret = demux2_Control( p_input->p->input.p_demux,
- DEMUX_SET_PAUSE_STATE, VLC_FALSE );
+ DEMUX_SET_PAUSE_STATE, false );
if( i_ret )
{
vlc_mutex_lock( &p_input->p->lock_control );
}
- b_force_update = VLC_TRUE;
+ b_force_update = true;
/* Switch to play */
p_input->i_state = PLAYING_S;
int i_ret;
if( p_input->p->input.p_access )
i_ret = access2_Control( p_input->p->input.p_access,
- ACCESS_SET_PAUSE_STATE, VLC_TRUE );
+ ACCESS_SET_PAUSE_STATE, true );
else
i_ret = demux2_Control( p_input->p->input.p_demux,
- DEMUX_SET_PAUSE_STATE, VLC_TRUE );
+ DEMUX_SET_PAUSE_STATE, true );
- b_force_update = VLC_TRUE;
+ b_force_update = true;
if( i_ret )
{
}
else if( val.i_int == PAUSE_S && !p_input->p->b_can_pause )
{
- b_force_update = VLC_TRUE;
+ b_force_update = true;
/* Correct "state" value */
val.i_int = p_input->i_state;
{
val.i_int = i_rate;
var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val, NULL );
- var_SetBool( p_input, "rate-change", VLC_TRUE );
+ var_SetBool( p_input, "rate-change", true );
p_input->p->i_rate = i_rate;
if( p_input->p->input.b_rescale_ts )
input_EsOutChangeRate( p_input->p->p_es_out, i_rate );
- b_force_update = VLC_TRUE;
+ b_force_update = true;
}
break;
}
in->p_access = NULL;
in->p_stream = NULL;
in->p_demux = NULL;
- in->b_title_demux = VLC_FALSE;
+ in->b_title_demux = false;
TAB_INIT( in->i_title, in->title );
- in->b_can_pause = VLC_TRUE;
- in->b_can_pace_control = VLC_TRUE;
- in->b_can_rate_control = VLC_TRUE;
- in->b_rescale_ts = VLC_TRUE;
- in->b_eof = VLC_FALSE;
+ in->b_can_pause = true;
+ in->b_can_pace_control = true;
+ in->b_can_rate_control = true;
+ in->b_rescale_ts = true;
+ in->b_eof = false;
in->f_fps = 0.0;
in->i_cr_average = 0;
if( *psz_demux == '\0' )
{
in->p_demux = demux2_New( p_input, psz_access, psz_demux, psz_path,
- NULL, p_input->p->p_es_out, VLC_FALSE );
+ NULL, p_input->p->p_es_out, false );
}
}
else
DEMUX_GET_PTS_DELAY, &i_pts_delay );
p_input->i_pts_delay = __MAX( p_input->i_pts_delay, i_pts_delay );
- in->b_title_demux = VLC_TRUE;
+ in->b_title_demux = true;
if( demux2_Control( in->p_demux, DEMUX_GET_TITLE_INFO,
&in->title, &in->i_title,
&in->i_title_offset, &in->i_seekpoint_offset ) )
}
if( demux2_Control( in->p_demux, DEMUX_CAN_CONTROL_PACE,
&in->b_can_pace_control ) )
- in->b_can_pace_control = VLC_FALSE;
+ in->b_can_pace_control = false;
if( !in->b_can_pace_control )
{
if( demux2_Control( in->p_demux, DEMUX_CAN_CONTROL_RATE,
&in->b_can_rate_control, &in->b_rescale_ts ) )
{
- in->b_can_rate_control = VLC_FALSE;
- in->b_rescale_ts = VLC_TRUE; /* not used */
+ in->b_can_rate_control = false;
+ in->b_rescale_ts = true; /* not used */
}
}
else
{
- in->b_can_rate_control = VLC_TRUE;
- in->b_rescale_ts = VLC_TRUE;
+ in->b_can_rate_control = true;
+ in->b_rescale_ts = true;
}
if( demux2_Control( in->p_demux, DEMUX_CAN_PAUSE,
&in->b_can_pause ) )
- in->b_can_pause = VLC_FALSE;
+ in->b_can_pause = false;
var_SetBool( p_input, "can-pause", in->b_can_pause );
int ret = demux2_Control( in->p_demux, DEMUX_CAN_SEEK,
&val.b_bool );
if( ret != VLC_SUCCESS )
- val.b_bool = VLC_FALSE;
+ val.b_bool = false;
var_Set( p_input, "seekable", val );
}
else
{
msg_Err( p_input, "open of `%s' failed: %s", psz_mrl,
msg_StackMsg() );
- intf_UserFatal( VLC_OBJECT( p_input), VLC_FALSE,
+ intf_UserFatal( VLC_OBJECT( p_input), false,
_("Your input can't be opened"),
_("VLC is unable to open the MRL '%s'."
" Check the log for details."), psz_mrl );
ACCESS_GET_PTS_DELAY, &i_pts_delay );
p_input->i_pts_delay = __MAX( p_input->i_pts_delay, i_pts_delay );
- in->b_title_demux = VLC_FALSE;
+ in->b_title_demux = false;
if( access2_Control( in->p_access, ACCESS_GET_TITLE_INFO,
&in->title, &in->i_title,
&in->i_title_offset, &in->i_seekpoint_offset ) )
access2_Control( in->p_access, ACCESS_CAN_CONTROL_PACE,
&in->b_can_pace_control );
in->b_can_rate_control = in->b_can_pace_control;
- in->b_rescale_ts = VLC_TRUE;
+ in->b_rescale_ts = true;
access2_Control( in->p_access, ACCESS_CAN_PAUSE,
&in->b_can_pause );
{
msg_Err( p_input, "no suitable demux module for `%s/%s://%s'",
psz_access, psz_demux, psz_path );
- intf_UserFatal( VLC_OBJECT( p_input ), VLC_FALSE,
+ intf_UserFatal( VLC_OBJECT( p_input ), false,
_("VLC can't recognize the input's format"),
_("The format of '%s' cannot be detected. "
"Have a look the log for details."), psz_mrl );
}
else
{
- in->b_title_demux = VLC_TRUE;
+ in->b_title_demux = true;
}
}
}
if( i_ret <= 0 )
{
msg_Dbg( p_input, "slave %d EOF", i );
- in->b_eof = VLC_TRUE;
+ in->b_eof = true;
}
}
}
if( demux2_Control( in->p_demux, DEMUX_SET_TIME, i_time ) )
{
msg_Err( p_input, "seek failed for slave %d -> EOF", i );
- in->b_eof = VLC_TRUE;
+ in->b_eof = true;
}
}
}
char * psz_arturl = NULL;
char *psz_title = NULL;
int i;
- int i_arturl_event = VLC_FALSE;
+ int i_arturl_event = false;
if( !p_meta )
return;
if( psz_arturl && *psz_arturl )
{
vlc_meta_Set( p_item->p_meta, vlc_meta_ArtworkURL, psz_arturl );
- i_arturl_event = VLC_TRUE;
+ i_arturl_event = true;
}
vlc_meta_Delete( p_meta );
if( p_input->p->p_sout && !p_input->b_preparsing )
{
vlc_meta_Set( p_item->p_meta, vlc_meta_ArtworkURL, "" );
- i_arturl_event = VLC_TRUE;
+ i_arturl_event = true;
}
else
}
vlc_mutex_unlock( &p_item->lock );
- input_item_SetPreparsed( p_item, VLC_TRUE );
+ input_item_SetPreparsed( p_item, true );
- if( i_arturl_event == VLC_TRUE )
+ if( i_arturl_event == true )
{
vlc_event_t event;
static void DemuxMeta( input_thread_t *p_input, vlc_meta_t *p_meta, demux_t *p_demux )
{
- vlc_bool_t b_bool;
+ bool b_bool;
module_t *p_id3;
/*****************************************************************************
* input_AddSubtitles: add a subtitles file and enable it
*****************************************************************************/
-vlc_bool_t input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
- vlc_bool_t b_check_extension )
+bool input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
+ bool b_check_extension )
{
input_source_t *sub;
vlc_value_t count;
if( b_check_extension && !subtitles_Filter( psz_subtitle ) )
{
- return VLC_FALSE;
+ return false;
}
/* if we are provided a subtitle.sub file,
}
else free( sub );
- return VLC_TRUE;
+ return true;
}
demux_t *p_demux;
/* Title infos for that input */
- vlc_bool_t b_title_demux; /* Titles/Seekpoints provided by demux */
+ bool b_title_demux; /* Titles/Seekpoints provided by demux */
int i_title;
input_title_t **title;
int i_seekpoint_end;
/* Properties */
- vlc_bool_t b_can_pause;
- vlc_bool_t b_can_pace_control;
- vlc_bool_t b_can_rate_control;
- vlc_bool_t b_rescale_ts;
+ bool b_can_pause;
+ bool b_can_pace_control;
+ bool b_can_rate_control;
+ bool b_rescale_ts;
- vlc_bool_t b_eof; /* eof of demuxer */
+ bool b_eof; /* eof of demuxer */
double f_fps;
/* Clock average variation */
struct input_thread_private_t
{
/* Global properties */
- vlc_bool_t b_can_pause;
- vlc_bool_t b_can_rate_control;
+ bool b_can_pause;
+ bool b_can_rate_control;
int i_rate;
/* */
/* Output */
es_out_t *p_es_out;
sout_instance_t *p_sout; /* XXX Move it to es_out ? */
- vlc_bool_t b_sout_keep;
- vlc_bool_t b_out_pace_control; /* idem ? */
- vlc_bool_t b_owns_its_sout;
+ bool b_sout_keep;
+ bool b_out_pace_control; /* idem ? */
+ bool b_owns_its_sout;
/* Main input properties */
input_source_t input;
/** Stuff moved out of vlc_input.h -- FIXME: should probably not be inline
* anyway. */
-static inline void input_item_SetPreparsed( input_item_t *p_i, vlc_bool_t preparsed )
+static inline void input_item_SetPreparsed( input_item_t *p_i, bool preparsed )
{
- vlc_bool_t send_event = VLC_FALSE;
+ bool send_event = false;
if( !p_i->p_meta )
p_i->p_meta = vlc_meta_New();
if ( p_i->p_meta->i_status != new_status )
{
p_i->p_meta->i_status = new_status;
- 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_InputItemPreparsedChanged;
}
}
-static inline void input_item_SetMetaFetched( input_item_t *p_i, vlc_bool_t metafetched )
+static inline void input_item_SetMetaFetched( input_item_t *p_i, bool metafetched )
{
if( !p_i->p_meta )
p_i->p_meta = vlc_meta_New();
p_i->p_meta->i_status &= ~ITEM_META_FETCHED;
}
-static inline void input_item_SetArtNotFound( input_item_t *p_i, vlc_bool_t notfound )
+static inline void input_item_SetArtNotFound( input_item_t *p_i, bool notfound )
{
if( !p_i->p_meta )
p_i->p_meta = vlc_meta_New();
p_i->p_meta->i_status &= ~ITEM_ART_NOTFOUND;
}
-static inline void input_item_SetArtFetched( input_item_t *p_i, vlc_bool_t artfetched )
+static inline void input_item_SetArtFetched( input_item_t *p_i, bool artfetched )
{
if( !p_i->p_meta )
p_i->p_meta = vlc_meta_New();
char *psz_artist;
char *psz_album;
char *psz_arturl;
- vlc_bool_t b_found;
+ bool b_found;
} playlist_album_t;
int input_MetaFetch ( playlist_t *, input_item_t * );
int input_ArtFind ( playlist_t *, input_item_t * );
-vlc_bool_t input_MetaSatisfied ( playlist_t*, input_item_t*,
+bool input_MetaSatisfied ( playlist_t*, input_item_t*,
uint32_t*, uint32_t* );
int input_DownloadAndCacheArt ( playlist_t *, input_item_t * );
void input_ConfigVarInit ( input_thread_t * );
/* stream.c */
-stream_t *stream_AccessNew( access_t *p_access, vlc_bool_t );
+stream_t *stream_AccessNew( access_t *p_access, bool );
void stream_AccessDelete( stream_t *s );
void stream_AccessReset( stream_t *s );
void stream_AccessUpdate( stream_t *s );
/* decoder.c */
-void input_DecoderDiscontinuity( decoder_t * p_dec, vlc_bool_t b_flush );
-vlc_bool_t input_DecoderEmpty( decoder_t * p_dec );
-int input_DecoderSetCcState( decoder_t *, vlc_bool_t b_decode, int i_channel );
-int input_DecoderGetCcState( decoder_t *, vlc_bool_t *pb_decode, int i_channel );
-void input_DecoderIsCcPresent( decoder_t *, vlc_bool_t pb_present[4] );
+void input_DecoderDiscontinuity( decoder_t * p_dec, bool b_flush );
+bool input_DecoderEmpty( decoder_t * p_dec );
+int input_DecoderSetCcState( decoder_t *, bool b_decode, int i_channel );
+int input_DecoderGetCcState( decoder_t *, bool *pb_decode, int i_channel );
+void input_DecoderIsCcPresent( decoder_t *, bool pb_present[4] );
/* es_out.c */
es_out_t *input_EsOutNew( input_thread_t *, int i_rate );
void input_EsOutChangeRate( es_out_t *, int );
void input_EsOutChangeState( es_out_t * );
void input_EsOutChangePosition( es_out_t * );
-vlc_bool_t input_EsOutDecodersEmpty( es_out_t * );
+bool input_EsOutDecodersEmpty( es_out_t * );
/* clock.c */
enum /* Synchro states */
mtime_t last_update;
int i_synchro_state;
- vlc_bool_t b_master;
+ bool b_master;
int i_rate;
int i_delta_cr_residue;
} input_clock_t;
-void input_ClockInit( input_clock_t *, vlc_bool_t b_master, int i_cr_average, int i_rate );
+void input_ClockInit( input_clock_t *, bool b_master, int i_cr_average, int i_rate );
void input_ClockSetPCR( input_thread_t *, input_clock_t *, mtime_t );
void input_ClockResetPCR( input_clock_t * );
mtime_t input_ClockGetTS( input_thread_t *, input_clock_t *, mtime_t );
/* stream_t *s could be null and then it mean a access+demux in one */
#define demux2_New( a, b, c, d, e, f,g ) __demux2_New(VLC_OBJECT(a),b,c,d,e,f,g)
-demux_t *__demux2_New(vlc_object_t *p_obj, const char *psz_access, const char *psz_demux, const char *psz_path, stream_t *s, es_out_t *out, vlc_bool_t );
+demux_t *__demux2_New(vlc_object_t *p_obj, const char *psz_access, const char *psz_demux, const char *psz_path, stream_t *s, es_out_t *out, bool );
void demux2_Delete(demux_t *);
/* UTF-16 and UTF-32 file reading */
vlc_iconv_t conv;
int i_char_width;
- vlc_bool_t b_little_endian;
+ bool b_little_endian;
};
#include <libvlc.h>
TAB_INIT( p_i->i_categories, p_i->pp_categories );
p_i->i_type = ITEM_TYPE_UNKNOWN;
- p_i->b_fixed_name = VLC_TRUE;
+ p_i->b_fixed_name = true;
p_i->p_stats = NULL;
p_i->p_meta = NULL;
ARRAY_APPEND( p_obj->p_libvlc->input_items, p_input );
vlc_mutex_unlock( &p_obj->p_libvlc->object_lock );
- p_input->b_fixed_name = VLC_FALSE;
+ p_input->b_fixed_name = false;
if( psz_uri )
p_input->psz_uri = strdup( psz_uri );
p_input->psz_uri = NULL;
p_input->i_type = i_type;
- p_input->b_prefers_tree = VLC_FALSE;
+ p_input->b_prefers_tree = false;
if( p_input->i_type == ITEM_TYPE_UNKNOWN )
GuessType( p_input );
struct stream_sys_t
{
- vlc_bool_t i_preserve_memory;
+ bool i_preserve_memory;
int64_t i_pos; /* Current reading offset */
int64_t i_size;
uint8_t *p_buffer;
* \param p_this the calling vlc_object
* \param p_buffer the memory buffer for the stream
* \param i_buffer the size of the buffer
- * \param i_preserve_memory if this is set to VLC_FALSE the memory buffer
+ * \param i_preserve_memory if this is set to false the memory buffer
* pointed to by p_buffer is freed on stream_Destroy
*/
stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
- int64_t i_size, vlc_bool_t i_preserve_memory )
+ int64_t i_size, bool i_preserve_memory )
{
stream_t *s = vlc_stream_create( p_this );
stream_sys_t *p_sys;
s->pf_destroy = Delete;
s->i_char_width = 1;
- s->b_little_endian = VLC_FALSE;
+ s->b_little_endian = false;
vlc_object_attach( s, p_this );
return s;
{
stream_sys_t *p_sys = s->p_sys;
- vlc_bool_t *p_bool;
+ bool *p_bool;
int64_t *pi_64, i_64;
int i_int;
break;
case STREAM_CAN_SEEK:
- p_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *p_bool = VLC_TRUE;
+ p_bool = (bool*)va_arg( args, bool * );
+ *p_bool = true;
break;
case STREAM_CAN_FASTSEEK:
- p_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *p_bool = VLC_TRUE;
+ p_bool = (bool*)va_arg( args, bool * );
+ *p_bool = true;
break;
case STREAM_GET_POSITION:
#define input_FindArtInCache(a,b) __input_FindArtInCache(VLC_OBJECT(a),b)
static int __input_FindArtInCache( vlc_object_t *, input_item_t *p_item );
-vlc_bool_t input_MetaSatisfied( playlist_t *p_playlist, input_item_t *p_item,
+bool input_MetaSatisfied( playlist_t *p_playlist, input_item_t *p_item,
uint32_t *pi_mandatory, uint32_t *pi_optional )
{
VLC_UNUSED(p_playlist);
uint32_t i_meta = input_CurrentMetaFlags( p_item->p_meta );
*pi_mandatory &= ~i_meta;
*pi_optional = 0; /// Todo
- return *pi_mandatory ? VLC_FALSE:VLC_TRUE;
+ return *pi_mandatory ? false:true;
}
int input_MetaFetch( playlist_t *p_playlist, input_item_t *p_item )
p_me->i_optional = i_optional;
p_me->p_item = p_item;
- p_me->p_module = module_Need( p_me, "meta fetcher", 0, VLC_FALSE );
+ p_me->p_module = module_Need( p_me, "meta fetcher", 0, false );
if( !p_me->p_module )
{
vlc_object_release( p_me );
module_Unneed( p_me, p_me->p_module );
vlc_object_release( p_me );
- input_item_SetMetaFetched( p_item, VLC_TRUE );
+ input_item_SetMetaFetched( p_item, true );
return VLC_SUCCESS;
}
}
free( psz_title );
- p_module = module_Need( p_playlist, "art finder", 0, VLC_FALSE );
+ p_module = module_Need( p_playlist, "art finder", 0, false );
if( p_module )
i_ret = 1;
a.psz_artist = psz_artist;
a.psz_album = psz_album;
a.psz_arturl = input_item_GetArtURL( p_item );
- a.b_found = (i_ret == VLC_EGENERIC ? VLC_FALSE : VLC_TRUE );
+ a.b_found = (i_ret == VLC_EGENERIC ? false : true );
ARRAY_APPEND( p_playlist->p_fetcher->albums, a );
}
else
{
access_t *p_access;
- vlc_bool_t b_block; /* Block method (1) or stream */
+ bool b_block; /* Block method (1) or stream */
int64_t i_pos; /* Current reading offset */
/* Stat for both method */
struct
{
- vlc_bool_t b_fastseek; /* From access */
+ bool b_fastseek; /* From access */
/* Stat about reading data */
int64_t i_read_count;
access_t *p_list_access;
/* Preparse mode ? */
- vlc_bool_t b_quick;
+ bool b_quick;
};
/* Method 1: */
static int AStreamPeekBlock( stream_t *s, const uint8_t **p_peek, int i_read );
static int AStreamSeekBlock( stream_t *s, int64_t i_pos );
static void AStreamPrebufferBlock( stream_t *s );
-static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof );
+static block_t *AReadBlock( stream_t *s, bool *pb_eof );
/* Method 2 */
static int AStreamReadStream( stream_t *s, void *p_read, int i_read );
return NULL;
}
- if( !( p_res = stream_AccessNew( p_access, VLC_TRUE ) ) )
+ if( !( p_res = stream_AccessNew( p_access, true ) ) )
{
access2_Delete( p_access );
return NULL;
return p_res;
}
-stream_t *stream_AccessNew( access_t *p_access, vlc_bool_t b_quick )
+stream_t *stream_AccessNew( access_t *p_access, bool b_quick )
{
stream_t *s = vlc_stream_create( VLC_OBJECT(p_access) );
stream_sys_t *p_sys;
/* UTF16 and UTF32 text file conversion */
s->i_char_width = 1;
- s->b_little_endian = VLC_FALSE;
+ s->b_little_endian = false;
s->conv = (vlc_iconv_t)(-1);
/* Common field */
p_sys->p_access = p_access;
- p_sys->b_block = p_access->pf_block ? VLC_TRUE : VLC_FALSE;
+ p_sys->b_block = p_access->pf_block ? true : false;
p_sys->i_pos = p_access->info.i_pos;
/* Stats */
stream_sys_t *p_sys = s->p_sys;
access_t *p_access = p_sys->p_access;
- vlc_bool_t *p_bool;
+ bool *p_bool;
int64_t *pi_64, i_64;
int i_int;
break;
case STREAM_CAN_SEEK:
- p_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
+ p_bool = (bool*)va_arg( args, bool * );
access2_Control( p_access, ACCESS_CAN_SEEK, p_bool );
break;
case STREAM_CAN_FASTSEEK:
- p_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
+ p_bool = (bool*)va_arg( args, bool * );
access2_Control( p_access, ACCESS_CAN_FASTSEEK, p_bool );
break;
for( ;; )
{
int64_t i_date = mdate();
- vlc_bool_t b_eof;
+ bool b_eof;
block_t *b;
if( s->b_die || p_sys->block.i_size > STREAM_CACHE_PREBUFFER_SIZE ||
/* seek within this stream if possible, else use plain old read and discard */
stream_sys_t *p_sys = s->p_sys;
access_t *p_access = p_sys->p_access;
- vlc_bool_t b_aseek;
+ bool b_aseek;
access2_Control( p_access, ACCESS_CAN_SEEK, &b_aseek );
if( b_aseek )
return AStreamSeekBlock( s, p_sys->i_pos + i_read ) ? 0 : i_read;
stream_sys_t *p_sys = s->p_sys;
access_t *p_access = p_sys->p_access;
int64_t i_offset = i_pos - p_sys->block.i_start;
- vlc_bool_t b_seek;
+ bool b_seek;
/* We already have thoses data, just update p_current/i_offset */
if( i_offset >= 0 && i_offset < p_sys->block.i_size )
/* We may need to seek or to read data */
if( i_offset < 0 )
{
- vlc_bool_t b_aseek;
+ bool b_aseek;
access2_Control( p_access, ACCESS_CAN_SEEK, &b_aseek );
if( !b_aseek )
return VLC_EGENERIC;
}
- b_seek = VLC_TRUE;
+ b_seek = true;
}
else
{
- vlc_bool_t b_aseek, b_aseekfast;
+ bool b_aseek, b_aseekfast;
access2_Control( p_access, ACCESS_CAN_SEEK, &b_aseek );
access2_Control( p_access, ACCESS_CAN_FASTSEEK, &b_aseekfast );
if( !b_aseek )
{
- b_seek = VLC_FALSE;
+ b_seek = false;
msg_Warn( s, I64Fd" bytes need to be skipped "
"(access non seekable)",
i_offset - p_sys->block.i_size );
if( i_skip <= i_th * i_avg &&
i_skip < STREAM_CACHE_SIZE )
- b_seek = VLC_FALSE;
+ b_seek = false;
else
- b_seek = VLC_TRUE;
+ b_seek = true;
msg_Dbg( s, "b_seek=%d th*avg=%d skip="I64Fd,
b_seek, i_th*i_avg, i_skip );
i_start = mdate();
for( ;; )
{
- vlc_bool_t b_eof;
+ bool b_eof;
if( s->b_die ) return VLC_EGENERIC;
/* seek within this stream if possible, else use plain old read and discard */
stream_sys_t *p_sys = s->p_sys;
access_t *p_access = p_sys->p_access;
- vlc_bool_t b_aseek;
+ bool b_aseek;
access2_Control( p_access, ACCESS_CAN_SEEK, &b_aseek );
if( b_aseek )
return AStreamSeekStream( s, p_sys->i_pos + i_read ) ? 0 : i_read;
{
stream_sys_t *p_sys = s->p_sys;
access_t *p_access = p_sys->p_access;
- vlc_bool_t b_aseek;
- vlc_bool_t b_afastseek;
+ bool b_aseek;
+ bool b_afastseek;
int i_maxth;
int i_new;
int i;
int i_toread =
__MIN( p_sys->stream.i_used, STREAM_CACHE_TRACK_SIZE -
(tk->i_end - tk->i_start - p_sys->stream.i_offset) );
- vlc_bool_t b_read = VLC_FALSE;
+ bool b_read = false;
int64_t i_start, i_stop;
if( i_toread <= 0 ) return VLC_EGENERIC; /* EOF */
if( !b_read ) return VLC_EGENERIC;
return VLC_SUCCESS;
}
- b_read = VLC_TRUE;
+ b_read = true;
/* Update end */
tk->i_end += i_read;
{
psz_encoding = strdup( "UTF-32LE" );
s->i_char_width = 4;
- s->b_little_endian = VLC_TRUE;
+ s->b_little_endian = true;
i_bom_size = 4;
}
else
{
psz_encoding = strdup( "UTF-16LE" );
- s->b_little_endian = VLC_TRUE;
+ s->b_little_endian = true;
s->i_char_width = 2;
i_bom_size = 2;
}
if( s->i_char_width == 2 )
{
- if( s->b_little_endian == VLC_TRUE)
+ if( s->b_little_endian == true)
{
/* UTF-16LE: 0A 00 <LF> */
while( p <= p_last && ( p[0] != 0x0A || p[1] != 0x00 ) )
}
else if( s->i_char_width == 4 )
{
- if( s->b_little_endian == VLC_TRUE)
+ if( s->b_little_endian == true)
{
/* UTF-32LE: 0A 00 00 00 <LF> */
while( p <= p_last && ( p[0] != 0x0A || p[1] != 0x00 ||
return i_read;
}
-static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof )
+static block_t *AReadBlock( stream_t *s, bool *pb_eof )
{
stream_sys_t *p_sys = s->p_sys;
access_t *p_access = p_sys->p_access;
input_thread_t *p_input = NULL;
block_t *p_block;
- vlc_bool_t b_eof;
+ bool b_eof;
int i_total = 0;
if( s->p_parent && s->p_parent->p_parent &&
for( j = 0, i_result2 = 0; j < i_sub_count && result2 != NULL; j++ )
{
- vlc_bool_t b_reject = VLC_FALSE;
+ bool b_reject = false;
if( !result[j].psz_fname || !result[j].psz_ext ) /* memory out */
break;
break;
}
if( i < i_sub_count )
- b_reject = VLC_TRUE;
+ b_reject = true;
}
else if( !strcasecmp( result[j].psz_ext, "cdg" ) )
{
if( result[j].priority < SUB_PRIORITY_MATCH_ALL )
- b_reject = VLC_TRUE;
+ b_reject = true;
}
/* */
*
* TODO list all changes warn by this callbacks */
var_Create( p_input, "intf-change", VLC_VAR_BOOL );
- var_SetBool( p_input, "intf-change", VLC_TRUE );
+ var_SetBool( p_input, "intf-change", true );
var_Create( p_input, "rate-change", VLC_VAR_BOOL );
- var_SetBool( p_input, "rate-change", VLC_TRUE );
+ var_SetBool( p_input, "rate-change", true );
}
#undef ADD_CALLBACK
}
}
var_Create( p_input, "seekable", VLC_VAR_BOOL );
- val.b_bool = VLC_TRUE; /* Fixed later*/
+ val.b_bool = true; /* Fixed later*/
var_Change( p_input, "seekable", VLC_VAR_SETVALUE, &val, NULL );
var_Create( p_input, "can-pause", VLC_VAR_BOOL );
- val.b_bool = VLC_TRUE; /* Fixed later*/
+ val.b_bool = true; /* Fixed later*/
var_Change( p_input, "can-pause", VLC_VAR_SETVALUE, &val, NULL );
/* */
vlc_object_attach( p_vlm, p_this->p_libvlc );
if( vlc_thread_create( p_vlm, "vlm thread",
- Manage, VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ Manage, VLC_THREAD_PRIORITY_LOW, false ) )
{
vlc_mutex_destroy( &p_vlm->lock );
vlc_object_release( p_vlm );
return VLC_EGENERIC;
}
-static vlc_bool_t ExecuteIsMedia( vlm_t *p_vlm, const char *psz_name )
+static bool ExecuteIsMedia( vlm_t *p_vlm, const char *psz_name )
{
int64_t id;
if( !psz_name || vlm_ControlInternal( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) )
- return VLC_FALSE;
- return VLC_TRUE;
+ return false;
+ return true;
}
-static vlc_bool_t ExecuteIsSchedule( vlm_t *p_vlm, const char *psz_name )
+static bool ExecuteIsSchedule( vlm_t *p_vlm, const char *psz_name )
{
if( !psz_name || !vlm_ScheduleSearch( p_vlm, psz_name ) )
- return VLC_FALSE;
- return VLC_TRUE;
+ return false;
+ return true;
}
static int ExecuteDel( vlm_t *p_vlm, const char *psz_name, vlm_message_t **pp_status )
{
if( psz_argument )
{
- vlc_bool_t b_relative;
+ bool b_relative;
if( psz_argument[0] == '+' || psz_argument[0] == '-' )
- b_relative = VLC_TRUE;
+ b_relative = true;
else
- b_relative = VLC_FALSE;
+ b_relative = false;
if( strstr( psz_argument, "ms" ) || strstr( psz_argument, "s" ) )
{
return VLC_SUCCESS;
}
-static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule, vlc_bool_t b_new,
+static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule, bool b_new,
const int i_property, char *ppsz_property[], vlm_message_t **pp_status )
{
const char *psz_cmd = b_new ? "new" : "setup";
return VLC_SUCCESS;
}
-static int ExecuteMediaProperty( vlm_t *p_vlm, int64_t id, vlc_bool_t b_new,
+static int ExecuteMediaProperty( vlm_t *p_vlm, int64_t id, bool b_new,
const int i_property, char *ppsz_property[], vlm_message_t **pp_status )
{
const char *psz_cmd = b_new ? "new" : "setup";
if( !strcmp( psz_option, "enabled" ) )
{
- p_cfg->b_enabled = VLC_TRUE;
+ p_cfg->b_enabled = true;
}
else if( !strcmp( psz_option, "disabled" ) )
{
- p_cfg->b_enabled = VLC_FALSE;
+ p_cfg->b_enabled = false;
}
else if( !strcmp( psz_option, "input" ) )
{
{
if( p_cfg->b_vod )
ERROR( "invalid loop option for vod" );
- p_cfg->broadcast.b_loop = VLC_TRUE;
+ p_cfg->broadcast.b_loop = true;
}
else if( !strcmp( psz_option, "unloop" ) )
{
if( p_cfg->b_vod )
ERROR( "invalid unloop option for vod" );
- p_cfg->broadcast.b_loop = VLC_FALSE;
+ p_cfg->broadcast.b_loop = false;
}
else if( !strcmp( psz_option, "mux" ) )
{
*pp_status = vlm_MessageNew( "new", "could not create schedule" );
return VLC_EGENERIC;
}
- return ExecuteScheduleProperty( p_vlm, p_schedule, VLC_TRUE, i_property, ppsz_property, pp_status );
+ return ExecuteScheduleProperty( p_vlm, p_schedule, true, i_property, ppsz_property, pp_status );
}
else if( !strcmp( psz_type, "vod" ) || !strcmp( psz_type, "broadcast" ) )
{
return VLC_EGENERIC;
}
vlm_media_Clean( &cfg );
- return ExecuteMediaProperty( p_vlm, id, VLC_TRUE, i_property, ppsz_property, pp_status );
+ return ExecuteMediaProperty( p_vlm, id, true, i_property, ppsz_property, pp_status );
}
else
{
if( ExecuteIsSchedule( p_vlm, psz_name ) )
{
vlm_schedule_sys_t *p_schedule = vlm_ScheduleSearch( p_vlm, psz_name );
- return ExecuteScheduleProperty( p_vlm, p_schedule, VLC_FALSE, i_property, ppsz_property, pp_status );
+ return ExecuteScheduleProperty( p_vlm, p_schedule, false, i_property, ppsz_property, pp_status );
}
else if( ExecuteIsMedia( p_vlm, psz_name ) )
{
int64_t id;
if( vlm_ControlInternal( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) )
goto error;
- return ExecuteMediaProperty( p_vlm, id, VLC_FALSE, i_property, ppsz_property, pp_status );
+ return ExecuteMediaProperty( p_vlm, id, false, i_property, ppsz_property, pp_status );
}
error:
}
p_sched->psz_name = strdup( psz_name );
- p_sched->b_enabled = VLC_FALSE;
+ p_sched->b_enabled = false;
p_sched->i_command = 0;
p_sched->command = NULL;
p_sched->i_date = 0;
{
if( !strcmp( psz_cmd, "enabled" ) )
{
- schedule->b_enabled = VLC_TRUE;
+ schedule->b_enabled = true;
}
else if( !strcmp( psz_cmd, "disabled" ) )
{
- schedule->b_enabled = VLC_FALSE;
+ schedule->b_enabled = false;
}
#if !defined( UNDER_CE )
else if( !strcmp( psz_cmd, "date" ) )
else
i_length += strlen( "new * broadcast " ) + strlen(p_cfg->psz_name);
- if( p_cfg->b_enabled == VLC_TRUE )
+ if( p_cfg->b_enabled == true )
i_length += strlen( "enabled" );
else
i_length += strlen( "disabled" );
- if( !p_cfg->b_vod && p_cfg->broadcast.b_loop == VLC_TRUE )
+ if( !p_cfg->b_vod && p_cfg->broadcast.b_loop == true )
i_length += strlen( " loop\n" );
else
i_length += strlen( "\n" );
i_length += strlen( "new schedule " ) + strlen( schedule->psz_name );
- if( schedule->b_enabled == VLC_TRUE )
+ if( schedule->b_enabled == true )
{
i_length += strlen( "date //-:: enabled\n" ) + 14;
}
localtime_r( &i_time, &date);
p += sprintf( p, "new %s schedule ", schedule->psz_name);
- if( schedule->b_enabled == VLC_TRUE )
+ if( schedule->b_enabled == true )
{
p += sprintf( p, "date %d/%d/%d-%d:%d:%d enabled\n",
date.tm_year + 1900, date.tm_mon + 1, date.tm_mday,
{
mtime_t i_real_date = vlm->schedule[i]->i_date;
- if( vlm->schedule[i]->b_enabled == VLC_TRUE )
+ if( vlm->schedule[i]->b_enabled == true )
{
if( vlm->schedule[i]->i_date == 0 ) // now !
{
struct
{
int i_count;
- vlc_bool_t b_playing;
+ bool b_playing;
int i_playing_index;
} broadcast;
if( p_media->cfg.b_vod )
{
- p_media->cfg.b_enabled = VLC_FALSE;
+ p_media->cfg.b_enabled = false;
vlm_OnMediaUpdate( p_vlm, p_media );
p_vlm->i_vod--;
}
p_instance->p_item = input_ItemNew( p_vlm, NULL, NULL );
p_instance->i_index = 0;
- p_instance->b_sout_keep = VLC_FALSE;
+ p_instance->b_sout_keep = false;
p_instance->p_input = NULL;
p_instance->p_sout = NULL;
for( i = 0; i < p_cfg->i_option; i++ )
{
if( !strcmp( p_cfg->ppsz_option[i], "sout-keep" ) )
- p_instance->b_sout_keep = VLC_TRUE;
+ p_instance->b_sout_keep = true;
else if( !strcmp( p_cfg->ppsz_option[i], "nosout-keep" ) || !strcmp( p_cfg->ppsz_option[i], "no-sout-keep" ) )
- p_instance->b_sout_keep = VLC_FALSE;
+ p_instance->b_sout_keep = false;
else
input_ItemAddOption( p_instance->p_item, p_cfg->ppsz_option[i] );
}
p_idsc->i_length = var_GetTime( p_instance->p_input, "length" );
p_idsc->d_position = var_GetFloat( p_instance->p_input, "position" );
if( var_GetInteger( p_instance->p_input, "state" ) == PAUSE_S )
- p_idsc->b_paused = VLC_TRUE;
+ p_idsc->b_paused = true;
p_idsc->i_rate = var_GetInteger( p_instance->p_input, "rate" );
}
/* "playlist" index */
int i_index;
- vlc_bool_t b_sout_keep;
+ bool b_sout_keep;
input_item_t *p_item;
input_thread_t *p_input;
{
/* names "schedule" is reserved */
char *psz_name;
- vlc_bool_t b_enabled;
+ bool b_enabled;
/* list of commands to execute on date */
int i_command;
char **command;
#define DIALOG_INIT( type ) \
DECMALLOC_ERR( p_new, interaction_dialog_t ); \
memset( p_new, 0, sizeof( interaction_dialog_t ) ); \
- p_new->b_cancelled = VLC_FALSE; \
+ p_new->b_cancelled = false; \
p_new->i_status = NEW_DIALOG; \
p_new->i_flags = 0; \
p_new->i_type = INTERACT_DIALOG_##type; \
* \param psz_format The message to display
* \return VLC_SUCCESS or VLC_EGENERIC
*/
-int __intf_UserFatal( vlc_object_t *p_this, vlc_bool_t b_blocking,
+int __intf_UserFatal( vlc_object_t *p_this, bool b_blocking,
const char *psz_title,
const char *psz_format, ... )
{
* \param i_id Identifier of the dialogue
* \return Either true or false
*/
-vlc_bool_t __intf_UserProgressIsCancelled( vlc_object_t *p_this, int i_id )
+bool __intf_UserProgressIsCancelled( vlc_object_t *p_this, int i_id )
{
interaction_t *p_interaction = InteractionGet( p_this );
interaction_dialog_t *p_dialog;
- vlc_bool_t b_cancel;
+ bool b_cancel;
- if( !p_interaction ) return VLC_TRUE;
+ if( !p_interaction ) return true;
vlc_object_lock( p_interaction );
p_dialog = DialogGetById( p_interaction, i_id );
{
vlc_object_unlock( p_interaction ) ;
vlc_object_release( p_interaction );
- return VLC_TRUE;
+ return true;
}
b_cancel = p_dialog->b_cancelled;
if( vlc_thread_create( p_interaction, "Interaction control",
InteractionLoop, VLC_THREAD_PRIORITY_LOW,
- VLC_FALSE ) )
+ false ) )
{
msg_Err( p_interaction, "Interaction control thread creation failed"
", interaction will not be displayed" );
p_dialog->i_flags & DIALOG_BLOCKING_ERROR ||
p_dialog->i_flags & DIALOG_NONBLOCKING_ERROR )
{
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
int i;
p_dialog->p_interaction = p_interaction;
p_dialog->p_parent = p_this;
for( i = 0 ; i< p_interaction->i_dialogs; i++ )
{
if( p_interaction->pp_dialogs[i]->i_id == p_dialog->i_id )
- b_found = VLC_TRUE;
+ b_found = true;
}
/* Add it to the queue, the main loop will send the orders to the
* interface */
p_intf->pf_request_window = NULL;
p_intf->pf_release_window = NULL;
p_intf->pf_control_window = NULL;
- p_intf->b_play = VLC_FALSE;
- p_intf->b_interaction = VLC_FALSE;
- p_intf->b_should_run_on_first_thread = VLC_FALSE;
+ p_intf->b_play = false;
+ p_intf->b_interaction = false;
+ p_intf->b_should_run_on_first_thread = false;
for( i = 0 ; i< i_options; i++ )
var_OptionParse( p_this, ppsz_options[i], true );
/* Choose the best module */
p_intf->psz_intf = strdup( psz_module );
- p_intf->p_module = module_Need( p_intf, "interface", psz_module, VLC_FALSE );
+ p_intf->p_module = module_Need( p_intf, "interface", psz_module, false );
if( p_intf->p_module == NULL )
{
}
/* Initialize structure */
- p_intf->b_menu = VLC_FALSE;
- p_intf->b_menu_change = VLC_FALSE;
+ p_intf->b_menu = false;
+ p_intf->b_menu_change = false;
/* Initialize mutexes */
vlc_mutex_init( p_intf, &p_intf->change_lock );
/* Run the interface in a separate thread */
if( vlc_thread_create( p_intf, "interface", RunInterface,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Err( p_intf, "cannot spawn interface thread" );
return VLC_EGENERIC;
p_intf->pf_run( p_intf );
/* Reset play on start status */
- p_intf->b_play = VLC_FALSE;
+ p_intf->b_play = false;
if( !p_intf->psz_switch_intf )
{
p_intf->psz_switch_intf = NULL;
vlc_mutex_lock( &p_intf->object_lock );
- p_intf->b_die = VLC_FALSE; /* FIXME */
- p_intf->b_dead = VLC_FALSE;
+ p_intf->b_die = false; /* FIXME */
+ p_intf->b_dead = false;
vlc_mutex_unlock( &p_intf->object_lock );
static int GetFilenames ( libvlc_int_t *, int, const char *[] );
static void Help ( libvlc_int_t *, char const *psz_help_name );
static void Usage ( libvlc_int_t *, char const *psz_module_name );
-static void ListModules ( libvlc_int_t *, vlc_bool_t );
+static void ListModules ( libvlc_int_t *, bool );
static void Version ( void );
#ifdef WIN32
-static void ShowConsole ( vlc_bool_t );
+static void ShowConsole ( bool );
static void PauseConsole ( void );
#endif
static int ConsoleWidth ( void );
/* The module bank will be initialized later */
p_libvlc_global->p_module_bank = NULL;
- p_libvlc_global->b_ready = VLC_TRUE;
+ p_libvlc_global->b_ready = true;
}
vlc_mutex_unlock( lock );
#if defined( HAVE_ISATTY ) && !defined( WIN32 )
p_libvlc->b_color = isatty( 2 ); /* 2 is for stderr */
#else
- p_libvlc->b_color = VLC_FALSE;
+ p_libvlc->b_color = false;
#endif
/* Announce who we are - Do it only for first instance ? */
char * psz_modules = NULL;
char * psz_parser = NULL;
char * psz_control = NULL;
- vlc_bool_t b_exit = VLC_FALSE;
+ bool b_exit = false;
int i_ret = VLC_EEXIT;
playlist_t *p_playlist = NULL;
vlc_value_t val;
* options) */
module_InitBank( p_libvlc );
- if( config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ) )
+ if( config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true ) )
{
module_EndBank( p_libvlc );
return VLC_EGENERIC;
if( config_GetInt( p_libvlc, "help" ) > 0 )
{
Help( p_libvlc, "help" );
- b_exit = VLC_TRUE;
+ b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
/* Check for version option */
else if( config_GetInt( p_libvlc, "version" ) > 0 )
{
Version();
- b_exit = VLC_TRUE;
+ b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
/* Check for plugins cache options */
if( config_GetInt( p_libvlc, "reset-plugins-cache" ) > 0 )
{
- p_libvlc_global->p_module_bank->b_cache_delete = VLC_TRUE;
+ p_libvlc_global->p_module_bank->b_cache_delete = true;
}
/* Will be re-done properly later on */
if( daemon( 1, 0) != 0 )
{
msg_Err( p_libvlc, "Unable to fork vlc to daemon mode" );
- b_exit = VLC_TRUE;
+ b_exit = true;
}
- p_libvlc_global->b_daemon = VLC_TRUE;
+ p_libvlc_global->b_daemon = true;
/* lets check if we need to write the pidfile */
psz_pidfile = config_GetPsz( p_libvlc, "pidfile" );
if( ( i_pid = fork() ) < 0 )
{
msg_Err( p_libvlc, "unable to fork vlc to daemon mode" );
- b_exit = VLC_TRUE;
+ b_exit = true;
}
else if( i_pid )
{
/* This is the parent, exit right now */
msg_Dbg( p_libvlc, "closing parent process" );
- b_exit = VLC_TRUE;
+ b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
else
close( STDOUT_FILENO );
close( STDERR_FILENO );
- p_libvlc_global->b_daemon = VLC_TRUE;
+ p_libvlc_global->b_daemon = true;
}
#endif
}
if( !config_GetInt( p_libvlc, "ignore-config" ) )
config_LoadConfigFile( p_libvlc, "main" );
- config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE );
+ config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true );
/* Check if the user specified a custom language */
psz_language = config_GetPsz( p_libvlc, "language" );
if( psz_language && *psz_language && strcmp( psz_language, "auto" ) )
{
- vlc_bool_t b_cache_delete = p_libvlc_global->p_module_bank->b_cache_delete;
+ bool b_cache_delete = p_libvlc_global->p_module_bank->b_cache_delete;
/* Reset the default domain */
SetLanguage( psz_language );
module_InitBank( p_libvlc );
if( !config_GetInt( p_libvlc, "ignore-config" ) )
config_LoadConfigFile( p_libvlc, "main" );
- config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE );
+ config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true );
p_libvlc_global->p_module_bank->b_cache_delete = b_cache_delete;
}
free( psz_language );
module_LoadPlugins( p_libvlc );
if( p_libvlc->b_die )
{
- b_exit = VLC_TRUE;
+ b_exit = true;
}
msg_Dbg( p_libvlc, "module bank initialized, found %i modules",
{
Help( p_libvlc, p_tmp );
free( p_tmp );
- b_exit = VLC_TRUE;
+ b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
/* Check for long help option */
else if( config_GetInt( p_libvlc, "longhelp" ) > 0 )
{
Help( p_libvlc, "longhelp" );
- b_exit = VLC_TRUE;
+ b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
/* Check for module list option */
else if( config_GetInt( p_libvlc, "list" ) > 0 )
{
- ListModules( p_libvlc, VLC_FALSE );
- b_exit = VLC_TRUE;
+ ListModules( p_libvlc, false );
+ b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
else if( config_GetInt( p_libvlc, "list-verbose" ) > 0 )
{
- ListModules( p_libvlc, VLC_TRUE );
- b_exit = VLC_TRUE;
+ ListModules( p_libvlc, true );
+ b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
if( config_GetInt( p_libvlc, "reset-config" ) > 0 )
{
config_ResetAll( p_libvlc );
- config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE );
+ config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true );
config_SaveConfigFile( p_libvlc, NULL );
}
if( config_GetInt( p_libvlc, "save-config" ) > 0 )
{
config_LoadConfigFile( p_libvlc, NULL );
- config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE );
+ config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true );
config_SaveConfigFile( p_libvlc, NULL );
}
}
/*
* Override configuration with command line settings
*/
- if( config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_FALSE ) )
+ if( config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, false ) )
{
#ifdef WIN32
- ShowConsole( VLC_FALSE );
+ ShowConsole( false );
/* Pause the console because it's destroyed when we exit */
fprintf( stderr, "The command line options couldn't be loaded, check "
"that they are valid.\n" );
if( psz_temp )
{
sprintf( psz_temp, "%s,none", psz_module );
- VLC_AddIntf( 0, psz_temp, VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, psz_temp, false, false );
free( psz_temp );
}
}
/*
* Always load the hotkeys interface if it exists
*/
- VLC_AddIntf( 0, "hotkeys,none", VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, "hotkeys,none", false, false );
#ifdef HAVE_DBUS_3
/* loads dbus control interface if in one-instance mode
* we do it only when playlist exists, because dbus module needs it */
if( config_GetInt( p_libvlc, "one-instance" ) > 0 )
- VLC_AddIntf( 0, "dbus,none", VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, "dbus,none", false, false );
/* Prevents the power management daemon to suspend the computer
* when VLC is active */
if( config_GetInt( p_libvlc, "inhibit" ) > 0 )
- VLC_AddIntf( 0, "inhibit,none", VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, "inhibit,none", false, false );
#endif
/*
#ifdef HAVE_X11_XLIB_H
if( config_GetInt( p_libvlc, "disable-screensaver" ) )
{
- VLC_AddIntf( 0, "screensaver,none", VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, "screensaver,none", false, false );
}
#endif
if( config_GetInt( p_libvlc, "file-logging" ) > 0 )
{
- VLC_AddIntf( 0, "logger,none", VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, "logger,none", false, false );
}
#ifdef HAVE_SYSLOG_H
if( config_GetInt( p_libvlc, "syslog" ) > 0 )
{
const char *psz_logmode = "logmode=syslog";
- libvlc_InternalAddIntf( p_libvlc, "logger,none", VLC_FALSE, VLC_FALSE,
+ libvlc_InternalAddIntf( p_libvlc, "logger,none", false, false,
1, &psz_logmode );
}
#endif
if( config_GetInt( p_libvlc, "show-intf" ) > 0 )
{
- VLC_AddIntf( 0, "showintf,none", VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, "showintf,none", false, false );
}
if( config_GetInt( p_libvlc, "network-synchronisation") > 0 )
{
- VLC_AddIntf( 0, "netsync,none", VLC_FALSE, VLC_FALSE );
+ VLC_AddIntf( 0, "netsync,none", false, false );
}
#ifdef WIN32
announce_HandlerDestroy( p_announce );
}
- vlc_bool_t b_clean = VLC_TRUE;
+ bool b_clean = true;
FOREACH_ARRAY( input_item_t *p_del, p_libvlc->input_items )
msg_Err( p_libvlc, "input item %p has not been deleted properly: refcount %d, name %s",
p_del, p_del->i_gc_refcount, p_del->psz_name ? p_del->psz_name : "(null)" );
- b_clean = VLC_FALSE;
+ b_clean = false;
FOREACH_END();
assert( b_clean );
ARRAY_RESET( p_libvlc->input_items );
* \param p_libvlc the instance to destroy
* \param b_release whether we should do a release on the instance
*/
-int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, vlc_bool_t b_release )
+int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
{
if( !p_libvlc )
return VLC_EGENERIC;
*/
int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
char const *psz_module,
- vlc_bool_t b_block, vlc_bool_t b_play,
+ bool b_block, bool b_play,
int i_options, const char *const *ppsz_options )
{
int i_err;
static void Help( libvlc_int_t *p_this, char const *psz_help_name )
{
#ifdef WIN32
- ShowConsole( VLC_TRUE );
+ ShowConsole( true );
#endif
if( psz_help_name && !strcmp( psz_help_name, "help" ) )
int i_index;
int i_width = ConsoleWidth() - (PADDING_SPACES+LINE_START+1);
int i_width_description = i_width + PADDING_SPACES - 1;
- vlc_bool_t b_advanced = config_GetInt( p_this, "advanced" ) > 0;
- vlc_bool_t b_description = config_GetInt( p_this, "help-verbose" ) > 0;
- vlc_bool_t b_description_hack;
- vlc_bool_t b_color = config_GetInt( p_this, "color" ) > 0;
- vlc_bool_t b_has_advanced = VLC_FALSE;
+ bool b_advanced = config_GetInt( p_this, "advanced" ) > 0;
+ bool b_description = config_GetInt( p_this, "help-verbose" ) > 0;
+ bool b_description_hack;
+ bool b_color = config_GetInt( p_this, "color" ) > 0;
+ bool b_has_advanced = false;
memset( psz_spaces_text, ' ', PADDING_SPACES+LINE_START );
psz_spaces_text[PADDING_SPACES+LINE_START] = '\0';
memset( psz_spaces_longtext, ' ', LINE_START+2 );
psz_spaces_longtext[LINE_START+2] = '\0';
#ifdef WIN32
- b_color = VLC_FALSE; // don't put color control codes in a .txt file
+ b_color = false; // don't put color control codes in a .txt file
#endif
if( b_color )
/* Enumerate the config for each module */
for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- vlc_bool_t b_help_module;
+ bool b_help_module;
module_t *p_parser = (module_t *)p_list->p_values[i_index].p_object;
module_config_t *p_item = NULL;
module_config_t *p_end = p_parser->p_config + p_parser->confsize;
/* Skip advanced options if requested */
if( p_item->b_advanced && !b_advanced )
{
- b_has_advanced = VLC_TRUE;
+ b_has_advanced = true;
continue;
}
if( b_description_hack && p_item->psz_longtext )
{
sprintf( psz_buffer, "%s%s", p_item->psz_longtext, psz_suf );
- b_description_hack = VLC_FALSE;
+ b_description_hack = false;
psz_spaces = psz_spaces_longtext;
utf8_fprintf( stdout, "%s", psz_spaces );
goto description;
* Print a list of all available modules (builtins and plugins) and a short
* description for each one.
*****************************************************************************/
-static void ListModules( libvlc_int_t *p_this, vlc_bool_t b_verbose )
+static void ListModules( libvlc_int_t *p_this, bool b_verbose )
{
vlc_list_t *p_list = NULL;
module_t *p_parser = NULL;
char psz_spaces[22];
int i_index;
- vlc_bool_t b_color = config_GetInt( p_this, "color" ) > 0;
+ bool b_color = config_GetInt( p_this, "color" ) > 0;
memset( psz_spaces, ' ', 22 );
#ifdef WIN32
- ShowConsole( VLC_TRUE );
+ ShowConsole( true );
#endif
/* List all modules */
static void Version( void )
{
#ifdef WIN32
- ShowConsole( VLC_TRUE );
+ ShowConsole( true );
#endif
utf8_fprintf( stdout, _("VLC version %s\n"), VLC_Version() );
* This function is useful only on Win32.
*****************************************************************************/
#ifdef WIN32 /* */
-static void ShowConsole( vlc_bool_t b_dofile )
+static void ShowConsole( bool b_dofile )
{
# ifndef UNDER_CE
FILE *f_help = NULL;
/* Audio options */
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_GENERAL );
- add_category_hint( N_("Audio"), AOUT_CAT_LONGTEXT , VLC_FALSE );
+ add_category_hint( N_("Audio"), AOUT_CAT_LONGTEXT , false );
- add_bool( "audio", 1, NULL, AUDIO_TEXT, AUDIO_LONGTEXT, VLC_FALSE );
+ add_bool( "audio", 1, NULL, AUDIO_TEXT, AUDIO_LONGTEXT, false );
add_integer_with_range( "volume", AOUT_VOLUME_DEFAULT, AOUT_VOLUME_MIN,
AOUT_VOLUME_MAX, NULL, VOLUME_TEXT,
- VOLUME_LONGTEXT, VLC_FALSE );
+ VOLUME_LONGTEXT, false );
add_integer_with_range( "volume-step", AOUT_VOLUME_STEP, AOUT_VOLUME_MIN,
AOUT_VOLUME_MAX, NULL, VOLUME_STEP_TEXT,
- VOLUME_STEP_LONGTEXT, VLC_TRUE );
+ VOLUME_STEP_LONGTEXT, true );
add_integer( "aout-rate", -1, NULL, AOUT_RATE_TEXT,
- AOUT_RATE_LONGTEXT, VLC_TRUE );
+ AOUT_RATE_LONGTEXT, true );
#if !defined( __APPLE__ )
add_bool( "hq-resampling", 1, NULL, AOUT_RESAMP_TEXT,
- AOUT_RESAMP_LONGTEXT, VLC_TRUE );
+ AOUT_RESAMP_LONGTEXT, true );
#endif
- add_bool( "spdif", 0, NULL, SPDIF_TEXT, SPDIF_LONGTEXT, VLC_FALSE );
+ add_bool( "spdif", 0, NULL, SPDIF_TEXT, SPDIF_LONGTEXT, false );
add_integer( "force-dolby-surround", 0, NULL, FORCE_DOLBY_TEXT,
- FORCE_DOLBY_LONGTEXT, VLC_FALSE );
+ FORCE_DOLBY_LONGTEXT, false );
change_integer_list( pi_force_dolby_values, ppsz_force_dolby_descriptions, 0 );
add_integer( "audio-desync", 0, NULL, DESYNC_TEXT,
- DESYNC_LONGTEXT, VLC_TRUE );
+ DESYNC_LONGTEXT, true );
/* FIXME TODO create a subcat replay gain ? */
add_string( "audio-replay-gain-mode", ppsz_replay_gain_mode[0], NULL, AUDIO_REPLAY_GAIN_MODE_TEXT,
- AUDIO_REPLAY_GAIN_MODE_LONGTEXT, VLC_FALSE );
+ AUDIO_REPLAY_GAIN_MODE_LONGTEXT, false );
change_string_list( ppsz_replay_gain_mode, ppsz_replay_gain_mode_text, 0 );
add_float( "audio-replay-gain-preamp", 0.0, NULL,
- AUDIO_REPLAY_GAIN_PREAMP_TEXT, AUDIO_REPLAY_GAIN_PREAMP_LONGTEXT, VLC_FALSE );
+ AUDIO_REPLAY_GAIN_PREAMP_TEXT, AUDIO_REPLAY_GAIN_PREAMP_LONGTEXT, false );
add_float( "audio-replay-gain-default", -7.0, NULL,
- AUDIO_REPLAY_GAIN_DEFAULT_TEXT, AUDIO_REPLAY_GAIN_DEFAULT_LONGTEXT, VLC_FALSE );
- add_bool( "audio-replay-gain-peak-protection", VLC_TRUE, NULL,
- AUDIO_REPLAY_GAIN_PEAK_PROTECTION_TEXT, AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT, VLC_TRUE );
+ AUDIO_REPLAY_GAIN_DEFAULT_TEXT, AUDIO_REPLAY_GAIN_DEFAULT_LONGTEXT, false );
+ add_bool( "audio-replay-gain-peak-protection", true, NULL,
+ AUDIO_REPLAY_GAIN_PEAK_PROTECTION_TEXT, AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT, true );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_module( "aout", "audio output", NULL, NULL, AOUT_TEXT, AOUT_LONGTEXT,
- VLC_TRUE );
+ true );
change_short('A');
set_subcategory( SUBCAT_AUDIO_AFILTER );
add_module_list_cat( "audio-filter", SUBCAT_AUDIO_AFILTER, 0,
NULL, AUDIO_FILTER_TEXT,
- AUDIO_FILTER_LONGTEXT, VLC_FALSE );
+ AUDIO_FILTER_LONGTEXT, false );
set_subcategory( SUBCAT_AUDIO_VISUAL );
add_module( "audio-visual", "visualization",NULL, NULL,AUDIO_VISUAL_TEXT,
- AUDIO_VISUAL_LONGTEXT, VLC_FALSE );
+ AUDIO_VISUAL_LONGTEXT, false );
/* Video options */
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_GENERAL );
- add_category_hint( N_("Video"), VOUT_CAT_LONGTEXT , VLC_FALSE );
+ add_category_hint( N_("Video"), VOUT_CAT_LONGTEXT , false );
- add_bool( "video", 1, NULL, VIDEO_TEXT, VIDEO_LONGTEXT, VLC_TRUE );
+ add_bool( "video", 1, NULL, VIDEO_TEXT, VIDEO_LONGTEXT, true );
add_bool( "grayscale", 0, NULL, GRAYSCALE_TEXT,
- GRAYSCALE_LONGTEXT, VLC_TRUE );
+ GRAYSCALE_LONGTEXT, true );
add_bool( "fullscreen", 0, NULL, FULLSCREEN_TEXT,
- FULLSCREEN_LONGTEXT, VLC_FALSE );
+ FULLSCREEN_LONGTEXT, false );
change_short('f');
add_bool( "embedded-video", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
- VLC_TRUE );
+ true );
#ifdef __APPLE__
add_deprecated_alias( "macosx-embedded" ); /*deprecated since 0.9.0 */
#endif
add_bool( "drop-late-frames", 1, NULL, DROP_LATE_FRAMES_TEXT,
- DROP_LATE_FRAMES_LONGTEXT, VLC_TRUE );
+ DROP_LATE_FRAMES_LONGTEXT, true );
/* Used in vout_synchro */
add_bool( "skip-frames", 1, NULL, SKIP_FRAMES_TEXT,
- SKIP_FRAMES_LONGTEXT, VLC_TRUE );
+ SKIP_FRAMES_LONGTEXT, true );
add_bool( "quiet-synchro", 0, NULL, QUIET_SYNCHRO_TEXT,
- QUIET_SYNCHRO_LONGTEXT, VLC_TRUE );
+ QUIET_SYNCHRO_LONGTEXT, true );
#ifndef __APPLE__
- add_bool( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT, VLC_FALSE );
+ add_bool( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT, false );
#endif
add_bool( "video-on-top", 0, NULL, VIDEO_ON_TOP_TEXT,
- VIDEO_ON_TOP_LONGTEXT, VLC_FALSE );
- add_bool( "disable-screensaver", VLC_TRUE, NULL, SS_TEXT, SS_LONGTEXT,
- VLC_TRUE );
+ VIDEO_ON_TOP_LONGTEXT, false );
+ add_bool( "disable-screensaver", true, NULL, SS_TEXT, SS_LONGTEXT,
+ true );
add_bool( "video-title-show", 1, NULL, VIDEO_TITLE_SHOW_TEXT,
- VIDEO_TITLE_SHOW_LONGTEXT, VLC_FALSE );
+ VIDEO_TITLE_SHOW_LONGTEXT, false );
add_integer( "video-title-timeout", 5000, NULL, VIDEO_TITLE_TIMEOUT_TEXT,
- VIDEO_TITLE_TIMEOUT_LONGTEXT, VLC_FALSE );
+ VIDEO_TITLE_TIMEOUT_LONGTEXT, false );
add_integer( "video-title-position", 8, NULL, VIDEO_TITLE_POSITION_TEXT,
- VIDEO_TITLE_POSITION_LONGTEXT, VLC_FALSE );
+ VIDEO_TITLE_POSITION_LONGTEXT, false );
// autohide after 3s
add_integer( "mouse-hide-timeout", 3000, NULL, MOUSE_HIDE_TIMEOUT_TEXT,
- MOUSE_HIDE_TIMEOUT_LONGTEXT, VLC_FALSE );
+ MOUSE_HIDE_TIMEOUT_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
set_section( N_("Snapshot") , NULL );
add_directory( "snapshot-path", NULL, NULL, SNAP_PATH_TEXT,
- SNAP_PATH_LONGTEXT, VLC_FALSE );
+ SNAP_PATH_LONGTEXT, false );
change_unsafe();
add_string( "snapshot-prefix", "vlcsnap-", NULL, SNAP_PREFIX_TEXT,
- SNAP_PREFIX_LONGTEXT, VLC_FALSE );
+ SNAP_PREFIX_LONGTEXT, false );
add_string( "snapshot-format", "png", NULL, SNAP_FORMAT_TEXT,
- SNAP_FORMAT_LONGTEXT, VLC_FALSE );
+ SNAP_FORMAT_LONGTEXT, false );
change_string_list( ppsz_snap_formats, NULL, 0 );
- add_bool( "snapshot-preview", VLC_TRUE, NULL, SNAP_PREVIEW_TEXT,
- SNAP_PREVIEW_LONGTEXT, VLC_FALSE );
- add_bool( "snapshot-sequential", VLC_FALSE, NULL, SNAP_SEQUENTIAL_TEXT,
- SNAP_SEQUENTIAL_LONGTEXT, VLC_FALSE );
+ add_bool( "snapshot-preview", true, NULL, SNAP_PREVIEW_TEXT,
+ SNAP_PREVIEW_LONGTEXT, false );
+ add_bool( "snapshot-sequential", false, NULL, SNAP_SEQUENTIAL_TEXT,
+ SNAP_SEQUENTIAL_LONGTEXT, false );
add_integer( "snapshot-width", -1, NULL, SNAP_WIDTH_TEXT,
- SNAP_WIDTH_LONGTEXT, VLC_TRUE );
+ SNAP_WIDTH_LONGTEXT, true );
add_integer( "snapshot-height", -1, NULL, SNAP_HEIGHT_TEXT,
- SNAP_HEIGHT_LONGTEXT, VLC_TRUE );
+ SNAP_HEIGHT_LONGTEXT, true );
set_section( N_("Window properties" ), NULL );
- add_integer( "width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE );
- add_integer( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE );
- add_integer( "video-x", -1, NULL, VIDEOX_TEXT, VIDEOX_LONGTEXT, VLC_TRUE );
- add_integer( "video-y", -1, NULL, VIDEOY_TEXT, VIDEOY_LONGTEXT, VLC_TRUE );
- add_string( "crop", NULL, NULL, CROP_TEXT, CROP_LONGTEXT, VLC_FALSE );
+ add_integer( "width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, true );
+ add_integer( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, true );
+ add_integer( "video-x", -1, NULL, VIDEOX_TEXT, VIDEOX_LONGTEXT, true );
+ add_integer( "video-y", -1, NULL, VIDEOY_TEXT, VIDEOY_LONGTEXT, true );
+ add_string( "crop", NULL, NULL, CROP_TEXT, CROP_LONGTEXT, false );
add_string( "custom-crop-ratios", NULL, NULL, CUSTOM_CROP_RATIOS_TEXT,
- CUSTOM_CROP_RATIOS_LONGTEXT, VLC_FALSE );
+ CUSTOM_CROP_RATIOS_LONGTEXT, false );
add_string( "aspect-ratio", NULL, NULL,
- ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, VLC_FALSE );
+ ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, false );
add_string( "monitor-par", NULL, NULL,
- MASPECT_RATIO_TEXT, MASPECT_RATIO_LONGTEXT, VLC_TRUE );
+ MASPECT_RATIO_TEXT, MASPECT_RATIO_LONGTEXT, true );
add_string( "custom-aspect-ratios", NULL, NULL, CUSTOM_ASPECT_RATIOS_TEXT,
- CUSTOM_ASPECT_RATIOS_LONGTEXT, VLC_FALSE );
- add_bool( "hdtv-fix", 1, NULL, HDTV_FIX_TEXT, HDTV_FIX_LONGTEXT, VLC_TRUE );
+ CUSTOM_ASPECT_RATIOS_LONGTEXT, false );
+ add_bool( "hdtv-fix", 1, NULL, HDTV_FIX_TEXT, HDTV_FIX_LONGTEXT, true );
add_bool( "video-deco", 1, NULL, VIDEO_DECO_TEXT,
- VIDEO_DECO_LONGTEXT, VLC_TRUE );
+ VIDEO_DECO_LONGTEXT, true );
add_string( "video-title", NULL, NULL, VIDEO_TITLE_TEXT,
- VIDEO_TITLE_LONGTEXT, VLC_TRUE );
- add_integer( "align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT, VLC_TRUE );
+ VIDEO_TITLE_LONGTEXT, true );
+ add_integer( "align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT, true );
change_integer_list( pi_align_values, ppsz_align_descriptions, 0 );
- add_float( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT, VLC_TRUE );
+ add_float( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT, true );
set_subcategory( SUBCAT_VIDEO_VOUT );
add_module( "vout", "video output", NULL, NULL, VOUT_TEXT, VOUT_LONGTEXT,
- VLC_TRUE );
+ true );
change_short('V');
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_module_list_cat( "video-filter", SUBCAT_VIDEO_VFILTER, NULL, NULL,
- VIDEO_FILTER_TEXT, VIDEO_FILTER_LONGTEXT, VLC_FALSE );
+ VIDEO_FILTER_TEXT, VIDEO_FILTER_LONGTEXT, false );
add_deprecated_alias( "filter" ); /*deprecated since 0.8.2 */
// add_deprecated_alias( "vout-filter" ); /* deprecated since 0.8.6 *// While the "video-filter" chain isn't parsed for both vfilter and vfilter2, keep both options
add_module_list_cat( "vout-filter", SUBCAT_VIDEO_VFILTER, NULL, NULL,
- NULL, NULL, VLC_FALSE );
+ NULL, NULL, false );
#if 0
add_string( "pixel-ratio", "1", NULL, PIXEL_RATIO_TEXT, PIXEL_RATIO_TEXT );
#endif
/* Subpictures options */
set_subcategory( SUBCAT_VIDEO_SUBPIC );
set_section( N_("On Screen Display") , NULL );
- add_category_hint( N_("Subpictures"), SUB_CAT_LONGTEXT , VLC_FALSE );
+ add_category_hint( N_("Subpictures"), SUB_CAT_LONGTEXT , false );
- add_bool( "spu", 1, NULL, SPU_TEXT, SPU_LONGTEXT, VLC_TRUE );
- add_bool( "osd", 1, NULL, OSD_TEXT, OSD_LONGTEXT, VLC_FALSE );
+ add_bool( "spu", 1, NULL, SPU_TEXT, SPU_LONGTEXT, true );
+ add_bool( "osd", 1, NULL, OSD_TEXT, OSD_LONGTEXT, false );
add_module( "text-renderer", "text renderer", NULL, NULL, TEXTRENDERER_TEXT,
- TEXTRENDERER_LONGTEXT, VLC_TRUE );
+ TEXTRENDERER_LONGTEXT, true );
set_section( N_("Subtitles") , NULL );
add_file( "sub-file", NULL, NULL, SUB_FILE_TEXT,
- SUB_FILE_LONGTEXT, VLC_FALSE );
- add_bool( "sub-autodetect-file", VLC_TRUE, NULL,
- SUB_AUTO_TEXT, SUB_AUTO_LONGTEXT, VLC_FALSE );
+ SUB_FILE_LONGTEXT, false );
+ add_bool( "sub-autodetect-file", true, NULL,
+ SUB_AUTO_TEXT, SUB_AUTO_LONGTEXT, false );
add_integer( "sub-autodetect-fuzzy", 3, NULL,
- SUB_FUZZY_TEXT, SUB_FUZZY_LONGTEXT, VLC_TRUE );
+ SUB_FUZZY_TEXT, SUB_FUZZY_LONGTEXT, true );
#ifdef WIN32
# define SUB_PATH ".\\subtitles"
#else
# define SUB_PATH "./Subtitles, ./subtitles"
#endif
add_string( "sub-autodetect-path", SUB_PATH, NULL,
- SUB_PATH_TEXT, SUB_PATH_LONGTEXT, VLC_TRUE );
+ SUB_PATH_TEXT, SUB_PATH_LONGTEXT, true );
add_integer( "sub-margin", 0, NULL, SUB_MARGIN_TEXT,
- SUB_MARGIN_LONGTEXT, VLC_TRUE );
+ SUB_MARGIN_LONGTEXT, true );
add_deprecated_alias( "spu-margin" ); /*Deprecated since 0.8.2 */
set_section( N_( "Overlays" ) , NULL );
add_module_list_cat( "sub-filter", SUBCAT_VIDEO_SUBPIC, NULL, NULL,
- SUB_FILTER_TEXT, SUB_FILTER_LONGTEXT, VLC_FALSE );
+ SUB_FILTER_TEXT, SUB_FILTER_LONGTEXT, false );
/* Input options */
set_category( CAT_INPUT );
set_section( N_( "Track settings" ), NULL );
add_integer( "program", 0, NULL,
- INPUT_PROGRAM_TEXT, INPUT_PROGRAM_LONGTEXT, VLC_TRUE );
+ INPUT_PROGRAM_TEXT, INPUT_PROGRAM_LONGTEXT, true );
add_string( "programs", "", NULL,
- INPUT_PROGRAMS_TEXT, INPUT_PROGRAMS_LONGTEXT, VLC_TRUE );
+ INPUT_PROGRAMS_TEXT, INPUT_PROGRAMS_LONGTEXT, true );
add_integer( "audio-track", -1, NULL,
- INPUT_AUDIOTRACK_TEXT, INPUT_AUDIOTRACK_LONGTEXT, VLC_TRUE );
+ INPUT_AUDIOTRACK_TEXT, INPUT_AUDIOTRACK_LONGTEXT, true );
add_deprecated_alias( "audio-channel" ); /*deprecated since 0.8.2 */
add_integer( "sub-track", -1, NULL,
- INPUT_SUBTRACK_TEXT, INPUT_SUBTRACK_LONGTEXT, VLC_TRUE );
+ INPUT_SUBTRACK_TEXT, INPUT_SUBTRACK_LONGTEXT, true );
add_deprecated_alias("spu-channel" ); /*deprecated since 0.8.2*/
add_string( "audio-language", "", NULL,
INPUT_AUDIOTRACK_LANG_TEXT, INPUT_AUDIOTRACK_LANG_LONGTEXT,
- VLC_FALSE );
+ false );
add_string( "sub-language", "", NULL,
INPUT_SUBTRACK_LANG_TEXT, INPUT_SUBTRACK_LANG_LONGTEXT,
- VLC_FALSE );
+ false );
add_integer( "audio-track-id", -1, NULL, INPUT_AUDIOTRACK_ID_TEXT,
- INPUT_AUDIOTRACK_ID_LONGTEXT, VLC_TRUE );
+ INPUT_AUDIOTRACK_ID_LONGTEXT, true );
add_integer( "sub-track-id", -1, NULL,
- INPUT_SUBTRACK_ID_TEXT, INPUT_SUBTRACK_ID_LONGTEXT, VLC_TRUE );
+ INPUT_SUBTRACK_ID_TEXT, INPUT_SUBTRACK_ID_LONGTEXT, true );
set_section( N_( "Playback control" ) , NULL);
add_integer( "input-repeat", 0, NULL,
- INPUT_REPEAT_TEXT, INPUT_REPEAT_LONGTEXT, VLC_FALSE );
+ INPUT_REPEAT_TEXT, INPUT_REPEAT_LONGTEXT, false );
add_integer( "start-time", 0, NULL,
- START_TIME_TEXT, START_TIME_LONGTEXT, VLC_TRUE );
+ START_TIME_TEXT, START_TIME_LONGTEXT, true );
add_integer( "stop-time", 0, NULL,
- STOP_TIME_TEXT, STOP_TIME_LONGTEXT, VLC_TRUE );
+ STOP_TIME_TEXT, STOP_TIME_LONGTEXT, true );
add_integer( "run-time", 0, NULL,
- RUN_TIME_TEXT, RUN_TIME_LONGTEXT, VLC_TRUE );
+ RUN_TIME_TEXT, RUN_TIME_LONGTEXT, true );
add_string( "input-list", NULL, NULL,
- INPUT_LIST_TEXT, INPUT_LIST_LONGTEXT, VLC_TRUE );
+ INPUT_LIST_TEXT, INPUT_LIST_LONGTEXT, true );
add_string( "input-slave", NULL, NULL,
- INPUT_SLAVE_TEXT, INPUT_SLAVE_LONGTEXT, VLC_TRUE );
+ INPUT_SLAVE_TEXT, INPUT_SLAVE_LONGTEXT, true );
add_string( "bookmarks", NULL, NULL,
- BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_TRUE );
+ BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, true );
set_section( N_( "Default devices") , NULL );
add_file( "dvd", DVD_DEVICE, NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT,
- VLC_FALSE );
+ false );
add_file( "vcd", VCD_DEVICE, NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT,
- VLC_FALSE );
+ false );
add_file( "cd-audio", CDAUDIO_DEVICE, NULL, CDAUDIO_DEV_TEXT,
- CDAUDIO_DEV_LONGTEXT, VLC_FALSE );
+ CDAUDIO_DEV_LONGTEXT, false );
set_section( N_( "Network settings" ), NULL );
add_integer( "server-port", 1234, NULL,
- SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT, VLC_FALSE );
- add_integer( "mtu", MTU_DEFAULT, NULL, MTU_TEXT, MTU_LONGTEXT, VLC_TRUE );
- add_bool( "ipv6", 0, NULL, IPV6_TEXT, IPV6_LONGTEXT, VLC_FALSE );
+ SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT, false );
+ add_integer( "mtu", MTU_DEFAULT, NULL, MTU_TEXT, MTU_LONGTEXT, true );
+ add_bool( "ipv6", 0, NULL, IPV6_TEXT, IPV6_LONGTEXT, false );
change_short('6');
- add_bool( "ipv4", 0, NULL, IPV4_TEXT, IPV4_LONGTEXT, VLC_FALSE );
+ add_bool( "ipv4", 0, NULL, IPV4_TEXT, IPV4_LONGTEXT, false );
change_short('4');
add_integer( "ipv4-timeout", 5 * 1000, NULL, TIMEOUT_TEXT,
- TIMEOUT_LONGTEXT, VLC_TRUE );
+ TIMEOUT_LONGTEXT, true );
set_section( N_( "Socks proxy") , NULL );
add_string( "socks", NULL, NULL,
- SOCKS_SERVER_TEXT, SOCKS_SERVER_LONGTEXT, VLC_TRUE );
+ SOCKS_SERVER_TEXT, SOCKS_SERVER_LONGTEXT, true );
add_string( "socks-user", NULL, NULL,
- SOCKS_USER_TEXT, SOCKS_USER_LONGTEXT, VLC_TRUE );
+ SOCKS_USER_TEXT, SOCKS_USER_LONGTEXT, true );
add_string( "socks-pwd", NULL, NULL,
- SOCKS_PASS_TEXT, SOCKS_PASS_LONGTEXT, VLC_TRUE );
+ SOCKS_PASS_TEXT, SOCKS_PASS_LONGTEXT, true );
set_section( N_("Metadata" ) , NULL );
add_string( "meta-title", NULL, NULL, META_TITLE_TEXT,
- META_TITLE_LONGTEXT, VLC_TRUE );
+ META_TITLE_LONGTEXT, true );
add_string( "meta-author", NULL, NULL, META_AUTHOR_TEXT,
- META_AUTHOR_LONGTEXT, VLC_TRUE );
+ META_AUTHOR_LONGTEXT, true );
add_string( "meta-artist", NULL, NULL, META_ARTIST_TEXT,
- META_ARTIST_LONGTEXT, VLC_TRUE );
+ META_ARTIST_LONGTEXT, true );
add_string( "meta-genre", NULL, NULL, META_GENRE_TEXT,
- META_GENRE_LONGTEXT, VLC_TRUE );
+ META_GENRE_LONGTEXT, true );
add_string( "meta-copyright", NULL, NULL, META_CPYR_TEXT,
- META_CPYR_LONGTEXT, VLC_TRUE );
+ META_CPYR_LONGTEXT, true );
add_string( "meta-description", NULL, NULL, META_DESCR_TEXT,
- META_DESCR_LONGTEXT, VLC_TRUE );
+ META_DESCR_LONGTEXT, true );
add_string( "meta-date", NULL, NULL, META_DATE_TEXT,
- META_DATE_LONGTEXT, VLC_TRUE );
+ META_DATE_LONGTEXT, true );
add_string( "meta-url", NULL, NULL, META_URL_TEXT,
- META_URL_LONGTEXT, VLC_TRUE );
+ META_URL_LONGTEXT, true );
set_section( N_( "Advanced" ), NULL );
add_integer( "cr-average", 40, NULL, CR_AVERAGE_TEXT,
- CR_AVERAGE_LONGTEXT, VLC_TRUE );
+ CR_AVERAGE_LONGTEXT, true );
add_integer( "clock-synchro", -1, NULL, CLOCK_SYNCHRO_TEXT,
- CLOCK_SYNCHRO_LONGTEXT, VLC_TRUE );
+ CLOCK_SYNCHRO_LONGTEXT, true );
change_integer_list( pi_clock_values, ppsz_clock_descriptions, 0 );
- add_bool( "network-synchronisation", VLC_FALSE, NULL, NETSYNC_TEXT,
- NETSYNC_LONGTEXT, VLC_TRUE );
+ add_bool( "network-synchronisation", false, NULL, NETSYNC_TEXT,
+ NETSYNC_LONGTEXT, true );
/* Decoder options */
- add_category_hint( N_("Decoders"), CODEC_CAT_LONGTEXT , VLC_TRUE );
+ add_category_hint( N_("Decoders"), CODEC_CAT_LONGTEXT , true );
add_string( "codec", NULL, NULL, CODEC_TEXT,
- CODEC_LONGTEXT, VLC_TRUE );
+ CODEC_LONGTEXT, true );
add_string( "encoder", NULL, NULL, ENCODER_TEXT,
- ENCODER_LONGTEXT, VLC_TRUE );
+ ENCODER_LONGTEXT, true );
set_subcategory( SUBCAT_INPUT_ACCESS );
- add_category_hint( N_("Input"), INPUT_CAT_LONGTEXT , VLC_FALSE );
+ add_category_hint( N_("Input"), INPUT_CAT_LONGTEXT , false );
add_module( "access", "access2", NULL, NULL, ACCESS_TEXT,
- ACCESS_LONGTEXT, VLC_TRUE );
+ ACCESS_LONGTEXT, true );
set_subcategory( SUBCAT_INPUT_ACCESS_FILTER );
add_module_list_cat( "access-filter", SUBCAT_INPUT_ACCESS_FILTER, NULL, NULL,
- ACCESS_FILTER_TEXT, ACCESS_FILTER_LONGTEXT, VLC_FALSE );
+ ACCESS_FILTER_TEXT, ACCESS_FILTER_LONGTEXT, false );
set_subcategory( SUBCAT_INPUT_DEMUX );
add_module( "demux", "demux2", NULL, NULL, DEMUX_TEXT,
- DEMUX_LONGTEXT, VLC_TRUE );
+ DEMUX_LONGTEXT, true );
set_subcategory( SUBCAT_INPUT_VCODEC );
set_subcategory( SUBCAT_INPUT_ACODEC );
set_subcategory( SUBCAT_INPUT_SCODEC );
- add_bool( "prefer-system-codecs", VLC_FALSE, NULL, SYSTEM_CODEC_TEXT,
- SYSTEM_CODEC_LONGTEXT, VLC_FALSE );
+ add_bool( "prefer-system-codecs", false, NULL, SYSTEM_CODEC_TEXT,
+ SYSTEM_CODEC_LONGTEXT, false );
/* Stream output options */
set_category( CAT_SOUT );
set_subcategory( SUBCAT_SOUT_GENERAL );
- add_category_hint( N_("Stream output"), SOUT_CAT_LONGTEXT , VLC_TRUE );
+ add_category_hint( N_("Stream output"), SOUT_CAT_LONGTEXT , true );
- add_string( "sout", NULL, NULL, SOUT_TEXT, SOUT_LONGTEXT, VLC_TRUE );
- add_bool( "sout-display", VLC_FALSE, NULL, SOUT_DISPLAY_TEXT,
- SOUT_DISPLAY_LONGTEXT, VLC_TRUE );
- add_bool( "sout-keep", VLC_TRUE, NULL, SOUT_KEEP_TEXT,
- SOUT_KEEP_LONGTEXT, VLC_TRUE );
+ add_string( "sout", NULL, NULL, SOUT_TEXT, SOUT_LONGTEXT, true );
+ add_bool( "sout-display", false, NULL, SOUT_DISPLAY_TEXT,
+ SOUT_DISPLAY_LONGTEXT, true );
+ add_bool( "sout-keep", true, NULL, SOUT_KEEP_TEXT,
+ SOUT_KEEP_LONGTEXT, true );
add_bool( "sout-all", 0, NULL, SOUT_ALL_TEXT,
- SOUT_ALL_LONGTEXT, VLC_TRUE );
+ SOUT_ALL_LONGTEXT, true );
add_bool( "sout-audio", 1, NULL, SOUT_AUDIO_TEXT,
- SOUT_AUDIO_LONGTEXT, VLC_TRUE );
+ SOUT_AUDIO_LONGTEXT, true );
add_bool( "sout-video", 1, NULL, SOUT_VIDEO_TEXT,
- SOUT_VIDEO_LONGTEXT, VLC_TRUE );
+ SOUT_VIDEO_LONGTEXT, true );
add_bool( "sout-spu", 1, NULL, SOUT_SPU_TEXT,
- SOUT_SPU_LONGTEXT, VLC_TRUE );
+ SOUT_SPU_LONGTEXT, true );
add_integer( "sout-mux-caching", 1500, NULL, SOUT_MUX_CACHING_TEXT,
- SOUT_MUX_CACHING_LONGTEXT, VLC_TRUE );
+ SOUT_MUX_CACHING_LONGTEXT, true );
set_section( N_("VLM"), NULL );
add_string( "vlm-conf", NULL, NULL, VLM_CONF_TEXT,
- VLM_CONF_LONGTEXT, VLC_TRUE );
+ VLM_CONF_LONGTEXT, true );
set_subcategory( SUBCAT_SOUT_STREAM );
set_subcategory( SUBCAT_SOUT_MUX );
add_module( "mux", "sout mux", NULL, NULL, MUX_TEXT,
- MUX_LONGTEXT, VLC_TRUE );
+ MUX_LONGTEXT, true );
set_subcategory( SUBCAT_SOUT_ACO );
add_module( "access_output", "sout access", NULL, NULL,
- ACCESS_OUTPUT_TEXT, ACCESS_OUTPUT_LONGTEXT, VLC_TRUE );
- add_integer( "ttl", -1, NULL, TTL_TEXT, TTL_LONGTEXT, VLC_TRUE );
- add_string( "miface", NULL, NULL, MIFACE_TEXT, MIFACE_LONGTEXT, VLC_TRUE );
- add_string( "miface-addr", NULL, NULL, MIFACE_ADDR_TEXT, MIFACE_ADDR_LONGTEXT, VLC_TRUE );
- add_integer( "dscp", 0, NULL, DSCP_TEXT, DSCP_LONGTEXT, VLC_TRUE );
+ ACCESS_OUTPUT_TEXT, ACCESS_OUTPUT_LONGTEXT, true );
+ add_integer( "ttl", -1, NULL, TTL_TEXT, TTL_LONGTEXT, true );
+ add_string( "miface", NULL, NULL, MIFACE_TEXT, MIFACE_LONGTEXT, true );
+ add_string( "miface-addr", NULL, NULL, MIFACE_ADDR_TEXT, MIFACE_ADDR_LONGTEXT, true );
+ add_integer( "dscp", 0, NULL, DSCP_TEXT, DSCP_LONGTEXT, true );
set_subcategory( SUBCAT_SOUT_PACKETIZER );
add_module( "packetizer","packetizer", NULL, NULL,
- PACKETIZER_TEXT, PACKETIZER_LONGTEXT, VLC_TRUE );
+ PACKETIZER_TEXT, PACKETIZER_LONGTEXT, true );
set_subcategory( SUBCAT_SOUT_SAP );
- add_bool( "sap-flow-control", VLC_FALSE, NULL, ANN_SAPCTRL_TEXT,
- ANN_SAPCTRL_LONGTEXT, VLC_TRUE );
+ add_bool( "sap-flow-control", false, NULL, ANN_SAPCTRL_TEXT,
+ ANN_SAPCTRL_LONGTEXT, true );
add_integer( "sap-interval", 5, NULL, ANN_SAPINTV_TEXT,
- ANN_SAPINTV_LONGTEXT, VLC_TRUE );
+ ANN_SAPINTV_LONGTEXT, true );
set_subcategory( SUBCAT_SOUT_VOD );
/* CPU options */
set_category( CAT_ADVANCED );
set_subcategory( SUBCAT_ADVANCED_CPU );
- add_category_hint( N_("CPU"), CPU_CAT_LONGTEXT, VLC_TRUE );
- add_bool( "fpu", 1, NULL, FPU_TEXT, FPU_LONGTEXT, VLC_TRUE );
+ add_category_hint( N_("CPU"), CPU_CAT_LONGTEXT, true );
+ add_bool( "fpu", 1, NULL, FPU_TEXT, FPU_LONGTEXT, true );
change_need_restart();
#if defined( __i386__ ) || defined( __x86_64__ )
- add_bool( "mmx", 1, NULL, MMX_TEXT, MMX_LONGTEXT, VLC_TRUE );
+ add_bool( "mmx", 1, NULL, MMX_TEXT, MMX_LONGTEXT, true );
change_need_restart();
- add_bool( "3dn", 1, NULL, THREE_DN_TEXT, THREE_DN_LONGTEXT, VLC_TRUE );
+ add_bool( "3dn", 1, NULL, THREE_DN_TEXT, THREE_DN_LONGTEXT, true );
change_need_restart();
- add_bool( "mmxext", 1, NULL, MMXEXT_TEXT, MMXEXT_LONGTEXT, VLC_TRUE );
+ add_bool( "mmxext", 1, NULL, MMXEXT_TEXT, MMXEXT_LONGTEXT, true );
change_need_restart();
- add_bool( "sse", 1, NULL, SSE_TEXT, SSE_LONGTEXT, VLC_TRUE );
+ add_bool( "sse", 1, NULL, SSE_TEXT, SSE_LONGTEXT, true );
change_need_restart();
- add_bool( "sse2", 1, NULL, SSE2_TEXT, SSE2_LONGTEXT, VLC_TRUE );
+ add_bool( "sse2", 1, NULL, SSE2_TEXT, SSE2_LONGTEXT, true );
change_need_restart();
#endif
#if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
- add_bool( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, VLC_TRUE );
+ add_bool( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, true );
change_need_restart();
#endif
/* Misc options */
set_subcategory( SUBCAT_ADVANCED_MISC );
set_section( N_("Special modules"), NULL );
- add_category_hint( N_("Miscellaneous"), MISC_CAT_LONGTEXT, VLC_TRUE );
+ add_category_hint( N_("Miscellaneous"), MISC_CAT_LONGTEXT, true );
add_module( "memcpy", "memcpy", NULL, NULL, MEMCPY_TEXT,
- MEMCPY_LONGTEXT, VLC_TRUE );
+ MEMCPY_LONGTEXT, true );
change_need_restart();
set_section( N_("Plugins" ), NULL );
- add_bool( "plugins-cache", VLC_TRUE, NULL, PLUGINS_CACHE_TEXT,
- PLUGINS_CACHE_LONGTEXT, VLC_TRUE );
+ add_bool( "plugins-cache", true, NULL, PLUGINS_CACHE_TEXT,
+ PLUGINS_CACHE_LONGTEXT, true );
change_need_restart();
add_directory( "plugin-path", NULL, NULL, PLUGIN_PATH_TEXT,
- PLUGIN_PATH_LONGTEXT, VLC_TRUE );
+ PLUGIN_PATH_LONGTEXT, true );
change_need_restart();
change_unsafe();
set_section( N_("Performance options"), NULL );
add_bool( "minimize-threads", 0, NULL, MINIMIZE_THREADS_TEXT,
- MINIMIZE_THREADS_LONGTEXT, VLC_TRUE );
+ MINIMIZE_THREADS_LONGTEXT, true );
change_need_restart();
#if !defined(__APPLE__) && !defined(SYS_BEOS) && defined(LIBVLC_USE_PTHREAD)
- add_bool( "rt-priority", VLC_FALSE, NULL, RT_PRIORITY_TEXT,
- RT_PRIORITY_LONGTEXT, VLC_TRUE );
+ add_bool( "rt-priority", false, NULL, RT_PRIORITY_TEXT,
+ RT_PRIORITY_LONGTEXT, true );
change_need_restart();
#endif
#if !defined(SYS_BEOS) && defined(LIBVLC_USE_PTHREAD)
add_integer( "rt-offset", 0, NULL, RT_OFFSET_TEXT,
- RT_OFFSET_LONGTEXT, VLC_TRUE );
+ RT_OFFSET_LONGTEXT, true );
change_need_restart();
#endif
#if defined(HAVE_DBUS_3)
add_bool( "one-instance", 0, NULL, ONEINSTANCE_DBUS_TEXT,
- ONEINSTANCE_DBUS_LONGTEXT, VLC_TRUE );
+ ONEINSTANCE_DBUS_LONGTEXT, true );
add_bool( "playlist-enqueue", 0, NULL, PLAYLISTENQUEUE_TEXT,
- PLAYLISTENQUEUE_LONGTEXT, VLC_TRUE );
+ PLAYLISTENQUEUE_LONGTEXT, true );
add_bool( "inhibit", 1, NULL, INHIBIT_TEXT,
- INHIBIT_LONGTEXT, VLC_TRUE );
+ INHIBIT_LONGTEXT, true );
#endif
#if defined(WIN32)
add_bool( "one-instance", 0, NULL, ONEINSTANCE_WIN_TEXT,
- ONEINSTANCE_WIN_LONGTEXT, VLC_TRUE );
+ ONEINSTANCE_WIN_LONGTEXT, true );
add_bool( "started-from-file", 0, NULL, STARTEDFROMFILE_TEXT,
- STARTEDFROMFILE_LONGTEXT, VLC_TRUE );
+ STARTEDFROMFILE_LONGTEXT, true );
change_internal();
change_unsaveable();
add_bool( "one-instance-when-started-from-file", 1, NULL,
ONEINSTANCEWHENSTARTEDFROMFILE_TEXT,
- ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, VLC_TRUE );
+ ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, true );
add_bool( "playlist-enqueue", 0, NULL, PLAYLISTENQUEUE_TEXT,
- PLAYLISTENQUEUE_LONGTEXT, VLC_TRUE );
+ PLAYLISTENQUEUE_LONGTEXT, true );
change_unsaveable();
add_bool( "high-priority", 0, NULL, HPRIORITY_TEXT,
- HPRIORITY_LONGTEXT, VLC_FALSE );
+ HPRIORITY_LONGTEXT, false );
change_need_restart();
#endif
/* Playlist options */
set_category( CAT_PLAYLIST );
set_subcategory( SUBCAT_PLAYLIST_GENERAL );
- add_category_hint( N_("Playlist"), PLAYLIST_CAT_LONGTEXT , VLC_FALSE );
- add_bool( "random", 0, NULL, RANDOM_TEXT, RANDOM_LONGTEXT, VLC_FALSE );
+ add_category_hint( N_("Playlist"), PLAYLIST_CAT_LONGTEXT , false );
+ add_bool( "random", 0, NULL, RANDOM_TEXT, RANDOM_LONGTEXT, false );
change_short('Z');
- add_bool( "loop", 0, NULL, LOOP_TEXT, LOOP_LONGTEXT, VLC_FALSE );
+ add_bool( "loop", 0, NULL, LOOP_TEXT, LOOP_LONGTEXT, false );
change_short('L');
- add_bool( "repeat", 0, NULL, REPEAT_TEXT, REPEAT_LONGTEXT, VLC_FALSE );
+ add_bool( "repeat", 0, NULL, REPEAT_TEXT, REPEAT_LONGTEXT, false );
change_short('R');
- add_bool( "play-and-exit", 0, NULL, PAE_TEXT, PAE_LONGTEXT, VLC_FALSE );
- add_bool( "play-and-stop", 0, NULL, PAS_TEXT, PAS_LONGTEXT, VLC_FALSE );
- add_bool( "media-library", 1, NULL, ML_TEXT, ML_LONGTEXT, VLC_FALSE );
+ add_bool( "play-and-exit", 0, NULL, PAE_TEXT, PAE_LONGTEXT, false );
+ add_bool( "play-and-stop", 0, NULL, PAS_TEXT, PAS_LONGTEXT, false );
+ add_bool( "media-library", 1, NULL, ML_TEXT, ML_LONGTEXT, false );
add_integer( "playlist-tree", 0, NULL, PLTREE_TEXT, PLTREE_LONGTEXT,
- VLC_TRUE );
+ true );
change_integer_list( pi_pltree_values, ppsz_pltree_descriptions, 0 );
- add_string( "open", "", NULL, OPEN_TEXT, OPEN_LONGTEXT, VLC_FALSE );
+ add_string( "open", "", NULL, OPEN_TEXT, OPEN_LONGTEXT, false );
change_need_restart();
- add_bool( "auto-preparse", VLC_TRUE, NULL, PREPARSE_TEXT,
- PREPARSE_LONGTEXT, VLC_FALSE );
+ add_bool( "auto-preparse", true, NULL, PREPARSE_TEXT,
+ PREPARSE_LONGTEXT, false );
- add_integer( "fetch-meta", VLC_TRUE, NULL, FETCH_META_TEXT,
- FETCH_META_LONGTEXT, VLC_FALSE );
+ add_integer( "fetch-meta", true, NULL, FETCH_META_TEXT,
+ FETCH_META_LONGTEXT, false );
add_integer( "album-art", ALBUM_ART_WHEN_ASKED, NULL, ALBUM_ART_TEXT,
- ALBUM_ART_LONGTEXT, VLC_FALSE );
+ ALBUM_ART_LONGTEXT, false );
change_integer_list( pi_albumart_values,
ppsz_albumart_descriptions, 0 );
set_subcategory( SUBCAT_PLAYLIST_SD );
add_module_list_cat( "services-discovery", SUBCAT_PLAYLIST_SD, NULL,
- NULL, SD_TEXT, SD_LONGTEXT, VLC_FALSE );
+ NULL, SD_TEXT, SD_LONGTEXT, false );
change_short('S');
change_need_restart();
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_GENERAL );
add_integer( "verbose", 0, NULL, VERBOSE_TEXT, VERBOSE_LONGTEXT,
- VLC_FALSE );
+ false );
change_short('v');
- add_bool( "quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, VLC_TRUE );
+ add_bool( "quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, true );
change_short('q');
#if !defined(WIN32)
- add_bool( "daemon", 0, NULL, DAEMON_TEXT, DAEMON_LONGTEXT, VLC_TRUE );
+ add_bool( "daemon", 0, NULL, DAEMON_TEXT, DAEMON_LONGTEXT, true );
change_short('d');
change_need_restart();
add_string( "pidfile", NULL, NULL, PIDFILE_TEXT, PIDFILE_LONGTEXT,
- VLC_FALSE );
+ false );
change_need_restart();
#endif
- add_bool( "file-logging", VLC_FALSE, NULL, FILE_LOG_TEXT, FILE_LOG_LONGTEXT,
- VLC_TRUE );
+ add_bool( "file-logging", false, NULL, FILE_LOG_TEXT, FILE_LOG_LONGTEXT,
+ true );
change_need_restart();
#ifdef HAVE_SYSLOG_H
- add_bool ( "syslog", VLC_FALSE, NULL, SYSLOG_TEXT, SYSLOG_LONGTEXT,
- VLC_TRUE );
+ add_bool ( "syslog", false, NULL, SYSLOG_TEXT, SYSLOG_LONGTEXT,
+ true );
change_need_restart();
#endif
#if defined (WIN32) || defined (__APPLE__)
add_string( "language", "auto", NULL, LANGUAGE_TEXT, LANGUAGE_LONGTEXT,
- VLC_FALSE );
+ false );
change_string_list( ppsz_language, ppsz_language_text, 0 );
change_need_restart();
#endif
- add_bool( "color", VLC_TRUE, NULL, COLOR_TEXT, COLOR_LONGTEXT, VLC_TRUE );
- add_bool( "advanced", VLC_FALSE, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
- VLC_FALSE );
+ add_bool( "color", true, NULL, COLOR_TEXT, COLOR_LONGTEXT, true );
+ add_bool( "advanced", false, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
+ false );
change_need_restart();
- add_bool( "interact", VLC_TRUE, NULL, INTERACTION_TEXT,
- INTERACTION_LONGTEXT, VLC_FALSE );
+ add_bool( "interact", true, NULL, INTERACTION_TEXT,
+ INTERACTION_LONGTEXT, false );
- add_bool( "show-intf", VLC_FALSE, NULL, SHOWINTF_TEXT, SHOWINTF_LONGTEXT,
- VLC_FALSE );
+ add_bool( "show-intf", false, NULL, SHOWINTF_TEXT, SHOWINTF_LONGTEXT,
+ false );
change_need_restart();
- add_bool ( "stats", VLC_TRUE, NULL, STATS_TEXT, STATS_LONGTEXT, VLC_TRUE );
+ add_bool ( "stats", true, NULL, STATS_TEXT, STATS_LONGTEXT, true );
change_need_restart();
set_subcategory( SUBCAT_INTERFACE_MAIN );
add_module_cat( "intf", SUBCAT_INTERFACE_MAIN, NULL, NULL, INTF_TEXT,
- INTF_LONGTEXT, VLC_FALSE );
+ INTF_LONGTEXT, false );
change_short('I');
change_need_restart();
add_module_list_cat( "extraintf", SUBCAT_INTERFACE_MAIN,
NULL, NULL, EXTRAINTF_TEXT,
- EXTRAINTF_LONGTEXT, VLC_FALSE );
+ EXTRAINTF_LONGTEXT, false );
change_need_restart();
set_subcategory( SUBCAT_INTERFACE_CONTROL );
add_module_list_cat( "control", SUBCAT_INTERFACE_CONTROL, NULL, NULL,
- CONTROL_TEXT, CONTROL_LONGTEXT, VLC_FALSE );
+ CONTROL_TEXT, CONTROL_LONGTEXT, false );
change_need_restart();
/* Hotkey options*/
set_subcategory( SUBCAT_INTERFACE_HOTKEYS );
- add_category_hint( N_("Hot keys"), HOTKEY_CAT_LONGTEXT , VLC_FALSE );
+ add_category_hint( N_("Hot keys"), HOTKEY_CAT_LONGTEXT , false );
#if defined(__APPLE__)
/* Don't use the following combo's */
#endif
add_key( "key-toggle-fullscreen", KEY_TOGGLE_FULLSCREEN, NULL, TOGGLE_FULLSCREEN_KEY_TEXT,
- TOGGLE_FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
+ TOGGLE_FULLSCREEN_KEY_LONGTEXT, false );
add_deprecated_alias( "key-fullscreen" ); /*deprecated since 0.9.0 */
add_key( "key-leave-fullscreen", KEY_LEAVE_FULLSCREEN, NULL, LEAVE_FULLSCREEN_KEY_TEXT,
- LEAVE_FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
+ LEAVE_FULLSCREEN_KEY_LONGTEXT, false );
add_key( "key-play-pause", KEY_PLAY_PAUSE, NULL, PLAY_PAUSE_KEY_TEXT,
- PLAY_PAUSE_KEY_LONGTEXT, VLC_FALSE );
+ PLAY_PAUSE_KEY_LONGTEXT, false );
add_key( "key-pause", KEY_PAUSE, NULL, PAUSE_KEY_TEXT,
- PAUSE_KEY_LONGTEXT, VLC_TRUE );
+ PAUSE_KEY_LONGTEXT, true );
add_key( "key-play", KEY_PLAY, NULL, PLAY_KEY_TEXT,
- PLAY_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_KEY_LONGTEXT, true );
add_key( "key-faster", KEY_FASTER, NULL, FASTER_KEY_TEXT,
- FASTER_KEY_LONGTEXT, VLC_FALSE );
+ FASTER_KEY_LONGTEXT, false );
add_key( "key-slower", KEY_SLOWER, NULL, SLOWER_KEY_TEXT,
- SLOWER_KEY_LONGTEXT, VLC_FALSE );
+ SLOWER_KEY_LONGTEXT, false );
add_key( "key-next", KEY_NEXT, NULL, NEXT_KEY_TEXT,
- NEXT_KEY_LONGTEXT, VLC_FALSE );
+ NEXT_KEY_LONGTEXT, false );
add_key( "key-prev", KEY_PREV, NULL, PREV_KEY_TEXT,
- PREV_KEY_LONGTEXT, VLC_FALSE );
+ PREV_KEY_LONGTEXT, false );
add_key( "key-stop", KEY_STOP, NULL, STOP_KEY_TEXT,
- STOP_KEY_LONGTEXT, VLC_FALSE );
+ STOP_KEY_LONGTEXT, false );
add_key( "key-position", KEY_POSITION, NULL, POSITION_KEY_TEXT,
- POSITION_KEY_LONGTEXT, VLC_TRUE );
+ POSITION_KEY_LONGTEXT, true );
add_key( "key-jump-extrashort", KEY_JUMP_MEXTRASHORT, NULL,
- JBEXTRASHORT_KEY_TEXT, JBEXTRASHORT_KEY_LONGTEXT, VLC_FALSE );
+ JBEXTRASHORT_KEY_TEXT, JBEXTRASHORT_KEY_LONGTEXT, false );
add_key( "key-jump+extrashort", KEY_JUMP_PEXTRASHORT, NULL,
- JFEXTRASHORT_KEY_TEXT, JFEXTRASHORT_KEY_LONGTEXT, VLC_FALSE );
+ JFEXTRASHORT_KEY_TEXT, JFEXTRASHORT_KEY_LONGTEXT, false );
add_key( "key-jump-short", KEY_JUMP_MSHORT, NULL, JBSHORT_KEY_TEXT,
- JBSHORT_KEY_LONGTEXT, VLC_FALSE );
+ JBSHORT_KEY_LONGTEXT, false );
add_key( "key-jump+short", KEY_JUMP_PSHORT, NULL, JFSHORT_KEY_TEXT,
- JFSHORT_KEY_LONGTEXT, VLC_FALSE );
+ JFSHORT_KEY_LONGTEXT, false );
add_key( "key-jump-medium", KEY_JUMP_MMEDIUM, NULL, JBMEDIUM_KEY_TEXT,
- JBMEDIUM_KEY_LONGTEXT, VLC_FALSE );
+ JBMEDIUM_KEY_LONGTEXT, false );
add_key( "key-jump+medium", KEY_JUMP_PMEDIUM, NULL, JFMEDIUM_KEY_TEXT,
- JFMEDIUM_KEY_LONGTEXT, VLC_FALSE );
+ JFMEDIUM_KEY_LONGTEXT, false );
add_key( "key-jump-long", KEY_JUMP_MLONG, NULL, JBLONG_KEY_TEXT,
- JBLONG_KEY_LONGTEXT, VLC_FALSE );
+ JBLONG_KEY_LONGTEXT, false );
add_key( "key-jump+long", KEY_JUMP_PLONG, NULL, JFLONG_KEY_TEXT,
- JFLONG_KEY_LONGTEXT, VLC_FALSE );
+ JFLONG_KEY_LONGTEXT, false );
add_key( "key-nav-activate", KEY_NAV_ACTIVATE, NULL, NAV_ACTIVATE_KEY_TEXT,
- NAV_ACTIVATE_KEY_LONGTEXT, VLC_TRUE );
+ NAV_ACTIVATE_KEY_LONGTEXT, true );
add_key( "key-nav-up", KEY_NAV_UP, NULL, NAV_UP_KEY_TEXT,
- NAV_UP_KEY_LONGTEXT, VLC_TRUE );
+ NAV_UP_KEY_LONGTEXT, true );
add_key( "key-nav-down", KEY_NAV_DOWN, NULL, NAV_DOWN_KEY_TEXT,
- NAV_DOWN_KEY_LONGTEXT, VLC_TRUE );
+ NAV_DOWN_KEY_LONGTEXT, true );
add_key( "key-nav-left", KEY_NAV_LEFT, NULL, NAV_LEFT_KEY_TEXT,
- NAV_LEFT_KEY_LONGTEXT, VLC_TRUE );
+ NAV_LEFT_KEY_LONGTEXT, true );
add_key( "key-nav-right", KEY_NAV_RIGHT, NULL, NAV_RIGHT_KEY_TEXT,
- NAV_RIGHT_KEY_LONGTEXT, VLC_TRUE );
+ NAV_RIGHT_KEY_LONGTEXT, true );
add_key( "key-disc-menu", KEY_DISC_MENU, NULL, DISC_MENU_TEXT,
- DISC_MENU_LONGTEXT, VLC_TRUE );
+ DISC_MENU_LONGTEXT, true );
add_key( "key-title-prev", KEY_TITLE_PREV, NULL, TITLE_PREV_TEXT,
- TITLE_PREV_LONGTEXT, VLC_TRUE );
+ TITLE_PREV_LONGTEXT, true );
add_key( "key-title-next", KEY_TITLE_NEXT, NULL, TITLE_NEXT_TEXT,
- TITLE_NEXT_LONGTEXT, VLC_TRUE );
+ TITLE_NEXT_LONGTEXT, true );
add_key( "key-chapter-prev", KEY_CHAPTER_PREV, NULL, CHAPTER_PREV_TEXT,
- CHAPTER_PREV_LONGTEXT, VLC_TRUE );
+ CHAPTER_PREV_LONGTEXT, true );
add_key( "key-chapter-next", KEY_CHAPTER_NEXT, NULL, CHAPTER_NEXT_TEXT,
- CHAPTER_NEXT_LONGTEXT, VLC_TRUE );
+ CHAPTER_NEXT_LONGTEXT, true );
add_key( "key-quit", KEY_QUIT, NULL, QUIT_KEY_TEXT,
- QUIT_KEY_LONGTEXT, VLC_FALSE );
+ QUIT_KEY_LONGTEXT, false );
add_key( "key-vol-up", KEY_VOL_UP, NULL, VOL_UP_KEY_TEXT,
- VOL_UP_KEY_LONGTEXT, VLC_FALSE );
+ VOL_UP_KEY_LONGTEXT, false );
add_key( "key-vol-down", KEY_VOL_DOWN, NULL, VOL_DOWN_KEY_TEXT,
- VOL_DOWN_KEY_LONGTEXT, VLC_FALSE );
+ VOL_DOWN_KEY_LONGTEXT, false );
add_key( "key-vol-mute", KEY_VOL_MUTE, NULL, VOL_MUTE_KEY_TEXT,
- VOL_MUTE_KEY_LONGTEXT, VLC_FALSE );
+ VOL_MUTE_KEY_LONGTEXT, false );
add_key( "key-subdelay-up", KEY_SUBDELAY_UP, NULL,
- SUBDELAY_UP_KEY_TEXT, SUBDELAY_UP_KEY_LONGTEXT, VLC_TRUE );
+ SUBDELAY_UP_KEY_TEXT, SUBDELAY_UP_KEY_LONGTEXT, true );
add_key( "key-subdelay-down", KEY_SUBDELAY_DOWN, NULL,
- SUBDELAY_DOWN_KEY_TEXT, SUBDELAY_DOWN_KEY_LONGTEXT, VLC_TRUE );
+ SUBDELAY_DOWN_KEY_TEXT, SUBDELAY_DOWN_KEY_LONGTEXT, true );
add_key( "key-audiodelay-up", KEY_AUDIODELAY_UP, NULL,
- AUDIODELAY_UP_KEY_TEXT, AUDIODELAY_UP_KEY_LONGTEXT, VLC_TRUE );
+ AUDIODELAY_UP_KEY_TEXT, AUDIODELAY_UP_KEY_LONGTEXT, true );
add_key( "key-audiodelay-down", KEY_AUDIODELAY_DOWN, NULL,
- AUDIODELAY_DOWN_KEY_TEXT, AUDIODELAY_DOWN_KEY_LONGTEXT, VLC_TRUE );
+ AUDIODELAY_DOWN_KEY_TEXT, AUDIODELAY_DOWN_KEY_LONGTEXT, true );
add_key( "key-audio-track", KEY_AUDIO_TRACK, NULL, AUDIO_TRACK_KEY_TEXT,
- AUDIO_TRACK_KEY_LONGTEXT, VLC_FALSE );
+ AUDIO_TRACK_KEY_LONGTEXT, false );
add_key( "key-audiodevice-cycle", KEY_STOP, NULL, AUDI_DEVICE_CYCLE_KEY_TEXT,
- AUDI_DEVICE_CYCLE_KEY_LONGTEXT, VLC_FALSE );
+ AUDI_DEVICE_CYCLE_KEY_LONGTEXT, false );
add_key( "key-subtitle-track", KEY_SUBTITLE_TRACK, NULL,
- SUBTITLE_TRACK_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT, VLC_FALSE );
+ SUBTITLE_TRACK_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT, false );
add_key( "key-aspect-ratio", KEY_ASPECT_RATIO, NULL,
- ASPECT_RATIO_KEY_TEXT, ASPECT_RATIO_KEY_LONGTEXT, VLC_FALSE );
+ ASPECT_RATIO_KEY_TEXT, ASPECT_RATIO_KEY_LONGTEXT, false );
add_key( "key-crop", KEY_CROP, NULL,
- CROP_KEY_TEXT, CROP_KEY_LONGTEXT, VLC_FALSE );
+ CROP_KEY_TEXT, CROP_KEY_LONGTEXT, false );
add_key( "key-deinterlace", KEY_DEINTERLACE, NULL,
- DEINTERLACE_KEY_TEXT, DEINTERLACE_KEY_LONGTEXT, VLC_FALSE );
+ DEINTERLACE_KEY_TEXT, DEINTERLACE_KEY_LONGTEXT, false );
add_key( "key-intf-show", KEY_INTF_SHOW, NULL,
- INTF_SHOW_KEY_TEXT, INTF_SHOW_KEY_LONGTEXT, VLC_TRUE );
+ INTF_SHOW_KEY_TEXT, INTF_SHOW_KEY_LONGTEXT, true );
add_key( "key-intf-hide", KEY_INTF_HIDE, NULL,
- INTF_HIDE_KEY_TEXT, INTF_HIDE_KEY_LONGTEXT, VLC_TRUE );
+ INTF_HIDE_KEY_TEXT, INTF_HIDE_KEY_LONGTEXT, true );
add_key( "key-snapshot", KEY_SNAPSHOT, NULL,
- SNAP_KEY_TEXT, SNAP_KEY_LONGTEXT, VLC_TRUE );
+ SNAP_KEY_TEXT, SNAP_KEY_LONGTEXT, true );
add_key( "key-history-back", KEY_HISTORY_BACK, NULL, HISTORY_BACK_TEXT,
- HISTORY_BACK_LONGTEXT, VLC_TRUE );
+ HISTORY_BACK_LONGTEXT, true );
add_key( "key-history-forward", KEY_HISTORY_FORWARD, NULL,
- HISTORY_FORWARD_TEXT, HISTORY_FORWARD_LONGTEXT, VLC_TRUE );
+ HISTORY_FORWARD_TEXT, HISTORY_FORWARD_LONGTEXT, true );
add_key( "key-record", KEY_RECORD, NULL,
- RECORD_KEY_TEXT, RECORD_KEY_LONGTEXT, VLC_TRUE );
+ RECORD_KEY_TEXT, RECORD_KEY_LONGTEXT, true );
add_key( "key-dump", KEY_DUMP, NULL,
- DUMP_KEY_TEXT, DUMP_KEY_LONGTEXT, VLC_TRUE );
+ DUMP_KEY_TEXT, DUMP_KEY_LONGTEXT, true );
add_key( "key-zoom", KEY_ZOOM, NULL,
- ZOOM_KEY_TEXT, ZOOM_KEY_LONGTEXT, VLC_TRUE );
+ ZOOM_KEY_TEXT, ZOOM_KEY_LONGTEXT, true );
add_key( "key-unzoom", KEY_UNZOOM, NULL,
- UNZOOM_KEY_TEXT, UNZOOM_KEY_LONGTEXT, VLC_TRUE );
+ UNZOOM_KEY_TEXT, UNZOOM_KEY_LONGTEXT, true );
add_key( "key-wallpaper", KEY_WALLPAPER, NULL, WALLPAPER_KEY_TEXT,
- WALLPAPER_KEY_LONGTEXT, VLC_FALSE );
+ WALLPAPER_KEY_LONGTEXT, false );
add_key( "key-menu-on", KEY_MENU_ON, NULL,
- MENU_ON_KEY_TEXT, MENU_ON_KEY_LONGTEXT, VLC_TRUE );
+ MENU_ON_KEY_TEXT, MENU_ON_KEY_LONGTEXT, true );
add_key( "key-menu-off", KEY_MENU_OFF, NULL,
- MENU_OFF_KEY_TEXT, MENU_OFF_KEY_LONGTEXT, VLC_TRUE );
+ MENU_OFF_KEY_TEXT, MENU_OFF_KEY_LONGTEXT, true );
add_key( "key-menu-right", KEY_MENU_RIGHT, NULL,
- MENU_RIGHT_KEY_TEXT, MENU_RIGHT_KEY_LONGTEXT, VLC_TRUE );
+ MENU_RIGHT_KEY_TEXT, MENU_RIGHT_KEY_LONGTEXT, true );
add_key( "key-menu-left", KEY_MENU_LEFT, NULL,
- MENU_LEFT_KEY_TEXT, MENU_LEFT_KEY_LONGTEXT, VLC_TRUE );
+ MENU_LEFT_KEY_TEXT, MENU_LEFT_KEY_LONGTEXT, true );
add_key( "key-menu-up", KEY_MENU_UP, NULL,
- MENU_UP_KEY_TEXT, MENU_UP_KEY_LONGTEXT, VLC_TRUE );
+ MENU_UP_KEY_TEXT, MENU_UP_KEY_LONGTEXT, true );
add_key( "key-menu-down", KEY_MENU_DOWN, NULL,
- MENU_DOWN_KEY_TEXT, MENU_DOWN_KEY_LONGTEXT, VLC_TRUE );
+ MENU_DOWN_KEY_TEXT, MENU_DOWN_KEY_LONGTEXT, true );
add_key( "key-menu-select", KEY_MENU_SELECT, NULL,
- MENU_SELECT_KEY_TEXT, MENU_SELECT_KEY_LONGTEXT, VLC_TRUE );
+ MENU_SELECT_KEY_TEXT, MENU_SELECT_KEY_LONGTEXT, true );
add_key( "key-crop-top", KEY_CROP_TOP, NULL,
- CROP_TOP_KEY_TEXT, CROP_TOP_KEY_LONGTEXT, VLC_TRUE );
+ CROP_TOP_KEY_TEXT, CROP_TOP_KEY_LONGTEXT, true );
add_key( "key-uncrop-top", KEY_UNCROP_TOP, NULL,
- UNCROP_TOP_KEY_TEXT, UNCROP_TOP_KEY_LONGTEXT, VLC_TRUE );
+ UNCROP_TOP_KEY_TEXT, UNCROP_TOP_KEY_LONGTEXT, true );
add_key( "key-crop-left", KEY_CROP_LEFT, NULL,
- CROP_LEFT_KEY_TEXT, CROP_LEFT_KEY_LONGTEXT, VLC_TRUE );
+ CROP_LEFT_KEY_TEXT, CROP_LEFT_KEY_LONGTEXT, true );
add_key( "key-uncrop-left", KEY_UNCROP_LEFT, NULL,
- UNCROP_LEFT_KEY_TEXT, UNCROP_LEFT_KEY_LONGTEXT, VLC_TRUE );
+ UNCROP_LEFT_KEY_TEXT, UNCROP_LEFT_KEY_LONGTEXT, true );
add_key( "key-crop-bottom", KEY_CROP_BOTTOM, NULL,
- CROP_BOTTOM_KEY_TEXT, CROP_BOTTOM_KEY_LONGTEXT, VLC_TRUE );
+ CROP_BOTTOM_KEY_TEXT, CROP_BOTTOM_KEY_LONGTEXT, true );
add_key( "key-uncrop-bottom", KEY_UNCROP_BOTTOM, NULL,
- UNCROP_BOTTOM_KEY_TEXT, UNCROP_BOTTOM_KEY_LONGTEXT, VLC_TRUE );
+ UNCROP_BOTTOM_KEY_TEXT, UNCROP_BOTTOM_KEY_LONGTEXT, true );
add_key( "key-crop-right", KEY_CROP_RIGHT, NULL,
- CROP_RIGHT_KEY_TEXT, CROP_RIGHT_KEY_LONGTEXT, VLC_TRUE );
+ CROP_RIGHT_KEY_TEXT, CROP_RIGHT_KEY_LONGTEXT, true );
add_key( "key-uncrop-right", KEY_UNCROP_RIGHT, NULL,
- UNCROP_RIGHT_KEY_TEXT, UNCROP_RIGHT_KEY_LONGTEXT, VLC_TRUE );
+ UNCROP_RIGHT_KEY_TEXT, UNCROP_RIGHT_KEY_LONGTEXT, true );
add_key( "key-random", KEY_RANDOM, NULL,
- RANDOM_KEY_TEXT, RANDOM_KEY_LONGTEXT, VLC_FALSE );
+ RANDOM_KEY_TEXT, RANDOM_KEY_LONGTEXT, false );
add_key( "key-loop", KEY_LOOP, NULL,
- LOOP_KEY_TEXT, LOOP_KEY_LONGTEXT, VLC_FALSE );
+ LOOP_KEY_TEXT, LOOP_KEY_LONGTEXT, false );
set_section ( N_("Zoom" ), NULL );
add_key( "key-zoom-quarter", KEY_ZOOM_QUARTER, NULL,
- ZOOM_QUARTER_KEY_TEXT, NULL, VLC_FALSE );
+ ZOOM_QUARTER_KEY_TEXT, NULL, false );
add_key( "key-zoom-half", KEY_ZOOM_HALF, NULL,
- ZOOM_HALF_KEY_TEXT, NULL, VLC_FALSE );
+ ZOOM_HALF_KEY_TEXT, NULL, false );
add_key( "key-zoom-original", KEY_ZOOM_ORIGINAL, NULL,
- ZOOM_ORIGINAL_KEY_TEXT, NULL, VLC_FALSE );
+ ZOOM_ORIGINAL_KEY_TEXT, NULL, false );
add_key( "key-zoom-double", KEY_ZOOM_DOUBLE, NULL,
- ZOOM_DOUBLE_KEY_TEXT, NULL, VLC_FALSE );
+ ZOOM_DOUBLE_KEY_TEXT, NULL, false );
set_section ( N_("Jump sizes" ), NULL );
add_integer( "extrashort-jump-size", 3, NULL, JIEXTRASHORT_TEXT,
- JIEXTRASHORT_LONGTEXT, VLC_FALSE );
+ JIEXTRASHORT_LONGTEXT, false );
add_integer( "short-jump-size", 10, NULL, JISHORT_TEXT,
- JISHORT_LONGTEXT, VLC_FALSE );
+ JISHORT_LONGTEXT, false );
add_integer( "medium-jump-size", 60, NULL, JIMEDIUM_TEXT,
- JIMEDIUM_LONGTEXT, VLC_FALSE );
+ JIMEDIUM_LONGTEXT, false );
add_integer( "long-jump-size", 300, NULL, JILONG_TEXT,
- JILONG_LONGTEXT, VLC_FALSE );
+ JILONG_LONGTEXT, false );
/* HACK so these don't get displayed */
set_category( -1 );
set_subcategory( -1 );
add_key( "key-set-bookmark1", KEY_SET_BOOKMARK1, NULL,
- SET_BOOKMARK1_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK1_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark2", KEY_SET_BOOKMARK2, NULL,
- SET_BOOKMARK2_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK2_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark3", KEY_SET_BOOKMARK3, NULL,
- SET_BOOKMARK3_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK3_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark4", KEY_SET_BOOKMARK4, NULL,
- SET_BOOKMARK4_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK4_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark5", KEY_SET_BOOKMARK5, NULL,
- SET_BOOKMARK5_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK5_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark6", KEY_SET_BOOKMARK6, NULL,
- SET_BOOKMARK6_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK6_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark7", KEY_SET_BOOKMARK7, NULL,
- SET_BOOKMARK7_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK7_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark8", KEY_SET_BOOKMARK8, NULL,
- SET_BOOKMARK8_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK8_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark9", KEY_SET_BOOKMARK9, NULL,
- SET_BOOKMARK9_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK9_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-set-bookmark10", KEY_SET_BOOKMARK10, NULL,
- SET_BOOKMARK10_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ SET_BOOKMARK10_KEY_TEXT, SET_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark1", KEY_PLAY_BOOKMARK1, NULL,
- PLAY_BOOKMARK1_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK1_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark2", KEY_PLAY_BOOKMARK2, NULL,
- PLAY_BOOKMARK2_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK2_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark3", KEY_PLAY_BOOKMARK3, NULL,
- PLAY_BOOKMARK3_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK3_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark4", KEY_PLAY_BOOKMARK4, NULL,
- PLAY_BOOKMARK4_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK4_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark5", KEY_PLAY_BOOKMARK5, NULL,
- PLAY_BOOKMARK5_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK5_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark6", KEY_PLAY_BOOKMARK6, NULL,
- PLAY_BOOKMARK6_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK6_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark7", KEY_PLAY_BOOKMARK7, NULL,
- PLAY_BOOKMARK7_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK7_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark8", KEY_PLAY_BOOKMARK8, NULL,
- PLAY_BOOKMARK8_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK8_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark9", KEY_PLAY_BOOKMARK9, NULL,
- PLAY_BOOKMARK9_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK9_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_key( "key-play-bookmark10", KEY_PLAY_BOOKMARK10, NULL,
- PLAY_BOOKMARK10_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, VLC_TRUE );
+ PLAY_BOOKMARK10_KEY_TEXT, PLAY_BOOKMARK_KEY_LONGTEXT, true );
add_string( "bookmark1", NULL, NULL,
- BOOKMARK1_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK1_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark2", NULL, NULL,
- BOOKMARK2_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK2_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark3", NULL, NULL,
- BOOKMARK3_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK3_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark4", NULL, NULL,
- BOOKMARK4_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK4_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark5", NULL, NULL,
- BOOKMARK5_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK5_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark6", NULL, NULL,
- BOOKMARK6_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK6_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark7", NULL, NULL,
- BOOKMARK7_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK7_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark8", NULL, NULL,
- BOOKMARK8_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK8_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark9", NULL, NULL,
- BOOKMARK9_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK9_TEXT, BOOKMARK_LONGTEXT, false );
add_string( "bookmark10", NULL, NULL,
- BOOKMARK10_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
+ BOOKMARK10_TEXT, BOOKMARK_LONGTEXT, false );
#define HELP_TEXT \
N_("print help for VLC (can be combined with --advanced and " \
#define VERSION_TEXT \
N_("print version information")
- add_bool( "help", VLC_FALSE, NULL, HELP_TEXT, "", VLC_FALSE );
+ add_bool( "help", false, NULL, HELP_TEXT, "", false );
change_short( 'h' );
change_internal();
change_unsaveable();
- add_bool( "longhelp", VLC_FALSE, NULL, LONGHELP_TEXT, "", VLC_FALSE );
+ add_bool( "longhelp", false, NULL, LONGHELP_TEXT, "", false );
change_short( 'H' );
change_internal();
change_unsaveable();
- add_bool( "help-verbose", VLC_FALSE, NULL, HELP_VERBOSE_TEXT, "",
- VLC_FALSE );
+ add_bool( "help-verbose", false, NULL, HELP_VERBOSE_TEXT, "",
+ false );
change_internal();
change_unsaveable();
- add_bool( "list", VLC_FALSE, NULL, LIST_TEXT, "", VLC_FALSE );
+ add_bool( "list", false, NULL, LIST_TEXT, "", false );
change_short( 'l' );
change_internal();
change_unsaveable();
- add_bool( "list-verbose", VLC_FALSE, NULL, LIST_VERBOSE_TEXT, "",
- VLC_FALSE );
+ add_bool( "list-verbose", false, NULL, LIST_VERBOSE_TEXT, "",
+ false );
change_short( 'l' );
change_internal();
change_unsaveable();
- add_string( "module", NULL, NULL, MODULE_TEXT, "", VLC_FALSE );
+ add_string( "module", NULL, NULL, MODULE_TEXT, "", false );
change_short( 'p' );
change_internal();
change_unsaveable();
- add_bool( "ignore-config", VLC_FALSE, NULL, IGNORE_CONFIG_TEXT, "", VLC_FALSE );
+ add_bool( "ignore-config", false, NULL, IGNORE_CONFIG_TEXT, "", false );
change_internal();
change_unsaveable();
- add_bool( "save-config", VLC_FALSE, NULL, SAVE_CONFIG_TEXT, "",
- VLC_FALSE );
+ add_bool( "save-config", false, NULL, SAVE_CONFIG_TEXT, "",
+ false );
change_internal();
change_unsaveable();
- add_bool( "reset-config", VLC_FALSE, NULL, MODULE_TEXT, "", VLC_FALSE );
+ add_bool( "reset-config", false, NULL, MODULE_TEXT, "", false );
change_internal();
change_unsaveable();
- add_bool( "reset-plugins-cache", VLC_FALSE, NULL,
- RESET_PLUGINS_CACHE_TEXT, "", VLC_FALSE );
+ add_bool( "reset-plugins-cache", false, NULL,
+ RESET_PLUGINS_CACHE_TEXT, "", false );
change_internal();
change_unsaveable();
- add_bool( "version", VLC_FALSE, NULL, VERSION_TEXT, "", VLC_FALSE );
+ add_bool( "version", false, NULL, VERSION_TEXT, "", false );
change_internal();
change_unsaveable();
- add_string( "config", NULL, NULL, CONFIG_TEXT, "", VLC_FALSE );
+ add_string( "config", NULL, NULL, CONFIG_TEXT, "", false );
change_internal();
change_unsaveable();
- add_bool( "version", VLC_FALSE, NULL, VERSION_TEXT, "", VLC_FALSE );
+ add_bool( "version", false, NULL, VERSION_TEXT, "", false );
change_internal();
change_unsaveable();
* the playlist when it is completely initialised.
*****************************************************************************/
int VLC_AddIntf( int i_object, char const *psz_module,
- vlc_bool_t b_block, vlc_bool_t b_play )
+ bool b_block, bool b_play )
{
int i_ret;
LIBVLC_FUNC;
/*****************************************************************************
* VLC_Die: 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.
*****************************************************************************/
int VLC_Die( int i_object )
int VLC_Destroy( int i_object )
{
LIBVLC_FUNC;
- return libvlc_InternalDestroy( p_libvlc, i_object ? VLC_TRUE : VLC_FALSE );
+ return libvlc_InternalDestroy( p_libvlc, i_object ? true : false );
}
/*****************************************************************************
LIBVLC_PLAYLIST_FUNC;
i_err = playlist_AddExt( p_libvlc->p_playlist, psz_target,
NULL, i_mode, i_pos, -1,
- ppsz_options, i_options, VLC_TRUE, VLC_FALSE );
+ ppsz_options, i_options, true, false );
LIBVLC_PLAYLIST_FUNC_END;
return i_err;
}
/*****************************************************************************
* VLC_IsPlaying: Query for Playlist Status
*****************************************************************************/
-vlc_bool_t VLC_IsPlaying( int i_object )
+bool VLC_IsPlaying( int i_object )
{
- vlc_bool_t b_playing;
+ bool b_playing;
LIBVLC_PLAYLIST_FUNC;
if( p_libvlc->p_playlist->p_input )
* \param b_relative seek relative from current position
* \return VLC_SUCCESS on success
*/
-int VLC_TimeSet( int i_object, int i_seconds, vlc_bool_t b_relative )
+int VLC_TimeSet( int i_object, int i_seconds, bool b_relative )
{
input_thread_t *p_input;
vlc_value_t val;
return VLC_ENOOBJ;
}
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "rate-faster", val );
var_Get( p_input, "rate", &val );
vlc_object_release( p_input );
return VLC_ENOOBJ;
}
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_input, "rate-slower", val );
var_Get( p_input, "rate", &val );
vlc_object_release( p_input );
int VLC_PlaylistClear( int i_object )
{
LIBVLC_PLAYLIST_FUNC;
- playlist_Clear( p_libvlc->p_playlist, VLC_TRUE );
+ playlist_Clear( p_libvlc->p_playlist, true );
LIBVLC_PLAYLIST_FUNC_END;
return VLC_SUCCESS;
}
{
VLC_COMMON_MEMBERS
- vlc_bool_t b_ready; ///< Initialization boolean
+ bool b_ready; ///< Initialization boolean
/* Object structure data */
int i_counter; ///< object counter
/* Arch-specific variables */
#if !defined( WIN32 )
- vlc_bool_t b_daemon;
+ bool b_daemon;
#endif
#if defined( SYS_BEOS )
vlc_object_t * p_appthread;
/* Thread properties, if any */
vlc_thread_t thread_id;
- vlc_bool_t b_thread;
+ bool b_thread;
/* Objects thread synchronization */
int pipes[2];
/* Objects management */
unsigned i_refcount;
vlc_destructor_t pf_destructor;
- vlc_bool_t b_attached;
+ bool b_attached;
};
#define ZOOM_SECTION N_("Zoom")
/* Create the BApplication thread and wait for initialization */
vlc_thread_create( vlc_global()->p_appthread, "app thread", AppThread,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE );
+ VLC_THREAD_PRIORITY_LOW, true );
}
/*****************************************************************************
block_t **pp_last;
size_t i_depth;
size_t i_size;
- vlc_bool_t b_force_wake;
+ bool b_force_wake;
};
block_fifo_t *__block_FifoNew( vlc_object_t *p_obj )
p_fifo->p_first = NULL;
p_fifo->pp_last = &p_fifo->p_first;
p_fifo->i_depth = p_fifo->i_size = 0;
- p_fifo->b_force_wake = VLC_FALSE;
+ p_fifo->b_force_wake = false;
return p_fifo;
}
{
vlc_mutex_lock( &p_fifo->lock );
if( p_fifo->p_first == NULL )
- p_fifo->b_force_wake = VLC_TRUE;
+ p_fifo->b_force_wake = true;
vlc_cond_signal( &p_fifo->wait );
vlc_mutex_unlock( &p_fifo->lock );
}
b = p_fifo->p_first;
- p_fifo->b_force_wake = VLC_FALSE;
+ p_fifo->b_force_wake = false;
if( b == NULL )
{
/* Forced wakeup */
#elif defined( __i386__ ) || defined( __x86_64__ )
volatile unsigned int i_eax, i_ebx, i_ecx, i_edx;
- volatile vlc_bool_t b_amd;
+ volatile bool b_amd;
/* Needed for x86 CPU capabilities detection */
# if defined( __x86_64__ )
msg_Err( p_this, "out of memory" );
return;
}
- p_probe->p_module = module_Need( p_probe, "devices probe", "", VLC_FALSE );
+ p_probe->p_module = module_Need( p_probe, "devices probe", "", false );
if( p_probe->p_module == NULL )
{
msg_Err( p_this, "no devices probing module could be loaded" );
/* Used in vlc_event_send() to make sure to behave
Correctly when vlc_event_detach was called during
a callback */
- vlc_bool_t b_sublistener_removed;
+ bool b_sublistener_removed;
} vlc_event_listeners_group_t;
};
#endif
-static vlc_bool_t
+static bool
listeners_are_equal( vlc_event_listener_t * listener1,
vlc_event_listener_t * listener2 )
{
listener1->p_user_data == listener2->p_user_data;
}
-static vlc_bool_t
+static bool
group_contains_listener( vlc_event_listeners_group_t * group,
vlc_event_listener_t * searched_listener )
{
vlc_event_listener_t * listener;
FOREACH_ARRAY( listener, group->listeners )
if( listeners_are_equal(searched_listener, listener) )
- return VLC_TRUE;
+ return true;
FOREACH_END()
- return VLC_FALSE;
+ return false;
}
/*****************************************************************************
vlc_mutex_lock( &p_em->event_sending_lock ) ;
/* Track item removed from *this* thread, with a simple flag */
- listeners_group->b_sublistener_removed = VLC_FALSE;
+ listeners_group->b_sublistener_removed = false;
for( i = 0; i < i_cached_listeners; i++ )
{
if( listeners_group->b_sublistener_removed )
{
/* If a callback was removed, this gets called */
- vlc_bool_t valid_listener;
+ bool valid_listener;
vlc_mutex_lock( &p_em->object_lock );
valid_listener = group_contains_listener( listeners_group, cached_listener );
vlc_mutex_unlock( &p_em->object_lock );
{
/* Tell vlc_event_send, we did remove an item from that group,
in case vlc_event_send is in our caller stack */
- listeners_group->b_sublistener_removed = VLC_TRUE;
+ listeners_group->b_sublistener_removed = true;
/* that's our listener */
ARRAY_REMOVE( listeners_group->listeners,
es_format_Init( &p_dec->fmt_in, VIDEO_ES, fmt->i_chroma );
es_format_Init( &p_dec->fmt_out, VIDEO_ES, 0 );
p_dec->fmt_in.video = *fmt;
- p_dec->b_pace_control = VLC_TRUE;
+ p_dec->b_pace_control = true;
p_dec->pf_vout_buffer_new = video_new_buffer;
p_dec->pf_vout_buffer_del = video_del_buffer;
for( i = 0; i < 2; i++ )
{
vlc_mutex_init( (vlc_object_t *)NULL, &QUEUE(i).lock );
- QUEUE(i).b_overflow = VLC_FALSE;
+ QUEUE(i).b_overflow = false;
QUEUE(i).i_id = i;
QUEUE(i).i_start = 0;
QUEUE(i).i_stop = 0;
else
{
/* Pheeew, at last, there is room in the queue! */
- p_queue->b_overflow = VLC_FALSE;
+ p_queue->b_overflow = false;
}
}
else if( ((p_queue->i_stop - p_queue->i_start + 2) % VLC_MSG_QSIZE) == 0 )
if( ((p_queue->i_stop - p_queue->i_start + 2) % VLC_MSG_QSIZE) == 0 )
{
- p_queue->b_overflow = VLC_TRUE;
+ p_queue->b_overflow = true;
if( p_queue->i_id == MSG_QUEUE_NORMAL )
{
static void PrintObject ( vlc_object_t *, const char * );
static void DumpStructure ( vlc_object_t *, int, char * );
static int FindIndex ( vlc_object_t *, vlc_object_t **, int );
-static void SetAttachment ( vlc_object_t *, vlc_bool_t );
+static void SetAttachment ( vlc_object_t *, bool );
static vlc_list_t * NewList ( int );
static void ListReplace ( vlc_list_t *, vlc_object_t *, int );
p_new->psz_object_name = NULL;
- p_new->b_die = VLC_FALSE;
- p_new->b_error = VLC_FALSE;
- p_new->b_dead = VLC_FALSE;
- p_priv->b_attached = VLC_FALSE;
- p_new->b_force = VLC_FALSE;
+ p_new->b_die = false;
+ p_new->b_error = false;
+ p_new->b_dead = false;
+ p_priv->b_attached = false;
+ p_new->b_force = false;
p_new->psz_header = NULL;
p_libvlc_global->i_objects = 1;
p_libvlc_global->pp_objects = malloc( sizeof(vlc_object_t *) );
p_libvlc_global->pp_objects[0] = p_new;
- p_priv->b_attached = VLC_TRUE;
+ p_priv->b_attached = true;
vlc_mutex_init( p_new, &structure_lock );
}
else
if( i_type == VLC_OBJECT_LIBVLC )
{
p_new->p_libvlc = (libvlc_int_t*)p_new;
- p_priv->b_attached = VLC_TRUE;
+ p_priv->b_attached = true;
}
else
{
p_priv->i_refcount = 1;
p_priv->pf_destructor = kVLCDestructor;
- p_priv->b_thread = VLC_FALSE;
+ p_priv->b_thread = false;
p_new->p_parent = NULL;
p_new->pp_children = NULL;
p_new->i_children = 0;
{
int pfd[2] = { -1, -1 };
struct vlc_object_internals_t *internals = obj->p_internals;
- vlc_bool_t killed = VLC_FALSE;
+ bool killed = false;
vlc_spin_lock (&internals->spin);
if (internals->pipes[0] == -1)
*
* @return true if the object is dying and should terminate.
*/
-vlc_bool_t __vlc_object_wait( vlc_object_t *obj )
+bool __vlc_object_wait( vlc_object_t *obj )
{
vlc_assert_locked( &obj->object_lock );
vlc_cond_wait( &obj->object_wait, &obj->object_lock );
*
* @return true iff the object has not been killed yet
*/
-vlc_bool_t __vlc_object_alive( vlc_object_t *obj )
+bool __vlc_object_alive( vlc_object_t *obj )
{
vlc_assert_locked( &obj->object_lock );
return !obj->b_die;
int fd;
vlc_mutex_lock( &p_this->object_lock );
- p_this->b_die = VLC_TRUE;
+ p_this->b_die = true;
vlc_spin_lock (&internals->spin);
fd = internals->pipes[1];
*****************************************************************************/
void __vlc_object_release( vlc_object_t *p_this )
{
- vlc_bool_t b_should_destroy;
+ bool b_should_destroy;
vlc_mutex_lock( &structure_lock );
/* Climb up the tree to see whether we are connected with the root */
if( p_parent->p_internals->b_attached )
{
- SetAttachment( p_this, VLC_TRUE );
+ SetAttachment( p_this, true );
}
vlc_mutex_unlock( &structure_lock );
/* Climb up the tree to see whether we are connected with the root */
if( p_this->p_parent->p_internals->b_attached )
{
- SetAttachment( p_this, VLC_FALSE );
+ SetAttachment( p_this, false );
}
DetachObject( p_this );
* This function is used by the attach and detach functions to propagate
* the b_attached flag in a subtree.
*****************************************************************************/
-static void SetAttachment( vlc_object_t *p_this, vlc_bool_t b_attached )
+static void SetAttachment( vlc_object_t *p_this, bool b_attached )
{
int i_index;
static int CounterUpdate( vlc_object_t *p_this,
counter_t *p_counter,
vlc_value_t val, vlc_value_t * );
-static void TimerDump( vlc_object_t *p_this, counter_t *p_counter, vlc_bool_t);
+static void TimerDump( vlc_object_t *p_this, counter_t *p_counter, bool);
/*****************************************************************************
* Exported functions
p_counter->i_samples, p_sample );
p_sample->date = 0; p_sample->value.i_int = 0;
}
- if( p_counter->pp_samples[0]->value.b_bool == VLC_TRUE )
+ if( p_counter->pp_samples[0]->value.b_bool == true )
{
msg_Warn( p_obj, "timer %s was already started !", psz_name );
vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock );
return;
}
- p_counter->pp_samples[0]->value.b_bool = VLC_TRUE;
+ p_counter->pp_samples[0]->value.b_bool = true;
p_counter->pp_samples[0]->date = mdate();
vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock );
}
vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock );
return;
}
- p_counter->pp_samples[0]->value.b_bool = VLC_FALSE;
+ p_counter->pp_samples[0]->value.b_bool = false;
p_counter->pp_samples[1]->value.i_int += 1;
p_counter->pp_samples[0]->date = mdate() - p_counter->pp_samples[0]->date;
p_counter->pp_samples[1]->date += p_counter->pp_samples[0]->date;
break;
}
}
- TimerDump( p_obj, p_counter, VLC_TRUE );
+ TimerDump( p_obj, p_counter, true );
vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock );
}
if( !p_obj->p_libvlc->b_stats ) return;
vlc_mutex_lock( &p_obj->p_libvlc->timer_lock );
for ( i = 0 ; i< p_obj->p_libvlc->i_timers ; i++ )
- TimerDump( p_obj, p_obj->p_libvlc->pp_timers[i], VLC_FALSE );
+ TimerDump( p_obj, p_obj->p_libvlc->pp_timers[i], false );
vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock );
}
}
static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
- vlc_bool_t b_total )
+ bool b_total )
{
mtime_t last, total;
int i_total;
}
i_total = p_counter->pp_samples[1]->value.i_int;
total = p_counter->pp_samples[1]->date;
- if( p_counter->pp_samples[0]->value.b_bool == VLC_TRUE )
+ if( p_counter->pp_samples[0]->value.b_bool == true )
{
last = mdate() - p_counter->pp_samples[0]->date;
i_total += 1;
** You can also use the faster Win9x implementation but you might
** experience problems with it.
*/
-static vlc_bool_t b_fast_mutex = VLC_FALSE;
+static bool b_fast_mutex = false;
/*
** On Windows 9x/Me you can use a fast but incorrect condition variables
** implementation (more precisely there is a possibility for a race
if( IsDebuggerPresent() )
{
/* SignalObjectAndWait() is problematic under a debugger */
- b_fast_mutex = VLC_TRUE;
+ b_fast_mutex = true;
i_win9x_cv = 1;
}
#elif defined( HAVE_KERNEL_SCHEDULER_H )
i_status = VLC_THREADS_PENDING;
/* We should be safe now. Do all the initialization stuff we want. */
- p_libvlc_global->b_ready = VLC_FALSE;
+ p_libvlc_global->b_ready = false;
#if defined( UNDER_CE )
/* Nothing to initialize */
*****************************************************************************/
int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line,
const char *psz_name, void * ( *func ) ( void * ),
- int i_priority, vlc_bool_t b_wait )
+ int i_priority, bool b_wait )
{
int i_ret;
void *p_data = (void *)p_this;
vlc_object_wait( p_this );
}
- p_priv->b_thread = VLC_TRUE;
+ p_priv->b_thread = true;
#if defined( WIN32 ) || defined( UNDER_CE )
msg_Dbg( p_this, "thread %u (%s) created at priority %d (%s:%d)",
msg_Err( p_this, "thread_join(%u) failed at %s:%d (%u)",
(unsigned int)p_priv->thread_id.id,
psz_file, i_line, (unsigned int)GetLastError() );
- p_priv->b_thread = VLC_FALSE;
+ p_priv->b_thread = false;
return;
}
#endif
- p_priv->b_thread = VLC_FALSE;
+ p_priv->b_thread = false;
}
* Local Prototypes
*****************************************************************************/
static void EmptyRelease( update_t *p_update );
-static vlc_bool_t GetUpdateFile( update_t *p_update );
+static bool GetUpdateFile( update_t *p_update );
static int CompareReleases( const struct update_release_t *p1,
const struct update_release_t *p2 );
static char * size_str( long int l_size );
* p_update has to be locked when calling this function
*
* \param p_update pointer to update struct
- * \return VLC_TRUE if the update is valid and authenticated
+ * \return true if the update is valid and authenticated
*/
-static vlc_bool_t GetUpdateFile( update_t *p_update )
+static bool GetUpdateFile( update_t *p_update )
{
stream_t *p_stream = NULL;
int i_major = 0;
{
msg_Info( p_update->p_libvlc, "Status file authenticated" );
gcry_md_close( hd );
- return VLC_TRUE;
+ return true;
}
error_hd:
if( p_stream )
stream_Delete( p_stream );
free( psz_version_line );
- return VLC_FALSE;
+ return false;
}
{
VLC_COMMON_MEMBERS
update_t *p_update;
- void (*pf_callback)( void *, vlc_bool_t );
+ void (*pf_callback)( void *, bool );
void *p_data;
} update_check_thread_t;
* \param p_data pointer to some datas to give to the callback
* \returns nothing
*/
-void update_Check( update_t *p_update, void (*pf_callback)( void*, vlc_bool_t ), void *p_data )
+void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void *p_data )
{
assert( p_update );
p_uct->p_data = p_data;
vlc_thread_create( p_uct, "check for update", update_CheckReal,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE );
+ VLC_THREAD_PRIORITY_LOW, false );
}
void update_CheckReal( update_check_thread_t *p_uct )
{
- vlc_bool_t b_ret;
+ bool b_ret;
vlc_mutex_lock( &p_uct->p_update->lock );
EmptyRelease( p_uct->p_update );
p_udt->psz_destdir = psz_destdir ? strdup( psz_destdir ) : NULL;
vlc_thread_create( p_udt, "download update", update_DownloadReal,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE );
+ VLC_THREAD_PRIORITY_LOW, false );
}
void update_DownloadReal( update_download_thread_t *p_udt )
{
utf8_unlink( psz_destfile );
- intf_UserFatal( p_udt, VLC_TRUE, _("File can not be verified"),
+ intf_UserFatal( p_udt, true, _("File can not be verified"),
_("It was not possible to download a cryptographic signature for "
"downloaded file \"%s\", and so VLC deleted it."),
psz_destfile );
{
utf8_unlink( psz_destfile );
msg_Err( p_udt, "Invalid signature issuer" );
- intf_UserFatal( p_udt, VLC_TRUE, _("Invalid signature"),
+ intf_UserFatal( p_udt, true, _("Invalid signature"),
_("The cryptographic signature for downloaded file \"%s\" was "
"invalid and couldn't be used to securely verify it, and so "
"VLC deleted it."),
{
utf8_unlink( psz_destfile );
msg_Err( p_udt, "Invalid signature type" );
- intf_UserFatal( p_udt, VLC_TRUE, _("Invalid signature"),
+ intf_UserFatal( p_udt, true, _("Invalid signature"),
_("The cryptographic signature for downloaded file \"%s\" was "
"invalid and couldn't be used to securely verify it, and so "
"VLC deleted it."),
{
msg_Err( p_udt, "Unable to hash %s", psz_destfile );
utf8_unlink( psz_destfile );
- intf_UserFatal( p_udt, VLC_TRUE, _("File not verifiable"),
+ intf_UserFatal( p_udt, true, _("File not verifiable"),
_("It was not possible to securely verify downloaded file \"%s\", "
"and so VLC deleted it."),
psz_destfile );
p_hash[1] != sign.hash_verification[1] )
{
utf8_unlink( psz_destfile );
- intf_UserFatal( p_udt, VLC_TRUE, _("File corrupted"),
+ intf_UserFatal( p_udt, true, _("File corrupted"),
_("Downloaded file \"%s\" was corrupted, and so VLC deleted it."),
psz_destfile );
msg_Err( p_udt, "Bad SHA1 hash for %s", psz_destfile );
!= VLC_SUCCESS )
{
utf8_unlink( psz_destfile );
- intf_UserFatal( p_udt, VLC_TRUE, _("File corrupted"),
+ intf_UserFatal( p_udt, true, _("File corrupted"),
_("Downloaded file \"%s\" was corrupted, and so VLC deleted it."),
psz_destfile );
msg_Err( p_udt, "BAD SIGNATURE for %s", psz_destfile );
p_var->choices_text.i_count = 0;
p_var->choices_text.p_values = NULL;
- p_var->b_incallback = VLC_FALSE;
+ p_var->b_incallback = false;
p_var->i_entries = 0;
p_var->p_entries = NULL;
{
case VLC_VAR_BOOL:
p_var->pf_cmp = CmpBool;
- p_var->val.b_bool = VLC_FALSE;
+ p_var->val.b_bool = false;
break;
case VLC_VAR_INTEGER:
case VLC_VAR_HOTKEY:
int i_entries = p_var->i_entries;
callback_entry_t *p_entries = p_var->p_entries;
- p_var->b_incallback = VLC_TRUE;
+ p_var->b_incallback = true;
vlc_mutex_unlock( &p_priv->var_lock );
/* The real calls */
}
p_var = &p_priv->p_vars[i_var];
- p_var->b_incallback = VLC_FALSE;
+ p_var->b_incallback = false;
}
}
break;
int i_entries = p_var->i_entries;
callback_entry_t *p_entries = p_var->p_entries;
- p_var->b_incallback = VLC_TRUE;
+ p_var->b_incallback = true;
vlc_mutex_unlock( &p_priv->var_lock );
/* The real calls */
}
p_var = &p_priv->p_vars[i_var];
- p_var->b_incallback = VLC_FALSE;
+ p_var->b_incallback = false;
}
/* Free data if needed */
int i_entries = p_var->i_entries;
callback_entry_t *p_entries = p_var->p_entries;
- p_var->b_incallback = VLC_TRUE;
+ p_var->b_incallback = true;
vlc_mutex_unlock( &p_priv->var_lock );
/* The real calls */
}
p_var = &p_priv->p_vars[i_var];
- p_var->b_incallback = VLC_FALSE;
+ p_var->b_incallback = false;
}
vlc_mutex_unlock( &p_priv->var_lock );
{
char *psz_name, *psz_value;
int i_type;
- vlc_bool_t b_isno = VLC_FALSE;
+ bool b_isno = false;
vlc_value_t val;
val.psz_string = NULL;
}
else goto cleanup; /* Option doesn't exist */
- b_isno = VLC_TRUE;
+ b_isno = true;
i_type = config_GetType( p_obj, psz_name );
}
if( !i_type ) goto cleanup; /* Option doesn't exist */
int i_var, i_tries = 0;
vlc_object_internals_t *p_priv = p_this->p_internals;
- while( VLC_TRUE )
+ while( true )
{
i_var = Lookup( p_priv->p_vars, p_priv->i_vars, psz_name );
if( i_var < 0 )
vlc_list_t choices_text;
/** Set to TRUE if the variable is in a callback */
- vlc_bool_t b_incallback;
+ bool b_incallback;
/** Number of registered callbacks */
int i_entries;
/* Run the helper thread */
if( vlc_thread_create( p_helper, "IPC helper", IPCHelperThread,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_LOW, true ) )
{
msg_Err( p_this, "one instance mode DISABLED "
"(IPC helper thread couldn't be created)" );
( ( i_opt || p_data->enqueue ) ? 0 : PLAYLIST_GO ),
PLAYLIST_END, -1,
(char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
- i_options, VLC_TRUE, VLC_FALSE );
+ i_options, true, false );
i_opt += i_options;
}
LOAD_IMMEDIATE( pp_cache[i]->i_time );
LOAD_IMMEDIATE( pp_cache[i]->i_size );
LOAD_IMMEDIATE( pp_cache[i]->b_junk );
- pp_cache[i]->b_used = VLC_FALSE;
+ pp_cache[i]->b_used = false;
if( pp_cache[i]->b_junk ) continue;
sizeof (p_module->p_config[i].saved));
}
- p_module->p_config[i].b_dirty = VLC_FALSE;
+ p_module->p_config[i].b_dirty = false;
p_module->p_config[i].p_lock = &p_module->object_lock;
p_cchild->pf_deactivate = p_child->pf_deactivate;
}
- p_cache->b_loaded = VLC_TRUE;
- p_module->b_loaded = VLC_FALSE;
+ p_cache->b_loaded = true;
+ p_module->b_loaded = false;
}
/*****************************************************************************
if (module == NULL)
return NULL;
- module->b_reentrant = module->b_unloadable = VLC_TRUE;
+ module->b_reentrant = module->b_unloadable = true;
module->psz_object_name = module->psz_longname = default_name;
module->psz_capability = (char*)"";
module->i_score = 1;
return NULL;
vlc_object_attach (submodule, module);
- submodule->b_submodule = VLC_TRUE;
+ submodule->b_submodule = true;
/* Muahahaha! Heritage! Polymorphism! Ugliness!! */
memcpy (submodule->pp_shortcuts, module->pp_shortcuts,
}
case VLC_CONFIG_ADVANCED:
- item->b_advanced = VLC_TRUE;
+ item->b_advanced = true;
ret = 0;
break;
case VLC_CONFIG_VOLATILE:
- item->b_unsaveable = VLC_TRUE;
+ item->b_unsaveable = true;
ret = 0;
break;
case VLC_CONFIG_PERSISTENT:
- item->b_autosave = VLC_TRUE;
+ item->b_autosave = true;
ret = 0;
break;
case VLC_CONFIG_RESTART:
- item->b_restart = VLC_TRUE;
+ item->b_restart = true;
ret = 0;
break;
case VLC_CONFIG_PRIVATE:
- item->b_internal = VLC_TRUE;
+ item->b_internal = true;
ret = 0;
break;
case VLC_CONFIG_REMOVED:
- item->b_removed = VLC_TRUE;
+ item->b_removed = true;
ret = 0;
break;
}
case VLC_CONFIG_SAFE:
- item->b_safe = VLC_TRUE;
+ item->b_safe = true;
ret = 0;
break;
}
static module_t * AllocatePlugin( vlc_object_t *, char * );
#endif
static int AllocateBuiltinModule( vlc_object_t *, int ( * ) ( module_t * ) );
-static int DeleteModule ( module_t *, vlc_bool_t );
+static int DeleteModule ( module_t *, bool );
#ifdef HAVE_DYNAMIC_PLUGINS
static void DupModule ( module_t * );
static void UndupModule ( module_t * );
p_bank->i_cache = p_bank->i_loaded_cache = 0;
p_bank->pp_cache = p_bank->pp_loaded_cache = NULL;
p_bank->b_cache = p_bank->b_cache_dirty =
- p_bank->b_cache_delete = VLC_FALSE;
+ p_bank->b_cache_delete = false;
/* Everything worked, attach the object */
p_libvlc_global->p_module_bank = p_bank;
{
p_next = (module_t *)p_libvlc_global->p_module_bank->pp_children[0];
- if( DeleteModule( p_next, VLC_TRUE ) )
+ if( DeleteModule( p_next, true ) )
{
/* Module deletion failed */
msg_Err( p_this, "module \"%s\" can't be removed, trying harder",
vlc_mutex_unlock( lock );
return;
}
- p_libvlc_global->p_module_bank->b_builtins = VLC_TRUE;
+ p_libvlc_global->p_module_bank->b_builtins = true;
vlc_mutex_unlock( lock );
msg_Dbg( p_this, "checking builtin modules" );
vlc_mutex_unlock( lock );
return;
}
- p_libvlc_global->p_module_bank->b_plugins = VLC_TRUE;
+ p_libvlc_global->p_module_bank->b_plugins = true;
vlc_mutex_unlock( lock );
msg_Dbg( p_this, "checking plugin modules" );
if( config_GetInt( p_this, "plugins-cache" ) )
- p_libvlc_global->p_module_bank->b_cache = VLC_TRUE;
+ p_libvlc_global->p_module_bank->b_cache = true;
if( p_libvlc_global->p_module_bank->b_cache ||
p_libvlc_global->p_module_bank->b_cache_delete ) CacheLoad( p_this );
* \param cap the capability to check
* \return TRUE if the module have the capability
*/
-vlc_bool_t module_IsCapable( const module_t *m, const char *cap )
+bool module_IsCapable( const module_t *m, const char *cap )
{
return !strcmp( m->psz_capability, cap );
}
* \param long_name TRUE to have the long name of the module
* \return the short or long name of the module
*/
-const char *module_GetName( const module_t *m, vlc_bool_t long_name )
+const char *module_GetName( const module_t *m, bool long_name )
{
if( long_name && ( m->psz_longname != NULL) )
return m->psz_longname;
* \return the module or NULL in case of a failure
*/
module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
- const char *psz_name, vlc_bool_t b_strict )
+ const char *psz_name, bool b_strict )
{
typedef struct module_list_t module_list_t;
{
module_t *p_module;
int i_score;
- vlc_bool_t b_force;
+ bool b_force;
module_list_t *p_next;
};
int i_shortcuts = 0;
char *psz_shortcuts = NULL, *psz_var = NULL, *psz_alias = NULL;
- vlc_bool_t b_force_backup = p_this->b_force;
+ bool b_force_backup = p_this->b_force;
/* Deal with variables */
{
if( !strcmp(psz_last_shortcut, "none") )
{
- b_strict = VLC_TRUE;
+ b_strict = true;
i_shortcuts--;
}
else if( !strcmp(psz_last_shortcut, "any") )
{
- b_strict = VLC_FALSE;
+ b_strict = false;
i_shortcuts--;
}
}
/* If we required a shortcut, check this plugin provides it. */
if( i_shortcuts > 0 )
{
- vlc_bool_t b_trash;
+ bool b_trash;
const char *psz_name = psz_shortcuts;
/* Let's drop modules with a <= 0 score (unless they are
{
CacheMerge( p_this, p_module, p_new_module );
vlc_object_attach( p_new_module, p_module );
- DeleteModule( p_new_module, VLC_TRUE );
+ DeleteModule( p_new_module, true );
}
}
#endif
* \param psz_name th name of the module
* \return TRUE if the module exists
*/
-vlc_bool_t __module_Exists( vlc_object_t *p_this, const char * psz_name )
+bool __module_Exists( vlc_object_t *p_this, const char * psz_name )
{
module_t *p_module = __module_Find( p_this, psz_name );
if( p_module )
{
module_Put( p_module );
- return VLC_TRUE;
+ return true;
}
else
{
- return VLC_FALSE;
+ return false;
}
}
psz_ret[j] = strdup( k>=0?p_module->pp_shortcuts[k]
:p_module->psz_object_name );
if( pppsz_longname )
- (*pppsz_longname)[j] = strdup( module_GetName( p_module, VLC_TRUE ) );
+ (*pppsz_longname)[j] = strdup( module_GetName( p_module, true ) );
j++;
}
}
module_config_t *p_item = NULL, *p_end = NULL;
p_module = p_cache_entry->p_module;
- p_module->b_loaded = VLC_FALSE;
+ p_module->b_loaded = false;
/* For now we force loading if the module's config contains
* callbacks or actions.
}
}
if( p_module == p_cache_entry->p_module )
- p_cache_entry->b_used = VLC_TRUE;
+ p_cache_entry->b_used = true;
}
}
/* Everything worked fine !
* The module is ready to be added to the list. */
- p_module->b_builtin = VLC_FALSE;
+ p_module->b_builtin = false;
/* msg_Dbg( p_this, "plugin \"%s\", %s",
p_module->psz_object_name, p_module->psz_longname ); */
p_bank->pp_cache[p_bank->i_cache]->i_time = i_file_time;
p_bank->pp_cache[p_bank->i_cache]->i_size = i_file_size;
p_bank->pp_cache[p_bank->i_cache]->b_junk = p_module ? 0 : 1;
- p_bank->pp_cache[p_bank->i_cache]->b_used = VLC_TRUE;
+ p_bank->pp_cache[p_bank->i_cache]->b_used = true;
p_bank->pp_cache[p_bank->i_cache]->p_module = p_module;
p_bank->i_cache++;
}
/* We need to fill these since they may be needed by module_Call() */
p_module->psz_filename = psz_file;
p_module->handle = handle;
- p_module->b_loaded = VLC_TRUE;
+ p_module->b_loaded = true;
/* Initialize the module: fill p_module, default config */
if( module_Call( p_module ) != 0 )
p_module->psz_filename = strdup( p_module->psz_filename );
/* Everything worked fine ! The module is ready to be added to the list. */
- p_module->b_builtin = VLC_FALSE;
+ p_module->b_builtin = false;
return p_module;
}
}
/* Everything worked fine ! The module is ready to be added to the list. */
- p_module->b_builtin = VLC_TRUE;
+ p_module->b_builtin = true;
/* msg_Dbg( p_this, "builtin \"%s\", %s",
p_module->psz_object_name, p_module->psz_longname ); */
*****************************************************************************
* This function can only be called if the module isn't being used.
*****************************************************************************/
-static int DeleteModule( module_t * p_module, vlc_bool_t b_detach )
+static int DeleteModule( module_t * p_module, bool b_detach )
{
if( !p_module ) return VLC_EGENERIC;
if( b_detach )
int i_usage;
- vlc_bool_t b_builtins;
- vlc_bool_t b_plugins;
+ bool b_builtins;
+ bool b_plugins;
/* Plugins cache */
- vlc_bool_t b_cache;
- vlc_bool_t b_cache_dirty;
- vlc_bool_t b_cache_delete;
+ bool b_cache;
+ bool b_cache_dirty;
+ bool b_cache_delete;
int i_cache;
module_cache_t **pp_cache;
char *psz_file;
int64_t i_time;
int64_t i_size;
- vlc_bool_t b_junk;
+ bool b_junk;
/* Optional extra data */
module_t *p_module;
- vlc_bool_t b_used;
+ bool b_used;
};
int i_score; /**< Score for the capability */
uint32_t i_cpu; /**< Required CPU capabilities */
- vlc_bool_t b_unloadable; /**< Can we be dlclosed? */
- vlc_bool_t b_reentrant; /**< Are we reentrant? */
- vlc_bool_t b_submodule; /**< Is this a submodule? */
+ bool b_unloadable; /**< Can we be dlclosed? */
+ bool b_reentrant; /**< Are we reentrant? */
+ bool b_submodule; /**< Is this a submodule? */
/* Callbacks */
int ( * pf_activate ) ( vlc_object_t * );
module_handle_t handle; /* Unique handle */
char * psz_filename; /* Module filename */
- vlc_bool_t b_builtin; /* Set to true if the module is built in */
- vlc_bool_t b_loaded; /* Set to true if the dll is loaded */
+ bool b_builtin; /* Set to true if the module is built in */
+ bool b_loaded; /* Set to true if the dll is loaded */
};
uint8_t host[17];
uint8_t i_bytes_match;
uint8_t i_bits_mask;
- vlc_bool_t b_allow;
+ bool b_allow;
} vlc_acl_entry_t;
struct vlc_acl_t
vlc_object_t *p_owner;
unsigned i_size;
vlc_acl_entry_t *p_entries;
- vlc_bool_t b_allow_default;
+ bool b_allow_default;
};
static int ACL_Resolve( vlc_object_t *p_this, uint8_t *p_bytes,
* Items are always matched in the same order as they are added.
*/
int ACL_AddNet( vlc_acl_t *p_acl, const char *psz_ip, int i_len,
- vlc_bool_t b_allow )
+ bool b_allow )
{
vlc_acl_entry_t *p_ent;
unsigned i_size;
/**
* Creates an empty ACL.
*
- * @param b_allow whether to grant (VLC_TRUE) or deny (VLC_FALSE) access
+ * @param b_allow whether to grant (true) or deny (false) access
* by default (ie if none of the ACL entries matched).
*
* @return an ACL object. NULL in case of error.
*/
-vlc_acl_t *__ACL_Create( vlc_object_t *p_this, vlc_bool_t b_allow )
+vlc_acl_t *__ACL_Create( vlc_object_t *p_this, bool b_allow )
{
vlc_acl_t *p_acl;
*ptr++ = '\0'; /* separate address from mask length */
if( (ptr != NULL)
- ? ACL_AddNet( p_acl, psz_ip, atoi( ptr ), VLC_TRUE )
- : ACL_AddHost( p_acl, psz_ip, VLC_TRUE ) )
+ ? ACL_AddNet( p_acl, psz_ip, atoi( ptr ), true )
+ : ACL_AddHost( p_acl, psz_ip, true ) )
{
msg_Err( p_acl->p_owner, "cannot add ACL from %s", psz_path );
goto error;
#if defined (HAVE_GETADDRINFO)
# ifdef AI_IDN
/* Run-time I18n Domain Names support */
- static vlc_bool_t b_idn = VLC_TRUE; /* beware of thread-safety */
+ static bool b_idn = true; /* beware of thread-safety */
if (b_idn)
{
/* IDN not available: disable and retry without it */
hints.ai_flags &= ~AI_IDN;
- b_idn = VLC_FALSE;
+ b_idn = false;
msg_Info (p_this, "International Domain Names not supported");
}
# endif
if( !strcmp( stream->psz_mime, "video/x-ms-asf-stream" ) )
{
- vlc_bool_t b_xplaystream = VLC_FALSE;
+ bool b_xplaystream = false;
int i;
httpd_MsgAdd( answer, "Content-type", "%s",
if( !strcasecmp( query->name[i], "Pragma" ) &&
strstr( query->value[i], "xPlayStrm=1" ) )
{
- b_xplaystream = VLC_TRUE;
+ b_xplaystream = true;
}
}
/* create the thread */
if( vlc_thread_create( host, "httpd host thread", httpd_HostThread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Err( p_this, "cannot spawn http host thread" );
goto error;
/* register a new url */
static httpd_url_t *httpd_UrlNewPrivate( httpd_host_t *host, const char *psz_url,
const char *psz_user, const char *psz_password,
- const vlc_acl_t *p_acl, vlc_bool_t b_check )
+ const vlc_acl_t *p_acl, bool b_check )
{
httpd_url_t *url;
int i;
const vlc_acl_t *p_acl )
{
return httpd_UrlNewPrivate( host, psz_url, psz_user,
- psz_password, p_acl, VLC_FALSE );
+ psz_password, p_acl, false );
}
httpd_url_t *httpd_UrlNewUnique( httpd_host_t *host, const char *psz_url,
const vlc_acl_t *p_acl )
{
return httpd_UrlNewPrivate( host, psz_url, psz_user,
- psz_password, p_acl, VLC_TRUE );
+ psz_password, p_acl, true );
}
/* register callback on a url */
cl->i_buffer = 0;
cl->p_buffer = malloc( cl->i_buffer_size );
cl->i_mode = HTTPD_CLIENT_FILE;
- cl->b_read_waiting = VLC_FALSE;
+ cl->b_read_waiting = false;
httpd_MsgInit( &cl->query );
httpd_MsgInit( &cl->answer );
counter_t *p_total_counter = stats_CounterCreate( host, VLC_VAR_INTEGER, STATS_COUNTER );
counter_t *p_active_counter = stats_CounterCreate( host, VLC_VAR_INTEGER, STATS_COUNTER );
int evfd;
- vlc_bool_t b_die;
+ bool b_die;
vlc_object_lock( host );
evfd = vlc_object_waitpipe( VLC_OBJECT( host ) );
/* add all socket that should be read/write and close dead connection */
vlc_mutex_lock( &host->lock );
mtime_t now = mdate();
- vlc_bool_t b_low_delay = VLC_FALSE;
+ bool b_low_delay = false;
for(int i_client = 0; i_client < host->i_client; i_client++ )
{
}
else
{
- vlc_bool_t b_auth_failed = VLC_FALSE;
- vlc_bool_t b_hosts_failed = VLC_FALSE;
+ bool b_auth_failed = false;
+ bool b_hosts_failed = false;
/* Search the url and trigger callbacks */
for(int i = 0; i < host->i_url; i++ )
if( ( httpd_ClientIP( cl, ip ) == NULL )
|| ACL_Check( url->p_acl, ip ) )
{
- b_hosts_failed = VLC_TRUE;
+ b_hosts_failed = true;
break;
}
}
"Basic realm=\"%s\"",
url->psz_user );
/* We fail for all url */
- b_auth_failed = VLC_TRUE;
+ b_auth_failed = true;
free( user );
break;
}
{
const char *psz_connection = httpd_MsgGet( &cl->answer, "Connection" );
const char *psz_query = httpd_MsgGet( &cl->query, "Connection" );
- vlc_bool_t b_connection = VLC_FALSE;
- vlc_bool_t b_keepalive = VLC_FALSE;
- vlc_bool_t b_query = VLC_FALSE;
+ bool b_connection = false;
+ bool b_keepalive = false;
+ bool b_query = false;
cl->url = NULL;
if( psz_connection )
free( cl->p_buffer );
cl->p_buffer = malloc( cl->i_buffer_size );
cl->i_state = HTTPD_CLIENT_RECEIVING;
- cl->b_read_waiting = VLC_FALSE;
+ cl->b_read_waiting = false;
}
else
{
if (pufd->events != 0)
nfd++;
else
- b_low_delay = VLC_TRUE;
+ b_low_delay = true;
}
vlc_mutex_unlock( &host->lock );
cl->i_state == HTTPD_CLIENT_SENDING &&
(pufd->revents & POLLIN) )
{
- cl->b_read_waiting = VLC_TRUE;
+ cl->b_read_waiting = true;
}
}
vlc_mutex_unlock( &host->lock );
*****************************************************************************/
ssize_t
__net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
- uint8_t *restrict p_buf, size_t i_buflen, vlc_bool_t waitall)
+ uint8_t *restrict p_buf, size_t i_buflen, bool waitall)
{
size_t i_total = 0;
struct pollfd ufd[2] = {
ptr = psz_line + i_line;
}
- if( net_Read( p_this, fd, p_vs, (uint8_t *)ptr, 1, VLC_TRUE ) != 1 )
+ if( net_Read( p_this, fd, p_vs, (uint8_t *)ptr, 1, true ) != 1 )
{
if( i_line == 0 )
{
{
uint8_t buffer[128+2*256];
int i_len;
- vlc_bool_t b_auth = VLC_FALSE;
+ bool b_auth = false;
if( i_socks_version != 5 )
return VLC_SUCCESS;
/* We negociate authentication */
if( ( psz_socks_user == NULL ) && ( psz_socks_passwd == NULL ) )
- b_auth = VLC_TRUE;
+ b_auth = true;
buffer[0] = i_socks_version; /* SOCKS version */
if( b_auth )
if( net_Write( p_obj, fd, NULL, buffer, i_len ) != i_len )
return VLC_EGENERIC;
- if( net_Read( p_obj, fd, NULL, buffer, 2, VLC_TRUE ) != 2 )
+ if( net_Read( p_obj, fd, NULL, buffer, 2, true ) != 2 )
return VLC_EGENERIC;
msg_Dbg( p_obj, "socks: v=%d method=%x", buffer[0], buffer[1] );
if( net_Write( p_obj, fd, NULL, buffer, i_len ) != i_len )
return VLC_EGENERIC;
- if( net_Read( p_obj, fd, NULL, buffer, 2, VLC_TRUE ) != 2 )
+ if( net_Read( p_obj, fd, NULL, buffer, 2, true ) != 2 )
return VLC_EGENERIC;
msg_Dbg( p_obj, "socks: v=%d status=%x", buffer[0], buffer[1] );
if( net_Write( p_obj, fd, NULL, buffer, 9 ) != 9 )
return VLC_EGENERIC;
- if( net_Read( p_obj, fd, NULL, buffer, 8, VLC_TRUE ) != 8 )
+ if( net_Read( p_obj, fd, NULL, buffer, 8, true ) != 8 )
return VLC_EGENERIC;
msg_Dbg( p_obj, "socks: v=%d cd=%d",
return VLC_EGENERIC;
/* Read the header */
- if( net_Read( p_obj, fd, NULL, buffer, 5, VLC_TRUE ) != 5 )
+ if( net_Read( p_obj, fd, NULL, buffer, 5, true ) != 5 )
return VLC_EGENERIC;
msg_Dbg( p_obj, "socks: v=%d rep=%d atyp=%d",
else
return VLC_EGENERIC;
- if( net_Read( p_obj, fd, NULL, buffer, i_len, VLC_TRUE ) != i_len )
+ if( net_Read( p_obj, fd, NULL, buffer, i_len, true ) != i_len )
return VLC_EGENERIC;
}
{
struct addrinfo hints, *res, *ptr;
int i_val, i_handle = -1;
- vlc_bool_t b_unreach = VLC_FALSE;
+ bool b_unreach = false;
if( i_hlim < 1 )
i_hlim = var_CreateGetInteger( p_this, "ttl" );
#else
if( errno == ENETUNREACH )
#endif
- b_unreach = VLC_TRUE;
+ b_unreach = true;
else
{
msg_Warn( p_this, "%s port %d : %m", psz_host, i_port);
static void osd_UpdateState( osd_menu_state_t *, int, int, int, int, picture_t * );
static inline osd_state_t *osd_VolumeStateChange( osd_state_t *, int );
static int osd_VolumeStep( vlc_object_t *, int, int );
-static vlc_bool_t osd_isVisible( osd_menu_t *p_osd );
+static bool osd_isVisible( osd_menu_t *p_osd );
static osd_menu_t *osd_ParserLoad( vlc_object_t *, const char * );
static void osd_ParserUnload( osd_menu_t * );
-static vlc_bool_t osd_isVisible( osd_menu_t *p_osd )
+static bool osd_isVisible( osd_menu_t *p_osd )
{
vlc_value_t val;
psz_type = (char*)"import-osd-xml";
p_menu->p_parser = module_Need( p_menu, "osd parser",
- psz_type, VLC_TRUE );
+ psz_type, true );
if( !p_menu->p_parser )
{
osd_ParserUnload( p_menu );
var_Create( p_osd, "osd-menu-update", VLC_VAR_BOOL );
var_Create( p_osd, "osd-menu-visible", VLC_VAR_BOOL );
- val.b_bool = VLC_FALSE;
+ val.b_bool = false;
var_Set( p_osd, "osd-menu-update", val );
var_Set( p_osd, "osd-menu-visible", val );
}
p_osd->p_state->p_visible->p_current_state->i_width,
p_osd->p_state->p_visible->p_current_state->i_height,
p_osd->p_state->p_visible->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
}
- osd_SetMenuVisible( p_osd, VLC_TRUE );
+ osd_SetMenuVisible( p_osd, true );
vlc_object_release( (vlc_object_t*) p_osd );
vlc_mutex_unlock( lockval.p_address );
osd_UpdateState( p_osd->p_state,
p_osd->p_state->i_x, p_osd->p_state->i_y,
0, 0, NULL );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
vlc_object_release( (vlc_object_t*) p_osd );
vlc_mutex_unlock( lockval.p_address );
return;
}
- if( osd_isVisible( p_osd ) == VLC_FALSE )
+ if( osd_isVisible( p_osd ) == false )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
p_osd->p_state->p_visible->p_current_state->i_width,
p_osd->p_state->p_visible->p_current_state->i_height,
p_button->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
- osd_SetMenuVisible( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
+ osd_SetMenuVisible( p_osd, true );
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc), config_GetInt( p_osd, p_button->psz_action ) );
#if defined(OSD_MENU_DEBUG)
msg_Dbg( p_osd, "select (%d, %s)", config_GetInt( p_osd, p_button->psz_action ), p_button->psz_action );
return;
}
- if( osd_isVisible( p_osd ) == VLC_FALSE )
+ if( osd_isVisible( p_osd ) == false )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
p_osd->p_state->p_visible->p_current_state->i_width,
p_osd->p_state->p_visible->p_current_state->i_height,
p_osd->p_state->p_visible->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
}
#if defined(OSD_MENU_DEBUG)
msg_Dbg( p_osd, "direction right [button %s]", p_osd->p_state->p_visible->psz_action );
return;
}
- if( osd_isVisible( p_osd ) == VLC_FALSE )
+ if( osd_isVisible( p_osd ) == false )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
p_osd->p_state->p_visible->p_current_state->i_width,
p_osd->p_state->p_visible->p_current_state->i_height,
p_osd->p_state->p_visible->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
}
#if defined(OSD_MENU_DEBUG)
msg_Dbg( p_osd, "direction left [button %s]", p_osd->p_state->p_visible->psz_action );
return;
}
- if( osd_isVisible( p_osd ) == VLC_FALSE )
+ if( osd_isVisible( p_osd ) == false )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
p_osd->p_state->p_visible->p_current_state->i_width,
p_osd->p_state->p_visible->p_current_state->i_height,
p_osd->p_state->p_visible->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
/* If this is a range style action with associated images of only one state,
* then perform "menu select" on every menu navigation
*/
return;
}
- if( osd_isVisible( p_osd ) == VLC_FALSE )
+ if( osd_isVisible( p_osd ) == false )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
p_osd->p_state->p_visible->p_current_state->i_width,
p_osd->p_state->p_visible->p_current_state->i_height,
p_osd->p_state->p_visible->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
/* If this is a range style action with associated images of only one state,
* then perform "menu select" on every menu navigation
*/
p_button->p_current_state->i_width,
p_button->p_current_state->i_height,
p_button->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
- osd_SetMenuVisible( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
+ osd_SetMenuVisible( p_osd, true );
}
vlc_object_release( (vlc_object_t*) p_osd );
vlc_mutex_unlock( lockval.p_address );
return NULL;
}
- if( osd_isVisible( p_osd ) == VLC_FALSE )
+ if( osd_isVisible( p_osd ) == false )
{
vlc_object_release( (vlc_object_t*) p_osd );
return NULL;
return;
}
- if( osd_isVisible( p_osd ) == VLC_FALSE )
+ if( osd_isVisible( p_osd ) == false )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
p_osd->p_state->p_visible->p_current_state->i_width,
p_osd->p_state->p_visible->p_current_state->i_height,
p_osd->p_state->p_visible->p_current_state->p_pic );
- osd_SetMenuUpdate( p_osd, VLC_TRUE );
+ osd_SetMenuUpdate( p_osd, true );
}
#if defined(OSD_MENU_DEBUG)
msg_Dbg( p_osd, "button selected is [button %s]", p_osd->p_state->p_visible->psz_action );
p_spu->p_region->i_align = i_flags & SUBPICTURE_ALIGN_MASK;
p_spu->i_start = i_start;
p_spu->i_stop = i_stop;
- p_spu->b_ephemer = VLC_TRUE;
- p_spu->b_absolute = VLC_FALSE;
+ p_spu->b_ephemer = true;
+ p_spu->b_absolute = false;
p_spu->i_x = i_hmargin;
p_spu->i_y = i_vmargin;
p_subpic->i_channel = i_channel;
p_subpic->i_start = i_now;
p_subpic->i_stop = i_now + 1200000;
- p_subpic->b_ephemer = VLC_TRUE;
- p_subpic->b_fade = VLC_TRUE;
+ p_subpic->b_ephemer = true;
+ p_subpic->b_fade = true;
return p_subpic;
}
}
int playlist_Control( playlist_t * p_playlist, int i_query,
- vlc_bool_t b_locked, ... )
+ bool b_locked, ... )
{
va_list args;
int i_result;
{
case PLAYLIST_STOP:
p_playlist->request.i_status = PLAYLIST_STOPPED;
- p_playlist->request.b_request = VLC_TRUE;
+ p_playlist->request.b_request = true;
p_playlist->request.p_item = NULL;
break;
}
p_playlist->request.i_status = PLAYLIST_RUNNING;
p_playlist->request.i_skip = 0;
- p_playlist->request.b_request = VLC_TRUE;
+ p_playlist->request.b_request = true;
p_playlist->request.p_node = p_node;
p_playlist->request.p_item = p_item;
if( p_item && var_GetBool( p_playlist, "random" ) )
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
break;
case PLAYLIST_PLAY:
else
{
p_playlist->request.i_status = PLAYLIST_RUNNING;
- p_playlist->request.b_request = VLC_TRUE;
+ p_playlist->request.b_request = true;
p_playlist->request.p_node = p_playlist->status.p_node;
p_playlist->request.p_item = p_playlist->status.p_item;
p_playlist->request.i_skip = 0;
/* if already running, keep running */
if( p_playlist->status.i_status != PLAYLIST_STOPPED )
p_playlist->request.i_status = p_playlist->status.i_status;
- p_playlist->request.b_request = VLC_TRUE;
+ p_playlist->request.b_request = true;
break;
default:
int i;
preparse_item_t p;
p.p_item = p_item;
- p.b_fetch_art = VLC_TRUE;
+ p.b_fetch_art = true;
vlc_object_lock( p_playlist->p_fetcher );
for( i = 0; i < p_playlist->p_fetcher->i_waiting &&
- p_playlist->p_fetcher->p_waiting->b_fetch_art == VLC_TRUE;
+ p_playlist->p_fetcher->p_waiting->b_fetch_art == true;
i++ );
vlc_gc_incref( p_item );
INSERT_ELEM( p_playlist->p_fetcher->p_waiting,
PL_DEBUG( "%s is at %i", PLI_NAME( p_cur ), p_playlist->i_current_index );
}
-void ResetCurrentlyPlaying( playlist_t *p_playlist, vlc_bool_t b_random,
+void ResetCurrentlyPlaying( playlist_t *p_playlist, bool b_random,
playlist_item_t *p_cur )
{
playlist_item_t *p_next = NULL;
/** FIXME: this is *slow* */
p_next = playlist_GetNextLeaf( p_playlist,
p_playlist->status.p_node,
- p_next, VLC_TRUE, VLC_FALSE );
+ p_next, true, false );
if( p_next )
{
if( p_next == p_cur )
ARRAY_VAL(p_playlist->current,j) = p_tmp;
}
}
- p_playlist->b_reset_currently_playing = VLC_FALSE;
+ p_playlist->b_reset_currently_playing = false;
stats_TimerStop( p_playlist, STATS_TIMER_PLAYLIST_BUILD );
}
playlist_item_t *p_new = NULL;
int i_skip = 0, i;
- vlc_bool_t b_loop = var_GetBool( p_playlist, "loop" );
- vlc_bool_t b_random = var_GetBool( p_playlist, "random" );
- vlc_bool_t b_repeat = var_GetBool( p_playlist, "repeat" );
- vlc_bool_t b_playstop = var_GetBool( p_playlist, "play-and-stop" );
+ bool b_loop = var_GetBool( p_playlist, "loop" );
+ bool b_random = var_GetBool( p_playlist, "random" );
+ bool b_repeat = var_GetBool( p_playlist, "repeat" );
+ bool b_playstop = var_GetBool( p_playlist, "play-and-stop" );
/* Handle quickly a few special cases */
/* No items to play */
}
/* Repeat and play/stop */
- if( !p_playlist->request.b_request && b_repeat == VLC_TRUE &&
+ if( !p_playlist->request.b_request && b_repeat == true &&
p_playlist->status.p_item )
{
msg_Dbg( p_playlist,"repeating item" );
return p_playlist->status.p_item;
}
- if( !p_playlist->request.b_request && b_playstop == VLC_TRUE )
+ if( !p_playlist->request.b_request && b_playstop == true )
{
msg_Dbg( p_playlist,"stopping (play and stop)" );
return NULL;
p_playlist->request.p_node != p_playlist->status.p_node )
{
p_playlist->status.p_node = p_playlist->request.p_node;
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
}
/* If we are asked for a node, don't take it */
p_playlist->i_current_index );
}
/* Clear the request */
- p_playlist->request.b_request = VLC_FALSE;
+ p_playlist->request.b_request = false;
}
/* "Automatic" item change ( next ) */
else
if( p_playlist->p_fetcher &&
p_playlist->p_fetcher->i_art_policy == ALBUM_ART_WHEN_PLAYED )
{
- vlc_bool_t b_has_art;
+ bool b_has_art;
char *psz_arturl, *psz_name;
psz_arturl = input_item_GetArtURL( p_input );
{
(void)psz_cmd; (void)oldval; (void)newval; (void)a;
- ((playlist_t*)p_this)->b_reset_currently_playing = VLC_TRUE;
+ ((playlist_t*)p_this)->b_reset_currently_playing = true;
playlist_Signal( ((playlist_t*)p_this) );
return VLC_SUCCESS;
}
{
static const char playlist_name[] = "playlist";
playlist_t *p_playlist;
- vlc_bool_t b_save;
+ bool b_save;
int i_tree;
/* Allocate structure */
p_playlist->p_input = NULL;
p_playlist->gc_date = 0;
- p_playlist->b_cant_sleep = VLC_FALSE;
+ p_playlist->b_cant_sleep = false;
ARRAY_INIT( p_playlist->items );
ARRAY_INIT( p_playlist->all_items );
ARRAY_INIT( p_playlist->current );
p_playlist->i_current_index = 0;
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
p_playlist->last_rebuild_date = 0;
i_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
p_playlist->b_always_tree = (i_tree == 1);
p_playlist->b_never_tree = (i_tree == 2);
- p_playlist->b_doing_ml = VLC_FALSE;
+ p_playlist->b_doing_ml = false;
p_playlist->b_auto_preparse =
var_CreateGetBool( p_playlist, "auto-preparse" ) ;
/* Create playlist and media library */
playlist_NodesPairCreate( p_playlist, _( "Playlist" ),
&p_playlist->p_local_category,
- &p_playlist->p_local_onelevel, VLC_FALSE );
+ &p_playlist->p_local_onelevel, false );
p_playlist->p_local_category->i_flags |= PLAYLIST_RO_FLAG;
p_playlist->p_local_onelevel->i_flags |= PLAYLIST_RO_FLAG;
{
playlist_NodesPairCreate( p_playlist, _( "Media Library" ),
&p_playlist->p_ml_category,
- &p_playlist->p_ml_onelevel, VLC_FALSE );
+ &p_playlist->p_ml_onelevel, false );
if(!p_playlist->p_ml_category || !p_playlist->p_ml_onelevel)
return NULL;
/* Initial status */
p_playlist->status.p_item = NULL;
p_playlist->status.p_node = p_playlist->p_local_onelevel;
- p_playlist->request.b_request = VLC_FALSE;
+ p_playlist->request.b_request = false;
p_playlist->status.i_status = PLAYLIST_STOPPED;
p_playlist->i_sort = SORT_ID;
b_save = p_playlist->b_auto_preparse;
- p_playlist->b_auto_preparse = VLC_FALSE;
+ p_playlist->b_auto_preparse = false;
playlist_MLLoad( p_playlist );
- p_playlist->b_auto_preparse = VLC_TRUE;
+ p_playlist->b_auto_preparse = true;
vlc_object_set_destructor( p_playlist, playlist_Destructor );
}
/* Destroy remaining objects */
-static void ObjectGarbageCollector( playlist_t *p_playlist, vlc_bool_t b_force )
+static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force )
{
vlc_object_t *p_obj;
{
if( mdate() - p_playlist->gc_date < 1000000 )
{
- p_playlist->b_cant_sleep = VLC_TRUE;
+ p_playlist->b_cant_sleep = true;
return;
}
else if( p_playlist->gc_date == 0 )
vlc_object_release( p_obj );
sout_DeleteInstance( (sout_instance_t*)p_obj );
}
- p_playlist->b_cant_sleep = VLC_FALSE;
+ p_playlist->b_cant_sleep = false;
vlc_mutex_unlock( &p_playlist->gc_lock );
}
void playlist_MainLoop( playlist_t *p_playlist )
{
playlist_item_t *p_item = NULL;
- vlc_bool_t b_playexit = var_GetBool( p_playlist, "play-and-exit" );
+ bool b_playexit = var_GetBool( p_playlist, "play-and-exit" );
PL_LOCK;
if( p_playlist->b_reset_currently_playing &&
PL_LOCK;
p_playlist->gc_date = mdate();
- p_playlist->b_cant_sleep = VLC_TRUE;
+ p_playlist->b_cant_sleep = true;
if( p_playlist->status.p_item->i_flags
& PLAYLIST_REMOVE_FLAG )
else if( p_playlist->p_input->i_state != INIT_S )
{
PL_UNLOCK;
- ObjectGarbageCollector( p_playlist, VLC_FALSE );
+ ObjectGarbageCollector( p_playlist, false );
PL_LOCK;
}
}
p_playlist->status.i_status = PLAYLIST_STOPPED;
PL_UNLOCK;
- if( b_playexit == VLC_TRUE )
+ if( b_playexit == true )
{
msg_Info( p_playlist, "end of playlist, exiting" );
vlc_object_kill( p_playlist->p_libvlc );
}
- ObjectGarbageCollector( p_playlist, VLC_TRUE );
+ ObjectGarbageCollector( p_playlist, true );
return;
}
playlist_PlayItem( p_playlist, p_item );
}
else
{
- const vlc_bool_t b_gc_forced = p_playlist->status.i_status != PLAYLIST_STOPPED;
+ const bool b_gc_forced = p_playlist->status.i_status != PLAYLIST_STOPPED;
p_playlist->status.i_status = PLAYLIST_STOPPED;
if( p_playlist->status.p_item &&
}
stats_TimerStop( p_playlist, STATS_TIMER_PREPARSE );
PL_UNLOCK;
- input_item_SetPreparsed( p_current, VLC_TRUE );
+ input_item_SetPreparsed( p_current, true );
var_SetInteger( p_playlist, "item-change", p_current->i_id );
PL_LOCK;
}
preparse_item_t p;
PL_DEBUG( "need to fetch meta for %s", p_current->psz_name );
p.p_item = p_current;
- p.b_fetch_art = VLC_FALSE;
+ p.b_fetch_art = false;
vlc_object_lock( p_playlist->p_fetcher );
INSERT_ELEM( p_playlist->p_fetcher->p_waiting,
p_playlist->p_fetcher->i_waiting,
preparse_item_t p;
PL_DEBUG("meta ok for %s, need to fetch art", psz_name );
p.p_item = p_current;
- p.b_fetch_art = VLC_TRUE;
+ p.b_fetch_art = true;
vlc_object_lock( p_playlist->p_fetcher );
INSERT_ELEM( p_playlist->p_fetcher->p_waiting,
p_playlist->p_fetcher->i_waiting,
void playlist_FetcherLoop( playlist_fetcher_t *p_obj )
{
playlist_t *p_playlist = (playlist_t *)p_obj->p_parent;
- vlc_bool_t b_fetch_art;
+ bool b_fetch_art;
input_item_t *p_item;
int i_activity;
vlc_mutex_lock( &p_obj->object_lock );
preparse_item_t p;
p.p_item = p_item;
- p.b_fetch_art = VLC_TRUE;
+ p.b_fetch_art = true;
INSERT_ELEM( p_playlist->p_fetcher->p_waiting,
p_playlist->p_fetcher->i_waiting,
0, p );
* FIXME this doesn't work if we need to fetch meta before art ... */
for( i_ret = 0; i_ret < 10 && !input_item_IsPreparsed( p_item ); i_ret++ )
{
- vlc_bool_t b_break;
+ bool b_break;
PL_LOCK;
b_break = ( !p_playlist->p_input || input_GetItem(p_playlist->p_input) != p_item ||
p_playlist->p_input->b_die || p_playlist->p_input->b_eof || p_playlist->p_input->b_error );
{
PL_DEBUG( "downloading art for %s", p_item->psz_name );
if( input_DownloadAndCacheArt( p_playlist, p_item ) )
- input_item_SetArtNotFound( p_item, VLC_TRUE );
+ input_item_SetArtNotFound( p_item, true );
else {
- input_item_SetArtFetched( p_item, VLC_TRUE );
+ input_item_SetArtFetched( p_item, true );
var_SetInteger( p_playlist, "item-change",
p_item->i_id );
}
else if( i_ret == 0 ) /* Was in cache */
{
PL_DEBUG( "found art for %s in cache", p_item->psz_name );
- input_item_SetArtFetched( p_item, VLC_TRUE );
+ input_item_SetArtFetched( p_item, true );
var_SetInteger( p_playlist, "item-change", p_item->i_id );
}
else
{
PL_DEBUG( "art not found for %s", p_item->psz_name );
- input_item_SetArtNotFound( p_item, VLC_TRUE );
+ input_item_SetArtNotFound( p_item, true );
}
vlc_gc_decref( p_item );
}
vlc_value_t val;
/* These variables control updates */
var_Create( p_playlist, "intf-change", VLC_VAR_BOOL );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_playlist, "intf-change", val );
var_Create( p_playlist, "item-change", VLC_VAR_INTEGER );
var_Create( p_playlist, "intf-popupmenu", VLC_VAR_BOOL );
var_Create( p_playlist, "intf-show", VLC_VAR_BOOL );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_playlist, "intf-show", val );
var_Create( p_playlist, "activity", VLC_VAR_INTEGER );
playlist_item_t *, playlist_item_t * );
static void ChangeToNode( playlist_t *p_playlist, playlist_item_t *p_item );
static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
- vlc_bool_t b_stop );
+ bool b_stop );
/*****************************************************************************
* An input item has gained a subitem (Event Callback)
input_item_t * p_parent, * p_child;
playlist_item_t * p_child_in_category;
playlist_item_t * p_item_in_category;
- vlc_bool_t b_play;
+ bool b_play;
p_parent = p_event->p_obj;
p_child = p_event->u.input_item_subitem_added.p_new_child;
p_child_in_category = playlist_ItemFindFromInputAndRoot(
p_playlist, p_child->i_id,
p_playlist->p_root_category,
- VLC_FALSE /* Only non-node */ );
+ false /* Only non-node */ );
if( !p_child_in_category )
{
p_item_in_category = playlist_ItemFindFromInputAndRoot(
p_playlist, p_parent->i_id,
p_playlist->p_root_category,
- VLC_FALSE /* Only non-node */ );
+ false /* Only non-node */ );
if( !p_item_in_category )
{
/* Item may have been removed */
if( p_item_in_category->i_children == -1 )
{
p_item_in_category = playlist_ItemToNode( p_playlist,
- p_item_in_category, VLC_TRUE );
+ p_item_in_category, true );
p_item_in_category->p_input->i_type = ITEM_TYPE_PLAYLIST;
}
int i_ret = playlist_BothAddInput( p_playlist, p_child,
p_item_in_category,
PLAYLIST_APPEND | PLAYLIST_SPREPARSE , PLAYLIST_END,
- NULL, NULL, VLC_TRUE );
+ NULL, NULL, true );
if( i_ret == VLC_SUCCESS && b_play )
{
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
- VLC_TRUE, p_item_in_category, NULL );
+ true, p_item_in_category, NULL );
}
}
* \return VLC_SUCCESS or VLC_EGENERIC
*/
static int DeleteFromInput( playlist_t *p_playlist, int i_input_id,
- playlist_item_t *p_root, vlc_bool_t b_do_stop )
+ playlist_item_t *p_root, bool b_do_stop )
{
int i;
for( i = 0 ; i< p_root->i_children ; i++ )
* \return VLC_SUCCESS or VLC_EGENERIC
*/
int playlist_DeleteInputInParent( playlist_t *p_playlist, int i_input_id,
- playlist_item_t *p_root, vlc_bool_t b_locked )
+ playlist_item_t *p_root, bool b_locked )
{
int i_ret;
if( !b_locked ) PL_LOCK;
i_ret = DeleteFromInput( p_playlist, i_input_id,
- p_root, VLC_TRUE );
+ p_root, true );
if( !b_locked ) PL_UNLOCK;
return i_ret;
}
* \return VLC_SUCCESS or VLC_ENOITEM
*/
int playlist_DeleteFromInput( playlist_t *p_playlist, int i_input_id,
- vlc_bool_t b_locked )
+ bool b_locked )
{
int i_ret1, i_ret2;
if( !b_locked ) PL_LOCK;
i_ret1 = DeleteFromInput( p_playlist, i_input_id,
- p_playlist->p_root_category, VLC_TRUE );
+ p_playlist->p_root_category, true );
i_ret2 = DeleteFromInput( p_playlist, i_input_id,
- p_playlist->p_root_onelevel, VLC_TRUE );
+ p_playlist->p_root_onelevel, true );
if( !b_locked ) PL_UNLOCK;
return ( i_ret1 == VLC_SUCCESS || i_ret2 == VLC_SUCCESS ) ?
VLC_SUCCESS : VLC_ENOITEM;
* \param b_locked TRUE if the playlist is locked
* \return nothing
*/
-void playlist_Clear( playlist_t * p_playlist, vlc_bool_t b_locked )
+void playlist_Clear( playlist_t * p_playlist, bool b_locked )
{
if( !b_locked ) PL_LOCK;
- playlist_NodeEmpty( p_playlist, p_playlist->p_local_category, VLC_TRUE );
- playlist_NodeEmpty( p_playlist, p_playlist->p_local_onelevel, VLC_TRUE );
+ playlist_NodeEmpty( p_playlist, p_playlist->p_local_category, true );
+ playlist_NodeEmpty( p_playlist, p_playlist->p_local_onelevel, true );
if( !b_locked ) PL_UNLOCK;
}
int playlist_DeleteFromItemId( playlist_t *p_playlist, int i_id )
{
playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id,
- VLC_TRUE );
+ true );
if( !p_item ) return VLC_EGENERIC;
- return DeleteInner( p_playlist, p_item, VLC_TRUE );
+ return DeleteInner( p_playlist, p_item, true );
}
/***************************************************************************
*/
int playlist_Add( playlist_t *p_playlist, const char *psz_uri,
const char *psz_name, int i_mode, int i_pos,
- vlc_bool_t b_playlist, vlc_bool_t b_locked )
+ bool b_playlist, bool b_locked )
{
return playlist_AddExt( p_playlist, psz_uri, psz_name,
i_mode, i_pos, -1, NULL, 0, b_playlist, b_locked );
int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
const char *psz_name, int i_mode, int i_pos,
mtime_t i_duration, const char *const *ppsz_options,
- int i_options, vlc_bool_t b_playlist, vlc_bool_t b_locked )
+ int i_options, bool b_playlist, bool b_locked )
{
int i_ret;
input_item_t *p_input = input_ItemNewExt( p_playlist, psz_uri, psz_name,
* \return VLC_SUCCESS or VLC_ENOMEM or VLC_EGENERIC
*/
int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input,
- int i_mode, int i_pos, vlc_bool_t b_playlist,
- vlc_bool_t b_locked )
+ int i_mode, int i_pos, bool b_playlist,
+ bool b_locked )
{
playlist_item_t *p_item_cat, *p_item_one;
if( p_playlist->b_die ) return VLC_EGENERIC;
input_item_t *p_input,
playlist_item_t *p_direct_parent,
int i_mode, int i_pos,
- int *i_cat, int *i_one, vlc_bool_t b_locked )
+ int *i_cat, int *i_one, bool b_locked )
{
playlist_item_t *p_item_cat, *p_item_one, *p_up;
int i_top;
input_item_t *p_input,
playlist_item_t *p_parent,
int i_mode, int i_pos,
- vlc_bool_t b_locked )
+ bool b_locked )
{
playlist_item_t *p_item;
assert( p_input );
*/
playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
playlist_item_t *p_item,
- vlc_bool_t b_locked )
+ bool b_locked )
{
playlist_item_t *p_item_in_category;
p_item_in_category = playlist_ItemFindFromInputAndRoot(
p_playlist, p_item->p_input->i_id,
p_playlist->p_root_category,
- VLC_TRUE );
+ true );
if( p_item_in_category )
{
playlist_item_t *p_item_in_one = playlist_ItemFindFromInputAndRoot(
p_playlist, p_item->p_input->i_id,
p_playlist->p_root_onelevel,
- VLC_TRUE );
+ true );
assert( p_item_in_one );
/* We already have it, and there is nothing more to do */
else
{
DeleteFromInput( p_playlist, p_item_in_one->p_input->i_id,
- p_playlist->p_root_onelevel, VLC_FALSE );
+ p_playlist->p_root_onelevel, false );
}
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
vlc_cond_signal( &p_playlist->object_wait );
var_SetInteger( p_playlist, "item-change", p_item_in_category->
p_input->i_id );
playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
int i_input_id,
playlist_item_t *p_root,
- vlc_bool_t b_items_only )
+ bool b_items_only )
{
int i;
for( i = 0 ; i< p_root->i_children ; i++ )
p_node_onelevel = playlist_ItemFindFromInputAndRoot( p_playlist,
p_node->p_input->i_id,
p_playlist->p_root_onelevel,
- VLC_FALSE );
+ false );
p_item_onelevel = playlist_ItemFindFromInputAndRoot( p_playlist,
p_item->p_input->i_id,
p_playlist->p_root_onelevel,
- VLC_FALSE );
+ false );
if( p_node_onelevel && p_item_onelevel )
TreeMove( p_playlist, p_item_onelevel, p_node_onelevel, 0 );
}
p_node_category = playlist_ItemFindFromInputAndRoot( p_playlist,
p_node->p_input->i_id,
p_playlist->p_root_category,
- VLC_FALSE );
+ false );
p_item_category = playlist_ItemFindFromInputAndRoot( p_playlist,
p_item->p_input->i_id,
p_playlist->p_root_category,
- VLC_FALSE );
+ false );
if( p_node_category && p_item_category )
TreeMove( p_playlist, p_item_category, p_node_category, 0 );
}
}
else
i_ret = TreeMove( p_playlist, p_item, p_node, i_newpos );
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
vlc_cond_signal( &p_playlist->object_wait );
return i_ret;
}
* \return nothing
*/
void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
- int i_node_id, vlc_bool_t b_signal )
+ int i_node_id, bool b_signal )
{
vlc_value_t val;
playlist_add_t *p_add = (playlist_add_t *)malloc( sizeof( playlist_add_t) );
p_add->i_item = i_item_id;
p_add->i_node = i_node_id;
val.p_address = p_add;
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
if( b_signal )
vlc_cond_signal( &p_playlist->object_wait );
var_Set( p_playlist, "item-append", val );
p_parent = p_parent->p_parent;
}
assert( p_toplay );
- p_playlist->request.b_request = VLC_TRUE;
+ p_playlist->request.b_request = true;
p_playlist->request.i_skip = 0;
p_playlist->request.p_item = p_toplay;
if( p_playlist->p_input )
playlist_PreparseEnqueue( p_playlist, p_item_cat->p_input );
/* If we already have it, signal it */
else if( !EMPTY_STR( psz_artist ) && !EMPTY_STR( psz_album ) )
- input_item_SetPreparsed( p_item_cat->p_input, VLC_TRUE );
+ input_item_SetPreparsed( p_item_cat->p_input, true );
free( psz_artist );
free( psz_album );
}
/* Do the actual removal */
static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
- vlc_bool_t b_stop )
+ bool b_stop )
{
int i;
int i_id = p_item->i_id;
- vlc_bool_t b_delay_deletion = VLC_FALSE;
+ bool b_delay_deletion = false;
if( p_item->i_children > -1 )
{
- return playlist_NodeDelete( p_playlist, p_item, VLC_TRUE, VLC_FALSE );
+ return playlist_NodeDelete( p_playlist, p_item, true, false );
}
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
var_SetInteger( p_playlist, "item-deleted", i_id );
/* Remove the item from the bank */
if( b_stop )
{
p_playlist->request.i_status = PLAYLIST_STOPPED;
- p_playlist->request.b_request = VLC_TRUE;
+ p_playlist->request.b_request = true;
p_playlist->request.p_item = NULL;
msg_Info( p_playlist, "stopping playback" );
vlc_cond_signal( &p_playlist->object_wait );
}
- b_delay_deletion = VLC_TRUE;
+ b_delay_deletion = true;
}
PL_DEBUG( "deleting item `%s'", p_item->p_input->psz_name );
p_playlist->p_private = (void *)p_export;
/* And call the module ! All work is done now */
- p_module = module_Need( p_playlist, "playlist export", psz_type, VLC_TRUE);
+ p_module = module_Need( p_playlist, "playlist export", psz_type, true);
if( !p_module )
{
msg_Warn( p_playlist, "exporting playlist failed" );
/* playlist_AddInput() can fail, but we have no way to report that ..
* Any way when it has failed, either the playlist is dying, either OOM */
playlist_AddInput( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END,
- VLC_FALSE, VLC_FALSE );
+ false, false );
}
int playlist_MLLoad( playlist_t *p_playlist )
vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
input_item_subitem_added, p_playlist );
- p_playlist->b_doing_ml = VLC_TRUE;
+ p_playlist->b_doing_ml = true;
PL_UNLOCK;
stats_TimerStart( p_playlist, "ML Load", STATS_TIMER_ML_LOAD );
- input_Read( p_playlist, p_input, VLC_TRUE );
+ input_Read( p_playlist, p_input, true );
stats_TimerStop( p_playlist,STATS_TIMER_ML_LOAD );
PL_LOCK;
- p_playlist->b_doing_ml = VLC_FALSE;
+ p_playlist->b_doing_ml = false;
PL_UNLOCK;
vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
typedef struct preparse_item_t
{
input_item_t *p_item;
- vlc_bool_t b_fetch_art;
+ bool b_fetch_art;
} preparse_item_t;
struct playlist_fetcher_t
VLC_COMMON_MEMBERS
vlc_mutex_t lock;
int i_art_policy;
- vlc_bool_t b_fetch_meta;
+ bool b_fetch_meta;
int i_waiting;
preparse_item_t *p_waiting;
void playlist_PreparseLoop( playlist_preparse_t * );
void playlist_FetcherLoop( playlist_fetcher_t * );
-void ResetCurrentlyPlaying( playlist_t *, vlc_bool_t, playlist_item_t * );
+void ResetCurrentlyPlaying( playlist_t *, bool, playlist_item_t * );
/* Control */
playlist_item_t * playlist_NextItem ( playlist_t * );
**********************************************************************/
void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
- int i_node_id, vlc_bool_t b_signal );
+ int i_node_id, bool b_signal );
/* Tree walking */
int playlist_GetAllEnabledChildren( playlist_t *p_playlist,
playlist_item_t ***ppp_items );
playlist_item_t *playlist_GetNextLeaf( playlist_t *p_playlist,
playlist_item_t *p_root,
- playlist_item_t *, vlc_bool_t, vlc_bool_t );
+ playlist_item_t *, bool, bool );
playlist_item_t *playlist_GetPrevLeaf( playlist_t *p_playlist,
playlist_item_t *p_root,
- playlist_item_t *, vlc_bool_t, vlc_bool_t );
+ playlist_item_t *, bool, bool );
playlist_item_t *playlist_GetLastLeaf( playlist_t *p_playlist,
playlist_item_t *p_root );
* \return the item or NULL on failure
*/
playlist_item_t * playlist_ItemGetById( playlist_t * p_playlist , int i_id,
- vlc_bool_t b_locked )
+ bool b_locked )
{
int i;
if( !b_locked ) PL_LOCK;
*/
playlist_item_t * playlist_ItemGetByInput( playlist_t * p_playlist ,
input_item_t *p_item,
- vlc_bool_t b_locked )
+ bool b_locked )
{
int i;
if( !b_locked ) PL_LOCK;
* Live search handling
***************************************************************************/
-static vlc_bool_t playlist_LiveSearchUpdateInternal( playlist_t *p_playlist,
+static bool playlist_LiveSearchUpdateInternal( playlist_t *p_playlist,
playlist_item_t *p_root,
const char *psz_string )
{
int i;
- vlc_bool_t b_match = VLC_FALSE;
+ bool b_match = false;
for( i = 0 ; i < p_root->i_children ; i ++ )
{
playlist_item_t *p_item = p_root->pp_children[i];
strcasestr( p_item->p_input->psz_name, psz_string ) )
{
p_item->i_flags &= ~PLAYLIST_DBL_FLAG;
- b_match = VLC_TRUE;
+ b_match = true;
}
else
{
input_item_MetaMatch( p_item->p_input, vlc_meta_Artist, psz_string ) )
{
p_item->i_flags &= ~PLAYLIST_DBL_FLAG;
- b_match = VLC_TRUE;
+ b_match = true;
}
else
{
int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
const char *psz_string )
{
- p_playlist->b_reset_currently_playing = VLC_TRUE;
+ p_playlist->b_reset_currently_playing = true;
playlist_LiveSearchUpdateInternal( p_playlist, p_root, psz_string );
vlc_cond_signal( &p_playlist->object_wait );
return VLC_SUCCESS;
vlc_event_manager_register_event_type( &p_sd->event_manager,
vlc_ServicesDiscoveryEnded );
- p_sd->p_module = module_Need( p_sd, "services_discovery", psz_module_name, VLC_TRUE );
+ p_sd->p_module = module_Need( p_sd, "services_discovery", psz_module_name, true );
if( p_sd->p_module == NULL )
{
return NULL;
}
p_sd->psz_module = strdup( psz_module_name );
- p_sd->b_die = VLC_FALSE; /* FIXME */
+ p_sd->b_die = false; /* FIXME */
vlc_object_attach( p_sd, p_super );
return p_sd;
{
if ((p_sd->pf_run != NULL)
&& vlc_thread_create( p_sd, "services_discovery", RunSD,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE))
+ VLC_THREAD_PRIORITY_LOW, false))
{
msg_Err( p_sd, "cannot create services discovery thread" );
vlc_object_release( p_sd );
}
p_new_item = playlist_NodeAddInput( p_parent->p_playlist, p_input, p_parent,
- PLAYLIST_APPEND, PLAYLIST_END, VLC_FALSE );
+ PLAYLIST_APPEND, PLAYLIST_END, false );
if( p_new_item )
{
p_new_item->i_flags &= ~PLAYLIST_SKIP_FLAG;
* XXX: Why don't we have a function to ensure that in the playlist code ? */
vlc_object_lock( p_parent->p_playlist );
p_pl_item = playlist_ItemFindFromInputAndRoot( p_parent->p_playlist,
- p_input->i_id, p_parent, VLC_FALSE );
+ p_input->i_id, p_parent, false );
if( p_pl_item && p_pl_item->i_children > -1 )
{
- playlist_NodeDelete( p_parent->p_playlist, p_pl_item, VLC_TRUE, VLC_FALSE );
+ playlist_NodeDelete( p_parent->p_playlist, p_pl_item, true, false );
vlc_object_unlock( p_parent->p_playlist );
return;
}
/* Delete the non-node item normally */
playlist_DeleteInputInParent( p_parent->p_playlist, p_input->i_id,
- p_parent, VLC_FALSE );
+ p_parent, false );
}
int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modules )
char * psz = services_discovery_GetLocalizedName( p_sd );
assert( psz );
playlist_NodesPairCreate( p_playlist, psz,
- &p_cat, &p_one, VLC_FALSE );
+ &p_cat, &p_one, false );
free( psz );
vlc_event_attach( services_discovery_EventManager( p_sd ),
if( p_sds->p_cat != p_playlist->p_root_category &&
p_sds->p_one != p_playlist->p_root_onelevel )
{
- playlist_NodeDelete( p_playlist, p_sds->p_cat, VLC_TRUE, VLC_FALSE );
- playlist_NodeDelete( p_playlist, p_sds->p_one, VLC_TRUE, VLC_FALSE );
+ playlist_NodeDelete( p_playlist, p_sds->p_cat, true, false );
+ playlist_NodeDelete( p_playlist, p_sds->p_one, true, false );
}
PL_UNLOCK;
return VLC_SUCCESS;
}
-vlc_bool_t playlist_IsServicesDiscoveryLoaded( playlist_t * p_playlist,
+bool playlist_IsServicesDiscoveryLoaded( playlist_t * p_playlist,
const char *psz_module )
{
int i;
if( !strcmp( psz_module, p_playlist->pp_sds[i]->p_sd->psz_module ) )
{
PL_UNLOCK;
- return VLC_TRUE;
+ return true;
}
}
PL_UNLOCK;
- return VLC_FALSE;
+ return false;
}
int i_position;
playlist_item_t *p_temp;
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
sort_mode = i_mode;
sort_type = i_type;
free( psz_a ); \
free( psz_b ); \
}
-#define DO_META_SORT( node ) DO_META_SORT_ADV( node, VLC_FALSE )
+#define DO_META_SORT( node ) DO_META_SORT_ADV( node, false )
int i_test = 0;
if( i_test == 0 )
DO_META_SORT( Album );
if( i_test == 0 )
- DO_META_SORT_ADV( TrackNumber, VLC_TRUE );
+ DO_META_SORT_ADV( TrackNumber, true );
}
else if( sort_mode == SORT_GENRE )
{
DO_META_SORT( Album );
/* Sort by tracknumber if albums are the same */
if( i_test == 0 )
- DO_META_SORT_ADV( TrackNumber, VLC_TRUE );
+ DO_META_SORT_ADV( TrackNumber, true );
}
else if( sort_mode == SORT_TRACK_NUMBER )
{
- DO_META_SORT_ADV( TrackNumber, VLC_TRUE );
+ DO_META_SORT_ADV( TrackNumber, true );
}
else if( sort_mode == SORT_DESCRIPTION )
{
vlc_object_attach( p_playlist->p_preparse, p_playlist );
if( vlc_thread_create( p_playlist->p_preparse, "preparser",
- RunPreparse, VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ RunPreparse, VLC_THREAD_PRIORITY_LOW, true ) )
{
msg_Err( p_playlist, "cannot spawn preparse thread" );
vlc_object_release( p_playlist->p_preparse );
if( vlc_thread_create( p_playlist->p_fetcher,
"fetcher",
RunFetcher,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_LOW, true ) )
{
msg_Err( p_playlist, "cannot spawn secondary preparse thread" );
vlc_object_release( p_playlist->p_fetcher );
// Start the thread
if( vlc_thread_create( p_playlist, "playlist", RunControlThread,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_LOW, true ) )
{
msg_Err( p_playlist, "cannot spawn playlist thread" );
vlc_object_release( p_playlist );
* \return VLC_SUCCESS or an error
*/
int playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root,
- vlc_bool_t b_delete_items )
+ bool b_delete_items )
{
int i;
if( p_root->i_children == -1 )
if( p_root->pp_children[i]->i_children > -1 )
{
playlist_NodeDelete( p_playlist, p_root->pp_children[i],
- b_delete_items , VLC_FALSE );
+ b_delete_items , false );
}
else if( b_delete_items )
{
* \return VLC_SUCCESS or an error
*/
int playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
- vlc_bool_t b_delete_items, vlc_bool_t b_force )
+ bool b_delete_items, bool b_force )
{
int i;
void playlist_NodesPairCreate( playlist_t *p_playlist, const char *psz_name,
playlist_item_t **pp_node_cat,
playlist_item_t **pp_node_one,
- vlc_bool_t b_for_sd )
+ bool b_for_sd )
{
*pp_node_cat = playlist_NodeCreate( p_playlist, psz_name,
p_playlist->p_root_category, 0, NULL );
while( 1 )
{
p_next = playlist_GetNextLeaf( p_playlist, p_node,
- p_next, VLC_TRUE, VLC_FALSE );
+ p_next, true, false );
if( p_next )
INSERT_ELEM( *ppp_items, i_count, i_count, p_next );
else
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 )
+ bool b_ena, bool b_unplayed )
{
playlist_item_t *p_next;
p_next = p_item;
while( 1 )
{
- vlc_bool_t b_ena_ok = VLC_TRUE, b_unplayed_ok = VLC_TRUE;
+ bool b_ena_ok = true, b_unplayed_ok = true;
p_next = GetNextItem( p_playlist, p_root, p_next );
if( !p_next || p_next == p_root )
break;
if( p_next->i_children == -1 )
{
if( b_ena && p_next->i_flags & PLAYLIST_DBL_FLAG )
- b_ena_ok = VLC_FALSE;
+ b_ena_ok = false;
if( b_unplayed && p_next->p_input->i_nb_played != 0 )
- b_unplayed_ok = VLC_FALSE;
+ b_unplayed_ok = false;
if( b_ena_ok && b_unplayed_ok ) break;
}
}
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 )
+ bool b_ena, bool b_unplayed )
{
playlist_item_t *p_prev;
p_prev = p_item;
while( 1 )
{
- vlc_bool_t b_ena_ok = VLC_TRUE, b_unplayed_ok = VLC_TRUE;
+ bool b_ena_ok = true, b_unplayed_ok = true;
p_prev = GetPrevItem( p_playlist, p_root, p_prev );
if( !p_prev || p_prev == p_root )
break;
if( p_prev->i_children == -1 )
{
if( b_ena && p_prev->i_flags & PLAYLIST_DBL_FLAG )
- b_ena_ok = VLC_FALSE;
+ b_ena_ok = false;
if( b_unplayed && p_prev->p_input->i_nb_played != 0 )
- b_unplayed_ok = VLC_FALSE;
+ b_unplayed_ok = false;
if( b_ena_ok && b_unplayed_ok ) break;
}
}
{
playlist_item_t *p_parent = p_item->p_parent;
playlist_item_t *p_grandparent;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
(void)p_playlist;
PL_DEBUG2( "parent %s found as child %i of grandparent %s",
p_parent->p_input->psz_name, i,
p_grandparent->p_input->psz_name );
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
{
playlist_item_t *p_parent = p_item->p_parent;
playlist_item_t *p_grandparent;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
(void)p_playlist;
{
if( p_parent == p_grandparent->pp_children[i] )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
static sout_transcode_t *streaming_ChainAddTranscode( sout_chain_t *p_chain,
char *psz_vcodec, char * psz_acodec, char * psz_scodec,
int i_vb, float f_scale, int i_ab, int i_channels,
- vlc_bool_t b_soverlay, char *psz_additional )
+ bool b_soverlay, char *psz_additional )
{
DECMALLOC_NULL( p_module, sout_module_t );
MALLOC_NULL( TRAM, sout_transcode_t );
* \param pb_dest target bool, if param is a bool
*/
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 )
{
/* Todo : Handle psz_string like formatting */
if( p_param->psz_string )
#define DO_ENABLE_ACCESS \
if( !strcmp( STDM->psz_access, "file" ) )\
{ \
- pd->b_file = VLC_TRUE; pd->psz_file = strdup( STDM->psz_url ); \
+ pd->b_file = true; pd->psz_file = strdup( STDM->psz_url ); \
} \
else if( !strcmp( STDM->psz_access, "http" ) )\
{ \
- pd->b_http = VLC_TRUE; pd->psz_http = strdup( STDM->psz_url ); \
+ pd->b_http = true; pd->psz_http = strdup( STDM->psz_url ); \
} \
else if( !strcmp( STDM->psz_access, "mms" ) )\
{ \
- pd->b_mms = VLC_TRUE; pd->psz_mms = strdup( STDM->psz_url ); \
+ pd->b_mms = true; pd->psz_mms = strdup( STDM->psz_url ); \
} \
else if( !strcmp( STDM->psz_access, "udp" ) )\
{ \
- pd->b_udp = VLC_TRUE; pd->psz_udp = strdup( STDM->psz_url ); \
+ pd->b_udp = true; pd->psz_udp = strdup( STDM->psz_url ); \
} \
else \
{ \
* \param pd the destination gui descriptor object
* \return TRUE if the conversion succeeded, false else
*/
-vlc_bool_t streaming_ChainToGuiDesc( vlc_object_t *p_this,
+bool streaming_ChainToGuiDesc( vlc_object_t *p_this,
sout_chain_t *p_chain, sout_gui_descr_t *pd )
{
int j, i_last = 0;
sout_module_t *p_module;
- if( p_chain->i_modules == 0 || p_chain->i_modules > 2 ) return VLC_FALSE;
+ if( p_chain->i_modules == 0 || p_chain->i_modules > 2 ) return false;
if( p_chain->pp_modules[0]->i_type == SOUT_MOD_TRANSCODE )
{
- if( p_chain->i_modules == 1 ) return VLC_FALSE;
+ if( p_chain->i_modules == 1 ) return false;
p_module = p_chain->pp_modules[0];
i_last++;
// Nothing allowed after duplicate. Duplicate mustn't be empty
if( p_chain->i_modules > i_last +1 || !DUPM->i_children )
- return VLC_FALSE;
+ return false;
for( j = 0 ; j< DUPM->i_children ; j++ )
{
sout_chain_t *p_child = DUPM->pp_children[j];
- if( p_child->i_modules != 1 ) return VLC_FALSE;
+ if( p_child->i_modules != 1 ) return false;
p_module = p_child->pp_modules[0];
if( p_module->i_type == SOUT_MOD_STD )
{
DO_ENABLE_ACCESS
}
else if( p_module->i_type == SOUT_MOD_DISPLAY )
- pd->b_local = VLC_TRUE;
+ pd->b_local = true;
else if( p_module->i_type == SOUT_MOD_RTP )
{
msg_Err( p_this, "RTP unhandled" );
- return VLC_FALSE;
+ return false;
}
}
i_last++;
}
else if( p_chain->pp_modules[i_last]->i_type == SOUT_MOD_DISPLAY )
{
- pd->b_local = VLC_TRUE;
+ pd->b_local = true;
}
else if( p_chain->pp_modules[i_last]->i_type == SOUT_MOD_RTP )
{
msg_Err( p_this, "RTP unhandled" );
- return VLC_FALSE;
+ return false;
}
- return VLC_TRUE;
+ return true;
}
#endif
ADD_OPT( "ttl=%i", pd->i_ttl );
if( pd->b_sap )
{
- pd->b_sap = VLC_TRUE;
+ pd->b_sap = true;
p_std->psz_name = strdup( pd->psz_name );
p_std->psz_group = pd->psz_group ? strdup( pd->psz_group ) : NULL;
}
/**********************************************************************
* Create a sout string from a chain
**********************************************************************/
-static char * ChainToPsz( sout_chain_t *p_chain, vlc_bool_t b_root )
+static char * ChainToPsz( sout_chain_t *p_chain, bool b_root )
{
int i, j;
char psz_output[MAX_CHAIN];
CHAIN_APPEND( "duplicate{" );
for( j = 0 ; j < DUPM->i_children ; j ++ )
{
- char *psz_child = ChainToPsz( DUPM->pp_children[j], VLC_FALSE);
+ char *psz_child = ChainToPsz( DUPM->pp_children[j], false);
fprintf(stderr, "child %s\n", psz_child);
CHAIN_APPEND( "dst=%s", psz_child );
free( psz_child );
char * streaming_ChainToPsz( sout_chain_t *p_chain )
{
- return ChainToPsz( p_chain, VLC_TRUE );
+ return ChainToPsz( p_chain, true );
}
/**********************************************************************
p_this->p_private = (void *)p_parser;
/* And call the module ! All work is done now */
- p_module = module_Need( p_this, "profile parser", "", VLC_TRUE );
+ p_module = module_Need( p_this, "profile parser", "", true );
if( !p_module )
{
msg_Warn( p_this, "parsing profile failed" );
/* Used for flow control */
mtime_t t1;
- vlc_bool_t b_enabled;
- vlc_bool_t b_ready;
+ bool b_enabled;
+ bool b_ready;
int i_interval;
int i_buff;
int i_limit;
p_sap->b_control = config_GetInt( p_sap, "sap-flow-control");
if( vlc_thread_create( p_sap, "sap handler", RunThread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Dbg( p_announce, "unable to spawn SAP handler thread");
vlc_object_release( p_sap );
int i;
/* If needed, get the rate info */
- if( p_sap->b_control == VLC_TRUE )
+ if( p_sap->b_control == true )
{
for( i = 0 ; i< p_sap->i_addresses ; i++)
{
- if( p_sap->pp_addresses[i]->b_enabled == VLC_TRUE )
+ if( p_sap->pp_addresses[i]->b_enabled == true )
{
ComputeRate( p_sap->pp_addresses[i] );
}
vlc_mutex_unlock( &p_sap->object_lock );
/* And announce it */
- if( p_session->p_address->b_enabled == VLC_TRUE &&
- p_session->p_address->b_ready == VLC_TRUE )
+ if( p_session->p_address->b_enabled == true &&
+ p_session->p_address->b_ready == true )
{
announce_SendSAPAnnounce( p_sap, p_session );
}
{
int i;
char psz_addr[NI_MAXNUMERICHOST];
- vlc_bool_t b_ipv6 = VLC_FALSE, b_ssm = VLC_FALSE;
+ bool b_ipv6 = false, b_ssm = false;
sap_session_t *p_sap_session;
mtime_t i_hash;
struct sockaddr_storage addr;
/* Unicast IPv6 - assume global scope */
memcpy( a6->s6_addr, "\xff\x0e", 2 );
- b_ipv6 = VLC_TRUE;
+ b_ipv6 = true;
break;
}
#endif
&p_address->origlen);
}
- if( p_sap->b_control == VLC_TRUE )
+ if( p_sap->b_control == true )
{
p_address->i_rfd = net_ListenUDP1( (vlc_object_t*)p_sap, psz_addr, SAP_PORT );
if( p_address->i_rfd != -1 )
shutdown( p_address->i_rfd, SHUT_WR );
p_address->i_buff = 0;
- p_address->b_enabled = VLC_TRUE;
- p_address->b_ready = VLC_FALSE;
+ p_address->b_enabled = true;
+ p_address->b_ready = false;
p_address->i_limit = 10000; /* 10000 bps */
p_address->t1 = 0;
}
else
{
- p_address->b_enabled = VLC_TRUE;
- p_address->b_ready = VLC_TRUE;
+ p_address->b_enabled = true;
+ p_address->b_ready = true;
p_address->i_interval = config_GetInt( p_sap,"sap-interval");
p_address->i_rfd = -1;
}
&& p_sap->b_control ) )
{
msg_Warn( p_sap, "disabling address" );
- p_address->b_enabled = VLC_FALSE;
+ p_address->b_enabled = false;
}
INSERT_ELEM( p_sap->pp_addresses,
p_address->psz_address,SAP_PORT, i_rate, p_address->i_interval );
#endif
- p_address->b_ready = VLC_TRUE;
+ p_address->b_ready = true;
p_address->t1 = i_temp;
p_address->i_buff = 0;
}
-static vlc_bool_t IsSDPString (const char *str)
+static bool IsSDPString (const char *str)
{
if (strchr (str, '\r') != NULL)
- return VLC_FALSE;
+ return false;
if (strchr (str, '\n') != NULL)
- return VLC_FALSE;
+ return false;
if (!IsUTF8 (str))
- return VLC_FALSE;
- return VLC_TRUE;
+ return false;
+ return true;
}
char *sdp_AddMedia (char **sdp,
const char *type, const char *protocol, int dport,
- unsigned pt, vlc_bool_t bw_indep, unsigned bw,
+ unsigned pt, bool bw_indep, unsigned bw,
const char *ptname, unsigned clock, unsigned chans,
const char *fmtp)
{
vlc_object_attach( p_access, p_sout );
p_access->p_module =
- module_Need( p_access, "sout access", p_access->psz_access, VLC_TRUE );
+ module_Need( p_access, "sout access", p_access->psz_access, true );
if( !p_access->p_module )
{
p_mux->p_sys = NULL;
p_mux->p_module = NULL;
- p_mux->b_add_stream_any_time = VLC_FALSE;
- p_mux->b_waiting_stream = VLC_TRUE;
+ p_mux->b_add_stream_any_time = false;
+ p_mux->b_waiting_stream = true;
p_mux->i_add_stream_start = -1;
vlc_object_attach( p_mux, p_sout );
p_mux->p_module =
- module_Need( p_mux, "sout mux", p_mux->psz_mux, VLC_TRUE );
+ module_Need( p_mux, "sout mux", p_mux->psz_mux, true );
if( p_mux->p_module == NULL )
{
/* *** probe mux capacity *** */
if( p_mux->pf_control )
{
- int b_answer = VLC_FALSE;
+ int b_answer = false;
if( sout_MuxControl( p_mux, MUX_CAN_ADD_STREAM_WHILE_MUXING,
&b_answer ) )
{
- b_answer = VLC_FALSE;
+ b_answer = false;
}
if( b_answer )
{
msg_Dbg( p_sout, "muxer support adding stream at any time" );
- p_mux->b_add_stream_any_time = VLC_TRUE;
- p_mux->b_waiting_stream = VLC_FALSE;
+ p_mux->b_add_stream_any_time = true;
+ p_mux->b_waiting_stream = false;
/* If we control the output pace then it's better to wait before
* starting muxing (generates better streams/files). */
if( !p_sout->i_out_pace_nocontrol )
{
- b_answer = VLC_TRUE;
+ b_answer = true;
}
else if( sout_MuxControl( p_mux, MUX_GET_ADD_STREAM_WAIT,
&b_answer ) )
{
- b_answer = VLC_FALSE;
+ b_answer = false;
}
if( b_answer )
{
msg_Dbg( p_sout, "muxer prefers to wait for all ES before "
"starting to mux" );
- p_mux->b_waiting_stream = VLC_TRUE;
+ p_mux->b_waiting_stream = true;
}
}
}
{
/* We stop waiting, and call the muxer for taking care of the data
* before we remove this es */
- p_mux->b_waiting_stream = VLC_FALSE;
+ p_mux->b_waiting_stream = false;
p_mux->pf_mux( p_mux );
}
if( p_mux->i_add_stream_start < 0 ||
p_buffer->i_dts < p_mux->i_add_stream_start + i_caching )
return;
- p_mux->b_waiting_stream = VLC_FALSE;
+ p_mux->b_waiting_stream = false;
}
p_mux->pf_mux( p_mux );
}
vlc_object_attach( p_stream, p_sout );
p_stream->p_module =
- module_Need( p_stream, "sout stream", p_stream->psz_name, VLC_TRUE );
+ module_Need( p_stream, "sout stream", p_stream->psz_name, true );
if( !p_stream->p_module )
{
sap_session_t **pp_sessions;
sap_address_t **pp_addresses;
- vlc_bool_t b_control;
+ bool b_control;
int i_sessions;
int i_addresses;
socklen_t addrlen;
char *psz_sdp;
- vlc_bool_t b_ssm;
+ bool b_ssm;
};
/* The main announce handler object */
for( j = 0; keys[j]; j++ )
{
- vlc_bool_t found = VLC_FALSE;
+ bool found = false;
for( i = 0; i < size; i++ )
{
if(!strcmp( keys[j], our_keys[i] ))
{
- found = VLC_TRUE;
+ found = true;
break;
}
}
}
#endif
-vlc_bool_t vlc_current_charset( char **psz_charset )
+bool vlc_current_charset( char **psz_charset )
{
const char *psz_codeset;
*psz_charset = strdup(psz_codeset);
if( !strcasecmp(psz_codeset, "UTF8") || !strcasecmp(psz_codeset, "UTF-8") )
- return VLC_TRUE;
+ return true;
- return VLC_FALSE;
+ return false;
}
#endif
-static char *locale_fast (const char *string, vlc_bool_t from)
+static char *locale_fast (const char *string, bool from)
{
#if defined (USE_ICONV)
if (find_charset ())
}
-static inline char *locale_dup (const char *string, vlc_bool_t from)
+static inline char *locale_dup (const char *string, bool from)
{
#if defined (USE_ICONV)
if (find_charset ())
*/
char *FromLocale (const char *locale)
{
- return locale_fast (locale, VLC_TRUE);
+ return locale_fast (locale, true);
}
char *FromLocaleDup (const char *locale)
{
- return locale_dup (locale, VLC_TRUE);
+ return locale_dup (locale, true);
}
*/
char *ToLocale (const char *utf8)
{
- return locale_fast (utf8, VLC_FALSE);
+ return locale_fast (utf8, false);
}
static char *ToLocaleDup (const char *utf8)
{
- return locale_dup (utf8, VLC_FALSE);
+ return locale_dup (utf8, false);
}
FILE *utf8_fopen (const char *filename, const char *mode)
{
int rwflags = 0, oflags = 0;
- vlc_bool_t append = VLC_FALSE;
+ bool append = false;
for (const char *ptr = mode; *ptr; ptr++)
{
case 'a':
rwflags = O_WRONLY;
oflags |= O_CREAT;
- append = VLC_TRUE;
+ append = true;
break;
case 'w':
}
static int utf8_statEx( const char *filename, struct stat *buf,
- vlc_bool_t deref )
+ bool deref )
{
#if defined (WIN32) || defined (UNDER_CE)
/* retrieve Windows OS version */
int utf8_stat( const char *filename, struct stat *buf)
{
- return utf8_statEx( filename, buf, VLC_TRUE );
+ return utf8_statEx( filename, buf, true );
}
int utf8_lstat( const char *filename, struct stat *buf)
{
- return utf8_statEx( filename, buf, VLC_FALSE );
+ return utf8_statEx( filename, buf, false );
}
/**
/* Reattach video output to playlist before bailing out */
if( p_vout )
{
- spu_Attach( p_vout->p_spu, p_this, VLC_FALSE );
+ spu_Attach( p_vout->p_spu, p_this, false );
vlc_object_detach( p_vout );
vlc_object_attach( p_vout, p_this->p_libvlc );
}
if( !psz_filter_chain && !p_vout->psz_filter_chain )
{
- p_vout->b_filter_change = VLC_FALSE;
+ p_vout->b_filter_change = false;
}
free( psz_filter_chain );
else
{
/* This video output is cool! Hijack it. */
- spu_Attach( p_vout->p_spu, p_this, VLC_TRUE );
+ spu_Attach( p_vout->p_spu, p_this, true );
vlc_object_attach( p_vout, p_this );
if( p_vout->b_title_show )
DisplayTitleOnOSD( p_vout );
/* Initialize subpicture unit */
p_vout->p_spu = spu_Create( p_vout );
- spu_Attach( p_vout->p_spu, p_parent, VLC_TRUE );
+ spu_Attach( p_vout->p_spu, p_parent, true );
/* Attach the new object now so we can use var inheritance below */
vlc_object_attach( p_vout, p_parent );
}
var_AddCallback( p_vout, "video-filter", VideoFilter2Callback, NULL );
- p_vout->b_vfilter_change = VLC_TRUE;
+ p_vout->b_vfilter_change = true;
p_vout->i_vfilters = 0;
/* Choose the video output module */
}
if( vlc_thread_create( p_vout, "video output", RunThread,
- VLC_THREAD_PRIORITY_OUTPUT, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_OUTPUT, true ) )
{
msg_Err( p_vout, "out of memory" );
module_Unneed( p_vout, p_vout->p_module );
if( p_another_vout == NULL )
{
vlc_value_t val;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_playlist, "intf-show", val );
}
else
input_thread_t *p_input = NULL ; /* Parent input, if it exists */
vlc_value_t val;
- vlc_bool_t b_drop_late;
+ bool b_drop_late;
int i_displayed = 0, i_lost = 0, i_loops = 0;
}
/* Video Filter2 stuff */
- if( p_vout->b_vfilter_change == VLC_TRUE )
+ if( p_vout->b_vfilter_change == true )
{
int i;
vlc_mutex_lock( &p_vout->vfilter_lock );
p_vfilter->p_cfg = p_vout->p_vfilters_cfg[i];
p_vfilter->p_module = module_Need( p_vfilter, "video filter2",
p_vout->psz_vfilters[i],
- VLC_TRUE );
+ true );
if( p_vfilter->p_module )
{
vlc_object_release( p_vfilter );
}
}
- p_vout->b_vfilter_change = VLC_FALSE;
+ p_vout->b_vfilter_change = false;
vlc_mutex_unlock( &p_vout->vfilter_lock );
}
if( p_picture && p_vout->b_snapshot )
{
- p_vout->b_snapshot = VLC_FALSE;
+ p_vout->b_snapshot = false;
vout_Snapshot( p_vout, p_picture );
}
FIND_PARENT );
}
p_subpic = spu_SortSubpictures( p_vout->p_spu, display_date,
- p_input ? var_GetBool( p_input, "state" ) == PAUSE_S : VLC_FALSE );
+ p_input ? var_GetBool( p_input, "state" ) == PAUSE_S : false );
if( p_input )
vlc_object_release( p_input );
p_input = NULL;
}
/* Destroy subpicture unit */
- spu_Attach( p_vout->p_spu, VLC_OBJECT(p_vout), VLC_FALSE );
+ spu_Attach( p_vout->p_spu, VLC_OBJECT(p_vout), false );
spu_Destroy( p_vout->p_spu );
/* Destroy the video filters2 */
vout_thread_t * p_vout = (vout_thread_t *)p_this;
vlc_value_t val;
(void)psz_variable; (void)newval; (void)oldval; (void)p_data;
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
}
}
vlc_object_release( p_input );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "intf-change", val );
val.psz_string = psz_filter;
return( VLC_EGENERIC );
}
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "intf-change", val );
/* Modify input as well because the vout might have to be restarted */
suxor_thread_t *p_suxor =
vlc_object_create( p_vout, sizeof(suxor_thread_t) );
p_suxor->p_input = p_input;
- p_vout->b_filter_change = VLC_TRUE;
+ p_vout->b_filter_change = true;
vlc_object_yield( p_input );
vlc_thread_create( p_suxor, "suxor", SuxorRestartVideoES,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE );
+ VLC_THREAD_PRIORITY_LOW, false );
}
vlc_object_release( p_input );
vlc_mutex_lock( &p_vout->vfilter_lock );
ParseVideoFilter2Chain( p_vout, newval.psz_string );
- p_vout->b_vfilter_change = VLC_TRUE;
+ p_vout->b_vfilter_change = true;
vlc_mutex_unlock( &p_vout->vfilter_lock );
return VLC_SUCCESS;
p_spu->p_region->i_align = i_flags & SUBPICTURE_ALIGN_MASK;
p_spu->i_start = i_start;
p_spu->i_stop = i_stop;
- p_spu->b_ephemer = VLC_TRUE;
- p_spu->b_absolute = VLC_FALSE;
- p_spu->b_fade = VLC_TRUE;
+ p_spu->b_ephemer = true;
+ p_spu->b_absolute = false;
+ p_spu->b_fade = true;
p_spu->i_x = i_hmargin;
p_spu->i_y = i_vmargin;
void vout_IntfInit( vout_thread_t *p_vout )
{
vlc_value_t val, text, old_val;
- vlc_bool_t b_force_par = VLC_FALSE;
+ bool b_force_par = false;
char *psz_buf;
int i;
msg_Dbg( p_vout, "overriding monitor pixel aspect-ratio: %i:%i",
p_vout->i_par_num, p_vout->i_par_den );
- b_force_par = VLC_TRUE;
+ b_force_par = true;
}
free( val.psz_string );
var_Create( p_vout, "mouse-clicked", VLC_VAR_INTEGER );
var_Create( p_vout, "intf-change", VLC_VAR_BOOL );
- var_SetBool( p_vout, "intf-change", VLC_TRUE );
+ var_SetBool( p_vout, "intf-change", true );
}
/*****************************************************************************
}
closedir( path );
- if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE )
+ if( var_GetBool( p_vout, "snapshot-sequential" ) == true )
{
int i_num = var_GetInteger( p_vout, "snapshot-num" );
FILE *p_file;
p_subpic->i_channel = 0;
p_subpic->i_start = mdate();
p_subpic->i_stop = mdate() + 4000000;
- p_subpic->b_ephemer = VLC_TRUE;
- p_subpic->b_fade = VLC_TRUE;
+ p_subpic->b_ephemer = true;
+ p_subpic->b_fade = true;
p_subpic->i_original_picture_width = p_vout->render.i_width * 4;
p_subpic->i_original_picture_height = p_vout->render.i_height * 4;
*****************************************************************************/
void vout_EnableFilter( vout_thread_t *p_vout, char *psz_name,
- vlc_bool_t b_add, vlc_bool_t b_setconfig )
+ bool b_add, bool b_setconfig )
{
char *psz_parser;
char *psz_string = config_GetPsz( p_vout, "vout-filter" );
break;
case VOUT_SNAPSHOT:
- p_vout->b_snapshot = VLC_TRUE;
+ p_vout->b_snapshot = true;
return VLC_SUCCESS;
break;
var_Set( p_playlist, "fullscreen", newval );
pl_Release( p_playlist );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
}
* threads.
*/
picture_t *vout_CreatePicture( vout_thread_t *p_vout,
- vlc_bool_t b_progressive,
- vlc_bool_t b_top_field_first,
+ bool b_progressive,
+ bool b_top_field_first,
unsigned int i_nb_fields )
{
int i_pic; /* picture index */
p_spu->pp_filter[p_spu->i_filter]->p_cfg = p_cfg;
p_spu->pp_filter[p_spu->i_filter]->p_module =
module_Need( p_spu->pp_filter[p_spu->i_filter],
- "sub filter", psz_name, VLC_TRUE );
+ "sub filter", psz_name, true );
if( p_spu->pp_filter[p_spu->i_filter]->p_module )
{
filter_owner_sys_t *p_sys = malloc( sizeof(filter_owner_sys_t) );
* \param p_this the object in which to destroy the subpicture unit
* \param b_attach to select attach or detach
*/
-void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, vlc_bool_t b_attach )
+void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach )
{
vlc_object_t *p_input;
/* Copy subpicture information, set some default values */
memset( p_subpic, 0, sizeof(subpicture_t) );
p_subpic->i_status = RESERVED_SUBPICTURE;
- p_subpic->b_absolute = VLC_TRUE;
- p_subpic->b_pausable = VLC_FALSE;
- p_subpic->b_fade = VLC_FALSE;
+ p_subpic->b_absolute = true;
+ p_subpic->b_pausable = false;
+ p_subpic->b_fade = false;
p_subpic->i_alpha = 0xFF;
p_subpic->p_region = NULL;
p_subpic->pf_render = NULL;
{
p_spu->p_text->p_module =
module_Need( p_spu->p_text, "text renderer",
- psz_modulename, VLC_TRUE );
+ psz_modulename, true );
}
if( !p_spu->p_text->p_module )
{
while( p_region )
{
video_format_t orig_fmt = p_region->fmt;
- vlc_bool_t b_rerender_text = VLC_FALSE;
+ bool b_rerender_text = false;
int i_fade_alpha = 255;
int i_x_offset;
int i_y_offset;
var_Set( p_spu->p_text, "spu-elapsed", val );
var_Create( p_spu->p_text, "text-rerender", VLC_VAR_BOOL );
- var_SetBool( p_spu->p_text, "text-rerender", VLC_FALSE );
+ var_SetBool( p_spu->p_text, "text-rerender", false );
var_Create( p_spu->p_text, "scale", VLC_VAR_INTEGER );
var_SetInteger( p_spu->p_text, "scale",
i_y_offset = __MAX( i_y_offset, 0 );
if( ( p_spu->i_margin != 0 ) &&
- ( p_spu->b_force_crop == VLC_FALSE ) )
+ ( p_spu->b_force_crop == false ) )
{
int i_diff = 0;
int i_low = (i_y_offset - p_spu->i_margin) * i_inv_scale_y / 1000;
* more difficult to guess if a subpicture has to be rendered or not.
*****************************************************************************/
subpicture_t *spu_SortSubpictures( spu_t *p_spu, mtime_t display_date,
- vlc_bool_t b_paused )
+ bool b_paused )
{
int i_index, i_channel;
subpicture_t *p_subpic = NULL;
{
vlc_value_t val;
- p_spu->b_force_palette = VLC_FALSE;
- p_spu->b_force_crop = VLC_FALSE;
+ p_spu->b_force_palette = false;
+ p_spu->b_force_crop = false;
if( var_Get( p_object, "highlight", &val ) || !val.b_bool ) return;
- p_spu->b_force_crop = VLC_TRUE;
+ p_spu->b_force_crop = true;
var_Get( p_object, "x-start", &val );
p_spu->i_crop_x = val.i_int;
var_Get( p_object, "y-start", &val );
if( var_Get( p_object, "menu-palette", &val ) == VLC_SUCCESS )
{
memcpy( p_spu->palette, val.p_address, 16 );
- p_spu->b_force_palette = VLC_TRUE;
+ p_spu->b_force_palette = true;
}
msg_Dbg( p_object, "crop: %i,%i,%i,%i, palette forced: %i",
subpicture_t *p_subpic = (subpicture_t *)malloc(sizeof(subpicture_t));
if( !p_subpic ) return NULL;
memset( p_subpic, 0, sizeof(subpicture_t) );
- p_subpic->b_absolute = VLC_TRUE;
+ p_subpic->b_absolute = true;
p_subpic->pf_create_region = __spu_CreateRegion;
p_subpic->pf_make_region = __spu_MakeRegion;
return i_ret == VLC_EEXITSUCCESS ? 0 : -i_ret;
}
- i_ret = VLC_AddIntf( 0, NULL, VLC_TRUE, VLC_TRUE );
+ i_ret = VLC_AddIntf( 0, NULL, true, true );
/* Finish the threads */
VLC_CleanUp( 0 );
static void test_events_dummy_callback( const libvlc_event_t * event, void * user_data)
{
(void)event;
- vlc_bool_t * callback_was_called = user_data;
- *callback_was_called = VLC_TRUE;
+ bool * callback_was_called = user_data;
+ *callback_was_called = true;
}
static void test_events_callback_and_detach( const libvlc_event_t * event, void * user_data)
{
- vlc_bool_t * callback_was_called = user_data;
+ bool * callback_was_called = user_data;
libvlc_event_manager_t *em;
em = libvlc_media_player_event_manager (event->p_obj, &ex);
catch();
libvlc_event_detach (em, event->type, test_events_callback_and_detach, user_data, &ex);
- *callback_was_called = VLC_TRUE;
+ *callback_was_called = true;
}
-static void test_event_type_reception( libvlc_event_manager_t * em, libvlc_event_type_t event_type, vlc_bool_t * callback_was_called )
+static void test_event_type_reception( libvlc_event_manager_t * em, libvlc_event_type_t event_type, bool * callback_was_called )
{
libvlc_event_t event;
event.type = event_type;
- *callback_was_called = VLC_FALSE;
+ *callback_was_called = false;
libvlc_event_send (em, &event);
assert (*callback_was_called);
}
libvlc_instance_t *vlc;
libvlc_media_player_t *mi;
libvlc_event_manager_t *em;
- vlc_bool_t callback_was_called;
+ bool callback_was_called;
libvlc_exception_t ex;
libvlc_event_type_t mi_events[] = {
libvlc_MediaPlayerPlayed,
libvlc_event_t event;
event.type = mi_events[mi_events_len-1];
- callback_was_called = VLC_FALSE;
+ callback_was_called = false;
libvlc_event_detach (em, mi_events[mi_events_len-1], test_events_dummy_callback, &callback_was_called, &ex);
catch ();
libvlc_event_send (em, &event);
assert( callback_was_called );
- callback_was_called = VLC_FALSE;
+ callback_was_called = false;
libvlc_event_send (em, &event);
assert( !callback_was_called );