mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
add standalone amlogic grabber
fix standalone dispmanx grabber Former-commit-id: 5ace9bc90a6fe76f5a51ecef95d6e7119d1102db
This commit is contained in:
@@ -12,12 +12,7 @@ else(ENABLE_QT5)
|
||||
endif(ENABLE_QT5)
|
||||
|
||||
# Find the BCM-package (VC control)
|
||||
#find_package(BCM REQUIRED)
|
||||
SET( BCM_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/dependencies/external/rapsi_vc )
|
||||
SET( BCM_LIBRARIES "" )
|
||||
ADD_DEFINITIONS ( -DDISPMANX_DUMMY )
|
||||
|
||||
|
||||
find_package(BCM REQUIRED)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../libsrc/protoserver
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
// Hyperion-X11 includes
|
||||
// Hyperion-Dispmanx includes
|
||||
#include "DispmanxWrapper.h"
|
||||
|
||||
DispmanxWrapper::DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz) :
|
||||
|
@@ -7,36 +7,36 @@
|
||||
|
||||
class DispmanxWrapper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
||||
DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
||||
|
||||
const Image<ColorRgb> & getScreenshot();
|
||||
const Image<ColorRgb> & getScreenshot();
|
||||
|
||||
///
|
||||
/// Starts the timed capturing of screenshots
|
||||
///
|
||||
void start();
|
||||
///
|
||||
/// Starts the timed capturing of screenshots
|
||||
///
|
||||
void start();
|
||||
|
||||
void stop();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void sig_screenshot(const Image<ColorRgb> & screenshot);
|
||||
void sig_screenshot(const Image<ColorRgb> & screenshot);
|
||||
|
||||
private slots:
|
||||
///
|
||||
/// Performs a single screenshot capture and publishes the capture screenshot on the screenshot
|
||||
/// signal.
|
||||
///
|
||||
void capture();
|
||||
///
|
||||
/// Performs a single screenshot capture and publishes the capture screenshot on the screenshot
|
||||
/// signal.
|
||||
///
|
||||
void capture();
|
||||
|
||||
private:
|
||||
/// The QT timer to generate capture-publish events
|
||||
QTimer _timer;
|
||||
/// The QT timer to generate capture-publish events
|
||||
QTimer _timer;
|
||||
|
||||
/// The grabber for creating screenshots
|
||||
DispmanxFrameGrabber _grabber;
|
||||
Image<ColorRgb> _screenshot_rgb;
|
||||
Image<ColorRgba> _screenshot;
|
||||
/// The grabber for creating screenshots
|
||||
DispmanxFrameGrabber _grabber;
|
||||
Image<ColorRgb> _screenshot_rgb;
|
||||
Image<ColorRgba> _screenshot;
|
||||
|
||||
};
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// getoptPlusPLus includes
|
||||
#include <getoptPlusPlus/getoptpp.h>
|
||||
|
||||
#include "protoserver/ProtoConnectionWrapper.h"
|
||||
#include <protoserver/ProtoConnectionWrapper.h>
|
||||
#include "DispmanxWrapper.h"
|
||||
|
||||
using namespace vlofgren;
|
||||
@@ -81,12 +81,12 @@ int main(int argc, char ** argv)
|
||||
app.exec();
|
||||
}
|
||||
}
|
||||
catch (const std::runtime_error & e)
|
||||
{
|
||||
// An error occured. Display error and quit
|
||||
std::cerr << e.what() << std::endl;
|
||||
return -1;
|
||||
}
|
||||
catch (const std::runtime_error & e)
|
||||
{
|
||||
// An error occured. Display error and quit
|
||||
std::cerr << e.what() << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user