MixedRealityCompanionKit
MixedRealityCompanionKit copied to clipboard
Spectator view dynamic camera config (load video frame settings at runtime)
Hi, I've made some changes internally on the spectator view compositor.
I find it quite annoying to have to rebuild the DLLs if the frame size or framerate of the camera changes.
The changes consist on the following:
- If a file called
camera.cfg
is found inside the User's Document folder (next to the folder where theHologramCapture
would be found), the value used will be the ones in the folder for things like the frame height, width and the video FPS. - If the file is not found, it will silently fallback to use the values set to
CompositorConstants.h
" as it always had. This doesn't change the behavior for existing users.
The way it works is basically just a few static variables that are exported from CompositorDLL
. With a header to import it on the UnityCompositorInterface
and a simple config file reader that is called at plugin initialization (or from the main()
function of the calibration app).
The place where theses variables (FRAME_WIDTH, etc...) are originally mentioned in the README files has been updated with a not explaining that it is possible to create this file and use it that way.
That way, a user just has to build the DLL once, with the configuration for his capture card (adding or not the necessary SDKs).
And this has been built on top of the current master, that include #271
Love this contribution, thanks!
Can you update this readme section to mention this config file as an option (include file name, file location, expected file contents)
Thanks for the feedback @fieldsJacksonG! Will push fixes on this PR during business hours in France today (Friday)
@fieldsJacksonG I think I got around to do all your requested changes, can you review again?
@fieldsJacksonG Just so you know, I'm finishing an internship in two weeks, after that I will not have access to any HoloLens hardware. It will be harder for me to contribute on this without being able to test anything :wink: