gnu: python-pathpy: Build documentation.
[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 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages gstreamer)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix utils)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages audio)
31 #:use-module (gnu packages bison)
32 #:use-module (gnu packages cdrom)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages flex)
36 #:use-module (gnu packages freedesktop)
37 #:use-module (gnu packages gl)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages gnupg)
41 #:use-module (gnu packages graphics)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages libusb)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages mp3)
47 #:use-module (gnu packages perl)
48 #:use-module (gnu packages pulseaudio)
49 #:use-module (gnu packages qt)
50 #:use-module (gnu packages rdf)
51 #:use-module (gnu packages video)
52 #:use-module (gnu packages xorg)
53 #:use-module (gnu packages xiph)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages ssh)
57 #:use-module (gnu packages telephony)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages version-control)
60 #:use-module (gnu packages assembly)
61 #:use-module (gnu packages xml))
62
63 (define-public orc
64 (package
65 (name "orc")
66 (version "0.4.26")
67 (source (origin
68 (method url-fetch)
69 (uri (string-append "https://gstreamer.freedesktop.org/data/src/"
70 "orc/orc-" version ".tar.xz"))
71 (sha256
72 (base32
73 "0jd69ynvr3k70mlxxgbsk047l1rd63m1wkj3qdcq7644xy0gllkx"))))
74 (build-system gnu-build-system)
75 (arguments
76 `(#:phases
77 (modify-phases %standard-phases
78 (add-before 'check 'disable-faulty-test
79 (lambda _
80 ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys'
81 ;; tests, which fail on some machines. See:
82 ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273
83 (substitute* '("testsuite/test-limits.c"
84 "testsuite/exec_opcodes_sys.c")
85 (("if \\(error\\) return 1;")
86 "if (error) return 77;")))))))
87 (home-page "http://code.entropywave.com/orc/")
88 (synopsis "Oil runtime compiler")
89 (description
90 "Orc is a just-in-time compiler implemented as a library and set of
91 associated tools for compiling and executing simple programs that operate on
92 arrays of data.")
93 ;; The source code implementing the Marsenne Twister algorithm is licensed
94 ;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
95 (license (list license:bsd-2 license:bsd-3))))
96
97 (define-public gstreamer
98 (package
99 (name "gstreamer")
100 (version "1.10.0")
101 (source
102 (origin
103 (method url-fetch)
104 (uri (string-append
105 "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
106 version ".tar.xz"))
107 (sha256
108 (base32
109 "01vjsgz58n6nrmnahs4ac7v4656yc042ymffqjzqa0a8pvx7hxqy"))))
110 (build-system gnu-build-system)
111 (outputs '("out" "doc"))
112 (arguments
113 `(#:configure-flags
114 (list (string-append "--with-html-dir="
115 (assoc-ref %outputs "doc")
116 "/share/gtk-doc/html"))))
117 (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
118 (native-inputs
119 `(("bison" ,bison)
120 ("flex" ,flex)
121 ("glib" ,glib "bin")
122 ("gobject-introspection" ,gobject-introspection)
123 ("perl" ,perl)
124 ("pkg-config" ,pkg-config)
125 ("python-wrapper" ,python-wrapper)))
126 (native-search-paths
127 (list (search-path-specification
128 (variable "GST_PLUGIN_SYSTEM_PATH")
129 (files '("lib/gstreamer-1.0")))))
130 (home-page "https://gstreamer.freedesktop.org/")
131 (synopsis "Multimedia library")
132 (description
133 "GStreamer is a library for constructing graphs of media-handling
134 components. The applications it supports range from simple Ogg/Vorbis
135 playback, audio/video streaming to complex audio mixing and video
136 non-linear editing.
137
138 Applications can take advantage of advances in codec and filter technology
139 transparently. Developers can add new codecs and filters by writing a
140 simple plugin with a clean, generic interface.
141
142 This package provides the core library and elements.")
143 (license license:lgpl2.0+)))
144
145 (define-public gst-plugins-base
146 (package
147 (name "gst-plugins-base")
148 (version "1.10.0")
149 (source
150 (origin
151 (method url-fetch)
152 (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
153 name "-" version ".tar.xz"))
154 (sha256
155 (base32
156 "0jp9rwv0am8qv32q3dzhdcbyygg5wjm4fg20njyhp6n6vybyzkdz"))))
157 (build-system gnu-build-system)
158 (outputs '("out" "doc"))
159 (propagated-inputs
160 `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc
161 (inputs
162 `(("cdparanoia" ,cdparanoia)
163 ("opus" ,opus)
164 ("orc" ,orc)
165 ("pango" ,pango)
166 ("libogg" ,libogg)
167 ("libtheora" ,libtheora)
168 ("libvorbis" ,libvorbis)
169 ("libx11" ,libx11)
170 ("zlib" ,zlib)
171 ("libXext" ,libxext)
172 ("libxv" ,libxv)
173 ("alsa-lib" ,alsa-lib)))
174 (native-inputs
175 `(("pkg-config" ,pkg-config)
176 ("glib" ,glib "bin")
177 ("gobject-introspection" ,gobject-introspection)
178 ("python-wrapper" ,python-wrapper)))
179 (arguments
180 `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel
181 #:configure-flags
182 (list (string-append "--with-html-dir="
183 (assoc-ref %outputs "doc")
184 "/share/gtk-doc/html"))
185 #:phases
186 (modify-phases %standard-phases
187 (add-before 'configure 'patch
188 (lambda _
189 (substitute* "tests/check/libs/pbutils.c"
190 (("/bin/sh") (which "sh"))))))))
191 (home-page "https://gstreamer.freedesktop.org/")
192 (synopsis
193 "Plugins for the GStreamer multimedia library")
194 (description "This package provides an essential exemplary set of plug-ins
195 for the GStreamer multimedia library.")
196 (license license:lgpl2.0+)))
197
198
199 (define-public gst-plugins-good
200 (package
201 (name "gst-plugins-good")
202 (version "1.10.0")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (string-append
207 "https://gstreamer.freedesktop.org/src/" name "/"
208 name "-" version ".tar.xz"))
209 (sha256
210 (base32
211 "1qhx6x3ax1qqbvm20zhqax3dsas4yzlx7vdjnjqllqzmcfbma0vs"))))
212 (build-system gnu-build-system)
213 (inputs
214 `(("aalib" ,aalib)
215 ("cairo" ,cairo)
216 ("flac" ,flac)
217 ("gdk-pixbuf" ,gdk-pixbuf)
218 ("gst-plugins-base" ,gst-plugins-base)
219 ("jack" ,jack-1)
220 ("libavc1394" ,libavc1394)
221 ("libcaca" ,libcaca)
222 ("libdv" ,libdv)
223 ("libiec61883" ,libiec61883)
224 ("libjpeg" ,libjpeg)
225 ("libpng" ,libpng)
226 ("libshout" ,libshout)
227 ("libsoup" ,libsoup)
228 ("libvpx" ,libvpx)
229 ("orc" ,orc)
230 ("pulseaudio" ,pulseaudio)
231 ("speex" ,speex)
232 ("taglib" ,taglib)
233 ("wavpack" ,wavpack)))
234 (native-inputs
235 `(("glib:bin" ,glib "bin")
236 ("pkg-config" ,pkg-config)
237 ("python-wrapper" ,python-wrapper)))
238 (arguments
239 `(#:phases
240 (modify-phases %standard-phases
241 (add-after
242 'unpack 'disable-failing-tests
243 (lambda _
244 ;; Disable tests that fail non-deterministically.
245 ;; XXX FIXME: Try removing this for version > 1.8.0.
246 (substitute* "tests/check/elements/rtprtx.c"
247 (("tcase_add_test \\(tc_chain, test_push_forward_seq\\);" all)
248 (string-append "/* " all " */"))
249 (("tcase_add_test \
250 \\(tc_chain, test_rtxreceive_data_reconstruction\\);" all)
251 (string-append "/* " all " */")))
252 (substitute* "tests/check/elements/splitmux.c"
253 (("tcase_add_test \\(tc_chain, test_splitmuxsink\\);" 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.10.0")
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 "0kqwh5r4j05f2w9m353grvypn0106hxcr52409f7rvm3w4b9sprx"))))
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) ; needs wayland-protocols
333 ))
334 (home-page "https://gstreamer.freedesktop.org/")
335 (synopsis "Plugins for the GStreamer multimedia library")
336 (description
337 "GStreamer Bad Plug-ins is a set of plug-ins whose quality aren't up to
338 par compared to the rest.")
339 (license license:lgpl2.0+)))
340
341 (define-public gst-plugins-ugly
342 (package
343 (name "gst-plugins-ugly")
344 (version "1.10.0")
345 (source
346 (origin
347 (method url-fetch)
348 (uri (string-append "https://gstreamer.freedesktop.org/src/"
349 name "/" name "-" version ".tar.xz"))
350 (sha256
351 (base32
352 "1q2m3bl8kh9q3grshj55lb2mqby4r20qfsrffc2l7ddb0ccqvplp"))))
353 (build-system gnu-build-system)
354 (inputs
355 `(("gst-plugins-base" ,gst-plugins-base)
356 ("liba52" ,liba52)
357 ("libmad" ,libmad)
358 ("lame" ,lame)
359 ("libcdio" ,libcdio)
360 ("twolame" ,twolame)
361 ("libmpeg2" ,libmpeg2)
362 ("libdvdread" ,libdvdread)
363 ("libx264" ,libx264)
364 ("mpg123" ,mpg123)
365 ;; TODO:
366 ;; * opencore-amr (for the AMR-NB decoder and encoder and the
367 ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/>
368 ("orc" ,orc)))
369 (native-inputs
370 `(("glib:bin" ,glib "bin")
371 ("pkg-config" ,pkg-config)
372 ("python-wrapper" ,python-wrapper)))
373 (home-page "https://gstreamer.freedesktop.org/")
374 (synopsis "GStreamer plugins from the \"ugly\" set")
375 (description "GStreamer Ugly Plug-ins. This set contains those plug-ins
376 which the developers consider to have good quality code but that might pose
377 distribution problems in some jurisdictions, e.g. due to patent threats.")
378 (license license:lgpl2.0+)))
379
380 (define-public gst-libav
381 (package
382 (name "gst-libav")
383 (version "1.10.0")
384 (source (origin
385 (method url-fetch)
386 (uri (string-append
387 "https://gstreamer.freedesktop.org/src/" name "/"
388 name "-" version ".tar.xz"))
389 (sha256
390 (base32
391 "0nyqkggcxfrbflcf4jyj0h9l1rkbi3r5h61w4fcbp2n72522165g"))))
392 (build-system gnu-build-system)
393 (arguments
394 '(#:configure-flags '("--with-system-libav")
395 #:phases
396 (modify-phases %standard-phases
397 (add-before 'configure 'patch-/bin/sh
398 (lambda _
399 (substitute* "gst-libs/ext/libav/configure"
400 (("#! /bin/sh")
401 (string-append "#! "(which "sh"))))
402 #t)))))
403 (native-inputs
404 `(("pkg-config" ,pkg-config)
405 ("python" ,python)))
406 (inputs
407 `(("gst-plugins-base" ,gst-plugins-base)
408 ("ffmpeg" ,ffmpeg)
409 ("orc" ,orc)
410 ("zlib" ,zlib)))
411 (home-page "http://gstreamer.freedesktop.org/")
412 (synopsis "Plugins for the GStreamer multimedia library")
413 (description
414 "This GStreamer plugin supports a large number of audio and video
415 compression formats through the use of the libav library.")
416 (license license:gpl2+)))
417
418 (define-public python-gst
419 (package
420 (name "python-gst")
421 (version "1.10.0")
422 (source (origin
423 (method url-fetch)
424 (uri (string-append
425 "https://gstreamer.freedesktop.org/src/gst-python/"
426 "gst-python-" version ".tar.xz"))
427 (sha256
428 (base32
429 "0hf71m0vqnd5sdj14li935xzzmqxh606qgw744a25w3vwj9v8nfy"))))
430 (build-system gnu-build-system)
431 (arguments
432 ;; XXX: Factorize python-sitedir with python-build-system.
433 `(#:imported-modules (,@%gnu-build-system-modules
434 (guix build python-build-system))
435 #:configure-flags
436 (let* ((python (assoc-ref %build-inputs "python"))
437 (python-version ((@@ (guix build python-build-system)
438 get-python-version)
439 python))
440 (python-sitedir (string-append
441 "lib/python" python-version "/site-packages")))
442 (list (string-append
443 "--with-pygi-overrides-dir=" %output "/" python-sitedir
444 "/gi/overrides")))))
445 (native-inputs
446 `(("pkg-config" ,pkg-config)
447 ("python" ,python)))
448 (propagated-inputs
449 `(("gst-plugins-base" ,gst-plugins-base)
450 ("python-pygobject" ,python-pygobject)))
451 (home-page "https://gstreamer.freedesktop.org/")
452 (synopsis "GStreamer GObject Introspection overrides for Python")
453 (description
454 "This package contains GObject Introspection overrides for Python that can
455 be used by Python applications using GStreamer.")
456 (license license:lgpl2.1+)
457 (properties `((python2-variant . ,(delay python2-gst))))))
458
459 (define-public python2-gst
460 (package (inherit python-gst)
461 (name "python2-gst")
462 (native-inputs
463 `(("pkg-config" ,pkg-config)
464 ("python" ,python-2)))
465 (propagated-inputs
466 `(("gst-plugins-base" ,gst-plugins-base)
467 ("python-pygobject" ,python2-pygobject)))))