webrtc-rs / sdp Goto Github PK
View Code? Open in Web Editor NEWA pure Rust implementation of SDP
Home Page: https://webrtc.rs
License: Apache License 2.0
A pure Rust implementation of SDP
Home Page: https://webrtc.rs
License: Apache License 2.0
Hi! I see you re-wrote pion/sdp to Rust, but why do you not used well formed mozilla/webrtc-sdp crate?
benchmark SDP crate and compare its performance to Pion SDP or other implementations
Hi, @rainliu! First of all, thank you for your efforts!
I haven't had any meaningful experience with WebRTC before, but I'm going to learn it very carefully up from the ground. On the other hand, I have some serious proficieny in Rust (2 years in production). I'd like to offer my contributions to webrtc-rs projects if you'd like to accept them.
As I see, the code now is merely a clone of the similar Go code from Pion, and is not as idiomatic as you can meet in Rust ecosystem. From the first glance I see a lot of redundant boxing and using comments instead docs.
I'm going both to learn and to Rustify this crate in the process, so make it meet the community "standards" and "expections". This may also involve some signatures changes to more idiomatic ones (I'll try to give the reasoning where and why) and significant crate refactoring.
Will such contributions be welcome?
Thanks!
Current implementation:
session_version: SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap_or_else(|_| Duration::from_secs(0))
.subsec_nanos() as u64
Spec:
https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-26#section-5.2.2
5.2.2. Subsequent Offers
o The fields of the "o=" line MUST stay the same except for the
<session-version> field, which MUST increment by one on each call
to createOffer if the offer might differ from the output of the
previous call to createOffer; implementations MAY opt to increment
<session-version> on every call. The value of the generated
<session-version> is independent of the <session-version> of the
current local description; in particular, in the case where the
current version is N, an offer is created and applied with version
N+1, and then that offer is rolled back so that the current
version is again N, the next generated offer will still have
version N+2.
MUST increment by one on each call to createOffer
https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-26#section-5.3.2
5.3.2. Subsequent Answers
o The fields of the "o=" line MUST stay the same except for the
<session-version> field, which MUST increment if the session
description changes in any way from the previously generated
answer.
Related to: https://github.com/pion/sdp/issues/60
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.