- Mar 31, 2022
-
-
- Feb 27, 2022
-
-
Note that in some cases they have been changed to forward declarations, and in some they have been moved, for instance inclusion of `<QUrl>` was moved from `qt.hpp` to where it was needed.
-
- Dec 23, 2021
-
-
-
-
-
this allows not depending on vlc_medialibrary_t being present in MLBase
-
-
this function allows to run lambdas on the ML thread, this should be used to perform operation that requires to call vlc_ml_xxx functions as vlc_ml_xxx should *not* be called from the UI thread obj: this is the instance of the calling QObject, we ensure that this object is still live when calling the ui callback, if this object gets destroyed the task is canceled mlCb: this callback is executed in a background thread (thread pool), it takes as arguments the instance of the medialibrary, and a context, the context can be modified to pass data to the UI callback uiCB: this callback is executed on the Qt thread, it takes as first argument the id of the tasks, and as second argument the context that was created for the ML callback queue: this allow the task to be ran on a specific thread, when this parameter isn't provided, the task can be scheduled on any thread. Ctx is the type of context, this context is created by the runner and passed sequentially to the ML callback then to UI callback, the ML callback may modify its properties as a way to pass data to the UI callback
the ml callback **SHOULD NOT** capture the obj object or point to its properties by reference, as the obj object may potentially be destroyed when the function is called the ui callback **MAY** capture the object obj as we will ensure that the object still exists before calling the callback the uiCb **MAY NOT** be called if the object obj is released earlier anything stored int the context Ctx **MUST** auto release when the context is destroyed sample usage: ``` //structure used to pass data from the ML thread to the UI thread struct Ctx { bool success; }; m_mediaLib->runOnMLThread<Ctx>( //reference to the object making the call, this is used to ensure that //the caller still exists before calling the UI callback this, //ML thread, data needed from the caller are passed in the capture of the lambda //capturing this or any of its member is not allowed here //the callback have in parametters the ml instance and a context that will be shared with //the UI callback [url, indexed](vlc_medialibrary_t* ml, Ctx& ctx) { int res; if ( indexed ) res = vlc_ml_add_folder( ml, qtu( url ) ); else res = vlc_ml_remove_folder( ml, qtu( url ) ); ctx.success = (res == VLC_SUCCESS); }, //UI callback, capturing this is allowed, (runOnMLThread will ensure that `this` //still exists at this point //the callback has as parametters the request id and the shared context [this, indexed](quint64, Ctx& ctx){ if (ctx.success) { m_indexed = indexed; emit isIndexedChanged(); } }, //allow to specify if the task should be run on a specific thread, null (default) will run on any thread "ML_FOLDER_ADD_QUEUE"); ``` -
-
- Dec 03, 2021
-
-
Prince Gupta authored
-
- Oct 03, 2021
-
-
this ensure that non-empty media list is added to the playlist fix: #26139
-
- Jul 30, 2021
-
-
in the qt codebase properties are often used but they are not overridden by a derived class. according to the Qt docs, the presence of final attribute can be used for performance optimizations.
-
- Jun 12, 2021
-
-
- Jun 04, 2021
-
-
Pierre Lamot authored
This is a preparatory commit
-
- May 01, 2021
-
-
Hugo Beauzée-Luyssen authored
Co-authored-by:
Romain Vimont <rom1v@videolabs.io>
-
- Dec 10, 2020
-
-
Signed-off-by:
Pierre Lamot <pierre@videolabs.io>
-
- Dec 08, 2020
-
-
The item id sometimes represents the id of the "current" item, sometimes the id of the "parent" item. Therefore, the fact that it is a "parent" id depends on the context, and is not intrinsic to the type. This caused confusion when getId() returned a MLParentId, representing the id of the current item. Rename to MLItemId to clarify. Signed-off-by:
Pierre Lamot <pierre@videolabs.io>
-
- Dec 02, 2020
-
-
The database queries, initiated by list models, must be executed asynchronously (on a thread different from the UI thread). When a list model is destroyed (from the UI thread), some database queries might still be executing. It would be incorrect for the list model to wait for them (it would block the UI thread), so they must be executed on an external thread pool. Since the queries themselves require the medialib to be executed, they must not outlive it (or the asynchronous code might crash). Therefore, the right scope for executing asynchronous queries is the MediaLib instance. Signed-off-by:
Pierre Lamot <pierre@videolabs.io>
-
- Oct 28, 2020
-
-
Pierre Lamot authored
Recent medias are now stored in the medialibrary.
-
- Sep 28, 2020
-
-
Pierre Lamot authored
-
Pierre Lamot authored
grid/list mode is not restricted to medialibrary views
-
- Jan 09, 2020
-
-
Hugo Beauzée-Luyssen authored
-
- Dec 17, 2019
-
-
no functional changes Signed-off-by:
Jean-Baptiste Kempf <jb@videolan.org>
-
- Aug 29, 2019
-
-
this avoids handling the logic in QML
-
- Jul 05, 2019
-
-
Hugo Beauzée-Luyssen authored
-
- Apr 10, 2019
-
-
Signed-off-by:
Thomas Guillem <thomas@gllm.fr>
-