pub struct HdrMetadata {
pub transfer_function: Option<TransferFunction>,
pub colour_primaries: Option<ColourPrimaries>,
pub mastering_display: Option<MasteringDisplay>,
pub content_light_level: Option<ContentLightLevel>,
pub dolby_vision: Option<DolbyVisionMeta>,
}Expand description
Unified HDR metadata attached to a video stream.
Carry exactly the fields present in the source; absent fields are None.
Use HdrMetadata::validate before attaching to a mux.
Fields§
§transfer_function: Option<TransferFunction>Transfer function (EOTF/OETF).
colour_primaries: Option<ColourPrimaries>Colour primaries.
mastering_display: Option<MasteringDisplay>SMPTE ST 2086 mastering display colour volume.
content_light_level: Option<ContentLightLevel>CTA-861.3 content light level (MaxCLL / MaxFALL).
dolby_vision: Option<DolbyVisionMeta>Dolby Vision metadata (if present).
Implementations§
Source§impl HdrMetadata
impl HdrMetadata
Sourcepub fn hdr10(mastering: MasteringDisplay, cll: ContentLightLevel) -> Self
pub fn hdr10(mastering: MasteringDisplay, cll: ContentLightLevel) -> Self
Creates a minimal HDR10 metadata bundle with mastering display and CLL.
Trait Implementations§
Source§impl Clone for HdrMetadata
impl Clone for HdrMetadata
Source§fn clone(&self) -> HdrMetadata
fn clone(&self) -> HdrMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HdrMetadata
impl Debug for HdrMetadata
Source§impl Default for HdrMetadata
impl Default for HdrMetadata
Source§fn default() -> HdrMetadata
fn default() -> HdrMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HdrMetadata
impl<'de> Deserialize<'de> for HdrMetadata
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
Source§impl PartialEq for HdrMetadata
impl PartialEq for HdrMetadata
Source§impl Serialize for HdrMetadata
impl Serialize for HdrMetadata
impl StructuralPartialEq for HdrMetadata
Auto Trait Implementations§
impl Freeze for HdrMetadata
impl RefUnwindSafe for HdrMetadata
impl Send for HdrMetadata
impl Sync for HdrMetadata
impl Unpin for HdrMetadata
impl UnsafeUnpin for HdrMetadata
impl UnwindSafe for HdrMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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