MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / getChannelLayout

Function getChannelLayout

src/misc.ts:146–155  ·  view source on GitHub ↗
(numChannels: number)

Source from the content-addressed store, hash-verified

144};
145
146export const getChannelLayout = (numChannels: number) => {
147 switch (numChannels) {
148 case 1: return AV_CHANNEL_LAYOUT_MONO;
149 case 2: return AV_CHANNEL_LAYOUT_STEREO;
150 case 4: return AV_CHANNEL_LAYOUT_QUAD;
151 case 6: return AV_CHANNEL_LAYOUT_5POINT1;
152 case 8: return AV_CHANNEL_LAYOUT_7POINT1;
153 default: return { nbChannels: numChannels, order: 0, mask: 0n };
154 }
155};
156
157export const mapColorPrimaries = (primaries: string) => {
158 switch (primaries) {

Callers 3

createCodecContextMethod · 0.85
createCodecContextMethod · 0.85
encodeInternalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected