* 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
-#ifdef __cpluplus
-extern "C" {
-#endif
-
#include <vlc_input.h>
/* VLM media */
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;
};
+#ifdef __cpluplus
+extern "C" {
+#endif
+
#define vlm_New( a ) __vlm_New( VLC_OBJECT(a) )
VLC_EXPORT( vlm_t *, __vlm_New, ( vlc_object_t * ) );
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 * ) );
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 )
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]) ;
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)
{
- vlm_media_t *p_media = malloc( sizeof(vlm_media_t) );
+ vlm_media_t *p_media = (vlm_media_t *)malloc( sizeof(vlm_media_t) );
if( p_media )
vlm_media_Init( p_media );
return p_media;
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)
{
- vlm_media_instance_t *p_instance = malloc( sizeof(vlm_media_instance_t) );
+ vlm_media_instance_t *p_instance = (vlm_media_instance_t *) malloc( sizeof(vlm_media_instance_t) );
if( p_instance )
vlm_media_instance_Init( p_instance );
return p_instance;