[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

@@ -28,7 +28,7 @@
#include "types.h"
#define KVMFR_MAGIC "KVMFR---"
#define KVMFR_VERSION 9
#define KVMFR_VERSION 10
#define LGMP_Q_POINTER 1
#define LGMP_Q_FRAME 2
@@ -68,8 +68,9 @@ typedef struct KVMFRFrame
{
uint32_t formatVer; // the frame format version number
FrameType type; // the frame data type
uint32_t width; // the width
uint32_t height; // the height
uint32_t width; // the frame width
uint32_t height; // the frame height
uint32_t realHeight; // the real height if the frame was truncated due to low mem
FrameRotation rotation; // the frame rotation
uint32_t stride; // the row stride (zero if compressed data)
uint32_t pitch; // the row pitch (stride in bytes or the compressed frame size)