isobmff-0.14.0.0: A parser and generator for the ISO-14496-12/14 base media file format

Safe HaskellNone
LanguageHaskell2010

Data.ByteString.Mp4.AudioStreaming

Description

A single-track AAC audio streaming utility wrapping AudioFile for streaming via e.g. DASH.

Synopsis

Documentation

data Segment Source #

Contains a sample in the ISO14496 style interpretation, i.e. a smallish buffer of e.g. 20ms audio data or a single video frame. A sample has some kind of time or at least order associated to it. TODO not right now, add it

Also a sample has a duration measured as the sampleCount. TODO make this a real data type, and possible refactor this to be a seperate issue from filling stream gaps and determining the offsets and the decoding time stamp.

Instances
Show Segment Source # 
Instance details

Defined in Data.ByteString.Mp4.AudioStreaming

data StreamingContext Source #

Contains the configuration and state for the creation of a DASH audio stream.

data AacMp4TrackFragment Source #

Media fragment segment parameters of an aac audio stream mp4 file.

buildAacMp4TrackFragment :: AacMp4TrackFragment -> Builder Source #

Convert a 'AacMp4TrackFragment record to a generic Boxes collection.

getStreamBaseTime :: StreamingContext -> Word64 Source #

Return the current base decoding time

getStreamSequence :: StreamingContext -> Word32 Source #

Return the current sequence number

streamInitINTERNAL_TESTING :: String -> NominalDiffTime -> Bool -> SamplingFreqTable -> ChannelConfigTable -> IO (BinaryAacInitSegment, StreamingContext) Source #

Initiate the StreamingContext and create the MP4 init segment. This lives in IO because it read the current time from the real world.

streamInitUtc :: String -> UTCTime -> UTCTime -> NominalDiffTime -> Bool -> SamplingFreqTable -> ChannelConfigTable -> (BinaryAacInitSegment, StreamingContext) Source #

Initiate the StreamingContext and create the MP4 init segment. This lives in IO because it read the current time from the real world.

streamNextSample :: Word32 -> ByteString -> StreamingContext -> (Maybe Segment, StreamingContext) Source #

Enqueue a sample, if enough samples are accumulated, generate the next segment

streamFlush :: StreamingContext -> (Maybe Segment, StreamingContext) Source #

Enqueue a sample, if enough samples are accumulated, generate the next segment