Struct VideoEncoding
#[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§
§impl VideoEncoding
impl VideoEncoding
pub fn single(rendition: VideoRendition) -> VideoEncoding
pub fn single(rendition: VideoRendition) -> VideoEncoding
Encodes one rendition.
pub fn ladder(
renditions: impl IntoIterator<Item = VideoRendition>,
) -> VideoEncoding
pub fn ladder( renditions: impl IntoIterator<Item = VideoRendition>, ) -> VideoEncoding
Encodes a simulcast ladder: several renditions of the same picture.
pub fn with_recorded_timestamps(self) -> VideoEncoding
pub fn with_recorded_timestamps(self) -> VideoEncoding
Turns on record_timestamps.
Trait Implementations§
§impl Clone for VideoEncoding
impl Clone for VideoEncoding
§fn clone(&self) -> VideoEncoding
fn clone(&self) -> VideoEncoding
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 more§impl Debug for VideoEncoding
impl Debug for VideoEncoding
§impl Default for VideoEncoding
impl Default for VideoEncoding
§fn default() -> VideoEncoding
fn default() -> VideoEncoding
Returns one rendition named video at the source’s size and rate.
§impl From<VideoEncoding> for MediaEncoding
impl From<VideoEncoding> for MediaEncoding
§fn from(video: VideoEncoding) -> MediaEncoding
fn from(video: VideoEncoding) -> MediaEncoding
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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