CameraInterface.h#

Common interface of the PVRCamera camera streaming interface.

Includes#

  • DynamicGles.h

  • PVRCore/math/MathUtils.h

Included By#

Namespaces#

Classes#

Enums#

Source Code#

#pragma once

#include "DynamicGles.h"
#include "PVRCore/math/MathUtils.h"

namespace pvr {
namespace HWCamera {
enum Enum
{
    Front,
    Back,
};
} // namespace HWCamera

class CameraInterfaceImpl;

class CameraInterface
{
    friend class ::pvr::CameraInterfaceImpl;

public:
    CameraInterface();

    ~CameraInterface();

    void initializeSession(HWCamera::Enum eCamera, int preferredResX = 0, int preferredResY = 0);

    void destroySession();

    bool updateImage();

    bool hasProjectionMatrixChanged();

    const glm::mat4& getProjectionMatrix();

    GLuint getRgbTexture();

    bool hasRgbTexture();

    bool hasLumaChromaTextures();

    GLuint getLuminanceTexture();

    GLuint getChrominanceTexture();

    bool getCameraResolution(uint32_t& width, uint32_t& height);

    bool isReady() { return _isReady; }

private:
    bool _isReady = false;
    void* pImpl;
};
} // namespace pvr