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