[vlc-commits] [Git][videolan/vlc][master] 14 commits: diffutil: provide a generic diffutil implementation

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Mar 27 13:19:03 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
230c1d1a by Pierre Lamot at 2022-03-27T13:01:07+00:00
diffutil: provide a generic diffutil implementation

this allows to compare two lists and generate a list of insertions and deletion
from the old list to the new one.

This is useful to UI frontends to preform partial updates of their view when
data change on the backend.

- - - - -
dbcbe6b9 by Pierre Lamot at 2022-03-27T13:01:07+00:00
medialibrary: add folder getter

- - - - -
ff3329ff by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: make createLoader returns a unique_ptr<BaseModel>

- - - - -
f4bb9b1a by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: pass media type in medialib event

- - - - -
3f4f441e by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: allow MLModels to load a given item from the medialibrary by id

- - - - -
65ed6019 by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: allow items to be updated or removed manually from cache

- - - - -
9860b13b by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: partially update model when possible on media deletion/update

- - - - -
d6ae28da by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: move begin/endResetModel calls inside MLBaseModel::clear

- - - - -
6bf9a88b by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: use diff util algorithm to perform partial update of the model

this allows to submit to the view only the changes made on the model when the
database changes instead of invalidating and resetting the whole view.

data cache is changed from a windowed view over the data, to a model where data
is loaded from the start and loaded by chunk (append to the cache), when data is
invalidated the data is reloaded in background and the difference (insertions
and deletions) are propagated to the view.

- - - - -
64523537 by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: don't reset model on size change

- - - - -
ed433cc7 by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: don't reset the model in sort setters when sorting doesn't changes

- - - - -
5e7e9cac by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: allow to move or remove range of items from the cache

this would allow to move or update elements in "a priori" before getting the
notification from the database

- - - - -
35de0a01 by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: update local cache "a priori" on user interaction in playlist model

- - - - -
4e67a7c0 by Pierre Lamot at 2022-03-27T13:01:07+00:00
qt: allow to detect moves in MLList cache

This remains is disabled by default, The extra cost isn't really worth it as
move operations originated from the database are very rare, move operations from
the user are usually handled "a priori".

- - - - -


30 changed files:

- + include/vlc_diffutil.h
- include/vlc_media_library.h
- modules/gui/qt/medialibrary/mlalbummodel.cpp
- modules/gui/qt/medialibrary/mlalbummodel.hpp
- modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp
- modules/gui/qt/medialibrary/mlalbumtrackmodel.hpp
- modules/gui/qt/medialibrary/mlartistmodel.cpp
- modules/gui/qt/medialibrary/mlartistmodel.hpp
- modules/gui/qt/medialibrary/mlbasemodel.cpp
- modules/gui/qt/medialibrary/mlbasemodel.hpp
- modules/gui/qt/medialibrary/mlevent.hpp
- modules/gui/qt/medialibrary/mlgenremodel.cpp
- modules/gui/qt/medialibrary/mlgenremodel.hpp
- modules/gui/qt/medialibrary/mllistcache.cpp
- modules/gui/qt/medialibrary/mllistcache.hpp
- modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp
- modules/gui/qt/medialibrary/mlplaylistlistmodel.hpp
- modules/gui/qt/medialibrary/mlplaylistmodel.cpp
- modules/gui/qt/medialibrary/mlplaylistmodel.hpp
- modules/gui/qt/medialibrary/mlrecentsmodel.cpp
- modules/gui/qt/medialibrary/mlrecentsmodel.hpp
- modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp
- modules/gui/qt/medialibrary/mlrecentsvideomodel.hpp
- modules/gui/qt/medialibrary/mlurlmodel.cpp
- modules/gui/qt/medialibrary/mlurlmodel.hpp
- modules/gui/qt/medialibrary/mlvideofoldersmodel.cpp
- modules/gui/qt/medialibrary/mlvideofoldersmodel.hpp
- modules/gui/qt/medialibrary/mlvideogroupsmodel.cpp
- modules/gui/qt/medialibrary/mlvideogroupsmodel.hpp
- modules/gui/qt/medialibrary/mlvideomodel.cpp


The diff was not included because it is too large.


View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/08c9fc6022b702414f7703c790eeed1aeb29d0fe...4e67a7c03ce49bddacecd7338915071f3796f8bb

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/08c9fc6022b702414f7703c790eeed1aeb29d0fe...4e67a7c03ce49bddacecd7338915071f3796f8bb
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list