Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
8df7ff82
Commit
8df7ff82
authored
12 years ago
by
Olafs Vandāns
Committed by
Jean-Baptiste Kempf
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Core playlist: provide playlist_GetNodeDuration
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
403c71dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/vlc_playlist.h
+4
-0
4 additions, 0 deletions
include/vlc_playlist.h
src/libvlccore.sym
+1
-0
1 addition, 0 deletions
src/libvlccore.sym
src/playlist/item.c
+18
-0
18 additions, 0 deletions
src/playlist/item.c
with
23 additions
and
0 deletions
include/vlc_playlist.h
+
4
−
0
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
*/
...
...
This diff is collapsed.
Click to expand it.
src/libvlccore.sym
+
1
−
0
View file @
8df7ff82
...
...
@@ -331,6 +331,7 @@ playlist_DeleteFromInput
playlist_Export
playlist_GetNextLeaf
playlist_GetPrevLeaf
playlist_GetNodeDuration
playlist_Import
playlist_IsServicesDiscoveryLoaded
playlist_ItemGetById
...
...
This diff is collapsed.
Click to expand it.
src/playlist/item.c
+
18
−
0
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
***************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment