Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Leonhard Saam
libvlcpp
Commits
5d3887a9
Commit
5d3887a9
authored
Jun 12, 2020
by
Hugo Beauzée-Luyssen
Browse files
Media: Expose new track listing API
parent
7b07a125
Changes
1
Hide whitespace changes
Inline
Side-by-side
vlcpp/Media.hpp
View file @
5d3887a9
...
...
@@ -35,6 +35,7 @@ namespace VLC
class
MediaEventManager
;
class
Instance
;
class
MediaList
;
class
TrackList
;
class
Media
:
protected
CallbackOwner
<
4
>
,
public
Internal
<
libvlc_media_t
>
{
...
...
@@ -653,6 +654,15 @@ public:
*
* \return a vector containing all tracks
*/
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
std
::
shared_ptr
<
TrackList
>
tracks
(
libvlc_track_type_t
type
)
{
auto
trackList
=
libvlc_media_get_tracklist
(
*
this
,
type
);
if
(
trackList
==
nullptr
)
return
nullptr
;
return
std
::
make_shared
<
TrackList
>
(
trackList
);
}
#elif #if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
std
::
vector
<
MediaTrack
>
tracks
()
{
libvlc_media_track_t
**
tracks
;
...
...
@@ -667,6 +677,7 @@ public:
libvlc_media_tracks_release
(
tracks
,
nbTracks
);
return
res
;
}
#endif
std
::
shared_ptr
<
MediaList
>
subitems
()
{
...
...
Write
Preview
Supports
Markdown
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