amlogic: integrate grabbing via ge2d (#469)

* - grabber auto off when not set as active prio
- join aml and fb - on aml platform both grabbers are needed, so they joind in one module and share one prio. user don't the the nasty magic behind
- aml: preparation for direct ge2d access

* just save it, in the middle of ge2d impl

* fix compile issues

* now grabbing works basicly

* add 3d support for ge2d

* next step, we got some video from aml

* switch back to rgba

* cleanup

* code cleanup, remove unused stuff
This commit is contained in:
redPanther
2017-09-03 13:48:16 +02:00
committed by GitHub
parent aa9248e815
commit cb7b5fa588
8 changed files with 780 additions and 54 deletions

View File

@@ -2,9 +2,11 @@
// Utils includes
#include <utils/ColorBgr.h>
#include <utils/ColorRgba.h>
#include <hyperion/Grabber.h>
#include <grabber/FramebufferFrameGrabber.h>
class IonBuffer;
///
///
@@ -37,13 +39,16 @@ private:
* @return True if video is playing else false
*/
bool isVideoPlaying();
int grabFrame_amvideocap(Image<ColorRgb> & image);
void closeDev(int &fd);
bool openDev(int &fd, const char* dev, int flags);
bool openDev(int &fd, const char* dev);
int grabFrame_amvideocap(Image<ColorRgb> & image);
int grabFrame_ge2d(Image<ColorRgb> & image);
/** The snapshot/capture device of the amlogic video chip */
int _captureDev;
int _videoDev;
int _ge2dDev;
Image<ColorBgr> _image_bgr;
@@ -51,4 +56,7 @@ private:
bool _videoPlaying;
FramebufferFrameGrabber _fbGrabber;
int _grabbingModeNotification;
bool _ge2dAvailable;
void* _ge2dVideoBufferPtr;
IonBuffer* _ge2dIonBuffer;
};