pub struct Release { /* private fields */ }Expand description
Writes the multiplex a broadcast’s passthrough track carries back out byte-identical, each packet a fixed delay after its time on the source’s PCR, like an SRT receiver.
The importer stamps each object, the packets from one PCR to the next, with the PCR time of its first byte on the catalog clock. The release holds every object until that time plus the delay on the jitter buffer’s clock, which follows the source’s, then spreads its packets evenly up to the next object’s time, seven at a time (a UDP datagram’s worth), so the output keeps the source’s rate whatever the arrival jitter. An object whose successor is not yet buffered when it comes due, follows a loss, or is more than ISO 13818-1’s 100 ms PCR interval ahead, goes out whole, as does every object under no delay. Two releases that each receive every object before its deadline write the same bytes; where each held an object’s successor when it came due, at the same times too, so a delay longer than the arrival jitter by a PCR interval keeps them in step. An object that arrives past its deadline is dropped and counted; the output shows a continuity error there, since nothing is rewritten, and carries on with the next object. A PCR clock break, which the importer declares with a discontinuity marker, opens a new clock, so the output does not wait out a jump; the bytes carry the break as the source sent it.
A Follower carries it across its broadcast’s returns and, when
stitching, onto another publisher identity, whose track it reads from the first group its
live subscription delivers, after what was already buffered has gone out. Its packets follow
verbatim, so the output shows the seam as each PID’s continuity break, as the source would
show a splice, and they go out on a clock of their own, as after an encoder changeover.
Implementations§
Source§impl Release
impl Release
Sourcepub async fn new(
source: Source,
catalog_format: CatalogFormat,
delay: Duration,
) -> Result<Self>
pub async fn new( source: Source, catalog_format: CatalogFormat, delay: Duration, ) -> Result<Self>
Subscribe to the catalog of source, in either format, waiting for the mpegts section to
name its passthrough track.
Each object is written delay after its PCR time; late objects are dropped.
Sourcepub fn drift(&self) -> Option<f64>
pub fn drift(&self) -> Option<f64>
The source’s clock rate off ours, as last measured, as a fraction: positive runs fast.
Sourcepub fn out_of_tolerance(&self) -> u64
pub fn out_of_tolerance(&self) -> u64
How many times the source’s clock was measured further off ours than the release follows.