hazelnut/agent/CollabVMFbcAgent/capture.cpp
modeco80 c1bb08c31f agent: LARGE cleanup
interfaces are like a good thing.
2024-11-23 21:29:59 -05:00

30 lines
No EOL
709 B
C++

#include "capture.hpp"
namespace hazelnut {
// capture_nvfbc.cpp
IFramebufferCapture* CreateFramebufferCapture_NVFBC();
DisplayCaptureInterface GuessBestCaptureInterface() {
// The only one we support.
return DisplayCaptureInterface::NVFBC;
}
std::unique_ptr<IFramebufferCapture> CreateFramebufferCapture(DisplayCaptureInterface type) {
IFramebufferCapture* pCapture = nullptr;
switch(type) {
case DisplayCaptureInterface::NVFBC:
pCapture = CreateFramebufferCapture_NVFBC();
break;
default: return nullptr;
}
// Initalize capture.
if (pCapture->Initialize())
return nullptr;
return std::unique_ptr<IFramebufferCapture>(pCapture);
}
} // namespace hazelnut