mediabus-0.4.0.0: Multimedia streaming on top of Conduit

Safe HaskellNone
LanguageHaskell2010

Data.MediaBus.Media.Samples

Description

Media represented by samples in the time domain. What is meant by media sample? For example the microphone value captured at a certain point in time for mono audio, or the pair of values from the left and right channel of a stereo audio track, or a pixel; the common characteristic is that a sample encompasses the (aggregate) value representing smallest piece of media. A sample may be composed of components, like in a stereo audio sample, or color channels in an YUV pixel, but since they are played/recorded at the same time instances, they form a sample only when combined not when regarded indivudually.

Synopsis

Documentation

class (IsMedia i, HasRate i) => IsSampledMedia i Source #

Types that are IsMedia instances with sampled content.

type CanBeSample i = (Typeable i, Eq i, NFData i, Storable i) Source #

Always recurring contraints on Sample types.

class (CanBeSample (SamplesFrom s), CanBeSample (SamplesTo t)) => EachSample s t where Source #

A type class for types that contain samples which can be converted into other sample types.

Minimal complete definition

eachSample

Associated Types

type SamplesFrom s Source #

The type of the contained media samples passed as input by eachSample.

type SamplesTo t Source #

The type of the contained media samples from the output of eachSample.

Instances

EachSample a b => EachSample (Discontinous a) (Discontinous b) Source # 
EachSample c c' => EachSample (Segment d c) (Segment d c') Source # 

Associated Types

type SamplesFrom (Segment d c) :: * Source #

type SamplesTo (Segment d c') :: * Source #

(CanBeSample (Pcm c t), CanBeSample (Pcm c' t')) => EachSample (Audio r c (Raw * t)) (Audio r' c' (Raw * t')) Source # 

Associated Types

type SamplesFrom (Audio r c (Raw * t)) :: * Source #

type SamplesTo (Audio r' c' (Raw * t')) :: * Source #

Methods

eachSample :: Traversal (Audio r c (Raw * t)) (Audio r' c' (Raw * t')) (SamplesFrom (Audio r c (Raw * t))) (SamplesTo (Audio r' c' (Raw * t'))) Source #

type EachSampleL s t a b = (EachSample s t, SamplesFrom s ~ a, SamplesTo t ~ b) Source #

A lens-stype type alias for EachSample with the full s t a b parameter set.

type EachSampleL' s a = (EachSample s s, SamplesFrom s ~ a, SamplesTo s ~ a) Source #

A lens-stype type alias for EachSample for cases where SamplesFrom ~ SamplesTo with the full s a parameter set.

type EachSample' s = (EachSample s s, SamplesFrom s ~ SamplesTo s) Source #

A lens-stype type alias for EachSample for cases where SamplesFrom ~ SamplesTo