Skip to content

Accumulated SRT fixes

Jan Alexander Steffens requested to merge heftig/gstreamer:srt-fixes into main

Improvements to the SRT plugin extracted from LTN's patchset:

  • srt: Replace stats accumulation with naive byte counting
    srt_bstats cannot be used to get the stats of closed connections, so the best we can do is keep the running count ourselves.
  • srt: Simplify socket stats
    Don't hide stats depending on whether we're a sending or receiving socket. While we're here, add some more debug logs.
  • srt: Clean up error handling
    • Make the srt_epoll_wait loops more uniform.

    • Error only via GError when possible; let the element send the error message. Avoids a second error message.

    • Return 0 when cancelled. Avoids an error message from the element.

    • Don't send an error message from send_headers when we're a server sink.

  • srt: Clean up poll/sock lifecycle
    Make sure srtobject->poll_id is never invalid as long as srtobject exists. Only remove our caller socket from it when the socket becomes invalid.
  • srt: Use simpler list operations for callers
    Avoid g_list_append and g_list_remove (which have to scan the list) and replace them with g_list_prepend and g_list_delete_link.
  • srt: Remove callers for which srt_bstats fails
    This keeps them from accumulating in the element and in the stats while the sink is not being fed, as long as we at least periodically grab stats.

Merge request reports