mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Windows: Add a DDA grabber for much better performance (#1745)
* Add a DXDI DDA grabber * Change all names to camel case * Handle cropping and pixel decimation * Try more persistently to restart capture after an error occurred. These can happen when changing resolution, or resuming from sleep.
This commit is contained in:
20
libsrc/grabber/dda/DDAWrapper.cpp
Normal file
20
libsrc/grabber/dda/DDAWrapper.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "grabber/dda/DDAWrapper.h"
|
||||
|
||||
DDAWrapper::DDAWrapper(int updateRate_Hz, int display, int pixelDecimation, int cropLeft, int cropRight, int cropTop,
|
||||
int cropBottom)
|
||||
: GrabberWrapper(GRABBERTYPE, &_grabber, updateRate_Hz), _grabber(display, cropLeft, cropRight, cropTop, cropBottom)
|
||||
|
||||
{
|
||||
_grabber.setPixelDecimation(pixelDecimation);
|
||||
}
|
||||
|
||||
DDAWrapper::DDAWrapper(const QJsonDocument &grabberConfig)
|
||||
: DDAWrapper(GrabberWrapper::DEFAULT_RATE_HZ, 0, GrabberWrapper::DEFAULT_PIXELDECIMATION, 0, 0, 0, 0)
|
||||
{
|
||||
this->handleSettingsUpdate(settings::SYSTEMCAPTURE, grabberConfig);
|
||||
}
|
||||
|
||||
void DDAWrapper::action()
|
||||
{
|
||||
transferFrame(_grabber);
|
||||
}
|
Reference in New Issue
Block a user