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) #:select (lgpl2.0+ lgpl2.1+ bsd-2 bsd-3 gpl2+))
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 "1lak3hyvvb0w9avzmf0a8vayb7vqhj4m709q1czlhvgjb15dbcf1"))))
74 (build-system gnu-build-system)
77 'check 'disable-faulty-test
79 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
80 ;; tests, which fail on some machines. See:
81 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
82 (substitute* '("testsuite/test-limits.c"
83 "testsuite/exec_opcodes_sys.c")
84 (("if \\(error\\) return 1;")
85 "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 bsd-2 bsd-3))))
97 (define-public gstreamer
105 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
109 "0hc3j684nx209p10ampvnkza3gna2yiryr7jyx701ciakh3vxglx"))))
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.")
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 "13fk751vvfrfhbm4ip28vxyvlsm4b4y0bc0pvf7fqp8azg40jwcx"))))
157 (build-system gnu-build-system)
158 (outputs '("out" "doc"))
160 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
162 `(("cdparanoia" ,cdparanoia)
166 ("libtheora" ,libtheora)
167 ("libvorbis" ,libvorbis)
172 ("alsa-lib" ,alsa-lib)))
174 `(("pkg-config" ,pkg-config)
176 ("gobject-introspection" ,gobject-introspection)
177 ("python-wrapper" ,python-wrapper)))
179 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
181 (list (string-append "--with-html-dir="
182 (assoc-ref %outputs "doc")
183 "/share/gtk-doc/html"))
185 (modify-phases %standard-phases
186 (add-before 'configure 'patch
188 (substitute* "tests/check/libs/pbutils.c"
189 (("/bin/sh") (which "sh"))))))))
190 (home-page "https://gstreamer.freedesktop.org/")
192 "Plugins for the GStreamer multimedia library")
193 (description "This package provides an essential exemplary set of plug-ins
194 for the GStreamer multimedia library.")
198 (define-public gst-plugins-good
200 (name "gst-plugins-good")
206 "https://gstreamer.freedesktop.org/src/" name "/"
207 name "-" version ".tar.xz"))
210 "0i1rlbbx3m6ykvcdyaidsd8wa2b7nq2qmcvbrsg00yivi88ljxcd"))))
211 (build-system gnu-build-system)
216 ("gdk-pixbuf" ,gdk-pixbuf)
217 ("gst-plugins-base" ,gst-plugins-base)
219 ("libavc1394" ,libavc1394)
222 ("libiec61883" ,libiec61883)
225 ("libshout" ,libshout)
229 ("pulseaudio" ,pulseaudio)
232 ("wavpack" ,wavpack)))
234 `(("glib:bin" ,glib "bin")
235 ("pkg-config" ,pkg-config)
236 ("python-wrapper" ,python-wrapper)))
239 (modify-phases %standard-phases
241 'unpack 'disable-failing-tests
243 ;; Disable tests that fail non-deterministically.
244 ;; XXX FIXME: Try removing this for version > 1.8.0.
245 (substitute* "tests/check/elements/rtprtx.c"
246 (("tcase_add_test \\(tc_chain, test_push_forward_seq\\);" all)
247 (string-append "/* " all " */"))
249 \\(tc_chain, test_rtxreceive_data_reconstruction\\);" all)
250 (string-append "/* " all " */")))
251 (substitute* "tests/check/elements/splitmux.c"
252 (("tcase_add_test \\(tc_chain, test_splitmuxsink\\);" all)
253 (string-append "/* " all " */")))
255 (home-page "https://gstreamer.freedesktop.org/")
257 "Plugins for the GStreamer multimedia library")
258 (description "GStreamer Good Plug-ins is a set of plug-ins for the
259 GStreamer multimedia library. This set contains those plug-ins which the
260 developers consider to have good quality code and correct functionality.")
263 (define-public gst-plugins-bad
265 (name "gst-plugins-bad")
269 (uri (string-append "https://gstreamer.freedesktop.org/src/"
270 name "/" name "-" version ".tar.xz"))
273 "0q9s5da54819gwncmdi95l5qzx97l9vxk6adx4zmx73a3l82j6wp"))))
274 (outputs '("out" "doc"))
275 (build-system gnu-build-system)
277 '(#:tests? #f ; XXX: 11 of 54 tests fail
279 (list (string-append "--with-html-dir="
280 (assoc-ref %outputs "doc")
281 "/share/gtk-doc/html"))))
283 `(("gst-plugins-base" ,gst-plugins-base)))
285 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
286 ("gobject-introspection" ,gobject-introspection)
287 ("pkg-config" ,pkg-config)
290 ;; XXX: The following dependencies are missing:
291 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
292 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
293 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
294 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp, x265
298 ("fluidsynth" ,fluidsynth)
302 ("libdvdnav" ,libdvdnav)
303 ("libdvdread" ,libdvdread)
304 ("libgcrypt" ,libgcrypt)
305 ("libgudev" ,libgudev)
307 ("libmodplug" ,libmodplug)
309 ("libsndfile" ,libsndfile)
313 ("libvdpau" ,libvdpau)
322 ("openjpeg" ,openjpeg)
327 ("soundtouch" ,soundtouch)
328 ("wayland" ,wayland)))
329 (home-page "http://gstreamer.freedesktop.org/")
330 (synopsis "Plugins for the GStreamer multimedia library")
332 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
333 par compared to the rest.")
336 (define-public gst-plugins-ugly
338 (name "gst-plugins-ugly")
343 (uri (string-append "https://gstreamer.freedesktop.org/src/"
344 name "/" name "-" version ".tar.xz"))
347 "1b58s7z430cbbaw8mgy87kslbpmj3xmm66wsr7bddhcgm6i36nww"))))
348 (build-system gnu-build-system)
350 `(("gst-plugins-base" ,gst-plugins-base)
356 ("libmpeg2" ,libmpeg2)
357 ("libdvdread" ,libdvdread)
360 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
361 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
364 `(("glib:bin" ,glib "bin")
365 ("pkg-config" ,pkg-config)
366 ("python-wrapper" ,python-wrapper)))
367 (home-page "https://gstreamer.freedesktop.org/")
368 (synopsis "GStreamer plugins from the \"ugly\" set")
369 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
370 which the developers consider to have good quality code but that might pose
371 distribution problems in some jurisdictions, e.g. due to patent threats.")
374 (define-public gst-libav
381 "https://gstreamer.freedesktop.org/src/" name "/"
382 name "-" version ".tar.xz"))
385 "0719njp8aarhvn038pijq6dmsnli0zlg146hyfs3rsdffs4f472s"))))
386 (build-system gnu-build-system)
388 '(#:configure-flags '("--with-system-libav")
390 (modify-phases %standard-phases
391 (add-before 'configure 'patch-/bin/sh
393 (substitute* "gst-libs/ext/libav/configure"
395 (string-append "#! "(which "sh")))))))))
397 `(("pkg-config" ,pkg-config)
400 `(("gst-plugins-base" ,gst-plugins-base)
404 (home-page "http://gstreamer.freedesktop.org/")
405 (synopsis "Plugins for the GStreamer multimedia library")
407 "This GStreamer plugin supports a large number of audio and video
408 compression formats through the use of the libav library.")
411 (define-public python-gst
418 "https://gstreamer.freedesktop.org/src/gst-python/"
419 "gst-python-" version ".tar.xz"))
422 "1spn49x7yaj69df6mxh9wwcs0y3abswkfpk84njs71lzqlbzyiff"))))
423 (build-system gnu-build-system)
425 ;; XXX: Factorize python-sitedir with python-build-system.
426 `(#:imported-modules (,@%gnu-build-system-modules
427 (guix build python-build-system))
429 (let* ((python (assoc-ref %build-inputs "python"))
430 (python-version ((@@ (guix build python-build-system)
433 (python-sitedir (string-append
434 "lib/python" python-version "/site-packages")))
436 "--with-pygi-overrides-dir=" %output "/" python-sitedir
439 `(("pkg-config" ,pkg-config)
442 `(("gst-plugins-base" ,gst-plugins-base)
443 ("python-pygobject" ,python-pygobject)))
444 (home-page "https://gstreamer.freedesktop.org/")
445 (synopsis "GStreamer GObject Introspection overrides for Python")
447 "This package contains GObject Introspection overrides for Python that can
448 be used by Python applications using GStreamer.")
450 (properties `((python2-variant . ,(delay python2-gst))))))
452 (define-public python2-gst
453 (package (inherit python-gst)
456 `(("pkg-config" ,pkg-config)
457 ("python" ,python-2)))
459 `(("gst-plugins-base" ,gst-plugins-base)
460 ("python-pygobject" ,python2-pygobject)))))