Interface IEncoder
Defines the contract for a media encoder that converts uncompressed media samples to compressed format.
public interface IEncoder : IDisposable
- Inherited Members
Properties
IsUsable
Gets a value indicating whether the encoder is usable and properly initialized.
bool IsUsable { get; }
Property Value
OutputMediaType
Gets the output media type describing the encoded format.
MediaType OutputMediaType { get; }
Property Value
PlatformContext
Gets or sets the platform-specific encoder context.
object PlatformContext { get; set; }
Property Value
Methods
Drain()
Drains any remaining samples from the encoder's internal buffers.
void Drain()
Read()
Reads an encoded sample from the encoder.
VersatileBuffer Read()
Returns
- VersatileBuffer
The encoded sample, or null if no sample is available.
Write(VersatileBuffer)
Writes an uncompressed media sample to the encoder for processing.
void Write(VersatileBuffer packet)
Parameters
packetVersatileBufferThe uncompressed media sample to encode.