Commit 9c42b71c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Update to reflect recent Parsed events changes

parent f3c5940c
......@@ -300,22 +300,11 @@ class MediaEventManager : public EventManager
template <typename Func>
RegisteredEvent onParsedChanged( Func&& f )
{
EXPECT_SIGNATURE(void(bool));
return handle( libvlc_MediaParsedChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
{
auto callback = static_cast<DecayPtr<Func>>(data);
(*callback)( e->u.media_parsed_changed.new_status );
});
}
template <typename Func>
RegisteredEvent onParsedStatus( Func&& f )
{
EXPECT_SIGNATURE( void(Media::ParseStatus) );
return handle(libvlc_MediaParsedStatus, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
EXPECT_SIGNATURE( void(Media::ParsedStatus) );
return handle(libvlc_MediaParsedChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
{
auto callback = static_cast<DecayPtr<Func>>(data);
(*callback)( static_cast<Media::ParseStatus>( e->u.media_parsed_status.new_status ) );
(*callback)( static_cast<Media::ParsedStatus>( e->u.media_parsed_changed.new_status ) );
});
}
......
......@@ -115,12 +115,12 @@ public:
Interact = libvlc_media_do_interact,
};
enum class ParseStatus
enum class ParsedStatus
{
Init = libvlc_media_parse_init,
Skipped = libvlc_media_parse_skipped,
Failed = libvlc_media_parse_failed,
Done = libvlc_media_parse_done,
Init = libvlc_media_parsed_status_init,
Skipped = libvlc_media_parsed_status_skipped,
Failed = libvlc_media_parsed_status_failed,
Done = libvlc_media_parsed_status_done,
};
enum class Type
......@@ -603,9 +603,9 @@ public:
return libvlc_media_parse_with_options( *this, static_cast<libvlc_media_parse_flag_t>( flags ) ) == 0;
}
ParseStatus parseStatus()
ParsedStatus parsedStatus()
{
return static_cast<ParseStatus>( libvlc_media_get_parsed_status( *this ) );
return static_cast<ParsedStatus>( libvlc_media_get_parsed_status( *this ) );
}
#endif
......
Markdown is supported
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