feat(deltacast): wire source_config.port/board into capture start
Parse the recorder's SOURCE_CONFIG JSON in the bootstrap and pass the deltacast capture channel (`port`) and optional `board` into captureManager.start(), so a recorder can select which of the board's 8 channels to capture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d6e515e1a8
commit
0eac34529b
1 changed files with 9 additions and 0 deletions
|
|
@ -63,6 +63,13 @@ async function bootstrapAutoStart() {
|
||||||
const streamKey = envOpt('STREAM_KEY');
|
const streamKey = envOpt('STREAM_KEY');
|
||||||
const sourceUrl = envOpt('SOURCE_URL');
|
const sourceUrl = envOpt('SOURCE_URL');
|
||||||
const device = envInt('DEVICE_INDEX');
|
const device = envInt('DEVICE_INDEX');
|
||||||
|
// SOURCE_CONFIG is the recorder's source_config JSON (set by recorders.js).
|
||||||
|
// For deltacast it carries the capture channel (`port`) and optional `board`.
|
||||||
|
let sourceConfig = {};
|
||||||
|
try { sourceConfig = JSON.parse(process.env.SOURCE_CONFIG || '{}') || {}; }
|
||||||
|
catch (e) { console.warn('[bootstrap] bad SOURCE_CONFIG JSON:', e.message); }
|
||||||
|
const port = Number.isInteger(sourceConfig.port) ? sourceConfig.port : undefined;
|
||||||
|
const board = Number.isInteger(sourceConfig.board) ? sourceConfig.board : undefined;
|
||||||
|
|
||||||
console.log(`[bootstrap] starting ${sourceType} ingest (listen=${listen} port=${listenPort || 'n/a'})...`);
|
console.log(`[bootstrap] starting ${sourceType} ingest (listen=${listen} port=${listenPort || 'n/a'})...`);
|
||||||
try {
|
try {
|
||||||
|
|
@ -72,6 +79,8 @@ async function bootstrapAutoStart() {
|
||||||
binId: envOpt('BIN_ID') || null,
|
binId: envOpt('BIN_ID') || null,
|
||||||
clipName,
|
clipName,
|
||||||
device,
|
device,
|
||||||
|
port,
|
||||||
|
board,
|
||||||
sourceType,
|
sourceType,
|
||||||
sourceUrl,
|
sourceUrl,
|
||||||
listen,
|
listen,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue