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 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 "0jd69ynvr3k70mlxxgbsk047l1rd63m1wkj3qdcq7644xy0gllkx"))))
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://code.entropywave.com/orc/")
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 "062jidnw17hkpva6ddygp80gyasyigfkpm1y7w56rk56a2pzbhjh"))))
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 "1dsyjf6rncsbg4rfj40cvf1wwpjj9h3j3c7bh4zp7jylnfv4blpn"))
159 ; (search-patches "gst-plugins-base-fix-test-on-32bit.patch"))
162 (build-system gnu-build-system)
163 (outputs '("out" "doc"))
165 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
167 `(("cdparanoia" ,cdparanoia)
172 ("libtheora" ,libtheora)
173 ("libvorbis" ,libvorbis)
178 ("alsa-lib" ,alsa-lib)))
180 `(("pkg-config" ,pkg-config)
182 ("gobject-introspection" ,gobject-introspection)
183 ("python-wrapper" ,python-wrapper)))
185 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
187 (list (string-append "--with-html-dir="
188 (assoc-ref %outputs "doc")
189 "/share/gtk-doc/html"))
191 (modify-phases %standard-phases
192 (add-before 'configure 'patch
194 (substitute* "tests/check/libs/pbutils.c"
195 (("/bin/sh") (which "sh")))
197 (home-page "https://gstreamer.freedesktop.org/")
199 "Plugins for the GStreamer multimedia library")
200 (description "This package provides an essential exemplary set of plug-ins
201 for the GStreamer multimedia library.")
202 (license license:lgpl2.0+)))
205 (define-public gst-plugins-good
207 (name "gst-plugins-good")
213 "https://gstreamer.freedesktop.org/src/" name "/"
214 name "-" version ".tar.xz"))
217 "0zjdwxn83sp9wjp9rxjbyk8kf284g9av7l2v6rjldi586hacd1la"))))
218 (build-system gnu-build-system)
223 ("gdk-pixbuf" ,gdk-pixbuf)
224 ("gst-plugins-base" ,gst-plugins-base)
226 ("libavc1394" ,libavc1394)
229 ("libiec61883" ,libiec61883)
232 ("libshout" ,libshout)
236 ("pulseaudio" ,pulseaudio)
239 ("wavpack" ,wavpack)))
241 `(("glib:bin" ,glib "bin")
242 ("pkg-config" ,pkg-config)
243 ("python-wrapper" ,python-wrapper)))
246 (modify-phases %standard-phases
248 'unpack 'disable-failing-tests
250 ;; Disable tests that fail non-deterministically.
251 ;; XXX FIXME: Try removing this for version > 1.8.0.
252 (substitute* "tests/check/elements/rtprtx.c"
253 (("tcase_add_test \\(tc_chain, test_push_forward_seq\\);" all)
254 (string-append "/* " all " */"))
256 \\(tc_chain, test_rtxreceive_data_reconstruction\\);" all)
257 (string-append "/* " all " */")))
258 (substitute* "tests/check/elements/splitmux.c"
259 (("tcase_add_test \\(tc_chain, test_splitmuxsink\\);" all)
260 (string-append "/* " all " */")))
262 (home-page "https://gstreamer.freedesktop.org/")
264 "Plugins for the GStreamer multimedia library")
265 (description "GStreamer Good Plug-ins is a set of plug-ins for the
266 GStreamer multimedia library. This set contains those plug-ins which the
267 developers consider to have good quality code and correct functionality.")
268 (license license:lgpl2.0+)))
270 (define-public gst-plugins-bad
272 (name "gst-plugins-bad")
276 (uri (string-append "https://gstreamer.freedesktop.org/src/"
277 name "/" name "-" version ".tar.xz"))
280 "0rk9rlzf2b0hjw5hwbadz53yh4ls7vm3w3cshsa3n8isdd8axp93"))))
281 (outputs '("out" "doc"))
282 (build-system gnu-build-system)
284 '(#:tests? #f ; XXX: 18 of 65 tests fail
286 (list (string-append "--with-html-dir="
287 (assoc-ref %outputs "doc")
288 "/share/gtk-doc/html"))))
290 `(("gst-plugins-base" ,gst-plugins-base)))
292 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
293 ("gobject-introspection" ,gobject-introspection)
294 ("pkg-config" ,pkg-config)
297 ;; XXX: The following dependencies are missing:
298 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
299 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
300 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
301 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
305 ("fluidsynth" ,fluidsynth)
309 ("libdvdnav" ,libdvdnav)
310 ("libdvdread" ,libdvdread)
311 ("libgcrypt" ,libgcrypt)
312 ("libgudev" ,libgudev)
314 ("libmodplug" ,libmodplug)
316 ("libsndfile" ,libsndfile)
320 ("libvdpau" ,libvdpau)
329 ("openjpeg" ,openjpeg)
334 ;("qtdeclarative" ,qtdeclarative)
335 ;("qtx11extras" ,qtx11extras)
336 ("soundtouch" ,soundtouch)
338 ;("wayland" ,wayland) ; needs gtk+ built with wayland support
340 (home-page "https://gstreamer.freedesktop.org/")
341 (synopsis "Plugins for the GStreamer multimedia library")
343 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
344 par compared to the rest.")
345 (license license:lgpl2.0+)))
347 (define-public gst-plugins-ugly
349 (name "gst-plugins-ugly")
354 (uri (string-append "https://gstreamer.freedesktop.org/src/"
355 name "/" name "-" version ".tar.xz"))
358 "0ngsiwcsz3jd08id4mc0qiy2q1n7h2kkvdnh3r1vm725m1ycg1k3"))))
359 (build-system gnu-build-system)
361 `(("gst-plugins-base" ,gst-plugins-base)
367 ("libmpeg2" ,libmpeg2)
368 ("libdvdread" ,libdvdread)
372 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
373 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
376 `(("glib:bin" ,glib "bin")
377 ("pkg-config" ,pkg-config)
378 ("python-wrapper" ,python-wrapper)))
379 (home-page "https://gstreamer.freedesktop.org/")
380 (synopsis "GStreamer plugins from the \"ugly\" set")
381 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
382 which the developers consider to have good quality code but that might pose
383 distribution problems in some jurisdictions, e.g. due to patent threats.")
384 (license license:lgpl2.0+)))
386 (define-public gst-libav
393 "https://gstreamer.freedesktop.org/src/" name "/"
394 name "-" version ".tar.xz"))
397 "12r68ri03mgbbwsxyn6yklgfsq32rwvyq83zw0aq7m73fp5gx83c"))))
398 (build-system gnu-build-system)
400 '(#:configure-flags '("--with-system-libav")
402 (modify-phases %standard-phases
403 (add-before 'configure 'patch-/bin/sh
405 (substitute* "gst-libs/ext/libav/configure"
407 (string-append "#! "(which "sh"))))
410 `(("pkg-config" ,pkg-config)
413 `(("gst-plugins-base" ,gst-plugins-base)
417 (home-page "http://gstreamer.freedesktop.org/")
418 (synopsis "Plugins for the GStreamer multimedia library")
420 "This GStreamer plugin supports a large number of audio and video
421 compression formats through the use of the libav library.")
422 (license license:gpl2+)))
424 (define-public python-gst
431 "https://gstreamer.freedesktop.org/src/gst-python/"
432 "gst-python-" version ".tar.xz"))
435 "04l2hvvz9b0f3nyds1k3yfk5di8a91fpr6maj19c11mwp1s82l2r"))))
436 (build-system gnu-build-system)
438 ;; XXX: Factorize python-sitedir with python-build-system.
439 `(#:imported-modules (,@%gnu-build-system-modules
440 (guix build python-build-system))
442 (let* ((python (assoc-ref %build-inputs "python"))
443 (python-version ((@@ (guix build python-build-system)
446 (python-sitedir (string-append
447 "lib/python" python-version "/site-packages")))
449 "--with-pygi-overrides-dir=" %output "/" python-sitedir
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)))))