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
EventManagerhas been removed as part of the rework. All events are now handled directly by their respective binding'sCallbacksclass. -
New
ThumbnailerandParserclasses 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_updatecallback withinlibvlc_media_player_watch_time_cbs, the goal is to accept alibvlc_media_player_time_point_t*object from LibVLC, create aMediaPlayer::TimePointobject, and expose it to the user, allowing further use of its methods for thelibvlc_media_player_time_point_*APIs. -
The LIBVLC_VERSIONchecks 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 MediaPlayerCallbacksneeds 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.