pub struct ContentEncoding {
pub crc32: Option<Crc32>,
pub void: Option<Void>,
pub content_encoding_order: ContentEncodingOrder,
pub content_encoding_scope: ContentEncodingScope,
pub content_encoding_type: ContentEncodingType,
pub content_compression: Option<ContentCompression>,
pub content_encryption: Option<ContentEncryption>,
}Expand description
Settings for one content encoding like compression or encryption.
Fields§
§crc32: Option<Crc32>Optional CRC-32 element for integrity checking.
void: Option<Void>void element, useful for reserving space during writing.
content_encoding_order: ContentEncodingOrderTell in which order to apply each ContentEncoding of the ContentEncodings. The decoder/demuxer MUST start with the ContentEncoding with the highest ContentEncodingOrder and work its way down to the ContentEncoding with the lowest ContentEncodingOrder. This value MUST be unique over for each ContentEncoding found in the ContentEncodings of this TrackEntry.
content_encoding_scope: ContentEncodingScopeA bit field that describes which Elements have been modified in this way. Values (big-endian) can be OR’ed.
- 1 - Block,
- 2 - Private,
- 4 - Next
content_encoding_type: ContentEncodingTypeA value describing what kind of transformation is applied.
- 0 - Compression,
- 1 - Encryption
content_compression: Option<ContentCompression>Settings describing the compression used. This Element MUST be present if the value of ContentEncodingType is 0 and absent otherwise. Each block MUST be decompressable even if no previous block is available in order not to prevent seeking.
content_encryption: Option<ContentEncryption>Settings describing the encryption used. This Element MUST be present if the value of ContentEncodingType is 1 (encryption) and MUST be ignored otherwise. A Matroska Player MAY support encryption.
Trait Implementations§
Source§impl Clone for ContentEncoding
impl Clone for ContentEncoding
Source§fn clone(&self) -> ContentEncoding
fn clone(&self) -> ContentEncoding
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContentEncoding
impl Debug for ContentEncoding
Source§impl Default for ContentEncoding
impl Default for ContentEncoding
Source§fn default() -> ContentEncoding
fn default() -> ContentEncoding
Source§impl Element for ContentEncoding
impl Element for ContentEncoding
Source§fn decode_body(buf: &mut &[u8]) -> Result<Self>
fn decode_body(buf: &mut &[u8]) -> Result<Self>
Source§fn encode_body<B: BufMut>(&self, buf: &mut B) -> Result<()>
fn encode_body<B: BufMut>(&self, buf: &mut B) -> Result<()>
Source§const HAS_DEFAULT_VALUE: bool = false
const HAS_DEFAULT_VALUE: bool = false
Source§impl PartialEq for ContentEncoding
impl PartialEq for ContentEncoding
impl Eq for ContentEncoding
impl StructuralPartialEq for ContentEncoding
Auto Trait Implementations§
impl Freeze for ContentEncoding
impl RefUnwindSafe for ContentEncoding
impl Send for ContentEncoding
impl Sync for ContentEncoding
impl Unpin for ContentEncoding
impl UnwindSafe for ContentEncoding
Blanket Implementations§
Source§impl<T> AsyncReadElement for Twhere
T: Element,
impl<T> AsyncReadElement for Twhere
T: Element,
Source§impl<T> AsyncReadFrom for Twhere
T: Element,
impl<T> AsyncReadFrom for Twhere
T: Element,
Source§impl<T> AsyncWriteTo for Twhere
T: Encode,
impl<T> AsyncWriteTo for Twhere
T: Encode,
Source§async fn async_write_to<W>(&self, w: &mut W) -> Result<(), Error>where
W: AsyncWrite + Unpin,
async fn async_write_to<W>(&self, w: &mut W) -> Result<(), Error>where
W: AsyncWrite + Unpin,
tokio only.