mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Bump node-av to ^5.2.4
This commit is contained in:
@@ -237,6 +237,3 @@ export const getChannelLayout = (numChannels: number): NodeAv.ChannelLayout => {
|
||||
default: return { nbChannels: numChannels, order: NodeAv.AV_CHANNEL_ORDER_UNSPEC, mask: 0n };
|
||||
}
|
||||
};
|
||||
|
||||
// The value is incorrect in the node-av source code, so we do:
|
||||
export const LIBVPX_VP9 = 'libvpx-vp9' as (NodeAv.FFEncoderCodec & NodeAv.FFDecoderCodec);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { CustomVideoDecoder, VideoCodec, EncodedPacket, VideoSample, type MaybePromise, Rational } from 'mediabunny';
|
||||
import * as NodeAv from 'node-av';
|
||||
import { CODEC_TO_CODEC_ID, getHardwareDecoderCodec, LIBVPX_VP9 } from './misc';
|
||||
import { CODEC_TO_CODEC_ID, getHardwareDecoderCodec } from './misc';
|
||||
import { assert, binarySearchLessOrEqual, simplifyRational, toUint8Array } from '../../../src/misc';
|
||||
import { AvFrameVideoSampleResource } from './video-sample';
|
||||
|
||||
@@ -47,7 +47,7 @@ export class NodeAvVideoDecoder extends CustomVideoDecoder {
|
||||
|
||||
let codec: NodeAv.Codec | null;
|
||||
if (this.codec === 'vp9' && packet.sideData.alpha) {
|
||||
codec = NodeAv.Codec.findDecoderByName(LIBVPX_VP9) ?? NodeAv.Codec.findDecoder(codecId);
|
||||
codec = NodeAv.Codec.findDecoderByName(NodeAv.FF_DECODER_LIBVPX_VP9) ?? NodeAv.Codec.findDecoder(codecId);
|
||||
} else if (
|
||||
// This check used to be "is not prefer-hardware", meaning it would default to using software decode. I
|
||||
// didn't leave a comment for that back then so I actually don't know what it was for. I'm sure it was to
|
||||
|
||||
@@ -19,7 +19,6 @@ import * as NodeAv from 'node-av';
|
||||
import {
|
||||
CODEC_TO_CODEC_ID,
|
||||
getHardwareEncoderCodec,
|
||||
LIBVPX_VP9,
|
||||
unmapColorPrimaries,
|
||||
unmapMatrixCoefficients,
|
||||
unmapTransferCharacteristics,
|
||||
@@ -81,7 +80,7 @@ export class NodeAvVideoEncoder extends CustomVideoEncoder {
|
||||
|
||||
let codec: NodeAv.Codec | null = null;
|
||||
if (this.codec === 'vp9' && this.config.alpha === 'keep') {
|
||||
codec = NodeAv.Codec.findEncoderByName(LIBVPX_VP9) ?? NodeAv.Codec.findEncoder(codecId);
|
||||
codec = NodeAv.Codec.findEncoderByName(NodeAv.FF_ENCODER_LIBVPX_VP9) ?? NodeAv.Codec.findEncoder(codecId);
|
||||
} else if (this.config.hardwareAcceleration === 'prefer-software') {
|
||||
codec = NodeAv.Codec.findEncoder(codecId);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user