gnu: tuxguitar: Build with icedtea-8.
[jackhill/guix/guix.git] / gnu / packages / gstreamer.scm
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>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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))
63
64 (define-public orc
65 (package
66 (name "orc")
67 (version "0.4.27")
68 (source (origin
69 (method url-fetch)
70 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
71 "orc/orc-" version ".tar.xz"))
72 (sha256
73 (base32
74 "14vbwdydwarcvswzf744jdjb3ibhv6k4j6hzdacfan41zic3xrai"))))
75 (build-system gnu-build-system)
76 (arguments
77 `(#:phases
78 (modify-phases %standard-phases
79 (add-before 'check 'disable-faulty-test
80 (lambda _
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")
90 (description
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
93 arrays of data.")
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))))
97
98 (define-public gstreamer
99 (package
100 (name "gstreamer")
101 (version "1.12.3")
102 (source
103 (origin
104 (method url-fetch)
105 (uri (string-append
106 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
107 version ".tar.xz"))
108 (sha256
109 (base32
110 "0vi1g8rmmsnd630ds3jwv2iph46ll8y07fzf04mz15q88j9g926k"))))
111 (build-system gnu-build-system)
112 (outputs '("out" "doc"))
113 (arguments
114 `(#:configure-flags
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.
119 (native-inputs
120 `(("bison" ,bison)
121 ("flex" ,flex)
122 ("glib" ,glib "bin")
123 ("gobject-introspection" ,gobject-introspection)
124 ("perl" ,perl)
125 ("pkg-config" ,pkg-config)
126 ("python-wrapper" ,python-wrapper)))
127 (native-search-paths
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")
133 (description
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
137 non-linear editing.
138
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.
142
143 This package provides the core library and elements.")
144 (license license:lgpl2.0+)))
145
146 (define-public gst-plugins-base
147 (package
148 (name "gst-plugins-base")
149 (version "1.12.3")
150 (source
151 (origin
152 (method url-fetch)
153 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
154 name "-" version ".tar.xz"))
155 (sha256
156 (base32
157 "19ffwdch7m777ragmwpy6prqmfb742ym1n3ki40s0zyki627plyk"))))
158 (build-system gnu-build-system)
159 (outputs '("out" "doc"))
160 (propagated-inputs
161 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
162 (inputs
163 `(("cdparanoia" ,cdparanoia)
164 ("opus" ,opus)
165 ("orc" ,orc)
166 ("pango" ,pango)
167 ("libogg" ,libogg)
168 ("libtheora" ,libtheora)
169 ("libvorbis" ,libvorbis)
170 ("libx11" ,libx11)
171 ("zlib" ,zlib)
172 ("libXext" ,libxext)
173 ("libxv" ,libxv)
174 ("alsa-lib" ,alsa-lib)))
175 (native-inputs
176 `(("pkg-config" ,pkg-config)
177 ("glib" ,glib "bin")
178 ("gobject-introspection" ,gobject-introspection)
179 ("python-wrapper" ,python-wrapper)))
180 (arguments
181 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
182 #:configure-flags
183 (list (string-append "--with-html-dir="
184 (assoc-ref %outputs "doc")
185 "/share/gtk-doc/html"))
186 #:phases
187 (modify-phases %standard-phases
188 (add-before 'configure 'patch
189 (lambda _
190 (substitute* "tests/check/libs/pbutils.c"
191 (("/bin/sh") (which "sh")))
192 #t)))))
193 (home-page "https://gstreamer.freedesktop.org/")
194 (synopsis
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+)))
199
200
201 (define-public gst-plugins-good
202 (package
203 (name "gst-plugins-good")
204 (version "1.12.3")
205 (source
206 (origin
207 (method url-fetch)
208 (uri (string-append
209 "https://gstreamer.freedesktop.org/src/" name "/"
210 name "-" version ".tar.xz"))
211 (sha256
212 (base32
213 "00sznj1sl97fqpn6j8ngps04clvxp8h8yhw6lvszx4b855wz9rqk"))))
214 (build-system gnu-build-system)
215 (inputs
216 `(("aalib" ,aalib)
217 ("cairo" ,cairo)
218 ("flac" ,flac)
219 ("gdk-pixbuf" ,gdk-pixbuf)
220 ("gst-plugins-base" ,gst-plugins-base)
221 ("jack" ,jack-1)
222 ("libavc1394" ,libavc1394)
223 ("libcaca" ,libcaca)
224 ("libdv" ,libdv)
225 ("libiec61883" ,libiec61883)
226 ("libjpeg" ,libjpeg)
227 ("libpng" ,libpng)
228 ("libshout" ,libshout)
229 ("libsoup" ,libsoup)
230 ("libvpx" ,libvpx)
231 ("orc" ,orc)
232 ("pulseaudio" ,pulseaudio)
233 ("speex" ,speex)
234 ("taglib" ,taglib)
235 ("wavpack" ,wavpack)))
236 (native-inputs
237 `(("glib:bin" ,glib "bin")
238 ("pkg-config" ,pkg-config)
239 ("python-wrapper" ,python-wrapper)))
240 (arguments
241 `(#:phases
242 (modify-phases %standard-phases
243 (add-after
244 'unpack 'disable-failing-tests
245 (lambda _
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 " */")))
251 #t)))))
252 (home-page "https://gstreamer.freedesktop.org/")
253 (synopsis
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+)))
259
260 (define-public gst-plugins-bad
261 (package
262 (name "gst-plugins-bad")
263 (version "1.12.3")
264 (source (origin
265 (method url-fetch)
266 (uri (string-append "https://gstreamer.freedesktop.org/src/"
267 name "/" name "-" version ".tar.xz"))
268 (sha256
269 (base32
270 "1v5z3i5ha20gmbb3r9dwsaaspv5fm1jfzlzwlzqx1gjj31v5kl1n"))))
271 (outputs '("out" "doc"))
272 (build-system gnu-build-system)
273 (arguments
274 '(#:tests? #f ; XXX: 18 of 65 tests fail
275 #:configure-flags
276 (list (string-append "--with-html-dir="
277 (assoc-ref %outputs "doc")
278 "/share/gtk-doc/html"))
279 #:phases
280 (modify-phases %standard-phases
281 (add-after 'unpack 'patch-openjpeg-reference
282 (lambda _
283 ;; Remove hard-coded openjpeg-2.2 path. 2.3 is API- and
284 ;; ABI-compatible.
285 (substitute* "ext/openjpeg/gstopenjpeg.h"
286 (("<openjpeg-2\\.2/") "<openjpeg-2.3/"))
287 #t)))))
288 (propagated-inputs
289 `(("gst-plugins-base" ,gst-plugins-base)))
290 (native-inputs
291 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
292 ("gobject-introspection" ,gobject-introspection)
293 ("pkg-config" ,pkg-config)
294 ("python" ,python)))
295 (inputs
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
301 `(("bluez" ,bluez)
302 ("curl" ,curl)
303 ("faad2" ,faad2)
304 ("fluidsynth" ,fluidsynth)
305 ("gtk+" ,gtk+)
306 ("ladspa" ,ladspa)
307 ("libass" ,libass)
308 ("libdvdnav" ,libdvdnav)
309 ("libdvdread" ,libdvdread)
310 ("libgcrypt" ,libgcrypt)
311 ("libgudev" ,libgudev)
312 ("libkate" ,libkate)
313 ("libmodplug" ,libmodplug)
314 ("librsvg" ,librsvg)
315 ("libsndfile" ,libsndfile)
316 ("libsrtp" ,libsrtp)
317 ("libssh2" ,libssh2)
318 ("libusb" ,libusb)
319 ("libvdpau" ,libvdpau)
320 ("libwebp" ,libwebp)
321 ("libxml2" ,libxml2)
322 ("lrdf" ,lrdf)
323 ("mesa" ,mesa)
324 ("mpg123" ,mpg123)
325 ("neon" ,neon)
326 ("openal" ,openal)
327 ("openexr" ,openexr)
328 ("openjpeg" ,openjpeg)
329 ("openssl" ,openssl)
330 ("opus" ,opus)
331 ("orc" ,orc)
332 ;("qtbase" ,qtbase)
333 ;("qtdeclarative" ,qtdeclarative)
334 ;("qtx11extras" ,qtx11extras)
335 ("soundtouch" ,soundtouch)
336 ("x265" ,x265)
337 ("wayland" ,wayland)))
338 (home-page "https://gstreamer.freedesktop.org/")
339 (synopsis "Plugins for the GStreamer multimedia library")
340 (description
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+)))
344
345 (define-public gst-plugins-ugly
346 (package
347 (name "gst-plugins-ugly")
348 (version "1.12.3")
349 (source
350 (origin
351 (method url-fetch)
352 (uri (string-append "https://gstreamer.freedesktop.org/src/"
353 name "/" name "-" version ".tar.xz"))
354 (sha256
355 (base32
356 "0lh00rg26iy5lr5al23lxsyncjqkgzph1bzkrgp8x9sfr62ab378"))))
357 (build-system gnu-build-system)
358 (inputs
359 `(("gst-plugins-base" ,gst-plugins-base)
360 ("liba52" ,liba52)
361 ("libmad" ,libmad)
362 ("lame" ,lame)
363 ("libcdio" ,libcdio)
364 ("twolame" ,twolame)
365 ("libmpeg2" ,libmpeg2)
366 ("libdvdread" ,libdvdread)
367 ("libx264" ,libx264)
368 ("mpg123" ,mpg123)
369 ;; TODO:
370 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
371 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
372 ("orc" ,orc)))
373 (native-inputs
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+)))
383
384 (define-public gst-libav
385 (package
386 (name "gst-libav")
387 (version "1.12.3")
388 (source (origin
389 (method url-fetch)
390 (uri (string-append
391 "https://gstreamer.freedesktop.org/src/" name "/"
392 name "-" version ".tar.xz"))
393 (sha256
394 (base32
395 "0l4nc6ikdx49l7bdrk3bd9p3pzry8a328r22zg48gyzpnv5ghph1"))))
396 (build-system gnu-build-system)
397 (arguments
398 '(#:configure-flags '("--with-system-libav")
399 #:phases
400 (modify-phases %standard-phases
401 (add-before 'configure 'patch-/bin/sh
402 (lambda _
403 (substitute* "gst-libs/ext/libav/configure"
404 (("#! /bin/sh")
405 (string-append "#! "(which "sh"))))
406 #t)))))
407 (native-inputs
408 `(("pkg-config" ,pkg-config)
409 ("python" ,python)))
410 (inputs
411 `(("gst-plugins-base" ,gst-plugins-base)
412 ("ffmpeg" ,ffmpeg-3.3)
413 ("orc" ,orc)
414 ("zlib" ,zlib)))
415 (home-page "http://gstreamer.freedesktop.org/")
416 (synopsis "Plugins for the GStreamer multimedia library")
417 (description
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+)))
421
422 (define-public python-gst
423 (package
424 (name "python-gst")
425 (version "1.12.3")
426 (source (origin
427 (method url-fetch)
428 (uri (string-append
429 "https://gstreamer.freedesktop.org/src/gst-python/"
430 "gst-python-" version ".tar.xz"))
431 (sha256
432 (base32
433 "19rb06x2m7103zwfm0plxx95gb8bp01ng04h4q9k6ii9q7g2kxf3"))))
434 (build-system gnu-build-system)
435 (arguments
436 ;; XXX: Factorize python-sitedir with python-build-system.
437 `(#:imported-modules (,@%gnu-build-system-modules
438 (guix build python-build-system))
439 #:configure-flags
440 (let* ((python (assoc-ref %build-inputs "python"))
441 (python-version ((@@ (guix build python-build-system)
442 get-python-version)
443 python))
444 (python-sitedir (string-append
445 "lib/python" python-version "/site-packages")))
446 (list (string-append
447 "--with-pygi-overrides-dir=" %output "/" python-sitedir
448 "/gi/overrides")))))
449 (native-inputs
450 `(("pkg-config" ,pkg-config)
451 ("python" ,python)))
452 (propagated-inputs
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")
457 (description
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))))))
462
463 (define-public python2-gst
464 (package (inherit python-gst)
465 (name "python2-gst")
466 (native-inputs
467 `(("pkg-config" ,pkg-config)
468 ("python" ,python-2)))
469 (propagated-inputs
470 `(("gst-plugins-base" ,gst-plugins-base)
471 ("python-pygobject" ,python2-pygobject)))))