[host] kvmfr: allow the frame size to exceed the available memory

This change allows the host to still transmit a frame that is truncated
if the IVSHMEM size is too small to allow for a full frame.
This commit is contained in:
Geoffrey McRae
2021-06-12 18:44:28 +10:00
parent 4b99bba200
commit d36c4f0e83
5 changed files with 44 additions and 65 deletions

View File

@@ -64,6 +64,7 @@ typedef struct CaptureFrame
unsigned int formatVer;
unsigned int width;
unsigned int height;
unsigned int realHeight;
unsigned int pitch;
unsigned int stride;
CaptureFormat format;
@@ -99,15 +100,14 @@ typedef struct CaptureInterface
CapturePostPointerBuffer postPointerBufferFn
);
bool (*init )();
void (*stop )();
bool (*deinit )();
void (*free )();
unsigned int (*getMaxFrameSize)();
unsigned int (*getMouseScale )();
bool (*init )();
void (*stop )();
bool (*deinit )();
void (*free )();
unsigned int (*getMouseScale)();
CaptureResult (*capture )();
CaptureResult (*waitFrame )(CaptureFrame * frame);
CaptureResult (*getFrame )(FrameBuffer * frame);
CaptureResult (*waitFrame )(CaptureFrame * frame, const size_t maxFrameSize);
CaptureResult (*getFrame )(FrameBuffer * frame, const unsigned int height);
}
CaptureInterface;