* 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
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
return p_ml;
}
-#undef ml_Hold
+#undef ml_Get
/**
* @brief Acquire a reference to the media library singleton
* @param p_this Object that holds the reference
* @return media_library_t The ml object. NULL if not compiled with
* media library or if unable to load
*/
-media_library_t* ml_Hold( vlc_object_t* p_this )
+media_library_t* ml_Get( vlc_object_t* p_this )
{
media_library_t* p_ml;
vlc_mutex_lock( &( libvlc_priv( p_this->p_libvlc )->ml_lock ) );
= ml_Create( VLC_OBJECT( p_this->p_libvlc ), NULL );
p_ml = libvlc_priv (p_this->p_libvlc)->p_ml;
}
- if( p_ml )
- vlc_object_hold( p_ml );
vlc_mutex_unlock( &( libvlc_priv( p_this->p_libvlc )->ml_lock ) );
return p_ml;
}
-#undef ml_Release
-/**
- * @brief Release a reference to the media library singleton
- * @param p_this Object that holds the reference
- */
-void ml_Release( vlc_object_t* p_this )
-{
- media_library_t* p_ml;
- p_ml = libvlc_priv (p_this->p_libvlc)->p_ml;
- if( p_ml == NULL )
- {
- msg_Warn( p_this->p_libvlc , "Spurious release ML called");
- return;
- }
- assert( VLC_OBJECT( p_ml ) != p_this );
- vlc_object_release( p_ml );
-}
-
/**
* @brief Destructor for ml_media_t
*/