How to use the beamcoder.AV_INPUT_BUFFER_PADDING_SIZE function in beamcoder

To help you get started, we’ve selected a few beamcoder examples, based on popular ways it is used in public projects.

github Streampunk / beamengine / test / redisIOSpec.js View on Github external
test('Packet store and retrieve', async t => {
  t.ok(await beforeTest(), 'test database flushed OK.');
  let pkt = beamcoder.packet({
    pts: 42,
    dts: 43,
    data: Buffer.alloc(16383 + beamcoder.AV_INPUT_BUFFER_PADDING_SIZE),
    size: 16383,
    stream_index: 3,
    flags: { KEY: true, TRUSTED: true},
    side_data: { replaygain: Buffer.from('Zen time?') },
    duration: 44,
    pos: 45
  });
  t.deepEqual(await redisio.storeMedia('test_url', pkt), [ 'OK-crt', 'OK-crt' ],
    'redis reports store of packet and data OK.');
  let redis = await redisio.redisPool.use();
  t.ok(await redis.exists(`${config.redis.prepend}:test_url:stream_3:packet_42`),
    'packet key created.');
  t.ok(await redis.exists(`${config.redis.prepend}:test_url:stream_3:packet_42:data`),
    'data key created.');
  t.ok(await redis.ttl(`${config.redis.prepend}:test_url:stream_3:packet_42:data`) > 0,
    'data TTL is set.');
github Streampunk / beamengine / test / appSpec.js View on Github external
const sizeToBufSize = size => size + beamcoder.AV_INPUT_BUFFER_PADDING_SIZE;
github Streampunk / beamengine / test / testUtil.js View on Github external
get pkt() {
    return beamcoder.packet({
      pts: 42,
      dts: 43,
      data: Buffer.alloc(16383 + beamcoder.AV_INPUT_BUFFER_PADDING_SIZE),
      size: 16383,
      stream_index: 3,
      flags: { KEY: true, TRUSTED: true},
      side_data: { replaygain: Buffer.from('Zen time?') },
      duration: 44,
      pos: 45
    });
  },
  get frm() {

beamcoder

Node.js native bindings to FFmpeg.

GPL-3.0
Latest version published 6 months ago

Package Health Score

65 / 100
Full package analysis

Similar packages