Commit Graph

98 Commits

Author SHA1 Message Date
Scott Lamb
bcc885474b test #46 behavior for completeness 2021-12-29 14:57:00 -08:00
Scott Lamb
0178e7fbc2
Merge pull request #46 from unrelentingtech/interleaved
Allow interleaved data on RTP as well
2021-12-29 10:11:08 -08:00
Greg V
74b30d5f71 Allow interleaved data on RTP as well
This is necessary for at least some versions of
https://github.com/mpromonet/v4l2rtspserver
2021-12-29 20:25:57 +03:00
Scott Lamb
9c85a2dd80 prepare v0.3.5 2021-11-30 12:38:34 -08:00
Scott Lamb
e1f09771e1 cargo update 2021-11-30 11:41:39 -08:00
Scott Lamb
4b9a726a84 documentation improvements 2021-11-30 11:35:53 -08:00
Scott Lamb
a63497eb09 remove obsolete TODO 2021-11-30 09:40:53 -08:00
Scott Lamb
01c8780a4d H.264: don't require valid out-of-band params
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
2021-11-30 09:39:32 -08:00
Scott Lamb
cd841b9f80 better error when no streams are selected
Fixes #41
2021-11-29 09:51:27 -08:00
Scott Lamb
330ee843b5 Cargo.lock: http-auth 0.1.3 -> 0.1.4 2021-11-21 21:04:23 -08:00
Scott Lamb
35575b7551 prep v0.3.4 2021-10-26 21:32:54 -07:00
Scott Lamb
990293faf1 cargo update
This doesn't matter for users of the library, just CI and folks
building retina and its examples.
2021-10-26 21:31:29 -07:00
Scott Lamb
80a342e50a use rtsp-types 0.0.3 2021-10-26 21:30:25 -07:00
Scott Lamb
969afbf96c v0.3.3, fix #25: better HTTP auth support 2021-10-20 14:43:36 -07:00
Scott Lamb
3a3f01118e prepare v0.3.2 2021-09-29 05:48:36 -07:00
Scott Lamb
82169bcef9 mention TEARDOWN improvements in changelog
Fixes #34
2021-09-29 05:30:58 -07:00
Scott Lamb
824f0d257c include TEARDOWN status in debug msgs 2021-09-29 05:28:20 -07:00
Scott Lamb
86b5f449e9 API for waiting out stale sessions 2021-09-28 21:49:12 -07:00
Scott Lamb
49612617a0 treat TEARDOWN 500 response as OK (sigh)
for #34

Details in the new code comment, but this avoids an unnecessary wait
for session expiration with (at least some) Hikvision cameras.
2021-09-28 16:57:55 -07:00
Scott Lamb
6ee24e1c0e minor tweaks to TEARDOWN logging
*   log everything from the retina::client::teardown module so the
    log level can be tweaked separately.
*   log when the session is expired.
2021-09-27 16:03:26 -07:00
Scott Lamb
f682d752a2 keep retrying TEARDOWN, using fresh connections
This is half of #34. I still need to adjust the API for waiting until
there are no more stale sessions.
2021-09-27 14:27:02 -07:00
Scott Lamb
15f6a1ada0 mp4 example: fix out-of-date error message 2021-09-10 13:46:31 -07:00
Scott Lamb
0ddb1423c6 mp4 example: avoid panic with non-aac audio 2021-09-10 13:45:50 -07:00
Scott Lamb
379bf840c1 prepare v0.3.1 2021-09-09 22:01:58 -07:00
Scott Lamb
1a72fce4de refine TEARDOWN logic
*   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
2021-09-09 21:10:58 -07:00
Scott Lamb
33a0186be3 take 2 at fixing 62f6949 2021-09-09 18:31:46 -07:00
Scott Lamb
16f38519c7 typo: runtime->rt 2021-09-09 18:30:47 -07:00
Scott Lamb
24d5eeb701 add tokio runtime feature to Cargo.toml
Needed by 62f6949.

The normal tests didn't catch this because runtime is a dev-dependency.
The fuzz tests caught it by accident on CI:
https://github.com/scottlamb/retina/actions/runs/1219451203
2021-09-09 18:29:24 -07:00
Scott Lamb
62f6949873 new more reliable TEARDOWN mechanism 2021-09-09 17:34:49 -07:00
Scott Lamb
abf10eac16 use sdp-types 0.1.3 with more permissive parsing
Fixes #26
Fixes #33
2021-09-09 06:58:15 -07:00
Scott Lamb
7141b8601b improve mp4 example error handling
* 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.
2021-09-08 13:25:08 -07:00
Scott Lamb
69f12bde8e cargo fmt 2021-09-07 19:37:33 -07:00
Scott Lamb
96023c5a98 cargo update 2021-09-07 19:27:26 -07:00
Scott Lamb
6f88161943 mp4 example: more verbose errors 2021-09-07 19:25:40 -07:00
Scott Lamb
1056dfbfef UDP fixes (#30)
*   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.
2021-09-07 18:28:19 -07:00
Scott Lamb
799584c8e3 skip Geovision's strange pt=50 packets
Once #33 is fixed, this should allow Geovision cameras to more or
less work.
2021-09-07 15:37:09 -07:00
Scott Lamb
ffaa831c54 warn about #30 2021-08-31 13:27:13 -07:00
Scott Lamb
3a15ddcab5 take 2: downgrade spammy debug msg to trace 2021-08-31 08:43:23 -07:00
Scott Lamb
fd93d12e4d downgrade spammy debug msg -> trace 2021-08-31 08:39:05 -07:00
Scott Lamb
2407fddf86 version 0.3.0 2021-08-31 06:59:47 -07:00
Scott Lamb
f356a16ba6 remove hack for GW Security cameras' audio channel
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.
2021-08-31 06:55:25 -07:00
Scott Lamb
60a253073c get rid of ignore_spurious_data
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.
2021-08-31 06:48: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
785b63ff4a minor cleanup in client
* make handle_keepalive_timer, handle_response, and handle_data proper
  methods. (pin-project is still confusing for me, but I think I'm
  starting to get the hang of it.)
* swap a couple fields between Session and RtspConnection to improve
  clarity for #30
2021-08-27 10:03:16 -07:00
Scott Lamb
c9a1ec1912 mp4 --duration=secs (fixes #28)
also briefly document commandline options
2021-08-26 14:39:01 -07:00
Scott Lamb
2911edec70 fix missing 44.1 kHz (#22) 2021-08-23 10:18:27 -07:00
Scott Lamb
4e52e7b19a mp4 example: option to allow packet loss 2021-08-22 08:08:09 -07:00
Scott Lamb
59e513c9be v0.2.0 2021-08-20 16:48:22 -07:00
Scott Lamb
d9b3424f0b
Merge pull request #20 from scottlamb/pr-control-url
change control URL handling
2021-08-20 16:46:02 -07:00
Scott Lamb
7e5ebf1400 join control URLs with base in the "live555 way"
This isn't RFC-compliant, but it seems to be quite common, and it
works with some cameras where the RFC-compliant way does not.
Fixes #9

Based on lucaszanella's PR #12, including his vstarcam test.
2021-08-20 16:42:57 -07:00