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>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages gstreamer)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix utils)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages audio)
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages cdrom)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages flex)
39 #:use-module (gnu packages freedesktop)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gnome)
43 #:use-module (gnu packages gnupg)
44 #:use-module (gnu packages graphics)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages libusb)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages mp3)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages qt)
54 #:use-module (gnu packages rdf)
55 #:use-module (gnu packages video)
56 #:use-module (gnu packages xorg)
57 #:use-module (gnu packages xiph)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages ssh)
61 #:use-module (gnu packages telephony)
62 #:use-module (gnu packages tls)
63 #:use-module (gnu packages version-control)
64 #:use-module (gnu packages assembly)
65 #:use-module (gnu packages xml))
73 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
74 "orc/orc-" version ".tar.xz"))
77 "1kl3rlmzr27bdpn78nvpnjs142ja1m6grvafdhw74mmhcdjprkdz"))))
78 (build-system gnu-build-system)
81 (modify-phases %standard-phases
82 (add-before 'check 'disable-faulty-test
84 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
85 ;; tests, which fail on some machines. See:
86 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
87 (substitute* '("testsuite/test-limits.c"
88 "testsuite/exec_opcodes_sys.c")
89 (("if \\(error\\) return 1;")
90 "if (error) return 77;"))
92 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
93 (synopsis "Oil runtime compiler")
95 "Orc is a just-in-time compiler implemented as a library and set of
96 associated tools for compiling and executing simple programs that operate on
98 ;; The source code implementing the Marsenne Twister algorithm is licensed
99 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
100 (license (list license:bsd-2 license:bsd-3))))
102 (define-public gstreamer
110 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
114 "0mh4755an4gk0z3ygqhjpdjk0r2cwswbpwfgl0x6qmnln4757bhk"))))
115 (build-system gnu-build-system)
116 (outputs '("out" "doc"))
119 (list (string-append "--with-html-dir="
120 (assoc-ref %outputs "doc")
121 "/share/gtk-doc/html"))))
122 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
127 ("gobject-introspection" ,gobject-introspection)
129 ("pkg-config" ,pkg-config)
130 ("python-wrapper" ,python-wrapper)))
132 (list (search-path-specification
133 (variable "GST_PLUGIN_SYSTEM_PATH")
134 (files '("lib/gstreamer-1.0")))))
135 (home-page "https://gstreamer.freedesktop.org/")
136 (synopsis "Multimedia library")
138 "GStreamer is a library for constructing graphs of media-handling
139 components. The applications it supports range from simple Ogg/Vorbis
140 playback, audio/video streaming to complex audio mixing and video
143 Applications can take advantage of advances in codec and filter technology
144 transparently. Developers can add new codecs and filters by writing a
145 simple plugin with a clean, generic interface.
147 This package provides the core library and elements.")
148 (license license:lgpl2.0+)))
150 (define-public gst-plugins-base
152 (name "gst-plugins-base")
157 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
158 name "-" version ".tar.xz"))
161 "0lkr1fm3bz21nqq9vi5v74mlxw6dd6i7piw00fhc5zz0dg1ikczh"))))
162 (build-system gnu-build-system)
163 (outputs '("out" "doc"))
165 `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
166 ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
167 ("orc" ,orc))) ;required by gstreamer-audio-1.0.pc
169 `(("cdparanoia" ,cdparanoia)
172 ("libtheora" ,libtheora)
173 ("libvorbis" ,libvorbis)
178 ("alsa-lib" ,alsa-lib)
179 ;; XXX Don't build with opus on 32-bit systems:
180 ;; <https://bugs.gnu.org/32360>
181 ,@(if (target-64bit?)
185 `(("pkg-config" ,pkg-config)
186 ("glib:bin" ,glib "bin")
187 ("gobject-introspection" ,gobject-introspection)
188 ("python-wrapper" ,python-wrapper)))
190 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
192 (list (string-append "--with-html-dir="
193 (assoc-ref %outputs "doc")
194 "/share/gtk-doc/html"))
196 (modify-phases %standard-phases
197 (add-before 'configure 'patch
199 (substitute* "tests/check/libs/pbutils.c"
200 (("/bin/sh") (which "sh")))
202 (home-page "https://gstreamer.freedesktop.org/")
204 "Plugins for the GStreamer multimedia library")
205 (description "This package provides an essential exemplary set of plug-ins
206 for the GStreamer multimedia library.")
207 (license license:lgpl2.0+)))
209 (define-public gst-plugins-good
211 (name "gst-plugins-good")
217 "https://gstreamer.freedesktop.org/src/" name "/"
218 name "-" version ".tar.xz"))
221 "0pgzgfqbfp8lz2ns68797xfxdr0cr5rpi93wd1h2grhbmzkbq4ji"))))
222 (build-system gnu-build-system)
227 ("gdk-pixbuf" ,gdk-pixbuf)
228 ("gst-plugins-base" ,gst-plugins-base)
231 ("libavc1394" ,libavc1394)
234 ("libiec61883" ,libiec61883)
237 ("libshout" ,libshout)
242 ("pulseaudio" ,pulseaudio)
246 ("wavpack" ,wavpack)))
248 `(("glib:bin" ,glib "bin")
249 ("pkg-config" ,pkg-config)
250 ("python-wrapper" ,python-wrapper)))
253 (modify-phases %standard-phases
255 'unpack 'disable-failing-tests
257 ;; Disable tests that fail non-deterministically.
258 ;; This test fails on aarch64 on 1.12.x.
259 (substitute* "tests/check/elements/alpha.c"
260 (("tcase_add_test \\(tc_chain, test_chromakeying\\);" all)
261 (string-append "/* " all " */")))
263 (home-page "https://gstreamer.freedesktop.org/")
265 "Plugins for the GStreamer multimedia library")
266 (description "GStreamer Good Plug-ins is a set of plug-ins for the
267 GStreamer multimedia library. This set contains those plug-ins which the
268 developers consider to have good quality code and correct functionality.")
269 (license license:lgpl2.0+)))
271 (define-public gst-plugins-bad
273 (name "gst-plugins-bad")
277 (uri (string-append "https://gstreamer.freedesktop.org/src/"
278 name "/" name "-" version ".tar.xz"))
281 "1mczcna91f3kkk3yv5fkfa8nmqdr9d93aq9z4d8sv18vkiflw8mj"))))
282 (outputs '("out" "doc"))
283 (build-system gnu-build-system)
285 '(#:tests? #f ; XXX: 13 of 53 tests fail
287 (list (string-append "--with-html-dir="
288 (assoc-ref %outputs "doc")
289 "/share/gtk-doc/html"))))
291 `(("gst-plugins-base" ,gst-plugins-base)))
293 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
294 ("gobject-introspection" ,gobject-introspection)
295 ("pkg-config" ,pkg-config)
298 ;; XXX: The following dependencies are missing:
299 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
300 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
301 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
302 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
306 ("fluidsynth" ,fluidsynth)
310 ("libdvdnav" ,libdvdnav)
311 ("libdvdread" ,libdvdread)
312 ("libgcrypt" ,libgcrypt)
313 ("libgudev" ,libgudev)
315 ("libmodplug" ,libmodplug)
317 ("libsndfile" ,libsndfile)
321 ("libvdpau" ,libvdpau)
329 ("openjpeg" ,openjpeg)
334 ;("qtdeclarative" ,qtdeclarative)
335 ;("qtx11extras" ,qtx11extras)
336 ("soundtouch" ,soundtouch)
338 ("wayland" ,wayland)))
339 (home-page "https://gstreamer.freedesktop.org/")
340 (synopsis "Plugins for the GStreamer multimedia library")
342 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
343 par compared to the rest.")
344 (license license:lgpl2.0+)))
346 (define-public gst-plugins-ugly
348 (name "gst-plugins-ugly")
353 (uri (string-append "https://gstreamer.freedesktop.org/src/"
354 name "/" name "-" version ".tar.xz"))
357 "01i31g5rvw36rjlyi9w24n0g1xa6053d14vaiba6vqpas727z123"))))
358 (build-system gnu-build-system)
360 `(("gst-plugins-base" ,gst-plugins-base)
363 ("libmpeg2" ,libmpeg2)
364 ("libdvdread" ,libdvdread)
367 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
368 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
371 `(("glib:bin" ,glib "bin")
372 ("pkg-config" ,pkg-config)
373 ("python-wrapper" ,python-wrapper)))
374 (home-page "https://gstreamer.freedesktop.org/")
375 (synopsis "GStreamer plugins from the \"ugly\" set")
376 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
377 which the developers consider to have good quality code but that might pose
378 distribution problems in some jurisdictions, e.g. due to patent threats.")
379 (license license:lgpl2.0+)))
381 (define-public gst-libav
388 "https://gstreamer.freedesktop.org/src/" name "/"
389 name "-" version ".tar.xz"))
392 "0xxnb80yhfa42x4wx1928zydaal35b2mcj0zdcdsv1apnjdm40wv"))
393 (modules '((guix build utils)))
396 ;; Drop bundled ffmpeg.
397 (delete-file-recursively "gst-libs/ext/libav")
399 (build-system gnu-build-system)
401 '(#:configure-flags '("--with-system-libav")))
403 `(("pkg-config" ,pkg-config)
406 `(("gst-plugins-base" ,gst-plugins-base)
407 ("ffmpeg" ,ffmpeg-3.4)
410 (home-page "https://gstreamer.freedesktop.org/")
411 (synopsis "Plugins for the GStreamer multimedia library")
413 "This GStreamer plugin supports a large number of audio and video
414 compression formats through the use of the libav library.")
415 (license license:gpl2+)))
417 (define-public python-gst
424 "https://gstreamer.freedesktop.org/src/gst-python/"
425 "gst-python-" version ".tar.xz"))
428 "01w3mpimbm8drifhrkvpns79h15kd9h9v0dynr7yb12kjrnfghsg"))))
429 (build-system gnu-build-system)
431 ;; XXX: Factorize python-sitedir with python-build-system.
432 `(#:imported-modules (,@%gnu-build-system-modules
433 (guix build python-build-system))
435 (let* ((python (assoc-ref %build-inputs "python"))
436 (python-version ((@@ (guix build python-build-system)
439 (python-sitedir (string-append
440 "lib/python" python-version "/site-packages")))
442 "--with-pygi-overrides-dir=" %output "/" python-sitedir
445 `(("pkg-config" ,pkg-config)
448 `(("gst-plugins-base" ,gst-plugins-base)
449 ("python-pygobject" ,python-pygobject)))
450 (home-page "https://gstreamer.freedesktop.org/")
451 (synopsis "GStreamer GObject Introspection overrides for Python")
453 "This package contains GObject Introspection overrides for Python that can
454 be used by Python applications using GStreamer.")
455 (license license:lgpl2.1+)
456 (properties `((python2-variant . ,(delay python2-gst))))))
458 (define-public python2-gst
459 (package (inherit python-gst)
462 `(("pkg-config" ,pkg-config)
463 ("python" ,python-2)))
465 `(("gst-plugins-base" ,gst-plugins-base)
466 ("python-pygobject" ,python2-pygobject)))))
468 (define-public gst123
474 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
478 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
479 (build-system gnu-build-system)
483 ("gstreamer" ,gstreamer)
484 ("gst-plugins-base" ,gst-plugins-base)))
486 `(("pkg-config" ,pkg-config)))
487 (home-page "http://space.twc.de/~stefan/gst123.php")
488 (synopsis "Flexible command line media player based on gstreamer")
489 (description "The program gst123 is designed to be a more flexible command
490 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
491 framework. It plays all file formats gstreamer supports, so if you have a
492 music collection which contains different file formats, like flac, ogg and
493 mp3, you can use gst123 to play all your music files.")
494 (license license:lgpl2.0+)))