/*---------------------------------------------------------------------------*/
/* iamge_buffer.h                                                            */
/* copyright (c) innovaphone 2016                                            */
/*                                                                           */
/*---------------------------------------------------------------------------*/

class ImageBuffer : public IImageBuffer {
    class IIoMux * const iomux;
    class IInstanceLog * const log;
    class MediaConfiguration* mediaConfiguration;
    bool started;

public:
    ImageBuffer(class IIoMux * const iomux, UImageBuffer * const user, class IInstanceLog * const log, class MediaConfiguration * mediaConfiguration);
    ~ImageBuffer();

    class UImageBuffer * const user;
    byte *yuvBuffer;
    unsigned yuvBufferLen;

    void Capture(unsigned int appId, class IScreenBuffer * screenBuffer, int coder) override;
    bool Mark(unsigned int appId, int coorX, int coorY, int dimX, int dimY) override { return true; };
    void Clean(unsigned int appId) override;
    bool GetWindowPosition(byte appId, word * x, word * y, int * aspectRatio) override { return true; };

    void SubscribeApplications(void) override;
    void UnsubscribeApplications(void) override;

    void CloseImageBuffer(void) override;
};
