The Wayback Machine - https://web.archive.org/web/20210120050145/https://github.com/russelltg/srt-rs
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
ci
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

srt-rs

codecov

OS Status
Linux Linux Build Status
macOS macOS Build Status
Windows Windows Build Status

NOTE: THIS IS NOT PRODUCTION READY.

Pure rust implementation of SRT (Secure Reliable Transport), without unsafe code.

Reference implementation is available at https://github.com/haivision/srt

Features

  • Fast (heap allocations are rare, uses async IO)
  • Full safety garuntees of rust

What works

  • Listen server connecting
  • Client (connect) connecting
  • Rendezvous connecting
  • Receiving
  • Sending
  • Special SRT packets (partial)
  • Actual SRT (TSBPD)
  • Timestamp drift recovery (not throughly tested)
  • Congestion control
  • Encryption
  • Bidirectional

Thread Efficiency

The reference implementation of SRT requires 3 threads per sender and 5 threads per receiver.

With srt-rs, you can assign as many connections to exactly as many threads as you want (usually as many as you have cores) using tokio's futures scheduling. This should allow for handing of many more connections.

Examples

Generate and send SRT packets

cargo run --example sender

Receive SRT packets

cargo run --example receiver

Structure

This repository is structured into 3 crates:

  • srt-protocol: State machines for the SRT protocol, with no dependencies on futures or tokio. Someday, I would like this to be a no-std crate. I expect this to have frequent breaking changes.
  • srt-tokio: Tokio elements written on top of the protocol, expected to be a relatively stable API.
  • srt-transmit: A srt-live-tranmsit replacement written ontop of srt-tokio

About

SRT implementation in Rust

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.