#ifndef MPRODRV_H
#define MPRODRV_H

extern "C" {

#include <stdint.h>
#include <windows.h>

struct mpro_frame_data {
    int width;
    int height;
    int vsync;
    int stride;
    uint8_t data[1];
};

struct mpro_frame {
    struct mpro_frame_data *frame;

    HANDLE share;  // mapped shared memory handle.
    HANDLE event;  // named event handle.
};

struct mpro_frame *mpro_open_frame();
void mpro_close_frame(struct mpro_frame *);
uint8_t *mpro_get_frame(struct mpro_frame *);
void mpro_set_frame(struct mpro_frame *, uint8_t *);

// from libyuv.h
int ARGBToRGB565Dither(const uint8_t*, int, uint8_t*, int, const uint8_t*, int, int);
}

#endif // MPRODRV_H
