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