nongnu: Add obs-ndi.
* nongnu/packages/video.scm (obs-ndi): New variable.
This commit is contained in:
parent
d8399b1e58
commit
e505a9b2e2
|
@ -3,6 +3,7 @@
|
||||||
;;; Copyright © 2024 Oleg Pykhalov <go.wigust@gmail.com>
|
;;; Copyright © 2024 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
|
|
||||||
(define-module (nongnu packages video)
|
(define-module (nongnu packages video)
|
||||||
|
#:use-module (gnu packages)
|
||||||
#:use-module (gnu packages avahi)
|
#:use-module (gnu packages avahi)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
#:use-module (gnu packages gawk)
|
#:use-module (gnu packages gawk)
|
||||||
#:use-module (gnu packages gcc)
|
#:use-module (gnu packages gcc)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (gnu packages qt)
|
||||||
#:use-module (gnu packages video)
|
#:use-module (gnu packages video)
|
||||||
#:use-module (guix build utils)
|
#:use-module (guix build utils)
|
||||||
#:use-module (guix build-system cmake)
|
#:use-module (guix build-system cmake)
|
||||||
|
@ -282,3 +284,53 @@ Once you have downloaded the file, re-run the installation.")
|
||||||
(license
|
(license
|
||||||
(nonguix-license:nonfree
|
(nonguix-license:nonfree
|
||||||
"https://downloads.ndi.tv/SDK/NDI_SDK/NDI%20License%20Agreement.pdf"))))
|
"https://downloads.ndi.tv/SDK/NDI_SDK/NDI%20License%20Agreement.pdf"))))
|
||||||
|
|
||||||
|
(define-public obs-ndi
|
||||||
|
(package
|
||||||
|
(name "obs-ndi")
|
||||||
|
(version "4.11.1")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/DistroAV/DistroAV")
|
||||||
|
(commit version)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1wsb1k0jilcn6gqgpq5kq8hjiwnb6mi2w32fsqgb88iicwj1qa3y"))
|
||||||
|
(patches (append (search-patches "obs-ndi-hardcode-path.patch")))))
|
||||||
|
(build-system cmake-build-system)
|
||||||
|
(inputs (list ndi obs qtbase-5))
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:tests? #f ;no tests
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-before 'configure 'ndi
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((ndi #$(this-package-input "ndi")))
|
||||||
|
(substitute* "src/obs-ndi.cpp"
|
||||||
|
(("@NDI@") ndi))
|
||||||
|
(delete-file-recursively "lib/ndi")
|
||||||
|
(symlink (string-append ndi "/include")
|
||||||
|
"lib/ndi"))))
|
||||||
|
(add-after 'install 'obs-plugins
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(mkdir-p (string-append #$output "/lib/obs-plugins"))
|
||||||
|
(symlink
|
||||||
|
(string-append #$output
|
||||||
|
"/obs-plugins/64bit/obs-ndi.so")
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/obs-plugins/obs-ndi.so")))))))
|
||||||
|
(home-page "https://github.com/DistroAV/DistroAV")
|
||||||
|
(synopsis "Network Audio/Video in OBS-Studio using NDI technology")
|
||||||
|
(description "This packages provides a network A/V plugin for OBS Studio.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
@itemize
|
||||||
|
@item NDI Source: Receive NDI video and audio in OBS.
|
||||||
|
@item NDI Output: Transmit OBS video and audio to NDI.
|
||||||
|
@item NDI Filter (a.k.a. NDI Dedicated Output): Transmit a single OBS source
|
||||||
|
or scene audio to NDI.
|
||||||
|
@end itemize\n")
|
||||||
|
(license license:gpl2)))
|
||||||
|
|
14
obs-ndi-hardcode-path.patch
Normal file
14
obs-ndi-hardcode-path.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--- a/src/obs-ndi.cpp 1970-01-01 03:00:01.000000000 +0300
|
||||||
|
+++ b/src/obs-ndi.cpp 2024-08-04 03:58:33.271766959 +0300
|
||||||
|
@@ -229,10 +229,7 @@
|
||||||
|
if (!path.isEmpty()) {
|
||||||
|
locations << path;
|
||||||
|
}
|
||||||
|
-#if defined(__linux__) || defined(__APPLE__)
|
||||||
|
- locations << "/usr/lib";
|
||||||
|
- locations << "/usr/local/lib";
|
||||||
|
-#endif
|
||||||
|
+ locations << "@NDI@/lib";
|
||||||
|
for (QString location : locations) {
|
||||||
|
path = QDir::cleanPath(
|
||||||
|
QDir(location).absoluteFilePath(NDILIB_LIBRARY_NAME));
|
Loading…
Reference in New Issue
Block a user