hyperion.ng/libsrc/grabber/x11/X11Wrapper.cpp
Murat Seker 3b48d8c9d6
Dump stack trace on crash (Implement #849) (#870)
* Print stack trace on crash

* Printing stack trace is fully functional except for WIN32

* Minor fixes

* Minor fixes
2020-07-12 18:27:24 +02:00

33 lines
568 B
C++

#include <grabber/X11Wrapper.h>
X11Wrapper::X11Wrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, const unsigned updateRate_Hz)
: GrabberWrapper("X11", &_grabber, 0, 0, updateRate_Hz)
, _grabber(cropLeft, cropRight, cropTop, cropBottom, pixelDecimation)
, _init(false)
{}
X11Wrapper::~X11Wrapper()
{
if ( _init )
{
stop();
}
}
void X11Wrapper::action()
{
if (! _init )
{
_init = true;
if ( ! _grabber.Setup() )
{
stop();
}
}
if (_grabber.updateScreenDimensions() >= 0 )
{
transferFrame(_grabber);
}
}