#pragma once
#include "ofVideoBaseTypes.h"
#include "ofPixels.h"
#include "ofEvents.h"
#include "ofTypes.h"
#include "ofTexture.h"
#include <jni.h>
class ofxAndroidVideoGrabber: public ofBaseVideoGrabber{
public:
ofxAndroidVideoGrabber();
~ofxAndroidVideoGrabber();
std::vector<ofVideoDevice> listDevices() const;
bool setup(int w, int h);
bool isInitialized() const;
bool isFrameNew() const;
void update();
ofPixels& getPixels();
const ofPixels& getPixels() const;
void setUsePixels(bool usePixels);
void close();
float getHeight() const;
float getWidth() const;
void setVerbose(bool bTalkToMe);
void setDesiredFrameRate(int framerate);
void setDeviceID(int _deviceID);
void videoSettings();
bool setPixelFormat(ofPixelFormat pixelFormat);
ofPixelFormat getPixelFormat() const;
int getBackCamera()const;
int getFrontCamera()const;
int getCameraOrientation(int device=-1)const;
int getFacingOfCamera(int device=-1)const;
bool setAutoFocus(bool autofocus);
ofTexture * getTexturePtr();
bool supportsTextureRendering();
struct Data;
private:
int getCameraFacing(int facing)const;
int getNumCameras()const;
bool initCamera();
ofPixelsRef getAuxBuffer();
std::shared_ptr<Data> data;
};
Comments