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>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages gstreamer)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix utils)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages audio)
31 #:use-module (gnu packages bison)
32 #:use-module (gnu packages cdrom)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages flex)
36 #:use-module (gnu packages freedesktop)
37 #:use-module (gnu packages gl)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages gnupg)
41 #:use-module (gnu packages graphics)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages libusb)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages mp3)
47 #:use-module (gnu packages perl)
48 #:use-module (gnu packages pulseaudio)
49 #:use-module (gnu packages qt)
50 #:use-module (gnu packages rdf)
51 #:use-module (gnu packages video)
52 #:use-module (gnu packages xorg)
53 #:use-module (gnu packages xiph)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages ssh)
57 #:use-module (gnu packages telephony)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages version-control)
60 #:use-module (gnu packages assembly)
61 #:use-module (gnu packages xml))
69 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
70 "orc/orc-" version ".tar.xz"))
73 "0jd69ynvr3k70mlxxgbsk047l1rd63m1wkj3qdcq7644xy0gllkx"))))
74 (build-system gnu-build-system)
77 (modify-phases %standard-phases
78 (add-before 'check 'disable-faulty-test
80 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
81 ;; tests, which fail on some machines. See:
82 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
83 (substitute* '("testsuite/test-limits.c"
84 "testsuite/exec_opcodes_sys.c")
85 (("if \\(error\\) return 1;")
86 "if (error) return 77;")))))))
87 (home-page "http://code.entropywave.com/orc/")
88 (synopsis "Oil runtime compiler")
90 "Orc is a just-in-time compiler implemented as a library and set of
91 associated tools for compiling and executing simple programs that operate on
93 ;; The source code implementing the Marsenne Twister algorithm is licensed
94 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
95 (license (list license:bsd-2 license:bsd-3))))
97 (define-public gstreamer
105 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
109 "01vjsgz58n6nrmnahs4ac7v4656yc042ymffqjzqa0a8pvx7hxqy"))))
110 (build-system gnu-build-system)
111 (outputs '("out" "doc"))
114 (list (string-append "--with-html-dir="
115 (assoc-ref %outputs "doc")
116 "/share/gtk-doc/html"))))
117 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
122 ("gobject-introspection" ,gobject-introspection)
124 ("pkg-config" ,pkg-config)
125 ("python-wrapper" ,python-wrapper)))
127 (list (search-path-specification
128 (variable "GST_PLUGIN_SYSTEM_PATH")
129 (files '("lib/gstreamer-1.0")))))
130 (home-page "https://gstreamer.freedesktop.org/")
131 (synopsis "Multimedia library")
133 "GStreamer is a library for constructing graphs of media-handling
134 components. The applications it supports range from simple Ogg/Vorbis
135 playback, audio/video streaming to complex audio mixing and video
138 Applications can take advantage of advances in codec and filter technology
139 transparently. Developers can add new codecs and filters by writing a
140 simple plugin with a clean, generic interface.
142 This package provides the core library and elements.")
143 (license license:lgpl2.0+)))
145 (define-public gst-plugins-base
147 (name "gst-plugins-base")
152 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
153 name "-" version ".tar.xz"))
156 "0jp9rwv0am8qv32q3dzhdcbyygg5wjm4fg20njyhp6n6vybyzkdz"))))
157 (build-system gnu-build-system)
158 (outputs '("out" "doc"))
160 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
162 `(("cdparanoia" ,cdparanoia)
167 ("libtheora" ,libtheora)
168 ("libvorbis" ,libvorbis)
173 ("alsa-lib" ,alsa-lib)))
175 `(("pkg-config" ,pkg-config)
177 ("gobject-introspection" ,gobject-introspection)
178 ("python-wrapper" ,python-wrapper)))
180 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
182 (list (string-append "--with-html-dir="
183 (assoc-ref %outputs "doc")
184 "/share/gtk-doc/html"))
186 (modify-phases %standard-phases
187 (add-before 'configure 'patch
189 (substitute* "tests/check/libs/pbutils.c"
190 (("/bin/sh") (which "sh"))))))))
191 (home-page "https://gstreamer.freedesktop.org/")
193 "Plugins for the GStreamer multimedia library")
194 (description "This package provides an essential exemplary set of plug-ins
195 for the GStreamer multimedia library.")
196 (license license:lgpl2.0+)))
199 (define-public gst-plugins-good
201 (name "gst-plugins-good")
207 "https://gstreamer.freedesktop.org/src/" name "/"
208 name "-" version ".tar.xz"))
211 "1qhx6x3ax1qqbvm20zhqax3dsas4yzlx7vdjnjqllqzmcfbma0vs"))))
212 (build-system gnu-build-system)
217 ("gdk-pixbuf" ,gdk-pixbuf)
218 ("gst-plugins-base" ,gst-plugins-base)
220 ("libavc1394" ,libavc1394)
223 ("libiec61883" ,libiec61883)
226 ("libshout" ,libshout)
230 ("pulseaudio" ,pulseaudio)
233 ("wavpack" ,wavpack)))
235 `(("glib:bin" ,glib "bin")
236 ("pkg-config" ,pkg-config)
237 ("python-wrapper" ,python-wrapper)))
240 (modify-phases %standard-phases
242 'unpack 'disable-failing-tests
244 ;; Disable tests that fail non-deterministically.
245 ;; XXX FIXME: Try removing this for version > 1.8.0.
246 (substitute* "tests/check/elements/rtprtx.c"
247 (("tcase_add_test \\(tc_chain, test_push_forward_seq\\);" all)
248 (string-append "/* " all " */"))
250 \\(tc_chain, test_rtxreceive_data_reconstruction\\);" all)
251 (string-append "/* " all " */")))
252 (substitute* "tests/check/elements/splitmux.c"
253 (("tcase_add_test \\(tc_chain, test_splitmuxsink\\);" all)
254 (string-append "/* " all " */")))
256 (home-page "https://gstreamer.freedesktop.org/")
258 "Plugins for the GStreamer multimedia library")
259 (description "GStreamer Good Plug-ins is a set of plug-ins for the
260 GStreamer multimedia library. This set contains those plug-ins which the
261 developers consider to have good quality code and correct functionality.")
262 (license license:lgpl2.0+)))
264 (define-public gst-plugins-bad
266 (name "gst-plugins-bad")
270 (uri (string-append "https://gstreamer.freedesktop.org/src/"
271 name "/" name "-" version ".tar.xz"))
274 "0kqwh5r4j05f2w9m353grvypn0106hxcr52409f7rvm3w4b9sprx"))))
275 (outputs '("out" "doc"))
276 (build-system gnu-build-system)
278 '(#:tests? #f ; XXX: 18 of 65 tests fail
280 (list (string-append "--with-html-dir="
281 (assoc-ref %outputs "doc")
282 "/share/gtk-doc/html"))))
284 `(("gst-plugins-base" ,gst-plugins-base)))
286 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
287 ("gobject-introspection" ,gobject-introspection)
288 ("pkg-config" ,pkg-config)
291 ;; XXX: The following dependencies are missing:
292 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
293 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
294 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
295 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
299 ("fluidsynth" ,fluidsynth)
303 ("libdvdnav" ,libdvdnav)
304 ("libdvdread" ,libdvdread)
305 ("libgcrypt" ,libgcrypt)
306 ("libgudev" ,libgudev)
308 ("libmodplug" ,libmodplug)
310 ("libsndfile" ,libsndfile)
314 ("libvdpau" ,libvdpau)
323 ("openjpeg" ,openjpeg)
328 ;("qtdeclarative" ,qtdeclarative)
329 ;("qtx11extras" ,qtx11extras)
330 ("soundtouch" ,soundtouch)
332 ;("wayland" ,wayland) ; needs wayland-protocols
334 (home-page "https://gstreamer.freedesktop.org/")
335 (synopsis "Plugins for the GStreamer multimedia library")
337 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
338 par compared to the rest.")
339 (license license:lgpl2.0+)))
341 (define-public gst-plugins-ugly
343 (name "gst-plugins-ugly")
348 (uri (string-append "https://gstreamer.freedesktop.org/src/"
349 name "/" name "-" version ".tar.xz"))
352 "1q2m3bl8kh9q3grshj55lb2mqby4r20qfsrffc2l7ddb0ccqvplp"))))
353 (build-system gnu-build-system)
355 `(("gst-plugins-base" ,gst-plugins-base)
361 ("libmpeg2" ,libmpeg2)
362 ("libdvdread" ,libdvdread)
366 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
367 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
370 `(("glib:bin" ,glib "bin")
371 ("pkg-config" ,pkg-config)
372 ("python-wrapper" ,python-wrapper)))
373 (home-page "https://gstreamer.freedesktop.org/")
374 (synopsis "GStreamer plugins from the \"ugly\" set")
375 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
376 which the developers consider to have good quality code but that might pose
377 distribution problems in some jurisdictions, e.g. due to patent threats.")
378 (license license:lgpl2.0+)))
380 (define-public gst-libav
387 "https://gstreamer.freedesktop.org/src/" name "/"
388 name "-" version ".tar.xz"))
391 "0nyqkggcxfrbflcf4jyj0h9l1rkbi3r5h61w4fcbp2n72522165g"))))
392 (build-system gnu-build-system)
394 '(#:configure-flags '("--with-system-libav")
396 (modify-phases %standard-phases
397 (add-before 'configure 'patch-/bin/sh
399 (substitute* "gst-libs/ext/libav/configure"
401 (string-append "#! "(which "sh"))))
404 `(("pkg-config" ,pkg-config)
407 `(("gst-plugins-base" ,gst-plugins-base)
411 (home-page "http://gstreamer.freedesktop.org/")
412 (synopsis "Plugins for the GStreamer multimedia library")
414 "This GStreamer plugin supports a large number of audio and video
415 compression formats through the use of the libav library.")
416 (license license:gpl2+)))
418 (define-public python-gst
425 "https://gstreamer.freedesktop.org/src/gst-python/"
426 "gst-python-" version ".tar.xz"))
429 "0hf71m0vqnd5sdj14li935xzzmqxh606qgw744a25w3vwj9v8nfy"))))
430 (build-system gnu-build-system)
432 ;; XXX: Factorize python-sitedir with python-build-system.
433 `(#:imported-modules (,@%gnu-build-system-modules
434 (guix build python-build-system))
436 (let* ((python (assoc-ref %build-inputs "python"))
437 (python-version ((@@ (guix build python-build-system)
440 (python-sitedir (string-append
441 "lib/python" python-version "/site-packages")))
443 "--with-pygi-overrides-dir=" %output "/" python-sitedir
446 `(("pkg-config" ,pkg-config)
449 `(("gst-plugins-base" ,gst-plugins-base)
450 ("python-pygobject" ,python-pygobject)))
451 (home-page "https://gstreamer.freedesktop.org/")
452 (synopsis "GStreamer GObject Introspection overrides for Python")
454 "This package contains GObject Introspection overrides for Python that can
455 be used by Python applications using GStreamer.")
456 (license license:lgpl2.1+)
457 (properties `((python2-variant . ,(delay python2-gst))))))
459 (define-public python2-gst
460 (package (inherit python-gst)
463 `(("pkg-config" ,pkg-config)
464 ("python" ,python-2)))
466 `(("gst-plugins-base" ,gst-plugins-base)
467 ("python-pygobject" ,python2-pygobject)))))