Trying to Write Simple Windows Front End App

jlbahr

New Member
I am trying to write a Windows app that takes a camera as source and creates a virtual camera as output. In the middle, I want to change crop/zoom/resolution/brightness , for example.

I have cloned OBS sources and successfully built a 64-bit OBS Studio, using VS 2019, current CMake, suggested dependency directories and so on, as per instructions here: https://obsproject.com/wiki/install-instructions#windows-build-directions.

I've started by trying to build a simple app from the example at test\win\test.cpp. I am linking to obs.lib I built and have added to PATH the directory with all the newly build DLLs (in my case, build\rundir\Debug\bin\64bit).

When I run the program, obs_startup() returns without error. I then fill the ovi structure and call obs_reset_video(), which fails with a return code of -1. I note, by looking at the sources in obs.c, that this is OBS_VIDEO_FAIL, so it could be coming from obs_reset_video, or propagated up from error returns in other called functions.

I do note that there might be an error log available from the blog() functions, if I can figure out how to turn them on, and where to find it.

My basic question is: has anybody written a front end that just calls the OBS back end functions and does something? Or even gotten the small test.cpp to work?

Any advice is greatly appreciated.
 

jlbahr

New Member
I got by the first OBS_VIDEO_FAIL by copying the data\libobs directory with the *.effect files to the test directory that contains the cmocka, data, osx, test-input and (my) win directories. I was somehow magically able to use F11 to step into sources also (halleluia), not sure it knows where they are, as i only linked obs.lib. I'll report more as I make progress.
 

jlbahr

New Member
Well, it runs. I get a nice black screen, the result of having defined a "Windows" window. I don't know how to hook up my video camera to it, though, and I actually want to route output to a virtual camera. I have OBS-VirtualCam installed and hopefully moved to the right place wrt my VS test source tree.
 
Top