VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
VLC_EXPORT( libvlc_int_t *, vlc_current_object, ( int ) );
+#if defined( WIN32 ) || defined( SYS_BEOS ) || defined( __APPLE__ )
+VLC_EXPORT( const char *, vlc_path, ( vlc_object_t * ) );
+#endif
+
/*}@*/
#define vlc_object_create(a,b) \
#if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL )
{
- char * psz_vlcpath = p_intf->p_libvlc_global->psz_vlcpath;
+ char * psz_vlcpath = vlc_path( p_intf );
psz_src = malloc( strlen(psz_vlcpath) + strlen("/share/http" ) + 1 );
if( !psz_src ) return VLC_ENOMEM;
#if defined(WIN32)
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{
- char *psz_vlcpath = p_demux->p_libvlc_global->psz_vlcpath;
+ char *psz_vlcpath = vlc_path( p_demux );
ppsz_dir_list[1] = malloc( strlen( psz_vlcpath ) + strlen( "/share/luaplaylist" ) + 1 );
if( !ppsz_dir_list[1] ) return VLC_ENOMEM;
# if defined( WIN32 )
end = psz_string + strlen( psz_string );
/* ignore whitespaces */
- for (; psz_string < end && ( *psz_string == '\t' || *psz_string == ' ' );
+ for (; psz_string < end && ( *psz_string == '\t' || *psz_string == ' ' );
psz_string++ );
/* duration: read to next comma */
// Initialize the resource path
m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir +
"\\" + CONFIG_DIR + "\\skins" );
- m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath +
+ m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\skins" );
- m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath +
+ m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\skins2" );
- m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath +
+ m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\share\\skins" );
- m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath +
+ m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\share\\skins2" );
// All went well
}
}
}
+
+
+#if defined( WIN32 ) || defined( SYS_BEOS ) || defined( __APPLE__ )
+const char *vlc_path( vlc_object_t *p_this )
+{
+ return vlc_global( p_this )->psz_vlcpath;
+}
+#endif