.gear/obs-studio-plugin-droidcam.spec | 64 +++++++++++++++++++++++++++++++++++ .gear/rules | 3 ++ .gear/tags/list | 4 +++ Makefile | 4 +-- linux/linux.mk | 10 +++--- 5 files changed, 77 insertions(+), 8 deletions(-) diff --git a/.gear/obs-studio-plugin-droidcam.spec b/.gear/obs-studio-plugin-droidcam.spec new file mode 100644 index 0000000..a6f31f3 --- /dev/null +++ b/.gear/obs-studio-plugin-droidcam.spec @@ -0,0 +1,64 @@ +%define git %nil + +Name: obs-studio-plugin-droidcam +Summary: Droidcam plugin for OBS studio +Version: 2.0.1 +Release: alt1 +License: GPLv2 +Group: Video +Url: https://github.com/dev47apps/droidcam-obs-plugin + +Source: %name-%version.tar +Patch: %name-%version-%release.patch + +BuildRequires: gcc-c++ libturbojpeg-devel libusbmuxd-devel libimobiledevice-devel +BuildRequires: libobs-devel >= 24.0 + +Requires: obs-studio-base + +%description +The new 'DroidCam OBS' app + plugin let you connect to your phone and get high +quality audio & video just like a regular camera source. And you can connect as +many devices as you want, over WiFi or USB! + +%prep +%setup +%patch -p1 + +%build +mkdir build +%ifarch ppc64le +OPTFLAGS="%optflags %optflags_shared -DNO_WARN_X86_INTRINSICS -mvsx" \ +%else +OPTFLAGS="%optflags %optflags_shared" \ +%endif +ALLOW_STATIC=no %make_build + +%install +mkdir -p %buildroot{%_libdir/obs-plugins,%_datadir/obs/obs-plugins/droidcam-obs} +install -m644 build/droidcam-obs.so %buildroot%_libdir/obs-plugins/ +cp -ar data/locale %buildroot%_datadir/obs/obs-plugins/droidcam-obs/ + +%files +%_libdir/obs-plugins/droidcam-obs.so +%_datadir/obs/obs-plugins/droidcam-obs/ + +%changelog +* Thu Mar 09 2023 L.A. Kostis 2.0.1-alt1 +- 2.0.1. + +* Thu Dec 29 2022 L.A. Kostis 2.0.0-alt1 +- 2.0.0. + +* Sun Jan 30 2022 L.A. Kostis 1.3-alt1 +- 1.3. + +* Thu Dec 10 2020 L.A. Kostis 1.1-alt2.gc9ca053.1 +- Extend ppc64 build flags (libobs knows how to handle them). + +* Wed Dec 09 2020 L.A. Kostis 1.1-alt2.gc9ca053 +- Fix build on ppc64le. + +* Wed Dec 09 2020 L.A. Kostis 1.1-alt1.gc9ca053 +- GIT gc9ca053. +- Initial build for Sisyphus. diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..82d681e --- /dev/null +++ b/.gear/rules @@ -0,0 +1,3 @@ +tar: @version@:. +diff: @version@:. . +spec: .gear/obs-studio-plugin-droidcam.spec diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..3c11d73 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1,4 @@ +c2ef71b2b27789502ed7c01805a5b53b1682732a 1.1 +bc2f50051789f3141ecda655093381a996bc3d94 1.3 +238b1ce40117c083f9a7dc39978bbaf72989f9f5 2.0.0 +76b6cbe8ec16731546589818b97745be471332e4 2.0.1 diff --git a/Makefile b/Makefile index 69b7eb8..9c6a8ab 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ LIB_DLL ?= $(BUILD_DIR)/droidcam-obs.so RM ?= rm -f CXX ?= g++ -CXXFLAGS += -std=c++17 -Wall -fPIC +CXXFLAGS += -std=c++17 -Wall -fPIC $(OPTFLAGS) INCLUDES += -Isrc/ STATIC += LDD_DIRS += @@ -39,7 +39,7 @@ endif $(LIB_DLL): $(SRC) - $(CXX) $(CXXFLAGS) $(INCLUDES) $(LDD_DIRS) $(LDD_LIBS) $(LDD_FLAG) $^ $(STATIC) -o $@ + $(CXX) $(CXXFLAGS) $(INCLUDES) $(LDD_FLAG) $^ -o $@ $(LDD_LIBS) clean: $(RM) $(BUILD_DIR)/*.o $(BUILD_DIR)/*.so $(BUILD_DIR)/*.exe diff --git a/linux/linux.mk b/linux/linux.mk index 33e2e7a..8630fbf 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -22,15 +22,13 @@ else LDD_DIRS += -L$(JPEG_LIB) LDD_DIRS += -L$(IMOBILEDEV_LIB) - LDD_LIBS += -lturbojpeg - LDD_LIBS += -limobiledevice + LDD_LIBS += $(shell pkg-config --libs libturbojpeg) + LDD_LIBS += $(shell pkg-config --libs libimobiledevice-1.0) endif -INCLUDES += -I$(IMOBILEDEV_DIR)/include -INCLUDES += -I$(JPEG_DIR)/include -INCLUDES += -I/usr/include/ffmpeg +INCLUDES += -I/usr/include INCLUDES += -I/usr/include/obs -LDD_LIBS += -lobs +LDD_LIBS += $(shell pkg-config --libs libobs) LDD_FLAG += -shared \ No newline at end of file