1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
4 ;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
5 ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016, 2017, 2022 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
11 ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
12 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages gstreamer)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix gexp)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system meson)
38 #:use-module (guix build-system trivial)
39 #:use-module (guix utils)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages aidc)
42 #:use-module (gnu packages audio)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages cdrom)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages elf)
52 #:use-module (gnu packages flex)
53 #:use-module (gnu packages freedesktop)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages ghostscript)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages graphics)
61 #:use-module (gnu packages graphviz)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages image)
64 #:use-module (gnu packages image-processing)
65 #:use-module (gnu packages iso-codes)
66 #:use-module (gnu packages java)
67 #:use-module (gnu packages libunwind)
68 #:use-module (gnu packages libusb)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages maths)
71 #:use-module (gnu packages mp3)
72 #:use-module (gnu packages multiprecision)
73 #:use-module (gnu packages music)
74 #:use-module (gnu packages ncurses)
75 #:use-module (gnu packages nettle)
76 #:use-module (gnu packages networking)
77 #:use-module (gnu packages ocr)
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages photo)
80 #:use-module (gnu packages pulseaudio)
81 #:use-module (gnu packages qt)
82 #:use-module (gnu packages rdf)
83 #:use-module (gnu packages sdl)
84 #:use-module (gnu packages shells)
85 #:use-module (gnu packages video)
86 #:use-module (gnu packages xorg)
87 #:use-module (gnu packages xdisorg)
88 #:use-module (gnu packages xiph)
89 #:use-module (gnu packages pkg-config)
90 #:use-module (gnu packages ruby)
91 #:use-module (gnu packages speech)
92 #:use-module (gnu packages python)
93 #:use-module (gnu packages ssh)
94 #:use-module (gnu packages telephony)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages version-control)
97 #:use-module (gnu packages vulkan)
98 #:use-module (gnu packages webkit)
99 #:use-module (gnu packages assembly)
100 #:use-module (gnu packages xml))
102 (define-public openni2
111 (url "https://github.com/occipital/OpenNI2")
112 (commit (string-append "v" version "-debian"))))
113 (file-name (git-file-name name version))
115 (base32 "0mfnyzpq53wnzgjfx91xcbx0nrl0lp1vrk1rk20a3gb3kshsr675"))))
116 (build-system gnu-build-system)
118 `(#:tests? #f ; No target
120 (modify-phases %standard-phases
121 (delete 'configure))))
123 `(("graphviz" ,graphviz)
125 ("openjdk" ,openjdk14)
126 ("openjdk:jdk" ,openjdk14 "jdk")
127 ("python" ,python-wrapper)))
129 `(("freeglut3" ,freeglut)
132 (synopsis "Framework for sensor-based 'Natural Interaction")
133 (description "OpenNI is a framework for getting data to support
134 'Natural Interaction', i.e. skeleton tracking, gesture tracking, and similar
135 ways of getting data from humans. It provides the interface for physical devices
136 and for middleware components.")
137 (home-page "https://structure.io/openni")
138 (license license:asl2.0)))
140 (define-public libdc1394
147 (string-append "https://sourceforge.net/projects/" name "/files/"
148 name "-2" "/" version "/" name "-" version ".tar.gz"))
150 (base32 "1v8gq54n1pg8izn7s15yylwjf8r1l1dmzbm2yvf6pv2fmb4mz41b"))))
151 (build-system gnu-build-system)
153 (list doxygen perl pkg-config))
162 (synopsis "1394-Based Digital Camera Control Library")
163 (description "LibDC1394 is a library that provides functionality to control
164 any camera that conforms to the 1394-Based Digital Camera Specification written
165 by the 1394 Trade Association. It utilizes the lowlevel functionality provided
166 by libraw1394 to communicate with the camera. It also uses the video1394 kernel
167 module for the DMA capture of the video flow.")
168 (home-page "https://damien.douxchamps.net/ieee1394/libdc1394/")
169 (license license:lgpl2.0+)))
171 (define-public ccextractor
180 (url "https://github.com/CCExtractor/ccextractor")
181 (commit (string-append "v" version))))
182 (file-name (git-file-name name version))
184 (base32 "1sya45hvv4d46bk7541yimmafgvgyhkpsvwfz9kv6pm4yi1lz6nb"))))
185 (build-system cmake-build-system)
187 `(#:tests? #f ; No target
193 "-DWITH_HARDSUBX=ON")
195 (modify-phases %standard-phases
196 ;; The package is in a sub-dir of this repo.
197 (add-after 'unpack 'chdir
201 (add-after 'chdir 'fix-build-errors
203 (substitute* "CMakeLists.txt"
209 ("pkg-config" ,pkg-config)
210 ("python" ,python-wrapper)))
212 `(("ffmeg" ,ffmpeg-3.4)
214 ("leptonica" ,leptonica)
215 ("ocr" ,tesseract-ocr)
217 (synopsis "Closed Caption Extractor")
218 (description "CCExtractor is a tool that analyzes video files and produces
219 independent subtitle files from the closed captions data. It is portable, small,
221 (home-page "https://www.ccextractor.org/")
222 (license license:gpl2+)))
224 (define-public libvisual
233 (url "https://github.com/Libvisual/libvisual")
234 (commit (string-append name "-" version))))
235 (file-name (git-file-name name version))
237 (base32 "02xwakwkqjsznc03pjlb6hcv1li1gw3r8xvyswqsm4msix5xq18a"))))
238 (build-system gnu-build-system)
241 (modify-phases %standard-phases
242 ;; The package is in a sub-dir of this repo.
243 (add-after 'unpack 'chdir
248 `(("gettext" ,gettext-minimal)
249 ("libintl" ,intltool)
251 ("pkg-config" ,pkg-config)))
256 (search-path-specification
257 (variable "LIBVISUAL_PLUGINS_BASE_DIR")
258 (files '("lib/libvisual-0.4")))))
259 ;; To load libvisual-plugins.
260 (search-paths native-search-paths)
261 (synopsis "Audio visualisation library")
262 (description "Libvisual is a library that acts as a middle layer between
263 applications that want audio visualisation and audio visualisation plugins.")
264 (home-page "http://libvisual.org/")
269 ;; Examples and Tests.
272 (define-public libvisual-plugins
274 (name "libvisual-plugins")
281 (url "https://github.com/Libvisual/libvisual")
282 (commit (string-append name "-" version))))
283 (file-name (git-file-name name version))
285 (base32 "02xwakwkqjsznc03pjlb6hcv1li1gw3r8xvyswqsm4msix5xq18a"))))
286 (build-system gnu-build-system)
290 "--disable-gstreamer-plugin"
293 (string-append "--with-plugins-base-dir=" (assoc-ref %outputs "out")
294 "/lib/libvisual-0.4"))
296 (modify-phases %standard-phases
297 ;; The package is in a sub-dir of this repo.
298 (add-after 'unpack 'chdir
300 (chdir "libvisual-plugins")
305 ("gettext" ,gettext-minimal)
306 ("libintl" ,intltool)
308 ("pkg-config" ,pkg-config)))
310 `(("alsa-lib" ,alsa-lib)
316 ("libxext" ,libxext)))
319 (synopsis "Audio visualisation library")
320 (description "Libvisual is a library that acts as a middle layer between
321 applications that want audio visualisation and audio visualisation plugins.")
322 (home-page "http://libvisual.org/")
323 (license license:gpl2+)))
325 (define-public esound
334 (url "https://gitlab.gnome.org/Archive/esound.git")
335 (commit "ESOUND_0_2_41")))
336 (file-name (git-file-name name version))
338 (base32 "141jg70fim276i8k2kyypm84gy89i1k9mm4yf68mfwnybvjw1d6n"))))
339 (build-system gnu-build-system)
350 (list alsa-lib pcaudiolib tcp-wrappers))
353 (synopsis "Enlightened Sound Daemon")
354 (description "The Enlightened Sound Daemon mixes several audio streams for
355 playback by a single audio device. You can also pre-load samples, and play them
356 back without having to send all the data for the sound. Network transparency is
357 also built in, so you can play sounds on one machine, and listen to them on
359 (home-page "https://web.archive.org/web/20160528230227/
360 http://www.tux.org/~ricdude/overview.html")
374 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
375 "orc/orc-" version ".tar.xz"))
378 "1w0qmyj3v9sb2g7ff39pp38b9850y9hyy0bag26ifrby5f7ksvm6"))))
379 (build-system meson-build-system)
382 (modify-phases %standard-phases
383 (add-after 'unpack 'disable-faulty-test
385 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
386 ;; tests, which fail on some machines. See:
387 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
388 (substitute* '("testsuite/test-limits.c"
389 "testsuite/exec_opcodes_sys.c")
390 (("if \\(error\\) return 1;")
391 "if (error) return 77;"))
394 (list gtk-doc/stable))
395 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
396 (synopsis "Oil runtime compiler")
398 "Orc is a just-in-time compiler implemented as a library and set of
399 associated tools for compiling and executing simple programs that operate on
401 ;; The source code implementing the Marsenne Twister algorithm is licensed
402 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
403 (license (list license:bsd-2 license:bsd-3))))
405 (define-public gstreamer-docs
407 (name "gstreamer-docs")
412 "https://gstreamer.freedesktop.org/src/gstreamer-docs"
413 "/gstreamer-docs-" version ".tar.xz"))
416 "1gziccq5f4fy23q6dm8nwbmzh68gn9rfbqw0xcn4r8yn82545z3k"))))
417 (build-system trivial-build-system)
419 `(#:modules ((guix build utils))
422 (use-modules ((guix build utils)))
423 (let* ((source (assoc-ref %build-inputs "source"))
424 (tar (assoc-ref %build-inputs "tar"))
425 (xz (assoc-ref %build-inputs "xz"))
426 (out (assoc-ref %outputs "out"))
427 (books (string-append out "/share/devhelp/books")))
428 (setenv "PATH" (string-append xz "/bin"))
430 (with-directory-excursion books
431 (invoke (string-append tar "/bin/tar") "-xvf" source
432 "--strip-components=3"
433 (string-append ,name "-" ,version
434 "/devhelp/books/GStreamer")))))))
437 (home-page "https://gstreamer.freedesktop.org/")
438 (synopsis "Developer documentation for GStreamer")
440 "This package contains manuals, tutorials, and API reference for
441 the GStreamer multimedia framework.")
442 ;; The documentation is covered by multiple licenses. Anything not
443 ;; explicitly mentioned below is LGPL2.1+. See README.md for details.
445 ;; The tutorial code can be used with either of these licenses,
446 ;; at the users option.
447 license:lgpl2.1+ license:bsd-2 license:expat
448 ;; The developer manual and plugin writer guide carries
449 ;; the Open Publication License v1.0.
450 (license:fsf-free "https://opencontent.org/openpub/"
451 "The Open Publication License v1.0")
452 ;; Tutorials are covered by CC-BY-SA 4.0.
453 license:cc-by-sa4.0))))
455 ;; Increase the test timeouts to accommodate slow or busy machines.
456 (define %common-gstreamer-phases
457 '((add-after 'unpack 'increase-test-timeout
459 (substitute* "tests/check/meson.build"
460 (("'CK_DEFAULT_TIMEOUT', '[0-9]*'")
461 "'CK_DEFAULT_TIMEOUT', '600'")
462 (("timeout ?: .*\\)")
463 "timeout: 90 * 60)"))))))
465 (define-public gstreamer
473 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
477 "0aisl8nazcfi4b5j6fz8zwpp0k9csb022zniz65b2pxxpdjayzb0"))))
478 (build-system meson-build-system)
481 #~(modify-phases %standard-phases
482 #$@%common-gstreamer-phases
483 #$@(if (string-prefix? "i686" (or (%current-target-system)
485 ;; FIXME: These tests consistently fail in the Guix CI:
486 ;; https://issues.guix.gnu.org/57868
487 '((add-after 'unpack 'disable-systemclock-test
489 (substitute* "tests/check/gst/gstsystemclock.c"
490 (("tcase_add_test \\(tc_chain, \
491 test_stress_cleanup_unschedule.*")
493 (("tcase_add_test \\(tc_chain, \
494 test_stress_reschedule.*")
498 ;; In gstreamer-1.0.pc:
499 ;; Requires: glib-2.0, gobject-2.0
500 ;; Requires.private: gmodule-no-export-2.0 libunwind libdw
501 (list elfutils ; libdw
504 (list bash-completion
508 gobject-introspection
517 (list (search-path-specification
518 (variable "GST_PLUGIN_SYSTEM_PATH")
519 (files '("lib/gstreamer-1.0")))))
520 (home-page "https://gstreamer.freedesktop.org/")
521 (synopsis "Multimedia framework")
523 "GStreamer is a library for constructing graphs of media-handling
524 components. The applications it supports range from simple Ogg/Vorbis
525 playback, audio/video streaming to complex audio mixing and video
528 Applications can take advantage of advances in codec and filter technology
529 transparently. Developers can add new codecs and filters by writing a
530 simple plugin with a clean, generic interface.
532 This package provides the core library and elements.")
533 (license license:lgpl2.0+)))
535 (define-public gst-plugins-base
537 (name "gst-plugins-base")
542 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
543 name "-" version ".tar.xz"))
546 "17rw8wj1x1bg153m9z76pdvgz5k93m3riyalfpzq00x7h7fv6c3y"))))
547 (build-system meson-build-system)
549 (list glib ;required by gstreamer-sdp-1.0.pc
550 gstreamer ;required by gstreamer-plugins-base-1.0.pc
551 libgudev ;required by gstreamer-gl-1.0.pc
552 ;; wayland-client.h is referred to in
553 ;; include/gstreamer-1.0/gst/gl/wayland/gstgldisplay_wayland.h
555 orc)) ;required by gstreamer-audio-1.0.pc
557 ;; TODO: Add libvorbisidec
579 gobject-introspection
582 xorg-server-for-tests))
586 #~(modify-phases %standard-phases
587 #$@%common-gstreamer-phases
588 (add-after 'unpack 'disable-problematic-tests
590 (substitute* "tests/check/meson.build"
591 ;; This test causes nondeterministic failures (see:
592 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/950).
593 ((".*'elements/appsrc.c'.*")
595 ;; Some other tests fail on other architectures.
598 #~((substitute* "tests/check/meson.build"
599 ((".*'libs/libsabi\\.c'.*") ""))))
601 #~((substitute* "tests/check/meson.build"
602 ((".*'libs/gstglcolorconvert\\.c'.*") "")
603 ((".*'libs/gstglcontext\\.c'.*") "")
604 ((".*'libs/gstglmemory\\.c'.*") "")
605 ((".*'libs/gstglupload\\.c'.*") "")
606 ((".*'elements/glimagesink\\.c'.*") "")
607 ((".*'pipelines/gl-launch-lines\\.c'.*") "")
608 ((".*'elements/glstereo\\.c'.*") "")
609 ((".*'elements/glmixer\\.c'.*") ""))))
612 (add-before 'configure 'patch
614 (substitute* "tests/check/libs/pbutils.c"
615 (("/bin/sh") (which "sh")))))
616 (add-before 'check 'pre-check
618 ;; Tests require a running X server.
619 (system "Xvfb :1 +extension GLX &")
620 (setenv "DISPLAY" ":1")
621 ;; Tests write to $HOME.
622 (setenv "HOME" (getcwd))
623 ;; Tests look for $XDG_RUNTIME_DIR.
624 (setenv "XDG_RUNTIME_DIR" (getcwd))
625 ;; For missing '/etc/machine-id'.
626 (setenv "DBUS_FATAL_WARNINGS" "0"))))))
627 (home-page "https://gstreamer.freedesktop.org/")
629 "Plugins for the GStreamer multimedia library")
630 (description "This package provides an essential exemplary set of plug-ins
631 for the GStreamer multimedia library.")
632 (license license:lgpl2.0+)))
634 (define-public gst-plugins-good
636 (name "gst-plugins-good")
643 "https://gstreamer.freedesktop.org/src/" name "/"
644 name "-" version ".tar.xz"))
646 (base32 "1dv8b2md1xk6d45ir1wzbvqhxbvm6mxv881rjl0brnjwpw3c5wzq"))))
647 (build-system meson-build-system)
650 #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
652 #~(modify-phases %standard-phases
653 #$@%common-gstreamer-phases
654 (add-after 'unpack 'absolutize-libsoup-library
655 (lambda* (#:key inputs #:allow-other-keys)
657 (search-input-file inputs "lib/libsoup-3.0.so"))
659 (substitute* "ext/soup/gstsouploader.c"
660 (("(#define LIBSOUP_3_SONAME ).+$" _ prefix)
661 (string-append prefix "\"" libsoup "\"\n")))))
662 (add-after 'unpack 'skip-failing-tests
664 (substitute* "tests/check/meson.build"
665 ;; Reported as shaky upstream, see
666 ;; <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/785>
667 (("\\[ 'elements/flvmux' \\]") "[ 'elements/flvmux', true ]"))))
668 (add-before 'check 'pre-check
670 ;; Tests require a running X server.
671 (system "Xvfb :1 +extension GLX &")
672 (setenv "DISPLAY" ":1")
673 ;; Tests write to $HOME.
674 (setenv "HOME" (getcwd))
675 ;; Tests look for $XDG_RUNTIME_DIR.
676 (setenv "XDG_RUNTIME_DIR" (getcwd))
677 ;; For missing '/etc/machine-id'.
678 (setenv "DBUS_FATAL_WARNINGS" "0"))))))
680 (list gettext-minimal
682 gobject-introspection
683 gsettings-desktop-schemas
688 xorg-server-for-tests))
727 (list gstreamer gst-plugins-base))
728 (synopsis "GStreamer plugins and helper libraries")
729 (description "GStreamer-Plugins-Good is a collection of plug-ins you'd want
730 to have right next to you on the battlefield. Shooting sharp and making no
731 mistakes, these plug-ins have it all: good looks, good code, and good
732 licensing. Documented and dressed up in tests. If you're looking for a role
733 model to base your own plug-in on, here it is.")
734 (home-page "https://gstreamer.freedesktop.org/")
735 (license license:lgpl2.0+)))
737 (define-public gst-plugins-bad
739 (name "gst-plugins-bad")
743 (uri (string-append "https://gstreamer.freedesktop.org/src/"
744 name "/" name "-" version ".tar.xz"))
747 "0kys6m5hg5bc30wfg8qa3s7dmkdz3kj1j8lhvn3267fxalxw24bs"))
748 (modules '((guix build utils)))
751 ;; Delete bundled copy of usrsctp.
752 (delete-file-recursively "ext/sctp/usrsctp")))))
753 (build-system meson-build-system)
756 #:configure-flags #~(list "-Dsctp-internal-usrsctp=disabled")
757 #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
759 #~(modify-phases %standard-phases
760 #$@%common-gstreamer-phases
761 #$@(if (string-prefix? "arm" (or (%current-target-system)
763 ;; Disable test that fails on ARMv7.
764 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
765 `((add-after 'unpack 'disable-asfmux-test
767 (substitute* "tests/check/meson.build"
768 (("\\[\\['elements/asfmux\\.c'\\]\\],")
771 (add-after 'unpack 'adjust-tests
772 (lambda* (#:key native-inputs inputs #:allow-other-keys)
773 (let ((gst-plugins-good (assoc-ref (or native-inputs inputs)
774 "gst-plugins-good")))
775 (substitute* "tests/check/meson.build"
776 ;; Make gst-plugin-good available for tests, see
777 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1426
778 (("'GST_PLUGIN_SYSTEM_PATH_1_0', ''")
779 (string-append "'GST_PLUGIN_SYSTEM_PATH_1_0', '"
780 gst-plugins-good "/lib/gstreamer-1.0'"))
782 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136
783 ((".*elements/msdkh264enc\\.c.*") "")
784 ((".*elements/svthevcenc\\.c.*") "")
786 ;; The 'elements_shm.test_shm_live' test sometimes times out
788 ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/790).
789 ((".*'elements/shm\\.c'.*") "")
791 ;; FIXME: Why is this failing.
792 ((".*elements/dash_mpd\\.c.*") "")
794 ;; These tests are flaky and occasionally time out:
795 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/932
796 ((".*elements/curlhttpsrc\\.c.*") "")
797 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1412
798 ((".*elements/dtls\\.c.*") ""))
799 (substitute* "tests/check/elements/zxing.c"
800 ;; zxing 1.2.0 seemingly changed the type representation of
801 ;; the EAN_13 structure; disable it.
804 (add-before 'check 'pre-check
806 ;; Tests require a running X server.
807 (system "Xvfb :1 +extension GLX &")
808 (setenv "DISPLAY" ":1")
809 ;; Tests write to $HOME.
810 (setenv "HOME" (getcwd))
811 ;; Tests look for $XDG_RUNTIME_DIR.
812 (setenv "XDG_RUNTIME_DIR" (getcwd))
813 ;; For missing '/etc/machine-id'.
814 (setenv "DBUS_FATAL_WARNINGS" "0"))))))
816 (list gstreamer gst-plugins-base))
818 (list gettext-minimal
819 `(,glib "bin") ; for glib-mkenums, etc.
820 gobject-introspection
821 gsettings-desktop-schemas
822 gst-plugins-good ;for tests
826 xorg-server-for-tests))
829 (if (target-x86?) (list mediasdk) '())
830 (if (target-x86-64?) (list svt-hevc) '())
920 webrtc-audio-processing
925 (home-page "https://gstreamer.freedesktop.org/")
926 (synopsis "Plugins for the GStreamer multimedia library")
928 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
929 par compared to the rest.")
930 (license license:lgpl2.0+)))
932 (define-public gst-plugins-ugly
934 (name "gst-plugins-ugly")
940 (string-append "https://gstreamer.freedesktop.org/src/"
941 name "/" name "-" version ".tar.xz"))
943 (base32 "1zdfsq0zm1d3wj3w3z44bf3v28clr8yd6qzmkjs09hq9k9w21alc"))))
944 (build-system meson-build-system)
946 (list #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
948 #~(modify-phases %standard-phases
949 #$@%common-gstreamer-phases
950 (add-before 'check 'pre-check
952 ;; Tests require a running X server.
953 (system "Xvfb :1 +extension GLX &")
954 (setenv "DISPLAY" ":1")
955 ;; Tests write to $HOME.
956 (setenv "HOME" (getcwd))
957 ;; Tests look for $XDG_RUNTIME_DIR.
958 (setenv "XDG_RUNTIME_DIR" (getcwd))
959 ;; For missing '/etc/machine-id'.
960 (setenv "DBUS_FATAL_WARNINGS" "0"))))))
962 (list gettext-minimal
964 gobject-introspection
965 gsettings-desktop-schemas
969 xorg-server-for-tests))
981 (list gstreamer gst-plugins-base))
982 (synopsis "GStreamer plugins and helper libraries")
983 (description "Gst-Plugins-Ugly are the ones that might have a patent noose
984 around their neck, or a lock-up license, or any other problem that makes you
985 think twice about shipping them.")
986 (home-page "https://gstreamer.freedesktop.org/")
987 (license license:lgpl2.0+)))
989 (define-public gst-libav
998 "https://gstreamer.freedesktop.org/src/" name "/"
999 name "-" version ".tar.xz"))
1001 (base32 "1zkxybdzdkn07wwmj0rrgxyvbry472dggjv2chdsmpzwc02x3v9z"))))
1002 (build-system meson-build-system)
1004 (list perl pkg-config python-wrapper ruby))
1008 (list gstreamer gst-plugins-base))
1009 (synopsis "GStreamer plugins and helper libraries")
1010 (description "Gst-Libav contains a GStreamer plugin for using the encoders,
1011 decoders, muxers, and demuxers provided by FFmpeg.")
1012 (home-page "https://gstreamer.freedesktop.org/")
1013 (license license:lgpl2.0+)))
1015 (define-public gst-editing-services
1017 (name "gst-editing-services")
1022 "https://gstreamer.freedesktop.org/src/" name "/"
1023 "gst-editing-services-" version ".tar.xz"))
1026 "18msiadg6wi1636ylp02yfiwphxlz39gh3vbxchl9qpvd7g9dn2z"))))
1027 (build-system meson-build-system)
1030 #:tests? #f ; FIXME: 16/23 failing tests.
1031 #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1032 #:phases #~(modify-phases %standard-phases
1033 #$@%common-gstreamer-phases)))
1035 (list gstreamer gst-plugins-base))
1037 (list glib glib-networking gtk+ libxml2))
1040 gobject-introspection
1047 (home-page "https://gstreamer.freedesktop.org/")
1048 (synopsis "GStreamer library for non-linear editors")
1050 "This is a high-level library for facilitating the creation of audio/video
1051 non-linear editors.")
1052 (license license:gpl2+)))
1054 (define-public gst-plugins/selection
1055 (lambda* (pkg #:key plugins configure-flags)
1056 "Build PKG with only PLUGINS enabled. Optionally, if CONFIGURE-FLAGS are
1057 given, also pass them to the build system instead of the ones used by PKG."
1058 (package/inherit pkg
1060 (substitute-keyword-arguments (package-arguments pkg)
1061 ((#:configure-flags flags #~'())
1064 #$@(map (lambda (plugin)
1065 (string-append "-D" plugin "=enabled"))
1067 #$(or configure-flags flags)))
1069 #~(modify-phases #$phases
1070 (add-after 'unpack 'disable-auto-plugins
1072 (substitute* "meson_options.txt"
1073 (("'auto'") "'disabled'")))))))))))
1075 (define-public gst-plugins-bad-minimal
1077 (inherit (gst-plugins/selection gst-plugins-bad #:plugins '()))
1078 (name "gst-plugins-bad-minimal")
1079 (description "This package provides the smallest selection of GStreamer's
1080 \"bad\" plugin set, essentially containing libraries and the gst-transcoder
1081 binary, but none of the actual plugins.")))
1083 (define-public python-gst
1090 "https://gstreamer.freedesktop.org/src/gst-python/"
1091 "gst-python-" version ".tar.xz"))
1094 "1p6g05k88nbbv5x9madsvphxcdkfl1z0lmp39p6bhmg9x8h82d6v"))))
1095 (build-system meson-build-system)
1098 #:modules `((guix build meson-build-system)
1100 ((guix build python-build-system) #:prefix python:))
1101 #:imported-modules `(,@%meson-build-system-modules
1102 (guix build python-build-system))
1104 #~(list (string-append
1105 "-Dpygi-overrides-dir="
1106 (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
1108 (list pkg-config python))
1110 (list gst-plugins-base python-pygobject))
1111 (home-page "https://gstreamer.freedesktop.org/")
1112 (synopsis "GStreamer GObject Introspection overrides for Python")
1114 "This package contains GObject Introspection overrides for Python that can
1115 be used by Python applications using GStreamer.")
1116 (license license:lgpl2.1+)
1117 (properties `((upstream-name . "gst-python")))))
1119 (define-public gst123
1125 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
1126 version ".tar.bz2"))
1129 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
1130 (build-system gnu-build-system)
1132 (list gtk+-2 ncurses gstreamer gst-plugins-base))
1135 (home-page "https://space.twc.de/~stefan/gst123.php")
1136 (synopsis "Flexible command line media player based on gstreamer")
1137 (description "The program gst123 is designed to be a more flexible command
1138 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
1139 framework. It plays all file formats gstreamer supports, so if you have a
1140 music collection which contains different file formats, like flac, ogg and
1141 mp3, you can use gst123 to play all your music files.")
1142 (license license:lgpl2.0+)))