ustreamer: add janus-gateway webrtc support

Co-authored-by: Nick Cao <nickcao@nichi.co>
This commit is contained in:
matthewcroughan
2024-06-17 10:46:44 +01:00
co-authored by Nick Cao
parent 0923a053fb
commit aaa7a2619a
+34 -3
View File
@@ -1,5 +1,19 @@
{ lib, stdenv, fetchFromGitHub, libbsd, libevent, libjpeg, libdrm, pkg-config }:
{ lib
, stdenv
, fetchFromGitHub
, libbsd
, libevent
, libjpeg
, libdrm
, pkg-config
, janus-gateway
, glib
, alsa-lib
, speex
, jansson
, libopus
, withJanus ? true
}:
stdenv.mkDerivation rec {
pname = "ustreamer";
version = "6.12";
@@ -11,13 +25,30 @@ stdenv.mkDerivation rec {
hash = "sha256-iaCgPHgklk7tbhJhQmyjKggb1bMWBD+Zurgfk9sCQ3E=";
};
buildInputs = [ libbsd libevent libjpeg libdrm ];
buildInputs = [
libbsd
libevent
libjpeg
libdrm
] ++ lib.optionals withJanus [
janus-gateway
glib
alsa-lib
jansson
speex
libopus
];
nativeBuildInputs = [ pkg-config ];
makeFlags = [
"PREFIX=${placeholder "out"}"
"WITH_V4P=1"
] ++ lib.optionals withJanus [
"WITH_JANUS=1"
# Workaround issues with Janus C Headers
# https://github.com/pikvm/ustreamer/blob/793f24c4/docs/h264.md#fixing-janus-c-headers
"CFLAGS=-I${lib.getDev janus-gateway}/include/janus"
];
enableParallelBuilding = true;