Draft: Adapt bindings to the LibVLC 4.0 rework
Adapt libvlcpp bindings to the LibVLC 4.0 rework (vlc!3503)
Overview of changes:
-
Callback event handlers now have their own class. Users can create an instance of this class by passing the mandatory callbacks as arguments, while optional callbacks can be assigned through the class methods. This provides flexibility for users to assign optional event handlers as needed.
-
The
EventManager
has been removed as part of the rework. All events are now handled directly by their respective binding'sCallbacks
class. -
New
Thumbnailer
andParser
classes have been introduced for the bindings of their respective APIs. -
All API calls have been updated in accordance with the rework.
TODO:
-
A wrapper function is still pending implementation. This function will be used during callback assignment, accepting raw libvlc struct objects from LibVLC and creating corresponding libvlcpp wrapper objects before exposing them to the user.
Example: In theon_update
callback withinlibvlc_media_player_watch_time_cbs
, the goal is to accept alibvlc_media_player_time_point_t*
object from LibVLC, create aMediaPlayer::TimePoint
object, and expose it to the user, allowing further use of its methods for thelibvlc_media_player_time_point_*
APIs. -
The LIBVLC_VERSION
checks need to be removed. As discussed, the rework will not maintain backward compatibility with LibVLC 3.0 or earlier, due primarily to the removal ofEventManager
. -
Documentation for MediaPlayerCallbacks
needs to be added. -
Tests using the updated API bindings need to be written.
Note: I'll complete the last three tasks after the code has been reviewed and finalised.