pub struct HdrSeiInjector { /* private fields */ }Expand description
Stores SMPTE ST 2086 and CTA-861.3 SEI payloads extracted from the input stream and optionally prepends them to output packet data.
Implementations§
Source§impl HdrSeiInjector
impl HdrSeiInjector
Sourcepub fn new(config: HdrPassthroughConfig) -> Self
pub fn new(config: HdrPassthroughConfig) -> Self
Creates a new injector with the given configuration.
Sourcepub fn store_from_metadata(&mut self, meta: &HdrMetadata)
pub fn store_from_metadata(&mut self, meta: &HdrMetadata)
Store HDR metadata from the input stream for later injection into output packets.
Sourcepub fn inject_into_packet(&self, data: &[u8]) -> Vec<u8> ⓘ
pub fn inject_into_packet(&self, data: &[u8]) -> Vec<u8> ⓘ
Inject stored SEI bytes prepended to data.
When inject_sei is false or no SEI data has been stored, the
original data is returned unchanged.
Sourcepub fn resolve_output_metadata(
&self,
input: Option<&HdrMetadata>,
) -> Result<Option<HdrMetadata>>
pub fn resolve_output_metadata( &self, input: Option<&HdrMetadata>, ) -> Result<Option<HdrMetadata>>
Resolve the output HdrMetadata from the input using the configured
passthrough mode.
§Errors
Returns an error if the HDR conversion is unsupported.
Sourcepub fn has_sei_data(&self) -> bool
pub fn has_sei_data(&self) -> bool
Returns true when SEI injection is enabled and at least one payload
has been stored.
Auto Trait Implementations§
impl Freeze for HdrSeiInjector
impl RefUnwindSafe for HdrSeiInjector
impl Send for HdrSeiInjector
impl Sync for HdrSeiInjector
impl Unpin for HdrSeiInjector
impl UnsafeUnpin for HdrSeiInjector
impl UnwindSafe for HdrSeiInjector
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> 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