gnu: deutex: Update to 5.2.1.
[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, 2018 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages gstreamer)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system meson)
33 #:use-module (guix utils)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages audio)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages cdrom)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages freedesktop)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages gnupg)
46 #:use-module (gnu packages graphics)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages libusb)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages mp3)
52 #:use-module (gnu packages ncurses)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages qt)
56 #:use-module (gnu packages rdf)
57 #:use-module (gnu packages video)
58 #:use-module (gnu packages xorg)
59 #:use-module (gnu packages xiph)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages ssh)
63 #:use-module (gnu packages telephony)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages version-control)
66 #:use-module (gnu packages assembly)
67 #:use-module (gnu packages xml))
68
69 (define-public orc
70 (package
71 (name "orc")
72 (version "0.4.30")
73 (source (origin
74 (method url-fetch)
75 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
76 "orc/orc-" version ".tar.xz"))
77 (patches (search-patches "orc-typedef-enum.patch"))
78 (sha256
79 (base32
80 "0wj93im7i8a6546q2r8sp39yjfbxflkc0ygb0b8iqsd58qhvjhds"))))
81 (build-system meson-build-system)
82 (arguments
83 `(#:phases
84 (modify-phases %standard-phases
85 (add-after 'unpack 'disable-faulty-test
86 (lambda _
87 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
88 ;; tests, which fail on some machines. See:
89 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
90 (substitute* '("testsuite/test-limits.c"
91 "testsuite/exec_opcodes_sys.c")
92 (("if \\(error\\) return 1;")
93 "if (error) return 77;"))
94 #t)))))
95 (native-inputs
96 `(("gtk-doc" ,gtk-doc)))
97 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
98 (synopsis "Oil runtime compiler")
99 (description
100 "Orc is a just-in-time compiler implemented as a library and set of
101 associated tools for compiling and executing simple programs that operate on
102 arrays of data.")
103 ;; The source code implementing the Marsenne Twister algorithm is licensed
104 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
105 (license (list license:bsd-2 license:bsd-3))))
106
107 (define-public gstreamer
108 (package
109 (name "gstreamer")
110 (version "1.16.1")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append
115 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
116 version ".tar.xz"))
117 (sha256
118 (base32
119 "0z9pyhf6zm1r0spw6zym80bvbyx6h8xg9h6535csbnn48ws1q882"))))
120 (build-system gnu-build-system)
121 (outputs '("out" "doc"))
122 (arguments
123 `(#:configure-flags
124 (list (string-append "--with-html-dir="
125 (assoc-ref %outputs "doc")
126 "/share/gtk-doc/html"))))
127 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
128 (native-inputs
129 `(("bison" ,bison)
130 ("flex" ,flex)
131 ("glib" ,glib "bin")
132 ("gobject-introspection" ,gobject-introspection)
133 ("perl" ,perl)
134 ("pkg-config" ,pkg-config)
135 ("python-wrapper" ,python-wrapper)))
136 (native-search-paths
137 (list (search-path-specification
138 (variable "GST_PLUGIN_SYSTEM_PATH")
139 (files '("lib/gstreamer-1.0")))))
140 (home-page "https://gstreamer.freedesktop.org/")
141 (synopsis "Multimedia library")
142 (description
143 "GStreamer is a library for constructing graphs of media-handling
144 components. The applications it supports range from simple Ogg/Vorbis
145 playback, audio/video streaming to complex audio mixing and video
146 non-linear editing.
147
148 Applications can take advantage of advances in codec and filter technology
149 transparently. Developers can add new codecs and filters by writing a
150 simple plugin with a clean, generic interface.
151
152 This package provides the core library and elements.")
153 (license license:lgpl2.0+)))
154
155 (define-public gst-plugins-base
156 (package
157 (name "gst-plugins-base")
158 (version "1.16.1")
159 (source
160 (origin
161 (method url-fetch)
162 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
163 name "-" version ".tar.xz"))
164 (sha256
165 (base32
166 "0aybbwnzm15074smdk2bamj3ssck3hjvmilvgh49f19xjf4w8g2w"))))
167 (build-system gnu-build-system)
168 (outputs '("out" "doc"))
169 (propagated-inputs
170 `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
171 ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
172 ("orc" ,orc))) ;required by gstreamer-audio-1.0.pc
173 (inputs
174 `(("cdparanoia" ,cdparanoia)
175 ("pango" ,pango)
176 ("libogg" ,libogg)
177 ("libtheora" ,libtheora)
178 ("libvorbis" ,libvorbis)
179 ("libx11" ,libx11)
180 ("zlib" ,zlib)
181 ("libXext" ,libxext)
182 ("libxv" ,libxv)
183 ("alsa-lib" ,alsa-lib)
184 ;; XXX Don't build with opus on 32-bit systems:
185 ;; <https://bugs.gnu.org/32360>
186 ,@(if (target-64bit?)
187 `(("opus" ,opus))
188 '())))
189 (native-inputs
190 `(("pkg-config" ,pkg-config)
191 ("glib:bin" ,glib "bin")
192 ("gobject-introspection" ,gobject-introspection)
193 ("python-wrapper" ,python-wrapper)))
194 (arguments
195 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
196 #:configure-flags
197 (list (string-append "--with-html-dir="
198 (assoc-ref %outputs "doc")
199 "/share/gtk-doc/html"))
200 #:phases
201 (modify-phases %standard-phases
202 (add-before 'configure 'patch
203 (lambda _
204 (substitute* "tests/check/libs/pbutils.c"
205 (("/bin/sh") (which "sh")))
206 #t)))))
207 (home-page "https://gstreamer.freedesktop.org/")
208 (synopsis
209 "Plugins for the GStreamer multimedia library")
210 (description "This package provides an essential exemplary set of plug-ins
211 for the GStreamer multimedia library.")
212 (license license:lgpl2.0+)))
213
214 (define-public gst-plugins-good
215 (package
216 (name "gst-plugins-good")
217 (version "1.16.1")
218 (source
219 (origin
220 (method url-fetch)
221 (uri (string-append
222 "https://gstreamer.freedesktop.org/src/" name "/"
223 name "-" version ".tar.xz"))
224 (sha256
225 (base32
226 "07wgz9anf4ram2snp8n1wv6l0q3pd00iaw8bvw3wgklg05lvxflz"))))
227 (build-system gnu-build-system)
228 (inputs
229 `(("aalib" ,aalib)
230 ("cairo" ,cairo)
231 ("flac" ,flac)
232 ("gdk-pixbuf" ,gdk-pixbuf)
233 ("gst-plugins-base" ,gst-plugins-base)
234 ("gtk+" ,gtk+)
235 ("jack" ,jack-1)
236 ("lame" ,lame)
237 ("libavc1394" ,libavc1394)
238 ("libcaca" ,libcaca)
239 ("libdv" ,libdv)
240 ("libiec61883" ,libiec61883)
241 ("libjpeg" ,libjpeg)
242 ("libpng" ,libpng)
243 ("libshout" ,libshout)
244 ("libsoup" ,libsoup)
245 ("libvpx" ,libvpx)
246 ("mpg123" ,mpg123)
247 ("orc" ,orc)
248 ("pulseaudio" ,pulseaudio)
249 ("speex" ,speex)
250 ("taglib" ,taglib)
251 ("twolame" ,twolame)
252 ("wavpack" ,wavpack)))
253 (native-inputs
254 `(("glib:bin" ,glib "bin")
255 ("pkg-config" ,pkg-config)
256 ("python-wrapper" ,python-wrapper)))
257 (arguments
258 `(#:phases
259 (modify-phases %standard-phases
260 (add-after
261 'unpack 'disable-failing-tests
262 (lambda _
263 ;; Disable tests that fail non-deterministically.
264 ;; This test fails on aarch64 on 1.12.x.
265 (substitute* "tests/check/elements/alpha.c"
266 (("tcase_add_test \\(tc_chain, test_chromakeying\\);" all)
267 (string-append "/* " all " */")))
268 #t)))))
269 (home-page "https://gstreamer.freedesktop.org/")
270 (synopsis
271 "Plugins for the GStreamer multimedia library")
272 (description "GStreamer Good Plug-ins is a set of plug-ins for the
273 GStreamer multimedia library. This set contains those plug-ins which the
274 developers consider to have good quality code and correct functionality.")
275 (license license:lgpl2.0+)))
276
277 (define-public gst-plugins-bad
278 (package
279 (name "gst-plugins-bad")
280 (version "1.16.1")
281 (source (origin
282 (method url-fetch)
283 (uri (string-append "https://gstreamer.freedesktop.org/src/"
284 name "/" name "-" version ".tar.xz"))
285 (sha256
286 (base32
287 "1dddqacxgp77f3nl153x5a6139wdphc9phds2fpqb2cv6faiqj2n"))))
288 (outputs '("out" "doc"))
289 (build-system gnu-build-system)
290 (arguments
291 '(#:tests? #f ; XXX: 13 of 53 tests fail
292
293 ;; FIXME: OpenEXR 2.4.0 requires C++ 11 or later. Remove when the
294 ;; default compiler is >= GCC 5.
295 #:make-flags '("CXXFLAGS=-std=gnu++11")
296
297 #:configure-flags
298 (list (string-append "--with-html-dir="
299 (assoc-ref %outputs "doc")
300 "/share/gtk-doc/html"))))
301 (propagated-inputs
302 `(("gst-plugins-base" ,gst-plugins-base)))
303 (native-inputs
304 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
305 ("gobject-introspection" ,gobject-introspection)
306 ("pkg-config" ,pkg-config)
307 ("python" ,python)))
308 (inputs
309 ;; XXX: The following dependencies are missing:
310 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
311 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
312 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
313 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
314 `(("bluez" ,bluez)
315 ("curl" ,curl)
316 ("faad2" ,faad2)
317 ("fluidsynth" ,fluidsynth)
318 ("gtk+" ,gtk+)
319 ("ladspa" ,ladspa)
320 ("libass" ,libass)
321 ("libdvdnav" ,libdvdnav)
322 ("libdvdread" ,libdvdread)
323 ("libgcrypt" ,libgcrypt)
324 ("libgudev" ,libgudev)
325 ("libkate" ,libkate)
326 ("libmodplug" ,libmodplug)
327 ("librsvg" ,librsvg)
328 ("libsndfile" ,libsndfile)
329 ("libsrtp" ,libsrtp)
330 ("libssh2" ,libssh2)
331 ("libusb" ,libusb)
332 ("libvdpau" ,libvdpau)
333 ("libwebp" ,libwebp)
334 ("libxml2" ,libxml2)
335 ("lrdf" ,lrdf)
336 ("mesa" ,mesa)
337 ("neon" ,neon)
338 ("openal" ,openal)
339 ("openexr" ,openexr)
340 ("openjpeg" ,openjpeg)
341 ("openssl" ,openssl)
342 ("opus" ,opus)
343 ("orc" ,orc)
344 ;("qtbase" ,qtbase)
345 ;("qtdeclarative" ,qtdeclarative)
346 ;("qtx11extras" ,qtx11extras)
347 ("soundtouch" ,soundtouch)
348 ("x265" ,x265)
349 ("wayland" ,wayland)))
350 (home-page "https://gstreamer.freedesktop.org/")
351 (synopsis "Plugins for the GStreamer multimedia library")
352 (description
353 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
354 par compared to the rest.")
355 (license license:lgpl2.0+)))
356
357 (define-public gst-plugins-ugly
358 (package
359 (name "gst-plugins-ugly")
360 (version "1.16.1")
361 (source
362 (origin
363 (method url-fetch)
364 (uri (string-append "https://gstreamer.freedesktop.org/src/"
365 name "/" name "-" version ".tar.xz"))
366 (sha256
367 (base32
368 "07cajqjs8pqchpf2sm87hljx4ibwvkiavqxmacxsr5airar17yab"))))
369 (build-system gnu-build-system)
370 (inputs
371 `(("gst-plugins-base" ,gst-plugins-base)
372 ("liba52" ,liba52)
373 ("libcdio" ,libcdio)
374 ("libmpeg2" ,libmpeg2)
375 ("libdvdread" ,libdvdread)
376 ("libx264" ,libx264)
377 ;; TODO:
378 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
379 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
380 ("orc" ,orc)))
381 (native-inputs
382 `(("glib:bin" ,glib "bin")
383 ("pkg-config" ,pkg-config)
384 ("python-wrapper" ,python-wrapper)))
385 (home-page "https://gstreamer.freedesktop.org/")
386 (synopsis "GStreamer plugins from the \"ugly\" set")
387 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
388 which the developers consider to have good quality code but that might pose
389 distribution problems in some jurisdictions, e.g. due to patent threats.")
390 (license license:lgpl2.0+)))
391
392 (define-public gst-libav
393 (package
394 (name "gst-libav")
395 (version "1.16.1")
396 (source (origin
397 (method url-fetch)
398 (uri (string-append
399 "https://gstreamer.freedesktop.org/src/" name "/"
400 name "-" version ".tar.xz"))
401 (sha256
402 (base32
403 "1i31ra0l77cfahb6k5xpx45zwvpskzm848aijsbbx9x4x65799g8"))
404 (modules '((guix build utils)))
405 (snippet
406 '(begin
407 ;; Drop bundled ffmpeg.
408 (delete-file-recursively "gst-libs/ext/libav")
409 #t))))
410 (build-system gnu-build-system)
411 (arguments
412 '(#:configure-flags '("--with-system-libav")))
413 (native-inputs
414 `(("pkg-config" ,pkg-config)
415 ("python" ,python)))
416 (inputs
417 `(("gst-plugins-base" ,gst-plugins-base)
418 ("ffmpeg" ,ffmpeg)
419 ("orc" ,orc)
420 ("zlib" ,zlib)))
421 (home-page "https://gstreamer.freedesktop.org/")
422 (synopsis "Plugins for the GStreamer multimedia library")
423 (description
424 "This GStreamer plugin supports a large number of audio and video
425 compression formats through the use of the libav library.")
426 (license license:gpl2+)))
427
428 (define-public python-gst
429 (package
430 (name "python-gst")
431 (version "1.16.1")
432 (source (origin
433 (method url-fetch)
434 (uri (string-append
435 "https://gstreamer.freedesktop.org/src/gst-python/"
436 "gst-python-" version ".tar.xz"))
437 (sha256
438 (base32
439 "12bl6kc0ny2vyf6klas2bwqcv0pi55q9ns5zw261px16a6awhsdl"))))
440 (build-system gnu-build-system)
441 (arguments
442 `(#:modules ((guix build gnu-build-system)
443 ((guix build python-build-system) #:prefix python:))
444 #:imported-modules (,@%gnu-build-system-modules
445 (guix build python-build-system))
446 #:configure-flags
447 (list (string-append
448 "--with-pygi-overrides-dir="
449 (python:site-packages %build-inputs %outputs) "gi/overrides"))))
450 (native-inputs
451 `(("pkg-config" ,pkg-config)
452 ("python" ,python)))
453 (propagated-inputs
454 `(("gst-plugins-base" ,gst-plugins-base)
455 ("python-pygobject" ,python-pygobject)))
456 (home-page "https://gstreamer.freedesktop.org/")
457 (synopsis "GStreamer GObject Introspection overrides for Python")
458 (description
459 "This package contains GObject Introspection overrides for Python that can
460 be used by Python applications using GStreamer.")
461 (license license:lgpl2.1+)
462 (properties `((python2-variant . ,(delay python2-gst))))))
463
464 (define-public python2-gst
465 (package (inherit python-gst)
466 (name "python2-gst")
467 (native-inputs
468 `(("pkg-config" ,pkg-config)
469 ("python" ,python-2)))
470 (propagated-inputs
471 `(("gst-plugins-base" ,gst-plugins-base)
472 ("python-pygobject" ,python2-pygobject)))))
473
474 (define-public gst123
475 (package
476 (name "gst123")
477 (version "0.3.5")
478 (source (origin
479 (method url-fetch)
480 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
481 version ".tar.bz2"))
482 (sha256
483 (base32
484 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
485 (build-system gnu-build-system)
486 (inputs
487 `(("gtk+" ,gtk+-2)
488 ("ncurses" ,ncurses)
489 ("gstreamer" ,gstreamer)
490 ("gst-plugins-base" ,gst-plugins-base)))
491 (native-inputs
492 `(("pkg-config" ,pkg-config)))
493 (home-page "http://space.twc.de/~stefan/gst123.php")
494 (synopsis "Flexible command line media player based on gstreamer")
495 (description "The program gst123 is designed to be a more flexible command
496 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
497 framework. It plays all file formats gstreamer supports, so if you have a
498 music collection which contains different file formats, like flac, ogg and
499 mp3, you can use gst123 to play all your music files.")
500 (license license:lgpl2.0+)))