mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 11:23:45 +02:00
Add toAvFrame, NodeAv* -> Av*, add server README, fix track synchronizer in conversion, increase default cache size for ReadableStreamSource
This commit is contained in:
+6
-4
@@ -24,7 +24,7 @@ import {
|
||||
import { customAudioEncoders, customVideoEncoders } from './custom-coder';
|
||||
import { isFirefox, MaybePromise, Rotation } from './misc';
|
||||
import { EncodedPacket } from './packet';
|
||||
import { AudioSample, CropRectangle, validateCropRectangle, VideoSample } from './sample';
|
||||
import { AudioSample, CropRectangle, validateCropRectangle, VideoSample, VideoSampleResource } from './sample';
|
||||
|
||||
export const canEncodeVideoMemo = new Map<string, Promise<boolean>>();
|
||||
export const canEncodeAudioMemo = new Map<string, Promise<boolean>>();
|
||||
@@ -126,11 +126,13 @@ export type VideoTransformOptions = {
|
||||
* or timestamp modifications. Will be called for each video frame after transformations and frame rate
|
||||
* corrections.
|
||||
*
|
||||
* Must return a {@link VideoSample} or a `CanvasImageSource`, an array of them, or `null` for dropping the
|
||||
* frame. When non-timestamped data is returned, the timestamp and duration from the input sample will be used.
|
||||
* Must return a {@link VideoSample}, a {@link VideoSampleResource} or a `CanvasImageSource`, an array of them, or
|
||||
* `null` for dropping the frame. When non-timestamped data is returned, the timestamp and duration from the input
|
||||
* sample will be used.
|
||||
*/
|
||||
process?: (sample: VideoSample) => MaybePromise<
|
||||
CanvasImageSource | VideoSample | (CanvasImageSource | VideoSample)[] | null
|
||||
CanvasImageSource | VideoSample | VideoSampleResource
|
||||
| (CanvasImageSource | VideoSample | VideoSampleResource)[] | null
|
||||
>;
|
||||
/**
|
||||
* Forces every video frame through the transformation step even if no transformation properties are defined.
|
||||
|
||||
Reference in New Issue
Block a user