MediaVideoEncoder Class
A video encoder created by MediaCodecBackend.CreateVideoEncoder.
public abstract class MediaVideoEncoder : MediaCodecImplementation- Inheritance
MediaCodecImplementationMediaVideoEncoder
Constructors
| Name | Description |
|---|---|
| MediaVideoEncoder() |
MediaVideoEncoder()
protected MediaVideoEncoder()No documentation is available.
Methods
| Name | Description |
|---|---|
| Encode(VideoFrame, VideoEncoderEncodeOptions) | Encodes a frame and returns the chunks that are ready (possibly none). The library closes the frame afterwards. |
| Flush() | Encodes the pending frames and returns the remaining chunks (flush()). The default implementation returns none. |
Encode(VideoFrame, VideoEncoderEncodeOptions)
Encodes a frame and returns the chunks that are ready (possibly none). The library closes the frame afterwards.
public abstract IReadOnlyList<MediaEncodedVideo> Encode(VideoFrame frame, VideoEncoderEncodeOptions options)Parameters
frameVideoFrame- The frame (a clone of the frame given to
encode()). optionsVideoEncoderEncodeOptions- The options of the encoding of the frame (e.g. a key frame is requested).
Returns
Flush()
MediaCodecBackend.csEncodes the pending frames and returns the remaining chunks (flush()). The default implementation returns none.
public virtual IReadOnlyList<MediaEncodedVideo> Flush()