You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing the error below trying to build the obs-ptz plugin with OBS Studio v30.0 on Linux. Seems to be caused by an API change with the latest release. See obsproject/obs-studio#7637.
$ make
[ 3%] Automatic MOC and UIC for target obs-ptz
[ 3%] Built target obs-ptz_autogen
[ 7%] Building CXX object CMakeFiles/obs-ptz.dir/src/ptz-controls.cpp.o
/home/bmader/swapdisk/obs-ptz/src/ptz-controls.cpp: In function ‘void ptz_load_controls()’:
/home/bmader/swapdisk/obs-ptz/src/ptz-controls.cpp:33:30: error: ‘void* obs_frontend_add_dock(void*)’ is deprecated [-Werror=deprecated-declarations]
33 | obs_frontend_add_dock(tmp);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /home/bmader/swapdisk/obs-ptz/src/ptz-device.hpp:17,
from /home/bmader/swapdisk/obs-ptz/src/ptz-controls.hpp:15,
from /home/bmader/swapdisk/obs-ptz/src/ptz-controls.cpp:23:
/usr/include/obs/obs-frontend-api.h:142:14: note: declared here
142 | EXPORT void *obs_frontend_add_dock(void *dock);
| ^~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/obs-ptz.dir/build.make:128: CMakeFiles/obs-ptz.dir/src/ptz-controls.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/obs-ptz.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
The text was updated successfully, but these errors were encountered:
OBS Studio 30.0.0 deprecated the obs_frontend_add_dock() function and
advised plugins to use obs_frontend_add_dock_by_id() instead. However,
the new API takes the contents of the dock widget as an argument instead
of the dock widget itself, which requires rework of the widget
structure.
This commit removes the QDockWidget instance from the .ui file and
changes the PTZControls class to inheret from QWidget instead of
QDockWidget. It then reworks the instantiation to use the new API when
building against obs-studio 30.0.0 or higher. When building against
older versions it will create the needed QDockWidget before calling the
old API.
Fixes: #186
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
I'm seeing the error below trying to build the obs-ptz plugin with OBS Studio v30.0 on Linux. Seems to be caused by an API change with the latest release. See obsproject/obs-studio#7637.
The text was updated successfully, but these errors were encountered: