Skip to content

work-in-progress -- nothing interesting here yet

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.md
MIT
LICENSE-MIT.md
Notifications You must be signed in to change notification settings

veriskope/rtmp-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtmp-rs

requires Rust 1.40 or higher (f64:from_be_bytes) -- if you are using typical install, check local rust installation with rustup show

Running the example

cargo build

with logging...

RUST_LOG=info  cargo run --example connect

with crazy amount of logging...

RUST_LOG=trace  cargo run --example connect

run specific test with logging (see note below about enabling from code):

RUST_LOG=trace cargo test can_read_command_message

Work in progress

Thinking that an API that looks like this would be nice

#[tokio::main]
async fn main() {

  let url = "rtmp://localhost/live"
  let conn = rtmp::Connection::new(url).await?;
  // optional set timeout to 1 sec: conn.set_timeout(1000);
  conn.connect().await?;
  let result = conn.send_command("get_user_info", ["fred"]).await?
  match result {
    Err(e) => println!("command failed", e),
    Ok(info) => println!("Got info: {}", info)
  }
}

TODO

  • how to run some code before test run? (for logging, I currently add pretty_env_logger::init(); in the code of the test)
  • I've gotten a bit fast-and-loose with adding crates, would like to consider reducing dependencies once the basics are working
  • maybe use procedural macro to implement reading/writing of chunks with less boilerplate code

Running the server

git clone [email protected]:veriskope/docker-adobe-media-server.git
cd docker-adobe-media-server
docker-compose up

License

This library is distributed under same terms as the Rust language, under both the MIT license and the Apache License (Version 2.0).

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this repository by you, shall be dual licensed as MIT and Apache 2.0, without any additional terms or conditions.

About

work-in-progress -- nothing interesting here yet

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.md
MIT
LICENSE-MIT.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages