Video backend
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m43s
CI / Windows Release Package (push) Successful in 2m54s

This commit is contained in:
Aiden
2026-05-09 14:15:49 +10:00
parent 98f5cbe309
commit 4ffbb97abf
21 changed files with 512 additions and 275 deletions

View File

@@ -0,0 +1,41 @@
#include "VideoIOBackendFactory.h"
#include "VideoIOTypes.h"
#include <iostream>
namespace
{
int gFailures = 0;
void Expect(bool condition, const char* message)
{
if (condition)
return;
std::cerr << "FAIL: " << message << "\n";
++gFailures;
}
}
int main()
{
std::string error;
std::unique_ptr<VideoIODevice> device = CreateVideoIODevice(VideoIOBackendId::DeckLink, error);
Expect(device != nullptr, "decklink backend factory returns a device");
Expect(!device || device->BackendId() == VideoIOBackendId::DeckLink, "decklink backend reports decklink id");
Expect(error.empty(), "supported backend does not produce an error");
error.clear();
device = CreateVideoIODevice(static_cast<VideoIOBackendId>(999), error);
Expect(device == nullptr, "unknown backend id is rejected");
Expect(!error.empty(), "unknown backend reports an error");
if (gFailures != 0)
{
std::cerr << gFailures << " VideoIO backend factory test failure(s).\n";
return 1;
}
std::cout << "VideoIO backend factory tests passed.\n";
return 0;
}