1. 23 Jul, 2021 3 commits
  2. 22 Jul, 2021 3 commits
    • Guillaume Desmottes's avatar
      appsrc: serialize custom events with buffers flow · c148ecf2
      Guillaume Desmottes authored
      Application may want to inject events to the pipeline and keep them
      synchronized with the buffers flow.
      
      Fix #247
      
      Part-of: <!1046>
      c148ecf2
    • Guillaume Desmottes's avatar
      appsink: add API to catch events · 0a657d6d
      Guillaume Desmottes authored
      There is currently no way for users to receive incoming events from
      appsink while keeping them properly serialized with the buffers flow.
      This can be especially useful when application is injecting custom
      downstream events into the pipeline and needs to know when they reached
      appsink.
      
      Solving this by adding a new signal notifying about new incoming events
      and a set of action signals and method to pull those events.
      The API is actually pulling the samples and events all together as they
      are actually fetched from the same queue.
      Having a specific API to pull only events would have the side effect of
      discarding samples (and pulling samples would discard events) making
      this API not convenient for users.
      
      Partially fix #247
      
      Part-of: <!1046>
      0a657d6d
    • Guillaume Desmottes's avatar
      appsink: factor out dequeue_object() · 457e33fe
      Guillaume Desmottes authored
      No semantic change, will be used to implement new event API.
      
      Part-of: <!1046>
      457e33fe
  3. 21 Jul, 2021 2 commits
    • Nicolas Dufresne's avatar
      glwindow: wayland: Skip redoing surfaces if window haven't changed · aba6bd78
      Nicolas Dufresne authored
      The problem is that EGLNativeWindowSurface and wl_egl_surface are the
      same object underneath, so we must recreate both together. As an
      optimization, the EGLNativeWindowSurface wrapper is only re-created
      if the window_handle changed.
      
      On Mesa, this would cause crash, which will be fixed by:
      mesa/mesa!11979
      
      And will lead to proper errors in the future or on other GL stack. This
      issue was encounter using a permanent GstGLDisplay after cycling one of
      multiple independent pipelines through NULL state.
      
      Part-of: <!1230>
      aba6bd78
    • Nicolas Dufresne's avatar
      glwindow: wayland: Remove redundant create_surfaces call · e97fda46
      Nicolas Dufresne authored
      The surfaces will be created in _roundtrip_async, so no need to call
      this early. This should cause no functional difference.
      
      Part-of: <!1230>
      e97fda46
  4. 19 Jul, 2021 1 commit
    • Michael Olbrich's avatar
      decodebin3: improve decoder selection · 5bfb78aa
      Michael Olbrich authored
      Currently the decoder selection is very naive: The type with the highest
      rank that matches the current caps is used. This works well for software
      decoders. The exact supported caps are always known and the static caps are
      defined accordingly.
      With hardware decoders, e.g. vaapi, the situation is different. The decoder
      may reject the caps later during a caps query. At that point, a new decoder
      is created. However, the same type is chosen an after several tries,
      decodebin fails.
      
      To avoid this, do the caps query while adding the decoder and try again
      with other decoder types if the query fails:
      
      1. create the decoder from the next matching type
      2. add and link the decoder
      3. change the decoder state to READY
      4. do the caps query
         if it fails then remove the decoder again and go back to 1.
      5. expose the source pad
      6. sync the decoder state with the parent.
      
      This way, the decoder is already part of the pipeline when the state change
      to READY happens. So context handling should work as before.
      
      Exposing the source pad after the query was successful is important:
      Otherwise the thread from the decoder source pad may block in a blocked pad
      downstream in the playsink waiting for other pads to be ready.
      The thread now blocks trying to set the state back to NULL while holding
      the SELECTION_LOCK. Other streams may block on the SELECTION_LOCK and the
      playsink never unblocks the pad. The result is a deadlock.
      
      Part-of: <!1201>
      5bfb78aa
  5. 15 Jul, 2021 3 commits
    • Nicolas Dufresne's avatar
      gl: x11: Issue XSync to close our top level window · 210cf85f
      Nicolas Dufresne authored
      This is similar action as when the window handle is modified, we now issue
      XSync whenever we destroy our internal window. This ensure that the window is
      properly closed before the connecgtion is dropped.
      
      Fixes #815
      
      Part-of: <!1226>
      210cf85f
    • Nicolas Dufresne's avatar
      gl: wayland: Fix hinding the window on close() · 3e69c554
      Nicolas Dufresne authored
      When the window is called, we properly destroy all surfaces, which effectively
      will unmap that surface and should make it disapear on screen, but we also
      destroy the wl_source, a GSource that is resposibble of dispatching and executing
      messages to/from the Wayland server.
      
      As a side effect, the server never gets the message and the surfaces are
      "leaked" on the server. We fix this using wl_display_flush() before destroying
      the wl_source.
      
      Fixes #815
      
      Part-of: <!1226>
      3e69c554
    • Nicolas Dufresne's avatar
      tests: example: Add missing glx_dep when building sdlshare · 88e19f85
      Nicolas Dufresne authored
      Might be realted to some recent Mesa cleanup, but GLX is not longer visible
      through libOpenGL, so add the missing deps now.
      
      Part-of: <!1227>
      88e19f85
  6. 13 Jul, 2021 2 commits
  7. 12 Jul, 2021 2 commits
    • Sebastian Dröge's avatar
      audioaggregator: Only post QoS messages if the property is enabled · 9243418a
      Sebastian Dröge authored
      Previously one of the branches did not check for the property value. To
      avoid this in the future, check inside the QoS calculation function
      instead.
      
      As a side effect this now always prints the debug messages into the logs
      when samples are dropped, which is useful information even without the
      QoS messages.
      
      Part-of: <!1224>
      9243418a
    • Sebastian Dröge's avatar
      audioaggregator: Resync on the next buffer when dropping a buffer on discont resyncing · 71e46bcf
      Sebastian Dröge authored
      If a buffer is dropped during resyncing on a discont because either its
      end offset is already before the current output offset of the
      aggregator or because it fully overlaps with the part of the current
      output buffer that was already filled, then don't just assume that the
      next buffer is going to start at exactly the expected offset. It might
      still require some more dropping of samples.
      
      This caused the input to be mixed with an offset to its actual position
      in the output stream, causing additional latency and wrong
      synchronization between the different input streams.
      
      Instead consider each buffer after a discont as a discont until the
      aggregator actually resynced and starts mixing samples from the input
      again.
      
      Also update the start output offset of a new input buffer if samples
      have to be dropped at the beginning. Otherwise it might be mixed too
      early into the output and overwrite part of the output buffer that
      already took samples from this input into account.
      
      Fixes #912
      which is a regression introduced by !1180
      
      Part-of: <!1224>
      71e46bcf
  8. 09 Jul, 2021 4 commits
  9. 08 Jul, 2021 2 commits
  10. 03 Jul, 2021 1 commit
    • Seungha Yang's avatar
      gl/context/wgl: Add missing NULL init · aa34710b
      Seungha Yang authored
      The value of uninitialized local variable is varying depending
      on compiler and not guaranteed to be NULL initialized.
      That results in pointing random address instead of expected function pointer.
      
      Part-of: <!1222>
      aa34710b
  11. 01 Jul, 2021 3 commits
  12. 30 Jun, 2021 1 commit
  13. 29 Jun, 2021 2 commits
  14. 28 Jun, 2021 4 commits
  15. 26 Jun, 2021 2 commits
  16. 25 Jun, 2021 3 commits
  17. 24 Jun, 2021 1 commit
  18. 23 Jun, 2021 1 commit
    • Nicolas Dufresne's avatar
      videodecoder: Call drain() rather then finish() on segment-done · be6793d0
      Nicolas Dufresne authored
      The finish() virtual function documentation state that "Sub-classes can refuse
      to decode new data after." Though, it is very common to issue a non-flushing
      seek after that event in gapless playback uses case. This fixes potential
      stalls with code using segment seeks, by using drain() virtual funciton
      instead.
      
      Part-of: <!1206>
      be6793d0