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, 2020 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"))
79 "0xb0c7q3xv1ldmz5ipybazb01gy3cijj8622dcx7rbm9lq85zax0"))))
80 (build-system meson-build-system)
83 (modify-phases %standard-phases
84 (add-after 'unpack 'disable-faulty-test
86 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
87 ;; tests, which fail on some machines. See:
88 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
89 (substitute* '("testsuite/test-limits.c"
90 "testsuite/exec_opcodes_sys.c")
91 (("if \\(error\\) return 1;")
92 "if (error) return 77;"))
95 `(("gtk-doc" ,gtk-doc)))
96 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
97 (synopsis "Oil runtime compiler")
99 "Orc is a just-in-time compiler implemented as a library and set of
100 associated tools for compiling and executing simple programs that operate on
102 ;; The source code implementing the Marsenne Twister algorithm is licensed
103 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
104 (license (list license:bsd-2 license:bsd-3))))
106 (define-public gstreamer
114 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
118 "0kp93622y29pck8asvil1fmzf55s2gx76wv475a6izc3cwj49w73"))))
119 (build-system gnu-build-system)
120 (outputs '("out" "doc"))
123 (list (string-append "--with-html-dir="
124 (assoc-ref %outputs "doc")
125 "/share/gtk-doc/html"))))
126 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
131 ("gobject-introspection" ,gobject-introspection)
133 ("pkg-config" ,pkg-config)
134 ("python-wrapper" ,python-wrapper)))
136 (list (search-path-specification
137 (variable "GST_PLUGIN_SYSTEM_PATH")
138 (files '("lib/gstreamer-1.0")))))
139 (home-page "https://gstreamer.freedesktop.org/")
140 (synopsis "Multimedia library")
142 "GStreamer is a library for constructing graphs of media-handling
143 components. The applications it supports range from simple Ogg/Vorbis
144 playback, audio/video streaming to complex audio mixing and video
147 Applications can take advantage of advances in codec and filter technology
148 transparently. Developers can add new codecs and filters by writing a
149 simple plugin with a clean, generic interface.
151 This package provides the core library and elements.")
152 (license license:lgpl2.0+)))
154 (define-public gst-plugins-base
156 (name "gst-plugins-base")
161 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
162 name "-" version ".tar.xz"))
165 "0sl1hxlyq46r02k7z70v09vx1gi4rcypqmzra9jid93lzvi76gmi"))))
166 (build-system gnu-build-system)
167 (outputs '("out" "doc"))
169 `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
170 ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
172 ;; XXX: Do not enable Orc optimizations on ARM systems because
173 ;; it leads to two test failures.
174 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683
175 ,@(if (string-prefix? "arm" (or (%current-target-system)
178 `(("orc" ,orc))))) ;required by gstreamer-audio-1.0.pc
180 `(("cdparanoia" ,cdparanoia)
183 ("libtheora" ,libtheora)
184 ("libvorbis" ,libvorbis)
189 ("alsa-lib" ,alsa-lib)
190 ;; XXX Don't build with opus on 32-bit systems:
191 ;; <https://bugs.gnu.org/32360>
192 ,@(if (target-64bit?)
196 `(("pkg-config" ,pkg-config)
197 ("glib:bin" ,glib "bin")
198 ("gobject-introspection" ,gobject-introspection)
199 ("python-wrapper" ,python-wrapper)))
201 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
203 (list (string-append "--with-html-dir="
204 (assoc-ref %outputs "doc")
205 "/share/gtk-doc/html"))
207 (modify-phases %standard-phases
208 (add-before 'configure 'patch
210 (substitute* "tests/check/libs/pbutils.c"
211 (("/bin/sh") (which "sh")))
213 (home-page "https://gstreamer.freedesktop.org/")
215 "Plugins for the GStreamer multimedia library")
216 (description "This package provides an essential exemplary set of plug-ins
217 for the GStreamer multimedia library.")
218 (license license:lgpl2.0+)))
220 (define-public gst-plugins-good
222 (name "gst-plugins-good")
228 "https://gstreamer.freedesktop.org/src/" name "/"
229 name "-" version ".tar.xz"))
232 "068k3cbv1yf3gbllfdzqsg263kzwh21y8dpwr0wvgh15vapkpfs0"))))
233 (build-system gnu-build-system)
238 ("gdk-pixbuf" ,gdk-pixbuf)
239 ("gst-plugins-base" ,gst-plugins-base)
243 ("libavc1394" ,libavc1394)
246 ("libiec61883" ,libiec61883)
249 ("libshout" ,libshout)
254 ("pulseaudio" ,pulseaudio)
258 ("wavpack" ,wavpack)))
260 `(("glib:bin" ,glib "bin")
261 ("pkg-config" ,pkg-config)
262 ("python-wrapper" ,python-wrapper)))
265 (modify-phases %standard-phases
267 'unpack 'disable-failing-tests
269 ;; Disable tests that fail non-deterministically.
270 ;; This test fails on aarch64 on 1.12.x.
271 (substitute* "tests/check/elements/alpha.c"
272 (("tcase_add_test \\(tc_chain, test_chromakeying\\);" all)
273 (string-append "/* " all " */")))
275 (home-page "https://gstreamer.freedesktop.org/")
277 "Plugins for the GStreamer multimedia library")
278 (description "GStreamer Good Plug-ins is a set of plug-ins for the
279 GStreamer multimedia library. This set contains those plug-ins which the
280 developers consider to have good quality code and correct functionality.")
281 (license license:lgpl2.0+)))
283 (define-public gst-plugins-bad
285 (name "gst-plugins-bad")
289 (uri (string-append "https://gstreamer.freedesktop.org/src/"
290 name "/" name "-" version ".tar.xz"))
293 "0x0y0hm0ga3zqi5q4090hw5sjh59y1ry9ak16qsaascm72i7mjzi"))))
294 (outputs '("out" "doc"))
295 (build-system gnu-build-system)
297 '(#:tests? #f ; XXX: 13 of 53 tests fail
299 (list (string-append "--with-html-dir="
300 (assoc-ref %outputs "doc")
301 "/share/gtk-doc/html"))))
303 `(("gst-plugins-base" ,gst-plugins-base)))
305 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
306 ("gobject-introspection" ,gobject-introspection)
307 ("pkg-config" ,pkg-config)
310 ;; XXX: The following dependencies are missing:
311 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
312 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
313 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
314 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
318 ("fluidsynth" ,fluidsynth)
322 ("libdvdnav" ,libdvdnav)
323 ("libdvdread" ,libdvdread)
324 ("libgcrypt" ,libgcrypt)
325 ("libgudev" ,libgudev)
327 ("libmodplug" ,libmodplug)
329 ("libsndfile" ,libsndfile)
333 ("libvdpau" ,libvdpau)
341 ("openjpeg" ,openjpeg)
346 ;("qtdeclarative" ,qtdeclarative)
347 ;("qtx11extras" ,qtx11extras)
348 ("soundtouch" ,soundtouch)
350 ("wayland" ,wayland)))
351 (home-page "https://gstreamer.freedesktop.org/")
352 (synopsis "Plugins for the GStreamer multimedia library")
354 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
355 par compared to the rest.")
356 (license license:lgpl2.0+)))
358 (define-public gst-plugins-ugly
360 (name "gst-plugins-ugly")
365 (uri (string-append "https://gstreamer.freedesktop.org/src/"
366 name "/" name "-" version ".tar.xz"))
369 "1jpvc32x6q01zjkfgh6gmq6aaikiyfwwnhj7bmvn52syhrdl202m"))))
370 (build-system gnu-build-system)
372 `(("gst-plugins-base" ,gst-plugins-base)
375 ("libmpeg2" ,libmpeg2)
376 ("libdvdread" ,libdvdread)
379 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
380 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
383 `(("glib:bin" ,glib "bin")
384 ("pkg-config" ,pkg-config)
385 ("python-wrapper" ,python-wrapper)))
386 (home-page "https://gstreamer.freedesktop.org/")
387 (synopsis "GStreamer plugins from the \"ugly\" set")
388 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
389 which the developers consider to have good quality code but that might pose
390 distribution problems in some jurisdictions, e.g. due to patent threats.")
391 (license license:lgpl2.0+)))
393 (define-public gst-libav
400 "https://gstreamer.freedesktop.org/src/" name "/"
401 name "-" version ".tar.xz"))
404 "1wpfilc98bad9nsv3y1qapxp35dvn2mvwvrmqwrsj58cf09gc967"))
405 (modules '((guix build utils)))
408 ;; Drop bundled ffmpeg.
409 (delete-file-recursively "gst-libs/ext/libav")
411 (build-system gnu-build-system)
413 '(#:configure-flags '("--with-system-libav")))
415 `(("pkg-config" ,pkg-config)
418 `(("gst-plugins-base" ,gst-plugins-base)
422 (home-page "https://gstreamer.freedesktop.org/")
423 (synopsis "Plugins for the GStreamer multimedia library")
425 "This GStreamer plugin supports a large number of audio and video
426 compression formats through the use of the libav library.")
427 (license license:gpl2+)))
429 (define-public python-gst
436 "https://gstreamer.freedesktop.org/src/gst-python/"
437 "gst-python-" version ".tar.xz"))
440 "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390"))))
441 (build-system gnu-build-system)
443 `(#:modules ((guix build gnu-build-system)
444 ((guix build python-build-system) #:prefix python:))
445 #:imported-modules (,@%gnu-build-system-modules
446 (guix build python-build-system))
449 "--with-pygi-overrides-dir="
450 (python:site-packages %build-inputs %outputs) "gi/overrides"))))
452 `(("pkg-config" ,pkg-config)
455 `(("gst-plugins-base" ,gst-plugins-base)
456 ("python-pygobject" ,python-pygobject)))
457 (home-page "https://gstreamer.freedesktop.org/")
458 (synopsis "GStreamer GObject Introspection overrides for Python")
460 "This package contains GObject Introspection overrides for Python that can
461 be used by Python applications using GStreamer.")
462 (license license:lgpl2.1+)
463 (properties `((python2-variant . ,(delay python2-gst))))))
465 (define-public python2-gst
466 (package (inherit python-gst)
469 `(("pkg-config" ,pkg-config)
470 ("python" ,python-2)))
472 `(("gst-plugins-base" ,gst-plugins-base)
473 ("python-pygobject" ,python2-pygobject)))))
475 (define-public gst123
481 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
485 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
486 (build-system gnu-build-system)
490 ("gstreamer" ,gstreamer)
491 ("gst-plugins-base" ,gst-plugins-base)))
493 `(("pkg-config" ,pkg-config)))
494 (home-page "http://space.twc.de/~stefan/gst123.php")
495 (synopsis "Flexible command line media player based on gstreamer")
496 (description "The program gst123 is designed to be a more flexible command
497 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
498 framework. It plays all file formats gstreamer supports, so if you have a
499 music collection which contains different file formats, like flac, ogg and
500 mp3, you can use gst123 to play all your music files.")
501 (license license:lgpl2.0+)))