mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-29 03:43:50 +02:00
Implement @mediabunny/prores extension, add onError callbacks to custom coders, fix visibleRect bug in VideoSample
This commit is contained in:
@@ -27,6 +27,8 @@ export abstract class CustomVideoDecoder {
|
||||
readonly config!: VideoDecoderConfig;
|
||||
/** The callback to call when a decoded VideoSample is available. */
|
||||
readonly onSample!: (sample: VideoSample) => unknown;
|
||||
/** The callback to call to surface out-of-band errors that can't be surfaced through the main methods. */
|
||||
readonly onError!: (error: unknown) => undefined;
|
||||
|
||||
/** Returns true if and only if the decoder can decode the given codec configuration. */
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
@@ -57,6 +59,8 @@ export abstract class CustomAudioDecoder {
|
||||
readonly config!: AudioDecoderConfig;
|
||||
/** The callback to call when a decoded AudioSample is available. */
|
||||
readonly onSample!: (sample: AudioSample) => unknown;
|
||||
/** The callback to call to surface out-of-band errors that can't be surfaced through the main methods. */
|
||||
readonly onError!: (error: unknown) => undefined;
|
||||
|
||||
/** Returns true if and only if the decoder can decode the given codec configuration. */
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
@@ -87,6 +91,8 @@ export abstract class CustomVideoEncoder {
|
||||
readonly config!: VideoEncoderConfig;
|
||||
/** The callback to call when an EncodedPacket is available. */
|
||||
readonly onPacket!: (packet: EncodedPacket, meta?: EncodedVideoChunkMetadata) => unknown;
|
||||
/** The callback to call to surface out-of-band errors that can't be surfaced through the main methods. */
|
||||
readonly onError!: (error: unknown) => undefined;
|
||||
|
||||
/** Returns true if and only if the encoder can encode the given codec configuration. */
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
@@ -117,6 +123,8 @@ export abstract class CustomAudioEncoder {
|
||||
readonly config!: AudioEncoderConfig;
|
||||
/** The callback to call when an EncodedPacket is available. */
|
||||
readonly onPacket!: (packet: EncodedPacket, meta?: EncodedAudioChunkMetadata) => unknown;
|
||||
/** The callback to call to surface out-of-band errors that can't be surfaced through the main methods. */
|
||||
readonly onError!: (error: unknown) => undefined;
|
||||
|
||||
/** Returns true if and only if the encoder can encode the given codec configuration. */
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
||||
Reference in New Issue
Block a user