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 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 download)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system meson)
37 #:use-module (guix build-system trivial)
38 #:use-module (guix utils)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages aidc)
41 #:use-module (gnu packages audio)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages cdrom)
47 #:use-module (gnu packages curl)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages flex)
52 #:use-module (gnu packages freedesktop)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages ghostscript)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages gnupg)
59 #:use-module (gnu packages graphics)
60 #:use-module (gnu packages graphviz)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages image-processing)
64 #:use-module (gnu packages iso-codes)
65 #:use-module (gnu packages java)
66 #:use-module (gnu packages libunwind)
67 #:use-module (gnu packages libusb)
68 #:use-module (gnu packages linux)
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages mp3)
71 #:use-module (gnu packages multiprecision)
72 #:use-module (gnu packages music)
73 #:use-module (gnu packages ncurses)
74 #:use-module (gnu packages nettle)
75 #:use-module (gnu packages networking)
76 #:use-module (gnu packages ocr)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages photo)
79 #:use-module (gnu packages pulseaudio)
80 #:use-module (gnu packages qt)
81 #:use-module (gnu packages rdf)
82 #:use-module (gnu packages sdl)
83 #:use-module (gnu packages shells)
84 #:use-module (gnu packages video)
85 #:use-module (gnu packages xorg)
86 #:use-module (gnu packages xdisorg)
87 #:use-module (gnu packages xiph)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages ruby)
90 #:use-module (gnu packages speech)
91 #:use-module (gnu packages python)
92 #:use-module (gnu packages ssh)
93 #:use-module (gnu packages telephony)
94 #:use-module (gnu packages tls)
95 #:use-module (gnu packages version-control)
96 #:use-module (gnu packages vulkan)
97 #:use-module (gnu packages webkit)
98 #:use-module (gnu packages assembly)
99 #:use-module (gnu packages xml))
101 (define-public openni2
110 (url "https://github.com/occipital/OpenNI2")
111 (commit (string-append "v" version "-debian"))))
112 (file-name (git-file-name name version))
114 (base32 "0mfnyzpq53wnzgjfx91xcbx0nrl0lp1vrk1rk20a3gb3kshsr675"))))
115 (build-system gnu-build-system)
117 `(#:tests? #f ; No target
119 (modify-phases %standard-phases
120 (delete 'configure))))
122 `(("graphviz" ,graphviz)
124 ("openjdk" ,openjdk14)
125 ("openjdk:jdk" ,openjdk14 "jdk")
126 ("python" ,python-wrapper)))
128 `(("freeglut3" ,freeglut)
131 (synopsis "Framework for sensor-based 'Natural Interaction")
132 (description "OpenNI is a framework for getting data to support
133 'Natural Interaction', i.e. skeleton tracking, gesture tracking, and similar
134 ways of getting data from humans. It provides the interface for physical devices
135 and for middleware components.")
136 (home-page "https://structure.io/openni")
137 (license license:asl2.0)))
139 (define-public libdc1394
146 (string-append "https://sourceforge.net/projects/" name "/files/"
147 name "-2" "/" version "/" name "-" version ".tar.gz"))
149 (base32 "1v8gq54n1pg8izn7s15yylwjf8r1l1dmzbm2yvf6pv2fmb4mz41b"))))
150 (build-system gnu-build-system)
152 (list doxygen perl pkg-config))
161 (synopsis "1394-Based Digital Camera Control Library")
162 (description "LibDC1394 is a library that provides functionality to control
163 any camera that conforms to the 1394-Based Digital Camera Specification written
164 by the 1394 Trade Association. It utilizes the lowlevel functionality provided
165 by libraw1394 to communicate with the camera. It also uses the video1394 kernel
166 module for the DMA capture of the video flow.")
167 (home-page "https://damien.douxchamps.net/ieee1394/libdc1394/")
168 (license license:lgpl2.0+)))
170 (define-public ccextractor
179 (url "https://github.com/CCExtractor/ccextractor")
180 (commit (string-append "v" version))))
181 (file-name (git-file-name name version))
183 (base32 "1sya45hvv4d46bk7541yimmafgvgyhkpsvwfz9kv6pm4yi1lz6nb"))))
184 (build-system cmake-build-system)
186 `(#:tests? #f ; No target
192 "-DWITH_HARDSUBX=ON")
194 (modify-phases %standard-phases
195 ;; The package is in a sub-dir of this repo.
196 (add-after 'unpack 'chdir
200 (add-after 'chdir 'fix-build-errors
202 (substitute* "CMakeLists.txt"
208 ("pkg-config" ,pkg-config)
209 ("python" ,python-wrapper)))
211 `(("ffmeg" ,ffmpeg-3.4)
213 ("leptonica" ,leptonica)
214 ("ocr" ,tesseract-ocr)
216 (synopsis "Closed Caption Extractor")
217 (description "CCExtractor is a tool that analyzes video files and produces
218 independent subtitle files from the closed captions data. It is portable, small,
220 (home-page "https://www.ccextractor.org/")
221 (license license:gpl2+)))
223 (define-public libvisual
232 (url "https://github.com/Libvisual/libvisual")
233 (commit (string-append name "-" version))))
234 (file-name (git-file-name name version))
236 (base32 "02xwakwkqjsznc03pjlb6hcv1li1gw3r8xvyswqsm4msix5xq18a"))))
237 (build-system gnu-build-system)
240 (modify-phases %standard-phases
241 ;; The package is in a sub-dir of this repo.
242 (add-after 'unpack 'chdir
247 `(("gettext" ,gettext-minimal)
248 ("libintl" ,intltool)
250 ("pkg-config" ,pkg-config)))
255 (search-path-specification
256 (variable "LIBVISUAL_PLUGINS_BASE_DIR")
257 (files '("lib/libvisual-0.4")))))
258 ;; To load libvisual-plugins.
259 (search-paths native-search-paths)
260 (synopsis "Audio visualisation library")
261 (description "Libvisual is a library that acts as a middle layer between
262 applications that want audio visualisation and audio visualisation plugins.")
263 (home-page "http://libvisual.org/")
268 ;; Examples and Tests.
271 (define-public libvisual-plugins
273 (name "libvisual-plugins")
280 (url "https://github.com/Libvisual/libvisual")
281 (commit (string-append name "-" version))))
282 (file-name (git-file-name name version))
284 (base32 "02xwakwkqjsznc03pjlb6hcv1li1gw3r8xvyswqsm4msix5xq18a"))))
285 (build-system gnu-build-system)
289 "--disable-gstreamer-plugin"
292 (string-append "--with-plugins-base-dir=" (assoc-ref %outputs "out")
293 "/lib/libvisual-0.4"))
295 (modify-phases %standard-phases
296 ;; The package is in a sub-dir of this repo.
297 (add-after 'unpack 'chdir
299 (chdir "libvisual-plugins")
304 ("gettext" ,gettext-minimal)
305 ("libintl" ,intltool)
307 ("pkg-config" ,pkg-config)))
309 `(("alsa-lib" ,alsa-lib)
315 ("libxext" ,libxext)))
318 (synopsis "Audio visualisation library")
319 (description "Libvisual is a library that acts as a middle layer between
320 applications that want audio visualisation and audio visualisation plugins.")
321 (home-page "http://libvisual.org/")
322 (license license:gpl2+)))
324 (define-public esound
333 (url "https://gitlab.gnome.org/Archive/esound.git")
334 (commit "ESOUND_0_2_41")))
335 (file-name (git-file-name name version))
337 (base32 "141jg70fim276i8k2kyypm84gy89i1k9mm4yf68mfwnybvjw1d6n"))))
338 (build-system gnu-build-system)
349 (list alsa-lib pcaudiolib tcp-wrappers))
352 (synopsis "Enlightened Sound Daemon")
353 (description "The Enlightened Sound Daemon mixes several audio streams for
354 playback by a single audio device. You can also pre-load samples, and play them
355 back without having to send all the data for the sound. Network transparency is
356 also built in, so you can play sounds on one machine, and listen to them on
358 (home-page "https://web.archive.org/web/20160528230227/
359 http://www.tux.org/~ricdude/overview.html")
373 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
374 "orc/orc-" version ".tar.xz"))
377 "1w0qmyj3v9sb2g7ff39pp38b9850y9hyy0bag26ifrby5f7ksvm6"))))
378 (build-system meson-build-system)
381 (modify-phases %standard-phases
382 (add-after 'unpack 'disable-faulty-test
384 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
385 ;; tests, which fail on some machines. See:
386 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
387 (substitute* '("testsuite/test-limits.c"
388 "testsuite/exec_opcodes_sys.c")
389 (("if \\(error\\) return 1;")
390 "if (error) return 77;"))
393 (list gtk-doc/stable))
394 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
395 (synopsis "Oil runtime compiler")
397 "Orc is a just-in-time compiler implemented as a library and set of
398 associated tools for compiling and executing simple programs that operate on
400 ;; The source code implementing the Marsenne Twister algorithm is licensed
401 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
402 (license (list license:bsd-2 license:bsd-3))))
404 (define-public gstreamer-docs
406 (name "gstreamer-docs")
411 "https://gstreamer.freedesktop.org/src/gstreamer-docs"
412 "/gstreamer-docs-" version ".tar.xz"))
415 "1xvqrqv1zxqdpvd02dvr0xspk30c8b940vvnr9x75a08nx0x75xh"))))
416 (build-system trivial-build-system)
418 `(#:modules ((guix build utils))
421 (use-modules ((guix build utils)))
422 (let* ((source (assoc-ref %build-inputs "source"))
423 (tar (assoc-ref %build-inputs "tar"))
424 (xz (assoc-ref %build-inputs "xz"))
425 (out (assoc-ref %outputs "out"))
426 (books (string-append out "/share/devhelp/books")))
427 (setenv "PATH" (string-append xz "/bin"))
429 (with-directory-excursion books
430 (invoke (string-append tar "/bin/tar") "-xvf" source
431 "--strip-components=3"
432 (string-append ,name "-" ,version
433 "/devhelp/books/GStreamer")))))))
436 (home-page "https://gstreamer.freedesktop.org/")
437 (synopsis "Developer documentation for GStreamer")
439 "This package contains manuals, tutorials, and API reference for
440 the GStreamer multimedia framework.")
441 ;; The documentation is covered by multiple licenses. Anything not
442 ;; explicitly mentioned below is LGPL2.1+. See README.md for details.
444 ;; The tutorial code can be used with either of these licenses,
445 ;; at the users option.
446 license:lgpl2.1+ license:bsd-2 license:expat
447 ;; The developer manual and plugin writer guide carries
448 ;; the Open Publication License v1.0.
449 (license:fsf-free "https://opencontent.org/openpub/"
450 "The Open Publication License v1.0")
451 ;; Tutorials are covered by CC-BY-SA 4.0.
452 license:cc-by-sa4.0))))
454 ;; Increase the test timeouts to accommodate slow or busy machines.
455 (define %common-gstreamer-phases
456 '((add-after 'unpack 'increase-test-timeout
458 (substitute* "tests/check/meson.build"
459 (("'CK_DEFAULT_TIMEOUT', '[0-9]*'")
460 "'CK_DEFAULT_TIMEOUT', '600'")
461 (("timeout ?: .*\\)")
462 "timeout: 90 * 60)"))))))
464 (define-public gstreamer
472 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
476 "02p8my6dzmm4rvd93s3qnh8w5bm9bh4f7gdydbsvnn9llqr251jm"))))
477 (build-system meson-build-system)
480 (modify-phases %standard-phases
481 ,@%common-gstreamer-phases
482 ;; FIXME: Since switching to the meson-build-system, two tests
483 ;; started failing on i686. See
484 ;; <https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/499>.
485 ,@(if (string-prefix? "i686" (or (%current-target-system)
487 `((add-after 'unpack 'disable-some-tests
489 (substitute* "tests/check/gst/gstsystemclock.c"
490 (("tcase_add_test \\(tc_chain, test_stress_cleanup_unschedule.*")
492 (("tcase_add_test \\(tc_chain, test_stress_reschedule.*")
495 (add-after 'unpack 'disable-problematic-tests
497 ;; Disable the 'pipelines-seek' test, which appears to be load
499 ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/854).
500 (substitute* "tests/check/meson.build"
501 ((".*'pipelines/seek.c'.*")
504 ;; In gstreamer-1.0.pc:
505 ;; Requires: glib-2.0, gobject-2.0
506 ;; Requires.private: gmodule-no-export-2.0 libunwind libdw
507 (list elfutils ; libdw
510 `(("bash-completion" ,bash-completion)
513 ("gettext" ,gettext-minimal)
515 ("gobject-introspection" ,gobject-introspection)
517 ("pkg-config" ,pkg-config)
518 ("python-wrapper" ,python-wrapper)))
524 (list (search-path-specification
525 (variable "GST_PLUGIN_SYSTEM_PATH")
526 (files '("lib/gstreamer-1.0")))))
527 (home-page "https://gstreamer.freedesktop.org/")
528 (synopsis "Multimedia framework")
530 "GStreamer is a library for constructing graphs of media-handling
531 components. The applications it supports range from simple Ogg/Vorbis
532 playback, audio/video streaming to complex audio mixing and video
535 Applications can take advantage of advances in codec and filter technology
536 transparently. Developers can add new codecs and filters by writing a
537 simple plugin with a clean, generic interface.
539 This package provides the core library and elements.")
540 (license license:lgpl2.0+)))
542 (define-public gst-plugins-base
544 (name "gst-plugins-base")
549 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
550 name "-" version ".tar.xz"))
553 "18vg8kk7p2p8za8zaqg0v7z6898yw5a3b12vvl7xn02pb3s7l2wn"))))
554 (build-system meson-build-system)
556 `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
557 ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
558 ;; wayland-client.h is referred to in
559 ;; include/gstreamer-1.0/gst/gl/wayland/gstgldisplay_wayland.h
561 ;; XXX: Do not enable Orc optimizations on ARM systems because
562 ;; it leads to two test failures.
563 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683
564 ,@(if (string-prefix? "arm" (or (%current-target-system)
567 `(("orc" ,orc))))) ;required by gstreamer-audio-1.0.pc
569 ;; TODO: Add libvorbisidec
570 `(("cdparanoia" ,cdparanoia)
573 ("libtheora" ,libtheora)
574 ("libvorbis" ,libvorbis)
579 ("alsa-lib" ,alsa-lib)
581 ("graphene" ,graphene)
582 ("iso-codes" ,iso-codes)
583 ("libgudev" ,libgudev)
584 ("libjpeg" ,libjpeg-turbo)
586 ("libvisual" ,libvisual)
588 ("wayland-protocols" ,wayland-protocols)))
590 `(("pkg-config" ,pkg-config)
591 ("glib:bin" ,glib "bin")
592 ("gobject-introspection" ,gobject-introspection)
593 ("python-wrapper" ,python-wrapper)
594 ("gettext" ,gettext-minimal)
595 ("xorg-server" ,xorg-server-for-tests)))
598 (modify-phases %standard-phases
599 ,@%common-gstreamer-phases
600 (add-after 'unpack 'disable-problematic-tests
602 (substitute* "tests/check/meson.build"
603 ;; This test causes nondeterministic failures (see:
604 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/950).
605 ((".*'elements/appsrc.c'.*")
607 (add-before 'configure 'patch
609 (substitute* "tests/check/libs/pbutils.c"
610 (("/bin/sh") (which "sh")))))
611 (add-before 'check 'pre-check
613 ;; Tests require a running X server.
614 (system "Xvfb :1 +extension GLX &")
615 (setenv "DISPLAY" ":1")
616 ;; Tests write to $HOME.
617 (setenv "HOME" (getcwd))
618 ;; Tests look for $XDG_RUNTIME_DIR.
619 (setenv "XDG_RUNTIME_DIR" (getcwd))
620 ;; For missing '/etc/machine-id'.
621 (setenv "DBUS_FATAL_WARNINGS" "0"))))))
622 (home-page "https://gstreamer.freedesktop.org/")
624 "Plugins for the GStreamer multimedia library")
625 (description "This package provides an essential exemplary set of plug-ins
626 for the GStreamer multimedia library.")
627 (license license:lgpl2.0+)))
629 (define-public gst-plugins-good
631 (name "gst-plugins-good")
638 "https://gstreamer.freedesktop.org/src/" name "/"
639 name "-" version ".tar.xz"))
640 (patches (search-patches "gst-plugins-good-fix-test.patch"))
642 (base32 "0svrapawych2s3lm4lx3x023zxq5kcx50jnfmh0qigszfskyxbis"))))
643 (build-system meson-build-system)
645 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
647 (modify-phases %standard-phases
648 ,@%common-gstreamer-phases
649 (add-before 'check 'pre-check
651 ;; Tests require a running X server.
652 (system "Xvfb :1 +extension GLX &")
653 (setenv "DISPLAY" ":1")
654 ;; Tests write to $HOME.
655 (setenv "HOME" (getcwd))
656 ;; Tests look for $XDG_RUNTIME_DIR.
657 (setenv "XDG_RUNTIME_DIR" (getcwd))
658 ;; For missing '/etc/machine-id'.
659 (setenv "DBUS_FATAL_WARNINGS" "0")
662 `(("gettext" ,gettext-minimal)
663 ("glib:bin" ,glib "bin")
664 ("gobject-introspection" ,gobject-introspection)
665 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
667 ("pkg-config" ,pkg-config)
668 ("python-wrapper" ,python-wrapper)
670 ("xorg-server" ,xorg-server-for-tests)))
676 ("librsvg" ,(librsvg-for-system))
678 ("glib-networking" ,glib-networking)
683 ("libavc1394" ,libavc1394)
686 ("libgudev" ,libgudev)
687 ("libiec61883" ,libiec61883)
688 ("libjpeg" ,libjpeg-turbo)
690 ("libshout" ,libshout)
694 ("libxdamage" ,libxdamage)
695 ("libxfixes" ,libxfixes)
697 ("libxshm" ,libxshmfence)
701 ("pulseaudio" ,pulseaudio)
705 ("v4l-utils" ,v4l-utils)
709 (list gstreamer gst-plugins-base))
710 (synopsis "GStreamer plugins and helper libraries")
711 (description "GStreamer-Plugins-Good is a collection of plug-ins you'd want
712 to have right next to you on the battlefield. Shooting sharp and making no
713 mistakes, these plug-ins have it all: good looks, good code, and good
714 licensing. Documented and dressed up in tests. If you're looking for a role
715 model to base your own plug-in on, here it is.")
716 (home-page "https://gstreamer.freedesktop.org/")
717 (license license:lgpl2.0+)))
719 (define-public gst-plugins-bad
721 (name "gst-plugins-bad")
725 (uri (string-append "https://gstreamer.freedesktop.org/src/"
726 name "/" name "-" version ".tar.xz"))
729 "13k7mm2wmsbhd04a20v9lj4afpf0w33ambpwlrw8bl7hjhxr4r51"))
730 (modules '((guix build utils)))
733 ;; Delete bundled copy of usrsctp.
734 (delete-file-recursively "ext/sctp/usrsctp")))))
735 (build-system meson-build-system)
737 `(#:configure-flags '("-Dsctp-internal-usrsctp=disabled")
738 #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
740 (modify-phases %standard-phases
741 ,@%common-gstreamer-phases
742 ,@(if (string-prefix? "arm" (or (%current-target-system)
744 ;; Disable test that fails on ARMv7.
745 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
746 `((add-after 'unpack 'disable-asfmux-test
748 (substitute* "tests/check/meson.build"
749 (("\\[\\['elements/asfmux\\.c'\\]\\],")
752 (add-after 'unpack 'adjust-tests
753 (lambda* (#:key native-inputs inputs #:allow-other-keys)
754 (let ((gst-plugins-good (assoc-ref (or native-inputs inputs)
755 "gst-plugins-good")))
756 (substitute* "tests/check/meson.build"
757 ;; Make gst-plugin-good available for tests, see
758 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1426
759 (("'GST_PLUGIN_SYSTEM_PATH_1_0', ''")
760 (string-append "'GST_PLUGIN_SYSTEM_PATH_1_0', '"
761 gst-plugins-good "/lib/gstreamer-1.0'"))
763 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136
764 ((".*elements/msdkh264enc\\.c.*") "")
765 ((".*elements/svthevcenc\\.c.*") "")
767 ;; The 'elements_shm.test_shm_live' test sometimes times out
769 ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/790).
770 ((".*'elements/shm\\.c'.*") "")
772 ;; FIXME: Why is this failing.
773 ((".*elements/dash_mpd\\.c.*") "")
775 ;; These tests are flaky and occasionally time out:
776 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/932
777 ((".*elements/curlhttpsrc\\.c.*") "")
778 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1412
779 ((".*elements/dtls\\.c.*") ""))
780 (substitute* "tests/check/elements/zxing.c"
781 ;; zxing 1.2.0 seemingly changed the type representation of
782 ;; the EAN_13 structure; disable it.
785 (add-before 'check 'pre-check
787 ;; Tests require a running X server.
788 (system "Xvfb :1 +extension GLX &")
789 (setenv "DISPLAY" ":1")
790 ;; Tests write to $HOME.
791 (setenv "HOME" (getcwd))
792 ;; Tests look for $XDG_RUNTIME_DIR.
793 (setenv "XDG_RUNTIME_DIR" (getcwd))
794 ;; For missing '/etc/machine-id'.
795 (setenv "DBUS_FATAL_WARNINGS" "0"))))))
797 (list gstreamer gst-plugins-base))
799 `(("gettext" ,gettext-minimal)
800 ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
801 ("gobject-introspection" ,gobject-introspection)
802 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
803 ("gst-plugins-good" ,gst-plugins-good) ;for tests
805 ("pkg-config" ,pkg-config)
806 ("python" ,python-wrapper)
807 ("xorg-server" ,xorg-server-for-tests)))
812 ;; ("ccextractor" ,ccextractor)
813 ("chromaprint" ,chromaprint)
815 ("directfb" ,directfb)
820 ("fluidsynth" ,fluidsynth)
822 ("glib-networking" ,glib-networking)
832 ("libdc1394" ,libdc1394)
834 ("libde265" ,libde265)
836 ("libdvdnav" ,libdvdnav)
837 ("libdvdread" ,libdvdread)
840 ("libgcrypt" ,libgcrypt)
842 ("libgudev" ,libgudev)
846 ("libmodplug" ,libmodplug)
847 ("libmpcdec" ,libmpcdec)
850 ("libopenmpt" ,libopenmpt)
852 ("libsndfile" ,libsndfile)
858 ("libvdpau" ,libvdpau)
863 ("libxkbcommon" ,libxkbcommon)
865 ("libxshm" ,libxshmfence)
870 ("mjpegtools" ,mjpegtools)
874 ;; ("opencv" ,opencv)
876 ("openh264" ,openh264)
877 ("openjpeg" ,openjpeg)
878 ;; ("openni2" ,openni2)
879 ("opensles" ,opensles)
886 ("sctp" ,lksctp-tools)
887 ("soundtouch" ,soundtouch)
890 ("svthevcenc" ,svt-hevc)
891 ("tinyalsa" ,tinyalsa)
892 ("transcode" ,transcode)
895 ("voaacenc" ,vo-aacenc)
896 ("voamrwbenc" ,vo-amrwbenc)
897 ("vulkan-headers" ,vulkan-headers)
898 ("vulkan-loader" ,vulkan-loader)
901 ("webrtcdsp" ,webrtc-audio-processing)
902 ("wildmidi" ,wildmidi)
903 ("wpebackend-fdo" ,wpebackend-fdo)
905 ("zxing" ,zxing-cpp-1.2)))
906 (home-page "https://gstreamer.freedesktop.org/")
907 (synopsis "Plugins for the GStreamer multimedia library")
909 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
910 par compared to the rest.")
911 (license license:lgpl2.0+)))
913 (define-public gst-plugins-ugly
915 (name "gst-plugins-ugly")
921 (string-append "https://gstreamer.freedesktop.org/src/"
922 name "/" name "-" version ".tar.xz"))
924 (base32 "1nb6kz3gbn8r0sld6xkm16qpgyb2bvhafb7sff9rgagqk0z80cnz"))))
925 (build-system meson-build-system)
927 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
929 (modify-phases %standard-phases
930 ,@%common-gstreamer-phases
931 (add-before 'check 'pre-check
933 ;; Tests require a running X server.
934 (system "Xvfb :1 +extension GLX &")
935 (setenv "DISPLAY" ":1")
936 ;; Tests write to $HOME.
937 (setenv "HOME" (getcwd))
938 ;; Tests look for $XDG_RUNTIME_DIR.
939 (setenv "XDG_RUNTIME_DIR" (getcwd))
940 ;; For missing '/etc/machine-id'.
941 (setenv "DBUS_FATAL_WARNINGS" "0"))))))
943 `(("gettext" ,gettext-minimal)
944 ("glib:bin" ,glib "bin")
945 ("gobject-introspection" ,gobject-introspection)
946 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
948 ("pkg-config" ,pkg-config)
949 ("python-wrapper" ,python-wrapper)
950 ("xorg-server" ,xorg-server-for-tests)))
962 (list gstreamer gst-plugins-base))
963 (synopsis "GStreamer plugins and helper libraries")
964 (description "Gst-Plugins-Ugly are the ones that might have a patent noose
965 around their neck, or a lock-up license, or any other problem that makes you
966 think twice about shipping them.")
967 (home-page "https://gstreamer.freedesktop.org/")
968 (license license:lgpl2.0+)))
970 (define-public gst-libav
979 "https://gstreamer.freedesktop.org/src/" name "/"
980 name "-" version ".tar.xz"))
982 (base32 "0j55jgk9sbhinfx2gsg21q609x6yzrixrn5xxlxd378fj6500bl2"))))
983 (build-system meson-build-system)
985 (list perl pkg-config python-wrapper ruby))
989 (list gstreamer gst-plugins-base))
990 (synopsis "GStreamer plugins and helper libraries")
991 (description "Gst-Libav contains a GStreamer plugin for using the encoders,
992 decoders, muxers, and demuxers provided by FFmpeg.")
993 (home-page "https://gstreamer.freedesktop.org/")
994 (license license:lgpl2.0+)))
996 (define-public gst-editing-services
998 (name "gst-editing-services")
1003 "https://gstreamer.freedesktop.org/src/" name "/"
1004 "gst-editing-services-" version ".tar.xz"))
1007 "1x8db4021qv4ypq1g6n5q2awrb7glr4xp1h650c3w7q59lwsix4a"))))
1008 (build-system meson-build-system)
1010 ;; FIXME: 16/22 failing tests.
1012 #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1013 #:phases (modify-phases %standard-phases
1014 ,@%common-gstreamer-phases)))
1016 (list gstreamer gst-plugins-base))
1018 (list glib glib-networking gtk+ libxml2))
1021 ("gobject-introspection" ,gobject-introspection)
1022 ("glib:bin" ,glib "bin")
1023 ("gst-plugins-bad" ,gst-plugins-bad)
1024 ("gst-plugins-good" ,gst-plugins-good)
1026 ("pkg-config" ,pkg-config)
1027 ("python" ,python-wrapper)))
1028 (home-page "https://gstreamer.freedesktop.org/")
1029 (synopsis "GStreamer library for non-linear editors")
1031 "This is a high-level library for facilitating the creation of audio/video
1032 non-linear editors.")
1033 (license license:gpl2+)))
1035 (define-public gst-plugins/selection
1036 (lambda* (pkg #:key plugins configure-flags)
1037 "Build PKG with only PLUGINS enabled. Optionally, if CONFIGURE-FLAGS are
1038 given, also pass them to the build system instead of the ones used by PKG."
1039 (package/inherit pkg
1041 (substitute-keyword-arguments (package-arguments pkg)
1042 ((#:configure-flags flags `(,@(or configure-flags '())))
1045 ,@(map (lambda (plugin)
1046 (string-append "-D" plugin "=enabled"))
1048 (list ,@(or configure-flags flags))))
1050 `(modify-phases ,phases
1051 (add-after 'unpack 'disable-auto-plugins
1053 (substitute* "meson_options.txt"
1054 (("'auto'") "'disabled'"))
1057 (define-public python-gst
1064 "https://gstreamer.freedesktop.org/src/gst-python/"
1065 "gst-python-" version ".tar.xz"))
1068 "0lmwwmr3wm56qlrdrb0d5cpmqxkcmarz61wmp1nrv5852f3qadjk"))))
1069 (build-system meson-build-system)
1071 `(#:modules ((guix build meson-build-system)
1073 ((guix build python-build-system) #:prefix python:))
1074 #:imported-modules (,@%meson-build-system-modules
1075 (guix build python-build-system))
1077 (list (string-append
1078 "-Dpygi-overrides-dir="
1079 (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
1081 (list pkg-config python))
1083 (list gst-plugins-base python-pygobject))
1084 (home-page "https://gstreamer.freedesktop.org/")
1085 (synopsis "GStreamer GObject Introspection overrides for Python")
1087 "This package contains GObject Introspection overrides for Python that can
1088 be used by Python applications using GStreamer.")
1089 (license license:lgpl2.1+)))
1091 (define-public gst123
1097 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
1098 version ".tar.bz2"))
1101 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
1102 (build-system gnu-build-system)
1104 (list gtk+-2 ncurses gstreamer gst-plugins-base))
1107 (home-page "https://space.twc.de/~stefan/gst123.php")
1108 (synopsis "Flexible command line media player based on gstreamer")
1109 (description "The program gst123 is designed to be a more flexible command
1110 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
1111 framework. It plays all file formats gstreamer supports, so if you have a
1112 music collection which contains different file formats, like flac, ogg and
1113 mp3, you can use gst123 to play all your music files.")
1114 (license license:lgpl2.0+)))