- Dec 23, 2021
-
-
No functional changes Refs #18762
-
-
-
-
this was here to mimic NetworkMediaModel::getItemsForIndexes, but it's never called
-
-
-
-
Note that models that use vlc_ml_media_generate_thumbnail loose the notification at this very commit, this will be reinstated in the following commits. The former form of the signal was a bit inconsistent as the MLVideo item (for instance) was updating itself (in an unsafe manner) with its own callback but the model was notified through this mechanism. This could have potentially led to data inconsistency.
-
cache may have been invalidated before calling this function
-
-
-
-
-
-
this allows not depending on vlc_medialibrary_t being present in MLBase
-
-
-
-
-
-
-
-
-
-
some models like the groupModel can contain heterogeneous MLItem
-
-
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"); ``` -
-
-
fixes drag'ndrop in PlaylistView
-
place it such that it won't interfere with "focus" rect of PlaylistDelegate
-
fixes binding loop on implicit height
-
Rémi Denis-Courmont authored
This is no longer useful.
-
Rémi Denis-Courmont authored
This is no longer needed, and prevents adding support for RandR output selection.
-
Rémi Denis-Courmont authored
This removes the window configuration parameter from vout_window_Enable(). The initial configuration is now set when the window is created, and updated with the regular functions: vout_window_SetSize(), vout_window_SetFullScreen() and vout_window_UnsetFullScreen(). This reconciles the window configuration with the full-screen output selection: if the window provider supports output selection, it can simply ignore the full-screen flag in the configuration. In practice, this makes no differences in the GL and splitter cases, which were creating and enabling the window together. In the vout case, this actually enables some small simplifications. This change does not affect the module interface: the window configuration is still passed via the enable() callback. However window provider can choose to ignore all parameters other than the decoration flag. Dimensions is already provided by the resize callback, and full-screen status via set_fullscreen and unset_fullscreen callbacks. It should be possible to remove the dimensions and full-screen flag from the window configuration completely, but that is left for further work, as it would affect many different modules.
-
Rémi Denis-Courmont authored
-
Rémi Denis-Courmont authored
-
Rémi Denis-Courmont authored
This restores the configuration parameter to vout_window_New(). This is at least necessary to initialise the decoration flag which is otherwise constant.
-
Rémi Denis-Courmont authored
This change tracks changes requested to the window that affect the configuration, namely requested dimensions and non-specific full-screen mode. This will be used in further changes.
-