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