Commit 6a923aeb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlm: vlm_New() needs a VLC instance

Don't hide the fact.
parent b63d462d
......@@ -184,8 +184,7 @@ struct vlm_message_t
extern "C" {
#endif
VLC_API vlm_t * vlm_New( vlc_object_t *, const char *path );
#define vlm_New( a, p ) vlm_New( VLC_OBJECT(a), p )
VLC_API vlm_t * vlm_New( libvlc_int_t *, const char *path );
VLC_API void vlm_Delete( vlm_t * );
VLC_API int vlm_ExecuteCommand( vlm_t *, const char *, vlm_message_t ** );
VLC_API int vlm_Control( vlm_t *p_vlm, int i_query, ... );
......
......@@ -55,7 +55,7 @@
VLMDialog::VLMDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
vlm_t *p_vlm = vlm_New( p_intf, NULL );
vlm_t *p_vlm = vlm_New( p_intf->obj.libvlc, NULL );
if( !p_vlm )
{
......
......@@ -53,7 +53,7 @@ static const luaL_Reg vlclua_vlm_reg[] = {
static int vlclua_vlm_new( lua_State *L )
{
vlc_object_t *p_this = vlclua_get_this( L );
vlm_t *p_vlm = vlm_New( p_this, NULL );
vlm_t *p_vlm = vlm_New( p_this->obj.libvlc, NULL );
if( !p_vlm )
return luaL_error( L, "Cannot start VLM." );
......
......@@ -111,13 +111,13 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
static vlc_mutex_t vlm_mutex = VLC_STATIC_MUTEX;
#undef vlm_New
/*****************************************************************************
* vlm_New:
*****************************************************************************/
vlm_t *vlm_New ( vlc_object_t *p_this, const char *psz_vlmconf )
vlm_t *vlm_New( libvlc_int_t *libvlc, const char *psz_vlmconf )
{
vlm_t *p_vlm = NULL, **pp_vlm = &(libvlc_priv (p_this->obj.libvlc)->p_vlm);
vlm_t *p_vlm = NULL, **pp_vlm = &(libvlc_priv(libvlc)->p_vlm);
vlc_object_t *p_this = VLC_OBJECT(libvlc);
/* Avoid multiple creation */
vlc_mutex_lock( &vlm_mutex );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment