| 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 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+ 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 (gnu packages) |
| 28 | #:use-module (gnu packages audio) |
| 29 | #:use-module (gnu packages bison) |
| 30 | #:use-module (gnu packages cdrom) |
| 31 | #:use-module (gnu packages compression) |
| 32 | #:use-module (gnu packages flex) |
| 33 | #:use-module (gnu packages glib) |
| 34 | #:use-module (gnu packages gnome) |
| 35 | #:use-module (gnu packages gtk) |
| 36 | #:use-module (gnu packages image) |
| 37 | #:use-module (gnu packages linux) |
| 38 | #:use-module (gnu packages mp3) |
| 39 | #:use-module (gnu packages perl) |
| 40 | #:use-module (gnu packages pulseaudio) |
| 41 | #:use-module (gnu packages video) |
| 42 | #:use-module (gnu packages xorg) |
| 43 | #:use-module (gnu packages xiph) |
| 44 | #:use-module (gnu packages pkg-config) |
| 45 | #:use-module (gnu packages python) |
| 46 | #:use-module (gnu packages yasm) |
| 47 | #:use-module (gnu packages xml)) |
| 48 | |
| 49 | (define-public orc |
| 50 | (package |
| 51 | (name "orc") |
| 52 | (version "0.4.24") |
| 53 | (source (origin |
| 54 | (method url-fetch) |
| 55 | (uri (string-append "https://gstreamer.freedesktop.org/data/src/" |
| 56 | "orc/orc-" version ".tar.xz")) |
| 57 | (sha256 |
| 58 | (base32 |
| 59 | "16ykgdrgxr6pfpy931p979cs68klvwmk3ii1k0a00wr4nn9x931k")))) |
| 60 | (build-system gnu-build-system) |
| 61 | (arguments `(#:phases |
| 62 | (alist-cons-before |
| 63 | 'check 'disable-faulty-test |
| 64 | (lambda _ |
| 65 | ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys' |
| 66 | ;; tests, which fail on some machines. See: |
| 67 | ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273 |
| 68 | (substitute* '("testsuite/test-limits.c" |
| 69 | "testsuite/exec_opcodes_sys.c") |
| 70 | (("if \\(error\\) return 1;") |
| 71 | "if (error) return 77;"))) |
| 72 | %standard-phases))) |
| 73 | (home-page "http://code.entropywave.com/orc/") |
| 74 | (synopsis "Oil runtime compiler") |
| 75 | (description |
| 76 | "Orc is a just-in-time compiler implemented as a library and set of |
| 77 | associated tools for compiling and executing simple programs that operate on |
| 78 | arrays of data.") |
| 79 | ;; The source code implementing the Marsenne Twister algorithm is licensed |
| 80 | ;; under the 3-clause BSD license, the rest is under 2-clause BSD license. |
| 81 | (license (list bsd-2 bsd-3)))) |
| 82 | |
| 83 | (define-public gstreamer |
| 84 | (package |
| 85 | (name "gstreamer") |
| 86 | (version "1.6.1") |
| 87 | (source |
| 88 | (origin |
| 89 | (method url-fetch) |
| 90 | (uri (string-append |
| 91 | "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-" |
| 92 | version ".tar.xz")) |
| 93 | (sha256 |
| 94 | (base32 |
| 95 | "172w1bpnkn6mm1wi37n03apdbb6cdkykhzjf1vfxchcd7hhkyflp")))) |
| 96 | (build-system gnu-build-system) |
| 97 | (outputs '("out" "doc")) |
| 98 | (arguments |
| 99 | `(#:configure-flags |
| 100 | (list (string-append "--with-html-dir=" |
| 101 | (assoc-ref %outputs "doc") |
| 102 | "/share/gtk-doc/html")))) |
| 103 | (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc. |
| 104 | (native-inputs |
| 105 | `(("bison" ,bison) |
| 106 | ("flex" ,flex) |
| 107 | ("glib" ,glib "bin") |
| 108 | ("gobject-introspection" ,gobject-introspection) |
| 109 | ("perl" ,perl) |
| 110 | ("pkg-config" ,pkg-config) |
| 111 | ("python-wrapper" ,python-wrapper))) |
| 112 | (native-search-paths |
| 113 | (list (search-path-specification |
| 114 | (variable "GST_PLUGIN_SYSTEM_PATH") |
| 115 | (files '("lib/gstreamer-1.0"))))) |
| 116 | (home-page "https://gstreamer.freedesktop.org/") |
| 117 | (synopsis "Multimedia library") |
| 118 | (description |
| 119 | "GStreamer is a library for constructing graphs of media-handling |
| 120 | components. The applications it supports range from simple Ogg/Vorbis |
| 121 | playback, audio/video streaming to complex audio mixing and video |
| 122 | non-linear editing. |
| 123 | |
| 124 | Applications can take advantage of advances in codec and filter technology |
| 125 | transparently. Developers can add new codecs and filters by writing a |
| 126 | simple plugin with a clean, generic interface. |
| 127 | |
| 128 | This package provides the core library and elements.") |
| 129 | (license lgpl2.0+))) |
| 130 | |
| 131 | (define-public gst-plugins-base |
| 132 | (package |
| 133 | (name "gst-plugins-base") |
| 134 | (version "1.6.1") |
| 135 | (source |
| 136 | (origin |
| 137 | (method url-fetch) |
| 138 | (uri (string-append "http://gstreamer.freedesktop.org/src/" name "/" |
| 139 | name "-" version ".tar.xz")) |
| 140 | (sha256 |
| 141 | (base32 |
| 142 | "18sbyjcp281zb3bsqji3pglsdsxi0s6ai7rx90sx8cpflkxdqcwm")))) |
| 143 | (build-system gnu-build-system) |
| 144 | (outputs '("out" "doc")) |
| 145 | (propagated-inputs |
| 146 | `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc |
| 147 | (inputs |
| 148 | `(("cdparanoia" ,cdparanoia) |
| 149 | ("orc" ,orc) |
| 150 | ("pango" ,pango) |
| 151 | ("libogg" ,libogg) |
| 152 | ("libtheora" ,libtheora) |
| 153 | ("libvorbis" ,libvorbis) |
| 154 | ("libx11" ,libx11) |
| 155 | ("zlib" ,zlib) |
| 156 | ("libXext" ,libxext) |
| 157 | ("libxv" ,libxv) |
| 158 | ("alsa-lib" ,alsa-lib))) |
| 159 | (native-inputs |
| 160 | `(("pkg-config" ,pkg-config) |
| 161 | ("glib" ,glib "bin") |
| 162 | ("gobject-introspection" ,gobject-introspection) |
| 163 | ("python-wrapper" ,python-wrapper))) |
| 164 | (arguments |
| 165 | `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel |
| 166 | #:configure-flags |
| 167 | (list (string-append "--with-html-dir=" |
| 168 | (assoc-ref %outputs "doc") |
| 169 | "/share/gtk-doc/html")) |
| 170 | #:phases |
| 171 | (alist-cons-before |
| 172 | 'configure 'patch |
| 173 | (lambda _ |
| 174 | (substitute* "tests/check/libs/pbutils.c" |
| 175 | (("/bin/sh") (which "sh")))) |
| 176 | %standard-phases))) |
| 177 | (home-page "http://gstreamer.freedesktop.org/") |
| 178 | (synopsis |
| 179 | "Plugins for the GStreamer multimedia library") |
| 180 | (description "This package provides an essential exemplary set of plug-ins |
| 181 | for the GStreamer multimedia library.") |
| 182 | (license lgpl2.0+))) |
| 183 | |
| 184 | |
| 185 | (define-public gst-plugins-good |
| 186 | (package |
| 187 | (name "gst-plugins-good") |
| 188 | (version "1.6.1") |
| 189 | (source |
| 190 | (origin |
| 191 | (method url-fetch) |
| 192 | (uri (string-append |
| 193 | "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-" |
| 194 | version ".tar.xz")) |
| 195 | (sha256 |
| 196 | (base32 |
| 197 | "0darc3058kbnql3mnlpizl0sq0hhli7vkm0rpqb7nywz14abim46")))) |
| 198 | (build-system gnu-build-system) |
| 199 | (inputs |
| 200 | `(("aalib" ,aalib) |
| 201 | ("cairo" ,cairo) |
| 202 | ("flac" ,flac) |
| 203 | ("gdk-pixbuf" ,gdk-pixbuf) |
| 204 | ("gst-plugins-base" ,gst-plugins-base) |
| 205 | ("jack" ,jack-1) |
| 206 | ("libavc1394" ,libavc1394) |
| 207 | ("libcaca" ,libcaca) |
| 208 | ("libdv" ,libdv) |
| 209 | ("libiec61883" ,libiec61883) |
| 210 | ("libjpeg" ,libjpeg) |
| 211 | ("libpng" ,libpng) |
| 212 | ("libshout" ,libshout) |
| 213 | ("libsoup" ,libsoup) |
| 214 | ("libvpx" ,libvpx) |
| 215 | ("orc" ,orc) |
| 216 | ("pulseaudio" ,pulseaudio) |
| 217 | ("speex" ,speex) |
| 218 | ("taglib" ,taglib) |
| 219 | ("wavpack" ,wavpack))) |
| 220 | (native-inputs |
| 221 | `(("glib:bin" ,glib "bin") |
| 222 | ("pkg-config" ,pkg-config) |
| 223 | ("python-wrapper" ,python-wrapper))) |
| 224 | (arguments |
| 225 | `(#:phases |
| 226 | (modify-phases %standard-phases |
| 227 | (add-after |
| 228 | 'unpack 'disable-failing-rtprtx-tests |
| 229 | (lambda _ |
| 230 | ;; Disable rtprtx tests that frequently fail. |
| 231 | ;; XXX FIXME: Try removing this for version > 1.6.1. |
| 232 | (substitute* "tests/check/elements/rtprtx.c" |
| 233 | (("tcase_add_test \\(tc_chain,\ |
| 234 | (test_rtxsender_max_size_packets|test_rtxreceive_data_reconstruction)\\);" all) |
| 235 | (string-append "/* " all " */"))) |
| 236 | #t))))) |
| 237 | (home-page "http://gstreamer.freedesktop.org/") |
| 238 | (synopsis |
| 239 | "Plugins for the GStreamer multimedia library") |
| 240 | (description "GStreamer Good Plug-ins is a set of plug-ins for the |
| 241 | GStreamer multimedia library. This set contains those plug-ins which the |
| 242 | developers consider to have good quality code and correct functionality.") |
| 243 | (license lgpl2.0+))) |
| 244 | |
| 245 | (define-public gst-plugins-ugly |
| 246 | (package |
| 247 | (name "gst-plugins-ugly") |
| 248 | (version "1.6.1") |
| 249 | (source |
| 250 | (origin |
| 251 | (method url-fetch) |
| 252 | (uri (string-append "https://gstreamer.freedesktop.org/src/" |
| 253 | name "/" name "-" version ".tar.xz")) |
| 254 | (sha256 |
| 255 | (base32 |
| 256 | "0mvasl1pwq70w2kmrkcrg77kggl5q7jqybi7fkvy3vr28c7gkhqc")))) |
| 257 | (build-system gnu-build-system) |
| 258 | (inputs |
| 259 | `(("gst-plugins-base" ,gst-plugins-base) |
| 260 | ("liba52" ,liba52) |
| 261 | ("libmad" ,libmad) |
| 262 | ("lame" ,lame) |
| 263 | ("libcdio" ,libcdio) |
| 264 | ("twolame" ,twolame) |
| 265 | ("libmpeg2" ,libmpeg2) |
| 266 | ("libdvdread" ,libdvdread) |
| 267 | ("libx264" ,libx264) |
| 268 | ;; TODO: |
| 269 | ;; * opencore-amr (for the AMR-NB decoder and encoder and the |
| 270 | ;; AMR-WB decoder) <http://sourceforge.net/projects/opencore-amr/> |
| 271 | ("orc" ,orc))) |
| 272 | (native-inputs |
| 273 | `(("glib:bin" ,glib "bin") |
| 274 | ("pkg-config" ,pkg-config) |
| 275 | ("python-wrapper" ,python-wrapper))) |
| 276 | (home-page "http://gstreamer.freedesktop.org/") |
| 277 | (synopsis "GStreamer plugins from the \"ugly\" set") |
| 278 | (description "GStreamer Ugly Plug-ins. This set contains those plug-ins |
| 279 | which the developers consider to have good quality code but that might pose |
| 280 | distribution problems in some jurisdictions, e.g. due to patent threats.") |
| 281 | (license lgpl2.0+))) |
| 282 | |
| 283 | (define-public gst-libav |
| 284 | (package |
| 285 | (name "gst-libav") |
| 286 | (version "1.6.1") |
| 287 | (source (origin |
| 288 | (method url-fetch) |
| 289 | (uri (string-append |
| 290 | "https://gstreamer.freedesktop.org/src/" name "/" |
| 291 | name "-" version ".tar.xz")) |
| 292 | (sha256 |
| 293 | (base32 |
| 294 | "1a9pc7zp5rg0cvpx8gqkr21w73i6p9xa505a34day9f8p3lfim94")))) |
| 295 | (build-system gnu-build-system) |
| 296 | (arguments |
| 297 | '(#:configure-flags '("--with-system-libav") |
| 298 | #:phases |
| 299 | (modify-phases %standard-phases |
| 300 | (add-before 'configure 'patch-/bin/sh |
| 301 | (lambda _ |
| 302 | (substitute* "gst-libs/ext/libav/configure" |
| 303 | (("#! /bin/sh") |
| 304 | (string-append "#! "(which "sh"))))))))) |
| 305 | (native-inputs |
| 306 | `(("pkg-config" ,pkg-config) |
| 307 | ("python" ,python))) |
| 308 | (inputs |
| 309 | `(("gst-plugins-base" ,gst-plugins-base) |
| 310 | ("ffmpeg" ,ffmpeg) |
| 311 | ("orc" ,orc) |
| 312 | ("zlib" ,zlib))) |
| 313 | (home-page "http://gstreamer.freedesktop.org/") |
| 314 | (synopsis "Plugins for the GStreamer multimedia library") |
| 315 | (description |
| 316 | "This GStreamer plugin supports a large number of audio and video |
| 317 | compression formats through the use of the libav library.") |
| 318 | (license gpl2+))) |