#[non_exhaustive]pub struct VideoEncoding {
pub renditions: Vec<VideoRendition>,
pub record_timestamps: bool,
}Expand description
How a video source is encoded: one or more renditions of the same picture.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.renditions: Vec<VideoRendition>The renditions, which a subscriber chooses among.
record_timestamps: boolWhether the broadcast records each published frame’s source timestamp and capture instant.
The broadcast moves source timestamps onto its own clock, so a
subscriber only ever sees broadcast timestamps. The record maps one
back, for
LocalBroadcast::video_source_timestamp
and
LocalBroadcast::video_captured_at:
a round-trip measurement such as capture-to-result latency. It keeps
64 bytes for each of the last 512 frames, no pixels. Off by default.
Implementations§
Source§impl VideoEncoding
impl VideoEncoding
Sourcepub fn single(rendition: VideoRendition) -> Self
pub fn single(rendition: VideoRendition) -> Self
Encodes one rendition.
Sourcepub fn ladder(renditions: impl IntoIterator<Item = VideoRendition>) -> Self
pub fn ladder(renditions: impl IntoIterator<Item = VideoRendition>) -> Self
Encodes a simulcast ladder: several renditions of the same picture.
Sourcepub fn with_recorded_timestamps(self) -> Self
pub fn with_recorded_timestamps(self) -> Self
Turns on record_timestamps.
Trait Implementations§
Source§impl Clone for VideoEncoding
impl Clone for VideoEncoding
Source§impl Debug for VideoEncoding
impl Debug for VideoEncoding
Source§impl Default for VideoEncoding
impl Default for VideoEncoding
Source§impl From<VideoEncoding> for MediaEncoding
impl From<VideoEncoding> for MediaEncoding
Source§fn from(video: VideoEncoding) -> Self
fn from(video: VideoEncoding) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VideoEncoding
impl RefUnwindSafe for VideoEncoding
impl Send for VideoEncoding
impl Sync for VideoEncoding
impl Unpin for VideoEncoding
impl UnsafeUnpin for VideoEncoding
impl UnwindSafe for VideoEncoding
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