pub struct ChunkRequest {
pub start: StreamInstant,
pub pps: u32,
pub target_points: usize,
}Expand description
A request to fill a buffer with points for streaming.
The callback receives a ChunkRequest describing the next chunk’s timing
requirements and fills points into a library-owned buffer.
target_points is the ideal number of points to reach the target buffer
level, clamped to the provided buffer length. Returning fewer points
triggers the configured IdlePolicy for the
remainder.
Fields§
§start: StreamInstantEstimated playback time when this chunk starts.
Use this for audio synchronization.
pps: u32Points per second (current value, may change via StreamControl::set_pps).
target_points: usizeIdeal number of points to reach target buffer level.
Calculated as: ceil((target_buffer - buffered) * pps), clamped to buffer length.
Trait Implementations§
Source§impl Clone for ChunkRequest
impl Clone for ChunkRequest
Source§fn clone(&self) -> ChunkRequest
fn clone(&self) -> ChunkRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChunkRequest
impl RefUnwindSafe for ChunkRequest
impl Send for ChunkRequest
impl Sync for ChunkRequest
impl Unpin for ChunkRequest
impl UnsafeUnpin for ChunkRequest
impl UnwindSafe for ChunkRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more