Commit bf76afa6 authored by Tim Steiner's avatar Tim Steiner
Browse files

Improve some error messages.

parent 001f4d65
......@@ -108,7 +108,24 @@ extern "C" int startCapture(GstDecklinkVideoConnection input, GstDecklinkDisplay
result = deckLinkInput->EnableVideoInput(getRealDisplayMode(inputMode), bmdFormat8BitYUV, 0);
if (result != S_OK) {
fprintf(stderr, "Failed to enable video input. Is another application using the card?\n", result);
fprintf(stderr, "Failed to enable video input. ");
switch (result) {
case E_NOTIMPL:
fprintf(stderr, "A firmware update may be needed\n");
break;
case E_INVALIDARG:
fprintf(stderr, "An invalid input mode was specified.\n");
break;
case E_ACCESSDENIED:
fprintf(stderr, "The card is already in use.\n");
break;
case E_OUTOFMEMORY:
fprintf(stderr, "Unable to create new frame.\n");
break;
default:
fprintf(stderr, "Unknown error (%x).\n", result);
break;
}
return -1;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment