pub struct StreamEntry {
pub gop_buffer: GopBuffer,
pub video_header: Option<BroadcastFrame>,
pub audio_header: Option<BroadcastFrame>,
pub metadata: Option<BroadcastFrame>,
pub publisher_id: Option<u64>,
pub subscriber_count: AtomicU32,
pub publisher_disconnected_at: Option<Instant>,
pub created_at: Instant,
pub state: StreamState,
/* private fields */
}Expand description
Entry for a single stream in the registry
Fields§
§gop_buffer: GopBufferGOP buffer for late-joiner support
video_header: Option<BroadcastFrame>Cached video sequence header for fast subscriber catchup
audio_header: Option<BroadcastFrame>Cached audio sequence header for fast subscriber catchup
metadata: Option<BroadcastFrame>Cached metadata
publisher_id: Option<u64>Current publisher’s session ID (None if no publisher)
subscriber_count: AtomicU32Number of active subscribers
publisher_disconnected_at: Option<Instant>When the publisher disconnected (for grace period tracking)
created_at: InstantWhen the stream was created
state: StreamStateCurrent stream state
Implementations§
Source§impl StreamEntry
impl StreamEntry
Sourcepub fn subscriber_count(&self) -> u32
pub fn subscriber_count(&self) -> u32
Get the number of subscribers
Sourcepub fn has_publisher(&self) -> bool
pub fn has_publisher(&self) -> bool
Check if the stream has an active publisher
Sourcepub fn get_catchup_frames(&self) -> Vec<BroadcastFrame>
pub fn get_catchup_frames(&self) -> Vec<BroadcastFrame>
Get catchup frames for a new subscriber
Returns sequence headers followed by GOP buffer contents.
Auto Trait Implementations§
impl !Freeze for StreamEntry
impl !RefUnwindSafe for StreamEntry
impl Send for StreamEntry
impl Sync for StreamEntry
impl Unpin for StreamEntry
impl !UnwindSafe for StreamEntry
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