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 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages gstreamer)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix utils)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages audio)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages cdrom)
34 #:use-module (gnu packages curl)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages flex)
37 #:use-module (gnu packages freedesktop)
38 #:use-module (gnu packages gl)
39 #:use-module (gnu packages glib)
40 #:use-module (gnu packages gnome)
41 #:use-module (gnu packages gnupg)
42 #:use-module (gnu packages graphics)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages libusb)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages mp3)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pulseaudio)
50 #:use-module (gnu packages qt)
51 #:use-module (gnu packages rdf)
52 #:use-module (gnu packages video)
53 #:use-module (gnu packages xorg)
54 #:use-module (gnu packages xiph)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages ssh)
58 #:use-module (gnu packages telephony)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages version-control)
61 #:use-module (gnu packages assembly)
62 #:use-module (gnu packages xml))
70 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
71 "orc/orc-" version ".tar.xz"))
74 "14vbwdydwarcvswzf744jdjb3ibhv6k4j6hzdacfan41zic3xrai"))))
75 (build-system gnu-build-system)
78 (modify-phases %standard-phases
79 (add-before 'check 'disable-faulty-test
81 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
82 ;; tests, which fail on some machines. See:
83 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
84 (substitute* '("testsuite/test-limits.c"
85 "testsuite/exec_opcodes_sys.c")
86 (("if \\(error\\) return 1;")
87 "if (error) return 77;")))))))
88 (home-page "http://gstreamer.freedesktop.org/modules/orc.html")
89 (synopsis "Oil runtime compiler")
91 "Orc is a just-in-time compiler implemented as a library and set of
92 associated tools for compiling and executing simple programs that operate on
94 ;; The source code implementing the Marsenne Twister algorithm is licensed
95 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
96 (license (list license:bsd-2 license:bsd-3))))
98 (define-public gstreamer
106 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
110 "0vi1g8rmmsnd630ds3jwv2iph46ll8y07fzf04mz15q88j9g926k"))))
111 (build-system gnu-build-system)
112 (outputs '("out" "doc"))
115 (list (string-append "--with-html-dir="
116 (assoc-ref %outputs "doc")
117 "/share/gtk-doc/html"))))
118 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
123 ("gobject-introspection" ,gobject-introspection)
125 ("pkg-config" ,pkg-config)
126 ("python-wrapper" ,python-wrapper)))
128 (list (search-path-specification
129 (variable "GST_PLUGIN_SYSTEM_PATH")
130 (files '("lib/gstreamer-1.0")))))
131 (home-page "https://gstreamer.freedesktop.org/")
132 (synopsis "Multimedia library")
134 "GStreamer is a library for constructing graphs of media-handling
135 components. The applications it supports range from simple Ogg/Vorbis
136 playback, audio/video streaming to complex audio mixing and video
139 Applications can take advantage of advances in codec and filter technology
140 transparently. Developers can add new codecs and filters by writing a
141 simple plugin with a clean, generic interface.
143 This package provides the core library and elements.")
144 (license license:lgpl2.0+)))
146 (define-public gst-plugins-base
148 (name "gst-plugins-base")
153 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
154 name "-" version ".tar.xz"))
157 "19ffwdch7m777ragmwpy6prqmfb742ym1n3ki40s0zyki627plyk"))))
158 (build-system gnu-build-system)
159 (outputs '("out" "doc"))
161 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
163 `(("cdparanoia" ,cdparanoia)
168 ("libtheora" ,libtheora)
169 ("libvorbis" ,libvorbis)
174 ("alsa-lib" ,alsa-lib)))
176 `(("pkg-config" ,pkg-config)
178 ("gobject-introspection" ,gobject-introspection)
179 ("python-wrapper" ,python-wrapper)))
181 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
183 (list (string-append "--with-html-dir="
184 (assoc-ref %outputs "doc")
185 "/share/gtk-doc/html"))
187 (modify-phases %standard-phases
188 (add-before 'configure 'patch
190 (substitute* "tests/check/libs/pbutils.c"
191 (("/bin/sh") (which "sh")))
193 (home-page "https://gstreamer.freedesktop.org/")
195 "Plugins for the GStreamer multimedia library")
196 (description "This package provides an essential exemplary set of plug-ins
197 for the GStreamer multimedia library.")
198 (license license:lgpl2.0+)))
201 (define-public gst-plugins-good
203 (name "gst-plugins-good")
209 "https://gstreamer.freedesktop.org/src/" name "/"
210 name "-" version ".tar.xz"))
213 "00sznj1sl97fqpn6j8ngps04clvxp8h8yhw6lvszx4b855wz9rqk"))))
214 (build-system gnu-build-system)
219 ("gdk-pixbuf" ,gdk-pixbuf)
220 ("gst-plugins-base" ,gst-plugins-base)
222 ("libavc1394" ,libavc1394)
225 ("libiec61883" ,libiec61883)
228 ("libshout" ,libshout)
232 ("pulseaudio" ,pulseaudio)
235 ("wavpack" ,wavpack)))
237 `(("glib:bin" ,glib "bin")
238 ("pkg-config" ,pkg-config)
239 ("python-wrapper" ,python-wrapper)))
242 (modify-phases %standard-phases
244 'unpack 'disable-failing-tests
246 ;; Disable tests that fail non-deterministically.
247 ;; This test fails on aarch64 on 1.12.x.
248 (substitute* "tests/check/elements/alpha.c"
249 (("tcase_add_test \\(tc_chain, test_chromakeying\\);" all)
250 (string-append "/* " all " */")))
252 (home-page "https://gstreamer.freedesktop.org/")
254 "Plugins for the GStreamer multimedia library")
255 (description "GStreamer Good Plug-ins is a set of plug-ins for the
256 GStreamer multimedia library. This set contains those plug-ins which the
257 developers consider to have good quality code and correct functionality.")
258 (license license:lgpl2.0+)))
260 (define-public gst-plugins-bad
262 (name "gst-plugins-bad")
266 (uri (string-append "https://gstreamer.freedesktop.org/src/"
267 name "/" name "-" version ".tar.xz"))
270 "1v5z3i5ha20gmbb3r9dwsaaspv5fm1jfzlzwlzqx1gjj31v5kl1n"))))
271 (outputs '("out" "doc"))
272 (build-system gnu-build-system)
274 '(#:tests? #f ; XXX: 18 of 65 tests fail
276 (list (string-append "--with-html-dir="
277 (assoc-ref %outputs "doc")
278 "/share/gtk-doc/html"))
280 (modify-phases %standard-phases
281 (add-after 'unpack 'patch-openjpeg-reference
283 ;; Remove hard-coded openjpeg-2.2 path. 2.3 is API- and
285 (substitute* "ext/openjpeg/gstopenjpeg.h"
286 (("<openjpeg-2\\.2/") "<openjpeg-2.3/"))
289 `(("gst-plugins-base" ,gst-plugins-base)))
291 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
292 ("gobject-introspection" ,gobject-introspection)
293 ("pkg-config" ,pkg-config)
296 ;; XXX: The following dependencies are missing:
297 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
298 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
299 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
300 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
304 ("fluidsynth" ,fluidsynth)
308 ("libdvdnav" ,libdvdnav)
309 ("libdvdread" ,libdvdread)
310 ("libgcrypt" ,libgcrypt)
311 ("libgudev" ,libgudev)
313 ("libmodplug" ,libmodplug)
315 ("libsndfile" ,libsndfile)
319 ("libvdpau" ,libvdpau)
328 ("openjpeg" ,openjpeg)
333 ;("qtdeclarative" ,qtdeclarative)
334 ;("qtx11extras" ,qtx11extras)
335 ("soundtouch" ,soundtouch)
337 ("wayland" ,wayland)))
338 (home-page "https://gstreamer.freedesktop.org/")
339 (synopsis "Plugins for the GStreamer multimedia library")
341 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
342 par compared to the rest.")
343 (license license:lgpl2.0+)))
345 (define-public gst-plugins-ugly
347 (name "gst-plugins-ugly")
352 (uri (string-append "https://gstreamer.freedesktop.org/src/"
353 name "/" name "-" version ".tar.xz"))
356 "0lh00rg26iy5lr5al23lxsyncjqkgzph1bzkrgp8x9sfr62ab378"))))
357 (build-system gnu-build-system)
359 `(("gst-plugins-base" ,gst-plugins-base)
365 ("libmpeg2" ,libmpeg2)
366 ("libdvdread" ,libdvdread)
370 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
371 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
374 `(("glib:bin" ,glib "bin")
375 ("pkg-config" ,pkg-config)
376 ("python-wrapper" ,python-wrapper)))
377 (home-page "https://gstreamer.freedesktop.org/")
378 (synopsis "GStreamer plugins from the \"ugly\" set")
379 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
380 which the developers consider to have good quality code but that might pose
381 distribution problems in some jurisdictions, e.g. due to patent threats.")
382 (license license:lgpl2.0+)))
384 (define-public gst-libav
391 "https://gstreamer.freedesktop.org/src/" name "/"
392 name "-" version ".tar.xz"))
395 "0l4nc6ikdx49l7bdrk3bd9p3pzry8a328r22zg48gyzpnv5ghph1"))))
396 (build-system gnu-build-system)
398 '(#:configure-flags '("--with-system-libav")
400 (modify-phases %standard-phases
401 (add-before 'configure 'patch-/bin/sh
403 (substitute* "gst-libs/ext/libav/configure"
405 (string-append "#! "(which "sh"))))
408 `(("pkg-config" ,pkg-config)
411 `(("gst-plugins-base" ,gst-plugins-base)
412 ("ffmpeg" ,ffmpeg-3.3)
415 (home-page "http://gstreamer.freedesktop.org/")
416 (synopsis "Plugins for the GStreamer multimedia library")
418 "This GStreamer plugin supports a large number of audio and video
419 compression formats through the use of the libav library.")
420 (license license:gpl2+)))
422 (define-public python-gst
429 "https://gstreamer.freedesktop.org/src/gst-python/"
430 "gst-python-" version ".tar.xz"))
433 "19rb06x2m7103zwfm0plxx95gb8bp01ng04h4q9k6ii9q7g2kxf3"))))
434 (build-system gnu-build-system)
436 ;; XXX: Factorize python-sitedir with python-build-system.
437 `(#:imported-modules (,@%gnu-build-system-modules
438 (guix build python-build-system))
440 (let* ((python (assoc-ref %build-inputs "python"))
441 (python-version ((@@ (guix build python-build-system)
444 (python-sitedir (string-append
445 "lib/python" python-version "/site-packages")))
447 "--with-pygi-overrides-dir=" %output "/" python-sitedir
450 `(("pkg-config" ,pkg-config)
453 `(("gst-plugins-base" ,gst-plugins-base)
454 ("python-pygobject" ,python-pygobject)))
455 (home-page "https://gstreamer.freedesktop.org/")
456 (synopsis "GStreamer GObject Introspection overrides for Python")
458 "This package contains GObject Introspection overrides for Python that can
459 be used by Python applications using GStreamer.")
460 (license license:lgpl2.1+)
461 (properties `((python2-variant . ,(delay python2-gst))))))
463 (define-public python2-gst
464 (package (inherit python-gst)
467 `(("pkg-config" ,pkg-config)
468 ("python" ,python-2)))
470 `(("gst-plugins-base" ,gst-plugins-base)
471 ("python-pygobject" ,python2-pygobject)))))