diff --git a/recipe/install_rtsp_server.bat b/recipe/install_rtsp_server.bat new file mode 100644 index 0000000..1dbcfd4 --- /dev/null +++ b/recipe/install_rtsp_server.bat @@ -0,0 +1,21 @@ +@ECHO ON + +:: set pkg-config path so that host deps can be found +:: (set as env var so it's used by both meson and during build with g-ir-scanner) +set "PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig;%LIBRARY_PREFIX%\share\pkgconfig;%BUILD_PREFIX%\Library\lib\pkgconfig" + +:: get mixed path (forward slash) form of prefix so host prefix replacement works +set "LIBRARY_PREFIX_M=%LIBRARY_PREFIX:\=/%" + +cd rtsp_server + +%BUILD_PREFIX%\Scripts\meson.exe setup builddir --wrap-mode=nofallback --buildtype=release --prefix=%LIBRARY_PREFIX_M% --backend=ninja -Dexamples=disabled -Dintrospection=enabled -Dtests=disabled -Dc_link_args=intl.dll.lib +if errorlevel 1 exit 1 + +ninja -v -C builddir -j %CPU_COUNT% +if errorlevel 1 exit 1 + +ninja -C builddir install -j %CPU_COUNT% +if errorlevel 1 exit 1 + +del %LIBRARY_PREFIX%\bin\*.pdb diff --git a/recipe/install_rtsp_server.sh b/recipe/install_rtsp_server.sh new file mode 100644 index 0000000..1ff6879 --- /dev/null +++ b/recipe/install_rtsp_server.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -ex + +pushd rtsp_server + +mkdir build +pushd build + +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PREFIX/lib/pkgconfig:$BUILD_PREFIX/lib/pkgconfig +EXTRA_FLAGS="-Dintrospection=enabled" +if [[ $CONDA_BUILD_CROSS_COMPILATION == "1" ]]; then + # Use Meson cross-file flag to enable cross compilation + EXTRA_FLAGS="--cross-file $BUILD_PREFIX/meson_cross_file.txt -Dintrospection=disabled" +fi + +export PKG_CONFIG=$(which pkg-config) + +meson_options=( + -Dexamples=disabled + -Dtests=disabled +) + +if [ -n "$OSX_ARCH" ] ; then + # disable X11 plugins on macOS + meson_options+=(-Dx11=disabled) + meson_options+=(-Dxvideo=disabled) + meson_options+=(-Dxshm=disabled) +fi + +meson --prefix=${PREFIX} \ + --libdir=$PREFIX/lib \ + --buildtype=release \ + $EXTRA_FLAGS \ + --wrap-mode=nofallback \ + "${meson_options[@]}" \ + .. +ninja -j${CPU_COUNT} +ninja install diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e48f4ee..5b20690 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,6 +8,9 @@ package: source: - url: https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-{{ version }}.tar.xz sha256: dc661603221293dccc740862425eb54fbbed60fb29d08c801d440a6a3ff82680 + - url: https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-{{ version }}.tar.xz + sha256: 415e8a53a9844789770dd4f116ac2e3a4a33de42673c57acc25c5ba0f4406fc5 + folder: rtsp_server - url: https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-{{ version }}.tar.xz sha256: 4ef9f9ef09025308ce220e2dd22a89e4c992d8ca71b968e3c70af0634ec27933 folder: plugins_base @@ -155,7 +158,60 @@ outputs: GStreamer Base Plug-ins is a well-groomed and well-maintained collection of GStreamer plug-ins and elements, spanning the range of possible types of elements one would want to write for GStreamer. - doc_source_url: https://github.com/GStreamer/gst-plugins-base/tree/master/docs + doc_source_url: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-plugins-base/docs + license: LGPL-2.0-or-later + license_file: COPYING + + - name: gst-rtsp-server + script: install_rtsp_server.sh # [unix] + script: install_rtsp_server.bat # [win] + build: + activate_in_script: true + ignore_run_exports: + # we need cross-python to build, but this isn't a python package + - python # [build_platform != target_platform] + - python_abi # [build_platform != target_platform] + run_exports: + - {{ pin_subpackage('gst-rtsp-server', max_pin='x.x') }} + requirements: + build: + - {{ compiler('c') }} + - {{ stdlib('c') }} + - {{ compiler('cxx') }} + - pkg-config + - meson + - ninja + - gettext-tools + - gobject-introspection + - cross-python_{{ target_platform }} 3.10 # [build_platform != target_platform] + host: + - python 3.10 # [build_platform != target_platform] + - {{ pin_subpackage('gstreamer', exact=True) }} + - {{ pin_subpackage('gst-plugins-base', exact=True) }} + - glib + - libintl-devel # [not linux] + - libiconv + - zlib + run: + - {{ pin_subpackage('gstreamer', exact=True) }} + - {{ pin_subpackage('gst-plugins-base', exact=True) }} + - libsoup # [not ppc64le] + - glib-networking # [not ppc64le] + + test: + commands: + - test -f $PREFIX/include/gstreamer-1.0/gst/rtsp-server/rtsp-server.h # [unix] + - test -f $PREFIX/lib/libgstrtspserver-1.0${SHLIB_EXT} # [unix] + - test -f $PREFIX/lib/gstreamer-1.0/libgstrtspclientsink${SHLIB_EXT} # [unix] + - if not exist %LIBRARY_INC%\\gstreamer-1.0\\gst\\rtsp-server\\rtsp-server.h # [win] + - if not exist %LIBRARY_LIB%\\libgstrtspserver-1.0.dll # [win] + - if not exist %LIBRARY_LIB%\\libgstrtspclientsink.dll # [win] + - gst-inspect-1.0 --plugin rtspclientsink + about: + summary: GStreamer RTSP Server + description: | + GStreamer RTSP Server is a library on top of GStreamer for building an RTSP server. + doc_source_url: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-rtsp-server/docs license: LGPL-2.0-or-later license_file: COPYING @@ -247,7 +303,7 @@ outputs: all: good looks, good code, and good licensing. Documented and dressed up in tests. If you're looking for a role model to base your own plug-in on here it is. - doc_source_url: https://github.com/GStreamer/gst-plugins-good/tree/master/docs + doc_source_url: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-plugins-good/docs license: LGPL-2.0-or-later license_file: COPYING