gnu: sdcc: Remove non-free code.
[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, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
11 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages gstreamer)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system meson)
36 #:use-module (guix utils)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages audio)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages cdrom)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages docbook)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages elf)
48 #:use-module (gnu packages flex)
49 #:use-module (gnu packages freedesktop)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gl)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gnupg)
55 #:use-module (gnu packages graphics)
56 #:use-module (gnu packages graphviz)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages image)
59 #:use-module (gnu packages iso-codes)
60 #:use-module (gnu packages java)
61 #:use-module (gnu packages libunwind)
62 #:use-module (gnu packages libusb)
63 #:use-module (gnu packages linux)
64 #:use-module (gnu packages mp3)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages networking)
67 #:use-module (gnu packages ocr)
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages pulseaudio)
70 #:use-module (gnu packages qt)
71 #:use-module (gnu packages rdf)
72 #:use-module (gnu packages sdl)
73 #:use-module (gnu packages shells)
74 #:use-module (gnu packages video)
75 #:use-module (gnu packages xorg)
76 #:use-module (gnu packages xdisorg)
77 #:use-module (gnu packages xiph)
78 #:use-module (gnu packages pkg-config)
79 #:use-module (gnu packages ruby)
80 #:use-module (gnu packages speech)
81 #:use-module (gnu packages python)
82 #:use-module (gnu packages ssh)
83 #:use-module (gnu packages telephony)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages version-control)
86 #:use-module (gnu packages assembly)
87 #:use-module (gnu packages xml))
88
89 (define-public openni2
90 (package
91 (name "openni2")
92 (version "2.2.0")
93 (source
94 (origin
95 (method git-fetch)
96 (uri
97 (git-reference
98 (url "https://github.com/occipital/OpenNI2.git")
99 (commit (string-append "v" version "-debian"))))
100 (file-name (git-file-name name version))
101 (sha256
102 (base32 "0mfnyzpq53wnzgjfx91xcbx0nrl0lp1vrk1rk20a3gb3kshsr675"))))
103 (build-system gnu-build-system)
104 (arguments
105 `(#:tests? #f ; No target
106 #:phases
107 (modify-phases %standard-phases
108 (delete 'configure))))
109 (native-inputs
110 `(("graphviz" ,graphviz)
111 ("doxygen" ,doxygen)
112 ("openjdk" ,openjdk14)
113 ("openjdk:jdk" ,openjdk14 "jdk")
114 ("python" ,python-wrapper)))
115 (inputs
116 `(("freeglut3" ,freeglut)
117 ("libudev" ,eudev)
118 ("libusb" ,libusb)))
119 (synopsis "Framework for sensor-based 'Natural Interaction")
120 (description "OpenNI is a framework for getting data to support
121 'Natural Interaction', i.e. skeleton tracking, gesture tracking, and similar
122 ways of getting data from humans. It provides the interface for physical devices
123 and for middleware components.")
124 (home-page "https://structure.io/openni")
125 (license license:asl2.0)))
126
127 (define-public libdc1394
128 (package
129 (name "libdc1394")
130 (version "2.2.6")
131 (source (origin
132 (method url-fetch)
133 (uri
134 (string-append "https://sourceforge.net/projects/" name "/files/"
135 name "-2" "/" version "/" name "-" version ".tar.gz"))
136 (sha256
137 (base32 "1v8gq54n1pg8izn7s15yylwjf8r1l1dmzbm2yvf6pv2fmb4mz41b"))))
138 (build-system gnu-build-system)
139 (native-inputs
140 `(("doxygen" ,doxygen)
141 ("perl" ,perl)
142 ("pkg-config" ,pkg-config)))
143 (inputs
144 `(("glu" ,glu)
145 ("libraw1394" ,libraw1394)
146 ("libusb" ,libusb)
147 ("libxv" ,libxv)
148 ("linux-headers" ,linux-libre-headers)
149 ("mesa" ,mesa)
150 ("sdl" ,sdl)
151 ("v4l" ,v4l-utils)))
152 (synopsis "1394-Based Digital Camera Control Library")
153 (description "LibDC1394 is a library that provides functionality to control
154 any camera that conforms to the 1394-Based Digital Camera Specification written
155 by the 1394 Trade Association. It utilizes the lowlevel functionality provided
156 by libraw1394 to communicate with the camera. It also uses the video1394 kernel
157 module for the DMA capture of the video flow.")
158 (home-page "https://damien.douxchamps.net/ieee1394/libdc1394/")
159 (license license:lgpl2.0+)))
160
161 (define-public ccextractor
162 (package
163 (name "ccextractor")
164 (version "0.88")
165 (source
166 (origin
167 (method git-fetch)
168 (uri
169 (git-reference
170 (url "https://github.com/CCExtractor/ccextractor.git")
171 (commit (string-append "v" version))))
172 (file-name (git-file-name name version))
173 (sha256
174 (base32 "1sya45hvv4d46bk7541yimmafgvgyhkpsvwfz9kv6pm4yi1lz6nb"))))
175 (build-system cmake-build-system)
176 (arguments
177 `(#:tests? #f ; No target
178 #:configure-flags
179 (list
180 "-DWITH_FFMPEG=ON"
181 "-DWITH_OCR=ON"
182 "-DWITH_SHARING=ON"
183 "-DWITH_HARDSUBX=ON")
184 #:phases
185 (modify-phases %standard-phases
186 ;; The package is in a sub-dir of this repo.
187 (add-after 'unpack 'chdir
188 (lambda _
189 (chdir "src")
190 #t))
191 (add-after 'chdir 'fix-build-errors
192 (lambda _
193 (substitute* "CMakeLists.txt"
194 (("libnanomsg")
195 "nanomsg"))
196 #t)))))
197 (native-inputs
198 `(("perl" ,perl)
199 ("pkg-config" ,pkg-config)
200 ("python" ,python-wrapper)))
201 (inputs
202 `(("ffmeg" ,ffmpeg-3.4)
203 ("nanomsg" ,nanomsg)
204 ("leptonica" ,leptonica)
205 ("ocr" ,tesseract-ocr)
206 ("zlib" ,zlib)))
207 (synopsis "Closed Caption Extractor")
208 (description "CCExtractor is a tool that analyzes video files and produces
209 independent subtitle files from the closed captions data. It is portable, small,
210 and very fast.")
211 (home-page "https://www.ccextractor.org/")
212 (license license:gpl2+)))
213
214 (define-public libvisual
215 (package
216 (name "libvisual")
217 (version "0.4.0")
218 (source
219 (origin
220 (method git-fetch)
221 (uri
222 (git-reference
223 (url "https://github.com/Libvisual/libvisual.git")
224 (commit (string-append name "-" version))))
225 (file-name (git-file-name name version))
226 (sha256
227 (base32 "02xwakwkqjsznc03pjlb6hcv1li1gw3r8xvyswqsm4msix5xq18a"))))
228 (build-system gnu-build-system)
229 (arguments
230 `(#:phases
231 (modify-phases %standard-phases
232 ;; The package is in a sub-dir of this repo.
233 (add-after 'unpack 'chdir
234 (lambda _
235 (chdir "libvisual")
236 #t)))))
237 (native-inputs
238 `(("gettext" ,gettext-minimal)
239 ("libintl" ,intltool)
240 ("libtool" ,libtool)
241 ("pkg-config" ,pkg-config)))
242 (inputs
243 `(("sdl" ,sdl)))
244 (native-search-paths
245 (list
246 (search-path-specification
247 (variable "LIBVISUAL_PLUGINS_BASE_DIR")
248 (files '("lib/libvisual-0.4")))))
249 ;; To load libvisual-plugins.
250 (search-paths native-search-paths)
251 (synopsis "Audio visualisation library")
252 (description "Libvisual is a library that acts as a middle layer between
253 applications that want audio visualisation and audio visualisation plugins.")
254 (home-page "http://libvisual.org/")
255 (license
256 (list
257 ;; Libraries.
258 license:lgpl2.1+
259 ;; Examples and Tests.
260 license:gpl2+))))
261
262 (define-public libvisual-plugins
263 (package
264 (name "libvisual-plugins")
265 (version "0.4.0")
266 (source
267 (origin
268 (method git-fetch)
269 (uri
270 (git-reference
271 (url "https://github.com/Libvisual/libvisual.git")
272 (commit (string-append name "-" version))))
273 (file-name (git-file-name name version))
274 (sha256
275 (base32 "02xwakwkqjsznc03pjlb6hcv1li1gw3r8xvyswqsm4msix5xq18a"))))
276 (build-system gnu-build-system)
277 (arguments
278 `(#:configure-flags
279 (list
280 "--disable-gstreamer-plugin"
281 "--disable-corona"
282 "--disable-gforce"
283 (string-append "--with-plugins-base-dir=" (assoc-ref %outputs "out")
284 "/lib/libvisual-0.4"))
285 #:phases
286 (modify-phases %standard-phases
287 ;; The package is in a sub-dir of this repo.
288 (add-after 'unpack 'chdir
289 (lambda _
290 (chdir "libvisual-plugins")
291 #t)))))
292 (native-inputs
293 `(("bison" ,bison)
294 ("flex" ,flex)
295 ("gettext" ,gettext-minimal)
296 ("libintl" ,intltool)
297 ("libtool" ,libtool)
298 ("pkg-config" ,pkg-config)))
299 (inputs
300 `(("alsa-lib" ,alsa-lib)
301 ("esound" ,esound)
302 ("gdk-pixbuf" ,gdk-pixbuf+svg)
303 ("gtk+" ,gtk+-2)
304 ("jack" ,jack-2)
305 ("libx11" ,libx11)
306 ("libxext" ,libxext)))
307 (propagated-inputs
308 `(("libvisual" ,libvisual)))
309 (synopsis "Audio visualisation library")
310 (description "Libvisual is a library that acts as a middle layer between
311 applications that want audio visualisation and audio visualisation plugins.")
312 (home-page "http://libvisual.org/")
313 (license license:gpl2+)))
314
315 (define-public esound
316 (package
317 (name "esound")
318 (version "0.2.41")
319 (source
320 (origin
321 (method git-fetch)
322 (uri
323 (git-reference
324 (url "https://gitlab.gnome.org/Archive/esound.git")
325 (commit "ESOUND_0_2_41")))
326 (file-name (git-file-name name version))
327 (sha256
328 (base32 "141jg70fim276i8k2kyypm84gy89i1k9mm4yf68mfwnybvjw1d6n"))))
329 (build-system gnu-build-system)
330 (native-inputs
331 `(("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("gettext" ,gettext-minimal)
334 ("gnome-common" ,gnome-common)
335 ("libtool" ,libtool)
336 ("pkg-config" ,pkg-config)
337 ("tcsh" ,tcsh) ; for the tests
338 ("which" ,which)))
339 (inputs
340 `(("alsa-lib" ,alsa-lib)
341 ("pcaudiolib" ,pcaudiolib)
342 ("tcp-wrappers" ,tcp-wrappers)))
343 (propagated-inputs
344 `(("audiofile" ,audiofile)))
345 (synopsis "Enlightened Sound Daemon")
346 (description "The Enlightened Sound Daemon mixes several audio streams for
347 playback by a single audio device. You can also pre-load samples, and play them
348 back without having to send all the data for the sound. Network transparency is
349 also built in, so you can play sounds on one machine, and listen to them on
350 another.")
351 (home-page "https://web.archive.org/web/20160528230227/
352 http://www.tux.org/~ricdude/overview.html")
353 (license
354 (list
355 ;; Libraries.
356 license:lgpl2.0+
357 ;; Others.
358 license:gpl2+))))
359
360 (define-public orc
361 (package
362 (name "orc")
363 (version "0.4.32")
364 (source (origin
365 (method url-fetch)
366 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
367 "orc/orc-" version ".tar.xz"))
368 (sha256
369 (base32
370 "1w0qmyj3v9sb2g7ff39pp38b9850y9hyy0bag26ifrby5f7ksvm6"))))
371 (build-system meson-build-system)
372 (arguments
373 `(#:phases
374 (modify-phases %standard-phases
375 (add-after 'unpack 'disable-faulty-test
376 (lambda _
377 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
378 ;; tests, which fail on some machines. See:
379 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
380 (substitute* '("testsuite/test-limits.c"
381 "testsuite/exec_opcodes_sys.c")
382 (("if \\(error\\) return 1;")
383 "if (error) return 77;"))
384 #t)))))
385 (native-inputs
386 `(("gtk-doc" ,gtk-doc)))
387 (home-page "https://gstreamer.freedesktop.org/modules/orc.html")
388 (synopsis "Oil runtime compiler")
389 (description
390 "Orc is a just-in-time compiler implemented as a library and set of
391 associated tools for compiling and executing simple programs that operate on
392 arrays of data.")
393 ;; The source code implementing the Marsenne Twister algorithm is licensed
394 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
395 (license (list license:bsd-2 license:bsd-3))))
396
397 ;; Increase the test timeouts to accommodate slow or busy machines.
398 (define %common-gstreamer-phases
399 '((add-after 'unpack 'increase-test-timeout
400 (lambda _
401 (substitute* "tests/check/meson.build"
402 (("'CK_DEFAULT_TIMEOUT', '20'")
403 "'CK_DEFAULT_TIMEOUT', '60'")
404 (("timeout ?: 3 \\* 60")
405 "timeout: 9 * 60"))
406 #t))))
407
408 (define-public gstreamer
409 (package
410 (name "gstreamer")
411 (version "1.16.2")
412 (source
413 (origin
414 (method url-fetch)
415 (uri (string-append
416 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
417 version ".tar.xz"))
418 (sha256
419 (base32
420 "0kp93622y29pck8asvil1fmzf55s2gx76wv475a6izc3cwj49w73"))))
421 (build-system meson-build-system)
422 (outputs '("out" "doc"))
423 (arguments
424 `(#:phases
425 (modify-phases %standard-phases
426 ,@%common-gstreamer-phases
427 ;; FIXME: Since switching to the meson-build-system, two tests
428 ;; started failing on i686. See
429 ;; <https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/499>.
430 ,@(if (string-prefix? "i686" (or (%current-target-system)
431 (%current-system)))
432 `((add-after 'unpack 'disable-some-tests
433 (lambda _
434 (substitute* "tests/check/gst/gstsystemclock.c"
435 (("tcase_add_test \\(tc_chain, test_stress_cleanup_unschedule.*")
436 "")
437 (("tcase_add_test \\(tc_chain, test_stress_reschedule.*")
438 ""))
439 #t)))
440 '())
441 (add-after 'install 'move-docs
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let ((out (assoc-ref outputs "out"))
444 (doc (assoc-ref outputs "doc")))
445 (mkdir-p (string-append doc "/share"))
446 (copy-recursively (string-append out "/share/gtk-doc")
447 (string-append doc "/share/gtk-doc"))
448 (delete-file-recursively (string-append out "/share/gtk-doc"))
449 #t))))))
450 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
451 (native-inputs
452 `(("bison" ,bison)
453 ("flex" ,flex)
454 ("glib" ,glib "bin")
455 ("gobject-introspection" ,gobject-introspection)
456 ("gtk-doc" ,gtk-doc)
457 ("perl" ,perl)
458 ("pkg-config" ,pkg-config)
459 ("python-wrapper" ,python-wrapper)))
460 (native-search-paths
461 (list (search-path-specification
462 (variable "GST_PLUGIN_SYSTEM_PATH")
463 (files '("lib/gstreamer-1.0")))))
464 (home-page "https://gstreamer.freedesktop.org/")
465 (synopsis "Multimedia library")
466 (description
467 "GStreamer is a library for constructing graphs of media-handling
468 components. The applications it supports range from simple Ogg/Vorbis
469 playback, audio/video streaming to complex audio mixing and video
470 non-linear editing.
471
472 Applications can take advantage of advances in codec and filter technology
473 transparently. Developers can add new codecs and filters by writing a
474 simple plugin with a clean, generic interface.
475
476 This package provides the core library and elements.")
477 (license license:lgpl2.0+)))
478
479 (define-public gst-plugins-base
480 (package
481 (name "gst-plugins-base")
482 (version "1.16.2")
483 (source
484 (origin
485 (method url-fetch)
486 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
487 name "-" version ".tar.xz"))
488 (sha256
489 (base32
490 "0sl1hxlyq46r02k7z70v09vx1gi4rcypqmzra9jid93lzvi76gmi"))))
491 (build-system meson-build-system)
492 (propagated-inputs
493 `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
494 ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
495
496 ;; XXX: Do not enable Orc optimizations on ARM systems because
497 ;; it leads to two test failures.
498 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683
499 ,@(if (string-prefix? "arm" (or (%current-target-system)
500 (%current-system)))
501 '()
502 `(("orc" ,orc))))) ;required by gstreamer-audio-1.0.pc
503 (inputs
504 `(("cdparanoia" ,cdparanoia)
505 ("pango" ,pango)
506 ("libogg" ,libogg)
507 ("libtheora" ,libtheora)
508 ("libvorbis" ,libvorbis)
509 ("libx11" ,libx11)
510 ("zlib" ,zlib)
511 ("libXext" ,libxext)
512 ("libxv" ,libxv)
513 ("alsa-lib" ,alsa-lib)
514 ;; XXX Don't build with opus on 32-bit systems:
515 ;; <https://bugs.gnu.org/32360>
516 ,@(if (target-64bit?)
517 `(("opus" ,opus))
518 '())))
519 (native-inputs
520 `(("pkg-config" ,pkg-config)
521 ("glib:bin" ,glib "bin")
522 ("gobject-introspection" ,gobject-introspection)
523 ("python-wrapper" ,python-wrapper)))
524 (arguments
525 `(#:configure-flags '("-Dgl=disabled"
526 ;; FIXME: Documentation fails to build without
527 ;; enabling GL above, which causes other problems.
528 "-Ddoc=false")
529 #:phases
530 (modify-phases %standard-phases
531 ,@%common-gstreamer-phases
532 (add-before 'configure 'patch
533 (lambda _
534 (substitute* "tests/check/libs/pbutils.c"
535 (("/bin/sh") (which "sh")))
536 #t)))))
537 (home-page "https://gstreamer.freedesktop.org/")
538 (synopsis
539 "Plugins for the GStreamer multimedia library")
540 (description "This package provides an essential exemplary set of plug-ins
541 for the GStreamer multimedia library.")
542 (license license:lgpl2.0+)))
543
544 (define-public gst-plugins-good
545 (package
546 (name "gst-plugins-good")
547 (version "1.16.2")
548 (source
549 (origin
550 (method url-fetch)
551 (uri
552 (string-append
553 "https://gstreamer.freedesktop.org/src/" name "/"
554 name "-" version ".tar.xz"))
555 (sha256
556 (base32 "068k3cbv1yf3gbllfdzqsg263kzwh21y8dpwr0wvgh15vapkpfs0"))))
557 (build-system meson-build-system)
558 (arguments
559 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
560 #:phases
561 (modify-phases %standard-phases
562 (add-after 'unpack 'patch-docbook-xml
563 (lambda* (#:key inputs #:allow-other-keys)
564 (with-directory-excursion "docs"
565 (substitute* "plugins/gst-plugins-good-plugins-docs.sgml"
566 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
567 (string-append (assoc-ref inputs "docbook-xml")
568 "/xml/dtd/docbook/"))))
569 #t))
570 (add-before
571 'check 'pre-check
572 (lambda _
573 ;; Tests require a running X server.
574 (system "Xvfb :1 +extension GLX &")
575 (setenv "DISPLAY" ":1")
576 ;; Tests write to $HOME.
577 (setenv "HOME" (getcwd))
578 ;; Tests look for $XDG_RUNTIME_DIR.
579 (setenv "XDG_RUNTIME_DIR" (getcwd))
580 ;; For missing '/etc/machine-id'.
581 (setenv "DBUS_FATAL_WARNINGS" "0")
582 #t)))))
583 (native-inputs
584 `(("docbook-xml" ,docbook-xml-4.1.2)
585 ("gettext" ,gettext-minimal)
586 ("glib:bin" ,glib "bin")
587 ("gobject-introspection" ,gobject-introspection)
588 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
589 ("perl" ,perl)
590 ("pkg-config" ,pkg-config)
591 ("python-wrapper" ,python-wrapper)
592 ("xmllint" ,libxml2)
593 ("xorg-server" ,xorg-server-for-tests)))
594 (inputs
595 `(("aalib" ,aalib)
596 ("bzip2" ,bzip2)
597 ("cairo" ,cairo)
598 ("flac" ,flac)
599 ("gdk-pixbuf" ,gdk-pixbuf+svg)
600 ("glib" ,glib)
601 ("glib-networking" ,glib-networking)
602 ("glu" ,glu)
603 ("gtk+" ,gtk+)
604 ("jack" ,jack-2)
605 ("lame" ,lame)
606 ("libavc1394" ,libavc1394)
607 ("libcaca" ,libcaca)
608 ("libdv" ,libdv)
609 ("libgudev" ,libgudev)
610 ("libiec61883" ,libiec61883)
611 ("libjpeg" ,libjpeg-turbo)
612 ("libpng" ,libpng)
613 ("libshout" ,libshout)
614 ("libsoup" ,libsoup)
615 ("libvpx" ,libvpx)
616 ("libx11" ,libx11)
617 ("libxdamage" ,libxdamage)
618 ("libxfixes" ,libxfixes)
619 ("libxext" ,libxext)
620 ("libxshm" ,libxshmfence)
621 ("mesa" ,mesa)
622 ("mpg123" ,mpg123)
623 ("orc" ,orc)
624 ("pulseaudio" ,pulseaudio)
625 ("speex" ,speex)
626 ("taglib" ,taglib)
627 ("twolame" ,twolame)
628 ("v4l-utils" ,v4l-utils)
629 ("wavpack" ,wavpack)
630 ("zlib" ,zlib)))
631 (propagated-inputs
632 `(("gstreamer" ,gstreamer)
633 ("gst-plugins-base" ,gst-plugins-base)))
634 (synopsis "GStreamer plugins and helper libraries")
635 (description "GStreamer-Plugins-Good is a collection of plug-ins you'd want
636 to have right next to you on the battlefield. Shooting sharp and making no
637 mistakes, these plug-ins have it all: good looks, good code, and good
638 licensing. Documented and dressed up in tests. If you're looking for a role
639 model to base your own plug-in on, here it is.")
640 (home-page "https://gstreamer.freedesktop.org/")
641 (license license:lgpl2.0+)))
642
643 (define-public gst-plugins-bad
644 (package
645 (name "gst-plugins-bad")
646 (version "1.16.2")
647 (source (origin
648 (method url-fetch)
649 (uri (string-append "https://gstreamer.freedesktop.org/src/"
650 name "/" name "-" version ".tar.xz"))
651 (sha256
652 (base32
653 "0x0y0hm0ga3zqi5q4090hw5sjh59y1ry9ak16qsaascm72i7mjzi"))))
654 (build-system meson-build-system)
655 (arguments
656 `(#:phases
657 (modify-phases %standard-phases
658 ,@%common-gstreamer-phases
659 ,@(if (string-prefix? "arm" (or (%current-target-system)
660 (%current-system)))
661 ;; Disable test that fails on ARMv7.
662 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
663 `((add-after 'unpack 'disable-asfmux-test
664 (lambda _
665 (substitute* "tests/check/meson.build"
666 (("\\[\\['elements/asfmux\\.c'\\]\\],")
667 ""))
668 #t)))
669 '())
670 (add-after 'unpack 'disable-failing-test
671 (lambda _
672 ;; FIXME: Why is this failing.
673 (substitute* "tests/check/meson.build"
674 ((".*elements/dash_mpd\\.c.*")
675 ""))
676 #t)))))
677 (propagated-inputs
678 `(("gst-plugins-base" ,gst-plugins-base)))
679 (native-inputs
680 `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
681 ("gobject-introspection" ,gobject-introspection)
682 ;; TODO: Enable documentation for 1.18.
683 ;;("gtk-doc" ,gtk-doc)
684 ("pkg-config" ,pkg-config)
685 ("python" ,python)))
686 (inputs
687 ;; XXX: The following dependencies are missing:
688 ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
689 ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
690 ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
691 ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
692 `(("bluez" ,bluez)
693 ("curl" ,curl)
694 ("faad2" ,faad2)
695 ("fluidsynth" ,fluidsynth)
696 ("gtk+" ,gtk+)
697 ("ladspa" ,ladspa)
698 ("libass" ,libass)
699 ("libdvdnav" ,libdvdnav)
700 ("libdvdread" ,libdvdread)
701 ("libgcrypt" ,libgcrypt)
702 ("libgudev" ,libgudev)
703 ("libkate" ,libkate)
704 ("libmodplug" ,libmodplug)
705 ("librsvg" ,librsvg)
706 ("libsndfile" ,libsndfile)
707 ("libsrtp" ,libsrtp)
708 ("libssh2" ,libssh2)
709 ("libusb" ,libusb)
710 ("libvdpau" ,libvdpau)
711 ("libwebp" ,libwebp)
712 ("libxml2" ,libxml2)
713 ("lrdf" ,lrdf)
714 ("mesa" ,mesa)
715 ("neon" ,neon)
716 ("openal" ,openal)
717 ("openexr" ,openexr)
718 ("openjpeg" ,openjpeg)
719 ("openssl" ,openssl)
720 ("opus" ,opus)
721 ("orc" ,orc)
722 ;("qtbase" ,qtbase)
723 ;("qtdeclarative" ,qtdeclarative)
724 ;("qtx11extras" ,qtx11extras)
725 ("soundtouch" ,soundtouch)
726 ;; GStreamer is not yet compatible with srt > 1.4.1.
727 ("srt" ,srt-1.4.1)
728 ("x265" ,x265)
729 ("wayland" ,wayland)))
730 (home-page "https://gstreamer.freedesktop.org/")
731 (synopsis "Plugins for the GStreamer multimedia library")
732 (description
733 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
734 par compared to the rest.")
735 (license license:lgpl2.0+)))
736
737 (define-public gst-plugins-ugly
738 (package
739 (name "gst-plugins-ugly")
740 (version "1.16.2")
741 (source
742 (origin
743 (method url-fetch)
744 (uri
745 (string-append "https://gstreamer.freedesktop.org/src/"
746 name "/" name "-" version ".tar.xz"))
747 (sha256
748 (base32 "1jpvc32x6q01zjkfgh6gmq6aaikiyfwwnhj7bmvn52syhrdl202m"))))
749 (build-system meson-build-system)
750 (arguments
751 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
752 #:phases
753 (modify-phases %standard-phases
754 (add-after 'unpack 'patch-docbook-xml
755 (lambda* (#:key inputs #:allow-other-keys)
756 (with-directory-excursion "docs"
757 (substitute* "plugins/gst-plugins-ugly-plugins-docs.sgml"
758 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
759 (string-append (assoc-ref inputs "docbook-xml")
760 "/xml/dtd/docbook/"))))
761 #t))
762 (add-before
763 'check 'pre-check
764 (lambda _
765 ;; Tests require a running X server.
766 (system "Xvfb :1 +extension GLX &")
767 (setenv "DISPLAY" ":1")
768 ;; Tests write to $HOME.
769 (setenv "HOME" (getcwd))
770 ;; Tests look for $XDG_RUNTIME_DIR.
771 (setenv "XDG_RUNTIME_DIR" (getcwd))
772 ;; For missing '/etc/machine-id'.
773 (setenv "DBUS_FATAL_WARNINGS" "0")
774 #t)))))
775 (native-inputs
776 `(("docbook-xml" ,docbook-xml-4.1.2)
777 ("gettext" ,gettext-minimal)
778 ("glib:bin" ,glib "bin")
779 ("gobject-introspection" ,gobject-introspection)
780 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
781 ("perl" ,perl)
782 ("pkg-config" ,pkg-config)
783 ("python-wrapper" ,python-wrapper)
784 ("xorg-server" ,xorg-server-for-tests)))
785 (inputs
786 `(("glib" ,glib)
787 ("glib-networking" ,glib-networking)
788 ("liba52" ,liba52)
789 ("libcdio" ,libcdio)
790 ("libdvdread" ,libdvdread)
791 ("libmpeg2" ,libmpeg2)
792 ("libx264" ,libx264)
793 ("opencore-amr" ,opencore-amr)
794 ("orc" ,orc)))
795 (propagated-inputs
796 `(("gstreamer" ,gstreamer)
797 ("gst-plugins-base" ,gst-plugins-base)))
798 (synopsis "GStreamer plugins and helper libraries")
799 (description "Gst-Plugins-Ugly are the ones that might have a patent noose
800 around their neck, or a lock-up license, or any other problem that makes you
801 think twice about shipping them.")
802 (home-page "https://gstreamer.freedesktop.org/")
803 (license license:lgpl2.0+)))
804
805 (define-public gst-libav
806 (package
807 (name "gst-libav")
808 (version "1.16.2")
809 (source
810 (origin
811 (method url-fetch)
812 (uri
813 (string-append
814 "https://gstreamer.freedesktop.org/src/" name "/"
815 name "-" version ".tar.xz"))
816 (sha256
817 (base32 "1wpfilc98bad9nsv3y1qapxp35dvn2mvwvrmqwrsj58cf09gc967"))
818 (modules '((guix build utils)))
819 (snippet
820 '(begin
821 ;; Drop bundled ffmpeg.
822 (delete-file-recursively "gst-libs/ext/libav")
823 #t))))
824 (build-system meson-build-system)
825 (arguments
826 `(#:phases
827 (modify-phases %standard-phases
828 (add-after 'unpack 'patch-docbook-xml
829 (lambda* (#:key inputs #:allow-other-keys)
830 (with-directory-excursion "docs"
831 (substitute* "plugins/gst-libav-plugins-docs.sgml"
832 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
833 (string-append (assoc-ref inputs "docbook-xml")
834 "/xml/dtd/docbook/"))))
835 #t)))))
836 (native-inputs
837 `(("docbook-xml" ,docbook-xml-4.1.2)
838 ("perl" ,perl)
839 ("pkg-config" ,pkg-config)
840 ("python" ,python-wrapper)
841 ("ruby" ,ruby)))
842 (inputs
843 `(("ffmpeg" ,ffmpeg)))
844 (propagated-inputs
845 `(("gstreamer" ,gstreamer)
846 ("gst-plugins-base" ,gst-plugins-base)))
847 (synopsis "GStreamer plugins and helper libraries")
848 (description "Gst-Libav contains a GStreamer plugin for using the encoders,
849 decoders, muxers, and demuxers provided by FFmpeg.")
850 (home-page "https://gstreamer.freedesktop.org/")
851 (license license:lgpl2.0+)))
852
853 (define-public gst-editing-services
854 (package
855 (name "gst-editing-services")
856 (version "1.16.2")
857 (source (origin
858 (method url-fetch)
859 (uri (string-append
860 "https://gstreamer.freedesktop.org/src/" name "/"
861 "gstreamer-editing-services-" version ".tar.xz"))
862 (sha256
863 (base32
864 "05hcf3prna8ajjnqd53221gj9syarrrjbgvjcbhicv0c38csc1hf"))))
865 (build-system meson-build-system)
866 (arguments
867 ;; FIXME: 16/22 failing tests.
868 `(#:tests? #f
869 #:phases (modify-phases %standard-phases
870 ,@%common-gstreamer-phases)))
871 (inputs
872 `(("gst-plugins-base" ,gst-plugins-base)
873 ("libxml2" ,libxml2)))
874 (native-inputs
875 `(("flex" ,flex)
876 ("gst-plugins-bad" ,gst-plugins-bad)
877 ("gst-plugins-good" ,gst-plugins-good)
878 ("perl" ,perl)
879 ("pkg-config" ,pkg-config)
880 ("python" ,python)))
881 (home-page "https://gstreamer.freedesktop.org/")
882 (synopsis "GStreamer library for non-linear editors")
883 (description
884 "This is a high-level library for facilitating the creation of audio/video
885 non-linear editors.")
886 (license license:gpl2+)))
887
888 (define-public python-gst
889 (package
890 (name "python-gst")
891 (version "1.16.2")
892 (source (origin
893 (method url-fetch)
894 (uri (string-append
895 "https://gstreamer.freedesktop.org/src/gst-python/"
896 "gst-python-" version ".tar.xz"))
897 (sha256
898 (base32
899 "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390"))
900 (patches
901 (search-patches "python-gst-fix-build-with-python-3.8.patch"))))
902 (build-system meson-build-system)
903 (arguments
904 `(#:modules ((guix build meson-build-system)
905 (guix build utils)
906 ((guix build python-build-system) #:prefix python:))
907 #:imported-modules (,@%meson-build-system-modules
908 (guix build python-build-system))
909 #:configure-flags
910 (list (string-append
911 "-Dpygi-overrides-dir="
912 (python:site-packages %build-inputs %outputs) "gi/overrides"))))
913 (native-inputs
914 `(("pkg-config" ,pkg-config)
915 ("python" ,python)))
916 (propagated-inputs
917 `(("gst-plugins-base" ,gst-plugins-base)
918 ("python-pygobject" ,python-pygobject)))
919 (home-page "https://gstreamer.freedesktop.org/")
920 (synopsis "GStreamer GObject Introspection overrides for Python")
921 (description
922 "This package contains GObject Introspection overrides for Python that can
923 be used by Python applications using GStreamer.")
924 (license license:lgpl2.1+)))
925
926 (define-public gst123
927 (package
928 (name "gst123")
929 (version "0.3.5")
930 (source (origin
931 (method url-fetch)
932 (uri (string-append "http://space.twc.de/~stefan/gst123/gst123-"
933 version ".tar.bz2"))
934 (sha256
935 (base32
936 "0zaa117n4wkya9p903vkj8hj58lmdb66pxsdx5wwcv7nffbp5d67"))))
937 (build-system gnu-build-system)
938 (inputs
939 `(("gtk+" ,gtk+-2)
940 ("ncurses" ,ncurses)
941 ("gstreamer" ,gstreamer)
942 ("gst-plugins-base" ,gst-plugins-base)))
943 (native-inputs
944 `(("pkg-config" ,pkg-config)))
945 (home-page "http://space.twc.de/~stefan/gst123.php")
946 (synopsis "Flexible command line media player based on gstreamer")
947 (description "The program gst123 is designed to be a more flexible command
948 line player in the spirit of ogg123 and mpg123, based on the gstreamer media
949 framework. It plays all file formats gstreamer supports, so if you have a
950 music collection which contains different file formats, like flac, ogg and
951 mp3, you can use gst123 to play all your music files.")
952 (license license:lgpl2.0+)))