Class VideoDecoder
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The VideoDecoder interface of the 'WebCodecs API' decodes chunks of video.
[Value("VideoDecoder")]
public class VideoDecoder : EventTarget
- Inheritance
-
VideoDecoder
- Inherited Members
Remarks
Constructors
VideoDecoder()
public VideoDecoder()
VideoDecoder(VideoDecoderInit)
The VideoDecoder() constructor creates a new VideoDecoder object with the provided init.output callback assigned as the output callback, the provided init.error callback as the error callback, and the State set to "unconfigured".
public VideoDecoder(VideoDecoderInit init)
Parameters
initVideoDecoderInit
Remarks
Properties
DecodeQueueSize
The decodeQueueSize read-only property of the VideoDecoder interface returns the number of pending decode requests in the queue.
[Value("decodeQueueSize")]
public ulong DecodeQueueSize { get; }
Property Value
- ulong
An integer containing the number of requests.
Remarks
Ondequeue
[Value("ondequeue")]
public EventHandlerNonNull Ondequeue { get; set; }
Property Value
State
The state property of the VideoDecoder interface returns the current state of the underlying codec.
[Value("state")]
public CodecState State { get; }
Property Value
- CodecState
A string containing one of the following values:
Remarks
Methods
Close()
The close() method of the VideoDecoder interface ends all pending work and releases system resources.
[Value("close")]
public GlobalObject.Undefined Close()
Returns
Remarks
Configure(VideoDecoderConfig)
The configure() method of the VideoDecoder interface enqueues a control message to configure the video decoder for decoding chunks.
[Value("configure")]
public GlobalObject.Undefined Configure(VideoDecoderConfig config)
Parameters
configVideoDecoderConfig
Returns
Remarks
Decode(EncodedVideoChunk)
The decode() method of the VideoDecoder interface enqueues a control message to decode a given chunk of video.
[Value("decode")]
public GlobalObject.Undefined Decode(EncodedVideoChunk chunk)
Parameters
chunkEncodedVideoChunk
Returns
Remarks
Flush()
The flush() method of the VideoDecoder interface returns a Promise that resolves once all pending messages in the queue have been completed.
[Value("flush")]
public Task<GlobalObject.Undefined> Flush()
Returns
- Task<GlobalObject.Undefined>
A Promise that resolves with undefined.
Remarks
IsConfigSupported(VideoDecoderConfig)
The isConfigSupported() static method of the VideoDecoder interface checks if the given config is supported (that is, if VideoDecoder objects can be successfully configured with the given config).
[Value("isConfigSupported")]
public static Task<VideoDecoderSupport> IsConfigSupported(VideoDecoderConfig config)
Parameters
configVideoDecoderConfig
Returns
- Task<VideoDecoderSupport>
A Promise that resolves with an object containing the following members:
Remarks
Reset()
The reset() method of the VideoDecoder interface resets all states including configuration, control messages in the control message queue, and all pending callbacks.
[Value("reset")]
public GlobalObject.Undefined Reset()