Commit cd3ea880 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Don't leak vlc_bool_t through libvlc-control

This restores the ABI. It also avoids nasty issues with determining
what a native boolean is from language bindings.
parent b623ad8c
...@@ -236,7 +236,7 @@ VLC_PUBLIC_API libvlc_time_t ...@@ -236,7 +236,7 @@ VLC_PUBLIC_API libvlc_time_t
libvlc_media_descriptor_get_duration( libvlc_media_descriptor_t * p_md, libvlc_media_descriptor_get_duration( libvlc_media_descriptor_t * p_md,
libvlc_exception_t * p_e ); libvlc_exception_t * p_e );
VLC_PUBLIC_API vlc_bool_t VLC_PUBLIC_API int
libvlc_media_descriptor_is_preparsed( libvlc_media_descriptor_t * p_md, libvlc_media_descriptor_is_preparsed( libvlc_media_descriptor_t * p_md,
libvlc_exception_t * p_e ); libvlc_exception_t * p_e );
...@@ -262,7 +262,7 @@ VLC_PUBLIC_API void * ...@@ -262,7 +262,7 @@ VLC_PUBLIC_API void *
/** /**
* Set loop variable * Set loop variable
*/ */
VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t, VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , int,
libvlc_exception_t * ); libvlc_exception_t * );
/** /**
...@@ -384,11 +384,11 @@ VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int, ...@@ -384,11 +384,11 @@ VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
VLC_PUBLIC_API libvlc_media_instance_t * libvlc_playlist_get_media_instance( VLC_PUBLIC_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
libvlc_instance_t *, libvlc_exception_t * ); libvlc_instance_t *, libvlc_exception_t * );
VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_is_seekable( VLC_PUBLIC_API int libvlc_media_instance_is_seekable(
libvlc_media_instance_t *p_mi, libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e ); libvlc_exception_t *p_e );
VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_can_pause( VLC_PUBLIC_API int libvlc_media_instance_can_pause(
libvlc_media_instance_t *p_mi, libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e ); libvlc_exception_t *p_e );
...@@ -457,7 +457,7 @@ VLC_PUBLIC_API void libvlc_media_instance_set_position ( libvlc_media ...@@ -457,7 +457,7 @@ VLC_PUBLIC_API void libvlc_media_instance_set_position ( libvlc_media
VLC_PUBLIC_API void libvlc_media_instance_set_chapter ( libvlc_media_instance_t *, int, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_media_instance_set_chapter ( libvlc_media_instance_t *, int, libvlc_exception_t *);
VLC_PUBLIC_API int libvlc_media_instance_get_chapter (libvlc_media_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API int libvlc_media_instance_get_chapter (libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API int libvlc_media_instance_get_chapter_count( libvlc_media_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API int libvlc_media_instance_get_chapter_count( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_will_play ( libvlc_media_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API int libvlc_media_instance_will_play ( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API float libvlc_media_instance_get_rate ( libvlc_media_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API float libvlc_media_instance_get_rate ( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API void libvlc_media_instance_set_rate ( libvlc_media_instance_t *, float, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_media_instance_set_rate ( libvlc_media_instance_t *, float, libvlc_exception_t *);
VLC_PUBLIC_API libvlc_state_t libvlc_media_instance_get_state ( libvlc_media_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API libvlc_state_t libvlc_media_instance_get_state ( libvlc_media_instance_t *, libvlc_exception_t *);
...@@ -467,7 +467,7 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_instance_get_state ( libvlc_media_i ...@@ -467,7 +467,7 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_instance_get_state ( libvlc_media_i
* \param p_input the input * \param p_input the input
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_has_vout( libvlc_media_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API int libvlc_media_instance_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API float libvlc_media_instance_get_fps( libvlc_media_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API float libvlc_media_instance_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
...@@ -496,7 +496,7 @@ VLC_PUBLIC_API void ...@@ -496,7 +496,7 @@ VLC_PUBLIC_API void
char * psz_tag_key, char * psz_tag_key,
libvlc_exception_t * ); libvlc_exception_t * );
VLC_PUBLIC_API vlc_bool_t VLC_PUBLIC_API int
libvlc_tag_query_match( libvlc_tag_query_t *, libvlc_media_descriptor_t *, libvlc_tag_query_match( libvlc_tag_query_t *, libvlc_media_descriptor_t *,
libvlc_exception_t * ); libvlc_exception_t * );
...@@ -559,7 +559,7 @@ VLC_PUBLIC_API int ...@@ -559,7 +559,7 @@ VLC_PUBLIC_API int
libvlc_exception_t * ); libvlc_exception_t * );
/* This indicates if this media list is read-only from a user point of view */ /* This indicates if this media list is read-only from a user point of view */
VLC_PUBLIC_API vlc_bool_t VLC_PUBLIC_API int
libvlc_media_list_is_readonly( libvlc_media_list_t * p_mlist ); libvlc_media_list_is_readonly( libvlc_media_list_t * p_mlist );
VLC_PUBLIC_API void VLC_PUBLIC_API void
...@@ -740,7 +740,7 @@ VLC_PUBLIC_API void ...@@ -740,7 +740,7 @@ VLC_PUBLIC_API void
libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp, libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp,
libvlc_exception_t * p_e ); libvlc_exception_t * p_e );
VLC_PUBLIC_API vlc_bool_t VLC_PUBLIC_API int
libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp, libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp,
libvlc_exception_t * p_e ); libvlc_exception_t * p_e );
...@@ -986,7 +986,7 @@ VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_except ...@@ -986,7 +986,7 @@ VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_except
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the mute status (boolean) * \return the mute status (boolean)
*/ */
VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Set mute status * Set mute status
...@@ -995,7 +995,7 @@ VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exc ...@@ -995,7 +995,7 @@ VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exc
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return void * \return void
*/ */
VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
/** /**
* Get current audio level * Get current audio level
...@@ -1076,7 +1076,7 @@ VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_ ...@@ -1076,7 +1076,7 @@ VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_
VLC_PUBLIC_API libvlc_event_manager_t * VLC_PUBLIC_API libvlc_event_manager_t *
libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis ); libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
VLC_PUBLIC_API vlc_bool_t VLC_PUBLIC_API int
libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis ); libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
/**@} */ /**@} */
......
...@@ -60,7 +60,7 @@ void libvlc_audio_toggle_mute( libvlc_instance_t *p_instance, ...@@ -60,7 +60,7 @@ void libvlc_audio_toggle_mute( libvlc_instance_t *p_instance,
aout_VolumeMute( p_instance->p_libvlc_int, NULL ); aout_VolumeMute( p_instance->p_libvlc_int, NULL );
} }
vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *p_instance, int libvlc_audio_get_mute( libvlc_instance_t *p_instance,
libvlc_exception_t *p_e ) libvlc_exception_t *p_e )
{ {
/* /*
...@@ -74,7 +74,7 @@ vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *p_instance, ...@@ -74,7 +74,7 @@ vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *p_instance,
return VLC_FALSE; return VLC_FALSE;
} }
void libvlc_audio_set_mute( libvlc_instance_t *p_instance, vlc_bool_t mute, void libvlc_audio_set_mute( libvlc_instance_t *p_instance, int mute,
libvlc_exception_t *p_e ) libvlc_exception_t *p_e )
{ {
if ( mute ^ libvlc_audio_get_mute( p_instance, p_e ) ) if ( mute ^ libvlc_audio_get_mute( p_instance, p_e ) )
......
...@@ -655,7 +655,7 @@ libvlc_media_descriptor_get_duration( libvlc_media_descriptor_t * p_md, ...@@ -655,7 +655,7 @@ libvlc_media_descriptor_get_duration( libvlc_media_descriptor_t * p_md,
/************************************************************************** /**************************************************************************
* Get preparsed status for media_descriptor object. * Get preparsed status for media_descriptor object.
**************************************************************************/ **************************************************************************/
vlc_bool_t int
libvlc_media_descriptor_is_preparsed( libvlc_media_descriptor_t * p_md, libvlc_media_descriptor_is_preparsed( libvlc_media_descriptor_t * p_md,
libvlc_exception_t * p_e ) libvlc_exception_t * p_e )
{ {
......
...@@ -264,7 +264,7 @@ libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis ) ...@@ -264,7 +264,7 @@ libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis )
/************************************************************************** /**************************************************************************
* running (Public) * running (Public)
**************************************************************************/ **************************************************************************/
vlc_bool_t int
libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis ) libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis )
{ {
return p_mdis->running; return p_mdis->running;
......
...@@ -836,8 +836,7 @@ float libvlc_media_instance_get_fps( ...@@ -836,8 +836,7 @@ float libvlc_media_instance_get_fps(
return f_fps; return f_fps;
} }
vlc_bool_t libvlc_media_instance_will_play( int libvlc_media_instance_will_play( libvlc_media_instance_t *p_mi,
libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e) libvlc_exception_t *p_e)
{ {
input_thread_t *p_input_thread = input_thread_t *p_input_thread =
...@@ -914,8 +913,7 @@ libvlc_state_t libvlc_media_instance_get_state( ...@@ -914,8 +913,7 @@ libvlc_state_t libvlc_media_instance_get_state(
return vlc_to_libvlc_state(val.i_int); return vlc_to_libvlc_state(val.i_int);
} }
vlc_bool_t libvlc_media_instance_is_seekable( int libvlc_media_instance_is_seekable( libvlc_media_instance_t *p_mi,
libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e ) libvlc_exception_t *p_e )
{ {
input_thread_t *p_input_thread; input_thread_t *p_input_thread;
...@@ -935,8 +933,7 @@ vlc_bool_t libvlc_media_instance_is_seekable( ...@@ -935,8 +933,7 @@ vlc_bool_t libvlc_media_instance_is_seekable(
return val.b_bool; return val.b_bool;
} }
vlc_bool_t libvlc_media_instance_can_pause( int libvlc_media_instance_can_pause( libvlc_media_instance_t *p_mi,
libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e ) libvlc_exception_t *p_e )
{ {
input_thread_t *p_input_thread; input_thread_t *p_input_thread;
......
...@@ -456,7 +456,7 @@ int libvlc_media_list_index_of_item( libvlc_media_list_t * p_mlist, ...@@ -456,7 +456,7 @@ int libvlc_media_list_index_of_item( libvlc_media_list_t * p_mlist,
* *
* This indicates if this media list is read-only from a user point of view * This indicates if this media list is read-only from a user point of view
**************************************************************************/ **************************************************************************/
vlc_bool_t libvlc_media_list_is_readonly( libvlc_media_list_t * p_mlist ) int libvlc_media_list_is_readonly( libvlc_media_list_t * p_mlist )
{ {
return p_mlist->b_read_only; return p_mlist->b_read_only;
} }
......
...@@ -342,7 +342,7 @@ void libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp, ...@@ -342,7 +342,7 @@ void libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp,
/************************************************************************** /**************************************************************************
* is_playing (Public) * is_playing (Public)
**************************************************************************/ **************************************************************************/
vlc_bool_t int
libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp, libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp,
libvlc_exception_t * p_e ) libvlc_exception_t * p_e )
{ {
......
...@@ -49,7 +49,7 @@ static inline void playlist_mark_locked( libvlc_instance_t *p_instance, ...@@ -49,7 +49,7 @@ static inline void playlist_mark_locked( libvlc_instance_t *p_instance,
vlc_mutex_unlock( &p_instance->instance_lock ); vlc_mutex_unlock( &p_instance->instance_lock );
} }
void libvlc_playlist_loop( libvlc_instance_t *p_instance, vlc_bool_t loop, void libvlc_playlist_loop( libvlc_instance_t *p_instance, int loop,
libvlc_exception_t *p_e) libvlc_exception_t *p_e)
{ {
VLC_UNUSED(p_e); VLC_UNUSED(p_e);
......
...@@ -109,7 +109,7 @@ void libvlc_tag_query_set_match_tag_and_key( libvlc_tag_query_t * p_q, ...@@ -109,7 +109,7 @@ void libvlc_tag_query_set_match_tag_and_key( libvlc_tag_query_t * p_q,
* *
* Return true if the query p_q is matched in p_md * Return true if the query p_q is matched in p_md
**************************************************************************/ **************************************************************************/
vlc_bool_t int
libvlc_tag_query_match( libvlc_tag_query_t * p_q, libvlc_tag_query_match( libvlc_tag_query_t * p_q,
libvlc_media_descriptor_t * p_md, libvlc_media_descriptor_t * p_md,
libvlc_exception_t * p_e ) libvlc_exception_t * p_e )
......
...@@ -186,7 +186,7 @@ int libvlc_video_get_width( libvlc_media_instance_t *p_mi, ...@@ -186,7 +186,7 @@ int libvlc_video_get_width( libvlc_media_instance_t *p_mi,
return p_vout1->i_window_width; return p_vout1->i_window_width;
} }
vlc_bool_t libvlc_media_instance_has_vout( libvlc_media_instance_t *p_mi, int libvlc_media_instance_has_vout( libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e ) libvlc_exception_t *p_e )
{ {
input_thread_t *p_input_thread = libvlc_get_input_thread(p_mi, p_e); input_thread_t *p_input_thread = libvlc_get_input_thread(p_mi, p_e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment