hazelnut/agent/CollabVMFbcAgent/capture.cpp
2024-11-23 21:46:39 -05:00

28 lines
No EOL
694 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