{"id":18117993,"url":"https://github.com/mozilla/webrtc-sdp","last_synced_at":"2025-04-07T14:10:58.945Z","repository":{"id":35055479,"uuid":"79198302","full_name":"mozilla/webrtc-sdp","owner":"mozilla","description":"Rust SDP parser for WebRTC","archived":false,"fork":false,"pushed_at":"2024-09-24T17:39:37.000Z","size":737,"stargazers_count":156,"open_issues_count":26,"forks_count":30,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-29T23:52:01.693Z","etag":null,"topics":["jsep","parser","rust","sdp","sdp-parser","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-17T06:55:39.000Z","updated_at":"2024-10-11T11:21:39.000Z","dependencies_parsed_at":"2024-01-18T00:58:24.275Z","dependency_job_id":"480a24a2-5390-4be9-b636-ea51adc6e5ad","html_url":"https://github.com/mozilla/webrtc-sdp","commit_stats":{"total_commits":315,"total_committers":20,"mean_commits":15.75,"dds":0.5460317460317461,"last_synced_commit":"02301b1619a9d894cc92aa0d735002b3c3cccb02"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fwebrtc-sdp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fwebrtc-sdp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fwebrtc-sdp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fwebrtc-sdp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/webrtc-sdp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666008,"owners_count":20975787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jsep","parser","rust","sdp","sdp-parser","webrtc"],"created_at":"2024-11-01T05:07:34.814Z","updated_at":"2025-04-07T14:10:58.927Z","avatar_url":"https://github.com/mozilla.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webrtc-sdp\n\n[![Crates.io](https://img.shields.io/crates/v/webrtc-sdp.svg)](https://crates.io/crates/webrtc-sdp)\n[![Build Status](https://travis-ci.org/mozilla/webrtc-sdp.svg?branch=master)](https://travis-ci.org/mozilla/webrtc-sdp)\n[![Codecov coverage status](https://codecov.io/gh/mozilla/webrtc-sdp/branch/master/graph/badge.svg)](https://codecov.io/gh/webrtc-sdp/webrtc-sdp)\n[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](#License)\n[![dependency status](https://deps.rs/repo/github/mozilla/webrtc-sdp/status.svg)](https://deps.rs/repo/github/mozilla/webrtc-sdp)\n\nA SDP parser written in Rust specifically aimed to handle WebRTC SDP offers and answers.\n\n## Dependecies\n\n* Rust \u003e= 1.70.0\n* log module\n* serde module\n* serde-derive module\n\nCargo installs the missing modules automatically when building webrtc-sdp for the first time.\n\n## The webrtc-sdp API\n\nThe main function is:\n```rust\nfn parse_sdp(sdp: \u0026str, fail_on_warning: bool) -\u003e Result\u003cSdpSession, SdpParserError\u003e\n```\nThe `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:\n\n* Fatal error preventing further parsing or processing of the SDP\n* Warning which don't block further processing of the SDP\n\nWarnings 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`.\n\n`parse_sdp()` returns either an `SdpSession` struct ([code](https://github.com/mozilla/webrtc-sdp/blob/master/src/lib.rs#L137)) 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](https://github.com/mozilla/webrtc-sdp/blob/master/src/error.rs#L117)) will be returned as a `Result`.\n\n## Examples\n\nThe [file parser](https://github.com/mozilla/webrtc-sdp/blob/master/examples/file_parser.rs) in the webrtc-sdp package gives you an easy example of how to invoke the webrtc-sdp parser.\n\n## Contributing\n\nAs the Travis CI runs are checking for code formating and clippy warnings please run the following commands locally, before submitting a Pull Request.\n\nIf you haven't clippy and Rust format installed already you add them like this:\n```\nrustup component add rustfmt-preview\nrustup component add clippy\n```\n\nCheck with clippy for warnings in the code:\n```\ncargo clippy\n```\n\nAnd format all of the code according to Rust code style convention:\n```\ncargo fmt --all\n```\n\n## Fuzzing\n\nInstall cargo-fuzz like this:\n```\ncargo install cargo-fuzz\n```\n\nWith rust nightly you can start fuzzing like this:\n```\ncargo fuzz run fuzz_target_parse_sdp\n```\n\n## License\n\nLicensed under [MPL-2.0](https://www.mozilla.org/MPL/2.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fwebrtc-sdp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Fwebrtc-sdp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fwebrtc-sdp/lists"}