Skip to content
Snippets Groups Projects
  1. May 17, 2022
  2. May 14, 2022
  3. Apr 29, 2022
  4. Apr 28, 2022
    • Pierre Lamot's avatar
      qml: keep playlist visibility across the application · 63854be2
      Pierre Lamot authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      this allow to keep the playlist visible when switching between the player and
      the medialibrary views, regarding the different parameters (playlist docked,
      playlist visible, video embed)
      
      this uses a hierarchical state machine to track the different states and
      transitions.
      63854be2
  5. Apr 22, 2022
  6. Apr 15, 2022
  7. Apr 07, 2022
  8. Apr 01, 2022
  9. Mar 17, 2022
  10. Mar 14, 2022
  11. Mar 13, 2022
  12. Mar 11, 2022
  13. Mar 05, 2022
    • Lyndon Brown's avatar
      qt: add expert preferences mode · 8b75d973
      Lyndon Brown authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      This gives a table listing all options, similar to and inspired by the
      `about:config` interface in Firefox.
      
      Unique benefits:
       - It highlights which options have been modified from default state.
       - It allows selective resetting of individual options to default values.
      
      Support is included to toggle booleans with a simple double-click.
      Double-clicking on other types opens the edit dialog.
      
      For colour selection items, the modify action directly opens the Qt
      colour selection dialog rather than present the colour control used in
      the advanced preferences view, since this is much cleaner.
      
      Note that the existing simple and advanced views are not linked; if you
      change an option in one view, that change is not reflected in the other,
      and saving changes only uses the state from the selected view. The same
      is currently true of the new expert mode, though I plan to later change
      this behaviour (for all three).
      
      Note also that hotkey items are deliberately excluded from this view.
      The dedicated hotkey editor is best suited to managing hotkeys. It does
      not work well to include the set of 224 unique hotkey options within this
      table, especially since we'd have to duplicate the code checking for
      duplicate assignments if we allow editing of them as with all other
      option types within this interface. It may seem odd for the 'expert'
      mode to be the only one without hotkey editing, however the hotkey editor
      does not really fit well into 'advanced' mode either, and I have plans to
      propose separating the hotkey editor entirely from within the set of
      three views in a small redesign.
      
      Fixes #18607.
      8b75d973
  14. Feb 20, 2022
  15. Feb 13, 2022
  16. Feb 06, 2022
  17. Feb 03, 2022
  18. Jan 27, 2022
  19. Jan 10, 2022
  20. Jan 08, 2022
  21. Jan 06, 2022
  22. Jan 01, 2022
  23. Dec 24, 2021
  24. Dec 23, 2021
    • Pierre Lamot's avatar
      qt: use runOnMLThread to count and load data · 16d6631c
      Pierre Lamot authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      this allows not depending on vlc_medialibrary_t being present in MLBase
      16d6631c
    • Pierre Lamot's avatar
      qt: remove CoverGenerator inheriance from QObject · d3bf296f
      Pierre Lamot authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      d3bf296f
    • Pierre Lamot's avatar
      qt: provide runOnMLThread function · cace21e2
      Pierre Lamot authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      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
      
      :warning: 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");
      ```
      cace21e2
  25. Dec 03, 2021
Loading