Accumulated SRT fixes
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 suresrtobject->poll_id
is never invalid as long assrtobject
exists. Only remove our caller socket from it when the socket becomes invalid. -
srt: Use simpler list operations for callers
Avoidg_list_append
andg_list_remove
(which have to scan the list) and replace them withg_list_prepend
andg_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.