Commit 7a026fa6 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Fix build with libvlc 3.x

parent 1a68132a
......@@ -105,10 +105,12 @@ int main(int ac, char** av)
auto lFunc = std::function<void(float)>{ l };
auto h1 = mp.eventManager().onTimeChanged(lFunc);
auto h2 = mp.eventManager().onPositionChanged(lFunc);
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
mp.eventManager().onTitleSelectionChanged(
[](const VLC::TitleDescription& t, int idx ) {
std::cout << "New title selected: " << t.name() << " at index " << idx << std::endl;
});
#endif
std::this_thread::sleep_for( std::chrono::seconds( 2 ) );
......
......@@ -662,7 +662,7 @@ public:
return nullptr;
return std::make_shared<TrackList>( trackList );
}
#elif #if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
#elif LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
std::vector<MediaTrack> tracks()
{
libvlc_media_track_t** tracks;
......
......@@ -1841,7 +1841,7 @@ public:
#endif
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
std::shared_ptr<TrackList> tracks( libvlc_track_type_t type )
{
......
......@@ -341,7 +341,7 @@ public:
}
#endif
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
const std::string& idStr() const
{
return m_idStr;
......@@ -391,10 +391,12 @@ public:
m_language = c->psz_language;
if ( c->psz_description != nullptr )
m_description = c->psz_description;
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
if ( c->psz_id != nullptr )
m_idStr = c->psz_id;
if ( c->psz_name )
m_name = c->psz_name;
#endif
switch ( c->i_type )
{
case libvlc_track_audio:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment