X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_vlm.h;h=b3c712aa66a2839704181089ed738e00e7484da8;hb=1c8685fb7d890424ec06ff9a2e3cbc1da984e617;hp=5795b529ed7e4eb01b4062dd8e46784ce4e7c1e1;hpb=03efb5df5a1914279ddc8dde2c917a770fbea16c;p=vlc diff --git a/include/vlc_vlm.h b/include/vlc_vlm.h index 5795b529ed..b3c712aa66 100644 --- a/include/vlc_vlm.h +++ b/include/vlc_vlm.h @@ -22,10 +22,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#if !defined( __LIBVLC__ ) - #error You are not libvlc or one of its plugins. You cannot include this file -#endif - #ifndef _VLC_VLM_H #define _VLC_VLM_H 1 @@ -35,7 +31,7 @@ typedef struct { int64_t id; - vlc_bool_t b_enabled; + bool b_enabled; /* */ char *psz_name; @@ -50,10 +46,10 @@ typedef struct char *psz_output; /* */ - vlc_bool_t b_vod; + bool b_vod; struct { - vlc_bool_t b_loop; + bool b_loop; } broadcast; struct { @@ -70,7 +66,7 @@ typedef 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; @@ -157,7 +153,7 @@ VLC_EXPORT( void, vlm_Delete, ( vlm_t * ) ); VLC_EXPORT( int, vlm_ExecuteCommand, ( vlm_t *, const char *, vlm_message_t ** ) ); VLC_EXPORT( int, vlm_Control, ( vlm_t *p_vlm, int i_query, ... ) ); -VLC_EXPORT( vlm_message_t *, vlm_MessageNew, ( const char *, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) ); +VLC_EXPORT( vlm_message_t *, vlm_MessageNew, ( const char *, const char *, ... ) LIBVLC_FORMAT( 2, 3 ) ); VLC_EXPORT( vlm_message_t *, vlm_MessageAdd, ( vlm_message_t *, vlm_message_t * ) ); VLC_EXPORT( void, vlm_MessageDelete, ( vlm_message_t * ) ); @@ -170,10 +166,10 @@ static inline void vlm_media_Init( vlm_media_t *p_media ) 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 ) @@ -208,8 +204,7 @@ static inline void vlm_media_Copy( vlm_media_t *p_dst, vlm_media_t *p_src ) static inline void vlm_media_Clean( vlm_media_t *p_media ) { int i; - if( p_media->psz_name ) - free( p_media->psz_name ); + free( p_media->psz_name ); for( i = 0; i < p_media->i_input; i++ ) free( p_media->ppsz_input[i]) ; @@ -219,13 +214,9 @@ static inline void vlm_media_Clean( vlm_media_t *p_media ) free( p_media->ppsz_option[i]) ; TAB_CLEAN(p_media->i_option, p_media->ppsz_option ); - if( p_media->psz_output ) - free( p_media->psz_output ); + free( p_media->psz_output ); if( p_media->b_vod ) - { - if( p_media->vod.psz_mux ) - free( p_media->vod.psz_mux ); - } + free( p_media->vod.psz_mux ); } static inline vlm_media_t *vlm_media_New(void) { @@ -255,13 +246,12 @@ static inline void vlm_media_instance_Init( vlm_media_instance_t *p_instance ) 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 ) { - if( p_instance->psz_name ) - free( p_instance->psz_name ); + free( p_instance->psz_name ); } static inline vlm_media_instance_t *vlm_media_instance_New(void) {