* Preamble
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
#include <vlc_demux.h>
#include "playlist.h"
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 );
/*****************************************************************************
* Activate: initializes m3u demux structures
*****************************************************************************/
-int E_(Import_SGIMB)( vlc_object_t * p_this )
+int Import_SGIMB( vlc_object_t * p_this )
{
demux_t *p_demux = (demux_t *)p_this;
- const byte_t *p_peek;
+ const uint8_t *p_peek;
int i_size;
/* Lets check the content to see if this is a sgi mediabase file */
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;
}
/*****************************************************************************
* Deactivate: frees unused data
*****************************************************************************/
-void E_(Close_SGIMB)( vlc_object_t *p_this )
+void Close_SGIMB( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- if( p_sys->psz_uri )
- free( p_sys->psz_uri );
- if( p_sys->psz_server )
- free( p_sys->psz_server );
- if( p_sys->psz_location )
- free( p_sys->psz_location );
- if( p_sys->psz_name )
- free( p_sys->psz_name );
- if( p_sys->psz_user )
- free( p_sys->psz_user );
- if( p_sys->psz_password )
- free( p_sys->psz_password );
- if( p_sys->psz_mcast_ip )
- free( p_sys->psz_mcast_ip );
+ free( p_sys->psz_uri );
+ free( p_sys->psz_server );
+ free( p_sys->psz_location );
+ free( p_sys->psz_name );
+ free( p_sys->psz_user );
+ free( p_sys->psz_password );
+ free( p_sys->psz_mcast_ip );
free( p_demux->p_sys );
return;
}
{
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
{
while( ( psz_line = stream_ReadLine( p_demux->s ) ) )
{
ParseLine( p_demux, psz_line );
- if( psz_line ) free( psz_line );
+ free( psz_line );
}
if( p_sys->psz_mcast_ip )
char *temp;
asprintf( &temp, "udp://@" "%s:%i", p_sys->psz_mcast_ip, p_sys->i_mcast_port );
- if( p_sys->psz_uri ) free( p_sys->psz_uri );
+ free( p_sys->psz_uri );
p_sys->psz_uri = strdup( temp );
free( temp );
}
free( temp );
}
- p_child = input_ItemNewWithType( (vlc_object_t *)p_playlist, p_sys->psz_uri,
+ p_child = input_ItemNewWithType( p_demux, p_sys->psz_uri,
p_sys->psz_name ? p_sys->psz_name : p_sys->psz_uri,
0, NULL, p_sys->i_duration, ITEM_TYPE_NET );
free( psz_option );
}
- input_ItemAddSubItem( p_current_input, p_child, VLC_FALSE );
+ input_ItemAddSubItem( p_current_input, p_child );
vlc_gc_decref( p_child );
HANDLE_PLAY_AND_RELEASE
return 0; /* Needed for correct operation of go back */
static int Control( demux_t *p_demux, int i_query, va_list args )
{
+ VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}