mediabus-rtp-0.4.0.0: Receive and Send RTP Packets

Safe HaskellNone
LanguageHaskell2010

Data.MediaBus.Rtp.Source

Description

A conduit Source that receives bytestrings and parses RTP packets.

Synopsis

Documentation

type RtpStream p = Stream RtpSsrc RtpSeqNum RtpTimestamp p RtpPayload Source #

A handy alias for a Stream for RTP packets, with according sequence number, time stamp and payload types.

rtpSource :: (Show i, Show s, Show t, Show p, Default i, Monad m, Default p, MonadLogger m) => Conduit (Stream i s t p ByteString) m (RtpStream p) Source #

A Conduit that consumes ByteStrings and produces an RtpStream

rtpPayloadDemux :: (Integral t, Monad m) => [(RtpPayloadType, RtpPayloadHandler (Ticks r t) c)] -> c -> Conduit (RtpStream p) m (Stream RtpSsrc RtpSeqNum (Ticks r t) p c) Source #

A utility that call the right RtpPayloadHandler for the RtpPayloadType of the Frame.

type RtpPayloadHandler t c = Frame RtpSeqNum t RtpPayload -> Frame RtpSeqNum t c Source #

Functions from Frame to Frame for converting/coercing an RtpPayload to some common media type. NOTE: This is not for transcoding, this is rather for casting or coercing