obs recording stats hud element#1801
Conversation
|
Preferably, communication with OBS should be handled by a self-contained class, exposed through a unique pointer that hud elements query for information |
|
I have made some changes in the latest commit. It's really difficult to expose a class with C++ and have it play nicely with OBS since it expects plugins to be written in C. The class hosts a struct which OBS uses to fill in the relevant info |
|
At the very least we don't want to do things in hud elements except rendering output |
|
Yeah. I'll move some of the initialization code to the class. Also I'll add the compiler guards for linux. I'm yet to do a proper Win32 shared memory implementation |
|
Added some more QOL changes. Looks ready for a review |
|
Hello! |
c9203b6 to
75bdf0a
Compare
|
I've tested on arch and checked with the ubuntu CI build. Seems ok. I've checked the depends on Fedora and Solus on their online package search and the needed file are there. But on OpenSUSE I've no idea maybe someone could volunteer to test it |
4c0a6d3 to
455d507
Compare
|
bump |
|
MangoHUD should be MangoHud |
commit: 7d009d3 hudelements: obs-vkcapture stats with shm and sem ---- commit: b48fb1a hudelements: refactor to local obs plugin ---- commit: 9f2319f hudelements: obs plugin improvements - cleanup so shm objects are removed on both obs and mangohud. needs atexit - prefix_exe allows prefix exe name at the start of file recording(like MSI Afterburner), allows easily finding a recording. prefix_exe isn't run if mangohud isn't running - remove sem. not needed tbh - add config options - some light formatting ---- commit: 63127b2 hudelements: shm compiler guards and fix obs mem leak ---- commit: 2a0d3dd meson: with_obs option ---- commit: 91a1b18 hudelements: obs add ready state ---- commit: b9babc8 hudelements: obs plugin refactor - moved platform specific init code from hud_elements.cpp to obs_studio.cpp - obs_shared.c provides the shared interface for the plugin and MangoHud - obs plugin cleanup so obs exits cleanly ---- commit: 783c64d hudelements: obs plugin further cleanup and refactor - moved more code to class. update function updates column string as appropriate - obs directory in src - obs should still prefix exe even if exited without stopping recording ---- commit: c9203b6 hudelements: with_obs flag and refactor + install plugin - to conform to other elements - install obs plugin ---- commit: 6baf00e hudelements: obs disabled flag if not compiled in ---- commit: 7790d54 hudelements: obs plugin enabled by default - will have to dlsym obs_frontend_get_last_recording since it was added in obs v29.0.0. debian at the time of writing is still on 26 - will issue warning if obs dep was not found at build - plugin meson.build, easy to isolate and build as seperate plugin if needed. a main meson.build will define the obs dependencies - updated CI files ----
feature request from #448
requires
libobsandlibobs-frontend-api, which comes bundled with obs.currently using shm to sync
issues:
initially (inactive state)

when obs is opened (ready state)

recording in progress!

if no shared memory is detected (on win32 or disabled by kernel) error status is shown
if mangohud was compiled without obs support, a spdlog warning is printed and disabled status is shown