* Creates a new VideoEncoder.
(init: VideoEncoderInit)
| 126 | * Creates a new VideoEncoder. |
| 127 | */ |
| 128 | constructor(init: VideoEncoderInit) { |
| 129 | super(); |
| 130 | |
| 131 | if (!init.output || !init.error) { |
| 132 | throw new TypeError('VideoEncoderInit requires \'output\' and \'error\' callbacks.'); |
| 133 | } |
| 134 | |
| 135 | this.init = init; |
| 136 | this.frame = new Frame(); |
| 137 | this.frame.alloc(); |
| 138 | this.packet = new Packet(); |
| 139 | this.packet.alloc(); |
| 140 | } |
| 141 | |
| 142 | private static createCodecContext(config: VideoEncoderConfig) { |
| 143 | const inferred = inferCodecFromCodecString(config.codec); |
nothing calls this directly
no outgoing calls
no test coverage detected