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
b381bf8f
Commit
b381bf8f
authored
Jan 05, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: simplify and inline pl_Get()
parent
a87ad3c7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
19 deletions
+14
-19
include/vlc_interface.h
include/vlc_interface.h
+11
-0
include/vlc_playlist.h
include/vlc_playlist.h
+0
-9
modules/lua/extension.c
modules/lua/extension.c
+3
-1
src/interface/interface.c
src/interface/interface.c
+0
-8
src/libvlccore.sym
src/libvlccore.sym
+0
-1
No files found.
include/vlc_interface.h
View file @
b381bf8f
...
...
@@ -94,6 +94,17 @@ VLC_API int intf_Create( playlist_t *, const char * );
VLC_API
void
libvlc_Quit
(
libvlc_int_t
*
);
static
inline
playlist_t
*
pl_Get
(
struct
intf_thread_t
*
intf
)
{
return
(
playlist_t
*
)(
intf
->
p_parent
);
}
/**
* Retrieves the current input thread from the playlist.
* @note The returned object must be released with vlc_object_release().
*/
#define pl_CurrentInput(intf) (playlist_CurrentInput(pl_Get(intf)))
/**
* \defgroup vlc_subscription Log messages subscription
* These functions deal with log messages.
...
...
include/vlc_playlist.h
View file @
b381bf8f
...
...
@@ -253,9 +253,6 @@ enum pl_locked_state
#define PL_UNLOCK playlist_Unlock( p_playlist )
#define PL_ASSERT_LOCKED playlist_AssertLocked( p_playlist )
VLC_API
playlist_t
*
pl_Get
(
vlc_object_t
*
);
#define pl_Get( a ) pl_Get( VLC_OBJECT(a) )
/* Playlist control */
#define playlist_Play(p) playlist_Control(p,PLAYLIST_PLAY, pl_Unlocked )
#define playlist_Pause(p) playlist_Control(p,PLAYLIST_PAUSE, pl_Unlocked )
...
...
@@ -393,12 +390,6 @@ VLC_API void playlist_EnableAudioFilter( playlist_t *, const char *, bool );
/***********************************************************************
* Inline functions
***********************************************************************/
/** Small helper tp get current playing input or NULL. Release the input after use. */
static
inline
input_thread_t
*
pl_CurrentInput
(
struct
intf_thread_t
*
intf
)
{
return
playlist_CurrentInput
(
pl_Get
(
(
vlc_object_t
*
)
intf
)
);
}
/** Tell if the playlist is empty */
static
inline
bool
playlist_IsEmpty
(
playlist_t
*
p_playlist
)
{
...
...
modules/lua/extension.c
View file @
b381bf8f
...
...
@@ -36,6 +36,7 @@
#include <vlc_common.h>
#include <vlc_input.h>
#include <vlc_interface.h>
#include <vlc_events.h>
#include <vlc_dialog.h>
...
...
@@ -808,7 +809,8 @@ static lua_State* GetLuaState( extensions_manager_t *p_mgr,
return
NULL
;
}
vlclua_set_this
(
L
,
p_mgr
);
vlclua_set_playlist_internal
(
L
,
pl_Get
(
p_mgr
)
);
vlclua_set_playlist_internal
(
L
,
pl_Get
((
intf_thread_t
*
)(
p_mgr
->
p_parent
))
);
vlclua_extension_set
(
L
,
p_ext
);
luaL_openlibs
(
L
);
...
...
src/interface/interface.c
View file @
b381bf8f
...
...
@@ -155,14 +155,6 @@ static playlist_t *intf_GetPlaylist(libvlc_int_t *libvlc)
return
playlist
;
}
playlist_t
*
(
pl_Get
)(
vlc_object_t
*
obj
)
{
playlist_t
*
pl
=
intf_GetPlaylist
(
obj
->
p_libvlc
);
if
(
unlikely
(
pl
==
NULL
))
abort
();
return
pl
;
}
/**
* Inserts an item in the playlist used by interfaces.
* @note This function may <b>not</b> be called at the same time as
...
...
src/libvlccore.sym
View file @
b381bf8f
...
...
@@ -350,7 +350,6 @@ playlist_VolumeSet
playlist_VolumeUp
playlist_MuteSet
playlist_MuteGet
pl_Get
resolve_xml_special_chars
sdp_AddAttribute
sdp_AddMedia
...
...
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