Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const enableDeinterlace = true;
const platformIndex = 1;
const deviceIndex = 0;
const context = new addon.clContext({
platformIndex: platformIndex,
deviceIndex: deviceIndex,
overlapping: true
});
const platformInfo = await context.getPlatformInfo();
console.log(platformInfo.vendor, platformInfo.devices[deviceIndex].type);
let demuxer = await beamcoder.demuxer('../../media/dpp/AS11_DPP_HD_EXAMPLE_1.mxf');
await demuxer.seek({ time: 40 });
const stream = demuxer.streams[0];
let decoder = beamcoder.decoder({ name: stream.codecpar.name });
let filterer = await beamcoder.filterer({
filterType: 'video',
inputParams: [{
width: stream.codecpar.width,
height: stream.codecpar.height,
pixelFormat: stream.codecpar.format,
timeBase: stream.time_base,
pixelAspect: stream.codecpar.sample_aspect_ratio
}],
outputParams: [{
pixelFormat: stream.codecpar.format
}],
filterSpec: 'yadif=mode=1:parity=-1:deint=0'
})
const bgColSpecRead = '709';
const ovColSpecRead = 'sRGB';