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