Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
3a1efde2
Commit
3a1efde2
authored
Jan 24, 2011
by
Srikanth Raju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ML/Core: Change ml_Hold/ml_Release to ml_Get
Similar to pl_Get
parent
7b21f9d5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
48 deletions
+10
-48
include/vlc_media_library.h
include/vlc_media_library.h
+2
-9
modules/gui/qt4/components/playlist/ml_item.cpp
modules/gui/qt4/components/playlist/ml_item.cpp
+1
-2
modules/gui/qt4/components/playlist/ml_model.cpp
modules/gui/qt4/components/playlist/ml_model.cpp
+1
-2
modules/gui/qt4/dialogs/ml_configuration.cpp
modules/gui/qt4/dialogs/ml_configuration.cpp
+1
-2
src/libvlccore.sym
src/libvlccore.sym
+1
-2
src/misc/media_library.c
src/misc/media_library.c
+2
-22
src/missing.c
src/missing.c
+2
-9
No files found.
include/vlc_media_library.h
View file @
3a1efde2
...
...
@@ -397,15 +397,8 @@ struct ml_person_t
* @return The media library object. NULL if the media library
* object could not be loaded
*/
VLC_EXPORT
(
media_library_t
*
,
ml_Hold
,
(
vlc_object_t
*
p_this
)
);
#define ml_Hold( a ) ml_Hold( VLC_OBJECT(a) )
/**
* @brief Discard your ref to media library
* @param p_this The object holding the media library
*/
VLC_EXPORT
(
void
,
ml_Release
,
(
vlc_object_t
*
p_this
)
);
#define ml_Release(a) ml_Release( VLC_OBJECT(a) )
VLC_EXPORT
(
media_library_t
*
,
ml_Get
,
(
vlc_object_t
*
p_this
)
);
#define ml_Get( a ) ml_Get( VLC_OBJECT(a) )
/**
* @brief Create a Media Library VLC object.
...
...
modules/gui/qt4/components/playlist/ml_item.cpp
View file @
3a1efde2
...
...
@@ -88,7 +88,7 @@ MLItem::MLItem( const MLModel *p_model,
if
(
p_media
)
ml_gc_incref
(
p_media
);
this
->
media
=
p_media
;
p_ml
=
ml_
Hold
(
_p_intf
);
p_ml
=
ml_
Get
(
_p_intf
);
}
MLItem
::~
MLItem
()
...
...
@@ -96,7 +96,6 @@ MLItem::~MLItem()
// Free private data
if
(
this
->
media
)
ml_gc_decref
(
this
->
media
);
ml_Release
(
p_intf
);
if
(
!
children
.
isEmpty
()
)
clearChildren
();
}
...
...
modules/gui/qt4/components/playlist/ml_model.cpp
View file @
3a1efde2
...
...
@@ -58,7 +58,7 @@ static int mediaUpdated( vlc_object_t *p_this, char const *psz_var,
MLModel
::
MLModel
(
intf_thread_t
*
_p_intf
,
QObject
*
parent
)
:
VLCModel
(
_p_intf
,
parent
)
{
p_ml
=
ml_
Hold
(
p_intf
);
p_ml
=
ml_
Get
(
p_intf
);
vlc_array_t
*
p_result_array
=
vlc_array_new
();
ml_Find
(
p_ml
,
p_result_array
,
ML_MEDIA
);
insertResultArray
(
p_result_array
);
...
...
@@ -76,7 +76,6 @@ MLModel::~MLModel()
var_DelCallback
(
p_ml
,
"media-meta-change"
,
mediaUpdated
,
this
);
var_DelCallback
(
p_ml
,
"media-deleted"
,
mediaDeleted
,
this
);
var_DelCallback
(
p_ml
,
"media-added"
,
mediaAdded
,
this
);
ml_Release
(
p_intf
);
}
void
MLModel
::
clear
()
...
...
modules/gui/qt4/dialogs/ml_configuration.cpp
View file @
3a1efde2
...
...
@@ -230,7 +230,7 @@ MLConfDialog::MLConfDialog( QWidget *parent, intf_thread_t *_p_intf )
main_layout
->
addWidget
(
recursivity
,
1
,
0
);
main_layout
->
addWidget
(
buttonsBox
,
2
,
0
);
p_ml
=
ml_
Hold
(
p_intf
);
p_ml
=
ml_
Get
(
p_intf
);
init
();
BUTTONACT
(
save
,
save
()
);
...
...
@@ -241,7 +241,6 @@ MLConfDialog::MLConfDialog( QWidget *parent, intf_thread_t *_p_intf )
MLConfDialog
::~
MLConfDialog
()
{
ml_Release
(
p_intf
);
}
void
MLConfDialog
::
init
()
...
...
src/libvlccore.sym
View file @
3a1efde2
...
...
@@ -243,8 +243,7 @@ make_path
mdate
ml_Create
ml_Destroy
ml_Hold
ml_Release
ml_Get
media_New
ml_OpConnectChilds
ml_FtreeSpec
...
...
src/misc/media_library.c
View file @
3a1efde2
...
...
@@ -98,14 +98,14 @@ media_library_t *ml_Create( vlc_object_t *p_this, char *psz_name )
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
)
);
...
...
@@ -118,30 +118,10 @@ media_library_t* ml_Hold( vlc_object_t* p_this )
=
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
*/
...
...
src/missing.c
View file @
3a1efde2
...
...
@@ -387,20 +387,13 @@ vlm_t *vlm_New (vlc_object_t *obj)
#ifndef MEDIA_LIBRARY
#include<vlc_media_library.h>
#undef ml_
Hold
media_library_t
*
ml_
Hold
(
vlc_object_t
*
p_this
)
#undef ml_
Get
media_library_t
*
ml_
Get
(
vlc_object_t
*
p_this
)
{
VLC_UNUSED
(
p_this
);
return
NULL
;
}
#undef ml_Release
void
ml_Release
(
vlc_object_t
*
p_this
)
{
VLC_UNUSED
(
p_this
);
assert
(
0
);
}
media_library_t
*
ml_Create
(
vlc_object_t
*
p_this
,
char
*
psz_name
)
{
VLC_UNUSED
(
p_this
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment