Hi, hi, so here is how I did it:
1) Creating a scene with python
myscene = obspython.obs_scene_create("my scene")
2) Adding a window capture (video source) to it
mysource = obspython.obs_source_create_private("window_capture", "my window capture", None)
3) Adding source to the new scene
obspython.obs_scene_add(myscene, mysource)
Thank you so much for the link, by the way. I discovered how to use it with you. We have to use the specific string ID of the source we want to add, and I was looking everywhere for it. The id
for text is in:
obs-studio/plugins/obs-text/gdiplus/obs-text.cpp (text_gdiplus)
for window capture is in:
obs-studio/plugins/win-capture/window-capture.c (window_capture)
So yeah, we have to find their id by going to source files and looking for them (the string id is the 1st argument of the function create); there isn't a single place with them all. For people who want to find more, they are all in this folder plugins from the obs-studio source files
https://github.com/obsproject/obs-studio.git
PS: If we try to create a source with a text id of an inexistent type, nothing will show in obs, but the source is still made.