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