fix(node-agent): always mount /dev/shm into sidecars for framecache access
This commit is contained in:
parent
5686e65df9
commit
b5235e0a2c
1 changed files with 3 additions and 2 deletions
|
|
@ -410,6 +410,9 @@ async function handleSidecarStart(body, res) {
|
||||||
} = body;
|
} = body;
|
||||||
|
|
||||||
const binds = [`${LIVE_DIR}:/live`];
|
const binds = [`${LIVE_DIR}:/live`];
|
||||||
|
// Always mount /dev/shm so the sidecar can access framecache slots.
|
||||||
|
if (fs.existsSync('/dev/shm')) binds.push('/dev/shm:/dev/shm');
|
||||||
|
|
||||||
if (sourceType === 'sdi') binds.unshift('/dev/blackmagic:/dev/blackmagic');
|
if (sourceType === 'sdi') binds.unshift('/dev/blackmagic:/dev/blackmagic');
|
||||||
if (sourceType === 'deltacast') {
|
if (sourceType === 'deltacast') {
|
||||||
// Bind each /dev/deltacast* node that exists on the host into the container.
|
// Bind each /dev/deltacast* node that exists on the host into the container.
|
||||||
|
|
@ -417,8 +420,6 @@ async function handleSidecarStart(body, res) {
|
||||||
try {
|
try {
|
||||||
const dcEntries = fs.readdirSync('/dev').filter(n => /^deltacast\d+$/.test(n));
|
const dcEntries = fs.readdirSync('/dev').filter(n => /^deltacast\d+$/.test(n));
|
||||||
for (const d of dcEntries) binds.push(`/dev/${d}:/dev/${d}`);
|
for (const d of dcEntries) binds.push(`/dev/${d}:/dev/${d}`);
|
||||||
// VideoMaster SDK needs the board IPC shared-memory segment mounted too.
|
|
||||||
if (fs.existsSync('/dev/shm/deltacast')) binds.push('/dev/shm/deltacast:/dev/shm/deltacast');
|
|
||||||
} catch (_) { /* /dev always exists */ }
|
} catch (_) { /* /dev always exists */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue