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 utils)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages audio)
35 #:use-module (gnu packages bison)
36 #:use-module (gnu packages cdrom)
37 #:use-module (gnu packages curl)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages flex)
40 #:use-module (gnu packages freedesktop)
41 #:use-module (gnu packages gl)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages gnome)
44 #:use-module (gnu packages gnupg)
45 #:use-module (gnu packages graphics)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages image)
48 #:use-module (gnu packages libusb)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages mp3)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pulseaudio)
54 #:use-module (gnu packages qt)
55 #:use-module (gnu packages rdf)
56 #:use-module (gnu packages video)
57 #:use-module (gnu packages xorg)
58 #:use-module (gnu packages xiph)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages ssh)
62 #:use-module (gnu packages telephony)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages version-control)
65 #:use-module (gnu packages assembly)
66 #:use-module (gnu packages xml))
74 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
75 "orc/orc-" version ".tar.xz"))
78 "1cisbbn69p9c8vikn0nin14q0zscby5m8cyvzxyw2pjb2kwh32ag"))))
79 (build-system gnu-build-system)
82 (modify-phases %standard-phases
83 (add-before 'check 'disable-faulty-test
85 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
86 ;; tests, which fail on some machines. See:
87 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
88 (substitute* '("testsuite/test-limits.c"
89 "testsuite/exec_opcodes_sys.c")
90 (("if \\(error\\) return 1;")
91 "if (error) return 77;"))
93 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
94 (synopsis "Oil runtime compiler")
96 "Orc is a just-in-time compiler implemented as a library and set of
97 associated tools for compiling and executing simple programs that operate on
99 ;; The source code implementing the Marsenne Twister algorithm is licensed
100 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
101 (license (list license:bsd-2 license:bsd-3))))
103 (define-public gstreamer
111 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
115 "003wy1p1in85p9sr5jsyhbnwqaiwz069flwkhyx7qhxy31qjz3hf"))))
116 (build-system gnu-build-system)
117 (outputs '("out" "doc"))
120 (list (string-append "--with-html-dir="
121 (assoc-ref %outputs "doc")
122 "/share/gtk-doc/html"))
124 ,@(if (not (target-64bit?))
125 ;; Skip test that fails on 32-bit systems:
126 ;; <https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/316>.
127 `(#:phases (modify-phases %standard-phases
128 (add-before 'check 'disable-gstbufferpool-test
130 (substitute* "tests/check/Makefile"
131 (("^[[:blank:]]+gst/gstbufferpool.*$")
135 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
140 ("gobject-introspection" ,gobject-introspection)
142 ("pkg-config" ,pkg-config)
143 ("python-wrapper" ,python-wrapper)))
145 (list (search-path-specification
146 (variable "GST_PLUGIN_SYSTEM_PATH")
147 (files '("lib/gstreamer-1.0")))))
148 (home-page "https://gstreamer.freedesktop.org/")
149 (synopsis "Multimedia library")
151 "GStreamer is a library for constructing graphs of media-handling
152 components. The applications it supports range from simple Ogg/Vorbis
153 playback, audio/video streaming to complex audio mixing and video
156 Applications can take advantage of advances in codec and filter technology
157 transparently. Developers can add new codecs and filters by writing a
158 simple plugin with a clean, generic interface.
160 This package provides the core library and elements.")
161 (license license:lgpl2.0+)))
163 (define-public gst-plugins-base
165 (name "gst-plugins-base")
170 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
171 name "-" version ".tar.xz"))
174 "1bmmdwbyy89ayb85xc48y217f6wdmpz96f30zm6v53z2a5xsm4s0"))))
175 (build-system gnu-build-system)
176 (outputs '("out" "doc"))
178 `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
179 ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
180 ("orc" ,orc))) ;required by gstreamer-audio-1.0.pc
182 `(("cdparanoia" ,cdparanoia)
185 ("libtheora" ,libtheora)
186 ("libvorbis" ,libvorbis)
191 ("alsa-lib" ,alsa-lib)
192 ;; XXX Don't build with opus on 32-bit systems:
193 ;; <https://bugs.gnu.org/32360>
194 ,@(if (target-64bit?)
198 `(("pkg-config" ,pkg-config)
199 ("glib:bin" ,glib "bin")
200 ("gobject-introspection" ,gobject-introspection)
201 ("python-wrapper" ,python-wrapper)))
203 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
205 (list (string-append "--with-html-dir="
206 (assoc-ref %outputs "doc")
207 "/share/gtk-doc/html"))
209 (modify-phases %standard-phases
210 (add-before 'configure 'patch
212 (substitute* "tests/check/libs/pbutils.c"
213 (("/bin/sh") (which "sh")))
215 (home-page "https://gstreamer.freedesktop.org/")
217 "Plugins for the GStreamer multimedia library")
218 (description "This package provides an essential exemplary set of plug-ins
219 for the GStreamer multimedia library.")
220 (license license:lgpl2.0+)))
222 (define-public gst-plugins-good
224 (name "gst-plugins-good")
230 "https://gstreamer.freedesktop.org/src/" name "/"
231 name "-" version ".tar.xz"))
234 "1zdhif1mhf0ihkjpjyrh65g2iz2cawkjjb3h5w8h9ml06grxwjk5"))))
235 (build-system gnu-build-system)
240 ("gdk-pixbuf" ,gdk-pixbuf)
241 ("gst-plugins-base" ,gst-plugins-base)
245 ("libavc1394" ,libavc1394)
248 ("libiec61883" ,libiec61883)
251 ("libshout" ,libshout)
256 ("pulseaudio" ,pulseaudio)
260 ("wavpack" ,wavpack)))
262 `(("glib:bin" ,glib "bin")
263 ("pkg-config" ,pkg-config)
264 ("python-wrapper" ,python-wrapper)))
267 (modify-phases %standard-phases
269 'unpack 'disable-failing-tests
271 ;; Disable tests that fail non-deterministically.
272 ;; This test fails on aarch64 on 1.12.x.
273 (substitute* "tests/check/elements/alpha.c"
274 (("tcase_add_test \\(tc_chain, test_chromakeying\\);" all)
275 (string-append "/* " all " */")))
277 (home-page "https://gstreamer.freedesktop.org/")
279 "Plugins for the GStreamer multimedia library")
280 (description "GStreamer Good Plug-ins is a set of plug-ins for the
281 GStreamer multimedia library. This set contains those plug-ins which the
282 developers consider to have good quality code and correct functionality.")
283 (license license:lgpl2.0+)))
285 (define-public gst-plugins-bad
287 (name "gst-plugins-bad")
291 (uri (string-append "https://gstreamer.freedesktop.org/src/"
292 name "/" name "-" version ".tar.xz"))
295 "019b0yqjrcg6jmfd4cc336h1bz5p4wxl58yz1c4sdb96avirs4r2"))))
296 (outputs '("out" "doc"))
297 (build-system gnu-build-system)
299 '(#:tests? #f ; XXX: 13 of 53 tests fail
301 (list (string-append "--with-html-dir="
302 (assoc-ref %outputs "doc")
303 "/share/gtk-doc/html"))))
305 `(("gst-plugins-base" ,gst-plugins-base)))
307 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
308 ("gobject-introspection" ,gobject-introspection)
309 ("pkg-config" ,pkg-config)
312 ;; XXX: The following dependencies are missing:
313 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
314 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
315 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
316 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
320 ("fluidsynth" ,fluidsynth)
324 ("libdvdnav" ,libdvdnav)
325 ("libdvdread" ,libdvdread)
326 ("libgcrypt" ,libgcrypt)
327 ("libgudev" ,libgudev)
329 ("libmodplug" ,libmodplug)
331 ("libsndfile" ,libsndfile)
335 ("libvdpau" ,libvdpau)
343 ("openjpeg" ,openjpeg)
348 ;("qtdeclarative" ,qtdeclarative)
349 ;("qtx11extras" ,qtx11extras)
350 ("soundtouch" ,soundtouch)
352 ("wayland" ,wayland)))
353 (home-page "https://gstreamer.freedesktop.org/")
354 (synopsis "Plugins for the GStreamer multimedia library")
356 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
357 par compared to the rest.")
358 (license license:lgpl2.0+)))
360 (define-public gst-plugins-ugly
362 (name "gst-plugins-ugly")
367 (uri (string-append "https://gstreamer.freedesktop.org/src/"
368 name "/" name "-" version ".tar.xz"))
371 "1hm46c1fy9vl1wfwipsj41zp79cm7in1fpmjw24j5hriy32n82g3"))))
372 (build-system gnu-build-system)
374 `(("gst-plugins-base" ,gst-plugins-base)
377 ("libmpeg2" ,libmpeg2)
378 ("libdvdread" ,libdvdread)
381 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
382 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
385 `(("glib:bin" ,glib "bin")
386 ("pkg-config" ,pkg-config)
387 ("python-wrapper" ,python-wrapper)))
388 (home-page "https://gstreamer.freedesktop.org/")
389 (synopsis "GStreamer plugins from the \"ugly\" set")
390 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
391 which the developers consider to have good quality code but that might pose
392 distribution problems in some jurisdictions, e.g. due to patent threats.")
393 (license license:lgpl2.0+)))
395 (define-public gst-libav
402 "https://gstreamer.freedesktop.org/src/" name "/"
403 name "-" version ".tar.xz"))
406 "16ixqpfrr7plaaz14n3vagr2q5xbfkv7gpmcsyndrkx98f813b6z"))
407 (modules '((guix build utils)))
410 ;; Drop bundled ffmpeg.
411 (delete-file-recursively "gst-libs/ext/libav")
413 (build-system gnu-build-system)
415 '(#:configure-flags '("--with-system-libav")))
417 `(("pkg-config" ,pkg-config)
420 `(("gst-plugins-base" ,gst-plugins-base)
424 (home-page "https://gstreamer.freedesktop.org/")
425 (synopsis "Plugins for the GStreamer multimedia library")
427 "This GStreamer plugin supports a large number of audio and video
428 compression formats through the use of the libav library.")
429 (license license:gpl2+)))
431 (define-public python-gst
438 "https://gstreamer.freedesktop.org/src/gst-python/"
439 "gst-python-" version ".tar.xz"))
442 "0f1d9rvy2qxlymmfzyknnfr5rz1vx69jv17gp7wnamc5s6p7mp2m"))))
443 (build-system gnu-build-system)
445 ;; XXX: Factorize python-sitedir with python-build-system.
446 `(#:imported-modules (,@%gnu-build-system-modules
447 (guix build python-build-system))
449 (let* ((python (assoc-ref %build-inputs "python"))
450 (python-version (python-version python))
451 (python-sitedir (string-append
452 "lib/python" python-version "/site-packages")))
454 "--with-pygi-overrides-dir=" %output "/" python-sitedir
457 `(("pkg-config" ,pkg-config)
460 `(("gst-plugins-base" ,gst-plugins-base)
461 ("python-pygobject" ,python-pygobject)))
462 (home-page "https://gstreamer.freedesktop.org/")
463 (synopsis "GStreamer GObject Introspection overrides for Python")
465 "This package contains GObject Introspection overrides for Python that can
466 be used by Python applications using GStreamer.")
467 (license license:lgpl2.1+)
468 (properties `((python2-variant . ,(delay python2-gst))))))
470 (define-public python2-gst
471 (package (inherit python-gst)
474 `(("pkg-config" ,pkg-config)
475 ("python" ,python-2)))
477 `(("gst-plugins-base" ,gst-plugins-base)
478 ("python-pygobject" ,python2-pygobject)))))
480 (define-public gst123
486 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
490 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
491 (build-system gnu-build-system)
495 ("gstreamer" ,gstreamer)
496 ("gst-plugins-base" ,gst-plugins-base)))
498 `(("pkg-config" ,pkg-config)))
499 (home-page "http://space.twc.de/~stefan/gst123.php")
500 (synopsis "Flexible command line media player based on gstreamer")
501 (description "The program gst123 is designed to be a more flexible command
502 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
503 framework. It plays all file formats gstreamer supports, so if you have a
504 music collection which contains different file formats, like flac, ogg and
505 mp3, you can use gst123 to play all your music files.")
506 (license license:lgpl2.0+)))