gnu: nnn: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / gstreamer.scm
CommitLineData
22885fb8 1;;; GNU Guix --- Functional package management for GNU
71a4b2ab 2;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
ce4a347f 3;;; Copyright © 2014 John Darrington <jmd@gnu.org>
b3585d9b 4;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
0392030d 5;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
0d3ecf77 6;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
399c5faf 7;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
51895712 8;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
d22d7468 9;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
22885fb8
AE
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)
5cde47ec 27 #:use-module ((guix licenses) #:prefix license:)
22885fb8
AE
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
201cfb81 31 #:use-module (guix utils)
f506ed92 32 #:use-module (gnu packages)
40f6f76e 33 #:use-module (gnu packages audio)
22885fb8 34 #:use-module (gnu packages bison)
e9a0b5e7 35 #:use-module (gnu packages cdrom)
db12dac0 36 #:use-module (gnu packages curl)
1fcf67f4 37 #:use-module (gnu packages compression)
22885fb8 38 #:use-module (gnu packages flex)
db12dac0
SB
39 #:use-module (gnu packages freedesktop)
40 #:use-module (gnu packages gl)
22885fb8 41 #:use-module (gnu packages glib)
40f6f76e 42 #:use-module (gnu packages gnome)
db12dac0
SB
43 #:use-module (gnu packages gnupg)
44 #:use-module (gnu packages graphics)
1fcf67f4 45 #:use-module (gnu packages gtk)
a4d89136 46 #:use-module (gnu packages image)
db12dac0 47 #:use-module (gnu packages libusb)
1fcf67f4 48 #:use-module (gnu packages linux)
40f6f76e 49 #:use-module (gnu packages mp3)
51895712 50 #:use-module (gnu packages ncurses)
22885fb8 51 #:use-module (gnu packages perl)
a4d89136 52 #:use-module (gnu packages pulseaudio)
db12dac0
SB
53 #:use-module (gnu packages qt)
54 #:use-module (gnu packages rdf)
04a20db2 55 #:use-module (gnu packages video)
1fcf67f4
JD
56 #:use-module (gnu packages xorg)
57 #:use-module (gnu packages xiph)
22885fb8 58 #:use-module (gnu packages pkg-config)
f506ed92 59 #:use-module (gnu packages python)
db12dac0
SB
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)
09b87aff 64 #:use-module (gnu packages assembly)
f506ed92 65 #:use-module (gnu packages xml))
22885fb8 66
195857b0
SB
67(define-public orc
68 (package
69 (name "orc")
0c417d95 70 (version "0.4.28")
195857b0
SB
71 (source (origin
72 (method url-fetch)
5cc3096c 73 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
195857b0
SB
74 "orc/orc-" version ".tar.xz"))
75 (sha256
76 (base32
0c417d95 77 "1kl3rlmzr27bdpn78nvpnjs142ja1m6grvafdhw74mmhcdjprkdz"))))
195857b0 78 (build-system gnu-build-system)
462b5676
EF
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;")
0392030d
MW
90 "if (error) return 77;"))
91 #t)))))
57e7d748 92 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
195857b0
SB
93 (synopsis "Oil runtime compiler")
94 (description
95 "Orc is a just-in-time compiler implemented as a library and set of
96associated tools for compiling and executing simple programs that operate on
97arrays 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.
5cde47ec 100 (license (list license:bsd-2 license:bsd-3))))
195857b0 101
22885fb8
AE
102(define-public gstreamer
103 (package
104 (name "gstreamer")
985d542e 105 (version "1.14.3")
22885fb8
AE
106 (source
107 (origin
108 (method url-fetch)
a124bbd2 109 (uri (string-append
5cc3096c 110 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
a124bbd2 111 version ".tar.xz"))
22885fb8
AE
112 (sha256
113 (base32
985d542e 114 "0mh4755an4gk0z3ygqhjpdjk0r2cwswbpwfgl0x6qmnln4757bhk"))))
22885fb8 115 (build-system gnu-build-system)
2fb016b8
SB
116 (outputs '("out" "doc"))
117 (arguments
31e021f8 118 `(#:configure-flags
2fb016b8
SB
119 (list (string-append "--with-html-dir="
120 (assoc-ref %outputs "doc")
121 "/share/gtk-doc/html"))))
e244dc6d 122 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
c4c4cc05 123 (native-inputs
22885fb8
AE
124 `(("bison" ,bison)
125 ("flex" ,flex)
426adbe8 126 ("glib" ,glib "bin")
0f998a14 127 ("gobject-introspection" ,gobject-introspection)
22885fb8
AE
128 ("perl" ,perl)
129 ("pkg-config" ,pkg-config)
144f9f25 130 ("python-wrapper" ,python-wrapper)))
96693d1d
SB
131 (native-search-paths
132 (list (search-path-specification
133 (variable "GST_PLUGIN_SYSTEM_PATH")
134 (files '("lib/gstreamer-1.0")))))
5cc3096c 135 (home-page "https://gstreamer.freedesktop.org/")
93bfe3e2 136 (synopsis "Multimedia library")
22885fb8
AE
137 (description
138 "GStreamer is a library for constructing graphs of media-handling
139components. The applications it supports range from simple Ogg/Vorbis
e881752c
AK
140playback, audio/video streaming to complex audio mixing and video
141non-linear editing.
22885fb8
AE
142
143Applications can take advantage of advances in codec and filter technology
144transparently. Developers can add new codecs and filters by writing a
145simple plugin with a clean, generic interface.
146
147This package provides the core library and elements.")
5cde47ec 148 (license license:lgpl2.0+)))
477c91ce
AE
149
150(define-public gst-plugins-base
151 (package
152 (name "gst-plugins-base")
985d542e 153 (version "1.14.3")
477c91ce
AE
154 (source
155 (origin
156 (method url-fetch)
8cf39f7f 157 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
a124bbd2 158 name "-" version ".tar.xz"))
477c91ce
AE
159 (sha256
160 (base32
985d542e 161 "0lkr1fm3bz21nqq9vi5v74mlxw6dd6i7piw00fhc5zz0dg1ikczh"))))
477c91ce 162 (build-system gnu-build-system)
e9a82129 163 (outputs '("out" "doc"))
34ff76fd 164 (propagated-inputs
a53f4311
MB
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
477c91ce 168 (inputs
e9a0b5e7 169 `(("cdparanoia" ,cdparanoia)
1fcf67f4
JD
170 ("pango" ,pango)
171 ("libogg" ,libogg)
172 ("libtheora" ,libtheora)
173 ("libvorbis" ,libvorbis)
174 ("libx11" ,libx11)
175 ("zlib" ,zlib)
176 ("libXext" ,libxext)
177 ("libxv" ,libxv)
399c5faf
LF
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 '())))
c4c4cc05
JD
184 (native-inputs
185 `(("pkg-config" ,pkg-config)
a53f4311 186 ("glib:bin" ,glib "bin")
4ec48644 187 ("gobject-introspection" ,gobject-introspection)
c4c4cc05 188 ("python-wrapper" ,python-wrapper)))
477c91ce 189 (arguments
7bc36f8d
SB
190 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
191 #:configure-flags
e9a82129
SB
192 (list (string-append "--with-html-dir="
193 (assoc-ref %outputs "doc")
194 "/share/gtk-doc/html"))
195 #:phases
cda6aaf0
EF
196 (modify-phases %standard-phases
197 (add-before 'configure 'patch
198 (lambda _
199 (substitute* "tests/check/libs/pbutils.c"
de0e591a
EF
200 (("/bin/sh") (which "sh")))
201 #t)))))
70e863e5 202 (home-page "https://gstreamer.freedesktop.org/")
477c91ce 203 (synopsis
1fcf67f4
JD
204 "Plugins for the GStreamer multimedia library")
205 (description "This package provides an essential exemplary set of plug-ins
206for the GStreamer multimedia library.")
5cde47ec 207 (license license:lgpl2.0+)))
477c91ce 208
1fcf67f4
JD
209(define-public gst-plugins-good
210 (package
211 (name "gst-plugins-good")
985d542e 212 (version "1.14.3")
1fcf67f4
JD
213 (source
214 (origin
215 (method url-fetch)
e881752c 216 (uri (string-append
48caecb7
SB
217 "https://gstreamer.freedesktop.org/src/" name "/"
218 name "-" version ".tar.xz"))
1fcf67f4
JD
219 (sha256
220 (base32
985d542e 221 "0pgzgfqbfp8lz2ns68797xfxdr0cr5rpi93wd1h2grhbmzkbq4ji"))))
1fcf67f4
JD
222 (build-system gnu-build-system)
223 (inputs
40f6f76e 224 `(("aalib" ,aalib)
a4d89136 225 ("cairo" ,cairo)
a4d89136 226 ("flac" ,flac)
40f6f76e
SB
227 ("gdk-pixbuf" ,gdk-pixbuf)
228 ("gst-plugins-base" ,gst-plugins-base)
0dc2e348 229 ("jack" ,jack-1)
02d5ed4a 230 ("lame" ,lame)
40f6f76e
SB
231 ("libavc1394" ,libavc1394)
232 ("libcaca" ,libcaca)
233 ("libdv" ,libdv)
234 ("libiec61883" ,libiec61883)
a4d89136 235 ("libjpeg" ,libjpeg)
40f6f76e
SB
236 ("libpng" ,libpng)
237 ("libshout" ,libshout)
238 ("libsoup" ,libsoup)
239 ("libvpx" ,libvpx)
02d5ed4a 240 ("mpg123" ,mpg123)
40f6f76e 241 ("orc" ,orc)
a4d89136 242 ("pulseaudio" ,pulseaudio)
40f6f76e
SB
243 ("speex" ,speex)
244 ("taglib" ,taglib)
02d5ed4a 245 ("twolame" ,twolame)
40f6f76e 246 ("wavpack" ,wavpack)))
1fcf67f4 247 (native-inputs
40f6f76e
SB
248 `(("glib:bin" ,glib "bin")
249 ("pkg-config" ,pkg-config)
250 ("python-wrapper" ,python-wrapper)))
0ba652b2
MW
251 (arguments
252 `(#:phases
253 (modify-phases %standard-phases
254 (add-after
d1ceedf8 255 'unpack 'disable-failing-tests
0ba652b2 256 (lambda _
d1ceedf8 257 ;; Disable tests that fail non-deterministically.
0d3ecf77
EF
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)
0ba652b2
MW
261 (string-append "/* " all " */")))
262 #t)))))
d1ceedf8 263 (home-page "https://gstreamer.freedesktop.org/")
1fcf67f4
JD
264 (synopsis
265 "Plugins for the GStreamer multimedia library")
266 (description "GStreamer Good Plug-ins is a set of plug-ins for the
267GStreamer multimedia library. This set contains those plug-ins which the
268developers consider to have good quality code and correct functionality.")
5cde47ec 269 (license license:lgpl2.0+)))
4e9b38eb 270
db12dac0
SB
271(define-public gst-plugins-bad
272 (package
273 (name "gst-plugins-bad")
985d542e 274 (version "1.14.3")
db12dac0
SB
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
985d542e 281 "1mczcna91f3kkk3yv5fkfa8nmqdr9d93aq9z4d8sv18vkiflw8mj"))))
db12dac0
SB
282 (outputs '("out" "doc"))
283 (build-system gnu-build-system)
284 (arguments
a53f4311 285 '(#:tests? #f ; XXX: 13 of 53 tests fail
db12dac0
SB
286 #:configure-flags
287 (list (string-append "--with-html-dir="
288 (assoc-ref %outputs "doc")
4cb77941 289 "/share/gtk-doc/html"))))
db12dac0
SB
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,
e3cb00d2 302 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
db12dac0
SB
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)
db12dac0
SB
326 ("neon" ,neon)
327 ("openal" ,openal)
328 ("openexr" ,openexr)
329 ("openjpeg" ,openjpeg)
330 ("openssl" ,openssl)
331 ("opus" ,opus)
332 ("orc" ,orc)
6779b932
EF
333 ;("qtbase" ,qtbase)
334 ;("qtdeclarative" ,qtdeclarative)
335 ;("qtx11extras" ,qtx11extras)
db12dac0 336 ("soundtouch" ,soundtouch)
e3cb00d2 337 ("x265" ,x265)
94b179c6 338 ("wayland" ,wayland)))
0cee33ac 339 (home-page "https://gstreamer.freedesktop.org/")
db12dac0
SB
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
343par compared to the rest.")
5cde47ec 344 (license license:lgpl2.0+)))
db12dac0 345
92f1b4a5
MW
346(define-public gst-plugins-ugly
347 (package
348 (name "gst-plugins-ugly")
985d542e 349 (version "1.14.3")
92f1b4a5
MW
350 (source
351 (origin
352 (method url-fetch)
5cc3096c 353 (uri (string-append "https://gstreamer.freedesktop.org/src/"
92f1b4a5
MW
354 name "/" name "-" version ".tar.xz"))
355 (sha256
356 (base32
985d542e 357 "01i31g5rvw36rjlyi9w24n0g1xa6053d14vaiba6vqpas727z123"))))
92f1b4a5
MW
358 (build-system gnu-build-system)
359 (inputs
360 `(("gst-plugins-base" ,gst-plugins-base)
361 ("liba52" ,liba52)
92f1b4a5 362 ("libcdio" ,libcdio)
92f1b4a5
MW
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)))
40dad30c 374 (home-page "https://gstreamer.freedesktop.org/")
e881752c 375 (synopsis "GStreamer plugins from the \"ugly\" set")
92f1b4a5
MW
376 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
377which the developers consider to have good quality code but that might pose
378distribution problems in some jurisdictions, e.g. due to patent threats.")
5cde47ec 379 (license license:lgpl2.0+)))
92f1b4a5 380
1b922590
SB
381(define-public gst-libav
382 (package
383 (name "gst-libav")
985d542e 384 (version "1.14.3")
1b922590
SB
385 (source (origin
386 (method url-fetch)
387 (uri (string-append
5cc3096c 388 "https://gstreamer.freedesktop.org/src/" name "/"
1b922590
SB
389 name "-" version ".tar.xz"))
390 (sha256
391 (base32
985d542e 392 "0xxnb80yhfa42x4wx1928zydaal35b2mcj0zdcdsv1apnjdm40wv"))
4b7e861b
MB
393 (modules '((guix build utils)))
394 (snippet
395 '(begin
396 ;; Drop bundled ffmpeg.
397 (delete-file-recursively "gst-libs/ext/libav")
398 #t))))
1b922590
SB
399 (build-system gnu-build-system)
400 (arguments
4b7e861b 401 '(#:configure-flags '("--with-system-libav")))
1b922590
SB
402 (native-inputs
403 `(("pkg-config" ,pkg-config)
04a20db2 404 ("python" ,python)))
1b922590
SB
405 (inputs
406 `(("gst-plugins-base" ,gst-plugins-base)
06079c19 407 ("ffmpeg" ,ffmpeg-3.4)
1b922590
SB
408 ("orc" ,orc)
409 ("zlib" ,zlib)))
57e7d748 410 (home-page "https://gstreamer.freedesktop.org/")
1b922590
SB
411 (synopsis "Plugins for the GStreamer multimedia library")
412 (description
413 "This GStreamer plugin supports a large number of audio and video
414compression formats through the use of the libav library.")
5cde47ec 415 (license license:gpl2+)))
201cfb81
SB
416
417(define-public python-gst
418 (package
419 (name "python-gst")
985d542e 420 (version "1.14.3")
201cfb81
SB
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
985d542e 428 "01w3mpimbm8drifhrkvpns79h15kd9h9v0dynr7yb12kjrnfghsg"))))
201cfb81
SB
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)))
d2b5dec5 450 (home-page "https://gstreamer.freedesktop.org/")
201cfb81
SB
451 (synopsis "GStreamer GObject Introspection overrides for Python")
452 (description
453 "This package contains GObject Introspection overrides for Python that can
454be used by Python applications using GStreamer.")
5cde47ec 455 (license license:lgpl2.1+)
201cfb81
SB
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)))))
51895712
RW
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
490line player in the spirit of ogg123 and mpg123, based on the gstreamer media
491framework. It plays all file formats gstreamer supports, so if you have a
492music collection which contains different file formats, like flac, ogg and
493mp3, you can use gst123 to play all your music files.")
494 (license license:lgpl2.0+)))