debian/0000775000000000000000000000000013064757443007205 5ustar debian/libgstreamer-plugins-good.install0000664000000000000000000000016112211614611015636 0ustar debian/tmp/usr/lib/*/libgstphotography-@GST_ABI@.so.* debian/tmp/usr/lib/*/libgstbasecamerabinsrc-@GST_ABI@.so.* debian/control0000664000000000000000000001637612324572347010621 0ustar Source: gst-plugins-good1.0 Section: libs Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Maintainers of GStreamer packages Uploaders: Loic Minier , Sebastian Dröge , Sjoerd Simons Build-Depends: libgstreamer1.0-dev (>= 1.2.4), libraw1394-dev (>= 2.0.0) [linux-any] , libiec61883-dev (>= 1.0.0) [linux-any] , libavc1394-dev [linux-any] , libv4l-dev [linux-any] , libgudev-1.0-dev (>= 143) [linux-any], libgstreamer-plugins-base1.0-dev (>= 1.2.3), autotools-dev, dh-autoreconf, automake (>= 1.11), autoconf (>= 2.62), libtool (>= 2.2.6), autopoint (>= 0.17), cdbs (>= 0.4.93), debhelper (>= 9), dpkg-dev (>= 1.15.1), pkg-config (>= 0.11.0), gtk-doc-tools (>= 1.12), libglib2.0-dev (>= 2.32), liborc-0.4-dev (>= 1:0.4.17), libcairo2-dev (>= 1.10.0), libcaca-dev, libspeex-dev (>= 1.1.6), libpng-dev, libshout3-dev, libjpeg-dev, libaa1-dev (>= 1.4p5), libflac-dev (>= 1.1.4), libdv4-dev | libdv-dev, libxdamage-dev, libxext-dev, libxfixes-dev, libxv-dev, libgtk-3-dev, libtag1-dev (>= 1.5), libwavpack-dev (>= 4.20), gstreamer1.0-plugins-base (>= 1.0.0), libsoup2.4-dev (>= 2.38), libpulse-dev (>= 2.0), libbz2-dev, gstreamer1.0-doc, gstreamer1.0-plugins-base-doc, libjack-jackd2-dev, libvpx-dev (>= 1.3.0) Standards-Version: 3.9.3 Vcs-Git: git://anonscm.debian.org/pkg-gstreamer/gst-plugins-good1.0.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gstreamer/gst-plugins-good1.0.git;a=summary Homepage: http://gstreamer.freedesktop.org/modules/gst-plugins-good.html Package: gstreamer1.0-plugins-good-doc Architecture: all Section: doc Depends: gstreamer1.0-doc, gstreamer1.0-plugins-base-doc, ${misc:Depends} Description: GStreamer documentation for plugins from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains documentation for plugins from the "good" set, a set of good-quality plug-ins under the LGPL license. Package: gstreamer1.0-pulseaudio Architecture: any Multi-Arch: same Section: sound Depends: ${misc:Depends}, ${shlibs:Depends} XB-GStreamer-Version: ${gstreamer:Version} XB-GStreamer-Elements: ${gstreamer:Elements} XB-GStreamer-URI-Sources: ${gstreamer:URISources} XB-GStreamer-URI-Sinks: ${gstreamer:URISinks} XB-GStreamer-Encoders: ${gstreamer:Encoders} XB-GStreamer-Decoders: ${gstreamer:Decoders} Provides: ${gstreamer:Provides} Description: GStreamer plugin for PulseAudio GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains the GStreamer plugin for PulseAudio, a sound server for POSIX and WIN32 systems. Package: gstreamer1.0-plugins-good Architecture: any Multi-Arch: same Section: libs Depends: ${misc:Depends}, ${shlibs:Depends}, gstreamer1.0-pulseaudio | gstreamer1.0-audiosink, gstreamer1.0-plugins-base, libgstreamer-plugins-good1.0-0 (= ${binary:Version}), Recommends: gstreamer1.0-x Replaces: gstreamer1.0-plugins-bad (<< 1.1.2) Breaks: gstreamer1.0-plugins-bad (<< 1.1.2) XB-GStreamer-Version: ${gstreamer:Version} XB-GStreamer-Elements: ${gstreamer:Elements} XB-GStreamer-URI-Sources: ${gstreamer:URISources} XB-GStreamer-URI-Sinks: ${gstreamer:URISinks} XB-GStreamer-Encoders: ${gstreamer:Encoders} XB-GStreamer-Decoders: ${gstreamer:Decoders} Provides: ${gstreamer:Provides} Description: GStreamer plugins from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains the GStreamer plugins from the "good" set, a set of good-quality plug-ins under the LGPL license. Package: gstreamer1.0-plugins-good-dbg Architecture: any Multi-Arch: same Section: debug Priority: extra Depends: gstreamer1.0-plugins-good (= ${binary:Version}), gstreamer1.0-pulseaudio (= ${binary:Version}), ${misc:Depends} Replaces: gstreamer1.0-plugins-bad (<< 1.1.2) Breaks: gstreamer1.0-plugins-bad (<< 1.1.2) Description: GStreamer plugins from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains unstripped shared libraries. It is provided primarily to provide a backtrace with names in a debugger, this makes it somewhat easier to interpret core dumps. The libraries are installed in /usr/lib/debug and are automatically used by gdb. Package: libgstreamer-plugins-good1.0-0 Architecture: any Section: libs Priority: extra Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends}, Breaks: libgstreamer-plugins-bad1.0-0 (<< 1.0.3-1ubuntu1) Replaces: gstreamer1.0-plugins-good (= 1.0.3-1ubuntu1), libgstreamer-plugins-bad1.0-0 (<< 1.0.3-1ubuntu1) Description: GStreamer development files for libraries from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains shared GStreamer libraries from the "good" set. The API is not guaranteed to be stable. Package: libgstreamer-plugins-good1.0-dev Architecture: any Section: libdevel Priority: extra Depends: ${misc:Depends}, libgstreamer-plugins-good1.0-0 (= ${binary:Version}), libgstreamer1.0-dev Description: GStreamer development files for libraries from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains development files for GStreamer libraries from the "good" set. The API is not guaranteed to be stable. debian/control.in0000664000000000000000000001454312324572347011220 0ustar Source: gst-plugins-good@GST_ABI@ Section: libs Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Maintainers of GStreamer packages Uploaders: Loic Minier , Sebastian Dröge , Sjoerd Simons Build-Depends: BUILDDEPS Standards-Version: 3.9.3 Vcs-Git: git://anonscm.debian.org/pkg-gstreamer/gst-plugins-good@GST_ABI@.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gstreamer/gst-plugins-good@GST_ABI@.git;a=summary Homepage: http://gstreamer.freedesktop.org/modules/gst-plugins-good.html Package: @GST_PKGNAME@-plugins-good-doc Architecture: all Section: doc Depends: gstreamer@GST_ABI@-doc, gstreamer@GST_ABI@-plugins-base-doc, ${misc:Depends} Description: GStreamer documentation for plugins from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains documentation for plugins from the "good" set, a set of good-quality plug-ins under the LGPL license. Package: @GST_PKGNAME@-pulseaudio Architecture: any Multi-Arch: same Section: sound Depends: ${misc:Depends}, ${shlibs:Depends} XB-GStreamer-Version: ${gstreamer:Version} XB-GStreamer-Elements: ${gstreamer:Elements} XB-GStreamer-URI-Sources: ${gstreamer:URISources} XB-GStreamer-URI-Sinks: ${gstreamer:URISinks} XB-GStreamer-Encoders: ${gstreamer:Encoders} XB-GStreamer-Decoders: ${gstreamer:Decoders} Provides: ${gstreamer:Provides} Description: GStreamer plugin for PulseAudio GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains the GStreamer plugin for PulseAudio, a sound server for POSIX and WIN32 systems. Package: @GST_PKGNAME@-plugins-good Architecture: any Multi-Arch: same Section: libs Depends: ${misc:Depends}, ${shlibs:Depends}, @GST_PKGNAME@-pulseaudio | @GST_PKGNAME@-audiosink, gstreamer@GST_ABI@-plugins-base, libgstreamer-plugins-good@GST_DEB_ABI@ (= ${binary:Version}), Recommends: @GST_PKGNAME@-x Replaces: gstreamer1.0-plugins-bad (<< 1.1.2) Breaks: gstreamer1.0-plugins-bad (<< 1.1.2) XB-GStreamer-Version: ${gstreamer:Version} XB-GStreamer-Elements: ${gstreamer:Elements} XB-GStreamer-URI-Sources: ${gstreamer:URISources} XB-GStreamer-URI-Sinks: ${gstreamer:URISinks} XB-GStreamer-Encoders: ${gstreamer:Encoders} XB-GStreamer-Decoders: ${gstreamer:Decoders} Provides: ${gstreamer:Provides} Description: GStreamer plugins from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains the GStreamer plugins from the "good" set, a set of good-quality plug-ins under the LGPL license. Package: @GST_PKGNAME@-plugins-good-dbg Architecture: any Multi-Arch: same Section: debug Priority: extra Depends: @GST_PKGNAME@-plugins-good (= ${binary:Version}), @GST_PKGNAME@-pulseaudio (= ${binary:Version}), ${misc:Depends} Replaces: gstreamer1.0-plugins-bad (<< 1.1.2) Breaks: gstreamer1.0-plugins-bad (<< 1.1.2) Description: GStreamer plugins from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains unstripped shared libraries. It is provided primarily to provide a backtrace with names in a debugger, this makes it somewhat easier to interpret core dumps. The libraries are installed in /usr/lib/debug and are automatically used by gdb. Package: libgstreamer-plugins-good@GST_DEB_ABI@ Architecture: any Section: libs Priority: extra Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends}, Breaks: libgstreamer-plugins-bad1.0-0 (<< 1.0.3-1ubuntu1) Replaces: @GST_PKGNAME@-plugins-good (= 1.0.3-1ubuntu1), libgstreamer-plugins-bad1.0-0 (<< 1.0.3-1ubuntu1) Description: GStreamer development files for libraries from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains shared GStreamer libraries from the "good" set. The API is not guaranteed to be stable. Package: libgstreamer-plugins-good@GST_ABI@-dev Architecture: any Section: libdevel Priority: extra Depends: ${misc:Depends}, libgstreamer-plugins-good@GST_DEB_ABI@ (= ${binary:Version}), libgstreamer1.0-dev Description: GStreamer development files for libraries from the "good" set GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. . This package contains development files for GStreamer libraries from the "good" set. The API is not guaranteed to be stable. debian/HACKING.Debian0000664000000000000000000000731112324572347011353 0ustar Hacking GStreamer for Debian ============================ An addition to the README.Debian that has Debian package hacking notes. Everything should now be versioned. - To update dependencies edit debian/build-deps.in - To rebuild package files from .in files: debian/rules maint - After a version update to check for missing files run: debian/maint missing debian/maint missing-libs debian/maint missing-so - To update package files edit gstreamer-foo then rebuild package files. This will generate the gstreamerX.Y-foo file. Also update debian/rules and debian/control.in as needed. - The packaging tries to stay close of upstream choice. gstreamerX.Y-misc has most of the files, extra packages are made for the sinks and by group of depends (gnome, x, ...) - Provide gstreamerX.Y-videosink and gstreamerX.Y-audiosink as needed. - All interfaces and generic libraries go in libgstreamer-plugins, libraries with external dependencies have their own package such as libgstreamer-gconf. - Applications go in gstreamerX.Y-plugins-base-apps File listing ------------ build-deps: - generated from "build-deps.in" in "rules debian/build-deps:": * "build-deps.in" lists build-depends for Debian main packages - serves generation with "control.in" and "mk.control" of "control" in "rules debian/control::" build-deps.in: - lists build-depends for Debian main packages - serves generation with "extra deps" of "build-deps" in "rules debian/build-deps:" changelog: handled classically compat: handled classically control: - generated for "rules maint" - generated from "control.in" and "build-deps" in "rules debian/control::": * "build-deps" lists build-depends to be inserted in "control Build-Depends:" * "control.in" serves of template for package descriptions of Debian main packages and makes use of special stanzas enclosed in "@" such as "@GST_ABI" which are replaced via sed in "rules debian/control::" control.in: - serves generation of "control" in "rules debian/control::" via "mk.control" called in "rules debian/control::" - template for package descriptions of Debian main packages and makes use of special stanzas enclosed in "@" such as "@GST_ABI" which are replaced via sed in "rules debian/control::" copyright: handled classically gstreamer-$plugin.install: - serves the generation of $gst_pkgname-$plugin.install (for example gstreamer-alsa.install serves the generation of gstreamerX.Y-alsa.install) in "rules pre-build::" via dynamic "@"-enclosed variables replacement - some plugins are handled specially and some special variables are available gstreamer-plugins-base-apps.install: this isn't really a plugin, but the gstreamerX.Y-plugins-base-apps package gstreamer-plugins-base-apps.manpages: man pages for the gstreamerX.Y-plugins-base-apps package HACKING.Debian: this file libgstreamer-plugins-base-dev.install libgstreamer-plugins-base.install: handled similarly has gstreamerX.Y-plugins-base-apps maint: makefile wrapping some targets of "rules" with some sh filtering mk.control: - Perl script serving the generation of "control" which reads "build-deps" and "control.in", and replaces the "BUILDDEPS" stanza with the build-deps patches: handled classically README.Debian: handled classically rules: handled classically, with special targets "maint:", and "debian/build-deps:" watch: handled classically This file is the initial work of: David I. Lehn Tue, 13 Apr 2004 21:28:55 -0400 and had some additions by: Loic Minier Sun, 19 Jun 2005 19:04:58 +0200 Sebastien Bacher Wed, 14 Dec 2005 17:00:21 +0100 debian/changelog0000664000000000000000000034145713064757443011075 0ustar gst-plugins-good1.0 (1.2.4-1~ubuntu1.4) trusty-security; urgency=medium * SECURITY UPDATE: DoS in gst_aac_parse_sink_setcaps - debian/patches/CVE-2016-10198.patch: make sure there's enough data in gst/audioparsers/gstaacparse.c. - CVE-2016-10198 * SECURITY UPDATE: DoS in qtdemux_tag_add_str_full - debian/patches/CVE-2016-10199.patch: fix out of bounds read in gst/isomp4/qtdemux.c. - CVE-2016-10199 * SECURITY UPDATE: DoS in qtdemux_parse_samples - debian/patches/CVE-2017-5840.patch: properly increment stts index in gst/isomp4/qtdemux.c. - CVE-2017-5840 -- Marc Deslauriers Thu, 23 Mar 2017 10:43:40 -0400 gst-plugins-good1.0 (1.2.4-1~ubuntu1.3) trusty-security; urgency=medium * SECURITY UPDATE: incomplete fix for flx decoder - debian/patches/flxdec-bounds3.patch: don't unref() parent in the chain function in gst/flx/gstflxdec.c. - debian/patches/flxdec-bounds4.patch: rewrite logic based on GstByteReader/Writer in gst/flx/flx_fmt.h, gst/flx/gstflxdec.c, gst/flx/gstflxdec.h. - No CVE number -- Marc Deslauriers Fri, 25 Nov 2016 13:20:49 -0500 gst-plugins-good1.0 (1.2.4-1~ubuntu1.1) trusty-security; urgency=medium * SECURITY UPDATE: code execution via out-of-bounds write in flx decoder - debian/patches/flxdec-bounds1.patch: add bounds checking to gst/flx/gstflxdec.c. - debian/patches/flxdec-bounds2.patch: fix compiler warnings in gst/flx/gstflxdec.c. - No CVE number -- Marc Deslauriers Tue, 22 Nov 2016 08:48:11 -0500 gst-plugins-good1.0 (1.2.4-1~ubuntu1) trusty; urgency=medium * SRU Utopic merge to trusty to get bugfix release 1.2.4 (LP: #1312305) + qtdemux: reverse playback and video stream switching failure + souphttpsrc: racy " server does not support seeking " error + crash when reading the device name property of pulsesink + rtspsrc: Fix deadlock when task creation is no successful + rtpsession: Crash when RTCP FIR received with unknown SSRC + v4l2src: Fix using v4l2src with Hauppauge HDPVR video capture device + rtpjpegpay: payload size not correctly calculated + [regression]eos event could not be send out from gstrtpjitterbuffer. + rtph264depay: marks all output buffers as delta units when outputting avc format + aacparse : Missing resilience when no audio frame is found + check: souphttpsrc: unknown type name ‘SoupStatus’ -- Iain Lane Fri, 25 Apr 2014 11:11:42 +0100 gst-plugins-good1.0 (1.2.4-1ubuntu1) trusty; urgency=low * Merge from Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. -- Iain Lane Fri, 25 Apr 2014 10:36:36 +0100 gst-plugins-good1.0 (1.2.4-1) unstable; urgency=medium * New upstream bugfix release: + debian/rules: - Build-depend on gstreamer >= 1.2.4. -- Sebastian Dröge Sat, 19 Apr 2014 15:56:43 +0200 gst-plugins-good1.0 (1.2.3-1ubuntu2) trusty; urgency=medium * Cherry-pick patch from upstream to fix gtk-docs FTBFS. (LP: #1289818) -- Dimitri John Ledkov Fri, 14 Mar 2014 16:33:25 +0000 gst-plugins-good1.0 (1.2.3-1ubuntu1) trusty; urgency=low * Merge from Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. -- Iain Lane Wed, 12 Feb 2014 12:01:02 +0000 gst-plugins-good1.0 (1.2.3-1) unstable; urgency=medium [ Iain Lane ] * Drop ltmain-as-needed patch and do the same with dh_autoreconf --as-needed. * Enable parallel builds [ Sebastian Dröge ] * New upstream bugfix release: + debian/build-deps.in: - Build-depend on gst-plugins-base >= 1.2.3. -- Sebastian Dröge Sun, 09 Feb 2014 11:23:29 +0100 gst-plugins-good1.0 (1.2.2-1ubuntu1) trusty; urgency=low * Merge from Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. + Enable libtool during dh-autoreconf. + Remove as-needed patch, instead pass as-needed arg to dh_autoreconf. + Enable parallel build. -- Iain Lane Fri, 10 Jan 2014 11:24:47 +0000 gst-plugins-good1.0 (1.2.2-1) unstable; urgency=medium * New upstream bugfix release. * debian/build-deps.in: + Build-depend on libvpx-dev >= 1.3.0 for VP9 support. -- Sebastian Dröge Fri, 27 Dec 2013 11:00:18 +0100 gst-plugins-good1.0 (1.2.1-1ubuntu2) trusty; urgency=medium * Enable libtool during dh-autoreconf. * Remove as-needed patch, instead pass as-needed arg to dh_autoreconf. * Enable parallel build. -- Dimitri John Ledkov Mon, 23 Dec 2013 14:07:25 +0000 gst-plugins-good1.0 (1.2.1-1ubuntu1) trusty; urgency=low * Merge with Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. -- Iain Lane Fri, 15 Nov 2013 11:15:06 +0000 gst-plugins-good1.0 (1.2.1-1) unstable; urgency=low [ Fabian Greffrath ] * Team upload. * Add Vcs-* and Homepage fields to debian/control[,.in}. * Turn versioned Conflicts into Breaks to simplify lockstep upgrades. [ Sebastian Dröge ] * New upstream bugfix release: + debian/build-deps.in: - Build-depend on gst-plugins-base >= 1.2.1. -- Sebastian Dröge Sat, 09 Nov 2013 17:09:41 +0100 gst-plugins-good1.0 (1.2.0-1ubuntu1) saucy; urgency=low * Merge with Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. -- Iain Lane Thu, 26 Sep 2013 08:50:00 +0000 gst-plugins-good1.0 (1.2.0-1) unstable; urgency=low * New upstream stable release: + debian/rules, debian/build-deps.in: - Build depend on GStreamer and gst-plugins-base >= 1.2.0. -- Sebastian Dröge Tue, 24 Sep 2013 16:39:22 +0200 gst-plugins-good1.0 (1.1.90-1) experimental; urgency=low * New upstream release candidate: + debian/rules, debian/build-deps.in: - Build depend on GStreamer and gst-plugins-base >= 1.1.90. -- Sebastian Dröge Thu, 19 Sep 2013 12:47:00 +0200 gst-plugins-good1.0 (1.1.4-1ubuntu1) saucy; urgency=low * Merge with Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. -- Iain Lane Wed, 04 Sep 2013 11:29:51 +0000 gst-plugins-good1.0 (1.1.4-1) experimental; urgency=low * New upstream development snapshot: + debian/rules, debian/build-deps.in: - Build depend on GStreamer and gst-plugins-base >= 1.1.4. - Build depend on libsoup >= 2.38. -- Sebastian Dröge Fri, 30 Aug 2013 12:53:44 +0200 gst-plugins-good1.0 (1.1.3-1ubuntu1) saucy; urgency=low * Merge with Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. -- Iain Lane Wed, 28 Aug 2013 09:29:13 +0000 gst-plugins-good1.0 (1.1.3-1) experimental; urgency=low * New upstream development snapshot: + debian/rules, debian/build-deps.in: - Build depend on GStreamer and gst-plugins-base >= 1.1.3. -- Sebastian Dröge Tue, 30 Jul 2013 08:46:19 +0200 gst-plugins-good1.0 (1.1.2-1) experimental; urgency=low * New upstream development snapshot: + debian/rules, debian/build-deps.in: - Build depend on GStreamer and gst-plugins-base >= 1.1.2. - Build depend on orc >= 0.4.17. - Build depend on pulseaudio >= 2.0. - Build depend on libsoup2.4-dev instead of libsoup-gnome2.4-dev. - Build depend on libjack-jackd2-dev instead of libjack-dev. + debian/gstreamer-plugins-good.install, debian/control.in: - Add dtmf plugin which moved from gst-plugins-bad. - Add newly ported cairo plugin. * debian/patches/0001-souphttpsrc-ignore-errors-from-HEAD-request.patch: + Patch from upstream GIT to ignore errors that happened as a result of the HEAD request. Only error out later if the GET request fails. -- Sebastian Dröge Sun, 14 Jul 2013 11:46:14 +0200 gst-plugins-good1.0 (1.0.8-1ubuntu1) saucy; urgency=low * Merge with Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - scaletempo - rtpmux - rtpvp8 (this and the above will be in -good upstream from 1.2) - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. * Have the new -dev package Depend on libgstreamer1.0-dev which the pcfile Requires. -- Iain Lane Mon, 15 Jul 2013 12:03:47 +0100 gst-plugins-good1.0 (1.0.8-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Sat, 13 Jul 2013 11:32:13 +0200 gst-plugins-good1.0 (1.0.7-1ubuntu1) saucy; urgency=low * Merge from Debian unstable. Remaining changes: + Import plugins from -bad that are needed for main applications. - scaletempo - rtpmux - rtpvp8 (this and the above will be in -good upstream from 1.2) - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. -- Iain Lane Fri, 26 Apr 2013 15:09:19 +0000 gst-plugins-good1.0 (1.0.7-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Fri, 26 Apr 2013 14:09:02 +0200 gst-plugins-good1.0 (1.0.6-1ubuntu1) raring; urgency=low * Merge with Debian, remaining changes: + Import plugins from -bad that are needed for main applications. - scaletempo - rtpmux - rtpvp8 (this and the above will be in -good upstream from 1.2) - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. * Refresh imported plugins against -good. -- Iain Lane Mon, 08 Apr 2013 17:29:43 +0100 gst-plugins-good1.0 (1.0.6-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Fri, 22 Mar 2013 18:16:56 +0100 gst-plugins-good1.0 (1.0.5-1ubuntu1) raring; urgency=low * Merge with Debian, remaining changes: + Import plugins from -bad that are needed for main applications. - scaletempo - rtpmux - rtpvp8 (this and the above will be in -good upstream from 1.2) - jpegformat - camerabin2 (+ basecamerabinsrc + photography) + Break and Replace -bad versions which contained these plugins. + Add a library package containing the shared library and a -dev package for compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. * Refresh imported plugins against -good. -- Iain Lane Tue, 05 Feb 2013 11:46:55 +0000 gst-plugins-good1.0 (1.0.5-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Tue, 08 Jan 2013 13:47:24 +0100 gst-plugins-good1.0 (1.0.4-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Wed, 19 Dec 2012 10:31:27 +0100 gst-plugins-good1.0 (1.0.3-1ubuntu3) raring; urgency=low * The new library package needs to Break and Replace libgstreamer-plugins-bad1.0-0 which shipped these libraries in Quantal, in addition to gstreamer1.0-plugins-good which shipped them in Raring for a brief period. -- Iain Lane Thu, 10 Jan 2013 16:18:09 +0000 gst-plugins-good1.0 (1.0.3-1ubuntu2) raring; urgency=low * Add a library package containing the shared library and a -dev package for compiling against it. Add Replaces against the good plugins package which formerly contained the shared library. -- Iain Lane Fri, 04 Jan 2013 15:16:12 +0000 gst-plugins-good1.0 (1.0.3-1ubuntu1) raring; urgency=low * Import plugins from -bad that are needed for main applications. - scaletempo - rtpmux - rtpvp8 (this and the above will be in -good upstream from 1.2) - jpegformat - camerabin2 (+ basecamerabinsrc + photography) * Break and Replace -bad versions which contained these plugins. -- Iain Lane Thu, 29 Nov 2012 15:32:58 +0000 gst-plugins-good1.0 (1.0.3-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Wed, 21 Nov 2012 14:54:15 +0100 gst-plugins-good1.0 (1.0.2-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Thu, 25 Oct 2012 13:33:47 +0200 gst-plugins-good1.0 (1.0.1-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Mon, 08 Oct 2012 10:49:02 +0200 gst-plugins-good1.0 (1.0.0-1) unstable; urgency=low * New upstream stable release: + debian/rules, debian/build-deps.in: - Build depend on GStreamer core/base >= 1.0.0. -- Sebastian Dröge Tue, 25 Sep 2012 00:19:31 +0200 gst-plugins-good1.0 (0.11.99-1) experimental; urgency=low * New upstream release: + debian/rules, debian/build-deps.in: - Build depend on GStreamer core/base >= 0.11.99. -- Sebastian Dröge Tue, 18 Sep 2012 09:38:33 +0200 gst-plugins-good1.0 (0.11.94-1) experimental; urgency=low * New upstream release: + debian/rules, debian/build-deps.in: - Build depend on GStreamer core/base >= 0.11.94. - Build depend on gtk-doc >= 1.12. + debian/gstreamer-plugins-good.install: - Add gdkpixbuf plugin. + debian/patches/0001-configure-Fix-GTK-required-version-variable-name.patch, debian/patches/0002-configure-And-fix-the-GTK-check-to-use-the-correct-p.patch: - Dropped, merged upstream. -- Sebastian Dröge Fri, 14 Sep 2012 10:15:48 +0200 gst-plugins-good1.0 (0.11.93-1) experimental; urgency=low * New upstream release: + debian/rules, debian/build-deps.in: - Build depend on GStreamer core/base >= 0.11.93. - Build depend on GLib >= 2.32. - Build depend on ORC >= 0.4.16. - Build depend on libsoup >= 2.26.1. - Build depend on GTK3 instead of GTK2. + debian/gstreamer-plugins-good.install: - Add the imagefreeze, interleave, deinterlace, monoscope, smpte and wavpack plugins. + debian/patches/0001-configure-Fix-GTK-required-version-variable-name.patch: - Fix GTK configure check. -- Sebastian Dröge Thu, 09 Aug 2012 10:23:42 +0200 gst-plugins-good1.0 (0.11.92-1) experimental; urgency=low * New upstream release, "Money": + debian/rules, debian/build-deps.in: - Build depend on GStreamer core/base >= 0.11.92. + debian/gstreamer-plugins-good.install, debian/build-deps.in: - Remove annodex plugin. -- Sebastian Dröge Fri, 08 Jun 2012 12:25:20 +0200 gst-plugins-good1.0 (0.11.91-1) experimental; urgency=low * Build-depend on GLib > 2.31.14. * New upstream release, "I smell the blood of an Englishman": + debian/rules, debian/build-deps.in: - Build depend on GStreamer core/base >= 0.11.91. + debian/gstreamer-plugins-good.install: - Ship some plugins again that were now ported. * debian/build-deps.in: + Update automake, autoconf and libtool build dependencies. * debian/control.in, debian/build-deps.in: + Update debhelper dependency version and Standards-Version. -- Sebastian Dröge Mon, 21 May 2012 12:56:30 +0200 gst-plugins-good1.0 (0.11.90-1) experimental; urgency=low [ Olivier Naudan ] * Imported Upstream version 0.11.90 * Imported debian/ from gst-plugins-good 0.10.30-1 * Updated debian/ for 0.11.90 * Removed -gconf package * gstreamer-plugins-good.intall: Removed the plugins that are not ported or o [ Sebastian Dröge ] * Build-depend on libpng-dev instead of libpng12-dev. * Update copyright. * Remove GConf build dependency. -- Sebastian Dröge Wed, 02 May 2012 20:17:22 +0200 gst-plugins-good0.10 (0.10.31-1) unstable; urgency=low * New upstream release, "Faster": + debian/rules, debian/build-deps.in: - (Build-) depend on GStreamer core/base >= 0.10.36. -- Sebastian Dröge Tue, 21 Feb 2012 10:45:15 +0100 gst-plugins-good0.10 (0.10.30.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Mon, 06 Feb 2012 09:59:53 +0100 gst-plugins-good0.10 (0.10.30.2-3) experimental; urgency=low * debian/control.in: + Build-depend on automake (>= 1.10), autoconf (>= 2.60) and libtool (>= 2.0) to make dh-autoreconf actually work. -- Sebastian Dröge Wed, 14 Dec 2011 12:58:12 +0100 gst-plugins-good0.10 (0.10.30.2-2) experimental; urgency=low * debian/control.in: + Depend on gstreamer0.10-pulseaudio | gstreamer0.10-audiosink instead of only depending on the virtual package. -- Sebastian Dröge Mon, 12 Dec 2011 10:54:47 +0100 gst-plugins-good0.10 (0.10.30.2-1) experimental; urgency=low * New upstream pre-release: + debian/build-deps.in, debian/rules: - Build-depend on GStreamer core/base 0.10.35.2. - Build-depend on PulseAudio 1.0. + debian/patches/04_rtpgst722pay-compensate-for-clockrate.patch: - Dropped, merged upstream. + debian/patches/03_pulse-rank.patch: - Dropped, merged upstream. + debian/patches/99_ltmain_as-needed.patch: - Refreshed to apply cleanly again. * debian/control.in, debian/build-deps.in: + ACK NMU 0.10.30.2-2.1 and 0.10.30.2-2.2 (Closes: #646325, #633438). + Correctly change control file from the last two NMUs. * debian/build-deps.in, debian/compat, debian/control.in, debian/gstreamer-gconf.install, debian/gstreamer-plugins-good.install, debian/gstreamer-pulseaudio.install, debian/rules: + Transition package to multi arch (Closes: #647486). Patch taken from the Ubuntu package. -- Sebastian Dröge Mon, 12 Dec 2011 09:34:40 +0100 gst-plugins-good0.10 (0.10.30-2.2) unstable; urgency=low * Non-maintainer upload. * Transition to libjpeg8 by build-depending against libjpeg-dev (instead of libjpeg62-dev), closes: #633438 -- Philipp Kaluza Sat, 03 Dec 2011 13:34:20 +0100 gst-plugins-good0.10 (0.10.30-2.1) unstable; urgency=low * Non-maintainer upload. * Add Replaces/Breaks to gstreamer0.10-gconf for old gstreamer0.10-plugins-good (Closes: #646325) -- Philipp Kaluza Sat, 03 Dec 2011 10:34:02 +0000 gst-plugins-good0.10 (0.10.30-2) unstable; urgency=low [ Sebastian Dröge ] * debian/control.in: + Let gstreamer0.10-plugins-good depend on gstreamer0.10-gconf for wheezy to guarantee correct upgrades to wheezy (Closes: #625567). [ Sjoerd Simons ] * debian/patches/04_rtpgst722pay-compensate-for-clockrate.patch: + Correct clockrate vs. samplerate difference for G722. Fixes people sounding like chipmunks on voip calls with G722 (From upstream git) -- Sjoerd Simons Wed, 09 Nov 2011 14:20:22 +0000 gst-plugins-good0.10 (0.10.30-1) unstable; urgency=low * New upstream release, "Adagio": + debian/patches/01_path-max.patch: - Dropped, merged upstream. -- Sebastian Dröge Thu, 23 Jun 2011 09:44:29 +0200 gst-plugins-good0.10 (0.10.29-2) unstable; urgency=low * debian/patches/01_path-max.patch: + Define PATH_MAX if it isn't defined, e.g. on GNU Hurd. Thanks to Pino Toscano for the patch (Closes: #626698). * debian/rules, debian/gstreamer-plugins-good.install: + Don't build the oss4 plugin on GNU Hurd, it does not compile because of the way how ioctl() works there. Thanks to Pino Toscano for the patch (Closes: #626698). -- Sebastian Dröge Mon, 16 May 2011 09:10:14 +0200 gst-plugins-good0.10 (0.10.29-1) unstable; urgency=low * New upstream release, "Soft Cheese Enthusiast": + debian/gstreamer-plugins-good.install: - The quicktime plugin was renamed to isomp4 because of trademark concerns. + debian/rules, debian/build-deps.in: - Build-depend on GStreamer core/base 0.10.33. -- Sebastian Dröge Tue, 10 May 2011 15:52:01 +0200 gst-plugins-good0.10 (0.10.28.3-1) experimental; urgency=low * New upstream pre-release: + debian/gstreamer-plugins-good.install: - The qtdemux plugin was renamed to quicktime because it contains a muxer too now. -- Sebastian Dröge Wed, 27 Apr 2011 15:48:22 +0200 gst-plugins-good0.10 (0.10.28.2-1) experimental; urgency=low [ Alessandro Decina ] * debian/build-deps.in: + Add dependency on dh-autoreconf * debian/rules: + Include dh-autoreconf cdbs rule [ Loïc Minier ] * Use linux-any in build-deps instead of type-handling. * Rework sed calls to avoid sed | sed. [ Sebastian Dröge ] * debian/control.in, debian/build-deps.in, debian/gstreamer-esd.install, debian/rules: + Drop ESD plugin, nothing is using it anymore, it is unmaintained upstream and pulseaudio is a better replacement for it. * New upstream pre-release: + debian/build-deps.in, debian/rules: - Build-depend on GStreamer core/base >= 0.10.32.2. + debian/build-deps.in: - Build-depend on libcairo2-dev >= 1.10.0. + debian/gstreamer-plugins-good.install, debian/control.in: - Add audioparsers plugin, which was moved from -bad and Conflict with -bad << 0.10.21.2. -- Sebastian Dröge Sun, 17 Apr 2011 10:55:39 +0200 gst-plugins-good0.10 (0.10.28-3) unstable; urgency=low * debian/control.in, debian/rules, debian/gstreamer-plugins-good.install, debian/gstreamer-gconf.install: + Split the GConf plugin into it's own package. GStreamer is used as the default phonon backend nowadays and there's no reason why KDE should depend on half of GNOME (Closes: #595651). -- Sebastian Dröge Fri, 01 Apr 2011 10:13:13 +0200 gst-plugins-good0.10 (0.10.28-2) unstable; urgency=low * Upload to unstable. -- Sebastian Dröge Tue, 22 Mar 2011 15:06:25 +0100 gst-plugins-good0.10 (0.10.28-1) experimental; urgency=low * New upstream bugfix release, "Inconvenienced by the Solar System": + Fixes build with kernels that have v4l2 support but not v4l support. -- Sebastian Dröge Sun, 13 Mar 2011 13:03:07 +0100 gst-plugins-good0.10 (0.10.27-1) experimental; urgency=low * New upstream stable release, "Some Kind of Temporal Blend": + debian/build-deps, debian/rules: - Require GStreamer, gst-plugins-base >= 0.10.32. -- Sebastian Dröge Sat, 22 Jan 2011 13:35:36 +0100 gst-plugins-good0.10 (0.10.26.4-1) experimental; urgency=low * New upstream pre-release: + debian/build-deps, debian/rules: - Require GStreamer, gst-plugins-base >= 0.10.31.4. -- Sebastian Dröge Wed, 19 Jan 2011 21:16:40 +0100 gst-plugins-good0.10 (0.10.26.3-1) experimental; urgency=low * New upstream pre-release: + debian/build-deps, debian/rules: - Require GStreamer, gst-plugins-base >= 0.10.31.3. -- Sebastian Dröge Thu, 13 Jan 2011 13:07:01 +0100 gst-plugins-good0.10 (0.10.26.2-1) experimental; urgency=low [ Sebastian Dröge ] * New upstream pre-release: + debian/control.in: - Conflict/Replace gstreamer0.10-plugins-bad (<< 0.10.20.2) because of the moved JACK plugin. + debian/build-deps.in, debian/gstreamer-plugins-good.install: - Add the JACK plugin which was moved from gst-plugins-bad. + debian/build-deps, debian/rules: - Require GStreamer, gst-plugins-base >= 0.10.31.2. - Require GLib >= 2.22. [ Emilio Pozuelo Monfort ] * debian/build-deps.in, debian/rules: + Use dpkg-vendor instead of lsb_release. -- Sebastian Dröge Mon, 10 Jan 2011 15:11:27 +0100 gst-plugins-good0.10 (0.10.26-1) experimental; urgency=low * New upstream release, "Escapades". -- Sebastian Dröge Thu, 02 Dec 2010 10:35:38 +0100 gst-plugins-good0.10 (0.10.25.5-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Fri, 19 Nov 2010 11:30:21 +0100 gst-plugins-good0.10 (0.10.25.4-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Mon, 01 Nov 2010 20:18:27 +0100 gst-plugins-good0.10 (0.10.25.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Fri, 22 Oct 2010 19:58:54 +0200 gst-plugins-good0.10 (0.10.25.2-1) experimental; urgency=low * New upstream pre-release: + debian/patches/01_alphacolor-passthrough.patch, debian/patches/02_qtdemux-eos-handling.patch, debian/patches/04_qtdemux-eos-handling.patch: - Dropped, merged upstream. + debian/rules, debian/build-deps.in: - Require GStreamer core/plugins-base >= 0.10.30.2. - Require ORC >= 0.4.11. -- Sebastian Dröge Sat, 16 Oct 2010 11:29:22 +0200 gst-plugins-good0.10 (0.10.25-5) experimental; urgency=low * debian/build-deps.in: + Add the epoch to the orc build dependency to get dependencies on the correct versions. -- Sebastian Dröge Fri, 17 Sep 2010 13:24:49 +0200 gst-plugins-good0.10 (0.10.25-4) experimental; urgency=low * debian/patches/02_qtdemux-eos-handling.patch: + Another patch from upstream GIT to fix EOS handling in the QT/MP4 demuxer even more. -- Sebastian Dröge Thu, 16 Sep 2010 11:18:01 +0200 gst-plugins-good0.10 (0.10.25-3) experimental; urgency=low * debian/patches/02_qtdemux-eos-handling.patch: + Patch from upstream GIT to fix EOS handling in the QT/MP4 demuxer. -- Sebastian Dröge Wed, 15 Sep 2010 08:21:56 +0200 gst-plugins-good0.10 (0.10.25-2) experimental; urgency=low * debian/patches/01_alphacolor-passthrough.patch: + Simple patch from upstream GIT to fix passthrough mode of the alphacolor element. -- Sebastian Dröge Fri, 10 Sep 2010 11:40:40 +0200 gst-plugins-good0.10 (0.10.25-1) experimental; urgency=low * New upstream release, "Woe to You Oh Earth and Sea". -- Sebastian Dröge Fri, 03 Sep 2010 12:36:18 +0200 gst-plugins-good0.10 (0.10.24.5-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Wed, 25 Aug 2010 22:12:39 +0200 gst-plugins-good0.10 (0.10.24.4-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Sat, 21 Aug 2010 21:59:12 +0200 gst-plugins-good0.10 (0.10.24.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Wed, 11 Aug 2010 21:19:47 +0200 gst-plugins-good0.10 (0.10.24.2-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Wed, 11 Aug 2010 09:12:22 +0200 gst-plugins-good0.10 (0.10.24-1) unstable; urgency=low * New upstream stable release, "Taking Liberties": + debian/build-deps.in, debian/rules: - Build depend on GStreamer 0.10.30. -- Sebastian Dröge Thu, 15 Jul 2010 13:54:14 +0200 gst-plugins-good0.10 (0.10.23.4-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Wed, 07 Jul 2010 15:42:43 +0200 gst-plugins-good0.10 (0.10.23.3-1) experimental; urgency=low * New upstream pre-release: + debian/build-deps.in, debian/rules: - Build depend on GStreamer 0.10.29.3. + debian/patches/01_jpeg-libgstbase-linking.patch: - Dropped, merged upstream. -- Sebastian Dröge Wed, 30 Jun 2010 10:43:51 +0200 gst-plugins-good0.10 (0.10.23.2-1) experimental; urgency=low * New upstream pre-release: + debian/rules, debian/compat, debian/control.in, debian/source/format, debian/patches/*: - Update to debhelper compat level 7. - Update to source format 3.0 (quilt). + debian/build-deps.in, debian/rules: - Build depend on GLib 2.20 and GStreamer 0.10.29.2. - Build depend on libraw1394 2.0.0. - Build depend on ORC instead of liboil. + debian/patches/02_pulsesink-reuse.patch, debian/patches/04_theora_delivery_method.patch, debian/patches/05_rtph264pay_short_startcodes.patch: - Dropped, merged upstream. + debian/patches/01_jpeg-libgstbase-linking.patch: - Link the jpeg plugin with libgstbase to fix FTBFS. -- Sebastian Dröge Sat, 26 Jun 2010 21:38:03 +0200 gst-plugins-good0.10 (0.10.23-4) unstable; urgency=low * debian/patches/05_rtph264pay_short_startcodes.patch: + Patch from upstream GIT to let rtph264 cope with the shorter startcodes that are now used by by x264enc. This fixes interoperability with Google Video and Nokia N900 among others. -- Sjoerd Simons Fri, 04 Jun 2010 12:51:01 +0100 gst-plugins-good0.10 (0.10.23-3) unstable; urgency=low * debian/patches/02_pulsesink-reuse.patch: + Patch from upstream GIT to fix reuse of pulsesink. -- Sebastian Dröge Wed, 02 Jun 2010 10:54:42 +0200 gst-plugins-good0.10 (0.10.23-2) unstable; urgency=low * debian/patches/04_theora_delivery_method.patch + Added. Let the theora payloader advertise delivery-method in its caps. Needed for backwards compatibility with older gstreamer/farsight versions. (From Gnome bugzilla #618940) -- Sjoerd Simons Mon, 31 May 2010 22:31:06 +0100 gst-plugins-good0.10 (0.10.23-1) unstable; urgency=low * New upstream release, "Stylish Kids in Riot". -- Sebastian Dröge Mon, 31 May 2010 05:42:46 +0200 gst-plugins-good0.10 (0.10.22.3-1) unstable; urgency=low * New upstream pre-release: + debian/patches/*: - Drop all VP8/WebM patches and other patches that are upstream now. -- Sebastian Dröge Wed, 26 May 2010 15:34:01 +0200 gst-plugins-good0.10 (0.10.22.2-3) unstable; urgency=low * Upload to unstable. -- Sebastian Dröge Thu, 20 May 2010 13:55:29 +0200 gst-plugins-good0.10 (0.10.22.2-2) experimental; urgency=low * debian/patches/00*: + Add support for VP8 in the AVI, Matroska and QT/MP4 plugins and fix some Matroska issues. * debian/patches/04-pulse-0001-pulse-Don-t-lock-the-mainloop-in-NULL.patch: + Don't try to use a NULL pulse mainloop. -- Sebastian Dröge Tue, 18 May 2010 20:59:55 +0200 gst-plugins-good0.10 (0.10.22.2-1) experimental; urgency=low * New upstream pre-release: + debian/gstreamer-plugins-good.install, debian/control.in: - Ship the imagefreeze and oss4audio plugins here, they were moved from gstreamer0.10-plugins-bad. - Add conflicts for gstreamer0.10-plugins-bad because of the moved capssetter element. * debian/patches/01_efence-configure-check.patch: + Fix configure check for efence. -- Sebastian Dröge Sat, 15 May 2010 09:55:08 +0200 gst-plugins-good0.10 (0.10.22-1) unstable; urgency=low * New upstream release, "Square One": + debian/build-deps.in, debian/rules: - Build depend on GStreamer core/base >= 0.10.29. -- Sebastian Dröge Wed, 28 Apr 2010 09:44:17 +0200 gst-plugins-good0.10 (0.10.21.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Mon, 26 Apr 2010 08:01:09 +0200 gst-plugins-good0.10 (0.10.21.2-1) experimental; urgency=low * New upstream pre-release: + debian/build-deps.in, debian/rules: - Build depend on GStreamer core/base >= 0.10.28.2. * debian/build-deps.in, debian/control.in: + (Build-) depend on GStreamer core/base documentation to get documentation cross references right. -- Sebastian Dröge Thu, 15 Apr 2010 13:56:53 +0200 gst-plugins-good0.10 (0.10.21-1) unstable; urgency=low * New upstream stable release, "Lemons". -- Sebastian Dröge Tue, 09 Mar 2010 09:48:28 +0000 gst-plugins-good0.10 (0.10.19-1) unstable; urgency=low * New upstream stable release, "Closer to the Edit": + debian/rules, debian/build-deps.in: - Build depend on gstreamer and gst-plugins-base >= 0.10.27. -- Sebastian Dröge Mon, 08 Mar 2010 10:01:27 +0000 gst-plugins-good0.10 (0.10.18.3-1) experimental; urgency=low * New upstream pre-release: + debian/rules, debian/build-deps.in: - Build depend on gstreamer and gst-plugins-base >= 0.10.26.3. -- Sebastian Dröge Thu, 25 Feb 2010 08:27:57 +0100 gst-plugins-good0.10 (0.10.18.2-1) experimental; urgency=low * New upstream pre-release: + debian/gstreamer-plugins-good.install, debian/control.in: - Add shapewipe plugin, which moved from gst-plugins-bad. Also add Replaces for gst-plugins-bad << 0.10.17.2. + debian/build-deps.in: - Build depend on gst-plugins-base 0.10.26.2. -- Sebastian Dröge Fri, 19 Feb 2010 13:51:58 +0100 gst-plugins-good0.10 (0.10.18-1) unstable; urgency=low * New upstream release, "Short Circuit": + debian/rules, debian/build-deps.in: - Update GStreamer and gst-plugins-base build dependencies to >= 0.10.26. -- Sebastian Dröge Thu, 11 Feb 2010 10:31:48 +0100 gst-plugins-good0.10 (0.10.17.3-1) experimental; urgency=low * debian/build-deps.in, debian/gstreamer-plugins-good.install: + Remove HAL plugin, HAL will most probably be dropped soon and nobody uses this plugin anymore. * New upstream pre-release. -- Sebastian Dröge Fri, 05 Feb 2010 10:10:51 +0100 gst-plugins-good0.10 (0.10.17.2-1) experimental; urgency=low * New upstream pre-release: + debian/rules, debian/control.in: - Build depend on GStreamer 0.10.25.2, gst-plugins-base 0.10.25.2 and GLib 2.18. + Fixes demuxing of some MOV files (Closes: #561227). + Fixes FTBFS with gcc 4.5 (Closes: #564998). * debian/control.in: + Fix typo in package description (Closes: #557368). + Remove David I. Lehn from Uploaders (Closes: #557285). -- Sebastian Dröge Wed, 27 Jan 2010 07:56:17 +0100 gst-plugins-good0.10 (0.10.17-1) unstable; urgency=low * debian/build-deps.in: + Build depend on pulseaudio >= 0.9.20 for additional features. * New upstream release, "They used to sparkle". -- Sebastian Dröge Tue, 17 Nov 2009 09:17:35 +0100 gst-plugins-good0.10 (0.10.16.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Fri, 13 Nov 2009 07:58:08 +0100 gst-plugins-good0.10 (0.10.16.2-1) experimental; urgency=low * New upstream pre-release: + debian/patches/00*pulse*.patch, debian/patches/00*equalizer*.patch, debian/patches/04_oss-rank.patch: - Dropped, merged upstream. + debian/build-deps.in, debian/rules: - Update build dependencies. -- Sebastian Dröge Tue, 10 Nov 2009 10:28:49 +0100 gst-plugins-good0.10 (0.10.16-5) unstable; urgency=low * debian/patches/0021-pulsesink-Only-set-the-volume-on-stream-connection-i.patch: + Only set the volume on stream connection if pulse >= 0.9.20 is available, this prevents weird volume changes in totem. -- Sebastian Dröge Fri, 30 Oct 2009 10:33:31 +0100 gst-plugins-good0.10 (0.10.16-4) unstable; urgency=low * debian/patches/000{1,2}-equalizer*.patch: + Patches from upstream GIT to fix equalizer in stereo mode and to use better filters for the first and last band. * debian/patches/00[1-20]-pulse*.patch: + Patches from upstream GIT to improve PulseAudio plugin and fix some major issues, like decreasing the volume after every track in some cases. -- Sebastian Dröge Sun, 18 Oct 2009 14:00:56 +0200 gst-plugins-good0.10 (0.10.16-3) unstable; urgency=low * debian/patches/04_oss-rank.patch: + Downgrade the rank of osssrc to secondary * debian/rules: Change default audio input to autoaudiosrc -- Sjoerd Simons Wed, 07 Oct 2009 22:33:02 +0100 gst-plugins-good0.10 (0.10.16-2) unstable; urgency=low * debian/rules: + Use libgudev on Linux for v4l2 device detection. -- Sebastian Dröge Wed, 30 Sep 2009 08:26:07 +0200 gst-plugins-good0.10 (0.10.16-1) unstable; urgency=low * New upstream release, 'Secret Handshakes'. -- Sebastian Dröge Sun, 30 Aug 2009 11:02:26 +0200 gst-plugins-good0.10 (0.10.15.5-1) experimental; urgency=low * New upstream pre-release. * debian/control.in: + Update Standards-version to 3.8.3, no additional changes needed. -- Sebastian Dröge Wed, 26 Aug 2009 17:39:36 +0200 gst-plugins-good0.10 (0.10.15.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Mon, 17 Aug 2009 08:11:59 +0200 gst-plugins-good0.10 (0.10.15.2-1) experimental; urgency=low * New upstream pre-release: + debian/build-deps.in, debian/rules: - Update build dependencies. + debian/control.in, debian/gstreamer-plugins-good.install: - Add the rtpmanager plugin which was moved from gst-plugins-bad. For this also add Replaces for gst-plugins-bad << 0.10.13.2. + debian/patches/01_equalizer-integer-arithmetic-distortions.patch, debian/patches/02_SA35205-pngdec-integer-overflow.patch: - Dropped, merged upstream. * debian/control.in: + Update Standards-version to 3.8.2, no additional changes needed. -- Sebastian Dröge Wed, 12 Aug 2009 07:13:08 +0200 gst-plugins-good0.10 (0.10.15-2) unstable; urgency=high * debian/patches/01_equalizer-integer-arithmetic-distortions.patch: + Patch from upstream GIT to fix distortions when the integer arithmetic mode of the equalizer is used. * debian/patches/02_SA35205-pngdec-integer-overflow.patch: + SECURITY: SA35205 - PNG Processing Integer Overflow Vulnerability Patch from upstream GIT to fix an integer overflow in pngdec: A malformed (or simply huge) PNG file can lead to integer overflow in calculating the size of the output buffer, leading to crashes or buffer overflows later (Closes: #531631). -- Sebastian Dröge Wed, 03 Jun 2009 08:22:36 +0200 gst-plugins-good0.10 (0.10.15-1) unstable; urgency=low * New upstream release, 'I've been up all night'. -- Sebastian Dröge Wed, 20 May 2009 23:19:36 +0200 gst-plugins-good0.10 (0.10.14.3-1) experimental; urgency=low * New upstream pre-release: + Fixes regression in AVI seeking (Closes: #528813). + debian/patches/01_rtp-libm-linking.patch: - Dropped, merged upstream. + debian/gstreamer-plugins-good.install, debian/control.in: - Add the flv, deinterlace and y4menc plugins that were moved from gst-plugins-bad. * debian/control.in: + Change section of the debug package to debug and add ${misc:Depends} to it's dependencies. -- Sebastian Dröge Sat, 16 May 2009 11:28:14 +0200 gst-plugins-good0.10 (0.10.14.2-1) experimental; urgency=low * New upstream pre-release: + debian/patches/01_gconf-notifications.patch: - Dropped, merged upstream. + debian/rules, debian/build-deps.in: - Updated build dependencies. + debian/patches/01_rtp-libm-linking.patch: - Link with -lm to fix unresolved symbols. * debian/control.in: + Update Standards-version to 3.8.1, no additional changes needed. -- Sebastian Dröge Tue, 12 May 2009 08:59:05 +0200 gst-plugins-good0.10 (0.10.14-2) unstable; urgency=low * Upload to unstable. -- Sebastian Dröge Fri, 06 Mar 2009 23:41:50 +0100 gst-plugins-good0.10 (0.10.14-1) experimental; urgency=low * New upstream release, 'Disaffected Affectation'. * debian/patches/02_no-Werror.patch, debian/rules: + Pass -Wno-error via C(XX)FLAGS instead of patching configure. * debian/patches/01_gconf-notifications.patch: + Disconnect GConf notifications after usage, patch from upstream GIT. -- Sebastian Dröge Fri, 20 Feb 2009 10:31:38 +0100 gst-plugins-good0.10 (0.10.13.3-1) experimental; urgency=low * debian/build-deps.in: + Build depend on gstreamer0.10-plugins-base 0.10.22 for the new videotestsrc colors to fix the videocrop unit test. * debian/gstreamer-plugins-good.install: + Include the new equalizer presets. * New upstream pre-release. -- Sebastian Dröge Mon, 16 Feb 2009 15:30:35 +0100 gst-plugins-good0.10 (0.10.13.2-1) experimental; urgency=low * New upstream pre-release: + debian/patches/04_equalizer-coefficients.patch, debian/patches/05_soup-live-source.patch, debian/patches/06_libv4l.patch, debian/patches/07_pulse-hang-and-thread-leak.patch, debian/patches/99_autoreconf.patch: - Dropped, merged upstream. + debian/rules, debian/build-deps.in: - Build depend on gstreamer and gst-plugins-base 0.10.22. - Build depend on pulseaudio 0.9.13 to enable some optional features in the pulse plugin. -- Sebastian Dröge Sat, 07 Feb 2009 20:36:03 +0100 gst-plugins-good0.10 (0.10.13-2) experimental; urgency=low * debian/patches/07_pulse-hang-and-thread-leak.patch: + Patches from upstream GIT to fix some deadlocks when the pulseaudio daemon disappears and also fix a memory leak. -- Sebastian Dröge Mon, 26 Jan 2009 15:41:46 +0100 gst-plugins-good0.10 (0.10.13-1) experimental; urgency=low * New upstream security release, 'Blatant Discouragement': + Fix potential buffer overflows while reading quicktime headers. Security issue noticed by Tobias Klein (TKADV2009-0xx). + debian/patches/99_autoreconf.patch: - Updated for the new release. * debian/build-deps.in: + Build depend on libcairo2-dev instead of the virtual package libcairo-dev. * - -- Sebastian Dröge Mon, 26 Jan 2009 15:41:45 +0100 gst-plugins-good0.10 (0.10.11-2) experimental; urgency=low * debian/patches/06_libv4l.patch, debian/patches/99_autoreconf.patch, debian/rules: + Patch from upstream CVS to use libv4l for the v4l2 plugin instead of direct access to the v4l device. This adds support for a lot more v4l2 devices. -- Sebastian Dröge Wed, 05 Nov 2008 12:38:36 +0100 gst-plugins-good0.10 (0.10.11-1) experimental; urgency=low * New upstream release, 'Secondary Consideration'. -- Sebastian Dröge Sat, 25 Oct 2008 09:39:23 +0200 gst-plugins-good0.10 (0.10.10.4-1) experimental; urgency=low [ Loic Minier ] * Set gstreamer0.10-pulseaudio's Section to sound to match overrides. [ Sebastian Dröge ] * New upstream pre-release. * debian/patches/04_equalizer-coefficients.patch: + Patch from upstream bugtracker to not recalculate the equalizer coefficients for every single buffer but only when it's needed. * debian/patches/05_soup-live-source.patch: + Patch from upstream bugtracker to allow souphttpsrc to work as live source and have it provide timestamps. -- Sebastian Dröge Wed, 22 Oct 2008 11:08:03 +0200 gst-plugins-good0.10 (0.10.10.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Sat, 18 Oct 2008 10:23:40 +0200 gst-plugins-good0.10 (0.10.10.2-1) experimental; urgency=low * New upstream pre-release: + debian/rules, debian/build-deps.in: - Build depend on gstreamer and gst-plugins-base >= 0.10.21. + debian/build-deps.in: - Build depend on FLAC >= 1.1.3. - Build depend on bzip2. -- Sebastian Dröge Sat, 11 Oct 2008 15:42:49 +0200 gst-plugins-good0.10 (0.10.10-1) experimental; urgency=low * New upstream release, 'Barely Moving'. -- Sebastian Dröge Thu, 28 Aug 2008 10:29:42 +0200 gst-plugins-good0.10 (0.10.9.2-1) experimental; urgency=low * New upstream pre-release: + debian/build-deps.in, debian/gstreamer-plugins-good.install: - Remove the cdio plugin, it moved to gst-plugins-ugly because libcdio is GPL licensed. * debian/rules: + Build depend on gstreamer >= 0.10.20-3 for the new virtual package names. * debian/control.in: + Wrap control fields. + Depend on gstreamer0.10-plugins-base as some plugins need it. -- Sebastian Dröge Fri, 15 Aug 2008 09:28:10 +0200 gst-plugins-good0.10 (0.10.9-2) experimental; urgency=low * debian/control.in, debian/rules: + Use new automatic codec installation infrastructure. -- Sebastian Dröge Sat, 09 Aug 2008 16:56:46 +0200 gst-plugins-good0.10 (0.10.9-1) experimental; urgency=low * New upstream release, 'Steam Train Rolling'. -- Sebastian Dröge Fri, 01 Aug 2008 11:32:53 +0200 gst-plugins-good0.10 (0.10.8.4-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Tue, 29 Jul 2008 12:01:45 +0200 gst-plugins-good0.10 (0.10.8.3-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Sat, 26 Jul 2008 12:34:57 +0200 gst-plugins-good0.10 (0.10.8.2-1) experimental; urgency=low * New upstream pre-release: + debian/patches/10_speex_caps.patch, debian/patches/11_rtsp_fdleak.patch, debian/patches/12_matroskamux_track_duration.patch, debian/patches/13_equalizer.patch: - Dropped, merged upstream. + debian/build-deps.in, debian/control.in, debian/gstreamer-pulseaudio.install, debian/rules: - Add the pulseaudio plugin. + debian/gstreamer-plugins-good.install, debian/control.in: - Add the interleave and replaygain plugins. + debian/build-deps.in, debian/rules: - Update gstreamer, gst-plugins-base and libcdio build dependencies. * debian/control.in: + Depend on gstreamer0.10-audiosink instead of a specific audiosink plugin (Closes: #482796). * debian/patches/03_pulse-rank.patch: + Update the rank of the pulse elements to PRIMARY+10. * debian/control.in: + Update Standards-version to 3.8.0, no additional changes needed. -- Sebastian Dröge Sun, 20 Jul 2008 11:59:00 +0200 gst-plugins-good0.10 (0.10.8-4) unstable; urgency=low * debian/patches/13_equalizer.patch: + Fix clipping in integer mode, correctly implement passthrough mode if all bands have a gain of 0dB and delay filter coefficient calculation until they're really needed. Patch from upstream CVS. -- Sebastian Dröge Mon, 02 Jun 2008 13:44:41 +0200 gst-plugins-good0.10 (0.10.8-3) unstable; urgency=low * debian/patches/11_rtsp_fdleak.patch - Added. Fix filedescriptor leak on errors. (From upstream CVS) * debian/patches/12_matroskamux_track_duration.patch - Added. Fix track time calculation when muxing matroska files (From upstream CVS) -- Sjoerd Simons Sun, 01 Jun 2008 16:15:48 +0200 gst-plugins-good0.10 (0.10.8-2) unstable; urgency=low * debian/patches/10_speex_caps.patch - Added. Fix speexenc and rtpspeexpay caps negotiation (From gnome bugzilla #465146) -- Sjoerd Simons Fri, 25 Apr 2008 21:51:20 +0200 gst-plugins-good0.10 (0.10.8-1) unstable; urgency=low * New upstream bugfix release, 'One For The Money'. -- Sebastian Dröge Thu, 24 Apr 2008 07:41:30 +0200 gst-plugins-good0.10 (0.10.7.4-1) experimental; urgency=low * New upstream pre-release. -- Sebastian Dröge Tue, 22 Apr 2008 10:28:29 +0200 gst-plugins-good0.10 (0.10.7.3-1) experimental; urgency=low * New upstream pre-release: + debian/patches/01_goom-missing-header.patch: - Dropped, merged upstream. + debian/build-deps.in: - flex and bison are not necessary anymore. -- Sebastian Dröge Fri, 18 Apr 2008 10:35:19 +0200 gst-plugins-good0.10 (0.10.7.2-2) experimental; urgency=low * debian/patches/02_no-Werror.patch: + Don't build with -Werror to fix FTBFS on some architectures. -- Sebastian Dröge Tue, 15 Apr 2008 05:29:28 +0200 gst-plugins-good0.10 (0.10.7.2-1) experimental; urgency=low * New upstream pre-release: + debian/control.in: - Adjust conflicts for gst-plugins-bad because of moved plugins. + debian/rules, debian/build-deps.in: - Update build dependencies. + debian/gstreamer-plugins-good.install: - Ship soup and goom2k1 plugins. + debian/rules: - Set default audio/video sinks/srcs depending on the platform. + debian/patches/02_v4l2_default.patch, debian/patches/05_speexenc_double_unref.patch, debian/patches/75_build_docs_without_python_xml.patch, debian/patches/80_unit-tests.patch: - Dropped, merged upstream. + debian/patches/01_goom-missing-header.patch: - Add missing header file that was forgotten. -- Sebastian Dröge Mon, 14 Apr 2008 10:59:00 +0200 gst-plugins-good0.10 (0.10.7-3) unstable; urgency=low * debian/patches/05_speexenc_double_unref.patch: + Added. Don't unref a buffer twice when hitting a not-negotiated error in speexenc (from upstream CVS) (Closes: #472096) -- Sjoerd Simons Sat, 22 Mar 2008 02:35:15 +0100 gst-plugins-good0.10 (0.10.7-2) unstable; urgency=low * debian/patches/02_v4l2_default.patch: + Patch by Mario Limonciello to use v4l2 as default video source instead of the nowadays deprecated v4l (Closes: #468073). * debian/patches/75_build_docs_without_python_xml.patch, debian/build-deps.in: Stop using pyxml for building the docs (Closes: #468630). -- Sebastian Dröge Tue, 11 Mar 2008 05:14:10 +0100 gst-plugins-good0.10 (0.10.7-1) unstable; urgency=low * New upstream release, "Red Door Black": + debian/patches/01_linking-fixes.patch: - Dropped, merged upstream. -- Sebastian Dröge Thu, 21 Feb 2008 10:48:23 +0100 gst-plugins-good0.10 (0.10.6.4-1) experimental; urgency=low * New upstream pre-release. * debian/patches/99_ltmain_as-needed.patch, debian/rules: + Add -Wl,-z,defs -Wl,-O1 -Wl,--as-needed to LDFLAGS to remove some unnecessary dependencies on various packages. * debian/patches/01_linking-fixes.patch: + Link gstalpha with libgstbase. * debian/build-deps.in: + Build depend on libxv-dev to get Xv support in ximagsink. -- Sebastian Dröge Tue, 19 Feb 2008 06:54:55 +0100 gst-plugins-good0.10 (0.10.6.3-1) experimental; urgency=low * New upstream pre-release. * debian/build-deps.in: + Build depend on gstreamer0.10-plugins-base for the unit tests. * debian/patches/80_unit-tests.patch: + Disable gconfaudiosrc for the generic/states unit test. -- Sebastian Dröge Thu, 14 Feb 2008 13:14:55 +0100 gst-plugins-good0.10 (0.10.6.2-1) experimental; urgency=low [ Loic Minier ] * Bump up type-handling build-dep to >= 0.2.14 and call it with two arguments again. [ Emilio Pozuelo Monfort ] * debian/rules: - Decide the package name and url depending on the distribution. * debian/build-deps.in: - Build-Depend on lsb-release. [ Sebastian Dröge ] * New upstream pre-release: + Fixes FTBFS if built twice in a row (Closes: #424398). + Fixes playback of realaudio streams (Closes: #430364). + Fixes switching of sink after song changes (Closes: #444769). + debian/gstreamer-plugins-good.install: - Add new equalizer, spectrum and multifile plugins and sort alphabetically. + debian/build-deps.in, debian/rules: - Update liboil and gstreamer build dependencies. + debian/patches/20_gconf-state-change.patch, debian/patches/30_id3_gst_tag_defines.patch: - Dropped, merged upstream. + debian/control.in: - Update Replaces on gst-plugins-bad for the plugin moves. - Update Standards-Version to 3.7.3, no additional changes needed. * debian/rules: + Run the unit test suite but don't fail the build on failures. -- Sebastian Dröge Sat, 09 Feb 2008 12:11:21 +0100 gst-plugins-good0.10 (0.10.6-4) unstable; urgency=low * debian/patches/30_id3_gst_tag_defines.patch: + Added. Use GST_TAG_ARTIST_SORTNAME instead of the deprecated GST_TAG_MUSICBRAINZ_SORTNAME (Closes: #452671) + Also add support for GST_TAG_ALBUM_SORTNAME, GST_TAG_TITLE_SORTNAME and GST_TAG_COMPOSER + Based on the current CVS version of gstid3v2mux -- Sjoerd Simons Sat, 24 Nov 2007 22:07:19 +0100 gst-plugins-good0.10 (0.10.6-3) unstable; urgency=low * debian/rules: + Set GST_REGISTRY before the dh_gstscancodecs call to save the registry somewhere on buildds without writable home and speed things up a bit. * debian/build-deps.in: + Remove check from build dependencies. This is only an indirect build dependency that is already satisfied by libgstreamer0.10-dev. configure only checks for libgstcheck, not check. * debian/patches/20_gconf-state-change.patch: + Fix errors while changing the state of the gconf sink. Patch from upstream CVS, see http://bugzilla.gnome.org/show_bug.cgi?id=471364 . -- Sebastian Dröge Tue, 25 Sep 2007 15:31:31 +0200 gst-plugins-good0.10 (0.10.6-2) unstable; urgency=low * debian/control.in: + Add Replaces on gstreamer0.10-plugins-really-bad (<< 0.10.4.2), which is maintained in the Debian Multimedia project and also contained the WavPack plugin. * debian/build-deps.in, debian/rules: + Call dh_gstinstallcodecs to generate the codecs database. * debian/gstreamer-plugins-good.install, debian/gstreamer-plugins-good-doc.install, debian/control.in: + Move translations from the docs package to the plugin package. -- Sebastian Dröge Fri, 31 Aug 2007 09:27:06 +0200 gst-plugins-good0.10 (0.10.6-1) unstable; urgency=low * New upstream release, "Wobble Board": + Fixes muxing of raw audio in Matroska files (Closes: #360536). + Fixes memory leak in cutter and level plugins (Closes: #425114). + debian/patches/20_gstavidemux-error-out-on-pull_range.patch, debian/patches/30_speex-rtp-fixes.patch, debian/patches/40_flac1.1.3.patch, debian/patches/99_autoreconf.patch: - Dropped, merged upstream. + debian/build-deps.in, debian/rules: - Require gstreamer and gst-plugins-base >= 0.10.13. + debian/gstreamer-plugins-good.install, debian/build-deps.in, debian/control.in: - Add wavpack, qtdemux, videocrop, monoscope and gamma plugins. For this add Replaces on gstreamer0.10-plugins-bad (<< 0.10.4.2). -- Sebastian Dröge Tue, 19 Jun 2007 19:28:52 +0200 gst-plugins-good0.10 (0.10.5-7) unstable; urgency=low * debian/control.in: + Use ${binary:Version} instead of ${Source-Version} to make lintian happy. * debian/patches/40_flac1.1.3.patch: + Patch from upstream CVS to work with flac >= 1.1.3. (Closes: #427744, #426647). http://bugzilla.gnome.org/show_bug.cgi?id=385887 * debian/patches/99_autoreconf.patch: + Regenerate configure for the above change. -- Sebastian Dröge Sun, 10 Jun 2007 22:58:34 +0200 gst-plugins-good0.10 (0.10.5-6) unstable; urgency=low * debian/patches/30_speex-rtp-fixes.patch + Added. Fix the speex rtp payloader and depayloader. (From upstream CVS) -- Sjoerd Simons Thu, 10 May 2007 13:27:36 +0200 gst-plugins-good0.10 (0.10.5-5) unstable; urgency=low * Upload to unstable * Merge experimental branch: [ Loic Minier ] + Build-depend on libpng12-dev instead of libpng12-0-dev to get the libpng12.pc file. [ Sebastian Dröge ] + New upstream release 0.10.5, "The Path of Thorns": - Fixes playback of some internet radio streams (Closes: #384377) - debian/patches/12_gstcacasink-header-include.patch, debian/patches/13_separate-handle-for-avc-ops.patch: . Dropped, merged upstream - debian/rules, - debian/build-deps.in: . Build depend on gstreamer / gst-plugins-base >= 0.10.10.1 - debian/gstreamer-plugins-good.install: . Add audiofx plugin + debian/patches/11_esdsink-priority.patch: - Dropped, priorities are cached in the gst registry, thus this patch had almost no effect. This should somehow be solved by a determined priority order for sinks + debian/control: - Updated to use my debian.org mail address + debian/control, debian/gstreamer-plugins-good.install: - Only build the video4linux2 plugin on Linux. Fixes FTBFS everywhere else + debian/build-deps.in, debian/rules: - Use type-handling to only depend on libraw1394 and friends on Linux [ Sjoerd Simons ] + Enable experimental plugins (the v4l2src plugin) + Conflict with gstreamer0.10-plugins-bad < 0.10.4 which used to provide the v4l2src plugin. + Add myself to uploaders * debian/patches/20_gstavidemux-error-out-on-pull_range.patch: + Updated for the new upstream version -- Sebastian Dröge Tue, 10 Apr 2007 20:34:53 +0200 gst-plugins-good0.10 (0.10.4-3) unstable; urgency=high * New patch, 13_separate-handle-for-avc-ops, to use a separate handle on raw1394 for AVC operations. * Urgency high as the dv plugin is unusable without this patch. * Merge 0.10.4-2. -- Loic Minier Wed, 25 Oct 2006 16:07:07 +0200 gst-plugins-good0.10 (0.10.4-2) experimental; urgency=low * Re-add -dbg package and target at experimental. -- Loic Minier Fri, 13 Oct 2006 12:27:45 +0200 gst-plugins-good0.10 (0.10.4-1) unstable; urgency=low [ Loic Minier ] * New patch, 11_esdsink-priority, taken from Ubuntu to include esdsink in the candidates of autoaudiosink. (Closes: #373703) [ Sebastian Dröge ] * New upstream release, "Dear Leader". - Fixes reading and parsing of some id3v2 tags. (Closes: #361310) - Tries esdsink but does not autospawn esound. (Closes: #361841) - Fixes crash of dv1394src by using a separate handle for AVC operations. (Closes: #369936) - debian/patches/10_fix-h263-caps.patch: + dropped, merged upstream - debian/patches/11_esdsink-priority.patch: + Updated, partially upstream - debian/rules: + Require libraw1394-dev (>= 1.2.1) and libiec61883-dev (>= 1.0.0) * debian/control.in: + Added myself to Uploaders * debian/gstreamer-plugins-good.install: + Remove the duplicated entries for the dv1394 element * debian/compat, debian/build-deps.in: + Update to debhelper compat level 5 * debian/rules, debian/control.in: + Add a -dbg package [ Loic Minier ] * Rename patch 11_gstcacasink-header-include to 12_gstcacasink-header-include. * Drop -dbg package for now, this version is for etch. -- Loic Minier Fri, 13 Oct 2006 12:13:08 +0200 gst-plugins-good0.10 (0.10.3-3) unstable; urgency=medium * New patch, 11_gstcacasink-header-include, to fix building of the libcaca plugin; thanks Sam Hocevar. (Closes: #386169) -- Loic Minier Sat, 9 Sep 2006 20:32:43 +0200 gst-plugins-good0.10 (0.10.3-2) unstable; urgency=low * Bump up Standards-Version to 3.7.2. [debian/control, debian/control.in] * New patch from upstream to fix caps of H263 RTP streams, thanks Paul van Tilburg. [debian/patches/10_fix-h263-caps.patch] * Export OIL_CPU_FLAGS=0 for commands launched during the build process as it can cause build failures on buildds with specific hardware at build time. [debian/rules] -- Loic Minier Wed, 17 May 2006 23:05:56 +0200 gst-plugins-good0.10 (0.10.3-1) unstable; urgency=low * New upstream release, "Desplazado". - Bump libgstreamer0.10-dev build-dep to 0.10.4.1. [debian/control, debian/rules] - Bump libgstreamer-plugins-base0.10-dev build-dep to 0.10.5.1. [debian/build-deps.in, debian/build-deps, debian/control] - New ximagesrc plugin. . Add libxdamage-dev, libxext-dev, and libxfixes-dev build-deps. [debian/build-deps.in, debian/build-deps, debian/control] . Install in gstreamer-plugins-good. [debian/gstreamer-plugins-good.install] - New annodex plugin. . Add libxml2-dev build-dep. [debian/build-deps.in, debian/build-deps, debian/control] . Install in gstreamer-plugins-good. [debian/gstreamer-plugins-good.install] - New gdkpixbuf plugin. . Add libgtk2.0-dev build-dep. [debian/build-deps.in, debian/build-deps, debian/control] . Install in gstreamer-plugins-good. [debian/gstreamer-plugins-good.install] - New halelements plugin. . Add libdbus-1-dev (>= 0.32) and libhal-dev (>= 0.5.6) build-deps. [debian/build-deps.in, debian/build-deps, debian/control] . Install in gstreamer-plugins-good. [debian/gstreamer-plugins-good.install] - New taglib plugin. . Add libtag1-dev build-dep. [debian/build-deps.in, debian/build-deps, debian/control] . Install in gstreamer-plugins-good. [debian/gstreamer-plugins-good.install] - New videobalance plugin, installed in gstreamer-plugins-good. [debian/gstreamer-plugins-good.install] - New icydemux plugin. . Install in gstreamer-plugins-good. [debian/gstreamer-plugins-good.install] -- Loic Minier Sat, 6 May 2006 11:52:57 +0200 gst-plugins-good0.10 (0.10.2-2) unstable; urgency=low * Depend on the alsa package instead of recommending it, since package managers don't honor Recommends: in all cases. (Closes: #352212) [debian/control, debian/control.in] -- Loic Minier Thu, 16 Feb 2006 14:45:38 +0100 gst-plugins-good0.10 (0.10.2-1) unstable; urgency=low * New upstream release, "Papa was a rolling stone". -- Loic Minier Tue, 14 Feb 2006 10:44:13 +0100 gst-plugins-good0.10 (0.10.1.2-1) unstable; urgency=low * New upstream pre-release. - Bump up libgstreamer0.10-dev build-dep to >= 0.10.2.2. [debian/control, debian/rules] - Bump up libgstreamer-plugins-base0.10-dev to >= 0.10.2.2. [debian/build-deps.in, debian/build-deps, debian/control] - Add apetag plugin. . Install plugin. [debian/gstreamer-plugins-good.install] - Add cdio plugin. . Add libcdio-dev >= 0.71 build-dep. . Install plugin. [debian/build-deps, debian/build-deps.in, debian/control, debian/gstreamer-plugins-good.install] * Use upstream descriptions in packages descriptions. [debian/control, debian/control.in] -- Loic Minier Sat, 11 Feb 2006 17:30:38 +0100 gst-plugins-good0.10 (0.10.1-2) unstable; urgency=low * Recommend gstreamer0.10-alsa and gstreamer0.10-x, as these are used by default upstream -- in the GConf schemas -- and used from the autodetect audio and videosinks. [debian/control, debian/control.in] -- Loic Minier Sun, 5 Feb 2006 15:08:53 +0100 gst-plugins-good0.10 (0.10.1-1) unstable; urgency=low * New upstream release, "Li". - Bump libgstreamer-plugins-base0.10-dev build-dep to >= 0.10.1. [debian/build-deps.in, debian/control] - Bump libgstreamer0.10-dev build-dep to >= 0.10.1. [debian/control, debian/rules] - Add id3demux plugin. [debian/gstreamer-plugins-good.install] - Add translated strings from /usr/share/locale. [debian/gstreamer-plugins-good.install] * Drop useless gst_plugins_base_lib_dev_dep, gst_plugins_base_lib_dev, gst_plugins_base_lib, and gst_plugins_good_version definitions. [debian/rules] -- Loic Minier Sun, 15 Jan 2006 18:04:49 +0100 gst-plugins-good0.10 (0.10.0-1) unstable; urgency=low [ Sebastien Bacher ] * New package: - clean patches [debian/patches/50_cdparanoia-fix-eos-detection-of-last-title.patch] - updated Build-Depends [debian/build-deps.in] - updated documentation [debian/README.Debian, debian/TODO.Debian] - updated packages list [debian/control.in, debian/gstreamer-alsa.install, debian/gstreamer-gnomevfs.install, debian/gstreamer-misc.install, debian/gstreamer-plugins-base-apps.instal, debian/gstreamer-plugins-base-apps.manpages, debian/gstreamer-plugins-base-doc.install, debian/gstreamer-x.install, debian/libgstreamer-plugins-base-dev.install, debian/libgstreamer-plugins-base.install, debian/gstreamer-aa.install, debian/gstreamer-auto.install, debian/gstreamer-caca.install, debian/gstreamer-esd.install, debian/gstreamer-misc-good.install, debian/gstreamer-oss.install, debian/gstreamer-plugins-good-doc.install, debian/rules] - updated upstream location [debian/watch] - don't use type-handling it's not useful [debian/build-deps.in, debian/control.in, debian/rules] [ Loic Minier ] * Merge aa, auto, caca, and oss packages and plugins in misc and let it provide audio and videosinks; use a couple of @GST_ABI@s where appropriate. [debian/control, debian/control.in, debian/gstreamer-aa.install, debian/gstreamer-caca.install, debian/gstreamer-misc-good.install, debian/gstreamer-oss.install, debian/rules] * Rename for good misc-good in good. [debian/control debian/control.in debian/gstreamer-misc-good.install debian/rules] * Downgrade cdbs build-dep for Debian. [debian/build-deps, debian/build-deps.in, debian/control] * Rename gstreamer0.10-good in gstreamer0.10-plugins-good. [debian/control, debian/control.in, debian/gstreamer-good.install, debian/gstreamer-plugins-good.install, debian/rules] * Add a build-dep on check. [debian/build-deps, debian/build-deps.in, debian/control] * Remove python-twisted build-dep. [debian/build-deps, debian/build-deps.in, debian/control] -- Loic Minier Wed, 21 Dec 2005 17:37:46 +0100 gst-plugins-base0.10 (0.10.0-1) unstable; urgency=low [ Sebastien Bacher ] * New package: - build the documentation [debian/rules] - no action needed to register the plugins with the new version [debian/gstreamer-plugin-template.postinst, debian/gstreamer-plugin-template.postrm, debian/libgstreamer-plugins.postinst, debian/libgstreamer-plugins.postrm, debian/rules] - drop mechanism to build extra packages for other distributions around, it's not useful for base [debian/extras, debian/rules] - drop transitionnal workaround [debian/gstreamer-plugin-template.preinst] - new gstreamer-plugin-base-doc package [debian/control.in, debian/rules] - remove obsolete patches [debian/patches/10_wavpack-high-quality-segfault.patch, debian/patches/30_alsa-verify-accepted-period-size.patch, debian/patches/31_alsa-advanced-probing.patch, debian/patches/40_audioscale-timestamps-and-durations.patch, debian/patches/50_ladspa-quiet.patch] - updated the Build-Depends [debian/build-dep.in] - updated the packages descriptions [debian/control.in] - updated the packages names/list [debian/control.in, debian/gstreamer-a52dec.install, debian/gstreamer-aa.install, debian/gstreamer-artsd.install, debian/gstreamer-audiofile.install, debian/gstreamer-avifile.install, debian/gstreamer-caca.install, debian/gstreamer-cdio.install, debian/gstreamer-dvd.install, debian/gstreamer-dv.install, debian/gstreamer-esd.install, debian/gstreamer-festival.install, debian/gstreamer-flac.install, debian/gstreamer-gsm.install, debian/gstreamer-gtk.install, debian/gstreamer-hermes.install, debian/gstreamer-jpeg.install, debian/gstreamer-lame.install, debian/gstreamer-mad.install, debian/gstreamer-mikmod.install, debian/gstreamer-mms.install, debian/gstreamer-mpeg2dec.install, debian/gstreamer-oss.install, debian/gstreamer-sdl.install, debian/gstreamer-sid.install, debian/gstreamer-speex.install, debian/gstreamer-swfdec.install, debian/libgstreamer-gconf.install, debian/libgstreamer-gconf-dev.install, debian/gstreamer-vorbis.install, debian/rules] - updated the packages lists [debian/gstreamer-misc.install, debian/libgstreamer-plugins-base-dev.install, debian/libgstreamer-plugins-base.install] - updated packages content [debian/gstreamer-misc.install, debian/gstreamer-x.install] - updated the version [debian/rules] - updated watch file [debian/watch] [ Loic Minier ] * Minor cleanups. [debian/rules] * Add Sebastien Bacher to Uploaders. [debian/control, debian/control.in] -- Loic Minier Sat, 17 Dec 2005 18:11:03 +0100 gst-plugins0.8 (0.8.11-3) unstable; urgency=medium * New CDIO plugin package. . Add libcdio-dev build-dep for CDIO support. [debian/build-deps.in, debian/build-deps, debian/control] . Add package description and file listing. [debian/gstreamer-cdio.install, debian/control.in, debian/control] . List package in plugins build-list. [debian/rules] . List package in gstreamer-plugins deps. [debian/control.in, debian/control] * New MMS plugin package. (Closes: #301246) . Add libmms-dev build-dep for mms:// and mmsh:// support. [debian/build-deps.in, debian/build-deps, debian/control] . Add package description and file listing. [debian/gstreamer-cdio.install, debian/control.in, debian/control] . List package in plugins build-list. [debian/rules] . List package in gstreamer-plugins deps. [debian/control.in, debian/control] * Fix the homepage of the mikmod page and stop linking to an adult web site. [debian/control, debian/control.in] * Remove "Section: libs" from binary packages. [debian/control, debian/control.in] * Exit with non-zero code when requesting an unknown plugin. [debian/extra] * Add sample code to permit other distros to build additional plugins. [debian/rules] * Minor cleanups. [debian/rules] * New Gtk / Gdk package to split out this dep-tree for KDE folks, from Ubuntu, thanks Sebastien Bacher. . Add package description and file listing, remove it from -misc. [debian/control.in, debian/control, debian/gstreamer-gtk.install, debian/gstreamer-misc.install] . List package in plugins build-list. [debian/rules] . List package in gstreamer-plugins deps. [debian/control.in, debian/control] . Only "Replace" with -misc in the first version doing the split (0.8.11-0ubuntu3), no Conflict needed. * Add wavpack support, build the wavpack plugin and ship it in -misc. (Closes: #339598) . Add a libwavpack-dev build-dep. [debian/build-deps, debian/build-deps.in] . Ship plugin in -misc. [debian/gstreamer-misc.install] . Adjust the size of the internal decode buffer dynamically instead of assuming 0.5 seconds are enough; fixes a segfault when playing files encoded with -h; upstream bug: #317774; fix committed in branch BRANCH-GSTREAMER-0_8. [debian/patches/10_wavpack-high-quality-segfault.patch] * Backport some interesting upstream fixes from CVS fixing most resampling issues for non-standard bitrates and for complex ALSA configurations (especially dmix), thanks Tim-Philipp Müller, Luca Ognibene, and others. (Closes: #323447, #324163, #326135, #340038) - When doing _set_period_size_near(), see what period size was actually set in the end and continue working with that value instead of just assuming the desired period size was accepted; upstream bug #318767; fix committed in branch BRANCH-GSTREAMER-0_8. [debian/patches/30_alsa-verify-accepted-period-size.patch] - Don't mess up timestamps and durations when resampling by more than a factor of 2 (e.g. 8kHz => 48kHz); upstream bug #318273; fix committed in branch BRANCH-GSTREAMER-0_8. [debian/patches/40_audioscale-timestamps-and-durations.patch] - When the default device is being used, try to probe the caps of the underlying device instead if possible. This should give more narrowly defined caps that are closer to the hardware's capabilities. This is enabled by default, but can be switched off via the new 'advanced-probing' property; upstream bug #315121; fix committed in branch BRANCH-GSTREAMER-0_8. [debian/patches/31_alsa-advanced-probing.patch] * Drop the polypaudio plugin package. (Closes: #342278) . Drop libpolyp-dev (>= 0.7) build-dep. [debian/build-deps.in, debian/build-deps, debian/control] . Remove package description and file listing. [debian/gstreamer-polypaudio.install, debian/control.in, debian/control] . Remove package from plugins build-list. [debian/rules] . Remove package from gstreamer-plugins deps. [debian/control.in, debian/control] * Add libgconf2-dev, libglib2.0-dev, liborbit2-dev, libpopt-dev, libxml2-dev deps to libgstreamer-gconf0.8-dev as listed in its .la files. [debian/control, debian/control.in] * Add libglib2.0-dev, libpopt-dev, libxml2-dev deps to libgstreamer-plugins0.8-dev as listed in its .la files. [debian/control, debian/control.in] * Fix EOS detection for last title (fixes gnome-cd hanging after last track ends), thanks Gustavo Noronha Silva; upstream bug #317630; fix committed in branch BRANCH-GSTREAMER-0_8. (Closes: #330954) [debian/patches/50_cdparanoia-fix-eos-detection-of-last-title.patch] * Don't overwrite DEB_CONFIGURE_EXTRA_FLAGS. [debian/rules] -- Loic Minier Sun, 11 Dec 2005 14:52:38 +0100 gst-plugins0.8 (0.8.11-2) unstable; urgency=high * Add misc:depends to all binary packages. (Closes: #329759) -- Loic Minier Mon, 17 Oct 2005 21:41:54 +0200 gst-plugins0.8 (0.8.11-1) unstable; urgency=low * Override gstreamer-dv section to extra because it depends on libavc1394-0 which is in extra. [debian/control, debian/control.in] * Bump libflac-dev build-dependency for the latest flac soname change (libflac6 -> libflac7). (Closes: #325940) * New upstream release, "... And Thanks For All The Fix". - New plugin imagemixer. [debian/gstreamer-misc.install] - New plugin dvdsubdec. [debian/gstreamer-misc.install] - Drop obsolete artsd patch, merged upstream. [debian/patches/25_artds-no-name.patch] * Update FSF address. [debian/copyright] * Add cairo plugin. [debian/build-deps, debian/build-deps.in, debian/control, debian/gstreamer-misc.install] -- Loic Minier Sun, 4 Sep 2005 21:19:47 +0200 gst-plugins0.8 (0.8.10-3) unstable; urgency=high * Urgency high because this fixes some RC bugs and 0.8.10-2 was caught in the C++ transition. * Bump up build-deps to get versions past the C++ transition. [debian/build-deps, debian/build-deps.in, debian/control] - libsdl1.2-dev - libsidplay1-dev (Closes: #321315) - libarts1-dev, libartsc0-dev * Change X11 build-deps for the Xorg transition. [debian/build-deps, debian/build-deps.in, debian/control] - remove xlibs-dev and xlibs-pic. - add libx11-dev, libxext-dev, and libxv-dev. * Drop jack plugin. [debian/build-deps, debian/build-deps.in, debian/control, debian/control.in, debian/gstreamer-jack.install, debian/rules] (Closes: #321648) * Add libgstglimagesink plugin. [debian/gstreamer-x.install] * Add libgstfreeze plugin. (Closes: #318146) [debian/gstreamer-misc.install] * Let libgstreamer-gconf suggest gnome-media. (Closes: #294490) [debian/control, debian/control.in] -- Loic Minier Fri, 12 Aug 2005 18:36:58 +0200 gst-plugins0.8 (0.8.10-2) unstable; urgency=medium [ Sebastien Bacher ] * debian/build-deps.in: - list libpolyp-dev. * debian/control.in: - gstreamer0.8-plugins depends on gstreamer0.8-polypaudio. - gstreamer0.8-polypaudio description. * gstreamer-polypaudio.install: - install libpolypaudio.so. * debian/rules: - list polypaudio. [ Loic Minier ] * Update jack dependency. (Closes: #317197) [debian/build-deps, debian/build-deps.in, debian/control] * Update aalib dependency. (Closes: #320886) [debian/build-deps, debian/build-deps.in, debian/control] * Urgency medium because of RC. -- Loic Minier Sun, 10 Jul 2005 19:27:08 +0200 gst-plugins0.8 (0.8.10-1) unstable; urgency=low * Loic Minier: * New upstream release "Jangle". - Bump inter-dependencies to >= 0.8.10. * Use upstream fix for the "name" property of the artsdsink element. [debian/patches/25_artds-no-name.patch] -- Loic Minier Sat, 2 Jul 2005 21:04:40 +0200 gst-plugins0.8 (0.8.9-2) unstable; urgency=medium * Loic Minier: * Urgency medium as last gstreamer0.8 release exposed an artsdsink problem fixed here. * Add a versioned dependency with >= current-upstream-version to all current shlibs inter-dependencies to ensure consistency of symbols. (Closes: #315556) [debian/control, debian/control.in, debian/rules] * Remove the "name" property in the artsd plugin as it interferes with the usage of this property within GStreamer. (Closes: #314762) [debian/patches/25_artds-no-name.patch] * Call gst-register and gst-compprep with GST_REGISTRY in their environment to override the default behavior of writing to /root/.gstreamer-0.8, waiting for an upstream fix. [debian/gstreamer-plugin-template.postinst, debian/gstreamer-plugin-template.postrm] * Add a postinst/postrm snipset to register plugins in libgstreamer-plugins0.8. (Closes: #283658) [debian/libgstreamer-plugins.postrm, debian/libgstreamer-plugins.postinst, debian/changelog, debian/rules] * Remove left over /root/.gstreamer-0.8 tree if it hasn't been modified. [debian/gstreamer-plugin-template.preinst, debian/rules] * Set Maintainer to group. [debian/control, debian/control.in] * Bump Standards-Version to 3.6.2, no change needed. [debian/control, debian/control.in] * Workaround type-handling bug #315761. [debian/control, debian/control.in, debian/rules] -- Loic Minier Mon, 27 Jun 2005 15:44:35 +0200 gst-plugins0.8 (0.8.9-1) unstable; urgency=low * Loic Minier: * New upstream release "Old Hat". - Fix SIGFPE in alsasrc. (Closes: #279399) - New Musepack plugin package. . Add libmpcdec-dev build-dep for Musepack support, this is now detected in a Debian compatible manner via mpcdec/mpcdec.h and -lmpcdec. [debian/build-deps.in, debian/build-deps, debian/control] . Add package description and file listing. [debian/gstreamer-musepack.install, debian/control.in, debian/control] . List package in plugins build-list. [debian/rules] . List package in gstreamer-plugins deps. [debian/control.in, debian/control] - Renamed and updated "ladspa" patch. [debian/patches/ladspa-quiet.patch, debian/patches/50_ladspa-quiet.patch] - Add video4linuxradio plugin to the gstreamer-misc package. [debian/rules] * Add compatibility block for older dpkg and use DEB_HOST_ARCH_OS. * Add myself as uploader. [debian/control.in, debian/control] * Fix indentation and executable permission of package maintaining helpers. [debian/extra, debian/maint, debian/mk.control] * Remove more bits from the arts plugin, left over in 0.8.1-2. [debian/extra, debian/gstreamer-arts.install] * Document the role of most files. [debian/HACKING.Debian] * Add a TODO list for the Debian package. [debian/TODO.Debian] -- Loic Minier Tue, 21 Jun 2005 07:47:04 +0200 gst-plugins0.8 (0.8.8-3) unstable; urgency=low * debian/build-deps.in: * Bump liboil dependency to liboil0.3-dev. gst-plugins doesn't yet use 0.3 itself but the swfdec plugin build requires it. -- David I. Lehn Wed, 30 Mar 2005 19:08:07 -0500 gst-plugins0.8 (0.8.8-2) unstable; urgency=low * debian/control.in: * gstreamer0.8-vorbis depends on gstreamer0.8-misc >= 0.8.8-1 (Closes: #300082, #299954, #299921) -- David I. Lehn Thu, 17 Mar 2005 12:53:38 -0500 gst-plugins0.8 (0.8.8-1) unstable; urgency=low * New upstream * debian/patches/flac.patch: * Remove: included upstream * debian/gstreamer-misc.install: * Add new plugins: autodetect, dvdlpcmdec, puzzle, rfbsrc, subparse * Add new plugins with lib dependencies: gconfelements, mng, shout2 (Closes: #292011) * debian/build-deps.in: * Add: libmng-dev, libshout3-dev * Upstream fixes: * Xv falls back to X11 (Closes: #296848) * Better audio sink selection (Closes: #284210) * alsasink crash (Closes: #296751) -- David I. Lehn Wed, 16 Mar 2005 01:00:39 -0500 gst-plugins0.8 (0.8.7-3) unstable; urgency=low * debian/rules, debian/build-deps.in * Apply additional kfreebsd-gnu patch (Closes: #272568) * debian/patches/flac.patch: * Upstream fix for FLAC API change (Closes: #290784) -- David I. Lehn Mon, 17 Jan 2005 17:53:42 -0500 gst-plugins0.8 (0.8.7-2) unstable; urgency=low * debian/rules: * Bump libgstreamer0.8-dev dependency to >= 0.8.7.1 -- David I. Lehn Sat, 8 Jan 2005 15:50:45 -0500 gst-plugins0.8 (0.8.7-1) unstable; urgency=low * New upstream * debian/build-deps.in, debian/control.in, debian/rules, debian/gstreamer-dv.install, debian/gstreamer-misc.install: * Patch build system for kfreebsd-gnu (Closes: #272568) * debian/rules: * Distribute NEWS (as requested in #275717) * debian/gstreamer-misc.install: * Add new plugins: apetag, tta * debian/patches/configure-speex.patch: * Remove patch, included upstream * debian/build-deps.in: * Build against latest libflac-dev -- David I. Lehn Fri, 7 Jan 2005 13:52:27 -0500 gst-plugins0.8 (0.8.6-1) unstable; urgency=low * New upstream * Rhythmbox hangs/crashes fixes (Closes: #245757, #277146) * Rhythmbox silence after resume play fixes (Closes: #261841) * Ogg seeking fixes (Closes: #277396) * debian/build-deps.in: * Bump libswfdec to libswfdec0.3-dev * Add libavc1394-dev * Add liboil0.2-dev * Versioned libspeex-dev * debian/gstreamer-misc.install: * Add new plugin: equalizer * debian/watch: * Add watch file * debian/rules: * Update GStreamer core dev dependency to 0.8.4 * ext/ladspa/gstladspa.c, debian/patches/ladspa-quiet.patch: * Move patch to debian/patches/ -- David I. Lehn Mon, 29 Nov 2004 04:02:43 -0500 gst-plugins0.8 (0.8.5-1) unstable; urgency=low * New upstream * debian/rules: * Use CDBS simple-patchsys * debian/control: to debian/control:: for newer CDBS * debian/patches/configure-speex.diff: * Fix speex detection -- David I. Lehn Wed, 6 Oct 2004 20:15:52 -0400 gst-plugins0.8 (0.8.4-1) unstable; urgency=low * New upstream * debian/control.in: * Add -theora package to -plugins package * debian/rules: * Drop upstream ChangeLog from plugin packages due to size * debian/README.Debian: * Add note about ChangeLog -- David I. Lehn Thu, 2 Sep 2004 23:03:44 -0400 gst-plugins0.8 (0.8.3-1) unstable; urgency=low * New upstream * debian/control.in, debian/build-deps.in, debian/gstreamer-theora.install, debian/rules: * New theora plugin * debian/gstreamer-misc.install: * Add new plugins: alphacolor, decodebin, multifilesink, playbin -- David I. Lehn Sat, 7 Aug 2004 09:50:10 -0400 gst-plugins0.8 (0.8.2-3) unstable; urgency=high * debian/libgstreamer-gconf.postinst: Remove. schema install now handled by dh_gconf which moved the schema location causing old hardcoded /etc path to fail. (Closes: #259538, #259119, #259205) * Urgency high: GNOME team wants this in sarge now. -- David I. Lehn Fri, 16 Jul 2004 09:17:18 -0400 gst-plugins0.8 (0.8.2-2) unstable; urgency=low * debian/rules: * Bump libgstreamer0.8-dev dep up to get fixed shlibs * Rebuild with proper shlibs (Closes: #256181, #256494) -- David I. Lehn Wed, 7 Jul 2004 01:16:48 -0400 gst-plugins0.8 (0.8.2-1) unstable; urgency=medium * New upstream * debian/build-deps.in: * Add libdts-dev * ext/Makefile.{am,in}: * Fix so dts dir is built * debian/gstreamer-misc.install: * Add DTS plugin * Added alpha, audiorate, dtsdec, multipart, videobox, videomixer, and videorate * debian/rules: * Update libgstreamer0.8-dev build dependency to 0.8.3-2 * debian/control.in: * Remove explicit libgstreamer deps, autodetected now -- David I. Lehn Wed, 23 Jun 2004 23:50:53 -0400 gst-plugins0.8 (0.8.1-4) unstable; urgency=low * gst-libs/gst/riff/riff-media.c: * caps type typo fix from CVS * gst-libs/gst/resample/private.h: * disabled ppc code fix from CVS (Closes: #252991) * sys/v4l/gstv4lsrc.c: * caps fix NULL->any from CVS -- David I. Lehn Wed, 16 Jun 2004 01:24:41 -0400 gst-plugins0.8 (0.8.1-3) unstable; urgency=low * rerun autoget.sh to fix arm builds (Closes: #251592) * gconf/gstreamer.schemas.in, gcon/gstreamer-0.8.schemas: s/xvideosink/xvimagesink/ (Closes: #250575) -- David I. Lehn Tue, 1 Jun 2004 10:10:37 -0400 gst-plugins0.8 (0.8.1-2) unstable; urgency=low * debian/build-deps.in: * Update "libdv2-dev" to "libdv4-dev | libdv-dev" * debian/control.in, debian/extra, debian/rules: * Remove arts plugin. Detection, flags, and include directory build code is too buggy for plugin to build at the moment. -- David I. Lehn Thu, 29 Apr 2004 18:10:48 -0400 gst-plugins0.8 (0.8.1-1) unstable; urgency=low * New upstream * debian/gstreamer-misc.install: * add libgstdebug.so -- David I. Lehn Sun, 18 Apr 2004 01:04:36 -0400 gst-plugins0.8 (0.8.0-2) unstable; urgency=low * Bump to -2 to ease upgrades for early -1 testers * debian/build-deps.in: * Add libgtk2.0-dev -- David I. Lehn Thu, 15 Apr 2004 17:50:14 -0400 gst-plugins0.8 (0.8.0-1) unstable; urgency=low * New upstream (Closes: #234071, #240663) * debian/rules: * Switch to CDBS * Version now at 0.8 * Convert various control files to versioned ones for build * Add/rename/remove generated plugins files * debian/control.in: * Update Standards-Version to 3.6.1 * Add -caca and -speex plugins * Remove -http plugin * debian/build-deps.in: * Add cdbs * Update debhelper >= 4.1.0 * Add caca, speex, and pango deps * Remove libghttp-dev * debian/gstreamer-http.install * Remove * debian/gstreamer-{speex|caca}.install: * Add new plugins * debian/*.install: * Append debian/tmp for CDBS * General cleanups to support versioned files and locations * debian/gstreamer-esd.install: * Remove libgstesdmod * Change libgstesdsink to libgstesd * debian/gstreamer-plugin-libs.install: * Stick locale info in here for lack of a better place * debian/gstreamer-plugin-libs[-dev].install: * Add support for colorbalance, mixer, navigation, propertyprobe, tag, tuner, xoverlay, and xwindowlistener * Add pkgconfig support for plugins, interfaces, and media-info * debian/gstreamer-gnomevfs.install: * s/libgstgnomevfs{src|sink}.so/libgstgnomevfs.so/ * debian/gstreamer-colorspace.install: * Rename to gstreamer-hermes.install * Move generic and ffmpeg based colorspace plugins to -misc * Provide gstreamerX.Y-colorspace * debian/gstreamer-misc.install: * v4l/v4l2 support merged to libgstvideo4linux[2].so * Add gdkpixbuf, interleave, nassink, ogg, smoothwave, tagedit, textoverlay, timeoverlay, typefindfunctions, videobalance, videodrop, videofilter, videoflip * Move generic and ffmpeg based colorspace plugins from -hermes * Provide gstreamerX.Y-colorspace * debian/gstreamer-plugin-libs.install: * Rename to libgstreamer-plugins.install * debian/gstreamer-plugin-libs-dev.install: * Rename to libgstreamer-plugins-dev.install * debian/gstreamer-gconf.install: * Rename libgstreamer-gconf.install * Remove dev files * debian/gstreamer-gconf.postinst: * Rename to libgstreamer-gconf.postinst * debian/libgstreamer-gconf-dev.install: * Added * Add dev parts from gstreamer-gconf.install * configure.ac, configure: * Patch from CVS to get arts to detect on Debian boxen * ext/speex/gstspeex{dec,enc}.c: * Upstream patch for static pad templates (caused gst-compprep-0.8 bugs) * ext/ladspa/gstladspa.c: * Change g_warning to DEBUG_OBJ to silence gst-compprep * ext/libcaca/gstcacsink.c: * Upstream patch to avoid cacasink windows with gst-inspect/compprep -- David I. Lehn Wed, 14 Apr 2004 19:14:14 -0400 gst-plugins0.7 (0.7.6-1) unstable; urgency=low * New upstream -- David I. Lehn Wed, 17 Mar 2004 19:06:48 -0500 gst-plugins0.7 (0.7.5-1) unstable; urgency=low * New upstream -- David I. Lehn Wed, 17 Mar 2004 18:47:19 -0500 gst-plugins0.7 (0.7.4-1) unstable; urgency=low * New upstream -- David I. Lehn Wed, 17 Mar 2004 18:46:27 -0500 gst-plugins0.7 (0.7.3-1) unstable; urgency=low * New upstream -- David I. Lehn Wed, 17 Mar 2004 18:42:05 -0500 gst-plugins0.7 (0.7.1-1) unstable; urgency=low * New upstream * Versioning package as 0.7 -- David I. Lehn Wed, 17 Mar 2004 18:31:51 -0500 gst-plugins (0.6.4-4) unstable; urgency=low * ext/alsa/gstalsa.h: * Patch to compile with alsa-lib 1.0.x (Closes: #231870) -- David I. Lehn Sat, 14 Feb 2004 17:49:01 -0500 gst-plugins (0.6.4-3) unstable; urgency=low * debian/build-deps.in: * Update jack dependency to libjack0.80.0-dev (>= 0.94.0) (Closes: #221620, #228784) * Update libmpeg2 dependency to libmpeg2-4-dev (>= 0.4.0b) * ext/mpeg2dec/gstmpeg2dec.c: Patch for libmpeg2 0.4.0b -- David I. Lehn Mon, 26 Jan 2004 18:21:45 -0500 gst-plugins (0.6.4-2) unstable; urgency=low * debian/rules: Disable ffmpeg for everything but i386 due to PIC issues (Closes: #219284) -- David I. Lehn Thu, 6 Nov 2003 16:30:35 -0500 gst-plugins (0.6.4-1) unstable; urgency=low * New upstream * ESD updates (Closes: #218736) * Acknowledge NMU (Closes: #217981, #213811) * Rebuild to fix gconf liblinc1 dependency (Closes: #217771) * gstreamer-misc: add v4l2 support (Closes: #199900) * Use pre-Linux-2.6 videodev.h to compile v4l support -- David I. Lehn Mon, 3 Nov 2003 15:10:59 -0500 gst-plugins (0.6.3-1.1) unstable; urgency=low * NMU - Patch from Jordi Mallach * debian/build-deps.in: libgconf2-dev and libgnomevfs2-dev need GNOME 2.4 versions for the liblinc1 transition (closes: #217981). * debian/rules: gstreamer build-dep should be versioned (>= 0.6.3) (closes: #213811). -- LaMont Jones Thu, 30 Oct 2003 09:12:11 -0700 gst-plugins (0.6.3-1) unstable; urgency=low * New upstream * Includes ESD seeking fix (Closes: #201171) -- David I. Lehn Mon, 1 Sep 2003 23:15:49 -0400 gst-plugins (0.6.2-2) unstable; urgency=low * Fix ffmpeg makefile install rule to work even when ffmpeg build is disabled (Closes: #198148, #199072) * Apply partial patches from running autogen.sh to fix arm builds (excluding other unrelated generated file changes) (Closes: #199872) * Update to support libdvdnav 0.1.9 API -- David I. Lehn Fri, 11 Jul 2003 01:01:15 -0400 gst-plugins (0.6.2-1) unstable; urgency=low * New upstream * Add dv1394src to gstreamer-dv -- David I. Lehn Thu, 12 Jun 2003 11:39:51 -0400 gst-plugins (0.6.1-2) unstable; urgency=low * (unreleased) * Adapt to gstreamer package merge: remove -core, -core-libs, -core-libs-dev dependencies as needed. Fixes missing scheduler bugs. (Closes: #181503, #191720) * Use versioned gst-{register,compprep}-0.6 * Update jack dependency to libjack0.71.2-dev (Closes: #195401) * Update libdvdnav dependency to (>= 0.1.7) and revert patch for compatibility with 0.1.3. * Update libdvdread2 dependency to libdvdread3-dev * Remove DISPLAY unset hacks from postinst/postrm scripts and fix non-X installs with 0.6.2 CVS xvideosink patch. (Closes: #165372, #168438) * Link libgstplay to libgstcontrol. (Closes: #194107) -- David I. Lehn Thu, 5 Jun 2003 02:29:44 -0400 gst-plugins (0.6.1-1) unstable; urgency=low * New upstream * Update maintainer address to @debian.org * gstreamer-gconf libs properly linked upstream (Closes: Bug#187353) * debian/control.in: * gstreamer-vorbis depends on gstreamer-core-libs (Closes: Bug#188606) * Apply gnomevfs patch from http://bugzilla.gnome.org/show_bug.cgi?id=94113 * ffmpeg plugin only builds, and now is only packaged, on i386/powerpc (Yes this is bad - better shared lib support needed.) (Closes: Bug#186525) * Revert dvdnav support to libdvdnav 0.1.3 API * Unset DISPLAY before calling gst-register/gst-compprep * ext/ladspa/gstladspa.c:472: s/g_warning/GST_DEBUG/ to avoid printing of a warning on every plugin package install when swh-plugins is installed. (sinCos plugin executes this code path) -- David I. Lehn Sat, 3 May 2003 18:30:16 -0400 gst-plugins (0.6.0-4) unstable; urgency=low * debian/build-deps.in: * Updated libvorbis-dev to (>= 1.0.0-2) (Closes: Bug#184671) -- David I. Lehn Fri, 14 Mar 2003 11:12:21 -0500 gst-plugins (0.6.0-3) unstable; urgency=low * debian/build-deps.in: * Add libartsc0-dev so artsc-config is present so arts[d] plugins get built so the arts[d] packages actually include the arts[d] plugins (Closes: Bug#181438) * Update JACK dependency to 0.50.0 -- David I. Lehn Fri, 7 Mar 2003 23:51:46 -0500 gst-plugins (0.6.0-2) unstable; urgency=low * NMU (with maintainer's permission) * Change libarts-dev build-dep to libarts1-dev (Closes: #180537) -- David Schleef Mon, 10 Feb 2003 21:33:47 -0800 gst-plugins (0.6.0-1) unstable; urgency=low * New upstream -- David I. Lehn Sat, 1 Feb 2003 21:51:54 -0500 gst-plugins (0.5.2.3-1) unstable; urgency=low * New upstream -- David I. Lehn Thu, 30 Jan 2003 23:52:08 -0500 gst-plugins (0.5.2.2-1) unstable; urgency=low * New upstream * pre-release for 0.6.0 * debian/gstreamer-gconf.install: * add gstreamer-gconf-*.pc * debian/gstreamer-misc.install: * remove libgstaviparse.so -- David I. Lehn Wed, 29 Jan 2003 15:07:06 -0500 gst-plugins (0.5.2-1) unstable; urgency=low * New upstream * debian/build-deps.in: - Update swfdec dependency to 0.2.0 * debian/gstreamer-misc.install: - add libgstaviparse.so -- David I. Lehn Thu, 23 Jan 2003 22:17:31 -0500 gst-plugins (0.5.1-1) unstable; urgency=low * New upstream * Update GStreamer dependency to 0.5.1 * Update JACK dependency to 0.44.0 * Remove gstreamer-avifile package (avifile not supported on many architectures and upstream is deprecating it in favor of ffmpeg) * Add support for building unsupported plugin packages (avifile, lame, etc) * Tighten shlib deps for gstreamer-plugin-libs and gstreamer-gconf packages (may split off true lib* packages eventually, was trying to avoid even more packages) * gstreamer-misc: add oneton and vbidec * Rebuild for newer sid libs (Closes: Bug#177410) * Various small fixes from CVS -- David I. Lehn Mon, 20 Jan 2003 11:57:26 -0500 gst-plugins (0.5.0-1) unstable; urgency=low * New upstream * Update libpng dependency to libpng12-0-dev * Patch from CVS to support mpeg2dec 0.3.1 * Patch from CVS to improve X error handling and remote X usage * gstreamer-plugin-libs[-dev]: add media-info lib * gstreamer-misc: add png plugin * Use swfdec 0.1.3 API: s/swf_init/swfdec_decoder_new/ to avoid symbol conflicts with avifile plugin -- David I. Lehn Tue, 17 Dec 2002 20:27:42 -0500 gst-plugins (0.4.2-2) unstable; urgency=low * Update JACK dependency to 0.40.1 * Apply gst-launch-ext perlism patch (Closes: #170736) * Apply patch from Erik Meusel to allow building with other KDE arts packages (Closes: Bug#167538) * Update mpeg2dec dependency to 0.3.0, convert over to gstmpeg2deccvs plugin code, and adjust mpeg2dec check * Add Provides: for virtual gstreamer-{audio,video}sink packages to make it easier for applications to ensure output sinks are available. This isn't foolproof and it's possible that a rare user might not need the standard packaged audio/video sinks. For now those users can use the "equivs" package to get around the problem. (Closes: Bug#169968) -- David I. Lehn Wed, 4 Dec 2002 02:25:41 -0500 gst-plugins (0.4.2-1.1) unstable; urgency=low * NMU * Depend on swfdec-0.1.2-3, since it had a bug. -- David Schleef Tue, 12 Nov 2002 17:43:48 -0800 gst-plugins (0.4.2-1) unstable; urgency=low * New upstream * Add libpng2-dev to Build-Depends for snapshot * Add smpte, snapshot, and wavenc to gstreamer-misc * Add video and play libs to gstreamer-plugin-libs{-dev} * Add gstreamer-swfdec plugin package * Add hack to swfdec plugin to not segfault when avifile also loaded due to symbols conflicts. This annoyance will spew errors during gst-compprep and probably will cause errors in apps that use both swfdec and avifile. * Tighten dependency on libgstreamer until upstream code can deal with multiple plugin versions and upgrades better * Move gstreamer-plugin-apps to Section: utils from x11 -- David I. Lehn Wed, 6 Nov 2002 21:41:01 -0500 gst-plugins (0.4.1-1) unstable; urgency=low * New upstream * Update FLAC dependency to 1.0.4 and add support patch from CVS * Rebuild for libflac4 (Closes: Bug#163549) * Build gconf code as a library rather than a plugin * Improved plugin descriptions * Added to -misc: cdplayer, videocrop, videotestsrc, mixmatrix * Add autotools-dev to Build-Depends * Update config.{guess,sub} -- David I. Lehn Mon, 7 Oct 2002 17:51:43 -0400 gst-plugins (0.4.0.2-cvs20020919-1) unstable; urgency=low * CVS snapshot, release branch * gstreamer-gconf.files: libgstgconf.so moved to /usr/lib * added control.in, build-deps, and mk.control script. Edit control.in and/or build-deps, and run 'debian/rules debian/control' from toplevel directory to recreate debian/control. This should make it a lot easier to diff build dependencies. -- David Schleef Thu, 19 Sep 2002 15:18:41 -0700 gst-plugins (0.4.0-5) unstable; urgency=low * Update Build-Depends * Use pkg-config checking vs m4 macros for libdv -- David I. Lehn Fri, 23 Aug 2002 10:33:29 -0400 gst-plugins (0.4.0-4) unstable; urgency=low * Fixes from CVS for gstgnomevfssrc.c and endian issue in vorbisfile.c -- David I. Lehn Fri, 2 Aug 2002 20:51:38 -0400 gst-plugins (0.4.0-3) unstable; urgency=low * Add ladspa-sdk to Build-Depends * Removed qcam plugin from -misc. It's i386 only and probably not widely used. Will figure out how to package in the future if someone needs it. -- David I. Lehn Mon, 29 Jul 2002 16:32:33 -0400 gst-plugins (0.4.0-2) unstable; urgency=low * Clean up the Build-Depends: - stricter versioning - remove gnome deps (used for examples which are not build now) * Fix segfault in vorbis.m4 check -- David I. Lehn Mon, 29 Jul 2002 10:47:12 -0400 gst-plugins (0.4.0-1) unstable; urgency=low * New upstream * FLAC compile fixes from CVS * DV comiled fixes * Upated ltmain hack * autogen.sh with more recent tools * Update config.{guess,sub} * Added plugin packages: -gconf, -http, -jack, -dv * Added dvdnav plugin to -dvd * Removed osshelper plugin from -oss * Added xvideosink back to -x * Added effectv, filter, and qtdemux plugins to -misc * Rename gstreamer-lib-misc{-dev} to gstreamer-plugin-libs{-dev} to match gstreamer core. * Added gstreamer-plugin-apps package for a lonely 2 scripts * Renamed gstreamer-all to gstreamer-plugins -- David I. Lehn Tue, 16 Jul 2002 02:10:07 -0400 gst-plugins (0.3.4-2) unstable; urgency=low * Rebuild for new avifile -- David I. Lehn Wed, 24 Apr 2002 14:06:46 -0400 gst-plugins (0.3.4-1) unstable; urgency=low * New upstream * Fix mpeg2dec.m4 to use newer mpeg2dec libs -- David I. Lehn Mon, 15 Apr 2002 03:34:21 -0400 gst-plugins (0.3.3-2) unstable; urgency=low * Port a52dec plugin to 0.7.3 API (applied upstream) * Use a52dec packages in Debian vs current external ones * This switches a52dec plugin to static linking * Remove LAME support * No LAME packages in Debian to depend on * Added explanation in README.Debian since this will likely cause no end of "Why is there no LAME plugin?" * Depend on and rebuild for mpeg2dec 0.2.1 * Depend on and rebuild for glib 2.0 * Remove gtk from Build-Depends: (not needed for the built plugins) -- David I. Lehn Sat, 23 Mar 2002 17:52:03 -0500 gst-plugins (0.3.3-1) unstable; urgency=low * New upstream version * SDL fixed upstream, remove patch * Require libid3tag for mad support * Remove xvideosink from gstreamer-x package in favor of videosink Needed to be removed due to symbol conflicts with videosink * Sync with upstream changes: * Added videosink to gstreamer-x package * parseau renamed to auparse in -misc * Added various plugins to -misc: goom, monoscope, modplug, ... * Note: new upstream scripts gst-launch-ext and gst-visualise not packaged yet -- David I. Lehn Thu, 21 Mar 2002 02:06:21 -0500 gst-plugins (0.3.2-3) unstable; urgency=low * Rebuild for glib/gtk 1.3.15 -- David I. Lehn Mon, 25 Feb 2002 00:06:51 -0500 gst-plugins (0.3.2-2) unstable; urgency=low * Build against liblinc1 and newer gnomevfs -- David I. Lehn Sun, 17 Feb 2002 15:52:57 -0500 gst-plugins (0.3.2-1) unstable; urgency=low * New upstream release * Many diffs merged upstream * Unversioned plugins upstream, just packaging .so (no .la, .a) * Added cdxa plugin to -misc * Various plugins in -misc moved around and merged upstream -- David I. Lehn Fri, 15 Feb 2002 21:54:27 -0500 gst-plugins (0.3.1-4) unstable; urgency=low * Rebuild for glib/gtk 1.3.13 -- David I. Lehn Wed, 6 Feb 2002 02:16:16 -0500 gst-plugins (0.3.1-3) unstable; urgency=low * Fix arts symbol problem (add -lartsflow -lartsflow_idl) * Replace m4/gst-sdl.m4 with Debian's sdl.m4 * Use SDL_LIBS_FOR_PLUGINS instead of SDL_LIBS -- David I. Lehn Wed, 23 Jan 2002 12:37:00 -0500 gst-plugins (0.3.1-2) unstable; urgency=low * Rebuild against fixed gstreamer.pc in libgst-dev 0.3.1-2 Should just link to libxml2 now rather than v1 and v2 -- David I. Lehn Wed, 23 Jan 2002 02:29:49 -0500 gst-plugins (0.3.1-1) unstable; urgency=low * Upstream split plugins into new package * Upstream removed mpg123 plugin - use mad plugin * Upstream removed ac3dec plugin - use a52dec * Added -lib-misc and -lib-misc-dev packages for library plugins and headers * Patch to link all plugins to GST_LIBS -- David I. Lehn Fri, 11 Jan 2002 11:22:01 -0500 gstreamer (0.3.0-3) unstable; urgency=low * Remove upstream ChangeLog from packages: 128k changelog.gz per plugin package for 40 packages is too much -- David I. Lehn Tue, 25 Dec 2001 23:36:28 -0500 gstreamer (0.3.0-2) unstable; urgency=low * Fix bug that slipped into 0.3.0: s/aasink/xvideosink/ in gstplay/gstplay.c -- David I. Lehn Tue, 25 Dec 2001 17:56:29 -0500 gstreamer (0.3.0-1) unstable; urgency=low * New upstream release * Attempt to update various Build-Depends versions * Added plugin packages: -a52dec, -dvd, -mikmod, -sid * Renamed -elements to -core * Added to -core: gstbasicscheduler * Moved from -common to -core: gsttypes, autoplug related * Renamed -common to -misc * Added to -misc: speed, qcam, bytesteram, control, silence, sinesrc, mpegstream, playondemand, resample * Added gstreamer-guilaunch to gstreamer-tools package * Added dependencies on unofficial LAME packages * Use PIC libs for Xv * Disable broken building of PDF/PS docs * Renamed -all-plugins to -all * Disable docs -- too hard to build -- David I. Lehn Fri, 21 Dec 2001 12:00:02 -0500 gstreamer (0.2.1-4) unstable; urgency=low * Fix some problems reported from lintian 1.20.14: * copyright-lists-upstream-authors-like-dh_make * debian-changelog-file-contains-user-emacs-settings * Patch from CVS to link libgst into plugins Plugins now properly depend on libgst package * Use RedHat Gtk+-1.3 hack to fix relink issues with ltmain.sh * Patch from CVS for xvideosink segfault when no DISPLAY set * Remove builddir references from gstreamer-config.in * Move libgstelements.la from libgst-dev to gstreamer-elements -- David I. Lehn Tue, 28 Aug 2001 20:05:28 -0400 gstreamer (0.2.1-3) unstable; urgency=low * Update build dependencies to FLAC 1.0 * Enable debug features * Fixup broken doc build -scan voodoo with link into .libs/ dir -- David I. Lehn Sun, 5 Aug 2001 23:04:28 -0400 gstreamer (0.2.1-2) unstable; urgency=low * Fix lib deps: run debhelper tools in the right order * Added arts dir to Makefile.am SUBDIRS so it builds again * Changed libmpeg2dec to libgstmpeg2dec to avoid naming issues when using -lmpeg2dec * Updated system_encode/ with CVS segfaulter bug fix -- David I. Lehn Thu, 19 Jul 2001 15:47:24 -0400 gstreamer (0.2.1-1) unstable; urgency=low * New upstream 0.2.1: "Return of the Sedi Master" * New plugin packages: -festival, -flac, -avifile, -x * New plugins in -common: chart, deinterlace, udp * Added some post-0.2.1 fixes for FLAC, build system, ALSA -- David I. Lehn Thu, 28 Jun 2001 20:15:15 -0400 gstreamer (0.2.0-6) unstable; urgency=low * Move -compprep to -runtime and call it same places as -register * Do -register and -compprep in postrm instead of prerm * Make -arts plugin actually build all the source (sent upstream) * Purge of -runtime removes /etc/gstreamer -- David I. Lehn Tue, 19 Jun 2001 13:09:32 -0400 gstreamer (0.2.0-5) unstable; urgency=low * Added element package dependencies to libgstmediaplay0 -- David I. Lehn Mon, 18 Jun 2001 11:18:53 -0400 gstreamer (0.2.0-4) unstable; urgency=low * Add --gst-mask=0 to -runtime.postinst -- David I. Lehn Fri, 15 Jun 2001 11:47:24 -0400 gstreamer (0.2.0-3) unstable; urgency=low * Fix the plugin control file symlink creation * Add audiofile to Build-Depends -- David I. Lehn Fri, 15 Jun 2001 05:22:28 -0400 gstreamer (0.2.0-2) unstable; urgency=low * Fixed ALSA checks to not include -lasound in -every- link * Update LAME plugin to use latest CVS API * Removed OSS src/sink from -common.files (was in -oss too) * Swapped -arts.files and -artsd.files contents -- David I. Lehn Fri, 15 Jun 2001 04:02:21 -0400 gstreamer (0.2.0-1) unstable; urgency=low * Added gstreamer-compprep manpage * Upgrade to 0.2.0 -- David I. Lehn Thu, 7 Jun 2001 12:53:59 -0400 gstreamer (0.2.0-0.3) unstable; urgency=low * GStreamer 0.2.0-pre3 -- David I. Lehn Wed, 6 Jun 2001 15:09:59 -0400 gstreamer (0.2.0-0.2) unstable; urgency=low * GStreamer 0.2.0-pre2 + CVS 20010604 * Added -artsd (vs -arts), -audiofile, -gnomevfs, -gsm, -jpeg, -oss, and -sdl plugin packages * Added osshelper lib to oss package * Added more AVI related plugins and autoplug libs to -common * Added pkgconfig file to libgst-dev * Added gstreamer-all-plugins pseudo package that depends on all other plugin pacakges -- David I. Lehn Mon, 4 Jun 2001 17:33:20 -0400 gstreamer (0.2.0-0.1) unstable; urgency=low * GStreamer 0.2.0-pre1 -- David I. Lehn Thu, 31 May 2001 17:16:23 -0400 gstreamer (0.1.1.20010504-1) unstable; urgency=low * Latest CVS code -- David I. Lehn Fri, 4 May 2001 21:48:45 -0400 gstreamer (0.1.1.20010430-2) unstable; urgency=low * Added -colorspace package for Hermes dependent conversion * Added -arts package for aRts sink -- David I. Lehn Tue, 1 May 2001 19:46:08 -0400 gstreamer (0.1.1.20010430-1) unstable; urgency=low * Latest CVS code * Added -aa package for aasink output * Added -mad package for mad mp3 decoder -- David I. Lehn Mon, 30 Apr 2001 18:25:52 -0400 gstreamer (0.1.1.20010320-1) unstable; urgency=low * Latest CVS code * enable main docs * disable broken plugin docs with new option -- David I. Lehn Tue, 20 Mar 2001 18:15:19 -0500 gstreamer (0.1.1.20010315-1) unstable; urgency=low * Latest CVS code * Added man pages * Split mpeg2dec to seperate plugin * libgst Architectures updated to cothread supported archs -- David I. Lehn Thu, 15 Mar 2001 20:17:19 -0500 gstreamer (0.1.1-1) unstable; urgency=low * New upstream release * disable docs build, broken at the momemnt -- David I. Lehn Sun, 25 Feb 2001 17:58:25 -0500 gstreamer (0.1.0-2) unstable; urgency=low * debian/rules: call configure instead of autogen.sh -- David I. Lehn Sat, 24 Feb 2001 18:31:36 -0500 gstreamer (0.1.0-1) unstable; urgency=low * Initial Release. -- David I. Lehn Mon, 15 Jan 2001 18:25:18 -0500 debian/source/0000775000000000000000000000000012324572353010476 5ustar debian/source/format0000664000000000000000000000001412324572347011707 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000212324572347010377 0ustar 9 debian/gstreamer-plugins-good.install0000664000000000000000000000745012324572347015175 0ustar @1394@ debian/tmp/usr/share/gstreamer-@GST_ABI@/presets/ debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaasink.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstalaw.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstalphacolor.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstalpha.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstapetag.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiofx.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudioparsers.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstauparse.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstautodetect.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstavi.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcacasink.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcamerabin2.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcairo.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcutter.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdebug.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdeinterlace.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdtmf.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdv.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsteffectv.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstequalizer.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstflac.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstflv.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstflxdec.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstgdkpixbuf.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstgoom.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstgoom2k1.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsticydemux.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstimagefreeze.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstinterleave.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstid3demux.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstjack.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstjpeg.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstjpegformat.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstlevel.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmatroska.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmonoscope.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmulaw.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmultifile.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmultipart.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstnavigationtest.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstpng.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstossaudio.so @oss4@ debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstisomp4.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstreplaygain.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrtp.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrtpmanager.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrtsp.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstshapewipe.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstshout2.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstsmpte.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstsouphttpsrc.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstspectrum.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstspeex.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsttaglib.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstudp.so @video4linux2@ debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvideobox.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvideocrop.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvideofilter.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvideomixer.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvpx.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstwavenc.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstwavpack.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstwavparse.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstximagesrc.so debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsty4menc.so debian/tmp/usr/share/locale debian/patches/0000775000000000000000000000000013064757426010635 5ustar debian/patches/flxdec-bounds2.patch0000664000000000000000000000330013015046231014446 0ustar From af7f70e60e364b551c2589dee5fb458a83fa0e7e Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 22 Nov 2016 23:46:00 +1100 Subject: flxdec: fix some warnings comparing unsigned < 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bf43f44fcfada5ec4a3ce60cb374340486fe9fac was comparing an unsigned expression to be < 0 which was always false. gstflxdec.c: In function ‘flx_decode_brun’: gstflxdec.c:322:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((glong) row - count < 0) { ^ gstflxdec.c:332:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((glong) row - count < 0) { ^ https://bugzilla.gnome.org/show_bug.cgi?id=774834 Index: gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/flx/gstflxdec.c 2016-11-22 08:48:04.938374781 -0500 +++ gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c 2016-11-22 08:48:04.938374781 -0500 @@ -317,7 +317,7 @@ if (count > 0x7f) { /* literal run */ count = 0x100 - count; - if ((glong) row - count < 0) { + if ((glong) row - (glong) count < 0) { GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected."); return FALSE; } @@ -327,7 +327,7 @@ *dest++ = *data++; } else { - if ((glong) row - count < 0) { + if ((glong) row - (glong) count < 0) { GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected."); return FALSE; } debian/patches/flxdec-bounds4.patch0000664000000000000000000010213413016100373014454 0ustar Backport of: From be670f0daf67304fb92c76aa09c30cae0bfd1fe4 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 23 Nov 2016 07:09:06 +1100 Subject: flxdec: rewrite logic based on GstByteReader/Writer Solves overreading/writing the given arrays and will error out if the streams asks to do that. Also does more error checking that the stream is valid and won't overrun any allocated arrays. Also mitigate integer overflow errors calculating allocation sizes. https://bugzilla.gnome.org/show_bug.cgi?id=774859 Index: gst-plugins-good1.0-1.2.4/gst/flx/flx_fmt.h =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/flx/flx_fmt.h 2016-11-25 09:17:37.501153583 -0500 +++ gst-plugins-good1.0-1.2.4/gst/flx/flx_fmt.h 2016-11-25 09:17:37.497153539 -0500 @@ -123,78 +123,6 @@ } FlxFrameType; #define FlxFrameTypeSize 10 -#if G_BYTE_ORDER == G_BIG_ENDIAN -#define LE_TO_BE_16(i16) ((guint16) (((i16) << 8) | ((i16) >> 8))) -#define LE_TO_BE_32(i32) \ - (((guint32) (LE_TO_BE_16((guint16) (i32))) << 16) | (LE_TO_BE_16((i32) >> 16))) - -#define FLX_FRAME_TYPE_FIX_ENDIANNESS(frm_type_p) \ - do { \ - (frm_type_p)->chunks = LE_TO_BE_16((frm_type_p)->chunks); \ - (frm_type_p)->delay = LE_TO_BE_16((frm_type_p)->delay); \ - } while(0) - -#define FLX_HUFFMAN_TABLE_FIX_ENDIANNESS(hffmn_table_p) \ - do { \ - (hffmn_table_p)->codelength = \ - LE_TO_BE_16((hffmn_table_p)->codelength); \ - (hffmn_table_p)->numcodes = LE_TO_BE_16((hffmn_table_p)->numcodes); \ - } while(0) - -#define FLX_SEGMENT_TABLE_FIX_ENDIANNESS(sgmnt_table_p) \ - ((sgmnt_table_p)->segments = LE_TO_BE_16((sgmnt_table_p)->segments)) - -#define FLX_PREFIX_CHUNK_FIX_ENDIANNESS(prfx_chnk_p) \ - do { \ - (prfx_chnk_p)->chunks = LE_TO_BE_16((prfx_chnk_p)->chunks); \ - } while(0) - -#define FLX_FRAME_CHUNK_FIX_ENDIANNESS(frm_chnk_p) \ - do { \ - (frm_chnk_p)->size = LE_TO_BE_32((frm_chnk_p)->size); \ - (frm_chnk_p)->id = LE_TO_BE_16((frm_chnk_p)->id); \ - } while(0) - -#define FLX_HDR_FIX_ENDIANNESS(hdr_p) \ - do { \ - (hdr_p)->size = LE_TO_BE_32((hdr_p)->size); \ - (hdr_p)->type = LE_TO_BE_16((hdr_p)->type); \ - (hdr_p)->frames = LE_TO_BE_16((hdr_p)->frames); \ - (hdr_p)->width = LE_TO_BE_16((hdr_p)->width); \ - (hdr_p)->height = LE_TO_BE_16((hdr_p)->height); \ - (hdr_p)->depth = LE_TO_BE_16((hdr_p)->depth); \ - (hdr_p)->flags = LE_TO_BE_16((hdr_p)->flags); \ - (hdr_p)->speed = LE_TO_BE_32((hdr_p)->speed); \ - (hdr_p)->reserved1 = LE_TO_BE_16((hdr_p)->reserved1); \ - (hdr_p)->created = LE_TO_BE_32((hdr_p)->created); \ - (hdr_p)->creator = LE_TO_BE_32((hdr_p)->creator); \ - (hdr_p)->updated = LE_TO_BE_32((hdr_p)->updated); \ - (hdr_p)->updater = LE_TO_BE_32((hdr_p)->updater); \ - (hdr_p)->aspect_dx = LE_TO_BE_16((hdr_p)->aspect_dx); \ - (hdr_p)->aspect_dy = LE_TO_BE_16((hdr_p)->aspect_dy); \ - (hdr_p)->ext_flags = LE_TO_BE_16((hdr_p)->ext_flags); \ - (hdr_p)->keyframes = LE_TO_BE_16((hdr_p)->keyframes); \ - (hdr_p)->totalframes = LE_TO_BE_16((hdr_p)->totalframes); \ - (hdr_p)->req_memory = LE_TO_BE_32((hdr_p)->req_memory); \ - (hdr_p)->max_regions = LE_TO_BE_16((hdr_p)->max_regions); \ - (hdr_p)->transp_num = LE_TO_BE_16((hdr_p)->transp_num); \ - (hdr_p)->oframe1 = LE_TO_BE_32((hdr_p)->oframe1); \ - (hdr_p)->oframe2 = LE_TO_BE_32((hdr_p)->oframe2); \ - } while(0) -#else - -#define LE_TO_BE_16(i16) ((i16)) -#define LE_TO_BE_32(i32) ((i32)) - -#define FLX_FRAME_TYPE_FIX_ENDIANNESS(frm_type_p) -#define FLX_HUFFMAN_TABLE_FIX_ENDIANNESS(hffmn_table_p) -#define FLX_SEGMENT_TABLE_FIX_ENDIANNESS(sgmnt_table_p) -#define FLX_PREFIX_CHUNK_FIX_ENDIANNESS(prfx_chnk_p) -#define FLX_FRAME_CHUNK_FIX_ENDIANNESS(frm_chnk_p) -#define FLX_HDR_FIX_ENDIANNESS(hdr_p) - -#endif /* G_BYTE_ORDER == G_BIG_ENDIAN */ - G_END_DECLS #endif /* __GST_FLX_FMT_H__ */ Index: gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/flx/gstflxdec.c 2016-11-25 09:17:37.501153583 -0500 +++ gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c 2016-11-25 13:20:30.201366361 -0500 @@ -1,5 +1,6 @@ /* GStreamer * Copyright (C) <1999> Erik Walthinsen + * Copyright (C) <2016> Matthew Waters * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -24,6 +25,7 @@ /* * http://www.coolutils.com/Formats/FLI * http://woodshole.er.usgs.gov/operations/modeling/flc.html + * http://www.compuphase.com/flic.htm */ #ifdef HAVE_CONFIG_H @@ -71,16 +73,40 @@ static gboolean gst_flxdec_src_query_handler (GstPad * pad, GstObject * parent, GstQuery * query); -static void flx_decode_color (GstFlxDec *, guchar *, guchar *, gint); -static gboolean flx_decode_brun (GstFlxDec *, guchar *, guchar *); -static gboolean flx_decode_delta_fli (GstFlxDec *, guchar *, guchar *); -static gboolean flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *); +static gboolean flx_decode_color (GstFlxDec * flxdec, GstByteReader * reader, + GstByteWriter * writer, gint scale); +static gboolean flx_decode_brun (GstFlxDec * flxdec, + GstByteReader * reader, GstByteWriter * writer); +static gboolean flx_decode_delta_fli (GstFlxDec * flxdec, + GstByteReader * reader, GstByteWriter * writer); +static gboolean flx_decode_delta_flc (GstFlxDec * flxdec, + GstByteReader * reader, GstByteWriter * writer); #define rndalign(off) ((off) + ((off) & 1)) #define gst_flxdec_parent_class parent_class G_DEFINE_TYPE (GstFlxDec, gst_flxdec, GST_TYPE_ELEMENT); +static inline gboolean +_gst_byte_reader_get_sub_reader_inline (GstByteReader * reader, + GstByteReader * sub_reader, guint size) +{ + g_return_val_if_fail (reader != NULL, FALSE); + g_return_val_if_fail (sub_reader != NULL, FALSE); + + if (gst_byte_reader_get_remaining (reader) < size) + return FALSE; + + sub_reader->data = reader->data + reader->byte; + sub_reader->byte = 0; + sub_reader->size = size; + + gst_byte_reader_skip_unchecked (reader, size); + return TRUE; +} + +#define gst_byte_reader_get_sub_reader _gst_byte_reader_get_sub_reader_inline + static void gst_flxdec_class_init (GstFlxDecClass * klass) { @@ -202,57 +228,59 @@ } static gboolean -flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data, - guchar * dest) +flx_decode_chunks (GstFlxDec * flxdec, gulong n_chunks, GstByteReader * reader, + GstByteWriter * writer) { - FlxFrameChunk *hdr; gboolean ret = TRUE; - g_return_val_if_fail (data != NULL, FALSE); - - while (count--) { - hdr = (FlxFrameChunk *) data; - FLX_FRAME_CHUNK_FIX_ENDIANNESS (hdr); - data += FlxFrameChunkSize; + while (n_chunks--) { + GstByteReader chunk; + guint32 size; + guint16 type; + + if (!gst_byte_reader_get_uint32_le (reader, &size)) + goto parse_error; + if (!gst_byte_reader_get_uint16_le (reader, &type)) + goto parse_error; + GST_LOG_OBJECT (flxdec, "chunk has type 0x%02x size %d", type, size); + + if (!gst_byte_reader_get_sub_reader (reader, &chunk, + size - FlxFrameChunkSize)) { + GST_ERROR_OBJECT (flxdec, "Incorrect size in the chunk header"); + goto error; + } - switch (hdr->id) { + switch (type) { case FLX_COLOR64: - flx_decode_color (flxdec, data, dest, 2); - data += rndalign (hdr->size) - FlxFrameChunkSize; + ret = flx_decode_color (flxdec, &chunk, writer, 2); break; case FLX_COLOR256: - flx_decode_color (flxdec, data, dest, 0); - data += rndalign (hdr->size) - FlxFrameChunkSize; + ret = flx_decode_color (flxdec, &chunk, writer, 0); break; case FLX_BRUN: - ret = flx_decode_brun (flxdec, data, dest); - data += rndalign (hdr->size) - FlxFrameChunkSize; + ret = flx_decode_brun (flxdec, &chunk, writer); break; case FLX_LC: - ret = flx_decode_delta_fli (flxdec, data, dest); - data += rndalign (hdr->size) - FlxFrameChunkSize; + ret = flx_decode_delta_fli (flxdec, &chunk, writer); break; case FLX_SS2: - ret = flx_decode_delta_flc (flxdec, data, dest); - data += rndalign (hdr->size) - FlxFrameChunkSize; + ret = flx_decode_delta_flc (flxdec, &chunk, writer); break; case FLX_BLACK: - memset (dest, 0, flxdec->size); + ret = gst_byte_writer_fill (writer, 0, flxdec->size); break; case FLX_MINI: - data += rndalign (hdr->size) - FlxFrameChunkSize; break; default: - GST_WARNING ("Unimplented chunk type: 0x%02x size: %d - skipping", - hdr->id, hdr->size); - data += rndalign (hdr->size) - FlxFrameChunkSize; + GST_WARNING ("Unimplemented chunk type: 0x%02x size: %d - skipping", + type, size); break; } @@ -261,43 +289,60 @@ } return ret; + +parse_error: + GST_ERROR_OBJECT (flxdec, "Failed to decode chunk"); +error: + return FALSE; } -static void -flx_decode_color (GstFlxDec * flxdec, guchar * data, guchar * dest, gint scale) +static gboolean +flx_decode_color (GstFlxDec * flxdec, GstByteReader * reader, + GstByteWriter * writer, gint scale) { - guint packs, count, indx; - - g_return_if_fail (flxdec != NULL); + guint8 count, indx; + guint16 packs; - packs = (data[0] + (data[1] << 8)); - - data += 2; + if (!gst_byte_reader_get_uint16_le (reader, &packs)) + goto error; indx = 0; - GST_LOG ("GstFlxDec: cmap packs: %d", packs); + GST_LOG ("GstFlxDec: cmap packs: %d", (guint) packs); while (packs--) { + const guint8 *data; + guint16 actual_count; + /* color map index + skip count */ - indx += *data++; + if (!gst_byte_reader_get_uint8 (reader, &indx)) + goto error; /* number of rgb triplets */ - count = *data++ & 0xff; - if (count == 0) - count = 256; + if (!gst_byte_reader_get_uint8 (reader, &count)) + goto error; + + actual_count = count == 0 ? 256 : count; - GST_LOG ("GstFlxDec: cmap count: %d (indx: %d)", count, indx); - flx_set_palette_vector (flxdec->converter, indx, count, data, scale); + if (!gst_byte_reader_get_data (reader, count * 3, &data)) + goto error; - data += (count * 3); + GST_LOG_OBJECT (flxdec, "cmap count: %d (indx: %d)", actual_count, indx); + flx_set_palette_vector (flxdec->converter, indx, actual_count, + (guchar *) data, scale); } + + return TRUE; + +error: + GST_ERROR_OBJECT (flxdec, "Error decoding color palette"); + return FALSE; } static gboolean -flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest) +flx_decode_brun (GstFlxDec * flxdec, GstByteReader * reader, + GstByteWriter * writer) { - gulong count, lines, row; - guchar x; + gulong lines, row; g_return_val_if_fail (flxdec != NULL, FALSE); @@ -308,82 +353,125 @@ * contain more then 255 RLE packets. we use the frame * width instead. */ - data++; + if (!gst_byte_reader_skip (reader, 1)) + goto error; row = flxdec->hdr.width; while (row) { - count = *data++; + gint8 count; + + if (!gst_byte_reader_get_int8 (reader, &count)) + goto error; + + if (count <= 0) { + const guint8 *data; - if (count > 0x7f) { /* literal run */ - count = 0x100 - count; - if ((glong) row - (glong) count < 0) { - GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected."); + count = ABS (count); + + GST_LOG_OBJECT (flxdec, "have literal run of size %d", count); + + if (count > row) { + GST_ERROR_OBJECT (flxdec, "Invalid BRUN line detected. " + "bytes to write exceeds the end of the row"); return FALSE; } row -= count; - while (count--) - *dest++ = *data++; - + if (!gst_byte_reader_get_data (reader, count, &data)) + goto error; + if (!gst_byte_writer_put_data (writer, data, count)) + goto error; } else { - if ((glong) row - (glong) count < 0) { - GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected."); + guint8 x; + + GST_LOG_OBJECT (flxdec, "have replicate run of size %d", count); + + if (count > row) { + GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected." + "bytes to write exceeds the end of the row"); return FALSE; } /* replicate run */ row -= count; - x = *data++; - while (count--) - *dest++ = x; + if (!gst_byte_reader_get_uint8 (reader, &x)) + goto error; + if (!gst_byte_writer_fill (writer, x, count)) + goto error; } } } return TRUE; + +error: + GST_ERROR_OBJECT (flxdec, "Failed to decode BRUN packet"); + return FALSE; } static gboolean -flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest) +flx_decode_delta_fli (GstFlxDec * flxdec, GstByteReader * reader, + GstByteWriter * writer) { - gulong count, packets, lines, start_line; - guchar *start_p, x; + guint16 start_line, lines; + guint line_start_i; g_return_val_if_fail (flxdec != NULL, FALSE); g_return_val_if_fail (flxdec->delta_data != NULL, FALSE); /* use last frame for delta */ - memcpy (dest, flxdec->delta_data, flxdec->size); + if (!gst_byte_writer_put_data (writer, flxdec->delta_data, flxdec->size)) + goto error; + + if (!gst_byte_reader_get_uint16_le (reader, &start_line)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &lines)) + goto error; + GST_LOG_OBJECT (flxdec, "height %d start line %d line count %d", + flxdec->hdr.height, start_line, lines); - start_line = (data[0] + (data[1] << 8)); - lines = (data[2] + (data[3] << 8)); if (start_line + lines > flxdec->hdr.height) { GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. too many lines."); return FALSE; } - data += 4; - /* start position of delta */ - dest += (flxdec->hdr.width * start_line); - start_p = dest; + line_start_i = flxdec->hdr.width * start_line; + if (!gst_byte_writer_set_pos (writer, line_start_i)) + goto error; while (lines--) { + guint8 packets; + /* packet count */ - packets = *data++; + if (!gst_byte_reader_get_uint8 (reader, &packets)) + goto error; + GST_LOG_OBJECT (flxdec, "have %d packets", packets); while (packets--) { /* skip count */ - guchar skip = *data++; - dest += skip; + guint8 skip; + gint8 count; + if (!gst_byte_reader_get_uint8 (reader, &skip)) + goto error; + + /* skip bytes */ + if (!gst_byte_writer_set_pos (writer, + gst_byte_writer_get_pos (writer) + skip)) + goto error; /* RLE count */ - count = *data++; + if (!gst_byte_reader_get_int8 (reader, &count)) + goto error; + + if (count < 0) { + guint8 x; - if (count > 0x7f) { /* literal run */ - count = 0x100 - count; + count = ABS (count); + GST_LOG_OBJECT (flxdec, "have literal run of size %d at offset %d", + count, skip); if (skip + count > flxdec->hdr.width) { GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. " @@ -391,11 +479,16 @@ return FALSE; } - x = *data++; - while (count--) - *dest++ = x; - + if (!gst_byte_reader_get_uint8 (reader, &x)) + goto error; + if (!gst_byte_writer_fill (writer, x, count)) + goto error; } else { + const guint8 *data; + + GST_LOG_OBJECT (flxdec, "have replicate run of size %d at offset %d", + count, skip); + if (skip + count > flxdec->hdr.width) { GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. " "line too long."); @@ -403,45 +496,60 @@ } /* replicate run */ - while (count--) - *dest++ = *data++; + if (!gst_byte_reader_get_data (reader, count, &data)) + goto error; + if (!gst_byte_writer_put_data (writer, data, count)) + goto error; } } - start_p += flxdec->hdr.width; - dest = start_p; + line_start_i += flxdec->hdr.width; + if (!gst_byte_writer_set_pos (writer, line_start_i)) + goto error; } return TRUE; + +error: + GST_ERROR_OBJECT (flxdec, "Failed to decode FLI packet"); + return FALSE; } static gboolean -flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest) +flx_decode_delta_flc (GstFlxDec * flxdec, GstByteReader * reader, + GstByteWriter * writer) { - gulong count, lines, start_l, opcode; - guchar *start_p; + guint16 lines, start_l; g_return_val_if_fail (flxdec != NULL, FALSE); g_return_val_if_fail (flxdec->delta_data != NULL, FALSE); /* use last frame for delta */ - memcpy (dest, flxdec->delta_data, flxdec->size); + if (!gst_byte_writer_put_data (writer, flxdec->delta_data, flxdec->size)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &lines)) + goto error; - lines = (data[0] + (data[1] << 8)); if (lines > flxdec->hdr.height) { GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. too many lines."); return FALSE; } - data += 2; - start_p = dest; start_l = lines; while (lines) { - dest = start_p + (flxdec->hdr.width * (start_l - lines)); + guint16 opcode; + + if (!gst_byte_writer_set_pos (writer, + flxdec->hdr.width * (start_l - lines))) + goto error; /* process opcode(s) */ - while ((opcode = (data[0] + (data[1] << 8))) & 0xc000) { - data += 2; + while (TRUE) { + if (!gst_byte_reader_get_uint16_le (reader, &opcode)) + goto error; + if ((opcode & 0xc000) == 0) + break; + if ((opcode & 0xc000) == 0xc000) { /* line skip count */ gulong skip = (0x10000 - opcode); @@ -451,27 +559,44 @@ return FALSE; } start_l += skip; - dest += flxdec->hdr.width * skip; + if (!gst_byte_writer_set_pos (writer, + gst_byte_writer_get_pos (writer) + flxdec->hdr.width * skip)) + goto error; } else { /* last pixel */ - dest += flxdec->hdr.width; - *dest++ = (opcode & 0xff); + if (!gst_byte_writer_set_pos (writer, + gst_byte_writer_get_pos (writer) + flxdec->hdr.width)) + goto error; + if (!gst_byte_writer_put_uint8 (writer, opcode & 0xff)) + goto error; } } - data += 2; /* last opcode is the packet count */ + GST_LOG_OBJECT (flxdec, "have %d packets", opcode); while (opcode--) { /* skip count */ - guchar skip = *data++; - dest += skip; + guint8 skip; + gint8 count; + + if (!gst_byte_reader_get_uint8 (reader, &skip)) + goto error; + if (!gst_byte_writer_set_pos (writer, + gst_byte_writer_get_pos (writer) + skip)) + goto error; /* RLE count */ - count = *data++; + if (!gst_byte_reader_get_int8 (reader, &count)) + goto error; + + if (count < 0) { + guint16 x; - if (count > 0x7f) { /* replicate word run */ - count = 0x100 - count; + count = ABS (count); + + GST_LOG_OBJECT (flxdec, "have replicate run of size %d at offset %d", + count, skip); if (skip + count > flxdec->hdr.width) { GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. " @@ -479,22 +604,31 @@ return FALSE; } + if (!gst_byte_reader_get_uint16_le (reader, &x)) + goto error; + while (count--) { - *dest++ = data[0]; - *dest++ = data[1]; + if (!gst_byte_writer_put_uint16_le (writer, x)) { + goto error; + } } - data += 2; } else { + GST_LOG_OBJECT (flxdec, "have literal run of size %d at offset %d", + count, skip); + if (skip + count > flxdec->hdr.width) { GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. " "line too long."); return FALSE; } - /* literal word run */ while (count--) { - *dest++ = *data++; - *dest++ = *data++; + guint16 x; + + if (!gst_byte_reader_get_uint16_le (reader, &x)) + goto error; + if (!gst_byte_writer_put_uint16_le (writer, x)) + goto error; } } } @@ -502,13 +636,91 @@ } return TRUE; + +error: + GST_ERROR_OBJECT (flxdec, "Failed to decode FLI packet"); + return FALSE; +} + +static gboolean +_read_flx_header (GstFlxDec * flxdec, GstByteReader * reader, FlxHeader * flxh) +{ + memset (flxh, 0, sizeof (*flxh)); + + if (!gst_byte_reader_get_uint32_le (reader, &flxh->size)) + goto error; + if (flxh->size < FlxHeaderSize) { + GST_ERROR_OBJECT (flxdec, "Invalid file size in the header"); + return FALSE; + } + + if (!gst_byte_reader_get_uint16_le (reader, &flxh->type)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->frames)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->width)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->height)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->depth)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->flags)) + goto error; + if (!gst_byte_reader_get_uint32_le (reader, &flxh->speed)) + goto error; + if (!gst_byte_reader_skip (reader, 2)) /* reserved */ + goto error; + /* FLC */ + if (!gst_byte_reader_get_uint32_le (reader, &flxh->created)) + goto error; + if (!gst_byte_reader_get_uint32_le (reader, &flxh->creator)) + goto error; + if (!gst_byte_reader_get_uint32_le (reader, &flxh->updated)) + goto error; + if (!gst_byte_reader_get_uint32_le (reader, &flxh->updater)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->aspect_dx)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->aspect_dy)) + goto error; + /* EGI */ + if (!gst_byte_reader_get_uint16_le (reader, &flxh->ext_flags)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->keyframes)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->totalframes)) + goto error; + if (!gst_byte_reader_get_uint32_le (reader, &flxh->req_memory)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->max_regions)) + goto error; + if (!gst_byte_reader_get_uint16_le (reader, &flxh->transp_num)) + goto error; + if (!gst_byte_reader_skip (reader, 24)) /* reserved */ + goto error; + /* FLC */ + if (!gst_byte_reader_get_uint32_le (reader, &flxh->oframe1)) + goto error; + if (!gst_byte_reader_get_uint32_le (reader, &flxh->oframe2)) + goto error; + if (!gst_byte_reader_skip (reader, 40)) /* reserved */ + goto error; + + return TRUE; + +error: + GST_ERROR_OBJECT (flxdec, "Error reading file header"); + return FALSE; } static GstFlowReturn gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) { + GstByteReader reader; + GstBuffer *input; + GstMapInfo map_info; GstCaps *caps; - guint avail; + guint available; GstFlowReturn res = GST_FLOW_OK; GstFlxDec *flxdec; @@ -519,31 +731,51 @@ g_return_val_if_fail (flxdec != NULL, GST_FLOW_ERROR); gst_adapter_push (flxdec->adapter, buf); - avail = gst_adapter_available (flxdec->adapter); + available = gst_adapter_available (flxdec->adapter); + input = gst_buffer_new_wrapped (g_memdup (gst_adapter_map (flxdec->adapter, + available), available), available); + if (!gst_buffer_map (input, &map_info, GST_MAP_READ)) { + GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, + ("%s", "Failed to map buffer"), (NULL)); + goto error; + } + gst_byte_reader_init (&reader, map_info.data, map_info.size); if (flxdec->state == GST_FLXDEC_READ_HEADER) { - if (avail >= FlxHeaderSize) { - const guint8 *data = gst_adapter_map (flxdec->adapter, FlxHeaderSize); + if (available >= FlxHeaderSize) { + GstByteReader header; GstCaps *templ; - memcpy ((gchar *) & flxdec->hdr, data, FlxHeaderSize); - FLX_HDR_FIX_ENDIANNESS (&(flxdec->hdr)); - gst_adapter_unmap (flxdec->adapter); + if (!gst_byte_reader_get_sub_reader (&reader, &header, FlxHeaderSize)) { + GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, + ("%s", "Could not read header"), (NULL)); + goto unmap_input_error; + } gst_adapter_flush (flxdec->adapter, FlxHeaderSize); + available -= FlxHeaderSize; + + if (!_read_flx_header (flxdec, &header, &flxdec->hdr)) { + GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, + ("%s", "Failed to parse header"), (NULL)); + goto unmap_input_error; + } flxh = &flxdec->hdr; /* check header */ if (flxh->type != FLX_MAGICHDR_FLI && - flxh->type != FLX_MAGICHDR_FLC && flxh->type != FLX_MAGICHDR_FLX) - goto wrong_type; + flxh->type != FLX_MAGICHDR_FLC && flxh->type != FLX_MAGICHDR_FLX) { + GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, (NULL), + ("not a flx file (type %x)", flxh->type)); + goto unmap_input_error; + } - GST_LOG ("size : %d", flxh->size); - GST_LOG ("frames : %d", flxh->frames); - GST_LOG ("width : %d", flxh->width); - GST_LOG ("height : %d", flxh->height); - GST_LOG ("depth : %d", flxh->depth); - GST_LOG ("speed : %d", flxh->speed); + GST_INFO_OBJECT (flxdec, "size : %d", flxh->size); + GST_INFO_OBJECT (flxdec, "frames : %d", flxh->frames); + GST_INFO_OBJECT (flxdec, "width : %d", flxh->width); + GST_INFO_OBJECT (flxdec, "height : %d", flxh->height); + GST_INFO_OBJECT (flxdec, "depth : %d", flxh->depth); + GST_INFO_OBJECT (flxdec, "speed : %d", flxh->speed); flxdec->next_time = 0; @@ -571,18 +803,32 @@ gst_pad_set_caps (flxdec->srcpad, caps); gst_caps_unref (caps); - if (flxh->depth <= 8) - flxdec->converter = - flx_colorspace_converter_new (flxh->width, flxh->height); + /* zero means 8 */ + if (flxh->depth == 0) + flxh->depth = 8; + + if (flxh->depth != 8) { + GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, + ("%s", "Don't know how to decode non 8 bit depth streams"), (NULL)); + goto unmap_input_error; + } + + flxdec->converter = + flx_colorspace_converter_new (flxh->width, flxh->height); if (flxh->type == FLX_MAGICHDR_FLC || flxh->type == FLX_MAGICHDR_FLX) { - GST_LOG ("(FLC) aspect_dx : %d", flxh->aspect_dx); - GST_LOG ("(FLC) aspect_dy : %d", flxh->aspect_dy); - GST_LOG ("(FLC) oframe1 : 0x%08x", flxh->oframe1); - GST_LOG ("(FLC) oframe2 : 0x%08x", flxh->oframe2); + GST_INFO_OBJECT (flxdec, "(FLC) aspect_dx : %d", flxh->aspect_dx); + GST_INFO_OBJECT (flxdec, "(FLC) aspect_dy : %d", flxh->aspect_dy); + GST_INFO_OBJECT (flxdec, "(FLC) oframe1 : 0x%08x", flxh->oframe1); + GST_INFO_OBJECT (flxdec, "(FLC) oframe2 : 0x%08x", flxh->oframe2); } - flxdec->size = (flxh->width * flxh->height); + flxdec->size = ((guint) flxh->width * (guint) flxh->height); + if (flxdec->size >= G_MAXSIZE / 4) { + GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, + ("%s", "Cannot allocate required memory"), (NULL)); + goto unmap_input_error; + } /* create delta and output frame */ flxdec->frame_data = g_malloc (flxdec->size); @@ -594,55 +840,66 @@ GstBuffer *out; /* while we have enough data in the adapter */ - while (avail >= FlxFrameChunkSize && res == GST_FLOW_OK) { - FlxFrameChunk flxfh; - guchar *chunk; - const guint8 *data; - GstMapInfo map; - - chunk = NULL; - data = gst_adapter_map (flxdec->adapter, FlxFrameChunkSize); - memcpy (&flxfh, data, FlxFrameChunkSize); - FLX_FRAME_CHUNK_FIX_ENDIANNESS (&flxfh); - gst_adapter_unmap (flxdec->adapter); - - switch (flxfh.id) { - case FLX_FRAME_TYPE: - /* check if we have the complete frame */ - if (avail < flxfh.size) - goto need_more_data; - - /* flush header */ - gst_adapter_flush (flxdec->adapter, FlxFrameChunkSize); - - chunk = gst_adapter_take (flxdec->adapter, - flxfh.size - FlxFrameChunkSize); - FLX_FRAME_TYPE_FIX_ENDIANNESS ((FlxFrameType *) chunk); - if (((FlxFrameType *) chunk)->chunks == 0) + while (available >= FlxFrameChunkSize && res == GST_FLOW_OK) { + guint32 size; + guint16 type; + + if (!gst_byte_reader_get_uint32_le (&reader, &size)) + goto parse_error; + if (available < size) + goto need_more_data; + + available -= size; + gst_adapter_flush (flxdec->adapter, size); + + if (!gst_byte_reader_get_uint16_le (&reader, &type)) + goto parse_error; + + switch (type) { + case FLX_FRAME_TYPE:{ + GstByteReader chunks; + GstByteWriter writer; + guint16 n_chunks; + GstMapInfo map; + + GST_LOG_OBJECT (flxdec, "Have frame type 0x%02x of size %d", type, + size); + + if (!gst_byte_reader_get_sub_reader (&reader, &chunks, + size - FlxFrameChunkSize)) + goto parse_error; + + if (!gst_byte_reader_get_uint16_le (&chunks, &n_chunks)) + goto parse_error; + GST_LOG_OBJECT (flxdec, "Have %d chunks", n_chunks); + + if (n_chunks == 0) break; + if (!gst_byte_reader_skip (&chunks, 8)) /* reserved */ + goto parse_error; - /* create 32 bits output frame */ -// res = gst_pad_alloc_buffer_and_set_caps (flxdec->srcpad, -// GST_BUFFER_OFFSET_NONE, -// flxdec->size * 4, GST_PAD_CAPS (flxdec->srcpad), &out); -// if (res != GST_FLOW_OK) -// break; - - out = gst_buffer_new_and_alloc (flxdec->size * 4); + gst_byte_writer_init_with_data (&writer, flxdec->frame_data, + flxdec->size, TRUE); /* decode chunks */ - if (!flx_decode_chunks (flxdec, - ((FlxFrameType *) chunk)->chunks, - chunk + FlxFrameTypeSize, flxdec->frame_data)) { + if (!flx_decode_chunks (flxdec, n_chunks, &chunks, &writer)) { GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, ("%s", "Could not decode chunk"), NULL); - return GST_FLOW_ERROR; + goto unmap_input_error; } + gst_byte_writer_reset (&writer); /* save copy of the current frame for possible delta. */ memcpy (flxdec->delta_data, flxdec->frame_data, flxdec->size); - gst_buffer_map (out, &map, GST_MAP_WRITE); + out = gst_buffer_new_and_alloc (flxdec->size * 4); + if (!gst_buffer_map (out, &map, GST_MAP_WRITE)) { + GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, + ("%s", "Could not map output buffer"), NULL); + gst_buffer_unref (out); + goto unmap_input_error; + } + /* convert current frame. */ flx_colorspace_convert (flxdec->converter, flxdec->frame_data, map.data); @@ -653,31 +910,32 @@ res = gst_pad_push (flxdec->srcpad, out); break; + } default: - /* check if we have the complete frame */ - if (avail < flxfh.size) - goto need_more_data; - - gst_adapter_flush (flxdec->adapter, flxfh.size); + GST_DEBUG_OBJECT (flxdec, "Unknown frame type 0x%02x, skipping %d", + type, size); + if (!gst_byte_reader_skip (&reader, size - FlxFrameChunkSize)) + goto parse_error; break; } - - if (chunk) - g_free (chunk); - - avail = gst_adapter_available (flxdec->adapter); } } + + gst_buffer_unmap (input, &map_info); + gst_buffer_unref (input); + need_more_data: return res; /* ERRORS */ -wrong_type: - { - GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, (NULL), - ("not a flx file (type %x)", flxh->type)); - return GST_FLOW_ERROR; - } +parse_error: + GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, + ("%s", "Failed to parse stream"), (NULL)); +unmap_input_error: + gst_buffer_unmap (input, &map_info); + gst_buffer_unref (input); +error: + return GST_FLOW_ERROR; } static GstStateChangeReturn Index: gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.h =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/flx/gstflxdec.h 2016-11-25 09:17:37.501153583 -0500 +++ gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.h 2016-11-25 09:17:37.497153539 -0500 @@ -23,6 +23,8 @@ #include #include +#include +#include #include "flx_color.h" G_BEGIN_DECLS @@ -45,7 +47,7 @@ guint8 *delta_data, *frame_data; GstAdapter *adapter; - gulong size; + gsize size; GstFlxDecState state; gint64 frame_time; gint64 next_time; debian/patches/series0000664000000000000000000000031013064757426012044 0ustar add-pkgconfig-file import-camerabin import-jpegformat flxdec-bounds1.patch flxdec-bounds2.patch flxdec-bounds3.patch flxdec-bounds4.patch CVE-2016-10198.patch CVE-2016-10199.patch CVE-2017-5840.patch debian/patches/CVE-2017-5840.patch0000664000000000000000000000207613064757052013260 0ustar From 1ffef8bf6076c42bcbaaf0ec4f11ca4cf0c797da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 19 Jan 2017 13:46:58 +0200 Subject: [PATCH] qtdemux: Increment current stts index whenever we finished one stts entry Otherwise we could read more chunks than there are available, doing an out of bounds read and potentially crash. https://bugzilla.gnome.org/show_bug.cgi?id=777469 --- gst/isomp4/qtdemux.c | 2 ++ 1 file changed, 2 insertions(+) Index: gst-plugins-good1.0-1.2.4/gst/isomp4/qtdemux.c =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/isomp4/qtdemux.c 2017-03-23 10:39:34.107113801 -0400 +++ gst-plugins-good1.0-1.2.4/gst/isomp4/qtdemux.c 2017-03-23 10:39:34.099113701 -0400 @@ -6470,6 +6470,8 @@ /* save values */ stream->stts_time = stts_time; stream->stts_sample_index = j + 1; + if (stream->stts_sample_index >= stream->stts_samples) + stream->stts_index++; goto done3; } } debian/patches/import-camerabin0000664000000000000000000205314412241402410013772 0ustar Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -250,6 +250,17 @@ AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes") AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes") +dnl x11 is optional for librfb +HAVE_X11=NO +PKG_CHECK_MODULES(X11, x11, HAVE_X11=yes, HAVE_X11=no) +AC_SUBST(X11_LIBS) +AC_SUBST(X11_CFLAGS) +AC_SUBST(HAVE_X11) +AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "xyes") +if test "x$HAVE_X11" = "xyes"; then + AC_DEFINE(HAVE_X11, 1, [Define if you have X11 library]) +fi + dnl *** set variables based on configure arguments *** dnl set license and copyright notice @@ -331,6 +342,7 @@ AG_GST_CHECK_PLUGIN(auparse) AG_GST_CHECK_PLUGIN(autodetect) AG_GST_CHECK_PLUGIN(avi) +AG_GST_CHECK_PLUGIN(camerabin2) AG_GST_CHECK_PLUGIN(cutter) AG_GST_CHECK_PLUGIN(debugutils) AG_GST_CHECK_PLUGIN(deinterlace) @@ -1131,6 +1143,7 @@ gst/auparse/Makefile gst/autodetect/Makefile gst/avi/Makefile +gst/camerabin2/Makefile gst/cutter/Makefile gst/deinterlace/Makefile gst/dtmf/Makefile @@ -1167,6 +1180,10 @@ gst/wavparse/Makefile gst/flx/Makefile gst/y4m/Makefile +gst-libs/Makefile +gst-libs/gst/Makefile +gst-libs/gst/interfaces/Makefile +gst-libs/gst/basecamerabinsrc/Makefile ext/Makefile ext/aalib/Makefile ext/cairo/Makefile @@ -1200,6 +1217,7 @@ tests/check/Makefile tests/examples/Makefile tests/examples/audiofx/Makefile +tests/examples/camerabin2/Makefile tests/examples/cairo/Makefile tests/examples/equalizer/Makefile tests/examples/jack/Makefile Index: b/gst/camerabin2/camerabingeneral.c =================================================================== --- /dev/null +++ b/gst/camerabin2/camerabingeneral.c @@ -0,0 +1,259 @@ +/* + * GStreamer + * Copyright (C) 2008 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:camerabingeneral + * @short_description: helper functions for #GstCameraBin2 and it's modules + * + * Common helper functions for #GstCameraBin2, #GstCameraBin2Image and + * #GstCameraBin2Video. + * + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "camerabingeneral.h" + +/** + * gst_camerabin_add_element: + * @bin: add an element to this bin + * @new_elem: new element to be added + * + * Adds given element to given @bin. Looks for an unconnected src pad + * from the @bin and links the element to it. Raises an error if adding + * or linking failed. Unrefs the element in the case of an error. + * + * Returns: %TRUE if adding and linking succeeded, %FALSE otherwise. + */ +gboolean +gst_camerabin_add_element (GstBin * bin, GstElement * new_elem) +{ + return gst_camerabin_add_element_full (bin, NULL, new_elem, NULL); +} + +/** + * gst_camerabin_add_element_full: + * @bin: add an element to this bin + * @srcpad: src pad name, or NULL for any + * @new_elem: new element to be added + * @dstpad: dst pad name, or NULL for any + * + * Adds given element to given @bin. Looks for an unconnected src pad + * (with name @srcpad, if specified) from the @bin and links the element + * to it. Raises an error if adding or linking failed. Unrefs the element + * in the case of an error. + * + * Returns: %TRUE if adding and linking succeeded, %FALSE otherwise. + */ +gboolean +gst_camerabin_add_element_full (GstBin * bin, const gchar * srcpad, + GstElement * new_elem, const gchar * dstpad) +{ + gboolean ret; + + g_return_val_if_fail (bin, FALSE); + g_return_val_if_fail (new_elem, FALSE); + + ret = gst_camerabin_try_add_element (bin, srcpad, new_elem, dstpad); + + if (!ret) { + gchar *elem_name = gst_element_get_name (new_elem); + GST_ELEMENT_ERROR (bin, CORE, NEGOTIATION, (NULL), + ("linking %s failed", elem_name)); + g_free (elem_name); + gst_object_unref (new_elem); + } + + return ret; +} + +/** + * gst_camerabin_try_add_element: + * @bin: tries adding an element to this bin + * @srcpad: src pad name, or NULL for any + * @new_elem: new element to be added + * @dstpad: dst pad name, or NULL for any + * + * Adds given element to given @bin. Looks for an unconnected src pad + * (with name @srcpad, if specified) from the @bin and links the element to + * it. + * + * Returns: %TRUE if adding and linking succeeded, %FALSE otherwise. + */ +gboolean +gst_camerabin_try_add_element (GstBin * bin, const gchar * srcpad, + GstElement * new_elem, const gchar * dstpad) +{ + GstPad *bin_pad; + GstElement *bin_elem; + gboolean ret = TRUE; + + g_return_val_if_fail (bin, FALSE); + g_return_val_if_fail (new_elem, FALSE); + + /* Get pads for linking */ + bin_pad = gst_bin_find_unlinked_pad (bin, GST_PAD_SRC); + /* Add to bin */ + gst_bin_add (GST_BIN (bin), new_elem); + /* Link, if unconnected pad was found, otherwise just add it to bin */ + if (bin_pad) { + GST_DEBUG_OBJECT (bin, "linking %s to %s:%s", GST_OBJECT_NAME (new_elem), + GST_DEBUG_PAD_NAME (bin_pad)); + bin_elem = gst_pad_get_parent_element (bin_pad); + gst_object_unref (bin_pad); + if (!gst_element_link_pads_full (bin_elem, srcpad, new_elem, dstpad, + GST_PAD_LINK_CHECK_CAPS)) { + gst_object_ref (new_elem); + gst_bin_remove (bin, new_elem); + ret = FALSE; + } + gst_object_unref (bin_elem); + } else { + GST_INFO_OBJECT (bin, "no unlinked source pad in bin"); + } + + return ret; +} + +/** + * gst_camerabin_create_and_add_element: + * @bin: tries adding an element to this bin + * @elem_name: name of the element to be created + * @instance_name: name of the instance of the element to be created + * + * Creates an element according to given name and + * adds it to given @bin. Looks for an unconnected src pad + * from the @bin and links the element to it. + * + * Returns: pointer to the new element if successful, NULL otherwise. + */ +GstElement * +gst_camerabin_create_and_add_element (GstBin * bin, const gchar * elem_name, + const gchar * instance_name) +{ + GstElement *new_elem; + + g_return_val_if_fail (bin, FALSE); + g_return_val_if_fail (elem_name, FALSE); + + new_elem = gst_element_factory_make (elem_name, instance_name); + if (!new_elem) { + GST_ELEMENT_ERROR (bin, CORE, MISSING_PLUGIN, + (_("Missing element '%s' - check your GStreamer installation."), + elem_name), (NULL)); + } else if (!gst_camerabin_add_element (bin, new_elem)) { + new_elem = NULL; + } + + return new_elem; +} + +/* try to change the state of an element. This function returns the element + * when the state change could be performed. When this function returns NULL + * an error occured and the element is unreffed. */ +static GstElement * +try_element (GstElement * bin, GstElement * element) +{ + GstStateChangeReturn ret; + + if (element) { + ret = gst_element_set_state (element, GST_STATE_READY); + if (ret == GST_STATE_CHANGE_FAILURE) { + GST_DEBUG_OBJECT (bin, "failed state change.."); + gst_element_set_state (element, GST_STATE_NULL); + gst_object_unref (element); + element = NULL; + } + } + return element; +} + +GstElement * +gst_camerabin_setup_default_element (GstBin * bin, GstElement * user_elem, + const gchar * auto_elem_name, const gchar * default_elem_name, + const gchar * instance_name) +{ + GstElement *elem; + + if (user_elem) { + GST_DEBUG_OBJECT (bin, "trying configured element"); + elem = try_element (GST_ELEMENT_CAST (bin), gst_object_ref (user_elem)); + } else { + /* only try fallback if no specific sink was chosen */ + GST_DEBUG_OBJECT (bin, "trying %s", auto_elem_name); + elem = gst_element_factory_make (auto_elem_name, instance_name); + elem = try_element (GST_ELEMENT_CAST (bin), elem); + if (elem == NULL) { + /* if default sink from config.h is different then try it too */ + if (strcmp (default_elem_name, auto_elem_name)) { + GST_DEBUG_OBJECT (bin, "trying %s", default_elem_name); + elem = gst_element_factory_make (default_elem_name, instance_name); + elem = try_element (GST_ELEMENT_CAST (bin), elem); + } + } + } + return elem; +} + +/** + * gst_camerabin_remove_elements_from_bin: + * @bin: removes all elements from this bin + * + * Removes all elements from this @bin. + */ +void +gst_camerabin_remove_elements_from_bin (GstBin * bin) +{ + GstIterator *iter = NULL; + GValue value = { 0 }; + GstElement *elem = NULL; + gboolean done = FALSE; + + iter = gst_bin_iterate_elements (bin); + while (!done) { + switch (gst_iterator_next (iter, &value)) { + case GST_ITERATOR_OK: + elem = (GstElement *) g_value_get_object (&value); + gst_bin_remove (bin, elem); + gst_element_set_state (GST_ELEMENT (elem), GST_STATE_NULL); + /* Iterator increased the element refcount, so unref */ + g_value_unset (&value); + break; + case GST_ITERATOR_RESYNC: + gst_iterator_resync (iter); + break; + case GST_ITERATOR_ERROR: + GST_WARNING_OBJECT (bin, "error in iterating elements"); + done = TRUE; + break; + case GST_ITERATOR_DONE: + done = TRUE; + break; + } + } + gst_iterator_free (iter); +} Index: b/gst/camerabin2/camerabingeneral.h =================================================================== --- /dev/null +++ b/gst/camerabin2/camerabingeneral.h @@ -0,0 +1,37 @@ +/* + * GStreamer + * Copyright (C) 2008 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CAMERABIN_GENERAL_H_ +#define __CAMERABIN_GENERAL_H_ + +#include + +gboolean gst_camerabin_try_add_element (GstBin * bin, const gchar * srcpad, GstElement * new_elem, const gchar * dstpad); +gboolean gst_camerabin_add_element (GstBin * bin, GstElement * new_elem); +gboolean gst_camerabin_add_element_full (GstBin * bin, const gchar * srcpad, GstElement * new_elem, const gchar * dstpad); + +GstElement *gst_camerabin_create_and_add_element (GstBin * bin, const gchar * elem_name, const gchar * instance_name); + +GstElement * gst_camerabin_setup_default_element (GstBin * bin, GstElement *user_elem, const gchar *auto_elem_name, const gchar *default_elem_name, + const gchar * instance_elem_name); + +void gst_camerabin_remove_elements_from_bin (GstBin * bin); + +#endif /* #ifndef __CAMERABIN_GENERAL_H_ */ Index: b/gst/camerabin2/gstcamerabin2.c =================================================================== --- /dev/null +++ b/gst/camerabin2/gstcamerabin2.c @@ -0,0 +1,2430 @@ +/* GStreamer + * Copyright (C) 2010 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/** + * SECTION:element-camerabin2 + * + * CameraBin2 is a high-level camera object that encapsulates gstreamer + * elements, providing an API for controlling a digital camera. + * + * + * Note that camerabin2 is still UNSTABLE and under + * development. + * + * + * CameraBin2 has the following main features: + * + * + * Record videos + * + * + * Capture pictures + * + * + * Display a viewfinder + * + * + * Post preview images for each capture (video and image) + * + * + * + * + * Usage + * + * Camerabin2 can be created using gst_element_factory_make() just like + * any other element. Video or image capture mode can be selected using + * the #GstCameraBin:mode property and the file to save the capture is + * selected using #GstCameraBin:location property. + * + * After creating camerabin2, applications might want to do some + * customization (there's a section about this below), then select + * the desired mode and start capturing. + * + * In image capture mode, just send a #GstCameraBin:start-capture and a + * picture will be captured. When the picture is stored on the selected + * location, a %GST_MESSAGE_ELEMENT named 'image-done' will be posted on + * the #GstBus. + * + * In video capture mode, send a #GstCameraBin:start-capture to start + * recording, then send a #GstCameraBin:stop-capture to stop recording. + * Note that both signals are asynchronous, so, calling + * #GstCameraBin:stop-capture doesn't guarantee that the video has been + * properly finished yet. Applications should wait for the 'video-done' + * message to be posted on the bus. + * + * In both modes, if #GstCameraBin:post-previews is %TRUE, a #GstBuffer + * will be post to the #GstBus in a field named 'buffer', in a + * 'preview-image' message of type %GST_MESSAGE_ELEMENT. + * + * + + * + * Customization + * + * Camerabin2 provides various customization properties, allowing the user + * to set custom filters, selecting the viewfinder sink and formats to + * use to encode the captured images/videos. + * + * #GstEncodingProfiles are used to tell camerabin2 which formats it + * should encode the captures to, those should be set to + * #GstCameraBin:image-profile and #GstCameraBin:video-profile. Default is + * jpeg for images, and ogg (theora and vorbis) for video. If a profile without + * an audio stream is set for video, audio will be disabled on recordings. + * + * #GstCameraBin:preview-caps can be used to select which format preview + * images should be posted on the #GstBus. It has to be a raw video format. + * + * Camerabin2 has a #GstCameraBin:camera-source property so applications can + * set their source that will provide buffers for the viewfinder and for + * captures. This camera source is a special type of source that has 3 pads. + * To use a 'regular' source with a single pad you should use + * #GstWrapperCameraBinSource, it will adapt your source and provide 3 pads. + * + * Applications can also select the desired viewfinder sink using + * #GstCameraBin:viewfinder-sink, it is also possible to select the audio + * source using #GstCameraBin:audio-source. + * + * The viewfinder resolution can be configured using + * #GstCameraBin:viewfinder-caps, these #GstCaps should be a subset of + * #GstCameraBin:viewfinder-supported-caps. + * + * To select the desired resolution for captures, camerabin2 provides + * #GstCameraBin:image-capture-caps and #GstCameraBin:video-capture-caps, + * these caps must be a subset of what the source can produce. The allowed + * caps can be probed using #GstCameraBin:image-capture-supported-caps and + * #GstCameraBin:video-capture-supported-caps. In an analogous way, there + * are #GstCameraBin:audio-capture-caps and + * #GstCameraBin:audio-capture-supported-caps. + * + * Camerabin also allows applications to insert custom #GstElements on any + * of its branches: video capture, image capture, viewfinder and preview. + * Check #GstCameraBin:video-filter, #GstCameraBin:image-filter, + * #GstCameraBin:viewfinder-filter and #GstCameraBin:preview-filter. + * + * + * + * + * Example launch line + * + * Unfortunately, camerabin can't be really used from gst-launch, as you need + * to send signals to control it. The following pipeline might be able + * to show the viewfinder using all the default elements. + * |[ + * gst-launch -v -m camerabin + * ]| + * + * + + */ + +/* + * Detail Topics: + * + * videorecordingbin state management (for now on called 'videobin') + * - The problem: keeping videobin state in sync with camerabin will make it + * go to playing when it might not be used, causing its internal + * filesink to open a file that might be left blank. + * - The solution: videobin state is set to locked upon its creation and camerabin + * registers itself on the notify::ready-for-capture of the src. + * Whenever the src readyness goes to FALSE it means a new + * capture is starting. If we are on video mode, the videobin's + * state is set to NULL and then PLAYING (in between this we + * have room to set the destination filename). + * There is no problem to leave it on playing after an EOS, so + * no action is taken on stop-capture. + * + * - TODO: What happens when an error pops? + * - TODO: Should we split properties in image/video variants? We already do so + * for some of them + * + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include "gstcamerabin2.h" +#include +#include +#include + +#if GLIB_CHECK_VERSION(2,29,6) +#define gst_camerabin2_atomic_int_add g_atomic_int_add +#else +#define gst_camerabin2_atomic_int_add g_atomic_int_exchange_and_add +#endif + +#define GST_CAMERA_BIN2_PROCESSING_INC(c) \ +{ \ + gint bef = gst_camerabin2_atomic_int_add (&c->processing_counter, 1); \ + if (bef == 0) \ + g_object_notify (G_OBJECT (c), "idle"); \ + GST_DEBUG_OBJECT ((c), "Processing counter incremented to: %d", \ + bef + 1); \ +} + +#define GST_CAMERA_BIN2_PROCESSING_DEC(c) \ +{ \ + if (g_atomic_int_dec_and_test (&c->processing_counter)) { \ + g_object_notify (G_OBJECT (c), "idle"); \ + GST_DEBUG_OBJECT ((c), "Camerabin now idle"); \ + } \ + GST_DEBUG_OBJECT ((c), "Processing counter decremented"); \ +} + +#define GST_CAMERA_BIN2_RESET_PROCESSING_COUNTER(c) \ +{ \ + g_atomic_int_set (&c->processing_counter, 0); \ + GST_DEBUG_OBJECT ((c), "Processing counter reset"); \ +} + +GST_DEBUG_CATEGORY_STATIC (gst_camera_bin_debug); +#define GST_CAT_DEFAULT gst_camera_bin_debug + +/* prototypes */ + +enum +{ + PROP_0, + PROP_MODE, + PROP_LOCATION, + PROP_CAMERA_SRC, + PROP_IMAGE_CAPTURE_SUPPORTED_CAPS, + PROP_VIDEO_CAPTURE_SUPPORTED_CAPS, + PROP_IMAGE_CAPTURE_CAPS, + PROP_VIDEO_CAPTURE_CAPS, + PROP_POST_PREVIEWS, + PROP_PREVIEW_CAPS, + PROP_VIDEO_ENCODING_PROFILE, + PROP_IMAGE_FILTER, + PROP_VIDEO_FILTER, + PROP_VIEWFINDER_FILTER, + PROP_PREVIEW_FILTER, + PROP_VIEWFINDER_SINK, + PROP_VIEWFINDER_SUPPORTED_CAPS, + PROP_VIEWFINDER_CAPS, + PROP_AUDIO_SRC, + PROP_MUTE_AUDIO, + PROP_AUDIO_CAPTURE_SUPPORTED_CAPS, + PROP_AUDIO_CAPTURE_CAPS, + PROP_ZOOM, + PROP_MAX_ZOOM, + PROP_IMAGE_ENCODING_PROFILE, + PROP_IDLE, + PROP_FLAGS, + PROP_AUDIO_FILTER +}; + +enum +{ + /* action signals */ + START_CAPTURE_SIGNAL, + STOP_CAPTURE_SIGNAL, + /* emit signals */ + LAST_SIGNAL +}; +static guint camerabin_signals[LAST_SIGNAL]; + +#define DEFAULT_MODE MODE_IMAGE +#define DEFAULT_LOCATION "cap_%d" +#define DEFAULT_POST_PREVIEWS FALSE +#define DEFAULT_MUTE_AUDIO FALSE +#define DEFAULT_IDLE TRUE +#define DEFAULT_FLAGS 0 + +#define DEFAULT_AUDIO_SRC "autoaudiosrc" + +/******************************** + * Standard GObject boilerplate * + * and GObject types * + ********************************/ + +static GstPipelineClass *parent_class; +static void gst_camera_bin_class_init (GstCameraBin2Class * klass); +static void gst_camera_bin_base_init (gpointer klass); +static void gst_camera_bin_init (GstCameraBin2 * camera); +static void gst_camera_bin_dispose (GObject * object); +static void gst_camera_bin_finalize (GObject * object); + +static void gst_camera_bin_handle_message (GstBin * bin, GstMessage * message); +static gboolean gst_camera_bin_send_event (GstElement * element, + GstEvent * event); + +#define C_FLAGS(v) ((guint) v) +#define GST_TYPE_CAM_FLAGS (gst_cam_flags_get_type()) +static GType +gst_cam_flags_get_type (void) +{ + static const GFlagsValue values[] = { + {C_FLAGS (GST_CAM_FLAG_NO_AUDIO_CONVERSION), "Do not use audio conversion " + "elements", "no-audio-conversion"}, + {C_FLAGS (GST_CAM_FLAG_NO_VIDEO_CONVERSION), "Do not use video conversion " + "elements", "no-video-conversion"}, + {C_FLAGS (GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION), + "Do not use viewfinder conversion " "elements", + "no-viewfinder-conversion"}, + {C_FLAGS (GST_CAM_FLAG_NO_IMAGE_CONVERSION), "Do not use image conversion " + "elements", "no-image-conversion"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_flags_register_static ("GstCamFlags", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +GType +gst_camera_bin2_get_type (void) +{ + static GType gst_camera_bin_type = 0; + static const GInterfaceInfo camerabin_tagsetter_info = { + NULL, + NULL, + NULL, + }; + + if (!gst_camera_bin_type) { + static const GTypeInfo gst_camera_bin_info = { + sizeof (GstCameraBin2Class), + (GBaseInitFunc) gst_camera_bin_base_init, + NULL, + (GClassInitFunc) gst_camera_bin_class_init, + NULL, + NULL, + sizeof (GstCameraBin2), + 0, + (GInstanceInitFunc) gst_camera_bin_init, + NULL + }; + + gst_camera_bin_type = + g_type_register_static (GST_TYPE_PIPELINE, "GstCameraBin", + &gst_camera_bin_info, 0); + + g_type_add_interface_static (gst_camera_bin_type, GST_TYPE_TAG_SETTER, + &camerabin_tagsetter_info); + } + + return gst_camera_bin_type; +} + +/* GObject class functions */ +static void gst_camera_bin_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_camera_bin_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); + +/* Element class functions */ +static GstStateChangeReturn +gst_camera_bin_change_state (GstElement * element, GstStateChange trans); + + +/* Camerabin functions */ + +static GstEvent * +gst_camera_bin_new_event_file_location (const gchar * location) +{ + return gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, + gst_structure_new ("new-location", "location", G_TYPE_STRING, location, + NULL)); +} + +static void +gst_camera_bin_start_capture (GstCameraBin2 * camerabin) +{ + const GstTagList *taglist; + gint capture_index = camerabin->capture_index; + gchar *location = NULL; + GST_DEBUG_OBJECT (camerabin, "Received start-capture"); + + /* check that we have a valid location */ + if (camerabin->mode == MODE_VIDEO) { + if (camerabin->location == NULL) { + GST_ELEMENT_ERROR (camerabin, RESOURCE, OPEN_WRITE, + (_("File location is set to NULL, please set it to a valid filename")), (NULL)); + return; + } + + g_mutex_lock (&camerabin->video_capture_mutex); + while (camerabin->video_state == GST_CAMERA_BIN_VIDEO_FINISHING) { + g_cond_wait (&camerabin->video_state_cond, + &camerabin->video_capture_mutex); + } + if (camerabin->video_state != GST_CAMERA_BIN_VIDEO_IDLE) { + GST_WARNING_OBJECT (camerabin, "Another video recording is ongoing" + " (state %d), cannot start a new one", camerabin->video_state); + g_mutex_unlock (&camerabin->video_capture_mutex); + return; + } + camerabin->video_state = GST_CAMERA_BIN_VIDEO_STARTING; + } + + GST_CAMERA_BIN2_PROCESSING_INC (camerabin); + + if (camerabin->location) + location = g_strdup_printf (camerabin->location, capture_index); + + if (camerabin->mode == MODE_IMAGE) { + /* store the next capture buffer filename */ + g_mutex_lock (&camerabin->image_capture_mutex); + camerabin->image_location_list = + g_slist_append (camerabin->image_location_list, g_strdup (location)); + g_mutex_unlock (&camerabin->image_capture_mutex); + } + + if (camerabin->post_previews) { + /* Count processing of preview images too */ + GST_CAMERA_BIN2_PROCESSING_INC (camerabin); + /* store the next preview filename */ + g_mutex_lock (&camerabin->preview_list_mutex); + camerabin->preview_location_list = + g_slist_append (camerabin->preview_location_list, location); + g_mutex_unlock (&camerabin->preview_list_mutex); + } else { + g_free (location); + } + + g_signal_emit_by_name (camerabin->src, "start-capture", NULL); + if (camerabin->mode == MODE_VIDEO) { + camerabin->audio_send_newseg = TRUE; + if (camerabin->audio_src) + gst_element_set_state (camerabin->audio_src, GST_STATE_PLAYING); + + camerabin->video_state = GST_CAMERA_BIN_VIDEO_RECORDING; + g_mutex_unlock (&camerabin->video_capture_mutex); + } + + /* + * We have to push tags after start capture because the video elements + * might be flushing from the previous capture and are reset only on the + * notify from ready for capture going to FALSE + */ + taglist = gst_tag_setter_get_tag_list (GST_TAG_SETTER (camerabin)); + GST_DEBUG_OBJECT (camerabin, "Have tags from application: %" + GST_PTR_FORMAT, taglist); + + if (camerabin->mode == MODE_IMAGE) { + /* Store image tags in a list and push them later, this prevents + start_capture() from blocking in pad_push_event call */ + g_mutex_lock (&camerabin->image_capture_mutex); + camerabin->image_tags_list = + g_slist_append (camerabin->image_tags_list, + taglist ? gst_tag_list_copy (taglist) : NULL); + g_mutex_unlock (&camerabin->image_capture_mutex); + } else if (taglist) { + GstPad *active_pad; + + active_pad = gst_element_get_static_pad (camerabin->src, + GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME); + gst_pad_push_event (active_pad, + gst_event_new_tag (gst_tag_list_copy (taglist))); + + gst_object_unref (active_pad); + } + + GST_DEBUG_OBJECT (camerabin, "Start-capture end"); +} + +static void +gst_camera_bin_stop_capture (GstCameraBin2 * camerabin) +{ + GST_DEBUG_OBJECT (camerabin, "Received stop-capture"); + if (camerabin->mode == MODE_VIDEO) { + g_mutex_lock (&camerabin->video_capture_mutex); + if (camerabin->video_state == GST_CAMERA_BIN_VIDEO_RECORDING) { + if (camerabin->src) + g_signal_emit_by_name (camerabin->src, "stop-capture", NULL); + + camerabin->video_state = GST_CAMERA_BIN_VIDEO_FINISHING; + if (camerabin->audio_src) { + camerabin->audio_drop_eos = FALSE; + gst_element_send_event (camerabin->audio_src, gst_event_new_eos ()); + } + } + g_mutex_unlock (&camerabin->video_capture_mutex); + } +} + +static void +gst_camera_bin_change_mode (GstCameraBin2 * camerabin, gint mode) +{ + if (mode == camerabin->mode) + return; + + GST_DEBUG_OBJECT (camerabin, "Changing mode to %d", mode); + + /* stop any ongoing capture */ + gst_camera_bin_stop_capture (camerabin); + camerabin->mode = mode; + if (camerabin->src) + g_object_set (camerabin->src, "mode", mode, NULL); +} + +static void +gst_camera_bin_src_notify_readyforcapture (GObject * obj, GParamSpec * pspec, + gpointer user_data) +{ + GstCameraBin2 *camera = GST_CAMERA_BIN2_CAST (user_data); + gboolean ready; + + g_object_get (camera->src, "ready-for-capture", &ready, NULL); + if (!ready) { + gchar *location = NULL; + + if (camera->mode == MODE_VIDEO) { + /* a video recording is about to start, change the filesink location */ + gst_element_set_state (camera->videosink, GST_STATE_NULL); + location = g_strdup_printf (camera->location, camera->capture_index); + GST_DEBUG_OBJECT (camera, "Switching videobin location to %s", location); + g_object_set (camera->videosink, "location", location, NULL); + g_free (location); + if (gst_element_set_state (camera->videosink, GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + /* Resets the latest state change return, that would be a failure + * and could cause problems in a camerabin2 state change */ + gst_element_set_state (camera->videosink, GST_STATE_NULL); + } + } + + camera->capture_index++; + } +} + +static void +gst_camera_bin_dispose (GObject * object) +{ + GstCameraBin2 *camerabin = GST_CAMERA_BIN2_CAST (object); + + g_free (camerabin->location); + g_mutex_clear (&camerabin->preview_list_mutex); + g_mutex_clear (&camerabin->image_capture_mutex); + g_mutex_clear (&camerabin->video_capture_mutex); + g_cond_clear (&camerabin->video_state_cond); + + if (camerabin->src_capture_notify_id) + g_signal_handler_disconnect (camerabin->src, + camerabin->src_capture_notify_id); + if (camerabin->src) + gst_object_unref (camerabin->src); + if (camerabin->user_src) + gst_object_unref (camerabin->user_src); + + if (camerabin->audio_src) + gst_object_unref (camerabin->audio_src); + if (camerabin->user_audio_src) + gst_object_unref (camerabin->user_audio_src); + + if (camerabin->audio_capsfilter) + gst_object_unref (camerabin->audio_capsfilter); + if (camerabin->audio_volume) + gst_object_unref (camerabin->audio_volume); + + if (camerabin->viewfinderbin) + gst_object_unref (camerabin->viewfinderbin); + if (camerabin->viewfinderbin_queue) + gst_object_unref (camerabin->viewfinderbin_queue); + if (camerabin->viewfinderbin_capsfilter) + gst_object_unref (camerabin->viewfinderbin_capsfilter); + + if (camerabin->video_encodebin_signal_id) + g_signal_handler_disconnect (camerabin->video_encodebin, + camerabin->video_encodebin_signal_id); + + if (camerabin->videosink) + gst_object_unref (camerabin->videosink); + if (camerabin->video_encodebin) + gst_object_unref (camerabin->video_encodebin); + if (camerabin->videobin_capsfilter) + gst_object_unref (camerabin->videobin_capsfilter); + + if (camerabin->image_encodebin_signal_id) + g_signal_handler_disconnect (camerabin->image_encodebin, + camerabin->image_encodebin_signal_id); + if (camerabin->imagesink) + gst_object_unref (camerabin->imagesink); + if (camerabin->image_encodebin) + gst_object_unref (camerabin->image_encodebin); + if (camerabin->imagebin_capsfilter) + gst_object_unref (camerabin->imagebin_capsfilter); + + if (camerabin->video_filter) + gst_object_unref (camerabin->video_filter); + if (camerabin->image_filter) + gst_object_unref (camerabin->image_filter); + if (camerabin->viewfinder_filter) + gst_object_unref (camerabin->viewfinder_filter); + if (camerabin->audio_filter) + gst_object_unref (camerabin->audio_filter); + + if (camerabin->user_video_filter) + gst_object_unref (camerabin->user_video_filter); + if (camerabin->user_audio_filter) + gst_object_unref (camerabin->user_audio_filter); + if (camerabin->user_image_filter) + gst_object_unref (camerabin->user_image_filter); + if (camerabin->user_viewfinder_filter) + gst_object_unref (camerabin->user_viewfinder_filter); + + if (camerabin->video_profile) + gst_encoding_profile_unref (camerabin->video_profile); + if (camerabin->image_profile) + gst_encoding_profile_unref (camerabin->image_profile); + + if (camerabin->preview_caps) + gst_caps_replace (&camerabin->preview_caps, NULL); + if (camerabin->preview_filter) { + gst_object_unref (camerabin->preview_filter); + camerabin->preview_filter = NULL; + } + + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +gst_camera_bin_finalize (GObject * object) +{ + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gst_camera_bin_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_static_metadata (element_class, "Camera Bin", + "Generic/Bin/Camera", + "Take image snapshots and record movies from camera", + "Thiago Santos "); +} + +static void +gst_camera_bin_class_init (GstCameraBin2Class * klass) +{ + GObjectClass *object_class; + GstElementClass *element_class; + GstBinClass *bin_class; + + parent_class = g_type_class_peek_parent (klass); + object_class = G_OBJECT_CLASS (klass); + element_class = GST_ELEMENT_CLASS (klass); + bin_class = GST_BIN_CLASS (klass); + + object_class->dispose = gst_camera_bin_dispose; + object_class->finalize = gst_camera_bin_finalize; + object_class->set_property = gst_camera_bin_set_property; + object_class->get_property = gst_camera_bin_get_property; + + element_class->change_state = GST_DEBUG_FUNCPTR (gst_camera_bin_change_state); + element_class->send_event = GST_DEBUG_FUNCPTR (gst_camera_bin_send_event); + + bin_class->handle_message = gst_camera_bin_handle_message; + + klass->start_capture = gst_camera_bin_start_capture; + klass->stop_capture = gst_camera_bin_stop_capture; + + /** + * GstCameraBin2:mode: + * + * Set the mode of operation: still image capturing or video recording. + */ + g_object_class_install_property (object_class, PROP_MODE, + g_param_spec_enum ("mode", "Mode", + "The capture mode (still image capture or video recording)", + GST_TYPE_CAMERABIN_MODE, DEFAULT_MODE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_LOCATION, + g_param_spec_string ("location", "Location", + "Location to save the captured files. A %d might be used on the" + "filename as a placeholder for a numeric index of the capture." + "Default is cap_%d", + DEFAULT_LOCATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_CAMERA_SRC, + g_param_spec_object ("camera-source", "Camera source", + "The camera source element to be used. It is only taken into use on" + " the next null to ready transition", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_AUDIO_SRC, + g_param_spec_object ("audio-source", "Audio source", + "The audio source element to be used on video recordings. It is only" + " taken into use on the next null to ready transition", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_MUTE_AUDIO, + g_param_spec_boolean ("mute", "Mute", + "If the audio recording should be muted. Note that this still " + "saves audio data to the resulting file, but they are silent. Use " + "a video-profile without audio to disable audio completely", + DEFAULT_MUTE_AUDIO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, + PROP_AUDIO_CAPTURE_SUPPORTED_CAPS, + g_param_spec_boxed ("audio-capture-supported-caps", + "Audio capture supported caps", + "Formats supported for capturing audio represented as GstCaps", + GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, + PROP_AUDIO_CAPTURE_CAPS, + g_param_spec_boxed ("audio-capture-caps", + "Audio capture caps", + "Format to capture audio for video recording represented as GstCaps", + GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, + PROP_IMAGE_CAPTURE_SUPPORTED_CAPS, + g_param_spec_boxed ("image-capture-supported-caps", + "Image capture supported caps", + "Formats supported for capturing images represented as GstCaps", + GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, + PROP_VIDEO_CAPTURE_SUPPORTED_CAPS, + g_param_spec_boxed ("video-capture-supported-caps", + "Video capture supported caps", + "Formats supported for capturing videos represented as GstCaps", + GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, + PROP_IMAGE_CAPTURE_CAPS, + g_param_spec_boxed ("image-capture-caps", + "Image capture caps", + "Caps for image capture", + GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, + PROP_VIDEO_CAPTURE_CAPS, + g_param_spec_boxed ("video-capture-caps", + "Video capture caps", + "Caps for video capture", + GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_POST_PREVIEWS, + g_param_spec_boolean ("post-previews", "Post Previews", + "If capture preview images should be posted to the bus", + DEFAULT_POST_PREVIEWS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_PREVIEW_CAPS, + g_param_spec_boxed ("preview-caps", "Preview caps", + "The caps of the preview image to be posted", + GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_VIDEO_ENCODING_PROFILE, + g_param_spec_object ("video-profile", "Video Profile", + "The GstEncodingProfile to use for video recording. Audio is enabled " + "when this profile supports audio.", GST_TYPE_ENCODING_PROFILE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_IMAGE_FILTER, + g_param_spec_object ("image-filter", "Image filter", + "The element that will process captured image frames. (Should be" + " set on NULL state)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_VIDEO_FILTER, + g_param_spec_object ("video-filter", "Video filter", + "The element that will process captured video frames. (Should be" + " set on NULL state)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_VIEWFINDER_FILTER, + g_param_spec_object ("viewfinder-filter", "Viewfinder filter", + "The element that will process frames going to the viewfinder." + " (Should be set on NULL state)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_AUDIO_FILTER, + g_param_spec_object ("audio-filter", "Audio filter", + "The element that will process captured audio buffers when recording" + ". (Should be set on NULL state)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_PREVIEW_FILTER, + g_param_spec_object ("preview-filter", "Preview filter", + "The element that will process preview buffers." + " (Should be set on NULL state)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_VIEWFINDER_SINK, + g_param_spec_object ("viewfinder-sink", "Viewfinder sink", + "The video sink of the viewfinder. It is only taken into use" + " on the next null to ready transition", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, + PROP_VIEWFINDER_CAPS, + g_param_spec_boxed ("viewfinder-caps", + "Viewfinder caps", + "Restricts the caps that can be used on the viewfinder", + GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_ZOOM, + g_param_spec_float ("zoom", "Zoom", + "Digital zoom factor (e.g. 1.5 means 1.5x)", MIN_ZOOM, MAX_ZOOM, + DEFAULT_ZOOM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_MAX_ZOOM, + g_param_spec_float ("max-zoom", "Maximum zoom level (note: may change " + "depending on resolution/implementation)", + "Digital zoom factor (e.g. 1.5 means 1.5x)", MIN_ZOOM, G_MAXFLOAT, + MAX_ZOOM, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /* TODO + * Review before stable + * - One problem with using encodebin for images here is how jifmux + * autoplugging works. We need to give it a higher rank and fix its + * caps (it has image/jpeg on sink and src pads). Preliminary tests + * show that jifmux is picked if image/jpeg is the caps of a container + * profile. So this could work. + * - There seems to be a problem with encodebin for images currently as + * it autoplugs a videorate that only starts outputing buffers after + * getting the 2nd buffer. + */ + g_object_class_install_property (object_class, PROP_IMAGE_ENCODING_PROFILE, + g_param_spec_object ("image-profile", "Image Profile", + "The GstEncodingProfile to use for image captures.", + GST_TYPE_ENCODING_PROFILE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + + g_object_class_install_property (object_class, PROP_IDLE, + g_param_spec_boolean ("idle", "Idle", + "If camerabin2 is idle (not doing captures).", DEFAULT_IDLE, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /* TODO review before going stable + * We have viewfinder-supported-caps that returns the caps that the + * camerasrc can produce on its viewfinder pad, this could easily be + * confused with what the viewfinder-sink accepts. + * + * Do we want to add a 'viewfinder-sink-supported-caps' or maybe change + * the name of this property? + */ + g_object_class_install_property (object_class, + PROP_VIEWFINDER_SUPPORTED_CAPS, + g_param_spec_boxed ("viewfinder-supported-caps", + "Camera source Viewfinder pad supported caps", + "The caps that the camera source can produce on the viewfinder pad", + GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /** + * GstCameraBin:flags + * + * Control the behaviour of encodebin. + */ + g_object_class_install_property (object_class, PROP_FLAGS, + g_param_spec_flags ("flags", "Flags", "Flags to control behaviour", + GST_TYPE_CAM_FLAGS, DEFAULT_FLAGS, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstCameraBin2::capture-start: + * @camera: the camera bin element + * + * Starts image capture or video recording depending on the Mode. + */ + camerabin_signals[START_CAPTURE_SIGNAL] = + g_signal_new ("start-capture", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (GstCameraBin2Class, start_capture), + NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + /** + * GstCameraBin2::capture-stop: + * @camera: the camera bin element + */ + camerabin_signals[STOP_CAPTURE_SIGNAL] = + g_signal_new ("stop-capture", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (GstCameraBin2Class, stop_capture), + NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +} + +static void +gst_camera_bin_init (GstCameraBin2 * camera) +{ + camera->post_previews = DEFAULT_POST_PREVIEWS; + camera->mode = DEFAULT_MODE; + camera->location = g_strdup (DEFAULT_LOCATION); + camera->viewfinderbin = gst_element_factory_make ("viewfinderbin", "vf-bin"); + camera->zoom = DEFAULT_ZOOM; + camera->max_zoom = MAX_ZOOM; + camera->flags = DEFAULT_FLAGS; + g_mutex_init (&camera->preview_list_mutex); + g_mutex_init (&camera->image_capture_mutex); + g_mutex_init (&camera->video_capture_mutex); + g_cond_init (&camera->video_state_cond); + + /* capsfilters are created here as we proxy their caps properties and + * this way we avoid having to store the caps while on NULL state to + * set them later */ + camera->videobin_capsfilter = gst_element_factory_make ("capsfilter", + "videobin-capsfilter"); + camera->imagebin_capsfilter = gst_element_factory_make ("capsfilter", + "imagebin-capsfilter"); + camera->viewfinderbin_capsfilter = gst_element_factory_make ("capsfilter", + "viewfinderbin-capsfilter"); + + gst_bin_add_many (GST_BIN (camera), + gst_object_ref (camera->viewfinderbin), + gst_object_ref (camera->videobin_capsfilter), + gst_object_ref (camera->imagebin_capsfilter), + gst_object_ref (camera->viewfinderbin_capsfilter), NULL); + + /* these elements are only added if they are going to be used */ + camera->audio_capsfilter = gst_element_factory_make ("capsfilter", + "audio-capsfilter"); + camera->audio_volume = gst_element_factory_make ("volume", "audio-volume"); +} + +static void +gst_image_capture_bin_post_image_done (GstCameraBin2 * camera, + const gchar * filename) +{ + GstMessage *msg; + + g_return_if_fail (filename != NULL); + + msg = gst_message_new_element (GST_OBJECT_CAST (camera), + gst_structure_new ("image-done", "filename", G_TYPE_STRING, + filename, NULL)); + + if (!gst_element_post_message (GST_ELEMENT_CAST (camera), msg)) + GST_WARNING_OBJECT (camera, "Failed to post image-done message"); +} + +static void +gst_video_capture_bin_post_video_done (GstCameraBin2 * camera) +{ + GstMessage *msg; + + msg = gst_message_new_element (GST_OBJECT_CAST (camera), + gst_structure_new_empty ("video-done")); + + if (!gst_element_post_message (GST_ELEMENT_CAST (camera), msg)) + GST_WARNING_OBJECT (camera, "Failed to post video-done message"); +} + +static void +gst_camera_bin_skip_next_preview (GstCameraBin2 * camerabin) +{ + gchar *location; + + g_mutex_lock (&camerabin->preview_list_mutex); + if (camerabin->preview_location_list) { + location = camerabin->preview_location_list->data; + GST_DEBUG_OBJECT (camerabin, "Skipping preview for %s", location); + g_free (location); + camerabin->preview_location_list = + g_slist_delete_link (camerabin->preview_location_list, + camerabin->preview_location_list); + GST_CAMERA_BIN2_PROCESSING_DEC (camerabin); + } else { + GST_WARNING_OBJECT (camerabin, "No previews to skip"); + } + g_mutex_unlock (&camerabin->preview_list_mutex); +} + +static void +gst_camera_bin_finish_video_file (GstCameraBin2 * camerabin) +{ + /* make sure the file is closed */ + gst_element_set_state (camerabin->videosink, GST_STATE_NULL); + + gst_video_capture_bin_post_video_done (camerabin); + GST_CAMERA_BIN2_PROCESSING_DEC (camerabin); +} + +static gpointer +gst_camera_bin_video_reset_elements (gpointer u_data) +{ + GstCameraBin2 *camerabin = GST_CAMERA_BIN2_CAST (u_data); + + GST_DEBUG_OBJECT (camerabin, "Resetting video elements state"); + g_mutex_lock (&camerabin->video_capture_mutex); + + gst_camera_bin_finish_video_file (camerabin); + + /* reset element states to clear eos/flushing pads */ + gst_element_set_state (camerabin->video_encodebin, GST_STATE_READY); + gst_element_set_state (camerabin->videobin_capsfilter, GST_STATE_READY); + if (camerabin->video_filter) { + gst_element_set_state (camerabin->video_filter, GST_STATE_READY); + gst_element_sync_state_with_parent (camerabin->video_filter); + } + gst_element_sync_state_with_parent (camerabin->videobin_capsfilter); + gst_element_sync_state_with_parent (camerabin->video_encodebin); + + if (camerabin->audio_src) { + gst_element_set_state (camerabin->audio_capsfilter, GST_STATE_READY); + gst_element_set_state (camerabin->audio_volume, GST_STATE_READY); + + /* FIXME We need to set audiosrc to null to make it resync the ringbuffer + * while bug https://bugzilla.gnome.org/show_bug.cgi?id=648359 isn't + * fixed. + * + * Also, we don't reinit the audiosrc to keep audio devices from being open + * and running until we really need them */ + gst_element_set_state (camerabin->audio_src, GST_STATE_NULL); + + if (camerabin->audio_filter) { + gst_element_set_state (camerabin->audio_filter, GST_STATE_READY); + gst_element_sync_state_with_parent (camerabin->audio_filter); + } + + gst_element_sync_state_with_parent (camerabin->audio_capsfilter); + gst_element_sync_state_with_parent (camerabin->audio_volume); + + } + + GST_DEBUG_OBJECT (camerabin, "Setting video state to idle"); + camerabin->video_state = GST_CAMERA_BIN_VIDEO_IDLE; + g_cond_signal (&camerabin->video_state_cond); + g_mutex_unlock (&camerabin->video_capture_mutex); + + gst_object_unref (camerabin); + return NULL; +} + +static void +gst_camera_bin_handle_message (GstBin * bin, GstMessage * message) +{ + GstCameraBin2 *camerabin = GST_CAMERA_BIN2_CAST (bin); + gboolean dec_counter = FALSE; + + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ELEMENT:{ + const GstStructure *structure = gst_message_get_structure (message); + const gchar *filename; + + if (gst_structure_has_name (structure, "GstMultiFileSink")) { + filename = gst_structure_get_string (structure, "filename"); + GST_DEBUG_OBJECT (bin, "Got file save message from multifilesink, " + "image %s has been saved", filename); + if (filename) { + gst_image_capture_bin_post_image_done (GST_CAMERA_BIN2_CAST (bin), + filename); + } + dec_counter = TRUE; + } else if (gst_structure_has_name (structure, "preview-image")) { + gchar *location = NULL; + + g_mutex_lock (&camerabin->preview_list_mutex); + if (camerabin->preview_location_list) { + location = camerabin->preview_location_list->data; + camerabin->preview_location_list = + g_slist_delete_link (camerabin->preview_location_list, + camerabin->preview_location_list); + GST_DEBUG_OBJECT (camerabin, "Adding preview location to preview " + "message '%s'", location); + } else { + GST_WARNING_OBJECT (camerabin, "Unexpected preview message received, " + "won't be able to put location field into the message. This can " + "happen if the source is posting previews while camerabin2 is " + "shutting down"); + } + g_mutex_unlock (&camerabin->preview_list_mutex); + + if (location) { + GValue value = { 0 }; + g_value_init (&value, G_TYPE_STRING); + g_value_take_string (&value, location); + gst_structure_take_value ((GstStructure *) structure, "location", + &value); + } + + GST_LOG_OBJECT (bin, "received preview-image message"); + dec_counter = TRUE; + } + } + break; + case GST_MESSAGE_WARNING:{ + GError *err = NULL; + gchar *debug = NULL; + + gst_message_parse_warning (message, &err, &debug); + if (err->domain == GST_RESOURCE_ERROR) { + /* some capturing failed */ + GST_WARNING_OBJECT (bin, "Capture failed, reason: %s - %s", + err->message, debug); + if (camerabin->post_previews) { + gst_camera_bin_skip_next_preview (camerabin); + } + dec_counter = TRUE; + } + g_error_free (err); + g_free (debug); + } + break; + case GST_MESSAGE_EOS:{ + GstElement *src = GST_ELEMENT (GST_MESSAGE_SRC (message)); + if (src == GST_CAMERA_BIN2_CAST (bin)->videosink) { + + g_mutex_lock (&camerabin->video_capture_mutex); + GST_DEBUG_OBJECT (bin, "EOS from video branch"); + g_assert (camerabin->video_state == GST_CAMERA_BIN_VIDEO_FINISHING); + + if (!g_thread_try_new ("reset-element-thread", + gst_camera_bin_video_reset_elements, gst_object_ref (camerabin), + NULL)) { + GST_WARNING_OBJECT (camerabin, + "Failed to create thread to " + "reset video elements' state, video recordings may not work " + "anymore"); + gst_object_unref (camerabin); + camerabin->video_state = GST_CAMERA_BIN_VIDEO_IDLE; + } + + g_mutex_unlock (&camerabin->video_capture_mutex); + } + } + break; + default: + break; + } + if (message) + GST_BIN_CLASS (parent_class)->handle_message (bin, message); + + if (dec_counter) + GST_CAMERA_BIN2_PROCESSING_DEC (camerabin); +} + +/* + * Transforms: + * ... ! previous_element [ ! current_filter ] ! next_element ! ... + * + * into: + * ... ! previous_element [ ! new_filter ] ! next_element ! ... + * + * Where current_filter and new_filter might or might not be NULL + */ +static void +gst_camera_bin_check_and_replace_filter (GstCameraBin2 * camera, + GstElement ** current_filter, GstElement * new_filter, + GstElement * previous_element, GstElement * next_element, + const gchar * prev_elem_pad) +{ + if (*current_filter == new_filter) { + GST_DEBUG_OBJECT (camera, "Current filter is the same as the previous, " + "no switch needed."); + return; + } + + GST_DEBUG_OBJECT (camera, "Replacing current filter (%s) with new filter " + "(%s)", *current_filter ? GST_ELEMENT_NAME (*current_filter) : "null", + new_filter ? GST_ELEMENT_NAME (new_filter) : "null"); + + if (*current_filter) { + gst_bin_remove (GST_BIN_CAST (camera), *current_filter); + gst_object_unref (*current_filter); + *current_filter = NULL; + } else { + /* unlink the pads */ + gst_element_unlink (previous_element, next_element); + } + + if (new_filter) { + *current_filter = gst_object_ref (new_filter); + gst_bin_add (GST_BIN_CAST (camera), gst_object_ref (new_filter)); + } + + if (prev_elem_pad) { + if (new_filter) { + gst_element_link_pads (previous_element, prev_elem_pad, new_filter, NULL); + gst_element_link (new_filter, next_element); + } else { + gst_element_link_pads (previous_element, prev_elem_pad, next_element, + NULL); + } + } else { + if (new_filter) + gst_element_link_many (previous_element, new_filter, next_element, NULL); + else + gst_element_link (previous_element, next_element); + } +} + +static void +encodebin_element_added (GstElement * encodebin, GstElement * new_element, + GstCameraBin2 * camera) +{ + GstElementFactory *factory = gst_element_get_factory (new_element); + + if (factory != NULL) { + if (strcmp (GST_OBJECT_NAME (factory), "audiorate") == 0 || + strcmp (GST_OBJECT_NAME (factory), "videorate") == 0) { + g_object_set (new_element, "skip-to-first", TRUE, NULL); + } + } + + if (GST_IS_TAG_SETTER (new_element)) { + GstTagSetter *tagsetter = GST_TAG_SETTER (new_element); + + gst_tag_setter_set_tag_merge_mode (tagsetter, GST_TAG_MERGE_REPLACE); + } +} + +#define VIDEO_PAD 1 +#define AUDIO_PAD 2 +static GstPad * +encodebin_find_pad (GstCameraBin2 * camera, GstElement * encodebin, + gint pad_type) +{ + GValue value = { 0 }; + GstPad *pad = NULL; + GstIterator *iter; + gboolean done; + + GST_DEBUG_OBJECT (camera, "Looking at encodebin pads, searching for %s pad", + pad_type == VIDEO_PAD ? "video" : "audio"); + + iter = gst_element_iterate_sink_pads (encodebin); + done = FALSE; + while (!done) { + switch (gst_iterator_next (iter, &value)) { + case GST_ITERATOR_OK: + pad = g_value_dup_object (&value); + g_value_unset (&value); + if (pad_type == VIDEO_PAD) { + if (strstr (GST_PAD_NAME (pad), "video") != NULL) { + GST_DEBUG_OBJECT (camera, "Found video pad %s", GST_PAD_NAME (pad)); + done = TRUE; + break; + } + } else if (pad_type == AUDIO_PAD) { + if (strstr (GST_PAD_NAME (pad), "audio") != NULL) { + GST_DEBUG_OBJECT (camera, "Found audio pad %s", GST_PAD_NAME (pad)); + done = TRUE; + break; + } + } + gst_object_unref (pad); + pad = NULL; + break; + case GST_ITERATOR_RESYNC: + gst_iterator_resync (iter); + break; + case GST_ITERATOR_ERROR: + pad = NULL; + done = TRUE; + break; + case GST_ITERATOR_DONE: + pad = NULL; + done = TRUE; + break; + } + } + gst_iterator_free (iter); + + /* no static pad, try requesting one */ + if (pad == NULL) { + GstElementClass *klass; + GstPadTemplate *tmpl; + + GST_DEBUG_OBJECT (camera, "No pads found, trying to request one"); + + klass = GST_ELEMENT_GET_CLASS (encodebin); + tmpl = gst_element_class_get_pad_template (klass, pad_type == VIDEO_PAD ? + "video_%u" : "audio_%u"); + + if (!tmpl) { + GST_DEBUG_OBJECT (camera, "No templates found, can't request pad"); + return NULL; + } + + pad = gst_element_request_pad (encodebin, tmpl, NULL, NULL); + GST_DEBUG_OBJECT (camera, "Got pad: %s", pad ? GST_PAD_NAME (pad) : "null"); + } + + return pad; +} + +static gboolean +gst_camera_bin_video_profile_has_audio (GstCameraBin2 * camera) +{ + const GList *list; + + g_return_val_if_fail (camera->video_profile != NULL, FALSE); + + if (GST_IS_ENCODING_VIDEO_PROFILE (camera->video_profile)) + return FALSE; + + for (list = + gst_encoding_container_profile_get_profiles ((GstEncodingContainerProfile + *) camera->video_profile); list; list = g_list_next (list)) { + GstEncodingProfile *profile = (GstEncodingProfile *) list->data; + + if (GST_IS_ENCODING_AUDIO_PROFILE (profile)) + return TRUE; + } + + return FALSE; +} + +static GstPadLinkReturn +gst_camera_bin_link_encodebin (GstCameraBin2 * camera, GstElement * encodebin, + GstElement * element, gint padtype) +{ + GstPadLinkReturn ret; + GstPad *srcpad; + GstPad *sinkpad = NULL; + + srcpad = gst_element_get_static_pad (element, "src"); + g_assert (srcpad != NULL); + + sinkpad = encodebin_find_pad (camera, encodebin, padtype); + + /* there may be no available sink pad for encodebin in some situations: + * e.g. missing elements or incompatible padtype */ + if (sinkpad == NULL) { + gst_object_unref (srcpad); + return GST_PAD_LINK_REFUSED; + } + + ret = gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_CAPS); + gst_object_unref (sinkpad); + gst_object_unref (srcpad); + + return ret; +} + +static void +gst_camera_bin_src_notify_max_zoom_cb (GObject * self, GParamSpec * pspec, + gpointer user_data) +{ + GstCameraBin2 *camera = (GstCameraBin2 *) user_data; + + g_object_get (self, "max-zoom", &camera->max_zoom, NULL); + GST_DEBUG_OBJECT (camera, "Max zoom updated to %f", camera->max_zoom); + g_object_notify (G_OBJECT (camera), "max-zoom"); +} + +static void +gst_camera_bin_src_notify_zoom_cb (GObject * self, GParamSpec * pspec, + gpointer user_data) +{ + GstCameraBin2 *camera = (GstCameraBin2 *) user_data; + + g_object_get (self, "zoom", &camera->zoom, NULL); + GST_DEBUG_OBJECT (camera, "Zoom updated to %f", camera->zoom); + g_object_notify (G_OBJECT (camera), "zoom"); +} + +static GstPadProbeReturn +gst_camera_bin_image_src_buffer_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer data) +{ + GstPadProbeReturn ret = GST_PAD_PROBE_OK; + GstCameraBin2 *camerabin = data; + GstEvent *evt; + gchar *location = NULL; + GstPad *peer; + GstTagList *tags; + + g_mutex_lock (&camerabin->image_capture_mutex); + + /* Push pending image tags */ + if (camerabin->image_tags_list) { + tags = camerabin->image_tags_list->data; + camerabin->image_tags_list = + g_slist_delete_link (camerabin->image_tags_list, + camerabin->image_tags_list); + GST_DEBUG_OBJECT (camerabin, "Pushing tags from application: %" + GST_PTR_FORMAT, tags); + if (tags) { + peer = gst_pad_get_peer (pad); + gst_pad_send_event (peer, gst_event_new_tag (tags)); + gst_object_unref (peer); + } + } else { + GST_DEBUG_OBJECT (camerabin, "No tags from application to send"); + } + + /* Push image location event */ + if (camerabin->image_location_list) { + location = camerabin->image_location_list->data; + camerabin->image_location_list = + g_slist_delete_link (camerabin->image_location_list, + camerabin->image_location_list); + GST_DEBUG_OBJECT (camerabin, "Sending image location change to '%s'", + location); + } else { + GST_DEBUG_OBJECT (camerabin, "No filename location change to send"); + g_mutex_unlock (&camerabin->image_capture_mutex); + return ret; + } + g_mutex_unlock (&camerabin->image_capture_mutex); + + if (location) { + evt = gst_camera_bin_new_event_file_location (location); + peer = gst_pad_get_peer (pad); + gst_pad_send_event (peer, evt); + gst_object_unref (peer); + g_free (location); + } else { + /* This means we don't have to encode the capture, it is used for + * signaling the application just wants the preview */ + ret = GST_PAD_PROBE_DROP; + GST_CAMERA_BIN2_PROCESSING_DEC (camerabin); + } + + return ret; +} + + +static GstPadProbeReturn +gst_camera_bin_image_sink_event_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer data) +{ + GstCameraBin2 *camerabin = data; + GstEvent *event = GST_EVENT (info->data); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CUSTOM_DOWNSTREAM:{ + if (gst_event_has_name (event, "new-location")) { + const GstStructure *structure = gst_event_get_structure (event); + const gchar *filename = gst_structure_get_string (structure, + "location"); + + gst_element_set_state (camerabin->imagesink, GST_STATE_NULL); + GST_DEBUG_OBJECT (camerabin, "Setting filename to imagesink: %s", + filename); + g_object_set (camerabin->imagesink, "location", filename, NULL); + if (gst_element_set_state (camerabin->imagesink, GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + /* Resets the latest state change return, that would be a failure + * and could cause problems in a camerabin2 state change */ + gst_element_set_state (camerabin->imagesink, GST_STATE_NULL); + } + } + } + break; + default: + break; + } + + return GST_PAD_PROBE_OK; +} + +static GstPadProbeReturn +gst_camera_bin_audio_src_data_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer data) +{ + GstCameraBin2 *camera = data; + gboolean ret = GST_PAD_PROBE_OK; + + if (GST_IS_BUFFER (info->data)) { + if (G_UNLIKELY (camera->audio_send_newseg)) { + GstBuffer *buf = GST_BUFFER_CAST (info->data); + GstClockTime ts = GST_BUFFER_TIMESTAMP (buf); + GstPad *peer; + GstSegment segment; + + if (!GST_CLOCK_TIME_IS_VALID (ts)) { + ts = 0; + } + + peer = gst_pad_get_peer (pad); + g_return_val_if_fail (peer != NULL, TRUE); + + gst_segment_init (&segment, GST_FORMAT_TIME); + segment.start = ts; + gst_pad_send_event (peer, gst_event_new_segment (&segment)); + + gst_object_unref (peer); + + camera->audio_send_newseg = FALSE; + } + } else { + GstEvent *event = GST_EVENT_CAST (data); + if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { + /* we only let an EOS pass when the user is stopping a capture */ + if (camera->audio_drop_eos) { + ret = GST_PAD_PROBE_DROP; + } else { + camera->audio_drop_eos = TRUE; + /* should already be false, but reinforce in case no buffers get + * pushed */ + camera->audio_send_newseg = FALSE; + } + } else if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) { + ret = GST_PAD_PROBE_DROP; + } + } + + return ret; +} + +/** + * gst_camera_bin_create_elements: + * @param camera: the #GstCameraBin2 + * + * Creates all elements inside #GstCameraBin2 + * + * Each of the pads on the camera source is linked as follows: + * .pad ! queue ! capsfilter ! correspondingbin + * + * Where 'correspondingbin' is the bin appropriate for + * the camera source pad. + */ +static gboolean +gst_camera_bin_create_elements (GstCameraBin2 * camera) +{ + gboolean new_src = FALSE; + gboolean new_audio_src = FALSE; + gboolean has_audio; + gboolean profile_switched = FALSE; + const gchar *missing_element_name; + gint encbin_flags = 0; + + if (!camera->elements_created) { + /* Check that elements created in _init were really created */ + if (!(camera->audio_capsfilter && camera->videobin_capsfilter && + camera->imagebin_capsfilter && camera->viewfinderbin_capsfilter)) { + missing_element_name = "capsfilter"; + goto missing_element; + } + + camera->video_encodebin = + gst_element_factory_make ("encodebin", "video-encodebin"); + if (!camera->video_encodebin) { + missing_element_name = "encodebin"; + goto missing_element; + } + camera->video_encodebin_signal_id = + g_signal_connect (camera->video_encodebin, "element-added", + (GCallback) encodebin_element_added, camera); + + camera->videosink = + gst_element_factory_make ("filesink", "videobin-filesink"); + if (!camera->videosink) { + missing_element_name = "filesink"; + goto missing_element; + } + g_object_set (camera->videosink, "async", FALSE, NULL); + + /* audio elements */ + if (!camera->audio_volume) { + missing_element_name = "volume"; + goto missing_element; + } + + if (camera->video_profile == NULL) { + GstEncodingContainerProfile *prof; + GstCaps *caps; + + caps = gst_caps_new_empty_simple ("application/ogg"); + prof = gst_encoding_container_profile_new ("ogg", "theora+vorbis+ogg", + caps, NULL); + gst_caps_unref (caps); + + caps = gst_caps_new_empty_simple ("video/x-theora"); + if (!gst_encoding_container_profile_add_profile (prof, + (GstEncodingProfile *) gst_encoding_video_profile_new (caps, + NULL, NULL, 1))) { + GST_WARNING_OBJECT (camera, "Failed to create encoding profiles"); + } + gst_caps_unref (caps); + + caps = gst_caps_new_empty_simple ("audio/x-vorbis"); + if (!gst_encoding_container_profile_add_profile (prof, + (GstEncodingProfile *) gst_encoding_audio_profile_new (caps, + NULL, NULL, 1))) { + GST_WARNING_OBJECT (camera, "Failed to create encoding profiles"); + } + gst_caps_unref (caps); + + camera->video_profile = (GstEncodingProfile *) prof; + camera->video_profile_switch = TRUE; + } + + camera->image_encodebin = + gst_element_factory_make ("encodebin", "image-encodebin"); + if (!camera->image_encodebin) { + missing_element_name = "encodebin"; + goto missing_element; + } + /* durations have no meaning for image captures */ + g_object_set (camera->image_encodebin, "queue-time-max", (guint64) 0, NULL); + + camera->image_encodebin_signal_id = + g_signal_connect (camera->image_encodebin, "element-added", + (GCallback) encodebin_element_added, camera); + + camera->imagesink = + gst_element_factory_make ("multifilesink", "imagebin-filesink"); + if (!camera->imagesink) { + missing_element_name = "multifilesink"; + goto missing_element; + } + g_object_set (camera->imagesink, "async", FALSE, "post-messages", TRUE, + NULL); + + if (camera->image_profile == NULL) { + GstEncodingVideoProfile *vprof; + GstCaps *caps; + + caps = gst_caps_new_empty_simple ("image/jpeg"); + vprof = gst_encoding_video_profile_new (caps, NULL, NULL, 1); + gst_encoding_video_profile_set_variableframerate (vprof, TRUE); + + gst_caps_unref (caps); + camera->image_profile = (GstEncodingProfile *) vprof; + camera->image_profile_switch = TRUE; + } + + camera->viewfinderbin_queue = + gst_element_factory_make ("queue", "viewfinderbin-queue"); + if (!camera->viewfinderbin_queue) { + missing_element_name = "queue"; + goto missing_element; + } + + g_object_set (camera->viewfinderbin_queue, "leaky", 2, "silent", TRUE, + "max-size-time", (guint64) 0, "max-size-bytes", (guint) 0, + "max-size-buffers", (guint) 1, NULL); + + gst_bin_add_many (GST_BIN_CAST (camera), + gst_object_ref (camera->video_encodebin), + gst_object_ref (camera->videosink), + gst_object_ref (camera->image_encodebin), + gst_object_ref (camera->imagesink), + gst_object_ref (camera->viewfinderbin_queue), NULL); + + gst_element_link_pads_full (camera->video_encodebin, "src", + camera->videosink, "sink", GST_PAD_LINK_CHECK_NOTHING); + gst_element_link_pads_full (camera->image_encodebin, "src", + camera->imagesink, "sink", GST_PAD_LINK_CHECK_NOTHING); + gst_element_link_pads_full (camera->viewfinderbin_queue, "src", + camera->viewfinderbin_capsfilter, "sink", GST_PAD_LINK_CHECK_CAPS); + gst_element_link_pads_full (camera->viewfinderbin_capsfilter, "src", + camera->viewfinderbin, "sink", GST_PAD_LINK_CHECK_CAPS); + + { + /* set an event probe to watch for custom location changes */ + GstPad *srcpad; + + srcpad = gst_element_get_static_pad (camera->image_encodebin, "src"); + + gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, + gst_camera_bin_image_sink_event_probe, camera, NULL); + + gst_object_unref (srcpad); + } + + /* + * Video can't get into playing as its internal filesink will open + * a file for writing and leave it empty if unused. + * + * Its state is managed using the current mode and the source's + * ready-for-capture notify callback. When we are at video mode and + * the source's ready-for-capture goes to FALSE it means it is + * starting recording, so we should prepare the video bin. + */ + gst_element_set_locked_state (camera->videosink, TRUE); + gst_element_set_locked_state (camera->imagesink, TRUE); + + g_object_set (camera->videosink, "location", camera->location, NULL); + g_object_set (camera->imagesink, "location", camera->location, NULL); + } + + /* propagate the flags property by translating appropriate values + * to GstEncFlags values */ + if (camera->flags & GST_CAM_FLAG_NO_AUDIO_CONVERSION) + encbin_flags |= (1 << 0); + if (camera->flags & GST_CAM_FLAG_NO_VIDEO_CONVERSION) + encbin_flags |= (1 << 1); + g_object_set (camera->video_encodebin, "flags", encbin_flags, NULL); + + /* image encodebin has only video branch so disable its conversion elements + * appropriately */ + if (camera->flags & GST_CAM_FLAG_NO_IMAGE_CONVERSION) + g_object_set (camera->image_encodebin, "flags", (1 << 1), NULL); + + g_object_set (camera->viewfinderbin, "disable-converters", + camera->flags & GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION ? TRUE : FALSE, + NULL); + + if (camera->video_profile_switch) { + GST_DEBUG_OBJECT (camera, "Switching video-encodebin's profile"); + g_object_set (camera->video_encodebin, "profile", camera->video_profile, + NULL); + if (GST_PAD_LINK_FAILED (gst_camera_bin_link_encodebin (camera, + camera->video_encodebin, camera->videobin_capsfilter, + VIDEO_PAD))) { + goto fail; + } + camera->video_profile_switch = FALSE; + + /* used to trigger relinking further down */ + profile_switched = TRUE; + } + + if (camera->image_profile_switch) { + GST_DEBUG_OBJECT (camera, "Switching image-encodebin's profile"); + g_object_set (camera->image_encodebin, "profile", camera->image_profile, + NULL); + if (GST_PAD_LINK_FAILED (gst_camera_bin_link_encodebin (camera, + camera->image_encodebin, camera->imagebin_capsfilter, + VIDEO_PAD))) { + goto fail; + } + camera->image_profile_switch = FALSE; + } + + /* check if we need to replace the camera src */ + if (camera->src) { + if (camera->user_src && camera->user_src != camera->src) { + + if (camera->src_capture_notify_id) + g_signal_handler_disconnect (camera->src, + camera->src_capture_notify_id); + + gst_bin_remove (GST_BIN_CAST (camera), camera->src); + gst_object_unref (camera->src); + camera->src = NULL; + } + } + + if (!camera->src) { + if (camera->user_src) { + camera->src = gst_object_ref (camera->user_src); + } else { + camera->src = + gst_element_factory_make ("wrappercamerabinsrc", "camerasrc"); + } + + new_src = TRUE; + } + + g_assert (camera->src != NULL); + g_object_set (camera->src, "mode", camera->mode, NULL); + if (camera->src) { + if (g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src), + "preview-caps")) { + g_object_set (camera->src, "post-previews", camera->post_previews, + "preview-caps", camera->preview_caps, "preview-filter", + camera->preview_filter, NULL); + } + g_signal_connect (G_OBJECT (camera->src), "notify::zoom", + (GCallback) gst_camera_bin_src_notify_zoom_cb, camera); + g_object_set (camera->src, "zoom", camera->zoom, NULL); + g_signal_connect (G_OBJECT (camera->src), "notify::max-zoom", + (GCallback) gst_camera_bin_src_notify_max_zoom_cb, camera); + } + if (new_src) { + GstPad *imgsrc = gst_element_get_static_pad (camera->src, "imgsrc"); + + gst_bin_add (GST_BIN_CAST (camera), gst_object_ref (camera->src)); + camera->src_capture_notify_id = g_signal_connect (G_OBJECT (camera->src), + "notify::ready-for-capture", + G_CALLBACK (gst_camera_bin_src_notify_readyforcapture), camera); + gst_element_link_pads (camera->src, "vfsrc", camera->viewfinderbin_queue, + "sink"); + + if (!gst_element_link_pads (camera->src, "imgsrc", + camera->imagebin_capsfilter, "sink")) { + GST_ERROR_OBJECT (camera, + "Failed to link camera source's imgsrc pad to image bin capsfilter"); + goto fail; + } + if (!gst_element_link_pads (camera->src, "vidsrc", + camera->videobin_capsfilter, "sink")) { + GST_ERROR_OBJECT (camera, + "Failed to link camera source's vidsrc pad to video bin capsfilter"); + goto fail; + } + + gst_pad_add_probe (imgsrc, GST_PAD_PROBE_TYPE_BUFFER, + gst_camera_bin_image_src_buffer_probe, camera, NULL); + gst_object_unref (imgsrc); + } + + gst_camera_bin_check_and_replace_filter (camera, &camera->image_filter, + camera->user_image_filter, camera->src, camera->imagebin_capsfilter, + "imgsrc"); + gst_camera_bin_check_and_replace_filter (camera, &camera->video_filter, + camera->user_video_filter, camera->src, camera->videobin_capsfilter, + "vidsrc"); + gst_camera_bin_check_and_replace_filter (camera, &camera->viewfinder_filter, + camera->user_viewfinder_filter, camera->viewfinderbin_queue, + camera->viewfinderbin_capsfilter, NULL); + + /* check if we need to replace the camera audio src */ + has_audio = gst_camera_bin_video_profile_has_audio (camera); + if (camera->audio_src) { + if ((camera->user_audio_src && camera->user_audio_src != camera->audio_src) + || !has_audio) { + gst_bin_remove (GST_BIN_CAST (camera), camera->audio_src); + gst_bin_remove (GST_BIN_CAST (camera), camera->audio_volume); + gst_bin_remove (GST_BIN_CAST (camera), camera->audio_capsfilter); + gst_object_unref (camera->audio_src); + camera->audio_src = NULL; + } + } + + if (!camera->audio_src && has_audio) { + if (camera->user_audio_src) { + camera->audio_src = gst_object_ref (camera->user_audio_src); + } else { + camera->audio_src = + gst_element_factory_make (DEFAULT_AUDIO_SRC, "audiosrc"); + if (!camera->audio_src) { + missing_element_name = DEFAULT_AUDIO_SRC; + goto missing_element; + } + } + + gst_element_set_locked_state (camera->audio_src, TRUE); + new_audio_src = TRUE; + } + + if (new_audio_src) { + GstPad *srcpad; + + if (g_object_class_find_property (G_OBJECT_GET_CLASS (camera->audio_src), + "provide-clock")) { + g_object_set (camera->audio_src, "provide-clock", FALSE, NULL); + } + gst_bin_add (GST_BIN_CAST (camera), gst_object_ref (camera->audio_src)); + gst_bin_add (GST_BIN_CAST (camera), gst_object_ref (camera->audio_volume)); + gst_bin_add (GST_BIN_CAST (camera), + gst_object_ref (camera->audio_capsfilter)); + + gst_element_link_pads_full (camera->audio_src, "src", + camera->audio_volume, "sink", GST_PAD_LINK_CHECK_CAPS); + gst_element_link_pads_full (camera->audio_volume, "src", + camera->audio_capsfilter, "sink", GST_PAD_LINK_CHECK_CAPS); + + srcpad = gst_element_get_static_pad (camera->audio_src, "src"); + + /* drop EOS for audiosrc elements that push them on state_changes + * (basesrc does this) */ + gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, + gst_camera_bin_audio_src_data_probe, camera, NULL); + + gst_object_unref (srcpad); + } + if (has_audio) { + gst_camera_bin_check_and_replace_filter (camera, &camera->audio_filter, + camera->user_audio_filter, camera->audio_src, camera->audio_volume, + "src"); + } + + if ((profile_switched && has_audio) || new_audio_src) { + if (GST_PAD_LINK_FAILED (gst_camera_bin_link_encodebin (camera, + camera->video_encodebin, camera->audio_capsfilter, + AUDIO_PAD))) { + goto fail; + } + } + + camera->elements_created = TRUE; + return TRUE; + +missing_element: + gst_element_post_message (GST_ELEMENT_CAST (camera), + gst_missing_element_message_new (GST_ELEMENT_CAST (camera), + missing_element_name)); + GST_ELEMENT_ERROR (camera, CORE, MISSING_PLUGIN, + (_("Missing element '%s' - check your GStreamer installation."), + missing_element_name), (NULL)); + goto fail; + +fail: + /* FIXME properly clean up */ + return FALSE; +} + +static void +_gst_tag_list_unref_maybe (GstTagList * taglist) +{ + if (taglist) + gst_tag_list_unref (taglist); +} + +static GstStateChangeReturn +gst_camera_bin_change_state (GstElement * element, GstStateChange trans) +{ + GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; + GstCameraBin2 *camera = GST_CAMERA_BIN2_CAST (element); + + + switch (trans) { + case GST_STATE_CHANGE_NULL_TO_READY: + if (!gst_camera_bin_create_elements (camera)) { + return GST_STATE_CHANGE_FAILURE; + } + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_CAMERA_BIN2_RESET_PROCESSING_COUNTER (camera); + camera->audio_drop_eos = TRUE; + camera->audio_send_newseg = FALSE; + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + if (GST_STATE (camera->videosink) >= GST_STATE_PAUSED) + gst_element_set_state (camera->videosink, GST_STATE_READY); + if (GST_STATE (camera->imagesink) >= GST_STATE_PAUSED) + gst_element_set_state (camera->imagesink, GST_STATE_READY); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + gst_element_set_state (camera->videosink, GST_STATE_NULL); + gst_element_set_state (camera->imagesink, GST_STATE_NULL); + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, trans); + + switch (trans) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + if (camera->audio_src && GST_STATE (camera->audio_src) >= GST_STATE_READY) + gst_element_set_state (camera->audio_src, GST_STATE_READY); + + gst_tag_setter_reset_tags (GST_TAG_SETTER (camera)); + GST_CAMERA_BIN2_RESET_PROCESSING_COUNTER (camera); + camera->video_state = GST_CAMERA_BIN_VIDEO_IDLE; + + g_mutex_lock (&camera->image_capture_mutex); + g_slist_foreach (camera->image_location_list, (GFunc) g_free, NULL); + g_slist_free (camera->image_location_list); + camera->image_location_list = NULL; + + g_slist_foreach (camera->image_tags_list, + (GFunc) _gst_tag_list_unref_maybe, NULL); + g_slist_free (camera->image_tags_list); + camera->image_tags_list = NULL; + g_mutex_unlock (&camera->image_capture_mutex); + + g_mutex_lock (&camera->preview_list_mutex); + g_slist_foreach (camera->preview_location_list, (GFunc) g_free, NULL); + g_slist_free (camera->preview_location_list); + camera->preview_location_list = NULL; + g_mutex_unlock (&camera->preview_list_mutex); + + /* explicitly set to READY as they might be outside of the bin */ + gst_element_set_state (camera->audio_volume, GST_STATE_READY); + gst_element_set_state (camera->audio_capsfilter, GST_STATE_READY); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + if (camera->audio_src) + gst_element_set_state (camera->audio_src, GST_STATE_NULL); + + /* explicitly set to NULL as they might be outside of the bin */ + gst_element_set_state (camera->audio_volume, GST_STATE_NULL); + gst_element_set_state (camera->audio_capsfilter, GST_STATE_NULL); + + break; + default: + break; + } + + return ret; +} + +static gboolean +gst_camera_bin_send_event (GstElement * element, GstEvent * event) +{ + GstCameraBin2 *camera = GST_CAMERA_BIN2_CAST (element); + gboolean res; + + /* avoid losing our ref to send_event */ + gst_event_ref (event); + + res = GST_ELEMENT_CLASS (parent_class)->send_event (element, event); + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_EOS: + { + GstState current; + + if (camera->videosink) { + gst_element_get_state (camera->videosink, ¤t, NULL, 0); + if (current <= GST_STATE_READY) + gst_element_post_message (camera->videosink, + gst_message_new_eos (GST_OBJECT (camera->videosink))); + } + if (camera->imagesink) { + gst_element_get_state (camera->imagesink, ¤t, NULL, 0); + if (current <= GST_STATE_READY) + gst_element_post_message (camera->imagesink, + gst_message_new_eos (GST_OBJECT (camera->imagesink))); + } + break; + } + + default: + break; + } + + gst_event_unref (event); + return res; +} + +static void +gst_camera_bin_set_location (GstCameraBin2 * camera, const gchar * location) +{ + GST_DEBUG_OBJECT (camera, "Setting mode %d location to %s", camera->mode, + location); + g_free (camera->location); + camera->location = g_strdup (location); +} + +static void +gst_camera_bin_set_audio_src (GstCameraBin2 * camera, GstElement * src) +{ + GST_DEBUG_OBJECT (GST_OBJECT (camera), + "Setting audio source %" GST_PTR_FORMAT, src); + + if (camera->user_audio_src) + g_object_unref (camera->user_audio_src); + + if (src) + g_object_ref (src); + camera->user_audio_src = src; +} + +static void +gst_camera_bin_set_camera_src (GstCameraBin2 * camera, GstElement * src) +{ + GST_DEBUG_OBJECT (GST_OBJECT (camera), + "Setting camera source %" GST_PTR_FORMAT, src); + + if (camera->user_src) + g_object_unref (camera->user_src); + + if (src) + g_object_ref (src); + camera->user_src = src; +} + +static void +gst_camera_bin_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstCameraBin2 *camera = GST_CAMERA_BIN2_CAST (object); + + switch (prop_id) { + case PROP_MODE: + gst_camera_bin_change_mode (camera, g_value_get_enum (value)); + break; + case PROP_LOCATION: + gst_camera_bin_set_location (camera, g_value_get_string (value)); + break; + case PROP_CAMERA_SRC: + gst_camera_bin_set_camera_src (camera, g_value_get_object (value)); + break; + case PROP_AUDIO_SRC: + gst_camera_bin_set_audio_src (camera, g_value_get_object (value)); + break; + case PROP_MUTE_AUDIO: + g_object_set (camera->audio_volume, "mute", g_value_get_boolean (value), + NULL); + break; + case PROP_AUDIO_CAPTURE_CAPS:{ + GST_DEBUG_OBJECT (camera, + "Setting audio capture caps to %" GST_PTR_FORMAT, + gst_value_get_caps (value)); + + if (G_LIKELY (camera->audio_capsfilter)) { + g_object_set (camera->audio_capsfilter, "caps", + gst_value_get_caps (value), NULL); + } else { + GST_WARNING_OBJECT (camera, "Audio capsfilter missing"); + } + } + break; + case PROP_IMAGE_CAPTURE_CAPS:{ + GstPad *pad = NULL; + + if (camera->src) + pad = + gst_element_get_static_pad (camera->src, + GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME); + + GST_DEBUG_OBJECT (camera, + "Setting image capture caps to %" GST_PTR_FORMAT, + gst_value_get_caps (value)); + + if (G_LIKELY (camera->imagebin_capsfilter)) { + g_object_set (camera->imagebin_capsfilter, "caps", + gst_value_get_caps (value), NULL); + } else { + GST_WARNING_OBJECT (camera, "Image capsfilter missing"); + } + + if (pad) + gst_object_unref (pad); + } + break; + case PROP_VIDEO_CAPTURE_CAPS:{ + GstPad *pad = NULL; + + if (camera->src) + pad = + gst_element_get_static_pad (camera->src, + GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME); + + GST_DEBUG_OBJECT (camera, + "Setting video capture caps to %" GST_PTR_FORMAT, + gst_value_get_caps (value)); + + if (G_LIKELY (camera->videobin_capsfilter)) { + g_object_set (camera->videobin_capsfilter, "caps", + gst_value_get_caps (value), NULL); + } else { + GST_WARNING_OBJECT (camera, "Video capsfilter missing"); + } + + if (pad) { + gst_object_unref (pad); + } + } + break; + case PROP_VIEWFINDER_CAPS:{ + GstPad *pad = NULL; + + if (camera->src) + pad = + gst_element_get_static_pad (camera->src, + GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME); + + GST_DEBUG_OBJECT (camera, + "Setting viewfinder capture caps to %" GST_PTR_FORMAT, + gst_value_get_caps (value)); + + if (G_LIKELY (camera->viewfinderbin_capsfilter)) { + g_object_set (camera->viewfinderbin_capsfilter, "caps", + gst_value_get_caps (value), NULL); + } else { + GST_WARNING_OBJECT (camera, "Viewfinder capsfilter missing"); + } + + if (pad) { + gst_object_unref (pad); + } + } + break; + case PROP_POST_PREVIEWS: + camera->post_previews = g_value_get_boolean (value); + if (camera->src + && g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src), + "post-previews")) + g_object_set (camera->src, "post-previews", camera->post_previews, + NULL); + break; + case PROP_PREVIEW_CAPS: + gst_caps_replace (&camera->preview_caps, + (GstCaps *) gst_value_get_caps (value)); + if (camera->src + && g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src), + "preview-caps")) + g_object_set (camera->src, "preview-caps", camera->preview_caps, NULL); + break; + case PROP_VIDEO_ENCODING_PROFILE: + if (camera->video_profile) + gst_encoding_profile_unref (camera->video_profile); + camera->video_profile = (GstEncodingProfile *) g_value_dup_object (value); + camera->video_profile_switch = TRUE; + break; + case PROP_IMAGE_FILTER: + if (camera->user_image_filter) + g_object_unref (camera->user_image_filter); + + camera->user_image_filter = g_value_dup_object (value); + break; + case PROP_VIDEO_FILTER: + if (camera->user_video_filter) + g_object_unref (camera->user_video_filter); + + camera->user_video_filter = g_value_dup_object (value); + break; + case PROP_VIEWFINDER_FILTER: + if (camera->user_viewfinder_filter) + g_object_unref (camera->user_viewfinder_filter); + + camera->user_viewfinder_filter = g_value_dup_object (value); + break; + case PROP_PREVIEW_FILTER: + if (camera->preview_filter) + g_object_unref (camera->preview_filter); + + camera->preview_filter = g_value_dup_object (value); + if (camera->src + && g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src), + "preview-filter")) + g_object_set (camera->src, "preview-filter", camera->preview_filter, + NULL); + break; + case PROP_AUDIO_FILTER: + if (camera->user_audio_filter) + g_object_unref (camera->user_audio_filter); + + camera->user_audio_filter = g_value_dup_object (value); + break; + case PROP_VIEWFINDER_SINK: + g_object_set (camera->viewfinderbin, "video-sink", + g_value_get_object (value), NULL); + break; + case PROP_ZOOM: + camera->zoom = g_value_get_float (value); + /* limit to max-zoom */ + if (camera->zoom > camera->max_zoom) { + GST_DEBUG_OBJECT (camera, "Clipping zoom %f to max-zoom %f", + camera->zoom, camera->max_zoom); + camera->zoom = camera->max_zoom; + } + if (camera->src) + g_object_set (camera->src, "zoom", camera->zoom, NULL); + break; + case PROP_IMAGE_ENCODING_PROFILE: + if (camera->image_profile) + gst_encoding_profile_unref (camera->image_profile); + camera->image_profile = (GstEncodingProfile *) g_value_dup_object (value); + + /* make sure we set variable framerate here to prevent videorate from + * being used in encodebin. It will always keep a buffer stored + * internally and push it when a second one arrives. This breaks + * the image capture */ + if (GST_IS_ENCODING_VIDEO_PROFILE (camera->image_profile)) + gst_encoding_video_profile_set_variableframerate ( + (GstEncodingVideoProfile *) camera->image_profile, TRUE); + else if (GST_IS_ENCODING_CONTAINER_PROFILE (camera->image_profile)) { + const GList *profs = + gst_encoding_container_profile_get_profiles ( + (GstEncodingContainerProfile *) camera->image_profile); + for (; profs; profs = g_list_next (profs)) { + if (GST_IS_ENCODING_VIDEO_PROFILE (profs->data)) { + gst_encoding_video_profile_set_variableframerate (profs->data, + TRUE); + } + } + } + camera->image_profile_switch = TRUE; + break; + case PROP_FLAGS: + camera->flags = g_value_get_flags (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_camera_bin_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstCameraBin2 *camera = GST_CAMERA_BIN2_CAST (object); + + switch (prop_id) { + case PROP_MODE: + g_value_set_enum (value, camera->mode); + break; + case PROP_LOCATION: + g_value_set_string (value, camera->location); + break; + case PROP_CAMERA_SRC: + g_value_set_object (value, camera->user_src); + break; + case PROP_AUDIO_SRC: + g_value_set_object (value, camera->user_audio_src); + break; + case PROP_MUTE_AUDIO:{ + gboolean mute; + + g_object_get (camera->audio_volume, "mute", &mute, NULL); + g_value_set_boolean (value, mute); + break; + } + case PROP_AUDIO_CAPTURE_SUPPORTED_CAPS: + case PROP_VIDEO_CAPTURE_SUPPORTED_CAPS: + case PROP_VIEWFINDER_SUPPORTED_CAPS: + case PROP_IMAGE_CAPTURE_SUPPORTED_CAPS:{ + GstPad *pad; + GstElement *element; + GstCaps *caps; + const gchar *padname; + + if (prop_id == PROP_VIDEO_CAPTURE_SUPPORTED_CAPS) { + element = camera->src; + padname = GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME; + } else if (prop_id == PROP_IMAGE_CAPTURE_SUPPORTED_CAPS) { + element = camera->src; + padname = GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME; + } else if (prop_id == PROP_VIEWFINDER_SUPPORTED_CAPS) { + element = camera->src; + padname = GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME; + } else { + element = camera->audio_src; + padname = "src"; + } + + if (element) { + pad = gst_element_get_static_pad (element, padname); + + g_assert (pad != NULL); + + /* TODO not sure if we want get_caps or get_allowed_caps to already + * consider the full pipeline scenario and avoid picking a caps that + * won't negotiate. Need to take care on the special case of the + * pad being unlinked. + */ + caps = gst_pad_query_caps (pad, NULL); + if (caps) { + gst_value_set_caps (value, caps); + gst_caps_unref (caps); + } + + gst_object_unref (pad); + } else { + GST_DEBUG_OBJECT (camera, "Source not created, can't get " + "supported caps"); + } + } + break; + case PROP_AUDIO_CAPTURE_CAPS:{ + GstCaps *caps = NULL; + if (G_LIKELY (camera->audio_capsfilter)) { + g_object_get (camera->audio_capsfilter, "caps", &caps, NULL); + } else { + GST_WARNING ("Missing audio capsfilter"); + } + gst_value_set_caps (value, caps); + gst_caps_unref (caps); + } + break; + case PROP_IMAGE_CAPTURE_CAPS:{ + GstCaps *caps = NULL; + if (G_LIKELY (camera->imagebin_capsfilter)) { + g_object_get (camera->imagebin_capsfilter, "caps", &caps, NULL); + } else { + GST_WARNING ("Missing imagebin capsfilter"); + } + gst_value_set_caps (value, caps); + gst_caps_unref (caps); + } + break; + case PROP_VIDEO_CAPTURE_CAPS:{ + GstCaps *caps = NULL; + if (G_LIKELY (camera->videobin_capsfilter)) { + g_object_get (camera->videobin_capsfilter, "caps", &caps, NULL); + } else { + GST_WARNING ("Missing imagebin capsfilter"); + } + gst_value_set_caps (value, caps); + gst_caps_unref (caps); + } + break; + case PROP_VIEWFINDER_CAPS:{ + GstCaps *caps = NULL; + if (G_LIKELY (camera->viewfinderbin_capsfilter)) { + g_object_get (camera->viewfinderbin_capsfilter, "caps", &caps, NULL); + } else { + GST_WARNING ("Missing imagebin capsfilter"); + } + gst_value_set_caps (value, caps); + gst_caps_unref (caps); + } + break; + case PROP_POST_PREVIEWS: + g_value_set_boolean (value, camera->post_previews); + break; + case PROP_PREVIEW_CAPS: + if (camera->preview_caps) + gst_value_set_caps (value, camera->preview_caps); + break; + case PROP_VIDEO_ENCODING_PROFILE: + if (camera->video_profile) { + g_value_set_object (value, camera->video_profile); + } + break; + case PROP_VIDEO_FILTER: + if (camera->user_video_filter) + g_value_set_object (value, camera->user_video_filter); + break; + case PROP_IMAGE_FILTER: + if (camera->user_image_filter) + g_value_set_object (value, camera->user_image_filter); + break; + case PROP_VIEWFINDER_FILTER: + if (camera->user_viewfinder_filter) + g_value_set_object (value, camera->user_viewfinder_filter); + break; + case PROP_AUDIO_FILTER: + if (camera->user_audio_filter) + g_value_set_object (value, camera->user_audio_filter); + break; + case PROP_PREVIEW_FILTER: + if (camera->preview_filter) + g_value_set_object (value, camera->preview_filter); + break; + case PROP_VIEWFINDER_SINK:{ + GstElement *sink; + + g_object_get (camera->viewfinderbin, "video-sink", &sink, NULL); + g_value_take_object (value, sink); + break; + } + case PROP_ZOOM: + g_value_set_float (value, camera->zoom); + break; + case PROP_MAX_ZOOM: + g_value_set_float (value, camera->max_zoom); + break; + case PROP_IMAGE_ENCODING_PROFILE: + if (camera->image_profile) { + g_value_set_object (value, camera->image_profile); + } + break; + case PROP_IDLE: + g_value_set_boolean (value, + g_atomic_int_get (&camera->processing_counter) == 0); + break; + case PROP_FLAGS: + g_value_set_flags (value, camera->flags); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +gboolean +gst_camera_bin2_plugin_init (GstPlugin * plugin) +{ + GST_DEBUG_CATEGORY_INIT (gst_camera_bin_debug, "camerabin", 0, "CameraBin"); + + return gst_element_register (plugin, "camerabin", GST_RANK_NONE, + gst_camera_bin2_get_type ()); +} Index: b/gst/camerabin2/gstcamerabin2.h =================================================================== --- /dev/null +++ b/gst/camerabin2/gstcamerabin2.h @@ -0,0 +1,168 @@ +/* GStreamer + * Copyright (C) 2010 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +#ifndef _GST_CAMERA_BIN2_H_ +#define _GST_CAMERA_BIN2_H_ + +#include +#include + +G_BEGIN_DECLS + +/* to keep code mergeable */ +#define GstCameraBin2 GstCameraBin +#define GstCameraBin2Class GstCameraBinClass + +#define GST_TYPE_CAMERA_BIN2 (gst_camera_bin2_get_type()) +#define GST_CAMERA_BIN2(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CAMERA_BIN2,GstCameraBin2)) +#define GST_CAMERA_BIN2_CAST(obj) ((GstCameraBin2 *) obj) +#define GST_CAMERA_BIN2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CAMERA_BIN2,GstCameraBin2Class)) +#define GST_IS_CAMERA_BIN2(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CAMERA_BIN2)) +#define GST_IS_CAMERA_BIN2_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CAMERA_BIN2)) + +typedef enum +{ + /* matches GstEncFlags GST_ENC_FLAG_NO_AUDIO_CONVERSION in encodebin */ + GST_CAM_FLAG_NO_AUDIO_CONVERSION = (1 << 0), + /* matches GstEncFlags GST_ENC_FLAG_NO_VIDEO_CONVERSION in encodebin */ + GST_CAM_FLAG_NO_VIDEO_CONVERSION = (1 << 1), + /* maps to 'disable-converters' property in viewfinderbin */ + GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION = (1 << 2), + /* maps to GstEncFlags GST_ENC_FLAG_NO_VIDEO_CONVERSION in the image bin's + * encodebin */ + GST_CAM_FLAG_NO_IMAGE_CONVERSION = (1 << 3) +} GstCamFlags; + + +typedef enum _GstCameraBinVideoState +{ + GST_CAMERA_BIN_VIDEO_IDLE=0, + GST_CAMERA_BIN_VIDEO_STARTING=1, + GST_CAMERA_BIN_VIDEO_RECORDING=2, + GST_CAMERA_BIN_VIDEO_FINISHING=3 +} GstCameraBinVideoState; + +typedef struct _GstCameraBin2 GstCameraBin2; +typedef struct _GstCameraBin2Class GstCameraBin2Class; + +struct _GstCameraBin2 +{ + GstPipeline pipeline; + + GstElement *src; + GstElement *user_src; + gulong src_capture_notify_id; + + GstElement *video_encodebin; + gulong video_encodebin_signal_id; + GstElement *videosink; + GstElement *videobin_capsfilter; + + GstElement *viewfinderbin; + GstElement *viewfinderbin_queue; + GstElement *viewfinderbin_capsfilter; + + GstElement *image_encodebin; + gulong image_encodebin_signal_id; + GstElement *imagesink; + GstElement *imagebin_capsfilter; + + GstElement *video_filter; + GstElement *image_filter; + GstElement *viewfinder_filter; + GstElement *audio_filter; + GstElement *user_video_filter; + GstElement *user_image_filter; + GstElement *user_viewfinder_filter; + GstElement *user_audio_filter; + + GstElement *audio_src; + GstElement *user_audio_src; + GstElement *audio_volume; + GstElement *audio_capsfilter; + + gint processing_counter; /* atomic int */ + + /* Index of the auto incrementing file index for captures */ + gint capture_index; + + GMutex image_capture_mutex; + /* stores list of image locations to be pushed to the image sink + * as file location change notifications, they are pushed before + * each buffer capture */ + GSList *image_location_list; + /* Store also tags and push them before each captured image */ + GSList *image_tags_list; + + /* + * Similar to above, but used for giving names to previews + * + * Need to protect with a mutex as this list is used when the + * camera-source posts a preview image. As we have no control + * on how the camera-source will behave (we can only tell how + * it should), the preview location list might be used in an + * inconsistent way. + * One example is the camera-source posting a preview image after + * camerabin2 was put to ready, when this preview list will be + * freed and set to NULL. Concurrent access might lead to crashes in + * this situation. (Concurrency from the state-change freeing the + * list and the message handling function looking at preview names) + */ + GSList *preview_location_list; + GMutex preview_list_mutex; + + gboolean video_profile_switch; + gboolean image_profile_switch; + + gboolean audio_drop_eos; + gboolean audio_send_newseg; + + GMutex video_capture_mutex; + GCond video_state_cond; + GstCameraBinVideoState video_state; + + /* properties */ + gint mode; + gchar *location; + gboolean post_previews; + GstCaps *preview_caps; + GstElement *preview_filter; + GstEncodingProfile *video_profile; + GstEncodingProfile *image_profile; + gfloat zoom; + gfloat max_zoom; + GstCamFlags flags; + + gboolean elements_created; +}; + +struct _GstCameraBin2Class +{ + GstPipelineClass pipeline_class; + + /* Action signals */ + void (*start_capture) (GstCameraBin2 * camera); + void (*stop_capture) (GstCameraBin2 * camera); +}; + +GType gst_camera_bin2_get_type (void); +gboolean gst_camera_bin2_plugin_init (GstPlugin * plugin); + +G_END_DECLS + +#endif Index: b/gst/camerabin2/gstplugin.c =================================================================== --- /dev/null +++ b/gst/camerabin2/gstplugin.c @@ -0,0 +1,46 @@ +/* GStreamer + * Copyright (C) <2010> Thiago Santos + * + * gstplugin.c: camerabin2 plugin registering + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstviewfinderbin.h" +#include "gstwrappercamerabinsrc.h" +#include "gstcamerabin2.h" + +static gboolean +plugin_init (GstPlugin * plugin) +{ + if (!gst_viewfinder_bin_plugin_init (plugin)) + return FALSE; + if (!gst_wrapper_camera_bin_src_plugin_init (plugin)) + return FALSE; + if (!gst_camera_bin2_plugin_init (plugin)) + return FALSE; + + return TRUE; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + camerabin, "Take image snapshots and record movies from camera", + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) Index: b/gst/camerabin2/gstviewfinderbin.c =================================================================== --- /dev/null +++ b/gst/camerabin2/gstviewfinderbin.c @@ -0,0 +1,370 @@ +/* GStreamer + * Copyright (C) 2010 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/** + * SECTION:element-gstviewfinderbin + * + * The gstviewfinderbin element is a displaying element for camerabin2. + * + * + * Example launch line + * |[ + * gst-launch -v videotestsrc ! viewfinderbin + * ]| + * Feeds the viewfinderbin with video test data. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstviewfinderbin.h" +#include "camerabingeneral.h" +#include + +#include + +GST_DEBUG_CATEGORY_STATIC (gst_viewfinder_bin_debug); +#define GST_CAT_DEFAULT gst_viewfinder_bin_debug + +enum +{ + PROP_0, + PROP_VIDEO_SINK, + PROP_DISABLE_CONVERTERS +}; + +#define DEFAULT_DISABLE_CONVERTERS FALSE + +/* pad templates */ + +static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-raw") + ); + +/* class initialization */ +#define gst_viewfinder_bin_parent_class parent_class +G_DEFINE_TYPE (GstViewfinderBin, gst_viewfinder_bin, GST_TYPE_BIN); + +static void gst_viewfinder_bin_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * spec); +static void gst_viewfinder_bin_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * spec); + +static void +gst_viewfinder_bin_set_video_sink (GstViewfinderBin * vfbin, GstElement * sink); + + +/* Element class functions */ +static GstStateChangeReturn +gst_viewfinder_bin_change_state (GstElement * element, GstStateChange trans); + +static void +gst_viewfinder_bin_dispose (GObject * object) +{ + GstViewfinderBin *viewfinderbin = GST_VIEWFINDER_BIN_CAST (object); + + if (viewfinderbin->user_video_sink) { + gst_object_unref (viewfinderbin->user_video_sink); + viewfinderbin->user_video_sink = NULL; + } + + if (viewfinderbin->video_sink) { + gst_object_unref (viewfinderbin->video_sink); + viewfinderbin->video_sink = NULL; + } + + G_OBJECT_CLASS (parent_class)->dispose ((GObject *) viewfinderbin); +} + +static void +gst_viewfinder_bin_class_init (GstViewfinderBinClass * klass) +{ + GObjectClass *gobject_klass; + GstElementClass *element_class; + + gobject_klass = (GObjectClass *) klass; + element_class = GST_ELEMENT_CLASS (klass); + + element_class->change_state = + GST_DEBUG_FUNCPTR (gst_viewfinder_bin_change_state); + + gobject_klass->dispose = gst_viewfinder_bin_dispose; + gobject_klass->set_property = gst_viewfinder_bin_set_property; + gobject_klass->get_property = gst_viewfinder_bin_get_property; + + g_object_class_install_property (gobject_klass, PROP_VIDEO_SINK, + g_param_spec_object ("video-sink", "Video Sink", + "the video output element to use (NULL = default)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_klass, PROP_DISABLE_CONVERTERS, + g_param_spec_boolean ("disable-converters", "Disable conversion elements", + "If video converters should be disabled (must be set on NULL)", + DEFAULT_DISABLE_CONVERTERS, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&sink_template)); + + gst_element_class_set_static_metadata (element_class, "Viewfinder Bin", + "Sink/Video", "Viewfinder Bin used in camerabin2", + "Thiago Santos "); +} + +static void +gst_viewfinder_bin_init (GstViewfinderBin * viewfinderbin) +{ + GstPadTemplate *templ = gst_static_pad_template_get (&sink_template); + viewfinderbin->ghostpad = gst_ghost_pad_new_no_target_from_template ("sink", + templ); + gst_object_unref (templ); + gst_element_add_pad (GST_ELEMENT_CAST (viewfinderbin), + viewfinderbin->ghostpad); + + viewfinderbin->disable_converters = DEFAULT_DISABLE_CONVERTERS; +} + +static gboolean +gst_viewfinder_bin_create_elements (GstViewfinderBin * vfbin) +{ + GstElement *csp = NULL; + GstElement *videoscale = NULL; + GstPad *firstpad = NULL; + const gchar *missing_element_name; + gboolean newsink = FALSE; + gboolean updated_converters = FALSE; + + GST_DEBUG_OBJECT (vfbin, "Creating internal elements"); + + /* First check if we need to add/replace the internal sink */ + if (vfbin->video_sink) { + if (vfbin->user_video_sink && vfbin->video_sink != vfbin->user_video_sink) { + gst_bin_remove (GST_BIN_CAST (vfbin), vfbin->video_sink); + gst_object_unref (vfbin->video_sink); + vfbin->video_sink = NULL; + } + } + + if (!vfbin->video_sink) { + if (vfbin->user_video_sink) + vfbin->video_sink = gst_object_ref (vfbin->user_video_sink); + else { + vfbin->video_sink = gst_element_factory_make ("autovideosink", + "vfbin-sink"); + if (!vfbin->video_sink) { + missing_element_name = "autovideosink"; + goto missing_element; + } + } + + gst_bin_add (GST_BIN_CAST (vfbin), gst_object_ref (vfbin->video_sink)); + newsink = TRUE; + } + + /* check if we want add/remove the conversion elements */ + if (vfbin->elements_created && vfbin->disable_converters) { + /* remove the elements, user doesn't want them */ + + gst_ghost_pad_set_target (GST_GHOST_PAD (vfbin->ghostpad), NULL); + csp = gst_bin_get_by_name (GST_BIN_CAST (vfbin), "vfbin-csp"); + videoscale = gst_bin_get_by_name (GST_BIN_CAST (vfbin), "vfbin-videoscale"); + + gst_bin_remove (GST_BIN_CAST (vfbin), csp); + gst_bin_remove (GST_BIN_CAST (vfbin), videoscale); + + gst_object_unref (csp); + gst_object_unref (videoscale); + + updated_converters = TRUE; + } else if (!vfbin->elements_created && !vfbin->disable_converters) { + gst_ghost_pad_set_target (GST_GHOST_PAD (vfbin->ghostpad), NULL); + + /* add the elements, user wants them */ + csp = gst_element_factory_make ("videoconvert", "vfbin-csp"); + if (!csp) { + missing_element_name = "videoconvert"; + goto missing_element; + } + gst_bin_add (GST_BIN_CAST (vfbin), csp); + + videoscale = gst_element_factory_make ("videoscale", "vfbin->videoscale"); + if (!videoscale) { + missing_element_name = "videoscale"; + goto missing_element; + } + gst_bin_add (GST_BIN_CAST (vfbin), videoscale); + + gst_element_link_pads_full (csp, "src", videoscale, "sink", + GST_PAD_LINK_CHECK_NOTHING); + + vfbin->elements_created = TRUE; + GST_DEBUG_OBJECT (vfbin, "Elements succesfully created and linked"); + + updated_converters = TRUE; + } + /* otherwise, just leave it as is */ + + /* if sink was replaced -> link it to the internal converters */ + if (newsink && !vfbin->disable_converters) { + gboolean unref = FALSE; + if (!videoscale) { + videoscale = gst_bin_get_by_name (GST_BIN_CAST (vfbin), + "vfbin-videscale"); + unref = TRUE; + } + + if (!gst_element_link_pads_full (videoscale, "src", vfbin->video_sink, + "sink", GST_PAD_LINK_CHECK_CAPS)) { + GST_ELEMENT_ERROR (vfbin, CORE, NEGOTIATION, (NULL), + ("linking videoscale and viewfindersink failed")); + } + + if (unref) + gst_object_unref (videoscale); + videoscale = NULL; + } + + /* Check if we need a new ghostpad target */ + if (updated_converters || (newsink && vfbin->disable_converters)) { + if (vfbin->disable_converters) { + firstpad = gst_element_get_static_pad (vfbin->video_sink, "sink"); + } else { + /* csp should always exist at this point */ + firstpad = gst_element_get_static_pad (csp, "sink"); + } + } + + /* need to change the ghostpad target if firstpad is set */ + if (firstpad) { + if (!gst_ghost_pad_set_target (GST_GHOST_PAD (vfbin->ghostpad), firstpad)) + goto error; + gst_object_unref (firstpad); + firstpad = NULL; + } + + return TRUE; + +missing_element: + gst_element_post_message (GST_ELEMENT_CAST (vfbin), + gst_missing_element_message_new (GST_ELEMENT_CAST (vfbin), + missing_element_name)); + GST_ELEMENT_ERROR (vfbin, CORE, MISSING_PLUGIN, + (_("Missing element '%s' - check your GStreamer installation."), + missing_element_name), (NULL)); + goto error; + +error: + GST_WARNING_OBJECT (vfbin, "Creating internal elements failed"); + if (firstpad) + gst_object_unref (firstpad); + return FALSE; +} + +static GstStateChangeReturn +gst_viewfinder_bin_change_state (GstElement * element, GstStateChange trans) +{ + GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; + GstViewfinderBin *vfbin = GST_VIEWFINDER_BIN_CAST (element); + + switch (trans) { + case GST_STATE_CHANGE_NULL_TO_READY: + if (!gst_viewfinder_bin_create_elements (vfbin)) { + return GST_STATE_CHANGE_FAILURE; + } + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, trans); + + switch (trans) { + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + + return ret; +} + +static void +gst_viewfinder_bin_set_video_sink (GstViewfinderBin * vfbin, GstElement * sink) +{ + GST_INFO_OBJECT (vfbin, "Setting video sink to %" GST_PTR_FORMAT, sink); + + if (vfbin->user_video_sink != sink) { + if (vfbin->user_video_sink) { + gst_object_unref (vfbin->user_video_sink); + } + vfbin->user_video_sink = sink; + if (sink) + gst_object_ref (sink); + } +} + +static void +gst_viewfinder_bin_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstViewfinderBin *vfbin = GST_VIEWFINDER_BIN_CAST (object); + + switch (prop_id) { + case PROP_VIDEO_SINK: + gst_viewfinder_bin_set_video_sink (vfbin, g_value_get_object (value)); + break; + case PROP_DISABLE_CONVERTERS: + vfbin->disable_converters = g_value_get_boolean (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_viewfinder_bin_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstViewfinderBin *vfbin = GST_VIEWFINDER_BIN_CAST (object); + + switch (prop_id) { + case PROP_VIDEO_SINK: + g_value_set_object (value, vfbin->video_sink); + break; + case PROP_DISABLE_CONVERTERS: + g_value_set_boolean (value, vfbin->disable_converters); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +gboolean +gst_viewfinder_bin_plugin_init (GstPlugin * plugin) +{ + GST_DEBUG_CATEGORY_INIT (gst_viewfinder_bin_debug, "viewfinderbin", 0, + "ViewFinderBin"); + return gst_element_register (plugin, "viewfinderbin", GST_RANK_NONE, + gst_viewfinder_bin_get_type ()); +} Index: b/gst/camerabin2/gstviewfinderbin.h =================================================================== --- /dev/null +++ b/gst/camerabin2/gstviewfinderbin.h @@ -0,0 +1,60 @@ +/* GStreamer + * Copyright (C) 2010 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +#ifndef _GST_VIEWFINDER_BIN_H_ +#define _GST_VIEWFINDER_BIN_H_ + +#include + +G_BEGIN_DECLS + +#define GST_TYPE_VIEWFINDER_BIN (gst_viewfinder_bin_get_type()) +#define GST_VIEWFINDER_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIEWFINDER_BIN,GstViewfinderBin)) +#define GST_VIEWFINDER_BIN_CAST(obj) ((GstViewfinderBin *) obj) +#define GST_VIEWFINDER_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIEWFINDER_BIN,GstViewfinderBinClass)) +#define GST_IS_VIEWFINDER_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIEWFINDER_BIN)) +#define GST_IS_VIEWFINDER_BIN_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIEWFINDER_BIN)) + +typedef struct _GstViewfinderBin GstViewfinderBin; +typedef struct _GstViewfinderBinClass GstViewfinderBinClass; + +struct _GstViewfinderBin +{ + GstBin bin; + + GstPad *ghostpad; + + GstElement *video_sink; + GstElement *user_video_sink; + + gboolean elements_created; + + gboolean disable_converters; +}; + +struct _GstViewfinderBinClass +{ + GstBinClass bin_class; +}; + +GType gst_viewfinder_bin_get_type (void); +gboolean gst_viewfinder_bin_plugin_init (GstPlugin * plugin); + +G_END_DECLS + +#endif Index: b/gst/camerabin2/gstwrappercamerabinsrc.c =================================================================== --- /dev/null +++ b/gst/camerabin2/gstwrappercamerabinsrc.c @@ -0,0 +1,1285 @@ +/* + * GStreamer + * Copyright (C) 2010 Texas Instruments, Inc + * Copyright (C) 2011 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +/** + * SECTION:element-wrappercamerabinsrc + * + * A camera bin src element that wraps a default video source with a single + * pad into the 3pad model that camerabin2 expects. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex + * with newer GLib versions (>= 2.31.0) */ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + +#include + +#include "gstwrappercamerabinsrc.h" +#include "camerabingeneral.h" + +enum +{ + PROP_0, + PROP_VIDEO_SRC, + PROP_VIDEO_SRC_FILTER +}; + +GST_DEBUG_CATEGORY (wrapper_camera_bin_src_debug); +#define GST_CAT_DEFAULT wrapper_camera_bin_src_debug + +#define gst_wrapper_camera_bin_src_parent_class parent_class +G_DEFINE_TYPE (GstWrapperCameraBinSrc, gst_wrapper_camera_bin_src, + GST_TYPE_BASE_CAMERA_SRC); + +static GstStaticPadTemplate vfsrc_template = +GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME, + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); + +static GstStaticPadTemplate imgsrc_template = +GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME, + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); + +static GstStaticPadTemplate vidsrc_template = +GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME, + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); + +static void set_capsfilter_caps (GstWrapperCameraBinSrc * self, + GstCaps * new_caps); + +static void +gst_wrapper_camera_bin_src_dispose (GObject * object) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (object); + + if (self->app_vid_src) { + gst_object_unref (self->app_vid_src); + self->app_vid_src = NULL; + } + if (self->app_vid_filter) { + gst_object_unref (self->app_vid_filter); + self->app_vid_filter = NULL; + } + gst_caps_replace (&self->image_capture_caps, NULL); + + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +gst_wrapper_camera_bin_src_finalize (GstWrapperCameraBinSrc * self) +{ + G_OBJECT_CLASS (parent_class)->finalize ((GObject *) (self)); +} + +static void +gst_wrapper_camera_bin_src_set_property (GObject * object, + guint prop_id, const GValue * value, GParamSpec * pspec) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (object); + + switch (prop_id) { + case PROP_VIDEO_SRC: + if (GST_STATE (self) != GST_STATE_NULL) { + GST_ELEMENT_ERROR (self, CORE, FAILED, + ("camerasrc must be in NULL state when setting the video source element"), + (NULL)); + } else { + if (self->app_vid_src) + gst_object_unref (self->app_vid_src); + self->app_vid_src = g_value_get_object (value); + if (self->app_vid_src) + gst_object_ref (self->app_vid_src); + } + break; + case PROP_VIDEO_SRC_FILTER: + if (GST_STATE (self) != GST_STATE_NULL) { + GST_ELEMENT_ERROR (self, CORE, FAILED, + ("camerasrc must be in NULL state when setting the video source filter element"), + (NULL)); + } else { + if (self->app_vid_filter) + gst_object_unref (self->app_vid_filter); + self->app_vid_filter = g_value_get_object (value); + if (self->app_vid_filter) + gst_object_ref (self->app_vid_filter); + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); + break; + } +} + +static void +gst_wrapper_camera_bin_src_get_property (GObject * object, + guint prop_id, GValue * value, GParamSpec * pspec) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (object); + + switch (prop_id) { + case PROP_VIDEO_SRC: + if (self->src_vid_src) + g_value_set_object (value, self->src_vid_src); + else + g_value_set_object (value, self->app_vid_src); + break; + case PROP_VIDEO_SRC_FILTER: + if (self->video_filter) + g_value_set_object (value, self->video_filter); + else + g_value_set_object (value, self->app_vid_filter); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); + break; + } +} + +static void +gst_wrapper_camera_bin_reset_video_src_caps (GstWrapperCameraBinSrc * self, + GstCaps * caps) +{ + GST_DEBUG_OBJECT (self, "Resetting src caps to %" GST_PTR_FORMAT, caps); + if (self->src_vid_src) { + GstCaps *old_caps; + + g_object_get (G_OBJECT (self->src_filter), "caps", &old_caps, NULL); + if (gst_caps_is_equal (caps, old_caps)) { + GST_DEBUG_OBJECT (self, "old and new caps are same, do not reset it"); + if (old_caps) + gst_caps_unref (old_caps); + return; + } + if (old_caps) + gst_caps_unref (old_caps); + + set_capsfilter_caps (self, caps); + } +} + +/** + * gst_wrapper_camera_bin_src_imgsrc_probe: + * + * Buffer probe called before sending each buffer to image queue. + */ +static GstPadProbeReturn +gst_wrapper_camera_bin_src_imgsrc_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer data) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (data); + GstBaseCameraSrc *camerasrc = GST_BASE_CAMERA_SRC (data); + GstBuffer *buffer = GST_BUFFER (info->data); + GstPadProbeReturn ret = GST_PAD_PROBE_DROP; + + GST_LOG_OBJECT (self, "Image probe, mode %d, capture count %d bufsize: %" + G_GSIZE_FORMAT, camerasrc->mode, self->image_capture_count, + gst_buffer_get_size (buffer)); + + g_mutex_lock (&camerasrc->capturing_mutex); + if (self->image_capture_count > 0) { + GstSample *sample; + GstCaps *caps; + ret = GST_PAD_PROBE_OK; + self->image_capture_count--; + + /* post preview */ + /* TODO This can likely be optimized if the viewfinder caps is the same as + * the preview caps, avoiding another scaling of the same buffer. */ + GST_DEBUG_OBJECT (self, "Posting preview for image"); + caps = gst_pad_get_current_caps (pad); + sample = gst_sample_new (buffer, caps, NULL, NULL); + gst_base_camera_src_post_preview (camerasrc, sample); + gst_caps_unref (caps); + gst_sample_unref (sample); + + if (self->image_capture_count == 0) { + gst_base_camera_src_finish_capture (camerasrc); + } + } + g_mutex_unlock (&camerasrc->capturing_mutex); + return ret; +} + +/** + * gst_wrapper_camera_bin_src_vidsrc_probe: + * + * Buffer probe called before sending each buffer to image queue. + */ +static GstPadProbeReturn +gst_wrapper_camera_bin_src_vidsrc_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer data) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (data); + GstBaseCameraSrc *camerasrc = GST_BASE_CAMERA_SRC_CAST (self); + GstPadProbeReturn ret = GST_PAD_PROBE_DROP; + GstBuffer *buffer = GST_BUFFER (info->data); + + GST_LOG_OBJECT (self, "Video probe, mode %d, capture status %d", + camerasrc->mode, self->video_rec_status); + + /* TODO do we want to lock for every buffer? */ + /* + * Note that we can use gst_pad_push_event here because we are a buffer + * probe. + */ + /* TODO shouldn't access this directly */ + g_mutex_lock (&camerasrc->capturing_mutex); + if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_DONE) { + /* NOP */ + } else if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_STARTING) { + GstClockTime ts; + GstSegment segment; + GstCaps *caps; + GstSample *sample; + + GST_DEBUG_OBJECT (self, "Starting video recording"); + self->video_rec_status = GST_VIDEO_RECORDING_STATUS_RUNNING; + + ts = GST_BUFFER_TIMESTAMP (buffer); + if (!GST_CLOCK_TIME_IS_VALID (ts)) + ts = 0; + gst_segment_init (&segment, GST_FORMAT_TIME); + segment.start = ts; + gst_pad_push_event (self->vidsrc, gst_event_new_segment (&segment)); + + /* post preview */ + GST_DEBUG_OBJECT (self, "Posting preview for video"); + caps = gst_pad_get_current_caps (pad); + sample = gst_sample_new (buffer, caps, NULL, NULL); + gst_base_camera_src_post_preview (camerasrc, sample); + gst_caps_unref (caps); + gst_sample_unref (sample); + + ret = GST_PAD_PROBE_OK; + } else if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_FINISHING) { + GstPad *peer; + + /* send eos */ + GST_DEBUG_OBJECT (self, "Finishing video recording, pushing eos"); + + peer = gst_pad_get_peer (self->vidsrc); + + if (peer) { + /* send to the peer as we don't want our pads with eos flag */ + gst_pad_send_event (peer, gst_event_new_eos ()); + gst_object_unref (peer); + } else { + GST_WARNING_OBJECT (camerasrc, "No peer pad for vidsrc"); + } + self->video_rec_status = GST_VIDEO_RECORDING_STATUS_DONE; + gst_base_camera_src_finish_capture (camerasrc); + } else { + ret = GST_PAD_PROBE_OK; + } + g_mutex_unlock (&camerasrc->capturing_mutex); + return ret; +} + +static GstPadProbeReturn +gst_wrapper_camera_src_src_event_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer udata) +{ + GstPadProbeReturn ret = GST_PAD_PROBE_OK; + GstWrapperCameraBinSrc *self = udata; + GstEvent *evt = GST_EVENT (info->data); + + switch (GST_EVENT_TYPE (evt)) { + case GST_EVENT_EOS: + /* drop */ + ret = GST_PAD_PROBE_DROP; + break; + case GST_EVENT_SEGMENT: + if (self->drop_newseg) { + ret = GST_PAD_PROBE_DROP; + self->drop_newseg = FALSE; + } + break; + default: + break; + } + return ret; +} + +static void +gst_wrapper_camera_bin_src_caps_cb (GObject * gobject, GParamSpec * pspec, + gpointer user_data) +{ + GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC (user_data); + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (user_data); + GstPad *src_caps_src_pad; + GstCaps *caps = NULL; + GstStructure *in_st = NULL; + + /* get the new caps that were set on the capsfilter that configures the + * source */ + src_caps_src_pad = gst_element_get_static_pad (self->src_filter, "src"); + caps = gst_pad_query_caps (src_caps_src_pad, NULL); + gst_object_unref (src_caps_src_pad); + GST_DEBUG_OBJECT (self, "src-filter caps changed to %s", + gst_caps_to_string (caps)); + + if (gst_caps_get_size (caps)) { + in_st = gst_caps_get_structure (caps, 0); + if (in_st) { + gst_structure_get_int (in_st, "width", &bcamsrc->width); + gst_structure_get_int (in_st, "height", &bcamsrc->height); + + GST_DEBUG_OBJECT (self, "Source dimensions now: %dx%d", bcamsrc->width, + bcamsrc->height); + } + } + + /* Update zoom */ + gst_base_camera_src_setup_zoom (bcamsrc); + + /* Update post-zoom capsfilter */ + if (self->src_zoom_filter) { + GstCaps *filtercaps; + + g_object_get (G_OBJECT (self->src_zoom_filter), "caps", &filtercaps, NULL); + if (!gst_caps_is_equal (filtercaps, caps)) + g_object_set (G_OBJECT (self->src_zoom_filter), "caps", caps, NULL); + gst_caps_unref (filtercaps); + } + + /* drop our ref on the caps */ + gst_caps_unref (caps); +}; + +static void +gst_wrapper_camera_bin_src_max_zoom_cb (GObject * self, GParamSpec * pspec, + gpointer user_data) +{ + GstBaseCameraSrc *bcamsrc = (GstBaseCameraSrc *) user_data; + + g_object_get (self, "max-zoom", &bcamsrc->max_zoom, NULL); + g_object_notify (G_OBJECT (bcamsrc), "max-zoom"); +} + + +static gboolean +gst_wrapper_camera_bin_src_src_event (GstPad * pad, GstObject * parent, + GstEvent * event) +{ + gboolean ret = TRUE; + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (parent); + GstPad *upstream_pad = NULL; + + GST_DEBUG_OBJECT (self, "Handling event %p %" GST_PTR_FORMAT, event, event); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_RECONFIGURE: + if (pad == self->imgsrc) { + GST_DEBUG_OBJECT (self, "Image mode reconfigure event received"); + self->image_renegotiate = TRUE; + } else if (pad == self->vidsrc) { + GST_DEBUG_OBJECT (self, "Video mode reconfigure event received"); + self->video_renegotiate = TRUE; + } + if (pad == self->imgsrc || pad == self->vidsrc) { + gst_event_unref (event); + return ret; + } + break; + default: + break; + } + + if (pad == self->imgsrc) { + upstream_pad = self->outsel_imgpad; + } else if (pad == self->vidsrc) { + upstream_pad = self->outsel_vidpad; + } + + if (upstream_pad) { + ret = gst_pad_send_event (upstream_pad, event); + } else { + GST_WARNING_OBJECT (self, "Event caught that doesn't have an upstream pad -" + "this shouldn't be possible!"); + gst_event_unref (event); + ret = FALSE; + } + + return ret; +} + +/** + * check_and_replace_src + * @self: #GstWrapperCamerabinSrcCameraSrc object + * + * Checks if the current videosrc needs to be replaced + */ +static gboolean +check_and_replace_src (GstWrapperCameraBinSrc * self) +{ + GstBin *cbin = GST_BIN_CAST (self); + GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC_CAST (self); + + if (self->src_vid_src && self->src_vid_src == self->app_vid_src) { + GST_DEBUG_OBJECT (self, "No need to change current videosrc"); + return TRUE; + } + + if (self->src_vid_src) { + GST_DEBUG_OBJECT (self, "Removing old video source"); + if (self->src_max_zoom_signal_id) { + g_signal_handler_disconnect (self->src_vid_src, + self->src_max_zoom_signal_id); + self->src_max_zoom_signal_id = 0; + } + if (self->src_event_probe_id) { + GstPad *pad; + pad = gst_element_get_static_pad (self->src_vid_src, "src"); + gst_pad_remove_probe (pad, self->src_event_probe_id); + gst_object_unref (pad); + self->src_event_probe_id = 0; + } + gst_bin_remove (GST_BIN_CAST (self), self->src_vid_src); + self->src_vid_src = NULL; + } + + GST_DEBUG_OBJECT (self, "Adding new video source"); + + /* Add application set or default video src element */ + if (!(self->src_vid_src = gst_camerabin_setup_default_element (cbin, + self->app_vid_src, "autovideosrc", DEFAULT_VIDEOSRC, + "camerasrc-real-src"))) { + self->src_vid_src = NULL; + return FALSE; + } else { + GstElement *videoconvert; + if (!gst_bin_add (cbin, self->src_vid_src)) { + return FALSE; + } + + /* check if we already have the next element to link to */ + videoconvert = gst_bin_get_by_name (cbin, "src-videoconvert"); + if (videoconvert) { + if (!gst_element_link_pads (self->src_vid_src, "src", videoconvert, + "sink")) { + return FALSE; + } + } + } + + /* we listen for changes to max-zoom in the video src so that + * we can proxy them to the basecamerasrc property */ + if (g_object_class_find_property (G_OBJECT_GET_CLASS (bcamsrc), "max-zoom")) { + self->src_max_zoom_signal_id = + g_signal_connect (G_OBJECT (self->src_vid_src), "notify::max-zoom", + (GCallback) gst_wrapper_camera_bin_src_max_zoom_cb, bcamsrc); + } + + /* add a buffer probe to the src elemento to drop EOS from READY->NULL */ + { + GstPad *pad; + pad = gst_element_get_static_pad (self->src_vid_src, "src"); + + self->src_event_probe_id = + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, + gst_wrapper_camera_src_src_event_probe, gst_object_ref (self), + gst_object_unref); + gst_object_unref (pad); + } + return TRUE; +} + +/** + * gst_wrapper_camera_bin_src_construct_pipeline: + * @bcamsrc: camerasrc object + * + * This function creates and links the elements of the camerasrc bin + * videosrc ! cspconv ! srcfilter ! cspconv ! capsfilter ! crop ! scale ! \ + * capsfilter ! tee name=t + * t. ! ... (viewfinder pad) + * t. ! output-selector name=outsel + * outsel. ! (image pad) + * outsel. ! (video pad) + * + * Returns: TRUE, if elements were successfully created, FALSE otherwise + */ +static gboolean +gst_wrapper_camera_bin_src_construct_pipeline (GstBaseCameraSrc * bcamsrc) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (bcamsrc); + GstBin *cbin = GST_BIN (bcamsrc); + GstElement *tee; + GstElement *filter_csp; + GstElement *src_csp; + GstElement *capsfilter; + gboolean ret = FALSE; + GstPad *vf_pad; + GstPad *tee_capture_pad; + GstPad *src_caps_src_pad; + + /* checks and adds a new video src if needed */ + if (!check_and_replace_src (self)) + goto done; + + if (!self->elements_created) { + + GST_DEBUG_OBJECT (self, "constructing pipeline"); + + if (!gst_camerabin_create_and_add_element (cbin, "videoconvert", + "src-videoconvert")) + goto done; + + if (self->app_vid_filter) { + self->video_filter = gst_object_ref (self->app_vid_filter); + + if (!gst_camerabin_add_element (cbin, self->video_filter)) + goto done; + if (!gst_camerabin_create_and_add_element (cbin, "videoconvert", + "filter-videoconvert")) + goto done; + } + + if (!(self->src_filter = + gst_camerabin_create_and_add_element (cbin, "capsfilter", + "src-capsfilter"))) + goto done; + + /* attach to notify::caps on the first capsfilter and use a callback + * to recalculate the zoom properties when these caps change and to + * propagate the caps to the second capsfilter */ + src_caps_src_pad = gst_element_get_static_pad (self->src_filter, "src"); + g_signal_connect (src_caps_src_pad, "notify::caps", + G_CALLBACK (gst_wrapper_camera_bin_src_caps_cb), self); + gst_object_unref (src_caps_src_pad); + + if (!(self->src_zoom_crop = + gst_camerabin_create_and_add_element (cbin, "videocrop", + "zoom-crop"))) + goto done; + if (!(self->src_zoom_scale = + gst_camerabin_create_and_add_element (cbin, "videoscale", + "zoom-scale"))) + goto done; + if (!(self->src_zoom_filter = + gst_camerabin_create_and_add_element (cbin, "capsfilter", + "zoom-capsfilter"))) + goto done; + + if (!(tee = + gst_camerabin_create_and_add_element (cbin, "tee", + "camerasrc-tee"))) + goto done; + + /* viewfinder pad */ + vf_pad = gst_element_get_request_pad (tee, "src_%u"); + g_object_set (tee, "alloc-pad", vf_pad, NULL); + gst_ghost_pad_set_target (GST_GHOST_PAD (self->vfsrc), vf_pad); + gst_object_unref (vf_pad); + + /* image/video pad from tee */ + tee_capture_pad = gst_element_get_request_pad (tee, "src_%u"); + + self->output_selector = + gst_element_factory_make ("output-selector", "outsel"); + g_object_set (self->output_selector, "pad-negotiation-mode", 2, NULL); + gst_bin_add (GST_BIN (self), self->output_selector); + { + GstPad *pad = gst_element_get_static_pad (self->output_selector, "sink"); + + /* check return TODO */ + gst_pad_link (tee_capture_pad, pad); + gst_object_unref (pad); + } + gst_object_unref (tee_capture_pad); + + /* Create the 2 output pads for video and image */ + self->outsel_vidpad = + gst_element_get_request_pad (self->output_selector, "src_%u"); + self->outsel_imgpad = + gst_element_get_request_pad (self->output_selector, "src_%u"); + + g_assert (self->outsel_vidpad != NULL); + g_assert (self->outsel_imgpad != NULL); + + gst_pad_add_probe (self->outsel_imgpad, GST_PAD_PROBE_TYPE_BUFFER, + gst_wrapper_camera_bin_src_imgsrc_probe, gst_object_ref (self), + gst_object_unref); + gst_pad_add_probe (self->outsel_vidpad, GST_PAD_PROBE_TYPE_BUFFER, + gst_wrapper_camera_bin_src_vidsrc_probe, gst_object_ref (self), + gst_object_unref); + gst_ghost_pad_set_target (GST_GHOST_PAD (self->imgsrc), + self->outsel_imgpad); + gst_ghost_pad_set_target (GST_GHOST_PAD (self->vidsrc), + self->outsel_vidpad); + + if (bcamsrc->mode == MODE_IMAGE) { + g_object_set (self->output_selector, "active-pad", self->outsel_imgpad, + NULL); + } else { + g_object_set (self->output_selector, "active-pad", self->outsel_vidpad, + NULL); + } + + + + gst_pad_set_active (self->vfsrc, TRUE); + gst_pad_set_active (self->imgsrc, TRUE); /* XXX ??? */ + gst_pad_set_active (self->vidsrc, TRUE); /* XXX ??? */ + } + + /* Do this even if pipeline is constructed */ + + if (self->video_filter) { + /* check if we need to replace the current one */ + if (self->video_filter != self->app_vid_filter) { + gst_bin_remove (cbin, self->video_filter); + gst_object_unref (self->video_filter); + self->video_filter = NULL; + filter_csp = gst_bin_get_by_name (cbin, "filter-videoconvert"); + gst_bin_remove (cbin, filter_csp); + gst_object_unref (filter_csp); + filter_csp = NULL; + } + } + + if (!self->video_filter) { + if (self->app_vid_filter) { + self->video_filter = gst_object_ref (self->app_vid_filter); + filter_csp = gst_element_factory_make ("videoconvert", + "filter-videoconvert"); + gst_bin_add_many (cbin, self->video_filter, filter_csp, NULL); + src_csp = gst_bin_get_by_name (cbin, "src-videoconvert"); + capsfilter = gst_bin_get_by_name (cbin, "src-capsfilter"); + if (gst_pad_is_linked (gst_element_get_static_pad (src_csp, "src"))) + gst_element_unlink (src_csp, capsfilter); + if (!gst_element_link_many (src_csp, self->video_filter, filter_csp, + capsfilter, NULL)) + goto done; + } + } + ret = TRUE; + self->elements_created = TRUE; +done: + return ret; +} + +static gboolean +copy_missing_fields (GQuark field_id, const GValue * value, gpointer user_data) +{ + GstStructure *st = (GstStructure *) user_data; + const GValue *val = gst_structure_id_get_value (st, field_id); + + if (G_UNLIKELY (val == NULL)) { + gst_structure_id_set_value (st, field_id, value); + } + + return TRUE; +} + +/** + * adapt_image_capture: + * @self: camerasrc object + * @in_caps: caps object that describes incoming image format + * + * Adjust capsfilters and crop according image capture caps if necessary. + * The captured image format from video source might be different from + * what application requested, so we can try to fix that in camerabin. + * + */ +static void +adapt_image_capture (GstWrapperCameraBinSrc * self, GstCaps * in_caps) +{ + GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC (self); + GstStructure *in_st, *new_st, *req_st; + gint in_width = 0, in_height = 0, req_width = 0, req_height = 0, crop = 0; + gdouble ratio_w, ratio_h; + GstCaps *filter_caps = NULL; + + GST_LOG_OBJECT (self, "in caps: %" GST_PTR_FORMAT, in_caps); + GST_LOG_OBJECT (self, "requested caps: %" GST_PTR_FORMAT, + self->image_capture_caps); + + in_st = gst_caps_get_structure (in_caps, 0); + gst_structure_get_int (in_st, "width", &in_width); + gst_structure_get_int (in_st, "height", &in_height); + + req_st = gst_caps_get_structure (self->image_capture_caps, 0); + gst_structure_get_int (req_st, "width", &req_width); + gst_structure_get_int (req_st, "height", &req_height); + + GST_INFO_OBJECT (self, "we requested %dx%d, and got %dx%d", req_width, + req_height, in_width, in_height); + + new_st = gst_structure_copy (req_st); + /* If new fields have been added, we need to copy them */ + gst_structure_foreach (in_st, copy_missing_fields, new_st); + + gst_structure_set (new_st, "width", G_TYPE_INT, in_width, "height", + G_TYPE_INT, in_height, NULL); + + GST_LOG_OBJECT (self, "new image capture caps: %" GST_PTR_FORMAT, new_st); + + /* Crop if requested aspect ratio differs from incoming frame aspect ratio */ + if (self->src_zoom_crop) { + + ratio_w = (gdouble) in_width / req_width; + ratio_h = (gdouble) in_height / req_height; + + if (ratio_w < ratio_h) { + crop = in_height - (req_height * ratio_w); + self->base_crop_top = crop / 2; + self->base_crop_bottom = crop / 2; + } else { + crop = in_width - (req_width * ratio_h); + self->base_crop_left = crop / 2; + self->base_crop_right += crop / 2; + } + + GST_INFO_OBJECT (self, + "setting base crop: left:%d, right:%d, top:%d, bottom:%d", + self->base_crop_left, self->base_crop_right, self->base_crop_top, + self->base_crop_bottom); + g_object_set (G_OBJECT (self->src_zoom_crop), + "top", self->base_crop_top, + "bottom", self->base_crop_bottom, + "left", self->base_crop_left, "right", self->base_crop_right, NULL); + } + + /* Update capsfilters */ + if (self->image_capture_caps) { + gst_caps_unref (self->image_capture_caps); + } + self->image_capture_caps = gst_caps_new_full (new_st, NULL); + set_capsfilter_caps (self, self->image_capture_caps); + + /* Adjust the capsfilter before crop and videoscale elements if necessary */ + if (in_width == bcamsrc->width && in_height == bcamsrc->height) { + GST_DEBUG_OBJECT (self, "no adaptation with resolution needed"); + } else { + GST_DEBUG_OBJECT (self, + "changing %" GST_PTR_FORMAT " from %dx%d to %dx%d", self->src_filter, + bcamsrc->width, bcamsrc->height, in_width, in_height); + /* Apply the width and height to filter caps */ + g_object_get (G_OBJECT (self->src_filter), "caps", &filter_caps, NULL); + filter_caps = gst_caps_make_writable (filter_caps); + gst_caps_set_simple (filter_caps, "width", G_TYPE_INT, in_width, "height", + G_TYPE_INT, in_height, NULL); + g_object_set (G_OBJECT (self->src_filter), "caps", filter_caps, NULL); + gst_caps_unref (filter_caps); + } +} + +/** + * img_capture_prepared: + * @data: camerasrc object + * @caps: caps describing the prepared image format + * + * Callback which is called after image capture has been prepared. + */ +static void +img_capture_prepared (gpointer data, GstCaps * caps) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (data); + + GST_INFO_OBJECT (self, "image capture prepared"); + + /* It is possible we are about to get something else that we requested */ + if (!gst_caps_is_equal (self->image_capture_caps, caps)) { + adapt_image_capture (self, caps); + } else { + set_capsfilter_caps (self, self->image_capture_caps); + } +} + +/** + * + */ +static gboolean +start_image_capture (GstWrapperCameraBinSrc * self) +{ + GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC (self); + GstPhotography *photography = + (GstPhotography *) gst_bin_get_by_interface (GST_BIN_CAST (bcamsrc), + GST_TYPE_PHOTOGRAPHY); + gboolean ret = FALSE; + GstCaps *caps; + + GST_DEBUG_OBJECT (self, "Starting image capture"); + + if (self->image_renegotiate) { + /* clean capsfilter caps so they don't interfere here */ + g_object_set (self->src_filter, "caps", NULL, NULL); + if (self->src_zoom_filter) + g_object_set (self->src_zoom_filter, "caps", NULL, NULL); + + caps = gst_pad_get_allowed_caps (self->imgsrc); + + gst_caps_replace (&self->image_capture_caps, caps); + gst_caps_unref (caps); + + /* FIXME - do we need to update basecamerasrc width/height somehow here? + * if not, i think we need to do something about _when_ they get updated + * to be sure that set_element_zoom doesn't use the wrong values */ + + /* We caught this event in the src pad event handler and now we want to + * actually push it upstream */ + gst_pad_send_event (self->outsel_imgpad, gst_event_new_reconfigure ()); + + self->image_renegotiate = FALSE; + } + + if (photography) { + GST_DEBUG_OBJECT (self, "prepare image capture caps %" GST_PTR_FORMAT, + self->image_capture_caps); + ret = gst_photography_prepare_for_capture (photography, + (GstPhotographyCapturePrepared) img_capture_prepared, + self->image_capture_caps, self); + } else { + g_mutex_unlock (&bcamsrc->capturing_mutex); + gst_wrapper_camera_bin_reset_video_src_caps (self, + self->image_capture_caps); + g_mutex_lock (&bcamsrc->capturing_mutex); + ret = TRUE; + } + + return ret; +} + +static gboolean +gst_wrapper_camera_bin_src_set_mode (GstBaseCameraSrc * bcamsrc, + GstCameraBinMode mode) +{ + GstPhotography *photography = + (GstPhotography *) gst_bin_get_by_interface (GST_BIN_CAST (bcamsrc), + GST_TYPE_PHOTOGRAPHY); + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (bcamsrc); + + if (self->output_selector) { + if (mode == MODE_IMAGE) { + self->image_renegotiate = TRUE; + g_object_set (self->output_selector, "active-pad", self->outsel_imgpad, + NULL); + } else { + self->video_renegotiate = TRUE; + g_object_set (self->output_selector, "active-pad", self->outsel_vidpad, + NULL); + } + } + self->mode = mode; + + if (photography) { + if (g_object_class_find_property (G_OBJECT_GET_CLASS (photography), + "capture-mode")) { + g_object_set (G_OBJECT (photography), "capture-mode", mode, NULL); + } + } else { + GstCaps *anycaps = gst_caps_new_any (); + gst_wrapper_camera_bin_reset_video_src_caps (self, anycaps); + gst_caps_unref (anycaps); + } + + return TRUE; +} + +static gboolean +set_videosrc_zoom (GstWrapperCameraBinSrc * self, gfloat zoom) +{ + gboolean ret = FALSE; + + if (g_object_class_find_property (G_OBJECT_GET_CLASS (self->src_vid_src), + "zoom")) { + g_object_set (G_OBJECT (self->src_vid_src), "zoom", zoom, NULL); + ret = TRUE; + } + return ret; +} + +static gboolean +set_element_zoom (GstWrapperCameraBinSrc * self, gfloat zoom) +{ + gboolean ret = FALSE; + GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC (self); + gint w2_crop = 0, h2_crop = 0; + GstPad *pad_zoom_sink = NULL; + gint left = self->base_crop_left; + gint right = self->base_crop_right; + gint top = self->base_crop_top; + gint bottom = self->base_crop_bottom; + + if (self->src_zoom_crop) { + /* Update capsfilters to apply the zoom */ + GST_INFO_OBJECT (self, "zoom: %f, orig size: %dx%d", zoom, + bcamsrc->width, bcamsrc->height); + + if (zoom != ZOOM_1X) { + w2_crop = (bcamsrc->width - (gint) (bcamsrc->width * ZOOM_1X / zoom)) / 2; + h2_crop = + (bcamsrc->height - (gint) (bcamsrc->height * ZOOM_1X / zoom)) / 2; + + left += w2_crop; + right += w2_crop; + top += h2_crop; + bottom += h2_crop; + + /* force number of pixels cropped from left to be even, to avoid slow code + * path on videoscale */ + left &= 0xFFFE; + } + + pad_zoom_sink = gst_element_get_static_pad (self->src_zoom_crop, "sink"); + + GST_INFO_OBJECT (self, + "sw cropping: left:%d, right:%d, top:%d, bottom:%d", left, right, top, + bottom); + + GST_PAD_STREAM_LOCK (pad_zoom_sink); + g_object_set (self->src_zoom_crop, "left", left, "right", right, "top", + top, "bottom", bottom, NULL); + GST_PAD_STREAM_UNLOCK (pad_zoom_sink); + gst_object_unref (pad_zoom_sink); + ret = TRUE; + } + return ret; +} + +static void +gst_wrapper_camera_bin_src_set_zoom (GstBaseCameraSrc * bcamsrc, gfloat zoom) +{ + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (bcamsrc); + + GST_INFO_OBJECT (self, "setting zoom %f", zoom); + + if (set_videosrc_zoom (self, zoom)) { + set_element_zoom (self, ZOOM_1X); + GST_INFO_OBJECT (self, "zoom set using videosrc"); + } else if (set_element_zoom (self, zoom)) { + GST_INFO_OBJECT (self, "zoom set using gst elements"); + } else { + GST_INFO_OBJECT (self, "setting zoom failed"); + } +} + +/** + * update_aspect_filter: + * @self: camerasrc object + * @new_caps: new caps of next buffers arriving to view finder sink element + * + * Updates aspect ratio capsfilter to maintain aspect ratio, if we need to + * scale frames for showing them in view finder. + */ +static void +update_aspect_filter (GstWrapperCameraBinSrc * self, GstCaps * new_caps) +{ + // XXX why not instead add a preserve-aspect-ratio property to videoscale? +#if 0 + if (camera->flags & GST_CAMERABIN_FLAG_VIEWFINDER_SCALE) { + GstCaps *sink_caps, *ar_caps; + GstStructure *st; + gint in_w = 0, in_h = 0, sink_w = 0, sink_h = 0, target_w = 0, target_h = 0; + gdouble ratio_w, ratio_h; + GstPad *sink_pad; + const GValue *range; + + sink_pad = gst_element_get_static_pad (camera->view_sink, "sink"); + + if (sink_pad) { + sink_caps = gst_pad_get_caps (sink_pad); + gst_object_unref (sink_pad); + if (sink_caps) { + if (!gst_caps_is_any (sink_caps)) { + GST_DEBUG_OBJECT (camera, "sink element caps %" GST_PTR_FORMAT, + sink_caps); + /* Get maximum resolution that view finder sink accepts */ + st = gst_caps_get_structure (sink_caps, 0); + if (gst_structure_has_field_typed (st, "width", GST_TYPE_INT_RANGE)) { + range = gst_structure_get_value (st, "width"); + sink_w = gst_value_get_int_range_max (range); + } + if (gst_structure_has_field_typed (st, "height", GST_TYPE_INT_RANGE)) { + range = gst_structure_get_value (st, "height"); + sink_h = gst_value_get_int_range_max (range); + } + GST_DEBUG_OBJECT (camera, "sink element accepts max %dx%d", sink_w, + sink_h); + + /* Get incoming frames' resolution */ + if (sink_h && sink_w) { + st = gst_caps_get_structure (new_caps, 0); + gst_structure_get_int (st, "width", &in_w); + gst_structure_get_int (st, "height", &in_h); + GST_DEBUG_OBJECT (camera, "new caps with %dx%d", in_w, in_h); + } + } + gst_caps_unref (sink_caps); + } + } + + /* If we get bigger frames than view finder sink accepts, then we scale. + If we scale we need to adjust aspect ratio capsfilter caps in order + to maintain aspect ratio while scaling. */ + if (in_w && in_h && (in_w > sink_w || in_h > sink_h)) { + ratio_w = (gdouble) sink_w / in_w; + ratio_h = (gdouble) sink_h / in_h; + + if (ratio_w < ratio_h) { + target_w = sink_w; + target_h = (gint) (ratio_w * in_h); + } else { + target_w = (gint) (ratio_h * in_w); + target_h = sink_h; + } + + GST_DEBUG_OBJECT (camera, "setting %dx%d filter to maintain aspect ratio", + target_w, target_h); + ar_caps = gst_caps_copy (new_caps); + gst_caps_set_simple (ar_caps, "width", G_TYPE_INT, target_w, "height", + G_TYPE_INT, target_h, NULL); + } else { + GST_DEBUG_OBJECT (camera, "no scaling"); + ar_caps = new_caps; + } + + GST_DEBUG_OBJECT (camera, "aspect ratio filter caps %" GST_PTR_FORMAT, + ar_caps); + g_object_set (G_OBJECT (camera->aspect_filter), "caps", ar_caps, NULL); + if (ar_caps != new_caps) + gst_caps_unref (ar_caps); + } +#endif +} + + +/** + * set_capsfilter_caps: + * @self: camerasrc object + * @new_caps: pointer to caps object to set + * + * Set given caps to camerabin capsfilters. + */ +static void +set_capsfilter_caps (GstWrapperCameraBinSrc * self, GstCaps * new_caps) +{ + GST_INFO_OBJECT (self, "new_caps:%" GST_PTR_FORMAT, new_caps); + + /* Update zoom */ + gst_base_camera_src_setup_zoom (GST_BASE_CAMERA_SRC (self)); + + /* Update capsfilters */ + g_object_set (G_OBJECT (self->src_filter), "caps", new_caps, NULL); + if (self->src_zoom_filter) + g_object_set (G_OBJECT (self->src_zoom_filter), "caps", new_caps, NULL); + update_aspect_filter (self, new_caps); + GST_INFO_OBJECT (self, "updated"); +} + +static gboolean +gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc) +{ + GstWrapperCameraBinSrc *src = GST_WRAPPER_CAMERA_BIN_SRC (camerasrc); + + /* TODO should we access this directly? Maybe a macro is better? */ + if (src->mode == MODE_IMAGE) { + start_image_capture (src); + src->image_capture_count = 1; + } else if (src->mode == MODE_VIDEO) { + GstCaps *caps = NULL; + + if (src->video_renegotiate) { + GstCaps *anycaps = gst_caps_new_any (); + g_mutex_unlock (&camerasrc->capturing_mutex); + gst_wrapper_camera_bin_reset_video_src_caps (src, anycaps); + g_mutex_lock (&camerasrc->capturing_mutex); + + /* clean capsfilter caps so they don't interfere here */ + g_object_set (src->src_filter, "caps", NULL, NULL); + if (src->src_zoom_filter) + g_object_set (src->src_zoom_filter, "caps", NULL, NULL); + + GST_DEBUG_OBJECT (src, "Getting allowed videosrc caps"); + caps = gst_pad_get_allowed_caps (src->vidsrc); + GST_DEBUG_OBJECT (src, "Video src caps %" GST_PTR_FORMAT, caps); + + src->video_renegotiate = FALSE; + g_mutex_unlock (&camerasrc->capturing_mutex); + gst_wrapper_camera_bin_reset_video_src_caps (src, caps); + g_mutex_lock (&camerasrc->capturing_mutex); + gst_caps_unref (caps); + gst_caps_unref (anycaps); + } + if (src->video_rec_status == GST_VIDEO_RECORDING_STATUS_DONE) { + src->video_rec_status = GST_VIDEO_RECORDING_STATUS_STARTING; + } + } else { + g_assert_not_reached (); + return FALSE; + } + return TRUE; +} + +static void +gst_wrapper_camera_bin_src_stop_capture (GstBaseCameraSrc * camerasrc) +{ + GstWrapperCameraBinSrc *src = GST_WRAPPER_CAMERA_BIN_SRC (camerasrc); + + /* TODO shoud we access this directly? Maybe a macro is better? */ + if (src->mode == MODE_VIDEO) { + if (src->video_rec_status == GST_VIDEO_RECORDING_STATUS_STARTING) { + GST_DEBUG_OBJECT (src, "Aborting, had not started recording"); + src->video_rec_status = GST_VIDEO_RECORDING_STATUS_DONE; + + } else if (src->video_rec_status == GST_VIDEO_RECORDING_STATUS_RUNNING) { + GST_DEBUG_OBJECT (src, "Marking video recording as finishing"); + src->video_rec_status = GST_VIDEO_RECORDING_STATUS_FINISHING; + } + } else { + src->image_capture_count = 0; + } +} + +static GstStateChangeReturn +gst_wrapper_camera_bin_src_change_state (GstElement * element, + GstStateChange trans) +{ + GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (element); + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, trans); + + if (ret == GST_STATE_CHANGE_FAILURE) + goto end; + + switch (trans) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + self->video_renegotiate = TRUE; + self->image_renegotiate = TRUE; + self->drop_newseg = FALSE; + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + case GST_STATE_CHANGE_NULL_TO_READY: + break; + default: + break; + } + +end: + return ret; +} + +static void +gst_wrapper_camera_bin_src_class_init (GstWrapperCameraBinSrcClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + GstBaseCameraSrcClass *gstbasecamerasrc_class; + + gobject_class = G_OBJECT_CLASS (klass); + gstelement_class = GST_ELEMENT_CLASS (klass); + gstbasecamerasrc_class = GST_BASE_CAMERA_SRC_CLASS (klass); + + gobject_class->dispose = gst_wrapper_camera_bin_src_dispose; + gobject_class->finalize = + (GObjectFinalizeFunc) gst_wrapper_camera_bin_src_finalize; + gobject_class->set_property = gst_wrapper_camera_bin_src_set_property; + gobject_class->get_property = gst_wrapper_camera_bin_src_get_property; + + /* g_object_class_install_property .... */ + g_object_class_install_property (gobject_class, PROP_VIDEO_SRC, + g_param_spec_object ("video-source", "Video source", + "The video source element to be used", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_VIDEO_SRC_FILTER, + g_param_spec_object ("video-source-filter", "Video source filter", + "Optional video source filter element", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + gstelement_class->change_state = gst_wrapper_camera_bin_src_change_state; + + gstbasecamerasrc_class->construct_pipeline = + gst_wrapper_camera_bin_src_construct_pipeline; + gstbasecamerasrc_class->set_zoom = gst_wrapper_camera_bin_src_set_zoom; + gstbasecamerasrc_class->set_mode = gst_wrapper_camera_bin_src_set_mode; + gstbasecamerasrc_class->start_capture = + gst_wrapper_camera_bin_src_start_capture; + gstbasecamerasrc_class->stop_capture = + gst_wrapper_camera_bin_src_stop_capture; + + GST_DEBUG_CATEGORY_INIT (wrapper_camera_bin_src_debug, "wrappercamerabinsrc", + 0, "wrapper camera src"); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&vfsrc_template)); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&imgsrc_template)); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&vidsrc_template)); + + gst_element_class_set_static_metadata (gstelement_class, + "Wrapper camera src element for camerabin2", "Source/Video", + "Wrapper camera src element for camerabin2", + "Thiago Santos "); +} + +static void +gst_wrapper_camera_bin_src_init (GstWrapperCameraBinSrc * self) +{ + self->vfsrc = + gst_ghost_pad_new_no_target (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME, + GST_PAD_SRC); + gst_element_add_pad (GST_ELEMENT (self), self->vfsrc); + + self->imgsrc = + gst_ghost_pad_new_no_target (GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME, + GST_PAD_SRC); + gst_element_add_pad (GST_ELEMENT (self), self->imgsrc); + + self->vidsrc = + gst_ghost_pad_new_no_target (GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME, + GST_PAD_SRC); + gst_element_add_pad (GST_ELEMENT (self), self->vidsrc); + + gst_pad_set_event_function (self->imgsrc, + GST_DEBUG_FUNCPTR (gst_wrapper_camera_bin_src_src_event)); + gst_pad_set_event_function (self->vidsrc, + GST_DEBUG_FUNCPTR (gst_wrapper_camera_bin_src_src_event)); + + /* TODO where are variables reset? */ + self->image_capture_count = 0; + self->video_rec_status = GST_VIDEO_RECORDING_STATUS_DONE; + self->video_renegotiate = TRUE; + self->image_renegotiate = TRUE; + self->mode = GST_BASE_CAMERA_SRC_CAST (self)->mode; + self->app_vid_filter = NULL; +} + +gboolean +gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin) +{ + return gst_element_register (plugin, "wrappercamerabinsrc", GST_RANK_NONE, + gst_wrapper_camera_bin_src_get_type ()); +} Index: b/gst/camerabin2/gstwrappercamerabinsrc.h =================================================================== --- /dev/null +++ b/gst/camerabin2/gstwrappercamerabinsrc.h @@ -0,0 +1,130 @@ +/* + * GStreamer + * Copyright (C) 2010 Texas Instruments, Inc + * Copyright (C) 2010 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef __GST_WRAPPER_CAMERA_BIN_SRC_H__ +#define __GST_WRAPPER_CAMERA_BIN_SRC_H__ + +#include +#include +#include +#include "camerabingeneral.h" + +G_BEGIN_DECLS +#define GST_TYPE_WRAPPER_CAMERA_BIN_SRC \ + (gst_wrapper_camera_bin_src_get_type()) +#define GST_WRAPPER_CAMERA_BIN_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WRAPPER_CAMERA_BIN_SRC,GstWrapperCameraBinSrc)) +#define GST_WRAPPER_CAMERA_BIN_SRC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WRAPPER_CAMERA_BIN_SRC,GstWrapperCameraBinSrcClass)) +#define GST_IS_WRAPPER_CAMERA_BIN_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WRAPPER_CAMERA_BIN_SRC)) +#define GST_IS_WRAPPER_CAMERA_BIN_SRC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WRAPPER_CAMERA_BIN_SRC)) + GType gst_wrapper_camera_bin_src_get_type (void); + +typedef struct _GstWrapperCameraBinSrc GstWrapperCameraBinSrc; +typedef struct _GstWrapperCameraBinSrcClass GstWrapperCameraBinSrcClass; + +enum GstVideoRecordingStatus { + GST_VIDEO_RECORDING_STATUS_DONE, + GST_VIDEO_RECORDING_STATUS_STARTING, + GST_VIDEO_RECORDING_STATUS_RUNNING, + GST_VIDEO_RECORDING_STATUS_FINISHING +}; + + +/** + * GstWrapperCameraBinSrc: + * + */ +struct _GstWrapperCameraBinSrc +{ + GstBaseCameraSrc parent; + + GstCameraBinMode mode; + + GstPad *vfsrc; + GstPad *imgsrc; + GstPad *vidsrc; + + /* video recording controls */ + gint video_rec_status; + + /* image capture controls */ + gint image_capture_count; + + /* source elements */ + GstElement *src_vid_src; + GstElement *video_filter; + GstElement *src_filter; + GstElement *src_zoom_crop; + GstElement *src_zoom_scale; + GstElement *src_zoom_filter; + GstElement *output_selector; + + gboolean elements_created; + + gulong src_event_probe_id; + gulong src_max_zoom_signal_id; + + GstPad *outsel_imgpad; + GstPad *outsel_vidpad; + + /* For changing caps without losing timestamps */ + gboolean drop_newseg; + + /* Application configurable elements */ + GstElement *app_vid_src; + GstElement *app_vid_filter; + + /* Caps that videosrc supports */ + GstCaps *allowed_caps; + + /* Optional base crop for frames. Used to crop frames e.g. + due to wrong aspect ratio, before the crop related to zooming. */ + gint base_crop_top; + gint base_crop_bottom; + gint base_crop_left; + gint base_crop_right; + + /* Caps applied to capsfilters when in view finder mode */ + GstCaps *view_finder_caps; + + /* Caps applied to capsfilters when taking still image */ + GstCaps *image_capture_caps; + gboolean image_renegotiate; + gboolean video_renegotiate; +}; + + +/** + * GstWrapperCameraBinSrcClass: + * + */ +struct _GstWrapperCameraBinSrcClass +{ + GstBaseCameraSrcClass parent; +}; + +gboolean gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin); + +#endif /* __GST_WRAPPER_CAMERA_BIN_SRC_H__ */ Index: b/gst/camerabin2/Makefile.am =================================================================== --- /dev/null +++ b/gst/camerabin2/Makefile.am @@ -0,0 +1,43 @@ +plugin_LTLIBRARIES = libgstcamerabin2.la + +libgstcamerabin2_la_SOURCES = gstviewfinderbin.c \ + camerabingeneral.c \ + gstwrappercamerabinsrc.c \ + gstcamerabin2.c \ + gstplugin.c + +libgstcamerabin2_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) $(GST_CFLAGS) \ + -DGST_USE_UNSTABLE_API + +libgstcamerabin2_la_LIBADD = \ + $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-$(GST_API_VERSION).la \ + $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-$(GST_API_VERSION).la \ + $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) -lgstapp-$(GST_API_VERSION) -lgstpbutils-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) $(GST_LIBS) + +libgstcamerabin2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstcamerabin2_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) + +noinst_HEADERS = gstviewfinderbin.h \ + camerabingeneral.h \ + gstwrappercamerabinsrc.h \ + gstcamerabin2.h + +Android.mk: Makefile.am $(BUILT_SOURCES) + androgenizer \ + -:PROJECT libgstcamerabin2 -:SHARED libgstcamerabin2 \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstcamerabin2_la_SOURCES) \ + -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcamerabin2_la_CFLAGS) \ + -:LDFLAGS $(libgstcamerabin2_la_LDFLAGS) \ + $(libgstcamerabin2_la_LIBADD) \ + -ldl \ + -:LIBFILTER_STATIC gstphotography-@GST_API_VERSION@ \ + gstbasecamerabinsrc-@GST_API_VERSION@ \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ + > $@ Index: b/gst/camerabin2/Makefile.in =================================================================== --- /dev/null +++ b/gst/camerabin2/Makefile.in @@ -0,0 +1,1090 @@ +# Makefile.in generated by automake 1.13.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = gst/camerabin2 +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(noinst_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ + $(top_srcdir)/common/m4/as-auto-alt.m4 \ + $(top_srcdir)/common/m4/as-compiler-flag.m4 \ + $(top_srcdir)/common/m4/as-libtool.m4 \ + $(top_srcdir)/common/m4/as-scrub-include.m4 \ + $(top_srcdir)/common/m4/as-version.m4 \ + $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/common/m4/gst-arch.m4 \ + $(top_srcdir)/common/m4/gst-args.m4 \ + $(top_srcdir)/common/m4/gst-check.m4 \ + $(top_srcdir)/common/m4/gst-default.m4 \ + $(top_srcdir)/common/m4/gst-dowhile.m4 \ + $(top_srcdir)/common/m4/gst-error.m4 \ + $(top_srcdir)/common/m4/gst-feature.m4 \ + $(top_srcdir)/common/m4/gst-gettext.m4 \ + $(top_srcdir)/common/m4/gst-glib2.m4 \ + $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \ + $(top_srcdir)/common/m4/gst-platform.m4 \ + $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ + $(top_srcdir)/common/m4/gst-plugindir.m4 \ + $(top_srcdir)/common/m4/gst-x11.m4 \ + $(top_srcdir)/common/m4/gst.m4 \ + $(top_srcdir)/common/m4/gtk-doc.m4 \ + $(top_srcdir)/common/m4/introspection.m4 \ + $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \ + $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(plugindir)" +LTLIBRARIES = $(plugin_LTLIBRARIES) +am__DEPENDENCIES_1 = +libgstcamerabin2_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-$(GST_API_VERSION).la \ + $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-$(GST_API_VERSION).la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libgstcamerabin2_la_OBJECTS = \ + libgstcamerabin2_la-gstviewfinderbin.lo \ + libgstcamerabin2_la-camerabingeneral.lo \ + libgstcamerabin2_la-gstwrappercamerabinsrc.lo \ + libgstcamerabin2_la-gstcamerabin2.lo \ + libgstcamerabin2_la-gstplugin.lo +libgstcamerabin2_la_OBJECTS = $(am_libgstcamerabin2_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libgstcamerabin2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) \ + $(libgstcamerabin2_la_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libgstcamerabin2_la_SOURCES) +DIST_SOURCES = $(libgstcamerabin2_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ACMENC_CFLAGS = @ACMENC_CFLAGS@ +ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APEXSINK_CFLAGS = @APEXSINK_CFLAGS@ +APEXSINK_LIBS = @APEXSINK_LIBS@ +AR = @AR@ +AS = @AS@ +ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@ +ASSRENDER_LIBS = @ASSRENDER_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BLUEZ_CFLAGS = @BLUEZ_CFLAGS@ +BLUEZ_LIBS = @BLUEZ_LIBS@ +BZ2_LIBS = @BZ2_LIBS@ +CC = @CC@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CDAUDIO_CFLAGS = @CDAUDIO_CFLAGS@ +CDAUDIO_LIBS = @CDAUDIO_LIBS@ +CFLAGS = @CFLAGS@ +CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ +CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DAALA_CFLAGS = @DAALA_CFLAGS@ +DAALA_LIBS = @DAALA_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DCCP_LIBS = @DCCP_LIBS@ +DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@ +DECKLINK_LIBS = @DECKLINK_LIBS@ +DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@ +DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@ +DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@ +DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@ +DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ +DIRECT3D_LIBS = @DIRECT3D_LIBS@ +DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DIRECTSHOW_LIBS = @DIRECTSHOW_LIBS@ +DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@ +DIRECTX_CFLAGS = @DIRECTX_CFLAGS@ +DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DTS_LIBS = @DTS_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDNAV_CFLAGS = @DVDNAV_CFLAGS@ +DVDNAV_LIBS = @DVDNAV_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGLGLES_CFLAGS = @EGLGLES_CFLAGS@ +EGLGLES_LIBS = @EGLGLES_LIBS@ +EGL_CFLAGS = @EGL_CFLAGS@ +EGL_LIBS = @EGL_LIBS@ +EGREP = @EGREP@ +ERROR_CFLAGS = @ERROR_CFLAGS@ +ERROR_CXXFLAGS = @ERROR_CXXFLAGS@ +ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@ +EXEEXT = @EXEEXT@ +EXIF_CFLAGS = @EXIF_CFLAGS@ +EXIF_LIBS = @EXIF_LIBS@ +FAAC_LIBS = @FAAC_LIBS@ +FAAD_IS_NEAAC = @FAAD_IS_NEAAC@ +FAAD_LIBS = @FAAD_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +FLITE_CFLAGS = @FLITE_CFLAGS@ +FLITE_LIBS = @FLITE_LIBS@ +FLUIDSYNTH_CFLAGS = @FLUIDSYNTH_CFLAGS@ +FLUIDSYNTH_LIBS = @FLUIDSYNTH_LIBS@ +GCOV = @GCOV@ +GCOV_CFLAGS = @GCOV_CFLAGS@ +GCOV_LIBS = @GCOV_LIBS@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LDFLAGS = @GIO_LDFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@ +GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ +GME_LIBS = @GME_LIBS@ +GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@ +GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@ +GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@ +GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GMYTH_CFLAGS = @GMYTH_CFLAGS@ +GMYTH_LIBS = @GMYTH_LIBS@ +GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ +GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ +GSETTINGS_LIBS = @GSETTINGS_LIBS@ +GSM_LIBS = @GSM_LIBS@ +GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ +GSTPB_PREFIX = @GSTPB_PREFIX@ +GST_AGE = @GST_AGE@ +GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@ +GST_API_VERSION = @GST_API_VERSION@ +GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ +GST_BASE_LIBS = @GST_BASE_LIBS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ +GST_CHECK_LIBS = @GST_CHECK_LIBS@ +GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@ +GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@ +GST_CURRENT = @GST_CURRENT@ +GST_CXXFLAGS = @GST_CXXFLAGS@ +GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ +GST_LIBS = @GST_LIBS@ +GST_LIBVERSION = @GST_LIBVERSION@ +GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@ +GST_LICENSE = @GST_LICENSE@ +GST_LT_LDFLAGS = @GST_LT_LDFLAGS@ +GST_OBJCFLAGS = @GST_OBJCFLAGS@ +GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@ +GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@ +GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@ +GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ +GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ +GST_PKG_CONFIG_PATH = @GST_PKG_CONFIG_PATH@ +GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ +GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@ +GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@ +GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ +GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ +GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@ +GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@ +GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@ +GST_PLUGINS_LIBAV_CFLAGS = @GST_PLUGINS_LIBAV_CFLAGS@ +GST_PLUGINS_LIBAV_DIR = @GST_PLUGINS_LIBAV_DIR@ +GST_PLUGINS_LIBAV_LIBS = @GST_PLUGINS_LIBAV_LIBS@ +GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@ +GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ +GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@ +GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@ +GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@ +GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ +GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@ +GST_PREFIX = @GST_PREFIX@ +GST_REVISION = @GST_REVISION@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@ +GST_VIDEO_LIBS = @GST_VIDEO_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ +G_UDEV_LIBS = @G_UDEV_LIBS@ +HAVE_BZ2 = @HAVE_BZ2@ +HAVE_CXX = @HAVE_CXX@ +HAVE_DIRECT3D = @HAVE_DIRECT3D@ +HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@ +HAVE_DIRECTSHOW = @HAVE_DIRECTSHOW@ +HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@ +HAVE_DTS = @HAVE_DTS@ +HAVE_FAAC = @HAVE_FAAC@ +HAVE_FAAD = @HAVE_FAAD@ +HAVE_FLITE = @HAVE_FLITE@ +HAVE_GSM = @HAVE_GSM@ +HAVE_NAS = @HAVE_NAS@ +HAVE_OPENJPEG = @HAVE_OPENJPEG@ +HAVE_SRTP = @HAVE_SRTP@ +HAVE_WASAPI = @HAVE_WASAPI@ +HAVE_WILDMIDI = @HAVE_WILDMIDI@ +HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@ +HAVE_X = @HAVE_X@ +HAVE_X11 = @HAVE_X11@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KATE_CFLAGS = @KATE_CFLAGS@ +KATE_LIBS = @KATE_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ +LIBDC1394_LIBS = @LIBDC1394_LIBS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ +LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LRDF_CFLAGS = @LRDF_CFLAGS@ +LRDF_LIBS = @LRDF_LIBS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MIMIC_CFLAGS = @MIMIC_CFLAGS@ +MIMIC_LIBS = @MIMIC_LIBS@ +MJPEG_CFLAGS = @MJPEG_CFLAGS@ +MJPEG_LIBS = @MJPEG_LIBS@ +MKDIR_P = @MKDIR_P@ +MODPLUG_CFLAGS = @MODPLUG_CFLAGS@ +MODPLUG_LIBS = @MODPLUG_LIBS@ +MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@ +MPEG2ENC_LIBS = @MPEG2ENC_LIBS@ +MPG123_CFLAGS = @MPG123_CFLAGS@ +MPG123_LIBS = @MPG123_LIBS@ +MPLEX_CFLAGS = @MPLEX_CFLAGS@ +MPLEX_LDFLAGS = @MPLEX_LDFLAGS@ +MPLEX_LIBS = @MPLEX_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +MUSEPACK_LIBS = @MUSEPACK_LIBS@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NEON_CFLAGS = @NEON_CFLAGS@ +NEON_LIBS = @NEON_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OFA_CFLAGS = @OFA_CFLAGS@ +OFA_LIBS = @OFA_LIBS@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OPENCV_CFLAGS = @OPENCV_CFLAGS@ +OPENCV_LIBS = @OPENCV_LIBS@ +OPENCV_PREFIX = @OPENCV_PREFIX@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ +OPUS_CFLAGS = @OPUS_CFLAGS@ +OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ +ORCC_FLAGS = @ORCC_FLAGS@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINDIR = @PLUGINDIR@ +POSUB = @POSUB@ +PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PVR_CFLAGS = @PVR_CFLAGS@ +PVR_LIBS = @PVR_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@ +RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@ +RSVG_CFLAGS = @RSVG_CFLAGS@ +RSVG_LIBS = @RSVG_LIBS@ +RTMP_CFLAGS = @RTMP_CFLAGS@ +RTMP_LIBS = @RTMP_LIBS@ +SBC_CFLAGS = @SBC_CFLAGS@ +SBC_LIBS = @SBC_LIBS@ +SCHRO_CFLAGS = @SCHRO_CFLAGS@ +SCHRO_LIBS = @SCHRO_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_LIBS = @SHM_LIBS@ +SLV2_CFLAGS = @SLV2_CFLAGS@ +SLV2_LIBS = @SLV2_LIBS@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +SNDIO_LIBS = @SNDIO_LIBS@ +SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@ +SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@ +SPANDSP_CFLAGS = @SPANDSP_CFLAGS@ +SPANDSP_LIBS = @SPANDSP_LIBS@ +SPC_LIBS = @SPC_LIBS@ +SRTP_LIBS = @SRTP_LIBS@ +STRIP = @STRIP@ +TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@ +TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@ +TIGER_CFLAGS = @TIGER_CFLAGS@ +TIGER_LIBS = @TIGER_LIBS@ +TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ +TIMIDITY_LIBS = @TIMIDITY_LIBS@ +USE_NLS = @USE_NLS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ +VDPAU_CFLAGS = @VDPAU_CFLAGS@ +VDPAU_LIBS = @VDPAU_LIBS@ +VERSION = @VERSION@ +VOAACENC_CFLAGS = @VOAACENC_CFLAGS@ +VOAACENC_LIBS = @VOAACENC_LIBS@ +VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@ +VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WASAPI_LIBS = @WASAPI_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ +WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ +WILDMIDI_LIBS = @WILDMIDI_LIBS@ +WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@ +WINSOCK2_LIBS = @WINSOCK2_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XVID_LIBS = @XVID_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZBAR_CFLAGS = @ZBAR_CFLAGS@ +ZBAR_LIBS = @ZBAR_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gsettingsschemadir = @gsettingsschemadir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +plugindir = @plugindir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +plugin_LTLIBRARIES = libgstcamerabin2.la +libgstcamerabin2_la_SOURCES = gstviewfinderbin.c \ + camerabingeneral.c \ + gstwrappercamerabinsrc.c \ + gstcamerabin2.c \ + gstplugin.c + +libgstcamerabin2_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) $(GST_CFLAGS) \ + -DGST_USE_UNSTABLE_API + +libgstcamerabin2_la_LIBADD = \ + $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-$(GST_API_VERSION).la \ + $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-$(GST_API_VERSION).la \ + $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) -lgstapp-$(GST_API_VERSION) -lgstpbutils-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) $(GST_LIBS) + +libgstcamerabin2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstcamerabin2_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) +noinst_HEADERS = gstviewfinderbin.h \ + camerabingeneral.h \ + gstwrappercamerabinsrc.h \ + gstcamerabin2.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/camerabin2/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gst/camerabin2/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ + } + +uninstall-pluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ + done + +clean-pluginLTLIBRARIES: + -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) + @list='$(plugin_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgstcamerabin2.la: $(libgstcamerabin2_la_OBJECTS) $(libgstcamerabin2_la_DEPENDENCIES) $(EXTRA_libgstcamerabin2_la_DEPENDENCIES) + $(AM_V_CCLD)$(libgstcamerabin2_la_LINK) -rpath $(plugindir) $(libgstcamerabin2_la_OBJECTS) $(libgstcamerabin2_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstcamerabin2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstplugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstviewfinderbin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstwrappercamerabinsrc.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libgstcamerabin2_la-gstviewfinderbin.lo: gstviewfinderbin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -MT libgstcamerabin2_la-gstviewfinderbin.lo -MD -MP -MF $(DEPDIR)/libgstcamerabin2_la-gstviewfinderbin.Tpo -c -o libgstcamerabin2_la-gstviewfinderbin.lo `test -f 'gstviewfinderbin.c' || echo '$(srcdir)/'`gstviewfinderbin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcamerabin2_la-gstviewfinderbin.Tpo $(DEPDIR)/libgstcamerabin2_la-gstviewfinderbin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstviewfinderbin.c' object='libgstcamerabin2_la-gstviewfinderbin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -c -o libgstcamerabin2_la-gstviewfinderbin.lo `test -f 'gstviewfinderbin.c' || echo '$(srcdir)/'`gstviewfinderbin.c + +libgstcamerabin2_la-camerabingeneral.lo: camerabingeneral.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -MT libgstcamerabin2_la-camerabingeneral.lo -MD -MP -MF $(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Tpo -c -o libgstcamerabin2_la-camerabingeneral.lo `test -f 'camerabingeneral.c' || echo '$(srcdir)/'`camerabingeneral.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Tpo $(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='camerabingeneral.c' object='libgstcamerabin2_la-camerabingeneral.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -c -o libgstcamerabin2_la-camerabingeneral.lo `test -f 'camerabingeneral.c' || echo '$(srcdir)/'`camerabingeneral.c + +libgstcamerabin2_la-gstwrappercamerabinsrc.lo: gstwrappercamerabinsrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -MT libgstcamerabin2_la-gstwrappercamerabinsrc.lo -MD -MP -MF $(DEPDIR)/libgstcamerabin2_la-gstwrappercamerabinsrc.Tpo -c -o libgstcamerabin2_la-gstwrappercamerabinsrc.lo `test -f 'gstwrappercamerabinsrc.c' || echo '$(srcdir)/'`gstwrappercamerabinsrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcamerabin2_la-gstwrappercamerabinsrc.Tpo $(DEPDIR)/libgstcamerabin2_la-gstwrappercamerabinsrc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstwrappercamerabinsrc.c' object='libgstcamerabin2_la-gstwrappercamerabinsrc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -c -o libgstcamerabin2_la-gstwrappercamerabinsrc.lo `test -f 'gstwrappercamerabinsrc.c' || echo '$(srcdir)/'`gstwrappercamerabinsrc.c + +libgstcamerabin2_la-gstcamerabin2.lo: gstcamerabin2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -MT libgstcamerabin2_la-gstcamerabin2.lo -MD -MP -MF $(DEPDIR)/libgstcamerabin2_la-gstcamerabin2.Tpo -c -o libgstcamerabin2_la-gstcamerabin2.lo `test -f 'gstcamerabin2.c' || echo '$(srcdir)/'`gstcamerabin2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcamerabin2_la-gstcamerabin2.Tpo $(DEPDIR)/libgstcamerabin2_la-gstcamerabin2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstcamerabin2.c' object='libgstcamerabin2_la-gstcamerabin2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -c -o libgstcamerabin2_la-gstcamerabin2.lo `test -f 'gstcamerabin2.c' || echo '$(srcdir)/'`gstcamerabin2.c + +libgstcamerabin2_la-gstplugin.lo: gstplugin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -MT libgstcamerabin2_la-gstplugin.lo -MD -MP -MF $(DEPDIR)/libgstcamerabin2_la-gstplugin.Tpo -c -o libgstcamerabin2_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcamerabin2_la-gstplugin.Tpo $(DEPDIR)/libgstcamerabin2_la-gstplugin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstplugin.c' object='libgstcamerabin2_la-gstplugin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -c -o libgstcamerabin2_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(plugindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pluginLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pluginLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pluginLTLIBRARIES install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-pluginLTLIBRARIES + + +Android.mk: Makefile.am $(BUILT_SOURCES) + androgenizer \ + -:PROJECT libgstcamerabin2 -:SHARED libgstcamerabin2 \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstcamerabin2_la_SOURCES) \ + -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcamerabin2_la_CFLAGS) \ + -:LDFLAGS $(libgstcamerabin2_la_LDFLAGS) \ + $(libgstcamerabin2_la_LIBADD) \ + -ldl \ + -:LIBFILTER_STATIC gstphotography-@GST_API_VERSION@ \ + gstbasecamerabinsrc-@GST_API_VERSION@ \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ + > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Index: b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c @@ -0,0 +1,566 @@ +/* + * GStreamer + * Copyright (C) 2010 Texas Instruments, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + + +/** + * SECTION:element-basecamerasrc + * + * Base class for the camera source bin used by camerabin for capture. + * Sophisticated camera hardware can derive from this baseclass and map the + * features to this interface. + * + * The design mandates that the subclasses implement the following features and + * behaviour: + * + * + * 3 pads: viewfinder, image capture, video capture + * + * + * + * + * + * During construct_pipeline() vmethod a subclass can add several elements into + * the bin and expose 3 srcs pads as ghostpads implementing the 3 pad templates. + * + * However the subclass is responsable for adding the pad templates for the + * source pads and they must be named "vidsrc", "imgsrc" and "vfsrc". The pad + * templates should be installed in the subclass' class_init function, like so: + * |[ + * static void + * my_element_class_init (GstMyElementClass *klass) + * { + * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); + * // pad templates should be a #GstStaticPadTemplate with direction + * // #GST_PAD_SRC and name "vidsrc", "imgsrc" and "vfsrc" + * gst_element_class_add_static_pad_template (gstelement_class, + * &vidsrc_template); + * gst_element_class_add_static_pad_template (gstelement_class, + * &imgsrc_template); + * gst_element_class_add_static_pad_template (gstelement_class, + * &vfsrc_template); + * // see #GstElementDetails + * gst_element_class_set_details (gstelement_class, &details); + * } + * ]| + * + * It is also possible to add regular pads from the subclass and implement the + * dataflow methods on these pads. This way all functionality can be implemneted + * directly in the subclass without extra elements. + * + * The src will receive the capture mode from #GstCameraBin2 on the + * #GstBaseCameraSrc:mode property. Possible capture modes are defined in + * #GstCameraBinMode. + */ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "gstbasecamerasrc.h" + +enum +{ + PROP_0, + PROP_MODE, + PROP_ZOOM, + PROP_MAX_ZOOM, + PROP_READY_FOR_CAPTURE, + PROP_POST_PREVIEW, + PROP_PREVIEW_CAPS, + PROP_PREVIEW_FILTER +}; + +enum +{ + /* action signals */ + START_CAPTURE_SIGNAL, + STOP_CAPTURE_SIGNAL, + /* emit signals */ + LAST_SIGNAL +}; + +#define DEFAULT_POST_PREVIEW TRUE + +static guint basecamerasrc_signals[LAST_SIGNAL]; + +GST_DEBUG_CATEGORY (base_camera_src_debug); +#define GST_CAT_DEFAULT base_camera_src_debug + +#define parent_class gst_base_camera_src_parent_class +G_DEFINE_TYPE (GstBaseCameraSrc, gst_base_camera_src, GST_TYPE_BIN); + + +/* NOTE: we could provide a vmethod for derived class to overload to provide + * it's own implementation of interface.. but in all cases I can think of at + * moment, either the camerasrc itself, or some element within the bin, will + * be implementing the interface.. + */ + +/** + * gst_base_camera_src_set_mode: + * @self: the camerasrc bin + * @mode: the mode + * + * Set the chosen #GstCameraBinMode capture mode. + */ +gboolean +gst_base_camera_src_set_mode (GstBaseCameraSrc * self, GstCameraBinMode mode) +{ + GstBaseCameraSrcClass *bclass = GST_BASE_CAMERA_SRC_GET_CLASS (self); + + g_return_val_if_fail (bclass->set_mode, FALSE); + + if (bclass->set_mode (self, mode)) { + self->mode = mode; + return TRUE; + } + return FALSE; +} + +/** + * gst_base_camera_src_setup_zoom: + * @self: camerasrc object + * + * Apply zoom configured to camerabin to capture. + */ +void +gst_base_camera_src_setup_zoom (GstBaseCameraSrc * self) +{ + GstBaseCameraSrcClass *bclass = GST_BASE_CAMERA_SRC_GET_CLASS (self); + + g_return_if_fail (self->zoom); + g_return_if_fail (bclass->set_zoom); + + bclass->set_zoom (self, self->zoom); +} + +/** + * gst_base_camera_src_setup_preview: + * @self: camerasrc bin + * @preview_caps: preview caps to set + * + * Apply preview caps to preview pipeline and to video source. + */ +void +gst_base_camera_src_setup_preview (GstBaseCameraSrc * self, + GstCaps * preview_caps) +{ + GstBaseCameraSrcClass *bclass = GST_BASE_CAMERA_SRC_GET_CLASS (self); + + if (self->preview_pipeline) { + GST_DEBUG_OBJECT (self, + "Setting preview pipeline caps %" GST_PTR_FORMAT, self->preview_caps); + gst_camerabin_preview_set_caps (self->preview_pipeline, preview_caps); + } + + if (bclass->set_preview) + bclass->set_preview (self, preview_caps); +} + +static void +gst_base_camera_src_start_capture (GstBaseCameraSrc * src) +{ + GstBaseCameraSrcClass *klass = GST_BASE_CAMERA_SRC_GET_CLASS (src); + + g_return_if_fail (klass->start_capture != NULL); + + GST_DEBUG_OBJECT (src, "Starting capture"); + + g_mutex_lock (&src->capturing_mutex); + if (src->capturing) { + GST_WARNING_OBJECT (src, "Capturing already ongoing"); + g_mutex_unlock (&src->capturing_mutex); + + /* post a warning to notify camerabin2 that the capture failed */ + GST_ELEMENT_WARNING (src, RESOURCE, BUSY, (NULL), (NULL)); + return; + } + + src->capturing = TRUE; + g_object_notify (G_OBJECT (src), "ready-for-capture"); + if (klass->start_capture (src)) { + GST_DEBUG_OBJECT (src, "Capture started"); + } else { + src->capturing = FALSE; + g_object_notify (G_OBJECT (src), "ready-for-capture"); + GST_WARNING_OBJECT (src, "Failed to start capture"); + } + g_mutex_unlock (&src->capturing_mutex); +} + +static void +gst_base_camera_src_stop_capture (GstBaseCameraSrc * src) +{ + GstBaseCameraSrcClass *klass = GST_BASE_CAMERA_SRC_GET_CLASS (src); + + g_return_if_fail (klass->stop_capture != NULL); + + g_mutex_lock (&src->capturing_mutex); + if (!src->capturing) { + GST_DEBUG_OBJECT (src, "No ongoing capture"); + g_mutex_unlock (&src->capturing_mutex); + return; + } + klass->stop_capture (src); + g_mutex_unlock (&src->capturing_mutex); +} + +void +gst_base_camera_src_finish_capture (GstBaseCameraSrc * self) +{ + GST_DEBUG_OBJECT (self, "Finishing capture"); + g_return_if_fail (self->capturing); + self->capturing = FALSE; + g_object_notify (G_OBJECT (self), "ready-for-capture"); +} + +static void +gst_base_camera_src_dispose (GObject * object) +{ + GstBaseCameraSrc *src = GST_BASE_CAMERA_SRC_CAST (object); + + g_mutex_clear (&src->capturing_mutex); + + if (src->preview_pipeline) { + gst_camerabin_destroy_preview_pipeline (src->preview_pipeline); + src->preview_pipeline = NULL; + } + + if (src->preview_caps) + gst_caps_replace (&src->preview_caps, NULL); + + if (src->preview_filter) { + gst_object_unref (src->preview_filter); + src->preview_filter = NULL; + } + + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +gst_base_camera_src_finalize (GstBaseCameraSrc * self) +{ + G_OBJECT_CLASS (parent_class)->finalize ((GObject *) (self)); +} + +static void +gst_base_camera_src_set_property (GObject * object, + guint prop_id, const GValue * value, GParamSpec * pspec) +{ + GstBaseCameraSrc *self = GST_BASE_CAMERA_SRC (object); + + switch (prop_id) { + case PROP_MODE: + gst_base_camera_src_set_mode (GST_BASE_CAMERA_SRC (self), + g_value_get_enum (value)); + break; + case PROP_ZOOM:{ + self->zoom = g_value_get_float (value); + /* limit to max-zoom */ + if (self->zoom > self->max_zoom) { + GST_DEBUG_OBJECT (self, "Clipping zoom %f to max-zoom %f", self->zoom, + self->max_zoom); + self->zoom = self->max_zoom; + } + /* does not set it if in NULL, the src is not created yet */ + if (GST_STATE (self) != GST_STATE_NULL) + gst_base_camera_src_setup_zoom (self); + break; + } + case PROP_POST_PREVIEW: + self->post_preview = g_value_get_boolean (value); + break; + case PROP_PREVIEW_CAPS:{ + GstCaps *new_caps; + + new_caps = (GstCaps *) gst_value_get_caps (value); + if (new_caps == NULL) { + new_caps = gst_caps_new_any (); + } else { + new_caps = gst_caps_ref (new_caps); + } + + if (!gst_caps_is_equal (self->preview_caps, new_caps)) { + gst_caps_replace (&self->preview_caps, new_caps); + gst_base_camera_src_setup_preview (self, new_caps); + } else { + GST_DEBUG_OBJECT (self, "New preview caps equal current preview caps"); + } + gst_caps_unref (new_caps); + } + break; + case PROP_PREVIEW_FILTER: + if (self->preview_filter) + gst_object_unref (self->preview_filter); + self->preview_filter = g_value_dup_object (value); + if (!gst_camerabin_preview_set_filter (self->preview_pipeline, + self->preview_filter)) { + GST_WARNING_OBJECT (self, + "Cannot change preview filter, is element in NULL state?"); + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); + break; + } +} + +static void +gst_base_camera_src_get_property (GObject * object, + guint prop_id, GValue * value, GParamSpec * pspec) +{ + GstBaseCameraSrc *self = GST_BASE_CAMERA_SRC (object); + + switch (prop_id) { + case PROP_MODE: + g_value_set_enum (value, self->mode); + break; + case PROP_READY_FOR_CAPTURE: + g_value_set_boolean (value, !self->capturing); + break; + case PROP_ZOOM: + g_value_set_float (value, self->zoom); + break; + case PROP_MAX_ZOOM: + g_value_set_float (value, self->max_zoom); + break; + case PROP_POST_PREVIEW: + g_value_set_boolean (value, self->post_preview); + break; + case PROP_PREVIEW_CAPS: + if (self->preview_caps) + gst_value_set_caps (value, self->preview_caps); + break; + case PROP_PREVIEW_FILTER: + if (self->preview_filter) + g_value_set_object (value, self->preview_filter); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); + break; + } +} + +static gboolean +construct_pipeline (GstBaseCameraSrc * self) +{ + GstBaseCameraSrcClass *bclass = GST_BASE_CAMERA_SRC_GET_CLASS (self); + + if (bclass->construct_pipeline) { + if (!bclass->construct_pipeline (self)) { + GST_ERROR_OBJECT (self, "pipeline construction failed"); + return FALSE; + } + } + + return TRUE; +} + +static gboolean +setup_pipeline (GstBaseCameraSrc * self) +{ + GstBaseCameraSrcClass *bclass = GST_BASE_CAMERA_SRC_GET_CLASS (self); + if (bclass->setup_pipeline) + return bclass->setup_pipeline (self); + return TRUE; +} + +static GstStateChangeReturn +gst_base_camera_src_change_state (GstElement * element, + GstStateChange transition) +{ + GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; + GstBaseCameraSrc *self = GST_BASE_CAMERA_SRC (element); + + GST_DEBUG_OBJECT (self, "%d -> %d", + GST_STATE_TRANSITION_CURRENT (transition), + GST_STATE_TRANSITION_NEXT (transition)); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + if (!construct_pipeline (self)) + return GST_STATE_CHANGE_FAILURE; + + if (self->preview_pipeline == NULL) { + /* failed to create preview pipeline, fail state change */ + return GST_STATE_CHANGE_FAILURE; + } + + if (self->preview_caps) { + GST_DEBUG_OBJECT (self, + "Setting preview pipeline caps %" GST_PTR_FORMAT, + self->preview_caps); + gst_camerabin_preview_set_caps (self->preview_pipeline, + self->preview_caps); + } + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + if (!setup_pipeline (self)) + return GST_STATE_CHANGE_FAILURE; + /* without this the preview pipeline will not post buffer + * messages on the pipeline */ + gst_element_set_state (self->preview_pipeline->pipeline, + GST_STATE_PLAYING); + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_element_set_state (self->preview_pipeline->pipeline, GST_STATE_READY); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + gst_element_set_state (self->preview_pipeline->pipeline, GST_STATE_NULL); + break; + default: + break; + } + + return ret; +} + +static void +gst_base_camera_src_class_init (GstBaseCameraSrcClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + GST_DEBUG_CATEGORY_INIT (base_camera_src_debug, "base_camera_src", 0, + "Base camera src"); + + gobject_class = G_OBJECT_CLASS (klass); + gstelement_class = GST_ELEMENT_CLASS (klass); + + gobject_class->dispose = gst_base_camera_src_dispose; + gobject_class->finalize = (GObjectFinalizeFunc) gst_base_camera_src_finalize; + gobject_class->set_property = gst_base_camera_src_set_property; + gobject_class->get_property = gst_base_camera_src_get_property; + + g_object_class_install_property (gobject_class, PROP_MODE, + g_param_spec_enum ("mode", "Mode", + "The capture mode (still image capture or video recording)", + GST_TYPE_CAMERABIN_MODE, MODE_IMAGE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_ZOOM, + g_param_spec_float ("zoom", "Zoom", + "Digital zoom factor (e.g. 1.5 means 1.5x)", MIN_ZOOM, G_MAXFLOAT, + DEFAULT_ZOOM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_ZOOM, + g_param_spec_float ("max-zoom", "Maximum zoom level (note: may change " + "depending on resolution/implementation)", + "Digital zoom factor (e.g. 1.5 means 1.5x)", MIN_ZOOM, G_MAXFLOAT, + MAX_ZOOM, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /** + * GstBaseCameraSrc:post-previews: + * + * When %TRUE, preview images should be posted to the bus when + * captures are made + */ + g_object_class_install_property (gobject_class, PROP_POST_PREVIEW, + g_param_spec_boolean ("post-previews", "Post Previews", + "If capture preview images should be posted to the bus", + DEFAULT_POST_PREVIEW, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_PREVIEW_CAPS, + g_param_spec_boxed ("preview-caps", "Preview caps", + "The caps of the preview image to be posted (NULL means ANY)", + GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_PREVIEW_FILTER, + g_param_spec_object ("preview-filter", "Preview filter", + "A custom preview filter to process preview image data", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstBaseCameraSrc:ready-for-capture: + * + * When TRUE new capture can be prepared. If FALSE capturing is ongoing + * and starting a new capture immediately is not possible. + * + * Note that calling start-capture from the notify callback of this property + * will cause a deadlock. If you need to react like this on the notify + * function, please schedule a new thread to do it. If you're using glib's + * mainloop you can use g_idle_add() for example. + */ + g_object_class_install_property (gobject_class, PROP_READY_FOR_CAPTURE, + g_param_spec_boolean ("ready-for-capture", "Ready for capture", + "Informs this element is ready for starting another capture", + TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + + /* Signals */ + basecamerasrc_signals[START_CAPTURE_SIGNAL] = + g_signal_new_class_handler ("start-capture", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_CALLBACK (gst_base_camera_src_start_capture), + NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + basecamerasrc_signals[STOP_CAPTURE_SIGNAL] = + g_signal_new_class_handler ("stop-capture", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_CALLBACK (gst_base_camera_src_stop_capture), + NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + gstelement_class->change_state = gst_base_camera_src_change_state; + + gst_element_class_set_static_metadata (gstelement_class, + "Base class for camerabin src bin", "Source/Video", + "Abstracts capture device for camerabin2", "Rob Clark "); +} + +static void +gst_base_camera_src_init (GstBaseCameraSrc * self) +{ + self->width = DEFAULT_WIDTH; + self->height = DEFAULT_HEIGHT; + self->zoom = DEFAULT_ZOOM; + self->max_zoom = MAX_ZOOM; + self->mode = MODE_IMAGE; + + self->capturing = FALSE; + g_mutex_init (&self->capturing_mutex); + + self->post_preview = DEFAULT_POST_PREVIEW; + self->preview_caps = gst_caps_new_any (); + + self->preview_pipeline = + gst_camerabin_create_preview_pipeline (GST_ELEMENT_CAST (self), NULL); +} + +void +gst_base_camera_src_post_preview (GstBaseCameraSrc * self, GstSample * sample) +{ + if (self->post_preview) { + gst_camerabin_preview_pipeline_post (self->preview_pipeline, sample); + } else { + GST_DEBUG_OBJECT (self, "Previews not enabled, not posting"); + } +} Index: b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h @@ -0,0 +1,142 @@ +/* + * GStreamer + * Copyright (C) 2010 Texas Instruments, Inc + * Copyright (C) 2011 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef __GST_BASE_CAMERA_SRC_H__ +#define __GST_BASE_CAMERA_SRC_H__ + +#ifndef GST_USE_UNSTABLE_API +#warning "GstBaseCameraSrc is unstable API and may change in future." +#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." +#endif + +#include +#include +#include "gstcamerabin-enum.h" +#include "gstcamerabinpreview.h" + +G_BEGIN_DECLS +#define GST_TYPE_BASE_CAMERA_SRC \ + (gst_base_camera_src_get_type()) +#define GST_BASE_CAMERA_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_CAMERA_SRC,GstBaseCameraSrc)) +#define GST_BASE_CAMERA_SRC_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_CAMERA_SRC, GstBaseCameraSrcClass)) +#define GST_BASE_CAMERA_SRC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_CAMERA_SRC,GstBaseCameraSrcClass)) +#define GST_IS_BASE_CAMERA_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_CAMERA_SRC)) +#define GST_IS_BASE_CAMERA_SRC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_CAMERA_SRC)) +#define GST_BASE_CAMERA_SRC_CAST(obj) \ + ((GstBaseCameraSrc *) (obj)) +GType gst_base_camera_src_get_type (void); + +typedef struct _GstBaseCameraSrc GstBaseCameraSrc; +typedef struct _GstBaseCameraSrcClass GstBaseCameraSrcClass; + +#define GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME "vfsrc" +#define GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME "imgsrc" +#define GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME "vidsrc" + +#define GST_BASE_CAMERA_SRC_PREVIEW_MESSAGE_NAME "preview-image" + +/** + * GstBaseCameraSrc: + */ +struct _GstBaseCameraSrc +{ + GstBin parent; + + GstCameraBinMode mode; + + gboolean capturing; + GMutex capturing_mutex; + + /* Preview convert pipeline */ + GstCaps *preview_caps; + gboolean post_preview; + GstElement *preview_filter; + GstCameraBinPreviewPipelineData *preview_pipeline; + + /* Resolution of the buffers configured to camerabin */ + gint width; + gint height; + + gfloat zoom; + gfloat max_zoom; + + gpointer _gst_reserved[GST_PADDING_LARGE]; +}; + + +/** + * GstBaseCameraSrcClass: + * @construct_pipeline: construct pipeline + * @setup_pipeline: configure pipeline for the chosen settings + * @set_zoom: set the zoom + * @set_mode: set the mode + */ +struct _GstBaseCameraSrcClass +{ + GstBinClass parent; + + /* Construct pipeline. (called in GST_STATE_CHANGE_NULL_TO_READY) Optional. */ + gboolean (*construct_pipeline) (GstBaseCameraSrc *self); + + /* (called in GST_STATE_CHANGE_READY_TO_PAUSED). Optional. */ + gboolean (*setup_pipeline) (GstBaseCameraSrc *self); + + /* Set the zoom. If set, called when changing 'zoom' property. Optional. */ + void (*set_zoom) (GstBaseCameraSrc *self, gfloat zoom); + + /* Set the mode. If set, called when changing 'mode' property. Optional. */ + gboolean (*set_mode) (GstBaseCameraSrc *self, + GstCameraBinMode mode); + + /* Set preview caps. If set, called called when setting new 'preview-caps'. Optional. */ + gboolean (*set_preview) (GstBaseCameraSrc *self, + GstCaps *preview_caps); + + /* Called by the handler for 'start-capture'. Mandatory. */ + gboolean (*start_capture) (GstBaseCameraSrc * src); + + /* Called by the handler for 'stop-capture'. Mandatory. */ + void (*stop_capture) (GstBaseCameraSrc * src); + + gpointer _gst_reserved[GST_PADDING_LARGE]; +}; + + +#define MIN_ZOOM 1.0f +#define MAX_ZOOM 10.0f +#define ZOOM_1X MIN_ZOOM + +gboolean gst_base_camera_src_set_mode (GstBaseCameraSrc *self, GstCameraBinMode mode); +void gst_base_camera_src_setup_zoom (GstBaseCameraSrc * self); +void gst_base_camera_src_setup_preview (GstBaseCameraSrc * self, GstCaps * preview_caps); +void gst_base_camera_src_finish_capture (GstBaseCameraSrc *self); + + +void gst_base_camera_src_post_preview (GstBaseCameraSrc *self, GstSample * sample); +// XXX add methods to get/set img capture and vid capture caps.. + +#endif /* __GST_BASE_CAMERA_SRC_H__ */ Index: b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c @@ -0,0 +1,39 @@ +/* + * GStreamer + * Copyright (C) 2009 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gstcamerabin-enum.h" + +GType +gst_camerabin_mode_get_type (void) +{ + static GType gtype = 0; + + if (gtype == 0) { + static const GEnumValue values[] = { + /* {MODE_PREVIEW, "Preview mode (should be default?)", "mode-preview"}, */ + {MODE_IMAGE, "Still image capture (default)", "mode-image"}, + {MODE_VIDEO, "Video recording", "mode-video"}, + {0, NULL, NULL} + }; + + gtype = g_enum_register_static ("GstCameraBin2Mode", values); + } + return gtype; +} Index: b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.h =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.h @@ -0,0 +1,62 @@ +/* + * GStreamer + * Copyright (C) 2009 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_CAMERABIN_ENUM_H__ +#define __GST_CAMERABIN_ENUM_H__ + +#ifndef GST_USE_UNSTABLE_API +#warning "camerabin enums are unstable API and may change in future." +#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." +#endif + +#include + +G_BEGIN_DECLS + +#define DEFAULT_WIDTH 640 +#define DEFAULT_HEIGHT 480 +#define DEFAULT_CAPTURE_WIDTH 800 +#define DEFAULT_CAPTURE_HEIGHT 600 +#define DEFAULT_FPS_N 0 /* makes it use the default */ +#define DEFAULT_FPS_D 1 +#define DEFAULT_ZOOM MIN_ZOOM + + +/** + * GstCameraBinMode: + * @MODE_IMAGE: image capture + * @MODE_VIDEO: video capture + * + * Capture mode to use. + */ +typedef enum +{ + /* MODE_PREVIEW = 0, No use for this */ + MODE_IMAGE = 1, + MODE_VIDEO = 2, +} GstCameraBinMode; + + +#define GST_TYPE_CAMERABIN_MODE (gst_camerabin_mode_get_type ()) +GType gst_camerabin_mode_get_type (void); + +G_END_DECLS + +#endif /* #ifndef __GST_CAMERABIN_ENUM_H__ */ Index: b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c @@ -0,0 +1,406 @@ +/* + * GStreamer + * Copyright (C) 2008 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:camerabingeneral + * @short_description: helper functions for #GstCameraBin and it's modules + * + * Common helper functions for #GstCameraBin, #GstCameraBinImage and + * #GstCameraBinVideo. + * + */ +#include +#include +#include +#include "gstcamerabinpreview.h" +#include "gstbasecamerasrc.h" + +GST_DEBUG_CATEGORY_EXTERN (base_camera_src_debug); +#define GST_CAT_DEFAULT base_camera_src_debug + +static void _gst_camerabin_preview_set_caps (GstCameraBinPreviewPipelineData * + preview, GstCaps * caps); + +static gboolean +bus_callback (GstBus * bus, GstMessage * message, gpointer user_data) +{ + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ERROR:{ + GError *err; + GstCameraBinPreviewPipelineData *data; + + data = user_data; + + gst_message_parse_error (message, &err, NULL); + GST_WARNING ("Error from preview pipeline: %s", err->message); + g_error_free (err); + + /* TODO Not sure if we should post an Error or Warning here */ + GST_ELEMENT_ERROR (data, CORE, FAILED, + ("fatal error in preview pipeline, disposing the pipeline"), (NULL)); + + /* Possible error situations: + * 1) cond_wait pending. prevent deadlock by signalling the cond + * 2) preview_pipeline_post called with new buffer to handle. returns + * because data->pipeline is set to null + * 3) new preview caps incoming. returns because data->pipeline is null + */ + + if (data->pipeline) { + gst_element_set_state (data->pipeline, GST_STATE_NULL); + gst_object_unref (data->pipeline); + data->pipeline = NULL; + } + + g_cond_signal (&data->processing_cond); + + break; + } + default: + break; + } + return TRUE; +} + +static GstFlowReturn +gst_camerabin_preview_pipeline_new_sample (GstAppSink * appsink, + gpointer user_data) +{ + GstSample *sample; + GstStructure *s; + GstMessage *msg; + GstCameraBinPreviewPipelineData *data; + + data = user_data; + + sample = gst_app_sink_pull_sample (appsink); + s = gst_structure_new (GST_BASE_CAMERA_SRC_PREVIEW_MESSAGE_NAME, + "sample", GST_TYPE_SAMPLE, sample, NULL); + gst_sample_unref (sample); + msg = gst_message_new_element (GST_OBJECT (data->element), s); + + GST_DEBUG_OBJECT (data->element, "sending message with preview image"); + if (gst_element_post_message (data->element, msg) == FALSE) { + GST_WARNING_OBJECT (data->element, + "This element has no bus, therefore no message sent!"); + } + + g_mutex_lock (&data->processing_lock); + + data->processing--; + if (data->processing == 0) + g_cond_signal (&data->processing_cond); + + g_mutex_unlock (&data->processing_lock); + + return GST_FLOW_OK; +} + +/** + * gst_camerabin_create_preview_pipeline: + * @element: Owner of this pipeline + * @filter: Custom filter to process preview data (an extra ref is taken) + * + * Creates a new previewing pipeline that can receive buffers + * to be posted as camerabin preview messages for @element + * + * Returns: The newly created #GstCameraBinPreviewPipelineData + */ +GstCameraBinPreviewPipelineData * +gst_camerabin_create_preview_pipeline (GstElement * element, + GstElement * filter) +{ + GstCameraBinPreviewPipelineData *data; + GstElement *csp; + GstElement *vscale; + gboolean added = FALSE; + gboolean linkfail = FALSE; + GstBus *bus; + GstAppSinkCallbacks callbacks = { 0, }; + + data = g_new0 (GstCameraBinPreviewPipelineData, 1); + + data->pipeline = gst_pipeline_new ("preview-pipeline"); + data->appsrc = gst_element_factory_make ("appsrc", "preview-appsrc"); + data->appsink = gst_element_factory_make ("appsink", "preview-appsink"); + csp = gst_element_factory_make ("videoconvert", "preview-vconv"); + vscale = gst_element_factory_make ("videoscale", "preview-vscale"); + + if (!data->appsrc || !data->appsink || !csp || !vscale) { + goto error; + } + + g_object_set (data->appsrc, "emit-signals", FALSE, NULL); + g_object_set (data->appsink, "sync", FALSE, "enable-last-sample", + FALSE, NULL); + + gst_bin_add_many (GST_BIN (data->pipeline), data->appsrc, + data->appsink, csp, vscale, NULL); + if (filter) + gst_bin_add (GST_BIN (data->pipeline), gst_object_ref (filter)); + added = TRUE; + + if (filter) { + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (data->appsrc, "src", + filter, NULL, GST_PAD_LINK_CHECK_NOTHING)); + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (filter, NULL, + vscale, "sink", GST_PAD_LINK_CHECK_CAPS)); + } else { + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (data->appsrc, "src", + vscale, "sink", GST_PAD_LINK_CHECK_NOTHING)); + } + + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (vscale, "src", csp, + "sink", GST_PAD_LINK_CHECK_NOTHING)); + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (csp, "src", + data->appsink, "sink", GST_PAD_LINK_CHECK_NOTHING)); + + if (linkfail) { + GST_WARNING ("Failed to link preview pipeline elements"); + goto error; + } + + callbacks.new_sample = gst_camerabin_preview_pipeline_new_sample; + gst_app_sink_set_callbacks ((GstAppSink *) data->appsink, &callbacks, data, + NULL); + + bus = gst_pipeline_get_bus (GST_PIPELINE (data->pipeline)); + gst_bus_add_watch (bus, bus_callback, data); + gst_object_unref (bus); + + g_object_set (data->appsink, "sync", FALSE, NULL); + + data->element = element; + data->filter = filter; + data->vscale = vscale; + + g_mutex_init (&data->processing_lock); + g_cond_init (&data->processing_cond); + + data->pending_preview_caps = NULL; + data->processing = 0; + + return data; +error: + GST_WARNING ("Failed to create camerabin's preview pipeline"); + if (!added) { + if (csp) + gst_object_unref (csp); + if (vscale) + gst_object_unref (vscale); + if (data->appsrc) + gst_object_unref (data->appsrc); + if (data->appsink) + gst_object_unref (data->appsink); + } + gst_camerabin_destroy_preview_pipeline (data); + return NULL; +} + +/** + * gst_camerabin_destroy_preview_pipeline: + * @preview: the #GstCameraBinPreviewPipelineData + * + * Frees a #GstCameraBinPreviewPipelineData + */ +void +gst_camerabin_destroy_preview_pipeline (GstCameraBinPreviewPipelineData * + preview) +{ + g_return_if_fail (preview != NULL); + + if (preview->processing_lock.p) { + g_mutex_clear (&preview->processing_lock); + preview->processing_lock.p = NULL; + } + if (preview->processing_cond.p) { + g_cond_clear (&preview->processing_cond); + preview->processing_cond.p = NULL; + } + if (preview->pipeline) { + gst_element_set_state (preview->pipeline, GST_STATE_NULL); + gst_object_unref (preview->pipeline); + } + g_free (preview); +} + +/** + * gst_camerabin_preview_pipeline_post: + * @preview: the #GstCameraBinPreviewPipelineData + * @sample: the sample to be posted as a preview + * + * Converts the @sample to the desired format and posts the preview + * message to the bus. + * + * Returns: %TRUE on success + */ +gboolean +gst_camerabin_preview_pipeline_post (GstCameraBinPreviewPipelineData * preview, + GstSample * sample) +{ + g_return_val_if_fail (preview != NULL, FALSE); + g_return_val_if_fail (preview->pipeline != NULL, FALSE); + g_return_val_if_fail (sample, FALSE); + + g_mutex_lock (&preview->processing_lock); + g_return_val_if_fail (preview->pipeline != NULL, FALSE); + + if (preview->pending_preview_caps) { + if (preview->processing > 0) { + g_cond_wait (&preview->processing_cond, &preview->processing_lock); + } + _gst_camerabin_preview_set_caps (preview, preview->pending_preview_caps); + gst_caps_replace (&preview->pending_preview_caps, NULL); + } + + preview->processing++; + + g_object_set (preview->appsrc, "caps", gst_sample_get_caps (sample), NULL); + gst_app_src_push_buffer ((GstAppSrc *) preview->appsrc, + gst_buffer_ref (gst_sample_get_buffer (sample))); + + g_mutex_unlock (&preview->processing_lock); + + return TRUE; +} + +static void +_gst_camerabin_preview_set_caps (GstCameraBinPreviewPipelineData * preview, + GstCaps * caps) +{ + GstState state, pending; + GstStateChangeReturn ret; + + g_return_if_fail (preview != NULL); + g_return_if_fail (preview->pipeline != NULL); + + ret = gst_element_get_state (preview->pipeline, &state, &pending, 0); + if (ret == GST_STATE_CHANGE_FAILURE) { + /* make it try again */ + state = GST_STATE_PLAYING; + pending = GST_STATE_VOID_PENDING; + } + gst_element_set_state (preview->pipeline, GST_STATE_NULL); + g_object_set (preview->appsink, "caps", caps, NULL); + if (pending != GST_STATE_VOID_PENDING) + state = pending; + gst_element_set_state (preview->pipeline, state); +} + +/** + * gst_camerabin_preview_set_caps: + * @preview: the #GstCameraBinPreviewPipelineData + * @caps: the #GstCaps to be set (a new ref will be taken) + * + * The caps that preview buffers should have when posted + * on the bus + */ +void +gst_camerabin_preview_set_caps (GstCameraBinPreviewPipelineData * preview, + GstCaps * caps) +{ + g_return_if_fail (preview != NULL); + + g_mutex_lock (&preview->processing_lock); + + if (preview->processing == 0) { + _gst_camerabin_preview_set_caps (preview, caps); + } else { + GST_DEBUG ("Preview pipeline busy, storing new caps as pending"); + gst_caps_replace (&preview->pending_preview_caps, caps); + } + g_mutex_unlock (&preview->processing_lock); +} + +/** + * gst_camerabin_preview_set_filter: + * @preview: the #GstCameraBinPreviewPipelineData + * @filter: Custom filter to process preview data (an extra ref is taken) + * + * Set the filter element into preview pipeline. + * + * Returns: %TRUE on success + */ +gboolean +gst_camerabin_preview_set_filter (GstCameraBinPreviewPipelineData * preview, + GstElement * filter) +{ + gboolean ret = TRUE; + GstState current; + + g_return_val_if_fail (preview != NULL, FALSE); + + GST_DEBUG ("Preview pipeline setting new filter %p", filter); + + g_mutex_lock (&preview->processing_lock); + + gst_element_get_state (preview->pipeline, ¤t, NULL, 0); + + if (preview->processing == 0 && current == GST_STATE_NULL) { + gboolean linkfail = FALSE; + + if (preview->filter) { + /* Unlink and remove old filter */ + gst_element_unlink (preview->appsrc, preview->filter); + gst_element_unlink (preview->filter, preview->vscale); + gst_bin_remove (GST_BIN (preview->pipeline), preview->filter); + } else { + /* Make room for filter by breaking the link between appsrc and vcale */ + gst_element_unlink (preview->appsrc, preview->vscale); + } + + if (filter) { + /* Add and link the new filter between appsrc and vscale */ + gst_bin_add (GST_BIN (preview->pipeline), gst_object_ref (filter)); + + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (preview->appsrc, + "src", filter, NULL, GST_PAD_LINK_CHECK_NOTHING)); + + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (filter, NULL, + preview->vscale, "sink", GST_PAD_LINK_CHECK_CAPS)); + } else { + /* No filter was given. Just link the appsrc to vscale directly */ + linkfail |= + GST_PAD_LINK_FAILED (gst_element_link_pads_full (preview->appsrc, + "src", preview->vscale, "sink", GST_PAD_LINK_CHECK_NOTHING)); + } + + if (linkfail) { + GST_WARNING ("Linking the filter to pipeline failed"); + ret = FALSE; + } else { + GST_DEBUG ("Linking the filter to pipeline successful"); + preview->filter = filter; + } + } else { + GST_WARNING ("Cannot change filter when pipeline is running"); + ret = FALSE; + } + g_mutex_unlock (&preview->processing_lock); + + return ret; +} Index: b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.h =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.h @@ -0,0 +1,56 @@ +/* + * GStreamer + * Copyright (C) 2008 Nokia Corporation + * Copyright (C) 2010 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __CAMERABIN_PREVIEW_H_ +#define __CAMERABIN_PREVIEW_H_ + +#ifndef GST_USE_UNSTABLE_API +#warning "camera bin preview is unstable API and may change in future." +#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." +#endif + +#include + +typedef struct +{ + GstElement *pipeline; + + GstElement *appsrc; + GstElement *filter; + GstElement *appsink; + GstElement *vscale; + + GstElement *element; + + GstCaps *pending_preview_caps; + guint processing; + GMutex processing_lock; + GCond processing_cond; + +} GstCameraBinPreviewPipelineData; + +GstCameraBinPreviewPipelineData *gst_camerabin_create_preview_pipeline (GstElement * element, GstElement * filter); +void gst_camerabin_destroy_preview_pipeline (GstCameraBinPreviewPipelineData * preview); +gboolean gst_camerabin_preview_pipeline_post (GstCameraBinPreviewPipelineData * preview, GstSample * sample); +void gst_camerabin_preview_set_caps (GstCameraBinPreviewPipelineData * preview, GstCaps * caps); +gboolean gst_camerabin_preview_set_filter (GstCameraBinPreviewPipelineData * preview, GstElement * filter); + +#endif /* #ifndef __CAMERABIN_PREVIEW_H_ */ Index: b/gst-libs/gst/basecamerabinsrc/Makefile.am =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/Makefile.am @@ -0,0 +1,39 @@ + +lib_LTLIBRARIES = libgstbasecamerabinsrc-@GST_API_VERSION@.la + +CLEANFILES = $(BUILT_SOURCES) + +libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES = \ + gstcamerabin-enum.c \ + gstcamerabinpreview.c \ + gstbasecamerasrc.c + +libgstbasecamerabinsrc_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/basecamerabinsrc +libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS = \ + gstcamerabin-enum.h \ + gstcamerabinpreview.h \ + gstbasecamerasrc.h + +libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + -DGST_USE_UNSTABLE_API \ + $(GST_CFLAGS) +libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD = \ + -lgstapp-$(GST_API_VERSION) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) + +libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) + +Android.mk: Makefile.am + androgenizer -:PROJECT libgstbasecamerabinsrc -:STATIC libgstbasecamerabinsrc-@GST_API_VERSION@ \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES) \ + -:CFLAGS $(DEFS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) \ + -:LDFLAGS $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS) \ + $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD) \ + -ldl \ + -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/basecamerabinsrc \ + -:HEADERS $(libgstbasecamerabinsrcinclude_HEADERS) \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + > $@ Index: b/gst-libs/gst/basecamerabinsrc/Makefile.in =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/Makefile.in @@ -0,0 +1,913 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = gst-libs/gst/basecamerabinsrc +DIST_COMMON = \ + $(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ + $(top_srcdir)/common/m4/as-auto-alt.m4 \ + $(top_srcdir)/common/m4/as-compiler-flag.m4 \ + $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \ + $(top_srcdir)/common/m4/as-libtool.m4 \ + $(top_srcdir)/common/m4/as-python.m4 \ + $(top_srcdir)/common/m4/as-scrub-include.m4 \ + $(top_srcdir)/common/m4/as-version.m4 \ + $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/common/m4/gst-arch.m4 \ + $(top_srcdir)/common/m4/gst-args.m4 \ + $(top_srcdir)/common/m4/gst-check.m4 \ + $(top_srcdir)/common/m4/gst-default.m4 \ + $(top_srcdir)/common/m4/gst-dowhile.m4 \ + $(top_srcdir)/common/m4/gst-error.m4 \ + $(top_srcdir)/common/m4/gst-feature.m4 \ + $(top_srcdir)/common/m4/gst-gettext.m4 \ + $(top_srcdir)/common/m4/gst-glib2.m4 \ + $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \ + $(top_srcdir)/common/m4/gst-platform.m4 \ + $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ + $(top_srcdir)/common/m4/gst-plugindir.m4 \ + $(top_srcdir)/common/m4/gst-x11.m4 \ + $(top_srcdir)/common/m4/gst.m4 \ + $(top_srcdir)/common/m4/gtk-doc.m4 \ + $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +libgstbasecamerabinsrc_@GST_API_VERSION@_la_DEPENDENCIES = \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libgstbasecamerabinsrc_@GST_API_VERSION@_la_OBJECTS = libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.lo \ + libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.lo \ + libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.lo +libgstbasecamerabinsrc_@GST_API_VERSION@_la_OBJECTS = \ + $(am_libgstbasecamerabinsrc_@GST_API_VERSION@_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +libgstbasecamerabinsrc_@GST_API_VERSION@_la_LINK = $(LIBTOOL) \ + $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) \ + $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) \ + $(CFLAGS) \ + $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES) +DIST_SOURCES = $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +AALIB_CFLAGS = @AALIB_CFLAGS@ +AALIB_CONFIG = @AALIB_CONFIG@ +AALIB_LIBS = @AALIB_LIBS@ +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BZ2_LIBS = @BZ2_LIBS@ +CAIRO_CFLAGS = @CAIRO_CFLAGS@ +CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@ +CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@ +CAIRO_LIBS = @CAIRO_LIBS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@ +DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@ +DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@ +DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@ +DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ +DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@ +DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@ +DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DV1394_CFLAGS = @DV1394_CFLAGS@ +DV1394_LIBS = @DV1394_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ERROR_CFLAGS = @ERROR_CFLAGS@ +ERROR_CXXFLAGS = @ERROR_CXXFLAGS@ +ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@ +EXEEXT = @EXEEXT@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +GCOV = @GCOV@ +GCOV_CFLAGS = @GCOV_CFLAGS@ +GCOV_LIBS = @GCOV_LIBS@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LDFLAGS = @GIO_LDFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ +GSTPB_PREFIX = @GSTPB_PREFIX@ +GST_AGE = @GST_AGE@ +GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@ +GST_API_VERSION = @GST_API_VERSION@ +GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ +GST_BASE_LIBS = @GST_BASE_LIBS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ +GST_CHECK_LIBS = @GST_CHECK_LIBS@ +GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@ +GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@ +GST_CURRENT = @GST_CURRENT@ +GST_CXXFLAGS = @GST_CXXFLAGS@ +GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ +GST_LIBS = @GST_LIBS@ +GST_LIBVERSION = @GST_LIBVERSION@ +GST_LICENSE = @GST_LICENSE@ +GST_LT_LDFLAGS = @GST_LT_LDFLAGS@ +GST_NET_CFLAGS = @GST_NET_CFLAGS@ +GST_NET_LIBS = @GST_NET_LIBS@ +GST_OBJCFLAGS = @GST_OBJCFLAGS@ +GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@ +GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@ +GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@ +GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ +GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ +GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ +GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ +GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@ +GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ +GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ +GST_PREFIX = @GST_PREFIX@ +GST_REVISION = @GST_REVISION@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +GTK_X11_CFLAGS = @GTK_X11_CFLAGS@ +GTK_X11_LIBS = @GTK_X11_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +HAVE_AVC1394 = @HAVE_AVC1394@ +HAVE_BZ2 = @HAVE_BZ2@ +HAVE_CXX = @HAVE_CXX@ +HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@ +HAVE_ROM1394 = @HAVE_ROM1394@ +HAVE_SPEEX = @HAVE_SPEEX@ +HAVE_X = @HAVE_X@ +HAVE_XSHM = @HAVE_XSHM@ +HAVE_ZLIB = @HAVE_ZLIB@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@ +JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@ +JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@ +JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@ +JACK_CFLAGS = @JACK_CFLAGS@ +JACK_LIBS = @JACK_LIBS@ +JPEG_LIBS = @JPEG_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCACA_CFLAGS = @LIBCACA_CFLAGS@ +LIBCACA_LIBS = @LIBCACA_LIBS@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBICONV = @LIBICONV@ +LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@ +LIBIEC61883_LIBS = @LIBIEC61883_LIBS@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@ +LIBV4L2_LIBS = @LIBV4L2_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORCC = @ORCC@ +ORCC_FLAGS = @ORCC_FLAGS@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINDIR = @PLUGINDIR@ +POSUB = @POSUB@ +PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PULSE_CFLAGS = @PULSE_CFLAGS@ +PULSE_LIBS = @PULSE_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RAW1394_CFLAGS = @RAW1394_CFLAGS@ +RAW1394_LIBS = @RAW1394_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHOUT2_CFLAGS = @SHOUT2_CFLAGS@ +SHOUT2_LIBS = @SHOUT2_LIBS@ +SOUP_CFLAGS = @SOUP_CFLAGS@ +SOUP_LIBS = @SOUP_LIBS@ +SPEEX_CFLAGS = @SPEEX_CFLAGS@ +SPEEX_LIBS = @SPEEX_LIBS@ +STRIP = @STRIP@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +USE_NLS = @USE_NLS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ +VERSION = @VERSION@ +VPX_CFLAGS = @VPX_CFLAGS@ +VPX_LIBS = @VPX_LIBS@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WAVPACK_CFLAGS = @WAVPACK_CFLAGS@ +WAVPACK_LIBS = @WAVPACK_LIBS@ +XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ +XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XSHM_LIBS = @XSHM_LIBS@ +XVIDEO_LIBS = @XVIDEO_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZLIB_LIBS = @ZLIB_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +plugindir = @plugindir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = libgstbasecamerabinsrc-@GST_API_VERSION@.la +CLEANFILES = $(BUILT_SOURCES) +libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES = \ + gstcamerabin-enum.c \ + gstcamerabinpreview.c \ + gstbasecamerasrc.c + +libgstbasecamerabinsrc_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/basecamerabinsrc +libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS = \ + gstcamerabin-enum.h \ + gstcamerabinpreview.h \ + gstbasecamerasrc.h + +libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + -DGST_USE_UNSTABLE_API \ + $(GST_CFLAGS) + +libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD = \ + -lgstapp-$(GST_API_VERSION) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) + +libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/basecamerabinsrc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gst-libs/gst/basecamerabinsrc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgstbasecamerabinsrc-@GST_API_VERSION@.la: $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_OBJECTS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libgstbasecamerabinsrc_@GST_API_VERSION@_la_DEPENDENCIES) + $(AM_V_CCLD)$(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LINK) -rpath $(libdir) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_OBJECTS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.lo: gstcamerabin-enum.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.lo -MD -MP -MF $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.Tpo -c -o libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.lo `test -f 'gstcamerabin-enum.c' || echo '$(srcdir)/'`gstcamerabin-enum.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.Tpo $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstcamerabin-enum.c' object='libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabin-enum.lo `test -f 'gstcamerabin-enum.c' || echo '$(srcdir)/'`gstcamerabin-enum.c + +libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.lo: gstcamerabinpreview.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.lo -MD -MP -MF $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.Tpo -c -o libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.lo `test -f 'gstcamerabinpreview.c' || echo '$(srcdir)/'`gstcamerabinpreview.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.Tpo $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstcamerabinpreview.c' object='libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.lo `test -f 'gstcamerabinpreview.c' || echo '$(srcdir)/'`gstcamerabinpreview.c + +libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.lo: gstbasecamerasrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.lo -MD -MP -MF $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.Tpo -c -o libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.lo `test -f 'gstbasecamerasrc.c' || echo '$(srcdir)/'`gstbasecamerasrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.Tpo $(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstbasecamerasrc.c' object='libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstbasecamerasrc.lo `test -f 'gstbasecamerasrc.c' || echo '$(srcdir)/'`gstbasecamerasrc.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS: $(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)" || exit $$?; \ + done + +uninstall-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgstbasecamerabinsrc_@GST_API_VERSION@includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES \ + uninstall-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES \ + install-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-libLTLIBRARIES \ + uninstall-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS + + +Android.mk: Makefile.am + androgenizer -:PROJECT libgstbasecamerabinsrc -:STATIC libgstbasecamerabinsrc-@GST_API_VERSION@ \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES) \ + -:CFLAGS $(DEFS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) \ + -:LDFLAGS $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS) \ + $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD) \ + -ldl \ + -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/basecamerabinsrc \ + -:HEADERS $(libgstbasecamerabinsrcinclude_HEADERS) \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Index: b/gst-libs/gst/Makefile.am =================================================================== --- /dev/null +++ b/gst-libs/gst/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = interfaces basecamerabinsrc + +DIST_SUBDIRS = interfaces basecamerabinsrc Index: b/gst-libs/Makefile.am =================================================================== --- /dev/null +++ b/gst-libs/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = gst Index: b/Makefile.am =================================================================== --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc ALWAYS_SUBDIRS = \ + gst-libs \ gst sys ext \ tests \ docs \ Index: b/tests/check/elements/camerabin.c =================================================================== --- /dev/null +++ b/tests/check/elements/camerabin.c @@ -0,0 +1,1620 @@ +/* GStreamer + * + * unit test for camerabin basic operations + * Copyright (C) 2010 Nokia Corporation + * Copyright (C) 2010 Thiago Santos + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#define IMAGE_FILENAME "image" +#define VIDEO_FILENAME "video" +#define CAPTURE_COUNT 3 +#define VIDEO_DURATION 5 + +#define VIDEO_PAD_SUPPORTED_CAPS "video/x-raw, format=RGB, width=600, height=480" +#define IMAGE_PAD_SUPPORTED_CAPS "video/x-raw, format=RGB, width=800, height=600" + +static GstStaticPadTemplate vfsrc_template = +GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME, + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); + +static GstStaticPadTemplate imgsrc_template = +GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME, + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); + +static GstStaticPadTemplate vidsrc_template = +GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME, + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); + +/* custom test camera src element */ +#define GST_TYPE_TEST_CAMERA_SRC \ + (gst_test_camera_src_get_type()) +#define GST_TEST_CAMERA_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TEST_CAMERA_SRC,GstTestCameraSrc)) +#define GST_TEST_CAMERA_SRC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TEST_CAMERA_SRC,GstTestCameraSrcClass)) +#define GST_IS_TEST_REVERSE_NEGOTIATION_SINK(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TEST_CAMERA_SRC)) +#define GST_IS_TEST_REVERSE_NEGOTIATION_SINK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TEST_CAMERA_SRC)) +#define GST_TEST_CAMERA_SRC_CAST(obj) ((GstTestCameraSrc *)obj) + +typedef struct _GstTestCameraSrc GstTestCameraSrc; +typedef struct _GstTestCameraSrcClass GstTestCameraSrcClass; +struct _GstTestCameraSrc +{ + GstBaseCameraSrc element; + + GstPad *vfpad; + GstPad *vidpad; + GstPad *imgpad; + + GstCameraBinMode mode; +}; + +struct _GstTestCameraSrcClass +{ + GstBaseCameraSrcClass parent_class; +}; + +GType gst_test_camera_src_get_type (void); + +#define gst_test_camera_src_parent_class parent_class +G_DEFINE_TYPE (GstTestCameraSrc, gst_test_camera_src, GST_TYPE_BASE_CAMERA_SRC); + +static gboolean +gst_test_camera_src_set_mode (GstBaseCameraSrc * src, GstCameraBinMode mode) +{ + GstTestCameraSrc *self = GST_TEST_CAMERA_SRC (src); + + self->mode = mode; + return TRUE; +} + +static gboolean +gst_test_camera_src_query (GstPad * pad, GstObject * parent, GstQuery * query) +{ + GstTestCameraSrc *self = (GstTestCameraSrc *) GST_PAD_PARENT (pad); + GstCaps *result = NULL; + gboolean ret = FALSE; + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_CAPS: + if (pad == self->vfpad) { + result = gst_caps_new_any (); + } else if (pad == self->vidpad) { + result = gst_caps_from_string (VIDEO_PAD_SUPPORTED_CAPS); + } else if (pad == self->imgpad) { + result = gst_caps_from_string (IMAGE_PAD_SUPPORTED_CAPS); + } else { + g_assert_not_reached (); + } + if (result) { + GstCaps *filter; + + gst_query_parse_caps (query, &filter); + if (filter) { + GstCaps *tmp; + tmp = gst_caps_intersect (result, filter); + gst_caps_replace (&result, tmp); + gst_caps_unref (tmp); + } + gst_query_set_caps_result (query, result); + ret = TRUE; + } + break; + default: + break; + } + + return ret; +} + +static void +gst_test_camera_src_class_init (GstTestCameraSrcClass * klass) +{ + GstBaseCameraSrcClass *gstbasecamera_class; + GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); + + gstbasecamera_class = GST_BASE_CAMERA_SRC_CLASS (klass); + gstbasecamera_class->set_mode = gst_test_camera_src_set_mode; + + gst_element_class_set_static_metadata (gstelement_class, + "Test Camera Src", + "Camera/Src", + "Some test camera src", + "Thiago Santos "); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&vidsrc_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&imgsrc_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&vfsrc_template)); +} + +static void +gst_test_camera_src_init (GstTestCameraSrc * self) +{ + GstElementClass *gstelement_class = GST_ELEMENT_GET_CLASS (self); + GstPadTemplate *template; + + /* create pads */ + template = gst_element_class_get_pad_template (gstelement_class, + GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME); + self->vfpad = gst_pad_new_from_template (template, + GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME); + gst_element_add_pad (GST_ELEMENT_CAST (self), self->vfpad); + + template = gst_element_class_get_pad_template (gstelement_class, + GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME); + self->imgpad = gst_pad_new_from_template (template, + GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME); + gst_element_add_pad (GST_ELEMENT_CAST (self), self->imgpad); + + template = gst_element_class_get_pad_template (gstelement_class, + GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME); + self->vidpad = gst_pad_new_from_template (template, + GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME); + gst_element_add_pad (GST_ELEMENT_CAST (self), self->vidpad); + + /* add get caps functions */ + gst_pad_set_query_function (self->vfpad, gst_test_camera_src_query); + gst_pad_set_query_function (self->vidpad, gst_test_camera_src_query); + gst_pad_set_query_function (self->imgpad, gst_test_camera_src_query); +} + +/* end of custom test camera src element */ + + +static GstElement *camera; +static guint bus_source; +static GMainLoop *main_loop; +static gint capture_count = 0; +guint32 test_id = 0; +static gchar *image_filename; +static gchar *video_filename; + +static GstSample *preview_sample; +static gchar *preview_filename; +static GstCaps *preview_caps; +static GstTagList *tags_found; + +static gboolean +validity_bus_cb (GstBus * bus, GstMessage * message, gpointer data); + +static GstMessage *wait_for_element_message (GstElement * camera, + const gchar * name, GstClockTime timeout); + +static void +validate_taglist_foreach (const GstTagList * list, const gchar * tag, + gpointer user_data) +{ + GstTagList *other = GST_TAG_LIST (user_data); + + const GValue *val1 = gst_tag_list_get_value_index (list, tag, 0); + const GValue *val2 = gst_tag_list_get_value_index (other, tag, 0); + + GST_DEBUG ("checking tag '%s'", tag); + + fail_if (val1 == NULL); + fail_if (val2 == NULL); + + fail_unless (gst_value_compare (val1, val2) == GST_VALUE_EQUAL); +} + + +/* helper function for filenames */ +static gchar * +make_test_file_name (const gchar * base_name, gint num) +{ + /* num == -1 means to keep the %d in the resulting string to be used on + * multifilesink like location */ + if (num == -1) { + return g_strdup_printf ("%s" G_DIR_SEPARATOR_S + "gstcamerabintest_%s_%u_%%03d.cap", g_get_tmp_dir (), base_name, + test_id); + } else { + return g_strdup_printf ("%s" G_DIR_SEPARATOR_S + "gstcamerabintest_%s_%u_%03d.cap", g_get_tmp_dir (), base_name, + test_id, num); + } +} + +static const gchar * +make_const_file_name (const gchar * filename, gint num) +{ + static gchar file_name[1000]; + + /* num == -1 means to keep the %d in the resulting string to be used on + * multifilesink like location */ + g_snprintf (file_name, 999, filename, num); + + return file_name; +} + +/* configuration */ + +static gboolean +capture_bus_cb (GstBus * bus, GstMessage * message, gpointer data) +{ + GMainLoop *loop = (GMainLoop *) data; + const GstStructure *st; + + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ERROR:{ + GError *err = NULL; + gchar *debug = NULL; + + gst_message_parse_error (message, &err, &debug); + GST_WARNING ("ERROR: %s [%s]", err->message, debug); + g_error_free (err); + g_free (debug); + /* Write debug graph to file */ + GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (camera), + GST_DEBUG_GRAPH_SHOW_ALL, "camerabin.error"); + + fail_if (TRUE, "error while capturing"); + g_main_loop_quit (loop); + break; + } + case GST_MESSAGE_WARNING:{ + GError *err = NULL; + gchar *debug = NULL; + + gst_message_parse_warning (message, &err, &debug); + GST_WARNING ("WARNING: %s [%s]", err->message, debug); + g_error_free (err); + g_free (debug); + /* Write debug graph to file */ + GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (camera), + GST_DEBUG_GRAPH_SHOW_ALL, "camerabin.warning"); + break; + } + case GST_MESSAGE_EOS: + GST_DEBUG ("eos"); + g_main_loop_quit (loop); + break; + default: + st = gst_message_get_structure (message); + if (st && gst_structure_has_name (st, "image-done")) { + GST_INFO ("image captured"); + } else if (st && gst_structure_has_name (st, + GST_BASE_CAMERA_SRC_PREVIEW_MESSAGE_NAME)) { + GstSample *sample; + const GValue *value; + + value = gst_structure_get_value (st, "sample"); + fail_unless (value != NULL); + sample = gst_value_get_sample (value); + + if (preview_sample) + gst_sample_unref (preview_sample); + preview_sample = gst_sample_ref (sample); + g_free (preview_filename); + preview_filename = g_strdup (gst_structure_get_string (st, "location")); + } + break; + } + return TRUE; +} + +static void +check_preview_image (GstElement * camera, const gchar * filename, gint index) +{ + gchar *prev_filename = NULL; + + if (!preview_sample && camera) { + GstMessage *msg = wait_for_element_message (camera, + GST_BASE_CAMERA_SRC_PREVIEW_MESSAGE_NAME, GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + } + fail_unless (preview_sample != NULL); + if (filename) { + if (index >= 0) { + prev_filename = g_strdup_printf (filename, index); + } else { + prev_filename = g_strdup (filename); + } + fail_unless (preview_filename != NULL); + fail_unless (strcmp (preview_filename, prev_filename) == 0); + } + if (preview_caps) { + fail_unless (gst_sample_get_caps (preview_sample) != NULL); + fail_unless (gst_caps_can_intersect (gst_sample_get_caps (preview_sample), + preview_caps)); + } + g_free (prev_filename); +} + +static void +extract_jpeg_tags (const gchar * filename, gint num) +{ + GstBus *bus; + GMainLoop *loop = g_main_loop_new (NULL, FALSE); + const gchar *filepath = make_const_file_name (filename, num); + gchar *pipeline_str = g_strdup_printf ("filesrc location=%s ! " + "jpegparse ! fakesink", filepath); + GstElement *pipeline; + guint source; + + pipeline = gst_parse_launch (pipeline_str, NULL); + fail_unless (pipeline != NULL); + g_free (pipeline_str); + + bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); + source = gst_bus_add_watch (bus, (GstBusFunc) validity_bus_cb, loop); + + gst_element_set_state (pipeline, GST_STATE_PLAYING); + g_main_loop_run (loop); + gst_element_set_state (pipeline, GST_STATE_NULL); + + gst_object_unref (bus); + g_source_remove (source); + gst_object_unref (pipeline); + g_main_loop_unref (loop); +} + +static void +setup_wrappercamerabinsrc_videotestsrc (void) +{ + GstBus *bus; + GstElement *vfbin; + GstElement *fakevideosink; + GstElement *src; + GstElement *testsrc; + GstElement *audiosrc; + + GST_INFO ("init"); + + test_id = g_random_int (); + bus_source = 0; + + main_loop = g_main_loop_new (NULL, TRUE); + + camera = gst_check_setup_element ("camerabin"); + fakevideosink = gst_element_factory_make ("fakesink", NULL); + src = gst_element_factory_make ("wrappercamerabinsrc", NULL); + testsrc = gst_element_factory_make ("videotestsrc", NULL); + audiosrc = gst_element_factory_make ("audiotestsrc", NULL); + + preview_caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, + 320, "height", G_TYPE_INT, 240, NULL); + + g_object_set (G_OBJECT (testsrc), "is-live", TRUE, NULL); + g_object_set (G_OBJECT (audiosrc), "is-live", TRUE, NULL); + g_object_set (G_OBJECT (src), "video-source", testsrc, NULL); + g_object_set (G_OBJECT (camera), "camera-source", src, "preview-caps", + preview_caps, "post-previews", TRUE, "audio-source", audiosrc, NULL); + gst_object_unref (src); + gst_object_unref (testsrc); + gst_object_unref (audiosrc); + + vfbin = gst_bin_get_by_name (GST_BIN (camera), "vf-bin"); + g_object_set (G_OBJECT (vfbin), "video-sink", fakevideosink, NULL); + gst_object_unref (vfbin); + gst_object_unref (fakevideosink); + + bus = gst_pipeline_get_bus (GST_PIPELINE (camera)); + bus_source = gst_bus_add_watch (bus, (GstBusFunc) capture_bus_cb, main_loop); + gst_object_unref (bus); + + tags_found = NULL; + capture_count = 0; + image_filename = make_test_file_name (IMAGE_FILENAME, -1); + video_filename = make_test_file_name (VIDEO_FILENAME, -1); + + GST_INFO ("init finished"); +} + +static void +teardown (void) +{ + gst_element_set_state (camera, GST_STATE_NULL); + + if (camera) + gst_check_teardown_element (camera); + camera = NULL; + + if (bus_source) + g_source_remove (bus_source); + + if (main_loop) + g_main_loop_unref (main_loop); + main_loop = NULL; + + if (preview_caps) + gst_caps_unref (preview_caps); + preview_caps = NULL; + + if (preview_sample) + gst_sample_unref (preview_sample); + preview_sample = NULL; + + g_free (preview_filename); + preview_filename = NULL; + + if (tags_found) + gst_tag_list_unref (tags_found); + tags_found = NULL; + + g_free (video_filename); + video_filename = NULL; + + g_free (image_filename); + image_filename = NULL; + + GST_INFO ("done"); +} + +static gboolean +validity_bus_cb (GstBus * bus, GstMessage * message, gpointer data) +{ + GMainLoop *loop = (GMainLoop *) data; + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ERROR:{ + GError *err = NULL; + gchar *debug = NULL; + + gst_message_parse_error (message, &err, &debug); + + GST_ERROR ("Error: %s : %s", err->message, debug); + g_error_free (err); + g_free (debug); + + fail_if (TRUE, "validating captured data failed"); + g_main_loop_quit (loop); + } + break; + case GST_MESSAGE_EOS: + g_main_loop_quit (loop); + GST_DEBUG ("eos"); + break; + case GST_MESSAGE_TAG:{ + GstTagList *taglist = NULL; + + gst_message_parse_tag (message, &taglist); + if (tags_found) { + gst_tag_list_insert (tags_found, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); + } else { + tags_found = taglist; + } + GST_DEBUG ("tags: %" GST_PTR_FORMAT, tags_found); + } + break; + default: + break; + } + return TRUE; +} + +/* checks that tags in @tags_a are in @tags_b */ +static gboolean +taglist_is_subset (GstTagList * tags_a, GstTagList * tags_b) +{ + gst_tag_list_foreach (tags_a, validate_taglist_foreach, tags_b); + return TRUE; +} + +/* Validate captured files by playing them with playbin + * and checking that no errors occur. */ +#define WITH_AUDIO TRUE +#define NO_AUDIO FALSE +static gboolean +check_file_validity (const gchar * filename, gint num, GstTagList * taglist, + gint width, gint height, gboolean has_audio) +{ + GstBus *bus; + GstPad *pad; + GstCaps *caps; + gint caps_width, caps_height; + GstState state; + guint source; + + GMainLoop *loop = g_main_loop_new (NULL, FALSE); + GstElement *playbin = gst_element_factory_make ("playbin", NULL); + GstElement *fakevideo = gst_element_factory_make ("fakesink", NULL); + GstElement *fakeaudio = gst_element_factory_make ("fakesink", NULL); + gchar *uri = g_strconcat ("file://", make_const_file_name (filename, num), + NULL); + + GST_DEBUG ("checking uri: %s", uri); + g_object_set (G_OBJECT (playbin), "uri", uri, "video-sink", fakevideo, + "audio-sink", fakeaudio, NULL); + + bus = gst_pipeline_get_bus (GST_PIPELINE (playbin)); + source = gst_bus_add_watch (bus, (GstBusFunc) validity_bus_cb, loop); + + gst_element_set_state (playbin, GST_STATE_PAUSED); + gst_element_get_state (playbin, &state, NULL, GST_SECOND * 3); + + if (width != 0 && height != 0) { + g_signal_emit_by_name (playbin, "get-video-pad", 0, &pad, NULL); + g_assert (pad != NULL); + caps = gst_pad_get_current_caps (pad); + + g_assert (gst_structure_get_int (gst_caps_get_structure (caps, 0), + "width", &caps_width)); + g_assert (gst_structure_get_int (gst_caps_get_structure (caps, 0), + "height", &caps_height)); + + g_assert (width == caps_width); + g_assert (height == caps_height); + + gst_caps_unref (caps); + gst_object_unref (pad); + } + if (has_audio) { + g_signal_emit_by_name (playbin, "get-audio-pad", 0, &pad, NULL); + g_assert (pad != NULL); + gst_object_unref (pad); + } + + gst_element_set_state (playbin, GST_STATE_PLAYING); + g_main_loop_run (loop); + gst_element_set_state (playbin, GST_STATE_NULL); + + /* special handling for images (jpg) as jpegparse isn't plugged by + * default due to its current low rank */ + if (taglist && strstr (filename, "image")) { + extract_jpeg_tags (filename, num); + } + + if (taglist) { + fail_unless (tags_found != NULL); + fail_unless (taglist_is_subset (taglist, tags_found)); + } + + g_free (uri); + g_source_remove (source); + gst_object_unref (bus); + gst_object_unref (playbin); + g_main_loop_unref (loop); + + return TRUE; +} + +static void +remove_file (const gchar * fn_template, guint num) +{ + const gchar *fn; + + fn = make_const_file_name (fn_template, num); + GST_INFO ("removing %s", fn); + g_unlink (fn); +} + +static GstPadProbeReturn +filter_buffer_count (GstPad * pad, GstPadProbeInfo * info, gpointer data) +{ + gint *counter = data; + + (*counter)++; + + return GST_PAD_PROBE_OK; +} + +static GstMessage * +wait_for_element_message (GstElement * camera, const gchar * name, + GstClockTime timeout) +{ + GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (camera)); + GstMessage *msg; + + while (1) { + msg = gst_bus_timed_pop_filtered (bus, timeout, GST_MESSAGE_ERROR | + GST_MESSAGE_EOS | GST_MESSAGE_ELEMENT); + + if (msg) { + if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ELEMENT) { + const GstStructure *st = gst_message_get_structure (msg); + if (gst_structure_has_name (st, + GST_BASE_CAMERA_SRC_PREVIEW_MESSAGE_NAME)) { + GstSample *sample; + const GValue *value; + + value = gst_structure_get_value (st, "sample"); + fail_unless (value != NULL); + sample = gst_value_get_sample (value); + + if (preview_sample) + gst_sample_unref (preview_sample); + preview_sample = gst_sample_ref (sample); + g_free (preview_filename); + preview_filename = + g_strdup (gst_structure_get_string (st, "location")); + } + + if (gst_structure_has_name (st, name)) + break; + else + gst_message_unref (msg); + } else { + gst_message_unref (msg); + msg = NULL; + break; + } + } + } + + gst_object_unref (bus); + return msg; +} + +static void +wait_for_idle_state (void) +{ + gboolean idle = FALSE; + + /* not the ideal way, but should be enough for testing */ + while (idle == FALSE) { + g_object_get (camera, "idle", &idle, NULL); + if (idle) + break; + + GST_LOG ("waiting for idle state.."); + g_usleep (G_USEC_PER_SEC / 5); + } + fail_unless (idle); +} + +GST_START_TEST (test_single_image_capture) +{ + gboolean idle; + GstMessage *msg; + if (!camera) + return; + + /* set still image mode */ + g_object_set (camera, "mode", 1, "location", image_filename, NULL); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + GST_INFO ("starting capture"); + fail_unless (camera != NULL); + g_object_get (camera, "idle", &idle, NULL); + fail_unless (idle); + g_signal_emit_by_name (camera, "start-capture", NULL); + + msg = wait_for_element_message (camera, "image-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + /* check that we got a preview image */ + check_preview_image (camera, image_filename, 0); + + wait_for_idle_state (); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + check_file_validity (image_filename, 0, NULL, 0, 0, NO_AUDIO); + remove_file (image_filename, 0); +} + +GST_END_TEST; + + +GST_START_TEST (test_multiple_image_captures) +{ + gboolean idle; + gint i; + gint widths[] = { 800, 640, 1280 }; + gint heights[] = { 600, 480, 1024 }; + + if (!camera) + return; + + /* set still image mode */ + g_object_set (camera, "mode", 1, "location", image_filename, NULL); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + fail_unless (camera != NULL); + g_object_get (camera, "idle", &idle, NULL); + fail_unless (idle); + GST_INFO ("starting capture"); + + for (i = 0; i < 3; i++) { + GstMessage *msg; + GstCaps *caps; + + caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, + widths[i], "height", G_TYPE_INT, heights[i], NULL); + + g_object_set (camera, "image-capture-caps", caps, NULL); + gst_caps_unref (caps); + + g_signal_emit_by_name (camera, "start-capture", NULL); + + msg = wait_for_element_message (camera, "image-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + check_preview_image (camera, image_filename, i); + } + + wait_for_idle_state (); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + for (i = 0; i < 3; i++) { + check_file_validity (image_filename, i, NULL, widths[i], heights[i], + NO_AUDIO); + remove_file (image_filename, i); + } +} + +GST_END_TEST; + +GST_START_TEST (test_single_video_recording) +{ + GstMessage *msg; + gboolean idle; + if (!camera) + return; + + /* Set video recording mode */ + g_object_set (camera, "mode", 2, "location", video_filename, NULL); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + + GST_INFO ("starting capture"); + fail_unless (camera != NULL); + g_object_get (camera, "idle", &idle, NULL); + fail_unless (idle); + g_signal_emit_by_name (camera, "start-capture", NULL); + + g_object_get (camera, "idle", &idle, NULL); + fail_unless (!idle); + + /* Record for one seconds */ + g_timeout_add_seconds (VIDEO_DURATION, (GSourceFunc) g_main_loop_quit, + main_loop); + g_main_loop_run (main_loop); + + g_signal_emit_by_name (camera, "stop-capture", NULL); + + check_preview_image (camera, video_filename, 0); + + msg = wait_for_element_message (camera, "video-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + wait_for_idle_state (); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + + check_file_validity (video_filename, 0, NULL, 0, 0, WITH_AUDIO); + remove_file (video_filename, 0); + +} + +GST_END_TEST; + +GST_START_TEST (test_multiple_video_recordings) +{ + gboolean idle; + gint i; + gint widths[] = { 800, 640, 1280 }; + gint heights[] = { 600, 480, 1024 }; + gint fr[] = { 20, 30, 5 }; + + if (!camera) + return; + + /* Set video recording mode */ + g_object_set (camera, "mode", 2, "location", video_filename, NULL); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + + GST_INFO ("starting capture"); + fail_unless (camera != NULL); + g_object_get (camera, "idle", &idle, NULL); + fail_unless (idle); + for (i = 0; i < 3; i++) { + GstMessage *msg; + GstCaps *caps; + + caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, + widths[i], "height", G_TYPE_INT, heights[i], "framerate", + GST_TYPE_FRACTION, fr[i], 1, NULL); + + g_object_set (camera, "video-capture-caps", caps, NULL); + + gst_caps_unref (caps); + + GST_LOG ("starting #%d with caps %" GST_PTR_FORMAT, i, caps); + g_signal_emit_by_name (camera, "start-capture", NULL); + + g_object_get (camera, "idle", &idle, NULL); + fail_unless (!idle); + + g_timeout_add_seconds (VIDEO_DURATION, (GSourceFunc) g_main_loop_quit, + main_loop); + g_main_loop_run (main_loop); + + GST_LOG ("stopping run %d", i); + g_signal_emit_by_name (camera, "stop-capture", NULL); + + msg = wait_for_element_message (camera, "video-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + GST_LOG ("video done, checking preview image"); + check_preview_image (camera, video_filename, i); + + GST_LOG ("waiting for idle state"); + wait_for_idle_state (); + GST_LOG ("finished run %d", i); + } + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + + for (i = 0; i < 3; i++) { + check_file_validity (video_filename, i, NULL, widths[i], heights[i], + WITH_AUDIO); + remove_file (video_filename, i); + } +} + +GST_END_TEST; + +GST_START_TEST (test_image_video_cycle) +{ + gint i; + + if (!camera) + return; + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + + GST_INFO ("starting capture"); + for (i = 0; i < 2; i++) { + GstMessage *msg; + const gchar *img_filename; + const gchar *vid_filename; + + wait_for_idle_state (); + + /* take a picture */ + img_filename = make_const_file_name (image_filename, i); + g_object_set (camera, "mode", 1, NULL); + g_object_set (camera, "location", img_filename, NULL); + g_signal_emit_by_name (camera, "start-capture", NULL); + + msg = wait_for_element_message (camera, "image-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + check_preview_image (camera, img_filename, i); + + /* now go to video */ + vid_filename = make_const_file_name (video_filename, i); + g_object_set (camera, "mode", 2, NULL); + g_object_set (camera, "location", vid_filename, NULL); + + g_signal_emit_by_name (camera, "start-capture", NULL); + g_timeout_add_seconds (VIDEO_DURATION, (GSourceFunc) g_main_loop_quit, + main_loop); + g_main_loop_run (main_loop); + g_signal_emit_by_name (camera, "stop-capture", NULL); + + msg = wait_for_element_message (camera, "video-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + check_preview_image (camera, vid_filename, i); + } + + wait_for_idle_state (); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + + /* validate all the files */ + for (i = 0; i < 2; i++) { + check_file_validity (image_filename, i, NULL, 0, 0, NO_AUDIO); + remove_file (image_filename, i); + check_file_validity (video_filename, i, NULL, 0, 0, WITH_AUDIO); + remove_file (video_filename, i); + } +} + +GST_END_TEST; + + +GST_START_TEST (test_image_capture_previews) +{ + gint i; + gint widths[] = { 800, 640, 1280 }; + gint heights[] = { 600, 480, 1024 }; + + if (!camera) + return; + + /* set still image mode */ + g_object_set (camera, "mode", 1, "location", image_filename, NULL); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + fail_unless (camera != NULL); + GST_INFO ("starting capture"); + + for (i = 0; i < 3; i++) { + GstMessage *msg; + GstCaps *caps; + + caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, + widths[i], "height", G_TYPE_INT, heights[i], NULL); + + g_object_set (camera, "preview-caps", caps, NULL); + gst_caps_replace (&preview_caps, caps); + gst_caps_unref (caps); + + g_signal_emit_by_name (camera, "start-capture", NULL); + + msg = wait_for_element_message (camera, "image-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + check_preview_image (camera, image_filename, i); + remove_file (image_filename, i); + + if (preview_sample) + gst_sample_unref (preview_sample); + preview_sample = NULL; + gst_caps_replace (&preview_caps, NULL); + } + + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); +} + +GST_END_TEST; + + +GST_START_TEST (test_image_capture_with_tags) +{ + gint i; + GstTagList *taglists[3]; + + if (!camera) + return; + + taglists[0] = gst_tag_list_new (GST_TAG_COMMENT, "test1", + GST_TAG_GEO_LOCATION_LATITUDE, 36.6, GST_TAG_GEO_LOCATION_LONGITUDE, + -12.5, + GST_TAG_COPYRIGHT, "My copyright notice", + GST_TAG_DEVICE_MANUFACTURER, "MyFavoriteBrand", + GST_TAG_DEVICE_MODEL, "123v42.1", + GST_TAG_DESCRIPTION, "some description", + GST_TAG_APPLICATION_NAME, "camerabin test", + GST_TAG_GEO_LOCATION_ELEVATION, 300.85, NULL); + taglists[1] = gst_tag_list_new (GST_TAG_COMMENT, "test2", + GST_TAG_GEO_LOCATION_LATITUDE, 1.6, GST_TAG_GEO_LOCATION_LONGITUDE, + 0.0, + GST_TAG_COPYRIGHT, "some cp", + GST_TAG_DEVICE_MANUFACTURER, "ABRAND", + GST_TAG_DEVICE_MODEL, "abcd", + GST_TAG_DESCRIPTION, "desc", + GST_TAG_APPLICATION_NAME, "another cam test", + GST_TAG_GEO_LOCATION_ELEVATION, 10.0, NULL); + taglists[2] = gst_tag_list_new (GST_TAG_COMMENT, "test3", + GST_TAG_GEO_LOCATION_LATITUDE, 1.3, GST_TAG_GEO_LOCATION_LONGITUDE, + -5.0, + GST_TAG_COPYRIGHT, "CC", + GST_TAG_DEVICE_MANUFACTURER, "Homemade", + GST_TAG_DEVICE_MODEL, "xpto", + GST_TAG_DESCRIPTION, "another description", + GST_TAG_APPLICATION_NAME, "cam2 test", + GST_TAG_GEO_LOCATION_ELEVATION, 0.0, NULL); + + /* set still image mode */ + g_object_set (camera, "mode", 1, "location", image_filename, NULL); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + fail_unless (camera != NULL); + GST_INFO ("starting capture"); + + for (i = 0; i < 3; i++) { + GstMessage *msg; + gst_tag_setter_merge_tags (GST_TAG_SETTER (camera), taglists[i], + GST_TAG_MERGE_REPLACE); + + g_signal_emit_by_name (camera, "start-capture", NULL); + + msg = wait_for_element_message (camera, "image-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + } + + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + + for (i = 0; i < 3; i++) { + check_file_validity (image_filename, i, taglists[i], 0, 0, NO_AUDIO); + gst_tag_list_unref (taglists[i]); + remove_file (image_filename, i); + } +} + +GST_END_TEST; + + +GST_START_TEST (test_video_capture_with_tags) +{ + gint i; + GstTagList *taglists[3]; + + if (!camera) + return; + + taglists[0] = gst_tag_list_new (GST_TAG_COMMENT, "test1", NULL); + taglists[1] = gst_tag_list_new (GST_TAG_COMMENT, "test2", NULL); + taglists[2] = gst_tag_list_new (GST_TAG_COMMENT, "test3", NULL); + + /* set video mode */ + g_object_set (camera, "mode", 2, "location", video_filename, NULL); + + /* set a profile that has xmp support for more tags being saved */ + { + GstEncodingContainerProfile *profile; + GstCaps *caps; + + caps = + gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, + "apple", NULL); + profile = gst_encoding_container_profile_new ("qt", "jpeg+qt", caps, NULL); + gst_caps_unref (caps); + + caps = gst_caps_new_simple ("image/jpeg", NULL, NULL); + if (!gst_encoding_container_profile_add_profile (profile, + (GstEncodingProfile *) gst_encoding_video_profile_new (caps, + NULL, NULL, 1))) { + GST_WARNING_OBJECT (camera, "Failed to create encoding profiles"); + } + gst_caps_unref (caps); + + g_object_set (camera, "video-profile", profile, NULL); + gst_encoding_profile_unref (profile); + } + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + fail_unless (camera != NULL); + GST_INFO ("starting capture"); + + for (i = 0; i < 3; i++) { + GstMessage *msg; + + gst_tag_setter_merge_tags (GST_TAG_SETTER (camera), taglists[i], + GST_TAG_MERGE_REPLACE); + + g_signal_emit_by_name (camera, "start-capture", NULL); + + g_timeout_add_seconds (3, (GSourceFunc) g_main_loop_quit, main_loop); + g_main_loop_run (main_loop); + + g_signal_emit_by_name (camera, "stop-capture", NULL); + + msg = wait_for_element_message (camera, "video-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + } + + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + + for (i = 0; i < 3; i++) { + check_file_validity (video_filename, i, taglists[i], 0, 0, NO_AUDIO); + gst_tag_list_unref (taglists[i]); + remove_file (video_filename, i); + } +} + +GST_END_TEST; + + +GST_START_TEST (test_supported_caps) +{ + GstCaps *padcaps = NULL; + GstCaps *expectedcaps; + GstElement *src; + + if (!camera) + return; + + src = g_object_new (GST_TYPE_TEST_CAMERA_SRC, NULL); + g_object_set (camera, "camera-source", src, NULL); + gst_object_unref (src); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + g_assert (camera != NULL); + + expectedcaps = gst_caps_from_string (VIDEO_PAD_SUPPORTED_CAPS); + g_object_get (G_OBJECT (camera), "video-capture-supported-caps", &padcaps, + NULL); + g_assert (expectedcaps != NULL); + g_assert (padcaps != NULL); + g_assert (gst_caps_is_equal (padcaps, expectedcaps)); + gst_caps_unref (expectedcaps); + gst_caps_unref (padcaps); + + expectedcaps = gst_caps_from_string (IMAGE_PAD_SUPPORTED_CAPS); + g_object_get (G_OBJECT (camera), "image-capture-supported-caps", &padcaps, + NULL); + g_assert (expectedcaps != NULL); + g_assert (padcaps != NULL); + g_assert (gst_caps_is_equal (padcaps, expectedcaps)); + gst_caps_unref (expectedcaps); + gst_caps_unref (padcaps); + + gst_element_set_state (camera, GST_STATE_NULL); +} + +GST_END_TEST; + + +GST_START_TEST (test_idle_property) +{ + GstMessage *msg; + gboolean idle; + if (!camera) + return; + + /* Set video recording mode */ + g_object_set (camera, "mode", 2, "location", video_filename, NULL); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + + GST_INFO ("starting capture"); + fail_unless (camera != NULL); + g_object_get (camera, "idle", &idle, NULL); + fail_unless (idle); + g_signal_emit_by_name (camera, "start-capture", NULL); + g_object_get (camera, "idle", &idle, NULL); + fail_unless (!idle); + + /* emit a second start-capture that should be ignored */ + g_signal_emit_by_name (camera, "start-capture", NULL); + g_object_get (camera, "idle", &idle, NULL); + fail_unless (!idle); + + /* Record for one seconds */ + g_timeout_add_seconds (VIDEO_DURATION, (GSourceFunc) g_main_loop_quit, + main_loop); + g_main_loop_run (main_loop); + + g_signal_emit_by_name (camera, "stop-capture", NULL); + + msg = wait_for_element_message (camera, "video-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + gst_message_unref (msg); + + check_preview_image (camera, video_filename, 0); + + wait_for_idle_state (); + + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + + check_file_validity (video_filename, 0, NULL, 0, 0, WITH_AUDIO); + remove_file (video_filename, 0); +} + +GST_END_TEST; + + +GST_START_TEST (test_image_custom_filter) +{ + GstElement *vf_filter; + GstElement *image_filter; + GstElement *preview_filter; + GstPad *pad; + gint vf_probe_counter = 0; + gint image_probe_counter = 0; + gint preview_probe_counter = 0; + + if (!camera) + return; + + vf_filter = gst_element_factory_make ("identity", "vf-filter"); + image_filter = gst_element_factory_make ("identity", "img-filter"); + preview_filter = gst_element_factory_make ("identity", "preview-filter"); + + pad = gst_element_get_static_pad (vf_filter, "src"); + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, filter_buffer_count, + &vf_probe_counter, NULL); + gst_object_unref (pad); + + pad = gst_element_get_static_pad (image_filter, "src"); + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, filter_buffer_count, + &image_probe_counter, NULL); + gst_object_unref (pad); + + pad = gst_element_get_static_pad (preview_filter, "src"); + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, filter_buffer_count, + &preview_probe_counter, NULL); + gst_object_unref (pad); + + /* set still image mode and filters */ + g_object_set (camera, "mode", 1, + "location", image_filename, + "viewfinder-filter", vf_filter, "image-filter", image_filter, + "preview-filter", preview_filter, NULL); + + gst_object_unref (vf_filter); + gst_object_unref (preview_filter); + gst_object_unref (image_filter); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + GST_INFO ("starting capture"); + fail_unless (camera != NULL); + g_signal_emit_by_name (camera, "start-capture", NULL); + + g_timeout_add_seconds (3, (GSourceFunc) g_main_loop_quit, main_loop); + g_main_loop_run (main_loop); + + /* check that we got a preview image */ + check_preview_image (camera, image_filename, 0); + + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + check_file_validity (image_filename, 0, NULL, 0, 0, NO_AUDIO); + remove_file (image_filename, 0); + + fail_unless (vf_probe_counter > 0); + fail_unless (image_probe_counter == 1); + fail_unless (preview_probe_counter == 1); +} + +GST_END_TEST; + + +GST_START_TEST (test_video_custom_filter) +{ + GstElement *vf_filter; + GstElement *video_filter; + GstElement *preview_filter; + GstElement *audio_filter; + GstPad *pad; + gint vf_probe_counter = 0; + gint video_probe_counter = 0; + gint preview_probe_counter = 0; + gint audio_probe_counter = 0; + + if (!camera) + return; + + vf_filter = gst_element_factory_make ("identity", "vf-filter"); + video_filter = gst_element_factory_make ("identity", "video-filter"); + preview_filter = gst_element_factory_make ("identity", "preview-filter"); + audio_filter = gst_element_factory_make ("identity", "audio-filter"); + + pad = gst_element_get_static_pad (vf_filter, "src"); + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, filter_buffer_count, + &vf_probe_counter, NULL); + gst_object_unref (pad); + + pad = gst_element_get_static_pad (video_filter, "src"); + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, filter_buffer_count, + &video_probe_counter, NULL); + gst_object_unref (pad); + + pad = gst_element_get_static_pad (audio_filter, "src"); + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, filter_buffer_count, + &audio_probe_counter, NULL); + gst_object_unref (pad); + + pad = gst_element_get_static_pad (preview_filter, "src"); + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, filter_buffer_count, + &preview_probe_counter, NULL); + gst_object_unref (pad); + + /* set still image mode and filters */ + g_object_set (camera, "mode", 2, + "location", video_filename, + "viewfinder-filter", vf_filter, "video-filter", video_filter, + "preview-filter", preview_filter, "audio-filter", audio_filter, NULL); + + gst_object_unref (vf_filter); + gst_object_unref (preview_filter); + gst_object_unref (video_filter); + gst_object_unref (audio_filter); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + GST_INFO ("starting capture"); + fail_unless (camera != NULL); + g_signal_emit_by_name (camera, "start-capture", NULL); + + g_timeout_add_seconds (VIDEO_DURATION, (GSourceFunc) g_main_loop_quit, + main_loop); + g_main_loop_run (main_loop); + g_signal_emit_by_name (camera, "stop-capture", NULL); + + /* check that we got a preview image */ + check_preview_image (camera, video_filename, 0); + + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + check_file_validity (video_filename, 0, NULL, 0, 0, WITH_AUDIO); + remove_file (video_filename, 0); + + fail_unless (vf_probe_counter > 0); + fail_unless (video_probe_counter > 0); + fail_unless (audio_probe_counter > 0); + fail_unless (preview_probe_counter == 1); +} + +GST_END_TEST; + +#define LOCATION_SWITCHING_FILENAMES_COUNT 5 + +static gboolean +image_location_switch_do_capture (gpointer data) +{ + gchar **filenames = data; + if (capture_count >= LOCATION_SWITCHING_FILENAMES_COUNT) { + g_main_loop_quit (main_loop); + } + + g_object_set (camera, "location", filenames[capture_count], NULL); + g_signal_emit_by_name (camera, "start-capture", NULL); + capture_count++; + return FALSE; +} + +static void +image_location_switch_readyforcapture (GObject * obj, GParamSpec * pspec, + gpointer user_data) +{ + gboolean ready; + + g_object_get (obj, "ready-for-capture", &ready, NULL); + if (ready) { + g_idle_add (image_location_switch_do_capture, user_data); + } +}; + +/* + * Tests that setting the location and then doing an image + * capture will set this capture resulting filename to the + * correct location. + * + * There was a bug in which setting the location, issuing a capture + * and then setting a new location would cause this capture to have + * the location set after this capture. This test should prevent it + * from happening again. + */ +GST_START_TEST (test_image_location_switching) +{ + gchar *filenames[LOCATION_SWITCHING_FILENAMES_COUNT + 1]; + gint i; + glong notify_id; + GstCaps *caps; + GstElement *src; + GstMessage *msg; + + if (!camera) + return; + + g_object_get (camera, "camera-source", &src, NULL); + + for (i = 0; i < LOCATION_SWITCHING_FILENAMES_COUNT; i++) { + filenames[i] = make_test_file_name ("image-switching-filename-test", i); + } + filenames[LOCATION_SWITCHING_FILENAMES_COUNT] = NULL; + + /* set still image mode */ + g_object_set (camera, "mode", 1, NULL); + caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, + 800, "height", G_TYPE_INT, 600, NULL); + g_object_set (camera, "image-capture-caps", caps, NULL); + gst_caps_unref (caps); + + if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) == + GST_STATE_CHANGE_FAILURE) { + GST_WARNING ("setting camerabin to PLAYING failed"); + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + gst_object_unref (camera); + camera = NULL; + } + fail_unless (camera != NULL); + GST_INFO ("starting capture"); + + notify_id = g_signal_connect (G_OBJECT (src), + "notify::ready-for-capture", + G_CALLBACK (image_location_switch_readyforcapture), filenames); + + g_idle_add (image_location_switch_do_capture, filenames); + g_main_loop_run (main_loop); + + while (1) { + const gchar *filename; + + msg = wait_for_element_message (camera, "image-done", GST_CLOCK_TIME_NONE); + fail_unless (msg != NULL); + + filename = + gst_structure_get_string (gst_message_get_structure (msg), "filename"); + if (strcmp (filename, + filenames[LOCATION_SWITCHING_FILENAMES_COUNT - 1]) == 0) { + gst_message_unref (msg); + break; + } + gst_message_unref (msg); + } + + gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); + + for (i = 0; i < LOCATION_SWITCHING_FILENAMES_COUNT; i++) { + GST_INFO ("Checking for file: %s", filenames[i]); + fail_unless (g_file_test (filenames[i], G_FILE_TEST_IS_REGULAR)); + } + + for (i = 0; i < LOCATION_SWITCHING_FILENAMES_COUNT; i++) { + g_unlink (filenames[i]); + g_free (filenames[i]); + } + g_signal_handler_disconnect (src, notify_id); +} + +GST_END_TEST; + + +typedef struct _TestCaseDef +{ + const gchar *name; + gpointer setup_func; +} TestCaseDef; + +TestCaseDef tests[] = { + {"wrappercamerabinsrc", setup_wrappercamerabinsrc_videotestsrc} +}; + +static Suite * +camerabin_suite (void) +{ + GstElementFactory *jpegenc_factory; + Suite *s = suite_create ("camerabin"); + gint i; + TCase *tc_generic = tcase_create ("generic"); + + jpegenc_factory = gst_element_factory_find ("jpegenc"); + if (jpegenc_factory == NULL) { + GST_WARNING ("Skipping camerabin tests because jpegenc is missing"); + goto end; + } + + suite_add_tcase (s, tc_generic); + tcase_add_checked_fixture (tc_generic, setup_wrappercamerabinsrc_videotestsrc, + teardown); + tcase_add_test (tc_generic, test_supported_caps); + + for (i = 0; i < G_N_ELEMENTS (tests); i++) { + TCase *tc_basic = tcase_create (tests[i].name); + suite_add_tcase (s, tc_basic); + + /* Increase timeout due to video recording */ + tcase_set_timeout (tc_basic, 60); + tcase_add_checked_fixture (tc_basic, tests[i].setup_func, teardown); + + tcase_add_test (tc_basic, test_single_image_capture); + tcase_add_test (tc_basic, test_single_video_recording); + tcase_add_test (tc_basic, test_image_video_cycle); + if (gst_plugin_feature_check_version ((GstPluginFeature *) jpegenc_factory, + 0, 10, 27)) + tcase_add_test (tc_basic, test_multiple_image_captures); + else + GST_WARNING ("Skipping image capture test because -good 0.10.27 is " + "needed"); + tcase_add_test (tc_basic, test_multiple_video_recordings); + + tcase_add_test (tc_basic, test_image_capture_previews); + tcase_add_test (tc_basic, test_image_capture_with_tags); + + tcase_add_test (tc_basic, test_video_capture_with_tags); + + tcase_add_test (tc_basic, test_idle_property); + + tcase_add_test (tc_basic, test_image_custom_filter); + tcase_add_test (tc_basic, test_video_custom_filter); + + tcase_add_test (tc_basic, test_image_location_switching); + } + +end: + return s; +} + +GST_CHECK_MAIN (camerabin); Index: b/tests/examples/camerabin2/gst-camera2.c =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/gst-camera2.c @@ -0,0 +1,323 @@ +/* + * GStreamer + * Copyright (C) 2010 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + * This is a demo application to test the camerabin element. + * If you have question don't hesitate in contact me edgard.lima@indt.org.br + */ + +/* + * Includes + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "gst-camera2.h" + +#include + +#include +#include +#include +#include +#include +#include + +#define UI_FILE CAMERA_APPS_UIDIR G_DIR_SEPARATOR_S "gst-camera2.ui" + +static GstElement *camera; +static GtkBuilder *builder; +static GtkWidget *ui_main_window; + +typedef struct +{ + const gchar *name; + GstEncodingProfile *(*create_profile) (); +} GstCameraVideoFormat; + +static GstEncodingProfile * +create_ogg_profile (void) +{ + GstEncodingContainerProfile *container; + + container = gst_encoding_container_profile_new ("ogg", NULL, + gst_caps_new_empty_simple ("application/ogg"), NULL); + + gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *) + gst_encoding_video_profile_new (gst_caps_new_empty_simple + ("video/x-theora"), NULL, NULL, 1)); + gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *) + gst_encoding_audio_profile_new (gst_caps_new_empty_simple + ("audio/x-vorbis"), NULL, NULL, 1)); + + return (GstEncodingProfile *) container; +} + +static GstEncodingProfile * +create_webm_profile (void) +{ + GstEncodingContainerProfile *container; + + container = gst_encoding_container_profile_new ("webm", NULL, + gst_caps_new_empty_simple ("video/webm"), NULL); + + gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *) + gst_encoding_video_profile_new (gst_caps_new_empty_simple ("video/x-vp8"), + NULL, NULL, 1)); + gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *) + gst_encoding_audio_profile_new (gst_caps_new_empty_simple + ("audio/x-vorbis"), NULL, NULL, 1)); + + return (GstEncodingProfile *) container; +} + +static GstEncodingProfile * +create_mp4_profile (void) +{ + GstEncodingContainerProfile *container; + + container = gst_encoding_container_profile_new ("mp4", NULL, + gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, "iso", + NULL), NULL); + + gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *) + gst_encoding_video_profile_new (gst_caps_new_empty_simple + ("video/x-h264"), NULL, NULL, 1)); + gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *) + gst_encoding_audio_profile_new (gst_caps_new_simple ("audio/mpeg", + "version", G_TYPE_INT, 4, NULL), NULL, NULL, 1)); + + return (GstEncodingProfile *) container; +} + +GstCameraVideoFormat formats[] = { + {"ogg (theora/vorbis)", create_ogg_profile} + , + {"webm (vp8/vorbis)", create_webm_profile} + , + {"mp4 (h264+aac)", create_mp4_profile} + , + {NULL, NULL} +}; + +void +on_mainWindow_delete_event (GtkWidget * widget, GdkEvent * event, gpointer data) +{ + gtk_main_quit (); +} + +void +on_captureButton_clicked (GtkButton * button, gpointer user_data) +{ + g_signal_emit_by_name (camera, "start-capture", NULL); +} + +void +on_stopCaptureButton_clicked (GtkButton * button, gpointer user_data) +{ + g_signal_emit_by_name (camera, "stop-capture", NULL); +} + +void +on_imageRButton_toggled (GtkToggleButton * button, gpointer user_data) +{ + if (gtk_toggle_button_get_active (button)) { + g_object_set (camera, "mode", 1, NULL); /* Image mode */ + } +} + +void +on_videoRButton_toggled (GtkToggleButton * button, gpointer user_data) +{ + if (gtk_toggle_button_get_active (button)) { + g_object_set (camera, "mode", 2, NULL); /* Video mode */ + } +} + +void +on_viewfinderArea_realize (GtkWidget * widget, gpointer data) +{ +#if GTK_CHECK_VERSION (2, 18, 0) + gdk_window_ensure_native (gtk_widget_get_window (widget)); +#endif +} + +void +on_formatComboBox_changed (GtkWidget * widget, gpointer data) +{ + GstEncodingProfile *profile = NULL; + gint index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); + + if (formats[index].create_profile) { + profile = formats[index].create_profile (); + } + + g_return_if_fail (profile != NULL); + gst_element_set_state (camera, GST_STATE_NULL); + g_object_set (camera, "video-profile", profile, NULL); + gst_encoding_profile_unref (profile); + + if (GST_STATE_CHANGE_FAILURE == gst_element_set_state (camera, + GST_STATE_PLAYING)) { + GtkWidget *dialog = + gtk_message_dialog_new (GTK_WINDOW (ui_main_window), GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + "Could not initialize camerabin with the " + "selected format. Your system might not have the required plugins installed.\n" + "Please select another format."); + + gtk_dialog_run (GTK_DIALOG (dialog)); + + gtk_widget_destroy (dialog); + } +} + +static GstBusSyncReply +bus_sync_callback (GstBus * bus, GstMessage * message, gpointer data) +{ + GtkWidget *ui_drawing; + + if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) + return GST_BUS_PASS; + + if (!gst_message_has_name (message, "prepare-window-handle")) + return GST_BUS_PASS; + + /* FIXME: make sure to get XID in main thread */ + ui_drawing = GTK_WIDGET (gtk_builder_get_object (builder, "viewfinderArea")); + gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (message->src), +#if GTK_CHECK_VERSION (2, 91, 6) + GDK_WINDOW_XID (gtk_widget_get_window (ui_drawing))); +#else + GDK_WINDOW_XWINDOW (gtk_widget_get_window (ui_drawing))); +#endif + + gst_message_unref (message); + return GST_BUS_DROP; +} + + +static gboolean +bus_callback (GstBus * bus, GstMessage * message, gpointer data) +{ + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_WARNING:{ + GError *err; + gchar *debug; + + gst_message_parse_warning (message, &err, &debug); + g_print ("Warning: %s\n", err->message); + g_error_free (err); + g_free (debug); + break; + } + case GST_MESSAGE_ERROR:{ + GError *err = NULL; + gchar *debug = NULL; + + gst_message_parse_error (message, &err, &debug); + g_print ("Error: %s : %s\n", err->message, debug); + g_error_free (err); + g_free (debug); + + gtk_main_quit (); + break; + } + case GST_MESSAGE_EOS: + /* end-of-stream */ + g_print ("Eos\n"); + gtk_main_quit (); + break; + case GST_MESSAGE_ELEMENT: + { + //handle_element_message (message); + break; + } + default: + /* unhandled message */ + break; + } + return TRUE; +} + +static gboolean +init_gtkwidgets_data (void) +{ +#if GTK_CHECK_VERSION(2,24,0) + gint i; + GtkComboBoxText *combobox = + GTK_COMBO_BOX_TEXT (gtk_builder_get_object (builder, "formatComboBox")); + + /* init formats combobox */ + i = 0; + while (formats[i].name) { + gtk_combo_box_text_append_text (combobox, formats[i].name); + i++; + } + + /* default to the first one -> ogg */ + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); + return TRUE; +#else + g_warning ("This needs a newer version of GTK (2.24 at least)"); + return FALSE; +#endif +} + +int +main (int argc, char *argv[]) +{ + int ret = 0; + GError *error = NULL; + GstBus *bus; + + gst_init (&argc, &argv); + gtk_init (&argc, &argv); + + builder = gtk_builder_new (); + if (!gtk_builder_add_from_file (builder, UI_FILE, &error)) { + g_warning ("Error: %s", error->message); + g_error_free (error); + return 1; + } + + camera = gst_element_factory_make ("camerabin", "camera"); + bus = gst_pipeline_get_bus (GST_PIPELINE (camera)); + gst_bus_add_watch (bus, bus_callback, NULL); + gst_bus_set_sync_handler (bus, bus_sync_callback, NULL, NULL); + gst_object_unref (bus); + + if (!init_gtkwidgets_data ()) { + goto error; + } + + ui_main_window = GTK_WIDGET (gtk_builder_get_object (builder, "mainWindow")); + gtk_builder_connect_signals (builder, NULL); + gtk_widget_show_all (ui_main_window); + + gst_element_set_state (camera, GST_STATE_PLAYING); + + gtk_main (); + +error: + gst_element_set_state (camera, GST_STATE_NULL); + gst_object_unref (camera); + return ret; +} Index: b/tests/examples/camerabin2/gst-camera2.h =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/gst-camera2.h @@ -0,0 +1,51 @@ +/* + * GStreamer + * Copyright (C) 2008 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + * This is a demo application to test the camerabin element. + * If you have question don't hesitate in contact me edgard.lima@indt.org.br + */ + +#ifndef __GST_CAMERA_BIN_H__ +#define __GST_CAMERA_BIN_H__ + +#include + +void +on_mainWindow_delete_event (GtkWidget * widget, GdkEvent * event, gpointer data); + +void +on_captureButton_clicked (GtkButton * button, gpointer user_data); + +void +on_stopCaptureButton_clicked (GtkButton * button, gpointer user_data); + +void +on_imageRButton_toggled (GtkToggleButton * button, gpointer user_data); + +void +on_videoRButton_toggled (GtkToggleButton * button, gpointer user_data); + +void +on_viewfinderArea_realize (GtkWidget * widget, gpointer data); + +void +on_formatComboBox_changed (GtkWidget * widget, gpointer data); + +#endif /* __GST_CAMERA_BIN_H__ */ Index: b/tests/examples/camerabin2/gst-camera2.ui =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/gst-camera2.ui @@ -0,0 +1,167 @@ + + + + + False + 800 + 600 + + + + True + False + + + True + False + + + Image + False + True + True + False + False + True + True + + + + True + True + 0 + + + + + Video + False + True + True + False + False + True + True + imageRButton + + + + True + True + 1 + + + + + False + False + 0 + + + + + True + False + + + True + False + + + + True + True + 0 + + + + + True + False + + + True + False + Actions + + + False + True + 0 + + + + + Capture + False + True + True + True + False + + + + False + False + 1 + + + + + Stop Capture + False + True + True + True + False + + + + False + False + 2 + + + + + True + False + Video format + + + False + True + 5 + 3 + + + + + True + False + + + + False + True + 4 + + + + + False + False + 1 + + + + + True + True + 1 + + + + + + Index: b/tests/examples/camerabin2/gst-camerabin2-test.c =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/gst-camerabin2-test.c @@ -0,0 +1,1326 @@ +/* + * GStreamer + * Copyright (C) 2010 Nokia Corporation + * Copyright (C) 2011 Thiago Santos + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + /* + TODO review + Examples: + ./gst-camerabin2-test --image-width=2048 --image-height=1536 + ./gst-camerabin2-test --mode=2 --capture-time=10 --image-width=848 --image-height=480 --view-framerate-num=2825 \ + --view-framerate-den=100 + + gst-camerabin2-test --help + Usage: + gst-camerabin2-test [OPTION...] + + camerabin command line test application. + + Help Options: + -h, --help Show help options + --help-all Show all help options + --help-gst Show GStreamer Options + + Application Options: + --ev-compensation EV compensation (-2.5..2.5, default = 0) + --aperture Aperture (size of lens opening, default = 0 (auto)) + --flash-mode Flash mode (default = 0 (auto)) + --scene-mode Scene mode (default = 6 (auto)) + --exposure Exposure (default = 0 (auto)) + --iso-speed ISO speed (default = 0 (auto)) + --white-balance-mode White balance mode (default = 0 (auto)) + --colour-tone-mode Colour tone mode (default = 0 (auto)) + --directory Directory for capture file(s) (default is current directory) + --mode Capture mode (default = 0 (image), 1 = video) + --capture-time Time to capture video in seconds (default = 10) + --capture-total Total number of captures to be done (default = 1) + --zoom Zoom (100 = 1x (default), 200 = 2x etc.) + --wrapper-source Camera source wrapper used for setting the video source + --video-source Video source used in still capture and video recording + --video-device Video device to be set on the video source (e.g. /dev/video0) + --audio-source Audio source used in video recording + --image-pp List of image post-processing elements separated with comma + --viewfinder-sink Viewfinder sink (default = fakesink) + --image-width Width for capture (only used if the caps + arguments aren't set) + --image-height Height for capture (only used if the caps + arguments aren't set) + --view-framerate-num Framerate numerator for viewfinder + --view-framerate-den Framerate denominator for viewfinder + --preview-caps Preview caps (e.g. video/x-raw-rgb,width=320,height=240) + --viewfinder-filter Filter to process all frames going to viewfinder sink + --x-width X window width (default = 320) + --x-height X window height (default = 240) + --no-xwindow Do not create XWindow + --encoding-target Video encoding target name + --encoding-profile Video encoding profile name + --encoding-profile-filename Video encoding profile filename + --image-capture-caps Image capture caps (e.g. video/x-raw-rgb,width=640,height=480) + --viewfinder-caps Viewfinder caps (e.g. video/x-raw-rgb,width=640,height=480) + --video-capture-caps Video capture caps (e.g. video/x-raw-rgb,width=640,height=480) + --performance-measure Collect timing information about the + captures and provides performance statistics at the end + --performance-targets A list of doubles that are the performance target + times for each of the measured timestamps. The order is + startup time, change mode time, shot to save, shot to snapshot, + shot to shot, preview to precapture, shot to buffer. + e.g. 3.5,1.0,5.0,2.5,5.0,1.5,1.0 + * Startup time -> time it takes for camerabin to reach playing + * Change mode time -> time it takes for camerabin to change to the selected + mode in playing + * Shot to save -> time it takes from start-capture to having the image saved + to disk + * Shot to snapshot -> time it takes from start-capture to getting a snapshot + * Shot to shot -> time from one start-capture to the next one + * Preview to precapture -> time it takes from getting the snapshot to the + next buffer that reaches the viewfinder + * Shot to buffer -> time it takes from start-capture to the moment a buffer + is pushed out of the camera source + + */ + +/* + * Includes + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#define GST_USE_UNSTABLE_API 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +/* + * debug logging + */ +GST_DEBUG_CATEGORY_STATIC (camerabin_test); +#define GST_CAT_DEFAULT camerabin_test + +#define TIME_DIFF(a,b) ((((gint64)(a)) - ((gint64)(b))) / (gdouble) GST_SECOND) + +#define TIME_FORMAT "02d.%09u" +#define TIMEDIFF_FORMAT "0.6lf" + +#define TIME_ARGS(t) \ + (GST_CLOCK_TIME_IS_VALID (t) && (t) < 99 * GST_SECOND) ? \ + (gint) ((((GstClockTime)(t)) / GST_SECOND) % 60) : 99, \ + (GST_CLOCK_TIME_IS_VALID (t) && ((t) < 99 * GST_SECOND)) ? \ + (guint) (((GstClockTime)(t)) % GST_SECOND) : 999999999 + +#define TIMEDIFF_ARGS(t) (t) + +typedef struct _CaptureTiming +{ + GstClockTime start_capture; + GstClockTime got_preview; + GstClockTime capture_done; + GstClockTime precapture; + GstClockTime camera_capture; +} CaptureTiming; + +typedef struct _CaptureTimingStats +{ + GstClockTime shot_to_shot; + GstClockTime shot_to_save; + GstClockTime shot_to_snapshot; + GstClockTime preview_to_precapture; + GstClockTime shot_to_buffer; +} CaptureTimingStats; + +static void +capture_timing_stats_add (CaptureTimingStats * a, CaptureTimingStats * b) +{ + a->shot_to_shot += b->shot_to_shot; + a->shot_to_snapshot += b->shot_to_snapshot; + a->shot_to_save += b->shot_to_save; + a->preview_to_precapture += b->preview_to_precapture; + a->shot_to_buffer += b->shot_to_buffer; +} + +static void +capture_timing_stats_div (CaptureTimingStats * stats, gint div) +{ + stats->shot_to_shot /= div; + stats->shot_to_snapshot /= div; + stats->shot_to_save /= div; + stats->preview_to_precapture /= div; + stats->shot_to_buffer /= div; +} + +#define PRINT_STATS(d,s) g_print ("%02d | %" TIME_FORMAT " | %" \ + TIME_FORMAT " | %" TIME_FORMAT " | %" TIME_FORMAT \ + " | %" TIME_FORMAT "\n", d, \ + TIME_ARGS ((s)->shot_to_save), TIME_ARGS ((s)->shot_to_snapshot), \ + TIME_ARGS ((s)->shot_to_shot), \ + TIME_ARGS ((s)->preview_to_precapture), \ + TIME_ARGS ((s)->shot_to_buffer)) + +#define SHOT_TO_SAVE(t) ((t)->capture_done - (t)->start_capture) +#define SHOT_TO_SNAPSHOT(t) ((t)->got_preview - (t)->start_capture) +#define PREVIEW_TO_PRECAPTURE(t) ((t)->precapture - (t)->got_preview) +#define SHOT_TO_BUFFER(t) ((t)->camera_capture - (t)->start_capture) + +/* + * Global vars + */ +static GstElement *camerabin = NULL; +static GstElement *viewfinder_sink = NULL; +static gulong camera_probe_id = 0; +static gulong viewfinder_probe_id = 0; +static GMainLoop *loop = NULL; + +/* commandline options */ +static gchar *videosrc_name = NULL; +static gchar *videodevice_name = NULL; +static gchar *audiosrc_name = NULL; +static gchar *wrappersrc_name = NULL; +static gchar *imagepp_name = NULL; +static gchar *vfsink_name = NULL; +static gint image_width = 0; +static gint image_height = 0; +static gint view_framerate_num = 0; +static gint view_framerate_den = 0; +static gboolean no_xwindow = FALSE; +static gchar *gep_targetname = NULL; +static gchar *gep_profilename = NULL; +static gchar *gep_filename = NULL; +static gchar *image_capture_caps_str = NULL; +static gchar *viewfinder_caps_str = NULL; +static gchar *video_capture_caps_str = NULL; +static gchar *audio_capture_caps_str = NULL; +static gboolean performance_measure = FALSE; +static gchar *performance_targets_str = NULL; +static gchar *camerabin_flags = NULL; + + +#define MODE_VIDEO 2 +#define MODE_IMAGE 1 +static gint mode = MODE_IMAGE; +static gint zoom = 100; + +static gint capture_time = 10; +static gint capture_count = 0; +static gint capture_total = 1; +static gulong stop_capture_cb_id = 0; + +/* photography interface command line options */ +#define EV_COMPENSATION_NONE -G_MAXFLOAT +#define APERTURE_NONE -G_MAXINT +#define FLASH_MODE_NONE -G_MAXINT +#define SCENE_MODE_NONE -G_MAXINT +#define EXPOSURE_NONE -G_MAXINT64 +#define ISO_SPEED_NONE -G_MAXINT +#define WHITE_BALANCE_MODE_NONE -G_MAXINT +#define COLOR_TONE_MODE_NONE -G_MAXINT +static gfloat ev_compensation = EV_COMPENSATION_NONE; +static gint aperture = APERTURE_NONE; +static gint flash_mode = FLASH_MODE_NONE; +static gint scene_mode = SCENE_MODE_NONE; +static gint64 exposure = EXPOSURE_NONE; +static gint iso_speed = ISO_SPEED_NONE; +static gint wb_mode = WHITE_BALANCE_MODE_NONE; +static gint color_mode = COLOR_TONE_MODE_NONE; + +static gchar *viewfinder_filter = NULL; + +static int x_width = 320; +static int x_height = 240; + +/* test configuration for common callbacks */ +static GString *filename = NULL; + +static gchar *preview_caps_name = NULL; + +/* X window variables */ +static Display *display = NULL; +static Window window = 0; + +/* timing data */ +static GstClockTime initial_time = 0; +static GstClockTime startup_time = 0; +static GstClockTime change_mode_before = 0; +static GstClockTime change_mode_after = 0; +static GList *capture_times = NULL; + +static GstClockTime target_startup; +static GstClockTime target_change_mode; +static GstClockTime target_shot_to_shot; +static GstClockTime target_shot_to_save; +static GstClockTime target_shot_to_snapshot; +static GstClockTime target_preview_to_precapture; +static GstClockTime target_shot_to_buffer; + + +/* + * Prototypes + */ +static gboolean run_pipeline (gpointer user_data); +static void set_metadata (GstElement * camera); + +static void +create_host_window (void) +{ + unsigned long valuemask; + XSetWindowAttributes attributes; + + display = XOpenDisplay (NULL); + if (display) { + window = + XCreateSimpleWindow (display, DefaultRootWindow (display), 0, 0, + x_width, x_height, 0, 0, 0); + if (window) { + valuemask = CWOverrideRedirect; + attributes.override_redirect = True; + XChangeWindowAttributes (display, window, valuemask, &attributes); + XSetWindowBackgroundPixmap (display, window, None); + XMapRaised (display, window); + XSync (display, FALSE); + } else { + GST_DEBUG ("could not create X window!"); + } + } else { + GST_DEBUG ("could not open display!"); + } +} + +static GstPadProbeReturn +camera_src_get_timestamp_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer udata) +{ + CaptureTiming *timing; + + timing = (CaptureTiming *) g_list_first (capture_times)->data; + timing->camera_capture = gst_util_get_timestamp (); + + return GST_PAD_PROBE_REMOVE; +} + +static GstPadProbeReturn +viewfinder_get_timestamp_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer udata) +{ + CaptureTiming *timing; + + timing = (CaptureTiming *) g_list_first (capture_times)->data; + timing->precapture = gst_util_get_timestamp (); + + return GST_PAD_PROBE_REMOVE; +} + +static GstBusSyncReply +sync_bus_callback (GstBus * bus, GstMessage * message, gpointer data) +{ + const GstStructure *st; + const GValue *image; + GstBuffer *buf = NULL; + gchar *preview_filename = NULL; + FILE *f = NULL; + size_t written; + + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ELEMENT:{ + st = gst_message_get_structure (message); + if (st) { + if (gst_message_has_name (message, "prepare-xwindow-id")) { + if (!no_xwindow && window) { + gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY + (GST_MESSAGE_SRC (message)), window); + gst_message_unref (message); + message = NULL; + return GST_BUS_DROP; + } + } else if (gst_structure_has_name (st, "preview-image")) { + CaptureTiming *timing; + + GST_DEBUG ("preview-image"); + + timing = (CaptureTiming *) g_list_first (capture_times)->data; + timing->got_preview = gst_util_get_timestamp (); + + { + /* set up probe to check when the viewfinder gets data */ + GstPad *pad = gst_element_get_static_pad (viewfinder_sink, "sink"); + + viewfinder_probe_id = + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, + viewfinder_get_timestamp_probe, NULL, NULL); + + gst_object_unref (pad); + } + + /* extract preview-image from msg */ + image = gst_structure_get_value (st, "buffer"); + if (image) { + buf = gst_value_get_buffer (image); + preview_filename = g_strdup_printf ("test_vga.rgb"); + f = g_fopen (preview_filename, "w"); + if (f) { + GstMapInfo map; + + gst_buffer_map (buf, &map, GST_MAP_READ); + written = fwrite (map.data, map.size, 1, f); + gst_buffer_unmap (buf, &map); + if (!written) { + g_print ("error writing file\n"); + } + fclose (f); + } else { + g_print ("error opening file for raw image writing\n"); + } + g_free (preview_filename); + } + } + } + break; + } + case GST_MESSAGE_STATE_CHANGED: + if (GST_MESSAGE_SRC (message) == (GstObject *) camerabin) { + GstState newstate; + + gst_message_parse_state_changed (message, NULL, &newstate, NULL); + if (newstate == GST_STATE_PLAYING) { + startup_time = gst_util_get_timestamp (); + } + } + break; + default: + /* unhandled message */ + break; + } + return GST_BUS_PASS; +} + +static gboolean +bus_callback (GstBus * bus, GstMessage * message, gpointer data) +{ + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ERROR:{ + GError *err; + gchar *debug; + + gst_message_parse_error (message, &err, &debug); + g_print ("Error: %s\n", err->message); + g_error_free (err); + g_free (debug); + + /* Write debug graph to file */ + GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (camerabin), + GST_DEBUG_GRAPH_SHOW_ALL, "camerabin.error"); + + g_main_loop_quit (loop); + break; + } + case GST_MESSAGE_STATE_CHANGED: + if (GST_IS_BIN (GST_MESSAGE_SRC (message))) { + GstState oldstate, newstate; + + gst_message_parse_state_changed (message, &oldstate, &newstate, NULL); + GST_DEBUG_OBJECT (GST_MESSAGE_SRC (message), "state-changed: %s -> %s", + gst_element_state_get_name (oldstate), + gst_element_state_get_name (newstate)); + } + break; + case GST_MESSAGE_EOS: + /* end-of-stream */ + GST_INFO ("got eos() - should not happen"); + g_main_loop_quit (loop); + break; + case GST_MESSAGE_ELEMENT: + if (GST_MESSAGE_SRC (message) == (GstObject *) camerabin) { + const GstStructure *structure = gst_message_get_structure (message); + + if (gst_structure_has_name (structure, "image-done")) { + CaptureTiming *timing; +#ifndef GST_DISABLE_GST_DEBUG + const gchar *fname = gst_structure_get_string (structure, "filename"); + + GST_DEBUG ("image done: %s", fname); +#endif + timing = (CaptureTiming *) g_list_first (capture_times)->data; + timing->capture_done = gst_util_get_timestamp (); + + if (capture_count < capture_total) { + g_idle_add ((GSourceFunc) run_pipeline, NULL); + } else { + g_main_loop_quit (loop); + } + } + } + break; + default: + /* unhandled message */ + break; + } + return TRUE; +} + +/* + * Helpers + */ + +static void +cleanup_pipeline (void) +{ + if (camerabin) { + GST_INFO_OBJECT (camerabin, "stopping and destroying"); + gst_element_set_state (camerabin, GST_STATE_NULL); + gst_object_unref (camerabin); + camerabin = NULL; + } +} + +static GstElement * +create_ipp_bin (void) +{ + GstElement *bin = NULL, *element = NULL; + GstPad *pad = NULL; + gchar **elements; + GList *element_list = NULL, *current = NULL, *next = NULL; + int i; + + bin = gst_bin_new ("ippbin"); + + elements = g_strsplit (imagepp_name, ",", 0); + + for (i = 0; elements[i] != NULL; i++) { + element = gst_element_factory_make (elements[i], NULL); + if (element) { + element_list = g_list_append (element_list, element); + gst_bin_add (GST_BIN (bin), element); + } else + GST_WARNING ("Could create element %s for ippbin", elements[i]); + } + + for (i = 1; i < g_list_length (element_list); i++) { + current = g_list_nth (element_list, i - 1); + next = g_list_nth (element_list, i); + gst_element_link (current->data, next->data); + } + + current = g_list_first (element_list); + pad = gst_element_get_static_pad (current->data, "sink"); + gst_element_add_pad (bin, gst_ghost_pad_new ("sink", pad)); + gst_object_unref (GST_OBJECT (pad)); + + current = g_list_last (element_list); + pad = gst_element_get_static_pad (current->data, "src"); + gst_element_add_pad (bin, gst_ghost_pad_new ("src", pad)); + gst_object_unref (GST_OBJECT (pad)); + + g_list_free (element_list); + g_strfreev (elements); + + return bin; +} + +static GstEncodingProfile * +load_encoding_profile (void) +{ + GstEncodingProfile *prof = NULL; + GstEncodingTarget *target = NULL; + GError *error = NULL; + + /* if profile file was given, try to load profile from there */ + if (gep_filename && gep_profilename) { + target = gst_encoding_target_load_from_file (gep_filename, &error); + if (!target) { + GST_WARNING ("Could not load target %s from file %s", gep_targetname, + gep_filename); + if (error) { + GST_WARNING ("Error from file loading: %s", error->message); + g_error_free (error); + error = NULL; + } + } else { + prof = gst_encoding_target_get_profile (target, gep_profilename); + if (prof) + GST_DEBUG ("Loaded encoding profile %s from %s", gep_profilename, + gep_filename); + else + GST_WARNING + ("Could not load specified encoding profile %s from file %s", + gep_profilename, gep_filename); + } + /* if we could not load profile from file then try to find one from system */ + } else if (gep_profilename && gep_targetname) { + prof = gst_encoding_profile_find (gep_targetname, gep_profilename, NULL); + if (prof) + GST_DEBUG ("Loaded encoding profile %s from target %s", gep_profilename, + gep_targetname); + } else + GST_DEBUG + ("Encoding profile not set, using camerabin default encoding profile"); + + return prof; +} + +static gboolean +setup_pipeline_element (GstElement * element, const gchar * property_name, + const gchar * element_name, GstElement ** res_elem) +{ + gboolean res = TRUE; + GstElement *elem = NULL; + + if (element_name) { + GError *error = NULL; + + elem = gst_parse_launch (element_name, &error); + if (elem) { + g_object_set (element, property_name, elem, NULL); + } else { + GST_WARNING ("can't create element '%s' for property '%s'", element_name, + property_name); + if (error) { + GST_ERROR ("%s", error->message); + g_error_free (error); + } + res = FALSE; + } + } else { + GST_DEBUG ("no element for property '%s' given", property_name); + } + if (res_elem) + *res_elem = elem; + return res; +} + +static void +set_camerabin_caps_from_string (void) +{ + GstCaps *caps = NULL; + if (image_capture_caps_str != NULL) { + caps = gst_caps_from_string (image_capture_caps_str); + if (GST_CAPS_IS_SIMPLE (caps) && image_width > 0 && image_height > 0) { + gst_caps_set_simple (caps, "width", G_TYPE_INT, image_width, "height", + G_TYPE_INT, image_height, NULL); + } + GST_DEBUG ("setting image-capture-caps: %" GST_PTR_FORMAT, caps); + g_object_set (camerabin, "image-capture-caps", caps, NULL); + gst_caps_unref (caps); + } + + if (viewfinder_caps_str != NULL) { + caps = gst_caps_from_string (viewfinder_caps_str); + if (GST_CAPS_IS_SIMPLE (caps) && view_framerate_num > 0 + && view_framerate_den > 0) { + gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION, + view_framerate_num, view_framerate_den, NULL); + } + GST_DEBUG ("setting viewfinder-caps: %" GST_PTR_FORMAT, caps); + g_object_set (camerabin, "viewfinder-caps", caps, NULL); + gst_caps_unref (caps); + } + + if (video_capture_caps_str != NULL) { + caps = gst_caps_from_string (video_capture_caps_str); + GST_DEBUG ("setting video-capture-caps: %" GST_PTR_FORMAT, caps); + g_object_set (camerabin, "video-capture-caps", caps, NULL); + gst_caps_unref (caps); + } + + if (audio_capture_caps_str != NULL) { + caps = gst_caps_from_string (audio_capture_caps_str); + GST_DEBUG ("setting audio-capture-caps: %" GST_PTR_FORMAT, caps); + g_object_set (camerabin, "audio-capture-caps", caps, NULL); + gst_caps_unref (caps); + } +} + +static gboolean +setup_pipeline (void) +{ + gboolean res = TRUE; + GstBus *bus; + GstElement *sink = NULL, *ipp = NULL; + GstEncodingProfile *prof = NULL; + + initial_time = gst_util_get_timestamp (); + + camerabin = gst_element_factory_make ("camerabin", NULL); + if (NULL == camerabin) { + g_warning ("can't create camerabin element\n"); + goto error; + } + + bus = gst_pipeline_get_bus (GST_PIPELINE (camerabin)); + /* Add sync handler for time critical messages that need to be handled fast */ + gst_bus_set_sync_handler (bus, sync_bus_callback, NULL, NULL); + /* Handle normal messages asynchronously */ + gst_bus_add_watch (bus, bus_callback, NULL); + gst_object_unref (bus); + + GST_INFO_OBJECT (camerabin, "camerabin created"); + + if (camerabin_flags) + gst_util_set_object_arg (G_OBJECT (camerabin), "flags", camerabin_flags); + else + gst_util_set_object_arg (G_OBJECT (camerabin), "flags", ""); + + if (videosrc_name) { + GstElement *wrapper; + GstElement *videosrc; + + if (wrappersrc_name) + wrapper = gst_element_factory_make (wrappersrc_name, NULL); + else + wrapper = gst_element_factory_make ("wrappercamerabinsrc", NULL); + + if (setup_pipeline_element (wrapper, "video-source", videosrc_name, NULL)) { + g_object_set (camerabin, "camera-source", wrapper, NULL); + } else { + GST_WARNING ("Failed to set videosrc to %s", videosrc_name); + } + + g_object_get (wrapper, "video-source", &videosrc, NULL); + if (videosrc && videodevice_name && + g_object_class_find_property (G_OBJECT_GET_CLASS (videosrc), + "device")) { + g_object_set (videosrc, "device", videodevice_name, NULL); + } + } + + /* configure used elements */ + res &= + setup_pipeline_element (camerabin, "audio-source", audiosrc_name, NULL); + res &= + setup_pipeline_element (camerabin, "viewfinder-sink", vfsink_name, &sink); + res &= + setup_pipeline_element (camerabin, "viewfinder-filter", viewfinder_filter, + NULL); + + if (imagepp_name) { + ipp = create_ipp_bin (); + if (ipp) + g_object_set (camerabin, "image-filter", ipp, NULL); + else + GST_WARNING ("Could not create ipp elements"); + } + + prof = load_encoding_profile (); + if (prof) + g_object_set (G_OBJECT (camerabin), "video-profile", prof, NULL); + + GST_INFO_OBJECT (camerabin, "elements created"); + + if (sink) { + g_object_set (sink, "sync", TRUE, NULL); + } else { + /* Get the inner viewfinder sink, this uses fixed names given + * by default in camerabin */ + sink = gst_bin_get_by_name (GST_BIN (camerabin), "vf-bin"); + g_assert (sink); + gst_object_unref (sink); + + sink = gst_bin_get_by_name (GST_BIN (sink), "vfbin-sink"); + g_assert (sink); + gst_object_unref (sink); + } + viewfinder_sink = sink; + + GST_INFO_OBJECT (camerabin, "elements configured"); + + /* configure a resolution and framerate */ + if (image_width > 0 && image_height > 0) { + if (mode == MODE_VIDEO) { + GstCaps *caps = NULL; + if (view_framerate_num > 0) + caps = gst_caps_new_full (gst_structure_new ("video/x-raw-yuv", + "width", G_TYPE_INT, image_width, + "height", G_TYPE_INT, image_height, + "framerate", GST_TYPE_FRACTION, view_framerate_num, + view_framerate_den, NULL), + gst_structure_new ("video/x-raw-rgb", + "width", G_TYPE_INT, image_width, + "height", G_TYPE_INT, image_height, + "framerate", GST_TYPE_FRACTION, view_framerate_num, + view_framerate_den, NULL), NULL); + else + caps = gst_caps_new_full (gst_structure_new ("video/x-raw-yuv", + "width", G_TYPE_INT, image_width, + "height", G_TYPE_INT, image_height, NULL), + gst_structure_new ("video/x-raw-rgb", + "width", G_TYPE_INT, image_width, + "height", G_TYPE_INT, image_height, NULL), NULL); + + g_object_set (camerabin, "video-capture-caps", caps, NULL); + gst_caps_unref (caps); + } else { + GstCaps *caps = gst_caps_new_full (gst_structure_new ("video/x-raw-yuv", + "width", G_TYPE_INT, image_width, + "height", G_TYPE_INT, image_height, NULL), + gst_structure_new ("video/x-raw-rgb", + "width", G_TYPE_INT, image_width, + "height", G_TYPE_INT, image_height, NULL), NULL); + + g_object_set (camerabin, "image-capture-caps", caps, NULL); + gst_caps_unref (caps); + } + } + + set_camerabin_caps_from_string (); + + /* change to the wrong mode if timestamping if performance mode is on so + * we can change it back and measure the time after in playing */ + if (performance_measure) { + g_object_set (camerabin, "mode", + mode == MODE_VIDEO ? MODE_IMAGE : MODE_VIDEO, NULL); + } + + if (GST_STATE_CHANGE_FAILURE == + gst_element_set_state (camerabin, GST_STATE_READY)) { + g_warning ("can't set camerabin to ready\n"); + goto error; + } + GST_INFO_OBJECT (camerabin, "camera ready"); + + if (GST_STATE_CHANGE_FAILURE == + gst_element_set_state (camerabin, GST_STATE_PLAYING)) { + g_warning ("can't set camerabin to playing\n"); + goto error; + } + + GST_INFO_OBJECT (camerabin, "camera started"); + + /* do the mode change timestamping if performance mode is on */ + if (performance_measure) { + change_mode_before = gst_util_get_timestamp (); + g_object_set (camerabin, "mode", mode, NULL); + change_mode_after = gst_util_get_timestamp (); + } + + return TRUE; +error: + cleanup_pipeline (); + return FALSE; +} + +static void +stop_capture_cb (GObject * self, GParamSpec * pspec, gpointer user_data) +{ + gboolean idle = FALSE; + + g_object_get (camerabin, "idle", &idle, NULL); + + if (idle) { + if (capture_count < capture_total) { + g_idle_add ((GSourceFunc) run_pipeline, NULL); + } else { + g_main_loop_quit (loop); + } + } + + g_signal_handler_disconnect (camerabin, stop_capture_cb_id); +} + +static gboolean +stop_capture (gpointer user_data) +{ + stop_capture_cb_id = g_signal_connect (camerabin, "notify::idle", + (GCallback) stop_capture_cb, camerabin); + g_signal_emit_by_name (camerabin, "stop-capture", 0); + return FALSE; +} + +static void +set_metadata (GstElement * camera) +{ + GstTagSetter *setter = GST_TAG_SETTER (camera); + GstDateTime *datetime; + gchar *desc_str; + + datetime = gst_date_time_new_now_local_time (); + + desc_str = g_strdup_printf ("captured by %s", g_get_real_name ()); + + gst_tag_setter_add_tags (setter, GST_TAG_MERGE_REPLACE, + GST_TAG_DATE_TIME, datetime, + GST_TAG_DESCRIPTION, desc_str, + GST_TAG_TITLE, "gst-camerabin-test capture", + GST_TAG_GEO_LOCATION_LONGITUDE, 1.0, + GST_TAG_GEO_LOCATION_LATITUDE, 2.0, + GST_TAG_GEO_LOCATION_ELEVATION, 3.0, + GST_TAG_DEVICE_MANUFACTURER, "gst-camerabin-test manufacturer", + GST_TAG_DEVICE_MODEL, "gst-camerabin-test model", NULL); + + g_free (desc_str); + gst_date_time_unref (datetime); +} + +static gboolean +run_pipeline (gpointer user_data) +{ + GstCaps *preview_caps = NULL; + gchar *filename_str = NULL; + GstElement *video_source = NULL; + const gchar *filename_suffix; + CaptureTiming *timing; + + g_object_set (camerabin, "mode", mode, NULL); + + if (preview_caps_name != NULL) { + preview_caps = gst_caps_from_string (preview_caps_name); + if (preview_caps) { + g_object_set (camerabin, "preview-caps", preview_caps, NULL); + GST_DEBUG ("Preview caps set"); + } else + GST_DEBUG ("Preview caps set but could not create caps from string"); + } + + set_metadata (camerabin); + + /* Construct filename */ + if (mode == MODE_VIDEO) + filename_suffix = ".mp4"; + else + filename_suffix = ".jpg"; + filename_str = + g_strdup_printf ("%s/test_%04u%s", filename->str, capture_count, + filename_suffix); + GST_DEBUG ("Setting filename: %s", filename_str); + g_object_set (camerabin, "location", filename_str, NULL); + g_free (filename_str); + + g_object_get (camerabin, "camera-source", &video_source, NULL); + if (video_source) { + if (GST_IS_ELEMENT (video_source) && GST_IS_PHOTOGRAPHY (video_source)) { + /* Set GstPhotography interface options. If option not given as + command-line parameter use default of the source element. */ + if (scene_mode != SCENE_MODE_NONE) + g_object_set (video_source, "scene-mode", scene_mode, NULL); + if (ev_compensation != EV_COMPENSATION_NONE) + g_object_set (video_source, "ev-compensation", ev_compensation, NULL); + if (aperture != APERTURE_NONE) + g_object_set (video_source, "aperture", aperture, NULL); + if (flash_mode != FLASH_MODE_NONE) + g_object_set (video_source, "flash-mode", flash_mode, NULL); + if (exposure != EXPOSURE_NONE) + g_object_set (video_source, "exposure", exposure, NULL); + if (iso_speed != ISO_SPEED_NONE) + g_object_set (video_source, "iso-speed", iso_speed, NULL); + if (wb_mode != WHITE_BALANCE_MODE_NONE) + g_object_set (video_source, "white-balance-mode", wb_mode, NULL); + if (color_mode != COLOR_TONE_MODE_NONE) + g_object_set (video_source, "colour-tone-mode", color_mode, NULL); + } + g_object_unref (video_source); + } else { + video_source = gst_bin_get_by_name (GST_BIN (camerabin), "camerasrc"); + gst_object_unref (video_source); + } + g_object_set (camerabin, "zoom", zoom / 100.0f, NULL); + + capture_count++; + + timing = g_slice_new0 (CaptureTiming); + capture_times = g_list_prepend (capture_times, timing); + + /* set pad probe to check when buffer leaves the camera source */ + if (mode == MODE_IMAGE) { + GstPad *pad; + + pad = gst_element_get_static_pad (video_source, "imgsrc"); + camera_probe_id = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, + camera_src_get_timestamp_probe, NULL, NULL); + + gst_object_unref (pad); + } + timing->start_capture = gst_util_get_timestamp (); + g_signal_emit_by_name (camerabin, "start-capture", 0); + + if (mode == MODE_VIDEO) { + g_timeout_add ((capture_time * 1000), (GSourceFunc) stop_capture, NULL); + } + + return FALSE; +} + +static void +parse_target_values (void) +{ + gdouble startup = 0, change_mode = 0, shot_to_save = 0, shot_to_snapshot = 0; + gdouble shot_to_shot = 0, preview_to_precapture = 0, shot_to_buffer = 0; + + if (performance_targets_str == NULL) + return; + + /* + startup time, change mode time, shot to save, shot to snapshot, + shot to shot, preview to precapture, shot to buffer. + */ + sscanf (performance_targets_str, "%lf,%lf,%lf,%lf,%lf,%lf,%lf", + &startup, &change_mode, &shot_to_save, + &shot_to_snapshot, &shot_to_shot, &preview_to_precapture, + &shot_to_buffer); + + target_startup = (GstClockTime) (startup * GST_SECOND); + target_change_mode = (GstClockTime) (change_mode * GST_SECOND); + target_shot_to_save = (GstClockTime) (shot_to_save * GST_SECOND); + target_shot_to_snapshot = (GstClockTime) (shot_to_snapshot * GST_SECOND); + target_shot_to_shot = (GstClockTime) (shot_to_shot * GST_SECOND); + target_preview_to_precapture = + (GstClockTime) (preview_to_precapture * GST_SECOND); + target_shot_to_buffer = (GstClockTime) (shot_to_buffer * GST_SECOND); +} + +static void +print_performance_data (void) +{ + GList *iter; + gint i = 0; + GstClockTime last_start = 0; + CaptureTimingStats max; + CaptureTimingStats min; + CaptureTimingStats avg; + CaptureTimingStats avg_wo_first; + GstClockTime shot_to_shot; + + if (!performance_measure) + return; + + parse_target_values (); + + /* Initialize stats */ + min.shot_to_shot = -1; + min.shot_to_save = -1; + min.shot_to_snapshot = -1; + min.preview_to_precapture = -1; + min.shot_to_buffer = -1; + memset (&avg, 0, sizeof (CaptureTimingStats)); + memset (&avg_wo_first, 0, sizeof (CaptureTimingStats)); + memset (&max, 0, sizeof (CaptureTimingStats)); + + g_print ("-- Performance results --\n"); + g_print ("Startup time: %" TIME_FORMAT "; Target: %" TIME_FORMAT "\n", + TIME_ARGS (startup_time - initial_time), TIME_ARGS (target_startup)); + g_print ("Change mode time: %" TIME_FORMAT "; Target: %" TIME_FORMAT "\n", + TIME_ARGS (change_mode_after - change_mode_before), + TIME_ARGS (target_change_mode)); + + g_print + ("\n | Shot to save |Shot to snapshot| Shot to shot |" + "Preview to precap| Shot to buffer\n"); + capture_times = g_list_reverse (capture_times); + for (iter = capture_times; iter; iter = g_list_next (iter)) { + CaptureTiming *t = (CaptureTiming *) iter->data; + CaptureTimingStats stats; + + stats.shot_to_save = SHOT_TO_SAVE (t); + stats.shot_to_snapshot = SHOT_TO_SNAPSHOT (t); + stats.shot_to_shot = i == 0 ? 0 : t->start_capture - last_start; + stats.preview_to_precapture = PREVIEW_TO_PRECAPTURE (t); + stats.shot_to_buffer = SHOT_TO_BUFFER (t); + + PRINT_STATS (i, &stats); + + if (i != 0) { + capture_timing_stats_add (&avg_wo_first, &stats); + } + capture_timing_stats_add (&avg, &stats); + + if (stats.shot_to_save < min.shot_to_save) { + min.shot_to_save = stats.shot_to_save; + } + if (stats.shot_to_snapshot < min.shot_to_snapshot) { + min.shot_to_snapshot = stats.shot_to_snapshot; + } + if (stats.shot_to_shot < min.shot_to_shot && stats.shot_to_shot > 0) { + min.shot_to_shot = stats.shot_to_shot; + } + if (stats.preview_to_precapture < min.preview_to_precapture) { + min.preview_to_precapture = stats.preview_to_precapture; + } + if (stats.shot_to_buffer < min.shot_to_buffer) { + min.shot_to_buffer = stats.shot_to_buffer; + } + + + if (stats.shot_to_save > max.shot_to_save) { + max.shot_to_save = stats.shot_to_save; + } + if (stats.shot_to_snapshot > max.shot_to_snapshot) { + max.shot_to_snapshot = stats.shot_to_snapshot; + } + if (stats.shot_to_shot > max.shot_to_shot) { + max.shot_to_shot = stats.shot_to_shot; + } + if (stats.preview_to_precapture > max.preview_to_precapture) { + max.preview_to_precapture = stats.preview_to_precapture; + } + if (stats.shot_to_buffer > max.shot_to_buffer) { + max.shot_to_buffer = stats.shot_to_buffer; + } + + last_start = t->start_capture; + i++; + } + + if (i > 1) + shot_to_shot = avg.shot_to_shot / (i - 1); + else + shot_to_shot = GST_CLOCK_TIME_NONE; + capture_timing_stats_div (&avg, i); + avg.shot_to_shot = shot_to_shot; + if (i > 1) + capture_timing_stats_div (&avg_wo_first, i - 1); + else { + memset (&avg_wo_first, 0, sizeof (CaptureTimingStats)); + } + + g_print ("\n Stats | MIN | MAX |" + " AVG | AVG wo First | Target | Diff \n"); + g_print ("Shot to shot | %" TIME_FORMAT " | %" TIME_FORMAT + " | %" TIME_FORMAT " | %" TIME_FORMAT " | %" TIME_FORMAT + " | %" TIMEDIFF_FORMAT "\n", + TIME_ARGS (min.shot_to_shot), TIME_ARGS (max.shot_to_shot), + TIME_ARGS (avg.shot_to_shot), + TIME_ARGS (avg_wo_first.shot_to_shot), + TIME_ARGS (target_shot_to_shot), + TIMEDIFF_ARGS (TIME_DIFF (avg.shot_to_shot, target_shot_to_shot))); + g_print ("Shot to save | %" TIME_FORMAT " | %" TIME_FORMAT + " | %" TIME_FORMAT " | %" TIME_FORMAT " | %" TIME_FORMAT + " | %" TIMEDIFF_FORMAT "\n", + TIME_ARGS (min.shot_to_save), TIME_ARGS (max.shot_to_save), + TIME_ARGS (avg.shot_to_save), + TIME_ARGS (avg_wo_first.shot_to_save), + TIME_ARGS (target_shot_to_save), + TIMEDIFF_ARGS (TIME_DIFF (avg.shot_to_save, target_shot_to_save))); + g_print ("Shot to snapshot | %" TIME_FORMAT " | %" TIME_FORMAT + " | %" TIME_FORMAT " | %" TIME_FORMAT " | %" TIME_FORMAT + " | %" TIMEDIFF_FORMAT "\n", + TIME_ARGS (min.shot_to_snapshot), + TIME_ARGS (max.shot_to_snapshot), + TIME_ARGS (avg.shot_to_snapshot), + TIME_ARGS (avg_wo_first.shot_to_snapshot), + TIME_ARGS (target_shot_to_snapshot), + TIMEDIFF_ARGS (TIME_DIFF (avg.shot_to_snapshot, + target_shot_to_snapshot))); + g_print ("Preview to precapture | %" TIME_FORMAT " | %" TIME_FORMAT " | %" + TIME_FORMAT " | %" TIME_FORMAT " | %" TIME_FORMAT " | %" TIMEDIFF_FORMAT + "\n", TIME_ARGS (min.preview_to_precapture), + TIME_ARGS (max.preview_to_precapture), + TIME_ARGS (avg.preview_to_precapture), + TIME_ARGS (avg_wo_first.preview_to_precapture), + TIME_ARGS (target_preview_to_precapture), + TIMEDIFF_ARGS (TIME_DIFF (avg.preview_to_precapture, + target_preview_to_precapture))); + g_print ("Shot to buffer | %" TIME_FORMAT " | %" TIME_FORMAT " | %" + TIME_FORMAT " | %" TIME_FORMAT " | %" TIME_FORMAT " | %" TIMEDIFF_FORMAT + "\n", TIME_ARGS (min.shot_to_buffer), TIME_ARGS (max.shot_to_buffer), + TIME_ARGS (avg.shot_to_buffer), TIME_ARGS (avg_wo_first.shot_to_buffer), + TIME_ARGS (target_shot_to_buffer), + TIMEDIFF_ARGS (TIME_DIFF (avg.shot_to_buffer, target_shot_to_buffer))); +} + +int +main (int argc, char *argv[]) +{ + gchar *target_times = NULL; + gchar *ev_option = NULL; + gchar *fn_option = NULL; + + GOptionEntry options[] = { + {"ev-compensation", '\0', 0, G_OPTION_ARG_STRING, &ev_option, + "EV compensation for source element GstPhotography interface", NULL}, + {"aperture", '\0', 0, G_OPTION_ARG_INT, &aperture, + "Aperture (size of lens opening) for source element GstPhotography interface", + NULL}, + {"flash-mode", '\0', 0, G_OPTION_ARG_INT, + &flash_mode, + "Flash mode for source element GstPhotography interface", NULL}, + {"scene-mode", '\0', 0, G_OPTION_ARG_INT, + &scene_mode, + "Scene mode for source element GstPhotography interface", NULL}, + {"exposure", '\0', 0, G_OPTION_ARG_INT64, + &exposure, + "Exposure time (in ms) for source element GstPhotography interface", + NULL}, + {"iso-speed", '\0', 0, G_OPTION_ARG_INT, + &iso_speed, + "ISO speed for source element GstPhotography interface", NULL}, + {"white-balance-mode", '\0', 0, G_OPTION_ARG_INT, + &wb_mode, + "White balance mode for source element GstPhotography interface", NULL}, + {"colour-tone-mode", '\0', 0, G_OPTION_ARG_INT, + &color_mode, + "Colour tone mode for source element GstPhotography interface", NULL}, + {"directory", '\0', 0, G_OPTION_ARG_STRING, &fn_option, + "Directory for capture file(s) (default is current directory)", NULL}, + {"mode", '\0', 0, G_OPTION_ARG_INT, &mode, + "Capture mode (default = 1 (image), 2 = video)", NULL}, + {"capture-time", '\0', 0, G_OPTION_ARG_INT, + &capture_time, + "Time to capture video in seconds (default = 10)", NULL}, + {"capture-total", '\0', 0, G_OPTION_ARG_INT, &capture_total, + "Total number of captures to be done (default = 1)", NULL}, + {"zoom", '\0', 0, G_OPTION_ARG_INT, &zoom, + "Zoom (100 = 1x (default), 200 = 2x etc.)", NULL}, + {"wrapper-source", '\0', 0, G_OPTION_ARG_STRING, &wrappersrc_name, + "Camera source wrapper used for setting the video source (default is wrappercamerabinsrc)", + NULL}, + {"video-source", '\0', 0, G_OPTION_ARG_STRING, &videosrc_name, + "Video source used in still capture and video recording", NULL}, + {"video-device", '\0', 0, G_OPTION_ARG_STRING, &videodevice_name, + "Video device to be set on the video source", NULL}, + {"audio-source", '\0', 0, G_OPTION_ARG_STRING, &audiosrc_name, + "Audio source used in video recording", NULL}, + {"image-pp", '\0', 0, G_OPTION_ARG_STRING, &imagepp_name, + "List of image post-processing elements separated with comma", NULL}, + {"viewfinder-sink", '\0', 0, G_OPTION_ARG_STRING, &vfsink_name, + "Viewfinder sink (default = fakesink)", NULL}, + {"image-width", '\0', 0, G_OPTION_ARG_INT, &image_width, + "Width for image capture", NULL}, + {"image-height", '\0', 0, G_OPTION_ARG_INT, &image_height, + "Height for image capture", NULL}, + {"view-framerate-num", '\0', 0, G_OPTION_ARG_INT, &view_framerate_num, + "Framerate numerator for viewfinder", NULL}, + {"view-framerate-den", '\0', 0, G_OPTION_ARG_INT, &view_framerate_den, + "Framerate denominator for viewfinder", NULL}, + {"preview-caps", '\0', 0, G_OPTION_ARG_STRING, &preview_caps_name, + "Preview caps (e.g. video/x-raw-rgb,width=320,height=240)", NULL}, + {"viewfinder-filter", '\0', 0, G_OPTION_ARG_STRING, &viewfinder_filter, + "Filter to process all frames going to viewfinder sink", NULL}, + {"x-width", '\0', 0, G_OPTION_ARG_INT, &x_width, + "X window width (default = 320)", NULL}, + {"x-height", '\0', 0, G_OPTION_ARG_INT, &x_height, + "X window height (default = 240)", NULL}, + {"no-xwindow", '\0', 0, G_OPTION_ARG_NONE, &no_xwindow, + "Do not create XWindow", NULL}, + {"encoding-target", '\0', 0, G_OPTION_ARG_STRING, &gep_targetname, + "Video encoding target name", NULL}, + {"encoding-profile", '\0', 0, G_OPTION_ARG_STRING, &gep_profilename, + "Video encoding profile name", NULL}, + {"encoding-profile-filename", '\0', 0, G_OPTION_ARG_STRING, &gep_filename, + "Video encoding profile filename", NULL}, + {"image-capture-caps", '\0', 0, + G_OPTION_ARG_STRING, &image_capture_caps_str, + "Image capture caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL}, + {"viewfinder-caps", '\0', 0, G_OPTION_ARG_STRING, + &viewfinder_caps_str, + "Viewfinder caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL}, + {"video-capture-caps", '\0', 0, + G_OPTION_ARG_STRING, &video_capture_caps_str, + "Video capture caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL}, + {"audio-capture-caps", '\0', 0, + G_OPTION_ARG_STRING, &audio_capture_caps_str, + "Audio capture caps (e.g. audio/x-raw-int,width=16,depth=16,rate=44100,channels=2)", + NULL}, + {"performance-measure", '\0', 0, + G_OPTION_ARG_NONE, &performance_measure, + "If performance information should be printed at the end of execution", + NULL}, + {"performance-targets", '\0', 0, + G_OPTION_ARG_STRING, &performance_targets_str, + "Comma separated list of doubles representing the target values in " + "seconds. The order is: startup time, change mode time, shot to save" + ", shot to snapshot, shot to shot, preview to shot, shot to buffer. " + "e.g. 3.5,1.0,5.0,2.5,5.0,1.5,1.0", + NULL}, + {"flags", '\0', 0, G_OPTION_ARG_STRING, &camerabin_flags, + "camerabin element flags (default = 0)", NULL}, + {NULL} + }; + + GOptionContext *ctx; + GError *err = NULL; + + ctx = g_option_context_new ("\n\ncamerabin command line test application."); + g_option_context_add_main_entries (ctx, options, NULL); + g_option_context_add_group (ctx, gst_init_get_option_group ()); + if (!g_option_context_parse (ctx, &argc, &argv, &err)) { + g_print ("Error initializing: %s\n", err->message); + exit (1); + } + g_option_context_free (ctx); + + GST_DEBUG_CATEGORY_INIT (camerabin_test, "camerabin-test", 0, + "camerabin test"); + + /* if we fail to create xwindow should we care? */ + if (!no_xwindow) + create_host_window (); + + /* FIXME: error handling */ + if (ev_option != NULL) + ev_compensation = strtod (ev_option, (char **) NULL); + + if (vfsink_name == NULL) + vfsink_name = g_strdup ("fakesink"); + + filename = g_string_new (fn_option); + if (filename->len == 0) + filename = g_string_append (filename, "."); + + /* init */ + if (setup_pipeline ()) { + loop = g_main_loop_new (NULL, FALSE); + g_idle_add ((GSourceFunc) run_pipeline, NULL); + g_main_loop_run (loop); + cleanup_pipeline (); + g_main_loop_unref (loop); + } + + /* performance */ + if (performance_measure) { + print_performance_data (); + } + + /* free */ + { + GList *iter; + + for (iter = capture_times; iter; iter = g_list_next (iter)) { + g_slice_free (CaptureTiming, iter->data); + } + g_list_free (capture_times); + } + + g_string_free (filename, TRUE); + g_free (ev_option); + g_free (wrappersrc_name); + g_free (videosrc_name); + g_free (videodevice_name); + g_free (audiosrc_name); + g_free (imagepp_name); + g_free (vfsink_name); + g_free (target_times); + g_free (gep_targetname); + g_free (gep_profilename); + g_free (gep_filename); + g_free (performance_targets_str); + + if (window) + XDestroyWindow (display, window); + + if (display) + XCloseDisplay (display); + + return 0; +} Index: b/tests/examples/camerabin2/Makefile.am =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/Makefile.am @@ -0,0 +1,55 @@ +GST_CAMERABIN_UI_FILES = gst-camera2.ui + +AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\" + +if HAVE_GTK + +GST_CAMERABIN_GTK_EXAMPLES = gst-camera2 + +gst_camera2_SOURCES = gst-camera2.h gst-camera2.c +gst_camera2_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ + $(GTK_CFLAGS) \ + $(GMODULE_EXPORT_CFLAGS) \ + -DGST_USE_UNSTABLE_API +gst_camera2_LDADD = \ + $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \ + $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \ + $(GST_PLUGINS_BAD_LIBS) \ + $(GST_PLUGINS_BASE_LIBS) \ + -lgstpbutils-@GST_API_VERSION@ \ + -lgstvideo-@GST_API_VERSION@ \ + $(GST_LIBS) \ + $(GTK_LIBS) \ + $(GMODULE_EXPORT_LIBS) + +noinst_DATA = $(GST_CAMERABIN_UI_FILES) + +else +GST_CAMERABIN_GTK_EXAMPLES = +endif + +if HAVE_X11 + +GST_CAMERABIN_X11_EXAMPLES = gst-camerabin2-test + +gst_camerabin2_test_SOURCES = gst-camerabin2-test.c +gst_camerabin2_test_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) +gst_camerabin2_test_LDADD = \ + $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \ + $(GST_PLUGINS_BASE_LIBS) \ + -lgstpbutils-@GST_API_VERSION@ \ + -lgstvideo-@GST_API_VERSION@ \ + $(GST_BASE_LIBS) \ + $(GST_LIBS) \ + $(X11_LIBS) + +else +GST_CAMERABIN_X11_EXAMPLES = +endif + +noinst_PROGRAMS = $(GST_CAMERABIN_GTK_EXAMPLES) $(GST_CAMERABIN_X11_EXAMPLES) + +EXTRA_DIST = $(GST_CAMERABIN_UI_FILES) + Index: b/tests/examples/camerabin2/Makefile.in =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/Makefile.in @@ -0,0 +1,1033 @@ +# Makefile.in generated by automake 1.13.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +subdir = tests/examples/camerabin2 +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ + $(top_srcdir)/common/m4/as-auto-alt.m4 \ + $(top_srcdir)/common/m4/as-compiler-flag.m4 \ + $(top_srcdir)/common/m4/as-libtool.m4 \ + $(top_srcdir)/common/m4/as-scrub-include.m4 \ + $(top_srcdir)/common/m4/as-version.m4 \ + $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/common/m4/gst-arch.m4 \ + $(top_srcdir)/common/m4/gst-args.m4 \ + $(top_srcdir)/common/m4/gst-check.m4 \ + $(top_srcdir)/common/m4/gst-default.m4 \ + $(top_srcdir)/common/m4/gst-dowhile.m4 \ + $(top_srcdir)/common/m4/gst-error.m4 \ + $(top_srcdir)/common/m4/gst-feature.m4 \ + $(top_srcdir)/common/m4/gst-gettext.m4 \ + $(top_srcdir)/common/m4/gst-glib2.m4 \ + $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \ + $(top_srcdir)/common/m4/gst-platform.m4 \ + $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ + $(top_srcdir)/common/m4/gst-plugindir.m4 \ + $(top_srcdir)/common/m4/gst-x11.m4 \ + $(top_srcdir)/common/m4/gst.m4 \ + $(top_srcdir)/common/m4/gtk-doc.m4 \ + $(top_srcdir)/common/m4/introspection.m4 \ + $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \ + $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@HAVE_GTK_TRUE@am__EXEEXT_1 = gst-camera2$(EXEEXT) +@HAVE_X11_TRUE@am__EXEEXT_2 = gst-camerabin2-test$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am__gst_camera2_SOURCES_DIST = gst-camera2.h gst-camera2.c +@HAVE_GTK_TRUE@am_gst_camera2_OBJECTS = \ +@HAVE_GTK_TRUE@ gst_camera2-gst-camera2.$(OBJEXT) +gst_camera2_OBJECTS = $(am_gst_camera2_OBJECTS) +am__DEPENDENCIES_1 = +@HAVE_GTK_TRUE@gst_camera2_DEPENDENCIES = $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \ +@HAVE_GTK_TRUE@ $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \ +@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +gst_camera2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gst_camera2_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__gst_camerabin2_test_SOURCES_DIST = gst-camerabin2-test.c +@HAVE_X11_TRUE@am_gst_camerabin2_test_OBJECTS = gst_camerabin2_test-gst-camerabin2-test.$(OBJEXT) +gst_camerabin2_test_OBJECTS = $(am_gst_camerabin2_test_OBJECTS) +@HAVE_X11_TRUE@gst_camerabin2_test_DEPENDENCIES = $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \ +@HAVE_X11_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@HAVE_X11_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gst_camerabin2_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(gst_camerabin2_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(gst_camera2_SOURCES) $(gst_camerabin2_test_SOURCES) +DIST_SOURCES = $(am__gst_camera2_SOURCES_DIST) \ + $(am__gst_camerabin2_test_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(noinst_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ACMENC_CFLAGS = @ACMENC_CFLAGS@ +ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APEXSINK_CFLAGS = @APEXSINK_CFLAGS@ +APEXSINK_LIBS = @APEXSINK_LIBS@ +AR = @AR@ +AS = @AS@ +ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@ +ASSRENDER_LIBS = @ASSRENDER_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BLUEZ_CFLAGS = @BLUEZ_CFLAGS@ +BLUEZ_LIBS = @BLUEZ_LIBS@ +BZ2_LIBS = @BZ2_LIBS@ +CC = @CC@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CDAUDIO_CFLAGS = @CDAUDIO_CFLAGS@ +CDAUDIO_LIBS = @CDAUDIO_LIBS@ +CFLAGS = @CFLAGS@ +CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ +CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DAALA_CFLAGS = @DAALA_CFLAGS@ +DAALA_LIBS = @DAALA_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DCCP_LIBS = @DCCP_LIBS@ +DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@ +DECKLINK_LIBS = @DECKLINK_LIBS@ +DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@ +DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@ +DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@ +DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@ +DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ +DIRECT3D_LIBS = @DIRECT3D_LIBS@ +DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DIRECTSHOW_LIBS = @DIRECTSHOW_LIBS@ +DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@ +DIRECTX_CFLAGS = @DIRECTX_CFLAGS@ +DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DTS_LIBS = @DTS_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDNAV_CFLAGS = @DVDNAV_CFLAGS@ +DVDNAV_LIBS = @DVDNAV_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGLGLES_CFLAGS = @EGLGLES_CFLAGS@ +EGLGLES_LIBS = @EGLGLES_LIBS@ +EGL_CFLAGS = @EGL_CFLAGS@ +EGL_LIBS = @EGL_LIBS@ +EGREP = @EGREP@ +ERROR_CFLAGS = @ERROR_CFLAGS@ +ERROR_CXXFLAGS = @ERROR_CXXFLAGS@ +ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@ +EXEEXT = @EXEEXT@ +EXIF_CFLAGS = @EXIF_CFLAGS@ +EXIF_LIBS = @EXIF_LIBS@ +FAAC_LIBS = @FAAC_LIBS@ +FAAD_IS_NEAAC = @FAAD_IS_NEAAC@ +FAAD_LIBS = @FAAD_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +FLITE_CFLAGS = @FLITE_CFLAGS@ +FLITE_LIBS = @FLITE_LIBS@ +FLUIDSYNTH_CFLAGS = @FLUIDSYNTH_CFLAGS@ +FLUIDSYNTH_LIBS = @FLUIDSYNTH_LIBS@ +GCOV = @GCOV@ +GCOV_CFLAGS = @GCOV_CFLAGS@ +GCOV_LIBS = @GCOV_LIBS@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LDFLAGS = @GIO_LDFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@ +GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ +GME_LIBS = @GME_LIBS@ +GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@ +GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@ +GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@ +GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GMYTH_CFLAGS = @GMYTH_CFLAGS@ +GMYTH_LIBS = @GMYTH_LIBS@ +GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ +GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ +GSETTINGS_LIBS = @GSETTINGS_LIBS@ +GSM_LIBS = @GSM_LIBS@ +GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ +GSTPB_PREFIX = @GSTPB_PREFIX@ +GST_AGE = @GST_AGE@ +GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@ +GST_API_VERSION = @GST_API_VERSION@ +GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ +GST_BASE_LIBS = @GST_BASE_LIBS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ +GST_CHECK_LIBS = @GST_CHECK_LIBS@ +GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@ +GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@ +GST_CURRENT = @GST_CURRENT@ +GST_CXXFLAGS = @GST_CXXFLAGS@ +GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ +GST_LIBS = @GST_LIBS@ +GST_LIBVERSION = @GST_LIBVERSION@ +GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@ +GST_LICENSE = @GST_LICENSE@ +GST_LT_LDFLAGS = @GST_LT_LDFLAGS@ +GST_OBJCFLAGS = @GST_OBJCFLAGS@ +GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@ +GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@ +GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@ +GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ +GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ +GST_PKG_CONFIG_PATH = @GST_PKG_CONFIG_PATH@ +GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ +GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@ +GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@ +GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ +GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ +GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@ +GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@ +GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@ +GST_PLUGINS_LIBAV_CFLAGS = @GST_PLUGINS_LIBAV_CFLAGS@ +GST_PLUGINS_LIBAV_DIR = @GST_PLUGINS_LIBAV_DIR@ +GST_PLUGINS_LIBAV_LIBS = @GST_PLUGINS_LIBAV_LIBS@ +GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@ +GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ +GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@ +GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@ +GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@ +GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ +GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@ +GST_PREFIX = @GST_PREFIX@ +GST_REVISION = @GST_REVISION@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@ +GST_VIDEO_LIBS = @GST_VIDEO_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ +G_UDEV_LIBS = @G_UDEV_LIBS@ +HAVE_BZ2 = @HAVE_BZ2@ +HAVE_CXX = @HAVE_CXX@ +HAVE_DIRECT3D = @HAVE_DIRECT3D@ +HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@ +HAVE_DIRECTSHOW = @HAVE_DIRECTSHOW@ +HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@ +HAVE_DTS = @HAVE_DTS@ +HAVE_FAAC = @HAVE_FAAC@ +HAVE_FAAD = @HAVE_FAAD@ +HAVE_FLITE = @HAVE_FLITE@ +HAVE_GSM = @HAVE_GSM@ +HAVE_NAS = @HAVE_NAS@ +HAVE_OPENJPEG = @HAVE_OPENJPEG@ +HAVE_SRTP = @HAVE_SRTP@ +HAVE_WASAPI = @HAVE_WASAPI@ +HAVE_WILDMIDI = @HAVE_WILDMIDI@ +HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@ +HAVE_X = @HAVE_X@ +HAVE_X11 = @HAVE_X11@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KATE_CFLAGS = @KATE_CFLAGS@ +KATE_LIBS = @KATE_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ +LIBDC1394_LIBS = @LIBDC1394_LIBS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ +LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LRDF_CFLAGS = @LRDF_CFLAGS@ +LRDF_LIBS = @LRDF_LIBS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MIMIC_CFLAGS = @MIMIC_CFLAGS@ +MIMIC_LIBS = @MIMIC_LIBS@ +MJPEG_CFLAGS = @MJPEG_CFLAGS@ +MJPEG_LIBS = @MJPEG_LIBS@ +MKDIR_P = @MKDIR_P@ +MODPLUG_CFLAGS = @MODPLUG_CFLAGS@ +MODPLUG_LIBS = @MODPLUG_LIBS@ +MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@ +MPEG2ENC_LIBS = @MPEG2ENC_LIBS@ +MPG123_CFLAGS = @MPG123_CFLAGS@ +MPG123_LIBS = @MPG123_LIBS@ +MPLEX_CFLAGS = @MPLEX_CFLAGS@ +MPLEX_LDFLAGS = @MPLEX_LDFLAGS@ +MPLEX_LIBS = @MPLEX_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +MUSEPACK_LIBS = @MUSEPACK_LIBS@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NEON_CFLAGS = @NEON_CFLAGS@ +NEON_LIBS = @NEON_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OFA_CFLAGS = @OFA_CFLAGS@ +OFA_LIBS = @OFA_LIBS@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OPENCV_CFLAGS = @OPENCV_CFLAGS@ +OPENCV_LIBS = @OPENCV_LIBS@ +OPENCV_PREFIX = @OPENCV_PREFIX@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ +OPUS_CFLAGS = @OPUS_CFLAGS@ +OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ +ORCC_FLAGS = @ORCC_FLAGS@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINDIR = @PLUGINDIR@ +POSUB = @POSUB@ +PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PVR_CFLAGS = @PVR_CFLAGS@ +PVR_LIBS = @PVR_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@ +RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@ +RSVG_CFLAGS = @RSVG_CFLAGS@ +RSVG_LIBS = @RSVG_LIBS@ +RTMP_CFLAGS = @RTMP_CFLAGS@ +RTMP_LIBS = @RTMP_LIBS@ +SBC_CFLAGS = @SBC_CFLAGS@ +SBC_LIBS = @SBC_LIBS@ +SCHRO_CFLAGS = @SCHRO_CFLAGS@ +SCHRO_LIBS = @SCHRO_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_LIBS = @SHM_LIBS@ +SLV2_CFLAGS = @SLV2_CFLAGS@ +SLV2_LIBS = @SLV2_LIBS@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +SNDIO_LIBS = @SNDIO_LIBS@ +SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@ +SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@ +SPANDSP_CFLAGS = @SPANDSP_CFLAGS@ +SPANDSP_LIBS = @SPANDSP_LIBS@ +SPC_LIBS = @SPC_LIBS@ +SRTP_LIBS = @SRTP_LIBS@ +STRIP = @STRIP@ +TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@ +TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@ +TIGER_CFLAGS = @TIGER_CFLAGS@ +TIGER_LIBS = @TIGER_LIBS@ +TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ +TIMIDITY_LIBS = @TIMIDITY_LIBS@ +USE_NLS = @USE_NLS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ +VDPAU_CFLAGS = @VDPAU_CFLAGS@ +VDPAU_LIBS = @VDPAU_LIBS@ +VERSION = @VERSION@ +VOAACENC_CFLAGS = @VOAACENC_CFLAGS@ +VOAACENC_LIBS = @VOAACENC_LIBS@ +VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@ +VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WASAPI_LIBS = @WASAPI_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ +WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ +WILDMIDI_LIBS = @WILDMIDI_LIBS@ +WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@ +WINSOCK2_LIBS = @WINSOCK2_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XVID_LIBS = @XVID_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZBAR_CFLAGS = @ZBAR_CFLAGS@ +ZBAR_LIBS = @ZBAR_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gsettingsschemadir = @gsettingsschemadir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +plugindir = @plugindir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +GST_CAMERABIN_UI_FILES = gst-camera2.ui +AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\" +@HAVE_GTK_FALSE@GST_CAMERABIN_GTK_EXAMPLES = +@HAVE_GTK_TRUE@GST_CAMERABIN_GTK_EXAMPLES = gst-camera2 +@HAVE_GTK_TRUE@gst_camera2_SOURCES = gst-camera2.h gst-camera2.c +@HAVE_GTK_TRUE@gst_camera2_CFLAGS = \ +@HAVE_GTK_TRUE@ $(GST_PLUGINS_BAD_CFLAGS) \ +@HAVE_GTK_TRUE@ $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ +@HAVE_GTK_TRUE@ $(GTK_CFLAGS) \ +@HAVE_GTK_TRUE@ $(GMODULE_EXPORT_CFLAGS) \ +@HAVE_GTK_TRUE@ -DGST_USE_UNSTABLE_API + +@HAVE_GTK_TRUE@gst_camera2_LDADD = \ +@HAVE_GTK_TRUE@ $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \ +@HAVE_GTK_TRUE@ $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \ +@HAVE_GTK_TRUE@ $(GST_PLUGINS_BAD_LIBS) \ +@HAVE_GTK_TRUE@ $(GST_PLUGINS_BASE_LIBS) \ +@HAVE_GTK_TRUE@ -lgstpbutils-@GST_API_VERSION@ \ +@HAVE_GTK_TRUE@ -lgstvideo-@GST_API_VERSION@ \ +@HAVE_GTK_TRUE@ $(GST_LIBS) \ +@HAVE_GTK_TRUE@ $(GTK_LIBS) \ +@HAVE_GTK_TRUE@ $(GMODULE_EXPORT_LIBS) + +@HAVE_GTK_TRUE@noinst_DATA = $(GST_CAMERABIN_UI_FILES) +@HAVE_X11_FALSE@GST_CAMERABIN_X11_EXAMPLES = +@HAVE_X11_TRUE@GST_CAMERABIN_X11_EXAMPLES = gst-camerabin2-test +@HAVE_X11_TRUE@gst_camerabin2_test_SOURCES = gst-camerabin2-test.c +@HAVE_X11_TRUE@gst_camerabin2_test_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) +@HAVE_X11_TRUE@gst_camerabin2_test_LDADD = \ +@HAVE_X11_TRUE@ $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \ +@HAVE_X11_TRUE@ $(GST_PLUGINS_BASE_LIBS) \ +@HAVE_X11_TRUE@ -lgstpbutils-@GST_API_VERSION@ \ +@HAVE_X11_TRUE@ -lgstvideo-@GST_API_VERSION@ \ +@HAVE_X11_TRUE@ $(GST_BASE_LIBS) \ +@HAVE_X11_TRUE@ $(GST_LIBS) \ +@HAVE_X11_TRUE@ $(X11_LIBS) + +EXTRA_DIST = $(GST_CAMERABIN_UI_FILES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/camerabin2/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/examples/camerabin2/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +gst-camera2$(EXEEXT): $(gst_camera2_OBJECTS) $(gst_camera2_DEPENDENCIES) $(EXTRA_gst_camera2_DEPENDENCIES) + @rm -f gst-camera2$(EXEEXT) + $(AM_V_CCLD)$(gst_camera2_LINK) $(gst_camera2_OBJECTS) $(gst_camera2_LDADD) $(LIBS) + +gst-camerabin2-test$(EXEEXT): $(gst_camerabin2_test_OBJECTS) $(gst_camerabin2_test_DEPENDENCIES) $(EXTRA_gst_camerabin2_test_DEPENDENCIES) + @rm -f gst-camerabin2-test$(EXEEXT) + $(AM_V_CCLD)$(gst_camerabin2_test_LINK) $(gst_camerabin2_test_OBJECTS) $(gst_camerabin2_test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gst_camera2-gst-camera2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +gst_camera2-gst-camera2.o: gst-camera2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camera2_CFLAGS) $(CFLAGS) -MT gst_camera2-gst-camera2.o -MD -MP -MF $(DEPDIR)/gst_camera2-gst-camera2.Tpo -c -o gst_camera2-gst-camera2.o `test -f 'gst-camera2.c' || echo '$(srcdir)/'`gst-camera2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gst_camera2-gst-camera2.Tpo $(DEPDIR)/gst_camera2-gst-camera2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gst-camera2.c' object='gst_camera2-gst-camera2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camera2_CFLAGS) $(CFLAGS) -c -o gst_camera2-gst-camera2.o `test -f 'gst-camera2.c' || echo '$(srcdir)/'`gst-camera2.c + +gst_camera2-gst-camera2.obj: gst-camera2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camera2_CFLAGS) $(CFLAGS) -MT gst_camera2-gst-camera2.obj -MD -MP -MF $(DEPDIR)/gst_camera2-gst-camera2.Tpo -c -o gst_camera2-gst-camera2.obj `if test -f 'gst-camera2.c'; then $(CYGPATH_W) 'gst-camera2.c'; else $(CYGPATH_W) '$(srcdir)/gst-camera2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gst_camera2-gst-camera2.Tpo $(DEPDIR)/gst_camera2-gst-camera2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gst-camera2.c' object='gst_camera2-gst-camera2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camera2_CFLAGS) $(CFLAGS) -c -o gst_camera2-gst-camera2.obj `if test -f 'gst-camera2.c'; then $(CYGPATH_W) 'gst-camera2.c'; else $(CYGPATH_W) '$(srcdir)/gst-camera2.c'; fi` + +gst_camerabin2_test-gst-camerabin2-test.o: gst-camerabin2-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camerabin2_test_CFLAGS) $(CFLAGS) -MT gst_camerabin2_test-gst-camerabin2-test.o -MD -MP -MF $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Tpo -c -o gst_camerabin2_test-gst-camerabin2-test.o `test -f 'gst-camerabin2-test.c' || echo '$(srcdir)/'`gst-camerabin2-test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Tpo $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gst-camerabin2-test.c' object='gst_camerabin2_test-gst-camerabin2-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camerabin2_test_CFLAGS) $(CFLAGS) -c -o gst_camerabin2_test-gst-camerabin2-test.o `test -f 'gst-camerabin2-test.c' || echo '$(srcdir)/'`gst-camerabin2-test.c + +gst_camerabin2_test-gst-camerabin2-test.obj: gst-camerabin2-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camerabin2_test_CFLAGS) $(CFLAGS) -MT gst_camerabin2_test-gst-camerabin2-test.obj -MD -MP -MF $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Tpo -c -o gst_camerabin2_test-gst-camerabin2-test.obj `if test -f 'gst-camerabin2-test.c'; then $(CYGPATH_W) 'gst-camerabin2-test.c'; else $(CYGPATH_W) '$(srcdir)/gst-camerabin2-test.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Tpo $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gst-camerabin2-test.c' object='gst_camerabin2_test-gst-camerabin2-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gst_camerabin2_test_CFLAGS) $(CFLAGS) -c -o gst_camerabin2_test-gst-camerabin2-test.obj `if test -f 'gst-camerabin2-test.c'; then $(CYGPATH_W) 'gst-camerabin2-test.c'; else $(CYGPATH_W) '$(srcdir)/gst-camerabin2-test.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Index: b/gst-libs/gst/interfaces/Makefile.am =================================================================== --- /dev/null +++ b/gst-libs/gst/interfaces/Makefile.am @@ -0,0 +1,61 @@ +lib_LTLIBRARIES = libgstphotography-@GST_API_VERSION@.la +libgstphotographyincludedir = \ + $(includedir)/gstreamer-@GST_API_VERSION@/gst/interfaces + +headers_photography = \ + photography.h + +# variables used for enum/marshal generation +glib_enum_headers=$(headers_photography) +glib_enum_define=GST_PHOTOGRAPHY +glib_gen_prefix=gst_photography +glib_gen_basename=photography + +built_sources = \ + photography-enumtypes.c + +built_headers = \ + photography-enumtypes.h + +libgstphotographyinclude_HEADERS = \ + $(headers_photography) + +nodist_libgstphotographyinclude_HEADERS = \ + photography-enumtypes.h + +libgstphotography_@GST_API_VERSION@_la_SOURCES = \ + photography.c + +nodist_libgstphotography_@GST_API_VERSION@_la_SOURCES = \ + $(built_sources) + +libgstphotography_@GST_API_VERSION@_la_CFLAGS = \ + -DGST_USE_UNSTABLE_API \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_CFLAGS) +libgstphotography_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS) +libgstphotography_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) + +BUILT_SOURCES = \ + $(built_sources) \ + $(built_headers) + +CLEANFILES = $(BUILT_SOURCES) + +include $(top_srcdir)/common/gst-glib-gen.mak + +Android.mk: $(BUILT_SOURCES) Makefile.am + androgenizer -:PROJECT libgstphotography -:STATIC libgstphotography-@GST_API_VERSION@ \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstphotography_@GST_API_VERSION@_la_SOURCES) \ + $(built_sources) \ + -:CFLAGS $(DEFS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) \ + -:LDFLAGS $(libgstphotography_@GST_API_VERSION@_la_LDFLAGS) \ + $(libgstphotography_@GST_API_VERSION@_la_LIBADD) \ + -ldl \ + -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/photography \ + -:HEADERS $(libgstphotographyinclude_HEADERS) \ + $(built_headers) \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + > $@ Index: b/gst-libs/gst/interfaces/Makefile.in =================================================================== --- /dev/null +++ b/gst-libs/gst/interfaces/Makefile.in @@ -0,0 +1,1112 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# these are the variables your Makefile.am should set +# the example is based on the colorbalance interface + +#glib_enum_headers=$(colorbalance_headers) +#glib_enum_define=GST_COLOR_BALANCE +#glib_gen_prefix=gst_color_balance +#glib_gen_basename=colorbalance + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +DIST_COMMON = $(libgstphotographyinclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/common/gst-glib-gen.mak +subdir = gst-libs/gst/interfaces +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ + $(top_srcdir)/common/m4/as-auto-alt.m4 \ + $(top_srcdir)/common/m4/as-compiler-flag.m4 \ + $(top_srcdir)/common/m4/as-libtool.m4 \ + $(top_srcdir)/common/m4/as-python.m4 \ + $(top_srcdir)/common/m4/as-scrub-include.m4 \ + $(top_srcdir)/common/m4/as-version.m4 \ + $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/common/m4/gst-arch.m4 \ + $(top_srcdir)/common/m4/gst-args.m4 \ + $(top_srcdir)/common/m4/gst-check.m4 \ + $(top_srcdir)/common/m4/gst-default.m4 \ + $(top_srcdir)/common/m4/gst-dowhile.m4 \ + $(top_srcdir)/common/m4/gst-error.m4 \ + $(top_srcdir)/common/m4/gst-feature.m4 \ + $(top_srcdir)/common/m4/gst-gettext.m4 \ + $(top_srcdir)/common/m4/gst-glib2.m4 \ + $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \ + $(top_srcdir)/common/m4/gst-platform.m4 \ + $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ + $(top_srcdir)/common/m4/gst-plugindir.m4 \ + $(top_srcdir)/common/m4/gst-x11.m4 \ + $(top_srcdir)/common/m4/gst.m4 \ + $(top_srcdir)/common/m4/gtk-doc.m4 \ + $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \ + $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(libgstphotographyincludedir)" \ + "$(DESTDIR)$(libgstphotographyincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +libgstphotography_@GST_API_VERSION@_la_DEPENDENCIES = \ + $(am__DEPENDENCIES_1) +am_libgstphotography_@GST_API_VERSION@_la_OBJECTS = \ + libgstphotography_@GST_API_VERSION@_la-photography.lo +am__objects_1 = libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.lo +nodist_libgstphotography_@GST_API_VERSION@_la_OBJECTS = \ + $(am__objects_1) +libgstphotography_@GST_API_VERSION@_la_OBJECTS = \ + $(am_libgstphotography_@GST_API_VERSION@_la_OBJECTS) \ + $(nodist_libgstphotography_@GST_API_VERSION@_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +libgstphotography_@GST_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) \ + $(CFLAGS) $(libgstphotography_@GST_API_VERSION@_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libgstphotography_@GST_API_VERSION@_la_SOURCES) \ + $(nodist_libgstphotography_@GST_API_VERSION@_la_SOURCES) +DIST_SOURCES = $(libgstphotography_@GST_API_VERSION@_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(libgstphotographyinclude_HEADERS) \ + $(nodist_libgstphotographyinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ACMENC_CFLAGS = @ACMENC_CFLAGS@ +ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APEXSINK_CFLAGS = @APEXSINK_CFLAGS@ +APEXSINK_LIBS = @APEXSINK_LIBS@ +AR = @AR@ +AS = @AS@ +ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@ +ASSRENDER_LIBS = @ASSRENDER_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BZ2_LIBS = @BZ2_LIBS@ +CC = @CC@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CDAUDIO_CFLAGS = @CDAUDIO_CFLAGS@ +CDAUDIO_LIBS = @CDAUDIO_LIBS@ +CELT_0_11_CFLAGS = @CELT_0_11_CFLAGS@ +CELT_0_11_LIBS = @CELT_0_11_LIBS@ +CELT_0_7_CFLAGS = @CELT_0_7_CFLAGS@ +CELT_0_7_LIBS = @CELT_0_7_LIBS@ +CELT_0_8_CFLAGS = @CELT_0_8_CFLAGS@ +CELT_0_8_LIBS = @CELT_0_8_LIBS@ +CELT_CFLAGS = @CELT_CFLAGS@ +CELT_LIBS = @CELT_LIBS@ +CFLAGS = @CFLAGS@ +CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ +CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ +COG_CFLAGS = @COG_CFLAGS@ +COG_LIBS = @COG_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCCP_LIBS = @DCCP_LIBS@ +DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@ +DECKLINK_LIBS = @DECKLINK_LIBS@ +DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@ +DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@ +DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@ +DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@ +DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ +DIRAC_CFLAGS = @DIRAC_CFLAGS@ +DIRAC_LIBS = @DIRAC_LIBS@ +DIRECT3D9_LIBS = @DIRECT3D9_LIBS@ +DIRECT3D_LIBS = @DIRECT3D_LIBS@ +DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DIRECTSHOW_LIBS = @DIRECTSHOW_LIBS@ +DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@ +DIRECTX_CFLAGS = @DIRECTX_CFLAGS@ +DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DTS_LIBS = @DTS_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDNAV_CFLAGS = @DVDNAV_CFLAGS@ +DVDNAV_LIBS = @DVDNAV_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGLGLES_CFLAGS = @EGLGLES_CFLAGS@ +EGLGLES_LIBS = @EGLGLES_LIBS@ +EGREP = @EGREP@ +ERROR_CFLAGS = @ERROR_CFLAGS@ +ERROR_CXXFLAGS = @ERROR_CXXFLAGS@ +ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@ +EXEEXT = @EXEEXT@ +EXIF_CFLAGS = @EXIF_CFLAGS@ +EXIF_LIBS = @EXIF_LIBS@ +FAAC_LIBS = @FAAC_LIBS@ +FAAD_IS_NEAAC = @FAAD_IS_NEAAC@ +FAAD_LIBS = @FAAD_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +FLITE_CFLAGS = @FLITE_CFLAGS@ +FLITE_LIBS = @FLITE_LIBS@ +GCOV = @GCOV@ +GCOV_CFLAGS = @GCOV_CFLAGS@ +GCOV_LIBS = @GCOV_LIBS@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LDFLAGS = @GIO_LDFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@ +GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ +GME_LIBS = @GME_LIBS@ +GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@ +GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GMYTH_CFLAGS = @GMYTH_CFLAGS@ +GMYTH_LIBS = @GMYTH_LIBS@ +GREP = @GREP@ +GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ +GSETTINGS_LIBS = @GSETTINGS_LIBS@ +GSM_LIBS = @GSM_LIBS@ +GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ +GSTPB_PREFIX = @GSTPB_PREFIX@ +GST_AGE = @GST_AGE@ +GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@ +GST_API_VERSION = @GST_API_VERSION@ +GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ +GST_BASE_LIBS = @GST_BASE_LIBS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ +GST_CHECK_LIBS = @GST_CHECK_LIBS@ +GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@ +GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@ +GST_CURRENT = @GST_CURRENT@ +GST_CXXFLAGS = @GST_CXXFLAGS@ +GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ +GST_LIBS = @GST_LIBS@ +GST_LIBVERSION = @GST_LIBVERSION@ +GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@ +GST_LICENSE = @GST_LICENSE@ +GST_LT_LDFLAGS = @GST_LT_LDFLAGS@ +GST_OBJCFLAGS = @GST_OBJCFLAGS@ +GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@ +GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@ +GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@ +GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ +GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ +GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ +GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@ +GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@ +GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ +GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ +GST_PLUGINS_FFMPEG_CFLAGS = @GST_PLUGINS_FFMPEG_CFLAGS@ +GST_PLUGINS_FFMPEG_DIR = @GST_PLUGINS_FFMPEG_DIR@ +GST_PLUGINS_FFMPEG_LIBS = @GST_PLUGINS_FFMPEG_LIBS@ +GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@ +GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@ +GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@ +GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@ +GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ +GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@ +GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@ +GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@ +GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ +GST_PREFIX = @GST_PREFIX@ +GST_REVISION = @GST_REVISION@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@ +GST_VIDEO_LIBS = @GST_VIDEO_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ +G_UDEV_LIBS = @G_UDEV_LIBS@ +HAVE_BZ2 = @HAVE_BZ2@ +HAVE_CXX = @HAVE_CXX@ +HAVE_DIRECT3D = @HAVE_DIRECT3D@ +HAVE_DIRECT3D9 = @HAVE_DIRECT3D9@ +HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@ +HAVE_DIRECTSHOW = @HAVE_DIRECTSHOW@ +HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@ +HAVE_DTS = @HAVE_DTS@ +HAVE_FAAC = @HAVE_FAAC@ +HAVE_FAAD = @HAVE_FAAD@ +HAVE_FLITE = @HAVE_FLITE@ +HAVE_GSM = @HAVE_GSM@ +HAVE_JASPER = @HAVE_JASPER@ +HAVE_NAS = @HAVE_NAS@ +HAVE_WILDMIDI = @HAVE_WILDMIDI@ +HAVE_X = @HAVE_X@ +HAVE_X11 = @HAVE_X11@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JASPER_LIBS = @JASPER_LIBS@ +KATE_CFLAGS = @KATE_CFLAGS@ +KATE_LIBS = @KATE_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ +LIBDC1394_LIBS = @LIBDC1394_LIBS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ +LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LRDF_CFLAGS = @LRDF_CFLAGS@ +LRDF_LIBS = @LRDF_LIBS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MIMIC_CFLAGS = @MIMIC_CFLAGS@ +MIMIC_LIBS = @MIMIC_LIBS@ +MJPEG_CFLAGS = @MJPEG_CFLAGS@ +MJPEG_LIBS = @MJPEG_LIBS@ +MKDIR_P = @MKDIR_P@ +MODPLUG_CFLAGS = @MODPLUG_CFLAGS@ +MODPLUG_LIBS = @MODPLUG_LIBS@ +MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@ +MPEG2ENC_LIBS = @MPEG2ENC_LIBS@ +MPG123_CFLAGS = @MPG123_CFLAGS@ +MPG123_LIBS = @MPG123_LIBS@ +MPLEX_CFLAGS = @MPLEX_CFLAGS@ +MPLEX_LDFLAGS = @MPLEX_LDFLAGS@ +MPLEX_LIBS = @MPLEX_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +MUSEPACK_LIBS = @MUSEPACK_LIBS@ +MUSICBRAINZ_CFLAGS = @MUSICBRAINZ_CFLAGS@ +MUSICBRAINZ_LIBS = @MUSICBRAINZ_LIBS@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NEON_CFLAGS = @NEON_CFLAGS@ +NEON_LIBS = @NEON_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OFA_CFLAGS = @OFA_CFLAGS@ +OFA_LIBS = @OFA_LIBS@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OPENCV_CFLAGS = @OPENCV_CFLAGS@ +OPENCV_LIBS = @OPENCV_LIBS@ +OPENCV_PREFIX = @OPENCV_PREFIX@ +OPUS_CFLAGS = @OPUS_CFLAGS@ +OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ +ORCC_FLAGS = @ORCC_FLAGS@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINDIR = @PLUGINDIR@ +POSUB = @POSUB@ +PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PVR_CFLAGS = @PVR_CFLAGS@ +PVR_LIBS = @PVR_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RSVG_2_35_0_CFLAGS = @RSVG_2_35_0_CFLAGS@ +RSVG_2_35_0_LIBS = @RSVG_2_35_0_LIBS@ +RSVG_CFLAGS = @RSVG_CFLAGS@ +RSVG_LIBS = @RSVG_LIBS@ +RTMP_CFLAGS = @RTMP_CFLAGS@ +RTMP_LIBS = @RTMP_LIBS@ +SCHRO_CFLAGS = @SCHRO_CFLAGS@ +SCHRO_LIBS = @SCHRO_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLV2_CFLAGS = @SLV2_CFLAGS@ +SLV2_LIBS = @SLV2_LIBS@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +SNDIO_LIBS = @SNDIO_LIBS@ +SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@ +SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@ +SPANDSP_CFLAGS = @SPANDSP_CFLAGS@ +SPANDSP_LIBS = @SPANDSP_LIBS@ +SPC_LIBS = @SPC_LIBS@ +STRIP = @STRIP@ +SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ +SWFDEC_LIBS = @SWFDEC_LIBS@ +TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@ +TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@ +TIGER_CFLAGS = @TIGER_CFLAGS@ +TIGER_LIBS = @TIGER_LIBS@ +TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ +TIMIDITY_LIBS = @TIMIDITY_LIBS@ +USE_NLS = @USE_NLS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ +VDPAU_CFLAGS = @VDPAU_CFLAGS@ +VDPAU_LIBS = @VDPAU_LIBS@ +VERSION = @VERSION@ +VOAACENC_CFLAGS = @VOAACENC_CFLAGS@ +VOAACENC_LIBS = @VOAACENC_LIBS@ +VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@ +VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ +WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ +WILDMIDI_LIBS = @WILDMIDI_LIBS@ +WINSOCK2_LIBS = @WINSOCK2_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XVID_LIBS = @XVID_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZBAR_CFLAGS = @ZBAR_CFLAGS@ +ZBAR_LIBS = @ZBAR_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gsettingsschemadir = @gsettingsschemadir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +plugindir = @plugindir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = libgstphotography-@GST_API_VERSION@.la +libgstphotographyincludedir = \ + $(includedir)/gstreamer-@GST_API_VERSION@/gst/interfaces + +headers_photography = \ + photography.h + + +# variables used for enum/marshal generation +glib_enum_headers = $(headers_photography) +glib_enum_define = GST_PHOTOGRAPHY +glib_gen_prefix = gst_photography +glib_gen_basename = photography +built_sources = \ + photography-enumtypes.c + +built_headers = \ + photography-enumtypes.h + +libgstphotographyinclude_HEADERS = \ + $(headers_photography) + +nodist_libgstphotographyinclude_HEADERS = \ + photography-enumtypes.h + +libgstphotography_@GST_API_VERSION@_la_SOURCES = \ + photography.c + +nodist_libgstphotography_@GST_API_VERSION@_la_SOURCES = \ + $(built_sources) + +libgstphotography_@GST_API_VERSION@_la_CFLAGS = \ + -DGST_USE_UNSTABLE_API \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_CFLAGS) + +libgstphotography_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS) +libgstphotography_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) +BUILT_SOURCES = \ + $(built_sources) \ + $(built_headers) + +CLEANFILES = $(BUILT_SOURCES) +enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common/gst-glib-gen.mak $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/interfaces/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gst-libs/gst/interfaces/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/common/gst-glib-gen.mak: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgstphotography-@GST_API_VERSION@.la: $(libgstphotography_@GST_API_VERSION@_la_OBJECTS) $(libgstphotography_@GST_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libgstphotography_@GST_API_VERSION@_la_DEPENDENCIES) + $(AM_V_CCLD)$(libgstphotography_@GST_API_VERSION@_la_LINK) -rpath $(libdir) $(libgstphotography_@GST_API_VERSION@_la_OBJECTS) $(libgstphotography_@GST_API_VERSION@_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libgstphotography_@GST_API_VERSION@_la-photography.lo: photography.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstphotography_@GST_API_VERSION@_la-photography.lo -MD -MP -MF $(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography.Tpo -c -o libgstphotography_@GST_API_VERSION@_la-photography.lo `test -f 'photography.c' || echo '$(srcdir)/'`photography.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography.Tpo $(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='photography.c' object='libgstphotography_@GST_API_VERSION@_la-photography.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstphotography_@GST_API_VERSION@_la-photography.lo `test -f 'photography.c' || echo '$(srcdir)/'`photography.c + +libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.lo: photography-enumtypes.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.lo -MD -MP -MF $(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.Tpo -c -o libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.lo `test -f 'photography-enumtypes.c' || echo '$(srcdir)/'`photography-enumtypes.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.Tpo $(DEPDIR)/libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='photography-enumtypes.c' object='libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstphotography_@GST_API_VERSION@_la-photography-enumtypes.lo `test -f 'photography-enumtypes.c' || echo '$(srcdir)/'`photography-enumtypes.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-libgstphotographyincludeHEADERS: $(libgstphotographyinclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libgstphotographyinclude_HEADERS)'; test -n "$(libgstphotographyincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libgstphotographyincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libgstphotographyincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgstphotographyincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstphotographyincludedir)" || exit $$?; \ + done + +uninstall-libgstphotographyincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libgstphotographyinclude_HEADERS)'; test -n "$(libgstphotographyincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libgstphotographyincludedir)'; $(am__uninstall_files_from_dir) +install-nodist_libgstphotographyincludeHEADERS: $(nodist_libgstphotographyinclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_libgstphotographyinclude_HEADERS)'; test -n "$(libgstphotographyincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libgstphotographyincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libgstphotographyincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgstphotographyincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstphotographyincludedir)" || exit $$?; \ + done + +uninstall-nodist_libgstphotographyincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_libgstphotographyinclude_HEADERS)'; test -n "$(libgstphotographyincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libgstphotographyincludedir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgstphotographyincludedir)" "$(DESTDIR)$(libgstphotographyincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-libgstphotographyincludeHEADERS \ + install-nodist_libgstphotographyincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES \ + uninstall-libgstphotographyincludeHEADERS \ + uninstall-nodist_libgstphotographyincludeHEADERS + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-libgstphotographyincludeHEADERS \ + install-man install-nodist_libgstphotographyincludeHEADERS \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-libLTLIBRARIES \ + uninstall-libgstphotographyincludeHEADERS \ + uninstall-nodist_libgstphotographyincludeHEADERS + + +# these are all the rules generating the relevant files +$(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list + $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=$(glib_gen_prefix)_marshal $^ > $(glib_gen_basename)-marshal.h.tmp && \ + mv $(glib_gen_basename)-marshal.h.tmp $(glib_gen_basename)-marshal.h + +$(glib_gen_basename)-marshal.c: $(glib_gen_basename)-marshal.list + $(AM_V_GEN)echo "#include \"$(glib_gen_basename)-marshal.h\"" >> $(glib_gen_basename)-marshal.c.tmp && \ + $(GLIB_GENMARSHAL) --body --prefix=$(glib_gen_prefix)_marshal $^ >> $(glib_gen_basename)-marshal.c.tmp && \ + mv $(glib_gen_basename)-marshal.c.tmp $(glib_gen_basename)-marshal.c + +$(glib_gen_basename)-enumtypes.h: $(glib_enum_headers) + $(AM_V_GEN)$(GLIB_MKENUMS) \ + --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ + --fprod "\n/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ + --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \ + $^ > $@ + +$(glib_gen_basename)-enumtypes.c: $(glib_enum_headers) + @if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi + $(AM_V_GEN)$(GLIB_MKENUMS) \ + --fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \ + --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ + --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n" \ + $^ > $@ + +# a hack rule to make sure .Plo files exist because they get include'd +# from Makefile's +.deps/%-marshal.Plo: + @touch $@ + +.deps/%-enumtypes.Plo: + @touch $@ + +Android.mk: $(BUILT_SOURCES) Makefile.am + androgenizer -:PROJECT libgstphotography -:STATIC libgstphotography-@GST_API_VERSION@ \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstphotography_@GST_API_VERSION@_la_SOURCES) \ + $(built_sources) \ + -:CFLAGS $(DEFS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) \ + -:LDFLAGS $(libgstphotography_@GST_API_VERSION@_la_LDFLAGS) \ + $(libgstphotography_@GST_API_VERSION@_la_LIBADD) \ + -ldl \ + -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/photography \ + -:HEADERS $(libgstphotographyinclude_HEADERS) \ + $(built_headers) \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Index: b/gst-libs/gst/interfaces/photography.c =================================================================== --- /dev/null +++ b/gst-libs/gst/interfaces/photography.c @@ -0,0 +1,718 @@ +/* GStreamer + * + * Copyright (C) 2008 Nokia Corporation + * + * photography.c: photography interface for digital imaging + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "photography.h" + +/** + * SECTION:gstphotography + * @short_description: Interface for digital image capture elements + * @stability: Unstable + * + * The interface allows access to some common digital image capture parameters. + * + * + * The GstPhotography interface is unstable API and may change in future. + * One can define GST_USE_UNSTABLE_API to acknowledge and avoid this warning. + * + */ + +static void gst_photography_iface_base_init (GstPhotographyInterface * iface); +static void gst_photography_iface_class_init (gpointer g_class); + +GType +gst_photography_get_type (void) +{ + static GType gst_photography_type = 0; + + if (!gst_photography_type) { + static const GTypeInfo gst_photography_info = { + sizeof (GstPhotographyInterface), + (GBaseInitFunc) gst_photography_iface_base_init, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gst_photography_iface_class_init, /* class_init */ + NULL, /* class_finalize */ + NULL, /* class_data */ + 0, + 0, /* n_preallocs */ + NULL, /* instance_init */ + }; + + gst_photography_type = g_type_register_static (G_TYPE_INTERFACE, + "GstPhotography", &gst_photography_info, 0); + } + + return gst_photography_type; +} + +static void +gst_photography_iface_base_init (GstPhotographyInterface * iface) +{ + /* default virtual functions */ + iface->get_ev_compensation = NULL; + iface->get_iso_speed = NULL; + iface->get_aperture = NULL; + iface->get_exposure = NULL; + iface->get_white_balance_mode = NULL; + iface->get_color_tone_mode = NULL; + iface->get_scene_mode = NULL; + iface->get_flash_mode = NULL; + iface->get_noise_reduction = NULL; + iface->get_zoom = NULL; + iface->get_flicker_mode = NULL; + iface->get_focus_mode = NULL; + + iface->set_ev_compensation = NULL; + iface->set_iso_speed = NULL; + iface->set_aperture = NULL; + iface->set_exposure = NULL; + iface->set_white_balance_mode = NULL; + iface->set_color_tone_mode = NULL; + iface->set_scene_mode = NULL; + iface->set_flash_mode = NULL; + iface->set_noise_reduction = NULL; + iface->set_zoom = NULL; + iface->set_flicker_mode = NULL; + iface->set_focus_mode = NULL; + + iface->get_capabilities = NULL; + iface->prepare_for_capture = NULL; + iface->set_autofocus = NULL; + iface->set_config = NULL; + iface->get_config = NULL; +} + +#define GST_PHOTOGRAPHY_FUNC_TEMPLATE(function_name, param_type) \ +gboolean \ +gst_photography_set_ ## function_name (GstPhotography * photo, param_type param) \ +{ \ + GstPhotographyInterface *iface; \ + g_return_val_if_fail (photo != NULL, FALSE); \ + iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); \ + if (iface->set_ ## function_name) { \ + return iface->set_ ## function_name (photo, param); \ + } \ + return FALSE; \ +} \ +gboolean \ +gst_photography_get_ ## function_name (GstPhotography * photo, param_type * param) \ +{ \ + GstPhotographyInterface *iface; \ + g_return_val_if_fail (photo != NULL, FALSE); \ + iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); \ + if (iface->get_ ## function_name) { \ + return iface->get_ ## function_name (photo, param); \ + } \ + return FALSE; \ +} + + +/** + * gst_photography_set_ev_compensation: + * @photo: #GstPhotography interface of a #GstElement + * @ev_comp: ev compensation value to set + * + * Set the ev compensation value for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_ev_compensation: + * @photo: #GstPhotography interface of a #GstElement + * @ev_comp: ev compensation value to get + * + * Get the ev compensation value for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (ev_compensation, gfloat); + +/** + * gst_photography_set_iso_speed: + * @photo: #GstPhotography interface of a #GstElement + * @iso_speed: ISO speed value to set + * + * Set the ISO value (light sensivity) for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_iso_speed: + * @photo: #GstPhotography interface of a #GstElement + * @iso_speed: ISO speed value to get + * + * Get the ISO value (light sensivity) for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (iso_speed, guint); + +/** + * gst_photography_set_aperture: + * @photo: #GstPhotography interface of a #GstElement + * @aperture: aperture value to set + * + * Set the aperture value for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_aperture: + * @photo: #GstPhotography interface of a #GstElement + * @aperture: aperture value to get + * + * Get the aperture value for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (aperture, guint); + +/** + * gst_photography_set_exposure: + * @photo: #GstPhotography interface of a #GstElement + * @exposure: exposure time to set + * + * Set the fixed exposure time (in us) for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_exposure: + * @photo: #GstPhotography interface of a #GstElement + * @exposure: exposure time to get + * + * Get the fixed exposure time (in us) for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (exposure, guint32); + +/** + * gst_photography_set_white_balance_mode: + * @photo: #GstPhotography interface of a #GstElement + * @wb_mode: #GstPhotographyWhiteBalanceMode to set + * + * Set the white balance mode for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_white_balance_mode: + * @photo: #GstPhotography interface of a #GstElement + * @wb_mode: #GstPhotographyWhiteBalanceMode to get + * + * Get the white balance mode for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (white_balance_mode, + GstPhotographyWhiteBalanceMode); + +/** + * gst_photography_set_color_tone_mode: + * @photo: #GstPhotography interface of a #GstElement + * @tone_mode: #GstPhotographyColorToneMode to set + * + * Set the color tone mode for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_color_tone_mode: + * @photo: #GstPhotography interface of a #GstElement + * @tone_mode: #GstPhotographyColorToneMode to get + * + * Get the color tone mode for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (color_tone_mode, GstPhotographyColorToneMode); + +/** + * gst_photography_set_scene_mode: + * @photo: #GstPhotography interface of a #GstElement + * @scene_mode: #GstPhotographySceneMode to set + * + * Set the scene mode for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_scene_mode: + * @photo: #GstPhotography interface of a #GstElement + * @scene_mode: #GstPhotographySceneMode to get + * + * Get the scene mode for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (scene_mode, GstPhotographySceneMode); + +/** + * gst_photography_set_flash_mode: + * @photo: #GstPhotography interface of a #GstElement + * @flash_mode: #GstPhotographyFlashMode to set + * + * Set the flash mode for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_flash_mode: + * @photo: #GstPhotography interface of a #GstElement + * @flash_mode: #GstPhotographyFlashMode to get + * + * Get the flash mode for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (flash_mode, GstPhotographyFlashMode); + +/** + * gst_photography_set_noise_reduction: + * @photo: #GstPhotography interface of a #GstElement + * @noise_reduction: #GstPhotographyNoiseReductionMode to set + * + * Set the noise reduction mode for the #GstElement + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + * + * Since: 0.10.21 + */ +/** + * gst_photography_get_noise_reduction: + * @photo: #GstPhotography interface of a #GstElement + * @noise_reduction: #GstPhotographyNoiseReductionMode to get + * + * Get the noise reduction mode for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + * + * Since: 0.10.21 + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (noise_reduction, GstPhotographyNoiseReduction); + +/** + * gst_photography_set_zoom: + * @photo: #GstPhotography interface of a #GstElement + * @zoom: zoom value to set + * + * Set the zoom value for the #GstElement. + * E.g. 1.0 to get original image and 3.0 for 3x zoom and so on. + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_zoom: + * @photo: #GstPhotography interface of a #GstElement + * @zoom: zoom value to get + * + * Get the zoom value for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (zoom, gfloat); + +/** + * gst_photography_set_flicker_mode: + * @photo: #GstPhotography interface of a #GstElement + * @flicker_mode: flicker mode value to set + * + * Set the flicker mode value for the #GstElement. + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_flicker_mode: + * @photo: #GstPhotography interface of a #GstElement + * @flicker_mode: flicker mode value to get + * + * Get the flicker mode value for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (flicker_mode, + GstPhotographyFlickerReductionMode); + +/** + * gst_photography_set_focus_mode: + * @photo: #GstPhotography interface of a #GstElement + * @focus_mode: focus mode value to set + * + * Set the focus mode value for the #GstElement. + * + * Returns: %TRUE if setting the value succeeded, %FALSE otherwise + */ +/** + * gst_photography_get_focus_mode: + * @photo: #GstPhotography interface of a #GstElement + * @focus_mode: focus_mode value to get + * + * Get the focus mode value for the #GstElement + * + * Returns: %TRUE if getting the value succeeded, %FALSE otherwise + */ +GST_PHOTOGRAPHY_FUNC_TEMPLATE (focus_mode, GstPhotographyFocusMode); + +/** + * gst_photography_get_capabilities: + * @photo: #GstPhotography interface of a #GstElement + * + * Get #GstPhotographyCaps bitmask value that indicates what photography + * interface features the #GstElement supports + * + * Returns: #GstPhotographyCaps value + */ +GstPhotographyCaps +gst_photography_get_capabilities (GstPhotography * photo) +{ + GstPhotographyInterface *iface; + g_return_val_if_fail (photo != NULL, GST_PHOTOGRAPHY_CAPS_NONE); + + iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); + if (iface->get_capabilities) { + return iface->get_capabilities (photo); + } else { + return GST_PHOTOGRAPHY_CAPS_NONE; + } +} + +/** + * gst_photography_prepare_for_capture: + * @photo: #GstPhotography interface of a #GstElement + * @func: callback that is called after capturing has been prepared + * @capture_caps: #GstCaps defining the desired format of the captured image + * @user_data: user data that will be passed to the callback @func + * + * Start preparations for capture. Preparations can take indeterminate + * amount of time and @func callback is called after preparations are + * done. Image capture will begin after callback returns. + * + * Returns: %TRUE if preparations were started (caps were OK), otherwise %FALSE. + */ +gboolean +gst_photography_prepare_for_capture (GstPhotography * photo, + GstPhotographyCapturePrepared func, GstCaps * capture_caps, + gpointer user_data) +{ + GstPhotographyInterface *iface; + gboolean ret = TRUE; + + g_return_val_if_fail (photo != NULL, FALSE); + + iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); + if (iface->prepare_for_capture) { + ret = iface->prepare_for_capture (photo, func, capture_caps, user_data); + } + + return ret; +} + +/** + * gst_photography_set_autofocus: + * @photo: #GstPhotography interface of a #GstElement + * @on: %TRUE to start autofocusing, %FALSE to stop autofocusing + * + * Start or stop autofocusing. %GST_PHOTOGRAPHY_AUTOFOCUS_DONE + * message is posted to bus when autofocusing has finished. + */ +void +gst_photography_set_autofocus (GstPhotography * photo, gboolean on) +{ + GstPhotographyInterface *iface; + g_return_if_fail (photo != NULL); + + iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); + if (iface->set_autofocus) { + iface->set_autofocus (photo, on); + } +} + +/** + * gst_photography_set_config: + * @photo: #GstPhotography interface of a #GstElement + * @config: #GstPhotographySettings containg the configuration + * + * Set all configuration settings at once. + * + * Returns: TRUE if configuration was set successfully, otherwise FALSE. + */ +gboolean +gst_photography_set_config (GstPhotography * photo, + GstPhotographySettings * config) +{ + GstPhotographyInterface *iface; + gboolean ret = FALSE; + + g_return_val_if_fail (photo != NULL, FALSE); + + iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); + if (iface->set_config) { + ret = iface->set_config (photo, config); + } + + return ret; +} + +/** + * gst_photography_get_config: + * @photo: #GstPhotography interface of a #GstElement + * @config: #GstPhotographySettings containg the configuration + * + * Get all configuration settings at once. + * + * Returns: TRUE if configuration was got successfully, otherwise FALSE. + */ +gboolean +gst_photography_get_config (GstPhotography * photo, + GstPhotographySettings * config) +{ + GstPhotographyInterface *iface; + gboolean ret = FALSE; + + g_return_val_if_fail (photo != NULL, FALSE); + + iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); + if (iface->get_config) { + ret = iface->get_config (photo, config); + } + + return ret; +} + +/* Photography class initialization stuff */ +static void +gst_photography_iface_class_init (gpointer g_class) +{ + /* create interface signals and properties here. */ + + /* White balance */ + g_object_interface_install_property (g_class, + g_param_spec_enum (GST_PHOTOGRAPHY_PROP_WB_MODE, + "White balance mode property", + "White balance affects the color temperature of the photo", + GST_TYPE_PHOTOGRAPHY_WHITE_BALANCE_MODE, + GST_PHOTOGRAPHY_WB_MODE_AUTO, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Color tone */ + g_object_interface_install_property (g_class, + g_param_spec_enum (GST_PHOTOGRAPHY_PROP_COLOR_TONE, + "Color tone mode property", + "Color tone setting changes color shading in the photo", + GST_TYPE_PHOTOGRAPHY_COLOR_TONE_MODE, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Scene mode */ + g_object_interface_install_property (g_class, + g_param_spec_enum (GST_PHOTOGRAPHY_PROP_SCENE_MODE, + "Scene mode property", + "Scene mode works as a preset for different photo shooting mode settings", + GST_TYPE_PHOTOGRAPHY_SCENE_MODE, + GST_PHOTOGRAPHY_SCENE_MODE_AUTO, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Flash mode */ + g_object_interface_install_property (g_class, + g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLASH_MODE, + "Flash mode property", + "Flash mode defines how the flash light should be used", + GST_TYPE_PHOTOGRAPHY_FLASH_MODE, + GST_PHOTOGRAPHY_FLASH_MODE_AUTO, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Flicker reduction mode */ + g_object_interface_install_property (g_class, + g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLICKER_MODE, + "Flicker reduction mode property", + "Flicker reduction mode defines a line frequency for flickering prevention", + GST_TYPE_PHOTOGRAPHY_FLICKER_REDUCTION_MODE, + GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Focus mode */ + g_object_interface_install_property (g_class, + g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FOCUS_MODE, + "Focus mode property", + "Focus mode defines the range of focal lengths to use in autofocus search", + GST_TYPE_PHOTOGRAPHY_FOCUS_MODE, + GST_PHOTOGRAPHY_FOCUS_MODE_AUTO, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Capabilities */ + g_object_interface_install_property (g_class, + g_param_spec_ulong (GST_PHOTOGRAPHY_PROP_CAPABILITIES, + "Photo capabilities bitmask", + "Tells the photo capabilities of the device", + 0, G_MAXULONG, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /* EV_compensation */ + g_object_interface_install_property (g_class, + g_param_spec_float (GST_PHOTOGRAPHY_PROP_EV_COMP, + "EV compensation property", + "EV compensation affects the brightness of the image", + -2.5, 2.5, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* ISO value */ + g_object_interface_install_property (g_class, + g_param_spec_uint (GST_PHOTOGRAPHY_PROP_ISO_SPEED, + "ISO speed property", + "ISO speed defines the light sensitivity (0 = auto)", + 0, 6400, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Aperture */ + g_object_interface_install_property (g_class, + g_param_spec_uint (GST_PHOTOGRAPHY_PROP_APERTURE, + "Aperture property", + "Aperture defines the size of lens opening (0 = auto)", + 0, G_MAXUINT8, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Exposure */ + g_object_interface_install_property (g_class, + g_param_spec_uint (GST_PHOTOGRAPHY_PROP_EXPOSURE_TIME, + "Exposure time in milliseconds", + "Exposure time defines how long the shutter will stay open (0 = auto)", + 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:image-capture-supported-caps: + * + * Query caps that describe supported formats for image capture. Sometimes + * element may support different formats for image capture than for video + * streaming. + */ + g_object_interface_install_property (g_class, + g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS, + "Image capture supported caps", + "Caps describing supported image capture formats", GST_TYPE_CAPS, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:image-preview-supported-caps: + * + * Query caps that describe supported formats for preview image. Sometimes + * element may support different formats for preview image than for video + * streaming. + */ + g_object_interface_install_property (g_class, + g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS, + "Image preview supported caps", + "Caps describing supported image preview formats", GST_TYPE_CAPS, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /* Zoom */ + g_object_interface_install_property (g_class, + g_param_spec_float (GST_PHOTOGRAPHY_PROP_ZOOM, + "Zoom property", + "How much the resulted image will be zoomed", + 1.0f, 10.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:color-temperature: + * + * Color temperature parameter for manual white balance. + * Control color temperature in Kelvin units. + */ + g_object_interface_install_property (g_class, + g_param_spec_uint (GST_PHOTOGRAPHY_PROP_COLOR_TEMPERATURE, + "Color temperature in Kelvin units", + "Color temperature in Kelvin units for manual white balance", + 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:white-point: + * + * White point parameter for manual white balance. + * Describes the color "white" as raw values. + * + * FIXME: check and document correct representation for white point + */ + g_object_interface_install_property (g_class, + g_param_spec_value_array (GST_PHOTOGRAPHY_PROP_WHITE_POINT, + "White point", + "Describe color white as raw values", + g_param_spec_uint ("raw-value", "Raw value", + "Raw value", 0, G_MAXUINT, 0, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:analog-gain: + * + * Linear multiplicative value how much amplification is applied to the signal + * before A-D conversion. + */ + g_object_interface_install_property (g_class, + g_param_spec_float (GST_PHOTOGRAPHY_PROP_ANALOG_GAIN, + "Analog gain applied to the sensor", + "Analog gain applied to the sensor", + 1.0f, G_MAXFLOAT, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:lens-focus: + * + * Manual changing of lens focus in diopter units. + * Inteded use with GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL focus mode, otherwise + * to be ignored. + * + */ + g_object_interface_install_property (g_class, + g_param_spec_float (GST_PHOTOGRAPHY_PROP_LENS_FOCUS, + "Manual lens focus", + "Focus point in diopter units", + 0.0f, G_MAXFLOAT, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:min-exposure-time: + * + * Minimum exposure time for automatic exposure mode. + */ + g_object_interface_install_property (g_class, + g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MIN_EXPOSURE_TIME, + "Minimum exposure time", + "Minimum exposure time for automatic exposure mode", + 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstPhotography:max-exposure-time: + * + * Maximum exposure time for automatic exposure mode. + */ + g_object_interface_install_property (g_class, + g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MAX_EXPOSURE_TIME, + "Maximum exposure time", + "Maximum exposure time for automatic exposure mode", + 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Noise Reduction, Bayer an YCC noise reduction are enabled by default */ + g_object_interface_install_property (g_class, + g_param_spec_flags (GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION, + "Noise Reduction settings", + "Which noise reduction modes are enabled (0 = disabled)", + GST_TYPE_PHOTOGRAPHY_NOISE_REDUCTION, + 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +} Index: b/gst-libs/gst/interfaces/photography.h =================================================================== --- /dev/null +++ b/gst-libs/gst/interfaces/photography.h @@ -0,0 +1,630 @@ +/* GStreamer + * + * Copyright (C) 2008 Nokia Corporation + * + * photography.h: photography interface for digital imaging + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_PHOTOGRAPHY_H__ +#define __GST_PHOTOGRAPHY_H__ + +#ifndef GST_USE_UNSTABLE_API +#warning "The GstPhotography interface is unstable API and may change in future." +#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define GST_TYPE_PHOTOGRAPHY \ + (gst_photography_get_type ()) +#define GST_PHOTOGRAPHY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PHOTOGRAPHY, GstPhotography)) +#define GST_IS_PHOTOGRAPHY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PHOTOGRAPHY)) +#define GST_PHOTOGRAPHY_GET_INTERFACE(inst) \ + (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_PHOTOGRAPHY, GstPhotographyInterface)) + + +/** + * GST_PHOTOGRAPHY_AUTOFOCUS_DONE: + * + * Name of custom GstMessage that will be posted to #GstBus when autofocusing + * is complete. + * This message contains following fields: + * + * + * + * #GstPhotographyFocusStatus + * "status": + * Tells if focusing succeeded or failed. + * + * + * + * + * #G_TYPE_INT + * "focus-window-rows": + * Tells number of focus matrix rows. + * + * + * + * + * #G_TYPE_INT + * "focus-window-columns": + * Tells number of focus matrix columns. + * + * + * + * + * #G_TYPE_INT + * "focus-window-mask": + * Bitmask containing rows x columns bits which mark the focus points in the + * focus matrix. Lowest bit (LSB) always represents the top-left corner of the + * focus matrix. This field is only valid when focusing status is SUCCESS. + * + * + * + */ +#define GST_PHOTOGRAPHY_AUTOFOCUS_DONE "autofocus-done" + +/** + * GST_PHOTOGRAPHY_SHAKE_RISK: + * + * Name of custom GstMessage that is posted to #GstBus during autofocusing + * process. It is posted if there is change in the risk of captured image + * becoming "shaken" due to camera movement and too long exposure time. + * + * This message contains following fields: + * + * + * + * #GstPhotographyShakeRisk + * "status": + * Tells risk level of capturing shaken image. + * + * + * + */ +#define GST_PHOTOGRAPHY_SHAKE_RISK "shake-risk" + +/* Maximum white point values used in #GstPhotographySettings */ +#define MAX_WHITE_POINT_VALUES 4 + +/* Interface property names */ +#define GST_PHOTOGRAPHY_PROP_WB_MODE "white-balance-mode" +#define GST_PHOTOGRAPHY_PROP_COLOR_TONE "color-tone-mode" +#define GST_PHOTOGRAPHY_PROP_SCENE_MODE "scene-mode" +#define GST_PHOTOGRAPHY_PROP_FLASH_MODE "flash-mode" +#define GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION "noise-reduction" +#define GST_PHOTOGRAPHY_PROP_FOCUS_STATUS "focus-status" +#define GST_PHOTOGRAPHY_PROP_CAPABILITIES "capabilities" +#define GST_PHOTOGRAPHY_PROP_SHAKE_RISK "shake-risk" +#define GST_PHOTOGRAPHY_PROP_EV_COMP "ev-compensation" +#define GST_PHOTOGRAPHY_PROP_ISO_SPEED "iso-speed" +#define GST_PHOTOGRAPHY_PROP_APERTURE "aperture" +#define GST_PHOTOGRAPHY_PROP_EXPOSURE_TIME "exposure-time" +#define GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS \ + "image-capture-supported-caps" +#define GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS \ + "image-preview-supported-caps" +#define GST_PHOTOGRAPHY_PROP_FLICKER_MODE "flicker-mode" +#define GST_PHOTOGRAPHY_PROP_FOCUS_MODE "focus-mode" +#define GST_PHOTOGRAPHY_PROP_ZOOM "zoom" +#define GST_PHOTOGRAPHY_PROP_COLOR_TEMPERATURE "color-temperature" +#define GST_PHOTOGRAPHY_PROP_WHITE_POINT "white-point" +#define GST_PHOTOGRAPHY_PROP_ANALOG_GAIN "analog-gain" +#define GST_PHOTOGRAPHY_PROP_EXPOSURE_MODE "exposure-mode" +#define GST_PHOTOGRAPHY_PROP_LENS_FOCUS "lens-focus" +#define GST_PHOTOGRAPHY_PROP_MIN_EXPOSURE_TIME "min-exposure-time" +#define GST_PHOTOGRAPHY_PROP_MAX_EXPOSURE_TIME "max-exposure-time" + +/** + * GstPhotography: + * + * Opaque #GstPhotography data structure. + */ +typedef struct _GstPhotography GstPhotography; + +/** + * GstPhotographyNoiseReduction: + * @GST_PHOTOGRAPHY_NOISE_REDUCTION_BAYER: Adaptive noise reduction on Bayer + * format + * @GST_PHOTOGRAPHY_NOISE_REDUCTION_YCC: reduces the noise on Y and 2-chroma + * images. + * @GST_PHOTOGRAPHY_NOISE_REDUCTION_TEMPORAL: Multi-frame adaptive NR, + * provided for the video mode + * @GST_PHOTOGRAPHY_NOISE_REDUCTION_FIXED: Fixed Pattern Noise refers to noise + * that does not change between frames. The noise is removed from the sensor + * image, by subtracting a previously-captured black image in memory. + * @GST_PHOTOGRAPHY_NOISE_REDUCTION_EXTRA: Extra Noise Reduction. In the case + * of high-ISO capturing, some noise remains after YCC NR. XNR reduces this + * remaining noise. + * + * Noise Reduction features of a photography capture or filter element. + * + * Since: 0.10.21 + */ +typedef enum +{ + GST_PHOTOGRAPHY_NOISE_REDUCTION_BAYER = ( 1<<0 ), + GST_PHOTOGRAPHY_NOISE_REDUCTION_YCC = ( 1<<1 ), + GST_PHOTOGRAPHY_NOISE_REDUCTION_TEMPORAL= ( 1<< 2), + GST_PHOTOGRAPHY_NOISE_REDUCTION_FIXED = (1 << 3), + GST_PHOTOGRAPHY_NOISE_REDUCTION_EXTRA = (1 << 4) +} GstPhotographyNoiseReduction; + +/** + * GstPhotographyWhiteBalanceMode: + * @GST_PHOTOGRAPHY_WB_MODE_AUTO: Choose white balance mode automatically + * @GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT: Mode for daylight conditions + * @GST_PHOTOGRAPHY_WB_MODE_CLOUDY: Mode for cloudy conditions + * @GST_PHOTOGRAPHY_WB_MODE_SUNSET: Mode for sunset conditions + * @GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN: Mode for tungsten lighting + * @GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT: Mode for fluorescent lighting + * @GST_PHOTOGRAPHY_WB_MODE_MANUAL: Disable automatic white balance adjustment + * and keep current values. + * @GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT: Mode for warm fluorescent lighting (Since 1.2) + * @GST_PHOTOGRAPHY_WB_MODE_SHADE: Mode for shade lighting (Since 1.2) + * + * Modes for white balance control. + */ +typedef enum +{ + GST_PHOTOGRAPHY_WB_MODE_AUTO = 0, + GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT, + GST_PHOTOGRAPHY_WB_MODE_CLOUDY, + GST_PHOTOGRAPHY_WB_MODE_SUNSET, + GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN, + GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT, + GST_PHOTOGRAPHY_WB_MODE_MANUAL, + GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT, + GST_PHOTOGRAPHY_WB_MODE_SHADE +} GstPhotographyWhiteBalanceMode; + +/** + * GstPhotographyColorToneMode: + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL: No effects + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SEPIA: Sepia + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_NEGATIVE: Negative + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRAYSCALE: Grayscale + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_NATURAL: Natural + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_VIVID: Vivid + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_COLORSWAP: Colorswap + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SOLARIZE: Solarize + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_OUT_OF_FOCUS: Out of focus + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKY_BLUE: Sky blue + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRASS_GREEN: Grass green + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKIN_WHITEN: Skin whiten + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_POSTERIZE: Posterize (Since 1.2) + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_WHITEBOARD: Whiteboard (Since 1.2) + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_BLACKBOARD: Blackboard (Since 1.2) + * @GST_PHOTOGRAPHY_COLOR_TONE_MODE_AQUA: Aqua (Since 1.2) + * + * Modes for special color effects. + */ +typedef enum +{ + GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL = 0, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_SEPIA, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_NEGATIVE, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRAYSCALE, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_NATURAL, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_VIVID, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_COLORSWAP, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_SOLARIZE, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_OUT_OF_FOCUS, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKY_BLUE, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRASS_GREEN, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKIN_WHITEN, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_POSTERIZE, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_WHITEBOARD, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_BLACKBOARD, + GST_PHOTOGRAPHY_COLOR_TONE_MODE_AQUA +} GstPhotographyColorToneMode; + +/** + * GstPhotographySceneMode: + * @GST_PHOTOGRAPHY_SCENE_MODE_MANUAL: Set individual options manually + * @GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP: Mode for close objects + * @GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT: Mode for portraits + * @GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE: Mode for landscapes + * @GST_PHOTOGRAPHY_SCENE_MODE_SPORT: Mode for scene with fast motion + * @GST_PHOTOGRAPHY_SCENE_MODE_NIGHT: Mode for night conditions + * @GST_PHOTOGRAPHY_SCENE_MODE_AUTO: Choose scene mode automatically + * @GST_PHOTOGRAPHY_SCENE_MODE_ACTION: Take photos of fast moving + * objects (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_NIGHT_PORTRAIT: Take people pictures + * at night (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_THEATRE: Take photos in a theater (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_BEACH: Take pictures on the beach (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_SNOW: Take pictures on the snow (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_SUNSET: Take sunset photos (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_STEADY_PHOTO: Avoid blurry pictures + * (for example, due to hand shake) (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_FIREWORKS: For shooting firework + * displays (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_PARTY: Take indoor low-light shot (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_CANDLELIGHT: Capture the naturally warm color + * of scenes lit by candles (Since 1.2) + * @GST_PHOTOGRAPHY_SCENE_MODE_BARCODE: Applications are looking for + * a barcode (Since 1.2) + * + * Each mode contains preset #GstPhotography options in order to produce + * good capturing result in certain scene. + */ +typedef enum +{ + GST_PHOTOGRAPHY_SCENE_MODE_MANUAL = 0, + GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP, + GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT, + GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE, + GST_PHOTOGRAPHY_SCENE_MODE_SPORT, + GST_PHOTOGRAPHY_SCENE_MODE_NIGHT, + GST_PHOTOGRAPHY_SCENE_MODE_AUTO, + GST_PHOTOGRAPHY_SCENE_MODE_ACTION, + GST_PHOTOGRAPHY_SCENE_MODE_NIGHT_PORTRAIT, + GST_PHOTOGRAPHY_SCENE_MODE_THEATRE, + GST_PHOTOGRAPHY_SCENE_MODE_BEACH, + GST_PHOTOGRAPHY_SCENE_MODE_SNOW, + GST_PHOTOGRAPHY_SCENE_MODE_SUNSET, + GST_PHOTOGRAPHY_SCENE_MODE_STEADY_PHOTO, + GST_PHOTOGRAPHY_SCENE_MODE_FIREWORKS, + GST_PHOTOGRAPHY_SCENE_MODE_PARTY, + GST_PHOTOGRAPHY_SCENE_MODE_CANDLELIGHT, + GST_PHOTOGRAPHY_SCENE_MODE_BARCODE +} GstPhotographySceneMode; + +/** + * GstPhotographyFlashMode: + * @GST_PHOTOGRAPHY_FLASH_MODE_AUTO: Fire flash automatically according to + * lighting conditions. + * @GST_PHOTOGRAPHY_FLASH_MODE_OFF: Never fire flash + * @GST_PHOTOGRAPHY_FLASH_MODE_ON: Always fire flash + * @GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN: Fill in flash + * @GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE: Flash mode for reducing chance of + * capturing red eyes + * + * Modes for flash control. + */ +typedef enum +{ + GST_PHOTOGRAPHY_FLASH_MODE_AUTO = 0, + GST_PHOTOGRAPHY_FLASH_MODE_OFF, + GST_PHOTOGRAPHY_FLASH_MODE_ON, + GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN, + GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE +} GstPhotographyFlashMode; + +/** + * GstPhotographyFocusStatus: + * @GST_PHOTOGRAPHY_FOCUS_STATUS_NONE: No status available + * @GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING: Focusing is ongoing + * @GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL: Focusing failed + * @GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS: Focusing succeeded + * + * Status of the focusing operation, used in #GST_PHOTOGRAPHY_AUTOFOCUS_DONE + * message. + */ +typedef enum +{ + GST_PHOTOGRAPHY_FOCUS_STATUS_NONE = 0, + GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING, + GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL, + GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS +} GstPhotographyFocusStatus; + +/** + * GstPhotographyCaps: + * + * Bitmask that indicates which #GstPhotography interface features an instance + * supports. + */ +typedef enum +{ + GST_PHOTOGRAPHY_CAPS_NONE = (0 << 0), + GST_PHOTOGRAPHY_CAPS_EV_COMP = (1 << 0), + GST_PHOTOGRAPHY_CAPS_ISO_SPEED = (1 << 1), + GST_PHOTOGRAPHY_CAPS_WB_MODE = (1 << 2), + GST_PHOTOGRAPHY_CAPS_TONE = (1 << 3), + GST_PHOTOGRAPHY_CAPS_SCENE = (1 << 4), + GST_PHOTOGRAPHY_CAPS_FLASH = (1 << 5), + GST_PHOTOGRAPHY_CAPS_ZOOM = (1 << 6), + GST_PHOTOGRAPHY_CAPS_FOCUS = (1 << 7), + GST_PHOTOGRAPHY_CAPS_APERTURE = (1 << 8), + GST_PHOTOGRAPHY_CAPS_EXPOSURE = (1 << 9), + GST_PHOTOGRAPHY_CAPS_SHAKE = (1 << 10), + GST_PHOTOGRAPHY_CAPS_WHITE_BALANCE = (1 << 11), + GST_PHOTOGRAPHY_CAPS_NOISE_REDUCTION = (1 << 12), + GST_PHOTOGRAPHY_CAPS_FLICKER_REDUCTION = (1 << 13), + GST_PHOTOGRAPHY_CAPS_ALL = (~0) +} GstPhotographyCaps; + +/** + * GstPhotographyShakeRisk: + * @GST_PHOTOGRAPHY_SHAKE_RISK_LOW: Low risk + * @GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM: Medium risk + * @GST_PHOTOGRAPHY_SHAKE_RISK_HIGH: High risk + * + * Risk level of captured image becoming "shaken" due to camera movement and + * too long exposure time. Used in #GST_PHOTOGRAPHY_SHAKE_RISK #GstMessage. + */ +typedef enum +{ + GST_PHOTOGRAPHY_SHAKE_RISK_LOW = 0, + GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM, + GST_PHOTOGRAPHY_SHAKE_RISK_HIGH, +} GstPhotographyShakeRisk; + +/** + * GstPhotographyFlickerReductionMode: + * @GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF: Disable flicker reduction + * @GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ: 50Hz flicker reduction + * @GST_PHOTOGRAPHY_FLICKER_REDUCTION_60HZ: 60Hz flicker reduction + * @GST_PHOTOGRAPHY_FLICKER_REDUCTION_AUTO: Choose mode automatically + * + * Reduce flicker in video caused by light source fluctuation. + */ +typedef enum +{ + GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF = 0, + GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ, + GST_PHOTOGRAPHY_FLICKER_REDUCTION_60HZ, + GST_PHOTOGRAPHY_FLICKER_REDUCTION_AUTO, +} GstPhotographyFlickerReductionMode; + +/** + * GstPhotographyFocusMode: + * @GST_PHOTOGRAPHY_FOCUS_MODE_AUTO: Choose focus mode automatically + * @GST_PHOTOGRAPHY_FOCUS_MODE_MACRO: Mode for focusing objects close to lens + * @GST_PHOTOGRAPHY_FOCUS_MODE_PORTRAIT: Mode for portraits + * @GST_PHOTOGRAPHY_FOCUS_MODE_INFINITY: Mode for landscapes and far away objects + * @GST_PHOTOGRAPHY_FOCUS_MODE_HYPERFOCAL: Mode for maximum depth of field, keeping + * focus acceptable both in infinify and as close objects as possible + * @GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED: Extended focus mode + * @GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL: Continuous autofocus mode + * @GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED: Extended continuous + * autofocus mode + * @GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL: Disable automatic focusing + * and keep current value. #GstPhotography:lens-focus property can + * be used to change focus manually. + * + * Choose mode for focusing algorithm. + */ +typedef enum { + GST_PHOTOGRAPHY_FOCUS_MODE_AUTO = 0, + GST_PHOTOGRAPHY_FOCUS_MODE_MACRO, + GST_PHOTOGRAPHY_FOCUS_MODE_PORTRAIT, + GST_PHOTOGRAPHY_FOCUS_MODE_INFINITY, + GST_PHOTOGRAPHY_FOCUS_MODE_HYPERFOCAL, + GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED, + GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL, + GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED, + GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL +} GstPhotographyFocusMode; + +/** + * GstPhotographyExposureMode: + * @GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO: Adjust exposure automatically + * @GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL: Disable automatic exposure adjustment + * and keep current values. + * + */ +typedef enum { + GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO = 0, + GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL +} GstPhotographyExposureMode; + +/** + * GstPhotographySettings: + * + * Structure containing all #GstPhotography settings, used to set all + * settings in one call with @gst_photography_set_config(). + */ +typedef struct +{ + GstPhotographyWhiteBalanceMode wb_mode; + GstPhotographyColorToneMode tone_mode; + GstPhotographySceneMode scene_mode; + GstPhotographyFlashMode flash_mode; + guint32 exposure_time; + guint aperture; + gfloat ev_compensation; + guint iso_speed; + gfloat zoom; + GstPhotographyFlickerReductionMode flicker_mode; + GstPhotographyFocusMode focus_mode; + GstPhotographyNoiseReduction noise_reduction; + GstPhotographyExposureMode exposure_mode; + guint color_temperature; + guint white_point[MAX_WHITE_POINT_VALUES]; + gfloat analog_gain; + gfloat lens_focus; + guint min_exposure_time; + guint max_exposure_time; +} GstPhotographySettings; + +/** + * GstPhotographyCapturePrepared: + * @data: user data that has been given, when registering the callback + * @configured_caps: #GstCaps defining the configured capture format. + * Ownership of these caps stays in the element. + * + * This callback will be called when the element has finished preparations + * and is ready for image capture. The next buffer that element produces + * will be of @configured_caps format, so this callback allows the application + * to e.g. reconfigure capsfilters in pipeline if any. + */ +typedef void (*GstPhotographyCapturePrepared) (gpointer data, + const GstCaps *configured_caps); + +/** + * GstPhotographyInterface: + * @parent: parent interface type. + * @get_ev_compensation: vmethod to get ev exposure compensation value + * @get_iso_speed: vmethod to get iso speed (light sensitivity) value + * @get_aperture: vmethod to get aperture value + * @get_exposure: vmethod to get exposure time value + * @get_white_balance_mode: vmethod to get white balance mode value + * @get_color_tone_mode: vmethod to get color tone mode value + * @get_scene_mode: vmethod to get scene mode value + * @get_flash_mode: vmethod to get flash mode value + * @get_noise_reduction: vmethod to get noise reduction mode value + * @get_zoom: vmethod to get zoom factor value + * @set_ev_compensation: vmethod to set ev exposure compensation value + * @set_iso_speed: vmethod to set iso speed (light sensitivity) value + * @set_aperture: vmethod to set aperture value + * @set_exposure: vmethod to set exposure time value + * @set_white_balance_mode: vmethod to set white balance mode value + * @set_color_tone_mode: vmethod to set color tone mode value + * @set_scene_mode: vmethod to set scene mode value + * @set_flash_mode: vmethod to set flash mode value + * @set_noise_reduction: vmethod to set noise reduction mode value + * @set_zoom: vmethod to set zoom factor value + * @get_capabilities: vmethod to get supported capabilities of the interface + * @prepare_for_capture: vmethod to tell the element to prepare for capturing + * @set_autofocus: vmethod to set autofocus on/off + * @set_config: vmethod to set all configuration parameters at once + * @get_config: vmethod to get all configuration parameters at once + * @get_image_capture_supported_caps: vmethod to get caps describing supported image capture formats + * + * #GstPhotographyInterface interface. + */ +typedef struct _GstPhotographyInterface +{ + GTypeInterface parent; + + /* virtual functions */ + gboolean (*get_ev_compensation) (GstPhotography * photo, gfloat * ev_comp); + gboolean (*get_iso_speed) (GstPhotography * photo, guint * iso_speed); + gboolean (*get_aperture) (GstPhotography * photo, guint * aperture); + gboolean (*get_exposure) (GstPhotography * photo, guint32 * exposure); + gboolean (*get_white_balance_mode) (GstPhotography * photo, + GstPhotographyWhiteBalanceMode * wb_mode); + gboolean (*get_color_tone_mode) (GstPhotography * photo, + GstPhotographyColorToneMode * tone_mode); + gboolean (*get_scene_mode) (GstPhotography * photo, + GstPhotographySceneMode * scene_mode); + gboolean (*get_flash_mode) (GstPhotography * photo, + GstPhotographyFlashMode * flash_mode); + gboolean (*get_zoom) (GstPhotography * photo, gfloat * zoom); + gboolean (*get_flicker_mode) (GstPhotography * photo, + GstPhotographyFlickerReductionMode * flicker_mode); + gboolean (*get_focus_mode) (GstPhotography * photo, + GstPhotographyFocusMode * focus_mode); + + gboolean (*set_ev_compensation) (GstPhotography * photo, gfloat ev_comp); + gboolean (*set_iso_speed) (GstPhotography * photo, guint iso_speed); + gboolean (*set_aperture) (GstPhotography * photo, guint aperture); + gboolean (*set_exposure) (GstPhotography * photo, guint32 exposure); + gboolean (*set_white_balance_mode) (GstPhotography * photo, + GstPhotographyWhiteBalanceMode wb_mode); + gboolean (*set_color_tone_mode) (GstPhotography * photo, + GstPhotographyColorToneMode tone_mode); + gboolean (*set_scene_mode) (GstPhotography * photo, + GstPhotographySceneMode scene_mode); + gboolean (*set_flash_mode) (GstPhotography * photo, + GstPhotographyFlashMode flash_mode); + gboolean (*set_zoom) (GstPhotography * photo, gfloat zoom); + gboolean (*set_flicker_mode) (GstPhotography * photo, + GstPhotographyFlickerReductionMode flicker_mode); + gboolean (*set_focus_mode) (GstPhotography * photo, + GstPhotographyFocusMode focus_mode); + + GstPhotographyCaps (*get_capabilities) (GstPhotography * photo); + gboolean (*prepare_for_capture) (GstPhotography * photo, + GstPhotographyCapturePrepared func, GstCaps *capture_caps, gpointer user_data); + void (*set_autofocus) (GstPhotography * photo, gboolean on); + gboolean (*set_config) (GstPhotography * photo, GstPhotographySettings * config); + gboolean (*get_config) (GstPhotography * photo, GstPhotographySettings * config); + + gboolean (*get_noise_reduction) (GstPhotography * photo, + GstPhotographyNoiseReduction * noise_reduction); + gboolean (*set_noise_reduction) (GstPhotography * photo, + GstPhotographyNoiseReduction noise_reduction); + + /*< private > */ + gpointer _gst_reserved[GST_PADDING]; +} GstPhotographyInterface; + +GType gst_photography_get_type (void); + +/* virtual class function wrappers */ +gboolean gst_photography_get_ev_compensation (GstPhotography * photo, + gfloat * ev_comp); +gboolean gst_photography_get_iso_speed (GstPhotography * photo, + guint * iso_speed); +gboolean gst_photography_get_aperture (GstPhotography * photo, + guint * aperture); +gboolean gst_photography_get_exposure (GstPhotography * photo, + guint32 * exposure); +gboolean gst_photography_get_white_balance_mode (GstPhotography * photo, + GstPhotographyWhiteBalanceMode * wb_mode); +gboolean gst_photography_get_color_tone_mode (GstPhotography * photo, + GstPhotographyColorToneMode * tone_mode); +gboolean gst_photography_get_scene_mode (GstPhotography * photo, + GstPhotographySceneMode * scene_mode); +gboolean gst_photography_get_flash_mode (GstPhotography * photo, + GstPhotographyFlashMode * flash_mode); +gboolean gst_photography_get_noise_reduction (GstPhotography * photo, + GstPhotographyNoiseReduction * noise_reduction); +gboolean gst_photography_get_zoom (GstPhotography * photo, gfloat * zoom); +gboolean gst_photography_get_flicker_mode (GstPhotography * photo, + GstPhotographyFlickerReductionMode *mode); +gboolean gst_photography_get_focus_mode (GstPhotography * photo, + GstPhotographyFocusMode *mode); + +gboolean gst_photography_set_ev_compensation (GstPhotography * photo, + gfloat ev_comp); +gboolean gst_photography_set_iso_speed (GstPhotography * photo, + guint iso_speed); +gboolean gst_photography_set_aperture (GstPhotography * photo, guint aperture); +gboolean gst_photography_set_exposure (GstPhotography * photo, guint exposure); +gboolean gst_photography_set_white_balance_mode (GstPhotography * photo, + GstPhotographyWhiteBalanceMode wb_mode); +gboolean gst_photography_set_color_tone_mode (GstPhotography * photo, + GstPhotographyColorToneMode tone_mode); +gboolean gst_photography_set_scene_mode (GstPhotography * photo, + GstPhotographySceneMode scene_mode); +gboolean gst_photography_set_flash_mode (GstPhotography * photo, + GstPhotographyFlashMode flash_mode); +gboolean gst_photography_set_noise_reduction (GstPhotography * photo, + GstPhotographyNoiseReduction noise_reduction); +gboolean gst_photography_set_zoom (GstPhotography * photo, gfloat zoom); +gboolean gst_photography_set_flicker_mode (GstPhotography * photo, + GstPhotographyFlickerReductionMode mode); +gboolean gst_photography_set_focus_mode (GstPhotography * photo, + GstPhotographyFocusMode mode); + +GstPhotographyCaps gst_photography_get_capabilities (GstPhotography * photo); + +gboolean gst_photography_prepare_for_capture (GstPhotography * photo, + GstPhotographyCapturePrepared func, GstCaps *capture_caps, gpointer user_data); + +void gst_photography_set_autofocus (GstPhotography * photo, gboolean on); + +gboolean gst_photography_set_config (GstPhotography * photo, + GstPhotographySettings * config); +gboolean gst_photography_get_config (GstPhotography * photo, + GstPhotographySettings * config); + +G_END_DECLS + +#endif /* __GST_PHOTOGRAPHY_H__ */ debian/patches/import-jpegformat0000664000000000000000000031452312211615043014213 0ustar Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -358,6 +358,7 @@ AG_GST_CHECK_PLUGIN(imagefreeze) AG_GST_CHECK_PLUGIN(interleave) AG_GST_CHECK_PLUGIN(isomp4) +AG_GST_CHECK_PLUGIN(jpegformat) AG_GST_CHECK_PLUGIN(law) AG_GST_CHECK_PLUGIN(level) AG_GST_CHECK_PLUGIN(matroska) @@ -1158,6 +1159,7 @@ gst/imagefreeze/Makefile gst/interleave/Makefile gst/isomp4/Makefile +gst/jpegformat/Makefile gst/law/Makefile gst/level/Makefile gst/matroska/Makefile Index: b/gst/jpegformat/gstjifmux.c =================================================================== --- /dev/null +++ b/gst/jpegformat/gstjifmux.c @@ -0,0 +1,777 @@ +/* GStreamer + * + * jifmux: JPEG interchange format muxer + * + * Copyright (C) 2010 Stefan Kost + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:element-jifmux + * @short_description: JPEG interchange format writer + * + * Writes a JPEG image as JPEG/EXIF or JPEG/JFIF including various metadata. The + * jpeg image received on the sink pad should be minimal (e.g. should not + * contain metadata already). + * + * + * Example launch line + * |[ + * gst-launch -v videotestsrc num-buffers=1 ! jpegenc ! jifmux ! filesink location=... + * ]| + * The above pipeline renders a frame, encodes to jpeg, adds metadata and writes + * it to disk. + * + */ +/* +jpeg interchange format: +file header : SOI, APPn{JFIF,EXIF,...} +frame header: DQT, SOF +scan header : {DAC,DHT},DRI,SOS + +file trailer: EOI + +tests: +gst-launch videotestsrc num-buffers=1 ! jpegenc ! jifmux ! filesink location=test1.jpeg +gst-launch videotestsrc num-buffers=1 ! jpegenc ! taginject tags="comment=\"test image\"" ! jifmux ! filesink location=test2.jpeg +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include + +#include "gstjifmux.h" + +static GstStaticPadTemplate gst_jif_mux_src_pad_template = +GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("image/jpeg") + ); + +static GstStaticPadTemplate gst_jif_mux_sink_pad_template = +GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("image/jpeg") + ); + +GST_DEBUG_CATEGORY_STATIC (jif_mux_debug); +#define GST_CAT_DEFAULT jif_mux_debug + +#define COLORSPACE_UNKNOWN (0 << 0) +#define COLORSPACE_GRAYSCALE (1 << 0) +#define COLORSPACE_YUV (1 << 1) +#define COLORSPACE_RGB (1 << 2) +#define COLORSPACE_CMYK (1 << 3) +#define COLORSPACE_YCCK (1 << 4) + +typedef struct _GstJifMuxMarker +{ + guint8 marker; + guint16 size; + + const guint8 *data; + gboolean owned; +} GstJifMuxMarker; + +struct _GstJifMuxPrivate +{ + GstPad *srcpad; + + /* list of GstJifMuxMarker */ + GList *markers; + guint scan_size; + const guint8 *scan_data; +}; + +static void gst_jif_mux_finalize (GObject * object); + +static void gst_jif_mux_reset (GstJifMux * self); +static gboolean gst_jif_mux_sink_setcaps (GstJifMux * self, GstCaps * caps); +static gboolean gst_jif_mux_sink_event (GstPad * pad, GstObject * parent, + GstEvent * event); +static GstFlowReturn gst_jif_mux_chain (GstPad * pad, GstObject * parent, + GstBuffer * buffer); +static GstStateChangeReturn gst_jif_mux_change_state (GstElement * element, + GstStateChange transition); + +#define gst_jif_mux_parent_class parent_class +G_DEFINE_TYPE_WITH_CODE (GstJifMux, gst_jif_mux, GST_TYPE_ELEMENT, + G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL); + G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_XMP_WRITER, NULL)); + +static void +gst_jif_mux_class_init (GstJifMuxClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + gobject_class = (GObjectClass *) klass; + gstelement_class = (GstElementClass *) klass; + + g_type_class_add_private (gobject_class, sizeof (GstJifMuxPrivate)); + + gobject_class->finalize = gst_jif_mux_finalize; + + gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_jif_mux_change_state); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&gst_jif_mux_src_pad_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&gst_jif_mux_sink_pad_template)); + + gst_element_class_set_static_metadata (gstelement_class, + "JPEG stream muxer", + "Video/Formatter", + "Remuxes JPEG images with markers and tags", + "Arnout Vandecappelle (Essensium/Mind) "); + + GST_DEBUG_CATEGORY_INIT (jif_mux_debug, "jifmux", 0, + "JPEG interchange format muxer"); +} + +static void +gst_jif_mux_init (GstJifMux * self) +{ + GstPad *sinkpad; + + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GST_TYPE_JIF_MUX, + GstJifMuxPrivate); + + /* create the sink and src pads */ + sinkpad = gst_pad_new_from_static_template (&gst_jif_mux_sink_pad_template, + "sink"); + gst_pad_set_chain_function (sinkpad, GST_DEBUG_FUNCPTR (gst_jif_mux_chain)); + gst_pad_set_event_function (sinkpad, + GST_DEBUG_FUNCPTR (gst_jif_mux_sink_event)); + gst_element_add_pad (GST_ELEMENT (self), sinkpad); + + self->priv->srcpad = + gst_pad_new_from_static_template (&gst_jif_mux_src_pad_template, "src"); + gst_element_add_pad (GST_ELEMENT (self), self->priv->srcpad); +} + +static void +gst_jif_mux_finalize (GObject * object) +{ + GstJifMux *self = GST_JIF_MUX (object); + + gst_jif_mux_reset (self); + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static gboolean +gst_jif_mux_sink_setcaps (GstJifMux * self, GstCaps * caps) +{ + GstStructure *s = gst_caps_get_structure (caps, 0); + const gchar *variant; + + /* should be {combined (default), EXIF, JFIF} */ + if ((variant = gst_structure_get_string (s, "variant")) != NULL) { + GST_INFO_OBJECT (self, "muxing to '%s'", variant); + /* FIXME: do we want to switch it like this or use a gobject property ? */ + } + + return gst_pad_set_caps (self->priv->srcpad, caps); +} + +static gboolean +gst_jif_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) +{ + GstJifMux *self = GST_JIF_MUX (parent); + gboolean ret; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CAPS: + { + GstCaps *caps; + + gst_event_parse_caps (event, &caps); + ret = gst_jif_mux_sink_setcaps (self, caps); + gst_event_unref (event); + break; + } + case GST_EVENT_TAG:{ + GstTagList *list; + GstTagSetter *setter = GST_TAG_SETTER (self); + const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter); + + gst_event_parse_tag (event, &list); + + gst_tag_setter_merge_tags (setter, list, mode); + + ret = gst_pad_event_default (pad, parent, event); + break; + } + default: + ret = gst_pad_event_default (pad, parent, event); + break; + } + return ret; +} + +static void +gst_jif_mux_marker_free (GstJifMuxMarker * m) +{ + if (m->owned) + g_free ((gpointer) m->data); + + g_slice_free (GstJifMuxMarker, m); +} + +static void +gst_jif_mux_reset (GstJifMux * self) +{ + GList *node; + GstJifMuxMarker *m; + + for (node = self->priv->markers; node; node = g_list_next (node)) { + m = (GstJifMuxMarker *) node->data; + gst_jif_mux_marker_free (m); + } + g_list_free (self->priv->markers); + self->priv->markers = NULL; +} + +static GstJifMuxMarker * +gst_jif_mux_new_marker (guint8 marker, guint16 size, const guint8 * data, + gboolean owned) +{ + GstJifMuxMarker *m = g_slice_new (GstJifMuxMarker); + + m->marker = marker; + m->size = size; + m->data = data; + m->owned = owned; + + return m; +} + +static gboolean +gst_jif_mux_parse_image (GstJifMux * self, GstBuffer * buf) +{ + GstByteReader reader; + GstJifMuxMarker *m; + guint8 marker = 0; + guint16 size = 0; + const guint8 *data = NULL; + GstMapInfo map; + + gst_buffer_map (buf, &map, GST_MAP_READ); + gst_byte_reader_init (&reader, map.data, map.size); + + GST_LOG_OBJECT (self, "Received buffer of size: %" G_GSIZE_FORMAT, map.size); + + if (!gst_byte_reader_peek_uint8 (&reader, &marker)) + goto error; + + while (marker == 0xff) { + if (!gst_byte_reader_skip (&reader, 1)) + goto error; + + if (!gst_byte_reader_get_uint8 (&reader, &marker)) + goto error; + + switch (marker) { + case RST0: + case RST1: + case RST2: + case RST3: + case RST4: + case RST5: + case RST6: + case RST7: + case SOI: + GST_DEBUG_OBJECT (self, "marker = %x", marker); + m = gst_jif_mux_new_marker (marker, 0, NULL, FALSE); + self->priv->markers = g_list_prepend (self->priv->markers, m); + break; + case EOI: + GST_DEBUG_OBJECT (self, "marker = %x", marker); + m = gst_jif_mux_new_marker (marker, 0, NULL, FALSE); + self->priv->markers = g_list_prepend (self->priv->markers, m); + goto done; + break; + default: + if (!gst_byte_reader_get_uint16_be (&reader, &size)) + goto error; + if (!gst_byte_reader_get_data (&reader, size - 2, &data)) + goto error; + + m = gst_jif_mux_new_marker (marker, size - 2, data, FALSE); + self->priv->markers = g_list_prepend (self->priv->markers, m); + + GST_DEBUG_OBJECT (self, "marker = %2x, size = %u", marker, size); + break; + } + + if (marker == SOS) { + gint eoi_pos = -1; + gint i; + + /* search the last 5 bytes for the EOI marker */ + g_assert (map.size >= 5); + for (i = 5; i >= 2; i--) { + if (map.data[map.size - i] == 0xFF && map.data[map.size - i + 1] == EOI) { + eoi_pos = map.size - i; + break; + } + } + if (eoi_pos == -1) { + GST_WARNING_OBJECT (self, "Couldn't find an EOI marker"); + eoi_pos = map.size; + } + + /* remaining size except EOI is scan data */ + self->priv->scan_size = eoi_pos - gst_byte_reader_get_pos (&reader); + if (!gst_byte_reader_get_data (&reader, self->priv->scan_size, + &self->priv->scan_data)) + goto error; + + GST_DEBUG_OBJECT (self, "scan data, size = %u", self->priv->scan_size); + } + + if (!gst_byte_reader_peek_uint8 (&reader, &marker)) + goto error; + } + GST_INFO_OBJECT (self, "done parsing at 0x%x / 0x%x", + gst_byte_reader_get_pos (&reader), (guint) map.size); + +done: + self->priv->markers = g_list_reverse (self->priv->markers); + gst_buffer_unmap (buf, &map); + + return TRUE; + + /* ERRORS */ +error: + { + GST_WARNING_OBJECT (self, + "Error parsing image header (need more that %u bytes available)", + gst_byte_reader_get_remaining (&reader)); + gst_buffer_unmap (buf, &map); + return FALSE; + } +} + +static gboolean +gst_jif_mux_mangle_markers (GstJifMux * self) +{ + gboolean modified = FALSE; + GstTagList *tags = NULL; + gboolean cleanup_tags; + GstJifMuxMarker *m; + GList *node, *file_hdr = NULL, *frame_hdr = NULL, *scan_hdr = NULL; + GList *app0_jfif = NULL, *app1_exif = NULL, *app1_xmp = NULL, *com = NULL; + GstBuffer *xmp_data; + gchar *str = NULL; + gint colorspace = COLORSPACE_UNKNOWN; + + /* update the APP markers + * - put any JFIF APP0 first + * - the Exif APP1 next, + * - the XMP APP1 next, + * - the PSIR APP13 next, + * - followed by all other marker segments + */ + + /* find some reference points where we insert before/after */ + file_hdr = self->priv->markers; + for (node = self->priv->markers; node; node = g_list_next (node)) { + m = (GstJifMuxMarker *) node->data; + + switch (m->marker) { + case APP0: + if (m->size > 5 && !memcmp (m->data, "JFIF\0", 5)) { + GST_DEBUG_OBJECT (self, "found APP0 JFIF"); + colorspace |= COLORSPACE_GRAYSCALE | COLORSPACE_YUV; + if (!app0_jfif) + app0_jfif = node; + } + break; + case APP1: + if (m->size > 6 && (!memcmp (m->data, "EXIF\0\0", 6) || + !memcmp (m->data, "Exif\0\0", 6))) { + GST_DEBUG_OBJECT (self, "found APP1 EXIF"); + if (!app1_exif) + app1_exif = node; + } else if (m->size > 29 + && !memcmp (m->data, "http://ns.adobe.com/xap/1.0/\0", 29)) { + GST_INFO_OBJECT (self, "found APP1 XMP, will be replaced"); + if (!app1_xmp) + app1_xmp = node; + } + break; + case APP14: + /* check if this contains RGB */ + /* + * This marker should have: + * - 'Adobe\0' + * - 2 bytes DCTEncodeVersion + * - 2 bytes flags0 + * - 2 bytes flags1 + * - 1 byte ColorTransform + * - 0 means unknown (RGB or CMYK) + * - 1 YCbCr + * - 2 YCCK + */ + + if ((m->size >= 14) + && (strncmp ((gchar *) m->data, "Adobe\0", 6) == 0)) { + switch (m->data[11]) { + case 0: + colorspace |= COLORSPACE_RGB | COLORSPACE_CMYK; + break; + case 1: + colorspace |= COLORSPACE_YUV; + break; + case 2: + colorspace |= COLORSPACE_YCCK; + break; + default: + break; + } + } + + break; + case COM: + GST_INFO_OBJECT (self, "found COM, will be replaced"); + if (!com) + com = node; + break; + case DQT: + case SOF0: + case SOF1: + case SOF2: + case SOF3: + case SOF5: + case SOF6: + case SOF7: + case SOF9: + case SOF10: + case SOF11: + case SOF13: + case SOF14: + case SOF15: + if (!frame_hdr) + frame_hdr = node; + break; + case DAC: + case DHT: + case DRI: + case SOS: + if (!scan_hdr) + scan_hdr = node; + break; + } + } + + /* if we want combined or JFIF */ + /* check if we don't have JFIF APP0 */ + if (!app0_jfif && (colorspace & (COLORSPACE_GRAYSCALE | COLORSPACE_YUV))) { + /* build jfif header */ + static const struct + { + gchar id[5]; + guint8 ver[2]; + guint8 du; + guint8 xd[2], yd[2]; + guint8 tw, th; + } jfif_data = { + "JFIF", { + 1, 2}, 0, { + 0, 1}, /* FIXME: check pixel-aspect from caps */ + { + 0, 1}, 0, 0}; + m = gst_jif_mux_new_marker (APP0, sizeof (jfif_data), + (const guint8 *) &jfif_data, FALSE); + /* insert into self->markers list */ + self->priv->markers = g_list_insert (self->priv->markers, m, 1); + app0_jfif = g_list_nth (self->priv->markers, 1); + } + /* else */ + /* remove JFIF if exists */ + + /* Existing exif tags will be removed and our own will be added */ + if (!tags) { + tags = (GstTagList *) gst_tag_setter_get_tag_list (GST_TAG_SETTER (self)); + cleanup_tags = FALSE; + } + if (!tags) { + tags = gst_tag_list_new_empty (); + cleanup_tags = TRUE; + } + + GST_DEBUG_OBJECT (self, "Tags to be serialized %" GST_PTR_FORMAT, tags); + + /* FIXME: not happy with those + * - else where we would use VIDEO_CODEC = "Jpeg" + gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, + GST_TAG_VIDEO_CODEC, "image/jpeg", NULL); + */ + + /* Add EXIF */ + { + GstBuffer *exif_data; + gsize exif_size; + guint8 *data; + GstJifMuxMarker *m; + GList *pos; + + /* insert into self->markers list */ + exif_data = gst_tag_list_to_exif_buffer_with_tiff_header (tags); + exif_size = exif_data ? gst_buffer_get_size (exif_data) : 0; + + if (exif_data && exif_size + 8 >= G_GUINT64_CONSTANT (65536)) { + GST_WARNING_OBJECT (self, "Exif tags data size exceed maximum size"); + gst_buffer_unref (exif_data); + exif_data = NULL; + } + if (exif_data) { + data = g_malloc0 (exif_size + 6); + memcpy (data, "Exif", 4); + gst_buffer_extract (exif_data, 0, data + 6, exif_size); + m = gst_jif_mux_new_marker (APP1, exif_size + 6, data, TRUE); + gst_buffer_unref (exif_data); + + if (app1_exif) { + gst_jif_mux_marker_free ((GstJifMuxMarker *) app1_exif->data); + app1_exif->data = m; + } else { + pos = file_hdr; + if (app0_jfif) + pos = app0_jfif; + pos = g_list_next (pos); + + self->priv->markers = + g_list_insert_before (self->priv->markers, pos, m); + if (pos) { + app1_exif = g_list_previous (pos); + } else { + app1_exif = g_list_last (self->priv->markers); + } + } + modified = TRUE; + } + } + + /* add xmp */ + xmp_data = + gst_tag_xmp_writer_tag_list_to_xmp_buffer (GST_TAG_XMP_WRITER (self), + tags, FALSE); + if (xmp_data) { + guint8 *data; + gsize size; + GList *pos; + + size = gst_buffer_get_size (xmp_data); + data = g_malloc (size + 29); + memcpy (data, "http://ns.adobe.com/xap/1.0/\0", 29); + gst_buffer_extract (xmp_data, 0, &data[29], size); + m = gst_jif_mux_new_marker (APP1, size + 29, data, TRUE); + + /* + * Replace the old xmp marker and not add a new one. + * There shouldn't be a xmp packet in the input, but it is better + * to be safe than add another one and end up with 2 packets. + */ + if (app1_xmp) { + gst_jif_mux_marker_free ((GstJifMuxMarker *) app1_xmp->data); + app1_xmp->data = m; + } else { + + pos = file_hdr; + if (app1_exif) + pos = app1_exif; + else if (app0_jfif) + pos = app0_jfif; + pos = g_list_next (pos); + + self->priv->markers = g_list_insert_before (self->priv->markers, pos, m); + + } + gst_buffer_unref (xmp_data); + modified = TRUE; + } + + /* add jpeg comment from any of those */ + (void) (gst_tag_list_get_string (tags, GST_TAG_COMMENT, &str) || + gst_tag_list_get_string (tags, GST_TAG_DESCRIPTION, &str) || + gst_tag_list_get_string (tags, GST_TAG_TITLE, &str)); + + if (str) { + GST_DEBUG_OBJECT (self, "set COM marker to '%s'", str); + /* insert new marker into self->markers list */ + m = gst_jif_mux_new_marker (COM, strlen (str) + 1, (const guint8 *) str, + TRUE); + /* FIXME: if we have one already, replace */ + /* this should go before SOS, maybe at the end of file-header */ + self->priv->markers = g_list_insert_before (self->priv->markers, + frame_hdr, m); + + modified = TRUE; + } + + if (tags && cleanup_tags) + gst_tag_list_unref (tags); + return modified; +} + +static GstFlowReturn +gst_jif_mux_recombine_image (GstJifMux * self, GstBuffer ** new_buf, + GstBuffer * old_buf) +{ + GstBuffer *buf; + GstByteWriter *writer; + GstJifMuxMarker *m; + GList *node; + guint size = self->priv->scan_size; + gboolean writer_status = TRUE; + GstMapInfo map; + + /* iterate list and collect size */ + for (node = self->priv->markers; node; node = g_list_next (node)) { + m = (GstJifMuxMarker *) node->data; + + /* some markers like e.g. SOI are empty */ + if (m->size) { + size += 2 + m->size; + } + /* 0xff */ + size += 2; + } + GST_INFO_OBJECT (self, "old size: %" G_GSIZE_FORMAT ", new size: %u", + gst_buffer_get_size (old_buf), size); + + /* allocate new buffer */ + buf = gst_buffer_new_allocate (NULL, size, NULL); + + /* copy buffer metadata */ + gst_buffer_copy_into (buf, old_buf, + GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1); + + /* memcopy markers */ + gst_buffer_map (buf, &map, GST_MAP_WRITE); + writer = gst_byte_writer_new_with_data (map.data, map.size, TRUE); + + for (node = self->priv->markers; node && writer_status; + node = g_list_next (node)) { + m = (GstJifMuxMarker *) node->data; + + writer_status &= gst_byte_writer_put_uint8 (writer, 0xff); + writer_status &= gst_byte_writer_put_uint8 (writer, m->marker); + + GST_DEBUG_OBJECT (self, "marker = %2x, size = %u", m->marker, m->size + 2); + + if (m->size) { + writer_status &= gst_byte_writer_put_uint16_be (writer, m->size + 2); + writer_status &= gst_byte_writer_put_data (writer, m->data, m->size); + } + + if (m->marker == SOS) { + GST_DEBUG_OBJECT (self, "scan data, size = %u", self->priv->scan_size); + writer_status &= + gst_byte_writer_put_data (writer, self->priv->scan_data, + self->priv->scan_size); + } + } + gst_buffer_unmap (buf, &map); + gst_byte_writer_free (writer); + + if (!writer_status) { + GST_WARNING_OBJECT (self, "Failed to write to buffer, calculated size " + "was probably too short"); + g_assert_not_reached (); + } + + *new_buf = buf; + return GST_FLOW_OK; +} + +static GstFlowReturn +gst_jif_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) +{ + GstJifMux *self = GST_JIF_MUX (parent); + GstFlowReturn fret = GST_FLOW_OK; + +#if 0 + GST_MEMDUMP ("jpeg beg", GST_BUFFER_DATA (buf), 64); + GST_MEMDUMP ("jpeg end", GST_BUFFER_DATA (buf) + GST_BUFFER_SIZE (buf) - 64, + 64); +#endif + + /* we should have received a whole picture from SOI to EOI + * build a list of markers */ + if (gst_jif_mux_parse_image (self, buf)) { + /* modify marker list */ + if (gst_jif_mux_mangle_markers (self)) { + /* the list was changed, remux */ + GstBuffer *old = buf; + fret = gst_jif_mux_recombine_image (self, &buf, old); + gst_buffer_unref (old); + } + } + + /* free the marker list */ + gst_jif_mux_reset (self); + + if (fret == GST_FLOW_OK) { + fret = gst_pad_push (self->priv->srcpad, buf); + } + return fret; +} + +static GstStateChangeReturn +gst_jif_mux_change_state (GstElement * element, GstStateChange transition) +{ + GstStateChangeReturn ret; + GstJifMux *self = GST_JIF_MUX_CAST (element); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_tag_setter_reset_tags (GST_TAG_SETTER (self)); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + + return ret; +} Index: b/gst/jpegformat/gstjifmux.h =================================================================== --- /dev/null +++ b/gst/jpegformat/gstjifmux.h @@ -0,0 +1,61 @@ +/* GStreamer + * + * jifmux: JPEG interchange format muxer + * + * Copyright (C) 2010 Stefan Kost + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_JFIF_MUX_H__ +#define __GST_JFIF_MUX_H__ + +#include + +#include "gstjpegformat.h" + +G_BEGIN_DECLS + +#define GST_TYPE_JIF_MUX \ + (gst_jif_mux_get_type()) +#define GST_JIF_MUX(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_JIF_MUX,GstJifMux)) +#define GST_JIF_MUX_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_JIF_MUX,GstJifMuxClass)) +#define GST_IS_JIF_MUX(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JIF_MUX)) +#define GST_IS_JIF_MUX_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JIF_MUX)) +#define GST_JIF_MUX_CAST(obj) ((GstJifMux *) (obj)) + +typedef struct _GstJifMux GstJifMux; +typedef struct _GstJifMuxPrivate GstJifMuxPrivate; +typedef struct _GstJifMuxClass GstJifMuxClass; + +struct _GstJifMux { + GstElement element; + GstJifMuxPrivate *priv; +}; + +struct _GstJifMuxClass { + GstElementClass parent_class; +}; + +GType gst_jif_mux_get_type (void); + +G_END_DECLS + +#endif /* __GST_JFIF_MUX_H__ */ Index: b/gst/jpegformat/gstjpegformat.c =================================================================== --- /dev/null +++ b/gst/jpegformat/gstjpegformat.c @@ -0,0 +1,47 @@ +/* GStreamer + * + * jpegformat: a plugin for JPEG Interchange Format + * + * Copyright (C) <2010> Stefan Kost + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "gstjpegparse.h" +#include "gstjifmux.h" + +static gboolean +plugin_init (GstPlugin * plugin) +{ + if (!gst_element_register (plugin, "jpegparse", GST_RANK_NONE, + GST_TYPE_JPEG_PARSE)) + return FALSE; + if (!gst_element_register (plugin, "jifmux", GST_RANK_SECONDARY, + GST_TYPE_JIF_MUX)) + return FALSE; + + return TRUE; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + jpegformat, + "JPEG interchange format plugin", + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) Index: b/gst/jpegformat/gstjpegformat.h =================================================================== --- /dev/null +++ b/gst/jpegformat/gstjpegformat.h @@ -0,0 +1,92 @@ +/* GStreamer + * + * jpegformat: a plugin for JPEG Interchange Format + * + * Copyright (C) <2010> Stefan Kost + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef __GST_JPEG_FORMAT_H__ +#define __GST_JPEG_FORMAT_H__ + +G_BEGIN_DECLS + +/* + * JPEG Markers + */ + +/* Start Of Frame markers, non-differential, Huffman coding */ +#define SOF0 0xc0 /* Baseline DCT */ +#define SOF1 0xc1 /* Extended sequential DCT */ +#define SOF2 0xc2 /* Progressive DCT */ +#define SOF3 0xc3 /* Lossless */ + +/* Start Of Frame markers, differential, Huffman coding */ +#define SOF5 0xc5 +#define SOF6 0xc6 +#define SOF7 0xc7 + +/* Start Of Frame markers, non-differential, arithmetic coding */ +#define JPG 0xc8 /* Reserved */ +#define SOF9 0xc9 +#define SOF10 0xca +#define SOF11 0xcb + +/* Start Of Frame markers, differential, arithmetic coding */ +#define SOF13 0xcd +#define SOF14 0xce +#define SOF15 0xcf + +/* Restart interval termination */ +#define RST0 0xd0 /* Restart ... */ +#define RST1 0xd1 +#define RST2 0xd2 +#define RST3 0xd3 +#define RST4 0xd4 +#define RST5 0xd5 +#define RST6 0xd6 +#define RST7 0xd7 + +#define SOI 0xd8 /* Start of image */ +#define EOI 0xd9 /* End Of Image */ +#define SOS 0xda /* Start Of Scan */ + +#define DHT 0xc4 /* Huffman Table(s) */ +#define DAC 0xcc /* Algorithmic Coding Table */ +#define DQT 0xdb /* Quantisation Table(s) */ +#define DNL 0xdc /* Number of lines */ +#define DRI 0xdd /* Restart Interval */ +#define DHP 0xde /* Hierarchical progression */ +#define EXP 0xdf + +#define APP0 0xe0 /* Application marker */ +#define APP1 0xe1 +#define APP2 0xe2 +#define APP13 0xed +#define APP14 0xee +#define APP15 0xef + +#define JPG0 0xf0 /* Reserved ... */ +#define JPG13 0xfd +#define COM 0xfe /* Comment */ + +#define TEM 0x01 + +G_END_DECLS + +#endif /* __GST_JPEG_FORMAT_H__ */ Index: b/gst/jpegformat/gstjpegparse.c =================================================================== --- /dev/null +++ b/gst/jpegformat/gstjpegparse.c @@ -0,0 +1,1062 @@ +/* GStreamer + * + * jpegparse: a parser for JPEG streams + * + * Copyright (C) <2009> Arnout Vandecappelle (Essensium/Mind) + * Víctor Manuel Jáquez Leal + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:element-jpegparse + * @short_description: JPEG parser + * + * Parses a JPEG stream into JPEG images. It looks for EOI boundaries to + * split a continuous stream into single-frame buffers. Also reads the + * image header searching for image properties such as width and height + * among others. Jpegparse can also extract metadata (e.g. xmp). + * + * + * Example launch line + * |[ + * gst-launch -v souphttpsrc location=... ! jpegparse ! matroskamux ! filesink location=... + * ]| + * The above pipeline fetches a motion JPEG stream from an IP camera over + * HTTP and stores it in a matroska file. + * + */ +/* FIXME: output plain JFIF APP marker only. This provides best code reuse. + * JPEG decoders would not need to handle this part anymore. Also when remuxing + * (... ! jpegparse ! ... ! jifmux ! ...) metadata consolidation would be + * easier. + */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "gstjpegparse.h" + +static GstStaticPadTemplate gst_jpeg_parse_src_pad_template = +GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("image/jpeg, " + "format = (string) { I420, Y41B, UYVY, YV12 }, " + "width = (int) [ 0, MAX ]," + "height = (int) [ 0, MAX ], " + "interlaced = (boolean) { true, false }, " + "framerate = (fraction) [ 0/1, MAX ], " "parsed = (boolean) true") + ); + +static GstStaticPadTemplate gst_jpeg_parse_sink_pad_template = +GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("image/jpeg") + ); + +GST_DEBUG_CATEGORY_STATIC (jpeg_parse_debug); +#define GST_CAT_DEFAULT jpeg_parse_debug + +struct _GstJpegParsePrivate +{ + GstPad *srcpad; + + GstAdapter *adapter; + guint last_offset; + guint last_entropy_len; + gboolean last_resync; + + /* negotiated state */ + gint caps_width, caps_height; + gint caps_framerate_numerator; + gint caps_framerate_denominator; + + /* a new segment arrived */ + gboolean new_segment; + GstSegment segment; + + /* the parsed frame size */ + guint16 width, height; + + /* TRUE if the image is interlaced */ + gboolean interlaced; + + /* format color space */ + const gchar *format; + + /* TRUE if the src caps sets a specific framerate */ + gboolean has_fps; + + /* the (expected) timestamp of the next frame */ + guint64 next_ts; + + /* duration of the current frame */ + guint64 duration; + + /* video state */ + gint framerate_numerator; + gint framerate_denominator; + + /* tags */ + GstTagList *tags; +}; + +static void gst_jpeg_parse_dispose (GObject * object); + +static GstFlowReturn gst_jpeg_parse_chain (GstPad * pad, GstObject * parent, + GstBuffer * buffer); +static gboolean gst_jpeg_parse_sink_setcaps (GstJpegParse * parse, + GstCaps * caps); +static gboolean gst_jpeg_parse_sink_event (GstPad * pad, GstObject * parent, + GstEvent * event); +static GstStateChangeReturn gst_jpeg_parse_change_state (GstElement * element, + GstStateChange transition); + +#define gst_jpeg_parse_parent_class parent_class +G_DEFINE_TYPE (GstJpegParse, gst_jpeg_parse, GST_TYPE_ELEMENT); + +static void +gst_jpeg_parse_class_init (GstJpegParseClass * klass) +{ + GstElementClass *gstelement_class; + GObjectClass *gobject_class; + + gstelement_class = (GstElementClass *) klass; + gobject_class = (GObjectClass *) klass; + + g_type_class_add_private (gobject_class, sizeof (GstJpegParsePrivate)); + gobject_class->dispose = gst_jpeg_parse_dispose; + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_jpeg_parse_change_state); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&gst_jpeg_parse_src_pad_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&gst_jpeg_parse_sink_pad_template)); + + gst_element_class_set_static_metadata (gstelement_class, + "JPEG stream parser", + "Video/Parser", + "Parse JPEG images into single-frame buffers", + "Arnout Vandecappelle (Essensium/Mind) "); + + GST_DEBUG_CATEGORY_INIT (jpeg_parse_debug, "jpegparse", 0, "JPEG parser"); +} + +static void +gst_jpeg_parse_init (GstJpegParse * parse) +{ + GstPad *sinkpad; + + parse->priv = G_TYPE_INSTANCE_GET_PRIVATE (parse, GST_TYPE_JPEG_PARSE, + GstJpegParsePrivate); + + /* create the sink and src pads */ + sinkpad = gst_pad_new_from_static_template (&gst_jpeg_parse_sink_pad_template, + "sink"); + gst_pad_set_chain_function (sinkpad, + GST_DEBUG_FUNCPTR (gst_jpeg_parse_chain)); + gst_pad_set_event_function (sinkpad, + GST_DEBUG_FUNCPTR (gst_jpeg_parse_sink_event)); + gst_element_add_pad (GST_ELEMENT (parse), sinkpad); + + parse->priv->srcpad = + gst_pad_new_from_static_template (&gst_jpeg_parse_src_pad_template, + "src"); + gst_pad_use_fixed_caps (parse->priv->srcpad); + gst_element_add_pad (GST_ELEMENT (parse), parse->priv->srcpad); + + parse->priv->next_ts = GST_CLOCK_TIME_NONE; + parse->priv->adapter = gst_adapter_new (); +} + +static void +gst_jpeg_parse_dispose (GObject * object) +{ + GstJpegParse *parse = GST_JPEG_PARSE (object); + + if (parse->priv->adapter != NULL) { + gst_adapter_clear (parse->priv->adapter); + gst_object_unref (parse->priv->adapter); + parse->priv->adapter = NULL; + } + + G_OBJECT_CLASS (parent_class)->dispose (object); +} + + +static gboolean +gst_jpeg_parse_sink_setcaps (GstJpegParse * parse, GstCaps * caps) +{ + GstStructure *s = gst_caps_get_structure (caps, 0); + const GValue *framerate; + + if ((framerate = gst_structure_get_value (s, "framerate")) != NULL) { + if (GST_VALUE_HOLDS_FRACTION (framerate)) { + parse->priv->framerate_numerator = + gst_value_get_fraction_numerator (framerate); + parse->priv->framerate_denominator = + gst_value_get_fraction_denominator (framerate); + parse->priv->has_fps = TRUE; + GST_DEBUG_OBJECT (parse, "got framerate of %d/%d", + parse->priv->framerate_numerator, parse->priv->framerate_denominator); + } + } + + return TRUE; +} + + +/* + * gst_jpeg_parse_skip_to_jpeg_header: + * @parse: the parser + * + * Flush everything until the next JPEG header. The header is considered + * to be the a start marker SOI (0xff 0xd8) followed by any other marker + * (0xff ...). + * + * Returns: TRUE if the header was found, FALSE if more data is needed. + */ +static gboolean +gst_jpeg_parse_skip_to_jpeg_header (GstJpegParse * parse) +{ + guint available, flush; + gboolean ret = TRUE; + + available = gst_adapter_available (parse->priv->adapter); + if (available < 4) + return FALSE; + + flush = gst_adapter_masked_scan_uint32 (parse->priv->adapter, 0xffffff00, + 0xffd8ff00, 0, available); + if (flush == -1) { + flush = available - 3; /* Last 3 bytes + 1 more may match header. */ + ret = FALSE; + } + if (flush > 0) { + GST_LOG_OBJECT (parse, "Skipping %u bytes.", flush); + gst_adapter_flush (parse->priv->adapter, flush); + } + return ret; +} + +static inline gboolean +gst_jpeg_parse_parse_tag_has_entropy_segment (guint8 tag) +{ + if (tag == SOS || (tag >= RST0 && tag <= RST7)) + return TRUE; + return FALSE; +} + +/* returns image length in bytes if parsed successfully, + * otherwise 0 if more data needed, + * if < 0 the absolute value needs to be flushed */ +static gint +gst_jpeg_parse_get_image_length (GstJpegParse * parse) +{ + guint size; + gboolean resync; + GstAdapter *adapter = parse->priv->adapter; + gint offset, noffset; + + size = gst_adapter_available (adapter); + + /* we expect at least 4 bytes, first of which start marker */ + if (gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0xffd80000, 0, 4)) + return 0; + + GST_DEBUG ("Parsing jpeg image data (%u bytes)", size); + + GST_DEBUG ("Parse state: offset=%d, resync=%d, entropy len=%d", + parse->priv->last_offset, parse->priv->last_resync, + parse->priv->last_entropy_len); + + /* offset is 2 less than actual offset; + * - adapter needs at least 4 bytes for scanning, + * - start and end marker ensure at least that much + */ + /* resume from state offset */ + offset = parse->priv->last_offset; + + while (1) { + guint frame_len; + guint32 value; + + noffset = + gst_adapter_masked_scan_uint32_peek (adapter, 0x0000ff00, 0x0000ff00, + offset, size - offset, &value); + /* lost sync if 0xff marker not where expected */ + if ((resync = (noffset != offset))) { + GST_DEBUG ("Lost sync at 0x%08x, resyncing", offset + 2); + } + /* may have marker, but could have been resyncng */ + resync = resync || parse->priv->last_resync; + /* Skip over extra 0xff */ + while ((noffset >= 0) && ((value & 0xff) == 0xff)) { + noffset++; + noffset = + gst_adapter_masked_scan_uint32_peek (adapter, 0x0000ff00, 0x0000ff00, + noffset, size - noffset, &value); + } + /* enough bytes left for marker? (we need 0xNN after the 0xff) */ + if (noffset < 0) { + GST_DEBUG ("at end of input and no EOI marker found, need more data"); + goto need_more_data; + } + + /* now lock on the marker we found */ + offset = noffset; + value = value & 0xff; + if (value == 0xd9) { + GST_DEBUG ("0x%08x: EOI marker", offset + 2); + /* clear parse state */ + parse->priv->last_resync = FALSE; + parse->priv->last_offset = 0; + return (offset + 4); + } else if (value == 0xd8) { + /* Skip this frame if we found another SOI marker */ + GST_DEBUG ("0x%08x: SOI marker before EOI, skipping", offset + 2); + /* clear parse state */ + parse->priv->last_resync = FALSE; + parse->priv->last_offset = 0; + return -(offset + 2); + } + + if (value >= 0xd0 && value <= 0xd7) + frame_len = 0; + else { + /* peek tag and subsequent length */ + if (offset + 2 + 4 > size) + goto need_more_data; + else + gst_adapter_masked_scan_uint32_peek (adapter, 0x0, 0x0, offset + 2, 4, + &frame_len); + frame_len = frame_len & 0xffff; + } + GST_DEBUG ("0x%08x: tag %02x, frame_len=%u", offset + 2, value, frame_len); + /* the frame length includes the 2 bytes for the length; here we want at + * least 2 more bytes at the end for an end marker */ + if (offset + 2 + 2 + frame_len + 2 > size) { + goto need_more_data; + } + + if (gst_jpeg_parse_parse_tag_has_entropy_segment (value)) { + guint eseglen = parse->priv->last_entropy_len; + + GST_DEBUG ("0x%08x: finding entropy segment length", offset + 2); + noffset = offset + 2 + frame_len + eseglen; + while (1) { + noffset = gst_adapter_masked_scan_uint32_peek (adapter, 0x0000ff00, + 0x0000ff00, noffset, size - noffset, &value); + if (noffset < 0) { + /* need more data */ + parse->priv->last_entropy_len = size - offset - 4 - frame_len - 2; + goto need_more_data; + } + if ((value & 0xff) != 0x00) { + eseglen = noffset - offset - frame_len - 2; + break; + } + noffset++; + } + parse->priv->last_entropy_len = 0; + frame_len += eseglen; + GST_DEBUG ("entropy segment length=%u => frame_len=%u", eseglen, + frame_len); + } + if (resync) { + /* check if we will still be in sync if we interpret + * this as a sync point and skip this frame */ + noffset = offset + frame_len + 2; + noffset = gst_adapter_masked_scan_uint32 (adapter, 0x0000ff00, 0x0000ff00, + noffset, 4); + if (noffset < 0) { + /* ignore and continue resyncing until we hit the end + * of our data or find a sync point that looks okay */ + offset++; + continue; + } + GST_DEBUG ("found sync at 0x%x", offset + 2); + } + + offset += frame_len + 2; + } + + /* EXITS */ +need_more_data: + { + parse->priv->last_offset = offset; + parse->priv->last_resync = resync; + return 0; + } +} + +static inline gboolean +gst_jpeg_parse_sof (GstJpegParse * parse, GstByteReader * reader) +{ + guint8 numcomps = 0; /* Number of components in image + (1 for gray, 3 for YUV, etc.) */ + guint8 precision; /* precision (in bits) for the samples */ + guint8 compId[3] G_GNUC_UNUSED; /* unique value identifying each component */ + guint8 qtId[3] G_GNUC_UNUSED; /* quantization table ID to use for this comp */ + guint8 blockWidth[3]; /* Array[numComponents] giving the number of + blocks (horiz) in this component */ + guint8 blockHeight[3]; /* Same for the vertical part of this component */ + guint8 i, value = 0; + gint temp; + + /* flush length field */ + if (!gst_byte_reader_skip (reader, 2)) + return FALSE; + + /* Get sample precision */ + if (!gst_byte_reader_get_uint8 (reader, &precision)) + return FALSE; + + /* Get w and h */ + if (!gst_byte_reader_get_uint16_be (reader, &parse->priv->height)) + return FALSE; + if (!gst_byte_reader_get_uint16_be (reader, &parse->priv->width)) + return FALSE; + + /* Get number of components */ + if (!gst_byte_reader_get_uint8 (reader, &numcomps)) + return FALSE; + + if (numcomps > 3) /* FIXME */ + return FALSE; + + /* Get decimation and quantization table id for each component */ + for (i = 0; i < numcomps; i++) { + /* Get component ID number */ + if (!gst_byte_reader_get_uint8 (reader, &value)) + return FALSE; + compId[i] = value; + + /* Get decimation */ + if (!gst_byte_reader_get_uint8 (reader, &value)) + return FALSE; + blockWidth[i] = (value & 0xf0) >> 4; + blockHeight[i] = (value & 0x0f); + + /* Get quantization table id */ + if (!gst_byte_reader_get_uint8 (reader, &value)) + return FALSE; + qtId[i] = value; + } + + if (numcomps == 1) { + /* gray image - no format */ + parse->priv->format = ""; + } else if (numcomps == 3) { + temp = (blockWidth[0] * blockHeight[0]) / (blockWidth[1] * blockHeight[1]); + + if (temp == 4 && blockHeight[0] == 2) + parse->priv->format = "I420"; + else if (temp == 4 && blockHeight[0] == 4) + parse->priv->format = "Y41B"; + else if (temp == 2) + parse->priv->format = "UYVY"; + else if (temp == 1) + parse->priv->format = "YV12"; + else + parse->priv->format = ""; + } else { + return FALSE; + } + + GST_DEBUG_OBJECT (parse, "Header parsed"); + + return TRUE; +} + +static inline gboolean +gst_jpeg_parse_remove_marker (GstJpegParse * parse, + GstByteReader * reader, guint8 marker, GstBuffer * buffer) +{ + guint16 size = 0; + guint pos = gst_byte_reader_get_pos (reader); + GstMapInfo map; + + if (!gst_byte_reader_peek_uint16_be (reader, &size)) + return FALSE; + if (gst_byte_reader_get_remaining (reader) < size) + return FALSE; + + GST_LOG_OBJECT (parse, "unhandled marker %x removing %u bytes", marker, size); + + gst_buffer_map (buffer, &map, GST_MAP_READWRITE); + memmove (&map.data[pos], &map.data[pos + size], map.size - (pos + size)); + gst_buffer_unmap (buffer, &map); + + + if (!gst_byte_reader_set_pos (reader, pos - size)) + return FALSE; + + return TRUE; +} + +static inline gboolean +gst_jpeg_parse_skip_marker (GstJpegParse * parse, + GstByteReader * reader, guint8 marker) +{ + guint16 size = 0; + + if (!gst_byte_reader_get_uint16_be (reader, &size)) + return FALSE; + +#ifndef GST_DISABLE_GST_DEBUG + /* We'd pry the id of the skipped application segment */ + if (marker >= APP0 && marker <= APP15) { + const gchar *id_str = NULL; + + if (gst_byte_reader_peek_string_utf8 (reader, &id_str)) { + GST_DEBUG_OBJECT (parse, "unhandled marker %x: '%s' skiping %u bytes", + marker, id_str ? id_str : "(NULL)", size); + } else { + GST_DEBUG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker, + size); + } + } +#else + GST_DEBUG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker, + size); +#endif // GST_DISABLE_GST_DEBUG + + if (!gst_byte_reader_skip (reader, size - 2)) + return FALSE; + + return TRUE; +} + +static inline GstTagList * +get_tag_list (GstJpegParse * parse) +{ + if (!parse->priv->tags) + parse->priv->tags = gst_tag_list_new_empty (); + return parse->priv->tags; +} + +static inline void +extract_and_queue_tags (GstJpegParse * parse, guint size, guint8 * data, + GstTagList * (*tag_func) (GstBuffer * buff)) +{ + GstTagList *tags; + GstBuffer *buf; + + buf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, data, size, 0, + size, NULL, NULL); + + tags = tag_func (buf); + gst_buffer_unref (buf); + + if (tags) { + GstTagList *taglist = parse->priv->tags; + if (taglist) { + gst_tag_list_insert (taglist, tags, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (tags); + } else { + parse->priv->tags = tags; + } + GST_DEBUG_OBJECT (parse, "collected tags: %" GST_PTR_FORMAT, + parse->priv->tags); + } +} + +static inline gboolean +gst_jpeg_parse_app1 (GstJpegParse * parse, GstByteReader * reader) +{ + guint16 size = 0; + const gchar *id_str; + const guint8 *data = NULL; + + if (!gst_byte_reader_get_uint16_be (reader, &size)) + return FALSE; + + size -= 2; /* 2 bytes for the mark */ + if (!gst_byte_reader_peek_string_utf8 (reader, &id_str)) + return FALSE; + + if (!strncmp (id_str, "Exif", 4)) { + + /* skip id + NUL + padding */ + if (!gst_byte_reader_skip (reader, 6)) + return FALSE; + size -= 6; + + /* handle exif metadata */ + if (!gst_byte_reader_get_data (reader, size, &data)) + return FALSE; + + extract_and_queue_tags (parse, size, (guint8 *) data, + gst_tag_list_from_exif_buffer_with_tiff_header); + + GST_LOG_OBJECT (parse, "parsed marker %x: '%s' %u bytes", + APP1, id_str, size); + + } else if (!strncmp (id_str, "http://ns.adobe.com/xap/1.0/", 28)) { + + /* skip the id + NUL */ + if (!gst_byte_reader_skip (reader, 29)) + return FALSE; + size -= 29; + + /* handle xmp metadata */ + if (!gst_byte_reader_get_data (reader, size, &data)) + return FALSE; + + extract_and_queue_tags (parse, size, (guint8 *) data, + gst_tag_list_from_xmp_buffer); + + GST_LOG_OBJECT (parse, "parsed marker %x: '%s' %u bytes", + APP1, id_str, size); + + } else { + if (!gst_jpeg_parse_skip_marker (parse, reader, APP1)) + return FALSE; + } + + return TRUE; +} + +static inline gchar * +get_utf8_from_data (const guint8 * data, guint16 size) +{ + const gchar *env_vars[] = { "GST_JPEG_TAG_ENCODING", + "GST_TAG_ENCODING", NULL + }; + const char *str = (gchar *) data; + + return gst_tag_freeform_string_to_utf8 (str, size, env_vars); +} + +/* read comment and post as tag */ +static inline gboolean +gst_jpeg_parse_com (GstJpegParse * parse, GstByteReader * reader) +{ + const guint8 *data = NULL; + guint16 size = 0; + gchar *comment; + + if (!gst_byte_reader_get_uint16_be (reader, &size)) + return FALSE; + + size -= 2; + if (!gst_byte_reader_get_data (reader, size, &data)) + return FALSE; + + comment = get_utf8_from_data (data, size); + + if (comment) { + GstTagList *taglist = get_tag_list (parse); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, + GST_TAG_COMMENT, comment, NULL); + GST_DEBUG_OBJECT (parse, "collected tags: %" GST_PTR_FORMAT, taglist); + g_free (comment); + } + + return TRUE; +} + +static gboolean +gst_jpeg_parse_read_header (GstJpegParse * parse, GstBuffer * buffer) +{ + GstByteReader reader; + guint8 marker = 0; + gboolean foundSOF = FALSE; + GstMapInfo map; + + gst_buffer_map (buffer, &map, GST_MAP_READ); + gst_byte_reader_init (&reader, map.data, map.size); + + if (!gst_byte_reader_peek_uint8 (&reader, &marker)) + goto error; + + while (marker == 0xff) { + if (!gst_byte_reader_skip (&reader, 1)) + goto error; + + if (!gst_byte_reader_get_uint8 (&reader, &marker)) + goto error; + + GST_DEBUG_OBJECT (parse, "marker = %x", marker); + + switch (marker) { + case SOS: /* start of scan (begins compressed data) */ + goto done; + + case SOI: + break; + + case DRI: + if (!gst_byte_reader_skip (&reader, 4)) /* fixed size */ + goto error; + break; + + case COM: + if (!gst_jpeg_parse_com (parse, &reader)) + goto error; + break; + + case APP1: + if (!gst_jpeg_parse_app1 (parse, &reader)) + goto error; + break; + + case DHT: + case DQT: + /* Ignore these codes */ + if (!gst_jpeg_parse_skip_marker (parse, &reader, marker)) + goto error; + break; + + case SOF2: + parse->priv->interlaced = TRUE; + /* fall through */ + case SOF0: + /* parse Start Of Frame */ + if (!gst_jpeg_parse_sof (parse, &reader)) + goto error; + + foundSOF = TRUE; + goto done; + + default: + if (marker == JPG || (marker >= JPG0 && marker <= JPG13)) { + /* we'd like to remove them from the buffer */ + if (!gst_jpeg_parse_remove_marker (parse, &reader, marker, buffer)) + goto error; + } else if (marker >= APP0 && marker <= APP15) { + if (!gst_jpeg_parse_skip_marker (parse, &reader, marker)) + goto error; + } else + goto unhandled; + } + + if (!gst_byte_reader_peek_uint8 (&reader, &marker)) + goto error; + } +done: + gst_buffer_unmap (buffer, &map); + + return foundSOF; + + /* ERRORS */ +error: + { + GST_WARNING_OBJECT (parse, + "Error parsing image header (need more than %u bytes available)", + gst_byte_reader_get_remaining (&reader)); + gst_buffer_unmap (buffer, &map); + return FALSE; + } +unhandled: + { + GST_WARNING_OBJECT (parse, "unhandled marker %x, leaving", marker); + /* Not SOF or SOI. Must not be a JPEG file (or file pointer + * is placed wrong). In either case, it's an error. */ + gst_buffer_unmap (buffer, &map); + return FALSE; + } +} + +static gboolean +gst_jpeg_parse_set_new_caps (GstJpegParse * parse, gboolean header_ok) +{ + GstCaps *caps; + gboolean res; + + GST_DEBUG_OBJECT (parse, "setting caps on srcpad (hdr_ok=%d, have_fps=%d)", + header_ok, parse->priv->has_fps); + + caps = gst_caps_new_simple ("image/jpeg", + "parsed", G_TYPE_BOOLEAN, TRUE, NULL); + + if (header_ok == TRUE) { + gst_caps_set_simple (caps, + "format", G_TYPE_STRING, parse->priv->format, + "interlaced", G_TYPE_BOOLEAN, parse->priv->interlaced, + "width", G_TYPE_INT, parse->priv->width, + "height", G_TYPE_INT, parse->priv->height, NULL); + } + + if (parse->priv->has_fps == TRUE) { + /* we have a framerate */ + gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION, + parse->priv->framerate_numerator, + parse->priv->framerate_denominator, NULL); + + if (!GST_CLOCK_TIME_IS_VALID (parse->priv->duration) + && parse->priv->framerate_numerator != 0) { + parse->priv->duration = gst_util_uint64_scale_int (GST_SECOND, + parse->priv->framerate_denominator, parse->priv->framerate_numerator); + } + } else { + /* unknown duration */ + parse->priv->duration = GST_CLOCK_TIME_NONE; + gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION, 1, 1, NULL); + } + + GST_DEBUG_OBJECT (parse, + "setting downstream caps on %s:%s to %" GST_PTR_FORMAT, + GST_DEBUG_PAD_NAME (parse->priv->srcpad), caps); + res = gst_pad_set_caps (parse->priv->srcpad, caps); + gst_caps_unref (caps); + + return res; + +} + +static GstFlowReturn +gst_jpeg_parse_push_buffer (GstJpegParse * parse, guint len) +{ + GstBuffer *outbuf; + GstFlowReturn ret = GST_FLOW_OK; + gboolean header_ok; + + /* reset the offset (only when we flushed) */ + parse->priv->last_offset = 0; + parse->priv->last_entropy_len = 0; + + outbuf = gst_adapter_take_buffer (parse->priv->adapter, len); + if (outbuf == NULL) { + GST_ELEMENT_ERROR (parse, STREAM, DECODE, + ("Failed to take buffer of size %u", len), + ("Failed to take buffer of size %u", len)); + return GST_FLOW_ERROR; + } + + header_ok = gst_jpeg_parse_read_header (parse, outbuf); + + if (parse->priv->new_segment == TRUE + || parse->priv->width != parse->priv->caps_width + || parse->priv->height != parse->priv->caps_height + || parse->priv->framerate_numerator != + parse->priv->caps_framerate_numerator + || parse->priv->framerate_denominator != + parse->priv->caps_framerate_denominator) { + if (!gst_jpeg_parse_set_new_caps (parse, header_ok)) { + GST_ELEMENT_ERROR (parse, CORE, NEGOTIATION, + ("Can't set caps to the src pad"), ("Can't set caps to the src pad")); + return GST_FLOW_ERROR; + } + gst_pad_push_event (parse->priv->srcpad, + gst_event_new_segment (&parse->priv->segment)); + + if (parse->priv->tags) { + GST_DEBUG_OBJECT (parse, "Pushing tags: %" GST_PTR_FORMAT, + parse->priv->tags); + gst_pad_push_event (parse->priv->srcpad, + gst_event_new_tag (parse->priv->tags)); + parse->priv->tags = NULL; + } + + parse->priv->new_segment = FALSE; + parse->priv->caps_width = parse->priv->width; + parse->priv->caps_height = parse->priv->height; + parse->priv->caps_framerate_numerator = parse->priv->framerate_numerator; + parse->priv->caps_framerate_denominator = + parse->priv->framerate_denominator; + } + + GST_BUFFER_TIMESTAMP (outbuf) = parse->priv->next_ts; + + if (parse->priv->has_fps && GST_CLOCK_TIME_IS_VALID (parse->priv->next_ts) + && GST_CLOCK_TIME_IS_VALID (parse->priv->duration)) { + parse->priv->next_ts += parse->priv->duration; + } else { + parse->priv->duration = GST_CLOCK_TIME_NONE; + parse->priv->next_ts = GST_CLOCK_TIME_NONE; + } + + GST_BUFFER_DURATION (outbuf) = parse->priv->duration; + + GST_LOG_OBJECT (parse, "pushing buffer (ts=%" GST_TIME_FORMAT ", len=%u)", + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), len); + + ret = gst_pad_push (parse->priv->srcpad, outbuf); + + return ret; +} + +static GstFlowReturn +gst_jpeg_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) +{ + GstJpegParse *parse = GST_JPEG_PARSE (parent); + gint len; + GstClockTime timestamp, duration; + GstFlowReturn ret = GST_FLOW_OK; + + timestamp = GST_BUFFER_PTS (buf); + duration = GST_BUFFER_DURATION (buf); + + gst_adapter_push (parse->priv->adapter, buf); + + while (ret == GST_FLOW_OK && gst_jpeg_parse_skip_to_jpeg_header (parse)) { + if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (parse->priv->next_ts))) + parse->priv->next_ts = timestamp; + + if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (duration))) + parse->priv->duration = duration; + + /* check if we already have a EOI */ + len = gst_jpeg_parse_get_image_length (parse); + if (len == 0) { + return GST_FLOW_OK; + } else if (len < 0) { + gst_adapter_flush (parse->priv->adapter, -len); + continue; + } + + GST_LOG_OBJECT (parse, "parsed image of size %d", len); + + /* now we have enough in the adapter to process a full jpeg image */ + ret = gst_jpeg_parse_push_buffer (parse, len); + } + + GST_DEBUG_OBJECT (parse, "No further start marker found."); + return ret; +} + +static gboolean +gst_jpeg_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) +{ + GstJpegParse *parse = GST_JPEG_PARSE (parent); + gboolean res = TRUE; + + parse = GST_JPEG_PARSE (gst_pad_get_parent (pad)); + + GST_DEBUG_OBJECT (parse, "event : %s", GST_EVENT_TYPE_NAME (event)); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CAPS: + { + GstCaps *caps; + + gst_event_parse_caps (event, &caps); + res = gst_jpeg_parse_sink_setcaps (parse, caps); + gst_event_unref (event); + break; + } + case GST_EVENT_FLUSH_STOP: + parse->priv->next_ts = GST_CLOCK_TIME_NONE; + parse->priv->duration = GST_CLOCK_TIME_NONE; + parse->priv->last_offset = 0; + parse->priv->last_entropy_len = 0; + parse->priv->last_resync = FALSE; + gst_adapter_clear (parse->priv->adapter); + break; + case GST_EVENT_EOS:{ + /* Push the remaining data, even though it's incomplete */ + guint available = gst_adapter_available (parse->priv->adapter); + if (available > 0) + gst_jpeg_parse_push_buffer (parse, available); + res = gst_pad_push_event (parse->priv->srcpad, event); + break; + } + case GST_EVENT_SEGMENT: + /* Discard any data in the adapter. There should have been an EOS before + * to flush it. */ + gst_adapter_clear (parse->priv->adapter); + gst_event_copy_segment (event, &parse->priv->segment); + gst_event_unref (event); + parse->priv->new_segment = TRUE; + break; + case GST_EVENT_TAG:{ + if (!parse->priv->new_segment) + res = gst_pad_event_default (pad, parent, event); + else { + GstTagList *taglist = NULL; + + gst_event_parse_tag (event, &taglist); + /* Hold on to the tags till the srcpad caps are definitely set */ + gst_tag_list_insert (get_tag_list (parse), taglist, + GST_TAG_MERGE_REPLACE); + GST_DEBUG ("collected tags: %" GST_PTR_FORMAT, parse->priv->tags); + gst_event_unref (event); + } + break; + } + default: + res = gst_pad_event_default (pad, parent, event); + break; + } + + gst_object_unref (parse); + return res; +} + +static GstStateChangeReturn +gst_jpeg_parse_change_state (GstElement * element, GstStateChange transition) +{ + GstStateChangeReturn ret; + GstJpegParse *parse; + + parse = GST_JPEG_PARSE (element); + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + parse->priv->has_fps = FALSE; + + parse->priv->interlaced = FALSE; + parse->priv->width = parse->priv->height = 0; + parse->priv->framerate_numerator = 0; + parse->priv->framerate_denominator = 1; + + parse->priv->caps_framerate_numerator = + parse->priv->caps_framerate_denominator = 0; + parse->priv->caps_width = parse->priv->caps_height = -1; + + parse->priv->new_segment = FALSE; + gst_segment_init (&parse->priv->segment, GST_FORMAT_UNDEFINED); + + parse->priv->next_ts = GST_CLOCK_TIME_NONE; + parse->priv->duration = GST_CLOCK_TIME_NONE; + + parse->priv->last_offset = 0; + parse->priv->last_entropy_len = 0; + parse->priv->last_resync = FALSE; + + parse->priv->tags = NULL; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (ret != GST_STATE_CHANGE_SUCCESS) + return ret; + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_adapter_clear (parse->priv->adapter); + if (parse->priv->tags) { + gst_tag_list_unref (parse->priv->tags); + parse->priv->tags = NULL; + } + break; + default: + break; + } + + return ret; +} Index: b/gst/jpegformat/gstjpegparse.h =================================================================== --- /dev/null +++ b/gst/jpegformat/gstjpegparse.h @@ -0,0 +1,61 @@ +/* GStreamer + * + * jpegparse: a parser for JPEG streams + * + * Copyright (C) <2009> Arnout Vandecappelle (Essensium/Mind) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_JPEG_PARSE_H__ +#define __GST_JPEG_PARSE_H__ + +#include +#include + +#include "gstjpegformat.h" + +G_BEGIN_DECLS + +#define GST_TYPE_JPEG_PARSE \ + (gst_jpeg_parse_get_type()) +#define GST_JPEG_PARSE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_JPEG_PARSE,GstJpegParse)) +#define GST_JPEG_PARSE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_JPEG_PARSE,GstJpegParseClass)) +#define GST_IS_JPEG_PARSE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JPEG_PARSE)) +#define GST_IS_JPEG_PARSE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JPEG_PARSE)) + +typedef struct _GstJpegParse GstJpegParse; +typedef struct _GstJpegParsePrivate GstJpegParsePrivate; +typedef struct _GstJpegParseClass GstJpegParseClass; + +struct _GstJpegParse { + GstElement element; + GstJpegParsePrivate *priv; +}; + +struct _GstJpegParseClass { + GstElementClass parent_class; +}; + +GType gst_jpeg_parse_get_type (void); + +G_END_DECLS + +#endif /* __GST_JPEG_PARSE_H__ */ Index: b/gst/jpegformat/Makefile.am =================================================================== --- /dev/null +++ b/gst/jpegformat/Makefile.am @@ -0,0 +1,25 @@ +plugin_LTLIBRARIES = libgstjpegformat.la + +libgstjpegformat_la_SOURCES = gstjpegformat.c gstjpegparse.c gstjifmux.c +libgstjpegformat_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) +libgstjpegformat_la_LIBADD = \ + $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) +libgstjpegformat_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstjpegformat_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) + +noinst_HEADERS = gstjpegformat.h gstjpegparse.h gstjifmux.h + +Android.mk: Makefile.am $(BUILT_SOURCES) + androgenizer \ + -:PROJECT libgstjpegformat -:SHARED libgstjpegformat \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstjpegformat_la_SOURCES) \ + -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstjpegformat_la_CFLAGS) \ + -:LDFLAGS $(libgstjpegformat_la_LDFLAGS) \ + $(libgstjpegformat_la_LIBADD) \ + -ldl \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ + > $@ Index: b/gst/jpegformat/Makefile.in =================================================================== --- /dev/null +++ b/gst/jpegformat/Makefile.in @@ -0,0 +1,1052 @@ +# Makefile.in generated by automake 1.13.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = gst/jpegformat +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(noinst_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ + $(top_srcdir)/common/m4/as-auto-alt.m4 \ + $(top_srcdir)/common/m4/as-compiler-flag.m4 \ + $(top_srcdir)/common/m4/as-libtool.m4 \ + $(top_srcdir)/common/m4/as-scrub-include.m4 \ + $(top_srcdir)/common/m4/as-version.m4 \ + $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/common/m4/gst-arch.m4 \ + $(top_srcdir)/common/m4/gst-args.m4 \ + $(top_srcdir)/common/m4/gst-check.m4 \ + $(top_srcdir)/common/m4/gst-default.m4 \ + $(top_srcdir)/common/m4/gst-dowhile.m4 \ + $(top_srcdir)/common/m4/gst-error.m4 \ + $(top_srcdir)/common/m4/gst-feature.m4 \ + $(top_srcdir)/common/m4/gst-gettext.m4 \ + $(top_srcdir)/common/m4/gst-glib2.m4 \ + $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \ + $(top_srcdir)/common/m4/gst-platform.m4 \ + $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ + $(top_srcdir)/common/m4/gst-plugindir.m4 \ + $(top_srcdir)/common/m4/gst-x11.m4 \ + $(top_srcdir)/common/m4/gst.m4 \ + $(top_srcdir)/common/m4/gtk-doc.m4 \ + $(top_srcdir)/common/m4/introspection.m4 \ + $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \ + $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(plugindir)" +LTLIBRARIES = $(plugin_LTLIBRARIES) +am__DEPENDENCIES_1 = +libgstjpegformat_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +am_libgstjpegformat_la_OBJECTS = libgstjpegformat_la-gstjpegformat.lo \ + libgstjpegformat_la-gstjpegparse.lo \ + libgstjpegformat_la-gstjifmux.lo +libgstjpegformat_la_OBJECTS = $(am_libgstjpegformat_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libgstjpegformat_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(libgstjpegformat_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(libgstjpegformat_la_CFLAGS) $(CFLAGS) \ + $(libgstjpegformat_la_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libgstjpegformat_la_SOURCES) +DIST_SOURCES = $(libgstjpegformat_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ACMENC_CFLAGS = @ACMENC_CFLAGS@ +ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APEXSINK_CFLAGS = @APEXSINK_CFLAGS@ +APEXSINK_LIBS = @APEXSINK_LIBS@ +AR = @AR@ +AS = @AS@ +ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@ +ASSRENDER_LIBS = @ASSRENDER_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BLUEZ_CFLAGS = @BLUEZ_CFLAGS@ +BLUEZ_LIBS = @BLUEZ_LIBS@ +BZ2_LIBS = @BZ2_LIBS@ +CC = @CC@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CDAUDIO_CFLAGS = @CDAUDIO_CFLAGS@ +CDAUDIO_LIBS = @CDAUDIO_LIBS@ +CFLAGS = @CFLAGS@ +CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ +CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DAALA_CFLAGS = @DAALA_CFLAGS@ +DAALA_LIBS = @DAALA_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DCCP_LIBS = @DCCP_LIBS@ +DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@ +DECKLINK_LIBS = @DECKLINK_LIBS@ +DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@ +DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@ +DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@ +DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@ +DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ +DIRECT3D_LIBS = @DIRECT3D_LIBS@ +DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DIRECTSHOW_LIBS = @DIRECTSHOW_LIBS@ +DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@ +DIRECTX_CFLAGS = @DIRECTX_CFLAGS@ +DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DTS_LIBS = @DTS_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDNAV_CFLAGS = @DVDNAV_CFLAGS@ +DVDNAV_LIBS = @DVDNAV_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGLGLES_CFLAGS = @EGLGLES_CFLAGS@ +EGLGLES_LIBS = @EGLGLES_LIBS@ +EGL_CFLAGS = @EGL_CFLAGS@ +EGL_LIBS = @EGL_LIBS@ +EGREP = @EGREP@ +ERROR_CFLAGS = @ERROR_CFLAGS@ +ERROR_CXXFLAGS = @ERROR_CXXFLAGS@ +ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@ +EXEEXT = @EXEEXT@ +EXIF_CFLAGS = @EXIF_CFLAGS@ +EXIF_LIBS = @EXIF_LIBS@ +FAAC_LIBS = @FAAC_LIBS@ +FAAD_IS_NEAAC = @FAAD_IS_NEAAC@ +FAAD_LIBS = @FAAD_LIBS@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +FLITE_CFLAGS = @FLITE_CFLAGS@ +FLITE_LIBS = @FLITE_LIBS@ +FLUIDSYNTH_CFLAGS = @FLUIDSYNTH_CFLAGS@ +FLUIDSYNTH_LIBS = @FLUIDSYNTH_LIBS@ +GCOV = @GCOV@ +GCOV_CFLAGS = @GCOV_CFLAGS@ +GCOV_LIBS = @GCOV_LIBS@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LDFLAGS = @GIO_LDFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@ +GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ +GME_LIBS = @GME_LIBS@ +GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@ +GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@ +GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@ +GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GMYTH_CFLAGS = @GMYTH_CFLAGS@ +GMYTH_LIBS = @GMYTH_LIBS@ +GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ +GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ +GSETTINGS_LIBS = @GSETTINGS_LIBS@ +GSM_LIBS = @GSM_LIBS@ +GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ +GSTPB_PREFIX = @GSTPB_PREFIX@ +GST_AGE = @GST_AGE@ +GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@ +GST_API_VERSION = @GST_API_VERSION@ +GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ +GST_BASE_LIBS = @GST_BASE_LIBS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ +GST_CHECK_LIBS = @GST_CHECK_LIBS@ +GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@ +GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@ +GST_CURRENT = @GST_CURRENT@ +GST_CXXFLAGS = @GST_CXXFLAGS@ +GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ +GST_LIBS = @GST_LIBS@ +GST_LIBVERSION = @GST_LIBVERSION@ +GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@ +GST_LICENSE = @GST_LICENSE@ +GST_LT_LDFLAGS = @GST_LT_LDFLAGS@ +GST_OBJCFLAGS = @GST_OBJCFLAGS@ +GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@ +GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@ +GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@ +GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ +GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ +GST_PKG_CONFIG_PATH = @GST_PKG_CONFIG_PATH@ +GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ +GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@ +GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@ +GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ +GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ +GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@ +GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@ +GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@ +GST_PLUGINS_LIBAV_CFLAGS = @GST_PLUGINS_LIBAV_CFLAGS@ +GST_PLUGINS_LIBAV_DIR = @GST_PLUGINS_LIBAV_DIR@ +GST_PLUGINS_LIBAV_LIBS = @GST_PLUGINS_LIBAV_LIBS@ +GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@ +GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ +GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@ +GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@ +GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@ +GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ +GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@ +GST_PREFIX = @GST_PREFIX@ +GST_REVISION = @GST_REVISION@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@ +GST_VIDEO_LIBS = @GST_VIDEO_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ +G_UDEV_LIBS = @G_UDEV_LIBS@ +HAVE_BZ2 = @HAVE_BZ2@ +HAVE_CXX = @HAVE_CXX@ +HAVE_DIRECT3D = @HAVE_DIRECT3D@ +HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@ +HAVE_DIRECTSHOW = @HAVE_DIRECTSHOW@ +HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@ +HAVE_DTS = @HAVE_DTS@ +HAVE_FAAC = @HAVE_FAAC@ +HAVE_FAAD = @HAVE_FAAD@ +HAVE_FLITE = @HAVE_FLITE@ +HAVE_GSM = @HAVE_GSM@ +HAVE_NAS = @HAVE_NAS@ +HAVE_OPENJPEG = @HAVE_OPENJPEG@ +HAVE_SRTP = @HAVE_SRTP@ +HAVE_WASAPI = @HAVE_WASAPI@ +HAVE_WILDMIDI = @HAVE_WILDMIDI@ +HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@ +HAVE_X = @HAVE_X@ +HAVE_X11 = @HAVE_X11@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KATE_CFLAGS = @KATE_CFLAGS@ +KATE_LIBS = @KATE_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ +LIBDC1394_LIBS = @LIBDC1394_LIBS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ +LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LRDF_CFLAGS = @LRDF_CFLAGS@ +LRDF_LIBS = @LRDF_LIBS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MIMIC_CFLAGS = @MIMIC_CFLAGS@ +MIMIC_LIBS = @MIMIC_LIBS@ +MJPEG_CFLAGS = @MJPEG_CFLAGS@ +MJPEG_LIBS = @MJPEG_LIBS@ +MKDIR_P = @MKDIR_P@ +MODPLUG_CFLAGS = @MODPLUG_CFLAGS@ +MODPLUG_LIBS = @MODPLUG_LIBS@ +MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@ +MPEG2ENC_LIBS = @MPEG2ENC_LIBS@ +MPG123_CFLAGS = @MPG123_CFLAGS@ +MPG123_LIBS = @MPG123_LIBS@ +MPLEX_CFLAGS = @MPLEX_CFLAGS@ +MPLEX_LDFLAGS = @MPLEX_LDFLAGS@ +MPLEX_LIBS = @MPLEX_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +MUSEPACK_LIBS = @MUSEPACK_LIBS@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NEON_CFLAGS = @NEON_CFLAGS@ +NEON_LIBS = @NEON_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OFA_CFLAGS = @OFA_CFLAGS@ +OFA_LIBS = @OFA_LIBS@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OPENCV_CFLAGS = @OPENCV_CFLAGS@ +OPENCV_LIBS = @OPENCV_LIBS@ +OPENCV_PREFIX = @OPENCV_PREFIX@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ +OPUS_CFLAGS = @OPUS_CFLAGS@ +OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ +ORCC_FLAGS = @ORCC_FLAGS@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINDIR = @PLUGINDIR@ +POSUB = @POSUB@ +PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PVR_CFLAGS = @PVR_CFLAGS@ +PVR_LIBS = @PVR_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@ +RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@ +RSVG_CFLAGS = @RSVG_CFLAGS@ +RSVG_LIBS = @RSVG_LIBS@ +RTMP_CFLAGS = @RTMP_CFLAGS@ +RTMP_LIBS = @RTMP_LIBS@ +SBC_CFLAGS = @SBC_CFLAGS@ +SBC_LIBS = @SBC_LIBS@ +SCHRO_CFLAGS = @SCHRO_CFLAGS@ +SCHRO_LIBS = @SCHRO_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_LIBS = @SHM_LIBS@ +SLV2_CFLAGS = @SLV2_CFLAGS@ +SLV2_LIBS = @SLV2_LIBS@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +SNDIO_LIBS = @SNDIO_LIBS@ +SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@ +SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@ +SPANDSP_CFLAGS = @SPANDSP_CFLAGS@ +SPANDSP_LIBS = @SPANDSP_LIBS@ +SPC_LIBS = @SPC_LIBS@ +SRTP_LIBS = @SRTP_LIBS@ +STRIP = @STRIP@ +TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@ +TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@ +TIGER_CFLAGS = @TIGER_CFLAGS@ +TIGER_LIBS = @TIGER_LIBS@ +TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ +TIMIDITY_LIBS = @TIMIDITY_LIBS@ +USE_NLS = @USE_NLS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ +VDPAU_CFLAGS = @VDPAU_CFLAGS@ +VDPAU_LIBS = @VDPAU_LIBS@ +VERSION = @VERSION@ +VOAACENC_CFLAGS = @VOAACENC_CFLAGS@ +VOAACENC_LIBS = @VOAACENC_LIBS@ +VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@ +VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WASAPI_LIBS = @WASAPI_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ +WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ +WILDMIDI_LIBS = @WILDMIDI_LIBS@ +WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@ +WINSOCK2_LIBS = @WINSOCK2_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XVID_LIBS = @XVID_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZBAR_CFLAGS = @ZBAR_CFLAGS@ +ZBAR_LIBS = @ZBAR_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gsettingsschemadir = @gsettingsschemadir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +plugindir = @plugindir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +plugin_LTLIBRARIES = libgstjpegformat.la +libgstjpegformat_la_SOURCES = gstjpegformat.c gstjpegparse.c gstjifmux.c +libgstjpegformat_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) + +libgstjpegformat_la_LIBADD = \ + $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) + +libgstjpegformat_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstjpegformat_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) +noinst_HEADERS = gstjpegformat.h gstjpegparse.h gstjifmux.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/jpegformat/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gst/jpegformat/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ + } + +uninstall-pluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ + done + +clean-pluginLTLIBRARIES: + -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) + @list='$(plugin_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgstjpegformat.la: $(libgstjpegformat_la_OBJECTS) $(libgstjpegformat_la_DEPENDENCIES) $(EXTRA_libgstjpegformat_la_DEPENDENCIES) + $(AM_V_CCLD)$(libgstjpegformat_la_LINK) -rpath $(plugindir) $(libgstjpegformat_la_OBJECTS) $(libgstjpegformat_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstjpegformat_la-gstjifmux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstjpegformat_la-gstjpegformat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstjpegformat_la-gstjpegparse.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libgstjpegformat_la-gstjpegformat.lo: gstjpegformat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstjpegformat_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstjpegformat_la_CFLAGS) $(CFLAGS) -MT libgstjpegformat_la-gstjpegformat.lo -MD -MP -MF $(DEPDIR)/libgstjpegformat_la-gstjpegformat.Tpo -c -o libgstjpegformat_la-gstjpegformat.lo `test -f 'gstjpegformat.c' || echo '$(srcdir)/'`gstjpegformat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstjpegformat_la-gstjpegformat.Tpo $(DEPDIR)/libgstjpegformat_la-gstjpegformat.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstjpegformat.c' object='libgstjpegformat_la-gstjpegformat.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstjpegformat_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstjpegformat_la_CFLAGS) $(CFLAGS) -c -o libgstjpegformat_la-gstjpegformat.lo `test -f 'gstjpegformat.c' || echo '$(srcdir)/'`gstjpegformat.c + +libgstjpegformat_la-gstjpegparse.lo: gstjpegparse.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstjpegformat_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstjpegformat_la_CFLAGS) $(CFLAGS) -MT libgstjpegformat_la-gstjpegparse.lo -MD -MP -MF $(DEPDIR)/libgstjpegformat_la-gstjpegparse.Tpo -c -o libgstjpegformat_la-gstjpegparse.lo `test -f 'gstjpegparse.c' || echo '$(srcdir)/'`gstjpegparse.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstjpegformat_la-gstjpegparse.Tpo $(DEPDIR)/libgstjpegformat_la-gstjpegparse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstjpegparse.c' object='libgstjpegformat_la-gstjpegparse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstjpegformat_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstjpegformat_la_CFLAGS) $(CFLAGS) -c -o libgstjpegformat_la-gstjpegparse.lo `test -f 'gstjpegparse.c' || echo '$(srcdir)/'`gstjpegparse.c + +libgstjpegformat_la-gstjifmux.lo: gstjifmux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstjpegformat_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstjpegformat_la_CFLAGS) $(CFLAGS) -MT libgstjpegformat_la-gstjifmux.lo -MD -MP -MF $(DEPDIR)/libgstjpegformat_la-gstjifmux.Tpo -c -o libgstjpegformat_la-gstjifmux.lo `test -f 'gstjifmux.c' || echo '$(srcdir)/'`gstjifmux.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstjpegformat_la-gstjifmux.Tpo $(DEPDIR)/libgstjpegformat_la-gstjifmux.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstjifmux.c' object='libgstjpegformat_la-gstjifmux.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstjpegformat_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstjpegformat_la_CFLAGS) $(CFLAGS) -c -o libgstjpegformat_la-gstjifmux.lo `test -f 'gstjifmux.c' || echo '$(srcdir)/'`gstjifmux.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(plugindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pluginLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pluginLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pluginLTLIBRARIES install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-pluginLTLIBRARIES + + +Android.mk: Makefile.am $(BUILT_SOURCES) + androgenizer \ + -:PROJECT libgstjpegformat -:SHARED libgstjpegformat \ + -:TAGS eng debug \ + -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ + -:SOURCES $(libgstjpegformat_la_SOURCES) \ + -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstjpegformat_la_CFLAGS) \ + -:LDFLAGS $(libgstjpegformat_la_LDFLAGS) \ + $(libgstjpegformat_la_LIBADD) \ + -ldl \ + -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ + LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ + > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: debian/patches/flxdec-bounds1.patch0000664000000000000000000002022113015046220014444 0ustar From ec66c7c584f0b41c98e93758d9b53bd6dd582df2 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 22 Nov 2016 19:05:00 +1100 Subject: flxdec: add some write bounds checking Without checking the bounds of the frame we are writing into, we can write off the end of the destination buffer. https://scarybeastsecurity.blogspot.dk/2016/11/0day-exploit-advancing-exploitation.html https://bugzilla.gnome.org/show_bug.cgi?id=774834 Index: gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/flx/gstflxdec.c 2016-11-22 08:47:58.034294752 -0500 +++ gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c 2016-11-22 08:47:58.034294752 -0500 @@ -72,9 +72,9 @@ GstQuery * query); static void flx_decode_color (GstFlxDec *, guchar *, guchar *, gint); -static void flx_decode_brun (GstFlxDec *, guchar *, guchar *); -static void flx_decode_delta_fli (GstFlxDec *, guchar *, guchar *); -static void flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *); +static gboolean flx_decode_brun (GstFlxDec *, guchar *, guchar *); +static gboolean flx_decode_delta_fli (GstFlxDec *, guchar *, guchar *); +static gboolean flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *); #define rndalign(off) ((off) + ((off) & 1)) @@ -201,13 +201,14 @@ return ret; } -static void +static gboolean flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data, guchar * dest) { FlxFrameChunk *hdr; + gboolean ret = TRUE; - g_return_if_fail (data != NULL); + g_return_val_if_fail (data != NULL, FALSE); while (count--) { hdr = (FlxFrameChunk *) data; @@ -226,17 +227,17 @@ break; case FLX_BRUN: - flx_decode_brun (flxdec, data, dest); + ret = flx_decode_brun (flxdec, data, dest); data += rndalign (hdr->size) - FlxFrameChunkSize; break; case FLX_LC: - flx_decode_delta_fli (flxdec, data, dest); + ret = flx_decode_delta_fli (flxdec, data, dest); data += rndalign (hdr->size) - FlxFrameChunkSize; break; case FLX_SS2: - flx_decode_delta_flc (flxdec, data, dest); + ret = flx_decode_delta_flc (flxdec, data, dest); data += rndalign (hdr->size) - FlxFrameChunkSize; break; @@ -254,7 +255,12 @@ data += rndalign (hdr->size) - FlxFrameChunkSize; break; } + + if (!ret) + break; } + + return ret; } @@ -287,13 +293,13 @@ } } -static void +static gboolean flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest) { gulong count, lines, row; guchar x; - g_return_if_fail (flxdec != NULL); + g_return_val_if_fail (flxdec != NULL, FALSE); lines = flxdec->hdr.height; while (lines--) { @@ -311,12 +317,21 @@ if (count > 0x7f) { /* literal run */ count = 0x100 - count; + if ((glong) row - count < 0) { + GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected."); + return FALSE; + } row -= count; while (count--) *dest++ = *data++; } else { + if ((glong) row - count < 0) { + GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected."); + return FALSE; + } + /* replicate run */ row -= count; x = *data++; @@ -326,22 +341,28 @@ } } } + + return TRUE; } -static void +static gboolean flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest) { gulong count, packets, lines, start_line; guchar *start_p, x; - g_return_if_fail (flxdec != NULL); - g_return_if_fail (flxdec->delta_data != NULL); + g_return_val_if_fail (flxdec != NULL, FALSE); + g_return_val_if_fail (flxdec->delta_data != NULL, FALSE); /* use last frame for delta */ memcpy (dest, flxdec->delta_data, flxdec->size); start_line = (data[0] + (data[1] << 8)); lines = (data[2] + (data[3] << 8)); + if (start_line + lines > flxdec->hdr.height) { + GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. too many lines."); + return FALSE; + } data += 4; /* start position of delta */ @@ -354,7 +375,8 @@ while (packets--) { /* skip count */ - dest += *data++; + guchar skip = *data++; + dest += skip; /* RLE count */ count = *data++; @@ -362,12 +384,24 @@ if (count > 0x7f) { /* literal run */ count = 0x100 - count; - x = *data++; + if (skip + count > flxdec->hdr.width) { + GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. " + "line too long."); + return FALSE; + } + + x = *data++; while (count--) *dest++ = x; } else { + if (skip + count > flxdec->hdr.width) { + GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. " + "line too long."); + return FALSE; + } + /* replicate run */ while (count--) *dest++ = *data++; @@ -376,21 +410,27 @@ start_p += flxdec->hdr.width; dest = start_p; } + + return TRUE; } -static void +static gboolean flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest) { gulong count, lines, start_l, opcode; guchar *start_p; - g_return_if_fail (flxdec != NULL); - g_return_if_fail (flxdec->delta_data != NULL); + g_return_val_if_fail (flxdec != NULL, FALSE); + g_return_val_if_fail (flxdec->delta_data != NULL, FALSE); /* use last frame for delta */ memcpy (dest, flxdec->delta_data, flxdec->size); lines = (data[0] + (data[1] << 8)); + if (lines > flxdec->hdr.height) { + GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. too many lines."); + return FALSE; + } data += 2; start_p = dest; @@ -403,9 +443,15 @@ while ((opcode = (data[0] + (data[1] << 8))) & 0xc000) { data += 2; if ((opcode & 0xc000) == 0xc000) { - /* skip count */ - start_l += (0x10000 - opcode); - dest += flxdec->hdr.width * (0x10000 - opcode); + /* line skip count */ + gulong skip = (0x10000 - opcode); + if (skip > flxdec->hdr.height) { + GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. " + "skip line count too big."); + return FALSE; + } + start_l += skip; + dest += flxdec->hdr.width * skip; } else { /* last pixel */ dest += flxdec->hdr.width; @@ -417,7 +463,8 @@ /* last opcode is the packet count */ while (opcode--) { /* skip count */ - dest += *data++; + guchar skip = *data++; + dest += skip; /* RLE count */ count = *data++; @@ -425,12 +472,25 @@ if (count > 0x7f) { /* replicate word run */ count = 0x100 - count; + + if (skip + count > flxdec->hdr.width) { + GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. " + "line too long."); + return FALSE; + } + while (count--) { *dest++ = data[0]; *dest++ = data[1]; } data += 2; } else { + if (skip + count > flxdec->hdr.width) { + GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. " + "line too long."); + return FALSE; + } + /* literal word run */ while (count--) { *dest++ = *data++; @@ -440,6 +500,8 @@ } lines--; } + + return TRUE; } static GstFlowReturn @@ -569,9 +631,13 @@ out = gst_buffer_new_and_alloc (flxdec->size * 4); /* decode chunks */ - flx_decode_chunks (flxdec, - ((FlxFrameType *) chunk)->chunks, - chunk + FlxFrameTypeSize, flxdec->frame_data); + if (!flx_decode_chunks (flxdec, + ((FlxFrameType *) chunk)->chunks, + chunk + FlxFrameTypeSize, flxdec->frame_data)) { + GST_ELEMENT_ERROR (flxdec, STREAM, DECODE, + ("%s", "Could not decode chunk"), NULL); + return GST_FLOW_ERROR; + } /* save copy of the current frame for possible delta. */ memcpy (flxdec->delta_data, flxdec->frame_data, flxdec->size); debian/patches/add-pkgconfig-file0000664000000000000000000000407612220772427014170 0ustar Description: Add a pkgconfig file to facilitate linking against libgstphotography Author: Iain Lane Forwarded: not-needed Index: b/pkgconfig/gstreamer-plugins-good.pc.in =================================================================== --- /dev/null +++ b/pkgconfig/gstreamer-plugins-good.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/gstreamer-@GST_API_VERSION@ + +Name: GStreamer Good Plugin libraries +Description: Currently includes the photography interface library +Requires: gstreamer-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@ +Version: @VERSION@ +Libs: -L${libdir} -lgstphotography-@GST_API_VERSION@ +Cflags: -I${includedir} Index: b/pkgconfig/Makefile.am =================================================================== --- a/pkgconfig/Makefile.am +++ b/pkgconfig/Makefile.am @@ -5,7 +5,7 @@ gstreamer-plugins-good-@GST_API_VERSION@-uninstalled.pc ### all-local: $(pcverfiles) $(pcverfiles_uninstalled) -all-local: $(pcverfiles_uninstalled) +all-local: $(pcverfiles) $(pcverfiles_uninstalled) cp_verbose = $(cp_verbose_$(V)) cp_verbose_ = $(cp_verbose_$(AM_DEFAULT_VERBOSITY)) @@ -18,14 +18,14 @@ $(cp_verbose)cp $< $@ # do not install for now -# pkgconfigdir = $(libdir)/pkgconfig -# pkgconfig_DATA = $(pcverfiles) +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(pcverfiles) CLEANFILES = $(pcverfiles) $(pcverfiles_uninstalled) # pcinfiles = \ # gstreamer-plugins-good.pc.in gstreamer-plugins-good-uninstalled.pc.in pcinfiles = \ - gstreamer-plugins-good-uninstalled.pc.in + gstreamer-plugins-good.pc.in gstreamer-plugins-good-uninstalled.pc.in DISTCLEANFILES = $(pcinfiles:.in=) EXTRA_DIST = $(pcinfiles) Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -1218,6 +1218,7 @@ docs/plugins/Makefile docs/version.entities pkgconfig/Makefile +pkgconfig/gstreamer-plugins-good.pc pkgconfig/gstreamer-plugins-good-uninstalled.pc gst-plugins-good.spec ) debian/patches/CVE-2016-10198.patch0000664000000000000000000000237113064755736013346 0ustar From 87a2c140ca54c5128093377e9b25a5c24b346727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 1 Dec 2016 13:38:16 +0200 Subject: [PATCH] aacparse: Make sure we have enough data in the codec_data to be able to parse it Also error out cleanly if mapping the buffer failed. https://bugzilla.gnome.org/show_bug.cgi?id=775450 --- gst/audioparsers/gstaacparse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: gst-plugins-good1.0-1.2.4/gst/audioparsers/gstaacparse.c =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/audioparsers/gstaacparse.c 2017-03-23 10:29:48.215839807 -0400 +++ gst-plugins-good1.0-1.2.4/gst/audioparsers/gstaacparse.c 2017-03-23 10:29:48.199839618 -0400 @@ -294,11 +294,12 @@ if (value) { GstBuffer *buf = gst_value_get_buffer (value); - if (buf) { + if (buf && gst_buffer_get_size (buf) >= 2) { GstMapInfo map; guint sr_idx; - gst_buffer_map (buf, &map, GST_MAP_READ); + if (!gst_buffer_map (buf, &map, GST_MAP_READ)) + return FALSE; sr_idx = ((map.data[0] & 0x07) << 1) | ((map.data[1] & 0x80) >> 7); aacparse->object_type = (map.data[0] & 0xf8) >> 3; debian/patches/flxdec-bounds3.patch0000664000000000000000000000165113016035047014462 0ustar From b31c504645a814c59d91d49e4fe218acaf93f4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 23 Nov 2016 11:20:49 +0200 Subject: flxdec: Don't unref() parent in the chain function We don't own the reference here, it is owned by the caller and given to us for the scope of this function. Leftover mistake from 0.10 porting. https://bugzilla.gnome.org/show_bug.cgi?id=774897 Index: gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/flx/gstflxdec.c 2016-11-25 08:18:29.592853562 -0500 +++ gst-plugins-good1.0-1.2.4/gst/flx/gstflxdec.c 2016-11-25 08:18:29.588853524 -0500 @@ -676,7 +676,6 @@ { GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, (NULL), ("not a flx file (type %x)", flxh->type)); - gst_object_unref (flxdec); return GST_FLOW_ERROR; } } debian/patches/CVE-2016-10199.patch0000664000000000000000000000226513064757014013340 0ustar Backport of: From d0949baf3dadea6021d54abef6802fed5a06af75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 1 Dec 2016 13:32:22 +0200 Subject: [PATCH] qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451 --- gst/isomp4/qtdemux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: gst-plugins-good1.0-1.2.4/gst/isomp4/qtdemux.c =================================================================== --- gst-plugins-good1.0-1.2.4.orig/gst/isomp4/qtdemux.c 2017-03-23 10:29:57.907954018 -0400 +++ gst-plugins-good1.0-1.2.4/gst/isomp4/qtdemux.c 2017-03-23 10:32:06.185467388 -0400 @@ -8943,7 +8943,7 @@ } else { len = QT_UINT32 (node->data); type = QT_UINT32 ((guint8 *) node->data + 4); - if ((type >> 24) == 0xa9) { + if ((type >> 24) == 0xa9 && len > 8 + 4) { /* Type starts with the (C) symbol, so the next 32 bits are * the language code, which we ignore */ offset = 12; debian/maint0000775000000000000000000000047612324572347010246 0ustar #!/usr/bin/make -f missing: make -f debian/rules list-missing missing-so: make -f debian/rules list-missing | grep so$$ | cut -c 2- missing-libs: for i in `make -f debian/rules list-missing | grep so$$ | cut -c 2-`; do echo "=== $$i ==="; ldd debian/tmp/$$i; echo; done .PHONY: missing missing-so missing-libs debian/gstreamer-pulseaudio.install0000664000000000000000000000007012324572347014727 0ustar debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstpulse.so debian/build-deps0000664000000000000000000000150112324572347011151 0ustar @GST_LIB_DEV_DEP@ @GST_EXTRA_BUILD_DEPENDS@ libgstreamer-plugins-base@GST_ABI@-dev (>= 1.2.3) autotools-dev dh-autoreconf automake (>= 1.11) autoconf (>= 2.62) libtool (>= 2.2.6) autopoint (>= 0.17) cdbs (>= 0.4.93) debhelper (>= 9) dpkg-dev (>= 1.15.1) pkg-config (>= 0.11.0) gtk-doc-tools (>= 1.12) libglib2.0-dev (>= 2.32) liborc-0.4-dev (>= 1:0.4.17) libcairo2-dev (>= 1.10.0) libcaca-dev libspeex-dev (>= 1.1.6) libpng-dev libshout3-dev libjpeg-dev libaa1-dev (>= 1.4p5) libflac-dev (>= 1.1.4) libdv4-dev | libdv-dev libxdamage-dev libxext-dev libxfixes-dev libxv-dev libgtk-3-dev libtag1-dev (>= 1.5) libwavpack-dev (>= 4.20) gstreamer@GST_ABI@-plugins-base (>= 1.0.0) libsoup2.4-dev (>= 2.38) libpulse-dev (>= 2.0) libbz2-dev gstreamer@GST_ABI@-doc gstreamer@GST_ABI@-plugins-base-doc libjack-jackd2-dev libvpx-dev (>= 1.3.0) debian/copyright0000664000000000000000000015231612324572347011144 0ustar This package was debianized by David I. Lehn on Mon, 15 Jan 2001 18:21:37 -0500. It was downloaded from http://gstreamer.net/ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Gstreamer Good Plugins 1.0 Upstream-Contact: gstreamer-devel@lists.freedesktop.org Source: http://gstreamer.freedesktop.org Files: ext/aalib/gstaasink.c ext/aalib/gstaasink.h ext/cairo/gsttimeoverlay.h ext/dv/gstdv.c ext/dv/gstdvdec.c ext/dv/gstdvdec.h ext/dv/gstdvdemux.c ext/dv/gstdvdemux.h ext/flac/gstflac.c ext/flac/gstflacenc.c ext/flac/gstflacenc.h ext/jpeg/gstjpeg.c ext/jpeg/gstjpeg.h ext/jpeg/gstjpegdec.h ext/jpeg/gstjpegenc.c ext/jpeg/gstjpegenc.h ext/libcaca/gstcacasink.c ext/libcaca/gstcacasink.h ext/libpng/gstpngdec.h ext/libpng/gstpngenc.h ext/raw1394/gst1394.c ext/raw1394/gstdv1394src.c ext/raw1394/gstdv1394src.h ext/shout2/gstshout2.h ext/speex/gstspeex.c ext/speex/gstspeexdec.h ext/speex/gstspeexenc.c ext/speex/gstspeexenc.h gst/alpha/gstalphacolor.c gst/avi/avi-ids.h gst/cutter/gstcutter.h gst/debugutils/gstnavigationtest.h gst/debugutils/gstnavseek.h gst/flv/gstmemindex.c gst/flx/flx_color.h gst/flx/flx_fmt.h gst/flx/gstflxdec.h gst/isomp4/qtdemux.h gst/isomp4/qtdemux_fourcc.h gst/isomp4/qtdemux_types.c gst/isomp4/qtpalette.h gst/law/mulaw-decode.c gst/law/mulaw-decode.h gst/law/mulaw-encode.c gst/law/mulaw-encode.h gst/multipart/multipart.c gst/rtp/gstrtp.c gst/rtp/gstrtpgsmdepay.h gst/rtp/gstrtpgsmpay.h gst/smpte/barboxwipes.c gst/smpte/gstmask.c gst/smpte/gstmask.h gst/smpte/gstsmpte.c gst/smpte/gstsmpte.h gst/smpte/gstsmptealpha.h gst/smpte/paint.c gst/smpte/paint.h gst/spectrum/gstspectrum.c gst/udp/gstudp.c gst/udp/gstudp.h gst/udp/gstudpsink.h gst/udp/gstudpsrc.h gst/videobox/gstvideobox.h gst/videofilter/gstvideobalance.h gst/videofilter/gstvideoflip.h gst/y4m/gsty4mencode.h sys/oss/gstossaudio.c Copyright: <1999> Erik Walthinsen License: LGPL-2+ Files: ext/gdk_pixbuf/gstgdkpixbufoverlay.c ext/gdk_pixbuf/gstgdkpixbufoverlay.h ext/gdk_pixbuf/gstgdkpixbufsink.c ext/gdk_pixbuf/gstgdkpixbufsink.h gst/audioparsers/gstdcaparse.c gst/audioparsers/gstdcaparse.h gst/audioparsers/plugin.c gst/isomp4/qtdemux_lang.c gst/isomp4/qtdemux_lang.h gst/videocrop/gstvideocrop.c gst/videocrop/gstvideocrop.h sys/oss4/oss4-audio.c sys/oss4/oss4-audio.h sys/oss4/oss4-mixer-enum.c sys/oss4/oss4-mixer-enum.h sys/oss4/oss4-mixer-slider.c sys/oss4/oss4-mixer-slider.h sys/oss4/oss4-mixer-switch.c sys/oss4/oss4-mixer-switch.h sys/oss4/oss4-mixer.c sys/oss4/oss4-mixer.h sys/oss4/oss4-property-probe.c sys/oss4/oss4-property-probe.h sys/oss4/oss4-sink.c sys/oss4/oss4-sink.h sys/oss4/oss4-source.c sys/oss4/oss4-source.h tests/check/elements/alphacolor.c tests/check/elements/flvdemux.c tests/check/elements/flvmux.c tests/check/elements/gdkpixbufsink.c tests/check/elements/id3demux.c tests/check/elements/id3v2mux.c tests/check/elements/matroskaparse.c tests/check/elements/sunaudio.c tests/check/elements/udpsrc.c tests/check/elements/videocrop.c tests/icles/equalizer-test.c tests/icles/gdkpixbufsink-test.c tests/icles/test-oss4.c tests/icles/videocrop-test.c Copyright: 2006, Tim-Philipp Müller 2006-2008, Tim-Philipp Müller 2007, Tim-Philipp Müller 2007-2008, Tim-Philipp Müller 2008, Tim-Philipp Müller 2009, Tim-Philipp Müller 2010, Tim-Philipp Müller 2011, Tim-Philipp Müller 2012, Tim-Philipp Müller License: LGPL-2+ Files: gst/rtp/gstasteriskh263.c gst/rtp/gstasteriskh263.h gst/rtp/gstrtpL16pay.h gst/rtp/gstrtpac3depay.h gst/rtp/gstrtpamrdepay.c gst/rtp/gstrtpamrdepay.h gst/rtp/gstrtpamrpay.c gst/rtp/gstrtpamrpay.h gst/rtp/gstrtph263depay.h gst/rtp/gstrtph263pay.h gst/rtp/gstrtph263pdepay.c gst/rtp/gstrtph263pdepay.h gst/rtp/gstrtph263ppay.c gst/rtp/gstrtph263ppay.h gst/rtp/gstrtpjpegdepay.h gst/rtp/gstrtpmp2tdepay.c gst/rtp/gstrtpmp4apay.h gst/rtp/gstrtpmp4gdepay.c gst/rtp/gstrtpmp4gdepay.h gst/rtp/gstrtpmp4gpay.h gst/rtp/gstrtpmp4vdepay.c gst/rtp/gstrtpmp4vdepay.h gst/rtp/gstrtpmp4vpay.c gst/rtp/gstrtpmp4vpay.h gst/rtp/gstrtpmpadepay.c gst/rtp/gstrtpmpadepay.h gst/rtp/gstrtpmpapay.c gst/rtp/gstrtpmpapay.h gst/rtp/gstrtpmpvdepay.h gst/rtp/gstrtpsv3vdepay.c gst/rtp/gstrtpsv3vdepay.h gst/rtp/gstrtpvorbispay.h Copyright: <2005> Wim Taymans License: LGPL-2+ Files: gst/goom/convolve_fx.c gst/goom/drawmethods.c gst/goom/drawmethods.h gst/goom/filters.c gst/goom/flying_stars_fx.c gst/goom/goom.h gst/goom/goom_config.h gst/goom/goom_config_param.h gst/goom/goom_filters.h gst/goom/goom_fx.h gst/goom/goom_graphic.h gst/goom/goom_plugin_info.h gst/goom/goom_tools.c gst/goom/goom_tools.h gst/goom/goom_typedefs.h gst/goom/graphic.c gst/goom/lines.c gst/goom/lines.h gst/goom/motif_goom1.h gst/goom/motif_goom2.h gst/goom/plugin_info.c gst/goom/sound_tester.c gst/goom/sound_tester.h gst/goom/surf3d.c gst/goom/surf3d.h gst/goom/tentacle3d.c gst/goom/tentacle3d.h gst/goom/v3d.c gst/goom/v3d.h Copyright: <2003> iOS-Software License: LGPL-2+ Files: gst/audiofx/audiochebband.c gst/audiofx/audiochebband.h gst/audiofx/audiocheblimit.c gst/audiofx/audiocheblimit.h gst/audiofx/audioecho.c gst/audiofx/audioecho.h gst/audiofx/audiofirfilter.c gst/audiofx/audiofirfilter.h gst/audiofx/audiofxbaseiirfilter.c gst/audiofx/audiofxbaseiirfilter.h gst/audiofx/audioiirfilter.c gst/audiofx/audioiirfilter.h gst/deinterlace/tvtime/scalerbob.c gst/flv/gstflvmux.c gst/flv/gstflvmux.h gst/imagefreeze/gstimagefreeze.h gst/matroska/webm-mux.c gst/matroska/webm-mux.h gst/shapewipe/gstshapewipe.c gst/shapewipe/gstshapewipe.h gst/videofilter/plugin.c gst/videomixer/blend.h tests/check/elements/audioecho.c tests/check/elements/imagefreeze.c tests/check/elements/shapewipe.c tests/examples/shapewipe/shapewipe-example.c Copyright: 2007-2009, Sebastian Dröge 2008, Sebastian Dröge 2008,2010, Sebastian Dröge 2008-2009, Sebastian Dröge 2009, Sebastian Dröge 2009-2010, Sebastian Dröge 2010, Sebastian Dröge License: LGPL-2+ Files: gst/avi/gstavimux.h gst/matroska/ebml-ids.h gst/matroska/ebml-read.c gst/matroska/ebml-read.h gst/matroska/matroska-ids.h gst/matroska/matroska.c sys/oss/gstossmixer.c sys/oss/gstossmixer.h sys/oss/gstossmixertrack.c sys/oss/gstossmixertrack.h sys/v4l2/gstv4l2.c sys/v4l2/gstv4l2bufferpool.c sys/v4l2/gstv4l2bufferpool.h sys/v4l2/gstv4l2colorbalance.c sys/v4l2/gstv4l2colorbalance.h sys/v4l2/gstv4l2object.c sys/v4l2/gstv4l2object.h sys/v4l2/gstv4l2src.c sys/v4l2/gstv4l2src.h sys/v4l2/gstv4l2tuner.c sys/v4l2/gstv4l2tuner.h sys/v4l2/gstv4l2videooverlay.c sys/v4l2/gstv4l2videooverlay.h sys/v4l2/v4l2_calls.c sys/v4l2/v4l2_calls.h Copyright: 2001-2002, Ronald Bultje 2002, Ronald Bultje 2003, Ronald Bultje License: LGPL-2+ Files: gst/rtp/gstrtpL16depay.c gst/rtp/gstrtpL16depay.h gst/rtp/gstrtpL16pay.c gst/rtp/gstrtpac3depay.c gst/rtp/gstrtpg722depay.c gst/rtp/gstrtpmp2tpay.c gst/rtp/gstrtpmp2tpay.h gst/rtpmanager/gstrtpbin.c gst/rtpmanager/gstrtpbin.h gst/rtpmanager/gstrtpmanager.c gst/rtpmanager/gstrtpptdemux.h gst/rtpmanager/gstrtpsession.c gst/rtpmanager/gstrtpsession.h gst/rtpmanager/gstrtpssrcdemux.c gst/rtpmanager/gstrtpssrcdemux.h gst/rtpmanager/rtpjitterbuffer.c gst/rtpmanager/rtpjitterbuffer.h gst/rtpmanager/rtpsession.c gst/rtpmanager/rtpsession.h gst/rtpmanager/rtpsource.c gst/rtpmanager/rtpsource.h gst/rtpmanager/rtpstats.c gst/rtpmanager/rtpstats.h Copyright: <2007> Wim Taymans License: LGPL-2+ Files: gst/audiofx/audiofxbasefirfilter.c gst/audiofx/audiofxbasefirfilter.h gst/audiofx/audiowsincband.c gst/audiofx/audiowsincband.h gst/audiofx/audiowsinclimit.c gst/audiofx/audiowsinclimit.h gst/flv/gstindex.h gst/interleave/deinterleave.c gst/interleave/deinterleave.h gst/interleave/interleave.c gst/interleave/interleave.h gst/multifile/gstmultifile.c gst/multifile/gstmultifilesink.c gst/multifile/gstmultifilesink.h sys/oss/common.h sys/oss/gstossdmabuffer.h sys/oss/gstosshelper.c sys/oss/gstosshelper.h sys/oss/gstosssink.c sys/oss/gstosssink.h sys/oss/gstosssrc.c sys/oss/gstosssrc.h Copyright: 1999-2000, Erik Walthinsen 1999-2001, Erik Walthinsen License: LGPL-2+ Files: gst/rtp/gstrtph264depay.c gst/rtp/gstrtph264depay.h gst/rtp/gstrtph264pay.h gst/rtp/gstrtpmp1sdepay.h gst/rtp/gstrtpmp2tdepay.h gst/rtp/gstrtpmp4gpay.c gst/rtp/gstrtpmpvdepay.c gst/rtp/gstrtptheoradepay.c gst/rtp/gstrtptheoradepay.h gst/rtp/gstrtptheorapay.c gst/rtp/gstrtptheorapay.h gst/rtp/gstrtpvorbisdepay.c gst/rtp/gstrtpvorbisdepay.h gst/rtp/gstrtpvorbispay.c Copyright: <2006> Wim Taymans License: LGPL-2+ Files: ext/annodex/gstannodex.c ext/annodex/gstannodex.h ext/annodex/gstcmmldec.c ext/annodex/gstcmmldec.h ext/annodex/gstcmmlenc.c ext/annodex/gstcmmlenc.h ext/annodex/gstcmmlparser.c ext/annodex/gstcmmlparser.h ext/annodex/gstcmmltag.c ext/annodex/gstcmmltag.h ext/annodex/gstcmmlutils.c ext/annodex/gstcmmlutils.h tests/check/elements/cmmldec.c tests/check/elements/cmmlenc.c Copyright: 2005, Alessandro Decina License: LGPL-2+ Files: ext/pulse/plugin.c ext/pulse/pulsemixer.c ext/pulse/pulsemixer.h ext/pulse/pulsemixerctrl.c ext/pulse/pulsemixerctrl.h ext/pulse/pulsemixertrack.c ext/pulse/pulsemixertrack.h ext/pulse/pulseprobe.c ext/pulse/pulseprobe.h ext/pulse/pulsesink.h ext/pulse/pulsesrc.c ext/pulse/pulsesrc.h ext/pulse/pulseutil.c ext/pulse/pulseutil.h Copyright: 2004-2008, Lennart Poettering License: LGPL-2.1+ Files: gst/rtp/gstrtpac3pay.c gst/rtp/gstrtpac3pay.h gst/rtp/gstrtpg722depay.h gst/rtp/gstrtpg722pay.c gst/rtp/gstrtpg722pay.h gst/rtp/gstrtpg723depay.c gst/rtp/gstrtpg723depay.h gst/rtp/gstrtpgstdepay.c gst/rtp/gstrtpgstdepay.h gst/rtp/gstrtpgstpay.c gst/rtp/gstrtpgstpay.h gst/rtp/gstrtpqcelpdepay.c gst/rtp/gstrtpqcelpdepay.h Copyright: <2010> Wim Taymans License: LGPL-2+ Files: ext/wavpack/gstwavpackenc.c ext/wavpack/gstwavpackenc.h ext/wavpack/gstwavpackstreamreader.c ext/wavpack/gstwavpackstreamreader.h gst/audiofx/audiodynamic.c gst/audiofx/audiodynamic.h gst/audiofx/math_compat.h tests/check/elements/deinterleave.c tests/check/elements/wavpackdec.c tests/check/elements/wavpackenc.c tests/check/elements/wavpackparse.c tests/check/pipelines/wavpack.c Copyright: 2006, Sebastian Dröge 2007, Sebastian Dröge 2008, Sebastian Dröge License: LGPL-2+ Files: gst/rtp/gstrtpbvdepay.c gst/rtp/gstrtpbvdepay.h gst/rtp/gstrtpbvpay.c gst/rtp/gstrtpbvpay.h gst/rtp/gstrtpceltdepay.c gst/rtp/gstrtpceltdepay.h gst/rtp/gstrtpceltpay.c gst/rtp/gstrtpceltpay.h gst/rtp/gstrtpj2kdepay.c gst/rtp/gstrtpj2kdepay.h tests/check/elements/rtpbin.c Copyright: <2009> Wim Taymans License: LGPL-2+ Files: sys/sunaudio/gstsunaudio.c sys/sunaudio/gstsunaudiomixer.c sys/sunaudio/gstsunaudiomixer.h sys/sunaudio/gstsunaudiomixerctrl.c sys/sunaudio/gstsunaudiomixerctrl.h sys/sunaudio/gstsunaudiomixeroptions.c sys/sunaudio/gstsunaudiomixeroptions.h sys/sunaudio/gstsunaudiomixertrack.c sys/sunaudio/gstsunaudiomixertrack.h sys/sunaudio/gstsunaudiosrc.c sys/sunaudio/gstsunaudiosrc.h Copyright: 2005,2008-2009, Sun Microsystems, Inc. 2005-2006, Sun Microsystems, Inc. 2005-2006,2008-2009, Sun Microsystems, Inc. 2005-2006,2009, Sun Microsystems, Inc. 2008, Sun Microsystems, Inc. 2009, Sun Microsystems, Inc. License: LGPL-2+ Files: gst/replaygain/gstrganalysis.c gst/replaygain/gstrganalysis.h gst/replaygain/gstrglimiter.c gst/replaygain/gstrglimiter.h gst/replaygain/gstrgvolume.c gst/replaygain/gstrgvolume.h gst/replaygain/replaygain.c gst/replaygain/replaygain.h tests/check/elements/rganalysis.c tests/check/elements/rglimiter.c tests/check/elements/rgvolume.c Copyright: 2006, Rene Stadler 2007, Rene Stadler License: LGPL-2.1+ Files: gst/rtp/gstrtpchannels.c gst/rtp/gstrtpchannels.h gst/rtp/gstrtpjpegdepay.c gst/rtp/gstrtpmp1sdepay.c gst/rtp/gstrtpmp4apay.c gst/rtp/gstrtpvrawdepay.c gst/rtp/gstrtpvrawdepay.h gst/rtp/gstrtpvrawpay.c gst/rtp/gstrtpvrawpay.h gst/smpte/gstsmptealpha.c Copyright: <2008> Wim Taymans License: LGPL-2+ Files: gst/audioparsers/gstaacparse.c gst/audioparsers/gstaacparse.h tests/check/elements/aacparse.c tests/check/elements/ac3parse.c tests/check/elements/amrparse.c tests/check/elements/flacparse.c tests/check/elements/mpegaudioparse.c tests/check/elements/parser.c tests/check/elements/parser.h Copyright: 2008, Nokia Corporation. 2010, Nokia Corporation. License: LGPL-2+ Files: ext/jack/gstjack.c ext/jack/gstjack.h ext/jack/gstjackaudioclient.c ext/jack/gstjackaudioclient.h ext/jack/gstjackaudiosink.c ext/jack/gstjackaudiosink.h gst/alpha/gstalphacolor.h gst/multipart/multipartmux.c gst/multipart/multipartmux.h gst/rtp/gstrtpg729depay.c gst/rtp/gstrtpg729depay.h gst/rtp/gstrtph264pay.c gst/rtp/gstrtpsirendepay.c gst/rtp/gstrtpsirendepay.h gst/rtp/gstrtpsirenpay.c gst/rtp/gstrtpsirenpay.h sys/ximage/gstximagesrc.h Copyright: 2004, Wim Taymans 2005, Wim Taymans 2006, Wim Taymans License: LGPL-2+ Files: gst/effectv/gsteffectv.c gst/effectv/gsteffectv.h gst/effectv/gstrev.c gst/effectv/gstrev.h gst/effectv/gstshagadelic.c gst/effectv/gstshagadelic.h gst/effectv/gstvertigo.c gst/effectv/gstvertigo.h Copyright: 2001, FUKUCHI Kentarou <1999> Erik Walthinsen License: LGPL-2+ Files: gst/rtp/gstrtppcmadepay.h gst/rtp/gstrtppcmapay.h gst/rtp/gstrtppcmudepay.h gst/rtp/gstrtppcmupay.h gst/rtp/gstrtpspeexdepay.c gst/rtp/gstrtpspeexdepay.h gst/rtp/gstrtpspeexpay.c gst/rtp/gstrtpspeexpay.h Copyright: <2005> Edgard Lima License: LGPL-2+ Files: gst/audiofx/audioamplify.c gst/audiofx/audioamplify.h gst/audiofx/audioinvert.c gst/audiofx/audioinvert.h gst/audiofx/audiopanorama.c tests/check/elements/audioamplify.c tests/check/elements/audiodynamic.c tests/check/elements/audioinvert.c Copyright: 2006, Sebastian Dröge 2006, Stefan Kost 2007, Sebastian Dröge License: LGPL-2+ Files: gst/audiofx/audiokaraoke.c gst/audiofx/audiokaraoke.h gst/rtp/gstrtpj2kpay.c gst/rtp/gstrtpj2kpay.h tests/examples/rtp/client-PCMA.c tests/examples/rtp/server-alsasrc-PCMA.c tests/icles/videobox-test.c tests/icles/videocrop2-test.c Copyright: 2008, Wim Taymans 2009, Wim Taymans License: LGPL-2+ Files: gst/audiofx/audiofx.c gst/audiofx/audiopanorama.h gst/debugutils/gsttaginject.c gst/debugutils/gsttaginject.h tests/check/elements/audiopanorama.c tests/examples/spectrum/demo-audiotest.c tests/examples/spectrum/demo-osssrc.c Copyright: 2006, Stefan Kost 2008, Stefan Kost License: LGPL-2+ Files: gst/effectv/gstop.c gst/effectv/gstop.h gst/effectv/gstripple.c gst/effectv/gstripple.h gst/effectv/gststreak.c gst/effectv/gststreak.h Copyright: 2001-2002, FUKUCHI Kentaro 2001-2006, FUKUCHI Kentaro 2004-2005, FUKUCHI Kentaro <2009> Sebastian Dröge License: LGPL-2+ Files: sys/osxaudio/gstosxaudioelement.c sys/osxaudio/gstosxaudioelement.h sys/osxaudio/gstosxaudiosink.c sys/osxaudio/gstosxaudiosink.h sys/osxaudio/gstosxaudiosrc.c sys/osxaudio/gstosxringbuffer.c Copyright: 2005-2006, Zaheer Abbas Merali 2006, Zaheer Abbas Merali 2007, Pioneers of the Inevitable 2007-2008, Pioneers of the Inevitable 2008, Pioneers of the Inevitable License: MIT/X11 (BSD like) LGPL-2+ Files: ext/cairo/gsttextoverlay.c ext/cairo/gsttimeoverlay.c gst/debugutils/gstnavigationtest.c gst/debugutils/gstnavseek.c gst/videofilter/gstvideotemplate.c Copyright: <1999> Erik Walthinsen <2003> David Schleef License: LGPL-2+ Files: gst/goom/config_param.c gst/goom/goom_core.c gst/goom/goom_visual_fx.h gst/goom/mathtools.c gst/goom/mathtools.h Copyright: <2003> Jean-Christophe Hoelt License: LGPL-2+ Files: gst/equalizer/gstiirequalizer10bands.c gst/equalizer/gstiirequalizer10bands.h gst/equalizer/gstiirequalizer3bands.c gst/equalizer/gstiirequalizer3bands.h tests/check/elements/spectrum.c Copyright: <2007> Stefan Kost License: LGPL-2+ Files: gst/deinterlace/tvtime/greedyh.c gst/deinterlace/tvtime/linear.c gst/deinterlace/tvtime/linearblend.c gst/deinterlace/tvtime/plugins.h gst/deinterlace/tvtime/tomsmocomp.c Copyright: 2002, Billy Biggs 2004, Billy Biggs 2008, Sebastian Dröge 2008,2010, Sebastian Dröge License: LGPL-2+ Files: ext/dv/gstsmptetimecode.c ext/dv/gstsmptetimecode.h gst/multifile/gstmultifilesrc.c gst/multifile/gstmultifilesrc.h tests/check/elements/multifile.c Copyright: 2006, David A. Schleef 2007, David A. Schleef 2009, David A. Schleef License: LGPL-2+ Files: tests/check/elements/audiochebband.c tests/check/elements/audiocheblimit.c tests/check/elements/audiowsincband.c tests/check/elements/audiowsinclimit.c tests/check/elements/equalizer.c Copyright: 2007, Sebastian Dröge 2008, Sebastian Dröge License: LGPL-2.1+ Files: gst/effectv/gstedge.c gst/effectv/gstedge.h gst/effectv/gstquark.c gst/effectv/gstquark.h Copyright: 2001-2002, FUKUCHI Kentarou <1999> Erik Walthinsen <2009> Sebastian Dröge License: LGPL-2+ Files: gst/equalizer/gstiirequalizer.c gst/equalizer/gstiirequalizer.h gst/equalizer/gstiirequalizernbands.c gst/equalizer/gstiirequalizernbands.h Copyright: <2004> Benjamin Otte License: LGPL-2+ Files: gst/rtp/gstrtpilbcdepay.c gst/rtp/gstrtpilbcdepay.h gst/rtp/gstrtpilbcpay.c gst/rtp/gstrtpilbcpay.h Copyright: <2006> Philippe Khalaf License: LGPL-2+ Files: gst/rtp/gstrtpg723pay.c gst/rtp/gstrtpg723pay.h gst/rtp/gstrtpg729pay.c gst/rtp/gstrtpg729pay.h Copyright: <2007> Collabora Ltd <2007> Nokia Corporation License: LGPL-2+ Files: gst/debugutils/breakmydata.c gst/debugutils/gstdebug.c gst/debugutils/testplugin.c gst/debugutils/tests.h Copyright: 2004, Benjamin Otte License: LGPL-2+ Files: gst/icydemux/gsticydemux.c gst/icydemux/gsticydemux.h gst/id3demux/gstid3demux.c gst/id3demux/gstid3demux.h Copyright: 2003-2004, Benjamin Otte 2005, Jan Schmidt License: LGPL-2+ Files: gst/autodetect/gstautoaudiosink.h gst/autodetect/gstautodetect.c gst/autodetect/gstautodetect.h gst/autodetect/gstautovideosink.h Copyright: 2005, Ronald S. Bultje License: LGPL-2+ Files: gst/isomp4/fourcc.h gst/rtsp/gstrtsp.c gst/rtsp/gstrtsp.h gst/rtsp/gstrtspsrc.h Copyright: <1999> Erik Walthinsen License: MIT/X11 (BSD like) LGPL-2+ Files: gst/isomp4/atomsrecovery.c gst/isomp4/atomsrecovery.h gst/isomp4/gstqtmoovrecover.c gst/isomp4/gstqtmoovrecover.h Copyright: 2010, Thiago Santos License: MIT/X11 (BSD like) LGPL-2+ Files: gst/isomp4/descriptors.c gst/isomp4/descriptors.h gst/isomp4/properties.c gst/isomp4/properties.h Copyright: 2008, Thiago Sousa Santos License: MIT/X11 (BSD like) LGPL-2+ Files: common/coverage/coverage-report-entry.pl common/coverage/coverage-report.pl common/coverage/coverage-report.xsl Copyright: 2006, Daniel Berrange License: GPL-2+ Files: gst/avi/gstavi.c gst/flx/flx_color.c gst/flx/gstflxdec.c Copyright: <1999> Erik Walthinsen License: LGPL-2+ Files: tests/check/elements/avimux.c tests/check/elements/videofilter.c tests/check/elements/y4menc.c Copyright: <2006> Mark Nauwelaerts License: LGPL-2+ Files: gst/rtp/gstrtpmpvpay.c gst/rtp/gstrtpmpvpay.h tests/check/elements/avisubtitle.c Copyright: <2007> Thijs Vermeir License: LGPL-2+ Files: gst/rtp/gstrtpjpegpay.c gst/rtp/gstrtpjpegpay.h tests/check/elements/udpsink.c Copyright: 2008, Axis Communications 2009, Axis Communications License: LGPL-2+ Files: gst/deinterlace/tvtime/weave.c gst/deinterlace/tvtime/weavebff.c gst/deinterlace/tvtime/weavetff.c Copyright: 2002, Billy Biggs 2003, Billy Biggs 2008,2010, Sebastian Dröge License: LGPL-2+ Files: ext/taglib/gstapev2mux.cc ext/taglib/gstapev2mux.h ext/taglib/gsttaglibplugin.c Copyright: 2006, Christophe Fergeau 2006, Sebastian Dröge 2006, Tim-Philipp Müller License: LGPL-2+ Files: gst/matroska/matroska-demux.h gst/matroska/matroska-parse.h gst/matroska/matroska-read-common.h Copyright: 2003, Ronald Bultje 2011, Debarshi Ray License: LGPL-2+ Files: gst/matroska/matroska-demux.c gst/matroska/matroska-parse.c gst/matroska/matroska-read-common.c Copyright: 2003, Ronald Bultje 2006, Tim-Philipp Müller 2008, Sebastian Dröge 2011, Debarshi Ray License: LGPL-2+ Files: gst/matroska/ebml-write.c gst/matroska/ebml-write.h gst/matroska/matroska-mux.h Copyright: 2003, Ronald Bultje 2005, Michal Benes License: LGPL-2+ Files: gst/apetag/gstapedemux.c gst/apetag/gstapedemux.h gst/matroska/matroska-ids.c Copyright: 2003, Ronald Bultje 2004, Ronald Bultje 2006, Tim-Philipp Müller License: LGPL-2+ Files: gst/videomixer/videomixer2.c gst/videomixer/videomixer2.h gst/videomixer/videomixer2pad.h Copyright: 2004, 2008 Wim Taymans 2008, Wim Taymans 2010, Sebastian Dröge License: LGPL-2+ Files: sys/waveform/gstwaveformplugin.c sys/waveform/gstwaveformsink.c sys/waveform/gstwaveformsink.h Copyright: 2005, Sebastien Moutte License: LGPL-2+ Files: gst/videocrop/gstaspectratiocrop.c gst/videocrop/gstaspectratiocrop.h tests/check/elements/aspectratiocrop.c Copyright: 2009, Thijs Vermeir License: LGPL-2+ Files: gst/rtp/fnv1hash.c gst/rtp/fnv1hash.h tests/check/pipelines/flacdec.c Copyright: 2007, Thomas Vander Stichele 2009, Thomas Vander Stichele License: LGPL-2+ Files: ext/soup/gstsoup.c ext/soup/gstsouphttpsrc.c ext/soup/gstsouphttpsrc.h Copyright: 2007-2008, Wouter Cloetens License: LGPL-2+ Files: gst/isomp4/gstqtmux-doc.c gst/isomp4/gstqtmux-doc.h gst/isomp4/gstqtmux.c Copyright: 2008, Mark Nauwelaerts 2008-2010, Thiago Santos 2010, Nokia Corporation. License: MIT/X11 (BSD like) LGPL-2+ Files: gst/effectv/gstradioac.c gst/effectv/gstradioac.h Copyright: 2001-2002, FUKUCHI Kentaro 2001-2006, FUKUCHI Kentaro <2009> Sebastian Dröge License: LGPL Files: gst/rtp/gstrtpmp4adepay.c gst/rtp/gstrtpmp4adepay.h Copyright: <2007> Nokia Corporation (contact ) License: LGPL-2 Files: gst/cutter/gstcutter.c gst/level/gstlevel.c Copyright: 2000-2003,2005, 2002-2003,2005, <1999> Erik Walthinsen License: LGPL-2+ Files: gst/debugutils/progressreport.c gst/debugutils/progressreport.h Copyright: <1999> Erik Walthinsen <2003> David Schleef <2004> Jan Schmidt <2006> Tim-Philipp Müller License: LGPL-2+ Files: gst/effectv/gstaging.c gst/effectv/gstaging.h Copyright: 2001-2002, FUKUCHI Kentarou <1999> Erik Walthinsen <2003> David Schleef <2009> Sebastian Dröge License: LGPL-2+ Files: gst/effectv/gstwarp.c gst/effectv/gstwarp.h Copyright: 2001, FUKUCHI Kentarou <1999> Erik Walthinsen <2003> David Schleef License: LGPL-2+ Files: ext/gdk_pixbuf/pixbufscale.c ext/gdk_pixbuf/pixbufscale.h Copyright: <1999> Erik Walthinsen <2004> Jan Schmidt <2004> Tim-Philipp Mueller License: LGPL-2+ Files: gst/rtp/gstrtppcmapay.c gst/rtp/gstrtppcmupay.c Copyright: <1999> Erik Walthinsen <2005> Edgard Lima <2005> Nokia Corporation License: LGPL-2+ Files: gst/rtp/gstrtppcmadepay.c gst/rtp/gstrtppcmudepay.c Copyright: <1999> Erik Walthinsen <2005> Edgard Lima <2005> Zeeshan Ali License: LGPL-2+ Files: gst/rtp/gstrtpgsmdepay.c gst/rtp/gstrtpgsmpay.c Copyright: <1999> Erik Walthinsen <2005> Zeeshan Ali License: LGPL-2+ Files: gst/wavparse/gstwavparse.c gst/wavparse/gstwavparse.h Copyright: <1999> Erik Walthinsen <2006> Nokia Corporation, Stefan Kost License: LGPL-2+ Files: gst/auparse/gstauparse.c gst/auparse/gstauparse.h Copyright: <1999> Erik Walthinsen <2006> Tim-Philipp Müller License: LGPL-2+ Files: gst/alpha/gstalpha.c gst/alpha/gstalpha.h Copyright: <1999> Erik Walthinsen <2007> Edward Hervey <2007> Jan Schmidt <2007> Wim Taymans License: LGPL-2+ Files: gst/isomp4/qtdemux_dump.h gst/isomp4/qtdemux_types.h Copyright: <1999> Erik Walthinsen <2009> STEricsson License: LGPL-2+ Files: gst/effectv/gstdice.c gst/effectv/gstdice.h Copyright: 2001, Sam Mertens. This code is subject to the provisions of <1999> Erik Walthinsen <2009> Sebastian Dröge License: LGPL-2+ Files: gst/goom/gstgoom.h gst/goom2k1/gstgoom.h Copyright: <2001> Richard Boulton License: LGPL-2+ Files: gst/monoscope/gstmonoscope.c gst/monoscope/gstmonoscope.h Copyright: <2002> Richard Boulton <2006> Tim-Philipp Müller <2006> Wim Taymans License: LGPL-2+ Files: gst/goom/ppc_drawings.h gst/goom/ppc_zoom_ultimate.h Copyright: <2003> Guillaume Borios, iOS-Software License: LGPL-2+ Files: sys/ximage/ximageutil.c sys/ximage/ximageutil.h Copyright: <2005> Luca Ognibene License: LGPL-2+ Files: tests/check/elements/level.c tests/check/generic/states.c Copyright: <2005> Thomas Vander Stichele License: LGPL-2+ Files: gst/isomp4/gstrtpxqtdepay.h gst/udp/gstmultiudpsink.h Copyright: <2005> Wim Taymans License: LGPL-2+ Files: gst/flv/gstflvdemux.c gst/flv/gstflvdemux.h Copyright: <2007> Julien Moutte License: LGPL-2+ Files: gst/debugutils/gstpushfilesrc.c gst/debugutils/gstpushfilesrc.h Copyright: <2007> Tim-Philipp Müller License: LGPL-2+ Files: ext/raw1394/gsthdv1394src.c ext/raw1394/gsthdv1394src.h Copyright: <2008> Edward Hervey License: LGPL-2+ Files: gst/rtp/gstrtpqdmdepay.c gst/rtp/gstrtpqdmdepay.h Copyright: <2009> Edward Hervey License: LGPL-2+ Files: gst/rtp/gstrtpmparobustdepay.c gst/rtp/gstrtpmparobustdepay.h Copyright: <2010> Mark Nauwelaerts <2010> Nokia Corporation License: LGPL-2+ Files: gst/debugutils/cpureport.c gst/debugutils/cpureport.h Copyright: <2010> Zaheer Abbas Merali License: LGPL-2+ Files: ext/cairo/gstcairooverlay.c ext/cairo/gstcairooverlay.h Copyright: <2011> Jon Nordby License: LGPL-2+ Files: gst/law/alaw-decode.h gst/law/alaw-encode.h Copyright: 2000, Abramo Bagnara License: LGPL-2+ Files: sys/v4l2/gstv4l2radio.c sys/v4l2/gstv4l2radio.h Copyright: 2010-2011, Alexey Chernov <4ernov@gmail.com> License: LGPL-2+ Files: sys/oss/gstossmixerelement.c sys/oss/gstossmixerelement.h Copyright: 2005, Andrew Vander Wingo License: LGPL-2+ Files: gst/interleave/plugin.c gst/interleave/plugin.h Copyright: 2004,2007, Andy Wingo License: LGPL-2+ Files: ext/wavpack/gstwavpackcommon.h ext/wavpack/gstwavpackdec.h Copyright: 2004, Arwed v. Merkatz 2005, Arwed v. Merkatz 2006, Sebastian Dröge License: LGPL-2+ Files: ext/flac/gstflactag.c ext/flac/gstflactag.h Copyright: 2003, Christophe Fergeau 2008, Jonathan Matthew 2008, Sebastian Dröge License: LGPL-2+ Files: ext/taglib/gstid3v2mux.cc ext/taglib/gstid3v2mux.h Copyright: 2006, Christophe Fergeau 2006, Tim-Philipp Müller License: LGPL-2+ Files: gst/rtpmanager/gstrtpjitterbuffer.c gst/rtpmanager/gstrtpjitterbuffer.h Copyright: 2007, Collabora Ltd 2007, Nokia Corporation 2007, Wim Taymans License: LGPL-2+ Files: gst/multifile/gstsplitfilesrc.c gst/multifile/gstsplitfilesrc.h Copyright: 2011, Collabora Ltd. License: LGPL-2+ Files: ext/gdk_pixbuf/gstgdkpixbuf.c ext/gdk_pixbuf/gstgdkpixbuf.h Copyright: 1999-2001, Erik Walthinsen 2003, David A. Schleef License: LGPL-2+ Files: sys/sunaudio/gstsunaudiosink.c sys/sunaudio/gstsunaudiosink.h Copyright: 2004, David A. Schleef 2005-2006, Sun Microsystems, Inc. 2006, Jan Schmidt License: LGPL-2+ Files: ext/soup/gstsouphttpclientsink.c ext/soup/gstsouphttpclientsink.h Copyright: 2011, David Schleef License: LGPL-2+ Files: ext/raw1394/gst1394clock.c ext/raw1394/gst1394clock.h Copyright: 1999-2000, Erik Walthinsen 2009, David Schleef License: LGPL-2+ Files: sys/v4l2/gstv4l2vidorient.c sys/v4l2/gstv4l2vidorient.h Copyright: 2006, Edgard Lima License: LGPL-2+ Files: sys/directsound/gstdirectsoundsink.c sys/directsound/gstdirectsoundsink.h Copyright: 2005, Sebastien Moutte 2007, Pioneers of the Inevitable 2010, Fluendo S.A. License: LGPL-2+ Files: gst/audioparsers/gstmpegaudioparse.c gst/audioparsers/gstmpegaudioparse.h Copyright: 2006-2007, Jan Schmidt 2010, Mark Nauwelaerts 2010, Nokia Corporation. License: LGPL-2+ Files: gst/autodetect/gstautoaudiosink.c gst/autodetect/gstautovideosink.c Copyright: 2005, Ronald S. Bultje 2006, Jan Schmidt License: LGPL-2+ Files: gst/autodetect/gstautoaudiosrc.c gst/autodetect/gstautovideosrc.c Copyright: 2005, Ronald S. Bultje 2006, Jan Schmidt 2008, Stefan Kost License: LGPL-2+ Files: ext/raw1394/gst1394probe.c ext/raw1394/gst1394probe.h Copyright: 2007, Julien Puydt License: LGPL-2+ Files: ext/cairo/gstcairorender.c ext/cairo/gstcairorender.h Copyright: 2006-2009, Lutz Mueller License: LGPL-2+ Files: gst/rtp/gstrtpdvdepay.h gst/rtp/gstrtpdvpay.h Copyright: 2006, Marcel Moreaux License: LGPL-2+ Files: gst/rtp/gstrtpdvdepay.c gst/rtp/gstrtpdvpay.c Copyright: 2006, Marcel Moreaux 2008, Wim Taymans License: LGPL-2+ Files: gst/audioparsers/gstwavpackparse.c gst/audioparsers/gstwavpackparse.h Copyright: 2012, Mark Nauwelaerts 2012, Nokia Corporation. License: LGPL-2+ Files: gst/audioparsers/gstflacparse.c gst/audioparsers/gstflacparse.h Copyright: 2008, Sebastian Dröge 2009, Mark Nauwelaerts 2009, Nokia Corporation. License: LGPL-2+ Files: gst/audioparsers/gstac3parse.c gst/audioparsers/gstac3parse.h Copyright: 2009, Mark Nauwelaerts 2009, Nokia Corporation. 2009, Tim-Philipp Müller License: LGPL-2+ Files: gst/debugutils/gstcapssetter.c gst/debugutils/gstcapssetter.h Copyright: 2006-2009, Mark Nauwelaerts License: LGPL-2+ Files: tests/check/elements/rtp-payloading.c tests/check/elements/rtpjitterbuffer.c Copyright: 2008, Nokia Corporation and its subsidary(-ies) 2009, Nokia Corporation and its subsidary(-ies) License: LGPL-2+ Files: gst/multifile/patternspec.c gst/multifile/patternspec.h Copyright: 1995-1997, 1999 Peter Mattis, Red Hat, Inc License: LGPL-2+ Files: sys/osxvideo/cocoawindow.h sys/osxvideo/osxvideosink.h Copyright: 2004, Zaheer Abbas Merali 2004-6 Zaheer Abbas Merali 2007, Pioneers of the Inevitable License: LGPL-2+ Files: gst/monoscope/convolve.c gst/monoscope/convolve.h Copyright: 1999, Ralph Loader License: LGPL-2+ Files: gst/autodetect/gstautoaudiosrc.h gst/autodetect/gstautovideosrc.h Copyright: 2005, Ronald S. Bultje 2008, Stefan Kost License: LGPL-2+ Files: tests/examples/audiofx/firfilter-example.c tests/examples/audiofx/iirfilter-example.c Copyright: 2009, Sebastian Droege License: LGPL-2+ Files: tests/check/elements/apev2mux.c tests/check/elements/interleave.c Copyright: 2006, Sebastian Dröge 2006, Tim-Philipp Müller 2007, Tim-Philipp Müller 2008, Sebastian Dröge License: LGPL-2+ Files: gst/deinterlace/gstdeinterlacemethod.c gst/deinterlace/gstdeinterlacemethod.h Copyright: 2008-2010, Sebastian Dröge License: LGPL-2+ Files: gst/multipart/multipartdemux.c gst/multipart/multipartdemux.h Copyright: 2004, Wim Taymans 2006, Sjoerd Simons License: LGPL-2+ Files: sys/v4l2/gstv4l2sink.c sys/v4l2/gstv4l2sink.h Copyright: 2009, Texas Instruments, Inc - http://www.ti.com/ License: LGPL-2+ Files: gst/deinterlace/tvtime/greedyhmacros.h gst/deinterlace/tvtime/tomsmocomp/TomsMoCompAll.inc Copyright: 2001, Tom Barry 2002, Tom Barry License: LGPL-2+ Files: ext/jack/gstjackutil.c ext/jack/gstjackutil.h Copyright: 2010, Tristan Matthews License: LGPL-2+ Files: gst/law/alaw.c gst/law/mulaw.c Copyright: <1999> Erik Walthinsen License: LGPL-2.1+ Files: gst/law/alaw-decode.c gst/law/alaw-encode.c Copyright: 2000, Abramo Bagnara License: LGPL-2.1+ Files: tests/check/elements/audiofirfilter.c tests/check/elements/audioiirfilter.c Copyright: 2009, Sebastian Dröge License: LGPL-2.1+ Files: gst/rtsp/gstrtspext.c gst/rtsp/gstrtspext.h Copyright: <2006> Wim Taymans License: MIT/X11 (BSD like) LGPL-2+ Files: gst/isomp4/gstqtmuxmap.c gst/isomp4/gstqtmuxmap.h Copyright: 2008, Mark Nauwelaerts 2008, Thiago Sousa Santos License: MIT/X11 (BSD like) LGPL-2+ Files: gst/isomp4/atoms.h gst/isomp4/gstqtmux.h Copyright: 2008-2010, Thiago Santos License: MIT/X11 (BSD like) LGPL-2+ Files: ext/jack/gstjackaudiosrc.c ext/jack/gstjackaudiosrc.h Copyright: 2008, Tristan Matthews License: MIT/X11 (BSD like) LGPL-2+ Files: sys/osxaudio/gstosxaudiosrc.h sys/osxaudio/gstosxringbuffer.h Copyright: 2005-2006, Zaheer Abbas Merali 2006, Zaheer Abbas Merali License: MIT/X11 (BSD like) LGPL-2+ Files: ext/libpng/gstpng.c ext/libpng/gstpngenc.c Copyright: 2000, Donald A. Graft <1999> Erik Walthinsen License: LGPL-2+ Files: gst/goom/ifs.c gst/goom/ifs.h Copyright: 1997, Massimino Pascal License: LGPL-2+ Files: gst/monoscope/monoscope.c Copyright: 1998-2001, Andy Lo A Foe 2002, Richard Boulton License: BSD (3 clause) Files: ltmain.sh Copyright: 1996-2001, 2003-2006 License: GPL-2+ Files: tests/examples/level/level-example.c Copyright: 2000-2003,2005 License: LGPL-2+ Files: gst/level/gstlevel.h Copyright: 1999, Erik Walthinsen 2000-2003,2005, License: LGPL-2+ Files: ext/cairo/gstcairo.c Copyright: <1999> Erik Walthinsen <2003-2004> David Schleef License: LGPL-2+ Files: gst/isomp4/isomp4-plugin.c Copyright: <1999> Erik Walthinsen <2003> David A. Schleef <2006> Wim Taymans License: LGPL-2+ Files: gst/isomp4/qtdemux.c Copyright: <1999> Erik Walthinsen <2003> David A. Schleef <2006> Wim Taymans <2007> Julien Moutte <2009> STEricsson <2009> Tim-Philipp Müller License: LGPL-2+ Files: gst/videofilter/gstvideobalance.c Copyright: <1999> Erik Walthinsen <2003> David Schleef <2010> Sebastian Dröge License: LGPL-2+ Files: gst/videofilter/gstvideoflip.c Copyright: <1999> Erik Walthinsen <2003> David Schleef <2010> Sebastian Dröge <2011> Youness Alaoui License: LGPL-2+ Files: gst/videofilter/gstgamma.h Copyright: 2003, Arwed v. Merkatz 2006, Mark Nauwelaerts <1999> Erik Walthinsen <2003> David Schleef License: LGPL-2+ Files: gst/videofilter/gstgamma.c Copyright: 2003, Arwed v. Merkatz 2006, Mark Nauwelaerts 2010, Sebastian Dröge <1999> Erik Walthinsen <2003> David Schleef License: LGPL-2+ Files: ext/flac/gstflacdec.c Copyright: <1999> Erik Walthinsen <2006,2011> Tim-Philipp Müller <2006> Jan Schmidt License: LGPL-2+ Files: gst/y4m/gsty4mencode.c Copyright: <1999> Erik Walthinsen <2006> Mark Nauwelaerts License: LGPL-2+ Files: gst/avi/gstavidemux.h Copyright: <1999> Erik Walthinsen <2006> Nokia Corporation (contact ) License: LGPL-2+ Files: ext/shout2/gstshout2.c Copyright: <1999> Erik Walthinsen <2006> Tim-Philipp Müller <2012> Ralph Giles License: LGPL-2+ Files: gst/isomp4/qtdemux_dump.c Copyright: 2009, Tim-Philipp Müller <1999> Erik Walthinsen <2009> STEricsson License: LGPL-2+ Files: gst/spectrum/gstspectrum.h Copyright: <1999> Erik Walthinsen <2009> Sebastian Dröge License: LGPL-2+ Files: ext/jpeg/gstjpegdec.c Copyright: <1999> Erik Walthinsen <2009> Tim-Philipp Müller License: LGPL-2+ Files: ext/flac/gstflacdec.h Copyright: <1999> Erik Walthinsen <2011> Tim-Philipp Müller License: LGPL-2+ Files: gst/avi/gstavidemux.c Copyright: <1999> Erik Walthinsen <2006> Nokia Corporation (contact ) <2009-2010> STEricsson License: LGPL-2+ Files: gst/goom2k1/gstgoom.c Copyright: <2001> Richard Boulton <2006> Wim Taymans License: LGPL-2+ Files: gst/goom/gstgoom.c Copyright: <2001> Richard Boulton <2006> Wim Taymans <2011> Wim Taymans License: LGPL-2+ Files: gst/wavenc/gstwavenc.c Copyright: <2002> Iain Holmes <2006> Tim-Philipp Müller License: LGPL-2+ Files: gst/rtpmanager/gstrtpptdemux.c Copyright: 2005, Nokia Corporation <2004> Wim Taymans License: LGPL-2+ Files: tests/check/elements/matroskamux.c Copyright: <2005> Michal Benes License: LGPL-2+ Files: gst/udp/gstdynudpsink.c Copyright: <2005> Nokia Corporation <2005> Philippe Khalaf <2006> Joni Valtanen <2012> Collabora Ltd License: LGPL-2+ Files: gst/udp/gstudpsrc.c Copyright: <2005> Nokia Corporation <2005> Wim Taymans <2012> Collabora Ltd License: LGPL-2+ Files: gst/udp/gstdynudpsink.h Copyright: <2005> Philippe Khalaf License: LGPL-2+ Files: gst/rtp/gstrtph263pay.c Copyright: <2005> Wim Taymans <2008> Dejan Sakelsak <2009> Janin Kolenc License: LGPL-2+ Files: gst/rtp/gstrtph263depay.c Copyright: 2007, Collabora Ltd 2007, Nokia Corporation <2005> Wim Taymans License: LGPL-2+ Files: gst/udp/gstudpsink.c Copyright: <2005> Wim Taymans <2012> Collabora Ltd License: LGPL-2+ Files: tests/check/elements/autodetect.c Copyright: <2006> Tim-Philipp Müller License: LGPL-2+ Files: gst/isomp4/gstrtpxqtdepay.c Copyright: <2006> Wim Taymans License: LGPL-2+ Files: tests/icles/ximagesrc-test.c Copyright: <2006> Zaheer Abbas Merali License: LGPL-2+ Files: gst/avi/gstavisubtitle.c Copyright: <2007> Thijs Vermeir <2007> Tim-Philipp Müller License: LGPL-2+ Files: gst/udp/gstmultiudpsink.c Copyright: <2007> Wim Taymans <2009> Jarkko Palviainen <2012> Collabora Ltd License: LGPL-2+ Files: tests/check/elements/qtmux.c Copyright: <2008> Mark Nauwelaerts License: LGPL-2+ Files: gst/smpte/plugin.c Copyright: <2008> Wim Taymans License: LGPL-2+ Files: tests/check/elements/capssetter.c Copyright: <2009> Mark Nauwelaerts License: LGPL-2+ Files: gst/isomp4/qtatomparser.h Copyright: 2009, Tim-Philipp Müller <2009> STEricsson License: LGPL-2+ Files: tests/check/pipelines/effectv.c Copyright: <2009> Sebastian Dröge License: LGPL-2+ Files: tests/check/pipelines/wavenc.c Copyright: <2010> Stefan Kost License: LGPL-2+ Files: tests/check/elements/jpegenc.c Copyright: <2010> Thiago Santos License: LGPL-2+ Files: gst/videomixer/blend.c Copyright: 2004, Wim Taymans 2006, Mindfruit Bv 2009, Alex Ugarte 2009, Sebastian Dröge License: LGPL-2+ Files: tests/check/pipelines/simple-launch-lines.c Copyright: 2005, Andy Wingo License: LGPL-2+ Files: ext/wavpack/gstwavpack.c Copyright: 2004, Arwed v. Merkatz License: LGPL-2+ Files: ext/wavpack/gstwavpackcommon.c Copyright: 1998, - 2005, Conifer Software 2005, Arwed v. Merkatz 2006, Sebastian Dröge License: LGPL-2+ Files: ext/wavpack/gstwavpackdec.c Copyright: 2005, Arwed v. Merkatz 2006, Edward Hervey 2006, Sebastian Dröge License: LGPL-2+ Files: gst/rtp/gstrtpg726pay.h Copyright: 2005, Edgard Lima 2007-2008, Axis Communications License: LGPL-2+ Files: gst/rtp/gstrtpg726pay.c Copyright: 1999, Erik Walthinsen 2005, Edgard Lima 2005, Nokia Corporation 2007-2008, Axis Communications License: LGPL-2+ Files: gst/rtp/gstrtpg726depay.c Copyright: 1999, Erik Walthinsen 2005, Edgard Lima 2005, Zeeshan Ali 2008, Axis Communications License: LGPL-2+ Files: gst/rtp/gstrtpg726depay.h Copyright: 2005, Edgard Lima 2008, Axis Communications AB License: LGPL-2+ Files: ext/gdk_pixbuf/gstgdkanimation.h Copyright: 2003, Benjamin Otte License: LGPL-2+ Files: gst/debugutils/tests.c Copyright: 1995-1997, 1999-2000, Free Software Foundation, Inc 2004, Benjamin Otte License: LGPL-2+ Files: gst/deinterlace/tvtime/vfir.c Copyright: 2001-2003, Fabrice Bellard 2004, Billy Biggs 2008,2010, Sebastian Dröge License: LGPL-2+ Files: gst/deinterlace/tvtime/greedy.c Copyright: 2000, Tom Barry 2002, Billy Biggs 2008,2010, Sebastian Dröge License: LGPL-2+ Files: tests/check/elements/rtpbin_buffer_list.c Copyright: 2009, Branko Subasic License: LGPL-2+ Files: gst-libs/gst/glib-compat-private.h Copyright: 2005, David Schleef License: LGPL-2+ Files: gst/deinterlace/tvtime/x86-64_macros.inc Copyright: 2004, Dirk Ziegelmeier License: LGPL-2+ Files: tests/icles/v4l2src-test.c Copyright: 2006, Edgard Lima License: LGPL-2+ Files: gst/audioparsers/gstamrparse.c Copyright: 2006, Edgard Lima 2008, Nokia Corporation. License: LGPL-2+ Files: gst/imagefreeze/gstimagefreeze.c Copyright: 2005, Edward Hervey 2010, Sebastian Dröge License: LGPL-2+ Files: sys/osxaudio/gstosxaudio.c Copyright: 1999, Erik Walthinsen 2007-2008, Pioneers of the Inevitable License: LGPL-2+ Files: gst/videobox/gstvideobox.c Copyright: 1999, Erik Walthinsen 2006, Tim-Philipp Müller 2010, Sebastian Dröge License: LGPL-2+ Files: gst/debugutils/gstcapsdebug.h Files: gst-libs/gst/gettext.h Copyright: 1995-1998, 2000-2002, Free Software Foundation, Inc License: LGPL-2+ Files: gst/wavenc/gstwavenc.h Copyright: 2002, Iain Holmes License: LGPL-2+ Files: tests/examples/spectrum/spectrum-example.c Copyright: 2006, Stefan Kost 2008, Jan Schmidt License: LGPL-2+ Files: gst/flv/amfdefs.h Copyright: 2011, Jan Schmidt License: LGPL-2+ Files: gst/udp/gstudpnetutils.c Copyright: 2006, Joni Valtanen 2006, Tim-Philipp Müller 2009, Jarkko Palviainen License: LGPL-2+ Files: tests/examples/cairo/cairo_overlay.c Copyright: 2011, Jon Nordby License: LGPL-2+ Files: gst/udp/gstudpnetutils.h Copyright: 2006, Joni Valtanen 2006, Tim-Philipp Müller License: LGPL-2+ Files: gst/avi/gstavimux.c Copyright: 2002, Ronald Bultje 2006, Mark Nauwelaerts License: LGPL-2+ Files: gst/matroska/matroska-mux.c Copyright: 2003, Ronald Bultje 2005, Michal Benes 2008, Sebastian Dröge 2011, Mark Nauwelaerts License: LGPL-2+ Files: gst/deinterlace/gstdeinterlace.c Copyright: 2005, Martin Eikermann 2008-2010, Sebastian Dröge 2011, Robert Swain License: LGPL-2+ Files: gst/deinterlace/gstdeinterlace.h Copyright: 2005, Martin Eikermann 2008-2010, Sebastian Dröge License: LGPL-2+ Files: tests/check/elements/icydemux.c Copyright: 2006, Michael Smith License: LGPL-2+ Files: gst/debugutils/rndbuffersize.c Copyright: 2007, Nokia Corporation (contact ) License: LGPL-2+ Files: gst/audioparsers/gstamrparse.h Copyright: 2004, Ronald Bultje 2008, Nokia Corporation. License: LGPL-2+ Files: tests/check/pipelines/tagschecking.c Copyright: 2008, Nokia Corporation. (contact ) 2010, Thiago Santos License: LGPL-2+ Files: sys/directsound/gstdirectsoundplugin.c Copyright: 2005, Sebastien Moutte 2007, Pioneers of the Inevitable License: LGPL-2+ Files: gst/flv/gstindex.c Copyright: 2001, RidgeRun (http://www.ridgerun.com/) License: LGPL-2+ Files: tests/examples/v4l2/camctrl.c Copyright: 2010, Stefan Kost License: LGPL-2+ Files: tests/check/elements/deinterlace.c Copyright: 2010, Thiago Santos License: LGPL-2+ Files: gst-libs/gst/gst-i18n-plugin.h Copyright: 2004, Thomas Vander Stichele License: LGPL-2+ Files: ext/speex/gstspeexdec.c Copyright: 2004, Wim Taymans 2006, Tim-Philipp Müller License: LGPL-2+ Files: tests/check/elements/souphttpsrc.c Copyright: 2001-2003, Ximian, Inc 2006-2007, Tim-Philipp Müller 2008, Wouter Cloetens License: LGPL-2+ Files: tests/examples/pulse/pulse.c Copyright: 2010, Wim Taymans License: LGPL-2+ Files: sys/ximage/gstximagesrc.c Copyright: 2006, Zaheer Merali License: LGPL-2+ Files: gst/matroska/lzo.c Copyright: 2006, Reimar Doeffinger License: LGPL-2.1+ Files: gst/replaygain/rganalysis.c Copyright: 2001, David Robinson 2001, David Robinson 2006, Rene Stadler License: LGPL-2.1+ Files: gst/replaygain/rganalysis.h Copyright: 2001, David Robinson 2006, Rene Stadler License: LGPL-2.1+ Files: ext/pulse/pulsesink.c Copyright: 2004-2008, Lennart Poettering 2009, Wim Taymans License: LGPL-2.1+ Files: gst/matroska/lzo.h Copyright: 2006, Reimar Doeffinger License: LGPL-2.1+ Files: gst/rtsp/gstrtspsrc.c Copyright: <2005-2006> Wim Taymans License: MIT/X11 (BSD like) LGPL-2+ Files: gst/rtsp/gstrtpdec.c Copyright: <2005-2006> Wim Taymans License: MIT/X11 (BSD like) LGPL-2+ Files: gst/rtsp/gstrtpdec.h Copyright: <2005-2006> Wim Taymans License: MIT/X11 (BSD like) LGPL-2+ Files: gst/isomp4/ftypcc.h Copyright: <2008> Thiago Sousa Santos License: MIT/X11 (BSD like) LGPL-2+ Files: gst/isomp4/atoms.c Copyright: 2008, Mark Nauwelaerts 2008-2010, Thiago Santos License: MIT/X11 (BSD like) LGPL-2+ Files: ext/jack/gstjackringbuffer.h Copyright: 2006, Wim Taymans 2008, Tristan Matthews License: MIT/X11 (BSD like) LGPL-2+ Files: ext/libpng/gstpngdec.c Copyright: <1999> Erik Walthinsen License: LGPL-2+ Files: sys/oss4/oss4-soundcard.h Copyright: 4Front Technologies 2000-2006. Released under the BSD license License: BSD Copyright: This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian GNU/Linux systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL'. debian/watch0000664000000000000000000000014612324572347010233 0ustar version=3 http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-(0\.11\..*)\.tar\.gz debian/README.Debian0000664000000000000000000000276612324572347011255 0ustar Gstreamer for Debian ==================== This package contains the GStreamer plugin distribution. More information can be found at http://gstreamer.net/ As of GStreamer plugins version 0.8.0 all packages are versioned and parallel installable with other releases with other major.minor versions. For example, 0.8.x series is versioned as 0.8 and parallel installable with both unversioned 0.6.x series and future 0.9.x and beyond. The version part is represented as VER below. GStreamer plugins are split into a number of packages: plugins without external dependencies: gstreamerVER-misc-good many independent plugins plugins with external dependencies: gstreamerVER-aa gstreamerVER-auto gstreamerVER-caca gstreamerVER-esd gstreamerVER-oss documentation: gstreamerVER-plugins-good-doc html documentation Notes ===== ChangeLog --------- The upstream ChangeLog is not included in all the plugin packages due to its large size. Please see upstream sources if you are interested in detailed source changes. External tools support ---------------------- Your favorite codec isn't wrapped as a plugin? External programs can be used to process streams. Take a look at "pipefilter" element or try something like this (untested): $ mkfifo fifo $ gst-launch myaudiosrc ! filesink location=fifo & $ cat fifo | my_encoder > output_file David I. Lehn Tue, 23 Mar 2004 04:38:37 -0500 update: Sebastien Bacher Wed, 14 Dec 2005 17:00:21 +0100 debian/gbp.conf0000664000000000000000000000022412324572347010616 0ustar [DEFAULT] upstream-branch = upstream debian-branch = master pristine-tar = True upstream-tag = upstream/%(version)s debian-tag = debian/%(version)s debian/build-deps.in0000664000000000000000000000150112324572347011556 0ustar @GST_LIB_DEV_DEP@ @GST_EXTRA_BUILD_DEPENDS@ libgstreamer-plugins-base@GST_ABI@-dev (>= 1.2.3) autotools-dev dh-autoreconf automake (>= 1.11) autoconf (>= 2.62) libtool (>= 2.2.6) autopoint (>= 0.17) cdbs (>= 0.4.93) debhelper (>= 9) dpkg-dev (>= 1.15.1) pkg-config (>= 0.11.0) gtk-doc-tools (>= 1.12) libglib2.0-dev (>= 2.32) liborc-0.4-dev (>= 1:0.4.17) libcairo2-dev (>= 1.10.0) libcaca-dev libspeex-dev (>= 1.1.6) libpng-dev libshout3-dev libjpeg-dev libaa1-dev (>= 1.4p5) libflac-dev (>= 1.1.4) libdv4-dev | libdv-dev libxdamage-dev libxext-dev libxfixes-dev libxv-dev libgtk-3-dev libtag1-dev (>= 1.5) libwavpack-dev (>= 4.20) gstreamer@GST_ABI@-plugins-base (>= 1.0.0) libsoup2.4-dev (>= 2.38) libpulse-dev (>= 2.0) libbz2-dev gstreamer@GST_ABI@-doc gstreamer@GST_ABI@-plugins-base-doc libjack-jackd2-dev libvpx-dev (>= 1.3.0) debian/gstreamer-plugins-good-doc.install0000664000000000000000000000003512324572347015730 0ustar debian/tmp/usr/share/gtk-doc debian/libgstreamer-plugins-good-dev.install0000664000000000000000000000012012211614611016405 0ustar debian/tmp/usr/lib/*/pkgconfig debian/tmp/usr/include debian/tmp/usr/lib/*/*.so debian/mk.control0000775000000000000000000000042412324572347011215 0ustar #!/usr/bin/perl -w open BUILDDEPS, "debian/build-deps"; @builddeplist = ; close BUILDDEPS; chomp(@builddeplist); $builddeps = join(", ", @builddeplist); open CONTROLIN, "debian/control.in"; while(){ s/BUILDDEPS/$builddeps/; print; } debian/rules0000775000000000000000000001426012324572347010264 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/gnome.mk include /usr/share/cdbs/1/rules/utils.mk include /usr/share/cdbs/1/rules/autoreconf.mk DEB_BUILD_PARALLEL = 1 DEB_DH_AUTORECONF_ARGS += --as-needed # make autoreconf not call autopoint since we ship a patch for po/Makefile.in.in export AUTOPOINT=true CFLAGS += -Wno-error CXXFLAGS += -Wno-error LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed DEB_MAKE_CHECK_TARGET = check || true # this is for compatibility with dpkg-dev < 1.13.5, see # DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) # Take account of old dpkg-architecture output. ifeq ($(DEB_HOST_ARCH_CPU),) DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) ifeq ($(DEB_HOST_ARCH_CPU),x86_64) DEB_HOST_ARCH_CPU := amd64 endif endif ifeq ($(DEB_HOST_ARCH_OS),) DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)) ifeq ($(DEB_HOST_ARCH_OS),gnu) DEB_HOST_ARCH_OS := hurd endif endif # end of compatibility block # debian package version version=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) # upstream version gst_version=$(shell echo $(version) | cut -d '-' -f 1) gst_major=1 gst_minor=0 gst_abi=$(gst_major).$(gst_minor) # gstreamer library package names gst_lib=libgstreamer$(gst_abi)-0 gst_lib_dev=libgstreamer$(gst_abi)-dev # what gstreamer version is needed gst_lib_dev_dep=$(gst_lib_dev) (>= 1.2.4) gst_pkgname=gstreamer$(gst_abi) gst_deb_abi=$(gst_abi)-0 gst_extra_build_depends = gst_extra_build_depends += libraw1394-dev (>= 2.0.0) [linux-any] gst_extra_build_depends += , libiec61883-dev (>= 1.0.0) [linux-any] gst_extra_build_depends += , libavc1394-dev [linux-any] gst_extra_build_depends += , libv4l-dev [linux-any] gst_extra_build_depends += , libgudev-1.0-dev (>= 143) [linux-any] # debug package DEB_DH_STRIP_ARGS := --dbg-package=$(gst_pkgname)-plugins-good-dbg # disable all CPU specific optimizations in commands launched by this Makefile # using liboil; this is to work around liboil related build failures which # are not specially interesting to catch on buildds as these might run very # specific hardware OIL_CPU_FLAGS=0 export OIL_CPU_FLAGS # The plugins are basically the same. # Link special names to a template file. # still need "*.install" to be done by hand PLUGINS += pulseaudio plugins-good CONFIG_ARGS := ifeq ($(DEB_HOST_ARCH_OS),linux) PLUGINS += endif VERSIONIZE= \ plugins-good-doc.install \ ifeq ($(DEB_HOST_ARCH_OS),linux) 1394 = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgst1394.so video4linux2 = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstvideo4linux2.so endif ifeq ($(DEB_HOST_ARCH_OS),hurd) CONFIG_ARGS += --disable-oss4 else oss4 = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstoss4audio.so endif ifeq ($(DEB_HOST_ARCH_OS),linux) DEFAULT_AUDIOSINK = autoaudiosink DEFAULT_AUDIOSRC = autoaudiosrc DEFAULT_VIDEOSINK = autovideosink DEFAULT_VIDEOSRC = v4l2src DEFAULT_VISUALIZER = goom else DEFAULT_AUDIOSINK = autoaudiosink DEFAULT_AUDIOSRC = autoaudiosrc DEFAULT_VIDEOSINK = autovideosink DEFAULT_VIDEOSRC = videotestsrc DEFAULT_VISUALIZER = goom endif # Let's decide the package name and url depending on the distribution DISTRO = "$(shell dpkg-vendor --query vendor)" GST_PACKAGE_NAME := "GStreamer Good Plugins (unknown Debian derivative)" GST_PACKAGE_ORIGIN="http://packages.qa.debian.org/gst-plugins-good$(gst_abi)" ifeq ($(DISTRO),"Debian") GST_PACKAGE_NAME := "GStreamer Good Plugins (Debian)" GST_PACKAGE_ORIGIN="http://packages.qa.debian.org/gst-plugins-good$(gst_abi)" endif ifeq ($(DISTRO),"Ubuntu") GST_PACKAGE_NAME := "GStreamer Good Plugins (Ubuntu)" GST_PACKAGE_ORIGIN="https://launchpad.net/distros/ubuntu/+source/gst-plugins-good$(gst_abi)" endif # setup links for packages pre-build:: for p in $(PLUGINS); do \ rm -f debian/$(gst_pkgname)-$$p.install; \ sed \ -e 's/@GST_ABI@/$(gst_abi)/g' \ -e 's,@1394@,$(1394),g' \ -e 's,@video4linux2@,$(video4linux2),g' \ -e 's,@oss4@,$(oss4),g' \ debian/gstreamer-$$p.install \ > debian/$(gst_pkgname)-$$p.install; \ done for f in $(VERSIONIZE); do \ sed 's/@GST_ABI@/$(gst_abi)/g' debian/gstreamer-$$f \ > debian/$(gst_pkgname)-$$f; \ done sed 's/@GST_ABI@/$(gst_abi)/g' debian/libgstreamer-plugins-good.install \ > debian/libgstreamer-plugins-good$(gst_deb_abi).install sed 's/@GST_ABI@/$(gst_abi)/g' debian/libgstreamer-plugins-good-dev.install \ > debian/libgstreamer-plugins-good$(gst_abi)-dev.install maint: debian/control debian/build-deps: debian/build-deps.in debian/rules cat $< > $@ debian/control:: debian/control.in debian/build-deps debian/mk.control debian/rules perl debian/mk.control | sed \ -e 's/@GST_VERSION@/$(gst_version)/g' \ -e 's/@GST_ABI@/$(gst_abi)/g' \ -e 's/@GST_DEB_ABI@/$(gst_deb_abi)/g' \ -e 's/@GST_PKGNAME@/$(gst_pkgname)/g' \ -e 's/@GST_LIB@/$(gst_lib)/g' \ -e 's/@GST_LIB_DEV@/$(gst_lib_dev)/g' \ -e 's/@GST_LIB_DEV_DEP@/$(gst_lib_dev_dep)/g' \ -e 's/@GST_EXTRA_BUILD_DEPENDS@/$(gst_extra_build_depends)/g' \ >$@ DEB_CONFIGURE_EXTRA_FLAGS += \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --disable-examples \ --enable-DEBUG \ --enable-debug \ --with-package-name=$(GST_PACKAGE_NAME) \ --with-package-origin=$(GST_PACKAGE_ORIGIN) \ --enable-gtk-doc \ --enable-experimental \ --with-default-audiosink=$(DEFAULT_AUDIOSINK) \ --with-default-audiosrc=$(DEFAULT_AUDIOSRC) \ --with-default-videosink=$(DEFAULT_VIDEOSINK) \ --with-default-videosrc=$(DEFAULT_VIDEOSRC) \ --with-default-visualizer=$(DEFAULT_VISUALIZER) \ $(CONFIG_ARGS) clean:: # get rid of the sym links for i in $(PLUGINS); do \ rm -f debian/$(gst_pkgname)-$$i.install; \ rm -f debian/$(gst_pkgname)-$$i.preinst; \ done for f in $(VERSIONIZE); do \ rm -f debian/$(gst_pkgname)-$$f; \ done common-binary-fixup-arch:: dh_gstscancodecs DEB_INSTALL_DOCS_ALL += debian/README.Debian NEWS # Disable inclusion of large upstream ChangeLog DEB_INSTALL_CHANGELOGS_ALL := .PHONY: maint