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>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages gstreamer)
23 #:use-module ((guix licenses) #:select (lgpl2.0+ lgpl2.1+ bsd-2 bsd-3 gpl2+))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix utils)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages audio)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages cdrom)
32 #:use-module (gnu packages curl)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages flex)
35 #:use-module (gnu packages freedesktop)
36 #:use-module (gnu packages gl)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gnome)
39 #:use-module (gnu packages gnupg)
40 #:use-module (gnu packages graphics)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages image)
43 #:use-module (gnu packages libusb)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages mp3)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pulseaudio)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages rdf)
50 #:use-module (gnu packages video)
51 #:use-module (gnu packages xorg)
52 #:use-module (gnu packages xiph)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages ssh)
56 #:use-module (gnu packages telephony)
57 #:use-module (gnu packages tls)
58 #:use-module (gnu packages version-control)
59 #:use-module (gnu packages yasm)
60 #:use-module (gnu packages xml))
68 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
69 "orc/orc-" version ".tar.xz"))
72 "1lak3hyvvb0w9avzmf0a8vayb7vqhj4m709q1czlhvgjb15dbcf1"))))
73 (build-system gnu-build-system)
76 'check 'disable-faulty-test
78 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
79 ;; tests, which fail on some machines. See:
80 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
81 (substitute* '("testsuite/test-limits.c"
82 "testsuite/exec_opcodes_sys.c")
83 (("if \\(error\\) return 1;")
84 "if (error) return 77;")))
86 (home-page "http://code.entropywave.com/orc/")
87 (synopsis "Oil runtime compiler")
89 "Orc is a just-in-time compiler implemented as a library and set of
90 associated tools for compiling and executing simple programs that operate on
92 ;; The source code implementing the Marsenne Twister algorithm is licensed
93 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
94 (license (list bsd-2 bsd-3))))
96 (define-public gstreamer
104 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
108 "093zldafh7xh3lrlwzm7j0vvjz6k9ca83wqil40gfz5qcy6mdy92"))))
109 (build-system gnu-build-system)
110 (outputs '("out" "doc"))
113 (list (string-append "--with-html-dir="
114 (assoc-ref %outputs "doc")
115 "/share/gtk-doc/html"))))
116 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
121 ("gobject-introspection" ,gobject-introspection)
123 ("pkg-config" ,pkg-config)
124 ("python-wrapper" ,python-wrapper)))
126 (list (search-path-specification
127 (variable "GST_PLUGIN_SYSTEM_PATH")
128 (files '("lib/gstreamer-1.0")))))
129 (home-page "https://gstreamer.freedesktop.org/")
130 (synopsis "Multimedia library")
132 "GStreamer is a library for constructing graphs of media-handling
133 components. The applications it supports range from simple Ogg/Vorbis
134 playback, audio/video streaming to complex audio mixing and video
137 Applications can take advantage of advances in codec and filter technology
138 transparently. Developers can add new codecs and filters by writing a
139 simple plugin with a clean, generic interface.
141 This package provides the core library and elements.")
144 (define-public gst-plugins-base
146 (name "gst-plugins-base")
151 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
152 name "-" version ".tar.xz"))
155 "0xbskifk95rw7jd85sqjrmqh2kys1bpi0inrxyapx1x4vf7ly5dn"))))
156 (build-system gnu-build-system)
157 (outputs '("out" "doc"))
159 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
161 `(("cdparanoia" ,cdparanoia)
165 ("libtheora" ,libtheora)
166 ("libvorbis" ,libvorbis)
171 ("alsa-lib" ,alsa-lib)))
173 `(("pkg-config" ,pkg-config)
175 ("gobject-introspection" ,gobject-introspection)
176 ("python-wrapper" ,python-wrapper)))
178 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
180 (list (string-append "--with-html-dir="
181 (assoc-ref %outputs "doc")
182 "/share/gtk-doc/html"))
184 (modify-phases %standard-phases
185 (add-before 'configure 'patch
187 (substitute* "tests/check/libs/pbutils.c"
188 (("/bin/sh") (which "sh"))))))))
189 (home-page "http://gstreamer.freedesktop.org/")
191 "Plugins for the GStreamer multimedia library")
192 (description "This package provides an essential exemplary set of plug-ins
193 for the GStreamer multimedia library.")
197 (define-public gst-plugins-good
199 (name "gst-plugins-good")
205 "https://gstreamer.freedesktop.org/src/" name "/"
206 name "-" version ".tar.xz"))
209 "0xx16h0q63gs3pxlzdflnpyssba3vcrh1qnzplg4d0ra1fvrvc94"))))
210 (build-system gnu-build-system)
215 ("gdk-pixbuf" ,gdk-pixbuf)
216 ("gst-plugins-base" ,gst-plugins-base)
218 ("libavc1394" ,libavc1394)
221 ("libiec61883" ,libiec61883)
224 ("libshout" ,libshout)
228 ("pulseaudio" ,pulseaudio)
231 ("wavpack" ,wavpack)))
233 `(("glib:bin" ,glib "bin")
234 ("pkg-config" ,pkg-config)
235 ("python-wrapper" ,python-wrapper)))
238 (modify-phases %standard-phases
240 'unpack 'disable-failing-rtprtx-tests
242 ;; Disable rtprtx tests that frequently fail.
243 ;; XXX FIXME: Try removing this for version > 1.6.3.
244 (substitute* "tests/check/elements/rtprtx.c"
245 (("tcase_add_test \\(tc_chain,\
246 (test_rtxsender_max_size_packets|test_rtxreceive_data_reconstruction)\\);" all)
247 (string-append "/* " all " */")))
249 (home-page "http://gstreamer.freedesktop.org/")
251 "Plugins for the GStreamer multimedia library")
252 (description "GStreamer Good Plug-ins is a set of plug-ins for the
253 GStreamer multimedia library. This set contains those plug-ins which the
254 developers consider to have good quality code and correct functionality.")
257 (define-public gst-plugins-bad
259 (name "gst-plugins-bad")
263 (uri (string-append "https://gstreamer.freedesktop.org/src/"
264 name "/" name "-" version ".tar.xz"))
267 "0q9s5da54819gwncmdi95l5qzx97l9vxk6adx4zmx73a3l82j6wp"))))
268 (outputs '("out" "doc"))
269 (build-system gnu-build-system)
271 '(#:tests? #f ; XXX: 11 of 54 tests fail
273 (list (string-append "--with-html-dir="
274 (assoc-ref %outputs "doc")
275 "/share/gtk-doc/html"))))
277 `(("gst-plugins-base" ,gst-plugins-base)))
279 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
280 ("gobject-introspection" ,gobject-introspection)
281 ("pkg-config" ,pkg-config)
284 ;; XXX: The following dependencies are missing:
285 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
286 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
287 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
288 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp, x265
292 ("fluidsynth" ,fluidsynth)
296 ("libdvdnav" ,libdvdnav)
297 ("libdvdread" ,libdvdread)
298 ("libgcrypt" ,libgcrypt)
299 ("libgudev" ,libgudev)
301 ("libmodplug" ,libmodplug)
303 ("libsndfile" ,libsndfile)
307 ("libvdpau" ,libvdpau)
316 ("openjpeg" ,openjpeg)
321 ("soundtouch" ,soundtouch)
322 ("wayland" ,wayland)))
323 (home-page "http://gstreamer.freedesktop.org/")
324 (synopsis "Plugins for the GStreamer multimedia library")
326 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
327 par compared to the rest.")
330 (define-public gst-plugins-ugly
332 (name "gst-plugins-ugly")
337 (uri (string-append "https://gstreamer.freedesktop.org/src/"
338 name "/" name "-" version ".tar.xz"))
341 "0r6h3ys5n90jv3c06crxzcac561z07s4h04hy5i8ybw8qyvzgv1g"))))
342 (build-system gnu-build-system)
344 `(("gst-plugins-base" ,gst-plugins-base)
350 ("libmpeg2" ,libmpeg2)
351 ("libdvdread" ,libdvdread)
354 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
355 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
358 `(("glib:bin" ,glib "bin")
359 ("pkg-config" ,pkg-config)
360 ("python-wrapper" ,python-wrapper)))
361 (home-page "http://gstreamer.freedesktop.org/")
362 (synopsis "GStreamer plugins from the \"ugly\" set")
363 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
364 which the developers consider to have good quality code but that might pose
365 distribution problems in some jurisdictions, e.g. due to patent threats.")
368 (define-public gst-libav
375 "https://gstreamer.freedesktop.org/src/" name "/"
376 name "-" version ".tar.xz"))
379 "1aylbg1xnm68c3wc49mzx813qhsjfg23hqnjqqwdwdq31839qyw5"))))
380 (build-system gnu-build-system)
382 '(#:configure-flags '("--with-system-libav")
384 (modify-phases %standard-phases
385 (add-before 'configure 'patch-/bin/sh
387 (substitute* "gst-libs/ext/libav/configure"
389 (string-append "#! "(which "sh")))))))))
391 `(("pkg-config" ,pkg-config)
394 `(("gst-plugins-base" ,gst-plugins-base)
398 (home-page "http://gstreamer.freedesktop.org/")
399 (synopsis "Plugins for the GStreamer multimedia library")
401 "This GStreamer plugin supports a large number of audio and video
402 compression formats through the use of the libav library.")
405 (define-public python-gst
412 "https://gstreamer.freedesktop.org/src/gst-python/"
413 "gst-python-" version ".tar.xz"))
416 "09ci5zvr7lms7mvgbjgsjwaxcl4nq45n1g9pdwnqmx3rf0qkwxjf"))))
417 (build-system gnu-build-system)
419 ;; XXX: Factorize python-sitedir with python-build-system.
420 `(#:imported-modules (,@%gnu-build-system-modules
421 (guix build python-build-system))
423 (let* ((python (assoc-ref %build-inputs "python"))
424 (python-version ((@@ (guix build python-build-system)
427 (python-sitedir (string-append
428 "lib/python" python-version "/site-packages")))
430 "--with-pygi-overrides-dir=" %output "/" python-sitedir
433 `(("pkg-config" ,pkg-config)
436 `(("gst-plugins-base" ,gst-plugins-base)
437 ("python-pygobject" ,python-pygobject)))
438 (home-page "http://gstreamer.freedesktop.org/")
439 (synopsis "GStreamer GObject Introspection overrides for Python")
441 "This package contains GObject Introspection overrides for Python that can
442 be used by Python applications using GStreamer.")
444 (properties `((python2-variant . ,(delay python2-gst))))))
446 (define-public python2-gst
447 (package (inherit python-gst)
450 `(("pkg-config" ,pkg-config)
451 ("python" ,python-2)))
453 `(("gst-plugins-base" ,gst-plugins-base)
454 ("python-pygobject" ,python2-pygobject)))))