A Clojure based, asynchronous client and server for the Real Time Streaming Protocol (RTSP) as described by RFC 2326.
Available on Clojars:
Link goes here.
Full API and implementation documentation is available here.
(ns example
(require [multimedia.streaming.rtsp.client :refer :all]))
;; Create an RTSP session
(def peer (session "rtsp://192.168.1.73"))
peer ;=> #Session{:url {:protocol "rtsp",
:port 8554,
:host "192.168.1.73"},
:version "RTSP/1.0"}
;; Issue requests as ring-like request maps
(def response (request! peer {:method "DESCRIBE"
:path "media/stream-1"}))
;; Or use the provided convenience functions
(def response (describe! peer "media/stream-1"))
;; All communication is asynchronous and non-blocking.
;; Requests return [manifold](https://github.com/ztellman/manifold) deferreds.
response ;=> #<Deferred@19c15de7: :not-delivered>
@response ;=> {:version "RTSP/1.0",
:status 200,
:reason "OK",
:headers {:c-seq "4",
:content-base "rtsp://192.168.1.73:554/media/stream-1/",
:content-length "979",
:content-type "application/sdp",
:date "Fri, Nov 06 2015 16:00:16 GMT"},
:body "v=0\r\no=- 1446825616551909 1 IN IP4 192.168.1.73\r\n..."}
;; Optional manual closing of connections
(close! peer)
Copyright © 2015 Nick Ogden
Distributed under the Eclipse Public License, the same as Clojure.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close