mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
grabber api and feature unification (#462)
* 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
This commit is contained in:
34
include/grabber/OsxFrameGrabberMock.h
Normal file
34
include/grabber/OsxFrameGrabberMock.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#ifndef __APPLE__
|
||||
|
||||
/*
|
||||
* this is a mock up for compiling and testing osx wrapper on no osx platform.
|
||||
* this will show a test image and rotate the colors.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <utils/Image.h>
|
||||
#include <utils/ColorRgb.h>
|
||||
|
||||
typedef int CGDirectDisplayID;
|
||||
typedef Image<ColorRgb> CGImage;
|
||||
typedef CGImage* CGImageRef;
|
||||
typedef unsigned char CFData;
|
||||
typedef CFData* CFDataRef;
|
||||
typedef unsigned CGDisplayCount;
|
||||
|
||||
const int kCGDirectMainDisplay = 0;
|
||||
|
||||
void CGGetActiveDisplayList(int max, CGDirectDisplayID *displays, CGDisplayCount *displayCount);
|
||||
CGImageRef CGDisplayCreateImage(CGDirectDisplayID display);
|
||||
void CGImageRelease(CGImageRef image);
|
||||
CGImageRef CGImageGetDataProvider(CGImageRef image);
|
||||
CFDataRef CGDataProviderCopyData(CGImageRef image);
|
||||
unsigned char* CFDataGetBytePtr(CFDataRef imgData);
|
||||
unsigned CGImageGetWidth(CGImageRef image);
|
||||
unsigned CGImageGetHeight(CGImageRef image);
|
||||
unsigned CGImageGetBitsPerPixel(CGImageRef image);
|
||||
unsigned CGImageGetBytesPerRow(CGImageRef image);
|
||||
void CFRelease(CFDataRef imgData);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user