All Projects → mozilla → Webrtc Sdp

mozilla / Webrtc Sdp

Licence: mpl-2.0
Rust SDP parser for WebRTC

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Webrtc Sdp

Vte
Parser for virtual terminal emulators
Stars: ✭ 117 (-3.31%)
Mutual labels:  parser
Flok
Web-based P2P collaborative editor for live coding sounds and images
Stars: ✭ 119 (-1.65%)
Mutual labels:  webrtc
Stun
Low-level Session Traversal Utilities for NAT (STUN) client and server
Stars: ✭ 120 (-0.83%)
Mutual labels:  webrtc
Surelog
SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler. Provides IEEE Design/TB C/C++ VPI and Python AST API.
Stars: ✭ 116 (-4.13%)
Mutual labels:  parser
Crass
A Ruby CSS parser that's fully compliant with the CSS Syntax Level 3 specification.
Stars: ✭ 118 (-2.48%)
Mutual labels:  parser
Notes
let me know if my notes help you :D (it's a mess, I know)
Stars: ✭ 119 (-1.65%)
Mutual labels:  webrtc
Filegogo
A file transfer tool that can be used in the browser webrtc p2p
Stars: ✭ 117 (-3.31%)
Mutual labels:  webrtc
Go Wasm
WebAssembly binary file parser written in go
Stars: ✭ 121 (+0%)
Mutual labels:  parser
Java Petitparser
Dynamic parser combinators in Java.
Stars: ✭ 118 (-2.48%)
Mutual labels:  parser
Balena Cam
Network Camera with Raspberry Pi and WebRTC. Tutorial:
Stars: ✭ 120 (-0.83%)
Mutual labels:  webrtc
Action Cable Signaling Server
🤝Rails implementation of a WebRTC Signaling Server
Stars: ✭ 118 (-2.48%)
Mutual labels:  webrtc
Luqum
A lucene query parser generating ElasticSearch queries and more !
Stars: ✭ 118 (-2.48%)
Mutual labels:  parser
Rtp
A Go implementation of RTP
Stars: ✭ 120 (-0.83%)
Mutual labels:  webrtc
Webdrop
Easiest group P2P File & Message transfer in browser with WebRTC 🔥. Cross-platform alternative to Apple's AirDrop, Xender, ShareIT with the same speed over LAN. No installation, just a website :)
Stars: ✭ 119 (-1.65%)
Mutual labels:  webrtc
Pq
a command-line Protobuf parser with Kafka support and JSON output
Stars: ✭ 120 (-0.83%)
Mutual labels:  parser
Ltgt
Lightweight HTML processor
Stars: ✭ 117 (-3.31%)
Mutual labels:  parser
Html2pug
Converts HTML to Pug 🐶
Stars: ✭ 118 (-2.48%)
Mutual labels:  parser
Spectre.cli
An extremely opinionated command-line parser.
Stars: ✭ 121 (+0%)
Mutual labels:  parser
Commonmark Java
Java library for parsing and rendering CommonMark (Markdown)
Stars: ✭ 1,675 (+1284.3%)
Mutual labels:  parser
Rust hdl
Stars: ✭ 120 (-0.83%)
Mutual labels:  parser

webrtc-sdp

Crates.io Build Status Codecov coverage status License: MPL 2.0 dependency status

A SDP parser written in Rust specifically aimed to handle WebRTC SDP offers and answers.

Dependecies

  • Rust >= 1.45.0
  • log module
  • serde module
  • serde-derive module

Cargo installs the missing modules automatically when building webrtc-sdp for the first time.

The webrtc-sdp API

The main function is:

fn parse_sdp(sdp: &str, fail_on_warning: bool) -> Result<SdpSession, SdpParserError>

The sdp parameter is the string which will get parsed. The fail_on_warning parameter determines how to treat warnings encountered during parsing. Any problems encountered during are stored until the whole string has been parsed. Any problem during parsing falls into two catgeories:

  • Fatal error preventing further parsing or processing of the SDP
  • Warning which don't block further processing of the SDP

Warnings will be for example unknown parameters in attributes. Setting fail_on_warning to true makes most sense during development, when you want to be aware of all potential problems. In production fail_on_warning is expected to be false.

parse_sdp() returns either an SdpSession struct (code) which contains all the parsed information. Or in case a fatal error was encountered (or if fail_on_warning was set to true and any warnings were encountered) an SdpParserError (code) will be returned as a Result.

Examples

The file parser in the webrtc-sdp package gives you an easy example of how to invoke the webrtc-sdp parser.

Contributing

As the Travis CI runs are checking for code formating and clippy warnings please run the following commands locally, before submitting a Pull Request.

If you haven't clippy and Rust format installed already you add them like this:

rustup component add rustfmt-preview
rustup component add clippy

Check with clippy for warnings in the code:

cargo clippy

And format all of the code according to Rust code style convention:

cargo fmt --all

Fuzzing

Install cargo-fuzz like this:

cargo install cargo-fuzz

With rust nightly you can start fuzzing like this:

cargo fuzz run fuzz_target_parse_sdp

License

Licensed under MPL-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].