#[non_exhaustive]pub enum VideoCodecPreference {
Automatic,
PreferH264,
PreferVp8,
}Expand description
Which codec this device’s camera and screen publish in. A per-device user setting; the
default is VideoCodecPreference::Automatic.
Its JSON is "automatic", "prefer_h264" or "prefer_vp8".
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Automatic
H.264 where this device’s OS has a usable hardware H.264 encoder (found at run time), else VP8. An H.264 publication always carries a VP8 backup for subscribers that can’t decode H.264.
PreferH264
H.264 when the run-time detection passes, as Automatic; otherwise VP8, and the
readback says why (CodecPreferenceReason).
PreferVp8
VP8 always. This device also stops offering to receive H.264 (from its next join), so every sender reaches it in VP8.
Implementations§
Source§impl VideoCodecPreference
impl VideoCodecPreference
Sourcepub fn from_name(name: &str) -> Option<VideoCodecPreference>
pub fn from_name(name: &str) -> Option<VideoCodecPreference>
The setting of a name VideoCodecPreference::as_str gives; None for any other.
Trait Implementations§
Source§impl Clone for VideoCodecPreference
impl Clone for VideoCodecPreference
impl Copy for VideoCodecPreference
Source§impl Debug for VideoCodecPreference
impl Debug for VideoCodecPreference
Source§impl Default for VideoCodecPreference
impl Default for VideoCodecPreference
Source§impl<'de> Deserialize<'de> for VideoCodecPreference
impl<'de> Deserialize<'de> for VideoCodecPreference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for VideoCodecPreference
Source§impl Hash for VideoCodecPreference
impl Hash for VideoCodecPreference
Source§impl PartialEq for VideoCodecPreference
impl PartialEq for VideoCodecPreference
Source§impl Serialize for VideoCodecPreference
impl Serialize for VideoCodecPreference
impl StructuralPartialEq for VideoCodecPreference
Auto Trait Implementations§
impl Forget for VideoCodecPreference
impl Freeze for VideoCodecPreference
impl Move for VideoCodecPreference
impl RefUnwindSafe for VideoCodecPreference
impl Send for VideoCodecPreference
impl Sync for VideoCodecPreference
impl Unpin for VideoCodecPreference
impl UnsafeUnpin for VideoCodecPreference
impl UnwindSafe for VideoCodecPreference
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<T> CryptoSafe for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more