mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-09-01 19:53:54 +00:00
[repos] lgprotocol: import shared protocol definitions
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
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:
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(looking-glass-obs C)
|
||||
project(looking-glass-obs C CXX)
|
||||
|
||||
get_filename_component(PROJECT_TOP "${PROJECT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_TOP}/cmake/" "${PROJECT_SOURCE_DIR}/cmake/")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "frame_scheduler.h"
|
||||
|
||||
#include <common/KVMFR.h>
|
||||
#include <LGProtocol/KVMFR.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
17
obs/lg.c
17
obs/lg.c
@@ -29,8 +29,8 @@
|
||||
|
||||
#include <common/array.h>
|
||||
#include <common/ivshmem.h>
|
||||
#include <common/KVMFR.h>
|
||||
#include <common/LGMPConfig.h>
|
||||
#include <LGProtocol/KVMFR.h>
|
||||
#include <LGProtocol/LGMPConfig.h>
|
||||
#include <common/framebuffer.h>
|
||||
#include <lgmp/client.h>
|
||||
|
||||
@@ -97,7 +97,7 @@ typedef struct
|
||||
bool unpack;
|
||||
uint32_t drmFormat;
|
||||
struct vec2 screenScale;
|
||||
FrameType type;
|
||||
KVMFRFrameType type;
|
||||
int bpp;
|
||||
struct IVSHMEM shmDev;
|
||||
PLGMPClient lgmp;
|
||||
@@ -709,8 +709,8 @@ static void * frameThread(void * data)
|
||||
(const KVMFRFrame *)frameMessage.msg.mem;
|
||||
if (frameMessage.owner)
|
||||
{
|
||||
const FrameBuffer * fb =
|
||||
(const FrameBuffer *)((const uint8_t *)frame + frame->offset);
|
||||
const KVMFRFrameBuffer * fb =
|
||||
(const KVMFRFrameBuffer *)((const uint8_t *)frame + frame->offset);
|
||||
if (framebuffer_wait(
|
||||
fb, (size_t)frame->dataHeight * frame->pitch))
|
||||
{
|
||||
@@ -1024,7 +1024,8 @@ static DMAFrameInfo * dmabufOpenDMAFrameInfo(LGPlugin * this, LGMPMessage * msg,
|
||||
if (fi->fd == -1)
|
||||
{
|
||||
const uintptr_t pos = (uintptr_t) msg->mem - (uintptr_t) this->shmDev.mem;
|
||||
const uintptr_t offset = (uintptr_t) frame->offset + sizeof(FrameBuffer);
|
||||
const uintptr_t offset =
|
||||
(uintptr_t)frame->offset + sizeof(KVMFRFrameBuffer);
|
||||
|
||||
fi->dataSize = dataSize;
|
||||
fi->fd = ivshmemGetDMABuf(&this->shmDev, pos + offset, dataSize);
|
||||
@@ -1599,8 +1600,8 @@ static void lgVideoTick(void * data, float seconds)
|
||||
return;
|
||||
}
|
||||
|
||||
const FrameBuffer * fb =
|
||||
(const FrameBuffer *)((const uint8_t *)frame + frame->offset);
|
||||
const KVMFRFrameBuffer * fb =
|
||||
(const KVMFRFrameBuffer *)((const uint8_t *)frame + frame->offset);
|
||||
bool frameComplete = false;
|
||||
if (frameMessage.owner)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user