| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.MediaBus.Conduit.Async
Description
- withAsyncPolledSource :: (MonadResource m, MonadBaseControl IO m, KnownRate r, Integral t, Integral s, Default p, HasStaticDuration c, HasDuration c, NFData c, NFData p, NFData s, NFData t, Random i, Random t, Random s, Show c) => Int -> Source m (Stream i s (Ticks r t) p c) -> ((Async (), Source m (Stream i s (Ticks r t) p (Discontinous c))) -> m o) -> m o
- data FrameContentQ a
- mkFrameContentQ :: forall m a. (HasStaticDuration a, MonadBaseControl IO m) => Int -> m (FrameContentQ a)
- frameContentQSink :: (NFData a, MonadBaseControl IO m, Show a) => FrameContentQ a -> Sink (Stream i s t p a) m ()
- frameContentQSource :: (Random i, NFData c, NFData p, Default p, HasStaticDuration c, HasDuration c, MonadBaseControl IO m, KnownRate r, Integral t, Integral s, NFData t, NFData s) => FrameContentQ c -> Source m (Stream i s (Ticks r t) p (Discontinous c))
Documentation
withAsyncPolledSource :: (MonadResource m, MonadBaseControl IO m, KnownRate r, Integral t, Integral s, Default p, HasStaticDuration c, HasDuration c, NFData c, NFData p, NFData s, NFData t, Random i, Random t, Random s, Show c) => Int -> Source m (Stream i s (Ticks r t) p c) -> ((Async (), Source m (Stream i s (Ticks r t) p (Discontinous c))) -> m o) -> m o Source #
Asynchronously run a Source connected to a FrameContentQ and create a
new source that consumes the queue by polling periodically from that queue,
generating a Discontinous output.
data FrameContentQ a Source #
mkFrameContentQ :: forall m a. (HasStaticDuration a, MonadBaseControl IO m) => Int -> m (FrameContentQ a) Source #
Create a new FrameContentQ with an upper bound on the queue length.
frameContentQSink :: (NFData a, MonadBaseControl IO m, Show a) => FrameContentQ a -> Sink (Stream i s t p a) m () Source #
Consume the frameContents of a Stream and write them into a
FrameContentQ. When the queue is full, **drop the oldest element** and push
in the new element, anyway.
frameContentQSource :: (Random i, NFData c, NFData p, Default p, HasStaticDuration c, HasDuration c, MonadBaseControl IO m, KnownRate r, Integral t, Integral s, NFData t, NFData s) => FrameContentQ c -> Source m (Stream i s (Ticks r t) p (Discontinous c)) Source #
Periodically poll a FrameContentQ and yield the content as frames with
newly generated timestamp and sequence number values.