class BaseStream
Defined at line 26 of file ../../src/media/audio/audio_core/stream.h
Public Methods
void BaseStream (std::string_view name, Format format)
Defined at line 28 of file ../../src/media/audio/audio_core/stream.h
void ~BaseStream ()
Defined at line 29 of file ../../src/media/audio/audio_core/stream.h
std::string_view name ()
A name provided for debugging.
Defined at line 32 of file ../../src/media/audio/audio_core/stream.h
const Format & format ()
Format of data generated by this stream.
TODO(https://fxbug.dev/42136731): make sure this is accurate in all implementations.
Defined at line 36 of file ../../src/media/audio/audio_core/stream.h
Fixed FracPresentationFrameAtRefTime (zx::time ref_time)
Common shorthands to convert between PTS and frame numbers.
Defined at line 52 of file ../../src/media/audio/audio_core/stream.h
zx::time RefTimeAtFracPresentationFrame (Fixed frame)
Defined at line 56 of file ../../src/media/audio/audio_core/stream.h
zx::duration GetPresentationDelay ()
The presentation delay is defined to be the absolute difference between a frame's
presentation timestamp and the frame's safe read/write timestamp. This is always a
positive number. Ideally this should be the exact delay, if known, and otherwise a
true upper-bound of the delay, however in practice it is sometimes a best-effort
estimate that can be either low or high.
For render pipelines, this represents the delay between reading a frame with
ReadLock and actually rendering the frame at an output device. This is also known as
the "min lead time".
For capture pipelines, this represents the delay between capturing a frame at
an input device and reading that frame with ReadLock.
Defined at line 73 of file ../../src/media/audio/audio_core/stream.h
void SetPresentationDelay (zx::duration external_delay)
Presentation delays are propagated from destination streams to source streams. The
delay passed to the source stream is typically external_delay + intrinsic_delay.
The default implementation is sufficient for pipeline stages that do not introduce
extra delay.
Defined at line 79 of file ../../src/media/audio/audio_core/stream.h
TimelineFunctionSnapshot ref_time_to_frac_presentation_frame ()
This function translates from a timestamp to the corresponding fixed-point frame number that
will be presented at that time. The timestamp is relative to the stream's reference clock.
std::shared_ptr<Clock> reference_clock ()