* Creates a new VideoDecoder.
(init: VideoDecoderInit)
| 75 | * Creates a new VideoDecoder. |
| 76 | */ |
| 77 | constructor(init: VideoDecoderInit) { |
| 78 | super(); |
| 79 | |
| 80 | if (!init.output || !init.error) { |
| 81 | throw new TypeError('VideoDecoderInit requires \'output\' and \'error\' callbacks.'); |
| 82 | } |
| 83 | |
| 84 | this.init = init; |
| 85 | this.frame = new Frame(); |
| 86 | this.frame.alloc(); |
| 87 | this.packet = new Packet(); |
| 88 | this.packet.alloc(); |
| 89 | } |
| 90 | |
| 91 | private static createCodecContext(config: VideoDecoderConfig) { |
| 92 | const inferred = inferCodecFromCodecString(config.codec); |
nothing calls this directly
no outgoing calls
no test coverage detected