It's allowed for a server to send only in-band parameters, although I
haven't encountered this yet. The VStarcam cameras sometimes send
invalid out-of-band parameters; treat that as if it sent nothing.
Fixes#42
* by default send a TEARDOWN even if we haven't sent a PLAY.
* make the behavior more customizable. I want the ability to turn
teardowns off for testing the live555 bug.
* deprecate the older teardown method
* avoid half-written output (fixes#32)
* try to send TEARDOWN even on error while reading the stream.
This isn't perfect as noted in the TODO. I think I'll want to
change the API a bit, but not right now.
* out-of-order packets should be ignored (except for logging).
* after ignored RTP or RTCP packet, don't incorrectly return Pending
without both underlying sockets actually returning Pending. This
could lead to not rechecking the sockets until prompted for another
reason, like an RTSP keepalive.
This didn't work; I wasn't able to get working audio from them.
I'm not sure they even actually have a microphone! They may just
be sending uninitialized/stale buffer contents on this channel.
Just don't use the audio channel with this camera.
This was an attempt at #17 that didn't work out. Besides additionally
hitting the framing error, my Reolink test camera never timed out
the old session while the new one was in progress. This behavior is
different than the vanilla 2013.04.06 live555 server, so apparently
Reolink sprinkled in their own brokenness on top. In any case,
the other solutions described in that bug are more likely to work.
There's one narrow case I want to keep working: ignoring RTCP messages
immediately prior to the PLAY response. More recent Reolink cameras
do this. I just have this behavior on all the time now.
* 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.