Skip to content
Snippets Groups Projects
  1. Aug 08, 2022
  2. Aug 07, 2022
    • Alex Chernyakov's avatar
      dynamicoverlay: Fix memory leak when updating pictures · 41c1d1a9
      Alex Chernyakov authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      In exec_DataSharedMem() memory is allocated via the call to picture_New().
      This memory is correctly freed via picture_Release() if an error occurs,
      but if no error occurs and the function proceeds normally, the memory is
      never freed. When the DataSharedMem routine is called repeatedly (e.g.,
      to update a picture continuously), this leak accumulates very quickly.
      41c1d1a9
    • Niklas Haas's avatar
      xcb/window: track and report ICC profile changes · 4823a53b
      Niklas Haas authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      We need to update the ICC profile either if the window moves to a new
      display, or if the root window atom associated with a given display is
      updated. To this end, we need to start tracking property changes on the
      root window, as well as updating this atom every time the window moves
      to a new display.
      
      Unfortunately, this code again requires one memcpy more than I'd like to
      have there, as a result of xcb not letting me fetch properties into my
      own buffers. If we determine this to be a performance issue later on,
      the straightforward fix would be to make vlc_icc_profile_t refcounted
      with a custom free callback.
      4823a53b
    • Niklas Haas's avatar
      xcb/window: move helper function · 8e88fd24
      Niklas Haas authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      Needed for RandR-related code in future commit.
      8e88fd24
    • Niklas Haas's avatar
      xcb/window: keep track of displays using RandR · 927db833
      Niklas Haas authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      This is non-functional on its own, but introduces necessary display
      tracking information that will be useful in the following commit(s),
      like figuring out which display's ICC profile to query for the VLC
      window.
      927db833
    • Niklas Haas's avatar
      vout: libplacebo: add support for display ICC profiles · 690f6335
      Niklas Haas authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      Pretty straightforward. Rather than wasting cycles computing a checksum
      each frame, just update the signature once per received ICC change
      control event.
      690f6335
    • Niklas Haas's avatar
      vout: display: window: add ICC profile glue · 354f3aae
      Niklas Haas authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      The window backend triggers a callback of the vout, and the vout
      forwards this to the display using another callback. There are several
      unfortunate layers of glue and indirections in the callchain. In
      particular, we need to persist these ICC profile objects in some layer,
      because of init order between windowing system and the window / vout
      display module itself. I've chosen to add them to `vout_display_cfg_t`
      because it fits well with the other "dynamic window state" properties in
      there.
      
      This approach also allows capable vouts to read directly from the
      allocated ICC profile memory, minimizing the number of memcpys.
      354f3aae
    • Mehdi Sabwat's avatar
      emscripten: add js File access plugin · 9d2f5d61
      Mehdi Sabwat authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      Emscripten currently does not support picking a file from the DOM with the element, and reading it from a webassembly application.
      
      This access plugin will be able to receive a File object handle in the input thread, and read into buffers in linear memory with the file content while keeping track of the offset.
      
      A basic setup could look like :
      
      ```
      <input type="file" id="fpicker_btn">Select File</input>
      <script>
      let instance = _libvlc_new();
      let media_player_ptr = _libvlc_media_player_new(instance);
      
      /*
      	Module is the emscripten runtime object,
      	it has the vlc_access_file array as a property
      */
      
      let inputElement = document.getElementById("fpicker_btn");
      
      function handleFile() {
      	 var name = this.files.item(0).name;
      	 console.log("opened file: ", name);
               // id starts at 1
               let id = 1;
      	 let path_ptr = Module.allocateUTF8("emjsfile://" + id);
      	 let media_ptr = _libvlc_media_new_location(path_ptr);
      	 Module._free(path_ptr);
      	 _libvlc_media_player_set_media(media_player_ptr, media_ptr);
      	 Module['vlc_access_file'][id] = this.files.item(0);
      }
      inputElement.addEventListener("change", handleFile, false);
      
      _libvlc_media_player_play(media_player_ptr);
      </script>
      ```
      9d2f5d61
  3. Aug 06, 2022
  4. Aug 05, 2022
  5. Aug 04, 2022
  6. Aug 03, 2022
Loading