Skip to content
Snippets Groups Projects

qt: refactor media tree/source models

Merged Romain Vimont requested to merge rom1v/vlc:media_tree_listener into master
All threads resolved!

Context: A media source is a "front-end" of a service discovery (1-to-1 relationship). It embeds a media tree to expose the tree of media loaded by the service discovery or media added as the result of a preparse (concretely, double-click on a folder or a zip will "expand" new items in the tree).

Currently, the Qt models/views browse a media source, even if semantically, they would only need a media tree.

The purpose of this change is to make NetworkMediaModel more generic so that it can browse any media tree, even without media source instance. In particular, this will allow to expose a media tree for a specific media (input_item_t), which is not created from a service discovery.

Changes:

  • Make some core functions public (the vlc_media_tree_t "methods").
  • Use one "callbacks" instance per listener, so that each client can provide its own additional data.
  • Refactor NetworkSourceListener into a MediaTreeListener, which is only linked to a media tree, not a media source.
  • Refactor NetworkMediaModel to be totally independent of media sources, and NetworkDeviceModel store its media source (which is not directly stored in the listener anymore, because it's not meaningful for all clients) in its listener callbacks implementation.

Read individual commit messages for more details (especially qt: use one "callbacks" instance per listener).

Edited by Romain Vimont

Merge request reports

Merge request pipeline #271634 passed

Merge request pipeline passed for 7cc8e707

Approved by

Merged by Steve LhommeSteve Lhomme 2 years ago (Oct 11, 2022 11:19am UTC)

Merge details

  • Changes merged into master with 7cc8e707.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #271638 passed

Pipeline passed for 7cc8e707 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Steve Lhomme
  • Romain Vimont added 25 commits

    added 25 commits

    • b7e40ec8...02c95ad3 - 16 commits from branch videolan:master
    • 150b66f7 - media tree: make functions public
    • 3530f771 - qt: remove unused default constructor
    • f0b4d118 - qt: remove unnecessary explicit destructor
    • e77a7195 - qt: use static free functions for C callbacks
    • 29723ffe - qt: use one "callbacks" instance per listener
    • 742d4aa8 - qt: remove unused include
    • 457f139f - qt: remove unused mediaSource
    • 71f2cdd8 - qt: avoid unnecessary smart pointer copies
    • fb2c5b51 - qt: refactor media tree listener

    Compare with previous version

  • Romain Vimont resolved all threads

    resolved all threads

  • Jean-Baptiste Kempf approved this merge request

    approved this merge request

  • Pierre Lamot approved this merge request

    approved this merge request

  • Romain Vimont marked this merge request as ready

    marked this merge request as ready

  • MR Acceptance result

    :tada: This MergeRequest has been Accepted! Congratulations.

    MR acceptance checks details:

    • :white_check_mark: MR should be considered mergeable by Gitlab
    • :white_check_mark: Last pipeline should be successful
    • :white_check_mark: MergeRequest should have at least one external review and/or vote
    • :white_check_mark: All threads should be resolved, and score >= 0
    • :white_check_mark: MergeRequest should have no activity (threads/votes) for (24h/24h)

    This message was automatically generated by homer-bot.

  • Steve Lhomme added 114 commits

    added 114 commits

    • fb2c5b51...9dafb994 - 105 commits from branch videolan:master
    • c808e3e8 - media tree: make functions public
    • 07fc99b9 - qt: remove unused default constructor
    • 0aeafa2d - qt: remove unnecessary explicit destructor
    • 1a9ab8b5 - qt: use static free functions for C callbacks
    • eae4b0c0 - qt: use one "callbacks" instance per listener
    • baacc656 - qt: remove unused include
    • 104fa8e8 - qt: remove unused mediaSource
    • b9552485 - qt: avoid unnecessary smart pointer copies
    • 7cc8e707 - qt: refactor media tree listener

    Compare with previous version

  • Steve Lhomme enabled an automatic merge when the pipeline for 7cc8e707 succeeds

    enabled an automatic merge when the pipeline for 7cc8e707 succeeds

  • merged

  • Please register or sign in to reply
    Loading