Commit Graph

155 Commits

Author SHA1 Message Date
Scott Lamb
c58ac94fe4 CI: fix clippy flags 2022-04-12 14:24:35 -07:00
Scott Lamb
decab965a3 prepare v0.3.9 2022-04-12 14:19:24 -07:00
Scott Lamb
0bd76e1346 cargo fmt 2022-04-12 14:19:24 -07:00
Scott Lamb
70294f4641 improve debug logging on wrong ssrc
As described here:
https://github.com/scottlamb/moonfire-nvr/issues/209#issuecomment-1083307174
2022-04-12 14:14:58 -07:00
Scott Lamb
e358f0cd0c make clippy warnings fail on CI 2022-04-12 14:09:58 -07:00
Scott Lamb
ed7be5da0e remove extra blank line in hexdump output 2022-04-12 14:06:29 -07:00
Scott Lamb
3153355807 clarify tokio runtime expectations 2022-04-12 13:22:44 -07:00
Scott Lamb
31515887de FromStr, Display for UnassignedChannelDataPolicy 2022-04-12 13:02:34 -07:00
Scott Lamb
c887998636 mp4 example: mid-stream video param changes
https://github.com/scottlamb/moonfire-nvr/issues/217
2022-04-11 21:47:46 -07:00
Scott Lamb
7cbe39213d support ignoring msgs on unassigned RTSP channels
https://github.com/scottlamb/moonfire-nvr/issues/213#issuecomment-1089411093
2022-04-08 15:37:37 -07:00
Scott Lamb
ba8b00b4fd clippy 2022-04-05 13:17:31 -07:00
Scott Lamb
1ee6d95cc3 tweak handling of data on unassigned channels
*   Call `note_stale_live555_data` when this happens in playing state.
    This makes it more consistent with what happens while waiting for
    a response in the described state, or in playing state on an
    assigned channel.
*   Print a hex dump of some initial bytes, enough to analyze it to
    see if it looks like RTP or RTCP, what the ssrc is, etc. And do the
    same for other places we log (parts of) packets.
2022-04-05 13:16:23 -07:00
Scott Lamb
1e733ab0c4 cargo fmt fix 2022-04-04 19:38:29 -07:00
Scott Lamb
31080f324d ignore trailing spaces in rtpmap attribute
https://github.com/scottlamb/moonfire-nvr/issues/213
2022-04-04 19:35:34 -07:00
Scott Lamb
27bc8caf04 fix out-of-date cmd name in README 2022-04-04 16:05:25 -07:00
Scott Lamb
443de81c0d better debug output on SDP parse failure
https://github.com/scottlamb/moonfire-nvr/issues/213#issuecomment-1086927479
2022-04-04 15:44:14 -07:00
Scott Lamb
d49e77a668 API and example for printing a session's SDP
This is useful for debugging.
2022-04-04 15:08:52 -07:00
Scott Lamb
76d5d883fa tweak TeardownPolicy::Auto
Now when using TCP, it makes some attempt to send a TEARDOWN, even when
the server is not known to be affected by live555 bugs.
2022-04-01 21:25:20 -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
3b4a6ba985 update deps 2022-04-01 16:07:48 -07:00
Scott Lamb
fd7c5a3eb0 fix bench; test it properly on CI 2022-04-01 10:09:23 -07:00
Scott Lamb
9b4f50231c prepare v0.3.8 2022-03-08 10:37:49 -08:00
Scott Lamb
aff87d1919 fix possible panic reading data from server
Found by inspection. It'd be nice to fuzz the tokio module to more
reliably find problems like this, but it looks like I'd have to make
a bunch more stuff public for that. Maybe later...
2022-03-08 10:34:11 -08:00
Scott Lamb
9b907b79ff cargo fmt 2022-03-08 10:34:11 -08:00
Scott Lamb
5b1bb7c7e4 fix #52 with upgrade to sdp-types 0.1.4 2022-03-08 10:05:41 -08:00
Yegor Bayev
10fecf8681 add framerate to Stream struct in client 2022-02-14 11:01:42 -08:00
Scott Lamb
555e8bf373 clippy, take 2 2022-01-31 14:17:07 -08:00
Scott Lamb
31646b6ae9 clippy 2022-01-31 14:07:03 -08:00
Scott Lamb
602718eabb comment and warning cleanup 2022-01-31 13:54:13 -08:00
Scott Lamb
cc78d3b8a6 test and fix AAC fragment loss handling
Fixes #48
2022-01-31 13:51:31 -08:00
Scott Lamb
b26d8a93a7 test+fix AAC depacketization happy path
Formerly interior fragments wouldn't get appended to the buffer, so
depacketization would inevitably fail.

This is progress toward #48.
2022-01-31 11:59:41 -08:00
Scott Lamb
1a00b5e92a properly request unicast with udp
https://github.com/scottlamb/moonfire-nvr/issues/192#issuecomment-1025396306

RFC 2326 section 12.39 says if this is omitted, it defaults to
multicast. Retina doesn't support multicast, so explicitly say unicast.
This was already done correctly for TCP but not for UDP.
2022-01-30 21:33:03 -08:00
Scott Lamb
499d658352 mp4 example: allow in-band h264 params
Fixes #43
2022-01-30 21:18:47 -08:00
Scott Lamb
e4be827a63 prep v0.3.7 2022-01-28 09:17:22 -08:00
Scott Lamb
7ce611358d clarify what a video frame is 2022-01-28 09:15:27 -08:00
Greg V
dc0d307382 H.264: do not panic when parsing sprop-parameter-sets
This .unwrap() call would panic on e.g. an empty string, which
it would get from 'fmtp:96 ' (empty parameters).

This is for example produced by v4l2-rtspserver when it
fails to extract SPS/PPS from the first (?) packet:
d0da079177/src/H264_V4l2DeviceSource.cpp (L52)
2022-01-26 14:25:23 -08:00
Scott Lamb
663ff74104 changelog: fix link formatting 2022-01-26 01:13:52 -08:00
Scott Lamb
c0595a67f5 improve timestamp docs, take 2
In take 1, I put some of the most important information on private
fields, so it wouldn't show up on public docs. Let's fix that now.
2022-01-26 01:04:00 -08:00
Scott Lamb
e0ec40db96 improve timestamp docs 2022-01-26 00:17:55 -08:00
Scott Lamb
ddb73ea3c6 update overall crate status 2022-01-25 23:42:59 -08:00
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