Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/icywind/sdpparser
Session Description Parser in C#
https://github.com/icywind/sdpparser
webrtc
Last synced: 7 days ago
JSON representation
Session Description Parser in C#
- Host: GitHub
- URL: https://github.com/icywind/sdpparser
- Owner: icywind
- License: mit
- Created: 2021-08-24T04:59:47.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-06T00:38:22.000Z (over 3 years ago)
- Last Synced: 2024-12-14T15:14:35.382Z (2 months ago)
- Topics: webrtc
- Language: C#
- Homepage:
- Size: 134 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SDPParser
Session Description Parser in C#
# SDP ParserProject Repo: [https://github.com/icywind/SDPParser](https://github.com/icywind/SDPParser)
### Prerequisite
- Visual Studios
- Newtonsoft JSON (added NuGet dependency in Unit Test project “sdptest”)
### How to use:1. Import the package namespace:
```csharp
using io.agora.sdp;
```
2. Instantiate the Parser class; then use the Parse() method to create a SessionDescription object.```csharp
Parser parser = new Parser();
SessionDescription sessionDescription = parser.Parse(sdptext);
```3. Use Newtonsoft.JsonConvert.Serialize() to convert the sessionDescription into JSON string
Note the SDPParser library itself doesn’t have external dependency. The JSON dependency is required just for the Unit Tests target.
# Unity Application
## From the SDPParser project to a Unity Project:
**Copy the SDPParser folder to the Unity project's Assets folder.**## Prerequisite:
- Unity 2019.4
- Newtonsoft JSON: search “newtonsoft json” in Asset Store and download the package:
- ![](https://lh6.googleusercontent.com/5AATbnoPqTGM9aNdvNiUyOX2v4q8M-Ty9Uz1VvhXY5XIm75wAdOoB6uyRtuV3f8Co2WeJoh-cfLyZn-0mCeH_r9ffN4CZvq0v7tTssai5BDxXi568lpkkAcQm0BRNHEoEHN1cbjp=s0)
## Demo:
[https://apprtcio-my.sharepoint.com/:u:/g/personal/rick_agora_io/EdlPipjjXQhOkys3D8sN-5kBw4Penq4fqwu6gJfTaoXvQA?e=gpbtxU](https://apprtcio-my.sharepoint.com/:u:/g/personal/rick_agora_io/EdlPipjjXQhOkys3D8sN-5kBw4Penq4fqwu6gJfTaoXvQA?e=gpbtxU)
## Setup:
- The SDPParser folder has been copied into the Assets folder for the Unity project.
- NewtonSoft is included in the package
## Test
Run the project by hitting Play button
1. Select AgoraObject from the scene Hierarchy
2. Paste your SDP text into the “Sdptext” box
3. Tap the “Parse” button
4. See the console output for the converted JSON
- ![](https://lh4.googleusercontent.com/qKNtEkmPUR8W3TaHHczMfKnOxplgwDGdaFo0S299xViPC-twW9x5I8XW9Cp6ViHHESfFaT40SFHgst_lCLmwMnuZIHZ9qtI6FkMKbmrWVLLsaVKJ06KmsmJtI3Q4eiX_LGj3lWJ7=s0)