Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8df7ff82
Commit
8df7ff82
authored
Dec 20, 2012
by
Olafs Vandāns
Committed by
Jean-Baptiste Kempf
Dec 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core playlist: provide playlist_GetNodeDuration
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
403c71dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
include/vlc_playlist.h
include/vlc_playlist.h
+4
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/playlist/item.c
src/playlist/item.c
+18
-0
No files found.
include/vlc_playlist.h
View file @
8df7ff82
...
...
@@ -283,6 +283,10 @@ VLC_API int playlist_Control( playlist_t *p_playlist, int i_query, bool b_locked
*/
VLC_API
input_thread_t
*
playlist_CurrentInput
(
playlist_t
*
p_playlist
)
VLC_USED
;
/** Get the duration of all items in a node.
*/
VLC_API
mtime_t
playlist_GetNodeDuration
(
playlist_item_t
*
);
/** Clear the playlist
* \param b_locked TRUE if playlist is locked when entering this function
*/
...
...
src/libvlccore.sym
View file @
8df7ff82
...
...
@@ -331,6 +331,7 @@ playlist_DeleteFromInput
playlist_Export
playlist_GetNextLeaf
playlist_GetPrevLeaf
playlist_GetNodeDuration
playlist_Import
playlist_IsServicesDiscoveryLoaded
playlist_ItemGetById
...
...
src/playlist/item.c
View file @
8df7ff82
...
...
@@ -719,6 +719,24 @@ void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
var_SetAddress
(
p_playlist
,
"playlist-item-append"
,
&
add
);
}
/**
* Get the duration of all items in a node.
*/
mtime_t
playlist_GetNodeDuration
(
playlist_item_t
*
node
)
{
/* For the assert */
playlist_t
*
p_playlist
=
node
->
p_playlist
;
PL_ASSERT_LOCKED
;
mtime_t
mt_duration
=
0
;
if
(
node
->
i_children
!=
-
1
)
for
(
int
i
=
0
;
i
<
node
->
i_children
;
i
++
)
mt_duration
+=
input_item_GetDuration
(
node
->
pp_children
[
i
]
->
p_input
);
return
mt_duration
;
}
/***************************************************************************
* The following functions are local
***************************************************************************/
...
...
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