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 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages gstreamer)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system meson)
33 #:use-module (guix utils)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages audio)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages cdrom)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages freedesktop)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages gnupg)
46 #:use-module (gnu packages graphics)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages libusb)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages mp3)
52 #:use-module (gnu packages ncurses)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages qt)
56 #:use-module (gnu packages rdf)
57 #:use-module (gnu packages video)
58 #:use-module (gnu packages xorg)
59 #:use-module (gnu packages xiph)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages ssh)
63 #:use-module (gnu packages telephony)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages version-control)
66 #:use-module (gnu packages assembly)
67 #:use-module (gnu packages xml))
75 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
76 "orc/orc-" version ".tar.xz"))
77 (patches (search-patches "orc-typedef-enum.patch"))
80 "0wj93im7i8a6546q2r8sp39yjfbxflkc0ygb0b8iqsd58qhvjhds"))))
81 (build-system meson-build-system)
84 (modify-phases %standard-phases
85 (add-after 'unpack 'disable-faulty-test
87 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
88 ;; tests, which fail on some machines. See:
89 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
90 (substitute* '("testsuite/test-limits.c"
91 "testsuite/exec_opcodes_sys.c")
92 (("if \\(error\\) return 1;")
93 "if (error) return 77;"))
96 `(("gtk-doc" ,gtk-doc)))
97 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
98 (synopsis "Oil runtime compiler")
100 "Orc is a just-in-time compiler implemented as a library and set of
101 associated tools for compiling and executing simple programs that operate on
103 ;; The source code implementing the Marsenne Twister algorithm is licensed
104 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
105 (license (list license:bsd-2 license:bsd-3))))
107 (define-public gstreamer
115 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
119 "0z9pyhf6zm1r0spw6zym80bvbyx6h8xg9h6535csbnn48ws1q882"))))
120 (build-system gnu-build-system)
121 (outputs '("out" "doc"))
124 (list (string-append "--with-html-dir="
125 (assoc-ref %outputs "doc")
126 "/share/gtk-doc/html"))))
127 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
132 ("gobject-introspection" ,gobject-introspection)
134 ("pkg-config" ,pkg-config)
135 ("python-wrapper" ,python-wrapper)))
137 (list (search-path-specification
138 (variable "GST_PLUGIN_SYSTEM_PATH")
139 (files '("lib/gstreamer-1.0")))))
140 (home-page "https://gstreamer.freedesktop.org/")
141 (synopsis "Multimedia library")
143 "GStreamer is a library for constructing graphs of media-handling
144 components. The applications it supports range from simple Ogg/Vorbis
145 playback, audio/video streaming to complex audio mixing and video
148 Applications can take advantage of advances in codec and filter technology
149 transparently. Developers can add new codecs and filters by writing a
150 simple plugin with a clean, generic interface.
152 This package provides the core library and elements.")
153 (license license:lgpl2.0+)))
155 (define-public gst-plugins-base
157 (name "gst-plugins-base")
162 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
163 name "-" version ".tar.xz"))
166 "0aybbwnzm15074smdk2bamj3ssck3hjvmilvgh49f19xjf4w8g2w"))))
167 (build-system gnu-build-system)
168 (outputs '("out" "doc"))
170 `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
171 ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
172 ("orc" ,orc))) ;required by gstreamer-audio-1.0.pc
174 `(("cdparanoia" ,cdparanoia)
177 ("libtheora" ,libtheora)
178 ("libvorbis" ,libvorbis)
183 ("alsa-lib" ,alsa-lib)
184 ;; XXX Don't build with opus on 32-bit systems:
185 ;; <https://bugs.gnu.org/32360>
186 ,@(if (target-64bit?)
190 `(("pkg-config" ,pkg-config)
191 ("glib:bin" ,glib "bin")
192 ("gobject-introspection" ,gobject-introspection)
193 ("python-wrapper" ,python-wrapper)))
195 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
197 (list (string-append "--with-html-dir="
198 (assoc-ref %outputs "doc")
199 "/share/gtk-doc/html"))
201 (modify-phases %standard-phases
202 (add-before 'configure 'patch
204 (substitute* "tests/check/libs/pbutils.c"
205 (("/bin/sh") (which "sh")))
207 (home-page "https://gstreamer.freedesktop.org/")
209 "Plugins for the GStreamer multimedia library")
210 (description "This package provides an essential exemplary set of plug-ins
211 for the GStreamer multimedia library.")
212 (license license:lgpl2.0+)))
214 (define-public gst-plugins-good
216 (name "gst-plugins-good")
222 "https://gstreamer.freedesktop.org/src/" name "/"
223 name "-" version ".tar.xz"))
226 "07wgz9anf4ram2snp8n1wv6l0q3pd00iaw8bvw3wgklg05lvxflz"))))
227 (build-system gnu-build-system)
232 ("gdk-pixbuf" ,gdk-pixbuf)
233 ("gst-plugins-base" ,gst-plugins-base)
237 ("libavc1394" ,libavc1394)
240 ("libiec61883" ,libiec61883)
243 ("libshout" ,libshout)
248 ("pulseaudio" ,pulseaudio)
252 ("wavpack" ,wavpack)))
254 `(("glib:bin" ,glib "bin")
255 ("pkg-config" ,pkg-config)
256 ("python-wrapper" ,python-wrapper)))
259 (modify-phases %standard-phases
261 'unpack 'disable-failing-tests
263 ;; Disable tests that fail non-deterministically.
264 ;; This test fails on aarch64 on 1.12.x.
265 (substitute* "tests/check/elements/alpha.c"
266 (("tcase_add_test \\(tc_chain, test_chromakeying\\);" all)
267 (string-append "/* " all " */")))
269 (home-page "https://gstreamer.freedesktop.org/")
271 "Plugins for the GStreamer multimedia library")
272 (description "GStreamer Good Plug-ins is a set of plug-ins for the
273 GStreamer multimedia library. This set contains those plug-ins which the
274 developers consider to have good quality code and correct functionality.")
275 (license license:lgpl2.0+)))
277 (define-public gst-plugins-bad
279 (name "gst-plugins-bad")
283 (uri (string-append "https://gstreamer.freedesktop.org/src/"
284 name "/" name "-" version ".tar.xz"))
287 "1dddqacxgp77f3nl153x5a6139wdphc9phds2fpqb2cv6faiqj2n"))))
288 (outputs '("out" "doc"))
289 (build-system gnu-build-system)
291 '(#:tests? #f ; XXX: 13 of 53 tests fail
293 ;; FIXME: OpenEXR 2.4.0 requires C++ 11 or later. Remove when the
294 ;; default compiler is >= GCC 5.
295 #:make-flags '("CXXFLAGS=-std=gnu++11")
298 (list (string-append "--with-html-dir="
299 (assoc-ref %outputs "doc")
300 "/share/gtk-doc/html"))))
302 `(("gst-plugins-base" ,gst-plugins-base)))
304 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
305 ("gobject-introspection" ,gobject-introspection)
306 ("pkg-config" ,pkg-config)
309 ;; XXX: The following dependencies are missing:
310 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
311 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
312 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
313 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
317 ("fluidsynth" ,fluidsynth)
321 ("libdvdnav" ,libdvdnav)
322 ("libdvdread" ,libdvdread)
323 ("libgcrypt" ,libgcrypt)
324 ("libgudev" ,libgudev)
326 ("libmodplug" ,libmodplug)
328 ("libsndfile" ,libsndfile)
332 ("libvdpau" ,libvdpau)
340 ("openjpeg" ,openjpeg)
345 ;("qtdeclarative" ,qtdeclarative)
346 ;("qtx11extras" ,qtx11extras)
347 ("soundtouch" ,soundtouch)
349 ("wayland" ,wayland)))
350 (home-page "https://gstreamer.freedesktop.org/")
351 (synopsis "Plugins for the GStreamer multimedia library")
353 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
354 par compared to the rest.")
355 (license license:lgpl2.0+)))
357 (define-public gst-plugins-ugly
359 (name "gst-plugins-ugly")
364 (uri (string-append "https://gstreamer.freedesktop.org/src/"
365 name "/" name "-" version ".tar.xz"))
368 "07cajqjs8pqchpf2sm87hljx4ibwvkiavqxmacxsr5airar17yab"))))
369 (build-system gnu-build-system)
371 `(("gst-plugins-base" ,gst-plugins-base)
374 ("libmpeg2" ,libmpeg2)
375 ("libdvdread" ,libdvdread)
378 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
379 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
382 `(("glib:bin" ,glib "bin")
383 ("pkg-config" ,pkg-config)
384 ("python-wrapper" ,python-wrapper)))
385 (home-page "https://gstreamer.freedesktop.org/")
386 (synopsis "GStreamer plugins from the \"ugly\" set")
387 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
388 which the developers consider to have good quality code but that might pose
389 distribution problems in some jurisdictions, e.g. due to patent threats.")
390 (license license:lgpl2.0+)))
392 (define-public gst-libav
399 "https://gstreamer.freedesktop.org/src/" name "/"
400 name "-" version ".tar.xz"))
403 "1i31ra0l77cfahb6k5xpx45zwvpskzm848aijsbbx9x4x65799g8"))
404 (modules '((guix build utils)))
407 ;; Drop bundled ffmpeg.
408 (delete-file-recursively "gst-libs/ext/libav")
410 (build-system gnu-build-system)
412 '(#:configure-flags '("--with-system-libav")))
414 `(("pkg-config" ,pkg-config)
417 `(("gst-plugins-base" ,gst-plugins-base)
421 (home-page "https://gstreamer.freedesktop.org/")
422 (synopsis "Plugins for the GStreamer multimedia library")
424 "This GStreamer plugin supports a large number of audio and video
425 compression formats through the use of the libav library.")
426 (license license:gpl2+)))
428 (define-public python-gst
435 "https://gstreamer.freedesktop.org/src/gst-python/"
436 "gst-python-" version ".tar.xz"))
439 "12bl6kc0ny2vyf6klas2bwqcv0pi55q9ns5zw261px16a6awhsdl"))))
440 (build-system gnu-build-system)
442 `(#:modules ((guix build gnu-build-system)
443 ((guix build python-build-system) #:prefix python:))
444 #:imported-modules (,@%gnu-build-system-modules
445 (guix build python-build-system))
448 "--with-pygi-overrides-dir="
449 (python:site-packages %build-inputs %outputs) "gi/overrides"))))
451 `(("pkg-config" ,pkg-config)
454 `(("gst-plugins-base" ,gst-plugins-base)
455 ("python-pygobject" ,python-pygobject)))
456 (home-page "https://gstreamer.freedesktop.org/")
457 (synopsis "GStreamer GObject Introspection overrides for Python")
459 "This package contains GObject Introspection overrides for Python that can
460 be used by Python applications using GStreamer.")
461 (license license:lgpl2.1+)
462 (properties `((python2-variant . ,(delay python2-gst))))))
464 (define-public python2-gst
465 (package (inherit python-gst)
468 `(("pkg-config" ,pkg-config)
469 ("python" ,python-2)))
471 `(("gst-plugins-base" ,gst-plugins-base)
472 ("python-pygobject" ,python2-pygobject)))))
474 (define-public gst123
480 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
484 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
485 (build-system gnu-build-system)
489 ("gstreamer" ,gstreamer)
490 ("gst-plugins-base" ,gst-plugins-base)))
492 `(("pkg-config" ,pkg-config)))
493 (home-page "http://space.twc.de/~stefan/gst123.php")
494 (synopsis "Flexible command line media player based on gstreamer")
495 (description "The program gst123 is designed to be a more flexible command
496 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
497 framework. It plays all file formats gstreamer supports, so if you have a
498 music collection which contains different file formats, like flac, ogg and
499 mp3, you can use gst123 to play all your music files.")
500 (license license:lgpl2.0+)))