Enum cros_codecs::utils::vaapi::StreamMetadataState
source · [−]pub(crate) enum StreamMetadataState {
Unparsed {
display: Rc<Display>,
},
Parsed(ParsedStreamMetadata),
}
Expand description
State of the input stream, which can be either unparsed (we don’t know the stream properties yet) or parsed (we know the stream properties and are ready to decode).
Variants
Unparsed
Fields
display: Rc<Display>
The metadata for the current stream has not yet been parsed.
Parsed(ParsedStreamMetadata)
The metadata for the current stream has been parsed and a suitable VAContext has been created to accomodate it.
Implementations
sourceimpl StreamMetadataState
impl StreamMetadataState
pub(crate) fn display(&self) -> Rc<Display>
sourcepub(crate) fn get_parsed(&self) -> Result<&ParsedStreamMetadata>
pub(crate) fn get_parsed(&self) -> Result<&ParsedStreamMetadata>
Returns a reference to the parsed metadata state or an error if we haven’t reached that state yet.
sourcepub(crate) fn get_parsed_mut(&mut self) -> Result<&mut ParsedStreamMetadata>
pub(crate) fn get_parsed_mut(&mut self) -> Result<&mut ParsedStreamMetadata>
Returns a mutable reference to the parsed metadata state or an error if we haven’t reached that state yet.
sourcepub(crate) fn supported_formats_for_stream(
&self
) -> Result<HashSet<DecodedFormat>>
pub(crate) fn supported_formats_for_stream(
&self
) -> Result<HashSet<DecodedFormat>>
Gets a set of supported formats for the particular stream being processed. This requires that some buffers be processed before this call is made. Only formats that are compatible with the current color space, bit depth, and chroma format are returned such that no conversion is needed.