Loading pkgs/os-specific/linux/v4l2-relayd/default.nix 0 → 100644 +81 −0 Original line number Diff line number Diff line { lib , stdenv , fetchgit , autoreconfHook , coreutils , glib , gnugrep , gst_all_1 , icamerasrc , libtool , makeWrapper , pkg-config , which }: let gst = [ gst_all_1.gstreamer.out gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good icamerasrc ]; in stdenv.mkDerivation rec { pname = "v4l2-relayd-${icamerasrc.ipuVersion}"; version = "0.1.3"; src = fetchgit { url = "https://git.launchpad.net/v4l2-relayd"; rev = "refs/tags/upstream/${version}"; hash = "sha256-oU6naDFZ0PQVHZ3brANfMULDqYMYxeJN+MCUCvN/DpU="; }; patches = [ ./upstream-v4l2loopback-compatibility.patch ]; nativeBuildInputs = [ autoreconfHook libtool makeWrapper pkg-config which ]; buildInputs = [ glib ] ++ gst; preConfigure = "./autogen.sh --prefix=$out"; postInstall = '' mkdir -p $out/lib/systemd/system $out/etc/default cp data/systemd/v4l2-relayd.service $out/lib/systemd/system cp data/etc/default/v4l2-relayd $out/etc/default substituteInPlace $out/lib/systemd/system/v4l2-relayd.service \ --replace grep ${gnugrep}/bin/grep \ --replace cut ${coreutils}/bin/cut \ --replace /usr/bin/test ${coreutils}/bin/test \ --replace /usr/bin/v4l2-relayd $out/bin/v4l2-relayd \ --replace /etc/default $out/etc/default \ --replace "DeviceAllow=char-video4linux" "" substituteInPlace $out/etc/default/v4l2-relayd \ --replace 'FORMAT=YUY2' 'FORMAT=NV12' \ --replace 'CARD_LABEL="Virtual Camera"' 'CARD_LABEL="Intel MIPI Camera"' \ --replace 'VIDEOSRC="videotestsrc"' 'VIDEOSRC="icamerasrc"' wrapProgram $out/bin/v4l2-relayd \ --prefix GST_PLUGIN_PATH : ${lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" gst} ''; meta = with lib; { description = "Streaming relay for v4l2loopback using GStreamer"; homepage = "https://git.launchpad.net/v4l2-relayd"; license = licenses.gpl2; maintainers = with maintainers; [ betaboon ]; platforms = [ "x86_64-linux" ]; }; } pkgs/os-specific/linux/v4l2-relayd/upstream-v4l2loopback-compatibility.patch 0 → 100644 +16 −0 Original line number Diff line number Diff line diff --git a/src/v4l2-relayd.c b/src/v4l2-relayd.c index 21bb0d5..cfc9e27 100644 --- a/src/v4l2-relayd.c +++ b/src/v4l2-relayd.c @@ -27,7 +27,10 @@ #include <gst/app/gstappsrc.h> #include <gst/video/video-info.h> -#define V4L2_EVENT_PRI_CLIENT_USAGE V4L2_EVENT_PRIVATE_START +#define V4L2LOOPBACK_EVENT_BASE (V4L2_EVENT_PRIVATE_START) +#define V4L2LOOPBACK_EVENT_OFFSET 0x08E00000 +#define V4L2_EVENT_PRI_CLIENT_USAGE \ + (V4L2LOOPBACK_EVENT_BASE + V4L2LOOPBACK_EVENT_OFFSET + 1) struct v4l2_event_client_usage { __u32 count; pkgs/top-level/all-packages.nix +7 −0 Original line number Diff line number Diff line Loading @@ -27424,6 +27424,13 @@ with pkgs; v4l-utils = qt5.callPackage ../os-specific/linux/v4l-utils { }; v4l2-relayd-ipu6 = callPackage ../os-specific/linux/v4l2-relayd { icamerasrc = gst_all_1.icamerasrc-ipu6; }; v4l2-relayd-ipu6ep = callPackage ../os-specific/linux/v4l2-relayd { icamerasrc = gst_all_1.icamerasrc-ipu6ep; }; vendir = callPackage ../development/tools/vendir { }; vndr = callPackage ../development/tools/vndr { }; Loading
pkgs/os-specific/linux/v4l2-relayd/default.nix 0 → 100644 +81 −0 Original line number Diff line number Diff line { lib , stdenv , fetchgit , autoreconfHook , coreutils , glib , gnugrep , gst_all_1 , icamerasrc , libtool , makeWrapper , pkg-config , which }: let gst = [ gst_all_1.gstreamer.out gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good icamerasrc ]; in stdenv.mkDerivation rec { pname = "v4l2-relayd-${icamerasrc.ipuVersion}"; version = "0.1.3"; src = fetchgit { url = "https://git.launchpad.net/v4l2-relayd"; rev = "refs/tags/upstream/${version}"; hash = "sha256-oU6naDFZ0PQVHZ3brANfMULDqYMYxeJN+MCUCvN/DpU="; }; patches = [ ./upstream-v4l2loopback-compatibility.patch ]; nativeBuildInputs = [ autoreconfHook libtool makeWrapper pkg-config which ]; buildInputs = [ glib ] ++ gst; preConfigure = "./autogen.sh --prefix=$out"; postInstall = '' mkdir -p $out/lib/systemd/system $out/etc/default cp data/systemd/v4l2-relayd.service $out/lib/systemd/system cp data/etc/default/v4l2-relayd $out/etc/default substituteInPlace $out/lib/systemd/system/v4l2-relayd.service \ --replace grep ${gnugrep}/bin/grep \ --replace cut ${coreutils}/bin/cut \ --replace /usr/bin/test ${coreutils}/bin/test \ --replace /usr/bin/v4l2-relayd $out/bin/v4l2-relayd \ --replace /etc/default $out/etc/default \ --replace "DeviceAllow=char-video4linux" "" substituteInPlace $out/etc/default/v4l2-relayd \ --replace 'FORMAT=YUY2' 'FORMAT=NV12' \ --replace 'CARD_LABEL="Virtual Camera"' 'CARD_LABEL="Intel MIPI Camera"' \ --replace 'VIDEOSRC="videotestsrc"' 'VIDEOSRC="icamerasrc"' wrapProgram $out/bin/v4l2-relayd \ --prefix GST_PLUGIN_PATH : ${lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" gst} ''; meta = with lib; { description = "Streaming relay for v4l2loopback using GStreamer"; homepage = "https://git.launchpad.net/v4l2-relayd"; license = licenses.gpl2; maintainers = with maintainers; [ betaboon ]; platforms = [ "x86_64-linux" ]; }; }
pkgs/os-specific/linux/v4l2-relayd/upstream-v4l2loopback-compatibility.patch 0 → 100644 +16 −0 Original line number Diff line number Diff line diff --git a/src/v4l2-relayd.c b/src/v4l2-relayd.c index 21bb0d5..cfc9e27 100644 --- a/src/v4l2-relayd.c +++ b/src/v4l2-relayd.c @@ -27,7 +27,10 @@ #include <gst/app/gstappsrc.h> #include <gst/video/video-info.h> -#define V4L2_EVENT_PRI_CLIENT_USAGE V4L2_EVENT_PRIVATE_START +#define V4L2LOOPBACK_EVENT_BASE (V4L2_EVENT_PRIVATE_START) +#define V4L2LOOPBACK_EVENT_OFFSET 0x08E00000 +#define V4L2_EVENT_PRI_CLIENT_USAGE \ + (V4L2LOOPBACK_EVENT_BASE + V4L2LOOPBACK_EVENT_OFFSET + 1) struct v4l2_event_client_usage { __u32 count;
pkgs/top-level/all-packages.nix +7 −0 Original line number Diff line number Diff line Loading @@ -27424,6 +27424,13 @@ with pkgs; v4l-utils = qt5.callPackage ../os-specific/linux/v4l-utils { }; v4l2-relayd-ipu6 = callPackage ../os-specific/linux/v4l2-relayd { icamerasrc = gst_all_1.icamerasrc-ipu6; }; v4l2-relayd-ipu6ep = callPackage ../os-specific/linux/v4l2-relayd { icamerasrc = gst_all_1.icamerasrc-ipu6ep; }; vendir = callPackage ../development/tools/vendir { }; vndr = callPackage ../development/tools/vndr { };