1. 07 Jun, 2021 1 commit
  2. 01 Jun, 2021 10 commits
  3. 31 May, 2021 2 commits
  4. 30 May, 2021 5 commits
    • Jonathan Matthew's avatar
      xfade: improve handling of buffering during preroll · 3f3d7900
      Jonathan Matthew authored
      For streams that require buffering, don't start playback when
      buffering is complete if the stream isn't blocked yet.
      3f3d7900
    • Jonathan Matthew's avatar
      xfade: try not to rely on position queries against stream bins · 75dafba5
      Jonathan Matthew authored
      Position queries against stream bins are handled by decoder and
      demuxer elements, so might be subject to bugs and other unfortunate
      behaviour depending on the format and whether it's in push or pull
      mode.  In particular, oggdemux in push mode will seek to the end of
      the stream in order to work out the stream duration, and if queried
      before it seeks back to the start, will return a position at the end
      of thestream.  Depending when this happens, it can cause us to think
      the stream is ending and skip to the next track, or use the wrong
      time for the volume control when fading in the track.
      
      To avoid having to do position queries, we have a couple of tricks.
      When blocking a stream in order to unlink it, we record the timestamp
      on the buffer that we get in the block callback, so we have a position
      ready for when we want to relink the stream.  When we get a segment
      event for a stream, we can use the start position in the segment.
      
      If we're trying to fade a stream but we don't have a position yet,
      defer the fade until we manage to adjust the stream base time.
      75dafba5
    • Jonathan Matthew's avatar
      xfade: handle linking and unblocking streams better · e57c81ef
      Jonathan Matthew authored
      If the stream already has an adder pad, contine on with the rest
      of the process anyway.  It doesn't really matter whether the
      stream is blocked or not, we need to remove the block either way.
      Sometimes a stream can finish buffering before it gets blocked,
      which this function needs to be able to handle.
      e57c81ef
    • Jonathan Matthew's avatar
      xfade: improve handling of resumption after buffering · 59fe56f7
      Jonathan Matthew authored
      When we receive a buffering message indicating a stream is now buffered,
      it's either already blocked, in which case we can link it and resume
      immediately, or not yet blocked, which means we have to wait for the
      pad block callback to link it.
      59fe56f7
    • Jonathan Matthew's avatar
  5. 24 Apr, 2021 1 commit
  6. 22 Apr, 2021 3 commits
  7. 21 Apr, 2021 1 commit
  8. 10 Apr, 2021 3 commits
  9. 05 Apr, 2021 1 commit
    • crvi's avatar
      file-helpers: fix race condition in rb_uri_create_parent_dirs() · e3b7d5a0
      crvi authored
      rb_uri_create_parent_dirs() call currently fails if the parent
      directory of the passed file uri is created by another process /
      thread after check_file_is_directory() returns FALSE. We now get rid
      of check_file_is_directory(), and call
      g_file_make_directory_with_parents() directly. If the call fails
      because the dir already exists, we consider it a success and return,
      rather than reporting it as an error.
      
      Closes: #1743
      e3b7d5a0
  10. 03 Apr, 2021 4 commits
  11. 02 Apr, 2021 2 commits
  12. 31 Mar, 2021 1 commit
  13. 30 Mar, 2021 1 commit
  14. 29 Mar, 2021 3 commits
    • crvi's avatar
      encoder: fix missing unref on gtask object in some code paths · bccb25e3
      crvi authored
      We are not unreffing gtask in some code paths. Here, we do it
      immediately after g_task_run_in_thread (), as the function takes ref
      to the task and unrefs it when the task is completed.
      
      This was causing the system error "too many open files", as the
      encoder was not getting unreffed, causing the pipeline not getting
      unreffed, causing the gstreamer poll loop not getting unreffed,
      causing the socketpair() used by the poll loop to not close. So, for
      each track transfer, 2 fds were lost, causing the system error when
      the open file count per process crossed the user ulimit of 1024 (
      which normally happens when transferring more than 350 tracks ).
      bccb25e3
    • Jonathan Matthew's avatar
      xfade: stop the sink when there's nothing playing (again) · 3be694b5
      Jonathan Matthew authored
      This code has been here, #if 0'd out, for a long time, because it caused
      problems with timestamps when the sink was started again.  Since we're
      doing some stupid tricks with element states here, the base time of the
      sink gets out of sync with the clock's time offset (they normally cancel
      each other out), which caused audio to be dropped until the playback
      time caught up with the time offset.
      
      The solution then is to manually sync up the base time with the sink
      after setting the pipeline back to PLAYING.  If the sink is a bin (it
      always is), we recursively set the base time on the bin contents to be
      sure we get it to the right place.
      3be694b5
    • Jonathan Matthew's avatar
      080066fb
  15. 26 Mar, 2021 2 commits
    • Jonathan Matthew's avatar
      use rb_uri_is_descendant in a few places · 8b7309cd
      Jonathan Matthew authored
      This is better than the string prefix checks we had before as it ensures
      that the end of the ancestor URI is also the end of a path component of
      the descendant.
      8b7309cd
    • Jonathan Matthew's avatar
      lib: add rb_uri_is_descendant · bb6fba63
      Jonathan Matthew authored
      This checks if one canonical URI is a descendant of another, that is,
      if removing some number of path components from the first URI would
      result in the second.
      bb6fba63