Safe Haskell | None |
---|---|
Language | Haskell2010 |
Naturally ordered Stream
s.
A Stream
without sequence numbers and timestamps has no means to represent
Frame
s that have varying sequence numbers or timestamps, hence they cannot
be part of a stream that is not perfectly synchronized, therefore when consuming
such Stream
values, the corresponding callers must work under the assumption
that the frames are perfectly synchronous.
- type SyncStream i p c = Stream i () () p c
- assumeSynchronized :: Stream i s t p c -> SyncStream i p c
- setSequenceNumbersAndTimestamps :: (Num s, CanBeTicks r t, HasDuration c) => SyncStream i p c -> (s, Ticks r t) -> (Stream i s (Ticks r t) p c, (s, Ticks r t))
Documentation
type SyncStream i p c = Stream i () () p c Source #
A Stream
without a meaningful sequence number or timestamp.
assumeSynchronized :: Stream i s t p c -> SyncStream i p c Source #
Convert a Stream
to a SyncStream
by simply forgetting the sequence
numbers and timestamps of the input. This expresses the assumption that the
Frame
s are either perfectly lined sequential or that this doesn't matter
at all.
setSequenceNumbersAndTimestamps :: (Num s, CanBeTicks r t, HasDuration c) => SyncStream i p c -> (s, Ticks r t) -> (Stream i s (Ticks r t) p c, (s, Ticks r t)) Source #