mediabus-0.2.0.1: Multimedia streaming on top of Conduit

Safe HaskellNone
LanguageHaskell2010

Data.MediaBus.Segment

Synopsis

Documentation

class CanSegment a where Source #

Class of types that support splitting of from the front a packet containing roughly a certain duration.

Minimal complete definition

splitAfterDuration

Methods

splitAfterDuration :: HasStaticDuration d => proxy d -> a -> Maybe (Segment d a, a) Source #

Try to split the packet into the a part which has at most the given duration and a rest. If not possible, e.g. because the input data is already shorter than the given duration, return Nothing.

newtype Segment duration c Source #

A segment is some content with a fixed (type level) duration.

Constructors

MkSegment c 

Instances

HasDebugPlaybackSink s t c => HasDebugPlaybackSink s t (Segment d c) Source # 

Methods

debugPlaybackSink :: MonadIO m => Sink (Frame s t (Segment d c)) m () Source #

Functor (Segment duration) Source # 

Methods

fmap :: (a -> b) -> Segment duration a -> Segment duration b #

(<$) :: a -> Segment duration b -> Segment duration a #

KnownStaticTicks d => HasStaticDuration * (Segment d x) Source # 

Associated Types

type SetStaticDuration k' (Segment d x) (s :: Segment d x) (pt :: StaticTicks) :: k' Source #

type GetStaticDuration (Segment d x) (s :: Segment d x) :: StaticTicks Source #

Eq c => Eq (Segment duration c) Source # 

Methods

(==) :: Segment duration c -> Segment duration c -> Bool #

(/=) :: Segment duration c -> Segment duration c -> Bool #

(HasStaticDuration StaticTicks d, Show c) => Show (Segment d c) Source # 

Methods

showsPrec :: Int -> Segment d c -> ShowS #

show :: Segment d c -> String #

showList :: [Segment d c] -> ShowS #

Arbitrary c => Arbitrary (Segment duration c) Source # 

Methods

arbitrary :: Gen (Segment duration c) #

shrink :: Segment duration c -> [Segment duration c] #

Default c => Default (Segment duration c) Source # 

Methods

def :: Segment duration c #

NFData c => NFData (Segment duration c) Source # 

Methods

rnf :: Segment duration c -> () #

HasStaticDuration StaticTicks d => HasDuration (Segment d x) Source # 
(HasStaticDuration StaticTicks d, CanGenerateBlankMedia a) => CanBeBlank (Segment d a) Source # 

Methods

blank :: Segment d a Source #

type SetStaticDuration * * (Segment d x) pt Source # 
type SetStaticDuration * * (Segment d x) pt = Segment pt x
type GetStaticDuration * (Segment d x) Source # 
type GetStaticDuration * (Segment d x) = d

segmentContent :: forall duration c duration c. Iso (Segment duration c) (Segment duration c) c c Source #