Commit Graph

9 Commits

Author SHA1 Message Date
Scott Lamb
3153355807 clarify tokio runtime expectations 2022-04-12 13:22:44 -07:00
Scott Lamb
3cc7381056 improve debuggability of stale session tracking
*   export a `Session::tool` to allow callers to see the server's
    version. Servers have many quirks (including but not limited to
    the live555 version bug), and exposing this can help hunt them down.
*   call out when we see the live555 stale session bug with a tool not
    known to be affected.
*   in several log messages, identify the session group and stale
    session seqnum.
*   add a `log::trace!` for status within
    `SessionGroup::await_stale_sessions`, just in case I get really
    puzzled again.
2022-04-01 21:06:52 -07:00
Scott Lamb
fd7c5a3eb0 fix bench; test it properly on CI 2022-04-01 10:09:23 -07:00
Scott Lamb
9e9366f115 experimental UDP support (fixes #30)
* support setting transport to UDP
* breaking change: use new PacketContext rather than RtspMessageContext
  in places where an RTP/RTCP packet is expected, as it can now be over
  UDP instead of via RTSP interleaved data
* send teardown, which is important with UDP sessions. (It also will
  help somewhat with Reolink TCP.) Along the way, make Session Unpin
  so that teardown can consume it without tripping over tokio::pin!().
* refactor to shrink the amount of data used by Session and how much
  gets memmoved around on the stack, instead of further growing it.

Because of missing RTCP RR and reorder buffer support, this is only
appropriate for using on a LAN. That's enough for me right now.
2021-08-30 21:40:51 -07:00
Scott Lamb
d8aa4c6565 workaround for Reolink spurious data
Fixes #17

I'm accumulating unit testing debt, but I think I'd rather get this
quickly out in the field to test against scenarios I haven't anticipated
than get my unit tests in order for scenarios I have anticiapted.
2021-08-19 13:00:06 -07:00
Scott Lamb
e9a5e4e34a overhaul error type
*   stop using deprecated failure crate and its deps

*   more uniformly detailed error messages

*   an enum of the type of error, currently internal-only. I'm not
    confident enough I understand what cases a caller might want to
    distinguish, so I added a comment inviting input instead of
    exposing it now.

*   while I'm at it, separate connection context and message contexts.
    This shrinks some of the data memmoved around in PacketItem and
    CodecItem.
2021-07-08 11:28:07 -07:00
Scott Lamb
af7e8a77fb refactor h264 depacketizer
* add a couple tests

* fix #4: put the whole video frame (including multiple NALs) into
  a single Bytes. This is simpler to use and speeds up the
  depacketize/h264_aac_writevideo benchmark. It's also a behavior
  change; now I include non-VUI data such as SPS/PPS/SEI into the
  data. I think this is a better default but it might be worth
  making customizable.
2021-06-24 22:18:39 -07:00
Scott Lamb
4fe885fd6a benchmark tweaks
* add variant which writes video to /dev/null
* (try?) to compile with debug symbols. (it seems to work but
  cargo flamegraph still seems to complain?)
* faster parsing of inline data. I'd like to figure out why this is
  slow with rtsp_types and fix it, but anyway in this benchmark I want
  to just focus on the depacketization
2021-06-24 22:16:13 -07:00
Scott Lamb
ca691d1887 quick benchmark 2021-06-09 23:44:43 -07:00