30 lines
709 B
C++
30 lines
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
|