mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 05:13:50 +02:00
Implement @mediabunny/prores extension, add onError callbacks to custom coders, fix visibleRect bug in VideoSample
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
PCM_AUDIO_CODECS,
|
||||
PcmAudioCodec,
|
||||
PRORES_FOURCCS,
|
||||
ProresFourCc,
|
||||
VideoCodec,
|
||||
} from '../codec';
|
||||
import {
|
||||
@@ -148,7 +149,7 @@ type InternalTrack = {
|
||||
hevcCodecInfo: HevcDecoderConfigurationRecord | null;
|
||||
vp9CodecInfo: Vp9CodecInfo | null;
|
||||
av1CodecInfo: Av1CodecInfo | null;
|
||||
proresFormat: string | null;
|
||||
proresFormat: ProresFourCc | null;
|
||||
};
|
||||
} | {
|
||||
info: {
|
||||
@@ -1096,9 +1097,9 @@ export class IsobmffDemuxer extends Demuxer {
|
||||
track.info.codec = 'vp9';
|
||||
} else if (codecName === 'av01') {
|
||||
track.info.codec = 'av1';
|
||||
} else if (PRORES_FOURCCS.includes(lowercaseBoxName)) {
|
||||
} else if ((PRORES_FOURCCS as readonly string[]).includes(lowercaseBoxName)) {
|
||||
track.info.codec = 'prores';
|
||||
track.info.proresFormat = lowercaseBoxName;
|
||||
track.info.proresFormat = lowercaseBoxName as ProresFourCc;
|
||||
} else if (codecName === null) {
|
||||
Logging._warn(`Unknown encrypted video codec due to missing frma box.`);
|
||||
} else {
|
||||
@@ -3347,7 +3348,10 @@ class IsobmffVideoTrackBacking extends IsobmffTrackBacking implements InputVideo
|
||||
}
|
||||
|
||||
async canBeTransparent() {
|
||||
return false;
|
||||
return this.internalTrack.info.codec === 'prores' && (
|
||||
this.internalTrack.info.proresFormat === 'ap4h'
|
||||
|| this.internalTrack.info.proresFormat === 'ap4x'
|
||||
);
|
||||
}
|
||||
|
||||
async getDecoderConfig(): Promise<VideoDecoderConfig | null> {
|
||||
|
||||
Reference in New Issue
Block a user