[repos] lgprotocol: import shared protocol definitions
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / idd (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run

Add LGProtocol as a pinned submodule and consume its KVMFR protocol
definitions throughout the client, host, IDD, OBS, and profiler.

Keep Looking Glass framebuffer helpers local while removing duplicated
protocol headers and migrating users to KVMFR-scoped types.
This commit is contained in:
Geoffrey McRae
2026-09-01 20:58:25 +10:00
parent 8e43d41873
commit 8fbe3e7454
94 changed files with 619 additions and 2062 deletions

View File

@@ -22,13 +22,9 @@
#include <stdbool.h>
#include <stdint.h>
#include "common/KVMFR.h"
#include <LGProtocol/KVMFR.h>
#ifdef __cplusplus
/* using common/framebuffer.h breaks compatibillity with C++ due to it's usage
* of stdatomic.h, so we need to forward declare the structure here */
typedef struct stFrameBuffer FrameBuffer;
#else
#ifndef __cplusplus
#include "common/framebuffer.h"
#endif
@@ -95,8 +91,8 @@ typedef struct CaptureFrame
uint32_t hdrMaxFrameAverageLightLevel;
uint32_t sdrWhiteLevel;
uint32_t damageRectsCount;
FrameDamageRect damageRects[KVMFR_MAX_DAMAGE_RECTS];
uint32_t damageRectsCount;
KVMFRFrameDamageRect damageRects[KVMFR_MAX_DAMAGE_RECTS];
// Producer-local durations. Absolute timestamps must not cross KVMFR as the
// client and producer use different monotonic clock domains.
@@ -148,18 +144,18 @@ typedef struct CaptureInterface
void (*free )(void);
CaptureResult (*capture )(
unsigned frameBufferIndex,
FrameBuffer * frame);
unsigned frameBufferIndex,
KVMFRFrameBuffer * frame);
CaptureResult (*waitFrame )(
unsigned frameBufferIndex,
CaptureFrame * frame,
/* Capacity of FrameBuffer::data, excluding the message and header. */
const size_t maxFrameSize);
CaptureResult (*getFrame )(
unsigned frameBufferIndex,
FrameBuffer * frame,
/* Capacity of FrameBuffer::data, excluding the message and header. */
const size_t maxFrameSize,
CaptureFrame * captureFrame);
CaptureFrame * frame,
/* Capacity of KVMFRFrameBuffer::data, excluding message and header. */
const size_t maxFrameSize);
CaptureResult (*getFrame )(
unsigned frameBufferIndex,
KVMFRFrameBuffer * frame,
/* Capacity of KVMFRFrameBuffer::data, excluding message and header. */
const size_t maxFrameSize,
CaptureFrame * captureFrame);
}
CaptureInterface;

View File

@@ -21,7 +21,7 @@
#pragma once
#include <stdbool.h>
#include "common/KVMFR.h"
#include <LGProtocol/KVMFR.h>
// exit code for user opted to exit looking-glass-host
#define LG_HOST_EXIT_USER 0x10