A Clojure parser and emitter for the Session Description Protocol (SDP) as described by RFC 4566.
Available on Clojars:
Full API and implementation documentation is available here.
(ns example
(:require [multimedia.streaming.sdp :refer :all])
;; Parse an SDP string
(def description (parse example-sdp-string))
;; Resulting structure is a simple set of nested maps
(:name description) ;; => "SDP Seminar"
(get-in description [:media-descriptions 0 :media-type]) ;; => "audio"
(get-in description [:media-descriptions 0 :port]) ;; => 49170
;; Overridable parsers allow for integration with custom types
;; E.g. To parse all ports as strings
(use-custom-parsers!
{:port identity})
(get-in (parse example-sdp-string) [:media-descriptions 0 :port]) ;; => "49170"
- Optional representation of instants and durations using
java.time
or JodaTime - Pluggable attribute parsing
- Emitting
Copyright © 2015 Nick Ogden
Distributed under the Eclipse Public License, the same as Clojure.