webrtc-rs / rtcp Goto Github PK
View Code? Open in Web Editor NEWA pure Rust implementation of RTCP
Home Page: https://webrtc.rs
License: Apache License 2.0
A pure Rust implementation of RTCP
Home Page: https://webrtc.rs
License: Apache License 2.0
Add proper error handling to rtcp crate.
Since processing of packets is likely to happen thousands of times per second, there will be a performance gain if the struct doesn't allocate to Vec<> every time you unmarshal a header.
Something like arrayvec would be suitable for this: https://crates.io/crates/arrayvec
Rename library on cargo from webrtc-rs-rtcp to rtcp as name has not been taken https://crates.io/search?q=rtcp
This code compiles without warnings and works correctly on v0.2.2. It doesn't build with v0.2.3.
Compiling retina v0.0.5 (/home/slamb/git/retina)
warning: unused import: `rtcp::packet::Packet`
--> src/client/rtp.rs:189:13
|
189 | use rtcp::packet::Packet;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0599]: no function or associated item named `unmarshal` found for struct `Header` in the current scope
--> src/client/rtp.rs:193:49
|
193 | let h = match rtcp::header::Header::unmarshal(&data) {
| ^^^^^^^^^ function or associated item not found in `Header`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use webrtc_util::marshal::Unmarshal;`
error[E0599]: no function or associated item named `unmarshal` found for struct `rtcp::sender_report::SenderReport` in the current scope
--> src/client/rtp.rs:211:66
|
211 | let pkt = rtcp::sender_report::SenderReport::unmarshal(&pkt)
| ^^^^^^^^^ function or associated item not found in `rtcp::sender_report::SenderReport`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use webrtc_util::marshal::Unmarshal;`
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0599`.
error: could not compile `retina`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
benchmark RTCP crate and compare its performance to Pion RTCP or other implementations
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.