mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
* move setvideomode to common place * implement more croping and 3d support * more api unification * more refactoring * osx fix * next step * add a mock for osx grabber. Now it is possible to test compile on none osx platforms. * more unifications ... * remove obsolete includes and grabbers are not dyn allocated. dispmanx needs rework an probaly not work atm * first version of dispmanx mock. it compiles, but outputs a black image * now dispmanx mock works! * activate mocks in travis linux build prepare dispmanx to rgb image out * dispmanx now with image rgb output fix deadlock with w/h -1 in grabber v4l cleanups * fix json * fix some runtime stuff * Update FramebufferWrapper.cpp fix missing code * unify grabframe * 3d and croping for amlogic * fix setimage not working * make use of templates save some codelines * save more code lines
46 lines
1.2 KiB
C++
Executable File
46 lines
1.2 KiB
C++
Executable File
#pragma once
|
|
|
|
// Utils includes
|
|
#include <utils/ColorBgr.h>
|
|
#include <hyperion/Grabber.h>
|
|
|
|
///
|
|
/// The DispmanxFrameGrabber is used for creating snapshots of the display (screenshots) with a
|
|
/// downsized and scaled resolution.
|
|
///
|
|
class AmlogicGrabber : public Grabber
|
|
{
|
|
public:
|
|
///
|
|
/// Construct a AmlogicGrabber that will capture snapshots with specified dimensions.
|
|
///
|
|
/// @param[in] width The width of the captured screenshot
|
|
/// @param[in] height The heigth of the captured screenshot
|
|
///
|
|
AmlogicGrabber(const unsigned width, const unsigned height);
|
|
~AmlogicGrabber();
|
|
|
|
///
|
|
/// Captures a single snapshot of the display and writes the data to the given image. The
|
|
/// provided image should have the same dimensions as the configured values (_width and
|
|
/// _height)
|
|
///
|
|
/// @param[out] image The snapped screenshot (should be initialized with correct width and
|
|
/// height)
|
|
/// @return Zero on success else negative
|
|
///
|
|
int grabFrame(Image<ColorRgb> & image);
|
|
|
|
private:
|
|
/**
|
|
* Returns true if video is playing over the amlogic chip
|
|
* @return True if video is playing else false
|
|
*/
|
|
bool isVideoPlaying();
|
|
|
|
/** The snapshot/capture device of the amlogic video chip */
|
|
int _amlogicCaptureDev;
|
|
|
|
Image<ColorBgr> _image;
|
|
};
|