Skip to content

qt: prevent spending time and resources for soon-to-be-obsolete current item

Currently, when the interface requests to play an item, it first synchronously calls vlc_playlist_GoTo() and vlc_playlist_Start().

After these calls are made, it potentially tries to update the UI with the current item that has not yet been updated. This is because the callback for playlist current index is itself asynchronously updates the interface's current index.

The update operation should be queued when the interface thread is different than the playlist's thread. In this case, main playlist belongs to the same thread (Qt's thread), so a direct connection is going to be used. This eliminates queue-ing, but directly calls the adjuster.

The interface should update its current index (item) before proceeding with vlc_playlist_Start(), so that the interface does not spend resources and time on updating the soon-to-be-obsolete current item. This can be only ensured with a blocking (queued) or direct connection.

Request review @chub.

Merge request reports

Loading