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

Function generateAvcCodecString

src/codec_data.ts:269–277  ·  view source on GitHub ↗
(record: AvcDecoderConfigurationRecord)

Source from the content-addressed store, hash-verified

267};
268
269export const generateAvcCodecString = (record: AvcDecoderConfigurationRecord) => {
270 const bytes = new Uint8Array([
271 record.avcProfileIndication,
272 record.profileCompatibility,
273 record.avcLevelIndication,
274 ]);
275
276 return `avc1.${bytesToHexString(bytes)}`;
277};
278
279/** Serializes an AvcDecoderConfigurationRecord into the format specified in Section 5.3.3.1 of ISO 14496-15. */
280export const serializeAvcDecoderConfigurationRecord = (record: AvcDecoderConfigurationRecord) => {

Callers 1

outputChunkMethod · 0.85

Calls 1

bytesToHexStringFunction · 0.85

Tested by

no test coverage detected