Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.
/ sdp Public archive
forked from medooze/sdp

Java SDP library with ABNF strict parsing

License

Notifications You must be signed in to change notification settings

alianza-dev/sdp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABNF Java SDP library

This java library allows strict ABNF SDP parsing and serialization

Build

Originally, this project used ant to build. It has been converted to use maven.

Javadoc

Javadocs: https://medooze.github.io/sdp/

Example

	  SessionDescription sdp = new SessionDescription();
	  Origin origin = new Origin("-", 0L, 0L, "IN", "IP4", "127.0.0.1");
	  sdp.setOrigin(origin);
	  sdp.setSessionName("test");
	  sdp.addMedia(new MediaDescription("aduio", 0, "UDP/AVP"));
    
	  SessionDescription cloned = sdp.clone();
	  System.out.println(sdp.toString());
	  System.out.println(cloned.toString());
	  
	  origin.setSessId(1);
	  System.out.println(sdp.toString());
	  System.out.println(cloned.toString());
 SessionDescription sdp = SessionDescription.Parse("v=0\r\n" +
	"o=- 3803220250780278427 2 IN IP4 127.0.0.1\r\n" +
	"s=-\r\n" +
	"t=0 0\r\n" +
	"a=msid-semantic: WMS\r\n" +
	"m=application 50895 DTLS/SCTP 5000\r\n" +
	"a=sctpmap:5000 webrtc-datachannel 1024\r\n");
		    
  MediaDescription datachannel = sdp.getMedias().get(0);
  SCTPMapAttribute sctpmap = (SCTPMapAttribute)datachannel.getAttributes("sctpmap").get(0);
  System.out.println(sctpmap.toString());

License

MIT :)

About

Java SDP library with ABNF strict parsing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%