Skip to content

Draft: Adapt bindings to the LibVLC 4.0 rework

Ayush Dey requested to merge deyayush6/libvlcpp:libvlc-4-rework into master

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's Callbacks class.

  • New Thumbnailer and Parser 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 the on_update callback within libvlc_media_player_watch_time_cbs, the goal is to accept a libvlc_media_player_time_point_t* object from LibVLC, create a MediaPlayer::TimePoint object, and expose it to the user, allowing further use of its methods for the libvlc_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 of EventManager.

  • 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.

Edited by Ayush Dey

Merge request reports

Loading