Commit Graph

175 Commits

Author SHA1 Message Date
Scott Lamb
7f32639608 don't break after keepalive response!
prepare v0.0.4 immediately; v0.0.3 is effectively unusable.

I want to test this properly, but I haven't yet figured out how to set
up good mocks of tokio::Sleep and such. For now just fix the bug.
2021-06-28 15:30:28 -07:00
Scott Lamb
037c501dfb prepare v0.0.3 release 2021-06-28 14:16:13 -07:00
Scott Lamb
48f2c2eb15 directly implement Stream on Session<Playing>
The new implementation has several benefits:

*   it's more correct, in a way that probably doesn't matter now but
    will if we ever send ONVIF backchannel audio. See the removed
    comment about deadlock possibility. Similarly, I realized that if
    packets became readable halfway through flushing a keepalive, the
    keepalive future would be improperly dropped as described at
    the beginning of this blog post:
    https://carllerche.com/2021/06/17/six-ways-to-make-async-rust-easier/

*   we'll be able to make other method calls on the Session while using
    the stream, eg sending audio with ONVIF backchannel

*   it's 8% faster according to the client benchmark.

*   it doesn't pull in the async-stream dependency anymore.

*   we can name the type of the stream, avoiding a Box in some cases.
2021-06-28 13:51:19 -07:00
Scott Lamb
dacbca8c28 speed up interleaved data parsing
This is a 20% improvement on the freshly-added benchmark.
2021-06-28 10:29:27 -07:00
Scott Lamb
4a8b8f2f77 add a more end-to-end benchmark 2021-06-28 10:04:38 -07:00
Scott Lamb
6503398d3f prepare v0.0.2 2021-06-25 16:48:41 -07:00
Scott Lamb
a097d01f62 cargo fmt 2021-06-25 16:42:12 -07:00
Scott Lamb
1279dec0c3 H.264 fixes, testing, packetizer
Fuzz testing found a few bugs in the new H.264 depacketizer.
Also add a H.264 packetizer. Currently it's just used for testing.
2021-06-25 16:39:48 -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
Scott Lamb
b9aad86d57 box aac and h264 depacketizers
These are huge, not present for every stream, and only allocated once at
describe time, so boxing makes sense. I probably should listen to that
clippy lint!
2021-06-09 22:42:48 -07:00
Scott Lamb
bdc23ae318 add repository link to Cargo.toml 2021-06-09 22:26:52 -07:00
Scott Lamb
45e15d43fd fix README formatting 2021-06-09 15:24:10 -07:00
Scott Lamb
f56b63225d prepare v0.0.1 release 2021-06-09 13:50:30 -07:00
Scott Lamb
cb719cd34d remove redundant decode function 2021-06-07 21:47:31 -07:00
Scott Lamb
70012e300b remove unnecessary parens
(the braces were added by "cargo fmt", making the parens redundant)
2021-06-07 21:36:19 -07:00
Scott Lamb
cd407ce93a add missing copyright header 2021-06-07 21:35:08 -07:00
Scott Lamb
b0575b3794 cargo fmt 2021-06-07 21:32:44 -07:00
Scott Lamb
e9125500b5 bump deps 2021-06-07 21:32:04 -07:00
Scott Lamb
954c181569 use my pr-sps-overflow branch of h264-reader
This makes fuzz testing get a bit farther at least.
2021-06-07 21:30:18 -07:00
Scott Lamb
45147200ce start h.264 fuzz testing 2021-06-07 18:12:45 -07:00
Scott Lamb
1bcc864344 trim dependencies 2021-06-04 21:20:56 -07:00
Scott Lamb
8a40070b8a
Fix typo 2021-06-03 22:35:33 -07:00
Scott Lamb
5cc69e751c initial commit 2021-06-03 16:49:53 -07:00