hardcoded decklink mode fix
This commit is contained in:
Executable
+66
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
ENGINE_PORT=${ENGINE_PORT:-9000}
|
||||
BASE_URL="http://127.0.0.1:${ENGINE_PORT}"
|
||||
DEVICE_INDEX=${DEVICE_INDEX:-0}
|
||||
MODE=${MODE:-1080i50}
|
||||
|
||||
log() { echo "=== $1 ==="; }
|
||||
|
||||
log "Adding decklink-in node (device=${DEVICE_INDEX}, mode=${MODE})"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/nodes" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"type\":\"decklink-in\",\"id\":\"sdi_in\",\"config\":{\"device_index\":${DEVICE_INDEX},\"mode\":\"${MODE}\"}}" | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Adding passthrough node"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/nodes" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"type":"passthrough","id":"pass1"}' | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Adding decklink-out node (device=${DEVICE_INDEX}, mode=${MODE})"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/nodes" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"type\":\"decklink-out\",\"id\":\"sdi_out\",\"config\":{\"device_index\":${DEVICE_INDEX},\"mode\":\"${MODE}\"}}" | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Connecting sdi_in → pass1"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/edges" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"from_node":"sdi_in","from_port":"video_out","to_node":"pass1","to_port":"video_in"}' | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Connecting pass1 → sdi_out"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/edges" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"from_node":"pass1","from_port":"video_out","to_node":"sdi_out","to_port":"video_in"}' | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Starting graph"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/start" | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
sleep 3
|
||||
|
||||
log "Status: sdi_in"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/nodes/sdi_in/command" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"cmd":"status"}' | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Status: pass1"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/nodes/pass1/command" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"cmd":"status"}' | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Status: sdi_out"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/nodes/sdi_out/command" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"cmd":"status"}' | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Graph state"
|
||||
curl -s "${BASE_URL}/api/graph" | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
echo ""
|
||||
echo "=== SDI pipeline running. Press Enter to stop. ==="
|
||||
read
|
||||
|
||||
log "Stopping graph"
|
||||
curl -s -X POST "${BASE_URL}/api/graph/stop" | python3 -m json.tool 2>/dev/null || echo ""
|
||||
|
||||
log "Done"
|
||||
Reference in New Issue
Block a user