fix(capture): log SDK errors in video loop, warn on unsupported port index
This commit is contained in:
parent
b46abc9b1a
commit
962c7c8f20
1 changed files with 4 additions and 1 deletions
|
|
@ -36,7 +36,9 @@ static ULONG rx_streamtype(unsigned port) {
|
||||||
case 1: return VHD_ST_RX1;
|
case 1: return VHD_ST_RX1;
|
||||||
case 2: return VHD_ST_RX2;
|
case 2: return VHD_ST_RX2;
|
||||||
case 3: return VHD_ST_RX3;
|
case 3: return VHD_ST_RX3;
|
||||||
default: return VHD_ST_RX0;
|
default:
|
||||||
|
fprintf(stderr, "{\"error\":\"port %u not supported (max 3)\"}\n", port);
|
||||||
|
return VHD_ST_RX0; /* caller will fail on signal lock */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -294,6 +296,7 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
VHD_UnlockSlotHandle(slot);
|
VHD_UnlockSlotHandle(slot);
|
||||||
} else if (r != VHDERR_TIMEOUT) {
|
} else if (r != VHDERR_TIMEOUT) {
|
||||||
|
fprintf(stderr, "[video] VHD_LockSlotHandle error %lu — stopping\n", r);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue