Merge branch 'master' into core-updates
[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 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.12.4")
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 "0x06jxmc5fhlz7cr1pl5lp0hm1jgz519jjic37d09srf9jm091ss"))))
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.12.4")
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 "10i255q7i8an1hxz3szb36x1jcs9nfdy511pj2wg24h2vw1nnc2c"))))
162 (build-system gnu-build-system)
163 (outputs '("out" "doc"))
164 (propagated-inputs
165 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
166 (inputs
167 `(("cdparanoia" ,cdparanoia)
168 ("opus" ,opus)
169 ("orc" ,orc)
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 (native-inputs
180 `(("pkg-config" ,pkg-config)
181 ("glib" ,glib "bin")
182 ("gobject-introspection" ,gobject-introspection)
183 ("python-wrapper" ,python-wrapper)))
184 (arguments
185 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
186 #:configure-flags
187 (list (string-append "--with-html-dir="
188 (assoc-ref %outputs "doc")
189 "/share/gtk-doc/html"))
190 #:phases
191 (modify-phases %standard-phases
192 (add-before 'configure 'patch
193 (lambda _
194 (substitute* "tests/check/libs/pbutils.c"
195 (("/bin/sh") (which "sh")))
196 #t)))))
197 (home-page "https://gstreamer.freedesktop.org/")
198 (synopsis
199 "Plugins for the GStreamer multimedia library")
200 (description "This package provides an essential exemplary set of plug-ins
201 for the GStreamer multimedia library.")
202 (license license:lgpl2.0+)))
203
204
205 (define-public gst-plugins-good
206 (package
207 (name "gst-plugins-good")
208 (version "1.12.4")
209 (source
210 (origin
211 (method url-fetch)
212 (uri (string-append
213 "https://gstreamer.freedesktop.org/src/" name "/"
214 name "-" version ".tar.xz"))
215 (sha256
216 (base32
217 "0mxrbrqrfq1946gn9im19maj7ivld4k946vkwrzd94h8qsz4k7v4"))))
218 (build-system gnu-build-system)
219 (inputs
220 `(("aalib" ,aalib)
221 ("cairo" ,cairo)
222 ("flac" ,flac)
223 ("gdk-pixbuf" ,gdk-pixbuf)
224 ("gst-plugins-base" ,gst-plugins-base)
225 ("jack" ,jack-1)
226 ("libavc1394" ,libavc1394)
227 ("libcaca" ,libcaca)
228 ("libdv" ,libdv)
229 ("libiec61883" ,libiec61883)
230 ("libjpeg" ,libjpeg)
231 ("libpng" ,libpng)
232 ("libshout" ,libshout)
233 ("libsoup" ,libsoup)
234 ("libvpx" ,libvpx)
235 ("orc" ,orc)
236 ("pulseaudio" ,pulseaudio)
237 ("speex" ,speex)
238 ("taglib" ,taglib)
239 ("wavpack" ,wavpack)))
240 (native-inputs
241 `(("glib:bin" ,glib "bin")
242 ("pkg-config" ,pkg-config)
243 ("python-wrapper" ,python-wrapper)))
244 (arguments
245 `(#:phases
246 (modify-phases %standard-phases
247 (add-after
248 'unpack 'disable-failing-tests
249 (lambda _
250 ;; Disable tests that fail non-deterministically.
251 ;; This test fails on aarch64 on 1.12.x.
252 (substitute* "tests/check/elements/alpha.c"
253 (("tcase_add_test \\(tc_chain, test_chromakeying\\);" all)
254 (string-append "/* " all " */")))
255 #t)))))
256 (home-page "https://gstreamer.freedesktop.org/")
257 (synopsis
258 "Plugins for the GStreamer multimedia library")
259 (description "GStreamer Good Plug-ins is a set of plug-ins for the
260 GStreamer multimedia library. This set contains those plug-ins which the
261 developers consider to have good quality code and correct functionality.")
262 (license license:lgpl2.0+)))
263
264 (define-public gst-plugins-bad
265 (package
266 (name "gst-plugins-bad")
267 (version "1.12.4")
268 (source (origin
269 (method url-fetch)
270 (uri (string-append "https://gstreamer.freedesktop.org/src/"
271 name "/" name "-" version ".tar.xz"))
272 (sha256
273 (base32
274 "021d3q81m968lpnah517sfclagadcqwd6jz3lqdmqvb82sz5fy0c"))))
275 (outputs '("out" "doc"))
276 (build-system gnu-build-system)
277 (arguments
278 '(#:tests? #f ; XXX: 18 of 65 tests fail
279 #:configure-flags
280 (list (string-append "--with-html-dir="
281 (assoc-ref %outputs "doc")
282 "/share/gtk-doc/html"))))
283 (propagated-inputs
284 `(("gst-plugins-base" ,gst-plugins-base)))
285 (native-inputs
286 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
287 ("gobject-introspection" ,gobject-introspection)
288 ("pkg-config" ,pkg-config)
289 ("python" ,python)))
290 (inputs
291 ;; XXX: The following dependencies are missing:
292 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
293 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
294 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
295 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
296 `(("bluez" ,bluez)
297 ("curl" ,curl)
298 ("faad2" ,faad2)
299 ("fluidsynth" ,fluidsynth)
300 ("gtk+" ,gtk+)
301 ("ladspa" ,ladspa)
302 ("libass" ,libass)
303 ("libdvdnav" ,libdvdnav)
304 ("libdvdread" ,libdvdread)
305 ("libgcrypt" ,libgcrypt)
306 ("libgudev" ,libgudev)
307 ("libkate" ,libkate)
308 ("libmodplug" ,libmodplug)
309 ("librsvg" ,librsvg)
310 ("libsndfile" ,libsndfile)
311 ("libsrtp" ,libsrtp)
312 ("libssh2" ,libssh2)
313 ("libusb" ,libusb)
314 ("libvdpau" ,libvdpau)
315 ("libwebp" ,libwebp)
316 ("libxml2" ,libxml2)
317 ("lrdf" ,lrdf)
318 ("mesa" ,mesa)
319 ("mpg123" ,mpg123)
320 ("neon" ,neon)
321 ("openal" ,openal)
322 ("openexr" ,openexr)
323 ("openjpeg" ,openjpeg)
324 ("openssl" ,openssl)
325 ("opus" ,opus)
326 ("orc" ,orc)
327 ;("qtbase" ,qtbase)
328 ;("qtdeclarative" ,qtdeclarative)
329 ;("qtx11extras" ,qtx11extras)
330 ("soundtouch" ,soundtouch)
331 ("x265" ,x265)
332 ("wayland" ,wayland)))
333 (home-page "https://gstreamer.freedesktop.org/")
334 (synopsis "Plugins for the GStreamer multimedia library")
335 (description
336 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
337 par compared to the rest.")
338 (license license:lgpl2.0+)))
339
340 (define-public gst-plugins-ugly
341 (package
342 (name "gst-plugins-ugly")
343 (version "1.12.4")
344 (source
345 (origin
346 (method url-fetch)
347 (uri (string-append "https://gstreamer.freedesktop.org/src/"
348 name "/" name "-" version ".tar.xz"))
349 (sha256
350 (base32
351 "08p5kggk1szvr76cdbx3q3yfc235w1przb76v2n51lwfi26mn5hw"))))
352 (build-system gnu-build-system)
353 (inputs
354 `(("gst-plugins-base" ,gst-plugins-base)
355 ("liba52" ,liba52)
356 ("libmad" ,libmad)
357 ("lame" ,lame)
358 ("libcdio" ,libcdio)
359 ("twolame" ,twolame)
360 ("libmpeg2" ,libmpeg2)
361 ("libdvdread" ,libdvdread)
362 ("libx264" ,libx264)
363 ("mpg123" ,mpg123)
364 ;; TODO:
365 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
366 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
367 ("orc" ,orc)))
368 (native-inputs
369 `(("glib:bin" ,glib "bin")
370 ("pkg-config" ,pkg-config)
371 ("python-wrapper" ,python-wrapper)))
372 (home-page "https://gstreamer.freedesktop.org/")
373 (synopsis "GStreamer plugins from the \"ugly\" set")
374 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
375 which the developers consider to have good quality code but that might pose
376 distribution problems in some jurisdictions, e.g. due to patent threats.")
377 (license license:lgpl2.0+)))
378
379 (define-public gst-libav
380 (package
381 (name "gst-libav")
382 (version "1.12.4")
383 (source (origin
384 (method url-fetch)
385 (uri (string-append
386 "https://gstreamer.freedesktop.org/src/" name "/"
387 name "-" version ".tar.xz"))
388 (sha256
389 (base32
390 "0qly3lgamm36xql9q7wg5751gi6j2d3ifzz1pkr15ncc5mfslmia"))))
391 (build-system gnu-build-system)
392 (arguments
393 '(#:configure-flags '("--with-system-libav")
394 #:phases
395 (modify-phases %standard-phases
396 (add-before 'configure 'patch-/bin/sh
397 (lambda _
398 (substitute* "gst-libs/ext/libav/configure"
399 (("#! /bin/sh")
400 (string-append "#! "(which "sh"))))
401 #t)))))
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.12.5")
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 "1x8g9mdkf6hzhlkx6nhrrp607p8g4zkhl3crs8vh504zpbbf71ip"))))
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+)))