Skip to content
Snippets Groups Projects
  1. Mar 30, 2025
  2. Mar 29, 2025
  3. Mar 28, 2025
  4. Mar 27, 2025
  5. Mar 26, 2025
    • Marvin Scholz's avatar
      macosx: VLCTimeField: do not use identifier · 6434ab75
      Marvin Scholz authored and Felix Paul Kühne's avatar Felix Paul Kühne committed
      Overriding setIdentifier is something that should not be done and
      also that identifier is supposed to be unique so it is not really
      suitable for our use-case here.
      
      Additionally on older macOS versions this selector is sometimes called
      with a nil identifier leading to a crash.
      
      Just go back to a dedicated property for this without hooking into
      the view identifier.
      6434ab75
    • Claudio Cambra's avatar
      macosx: Prevent crash from null p_event on model callback · 4bb2f7d4
      Claudio Cambra authored and Marvin Scholz's avatar Marvin Scholz committed
      
      When accessing p_event in the model callback, it is possible for the p_event to
      no longer be valid as the callback uses an async dispatch queue. By accessing
      the properties of the p_event synchronously before entering the async block, we
      can avoid this crash
      
      Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
      4bb2f7d4
    • Alexandre Janniaux's avatar
      es_out: trace wake up delay for input pacing monitoring · 5f6060a4
      Alexandre Janniaux authored
      This patch adds a new metric to track and understand the behaviour of
      the input pacing done from the input buffering values. The behaviour is
      showing correct properties currently, but as will be shown later in this
      commit message, this metric helps debugging pacing issues leading to
      screen freeze.
      
      In the work for making clock-start distributed across every clock
      tracker, and because of a change removing the call to the function
      input_clock_ChangeSystemOrigin, the input clock wake-up delay was not
      computed correctly. Specifically, a huge delay of multiple hundred of
      millisecond was appearing at the startup of the playback for file://
      media, leading to a huge gap in playback.
      
      The problem can be revealed when tracing the input_clock_GetWakeup
      values. Those values are used to pace the input, and they are dates
      matching with up until when the input is allowed to sleep, or 0 to
      disable sleeping altogether. The value returned is valid up until
      vlc_tick_no...
      5f6060a4
    • Alexandre Janniaux's avatar
      013a7c33
    • Alexandre Janniaux's avatar
      opengl: display: add support for set_stereo callback · 0902aed2
      Alexandre Janniaux authored
      Just like it's done for projection_mode, setup a state so that changing
      the stereo mode can be asynchronously done when the rendering loop is
      ready to provide the OpenGL context.
      0902aed2
    • Alexandre Janniaux's avatar
    • Alexandre Janniaux's avatar
      opengl: vout helper: store first projection state · fb7d451d
      Alexandre Janniaux authored
      The first projection state will be needed when changing the stereo-mode
      in future commits.
      fb7d451d
    • Alexandre Janniaux's avatar
      opengl: vout helper: factor renderer restarting code · 0db936f2
      Alexandre Janniaux authored
      Create a dedicated function to restart the renderer given a set of
      parameters. The function will also be used to change the
      video-stereo-mode value in the renderer.
      0db936f2
    • Alexandre Janniaux's avatar
      opengl: renderer: add support for video-stereo-mode · 93092b6c
      Alexandre Janniaux authored
      The video-stereo-mode is setup the same way I did the projection mode.
      The client needs to restart the renderer to re-compile the shaders and
      re-setup the variables for the mode, avoiding the need for a specific
      API. This is justified by changing video-stereo-mode not happening at
      each frame.
      
      Note that projection_mode is temporarily enforced to
      PROJECTION_MODE_RECTANGULAR whenever the multiview_mode is enforced to
      another value than the source, to avoid trying to change the projection
      from a texture containing the two eyes, leading to weird behaviour. This
      happens when setting the SIDE_BY_SIDE stereoscopic mode which is made
      for showing the two frames, but also in the STEREO stereoscopic mode
      which is not yet supported in the module (need vlc-vr work).
      93092b6c
    • Alexandre Janniaux's avatar
      vlc_vout: add a MAX value for stereoscopic enum · aed3d7bb
      Alexandre Janniaux authored
      The MAX value allows checking whether the provided stereoscopic value is
      valid or not.
      aed3d7bb
    • Marvin Scholz's avatar
      contrib: fix cddb mistakenly depending on iconv · 9cff68f0
      Marvin Scholz authored and Steve Lhomme's avatar Steve Lhomme committed
      Currently there are two issues here, one hiding the other:
      
      - The sed pattern is wrong, causing it to not match due to leading
        spaces.
      - The replacement for the second sed pattern is wrong, not removing
        the @LIBICONV@, causing it to be present in the generated .pc, but
        due to the previous issue, this was hidden as the iconv detection was
        never actually removed.
      
      This issue only rarely manifested, as we also build iconv in contribs,
      so it was totally depending on build order if this caused any issue or
      not.
      9cff68f0
    • Marvin Scholz's avatar
      contrib: ncurses: update to 6.5 · 062929a6
      Marvin Scholz authored and Steve Lhomme's avatar Steve Lhomme committed
      Fixes a build issue related to pkg-config paths:
      
        checking for pkg-config... /Users/user/Projects/VideoLAN/vlc/extras/tools/build/bin/pkg-config
        checking for /Users/user/Projects/VideoLAN/vlc/extras/tools/build/bin/pkg-config library directory... checking for search-list...
        checking for first directory... none
        checking if we should install .pc files for /Users/user/Projects/VideoLAN/vlc/extras/tools/build/bin/pkg-config... yes
        configure: error: expected a pathname, not ""
      062929a6
  6. Mar 25, 2025
  7. Mar 24, 2025
    • Fatih Uzunoğlu's avatar
      qt: do not hide the interface window when adjusting `Qt::FramelessWindowHint` · d1a0dc70
      Fatih Uzunoğlu authored and Felix Paul Kühne's avatar Felix Paul Kühne committed
      - Since hiding the window destroys the wl_surface (before Qt 6.9), this causes
      crash on Wayland (adjustments after video window setup is complete).
      - With `CompositorX11`, adjusting a flag (such as always on top) and then
      (immediately after) toggling the visibility of a window breaks the window. This
      is a problem when, for example always on top and client side decorations change
      together.
      
      Although it is stated that "some window managers don't like to change frame
      window hint on visible window", I have not observed an adverse behavior on X11
      (Qt 6.2 and Qt 6.8), and Wayland (Qt 6.8) with KWin X11/Wayland 6.3.1. If this
      is a problem of a certain window manager, the workaround should be only done
      for that window manager and not in all cases.
      
      At the same time, Qt does not seem to state that adjusting `Qt::FramelessWindowHint`
      needs to be done when the window is hidden. So I believe that this should be
      safe to proceed.
      d1a0dc70
    • Fatih Uzunoğlu's avatar
      qt: declaratively assign the model in `VideoAllSubDisplay.qml` · e5ee3cd5
      Fatih Uzunoğlu authored and Felix Paul Kühne's avatar Felix Paul Kühne committed
      Imperatively assigning the model is problematic here, because
      the model may be accessed before it is assigned.
      
      With declarative approach, it is the QML engine's responsibility
      make sure the model is assigned at appropriate time before it
      is accessed.
      
      Qt documentation states that [1]:
      
      > If a parent is not provided to createObject(), a reference to the
      > returned object must be held so that it is not destroyed by the
      > garbage collector. This is true regardless of whether Item::parent
      > is set afterwards, because setting the Item parent does not change
      > object ownership. Only the graphical parent is changed.
      
      Since the old model is no longer referenced anymore after
      `MainCtx.grouping` changes, this approach should be fine.
      
      I have tested this on both Qt 6.2 and 6.8.
      
      [1] https://doc.qt.io/qt-6/qml-qtqml-component.html#createObject-method
      e5ee3cd5
    • Fatih Uzunoğlu's avatar
      qt: implement `QSGTextureView::removedFromAtlas()` · 1908011f
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      This is useful when `QSGTextureView` is used as the source
      of a `ShaderEffect` that does not support atlas textures.
      
      Notable examples are `FastBlur` and `MultiEffect`.
      1908011f
    • Fatih Uzunoğlu's avatar
      Revert "qml: set children ShaderEffects' `supportsAtlasTextures` in BlurEffect" · 6e8403fa
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      This reverts commit 2baca715.
      
      Unfortunately it turns out that "They support atlas/sub textures" is not fully
      correct. I made that assumption after taking a look at the shader code, and I
      concluded that they simply did not bother setting `supportsAtlasTextures` to
      `true` from its default value `false` due to negligence because the shader
      code that samples the source texture primarily uses the coordinate Qt supplies
      (`qt_MultiTexCoord0`) where it already takes the atlas textures into account.
      
      ShaderEffect's documentation states that:
      
      > If supportsAtlasTextures is true, coordinates will be based on position in
      > the atlas instead.
      
      Therefore, the coordinates supplied can be used as is with atlas textures. In
      fact, we (and Qt) are already doing this in various places (`vec4 texel =
      texture(source, qt_TexCoord0)`).
      
      The blur effect shaders uses the same (pre-adjusted) coordinate for sampling
      the texture. So, I thought that setting `supportsAtlasTextures` would not have
      a negative impact.
      
      However, due to the way Qt does blurring, this pre-adjusted (atlas) coordinate
      is offsetted and that offset is obviously specific to the blur effect and not
      pre-adjusted for the atlas texture (as Qt does with `ShaderEffect`) since
      they never claim to support atlas textures in blur effect, they don't bother
      normalizing the offset coordinate according to the atlas.
      
      Unfortunately, this means that atlas textures must be detached from the atlas,
      incurring a copy, to be used as a source for the blur effect. This is not a
      big problem for us, because most of the places where we use the blur effect
      already have the source textures independent (not in the atlas). And we still
      benefit from `QSGTextureView` that it prevents incurring a copy when the source
      texture is not in the atlas.
      
      - Main view (for mini player frosted glass effect background) is an item
      layer (not to mention a dynamic texture). They are never put in the atlas.
      - Player background uses mipmap, currently Qt does not support mipmapped
      atlas textures, so all mipmapped textures are independent textures. We use
      mipmapping here not to prevent this issue, but we actually benefit from
      mipmapping in this case as we do fluent size change based on window size.
      - Music artist header background, depending on the atlas size, may be put
      in the atlas. This currently depends on the initial window size, if it is
      small, the texture is not put in the atlas and blurring works fine. This
      is because currently Qt determines the atlas size based on the initial
      window size (I guess this is from the times when they primarily targeted
      mobile platforms with Qt Quick, back in 2010s).
      
      Unfortunately `QQuickImage` (`Image`) does not have a parameter to disable
      putting textures in the atlas. Setting `mipmap` as done in player would
      be fine, but we don't want/need mipmapping in music artist view. This does
      not mean much anyway, as with the revert here the shader effect would ask
      the texture to "remove" itself from the atlas (by copying, as per the default
      RHI atlas texture implementation), so blurring starts working fine.
      
      This change brings an additional requirement, although not used currently,
      if a target of `QSGTextureView` is in the atlas, and the texture view is
      used as source for blur effect, the request of detaching from the atlas
      texture (`QSGTexture::removedFromAtlas()`) would fail. The next commit
      makes sure that `::removedFromAtlas()` works fine with `QSGTextureView`,
      too, even though currently it is not used (I used a trick to disable
      layering instead of using `QSGTextureView` in music artist header).
      6e8403fa
    • Fatih Uzunoğlu's avatar
      Revert "qml: activate item layer when transitions are running in MainDisplay and Player" · 858073fa
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      This reverts commit edb16056.
      
      This became obsolete when we got rid of transitions (89fe5f60).
      858073fa
    • Alexandre Janniaux's avatar
      opengl: meson: define USE_OPENGL_ES2 on gl_common_dep · 7287d15a
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      7287d15a
    • Alexandre Janniaux's avatar
      opengl: meson: add support for android · 24c187fb
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      24c187fb
    • Alexandre Janniaux's avatar
      opengl: meson: declare modules unconditionally · 1b94a8d6
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      Register the modules into the buildsystem while keeping the dependencies
      being initialized conditionally, so they can be referenced elsewhere.
      1b94a8d6
    • Alexandre Janniaux's avatar
      video_chroma: meson: define d3d9_common_lib · 083e0868
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      The libraries are used on modules in other files, and gets undefined on
      non-windows platforms.
      083e0868
    • Fatih Uzunoğlu's avatar
      qml: gracefully handle the case when image is not available in `ImageExt` · d5b32237
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      - Use root size for the shader if image is not available, as in
        that case the image would not have a sensible size. The implicit
        size is chosen arbitrarily to be 64x64 instead of 0x0, which
        is mainly relevant when root does not have an overridden size.
      - Do not bother calculating the crop rate if there is no image.
      - Do not do outlining if there is no image, as in that case it
        means there is nothing to outline.
      
      This ensures that background is shown while the image is loading.
      
      `ShaderEffect` uses a transparent dummy texture with repeat wrap
      mode when the texture is not available. With source over blending
      of the texture into the background, a fully transparent source
      yields the destination color, which is the background color.
      d5b32237
    • Fatih Uzunoğlu's avatar
      qt: rename `RoundImage.qml` to `ImageExt.qml` · acd4b5b2
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      acd4b5b2
    • Fatih Uzunoğlu's avatar
    • Fatih Uzunoğlu's avatar
      qml: remove background rectangle in `MediaCover` · 2d70a156
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      It should be acceptable to not have background rectangle
      with non-RHI graphics backend (no shader support).
      2d70a156
    • Fatih Uzunoğlu's avatar
      88ff25ee
    • Fatih Uzunoğlu's avatar
      qml: workaround for MusicArtistDelegate image not getting rendered · 089271fd
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      089271fd
Loading