Commit Graph

115 Commits

Author SHA1 Message Date
Scott Lamb
8a8bb3d50e clarify H.264 frame format 2022-01-25 23:39:27 -08:00
Scott Lamb
1145ed053e remove claim that other IO modes aren't too hard
Since writing that text, I've made some design decisions that complicate
this:

* dropping a Session uses tokio::runtime::Handle::spawn
* keepalives are tracked with a tokio::time::Sleep
* I support UDP (so multiple sockets per session), which means the
  blocking API would have to use extra threads or async IO behind the
  scenes.

I might make decisions that complicate it further, e.g. having a tokio
task for each socket rather than polling them all in Session::poll_next.

It's of course still *possible* to support async-std and/or a blocking
API if there's demand. It'd require more duplicate logic/APIs now, so
I'm not excited about the possibility.
2022-01-25 16:20:38 -08:00
Scott Lamb
d50e7481ee clearer docs for Stream::parameters
I'm not sure I'm satisfied with the current behavior after Demuxed's
poll_next returns Pending, but better to document it than not.
2022-01-25 15:50:04 -08:00
Scott Lamb
8ab5808054
Merge pull request #49 from flussonic/dev
Add verbose output to stream info and info cmd to example client
2022-01-12 08:22:46 -08:00
Yegor Bayev
b47ab977c4 remove fmt_option 2022-01-12 10:50:53 +03:00
Yegor Bayev
101a842dec switch debug info from Display to Debug for Stream and UdpSockets structs 2022-01-11 17:23:19 +03:00
Yegor Bayev
d29f1251f7 fix output typo "RTP payload time" -> "type" 2022-01-10 20:27:15 +03:00
Yegor Bayev
b1987ec963 cargo check fix 2022-01-10 20:06:05 +03:00
Yegor Bayev
dc615dbc57 update README with basic auth feature support 2022-01-10 18:45:28 +03:00
Yegor Bayev
091ee0f18e add info cmd to example client, README update 2022-01-10 18:44:35 +03:00
Yegor Bayev
82be42af87 add verbose output to Stream struct in client module 2022-01-10 18:44:18 +03:00
Scott Lamb
e551337c91 prep v0.3.6 2021-12-29 22:06:21 -08:00
Scott Lamb
7b1d87aa5e add missing file for recent tests 2021-12-29 22:06:08 -08:00
Scott Lamb
c72ee2f9dc add more logging around session expiration 2021-12-29 22:02:53 -08:00
Scott Lamb
cf08d1faa6 expire live555 stale file descriptor sessions 2021-12-29 21:58:29 -08:00
Scott Lamb
3187be6c41 test teardown & normal session expiration 2021-12-29 21:24:17 -08:00
Scott Lamb
9a519c8e25 make SessionGroup::await_stale_sessions Send 2021-12-29 20:32:27 -08:00
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