Skip to content

icywind/SDPParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDPParser

Session Description Parser in C#

SDP Parser

Project Repo: 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:
    using io.agora.sdp;
  2. Instantiate the Parser class; then use the Parse() method to create a SessionDescription object.
Parser parser = new Parser();  
SessionDescription sessionDescription = parser.Parse(sdptext);
  1. 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:

Demo:

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

About

Session Description Parser in C#

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages