mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-14 11:28:11 +00:00
[common] Update framebuffer metadata + references
This commit is contained in:

committed by
Geoffrey McRae

parent
78d2b76313
commit
53c843d9dd
@@ -24,16 +24,21 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdatomic.h>
|
||||
|
||||
typedef struct stFrameBuffer FrameBuffer;
|
||||
#define FB_CHUNK_SIZE 1048576 // 1MB
|
||||
#define FB_SPIN_LIMIT 10000 // 10ms
|
||||
#define FB_WP_TYPE atomic_uint_least32_t
|
||||
#define FB_WP_SIZE sizeof(FB_WP_TYPE)
|
||||
|
||||
typedef struct stFrameBuffer
|
||||
{
|
||||
FB_WP_TYPE wp;
|
||||
uint8_t data[0];
|
||||
} FrameBuffer;
|
||||
|
||||
typedef bool (*FrameBufferReadFn)(void * opaque, const void * src, size_t size);
|
||||
|
||||
/**
|
||||
* The size of the FrameBuffer struct
|
||||
*/
|
||||
extern const size_t FrameBufferStructSize;
|
||||
|
||||
/**
|
||||
* Wait for the framebuffer to fill to the specified size
|
||||
*/
|
||||
|
Reference in New Issue
Block a user