diff -Nru gst-plugins-good1.0-1.4.3/aclocal.m4 gst-plugins-good1.0-1.6.1/aclocal.m4 --- gst-plugins-good1.0-1.4.3/aclocal.m4 2014-09-24 07:25:51.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/aclocal.m4 2015-10-30 12:10:12.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -78,7 +78,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -123,15 +123,14 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -162,7 +161,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -353,7 +352,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -429,7 +428,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -519,8 +518,8 @@ # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -594,6 +593,9 @@ AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -623,7 +625,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -634,7 +636,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -644,7 +646,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -666,7 +668,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -701,7 +703,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -751,7 +753,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -788,7 +790,7 @@ fi ]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -822,7 +824,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -851,7 +853,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -898,7 +900,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1133,7 +1135,7 @@ sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1152,7 +1154,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1233,7 +1235,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1293,7 +1295,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1321,7 +1323,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1340,7 +1342,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1491,7 +1493,6 @@ m4_include([common/m4/gst-platform.m4]) m4_include([common/m4/gst-plugin-docs.m4]) m4_include([common/m4/gst-plugindir.m4]) -m4_include([common/m4/gst-x11.m4]) m4_include([common/m4/gst.m4]) m4_include([common/m4/gtk-doc.m4]) m4_include([common/m4/orc.m4]) diff -Nru gst-plugins-good1.0-1.4.3/autogen.sh gst-plugins-good1.0-1.6.1/autogen.sh --- gst-plugins-good1.0-1.4.3/autogen.sh 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/autogen.sh 2015-10-22 08:02:54.000000000 +0000 @@ -13,7 +13,6 @@ olddir=`pwd` cd "$srcdir" -DIE=0 package=gst-plugins-good srcfile=gst-plugins-good.doap @@ -56,24 +55,25 @@ autogen_options $@ printf "+ check for build tools" -if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi -version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \ - "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1 -version_check "automake" "$AUTOMAKE automake automake-1.11" \ - "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1 -version_check "autopoint" "autopoint" \ - "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1 -version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \ - "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1 -version_check "pkg-config" "" \ - "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1 +if test -z "$NOCHECK"; then + echo -die_check $DIE - -aclocal_check || DIE=1 -autoheader_check || DIE=1 - -die_check $DIE + printf " checking for autoreconf ... " + echo + which "autoreconf" 2>/dev/null || { + echo "not found! Please install the autoconf package." + exit 1 + } + + printf " checking for pkg-config ... " + echo + which "pkg-config" 2>/dev/null || { + echo "not found! Please install pkg-config." + exit 1 + } +else + echo ": skipped version checks" +fi # if no arguments specified then this will be printed if test -z "$*" && test -z "$NOCONFIGURE"; then @@ -87,23 +87,14 @@ toplevel_check $srcfile # autopoint -if test -d po ; then - tool_run "$autopoint" "--force" +if test -d po && grep ^AM_GNU_GETTEXT_VERSION configure.ac >/dev/null ; then + tool_run "autopoint" "--force" fi # aclocal if test -f acinclude.m4; then rm acinclude.m4; fi -tool_run "$libtoolize" "--copy --force" -tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS" -tool_run "$autoheader" - -# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -echo timestamp > stamp-h.in 2> /dev/null - -tool_run "$autoconf" -debug "automake: $automake" -tool_run "$automake" "--add-missing --copy" +autoreconf --force --install || exit 1 test -n "$NOCONFIGURE" && { echo "+ skipping configure stage for package $package, as requested." diff -Nru gst-plugins-good1.0-1.4.3/ChangeLog gst-plugins-good1.0-1.6.1/ChangeLog --- gst-plugins-good1.0-1.4.3/ChangeLog 2014-09-24 08:28:36.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ChangeLog 2015-10-30 14:22:33.000000000 +0000 @@ -1,36 +1,252 @@ -=== release 1.4.3 === +=== release 1.6.1 === -2014-09-24 Sebastian Dröge +2015-10-30 Sebastian Dröge * configure.ac: - releasing 1.4.3 + releasing 1.6.1 -2014-09-23 22:55:48 +0300 Sebastian Dröge +2015-10-30 14:28:04 +0200 Sebastian Dröge - * gst/audioparsers/gstflacparse.c: - flacparse: Only calculate with durations != -1 + * po/cs.po: + * po/de.po: + * po/nl.po: + * po/pl.po: + * po/ru.po: + * po/vi.po: + * po/zh_CN.po: + po: Update translations -2014-09-23 09:47:31 +0200 Edward Hervey +2015-10-28 23:47:30 +0530 Nirbheek Chauhan - * tests/check/elements/souphttpsrc.c: - check/soup: Temporarily disable G_ENABLE_DIAGNOSTIC - The SOUP_SERVER_PORT property has been deprecated in recent libsoup - versions. + * sys/v4l2/gstv4l2deviceprovider.c: + v4l2: fix double-unref in the v4l2 device provider -2014-09-23 09:43:05 +0200 Edward Hervey +2015-10-27 10:48:00 +0100 Nicola Murino - * tests/check/elements/souphttpsrc.c: - check/soup: Define minimum version required - To avoid deprecation warnings + * gst/matroska/matroska-ids.c: + matroskamux: don't drop JPEG frames that only have PTS but no DTS set + For the MS/VfW codec ids, we want to write DTS timestamps instead + of PTS because that's what everyone else seems to do (and it's also + how it is in AVI). So for those input formats we use the buffer DTS + instead of the PTS. However, if there's no DTS set but only the PTS + then just take the PTS instead of dropping the input buffer. This + is useful especially for I-frame only codecs like JPEG and huffyuv, + but should also be fine as fallback in general. + Fixes regression with input JPEG frames that only have PTS set on them. + https://bugzilla.gnome.org/show_bug.cgi?id=756967 + +2015-10-11 12:06:26 +0100 Thibault Saunier + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmuxmap.c: + qtmux: Allow negotiating to S8 as a raw format but stop making it best choice + Negotiation to audio/x-raw,format=S8 was not possible because S8 does + not have a bit order so we ended up doing `if (!entry.fourcc) goto refuse_caps;` + https://bugzilla.gnome.org/show_bug.cgi?id=756387 + +2015-10-11 09:18:40 +0100 Thibault Saunier + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmuxmap.c: + qtmux: Add prores support + https://bugzilla.gnome.org/show_bug.cgi?id=756388 + +2015-10-24 23:57:38 +0200 George Kiagiadakis + + * tests/check/elements/splitmux.c: + tests/check/splitmux: test that the release_pad vfunc of splitmuxsink actually releases pads + https://bugzilla.gnome.org/show_bug.cgi?id=753622 + +2015-10-24 23:57:29 +0200 George Kiagiadakis + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: do not destroy the multiqueue & muxer when going to NULL + Instead, delay it until all request pads have been released. This is + because the release_pad() vfunc requires the multiqueue and muxer to + be there in order to release their request pads as well. If those + elements are destroyed earlier, release_pad() does not work, no + pads are released and some resources are leaked. + https://bugzilla.gnome.org/show_bug.cgi?id=753622 + +2015-10-27 17:32:22 +0200 Sebastian Dröge + + * gst/audiofx/gstscaletempo.c: + scaletempo: F64 support is only available in GIT master at this point + +2015-10-24 17:14:07 +0300 Sebastian Dröge + + * gst/audiofx/gstscaletempo.c: + * gst/audiofx/gstscaletempo.h: + scaletempo: Fix handling of rate < 0 + We have to reverse all samples in a buffer before processing them to properly + have continuous data from one buffer to another. As a result we will have a + negative applied rate and a rate of 1.0. + Also make sure that input buffers are correctly clipped to the segment, + otherwise our calculations are going to go wrong. + Also copy over the segment event's sequence number to the output segment while + we're at it. + https://bugzilla.gnome.org/show_bug.cgi?id=757033 + +2015-10-26 00:41:28 +1100 Jan Schmidt + + * tests/files/Makefile.am: + check: Dist splitvideo0[012].ogg test files. + +2015-10-13 12:42:56 -0300 Thiago Santos + + * gst/rtp/gstrtpj2kpay.c: + rtpj2kpay: update fragment offset + It was always being set to 0, making the resulting stream broken + for the receiver + https://bugzilla.gnome.org/show_bug.cgi?id=756422 + +2015-10-19 15:36:37 +0300 Ryan Hendrickson + + * gst/isomp4/gstqtmux.c: + qtmux: Don't unconditionally use strnlen() + It's not available on older OSX and we can as well use memchr() here. + https://bugzilla.gnome.org/show_bug.cgi?id=756154 + +2015-10-12 10:48:23 +0900 Vineeth TM + + * gst/audioparsers/gstmpegaudioparse.c: + mpegaudioparse: Fix buffer memory leak during failures + mapped buffer is not being unmapped during failures + https://bugzilla.gnome.org/show_bug.cgi?id=756231 + +2015-10-19 17:38:32 +0900 Vineeth TM + + * gst/auparse/gstauparse.c: + auparse: Fix event memory leak + Free the event after being handled to prevent memory leak. + https://bugzilla.gnome.org/show_bug.cgi?id=756799 + +2015-10-14 12:03:15 +0200 Guillaume Desmottes + + * gst/isomp4/qtdemux.c: + qtdemux: fix caps leak + If the QtDemuxStream are re-used they may already have caps which used + to be leaked. + Reproduced using the + validate.dash.playback.seek_forward.dash_exMPD_BIP_TC1 validate + scenario. + https://bugzilla.gnome.org/show_bug.cgi?id=756561 + +2015-10-14 09:29:50 +0900 Vineeth TM + + * gst/isomp4/qtdemux.c: + qtdemux: Fix taglist memory leak + Free the stream and its sub items instead of just the stream + https://bugzilla.gnome.org/show_bug.cgi?id=756544 + +2015-10-07 17:14:57 +0900 Vineeth TM + + * gst/isomp4/gstqtmux.c: + qtmux: Fix date memory leak + When getting date from taglist, the memory should be freed after + using it. + https://bugzilla.gnome.org/show_bug.cgi?id=756171 + +2015-10-05 11:03:38 +0900 Vineeth TM + + * gst/isomp4/gstqtmux.c: + qtmux: Fix sample memory leak + When getting sample from taglist, the memory should be freed after + using it. + https://bugzilla.gnome.org/show_bug.cgi?id=756068 + +2015-10-05 13:10:56 +0900 Vineeth TM + + * gst/cutter/gstcutter.c: + cutter: Fix buffer leak + Buffer is added to the internal cache, and pushed only when accumulated + buffer duration crosses 200 ms. So when the chain ends, the buffer accumulated + is not freed. Freeing the cache when the state changes from PAUSED to READY. + https://bugzilla.gnome.org/show_bug.cgi?id=754212 + +2015-04-17 14:25:43 +0200 George Kiagiadakis + + * gst/multifile/gstsplitmuxsink.c: + * gst/multifile/gstsplitmuxsink.h: + splitmuxsink: post messages when fragments are being opened and closed + This can be useful for applications that need to track the created fragments + (to log them in a recording database, for example) + https://bugzilla.gnome.org/show_bug.cgi?id=750108 + +2015-04-29 18:23:28 +0100 Ramiro Polla + + * gst/multifile/gstsplitmuxsink.c: + * gst/multifile/gstsplitmuxsink.h: + splitmuxsink: allow non-video streams to serve as reference + In the absence of a video stream, the first stream will be used as + reference. + https://bugzilla.gnome.org/show_bug.cgi?id=753617 + +2015-07-22 17:45:12 +0200 George Kiagiadakis + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: initialize mux_start_time properly + mux_start_time refers to the running_time of the buffer + that goes first in the output file. Normally this time is + 0, so this variable is initialized to 0 during the state + change to PAUSED. + However, when dealing with dynamic pipelines and starting + a recording while the pipeline has already run for a while, + the running_time of the first buffer is > 0 and this causes + a problem with detecting the end of the first file(s) when + splitting by duration, because the code will later compare + the threshold_time with (last buffer running_time - mux_start_time) + and will get it wrong until mux_start_time advances enough + to make this difference < threshold_time, creating empty files + in the meantime. + https://bugzilla.gnome.org/show_bug.cgi?id=753624 + +2015-09-29 11:12:48 +0100 Tim-Philipp Müller + + * ext/gdk_pixbuf/gstgdkpixbufoverlay.c: + gdkpixbufsink: don't leak old pixel buffer when setting a new overlay + https://bugzilla.gnome.org/show_bug.cgi?id=755773 + +2015-09-28 20:25:22 +0100 Tim-Philipp Müller + + * ext/flac/gstflacenc.c: + flacenc: avoid potential string overflow + We don't necessarily have full control over the input tags, so + it's possible that the ISRC tag contains a longer string than + expected, in which case we'd write over the end of the static-size + 13 byte buffer that is FLAC__StreamMetadata_CueSheet_Track::isrc. + Make sure to only copy the ISRC if it's not too long, and make + sure the buffer we write to is always NUL-terminated by using + g_strlcpy(). + CID 1324931. + +2015-09-28 18:03:51 +0200 Sebastian Dröge + + * gst/matroska/matroska-demux.c: + matroskademux: Remove leftover assertion from 0.10 + We now allocate memory via GstAllocator and as such can handle arbitrary + alignments, not only <= G_MEM_ALIGN. + https://bugzilla.gnome.org/show_bug.cgi?id=755708 + +2015-09-25 10:01:37 +0200 Guillaume Marquebielle + + * gst/audioparsers/gstaacparse.c: + aacparse: fix uninitialized variables in LOAS config reading + On reading LOAS config, flag v=1 and vA=1 combination can occur, leading to warning + "Spec says "TBD"...". Returning TRUE on this case while parameters 'sample_rate' and + 'channels' are pointing to uninitialized values can end on setting random values as + rate and channels on src caps. + https://bugzilla.gnome.org/show_bug.cgi?id=755611 -=== release 1.4.2 === +=== release 1.6.0 === -2014-09-19 14:41:21 +0300 Sebastian Dröge +2015-09-25 23:15:55 +0200 Sebastian Dröge * ChangeLog: * NEWS: * RELEASE: * configure.ac: + * docs/plugins/gst-plugins-good-plugins.args: * docs/plugins/inspect/plugin-1394.xml: * docs/plugins/inspect/plugin-aasink.xml: * docs/plugins/inspect/plugin-alaw.xml: @@ -99,9 +315,9 @@ * docs/plugins/inspect/plugin-y4menc.xml: * gst-plugins-good.doap: * win32/common/config.h: - Release 1.4.2 + Release 1.6.0 -2014-09-19 10:58:47 +0300 Sebastian Dröge +2015-09-25 22:57:34 +0200 Sebastian Dröge * po/af.po: * po/az.po: @@ -146,218 +362,74 @@ * po/zh_TW.po: Update .po files -2014-09-19 10:00:24 +0300 Sebastian Dröge - - * po/sr.po: - po: Update translations - -2014-09-17 16:37:11 +0200 Ognyan Tonchev - - * gst/rtpmanager/gstrtpbin.c: - rtpbin: do not leak encsink pad in error case - https://bugzilla.gnome.org/show_bug.cgi?id=736807 - -2014-09-17 16:23:21 +0200 Ognyan Tonchev - - * gst/multipart/multipartdemux.c: - multipartdemux: do not leak new stream event - https://bugzilla.gnome.org/show_bug.cgi?id=736805 - -2014-09-17 13:55:18 +0300 Sebastian Dröge - - * sys/osxaudio/gstosxcoreaudio.c: - * sys/osxaudio/gstosxcoreaudiocommon.c: - * sys/osxaudio/gstosxcoreaudiohal.c: - * sys/osxaudio/gstosxcoreaudioremoteio.c: - osxaudio: OSStatus is not a fourcc, so don't print it as one... - -2014-09-16 14:26:08 +0200 Ognyan Tonchev - - * gst/audioparsers/gstflacparse.c: - flacparse: do not leak uid after parsing TOC event - https://bugzilla.gnome.org/show_bug.cgi?id=736739 - -2014-09-15 14:51:24 +0200 Peter Korsgaard - - * sys/v4l2/gstv4l2allocator.c: - v4l2allocator: O_CLOEXEC needs _GNU_SOURCE - Similar to 94f3d6fc / bz 709423 - On some systems (E.G. uClibc and older Glibc versions), O_CLOEXEC is only - defined when _GNU_SOURCE is specified, so do so. - https://bugzilla.gnome.org/show_bug.cgi?id=736670 - -2014-09-15 18:11:37 +0200 Wim Taymans - - * gst/debugutils/gstcapssetter.c: - capssetter: update to 1.0 transform_caps sematics - In 1.0, we pass the complete caps to transform_caps to allow for better - optimizations. Make this function actually work on non-simple caps - instead of just ignoring the configured filter caps. - -2014-09-12 15:06:50 +0300 Sebastian Dröge - - * gst/wavparse/gstwavparse.c: - wavparse: Fix parsing of adtl chunks - We have to skip 12 bytes of data for the chunk, and the data size - passed to the sub-chunk parsing functions should have 4 bytes less - than the data size. - Also when parsing the sub-chunks, check if we actually have enough - data to read instead of just crashing. - https://bugzilla.gnome.org/show_bug.cgi?id=736266 - -2014-09-04 16:21:20 +0300 Sebastian Dröge - - * gst/matroska/matroska-demux.c: - * gst/matroska/matroska-read-common.h: - matroska-demux: Don't handle parse errors at the end of file as an error - But only if they happen after the Matroska segment. - https://bugzilla.gnome.org/show_bug.cgi?id=735833 - -2014-09-11 12:52:11 +0300 Sebastian Dröge - - * ext/soup/gstsouphttpsrc.c: - souphttpsrc: If the server reports "Accept-Ranges: none" don't try range requests - -2014-09-10 09:50:45 +0200 Ognyan Tonchev - - * sys/v4l2/gstv4l2sink.c: - v4l2sink: Unref pool after usage - https://bugzilla.gnome.org/show_bug.cgi?id=736384 - -2014-09-09 19:03:50 -0400 Nicolas Dufresne - - * sys/v4l2/gstv4l2transform.c: - v4l2transform: Don't rank it for now - This will prevent the converter to be picked automatically in case - someone implement dynamic converter selection support. I'd like this - to be ranked only for known device, as it's hard to be sure a device is - a converter suited for general purpose. Re-negotiation is also needed - before we can rank it. - https://bugzilla.gnome.org/show_bug.cgi?id=733607 - -2014-08-29 17:09:30 -0400 Nicolas Dufresne - - * sys/v4l2/gstv4l2allocator.c: - v4l2allocator: Workaround driver that don't support REQBUFS(0) - There is still around 18 drivers not yet ported to videobuf2. These driver - don't support freeing buffetrs through REQBUFS(0) hence for these the - memory type probing fails. In order to gain back our previous behaviour in - presence of these, we implement a workaround that assuming MMAP is - supported. Note that an allocator is only created for device with - STREAMING support in the device capabilities. In such case one of MMAP, - USERPTR and DMABUF is required. Though DMABUF came afterward, so is - not an option and in practice none of these drivers will only do USERPTR. - https://bugzilla.gnome.org/show_bug.cgi?id=735660 - Also-by: Hans de Goede - -2014-09-07 12:46:08 +0100 Tim-Philipp Müller - - * gst/avi/gstavidemux.c: - avidemux: fix crash with certain videos - This is a regression from 1.2 caused by the port - to the pad flow combiner. - https://bugzilla.gnome.org/show_bug.cgi?id=736192 - -2014-09-01 09:56:02 +0200 Nicolas Huet - - * gst/audioparsers/gstaacparse.c: - aacparse: Fix parsing issue when the buffer does not have a complete ADTS/LOAS frame - https://bugzilla.gnome.org/show_bug.cgi?id=735520 - -2014-09-04 12:14:11 +0300 Sebastian Dröge - - * ext/soup/gstsouphttpsrc.c: - souphttpsrc: Include redirection target in error messages - Just giving the original URI can give the false impression that e.g. - that one failed host name resolution, while actually the redirection target - did. - -2014-09-02 11:13:44 +0400 Andrei Sarakeev - - * gst/videomixer/videomixer2.c: - videomixer: Fix synchronization if dynamically changing the FPS - https://bugzilla.gnome.org/show_bug.cgi?id=735859 - -2014-09-02 13:52:43 +0530 Ravi Kiran K N +2015-09-25 14:08:09 +0200 Thibault Saunier - * gst/smpte/gstsmpte.c: - smpte: Check if input caps are the same and create output caps from video info - This makes sure that also properties like the pixel-aspect-ratio are the same - between both streams and that the output caps contain all fields necessary for - complete video caps. - https://bugzilla.gnome.org/show_bug.cgi?id=735804 + * gst/smpte/gstsmptealpha.c: + smptealpha: Do not set width/height before comparing with old values + Otherwise we end up considering the values did not change and we wrongly + work with the old video format (which will lead to wrong + behaviour/segfaults). + https://bugzilla.gnome.org/show_bug.cgi?id=755621 -2014-09-03 23:46:34 +1000 Jan Schmidt +2015-09-23 20:59:00 +0200 Sebastian Dröge * gst/isomp4/qtdemux.c: - * gst/isomp4/qtdemux_types.c: - qtdemux: Silence some warnings for normal file contents - -2014-09-02 09:09:49 +0300 Sebastian Dröge - - * ext/vpx/gstvp9dec.c: - vp9dec: Get input width/height from the codec instead of the input caps - They are reported properly by libvpx if the correct struct members are used. - This also fixes handling of resolution changes without input caps changes. - https://bugzilla.gnome.org/show_bug.cgi?id=719359 - -2013-10-22 18:49:22 +0100 Tom Greenwood - - * ext/vpx/gstvp8dec.c: - vp8dec: Fix for handling resolution changes when decoding VP8 - If the resolution changes in the bitstream without the input caps changing we - would previously output corrupted video or crash. - https://bugzilla.gnome.org/show_bug.cgi?id=719359 - -2014-08-05 10:34:39 +0200 Jose Antonio Santos Cadenas - - * ext/vpx/gstvp8dec.c: - vp8dec: Reset output and input states when changing format - https://bugzilla.gnome.org/show_bug.cgi?id=734266 - -2014-09-02 00:55:17 -0300 Thiago Santos - - * ext/vpx/gstvp9dec.c: - vp9dec: Fix segfault when a new caps is received - Remember to unref the output caps when a new caps event is received - as it should generate a new one based on the new caps. - https://bugzilla.gnome.org/show_bug.cgi?id=734266 - -2014-08-29 12:01:27 +0200 Hans de Goede - - * sys/v4l2/gstv4l2object.c: - v4l2: get_nearest_size: Fix "Unsupported field type" errors - Most V4L2 ioctls like try_fmt will adjust input fields to match what the - hardware can do rather then returning -EINVAL. As is docmented here: - http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-fmt.html - EINVAL is only returned if the buffer type field is invalid or not supported. - So upon requesting V4L2_FIELD_NONE devices which can only do interlaced - mode will change the field value to e.g. V4L2_FIELD_BOTTOM as only returning - half the lines is the closest they can do to progressive modes. - In essence this means that we've failed to get a (usable) progessive mode - and should fall back to interlaced mode. - This commit adds a check for having gotten a usable field value after the first - try_fmt, to force fallback to interlaced mode even if the try_fmt succeeded, - thereby fixing get_nearest_size failing on these devices. - https://bugzilla.gnome.org/show_bug.cgi?id=735660 - -2014-08-29 10:57:20 +0200 Hans de Goede - - * sys/v4l2/gstv4l2object.c: - v4l2: get_nearest_size: Always reinit all struct fields on retry - They may have been modified by the ioctl even if it failed. This also makes - the S_FMT fallback path try progressive first, making it consistent with the - preferred TRY_FMT path. - https://bugzilla.gnome.org/show_bug.cgi?id=735660 + qtdemux: Accumulate segments for edit lists before activating the next segment + eceb2ccc739092d964d78945e19c2ecedbd214e2 broke segment seeks by always + accumulating segments manually when activating a segment. This is only + needed when handling edit lists, not when activating a segment because of a + seek. Do the accumulation when switching edit list segments instead. + This fixes segment seeks again, while keeping edit lists playback working. + https://bugzilla.gnome.org/show_bug.cgi?id=755471 + +2015-09-23 17:43:51 +0530 Vikram Fugro + + * gst/spectrum/gstspectrum.c: + spectrum: send phase values in the GstMessage for Phase info + https://bugzilla.gnome.org/show_bug.cgi?id=755463 + +2015-09-22 00:46:01 +1000 Jan Schmidt + + * gst/matroska/matroska-mux.c: + matroska-mux: Don't output a warning on MONO multiview mode. + +2015-09-19 17:02:18 +0200 Sebastian Rasmussen + + * gst/rtp/gstrtptheoradepay.c: + rtptheoradepay: Fix memory leaks + The same memory leaks were fixed in identical fashion for + vorbisdepay in 06efeff5d979576a252e5dae57f46d6445b1df12 in 2009. + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=755277 + +2015-09-19 17:04:07 +0200 Sebastian Rasmussen + + * gst/rtp/gstrtptheorapay.c: + * gst/rtp/gstrtpvorbisdepay.c: + * gst/rtp/gstrtpvorbispay.c: + rtp{vorbis,theora}{pay,depay}: Cosmetic cleanup + * use g_list_free_full(), don't iterate elements maually when freeing + * call gst_rtp_*_pay_clear_packet(), don't duplicate its code + * use gst_buffer_unref() to clarify that it is buffers being released, + instead of refering directly to gst_mini_object_unref() + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=755277 + +2015-09-19 18:44:22 +0200 Sebastian Dröge + + * gst/rtp/gstrtptheorapay.c: + * gst/rtp/gstrtpvorbispay.c: + rtp{vorbis,theora}pay: Store headers in the packet buffers lists, not a NULL buffer + https://bugzilla.gnome.org/show_bug.cgi?id=755265 -=== release 1.4.1 === +=== release 1.5.91 === -2014-08-27 15:04:29 +0300 Sebastian Dröge +2015-09-18 19:33:13 +0200 Sebastian Dröge * ChangeLog: * NEWS: * RELEASE: * configure.ac: + * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.signals: * docs/plugins/inspect/plugin-1394.xml: * docs/plugins/inspect/plugin-aasink.xml: * docs/plugins/inspect/plugin-alaw.xml: @@ -426,9 +498,9 @@ * docs/plugins/inspect/plugin-y4menc.xml: * gst-plugins-good.doap: * win32/common/config.h: - Release 1.4.1 + Release 1.5.91 -2014-08-27 14:32:41 +0300 Sebastian Dröge +2015-09-18 19:23:57 +0200 Sebastian Dröge * po/af.po: * po/az.po: @@ -473,42 +545,8898 @@ * po/zh_TW.po: Update .po files -2014-08-27 12:32:30 +0300 Sebastian Dröge +2015-09-18 11:50:31 +0200 Sebastian Dröge - * po/nb.po: - * po/nl.po: + * po/zh_CN.po: po: Update translations -2014-08-14 16:36:44 +0300 Sebastian Dröge +2015-09-17 10:50:01 +0900 Eunhae Choi - * gst/videomixer/videomixer2.c: - videomixer: Use the best width/height/etc if downstream can handle that - Before it was always using whatever downstream preferred, while - the code and documentation claimed something different. - https://bugzilla.gnome.org/show_bug.cgi?id=727180 + * gst/avi/gstavidemux.c: + avidemux: Fix taglist leak + gst_tag_list_insert() does not take ownership of the inserted taglist. + https://bugzilla.gnome.org/show_bug.cgi?id=755138 -2014-08-14 11:29:00 +0530 Ravi Kiran K N +2015-09-16 07:05:36 +1000 Jan Schmidt - * gst/videomixer/videomixer2.c: - videomixer: Avoid double free of VideoConvert - https://bugzilla.gnome.org/show_bug.cgi?id=734764 + * gst/audioparsers/gstaacparse.c: + aacparse: Skip LOAS AAC until a valid config is seen. + It's normal when dropping into the middle of a stream to + not always have the config available immediately, so skip LOAS + until a valid config is seen without either setting invalid + caps or erroring out. + https://bugzilla.gnome.org/show_bug.cgi?id=751386 -2014-08-13 11:54:26 +0100 Tim-Philipp Müller +2015-09-13 15:41:38 +0200 Mark Nauwelaerts - * gst/flv/gstflvdemux.c: - flvdemux: un-break duration querying - Commit 2b9493b5 broke this in two ways: a) we should only - pass duration queries in TIME format upstream (or at least - not those in DEFAULT or BYTE format), and b) we mustn't - overwrite the default value of 'res' from TRUE to FALSE - and not set it again later. This led to bogus durations - being reported for FLV playback from file, because TIME - queries would fail (as 'res' had been set to FALSE) and - parsers then do a BYTE query as fallback and try to + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: reset just a bit more upon flush_stop + +2015-09-13 15:40:09 +0200 Mark Nauwelaerts + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: remove dead struct member + +2015-09-11 17:09:28 +0900 Vineeth TM + + * gst/udp/gstmultiudpsink.c: + multiudpsink: fix GError memory leak when hostname resolution fails + https://bugzilla.gnome.org/show_bug.cgi?id=754869 + +2015-09-10 15:26:54 -0300 Thiago Santos + + * gst/matroska/ebml-write.c: + matroskamux: drop HEADER flag from output buffers + Drop HEADER flag from output buffers if they are not indeed + headers. + Fixes resending of headers in tcp connection handling + https://bugzilla.gnome.org/show_bug.cgi?id=754768 + +2015-09-10 16:00:50 +0100 Tim-Philipp Müller + + * gst/matroska/ebml-write.c: + matroskamux: fix matroskamux ! matroskademux + Don't carry over DISCONT flags from the input buffers to the + output buffer, or the demuxer might reset its state when it + receives the first data buffer just after parsing the simple + block header, and then expect sane data to follow. + Fixes matroskamux ! demux erroring out. + https://bugzilla.gnome.org/show_bug.cgi?id=754768 + https://bugzilla.gnome.org/show_bug.cgi?id=657805 + +2015-09-09 12:51:40 -0700 Martin Kelly + + * gst/rtsp/README: + rtsp: fix small README typo + https://bugzilla.gnome.org/show_bug.cgi?id=754807 + +2015-09-04 19:45:37 +0100 Tim-Philipp Müller + + * gst/audioparsers/gstwavpackparse.c: + wavpackparse: set both pts and dts so baseparse doesn't make up wrong dts after seeks + https://bugzilla.gnome.org/show_bug.cgi?id=752106 + +2015-09-04 19:34:41 +0100 Tim-Philipp Müller + + * gst/audioparsers/gstflacparse.c: + flacparse: set both pts and dts so baseparse doesn't make up wrong dts after a seek + flac contains the sample offset in the frame header, so after a seek + without index flacparse will know the exact position we landed on and + timestamp buffers accordingly. It only set the pts though, which means + the baseparse-set dts which was set to the seek position prevails, and + since the seek was based on an estimate, there's likely a discrepancy + between where we wanted to land and where we did land, so from here on + that dts/pts difference will be maintained, with dts possibly multiple + seconds ahead of pts, which is just wrong. The easiest way to fix this + is to just set both pts and dts based on the sample offset, but perhaps + parsed audio should just not have dts set at all. + https://bugzilla.gnome.org/show_bug.cgi?id=752106 + +2015-09-06 16:33:02 +0100 Tim-Philipp Müller + + * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.signals: + docs: remove properties and signals that no longer exist + https://bugzilla.gnome.org/show_bug.cgi?id=726443 + +2013-10-11 15:13:00 +0000 George Chriss + + * gst/flv/gstflvmux.c: + flvmux: Make the element count in arrays not include end + One-line removal of tags_written++ + This should fix rtmp output to crtmpserver, and hopefully + noone is expecting that the element count includes the end + element, as different bits of documentation say different + things about whether it should or not. + https://bugzilla.gnome.org/show_bug.cgi?id=661624 + +2015-07-30 00:59:15 +1000 Jan Schmidt + + * gst/flv/gstflvmux.c: + * gst/flv/gstflvmux.h: + flvmux: Store incoming bitrate tags and send in the metadata + Apparently the Microsoft Azure RTMP server requires that the + videodatarate and audiodatarate metadata be provided, so + set those, even if it's to 0. Use the actual input bitrate + tags if available. + +2015-09-04 00:06:29 +1000 Jan Schmidt + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Don't parse key data more than needed. + When an auxilliary streams are present in the SDP media, + there's no need to re-parse the SDP attributes multiple + times. + +2015-09-03 20:56:55 +1000 Jan Schmidt + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Fix SRTP + RTX, auth access, a leak, and an invalid memory access. + In parse_keymgmt(), don't mutate the input string that's been passed + as const, especially since we might need the original value again if + the same key info applies to multiple streams (RTX, for example). + When a resource is 404, and we have auth info - retry with the auth + info the same as if we had receive unauthorised, in case the resource + isn't even visible until credentials are supplied. + Fix a memory leak handling Mikey data. + When generating a random keystring, don't overrun the 30 byte + buffer by generating 32 bytes into it. + +2015-09-04 15:18:05 +0300 Sebastian Dröge + + * gst/udp/gstudpsrc.c: + udpsrc: Fix build with GLib < 2.44 + G_IO_ERROR_CONNECTION_CLOSED was added in 2.44. + +2015-09-04 12:01:52 +0300 Sebastian Dröge + + * gst/udp/gstudpsrc.c: + udpsrc: Ignore G_IO_ERROR_CONNECTION_CLOSED when receiving data + This happens on Windows if we use the same socket for sending packets, + and the remote sends ICMP port/host unreachable messages. + https://bugzilla.gnome.org/show_bug.cgi?id=754534 + +2015-09-02 21:12:41 +0300 Sebastian Dröge + + * gst/rtp/gstrtptheoradepay.c: + * gst/rtp/gstrtpvorbisdepay.c: + rtpvorbis/theoradepay: Fix handling of fragmented packets + This was broken in b1089fb520 by not considering the full packet length of a + fragmented packet but only the length of the first one. + https://bugzilla.gnome.org/show_bug.cgi?id=754417 + +2015-09-01 15:39:22 -0400 Olivier Crête + + * gst/dtmf/gstdtmfsrc.c: + * gst/dtmf/gstrtpdtmfsrc.c: + dtmfsrc: Reply to latency query + +2015-08-31 16:42:30 -0400 Olivier Crête + + * tests/check/elements/rtpsession.c: + tests: Fix rtpsession test failure + The time of the first RTCP packet is semi-random, so + sometimes it was produced before enough packets from + the second SSRC were received. First drop queued RTCP + packets, then advance the clock enough to ensure + that at least one new RTCP packet is produced. + https://bugzilla.gnome.org/show_bug.cgi?id=750731 + +2015-08-31 13:56:04 +0200 Stefan Sauer + + * tests/check/elements/level.c: + level: improve the test for multi-channel mode + Change the test to verify the read-index for multiple messages per buffer. + See https://bugzilla.gnome.org/show_bug.cgi?id=754144 + +2015-08-31 12:46:52 +0200 Jan Alexander Steffens (heftig) + + * gst/matroska/matroska-demux.c: + matroskademux: Align raw video frames to 32 bytes + Outputting unaligned video frames causes videoscale et al to + crash when attempting SIMD-accelerated conversion. + https://bugzilla.gnome.org/show_bug.cgi?id=736965 + +2015-08-26 23:16:46 +0200 Stefan Sauer + + * gst/level/gstlevel.c: + level: fix level calculations for mutliple channels + This was broken with 7b90bf32150897a141a29a12ecab555d8c5b7fab. + +2015-08-27 10:28:55 +0530 Ravi Kiran K N + + * gst/smpte/gstsmpte.c: + smpte: Fix memory leak + In gst_smpte_collected(), check upfront if input formats are same + or not. This avoids allocation of in1 and in2 buffers and + subsequent memory leak when input formats do not match. + https://bugzilla.gnome.org/show_bug.cgi?id=754153 + +2015-08-21 11:52:19 +0100 Tim-Philipp Müller + + * tests/check/elements/souphttpsrc.c: + tests: souphttpsrc: don't try to connect to dead radio server + +2015-08-21 16:29:16 +0900 Vineeth TM + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Trivial fix to check correct condition + When checking for describe method, because of missing parentheses, wrong + condition is being checked, which will result in wrong behavior. + https://bugzilla.gnome.org/show_bug.cgi?id=753912 + +2015-08-21 13:19:02 +0900 Vineeth TM + + * gst/matroska/matroska-read-common.c: + matroska: read: fix tag list memory leak + gst_toc_entry_merge_tags makes a new ref of the taglist, so it should + be unref'ed as soon as the tags are merged to the tocentry + https://bugzilla.gnome.org/show_bug.cgi?id=753904 + +2015-08-21 12:20:59 +0900 Vineeth TM + + * ext/wavpack/gstwavpackdec.c: + wavpackdec: fix taglist memory leak + When passing the taglist to gst_audio_decoder_merge_tags, the reference is increased + by audiodecoder and the caller should free the taglist being passed. + https://bugzilla.gnome.org/show_bug.cgi?id=753903 + +2015-08-20 14:45:33 +0200 Jean-Michel Hautbois + + * sys/v4l2/gstv4l2transform.c: + v4l2transform: fix pad closing + Signed-off-by: Jean-Michel Hautbois + https://bugzilla.gnome.org/show_bug.cgi?id=753875 + +=== release 1.5.90 === + +2015-08-19 13:29:53 +0300 Sebastian Dröge + + * ChangeLog: + * NEWS: + * RELEASE: + * configure.ac: + * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * docs/plugins/gst-plugins-good-plugins.interfaces: + * docs/plugins/gst-plugins-good-plugins.signals: + * docs/plugins/inspect/plugin-1394.xml: + * docs/plugins/inspect/plugin-aasink.xml: + * docs/plugins/inspect/plugin-alaw.xml: + * docs/plugins/inspect/plugin-alpha.xml: + * docs/plugins/inspect/plugin-alphacolor.xml: + * docs/plugins/inspect/plugin-apetag.xml: + * docs/plugins/inspect/plugin-audiofx.xml: + * docs/plugins/inspect/plugin-audioparsers.xml: + * docs/plugins/inspect/plugin-auparse.xml: + * docs/plugins/inspect/plugin-autodetect.xml: + * docs/plugins/inspect/plugin-avi.xml: + * docs/plugins/inspect/plugin-cacasink.xml: + * docs/plugins/inspect/plugin-cairo.xml: + * docs/plugins/inspect/plugin-cutter.xml: + * docs/plugins/inspect/plugin-debug.xml: + * docs/plugins/inspect/plugin-deinterlace.xml: + * docs/plugins/inspect/plugin-dtmf.xml: + * docs/plugins/inspect/plugin-dv.xml: + * docs/plugins/inspect/plugin-effectv.xml: + * docs/plugins/inspect/plugin-equalizer.xml: + * docs/plugins/inspect/plugin-flac.xml: + * docs/plugins/inspect/plugin-flv.xml: + * docs/plugins/inspect/plugin-flxdec.xml: + * docs/plugins/inspect/plugin-gdkpixbuf.xml: + * docs/plugins/inspect/plugin-goom.xml: + * docs/plugins/inspect/plugin-goom2k1.xml: + * docs/plugins/inspect/plugin-icydemux.xml: + * docs/plugins/inspect/plugin-id3demux.xml: + * docs/plugins/inspect/plugin-imagefreeze.xml: + * docs/plugins/inspect/plugin-interleave.xml: + * docs/plugins/inspect/plugin-isomp4.xml: + * docs/plugins/inspect/plugin-jack.xml: + * docs/plugins/inspect/plugin-jpeg.xml: + * docs/plugins/inspect/plugin-level.xml: + * docs/plugins/inspect/plugin-matroska.xml: + * docs/plugins/inspect/plugin-mulaw.xml: + * docs/plugins/inspect/plugin-multifile.xml: + * docs/plugins/inspect/plugin-multipart.xml: + * docs/plugins/inspect/plugin-navigationtest.xml: + * docs/plugins/inspect/plugin-oss4.xml: + * docs/plugins/inspect/plugin-ossaudio.xml: + * docs/plugins/inspect/plugin-png.xml: + * docs/plugins/inspect/plugin-pulseaudio.xml: + * docs/plugins/inspect/plugin-replaygain.xml: + * docs/plugins/inspect/plugin-rtp.xml: + * docs/plugins/inspect/plugin-rtpmanager.xml: + * docs/plugins/inspect/plugin-rtsp.xml: + * docs/plugins/inspect/plugin-shapewipe.xml: + * docs/plugins/inspect/plugin-shout2send.xml: + * docs/plugins/inspect/plugin-smpte.xml: + * docs/plugins/inspect/plugin-soup.xml: + * docs/plugins/inspect/plugin-spectrum.xml: + * docs/plugins/inspect/plugin-speex.xml: + * docs/plugins/inspect/plugin-taglib.xml: + * docs/plugins/inspect/plugin-udp.xml: + * docs/plugins/inspect/plugin-video4linux2.xml: + * docs/plugins/inspect/plugin-videobox.xml: + * docs/plugins/inspect/plugin-videocrop.xml: + * docs/plugins/inspect/plugin-videofilter.xml: + * docs/plugins/inspect/plugin-videomixer.xml: + * docs/plugins/inspect/plugin-vpx.xml: + * docs/plugins/inspect/plugin-wavenc.xml: + * docs/plugins/inspect/plugin-wavpack.xml: + * docs/plugins/inspect/plugin-wavparse.xml: + * docs/plugins/inspect/plugin-ximagesrc.xml: + * docs/plugins/inspect/plugin-y4menc.xml: + * gst-plugins-good.doap: + * win32/common/config.h: + Release 1.5.90 + +2015-08-19 12:47:42 +0300 Sebastian Dröge + + * po/af.po: + * po/az.po: + * po/bg.po: + * po/ca.po: + * po/cs.po: + * po/da.po: + * po/de.po: + * po/el.po: + * po/en_GB.po: + * po/eo.po: + * po/es.po: + * po/eu.po: + * po/fi.po: + * po/fr.po: + * po/gl.po: + * po/hr.po: + * po/hu.po: + * po/id.po: + * po/it.po: + * po/ja.po: + * po/lt.po: + * po/lv.po: + * po/mt.po: + * po/nb.po: + * po/nl.po: + * po/or.po: + * po/pl.po: + * po/pt_BR.po: + * po/ro.po: + * po/ru.po: + * po/sk.po: + * po/sl.po: + * po/sq.po: + * po/sr.po: + * po/sv.po: + * po/tr.po: + * po/uk.po: + * po/vi.po: + * po/zh_CN.po: + * po/zh_HK.po: + * po/zh_TW.po: + Update .po files + +2015-08-19 11:29:55 +0300 Sebastian Dröge + + * po/el.po: + * po/zh_CN.po: + po: Update translations + +2015-08-13 17:29:58 +0100 Tim-Philipp Müller + + * gst/multifile/gstmultifilesrc.c: + multifilesrc: fix regression with starting from index set via index property + When we haven't started yet, set the start_index when we set the index property, + so that we start at the right index position after the initial seek. The index + property was never really meant to be for writing, but it used to work, so let's + support it for backwards compatibility. + https://bugzilla.gnome.org/show_bug.cgi?id=739472 + +2015-08-18 10:52:11 +0100 Alex Ashley + + * gst/isomp4/qtdemux.c: + qtdemux: fix offset calculation when parsing CENC aux info + Commit 7d7e54ce6863ff53e188d0276d2651b65082ffdb added support for + DASH common encryption, however commit + bb336840c0b0b02fa18dc4437ce0ded3d9142801 that went onto master + shortly before the CENC commit caused the calculation of the CENC + aux info offset to be incorrect. + The base_offset was being added if present, but if the base_offset + is relative to the start of the moof, the offset was being added twice. + The correct approach is to calculate the offset from the start of the + moof and use that offset when parsing the CENC aux info. + +2015-08-17 14:28:24 -0300 Thiago Santos + + * ext/flac/gstflacenc.c: + flacenc: actually return true for accept-caps query handling + +2015-08-17 14:07:10 +0900 Hyunjun Ko + + * gst/rtp/gstrtpg723pay.c: + * gst/rtp/gstrtpgsmpay.c: + * gst/rtp/gstrtpklvpay.c: + rtp: copy metadata in the (de)payloaders which is missed before + https://bugzilla.gnome.org/show_bug.cgi?id=753706 + +2015-08-16 15:21:51 -0400 Dustin Spicuzza + + * configure.ac: + * sys/directsound/gstdirectsoundsink.c: + * sys/directsound/gstdirectsoundsink.h: + directsoundsink: allow specifying audio playback device + https://bugzilla.gnome.org/show_bug.cgi?id=753670 + +2015-08-16 13:51:47 -0300 Thiago Santos + + * ext/flac/gstflacenc.c: + flacenc: remove single entry if from loop + Iterate from the 2nd channel on and create the 1 channel struct + outside to make loop structure simpler and only slightly faster. + +2015-08-16 13:21:41 -0300 Thiago Santos + + * ext/flac/gstflacenc.c: + flacenc: implement proper accept-caps + Should just compare with what can be immediatelly accepted by + the element. flacenc can't renegotiate so if it has a caps already + it should only accept if it is that caps otherwise just use the + template caps + +2015-08-16 13:03:36 -0300 Thiago Santos + + * ext/flac/gstflacenc.c: + flacenc: improve sink pad template caps + Removes the need for custom caps query handling and makes it more + correct from the beginning on the template. It is a bit uglier + to read because there is 1 entry per channel but makes code easier + to maintain. + +2015-08-16 12:41:56 -0300 Thiago Santos + + * gst/y4m/gsty4mencode.c: + y4mencode: fix gst-launch version in documentation + +2015-08-15 22:32:21 -0300 Thiago Santos + + * ext/speex/gstspeexenc.c: + * ext/wavpack/gstwavpackenc.c: + * gst/law/alaw-encode.c: + * gst/law/mulaw-encode.c: + audioencoders: use template subset check for accept-caps + It is faster than doing a query that propagates downstream and + should be enough + Elements: speexenc, wavpackenc, mulawenc, alawenc + +2015-08-15 22:29:41 -0300 Thiago Santos + + * ext/jpeg/gstjpegenc.c: + * ext/libpng/gstpngenc.c: + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + * gst/y4m/gsty4mencode.c: + videoencoders: use template subset check for accept-caps + It is faster than doing a query that propagates downstream and + should be enough + Elements: jpegenc, pngenc, vp8enc, vp9enc, y4menc + +2015-08-16 17:21:24 +0100 Tim-Philipp Müller + + * gst/audioparsers/gstmpegaudioparse.c: + mpegaudioparse: use new baseparse API to fix tag handling + https://bugzilla.gnome.org/show_bug.cgi?id=679768 + +2015-03-17 17:50:37 -0400 Olivier Crête + + * gst/audioparsers/gstaacparse.c: + * gst/audioparsers/gstac3parse.c: + * gst/audioparsers/gstamrparse.c: + * gst/audioparsers/gstdcaparse.c: + * gst/audioparsers/gstsbcparse.c: + * gst/audioparsers/gstwavpackparse.c: + audioparsers: use new base parse API to fix tag handling + https://bugzilla.gnome.org/show_bug.cgi?id=679768 + +2015-08-16 14:37:53 +0100 Tim-Philipp Müller + + * gst/audioparsers/gstflacparse.c: + flacparse: use new baseparse API and fix tag handling + https://bugzilla.gnome.org/show_bug.cgi?id=679768 + +2015-08-16 13:04:02 +0200 Sebastian Dröge + + * gst/isomp4/qtdemux.c: + qtdemux: Use signed integer type to be able to check for negative subtraction results + CID 1315829 + +2015-08-16 11:50:34 +0100 Luis de Bethencourt + + * gst/rtp/gstrtpvorbisdepay.c: + rtpvorbisdepay: remove dead code + payload_buffer must be NULL in ignore_reserved. Check will always be false. + Introduced by b1089fb5207697ba26edb4ff66ed0f465c6df3cf + CID #1316476 + +2015-08-15 22:45:53 -0300 Thiago Santos + + * gst/law/alaw-encode.c: + * gst/law/alaw-encode.h: + alawenc: port to AudioEncoder base class + +2015-08-15 09:16:23 -0300 Thiago Santos + + * ext/flac/gstflacdec.c: + * ext/speex/gstspeexdec.c: + * ext/wavpack/gstwavpackdec.c: + * gst/law/alaw-decode.c: + * gst/law/mulaw-decode.c: + audiodecoders: use default pad accept-caps handling + Avoids useless check of downstream caps when handling an + accept-caps query + Elements: flacdec, speexdec, wavpackdec, mulawdec, alawdec + +2015-08-15 08:49:57 -0300 Thiago Santos + + * ext/jpeg/gstjpegdec.c: + * ext/libpng/gstpngdec.c: + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp9dec.c: + videodecoders: use default pad accept-caps handling + Avoids useless check of downstream caps when handling an + accept-caps query + Elements: jpegdec, pngdec, vp8dec, vp9dec + +2015-08-15 11:31:04 -0300 Thiago Santos + + * gst/law/alaw-decode.c: + alawdec: make error handling a bit nicer + Print the element along with the debug to make it easier to trace + the failures + +2015-08-15 11:04:16 -0300 Thiago Santos + + * gst/law/alaw-decode.c: + * gst/law/alaw-decode.h: + alawdec: port to audiodecoder base class + mulawdec was already ported, alawdec was left behind. + +2015-08-15 10:34:14 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: only look for more samples in moofs in pull-mode + For playback of some fragmented formats with qtdemux it will + try to look for the next moof after finishing one but it is only + possible for pull-mode. For playback of streaming fragmented formats + such as DASH it should just not try to look for another moof but + instead wait for more data. + https://bugzilla.gnome.org/show_bug.cgi?id=752602 + https://bugzilla.gnome.org/show_bug.cgi?id=752603 + +2015-08-15 12:58:50 +0200 Sebastian Dröge + + * gst/audioparsers/gstdcaparse.c: + dcaparse: Don't look for a second syncword + There are streams out there that consistently contain garbage between + every frame so we never ever find a second consecutive syncword. + See https://bugzilla.gnome.org/show_bug.cgi?id=738237 + +2015-08-15 11:12:05 +0100 Tim-Philipp Müller + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + vp8enc, vp9enc: reset multipass file index when stopping encoder + Fixes multipass encoding when re-using the same element/pipeline + for subsequent encoding runs. + https://bugzilla.gnome.org/show_bug.cgi?id=747728 + +2015-08-15 11:09:42 +0100 Tim-Philipp Müller + + * ext/vpx/gstvp9enc.c: + * ext/vpx/gstvp9enc.h: + vp9enc: provide support for multiple pass cache files + Some files may provide different caps insight of one stream. Since + vp9enc support caps reinit, we should support cache reinit too. + If more then file cache file will be created, the naming will be: + cache cache.1 cache.2 ... + Based on patch by: Oleksij Rempel + https://bugzilla.gnome.org/show_bug.cgi?id=747728 + +2015-08-14 11:41:42 -0300 Thiago Santos + + * tests/check/elements/aacparse.c: + tests: aacparse: use caps query instead of accept-caps + The accept-caps query just does a shallow check at the current + element while at this test we want it to also look at downstream. + So use caps query there. + https://bugzilla.gnome.org/show_bug.cgi?id=753623 + +2015-08-14 11:40:22 -0300 Thiago Santos + + * gst/audioparsers/gstaacparse.c: + * gst/audioparsers/gstac3parse.c: + * gst/audioparsers/gstamrparse.c: + * gst/audioparsers/gstdcaparse.c: + * gst/audioparsers/gstflacparse.c: + * gst/audioparsers/gstmpegaudioparse.c: + * gst/audioparsers/gstsbcparse.c: + * gst/audioparsers/gstwavpackparse.c: + audioparsers: enable accept-template flag + Do a quick check with the pad template caps as it is enough. Users + should have figured the appropriate full caps on a previous caps query + https://bugzilla.gnome.org/show_bug.cgi?id=753623 + +2015-08-14 15:46:53 +0200 George Kiagiadakis + + * gst/rtsp/gstrtspsrc.c: + * gst/rtsp/gstrtspsrc.h: + rtspsrc: send the User-Agent header + Sometimes it is useful to know this information on the + server side. Other popular implementations (vlc, ffmpeg, ...) + also send this header on every message. + This includes a new "user-agent" property that the user + can set to use a custom User-Agent string. The default + is "GStreamer/" + https://bugzilla.gnome.org/show_bug.cgi?id=750101 + +2015-08-14 15:42:42 +0200 George Kiagiadakis + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: wrap gst_rtsp_message_init_request in a local function + This will allow adding common request initialization, like the + user agent string, in just one place. + +2015-08-14 09:36:09 +0530 Prashant Gotarne + + * gst/audiofx/audioecho.c: + audioecho: make sure buffer gets reallocated if max_delay changes + https://bugzilla.gnome.org/show_bug.cgi?id=753490 + +2015-07-09 09:51:26 +0200 Oleksij Rempel + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp8enc.h: + vp8enc: provide support for multiple pass cache files + Some files may provide different caps insight of one stream. Since vp8enc + support caps reinit, we should support cache reinit too. + If more then file cache file will be created, the naming will be: + cache + cache.1 + cache.2 + ... + https://bugzilla.gnome.org/show_bug.cgi?id=747728 + +2015-04-15 22:51:51 +0200 Ramiro Polla + + * gst/rtp/gstrtpmp4gdepay.c: + rtpmp4gdepay: fix timestamps for RTP packets with multiple AUs + Use constantDuration to calculate the timestamp of non-first AU in the + RTP packet. + If constantDuration is not present in the MIME parameters, its value + must be calculated based on the timing information from two consecutive + RTP packets with AU-Index equal to 0. + https://bugzilla.gnome.org/show_bug.cgi?id=747881 + +2015-08-14 06:43:13 -0300 Thiago Santos + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: remove unnecessary if, g_free is null safe + +2015-08-14 08:33:56 +0100 Alex Ashley + + * ext/soup/gstsouphttpsrc.c: + * ext/soup/gstsouphttpsrc.h: + souphttpsrc: add property to set HTTP method + To allow souphttpsrc to be use HTTP methods other than GET + (e.g. HEAD), add a "method" property that is a string. If this + property is not set, GET is used. + https://bugzilla.gnome.org/show_bug.cgi?id=752413 + +2015-08-14 11:13:01 +0200 Edward Hervey + + * tests/check/generic/states.c: + check: Rename states unit test + Makes it easier to differentiate from other modules states unit test + +2015-08-14 09:21:25 +0200 Sebastian Dröge + + * gst/goom/gstaudiovisualizer.c: + * gst/goom/gstaudiovisualizer.h: + * gst/goom2k1/gstaudiovisualizer.c: + * gst/goom2k1/gstaudiovisualizer.h: + goom: Rename get_type() function of base class to prevent symbol conflicts + This is a problem when statically linking. + +2015-08-13 16:32:55 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Keep the DTS estimate if we got no DTS after a jitterbuffer reset + Otherwise we will just output buffers without timestamps after a reset if no + timestamps are provided by upstream, e.g. when using RTSP over TCP. + https://bugzilla.gnome.org/show_bug.cgi?id=749536 + +2015-08-12 17:16:01 +0530 Ravi Kiran K N + + * gst/matroska/matroska-demux.h: + * gst/matroska/matroska-parse.h: + matroska: Remove unused variable + https://bugzilla.gnome.org/show_bug.cgi?id=753556 + +2015-08-04 20:59:17 +0300 Sebastian Dröge + + * gst/rtp/Makefile.am: + * gst/rtp/gstrtpL16depay.c: + * gst/rtp/gstrtpL24depay.c: + * gst/rtp/gstrtpac3depay.c: + * gst/rtp/gstrtpac3pay.c: + * gst/rtp/gstrtpamrdepay.c: + * gst/rtp/gstrtpamrpay.c: + * gst/rtp/gstrtpbvdepay.c: + * gst/rtp/gstrtpceltdepay.c: + * gst/rtp/gstrtpceltpay.c: + * gst/rtp/gstrtpdvdepay.c: + * gst/rtp/gstrtpdvpay.c: + * gst/rtp/gstrtpg722depay.c: + * gst/rtp/gstrtpg723pay.c: + * gst/rtp/gstrtpg726depay.c: + * gst/rtp/gstrtpg729depay.c: + * gst/rtp/gstrtpg729pay.c: + * gst/rtp/gstrtpgsmdepay.c: + * gst/rtp/gstrtpgsmpay.c: + * gst/rtp/gstrtpgstdepay.c: + * gst/rtp/gstrtpgstpay.c: + * gst/rtp/gstrtph261depay.c: + * gst/rtp/gstrtph261pay.c: + * gst/rtp/gstrtph263depay.c: + * gst/rtp/gstrtph263pay.c: + * gst/rtp/gstrtph263pdepay.c: + * gst/rtp/gstrtph263ppay.c: + * gst/rtp/gstrtph264depay.c: + * gst/rtp/gstrtph264pay.c: + * gst/rtp/gstrtpilbcdepay.c: + * gst/rtp/gstrtpj2kdepay.c: + * gst/rtp/gstrtpj2kpay.c: + * gst/rtp/gstrtpjpegdepay.c: + * gst/rtp/gstrtpjpegpay.c: + * gst/rtp/gstrtpmp1sdepay.c: + * gst/rtp/gstrtpmp2tdepay.c: + * gst/rtp/gstrtpmp2tpay.c: + * gst/rtp/gstrtpmp4adepay.c: + * gst/rtp/gstrtpmp4apay.c: + * gst/rtp/gstrtpmp4gdepay.c: + * gst/rtp/gstrtpmp4gpay.c: + * gst/rtp/gstrtpmp4vdepay.c: + * gst/rtp/gstrtpmp4vpay.c: + * gst/rtp/gstrtpmpadepay.c: + * gst/rtp/gstrtpmpapay.c: + * gst/rtp/gstrtpmpvdepay.c: + * gst/rtp/gstrtpmpvpay.c: + * gst/rtp/gstrtppcmadepay.c: + * gst/rtp/gstrtppcmudepay.c: + * gst/rtp/gstrtpqcelpdepay.c: + * gst/rtp/gstrtpqdmdepay.c: + * gst/rtp/gstrtpsbcdepay.c: + * gst/rtp/gstrtpsbcpay.c: + * gst/rtp/gstrtpsirendepay.c: + * gst/rtp/gstrtpspeexdepay.c: + * gst/rtp/gstrtpspeexpay.c: + * gst/rtp/gstrtpsv3vdepay.c: + * gst/rtp/gstrtptheoradepay.c: + * gst/rtp/gstrtptheorapay.c: + * gst/rtp/gstrtptheorapay.h: + * gst/rtp/gstrtputils.c: + * gst/rtp/gstrtputils.h: + * gst/rtp/gstrtpvorbisdepay.c: + * gst/rtp/gstrtpvorbispay.c: + * gst/rtp/gstrtpvorbispay.h: + * gst/rtp/gstrtpvp8depay.c: + * gst/rtp/gstrtpvp8pay.c: + * gst/rtp/gstrtpvrawdepay.c: + * gst/rtp/gstrtpvrawpay.c: + rtp: Copy metadata in the (de)payloader, but only the relevant ones + The payloader didn't copy anything so far, the depayloader copied every + possible meta. Let's make it consistent and just copy all metas without + tags or with only the video tag. + https://bugzilla.gnome.org/show_bug.cgi?id=751774 + +2015-08-10 18:20:15 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: fix small typo in comment + +2015-08-10 16:19:18 -0400 Nicolas Dufresne + + * gst/goom2k1/gstgoom.c: + goom2k1/doc: Fixup previous commit + +2015-08-10 15:55:19 -0400 Nicolas Dufresne + + * docs/plugins/gst-plugins-good-plugins-sections.txt: + * gst/goom2k1/gstgoom.c: + * gst/goom2k1/gstgoom.h: + goom2k1/doc: Use GstGoom2k1 namespace + The doc generator isn't happy when we have class name clash. Simply + use it's own namespace. + +2015-08-10 17:10:42 +0530 Prashant Gotarne + + * gst/audiofx/audioecho.c: + audioecho: removed unused variable in set_property + unused local variable 'delay' is removed. + https://bugzilla.gnome.org/show_bug.cgi?id=753450 + +2015-08-10 12:45:27 +0100 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + qtdemux: fix suboptimal queue iteration code + +2015-08-09 17:25:45 +0100 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + qtdemux: don't use glib 2.44-only API + +2015-07-29 14:14:50 +0100 Alex Ashley + + * gst/isomp4/fourcc.h: + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + * gst/isomp4/qtdemux_types.c: + qtdemux: add support for ISOBMFF Common Encryption + This commit adds support for ISOBMFF Common Encryption (cenc), as + defined in ISO/IEC 23001-7. It uses a GstProtection event to + pass the contents of PSSH boxes to downstream decryptor elements + and attached GstProtectionMeta to each sample. + https://bugzilla.gnome.org/show_bug.cgi?id=705991 + +2015-08-10 14:13:50 +0900 Hyunjun Ko + + * gst/rtp/gstrtph264depay.c: + rtph264depay: checking if depay has sps/pps nals before insertion + https://bugzilla.gnome.org/show_bug.cgi?id=753430 + +2015-08-08 16:44:49 +0100 Tim-Philipp Müller + + * gst/matroska/matroska-mux.c: + matroskamux: fix outdated comment + The default behaviour was changed in the 0.10 -> 1.x + transition, but the comment was not updated. + +2015-08-08 17:42:22 +0200 Sebastian Dröge + + * gst/rtp/gstrtptheorapay.c: + rtptheorapay: If flushing a packet failed, go out of the loop immediately + +2015-08-08 17:41:02 +0200 Sebastian Dröge + + * gst/rtp/gstrtpvorbispay.c: + rtpvorbispay: If flushing a packet failed, go out of the loop immediately + +2015-08-08 17:34:50 +0200 Sebastian Dröge + + * gst/rtp/gstrtptheorapay.c: + * gst/rtp/gstrtptheorapay.h: + rtptheorapay: Extract pixel format from the ident header to put it into the sampling field of the caps + We always put 4:2:0 into the caps before, which obviously is wrong for 4:2:2 + and 4:4:4 formats. + +2015-08-06 17:46:13 +0200 George Kiagiadakis + + * gst/rtp/gstrtpklvdepay.c: + * gst/rtp/gstrtpklvpay.c: + rtpklv(de)pay: add "RTP" in the klass string + GstRTSPMedia uses this classification to detect the real payloader + inside a dynpay bin and asserts if it doesn't find it, therefore + it is required + https://bugzilla.gnome.org/show_bug.cgi?id=753325 + +2015-08-05 11:13:09 -0300 Thiago Santos + + * tests/check/elements/rtpaux.c: + tests: rtpaux: use a dynamic pt in the test + 1) Tests that using dynamic PT instead of the default ones work + 2) If we ever decide to change the codec here we don't need to + worry about change the PT for the default one of the new codec + in the test + https://bugzilla.gnome.org/show_bug.cgi?id=746445 + +2015-08-05 10:53:15 +0900 Hyunjun Ko + + * gst/rtpmanager/gstrtprtxsend.c: + rtprtxsend: print valid type where guint32 is expected + https://bugzilla.gnome.org/show_bug.cgi?id=746445 + +2015-08-06 11:33:37 +0900 Hyunjun Ko + + * gst/rtp/gstrtpL16pay.c: + * gst/rtp/gstrtpg722pay.c: + * gst/rtp/gstrtpg723pay.c: + * gst/rtp/gstrtpg729pay.c: + * gst/rtp/gstrtpgsmpay.c: + * gst/rtp/gstrtph261pay.c: + * gst/rtp/gstrtph263pay.c: + * gst/rtp/gstrtpjpegpay.c: + * gst/rtp/gstrtpmp2tpay.c: + * gst/rtp/gstrtpmpapay.c: + * gst/rtp/gstrtpmpvpay.c: + * gst/rtp/gstrtppcmapay.c: + * gst/rtp/gstrtppcmupay.c: + rtppayload: set standard payload type as default + Initialize the PT to the default value of the codec and check if + it is still the default before declaring the pt to be dynamic or + not when setting the caps. + Also use the PT constants from the rtp lib when possible + https://bugzilla.gnome.org/show_bug.cgi?id=747965 + +2015-07-26 12:07:56 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: store the moof-offset also for push mode + It will be used in some cases for getting the correct offsets + from trun atoms. + https://bugzilla.gnome.org/show_bug.cgi?id=752603 + +2015-07-26 02:09:24 -0300 Thiago Santos + + * gst/isomp4/atoms.h: + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux_types.h: + qtdemux: handle default-base-is-moof flag + Handle the flag from the tfhd that signals the base offset to + start from the moof atom + https://bugzilla.gnome.org/show_bug.cgi?id=752603 + +2015-07-29 18:54:35 -0600 Glen Diener + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-read-common.c: + * gst/matroska/matroska-read-common.h: + matroskademux: Preserve forward referenced track tags + https://bugzilla.gnome.org/show_bug.cgi?id=752850 + +2015-08-04 18:07:35 -0300 Thiago Santos + + * tests/check/elements/rtpaux.c: + tests: rtpaux: fix test failure + The RTP PT for alaw is 8. + Less than 50 packets are received in the length of this test so it + would never drop a buffer or would drop only the last buffer and + it would fail sometimes when the received wouldn't receive the + retransmission packet in time. + https://bugzilla.gnome.org/show_bug.cgi?id=746445 + +2015-08-04 20:59:17 +0300 Sebastian Dröge + + * gst/rtp/gstrtpstreamdepay.c: + rtpstreamdepay: Only allow activation in push mode + We need a proper caps event from upstream with the full RTP caps as we can't + create caps ourselves from thin air. Fixes usage of rtpstreamdepay after e.g. + a filesrc or any other element that supports pull mode. + https://bugzilla.gnome.org/show_bug.cgi?id=753066 + +2015-08-04 16:28:17 +0100 Tim-Philipp Müller + + * ext/soup/gstsouphttpsrc.c: + soup: fix typo in translated string + https://bugzilla.gnome.org/show_bug.cgi?id=753240 + +2015-08-04 12:25:46 +0300 Sebastian Dröge + + * gst/rtp/gstrtph264depay.c: + rtph264depay: Put the profile and level into the caps + +2015-08-04 12:09:12 +0300 Sebastian Dröge + + * gst/rtp/gstrtph264depay.c: + rtph264depay: Only update the srcpad caps if something else than the codec_data changed + h264parse does the same, let's keep the behaviour consistent. As we now + include the codec_data inside the stream too here, this causes less caps + renegotiation. + +2015-08-04 11:48:27 +0300 Sebastian Dröge + + * gst/rtp/gstrtph264depay.c: + rtph264depay: PPS replaces and old PPS if it has the same id, independent of SPS id + The spec says: + When a picture parameter set NAL unit with a particular value of + pic_parameter_set_id is received, its content replaces the content of the + previous picture parameter set NAL unit, in decoding order, with the same + value of pic_parameter_set_id (when a previous picture parameter set NAL unit + with the same value of pic_parameter_set_id was present in the bitstream). + +2015-08-03 13:45:59 -0300 Thiago Santos + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: remove extra \n at debug message + +2015-08-03 13:42:20 -0300 Thiago Santos + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: prevent deadlock when states change too fast + If the GOP is completed, pads have to start gathering for the + next one but it is possible that the the state might go to + COLLECTING_GOP_START and back to WAITING_GOP_COMPLETE before the + thread has a chance to wake up and proceed, leaving it trapped in + the check_completed_gop loop and deadlocking the other threads + waiting for it to advance. + To solve it, this patch also checks that tha input running time + hasn't changed to prevent this scenario. + +2015-08-03 17:55:01 +0300 Sebastian Dröge + + * gst/rtp/gstrtph264depay.c: + rtph264depay: Insert SPS/PPS NALs into the stream + h264parse does the same and this fixes decoding of some streams with 32 SPS + (or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255), but + the field in the codec_data for the number of SPS or PPS is only 5 (or 8) bit. + As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere. + This looks like a mistake in the part of the spec about the codec_data. + +2015-07-30 11:29:27 +0900 Eunhae Choi + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: handle empty http proxy string + 1) If the system http_proxy environment variable is not set + or set to an empty string, we must not set proxy to avoid + http connection error. + 2) In case of proxy property setting, if user want to clear + the proxy setting, they should be able to set it to NULL or + an empty string again, so this is fixed too. + 3) Check if the proxy string was parsed correctly. + https://bugzilla.gnome.org/show_bug.cgi?id=752866 + +2015-07-29 15:46:20 +0530 Ravi Kiran K N + + * ext/dv/gstdvdemux.c: + * ext/dv/gstdvdemux.h: + dvdemux: remove unused variable + Remove unused variable 'framecount' from dvdemux + https://bugzilla.gnome.org/show_bug.cgi?id=753008 + +2015-07-30 15:32:09 +0900 Vineeth TM + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: assertion error due to wrong condition check + In media to caps function, reserved_keys array is being used for variable i, + leading to GLib-CRITICAL **: g_ascii_strcasecmp: assertion 's1 != NULL' failed + changed it to variable j + https://bugzilla.gnome.org/show_bug.cgi?id=753009 + +2015-07-30 15:21:20 +0900 Vineeth TM + + * gst/rtp/gstrtpmp4vdepay.c: + rtpmp4vdepay: rtpbuffer is being unref'ed twice + process_rtp_packet doesn't transfer the rtp buffer to mp4v_process_depay + the refernce should not be removed here + https://bugzilla.gnome.org/show_bug.cgi?id=753042 + +2015-07-29 11:26:46 +0100 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Strip keys from the fmtp that we use internally in our caps + Skip keys from the fmtp, which we already use ourselves for the + caps. Some software is adding random things like clock-rate into + the fmtp, and we would otherwise here set a string-typed clock-rate + in the caps... and thus fail to create valid RTP caps + https://bugzilla.gnome.org/show_bug.cgi?id=753009 + +2015-07-29 19:28:33 +1000 Jan Schmidt + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: Support mpegtsmux as a muxer. + As a fallback, look for a pad template sink_%d on + the muxer when requesting pads, to support mpegtsmux + https://bugzilla.gnome.org/show_bug.cgi?id=752999 + +2015-06-25 01:35:27 +1000 Jan Schmidt + + * gst/multifile/gstsplitmuxpartreader.c: + * gst/multifile/gstsplitmuxpartreader.h: + splitmuxsrc: Use a separate lock to delay typefind. + Don't hold the main splitmux part lock over + the parent state change function, as it prevents + posting error messages that happen. Since the purpose + is to prevent typefinding from proceeding, use a + separate mutex just for that. + +2015-07-29 13:43:50 +0900 Vineeth TM + + * gst/matroska/matroska-read-common.c: + matroska: fix memory leak + After adding to tag list, key_val is not being free'd + resulting in memory leak + https://bugzilla.gnome.org/show_bug.cgi?id=752992 + +2015-07-27 13:34:14 +0900 Manasa Athreya + + * gst/isomp4/qtdemux.c: + qtdemux: fix 16-bit PCM audio advertised with 'raw ' fourcc + 'NONE' and 'raw ' fourcc don't always contain U8 audio, it can + be more bits as well, in which case it's just like 'twos'. + https://bugzilla.gnome.org/show_bug.cgi?id=752613 + +2015-07-24 15:10:05 +0200 Dimitrios Katsaros + + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2src.c: + v4l2: Allow framerate to be large then 100pfs + This limit was arbitrary. We still fixate near 100pfs for compatibility. + https://bugzilla.gnome.org/show_bug.cgi?id=752825 + +2015-07-25 03:25:28 -0400 Olivier Crête + + * gst/avi/gstavidemux.c: + avidemux: Stop without posting error on flushing + This could just be a normal pipeline shutdown. + +2015-07-23 15:00:08 +0900 Hyunjun Ko + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: set GST_BUFFER_COPY_FLAGS to copy flags also + https://bugzilla.gnome.org/show_bug.cgi?id=752618 + +2015-07-16 18:09:30 +0100 Tim-Philipp Müller + + * tests/check/Makefile.am: + * tests/check/elements/.gitignore: + * tests/check/elements/matroskademux.c: + tests: add minmal matroskademux test for subtitle output + Some of the subtitle chunks will have embedded + NUL-terminators (last three), some don't (first three), + some will have markup, some won't, some will be valid + UTF-8 (all but last), some won't (last stanza). + https://bugzilla.gnome.org/show_bug.cgi?id=752421 + +2015-07-16 18:49:26 +0300 Dimitrios Christidis + + * gst/matroska/matroska-demux.c: + matroskademux: fix for subtitle buffers with NUL terminators + Commit 45892ec8 created a regression where g_utf8_validate() would fail + if the subtitle buffer had a NUL terminator as part of the data. + https://bugzilla.gnome.org/show_bug.cgi?id=752421 + +2015-07-21 13:31:05 +0200 Stian Selnes + + * gst/rtp/gstrtpvp8depay.c: + rtpvp8depay: Check available bytes before copy + Need to check that the number of bytes we want to copy from the adapter + actually is available and handle the error case gracefully. This error + may happen if malformed packets are received and we don't have a + complete frame. + https://bugzilla.gnome.org/show_bug.cgi?id=752663 + +2015-07-16 09:32:36 +0900 Paul Hyunil + + * gst/isomp4/fourcc.h: + * gst/isomp4/qtdemux.c: + qtdemux: Support subtitle when track subtype is fourcc_subt + https://bugzilla.gnome.org/show_bug.cgi?id=752655 + +2015-07-20 16:59:40 +0800 Song Bing + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Set timestamp when queue buffer. + Should set timestamp when queue buffer. + https://bugzilla.gnome.org/show_bug.cgi?id=752618 + +2015-07-16 15:12:17 +0200 Havard Graff + + * gst/rtpmanager/gstrtpmux.c: + * tests/check/elements/rtpmux.c: + rtpmux: handle different ssrc's on sinkpads + Do this by not putting the ssrc from the src pads in the caps used to + probe other sinkpads, and then intersecting with it later. + https://bugzilla.gnome.org/show_bug.cgi?id=752491 + +2015-07-16 17:19:03 +0100 Tim-Philipp Müller + + * gst/avi/gstavimux.c: + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-mux.c: + * gst/matroska/matroska-parse.c: + * gst/matroska/webm-mux.c: + Update mailing list address from sourceforge to freedesktop + +2015-07-15 13:44:52 +0300 Dimitrios Christidis + + * gst/matroska/matroska-demux.c: + matroskademux: fix trailing '*' displayed with some text subtitles + The subtitle buffer we push out should not include a NUL terminator + as part of the data, we just add such a terminator for safety, but + it should not be included in the buffer size. + A NUL terminator is not valid UTF-8, so checks will fail if it's + included in the size, and the NUL will be replaced by the fallback + character specified when converting, i.e. '*'. + https://bugzilla.gnome.org/show_bug.cgi?id=752421 + +2015-07-15 18:23:05 +0200 Wim Taymans + + * ext/pulse/pulsedeviceprovider.c: + * ext/pulse/pulseutil.c: + * ext/pulse/pulseutil.h: + pulse: add properties to GstDevice + Add the extra properties we get from pulse to the GstDevice we expose + with the device monitor + +2015-07-15 17:20:20 +0530 Ravi Kiran K N + + * gst/audiofx/audioinvert.c: + * gst/audiofx/audiowsincband.c: + audiofx: Fix typo in example pipelines + Fix typo in example pipelines of audiowsincband and audioinvert. + https://bugzilla.gnome.org/show_bug.cgi?id=752416 + +2015-04-15 18:27:04 +0200 George Kiagiadakis + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: add a "format-location" signal that allows better control over filenames + In certain applications, splitting into files named after a base + location template and an incremental sequence number is not enough. + This signal gives more fine-grained control to the application to + decide how to name the files. + https://bugzilla.gnome.org/show_bug.cgi?id=750106 + +2015-04-15 20:13:27 +0300 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudio.c: + osxaudiosrc: no resampling on OS X + Unlike Remote IO, AUHAL doesn't have built-in resampling + for sources -- confirmed by Core Audio engineer Doug Wyatt: + http://lists.apple.com/archives/coreaudio-api/2006/Sep/msg00088.html + https://bugzilla.gnome.org/show_bug.cgi?id=743758 + +2015-04-15 18:29:14 +0300 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudio.c: + osxaudiosrc: avoid get_channel_layout + This only produces a warning and serves no purpose. + https://bugzilla.gnome.org/show_bug.cgi?id=743758 + +2015-04-07 15:40:14 +0530 Arun Raghavan + + * sys/osxaudio/gstosxcoreaudio.c: + osxaudio: Avoid making a duplicate structure in caps for mono/stereo case + For 1ch or 2ch devices, we just need to set the caps to allow both + options since CoreAudio will up/downmix appropriately. + Also fixes the condition for the 2ch case to be exact, rather than at + least 2 channels since the downmix will not take place in the >stereo + case. + +2015-04-06 16:22:34 +0530 Arun Raghavan + + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudiocommon.c: + * sys/osxaudio/gstosxcoreaudiohal.c: + * sys/osxaudio/gstosxcoreaudioremoteio.c: + osxaudio: Don't set the format on an initialized AudioUnit + We need to initialize the AudioUnit early to be able to probe the + underlying device, but according to the AudioUnitInitialize() and + AudioUnitUninitialize() documentation, format changes should be done + while the AudioUnit is uninitialized. So we explicitly uninitialize the + AudioUnit during a format change and reinitialize it when we're done. + +2015-04-06 15:55:59 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudioringbuffer.c: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + osxaudio: Minor spelling fix (unitialize -> uninitialize) + +2015-03-21 20:34:25 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + osxaudio: Fix lockup in _audio_unit_property_listener + _audio_unit_property_listener is called either from a Core Audio thread + or as a result of a Core Audio API (e.g. AudioUnitInitialize) + from our own thread. In the latter case, osxbuf can be already locked + (GStreamer's mutex is not recursive). + We introduce the flag cached_caps_valid and use it instead of nullifying + cached_caps when we cannot lock on osxbuf. + https://bugzilla.gnome.org/show_bug.cgi?id=743758 + +2015-03-12 12:15:12 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudio.c: + osxaudio: Invalidate cached caps on format change + Listen for changes in hardware stream format and channel layout, and + invalidate cached caps (since they contain the preferred caps). + https://bugzilla.gnome.org/show_bug.cgi?id=743758 + +2015-03-09 23:34:06 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxaudioringbuffer.c: + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosink.h: + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxaudiosrc.h: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + * sys/osxaudio/gstosxcoreaudiocommon.c: + * sys/osxaudio/gstosxcoreaudiocommon.h: + * sys/osxaudio/gstosxcoreaudiohal.c: + * sys/osxaudio/gstosxcoreaudioremoteio.c: + osxaudio: Overhaul of probing caps + - Probing caps is unified between source and sink + - Hardware stream format is now reported as preferred capabilities + (dynamically updated when hardware configuration changes) + - Get hardware channel layout from Remote IO just like from HAL + - More comprehensive mapping between AudioChannelLabel and + GstAudioChannelPosition + - Support for unpositioned channel layouts + - Announce stereo-mono upmixing/downmixing in caps + https://bugzilla.gnome.org/show_bug.cgi?id=743758 + +2015-03-09 23:15:56 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudio.c: + osxaudio: AudioUnitInitialize on open + Call AudioUnitInitialize upon open. Otherwise, we cannot get + (hardware) stream format nor channel layout from the outer scope. + +2015-07-12 14:27:15 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtpL16depay.c: + * gst/rtp/gstrtpL24depay.c: + * gst/rtp/gstrtpac3depay.c: + * gst/rtp/gstrtpamrdepay.c: + * gst/rtp/gstrtpbvdepay.c: + * gst/rtp/gstrtpceltdepay.c: + * gst/rtp/gstrtpdvdepay.c: + * gst/rtp/gstrtpg722depay.c: + * gst/rtp/gstrtpg723depay.c: + * gst/rtp/gstrtpg726depay.c: + * gst/rtp/gstrtpg729depay.c: + * gst/rtp/gstrtpgsmdepay.c: + * gst/rtp/gstrtpgstdepay.c: + * gst/rtp/gstrtph261depay.c: + * gst/rtp/gstrtph263depay.c: + * gst/rtp/gstrtph263pdepay.c: + * gst/rtp/gstrtph264depay.c: + * gst/rtp/gstrtpilbcdepay.c: + * gst/rtp/gstrtpj2kdepay.c: + * gst/rtp/gstrtpjpegdepay.c: + * gst/rtp/gstrtpklvdepay.c: + * gst/rtp/gstrtpmp1sdepay.c: + * gst/rtp/gstrtpmp2tdepay.c: + * gst/rtp/gstrtpmp4adepay.c: + * gst/rtp/gstrtpmp4gdepay.c: + * gst/rtp/gstrtpmp4vdepay.c: + * gst/rtp/gstrtpmpadepay.c: + * gst/rtp/gstrtpmparobustdepay.c: + * gst/rtp/gstrtpmpvdepay.c: + * gst/rtp/gstrtppcmadepay.c: + * gst/rtp/gstrtppcmudepay.c: + * gst/rtp/gstrtpqcelpdepay.c: + * gst/rtp/gstrtpqdmdepay.c: + * gst/rtp/gstrtpsbcdepay.c: + * gst/rtp/gstrtpsirendepay.c: + * gst/rtp/gstrtpspeexdepay.c: + * gst/rtp/gstrtpsv3vdepay.c: + * gst/rtp/gstrtptheoradepay.c: + * gst/rtp/gstrtpvorbisdepay.c: + * gst/rtp/gstrtpvp8depay.c: + rtp: depayloaders: implement process_rtp_packet() vfunc + For more optimised RTP packet handling: means we don't + need to map the input buffer again but can just re-use + the mapping the base class has already done. + https://bugzilla.gnome.org/show_bug.cgi?id=750235 + +2015-05-27 19:19:27 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtpvrawdepay.c: + rtpvrawdepay: implement process_rtp_packet() vfunc + For more optimised RTP packet handling: means we don't + need to map the input buffer again but can just re-use + the map the base class has already done. + https://bugzilla.gnome.org/show_bug.cgi?id=750235 + +2015-07-10 00:13:32 +0300 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Fix indention + +2015-07-09 23:59:10 +0300 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Always estimate DTS from the current clock time + Estimating it from the RTP time will give us the PTS, so in cases of PTS!=DTS + we would produce wrong DTS. As now the estimated DTS is based on the clock, + don't store it in the jitterbuffer items as it would otherwise be used in the + skew calculations and would influence the results. We only really need the DTS + for timer calculations. + https://bugzilla.gnome.org/show_bug.cgi?id=749536 + +2015-07-09 09:26:09 -0300 Thiago Santos + + * tests/check/elements/.gitignore: + gitignore: ignore rtph263 test + +2015-07-08 23:47:44 -0300 Thiago Santos + + * tests/check/elements/rtpjitterbuffer.c: + rtpjitterbuffer: fix build error with gcc (Debian 4.9.2-21) 4.9.2 + Replace static constants with macros to make gcc happy + CC elements/elements_rtpjitterbuffer-rtpjitterbuffer.o + elements/rtpjitterbuffer.c:387:1: error: initializer element is not constant + static const GstClockTime PCMU_BUF_DURATION = PCMU_BUF_MS * GST_MSECOND; + ^ + elements/rtpjitterbuffer.c:388:1: error: initializer element is not constant + static const guint PCMU_BUF_SIZE = 64000 * PCMU_BUF_MS / 1000; + ^ + elements/rtpjitterbuffer.c:390:5: error: initializer element is not constant + PCMU_BUF_CLOCK_RATE * PCMU_BUF_MS / 1000; + +2015-07-08 23:40:45 -0300 Thiago Santos + + * tests/check/elements/rtpjitterbuffer.c: + rtpjitterbuffer: run indent and fix some comments + Fix indent on this file and break some comment lines into two to make + it fit 80 chars per line + +2015-07-08 15:02:24 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: rework segment event handling for adaptive streaming + When a new time segment is received upstream is going to restart + with a new atom. Make the neededbytes and todrop variables + reflect that to avoid waiting too much or dropping the + initial bytes that contain the header. + +2015-07-08 12:35:55 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: push data from adapter before starting new segment + The adapter might have data remaining from the previous segment, + push it all before clearing the adapter and starting a new segment. + It can accumulate data if it had pushed and got not-linked, returning + immediately without processing all the data. Before starting a new + segment this data should be handled. + +2015-07-08 19:59:13 +0300 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Calculate DTS from the clock if we had none for the first packet after a reset + https://bugzilla.gnome.org/show_bug.cgi?id=749536 + +2015-07-08 21:08:36 +0200 Havard Graff + + * gst/rtpmanager/gstrtpjitterbuffer.c: + * tests/check/elements/rtpjitterbuffer.c: + rtpjitterbuffer: fix gap-time calculation and remove "late" + The amount of time that is completely expired and not worth waiting for, + is the duration of the packets in the gap (gap * duration) - the + latency (size) of the jitterbuffer (priv->latency_ns). This is the duration + that we make a "multi-lost" packet for. + The "late" concept made some sense in 0.10 as it reflected that a buffer + coming in had not been waited for at all, but had a timestamp that was + outside the jitterbuffer to wait for. With the rewrite of the waiting + (timeout) mechanism in 1.0, this no longer makes any sense, and the + variable no longer reflects anything meaningful (num > 0 is useless, + the duration is what matters) + Fixed up the tests that had been slightly modified in 1.0 to allow faulty + behavior to sneak in, and port some of them to use GstHarness. + https://bugzilla.gnome.org/show_bug.cgi?id=738363 + +2015-06-30 11:21:31 +0200 Stian Selnes + + * gst/rtpmanager/gstrtpjitterbuffer.c: + Revert "rtpjitterbuffer: Fix expected_dts calc in calculate_expected" + This reverts commit 05bd708fc5e881390fe839803b53144393d95ab0. + The reverted patch is wrong and introduces a regression because there + may still be time to receive some of the packets included in the gap + if they are reordered. + +2015-07-07 23:53:02 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: flush samples before adding more from moof + Avoids accumulating all samples from a fragmented stream that could + lead to a 'index-too-big' error once it goes over 50MB of data. It + could reach that before 2h of playback so it doesn't take that long. + As upstream elements are providing data in time format they should + be the ones that have more information about the full media index + and should be able to seek if possible. + +2015-07-07 23:56:12 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: rename upstream_newsegment to upstream_format_is_time + upstream_newsegment isn't really clear on what it means, it is set + to TRUE when the upstream element sends a segment in TIME format, so + rename it to be more clear about it. + It is important to know this because it means that upstream has + a notion of time and qtdemux is likely being driven by an upstream + element that is reading from a higher level abstraction than a file, + such as a DASH, MSS or DLNA element. + +2015-07-07 21:31:08 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: fix leak by flushing previous sample info from trak + In fragmented streaming, multiple moov/moof will be parsed and their + previously stored samples array might leak when new values are parsed. + The parse_trak and callees won't free the previously stored values + before parsing the new ones. + In step-by-step, this is what happens: + 1) initial moov is parsed, traks as well, streams are created. The + trak doesn't contain samples because they are in the moof's trun + boxes. n_samples is set to 0 while parsing the trak and the samples + array is still NULL. + 2) moofs are parsed, and their trun boxes will increase n_samples and + create/extend the samples array + 3) At some point a new moov might be sent (bitrate switching, for example) + and parsing the trak will overwrite n_samples with the values from + this trak. If the n_samples is set to 0 qtdemux will assume that + the samples array is NULL and will leak it when a new one is + created for the subsequent moofs. + This patch makes qtdemux properly free previous sample data before + creating new ones and adds an assert to catch future occurrences of + this issue when the code changes. + +2015-07-07 16:46:33 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: fix index size check and debug message + It is allocating samples_count + n_samples, not only n_samples + +2015-07-08 17:02:05 +0300 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Calculate receive time if we don't have any + This is required to properly schedule packet loss timers and make + sure all our calculations work properly. + https://bugzilla.gnome.org/show_bug.cgi?id=749536 + +2015-07-08 15:13:17 +0300 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Handle seqnum gaps in TCP streams without erroring out or overflowing calculations + That is, handle DTS==GST_CLOCK_TIME_NONE correctly. + https://bugzilla.gnome.org/show_bug.cgi?id=749536 + +2015-07-08 20:31:42 +0900 Vineeth T M + + * gst/avi/gstavidemux.c: + avidemux: fix event leak + when seek fails in avidemux, event is not being freed. + https://bugzilla.gnome.org/show_bug.cgi?id=752117 + +2015-07-08 12:02:22 +0200 Stian Selnes + + * gst/rtp/gstrtph263depay.c: + * tests/check/Makefile.am: + * tests/check/elements/rtph263.c: + rtph263depay: Make sure payload is large enough + Plus new unit test. + https://bugzilla.gnome.org/show_bug.cgi?id=752112 + +2015-07-08 08:59:49 +0900 Vineeth TM + + * gst/rtp/gstrtpklvdepay.c: + rtpklvdepay: fix printf format compiler warning + v_len is of type guint64, but while print the value(16 + len_size + v_len) + G_GSIZE_FORMAT is being used instead of G_GUINT64_FORMAT + https://bugzilla.gnome.org/show_bug.cgi?id=752100 + +2015-07-07 20:25:47 +0100 Tim-Philipp Müller + + * docs/plugins/gst-plugins-good-plugins-docs.sgml: + * docs/plugins/gst-plugins-good-plugins-sections.txt: + * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * docs/plugins/inspect/plugin-rtp.xml: + docs: add new RTP elements to docs + +2015-07-07 20:07:31 +0100 Tim-Philipp Müller + + * tests/check/elements/rtp-payloading.c: + tests: rtp-payloading: add basic unit test for KLV payloading + Also make it so that the mtu is always set if specified, not + only in case of the rather weird bufferlist test code path. + This allows us to easily make the payloader fragment a payload + across multiple output packets by setting a small MTU on it. + +2015-07-07 19:58:42 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtpklvdepay.c: + * gst/rtp/gstrtpklvdepay.h: + rtpklvdepay: improve start detection and handle fragmented KLV units + +2015-07-05 20:25:10 +0100 Tim-Philipp Müller + + * gst/rtp/Makefile.am: + * gst/rtp/gstrtp.c: + * gst/rtp/gstrtpklvdepay.c: + * gst/rtp/gstrtpklvdepay.h: + rtp: add SMPTE 336M KLV metadata depayloader + http://tools.ietf.org/html/rfc6597 + +2014-08-09 10:08:42 +0100 Tim-Philipp Müller + + * gst/rtp/Makefile.am: + * gst/rtp/gstrtp.c: + * gst/rtp/gstrtpklvpay.c: + * gst/rtp/gstrtpklvpay.h: + rtp: add SMPTE 336M KLV metadata payloader + http://tools.ietf.org/html/rfc6597 + +2015-07-07 16:59:20 +0200 Stefan Sauer + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + * gst/isomp4/atomsrecovery.c: + * gst/isomp4/properties.h: + * gst/matroska/matroska-mux.c: + * gst/rtpmanager/rtpsource.c: + docs: fix "Symbol name not found at the start of the comment block" + Add symbols or change comment into a regular comment. + +2015-07-07 16:58:53 +0200 Stefan Sauer + + * gst/audioparsers/gstamrparse.h: + docs: remove outdated doc strings + +2015-07-03 23:10:40 +0200 Stefan Sauer + + * docs/plugins/gst-plugins-good-plugins-docs.sgml: + docs: add missing plugins and ensure master doc is sorted + +2015-07-07 15:54:41 +0100 Luis de Bethencourt + + * gst/imagefreeze/gstimagefreeze.c: + Revert "imagefreeze: Remove impossible error condition" + This reverts commit d46631c5c7312ad613397f8238c7a9714ae3ae94. + pad only handle EOS events but not EOS flow, and will push the buffer again + resulting in an assertion error. So we should not handle the buffer + and return EOS flow. + +2015-07-07 15:50:50 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtpg729depay.c: + rtpg729depay: unmap rtp buffer in error path + +2015-07-07 15:48:40 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtpg729pay.c: + rtpg729pay: fix buffer leak + The handle_buffer vfunc takes ownership of the input buffer. + Fixes elements/rtp-payloading under valgrind. + +2015-07-02 08:52:43 +0200 Tobias Mueller + + * gst/goom/goom_core.c: + goom: Initialised variables to remove compiler warnings + goom_core.c: In function 'goom_update': + goom_core.c:685:5: error: 'param2' may be used uninitialized in this function [-Werror=maybe-uninitialized] + goom_lines_switch_to (goomInfo->gmline2, mode, param2, amplitude, couleur); + ^ + goom_core.c:684:5: error: 'param1' may be used uninitialized in this function [-Werror=maybe-uninitialized] + goom_lines_switch_to (goomInfo->gmline1, mode, param1, amplitude, couleur); + ^ + https://bugzilla.gnome.org/show_bug.cgi?id=752053 + +2015-07-07 09:18:39 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtph261pay.c: + rtph261pay: fix indentation + +2015-07-06 19:11:00 +0900 Jimmy Ohn + + * gst/rtp/gstrtph261pay.c: + rtph261pay: Fix uninitialized variable compiler error + endpos variable does not correctly understand in the + 4.6.3 GCC version. So compile error appears when we do + compile rtph261pay using jhbuild. + This patch is fixed the compile error in 4.6.3 GCC version. + https://bugzilla.gnome.org/show_bug.cgi?id=751985 + +2014-11-12 12:08:58 +0100 Jan Alexander Steffens (heftig) + + * gst/flv/gstflvdemux.c: + flvdemux: Handle seek flags properly + Allows for non-keyframe seeks. + https://bugzilla.gnome.org/show_bug.cgi?id=738570 + +2015-02-24 10:50:52 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: avoid looping reading the 'moof' atom forever + It gets stuck if it only finds a moof and no mfra/mfro or moov + atoms. Skip the moof to continue the parsing to have it either + play or error out. + https://bugzilla.gnome.org/show_bug.cgi?id=745089 + +2015-06-26 13:24:17 +0900 Vineeth TM + + * ext/flac/gstflacdec.c: + flacdec: improve error handling + for files which have corrupted header, libflac is not able to + process the metadata properly. We just try to ignore the error + and continue with the processing, since metadata parsing is not + making much of a difference to libflac + https://bugzilla.gnome.org/show_bug.cgi?id=751334 + +2015-07-06 20:16:38 +0900 Hyunjun Ko + + * sys/ximage/ximageutil.c: + ximagesrc: add meta transform function + ximage metadata can't be transformed or copied, but provide an empty + transformation function instead of NULL to allow unconditional calling + of metas' transform functions. + https://bugzilla.gnome.org/show_bug.cgi?id=751778 + +2014-06-16 16:14:28 +0200 Stian Selnes + + * gst/rtp/gstrtph263pdepay.c: + rtph263pdepay: init debug category + https://bugzilla.gnome.org/show_bug.cgi?id=752012 + +2014-06-20 10:59:14 +0200 Stian Selnes + + * gst/rtp/gstrtpvp8depay.c: + rtpv8depay: ignore reserved bit in payload descriptor + Draft 16 of "RTP Payload Format for VP8" states in section 4.2 that: + R: Bit reserved for future use. MUST be set to zero and MUST be + ignored by the receiver. + https://bugzilla.gnome.org/show_bug.cgi?id=751929 + +2015-07-04 20:56:42 +0200 Stian Selnes + + * docs/plugins/gst-plugins-good-plugins-docs.sgml: + * docs/plugins/gst-plugins-good-plugins-sections.txt: + * gst/rtp/gstrtph261depay.c: + * gst/rtp/gstrtph261pay.c: + rtph261pay: rtph261depay: Add documentation + https://bugzilla.gnome.org/show_bug.cgi?id=751982 + +2015-07-03 21:58:14 +0200 Stefan Sauer + + * common: + Automatic update of common submodule + From f74b2df to 9aed1d7 + +2015-07-03 14:29:16 +0200 Sebastian Dröge + + * gst/rtp/gstrtph261pay.c: + rtph261pay: Fix compiler warning + gstrtph261pay.c: In function 'gst_rtp_h261_pay_class_init': + gstrtph261pay.c:1003:17: error: variable 'gobject_class' set but not used [-Werror=unused-but-set-variable] + GObjectClass *gobject_class; + +2015-07-03 14:03:05 +0200 Sebastian Dröge + + * gst/rtp/gstrtph261depay.c: + rtph261depay: Let the base class push the buffer so it can deal with the flow return + +2015-07-03 14:11:35 +0200 Sebastian Dröge + + * gst/rtp/gstrtph261pay.c: + rtph261pay: Remove unused adapter + +2015-07-03 13:17:24 +0200 Sebastian Dröge + + * gst/rtp/gstrtpspeexpay.c: + speexpay: Directly attach payload to the output buffer instead of copying it + +2015-07-03 13:07:20 +0200 Sebastian Dröge + + * gst/rtp/gstrtpsbcpay.c: + sbcpay: Attach payload directly to the output instead of copying + +2014-12-01 14:18:40 +0100 Stian Selnes + + * gst/rtp/Makefile.am: + * gst/rtp/gstrtp.c: + * gst/rtp/gstrtph261depay.c: + * gst/rtp/gstrtph261depay.h: + * gst/rtp/gstrtph261pay.c: + * gst/rtp/gstrtph261pay.h: + * tests/check/elements/rtp-payloading.c: + rtp: add H.261 RTP payloader and depayloader + Implementation according to RFC 4587. + Payloader create fragments on MB boundaries in order to match MTU size + the best it can. Some decoders/depayloaders in the wild are very strict + about receiving a continuous bit-stream (e.g. no no-op bits between + frames), so the payloader will shift the compressed bit-stream of a + frame to align with the last significant bit of the previous frame. + Depayloader does not try to be fancy in case of packet loss. It simply + drops all packets for a frame if there is a loss, keeping it simple. + https://bugzilla.gnome.org/show_bug.cgi?id=751886 + +2015-07-03 12:18:52 +0200 Sebastian Dröge + + * gst/rtp/gstrtpmpvdepay.c: + rtpmpvdepay: Don't forget to unmap the input buffer + +2015-07-03 12:14:47 +0200 Sebastian Dröge + + * gst/rtp/gstrtpmpvpay.c: + rtpmpvpay: Create buffer lists instead of pushing each buffer individually + +2015-07-03 12:03:59 +0200 Sebastian Dröge + + * gst/rtp/gstrtpmpapay.c: + rtpmpapay: Use buffer lists instead of pushing each fragment individually + +2015-07-03 10:51:57 +0200 Sebastian Dröge + + * gst/rtp/gstrtpmp4apay.c: + rtpmp4apay: Create buffer lists and don't copy payload memory + +2015-06-29 16:14:18 +0200 Miguel París Díaz + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Consider timers len to compare with RTP_MAX_DROPOUT + When there are a lot of small gaps, we can consider that there is + a big gap (too losses) to reset the buffer. + https://bugzilla.gnome.org/show_bug.cgi?id=751636 + +2015-06-29 15:53:52 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + * tests/check/elements/rtpjitterbuffer.c: + rtpjitterbuffer: If possible, always update the current time before looping over all timers + If we have a clock, update "now" now with the very latest running time we have. + If timers are unscheduled below we otherwise wouldn't update now (it's only updated + when timers expire), and also for the very first loop iteration now would otherwise + always be 0. + Also the time is used for the timeout functions, e.g. to calculate any times + for the next timeouts and we would otherwise pass too old times there. + https://bugzilla.gnome.org/show_bug.cgi?id=751636 + +2015-07-02 14:34:57 +0100 Luis de Bethencourt + + * sys/v4l2/gstv4l2transform.c: + v4l2transform: fix memory leak + tmp needs to be freed before going out of scope in 'done'. + CID #1308954 + +2015-07-02 12:23:45 +0200 Sebastian Dröge + + * gst/rtp/gstrtph263ppay.c: + rtph263ppay: Generate buffer lists and attach the payload directly instead of copying it + +2015-07-02 09:48:02 +0200 Sebastian Dröge + + * gst/rtp/gstrtph263pdepay.c: + rtph263pdepay: Simplify code a bit and do less direct memcpy and let GstBuffer do that for us + +2015-07-02 09:17:59 +0200 Sebastian Dröge + + * gst/rtp/gstrtph263pay.c: + * gst/rtp/gstrtph263pay.h: + rtph263pay: Stop using an adapter and directly use the buffer + We always pushed one buffer into the adapter, then handled exactly that one + buffer and flushed it from the adapter. Now also don't memcpy() the actual + payload but just attach the input buffer's data to the output buffer. + This code still needs some serious refactoring/rewriting. + +2015-07-01 21:57:28 +0200 Sebastian Dröge + + * gst/rtp/gstrtpgsmpay.c: + rtpgsmpay: Remove non-existing includes for now + git add -p mistake. + +2015-07-01 19:29:07 +0200 Sebastian Dröge + + * gst/rtp/gstrtpgstpay.c: + rtpgstpay: Use the return value of gst_buffer_append() + +2015-07-01 19:19:13 +0200 Sebastian Dröge + + * gst/rtp/gstrtpgsmpay.c: + rtpgsmpay: Attach payload to the output buffer instead of copying it + +2015-07-01 17:58:56 +0200 Sebastian Dröge + + * gst/rtp/gstrtpg729pay.c: + rtpg729pay: Attach payload directly to output buffers instead of copying + +2015-07-01 17:43:51 +0200 Sebastian Dröge + + * gst/rtp/gstrtpg723pay.c: + rtpg723pay: Attach payload buffer to the output instead of copying + +2015-07-01 17:30:39 +0200 Sebastian Dröge + + * gst/rtp/gstrtpdvdepay.c: + rtpdvdepay: Map the output buffer once instead of once every 80 bytes + +2015-07-01 21:46:46 +0900 Jimmy Ohn + + * gst/avi/gstavidemux.c: + avidemux: fix return type of index_entry_offset_search() + It's a compare function and may return a negative value, + so should for correctness and consistency return a signed + integer. + https://bugzilla.gnome.org/show_bug.cgi?id=751780 + +2015-07-01 14:12:57 +0200 Miguel París Díaz + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: refactor handle_next_buffer + The goal of this patch is making handle_next_buffer function + more readable avoiding unnecesary gotos and adding other + cosmetic changes. + +2015-07-01 15:40:25 +0200 Sebastian Dröge + + * gst/rtp/gstrtpac3pay.c: + rtpac3pay: Attach the payload to the output buffer instead of copying it + Might also want to produce buffer lists here if needed. + +2015-07-01 15:38:47 +0200 Sebastian Dröge + + * gst/rtp/gstrtpilbcdepay.c: + * gst/rtp/gstrtpsirendepay.c: + rtp: Fix indention + +2015-07-01 12:37:11 +0200 Sebastian Dröge + + * tests/examples/rtp/Makefile.am: + * tests/examples/rtp/client-VP8-OPUS.sh: + * tests/examples/rtp/server-VTS-VP8-ATS-OPUS.sh: + rtp: Add examples with VTS/ATS for VP8/OPUS + Let's have an example with modern codecs. + +2015-06-30 18:11:33 +0200 Sebastian Dröge + + * gst/rtp/gstrtph264pay.c: + rtph264pay: Use GST_WARNING_OBJECT() instead of GST_WARNING() + +2015-06-30 14:06:20 +0200 Sebastian Dröge + + * gst/rtp/gstrtpvp8depay.c: + vp8depay: Don't lock/map every non-keyframe buffer twice + Just copy the complete header instead of first looking at the first byte + and then at the remaining 10 bytes. + +2015-06-29 16:05:44 +0100 Luis de Bethencourt + + * sys/v4l2/gstv4l2object.c: + v4l2: document fallthrough cases + Pacify coverity and document fallthrough cases in switch statements. + CID #1308948, #1308947, #1308946 + +2015-06-29 10:36:58 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + Revert "rtpjitterbuffer: If we have an immediate timeout, don't try to find an earlier timeout" + This reverts commit 0c21cd7177ea883c710999147ddcedb19004d182. + If we have multiple immediate timers, we want to first handle the one with the + lowest sequence number... which would be broken now. + Instead of this we should just use a GSequence for the timers, and have them + sorted first by timestamp, and for equal timestamps by sequence number. Then + we would always only have to take the very first timer from the list and never + have to look at any others. + +2015-06-29 10:14:05 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: If we have an immediate timeout, don't try to find an earlier timeout + If we have lots of such immediate timeouts, we would otherwise have quadratic + runtime in the number of timeouts. + +2015-06-19 18:01:03 -0300 Thiago Santos + + * gst/multifile/gstsplitmuxsrc.c: + splitmuxsrc: sticky events are sent automatically from the pad + No need to send them explicitly from the element + https://bugzilla.gnome.org/show_bug.cgi?id=751240 + +2015-06-19 18:00:40 -0300 Thiago Santos + + * gst/multifile/gstsplitmuxsrc.c: + splitmuxsrc: make sure to push sticky events before adding pad + It allows the caps to be set on the pad before being added for + dynamic autoplugging to work. + https://bugzilla.gnome.org/show_bug.cgi?id=751240 + +2015-06-26 00:05:29 +0900 Hyunjun Ko + + * gst/rtsp/gstrtspsrc.c: + * gst/rtsp/gstrtspsrc.h: + rtspsrc: Add new ntp-time-source property and deprecate use-pipeline-clock property + Enable to use new ntp-time-source property of rtpbin + https://bugzilla.gnome.org/show_bug.cgi?id=751496 + +2015-06-25 23:19:58 +0900 Hyunjun Ko + + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpsession.c: + rtpbin/session: fix description + https://bugzilla.gnome.org/show_bug.cgi?id=751496 + +2015-06-25 10:57:25 +0100 Luis de Bethencourt + + * gst/imagefreeze/gstimagefreeze.c: + * gst/matroska/matroska-demux.c: + * tests/examples/shapewipe/shapewipe-example.c: + docs: decodebin2 -> decodebin + +2015-06-25 10:47:06 +0100 Luis de Bethencourt + + * gst/deinterlace/gstdeinterlace.c: + deinterlace: update example pipeline + Update reference to decodebin2 to decodebin + +2015-06-25 10:45:35 +0100 Luis de Bethencourt + + * gst/deinterlace/gstdeinterlace.c: + deinterlace: remove dead assignments + Values in fields_required and same_buffer are overwritten before used. Removing + assignment + +2015-06-25 10:06:07 +0100 Tim-Philipp Müller + + * ext/Makefile.am: + * ext/mikmod/Makefile.am: + * ext/mikmod/README: + * ext/mikmod/drv_gst.c: + * ext/mikmod/gstmikmod.c: + * ext/mikmod/gstmikmod.h: + * ext/mikmod/mikmod_reader.c: + * ext/mikmod/mikmod_types.c: + * ext/mikmod/mikmod_types.h: + * m4/Makefile.am: + * m4/libmikmod.m4: + * win32/MANIFEST: + * win32/vs8/libgstmikmod.vcproj: + mikmod: remove ancient unported plugin + This hasn't been touched in 11 years, and + clearly no one's been missing it. + +2015-06-23 20:15:13 +0900 Gilbok Lee + + * gst/isomp4/qtdemux.c: + qtdemux: does not detect orientation + Most files don't contain the values for transposing the coordinates + back to the positive quadrant so qtdemux was ignoring the rotation + tag. To be able to properly handle those files qtdemux will also ignore + the transposing values to only detect the rotation using the values + abde from the transformation matrix: + [a b c] + [d e f] + [g h i] + https://bugzilla.gnome.org/show_bug.cgi?id=738681 + +2015-06-25 00:04:16 +0200 Sebastian Dröge + + * configure.ac: + Back to development + +=== release 1.5.2 === + +2015-06-24 23:30:41 +0200 Sebastian Dröge + + * ChangeLog: + * NEWS: + * RELEASE: + * configure.ac: + * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * docs/plugins/inspect/plugin-1394.xml: + * docs/plugins/inspect/plugin-aasink.xml: + * docs/plugins/inspect/plugin-alaw.xml: + * docs/plugins/inspect/plugin-alpha.xml: + * docs/plugins/inspect/plugin-alphacolor.xml: + * docs/plugins/inspect/plugin-apetag.xml: + * docs/plugins/inspect/plugin-audiofx.xml: + * docs/plugins/inspect/plugin-audioparsers.xml: + * docs/plugins/inspect/plugin-auparse.xml: + * docs/plugins/inspect/plugin-autodetect.xml: + * docs/plugins/inspect/plugin-avi.xml: + * docs/plugins/inspect/plugin-cacasink.xml: + * docs/plugins/inspect/plugin-cairo.xml: + * docs/plugins/inspect/plugin-cutter.xml: + * docs/plugins/inspect/plugin-debug.xml: + * docs/plugins/inspect/plugin-deinterlace.xml: + * docs/plugins/inspect/plugin-dtmf.xml: + * docs/plugins/inspect/plugin-dv.xml: + * docs/plugins/inspect/plugin-effectv.xml: + * docs/plugins/inspect/plugin-equalizer.xml: + * docs/plugins/inspect/plugin-flac.xml: + * docs/plugins/inspect/plugin-flv.xml: + * docs/plugins/inspect/plugin-flxdec.xml: + * docs/plugins/inspect/plugin-gdkpixbuf.xml: + * docs/plugins/inspect/plugin-goom.xml: + * docs/plugins/inspect/plugin-goom2k1.xml: + * docs/plugins/inspect/plugin-icydemux.xml: + * docs/plugins/inspect/plugin-id3demux.xml: + * docs/plugins/inspect/plugin-imagefreeze.xml: + * docs/plugins/inspect/plugin-interleave.xml: + * docs/plugins/inspect/plugin-isomp4.xml: + * docs/plugins/inspect/plugin-jack.xml: + * docs/plugins/inspect/plugin-jpeg.xml: + * docs/plugins/inspect/plugin-level.xml: + * docs/plugins/inspect/plugin-matroska.xml: + * docs/plugins/inspect/plugin-mulaw.xml: + * docs/plugins/inspect/plugin-multifile.xml: + * docs/plugins/inspect/plugin-multipart.xml: + * docs/plugins/inspect/plugin-navigationtest.xml: + * docs/plugins/inspect/plugin-oss4.xml: + * docs/plugins/inspect/plugin-ossaudio.xml: + * docs/plugins/inspect/plugin-png.xml: + * docs/plugins/inspect/plugin-pulseaudio.xml: + * docs/plugins/inspect/plugin-replaygain.xml: + * docs/plugins/inspect/plugin-rtp.xml: + * docs/plugins/inspect/plugin-rtpmanager.xml: + * docs/plugins/inspect/plugin-rtsp.xml: + * docs/plugins/inspect/plugin-shapewipe.xml: + * docs/plugins/inspect/plugin-shout2send.xml: + * docs/plugins/inspect/plugin-smpte.xml: + * docs/plugins/inspect/plugin-soup.xml: + * docs/plugins/inspect/plugin-spectrum.xml: + * docs/plugins/inspect/plugin-speex.xml: + * docs/plugins/inspect/plugin-taglib.xml: + * docs/plugins/inspect/plugin-udp.xml: + * docs/plugins/inspect/plugin-video4linux2.xml: + * docs/plugins/inspect/plugin-videobox.xml: + * docs/plugins/inspect/plugin-videocrop.xml: + * docs/plugins/inspect/plugin-videofilter.xml: + * docs/plugins/inspect/plugin-videomixer.xml: + * docs/plugins/inspect/plugin-vpx.xml: + * docs/plugins/inspect/plugin-wavenc.xml: + * docs/plugins/inspect/plugin-wavpack.xml: + * docs/plugins/inspect/plugin-wavparse.xml: + * docs/plugins/inspect/plugin-ximagesrc.xml: + * docs/plugins/inspect/plugin-y4menc.xml: + * gst-plugins-good.doap: + * win32/common/config.h: + Release 1.5.2 + +2015-06-24 22:56:12 +0200 Sebastian Dröge + + * po/af.po: + * po/az.po: + * po/bg.po: + * po/ca.po: + * po/cs.po: + * po/da.po: + * po/de.po: + * po/el.po: + * po/en_GB.po: + * po/eo.po: + * po/es.po: + * po/eu.po: + * po/fi.po: + * po/fr.po: + * po/gl.po: + * po/hr.po: + * po/hu.po: + * po/id.po: + * po/it.po: + * po/ja.po: + * po/lt.po: + * po/lv.po: + * po/mt.po: + * po/nb.po: + * po/nl.po: + * po/or.po: + * po/pl.po: + * po/pt_BR.po: + * po/ro.po: + * po/ru.po: + * po/sk.po: + * po/sl.po: + * po/sq.po: + * po/sr.po: + * po/sv.po: + * po/tr.po: + * po/uk.po: + * po/vi.po: + * po/zh_CN.po: + * po/zh_HK.po: + * po/zh_TW.po: + Update .po files + +2015-06-24 11:15:00 +0200 Sebastian Dröge + + * po/nl.po: + po: Update translations + +2015-06-23 18:42:59 -0400 Nicolas Dufresne + + * tests/check/elements/qtmux.c: + qtmux: Correctly test each segments + In presence of gaps, qtdemux will emit multiple segments. The + second segment start should match the CTTS. + https://bugzilla.gnome.org/show_bug.cgi?id=751361 + +2015-06-23 17:54:31 -0400 Nicolas Dufresne + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmux.h: + qtmux: Correctly calculate the elst media start + The media start has nothing to do with the shift we have applied + but with the value of the first PTS. This is defined as: + Dt(0) = 0 + Ct(0) = Dt(0) + CTTS(0) + So the media start is always the first CTTS. + https://bugzilla.gnome.org/show_bug.cgi?id=751361 + +2015-06-23 11:49:32 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: accumulate previous edts entries into segment.base + Allows playing edts editted files with proper synchronization of + streams. This patch fixes the regression introduced by + bf95f93c0189aa04f18e264b86b6527e431c5d53 that was added to fix + segment seeks handling. + Having the accumulated_base separated from the main segment.base + allows handling both segment seeks and edts editted files. + https://bugzilla.gnome.org/show_bug.cgi?id=751361 + +2015-06-23 00:56:16 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: improve some debug messages + Those messages are about the stream, use the pad as the + debug object to make it clear from the logs + https://bugzilla.gnome.org/show_bug.cgi?id=751361 + +2015-06-22 22:22:09 -0300 Thiago Santos + + * gst/isomp4/gstqtmux.c: + qtmux: store last_dts of the first buffer + Buffers need not to start at running-time 0 so the last_dts needs + to be the value of the first buffer's dts as it is used to compute + the duration of the buffers. If it was left at 0 the first buffer + would have a larger duration when it shouldn't + https://bugzilla.gnome.org/show_bug.cgi?id=751361 + +2015-06-23 17:11:57 +0900 Vineeth TM + + * gst/audioparsers/gstflacparse.c: + flacparse: fix possible memory leak + when buffer is stored to seektable, and stop gets called due to + corrupt flac file, then the seektable is not being released + https://bugzilla.gnome.org/show_bug.cgi?id=751364 + +2015-06-23 16:28:40 +1000 Jan Schmidt + + * gst/multifile/gstsplitmuxsink.c: + * gst/multifile/gstsplitmuxsink.h: + Revert "splitmuxsink: Mask async-start/done while switching files." + This reverts commit d61e5393f110ed482815d77807245d78b52eff46. + Causes failures muxing larger GOP sizes for some reason. Reverting + while I figure it out + +2015-06-18 23:22:06 +1000 Jan Schmidt + + * gst/multifile/gstsplitmuxpartreader.c: + * gst/multifile/gstsplitmuxsrc.c: + splitmuxsrc: Fix startup and shutdown races. + Fix 2 startup races when things happen too quickly, and 1 + at shutdown by holding a ref to the pads in use until the + loop functions exit. + Handle errors activating file parts and publish them on + the bus. + https://bugzilla.gnome.org/show_bug.cgi?id=750747 + +2015-06-18 09:26:13 +1000 Jan Schmidt + + * gst/multifile/gstsplitmuxsink.c: + * gst/multifile/gstsplitmuxsink.h: + splitmuxsink: Mask async-start/done while switching files. + Sometimes, extra async-start/done from the internal sink + while the element is still starting up can cause splitmuxsink + to stall in PAUSED state when it has been set to PLAYING + by the app. Drop the child's async-start/done messages while + switching, so they don't cause state changes at the + splitmuxsink level. + https://bugzilla.gnome.org/show_bug.cgi?id=750747 + +2015-06-15 16:12:10 +1000 Jan Schmidt + + * gst/matroska/matroska-demux.c: + matroska-demux: Use gst_video_multiview_guess_half_aspect() + Use the gst_video_multiview_guess_half_aspect() utility function + to set the half-aspect flag (or not) on stereoscopic frame-packed + videos. + +2015-06-15 16:10:37 +1000 Jan Schmidt + + * gst/isomp4/qtdemux.c: + qtdemux: Move multiview caps calculations, add half-aspect heuristics + Move the multiview caps calculations to the configure_stream() + function, so the rest of the video info is available, and + use the gst_video_multiview_guess_half_aspect() function to + determine if the half-aspect flag should be set on frame-packed + video. + +2015-06-18 16:06:02 -0400 Nicolas Dufresne + + * gst/isomp4/qtdemux.c: + qtdemux: Add cslg support + The cslg atom provide information about the DTS shift. This is + needed in recent version of ctts atom where the offset can be + negative. When cslg is missing, we parse the CTTS table as proposed + in the spec to calculate these values. + In this implementation, we only need to know the shift. As GStreamer + cannot transport negative timestamps, we shift the timestamps forward + using that value and adapt the segment to compensate. This patch also + removes bogus offset of ctts_soffset, this offset shall be included + in the edit list. + https://bugzilla.gnome.org/show_bug.cgi?id=751103 + +2015-06-19 18:37:59 -0400 Nicolas Dufresne + + * tests/check/elements/qtmux.c: + qtmux: Test gaps at start of stream + https://bugzilla.gnome.org/show_bug.cgi?id=751242 + +2015-06-19 18:40:43 -0400 Nicolas Dufresne + + * gst/isomp4/gstqtmux.c: + qtmux: Use PTS to figure-out presence of gaps + We need to look at the presentation timestamp in order to conclude if + there is a gap at the start of a stream. + https://bugzilla.gnome.org/show_bug.cgi?id=751242 + +2015-06-19 16:45:02 -0400 Nicolas Dufresne + + * gst/isomp4/gstqtmux.c: + qtmux: Set edit list to compensate DTS shift + We shift DTS forward to avoid negative timestamps which cannot be + represented with version 0 of the CTTS table. To stick with that + version (backward compatibility), the spec recommend using an + edit list entry to move back the presentation time to where it + should be. + https://bugzilla.gnome.org/show_bug.cgi?id=751242 + +2015-06-22 14:35:52 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + flvmux: Insert AVC end of sequence + This FLV specific mark is needed to prevent Flow Player (most likely + all Flash base player) from going into buffering state when near EOS. + https://bugzilla.gnome.org/show_bug.cgi?id=751320 + +2015-06-22 13:05:29 +0900 Vineeth TM + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-parse.c: + matroska: remove useless check + No need to check for context availability while freeing. We are inside + inside a code block with a condition that dereferences context. + if (context->type == 0 ... + https://bugzilla.gnome.org/show_bug.cgi?id=751306 + +2015-06-22 19:35:57 +0900 Vineeth T M + + * gst/matroska/lzo.c: + lzo: fix memory leak + the opened file is not being closed during test, which will result + in memory leak. + https://bugzilla.gnome.org/show_bug.cgi?id=751306 + +2015-06-22 19:30:58 +0900 Vineeth T M + + * ext/mikmod/mikmod_reader.c: + mikmod_reader: Possible null pointer dereference: + gst_reader variable is being used before actually checking if it + allocated properly + https://bugzilla.gnome.org/show_bug.cgi?id=751306 + +2015-06-22 19:45:14 +0900 Sangkyu Park + + * gst/rtpmanager/gstrtpjitterbuffer.c: + * gst/rtpmanager/rtpjitterbuffer.c: + rtpjitterbuffer: Minor clean-up + 1. Fix the code which is wrong coding style. + 2. Fix a typing error of comment. + https://bugzilla.gnome.org/show_bug.cgi?id=751316 + +2015-06-22 11:28:13 +0200 Jose Antonio Santos Cadenas + + * gst/rtpmanager/rtpsource.c: + rtpsource: Do not try to push NULL buffers + If update_receiver_stats() fails, we can't really do anything with this buffer + anymore and have to drop it. This happens if there's a big seqnum + discontinuity for example. + https://bugzilla.gnome.org/show_bug.cgi?id=751311 + +2015-06-22 13:10:02 +0900 Vineeth TM + + * gst/flv/gstflvdemux.c: + flvdemux: trivial cleanup + trivial patch to add proper ( while checking for if(G_UNLIKELY()) + https://bugzilla.gnome.org/show_bug.cgi?id=751306 + +2015-06-22 13:16:08 +0900 Vineeth TM + + * gst/audioparsers/gstdcaparse.c: + dcaparse: initialize size variable + size can be used in cleanup without being initialized. Hence + setting it to 0 when declaring + https://bugzilla.gnome.org/show_bug.cgi?id=751306 + +2015-06-22 13:13:29 +0900 Vineeth TM + + * gst/audioparsers/gstmpegaudioparse.c: + mpegaudioparse: initialze bpf variable + bpf variable might be used in cleanup without being intialized. + https://bugzilla.gnome.org/show_bug.cgi?id=751306 + +2015-06-19 14:50:59 +0200 Miguel París Díaz + + * gst/rtpmanager/gstrtprtxqueue.c: + rtprtxqueue: reverse pending list before pushing buffers + With this we send the RTX buffers in the same order + that they were requested. + https://bugzilla.gnome.org/show_bug.cgi?id=751297 + +2015-06-21 19:22:10 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + flvmux: Fix DTS validity check + This check was up-side-down, causing a bad timestamp at start + and then all timestamp being delayed. + https://bugzilla.gnome.org/show_bug.cgi?id=751298 + +2015-06-17 15:19:47 -0400 Nicolas Dufresne + + * gst/isomp4/fourcc.h: + * gst/isomp4/qtdemux_dump.c: + * gst/isomp4/qtdemux_dump.h: + * gst/isomp4/qtdemux_types.c: + cslg: Add Composition Shift Least Greatest Atom + This simply add fourcc and dump function for the cslg Atom. + https://bugzilla.gnome.org/show_bug.cgi?id=751103 + +2015-06-17 15:18:38 -0400 Nicolas Dufresne + + * gst/isomp4/qtdemux_dump.c: + ctts_dump: Fix signess issues + It didn't bug, but use correct signess in traces. The number of + entries is unsigned while the offset can be signed according to + recent spec. + https://bugzilla.gnome.org/show_bug.cgi?id=751103 + +2015-06-16 17:48:08 -0400 Nicolas Dufresne + + * common: + Automatic update of common submodule + From 6015d26 to f74b2df + +2015-06-16 11:43:39 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: gst_rtp_buffer_ext_timestamp() modifies its first argument, keep a copy around + +2015-06-16 10:30:34 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Compare ext RTP times, not plain RTP time and ext RTP time when calculating elapsed time + Otherwise all RTP times after a wraparound would be considered as going + backwards, they will always be smaller than the ext RTP time. + +2015-06-15 19:25:12 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpbin.c: + rtpbin: The default rtp-profile should be AVP, not AVPF + +2015-06-15 14:32:21 +0900 Sangkyu Park + + * gst/rtpmanager/gstrtpjitterbuffer.c: + * gst/rtpmanager/rtpjitterbuffer.c: + rtpjitterbuffer: Minor cleanup + 1. Add Null check in 'free_item' function. + 2. Fix a typing error of comment. + https://bugzilla.gnome.org/show_bug.cgi?id=750965 + +2015-06-12 17:44:51 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + flmux: Make sure best_time is initialized + +2015-06-12 23:29:19 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/gstrtpsession.h: + rtpbin/session: Add new ntp-time-source property and deprecate use-pipeline-clock property + The new property allows to select the time source that should be used for the + NTP time in RTCP packets. By default it will continue to calculate the NTP + timestamp (1900 epoch) based on the realtime clock. Alternatively it can use + the UNIX timestamp (1970 epoch), the pipeline's running time or the pipeline's + clock time. The latter is especially useful for synchronizing multiple + receivers if all of them share the same clock. + If use-pipeline-clock is set to TRUE, it will override the ntp-time-source + setting and continue to use the running time plus 70 years. This is only kept + for backwards compatibility. + +2015-04-07 16:03:42 -0300 Thiago Santos + + * tests/check/elements/qtmux.c: + tests: qtmux: test for muxing with DTS outside the segment + https://bugzilla.gnome.org/show_bug.cgi?id=740575 + +2015-06-11 17:26:49 -0400 Nicolas Dufresne + + * gst/isomp4/qtdemux.c: + qtdemux: Adjust segment according to ctts offset + In presence of a CTTS, the segment start/stop must be offset so + the segment start/stop include the PTS. This is needed since the + PTS cannot be negative in this format. This fixes issues where the + running time of the first buffer isn't at the start. + https://bugzilla.gnome.org/show_bug.cgi?id=740575 + +2015-04-03 20:34:42 -0400 Nicolas Dufresne + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmux.h: + qtmux: Handle DTS with negative running time + As QT works with duration, simply bring back first DTS to 0 and shift + forward the PTS of the same amount. + https://bugzilla.gnome.org/show_bug.cgi?id=740575 + +2015-06-10 18:15:52 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + * gst/flv/gstflvmux.h: + flvmux: Add negative runtime DTS support + This is done by using new feature of the CollectPad clip function + which sets the DTS as a gint64 in the collected data. It also simplify + the code a bit. + https://bugzilla.gnome.org/show_bug.cgi?id=740575 + +2015-06-12 23:06:24 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpbin.c: + rtpbin: Rename some variables and debug output to make more sense + Local and remote were mixed up in a few places, and the time we store here is + not UNIX time (1970 epoch), but NTP time (1900 epoch) in nanoseconds. + +2015-06-12 19:21:10 +0300 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudioremoteio.c: + osxaudio: fix latency property query on RemoteIO + AudioUnitGetProperty would fail with kParamErr (-50) every time, + simply because size wasn't initialized. + Now it returns zero latency, but at least it doesn't fail. + https://bugzilla.gnome.org/show_bug.cgi?id=750868 + +2015-04-07 14:06:16 +0530 Arun Raghavan + + * ext/pulse/pulsesrc.c: + pulsesrc: Fix mapping of latency parameters to buffer attributes + +2015-06-12 01:56:37 +1000 Jan Schmidt + + * gst/matroska/matroska-demux.c: + matroska-demux: Actually set detected 3D info into output caps. + Use the information read from the StereoMode info + to configure multiview-mode and multiview-flags in the + video caps. + +2015-06-11 13:36:54 +1000 Jan Schmidt + + * gst/multifile/gstsplitmuxpartreader.c: + * gst/multifile/gstsplitmuxsink.c: + * gst/multifile/gstsplitmuxsink.h: + splitmuxsink: Take released-but-not-yet-output bytes into account + When deciding whether it's time to switch to a new file, take into + account data that's been released for pushing, but hasn't yet + been pushed - because downstream is slow or the threads haven't been + scheduled. + Fixes a race in the unit test and probably in practice - sometimes + failing to switch when it should for an extra GOP or two. + Also fix a problem in splitmuxsrc where playback sometimes + stalls at startup if types are found too quickly. + https://bugzilla.gnome.org/show_bug.cgi?id=750747 + +2015-06-11 01:04:51 -0300 Thiago Santos + + * gst/isomp4/atoms.c: + atoms: remove custom gst_buffer_new function in favor of core version + Remove a custom specialized version of gst_buffer_new_wrapped by + using gst_buffer_new_wrapped_full inside a macro to simplify + parameters and give it a more meaningful name. + It is only used to create temporary buffers to have its data copied. + +2015-06-11 00:14:41 -0300 Thiago Santos + + * gst/isomp4/atoms.c: + atoms: simplify free form data atoms creation + Avoid creating an intermediary buffer or memory area just + to copy into an atom's data area. + +2015-06-10 22:27:27 -0300 Thiago Santos + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + * gst/isomp4/fourcc.h: + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmux.h: + * gst/isomp4/gstqtmuxmap.c: + qtmux: add AC-3 muxing support + Adds AC-3 muxing support. It is defined for mp4 and 3gp formats. + One extra feature that was added was the ability to add extension + atoms after set_caps as the AC-3 extension atom needs some data + that has to be extracted from the stream itself and is not + present on caps. + +2015-06-10 22:36:59 -0300 Thiago Santos + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + qtmux: remove unused type MP4S + +2015-06-10 22:29:01 -0300 Thiago Santos + + * gst/isomp4/gstqtmux.c: + qtmux: remove duplicate attribute value set + It is also set a few lines below + +2015-06-11 00:22:54 +1000 Jan Schmidt + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-ids.c: + * gst/matroska/matroska-ids.h: + * gst/matroska/matroska-mux.c: + matroska: Implement basic stereoscopic video support + Implement support for the packed video formats WebM + uses, not all the values that Matroska might use. + In practice, it's really hard to find any samples in the + wild of any. + Supported in both the muxer and demuxer. + +2015-06-10 01:26:15 +1000 Jan Schmidt + + * gst/isomp4/fourcc.h: + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux_dump.c: + * gst/isomp4/qtdemux_dump.h: + * gst/isomp4/qtdemux_types.c: + qtdemux: Add basic support for MPEG-A stereoscopic video + The MPEG-A format provides an extension to the ISO base media + file format to store stereoscopic content encoded with different + codecs like H.264 and MPEG-4:2. The stereo video media information(svmi) + atom declares the presence and storage method for the video. + Stereo video information for MPEG-A can also be supplied through + the 'stvi' atom (ref: ISO/IEC_14496-12, ISO/IEC_23000-11), which + is not implemented in this patch. + Also missing is support for stereo video encoded as separate video tracks + for now. + Based on a patch by Sreerenj Balachandran + https://bugzilla.gnome.org/show_bug.cgi?id=611157 + +2015-06-02 16:15:35 -0400 Xavier Claessens + + * ext/soup/gstsouphttpsrc.c: + * ext/soup/gstsouphttpsrc.h: + souphttpsrc: Add tls-database property + https://bugzilla.gnome.org/show_bug.cgi?id=750298 + +2015-06-10 14:33:50 +0200 Sebastian Dröge + + * gst/rtp/gstasteriskh263.c: + * gst/rtp/gstrtpac3pay.c: + * gst/rtp/gstrtpamrpay.c: + * gst/rtp/gstrtpceltdepay.c: + * gst/rtp/gstrtpceltpay.c: + * gst/rtp/gstrtpdvpay.c: + * gst/rtp/gstrtpg723pay.c: + * gst/rtp/gstrtpg729pay.c: + * gst/rtp/gstrtpgsmpay.c: + * gst/rtp/gstrtpgstpay.c: + * gst/rtp/gstrtph263pay.c: + * gst/rtp/gstrtph263ppay.c: + * gst/rtp/gstrtph264depay.c: + * gst/rtp/gstrtpj2kpay.c: + * gst/rtp/gstrtpjpegpay.c: + * gst/rtp/gstrtpmp2tpay.c: + * gst/rtp/gstrtpmp4adepay.c: + * gst/rtp/gstrtpmp4apay.c: + * gst/rtp/gstrtpmp4gdepay.c: + * gst/rtp/gstrtpmp4gpay.c: + * gst/rtp/gstrtpmp4vpay.c: + * gst/rtp/gstrtpmpapay.c: + * gst/rtp/gstrtpmparobustdepay.c: + * gst/rtp/gstrtpmpvpay.c: + * gst/rtp/gstrtpqcelpdepay.c: + * gst/rtp/gstrtpqdmdepay.c: + * gst/rtp/gstrtpsbcpay.c: + * gst/rtp/gstrtpspeexpay.c: + * gst/rtp/gstrtpsv3vdepay.c: + * gst/rtp/gstrtptheorapay.c: + * gst/rtp/gstrtpvorbispay.c: + * gst/rtp/gstrtpvrawdepay.c: + * gst/rtp/gstrtpvrawpay.c: + * gst/rtpmanager/gstrtpmux.c: + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsource.c: + rtp: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP() + The mix between all these in the RTP code is confusing, let's try to be + consistent. + +2015-06-10 14:49:50 +0300 Ilya Konstantinov + + * gst/rtpmanager/rtpsource.c: + rtpmanager: clarify negative lost packets in stats + Also: + - Move notes on units before field documentation. + - Unify documentation style. + https://bugzilla.gnome.org/show_bug.cgi?id=750653 + +2015-06-10 06:38:39 -0400 Xavier Claessens + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: fix getter of "ssl-use-system-ca-file" + https://bugzilla.gnome.org/show_bug.cgi?id=750298 + +2015-06-10 09:49:47 +0900 Vineeth TM + + * gst/isomp4/qtdemux.c: + qtdemux: fix reverse playback + When performing seek, segment->start is being updated with desired_offset, + but in case of reverse playback segment->start should be 0 and + segment->stop should be updated with desired offset. + https://bugzilla.gnome.org/show_bug.cgi?id=750675 + +2015-01-21 18:09:03 +0100 Philipp Zabel + + * sys/v4l2/gstv4l2allocator.c: + * sys/v4l2/gstv4l2allocator.h: + * sys/v4l2/gstv4l2bufferpool.c: + gstv4l2bufferpool: handle -EPIPE from DQBUF to signal EOS + The V4L2 decoder signals EOS by returning -EPIPE from DQBUF after the + last buffer. + https://bugzilla.gnome.org/show_bug.cgi?id=743338 + +2015-06-06 21:09:19 -0400 Xavier Claessens + + * gst/rtsp/gstrtspsrc.c: + * gst/rtsp/gstrtspsrc.h: + rtspsrc: Add a GTlsInteraction property + It can be used for TLS client authentication. + https://bugzilla.gnome.org/show_bug.cgi?id=750471 + +2015-01-09 11:36:11 +0100 Enrico Jorns + + * sys/v4l2/gstv4l2transform.c: + v4l2: Allow scaling in the v4l2*convert element + This is inspired of videoscale and videoconvert elements. + https://bugzilla.gnome.org/show_bug.cgi?id=742917 + +2015-06-09 19:02:55 +0300 Ilya Konstantinov + + * gst/rtpmanager/rtpsource.c: + * gst/rtpmanager/rtpstats.h: + rtpmanager: document units of stats and arguments + Also, minor spelling and style corrections. + https://bugzilla.gnome.org/show_bug.cgi?id=750653 + +2015-06-09 14:42:27 +0200 Stefan Sauer + + * Makefile.am: + cruft: add the obsolete tmpl dir to cruft-dirs + +2015-06-09 11:30:22 +0200 Edward Hervey + + * common: + Automatic update of common submodule + From d9a3353 to 6015d26 + +2015-06-09 07:04:07 +0200 Edward Hervey + + * common: + Fix common version + Was accidently downgraded by 87a4884acd8655a6591d735a1d944ecb5ea3de16 + +2015-06-08 19:11:41 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2object.c: + v4l2: Also set colorimetry on output devices + This completes the code that set the colorimetry on output + device. + +2015-06-08 19:10:34 -0400 Nicolas Dufresne + + * common: + * sys/v4l2/gstv4l2object.c: + v4l2: Add missing SMTP240M matrix + This is missing in the doc, but was in the header. + +2015-06-08 23:00:16 +0100 Luis de Bethencourt + + * gst/goom/goom_core.c: + goom: possible uninitialized variables warning + Build fails with the latest snapshot of gcc-4.9 because param1 and param2 might + possibly be used uninitialized. They are set depending on the cases of a switch + statement and the compiler sees this as not a complete guarantee. + Set them to 0 if the switch statement falls down to the default case. + https://bugzilla.gnome.org/show_bug.cgi?id=750566#c6 + +2015-06-08 17:24:38 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2object.c: + v4l2object: Fully implement colorimetry support + This fixes wrong mapping for sRGB as in GStreamer sRGB correctly + apply to RGB formats, while in V4L2 it's an alias for sYCC. Also + add support for the new quantization (range), ycbcr_encoding (matrix) + and xfer_func (transfer) enumeration. + +2015-06-08 17:01:15 -0400 Nicolas Dufresne + + * sys/v4l2/ext/types-compat.h: + * sys/v4l2/ext/v4l2-common.h: + * sys/v4l2/ext/v4l2-controls.h: + * sys/v4l2/ext/videodev2.h: + v4l2: Update kernel headers to latest from media tree + This is the latest from media tree. This should enable more development + of the v4l2 elements. This includes new flags requires to fix draining + path in decoder, colorimetry and much more. + +2015-06-08 23:07:55 +0200 Stefan Sauer + + * common: + Automatic update of common submodule + From d37af32 to d9a3353 + +2015-06-08 19:42:30 +0100 Chris Clayton + + * gst/rtp/gstrtpvp8pay.c: + rtpvp8depay: potential access beyond end of array + Compiling (with gcc-4.9-20150603) produces an error because of an access beyond + the end of an array. This patch fixes the error by initializing the loop + control/array index variable (i) to 1 and returning i - 1 when a match is found. + Also, because the values stored in the array increase in value as the index + increases, the >= test unnecessary, so it is removed. + +2015-04-30 02:52:58 +1000 Jan Schmidt + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: Don't accumulate more than 2 GOPs + Don't allow large amounts of data to queue up - we only need + the GOP we're writing, and the GOP we're accumulating. + +2015-04-16 10:44:49 +1000 Jan Schmidt + + * gst/isomp4/gstqtmux.c: + isomp4: fsync after sending updates in robust mode + Use the new GstBuffer SYNC_AFTER flag to trigger an fsync + after updating the moov or mdat atom, and after updating the free + atom to make it visible. + +2015-04-03 00:57:20 +1100 Jan Schmidt + + * gst/isomp4/gstqtmux.c: + isomp4: Only set moov header into streamheader at EOS + Only update the moov header into the caps if it's the finalised + moov at EOS time. Avoids posting a bogus moov at startup and + repeated updates in robust-recording mode + +2015-04-03 01:44:15 +1100 Jan Schmidt + + * tests/check/elements/qtmux.c: + tests: Update mp4 mux test for mdat placeholder change + The mp4 muxer now writes a place-holder mdat as a free + atom followed by a 0-byte mdat that covers the rest of the + file, making it possible to rewrite it as 64-bit, or leave + it as-is if nothing else is written afterward + +2015-04-01 11:15:38 +1100 Jan Schmidt + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + * gst/isomp4/atomsrecovery.c: + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmux.h: + isomp4: Implement robust muxing using ping-pong strategy + Implement a robust recording mode, where the output + file is always in a playable state, seeking and rewriting + the moov header at a configurable interval. Rewriting + moov is done using reserved space at the start of + the file, and a ping-pong strategy where the moov + is replaced atomically so it's never invalid. + Track when tags have actually changed, and don't write them into + the moov unless they've changed. Clear any existing tags when + re-writing them, so we can do progressive moov updating in robust + recording mode. + Write placeholder mdat as a free atom plus a 32-bit mdat + with '0' size, which means "rest of the file" in the spec. + Re-write it later to a full 64-bit extended size atom if needed. + +2015-04-01 00:58:52 +1100 Jan Schmidt + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + * gst/isomp4/gstqtmux.c: + isomp4: Update edit list when re-writing moov + Correctly update any edit lists each time the moov is recalculated, + updating existing table entries if they already exist instead of just + adding new ones. + +2015-04-08 01:41:18 +1000 Jan Schmidt + + * gst/isomp4/gstqtmux.c: + isomp4: Remove an extra bracket in a comment. + +2015-03-19 20:29:44 +1100 Jan Schmidt + + * gst/multifile/gstsplitmuxsrc.c: + splitmuxsrc: Protect total_duration state variable with the object lock. + Prevent deadlocks from downstream querying duration from the streaming thread. + +2015-06-07 23:06:20 +0200 Stefan Sauer + + * common: + Automatic update of common submodule + From 21ba2e5 to d37af32 + +2015-06-07 19:24:20 +0100 Luis de Bethencourt + + * gst/goom/gstaudiovisualizer.c: + goom: clean dereferences of private structure + https://bugzilla.gnome.org/show_bug.cgi?id=742875 + +2015-06-07 19:20:04 +0100 Luis de Bethencourt + + * gst/goom2k1/gstaudiovisualizer.c: + goom2k1: clean dereferences of private structure + https://bugzilla.gnome.org/show_bug.cgi?id=742875 + +2015-06-07 17:32:01 +0200 Stefan Sauer + + * common: + Automatic update of common submodule + From c408583 to 21ba2e5 + +2015-06-07 17:01:37 +0200 Stefan Sauer + + * docs/plugins/Makefile.am: + docs: remove variables that we define in the snippet from common + This is syncing our Makefile.am with upstream gtkdoc. + +2015-06-07 17:16:19 +0200 Stefan Sauer + + * autogen.sh: + * common: + Automatic update of common submodule + From d676993 to c408583 + +2015-06-07 16:44:37 +0200 Sebastian Dröge + + * configure.ac: + Back to development + +=== release 1.5.1 === + +2015-06-07 10:46:34 +0200 Sebastian Dröge + + * ChangeLog: + * NEWS: + * RELEASE: + * configure.ac: + * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * docs/plugins/inspect/plugin-1394.xml: + * docs/plugins/inspect/plugin-aasink.xml: + * docs/plugins/inspect/plugin-alaw.xml: + * docs/plugins/inspect/plugin-alpha.xml: + * docs/plugins/inspect/plugin-alphacolor.xml: + * docs/plugins/inspect/plugin-apetag.xml: + * docs/plugins/inspect/plugin-audiofx.xml: + * docs/plugins/inspect/plugin-audioparsers.xml: + * docs/plugins/inspect/plugin-auparse.xml: + * docs/plugins/inspect/plugin-autodetect.xml: + * docs/plugins/inspect/plugin-avi.xml: + * docs/plugins/inspect/plugin-cacasink.xml: + * docs/plugins/inspect/plugin-cairo.xml: + * docs/plugins/inspect/plugin-cutter.xml: + * docs/plugins/inspect/plugin-debug.xml: + * docs/plugins/inspect/plugin-deinterlace.xml: + * docs/plugins/inspect/plugin-dtmf.xml: + * docs/plugins/inspect/plugin-dv.xml: + * docs/plugins/inspect/plugin-effectv.xml: + * docs/plugins/inspect/plugin-equalizer.xml: + * docs/plugins/inspect/plugin-flac.xml: + * docs/plugins/inspect/plugin-flv.xml: + * docs/plugins/inspect/plugin-flxdec.xml: + * docs/plugins/inspect/plugin-gdkpixbuf.xml: + * docs/plugins/inspect/plugin-goom.xml: + * docs/plugins/inspect/plugin-goom2k1.xml: + * docs/plugins/inspect/plugin-icydemux.xml: + * docs/plugins/inspect/plugin-id3demux.xml: + * docs/plugins/inspect/plugin-imagefreeze.xml: + * docs/plugins/inspect/plugin-interleave.xml: + * docs/plugins/inspect/plugin-isomp4.xml: + * docs/plugins/inspect/plugin-jack.xml: + * docs/plugins/inspect/plugin-jpeg.xml: + * docs/plugins/inspect/plugin-level.xml: + * docs/plugins/inspect/plugin-matroska.xml: + * docs/plugins/inspect/plugin-mulaw.xml: + * docs/plugins/inspect/plugin-multifile.xml: + * docs/plugins/inspect/plugin-multipart.xml: + * docs/plugins/inspect/plugin-navigationtest.xml: + * docs/plugins/inspect/plugin-oss4.xml: + * docs/plugins/inspect/plugin-ossaudio.xml: + * docs/plugins/inspect/plugin-png.xml: + * docs/plugins/inspect/plugin-pulseaudio.xml: + * docs/plugins/inspect/plugin-replaygain.xml: + * docs/plugins/inspect/plugin-rtp.xml: + * docs/plugins/inspect/plugin-rtpmanager.xml: + * docs/plugins/inspect/plugin-rtsp.xml: + * docs/plugins/inspect/plugin-shapewipe.xml: + * docs/plugins/inspect/plugin-shout2send.xml: + * docs/plugins/inspect/plugin-smpte.xml: + * docs/plugins/inspect/plugin-soup.xml: + * docs/plugins/inspect/plugin-spectrum.xml: + * docs/plugins/inspect/plugin-speex.xml: + * docs/plugins/inspect/plugin-taglib.xml: + * docs/plugins/inspect/plugin-udp.xml: + * docs/plugins/inspect/plugin-video4linux2.xml: + * docs/plugins/inspect/plugin-videobox.xml: + * docs/plugins/inspect/plugin-videocrop.xml: + * docs/plugins/inspect/plugin-videofilter.xml: + * docs/plugins/inspect/plugin-videomixer.xml: + * docs/plugins/inspect/plugin-vpx.xml: + * docs/plugins/inspect/plugin-wavenc.xml: + * docs/plugins/inspect/plugin-wavpack.xml: + * docs/plugins/inspect/plugin-wavparse.xml: + * docs/plugins/inspect/plugin-ximagesrc.xml: + * docs/plugins/inspect/plugin-y4menc.xml: + * gst-plugins-good.doap: + * gst/deinterlace/tvtime-dist.c: + * gst/videomixer/videomixerorc-dist.c: + * win32/common/config.h: + Release 1.5.1 + +2015-06-07 10:38:28 +0200 Sebastian Dröge + + * po/af.po: + * po/az.po: + * po/bg.po: + * po/ca.po: + * po/cs.po: + * po/da.po: + * po/de.po: + * po/el.po: + * po/en_GB.po: + * po/eo.po: + * po/es.po: + * po/eu.po: + * po/fi.po: + * po/fr.po: + * po/gl.po: + * po/hr.po: + * po/hu.po: + * po/id.po: + * po/it.po: + * po/ja.po: + * po/lt.po: + * po/lv.po: + * po/mt.po: + * po/nb.po: + * po/nl.po: + * po/or.po: + * po/pl.po: + * po/pt_BR.po: + * po/ro.po: + * po/ru.po: + * po/sk.po: + * po/sl.po: + * po/sq.po: + * po/sr.po: + * po/sv.po: + * po/tr.po: + * po/uk.po: + * po/vi.po: + * po/zh_CN.po: + * po/zh_HK.po: + * po/zh_TW.po: + Update .po files + +2015-06-07 10:32:38 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + * tests/check/elements/rtpsession.c: + rtpsession: Override the SSRC from the packets' SSRC if none was given via caps or property + +2015-06-07 09:35:38 +0200 Sebastian Dröge + + * po/af.po: + * po/az.po: + * po/bg.po: + * po/ca.po: + * po/cs.po: + * po/da.po: + * po/de.po: + * po/el.po: + * po/en_GB.po: + * po/eo.po: + * po/es.po: + * po/eu.po: + * po/fi.po: + * po/fr.po: + * po/gl.po: + * po/hr.po: + * po/hu.po: + * po/id.po: + * po/it.po: + * po/ja.po: + * po/lt.po: + * po/lv.po: + * po/mt.po: + * po/nb.po: + * po/nl.po: + * po/or.po: + * po/pl.po: + * po/pt_BR.po: + * po/ro.po: + * po/ru.po: + * po/sk.po: + * po/sl.po: + * po/sq.po: + * po/sr.po: + * po/sv.po: + * po/tr.po: + * po/uk.po: + * po/vi.po: + * po/zh_CN.po: + * po/zh_HK.po: + * po/zh_TW.po: + po: Update translations + +2015-06-05 15:32:10 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2object.c: + v4l2: Don't warn when optional CID are not implement + gst_v4l2_get_attributre() shall only be used when the CID is expected + to be supported. Otherwise, we get unwanted warning posted to the bus. + +2015-06-05 16:43:08 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpsession: Only suggest our internal ssrc if it's not a random one and was selected as internal ssrc + https://bugzilla.gnome.org/show_bug.cgi?id=749581 + +2015-06-04 14:18:01 +0900 Vineeth TM + + * gst/interleave/interleave.c: + interleave: error when channel-positions-from-input=False + self->channels is being incremented only when + channel-positions-from-input is set as TRUE. So in case of FALSE + self->func is not set and hence creating assertion error. + Hence removing the condition to increment self->channels. + https://bugzilla.gnome.org/show_bug.cgi?id=744211 + +2015-06-05 10:33:11 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Add support for receiving reduced size RTCP + It worked before but gave warnings, now we just ignore RTCP + packets that don't start with a SR. As all we're interested + in here are SRs. + +2015-06-03 12:22:42 +0200 Jose Antonio Santos Cadenas + + * gst/rtpmanager/gstrtpssrcdemux.c: + rtpssrcdemux: Add support for reduce size rtcp + According to RFC 5506, reduce size packages can be sent, this + packages may not be compound, so we need to add support for + getting ssrc from other types of packages. + https://bugzilla.gnome.org/show_bug.cgi?id=750327 + +2015-06-03 13:14:44 +0200 Jose Antonio Santos Cadenas + + * gst/rtpmanager/rtpsession.c: + rtpsession: Add support for receiving reduced size rtcp + See RFC 5506 + https://bugzilla.gnome.org/show_bug.cgi?id=750332 + +2015-06-04 16:09:41 +0200 Sebastian Dröge + + * gst/audioparsers/gstaacparse.c: + aacparse: Add support for channel configurations 11, 12 and 14 and 7 actually has 8 channels + ISO/IEC 14496-3:2009/PDAM 4 added 11, 12 and 14. + +2015-06-03 08:57:57 -0400 Nicolas Dufresne + + * gst/rtp/gstasteriskh263.c: + asteriskh263: Un-rank clashing depayloader + This depayloader clash with the standard one for H263p. It produces an + H263p stream with a modified header. It uses encoding-name that is the + same as H263p (H263-1998) though the resulting ES is not decodable or + parsable in GStreamer, making it unsuable in dynamic pipeline. This + patch unrank this specialized depayloader since it can only be used in + custom pipeline. + https://bugzilla.gnome.org/show_bug.cgi?id=739935 + +2015-06-02 18:09:48 +0100 Luis de Bethencourt + + * gst/goom2k1/gstgoom.c: + * gst/goom2k1/gstgoom.h: + goom2k1: remove variables not needed anymore + https://bugzilla.gnome.org/show_bug.cgi?id=742875 + +2015-06-02 17:52:46 +0100 Luis de Bethencourt + + * gst/goom2k1/Makefile.am: + * gst/goom2k1/gstaudiovisualizer.c: + * gst/goom2k1/gstaudiovisualizer.h: + * gst/goom2k1/gstgoom.c: + * gst/goom2k1/gstgoom.h: + goom2k1: rebase to use the audiovisualizer class + Rebase to have goom2k1 using the common GstAudioVisualizer class + https://bugzilla.gnome.org/show_bug.cgi?id=742875 + +2015-06-02 17:29:36 +0100 Luis de Bethencourt + + * gst/goom/Makefile.am: + * gst/goom/gstaudiovisualizer.c: + * gst/goom/gstaudiovisualizer.h: + * gst/goom/gstgoom.c: + * gst/goom/gstgoom.h: + goom: rebase to use the audiovisualizer class + +2015-06-02 16:27:24 +0200 Edward Hervey + + * tests/check/elements/aacparse.c: + * tests/check/elements/ac3parse.c: + * tests/check/elements/apev2mux.c: + * tests/check/elements/aspectratiocrop.c: + * tests/check/elements/audioamplify.c: + * tests/check/elements/audiochebband.c: + * tests/check/elements/audiocheblimit.c: + * tests/check/elements/audiodynamic.c: + * tests/check/elements/audioinvert.c: + * tests/check/elements/audiowsincband.c: + * tests/check/elements/audiowsinclimit.c: + * tests/check/elements/avimux.c: + * tests/check/elements/equalizer.c: + * tests/check/elements/flacparse.c: + * tests/check/elements/id3v2mux.c: + * tests/check/elements/jpegdec.c: + * tests/check/elements/jpegenc.c: + * tests/check/elements/matroskamux.c: + * tests/check/elements/mpegaudioparse.c: + * tests/check/elements/rganalysis.c: + * tests/check/elements/rglimiter.c: + * tests/check/elements/rgvolume.c: + * tests/check/elements/rtpbin.c: + * tests/check/elements/rtpsession.c: + * tests/check/elements/spectrum.c: + * tests/check/elements/videobox.c: + * tests/check/elements/videocrop.c: + * tests/check/elements/videofilter.c: + * tests/check/elements/wavpackdec.c: + * tests/check/elements/wavpackenc.c: + * tests/check/elements/wavpackparse.c: + * tests/check/elements/y4menc.c: + * tests/check/pipelines/simple-launch-lines.c: + * tests/check/pipelines/tagschecking.c: + * tests/check/pipelines/wavpack.c: + check: Use GST_CHECK_MAIN () macro everywhere + Makes source code smaller, and ensures we go through common initialization + path (like the one that sets up XML unit test output ...) + +2015-05-26 14:47:31 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpsession: Only schedule a timer when we actually have to send RTCP + Otherwise we will have 10s-100s of thread wakeups in feedback profiles, create + RTCP packets, etc. just to suppress them in 99% of the cases (i.e. if no + feedback is actually pending and no regular RTCP has to be sent). + This improves CPU usage and battery life quite a lot. + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-22 13:44:03 +0300 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Remove useless goto + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-21 12:54:47 +0300 Sebastian Dröge + + * tests/examples/rtp/Makefile.am: + * tests/examples/rtp/client-H264-rtx.sh: + * tests/examples/rtp/client-rtpaux.c: + * tests/examples/rtp/server-VTS-H264-rtx.sh: + * tests/examples/rtp/server-rtpaux.c: + examples: Set RTP profile to AVPF for rtpaux examples + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-04 16:41:50 +0200 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Set RTP profile on the rtpsession objects + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-21 14:13:56 +0300 Sebastian Dröge + + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + rtpbin: Add rtp-profile property for setting the default profile of newly created sessions + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-04 11:51:41 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Only put RRs and full SDES into regular RTCP packets + If we may suppress the packet due to the rules of RFC4585 (i.e. when + below the t-rr-int), we can send a smaller RTCP packet without RRs + and full SDES. In theory we could even send a minimal RTCP packet + according to RFC5506, but we don't support that yet. + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-04 13:51:50 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpsession: Keep track of tp/tn and t_rr_last separately + Otherwise we can't properly schedule RTCP in feedback profiles as we need to + distinguish the time when we last checked for sending RTCP (tp) but might have + suppressed it, and the time when we last actually sent a non-early RTCP + packet. + This together with the other changes should now properly implement RTCP + scheduling according to RFC4585, and especially allow us to send feedback + packets a lot if needed but only send regular RTCP packets every once in a + while. + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-04 11:42:08 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + * gst/rtpmanager/rtpsource.h: + * gst/rtpmanager/rtpstats.c: + * gst/rtpmanager/rtpstats.h: + rtpsession: Add property for selecting RTP profile (AVP/AVPF/etc) + And modify our RTCP scheduling algorithm accordingly. We now can send more + RTCP packets if needed for feedback, but will throttle full RTCP packets by + rtcp-min-interval (t-rr-int from RFC4585). + In non-feedback mode, rtcp-min-interval is Tmin from RFC3550, which is + statically set to 1s or 0s by RFC4585. Tmin defines how often we should + send RTCP packets at most. + https://bugzilla.gnome.org/show_bug.cgi?id=746543 + +2015-05-30 17:41:05 -0400 Olivier Crête + + * gst/law/mulaw-decode.c: + mulawdec: Let baseclass estimate bitrate + This makes playback directly from a file work with the right caps. + +2015-05-27 16:31:23 +0100 Tim-Philipp Müller + + * gst/udp/gstdynudpsink.c: + * gst/udp/gstdynudpsink.h: + dynudpsink: keep GCancellable fd around instead of re-creating it constantly + And create it only when starting the element. + +2015-05-27 15:55:56 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstmultiudpsink.h: + udpsink, multiudpsink: keep GCancellable fd around instead of re-creating it constantly + Otherwise we constantly create/close event file descriptors, + every time we call g_socket_condition_timed_wait() or + g_socket_send_message(s)(), i.e. a lot. Which is not + particularly good for performance. + Can't create GCancellable in ::start() here because it's used + in client_new() which may be called via the add-client action + signal which may be called before the element is up and running. + +2015-05-19 18:13:16 +0100 Tim-Philipp Müller + + * gst/udp/gstudpsrc.c: + * gst/udp/gstudpsrc.h: + udpsrc: keep GCancellable fd around instead of re-creating it constantly + Otherwise we constantly create/close event file descriptors, + every single time we call g_socket_condition_timed_wait() or + g_socket_receive_message(), i.e. twice per packet received! + This was not particularly good for performance. + Also only create GCancellable on start-up. + +2015-05-26 15:33:37 +0100 Luis de Bethencourt + + * gst/matroska/matroska-read-common.c: + matroska: overwritten value assignment + curpos is set and immediately after, set again. Remove the redundant + assignment. + https://bugzilla.gnome.org/show_bug.cgi?id=749909 + +2015-05-23 13:47:17 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtpvrawdepay.c: + rtpvrawdepay: don't shadow existing outbuf variable + And fix unref of the wrong one which will contain NULL + in an error code path. + +2015-05-23 13:23:22 +0100 Tim-Philipp Müller + + * gst/rtp/gstrtpvrawdepay.c: + * gst/rtp/gstrtpvrawdepay.h: + rtpvrawdepay: map/unmap output frame only once, not for every input packet + Map output buffer after creating it and keep it mapped + until we're done with it instead of mapping/unmapping + it for every single input buffer. + +2015-05-25 08:47:47 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: remove fixme from 2006 + It has been verified by use over time. + +2015-05-23 14:36:41 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: fix reverse playback of fragmented media + qtdemux creates a samples array and gets the timestamps for buffers by + accumulating their durations. When doing reverse playback of fragments, + accumulating samples will lead to wrong timestamps as the timestamps + should go decreasing from fragment to fragment and the accumulation + will produce wrong results. + In this case, when receiving a discont for fragmented reverse playback, + the previous samples information should be flushed before new data + is processed. + +2015-05-23 01:03:18 +0900 Jimmy Ohn + + * gst/multifile/gstsplitfilesrc.c: + splitfilesrc: Implement binary search in find_part_for_offset + Implement binary search using gst_util_array_binary_search + https://bugzilla.gnome.org/show_bug.cgi?id=749690 + +2015-05-21 13:26:53 +0300 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Don't crash if we receive FIR/PLI from a source we don't know + +2015-05-21 09:35:58 +0200 Santiago Carot-Nemesio + + * gst/rtpmanager/rtpsession.c: + rtpsession: Fix collection of statistics + Stats should be collected on the media rtp source not in the + sender one. + https://bugzilla.gnome.org/show_bug.cgi?id=749669 + +2015-04-20 10:07:30 +0200 Edward Hervey + + * gst/multifile/gstmultifilesink.c: + * gst/multifile/gstmultifilesink.h: + multifilesink: Add a new max-duration file switching mode + This new mode ensures that files will never exceed a certain duration + based on incoming buffer PTS (and duration if present) + Note: + * You need timestamped buffers (duh). If some of the incoming buffers don't + have PTS, then it will just accept them in the current file + +2015-04-17 16:18:32 +0200 Edward Hervey + + * gst/multifile/gstmultifilesink.c: + multifilesink: streamline the file-switch code a bit + Use the same functions regardless of the mode we are using + +2015-04-02 13:35:18 +0100 Edward Hervey + + * gst/multifile/gstmultifilesink.c: + * gst/multifile/gstmultifilesink.h: + multifilesink: add "aggregate-gops" property to process GOPs as a whole + This property can be used in combination with next-file=max-size + (and perhaps a future next-file=max-duration) to make sure that + each file part starts cleanly with a key frame and the appropriate headers. + In order for this property to work correctly, upstream elements should make + sure than any headers that need to be written in a standalone file are: + 1) in the streamheader caps field + 2) and/or in the stream as one or more buffers marked with GST_BUFFER_FLAG_HEADER + that are just before the keyframe buffer + This is useful for MPEG-TS/MPEG-PS file segmenting in + combination with mpegtsmux or mpegpsmux. + Original patch by: Tim-Philipp Müller + +2015-05-20 16:37:22 +0300 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.h: + rtspsrc: Use single-include header for the RTSP library + +2014-10-24 23:47:21 +0100 Tim-Philipp Müller + + * gst/udp/gstdynudpsink.c: + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstudpsrc.c: + udp: don't use soon-to-be-deprecated g_cancellable_reset() + From the API documentation: "Note that it is generally not + a good idea to reuse an existing cancellable for more + operations after it has been cancelled once, as this + function might tempt you to do. The recommended practice + is to drop the reference to a cancellable after cancelling + it, and let it die with the outstanding async operations. + You should create a fresh cancellable for further async + operations." + https://bugzilla.gnome.org/show_bug.cgi?id=739132 + +2015-05-18 20:13:01 +0200 Stefan Sauer + + * gst/audiofx/audiochebband.c: + * gst/audiofx/audiocheblimit.c: + * gst/cutter/gstcutter.c: + * gst/equalizer/gstiirequalizernbands.c: + * gst/multifile/gstmultifilesink.c: + Revert "doc: Workaround gtkdoc issue" + This reverts commit 1797c8f8b12d7f4c7a9444c94f34f4d08ec85945. + This is fixed by the gtk-doc 1.23 release. + cannot contain : + http://www.docbook.org/tdg/en/html/para.html + http://www.docbook.org/tdg/en/html/refsect2.html + +2015-05-18 16:40:21 +0200 Nicola Murino + + * gst/rtp/gstrtpg726pay.c: + rtpg726pay: fix caps leak + https://bugzilla.gnome.org/show_bug.cgi?id=749544 + +2015-05-18 16:34:13 +0200 Nicola Murino + + * gst/rtp/gstrtpg726depay.c: + rtpg726depay: don't leak input buffer + https://bugzilla.gnome.org/show_bug.cgi?id=749543 + +2015-05-18 17:38:31 +0300 Sebastian Dröge + + * gst/rtpmanager/rtpsource.c: + rtpsource: Queue bad packets instead of dropping them + So we can send them out once we found the next, consecutive sequence number in + case one is following. + +2015-05-18 17:38:14 +0300 Sebastian Dröge + + * gst/rtpmanager/rtpsource.c: + rtpsource: Use g_queue_foreach() to unref all buffers in queues + +2015-05-18 17:19:31 +0300 Sebastian Dröge + + * gst/rtpmanager/rtpsource.c: + rtpsource: Refactor seqnum comparison code a bit + +2015-05-18 17:08:53 +0300 Sebastian Dröge + + * gst/rtpmanager/rtpsource.c: + rtpsource: Allow sequence number wraparound during probation + +2015-05-18 17:07:23 +0300 Sebastian Dröge + + * gst/rtpmanager/rtpsource.c: + rtpsource: Make sequence number comparison code more readable + ... by using gst_rtp_buffer_compare_seqnum() and signed integers + instead of implictly using effects of integer over/underflows. + +2015-04-22 18:54:06 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: When detecting a huge seqnum gap, wait for 5 consecutive packets before resetting everything + It might just be a late retransmission or spurious packet from elsewhere, but + resetting everything would mean that we will cause a noticeable hickup. Let's + get some confidence first that the sequence numbers changed for whatever + reason. + https://bugzilla.gnome.org/show_bug.cgi?id=747922 + +2015-05-16 23:37:06 -0400 Nicolas Dufresne + + * gst/audiofx/audiochebband.c: + * gst/audiofx/audiocheblimit.c: + * gst/cutter/gstcutter.c: + * gst/equalizer/gstiirequalizernbands.c: + * gst/multifile/gstmultifilesink.c: + doc: Workaround gtkdoc issue + With gtkdoc 1.22, the XML generator fails when a itemizedlist is + followed by a refsect2. Workaround the issue by wrapping the + refsect2 into para. + +2015-01-23 13:57:40 +0100 Stefan Sauer + + * gst/isomp4/qtdemux_types.c: + qtdemux: avoid wrong warnings on unknown node types + Add 'name' and 'mean' fourccs, as we handle them. Right now each use would + trigger a warning. + +2015-05-08 19:13:00 +0200 Nicola Murino + + * gst/rtp/gstrtpg726depay.c: + * gst/rtp/gstrtpg726depay.h: + rtpg726depay: add block_align to output caps + It is needed to correctly negotiate caps with matroskamux + and most other muxers. + https://bugzilla.gnome.org/show_bug.cgi?id=749129 + +2015-05-12 13:41:58 +0300 Sebastian Dröge + + * gst/audiofx/audiofxbasefirfilter.c: + audiofxbasefirfilter: Fix time-domain convolution with >1 channels + input_samples is the number of frames, but we used it as the number of + samples. + https://bugzilla.gnome.org/show_bug.cgi?id=747204 + +2015-05-12 12:13:16 +0300 Sebastian Dröge + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + vp[89]enc: Properly convert between GStreamer and encoder timebase + ... by switching numerator and denominator when scaling. + https://bugzilla.gnome.org/show_bug.cgi?id=749122 + +2015-05-11 13:33:26 +0300 Sebastian Dröge + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + vp[89]enc: Don't set timebase from the framerate + The framerate very often is just an indication of the ideal framerate, not the + actual framerate of the stream. By just using the framerate, we confuse the + rate control algorithm algorithm as multiple frames will map to the same PTS + or have durations of 0. + https://bugzilla.gnome.org/show_bug.cgi?id=749122 + +2015-05-10 14:21:04 +0200 Mark Nauwelaerts + + * tests/check/elements/wavpackparse.c: + tests: wavpackparse: fix unit test + See also https://bugzilla.gnome.org/show_bug.cgi?id=738237 + +2015-05-10 11:05:00 +0100 Tim-Philipp Müller + + * ext/shout2/gstshout2.c: + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9dec.c: + * ext/vpx/gstvp9enc.c: + * gst/rtp/gstrtpL16depay.c: + * gst/rtp/gstrtpL16pay.c: + * gst/rtp/gstrtpL24depay.c: + * gst/rtp/gstrtpL24pay.c: + * gst/rtp/gstrtpac3pay.c: + * gst/rtp/gstrtpamrpay.c: + * gst/rtpmanager/gstrtpmux.c: + * tests/check/pipelines/wavenc.c: + * tests/examples/rtp/client-PCMA.c: + * tests/examples/rtp/server-alsasrc-PCMA.c: + docs: update example pipelines in element docs + Mostly gst-launch -> gst-launch-1.0 + Use autovideosink/autoaudiosink more often. + Sprinkle some converters here and there. + +2015-05-09 19:48:55 +0200 Piotr Drąg + + * po/POTFILES.in: + po: update POTFILES.in + https://bugzilla.gnome.org/show_bug.cgi?id=749163 + +2015-05-10 10:52:18 +0100 Tim-Philipp Müller + + * gst/multifile/gstsplitmuxsrc.c: + splitmuxsrc: minor error message clean-up + Don't put filename in error message shown to user. + +2015-05-07 16:25:36 +0200 Guillaume Desmottes + + * gst/audioparsers/gstflacparse.c: + flacparse: fix buffer leak when stored to seektable + Fix a leak with the + validate.file.playback.change_state_intensive.samples_multimedia_cx_flac_Yesterday_flac + scenario. + https://bugzilla.gnome.org/show_bug.cgi?id=749072 + +2015-05-07 17:10:37 +0900 Paul Hyunil + + * gst/isomp4/qtdemux.c: + qtdemux: fix example pipeline in docs + The gst-launch script for example launch line to test qtdemux is + missing a queue before the decodebins, otherwise the gst-launch-1.0 + command won't work. + https://bugzilla.gnome.org/show_bug.cgi?id=749054 + +2015-05-07 14:51:45 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + Revert "rtpsession: Also report internal sources in on-new-ssrc and on-ssrc-active" + This reverts commit d22ec496328e6ba8edbf2d071d5608b2af2831e8. + Application code might expect that it only gets external sources on those + signals, and get confused by this. If anything we would need to add new + signals. + +2015-03-25 15:27:34 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Also report internal sources in on-new-ssrc and on-ssrc-active + Without this it seems impossible for an application to easily get notified + about the internal ssrcs that are created, e.g. sender sources, and also + to know when they are active and produce RTCP packets. + https://bugzilla.gnome.org/show_bug.cgi?id=746747 + +2015-05-04 19:26:14 +0200 Guillaume Desmottes + + * ext/jpeg/gstjpegdec.c: + jpegdec: fix frame leaks in handle_frame() implementation + handle_frame() is supposed to consume @frame, so if we don't call + gst_video_decoder_drop_frame() or gst_video_decoder_finish_frame() we have to + release it manually. + https://bugzilla.gnome.org/show_bug.cgi?id=748909 + +2015-05-04 16:50:38 +0200 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Fix up last commit + +2015-05-04 16:46:02 +0200 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Only do RTX when using a feedback profile + +2015-05-04 13:50:31 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: The stats min_interval is in seconds, not nanoseconds + We have to scale it to compare it against our clock times. + +2015-05-04 11:38:27 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Only return TRUE if early feedback was requested already and it's early enough + +2015-04-30 15:42:34 +0100 Luis de Bethencourt + + * gst/matroska/matroska-parse.c: + matroska: remove unused property enum items + +2015-04-30 12:13:59 +0100 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + qtdemux: fix buffer leak on eos in push mode + Based on patch by Guillaume Desmottes. + scenario: validate.http.playback.seek_with_stop.raw_h264_1_mp4 + https://bugzilla.gnome.org/show_bug.cgi?id=748617 + +2015-04-29 19:41:29 +0200 Sebastian Dröge + + * gst/isomp4/qtdemux.c: + qtdemux: Check for sizes of the rdrf (redirect) atom before accessing the data and use g_strndup() instead of g_strdup() + Thanks to Ralph Giles for reporting this. + +2015-04-29 15:52:27 +0200 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Only enable retransmissions if there is retransmission info in the SDP + Otherwise we're going to send early RTCP and NACKs in non-feedback sessions + too, which will confuse servers. + https://bugzilla.gnome.org/show_bug.cgi?id=748627 + +2015-02-11 18:09:24 +0530 Ravi Kiran K N + + * ext/dv/gstdvdemux.c: + dvdemux: extract recording time + Extracts the recorded time of the dv file from + the metadata and puts it into the global tags. + https://bugzilla.gnome.org/show_bug.cgi?id=743657 + +2015-04-28 15:59:25 +0200 Guillaume Desmottes + + * gst/matroska/matroska-demux.c: + matroskademux: fix seek event leak + gst_matroska_demux_handle_seek_event() doesn't consume the + event so we have to unref it. + https://bugzilla.gnome.org/show_bug.cgi?id=748584 + +2015-04-28 15:42:49 +0200 Sebastian Dröge + + * gst/matroska/matroska-demux.c: + matroska-demux: Send pending tags when adding a new pad + We might've parsed those tags before already and tried to push them to + non-existing pads before. Now let's do it for real. + +2015-04-23 18:57:37 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpstats.c: + rtpstats: Average RTCP packet size is in bytes, bandwidths in bits + We need to convert the size to bits for our calculations. + https://bugzilla.gnome.org/show_bug.cgi?id=747863 + +2015-04-23 18:53:39 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpstats.c: + rtpstats: Use the same lower limit for RTCP bandwidth to stop sending RTCP everywhere + https://bugzilla.gnome.org/show_bug.cgi?id=747863 + +2015-04-14 18:41:07 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + rtpsession: Use bandwidth calculation by default instead of some arbitrary hardcoded value + https://bugzilla.gnome.org/show_bug.cgi?id=747863 + +2015-04-23 18:49:37 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Bandwidth is supposed to be in bits/s, not bytes/s + https://bugzilla.gnome.org/show_bug.cgi?id=747863 + +2015-04-27 16:36:27 +0200 Sebastian Dröge + + * tests/check/elements/rtpjitterbuffer.c: + rtpjitterbuffer: Fix RTX unit test + The calculations were a bit off everywhere, even before the changes done + recently to the delay for RTX of expected future packets. It only worked by + accident, but now the calculations are all correct again. Hopefully. + +2015-04-27 11:22:11 +0100 Luis de Bethencourt + + * gst/avi/gstavimux.c: + * gst/debugutils/breakmydata.c: + * gst/debugutils/cpureport.c: + * gst/debugutils/gstnavseek.c: + * gst/debugutils/progressreport.c: + * gst/debugutils/rndbuffersize.c: + * gst/dtmf/gstrtpdtmfdepay.c: + * gst/flv/gstindex.c: + * gst/goom/gstgoom.c: + * gst/goom2k1/gstgoom.c: + * gst/id3demux/gstid3demux.c: + * gst/isomp4/gstrtpxqtdepay.c: + * gst/law/mulaw-decode.c: + * gst/law/mulaw-encode.c: + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-mux.c: + * gst/matroska/matroska-parse.c: + * gst/multifile/gstmultifilesrc.c: + * gst/multipart/multipartmux.c: + * gst/rtp/gstrtpamrdepay.c: + * gst/rtp/gstrtpceltdepay.c: + * gst/rtp/gstrtpdvdepay.c: + * gst/rtp/gstrtpg723depay.c: + * gst/rtp/gstrtpg729depay.c: + * gst/rtp/gstrtpmp4vpay.c: + * gst/rtp/gstrtppcmadepay.c: + * gst/rtp/gstrtppcmudepay.c: + * gst/rtp/gstrtpqcelpdepay.c: + * gst/rtp/gstrtpspeexdepay.c: + * gst/rtpmanager/gstrtpmux.c: + * gst/videocrop/gstaspectratiocrop.c: + * gst/videocrop/gstvideocrop.c: + * gst/videofilter/gstvideotemplate.c: + * gst/y4m/gsty4mencode.c: + Rename property enums from ARG_ to PROP_ + Property enum items should be named PROP_ for consistency and readability. + +2015-04-25 02:49:58 +0300 Ilya Konstantinov + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Fix "stats" property docs + https://bugzilla.gnome.org/show_bug.cgi?id=748436 + +2015-04-26 17:54:52 +0100 Tim-Philipp Müller + + * Android.mk: + * gst/alpha/Makefile.am: + * gst/apetag/Makefile.am: + * gst/audiofx/Makefile.am: + * gst/auparse/Makefile.am: + * gst/autodetect/Makefile.am: + * gst/avi/Makefile.am: + * gst/cutter/Makefile.am: + * gst/debugutils/Makefile.am: + * gst/deinterlace/Makefile.am: + * gst/dtmf/Makefile.am: + * gst/effectv/Makefile.am: + * gst/equalizer/Makefile.am: + * gst/flv/Makefile.am: + * gst/flx/Makefile.am: + * gst/goom/Makefile.am: + * gst/goom2k1/Makefile.am: + * gst/icydemux/Makefile.am: + * gst/id3demux/Makefile.am: + * gst/imagefreeze/Makefile.am: + * gst/interleave/Makefile.am: + * gst/isomp4/Makefile.am: + * gst/law/Makefile.am: + * gst/level/Makefile.am: + * gst/matroska/Makefile.am: + * gst/monoscope/Makefile.am: + * gst/multifile/Makefile.am: + * gst/multipart/Makefile.am: + * gst/replaygain/Makefile.am: + * gst/rtp/Makefile.am: + * gst/rtpmanager/Makefile.am: + * gst/rtsp/Makefile.am: + * gst/shapewipe/Makefile.am: + * gst/smpte/Makefile.am: + * gst/spectrum/Makefile.am: + * gst/udp/Makefile.am: + * gst/videobox/Makefile.am: + * gst/videocrop/Makefile.am: + * gst/videofilter/Makefile.am: + * gst/videomixer/Makefile.am: + * gst/wavenc/Makefile.am: + * gst/wavparse/Makefile.am: + * gst/y4m/Makefile.am: + Remove obsolete Android build cruft + This is not needed any longer. + +2015-04-24 13:55:08 -0300 Thiago Santos + + * gst/videocrop/gstvideocrop.c: + videocrop: print the property values when set + Instead of printing the currently used values. The log is meant + to show what the properties changed to, not what is being currently + used. + +2015-04-24 17:01:10 +0100 Luis de Bethencourt + + * gst/alpha/gstalpha.c: + * gst/audiofx/audiokaraoke.c: + * gst/deinterlace/gstdeinterlace.c: + * gst/multifile/gstmultifilesink.c: + * gst/rtp/gstrtpg726depay.c: + * gst/rtp/gstrtpg726pay.c: + * gst/rtp/gstrtpgstpay.c: + * gst/rtp/gstrtph264pay.c: + * gst/rtp/gstrtpjpegpay.c: + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpjitterbuffer.c: + * gst/rtpmanager/gstrtprtxqueue.c: + * gst/rtpmanager/gstrtprtxreceive.c: + * gst/rtpmanager/gstrtprtxsend.c: + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsource.c: + * gst/rtsp/gstrtspsrc.c: + * gst/smpte/gstsmpte.c: + * gst/smpte/gstsmptealpha.c: + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstudpsrc.c: + remove unused enum items PROP_LAST + This were probably added to the enums due to cargo cult programming and are + unused. Removing them. + +2015-04-24 00:30:35 +0100 Tim-Philipp Müller + + * gst/level/gstlevel.c: + level: fix infinite loop for very low interval values + https://bugzilla.gnome.org/show_bug.cgi?id=745515 + +2015-04-23 16:08:54 +0100 Tim-Philipp Müller + + * tests/check/Makefile.am: + tests: define GST_CHECK_TEST_ENVIRONMENT_BEACON + Make sure the test environment is set up. + https://bugzilla.gnome.org//show_bug.cgi?id=747624 + +2015-04-23 16:08:32 +0100 Tim-Philipp Müller + + * configure.ac: + configure: bump automake requirement to 1.14 and autoconf to 2.69 + This is only required for builds from git, people can still + build tarballs if they only have older autotools. + https://bugzilla.gnome.org//show_bug.cgi?id=747624 + +2015-04-23 16:06:57 +0100 Tim-Philipp Müller + + * .gitignore: + Update .gitignore + +2015-04-23 09:55:59 +0200 Jesper Larsen + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Fix RTCP caps leak + https://bugzilla.gnome.org//show_bug.cgi?id=748353 + +2015-04-22 20:24:20 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: When request retransmissions for future packets, consider the packet spacing in the extra delay + We now take the maximum of 2*jitter and 0.5*packet_spacing for the extra + delay. If jitter is very low, this should prevent unnecessary retransmission + requests to some degree. + https://bugzilla.gnome.org/show_bug.cgi?id=748041 + +2015-04-22 19:41:07 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Take a running average of the packet spacings instead of just the latest + https://bugzilla.gnome.org/show_bug.cgi?id=748041 + +2015-04-13 11:20:40 +0200 Miguel París Díaz + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Add "rtx-next-seqnum" property + If this is set to FALSE, rtpjitterbuffer will not request retransmissions for + future packets based on when they are estimated to arrive. + See also https://bugzilla.gnome.org/show_bug.cgi?id=748041 + https://bugzilla.gnome.org/show_bug.cgi?id=739868 + +2015-04-22 19:29:34 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtprtxreceive.c: + rtxreceive: Put debug output for retransmission requests at the right place + Before it was only ever printed once for every time a ssrc was associated with + a specific stream. + +2015-04-22 18:05:24 +0200 Wim Taymans + + * sys/v4l2/gstv4l2object.c: + v4l2: don't add the same interlace mode twice + Some drivers modify the interlace mode to progressive, no matter what + input you give them, make sure that we don't add the same interlace mode + twice. + +2015-04-21 16:34:21 +0100 Luis de Bethencourt + + * gst/equalizer/gstiirequalizer.c: + equalizer: fix dynamic changes on bands + When we are in passthrough, the transform function doesn't run and if the + passthrough check is in this function it will never be deactivated. Fix this by + checking directly whenever a gain is changed. + Also set the passthrough to TRUE at init because the gains default to 0, so we + can passthrough until any gain property is changed. + https://bugzilla.gnome.org/show_bug.cgi?id=748068 + +2015-04-22 10:30:52 +0200 Sebastian Dröge + + * INSTALL: + Remove INSTALL file + autotools automatically generate this, and when using different versions + for autogen.sh there will always be changes to a file tracked by git. + +2015-04-22 10:30:14 +0200 Sebastian Dröge + + * LICENSE_readme: + Remove LICENSE_readme + It's completely outdated and just confusing, better if people are + forced to look at the actual code in question than trusting this file. + +2015-04-21 15:21:33 +0100 Luis de Bethencourt + + * sys/v4l2/v4l2_calls.c: + v4l2: cast unused return to void + Quell unchecked return value defect by casting the return value to void and + making it explicit it is going to be ignored. + CID #206031 + +2015-04-17 13:08:02 -0300 Thiago Santos + + * ext/vpx/gstvp8dec.c: + vp8dec: optimize vpx image to gstbuffer copy when strides match + Solving this FIXME. Copy the full plane when strides are the same + +2015-04-16 15:11:05 -0300 Thiago Santos + + * ext/vpx/gstvp9dec.c: + vp9dec: optimize vpx image to gstbuffer copy when strides match + Solving this FIXME. Copy the full plane when strides are the same + +2015-04-17 13:32:54 +0100 Vincent Penquerc'h + + * gst/audioparsers/gstac3parse.c: + ac3parse: fix memory leak + +2015-04-17 06:51:46 +0000 Alex O'Konski + + * gst/icydemux/gsticydemux.c: + icydemux: Fix segfault if metadata-interval is 0 + Prevents an extra unref of GstBuffer when passing a non-icy stream through + icydemux with metadata-interval set to 0. + Reproducible with: + gst-launch-1.0 filesrc location=~/testsong.mp3 ! \ + 'application/x-icy,metadata-interval=(int)0' ! icydemux ! decodebin ! wavenc ! \ + filesink location=~/testsong.wav + https://bugzilla.gnome.org/show_bug.cgi?id=748024 + +2015-04-17 11:54:23 +0530 Ravi Kiran K N + + * gst/audiofx/audioamplify.c: + * gst/audiofx/audiodynamic.c: + audiofx: fix typo in example pipelines + Fix typo in example pipelines + https://bugzilla.gnome.org/show_bug.cgi?id=748022 + +2015-04-15 18:22:37 +0300 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudiohal.c: + osxaudio: fix spelling in debug message + https://bugzilla.gnome.org//show_bug.cgi?id=747936 + +2015-04-16 16:33:44 +0100 Luis de Bethencourt + + * tests/examples/equalizer/demo.c: + tests: selectable amount of bands in equalizer demo + Adding an option in the equalizer demo to make the number of bands selectable. + +2015-04-16 15:31:25 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtprtxsend.c: + * gst/rtpmanager/rtpsource.c: + rtpsource/rtprtxsend: Also pass correct seqnum-offset and payload to the RTX rtpsource + https://bugzilla.gnome.org/show_bug.cgi?id=747394 + +2015-04-06 12:56:50 +0530 Arun Raghavan + + * gst/rtpmanager/gstrtprtxsend.c: + * gst/rtpmanager/rtpsession.c: + rtpsession: Track RTX ssrc caps + This is needed so that we can generate SR for RTX stream correctly (the + clock rate is required). + https://bugzilla.gnome.org/show_bug.cgi?id=747394 + +2015-04-14 13:56:38 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtprtxsend.c: + rtprtxsend: Copy over timestamps from the orignal buffers to the RTX buffers + https://bugzilla.gnome.org/show_bug.cgi?id=747394 + +2015-04-16 16:01:50 +0100 Luis de Bethencourt + + * tests/examples/equalizer/demo.c: + tests: switch equalizer demo to play from uri + Switch the equalizer-nbands demo to use uridecodebin, so users can listen to + something more pleasant than white noise. If anybody misses the white noise + a uri handler to audiotestsrc can be used. + +2015-04-16 11:17:38 +0100 Luis de Bethencourt + + * tests/examples/equalizer/demo.c: + tests: improve readability of equalizer demo + Rename variable name to make it more readable, add comments for the three + scales created per block, and set the window title. + +2015-04-15 17:32:37 +0100 Luis de Bethencourt + + * tests/examples/equalizer/demo.c: + tests: add missing license header for equalizer demo + +2015-04-16 13:09:19 +0100 Vincent Penquerc'h + + * gst/isomp4/qtdemux.c: + qtdemux: fix tag list leaks on error paths + +2015-04-16 12:23:38 +0100 Vincent Penquerc'h + + * gst/isomp4/qtdemux.c: + qtdemux: fix tag list leak on unknown stream type + +2015-04-09 13:19:49 +0100 Vincent Penquerc'h + + * tests/check/gst-plugins-good.supp: + suppressions: ignore an apparent bug in strtod + A buffer overread. + https://bugzilla.gnome.org/show_bug.cgi?id=747554 + +2015-04-15 11:07:27 +0200 George Kiagiadakis + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: do not access property variable without the object lock, use the local stack copy instead + +2015-04-14 18:45:44 +0200 George Kiagiadakis + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: add probe on the multiqueue's sink pad instead of the ghost pad + because _release_pad tries to release it from ctx->sinkpad, which is + multiqueue's sink pad, and currently fails because the probe is not + installed there + +2015-04-14 19:08:24 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtprtxreceive.c: + * gst/rtpmanager/gstrtprtxsend.c: + rtprtx*: Fix typos + +2015-04-14 17:24:46 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Not sending early RTCP now because of dithering means we send it with the next compound packet + +2015-04-14 16:27:18 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Improve debug output a bit if we can't allow early feedback + +2015-04-07 18:00:53 -0400 Olivier Crête + + * gst/rtp/gstrtpvp8depay.c: + rtpvp8depay: When dropping intra packet, request keyframe + https://bugzilla.gnome.org/show_bug.cgi?id=747208 + +2015-04-13 20:25:00 +0200 Sebastian Dröge + + * gst/rtpmanager/rtpjitterbuffer.c: + rtpjitterbuffer: Change resyncing GST_WARNING to GST_INFO + This also happens in the very beginning when we receive the first packet, a + warning would be very confusing here. In all places where we should warn about + this, we would've printed a warning already before. + +2015-04-02 13:26:41 +0100 Tim-Philipp Müller + + * gst/multifile/gstmultifilesink.c: + multifilesink: minor docs improvement + +2014-11-06 12:08:03 +0100 Miguel París Díaz + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Add "rtx-max-retries" property + This property allows to limit the maximum number of retransmission + for a specific packet. + https://bugzilla.gnome.org/show_bug.cgi?id=739868 + +2014-11-04 15:00:52 +0100 Miguel París Díaz + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Fix expected_dts calc in calculate_expected + Right above we consider lost_packet packets, each of them having duration, + as lost and triggered their timers immediately. Below we use expected_dts + to schedule retransmission or schedule lost timers for the packets that + come after expected_dts. + As we just triggered lost_packets packets as lost, there's no point in + scheduling new timers for them and we can just skip over all lost packets. + https://bugzilla.gnome.org/show_bug.cgi?id=739868 + +2015-03-20 18:21:57 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Make the next output buffer discont after resetting the jitterbuffer + Resetting the jitterbuffer drops all packets and other things, and will cause + a discontinuity in the packets received by the depayloaders. They should now + also flush anything they had pending as the new data will start at a different + position. + https://bugzilla.gnome.org/show_bug.cgi?id=739868 + +2015-04-10 09:17:26 +0900 Hyunjun Ko + + * gst/isomp4/qtdemux.c: + qtdemux: Update segment.start after key-unit seek + When doing key uint seek, qtdemux calls gst_qtdemux_adjust_seek + to get proper offset. And then this offset is set to + segment.position and segment.time in gst_qtdemux_perform_seek but + segment.start is not updated. + After that, application sends segment query, + qtdemux sets start and stop to query using gst_segment_to_stream_time. Due + to the wrong value in segment.start, the stop position is smaller than + it should. + https://bugzilla.gnome.org/show_bug.cgi?id=746822 + +2015-04-07 16:12:40 -0300 Thiago Santos + + * gst/isomp4/gstqtmux.c: + qtmux: remove useless variable do_pts + We always write the CTTS in qtmux. Ideally we only want to do that + for streams that need DTS, it should be present on the track information + rather than be decided based on each buffer + +2015-04-07 00:53:35 -0300 Thiago Santos + + * gst/isomp4/gstqtmux.c: + qtmux: remove subtraction that makes PTS/DTS start from 0 + As qt uses durations, it doesn't matter, only the difference + between consecutive buffers is important. Also, collectpads + already replaces PTS/DTS with the running times for them. + +2015-04-06 22:36:43 -0300 Thiago Santos + + * tests/check/elements/qtmux.c: + tests: qtmux: add tests to verify it handles non-0 segments + Both input streams in this test have a segment.start = 10s, so + output should start from 0 anyway. + Another test has both starting at non-0 segments, but the running + time of both streams should still start from 0 + +2015-04-06 20:03:19 -0300 Thiago Santos + + * tests/check/elements/qtmux.c: + tests: qtmux: simple muxing test + Adds a new simple test that verifies that data is properly muxed + and preserved. PTS, DTS, duration and caps are verified. + +2015-04-10 10:59:26 +0530 Ravi Kiran K N + + * gst/smpte/gstsmpte.h: + smpte: remove unused fields + Remove the fields - format and fps from smpte + as they are unused. + https://bugzilla.gnome.org/show_bug.cgi?id=747597 + +2015-04-10 10:29:47 +0530 Ravi Kiran K N + + * tests/check/Makefile.am: + * tests/check/elements/.gitignore: + * tests/check/elements/alpha.c: + tests: add test suite for alpha + Added test suite for alpha element with test cases + 1. alpha + 2. chroma keying + https://bugzilla.gnome.org/show_bug.cgi?id=747595 + +2015-04-09 12:58:46 +0100 Vincent Penquerc'h + + * tests/check/gst-plugins-good.supp: + suppressions: add a well known zlib inflate bug + +2015-04-09 12:58:26 +0100 Vincent Penquerc'h + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: fix mutex leak + +2015-04-09 12:58:04 +1000 Jan Schmidt + + * tests/check/elements/rtprtx.c: + tests: Fix rtprtx test by handling buffer lists + Commit #1018aa made rtprtxsend handle buffer lists, breaking + the test which probes for buffers, but not buffer lists. + Use a utility function to run the probe callback on each buffer + in the list in turn and remove any buffers that are dropped. + +2015-04-01 11:15:38 +1100 Jan Schmidt + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmux.h: + isomp4: Refactor various state variables into a mux_mode var + Instead of checking various state variables around the muxer, + track the current muxing mode in a single 'mux_mode' enum. + Add some implementation notes about the different mux modes + +2015-04-08 16:40:02 +0200 Edward Hervey + + * common: + * tests/check/Makefile.am: + tests: Use AM_TESTS_ENVIRONMENT + Needed by the new automake test runner + +2015-04-08 11:17:31 +0200 Edward Hervey + + * gst/rtp/gstrtph263depay.c: + rtph263depay: Fix framesize parsing + The string passed to the parsing function only contains a framesize, and + not + + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726416 + +2015-03-20 12:18:37 +0000 Vincent Penquerc'h + + * gst/wavparse/gstwavparse.c: + wavparse: clip chunk size above the valid maximum (0x7fffffff) + https://bugzilla.gnome.org/show_bug.cgi?id=722567 + +2015-03-20 09:07:35 +0000 Vincent Penquerc'h + + * gst/wavparse/gstwavparse.c: + wavparse: clip chunk length to available data (when known) + This prevents silly chunk lengths from possibly overflowing + (at least when we know the actual data length). + https://bugzilla.gnome.org/show_bug.cgi?id=722567 + +2015-04-06 20:17:52 -0700 Sebastian Dröge + + * gst/isomp4/qtdemux.c: + qtdemux: Don't accumulate segment bases manually + gst_segment_do_seek() does that for us already, and doing it twice + will break non-flushing seeks in interesting ways. Leftover from 1.0 + porting. + Also copy over segment offset and applied_rate, just in case. + +2015-04-06 19:08:10 -0700 Sebastian Dröge + + * tests/icles/test-segment-seeks.c: + icles: Fix waiting for segment-done if it happens too fast + Sometimes we can get segment-done before we got async-done. If we waited + for async-done only, the segment-done would be dropped and we would wait + forever for it a few lines below. + +2015-04-06 18:55:08 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: stbl_index is valid from 0 onwards + It indicates the last sample parsed, not the next one to parse. + As it starts in -1, any value from 0 onwards means that it has + some valid data. + +2015-04-05 20:06:09 +0100 Tim-Philipp Müller + + * docs/plugins/gst-plugins-good-plugins-sections.txt: + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + docs: make GstRTCPSync enum show up in rtpbin docs + https://bugzilla.gnome.org/show_bug.cgi?id=747358 + +2015-04-05 11:45:45 +0100 Tim-Philipp Müller + + * docs/plugins/gst-plugins-good-plugins-sections.txt: + docs: add RTPJitterBufferMode enum to rtpbin docs + https://bugzilla.gnome.org/show_bug.cgi?id=747358 + +2015-04-04 11:55:00 -0300 Thiago Santos + + * gst/multifile/gstmultifilesink.c: + multifilesink: close files before posting message + Makes sure the files were properly flushed and closed before + the message reaches the application + +2015-03-30 13:54:23 -0300 Thiago Santos + + * tests/check/elements/multifile.c: + tests: multifile: increment tests to check for multifile messages + Also verify that the multifilesink file messages are being correctly + posted to the bus + +2015-03-30 12:51:35 -0300 Thiago Santos + + * tests/check/elements/multifile.c: + tests: multifile: handle FIXME for proper checking when test finished + Use a GstBus and wait for EOS to finish the tests instead of + relying on sleeping + +2015-03-30 11:14:09 -0300 Thiago Santos + + * gst/multifile/gstmultifilesink.c: + multifilesink: post file message on EOS + When multifilesink is operating in any mode other than one file + per buffer, the last file created won't have a file message posted + as multifilesink doesn't handle the EOS event. + This patch fixes it by using the last position to post a file + message when EOS is received. This should ensure at least the + time related data and the filename are posted to the application + or other elements + https://bugzilla.gnome.org/show_bug.cgi?id=747000 + +2015-04-03 18:57:50 +0100 Tim-Philipp Müller + + * autogen.sh: + * common: + Automatic update of common submodule + From bc76a8b to c8fb372 + +2015-04-03 02:08:50 +1100 Jan Schmidt + + * gst/isomp4/qtdemux.c: + qtdemux: Guard against 64-bit overflow + For large-file atoms, guard against overflow in the size field, + which could make us jump backward in the file and cause + infinite loops. + +2015-04-01 23:46:13 +1100 Jan Schmidt + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmux.h: + * tests/check/elements/qtmux.c: + isomp4: Make non-seekable downstream an error in normal mode + When not in fast-start or fragmented mode, we need to be able + to rewrite the size of the mdat atom, or else the output just + won't be playable - the mdat placeholder with size == 0 will + cover the rest of the file, including any moov atom we write out. + https://bugzilla.gnome.org/show_bug.cgi?id=708808 + +2014-03-15 15:23:01 +0100 Sebastian Rasmussen + + * gst/rtp/gstrtph263depay.c: + * gst/rtp/gstrtph263pay.c: + * tests/check/elements/rtp-payloading.c: + rtph263pay/-depay: add framesize SDP attribute + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726416 + +2014-03-15 13:33:56 +0100 Sebastian Rasmussen + + * gst/rtp/gstrtpjpegdepay.c: + * gst/rtp/gstrtpjpegpay.c: + rtpjpegpay/-depay: Remove incorrectly introduced framesize SDP attribute + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726415 + +2015-03-27 21:09:44 +0100 Peter Seiderer + + * sys/v4l2/gstv4l2src.c: + * sys/v4l2/gstv4l2src.h: + v4l2src: device sequence/offset correction in case of renegotiation + The v4l2 device restarts the sequence counter in case of streamoff/streamon, + the GST offset values are supposed to increment strictly monotonic, so + adjust the sequence counter/offset values in case of caps + renegotiation. + https://bugzilla.gnome.org/show_bug.cgi?id=745441 + +2014-11-14 14:18:51 +0100 Peter Seiderer + + * sys/v4l2/gstv4l2src.c: + v4l2src: add frame loss detection + In case of v4l2 driver filled offset/sequence values add frame + loss detection (and write a warning message). + Move offset meta data setting and frame loss checking after the + timestamp adjustment code to get proper timestamps for the + warning message. + https://bugzilla.gnome.org/show_bug.cgi?id=745441 + +2014-11-14 13:48:51 +0100 Peter Seiderer + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2src.c: + v4l2: use v4l2 capture device sequence counter + Use the v4l2 capture device sequence counter for + setting the GstBuffer offset/offset_end values. + https://bugzilla.gnome.org/show_bug.cgi?id=745441 + +2015-03-30 13:12:35 +0200 Tobias Modschiedler + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + v4l2: Ask the driver about its requirements for min_buffers before initiating buffer pool. + If propose_allocation() had not been called yet, it was possible that the driver was not asked at all. + In buffer pool: Consider minimum number of buffers requested by driver when setting config. + https://bugzilla.gnome.org/show_bug.cgi?id=746834 + +2015-04-01 19:30:27 -0400 Olivier Crête + + * gst/rtp/gstrtpvp8depay.c: + * gst/rtp/gstrtpvp8depay.h: + rtpvp8depay: Parse width/height/profile from keyframes + This makes it possible to mux the result into a container + such as matroska. + https://bugzilla.gnome.org/show_bug.cgi?id=747208 + +2015-04-01 19:01:49 -0400 Olivier Crête + + * ext/vpx/gstvp8enc.c: + vp8enc: Expose VP8 width/height limitations in the caps template + The VP8 format specification (RFC 6386 section 18.1) specifies + that the maximum size is 16383x16383. + +2015-03-31 00:20:13 +1100 Jan Schmidt + + * gst/flv/gstflvdemux.c: + flv: When passing seek event upstream, hold a ref. + In case upstream can't handle the seek, make sure we + keep a ref on the event to attempt to handle it ourselves. + +2015-03-26 13:34:53 +0100 Guillaume Desmottes + + * gst/matroska/matroska-read-common.c: + matroska: fix GValue leaks when parsing tags + gst_tag_list_add_value() doesn't consume the GValue we pass to it so there is + no point copying it. + https://bugzilla.gnome.org/show_bug.cgi?id=746810 + +2015-03-23 20:58:25 +0100 Mark Nauwelaerts + + * gst/isomp4/qtdemux.c: + qtdemux: resurrect some flow return handling + https://bugzilla.gnome.org/show_bug.cgi?id=744572 + +2015-03-23 20:57:56 +0100 Mark Nauwelaerts + + * gst/flv/gstflvdemux.c: + flvdemux: resurrect some flow return handling + https://bugzilla.gnome.org/show_bug.cgi?id=744572 + +2015-03-23 20:56:41 +0100 Mark Nauwelaerts + + * gst/matroska/matroska-demux.c: + matroskademux: resurrect some flow return handling + https://bugzilla.gnome.org/show_bug.cgi?id=744572 + +2015-03-27 18:58:31 -0300 Thiago Santos + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-ids.c: + * gst/matroska/matroska-ids.h: + * gst/matroska/matroska-read-common.c: + matroska: store stream tags and push as updated + New tags can be found on different parts of the file, so this patch + keeps the stream taglists around for the life cycle of the pad + and adds those new tags as found. Then a new tag is found, the + pad's is marked with a tags changed flag, making the element push + a new tag event on the next check. Before this, we were sending + only the newly found tags, as the element was losing its taglist + when pushing the event. + +2015-03-15 14:40:36 +0100 Ramiro Polla + + * gst/matroska/matroska-demux.c: + matroskademux: send global tags incrementally + Instead of sending only new tags once they are found, merge the taglist + and send them incrementally. + +2015-03-14 17:07:05 +0100 Ramiro Polla + + * gst/matroska/matroska-parse.c: + * gst/matroska/matroska-read-common.c: + * gst/matroska/matroska-read-common.h: + matroskaparse: send global tags + Global tags are already being read in matroskaparse, but they are not + currently being sent. + This patch makes global tags get sent incrementally whenever new ones + are found. + https://bugzilla.gnome.org/show_bug.cgi?id=746242 + +2015-02-03 10:18:58 +0530 Vineeth T M + + * gst/effectv/gstquark.c: + quarktv: fix "planes" property range, a value of 0 is not allowed + When planes property is set to 0, the pipeline executes in + an infinite loop and never exits. Since planes must never + be 0, set the minimum value in the property description + to 1. + https://bugzilla.gnome.org/show_bug.cgi?id=743906 + +2015-03-26 13:42:02 -0700 David Schleef + + * gst/wavparse/gstwavparse.c: + wavparse: Fix up comments regarding DTS + +2015-03-25 15:11:34 -0400 Nicolas Dufresne + + * gst/rtsp/gstrtspsrc.c: + * gst/rtsp/gstrtspsrc.h: + rtspsrc: Fix segment in TCP mode + It is expected that buffers are time-stamped with running time. Set + a segment accordingly. In this case we pick 0,-1 as this is what udpsrc + would do. Depayloaders will update the segment to reflect the playback + position. + https://bugzilla.gnome.org/show_bug.cgi?id=635701 + +2015-03-26 12:21:25 -0700 David Schleef + + * gst/wavparse/gstwavparse.c: + wavparse: be more strict about typefinding DTS + Code now matches comments. + +2015-03-25 15:10:53 -0400 Nicolas Dufresne + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Remove useless function + This function didn't do anything special, let's not use a function for + that. + +2015-03-20 13:03:09 -0400 Nicolas Dufresne + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitter: Account for rtx_retry in overflow check + As rtx_retry is part of the substraction, we need to take it into + account, otherwise we may endup with a big value. + +2015-03-24 23:15:15 +0000 Julien Isorce + + * sys/osxvideo/cocoawindow.m: + osxvideosink: check for deprecated constants prior to OSX 10.10 + cocoawindow.m:339:5: error: 'NSOpenGLPFAWindow' + is deprecated: first deprecated in OS X 10.9 + cocoawindow.m:576:7: error: 'NSOpenGLPFAFullScreen' + is deprecated: first deprecated in OS X 10.6 + cocoawindow.m:605:24: error: 'setFullScreen' + is deprecated: first deprecated in OS X 10.7 + +2015-03-24 16:51:12 -0400 Nicolas Dufresne + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Fix seeking query + The segment start/stop in the query is meant to represent the seekable + portion of the stream. It does not match the segment start/stop. Instead + export 0 to duration. + +2015-03-24 16:18:53 +0100 Sebastian Dröge + + * gst/flv/gstflvdemux.c: + flvdemux: Only set caps once if they don't change + Previously we were setting new caps with the same content for every H264 or + AAC codec_data we found in the stream, spamming everything and causing + renegotiations. + +2015-03-24 12:46:19 +0100 Sebastian Dröge + + * gst/flv/gstflvdemux.c: + flvdemux: Don't create AAC/H264 caps without codec_data + Instead delay creating the caps until we read the codec_data from the stream, + or fail if we get normal data before the codec_data. + AAC raw caps and H264 avc caps always need codec_data, setting caps on the pad + without them is going to make negotiation fail most of the time. Even if we + later set new caps with the codec_data, that's usually going to be too late. + https://bugzilla.gnome.org/show_bug.cgi?id=746682 + +2015-03-24 15:39:22 +0100 Sebastian Dröge + + * gst/flv/gstflvdemux.c: + flvdemux: Fix indention + +2015-03-22 13:23:44 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudio.h: + osxaudio: Fix string format warning on 32-bit + UInt32 (Darwin, not C99's uint32_t) is 'unsigned long' on 32-bit + platforms. + +2015-03-21 17:50:40 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtpsession.c: + rtpsession: Fix another instance of sticky event misordering warnings + Make sure that the sync_src pad has caps before the segment event. + Otherwise we might get a segment event before caps from the receive + RTCP pad, and then later when receiving RTCP packets will set caps. + This will results in a sticky event misordering warning + This fixes warnings in the rtpaux unit test but also in the + rtpaux and rtx examples in tests/examples/rtp + https://bugzilla.gnome.org/show_bug.cgi?id=746445 + +2015-03-21 17:18:47 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtpsession.c: + rtpsession: Also start the RTCP send thread when receiving RTP or RTCP + Before we only started it when either: + - there is no send RTP stream + or + - we received an RTP packet for sending + This could mean that if the send RTP pads are connected but never receive any + RTP data, and the same session is also used for receiving RTP/RTCP, we would + never start the RTCP thread and would never send RTCP for the receiving part + of the session. + This can be reproduced with a pipeline like: + gst-launch-1.0 rtpbin name=rtpbin \ + udpsrc port=5000 ! "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264" ! rtpbin.recv_rtp_sink_0 \ + udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ + rtpbin.send_rtcp_src_0 ! fakesink name=rtcp_fakesink silent=false async=false sync=false \ + rtpbin.recv_rtp_src_0_2553225531_96 ! decodebin ! xvimagesink \ + fakesrc ! valve drop=true ! rtpbin.send_rtp_sink_0 \ + rtpbin.send_rtp_src_0 ! fakesink name=rtp_fakesink silent=false async=false sync=false -v + Before this change the rtcp_fakesink would never send RTCP for the receiving + part of the session (i.e. no receiver reports!), after the change it does. + And before and after this change it would send RTCP for the receiving part of + the session if the sender part was omitted (the last two lines). + +2015-03-19 11:54:12 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtprtxsend.c: + rtprtxsend: Add support for buffer lists + +2015-03-19 11:39:38 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtprtxqueue.c: + rtprtxqueue: Implement support for buffer lists + +2015-03-18 17:32:36 -0400 Nicolas Dufresne + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Improve trace readability + Change the command number into strings. + +2015-01-20 10:18:56 +0100 Jan Alexander Steffens (heftig) + + * gst/flv/gstflvdemux.c: + * gst/flv/gstflvdemux.h: + flvdemux: Don't repeatedly warn after no_more_pads (v2) + This can get rather spammy for such a high log level. + Only warn once per stream. + https://bugzilla.gnome.org/show_bug.cgi?id=746274 + +2015-03-16 11:23:52 +0100 Jan Alexander Steffens (heftig) + + * gst/flv/gstflvdemux.c: + flvdemux: Introduce constant for no-more-pads threshold + https://bugzilla.gnome.org/show_bug.cgi?id=746274 + +2015-01-20 10:18:29 +0100 Jan Alexander Steffens (heftig) + + * gst/flv/gstflvdemux.c: + flvdemux: Fix warning to contain 'video' + https://bugzilla.gnome.org/show_bug.cgi?id=746274 + +2015-03-11 21:25:40 +0100 Nicola Murino + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-ids.h: + matroskademux: for dts only stream set pts=dts for intra only formats + https://bugzilla.gnome.org/show_bug.cgi?id=745192 + +2015-03-14 16:39:09 +0100 Ramiro Polla + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-read-common.c: + matroskademux: fix sending of tags + * Fix critical when new tags are found after segment event has already + been sent. + * Send global tags before stream tags. + * Split sending of tags out of gst_matroska_demux_send_event() into its + own function. + https://bugzilla.gnome.org/show_bug.cgi?id=745973 + +2015-03-13 18:26:06 +0000 Ramiro Polla + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: properly escape percent sign in documentation + +2015-03-13 18:26:44 +0000 Ramiro Polla + + * gst/rtpmanager/gstrtpdtmfmux.c: + rtpdtmfmux: properly escape percent sign in documentation + +2015-03-13 18:48:03 +0000 Thiago Santos + + * sys/v4l2/gstv4l2src.c: + * sys/v4l2/gstv4l2src.h: + v4l2src: delay renegotiation until it is likely buffers were reclaimed + Allow renegotiation to happen when buffers have returned after an allocation + query. As the allocation query is serialized, all buffers from the pool + should have returned and we can stop it to create a new one for the + new format + https://bugzilla.gnome.org/show_bug.cgi?id=682770 + +2015-03-13 18:47:55 +0000 Thiago Santos + + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + v4l2object: add gst_v4l2_object_try_format + Similar to set_format but it uses TRY_FMT instead of S_FMT + https://bugzilla.gnome.org/show_bug.cgi?id=682770 + +2015-03-13 18:38:42 +0000 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + multiudpsink: fix crash with GST_DEBUG enabled + g_inet_socket_address_get_address() does not give + us a ref to the address, so don't unref it. + +2015-03-12 13:49:56 +0000 Sebastian Dröge + + * gst/level/gstlevel.c: + level: Don't read over the end of the input memory + Previously we advanced the in_data pointer by bps for every channel, and then + later again for block_size*bps. This caused us to be one sample further than + expected if an input buffer covered two analysis frames. And in the end lead + to completely bogus values reported by level. + https://bugzilla.gnome.org/show_bug.cgi?id=746065 + +2015-03-12 01:37:08 +1100 Jan Schmidt + + * sys/oss/gstossdmabuffer.c: + Remove a couple of superfluous trailing semi-colons + +2015-03-10 09:31:20 +0000 Tim-Philipp Müller + + * gst/alpha/gstalpha.c: + * gst/avi/gstavidemux.c: + * gst/debugutils/gstpushfilesrc.c: + * gst/isomp4/gstisoff.c: + * gst/rtpmanager/rtpsession.c: + * gst/udp/gstmultiudpsink.c: + * sys/osxaudio/gstosxaudioringbuffer.c: + * sys/osxaudio/gstosxcoreaudiocommon.c: + Fix double semicolons + +2015-03-10 15:46:40 +1100 Jan Schmidt + + * gst/multifile/gstsplitmuxsrc.c: + splitmux: Shut down element before downward state change + Make sure the state change won't hang trying to shut down pads + by making sure the streaming has stopped before chaining up. + +2015-03-09 22:58:05 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudio.h: + osxaudio: stream format is an SPDIF-only field + +2015-03-09 22:53:41 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxaudiosrc.h: + osxaudio: fix spaces + +2015-03-09 22:52:46 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxaudiosrc.h: + osxaudio: add type check macro + +2015-03-09 22:51:51 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxcoreaudiocommon.c: + * sys/osxaudio/gstosxcoreaudiocommon.h: + * sys/osxaudio/gstosxcoreaudiohal.c: + osxaudio: rename gst_core_audio_set_channels_layout() + to gst_core_audio_get_channel_layout(). + +2015-03-09 22:30:28 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxaudioringbuffer.c: + osxaudio: remove unused finalize + +2015-03-09 16:25:43 +0000 Luis de Bethencourt + + * ext/vpx/gstvp9enc.c: + vp9enc: remove duplicate declaration of function + +2015-03-09 16:22:29 +0000 Luis de Bethencourt + + * gst/rtp/gstrtph264depay.c: + rtph264depay: remove unused value + CID #1226474 + +2015-03-09 16:14:34 +0000 Luis de Bethencourt + + * gst/rtp/gstrtph263pay.c: + rtph263pay: fix leak + CID 1212156 + +2015-03-09 15:58:33 +0000 Luis de Bethencourt + + * gst/rtp/gstrtph263pay.c: + rtph263pay: remove uneeded variable + We just need to save the ebit information in case there is an error decoding. + +2015-03-09 16:46:02 +0100 Sebastian Dröge + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + vp[89]enc: Reset the encoder when flushing + https://bugzilla.gnome.org/show_bug.cgi?id=745704 + +2015-03-09 12:51:17 +0000 Luis de Bethencourt + + * gst/matroska/matroska-parse.c: + matroska: error mode if can't push buffer + If gst_pad_push() fails, inform and return flow error. + +2015-03-09 12:13:34 +0000 Luis de Bethencourt + + * gst/matroska/matroska-parse.c: + matroska: unused value + Value set in ret will be overwritten just before exiting the function. + CID #1226469 + +2015-03-09 11:10:35 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Drop packets with sequence numbers before the seqnum-base + These are outside the expected range of sequence numbers and should be + clipped, especially for RTSP they might belong to packets from before a seek + or a previous stream in general. + +2014-02-27 10:52:16 +0100 Linus Svensson + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Don't include payload type in the caps for framesize + When the sdp media attribute framesize are converted to caps + the should not be included. + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725335 + +2015-03-09 10:05:14 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Don't forget to unlock the mutex when receiving GAPs in TCP streams + +2015-03-09 11:24:58 +0530 Arun Raghavan + + * ext/pulse/pulsesink.c: + pulsesink: Make sure to filter caps in all cases during CAPS query + We were skipping the filter step while returning template caps, for + example. + +2015-03-08 21:15:53 +0000 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Don't update buffer for OUTPUT + For output device, we should not update the buffer with flags and + timestamp when we dequeue. The information in the v4l2_buffer is not + meaningful and it breaks the case where the buffer is rendered at + multiple places. + https://bugzilla.gnome.org/show_bug.cgi?id=745438 + +2015-03-08 18:04:34 +0100 Sebastian Dröge + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Implement cookies property + +2015-03-08 18:02:51 +0100 Sebastian Dröge + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Implement automatic-redirect property + +2015-03-08 17:54:07 +0100 Sebastian Dröge + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Implement proxy support + The properties were there before, but not used anywhere. + +2015-02-21 20:05:24 +0100 Mark Nauwelaerts + + * gst/avi/gstavidemux.c: + avidemux: resurrect some flow return handling + +2015-03-04 10:27:17 +0100 Nicolas Huet + + * gst/audioparsers/gstaacparse.c: + aacparse: fix LOAS parsing issue + Fix missing index in syncword searching + https://bugzilla.gnome.org/show_bug.cgi?id=745585 + +2015-03-05 17:54:43 -0300 Thiago Santos + + * sys/directsound/gstdirectsoundsink.c: + directsoundsink: fix modulo math with ringbuffer parameters + To get a multiple of bpf use a subtraction and not an addition + https://bugzilla.gnome.org/show_bug.cgi?id=745684 + +2015-03-07 00:55:47 +1100 Jan Schmidt + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: Protect property variables with the object lock. + Use the object lock instead of the splitmux lock to protect + internal property variables, so they're not locked when + switching to a new file. + https://bugzilla.gnome.org/show_bug.cgi?id=744420 + +2015-03-06 11:39:39 +0100 Wim Taymans + + * tests/check/elements/rtpjitterbuffer.c: + check: add jitterbuffer unit test + See https://bugzilla.gnome.org/show_bug.cgi?id=745539 + +2015-03-05 09:18:52 +0100 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Fix handling of interleaved (TCP) streams + We need to set up the transport in any case, not just if we have a container + stream or a non-interleaved stream. Only if we have an interleaved stream and + are retrying, we should not set up the stream again. + https://bugzilla.gnome.org/show_bug.cgi?id=745599 + +2015-03-05 10:00:33 +0100 Sebastian Dröge + + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp9dec.c: + vp[89]dec: Drop frames that have no output buffer because of errors + finish_frame() assumes that there is an output buffer. + +2015-03-05 09:56:23 +0100 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Don't unref caps we don't own + +2015-03-05 09:46:17 +0100 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Push RTCP caps on the RTCP pads + Otherwise we will get not-negotiated later from rtpbin, and will never be able + to send RTCP packets back to the server. Note that error flow returns from the + RTCP pads are ignored, that's why it didn't fail more visible before. + +2015-03-05 09:35:32 +0100 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Make sure to send SEGMENT events on all pads + +2015-03-03 16:23:15 +0100 Santiago Carot-Nemesio + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsource.c: + * gst/rtpmanager/rtpstats.h: + rtp: Add Full Intra Request (FIR) packets to statistics + https://bugzilla.gnome.org/show_bug.cgi?id=745587 + +2015-03-03 16:01:53 +0100 Santiago Carot-Nemesio + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsource.c: + * gst/rtpmanager/rtpstats.h: + rtp: Add Packet Loss Indication (PLI) to statistics + This is helpful to provide statistics in the format defined in + http://w3c.github.io/webrtc-stats/#dictionary-rtcrtpstreamstats-members. + https://bugzilla.gnome.org/show_bug.cgi?id=745587 + +2015-03-03 19:19:50 +0100 Nicola Murino + + * gst/matroska/matroska-mux.c: + * gst/matroska/matroska-mux.h: + matroskamux: Remove duration accumulation logic + Duration accumulation can cause rounding errors and generate wrong + duration with different buffers that share the same timestamp. + https://bugzilla.gnome.org/show_bug.cgi?id=745192 + +2015-03-03 18:40:16 +0100 Nicola Murino + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-ids.c: + * gst/matroska/matroska-ids.h: + * gst/matroska/matroska-mux.c: + matroska: Add an helper method to get buffer timestamps + ... and replace GST_BUFFER_TIMESTAMP that always return PTS with this method + that return PTS or DTS based on stream type. + https://bugzilla.gnome.org/show_bug.cgi?id=745192 + +2015-03-04 11:28:12 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Add explanation why we have space for 32 hash tables + And also create only one, there's no need yet to create all 32 until + we implement RFC2762. + +2015-03-04 11:26:57 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + Revert "rtpsession: Do not use an array of maps if they are not being used" + This reverts commit 1591adf4cd843d13d8622a30c619425691a84128. + https://bugzilla.gnome.org/show_bug.cgi?id=745586#c1: + It's the beginning of an implementation of RFC 2762, which is needed for + large multicast groups. The implementation is not yet complete but why + not leave what is there and implement RFC 2762 instead? + +2015-03-04 10:35:12 +0100 Santiago Carot-Nemesio + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpsession: Do not use an array of maps if they are not being used + rtpsession declares an array of maps to store srrcs but only the + the key 0 is being used. This patch replaces the array of maps + for just one map and remove useless parameters in rtpsession + https://bugzilla.gnome.org/show_bug.cgi?id=745586 + +2015-02-27 18:12:09 +0900 Jimmy Ohn + + * gst/avi/gstavidemux.c: + avidemux: remove not needed code + In gst_avi_demux_handle_src_query, there is not needed code. + We already check about stream is vbr or not at the upper line. + o, we don't need to check this condition becase stream is not + vbr 100% in this case. + https://bugzilla.gnome.org/show_bug.cgi?id=745276 + +2015-03-03 23:25:35 +0000 Tim-Philipp Müller + + * tests/icles/gdkpixbufoverlay-test.c: + tests: gdkpixbufoverlay-test: replace deprecated function + Just avoid using the deprecated function entirely, + it's easy enough. Defining the macro is not enough. + +2015-03-03 19:04:48 +0000 Tim-Philipp Müller + + * tests/icles/gdkpixbufoverlay-test.c: + tests: gdkpixbufoverlay-test: fix compilation against newer gdk-pixbuf + gdk_pixbuf_new_from_inline() has been deprecated in favour + of GResource. + +2015-03-03 18:39:15 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosrc.c: + osxaudiosrc: Allow caps renegotiation + The ringbuffer does allow renegotiation, so we do not have to report + fixed caps once it is acquired (based on a similar patch for the sink + side by Ilya Konstantinov ). + +2015-02-21 14:41:08 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxaudiosink.c: + osxaudiosink: Allow renegotiating caps + Once osxaudiosink's device is open, it fixates on the initial caps and + refuses to accept new caps. This is erroneous since the Audio Unit is + can accept a new ASBD, and GstAudioRingBuffer supports reconfiguration + as well. + https://bugzilla.gnome.org/show_bug.cgi?id=743925 + +2015-03-02 12:04:00 +0100 Gwenole Beauchesne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2allocator: fix fd leak in DMABUF import mode. + Ensure gst_v4l2_buffer_pool_release_buffer() releases the associated + GstV4l2MemoryGroup. In particular, this allows for closing the DMABUF + handles prior to instantiating new ones. + https://bugzilla.gnome.org/show_bug.cgi?id=745443 + +2015-03-02 15:06:09 +0100 Sebastian Dröge + + * ext/vpx/gstvp8enc.c: + vp8enc: Use 0 as duration for the EOS "frame" + +2015-03-02 15:02:20 +0100 Sebastian Dröge + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp8enc.h: + * ext/vpx/gstvp9enc.c: + * ext/vpx/gstvp9enc.h: + vp{8,9}enc: Tell the encoder about actual timestamps and durations of frames + ... instead of just counting frames. The values are supposed to be in timebase + units, not frame units. This fixes various quality problems with VP8/VP9 + encoding and in general makes the encoder behave better. + Thanks to Nirbheek Chauhan for noticing this bug. + +2015-03-01 13:56:17 -0500 Nicolas Dufresne + + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp9dec.c: + vpxdec: Fix calculation of width in bytes + Right now we only support I420, but vpx seems to support more formats. + This will prevent hard to find bug in the future. + +2015-03-01 13:52:50 -0500 Nicolas Dufresne + + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp9dec.c: + vpxdec: Don't memcpy in frame map failed + This avoid a crash if mapping the frame failed. + +2015-03-01 13:48:45 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Add missing break + This is cosmetic change. + +2015-03-01 13:46:18 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2bufferpool.h: + v4l2: Workaround driver not setting field correctly + As it's very common, handle driver not setting field in buffers + by using the field value from the format. This workaround a long time + bug in UVC driver. For even buggier driver, we simply assume + progressive as before. We also only warn once, to avoid spamming. + +2015-02-28 18:10:06 +0100 Matej Knopp + + * gst/isomp4/qtdemux.c: + qtdemux: fix key unit seek + Unlike many other seek flags, the KEY_UNIT seek + flag is not copied over into the GstSegment, + since it's only relevant for the seek itself, + so we need to pass it explicitly to the seek + handler here. + https://bugzilla.gnome.org/show_bug.cgi?id=745339 + +2015-02-27 09:38:01 +0100 Edward Hervey + + * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * docs/plugins/gst-plugins-good-plugins.interfaces: + * docs/plugins/inspect/plugin-isomp4.xml: + * docs/plugins/inspect/plugin-multifile.xml: + * docs/plugins/inspect/plugin-rtp.xml: + * docs/plugins/inspect/plugin-rtpmanager.xml: + * docs/plugins/inspect/plugin-shout2send.xml: + * docs/plugins/inspect/plugin-video4linux2.xml: + * docs/plugins/inspect/plugin-videofilter.xml: + * docs/plugins/inspect/plugin-wavenc.xml: + docs/plugins: Updates + +2015-02-26 23:41:47 +0100 Nicola Murino + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-mux.c: + matroskamux/demux: initialize dts_only + https://bugzilla.gnome.org/show_bug.cgi?id=745192 + +2015-02-26 23:28:11 +0100 Nicola Murino + + * gst/matroska/matroska-mux.c: + matroskamux: store DTS for V_MS/VFW/FOURCC streams + https://bugzilla.gnome.org/show_bug.cgi?id=745192 + +2015-02-26 19:48:33 +0000 Tim-Philipp Müller + + * gst/multifile/gstsplitmuxsink.c: + * gst/multifile/gstsplitmuxsrc.c: + multifile: attempt to fix docs build issue on build bot + +2015-02-27 00:41:46 +0530 Arun Raghavan + + * gst/interleave/interleave.c: + interleave: Drop custom latency query handling + This is implemented by the default query handler now. + +2015-02-27 00:40:05 +0530 Arun Raghavan + + * gst/videomixer/videomixer2.c: + videomixer: Drop custom latency querying logic + This is now implemented in the default latency query handler. + +2015-02-26 16:10:41 +0100 Sebastian Rasmussen + + * gst/rtp/gstrtpvorbispay.c: + rtpvorbispay: fix payloader description and author e-mail + https://bugzilla.gnome.org/show_bug.cgi?id=745226 + +2014-09-05 16:34:26 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2sink.c: + v4l2: query crop configuration after each call of S_CROP + S_CROP ioctl is write-only and the device can adjust crop rectangle so + we query back the crop configuration after each S_CROP to know what has + been done. + https://bugzilla.gnome.org/show_bug.cgi?id=736133 + +2015-02-26 02:12:18 +0100 Matej Knopp + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-ids.h: + matroskademux: V_MS/VFW/FOURCC streams have DTS instead of PTS + When such stream is present demuxer should set DTS on buffers instead + of PTS. This is consistent with how VLC and libav/ffmpeg handle VFW + streams. + Sample file + https://s3.amazonaws.com/MatejK/Samples/Matroska-VFW-DTS-Only.mkv + https://bugzilla.gnome.org/show_bug.cgi?id=745192 + +2015-02-25 16:45:11 -0800 Aleix Conchillo Flaqué + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Check corruption flag on the right buffer + We where checking the buffer we are copying to instead of the buffer we + are copying from. + https://bugzilla.gnome.org/show_bug.cgi?id=740040 + +2015-01-19 15:29:24 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2object.c: + v4l2object: set colorspace in caps for capture devices + This information is set by the driver for a capture device, and so could + be forwarded to pipeline by setting the colorimetry in caps. + https://bugzilla.gnome.org/show_bug.cgi?id=743186 + +2014-10-06 17:30:06 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2allocator.c: + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + v4l2bufferpool: fix import_userptr() in single-planar API when n_planes > 1 + In the V4L2 single-planar API, when format is semi-planar/planar, + drivers expect the planes to be contiguous in memory. + So this commit change the way we handle semi-planar/planar format + (n_planes > 1) when we use the single-planar API (group->n_mem == 1). + To check that planes are contiguous and have expected size, ie: no + padding. We test the fact that plane 'i' start address + plane 'i' + expected size equals to plane 'i + 1' start address. If not, we return + in error. + Math are done in bufferpool rather than in allocator because the + former is aware of video info. + https://bugzilla.gnome.org/show_bug.cgi?id=738013 + +2015-01-23 10:15:46 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2allocator.c: + * sys/v4l2/gstv4l2allocator.h: + * sys/v4l2/gstv4l2bufferpool.c: + v4l2allocator: let bufferpool calculate image size when importing userptr + Offset are relative to the buffer and there is no guarantee substracting + them will give us the plane size. So we let bufferpool make the math as + it is more aware of video info than allocator and pass a size array to + allocator import function. + Pointed out by Nicolas Dufresne + https://bugzilla.gnome.org/show_bug.cgi?id=738013 + +2014-12-11 16:13:15 +0100 Philippe De Muyter + + * sys/v4l2/gstv4l2object.c: + v4l2object: recognize and distinguish all bayer arrangements + Up to now, v4l2src recognized only "bggr" amongst the bayer arrangements. + Recognize now also the "rggb", "gbrg" and "grbg" arrangements. + https://bugzilla.gnome.org/show_bug.cgi?id=742363 + +2015-01-15 16:11:53 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: set v4l2_buffer.field when queuing buffer in an output device + According to the current specification, application must set this field + for an output device. + https://bugzilla.gnome.org/show_bug.cgi?id=743013 + +2015-02-24 05:57:24 +0200 Ilya Konstantinov + + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + * sys/osxaudio/gstosxcoreaudiocommon.c: + * sys/osxaudio/gstosxcoreaudiocommon.h: + osxaudiosrc: iOS resampling causes stuttering + Fixes stuttering audio when iOS AU is resampling. To make AU resample, + one has to request a rate that differs from AVAudioSession's + sampleRate. The resampling itself is not the culprit, but rather our + API misuse. + AudioUnitRender modifies the mDataByteSize members with the + actual read bytes count. Therefore, they must be reinitialized + before each AudioUnitRender. (The buffers themselves can be + preallocated.) + The "stutter" was caused by one AudioUnitRender making the buffer + too small for other AudioUnitRender invocations, making them fail + with -50 (paramErr). By way of luck, when AU didn't resample, all + AudioUnitRender invocations read the same number of bytes. + (This patch addresses some non-interleaved audio concerns, but + at this moment the elements do not support non-interleaved audio + and non-interleaved is untested.) + https://bugzilla.gnome.org/show_bug.cgi?id=744922 + +2015-02-22 01:49:52 +0100 Krzysztof Kotlenga + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: improve error message when unauthorized + Make use of NOT_AUTHORIZED error code instead of falling back to generic + READ error. + https://bugzilla.gnome.org/show_bug.cgi?id=601733 + +2015-02-23 20:06:25 +0000 Tim-Philipp Müller + + * sys/ximage/ximageutil.c: + ximagesrc: remove pointless g_return_val_if_fail() + ximage won't ever be NULL here because the dispose + function is called via ximage->dispose(). + +2015-02-23 19:40:25 +0100 Thibault Saunier + + * gst/isomp4/qtdemux.c: + qtdemux: All segment resulting from a seek should have the same seqnum + https://bugzilla.gnome.org/show_bug.cgi?id=744983 + +2015-02-19 23:12:31 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2bufferpool.h: + * sys/v4l2/gstv4l2object.c: + v4l2: Enable copy when no known allocation params + When there is no allocation parameters in the query, enable copy + threshold. When this threshold is reached, the buffer pool will start + copying when the pool reaches a critical level. If the driver supports + CREATE_BUFS, this will be used instead. + +2015-02-19 23:08:34 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Update allocator flags + When we hit emulated formats, we disable CREATE_BUFS since libv4l2 + cope very badly with it. Also clear the allocator flags so we will + never try to allocate more buffers. This fixes failure when the copy + threshold is reached as we where calling CREATE_BUFS, which lead to + libv4l2 instability. + +2015-02-19 23:07:23 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Use specific debug category + The pool has grown enough that it is now handy to seperate v4l2object + trace from v4l2bufferpool trace. + +2015-02-19 14:29:02 +0000 Vincent Penquerc'h + + * gst/rtp/gstrtpvp8pay.c: + rtpvp8pay: default encoding name to VP8 + https://bugzilla.gnome.org/show_bug.cgi?id=737810 + +2015-02-19 14:06:51 +0000 Vincent Penquerc'h + + * gst/rtp/gstrtpvp8pay.c: + rtpvp8pay: make caps writable before truncating them + https://bugzilla.gnome.org/show_bug.cgi?id=737810 + +2015-02-05 10:29:26 +0000 Vincent Penquerc'h + + * gst/rtp/gstrtpvp8pay.c: + rtpvp8pay: negotiate encoding name + Chrome uses a different one than gstreamer. + https://bugzilla.gnome.org/show_bug.cgi?id=737810 + +2015-02-19 12:35:07 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpsession.c: + rtpsession: Send initial events on sync_rtcp pad when using RTP/RTCP muxing + Otherwise we will just send buffers on the pad without any events beforehand + and will get g_warnings() about that. + +2015-02-19 11:20:51 +0000 Luis de Bethencourt + + * ext/jack/gstjackaudiosrc.c: + jack: case missing break statement + commit b1098c2ea5eabea7af08ce51d22b867eaed2bbe2 added a new case in + gst_jack_audio_src_get_property() but forgot to add the break statement to it. + +2015-02-18 19:18:00 +0000 Luis de Bethencourt + + * sys/v4l2/v4l2_calls.c: + Revert "v4l2: fraction is reversed" + This reverts commit b91fe36644b15ae070d72b9e8a9c7087e82aef12. + +2015-02-18 17:49:29 +0000 Luis de Bethencourt + + * sys/v4l2/v4l2_calls.c: + v4l2: fraction is reversed + In the fraction 1 / 2. 1 is the numerator and 2 is the denominator. + The arguments of fraction gst_value_set_fractions() are value, + numerator and denominator. + Also, gst_value_set_fraction() fails if denominator is 0 for obvious + reasons. + +2015-02-17 20:26:55 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2pool: Deactivate other pool + When importing buffers from a downstream pool, we need to deactivate + that pool to ensure it will be usable again later. Relying on the + refcount to reach zero does not work, since elements like xvimagesink + keeps a reference on their proposed pool. + +2015-02-18 10:10:53 -0300 Thiago Santos + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/qtdemux.c: + qtmux: remove not needed condition + gst_buffer_replace can handle NULL inputs by itself + +2015-02-18 09:40:14 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: prefer the tfdt timestamp over the buffer's that is less accurate + The tfdt should be more accurate as the buffer timestamp is provided + by the fragmented format manifest and it might just be an approximation. + +2015-02-17 16:57:55 +0200 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: When resetting the jitterbuffer because of packet discont, don't flush sticky events + We will otherwise flush away STREAM_START, CAPS or SEGMENT events and will + confuse downstream with buffers that come before such events. + +2015-02-17 12:20:57 +0100 hark + + * ext/jack/gstjackaudiosink.c: + * ext/jack/gstjackaudiosink.h: + * ext/jack/gstjackaudiosrc.c: + * ext/jack/gstjackaudiosrc.h: + jack: Add property port-pattern to specify which JACK ports to connect to + https://bugzilla.gnome.org/show_bug.cgi?id=690719 + +2015-02-17 12:31:06 +0100 Edward Hervey + + * gst/isomp4/gstisoff.c: + * gst/isomp4/gstisoff.h: + * gst/isomp4/qtdemux.c: + isomp4: Redefine gst_isoff_ symbols to gst_isoff_qt_ + We need different symbol names, because these symbols are also present + in the fragmented plugin ... which will cause conflicts when doing + static linking + +2015-02-16 14:31:05 +0000 Luis de Bethencourt + + * gst/goom2k1/lines.c: + goom2k1: use fractional part of float division + +2015-02-16 13:59:14 +0000 Luis de Bethencourt + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsin: remove dead code + Every instance of goto beach has buf_info equal NULL. Don't check + for a condition that never happens. + CID #1268399 + +2015-02-15 21:45:24 -0500 Nicolas Dufresne + + * tests/check/elements/splitmux.c: + splitmux-test: Parse error message + The test had a function to print the error, but was not parsing it. + This was causing warning about dbg_info being used uninitialized. If + the test was testing any errors, this would have crashed. + +2015-02-15 21:34:28 -0500 Nicolas Dufresne + + * gst/spectrum/gstspectrum.c: + spectrum: Fix min and max for bands property + The number of FFTs is calculated with the following formula: + guint nfft = 2 * bands - 2; + nfft is passed to gst_fft_f32_new() as the len argument and is of type + unsigned integer. This method required that len is at leas 1, then + maximum G_MAXINT, as other values would be negative. If we extrapolate + from the formula above it means we need "bands" to be between 2 and + ((guint)G_MAXINT + 2) / 2). + https://bugzilla.gnome.org/show_bug.cgi?id=744213 + +2015-02-15 15:51:55 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: Fix freeing of shared memory + When memory (that has been shared using gst_memory_share()) are freed, + the memory (or the DMABUF FD) should not bee freed. These memories have + a parent. This also removes the extra _v4l2mem_free function and avoid + calling close twice on the DMABUF FD. + https://bugzilla.gnome.org/show_bug.cgi?id=744573 + +2015-02-14 11:11:30 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: do not use sparse streams in push-based seeking + Using the sparse streams can make the push-based seeking return + too far in the stream. It also can lead to issues as the + sparse streams will be ignored when restarting playback and, + if the sparse stream is the one that has the earliest sample, + it will confuse qtdemux's offsets as one stream will have + an earlier offset than the demuxer's one which might lead to + early EOS. + https://bugzilla.gnome.org/show_bug.cgi?id=742661 + +2015-02-13 19:43:16 +0900 Jimmy Ohn + + * ext/pulse/pulsesink.c: + pulsesink: Enhance code readability in pulsesink_query + In pulsesink_query function, we use a switch for the query + type. In the CAPS case, there is no 'break', instead we + return right away. Use a break and return at the end of + the function instead for better code readability. + https://bugzilla.gnome.org/show_bug.cgi?id=744461 + +2015-02-13 20:40:48 +0000 Tim-Philipp Müller + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: flag as sink from the start + +2015-02-11 15:30:44 +0100 Philippe Normand + + * gst/isomp4/Makefile.am: + * gst/isomp4/fourcc.h: + * gst/isomp4/gstisoff.c: + * gst/isomp4/gstisoff.h: + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: Initial 'sidx' atom parsing support + Parse the 'sidx' atom and update the total duration according to the + parser result. The isoff parser code is imported from + gst-plugins-bad's dashdemux and a gst_isoff_sidx_parser_add_data() + function was factored out of the gst_isoff_sidx_parser_add_buffer() + function. + https://bugzilla.gnome.org/show_bug.cgi?id=743578 + +2015-02-11 05:06:45 +1100 Jan Schmidt + + * gst/flv/Makefile.am: + * gst/flv/gstflvdemux.c: + flvdemux: Use gst_video_guess_framerate() + Use gst_video_guess_framerate() from libgstvideo to guess + sensible common framerates where possible from the + floating point fps in the stream. + +2015-02-11 13:53:02 +0100 Sebastian Dröge + + * ext/raw1394/gstdv1394src.c: + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + * gst/interleave/interleave.c: + * gst/rtsp/gstrtpdec.c: + * gst/videomixer/videomixer2.c: + Improve and fix LATENCY query handling + This now follows the design docs everywhere, especially the maximum latency + handling. + https://bugzilla.gnome.org/show_bug.cgi?id=744106 + +2015-02-11 10:29:55 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Handle first RTCP packet and early feedback correctly + According to RFC 4585 section 3.5.3 step 1 we are not allowed to send + an early RTCP packet for the very first one. It must be a regular one. + Also make sure to not use last_rtcp_send_time in any calculations until + we actually sent an RTCP packet already. In specific this means that we + must not use it for forward reconsideration of the current RTCP send time. + Instead we don't do any forward reconsideration for the first RTCP packet. + +2015-02-10 18:53:53 +0100 Wim Taymans + + * gst/rtp/gstrtph263depay.c: + rtph263depay: fix compilation with gcc 5.0 + +2015-02-10 16:00:07 +0000 Tim-Philipp Müller + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: fix example pipeline properly + x264enc might not have a max-key-int property, but it + has a key-int-max property... + +2015-02-10 14:57:55 +0000 Luis de Bethencourt + + * gst/multifile/gstsplitmuxsrc.c: + splitmux: fix typo + +2015-02-10 14:56:23 +0000 Luis de Bethencourt + + * gst/multifile/gstsplitmuxsink.c: + splitmux: update example pipeline + Element x264enc doesn't have a max-key-int property + +2015-02-10 13:29:32 +0000 Luis de Bethencourt + + * gst/multifile/gstsplitmuxsink.c: + splitmux: fix memory leak + If execution goes to the beach in line 981, buf_info goes out of scope without + the memory being free'd. Handle this case. + CID #1268403 + +2015-02-08 12:03:10 +0000 Tim-Philipp Müller + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: fix awkward if clause + +2015-02-07 01:41:49 +1100 Jan Schmidt + + * gst/multifile/gstsplitmuxpartreader.c: + * gst/multifile/gstsplitmuxsink.c: + * tests/check/elements/splitmux.c: + splitmux: Add unit test for file splitting + Add a unit test for file splitting, and fix the leaks in the + splitmuxsink it found + +2015-02-06 14:43:22 +0000 Luis de Bethencourt + + * gst/wavparse/gstwavparse.c: + wavparse: fix which stop variable is used in assignment + Assignment is done to variable segment.stop when the intention was to assign to + local variable stop. Instead of overwriting it, the value is now clamped and + segment.stop is set to it soon after. + CID #1265773 + +2015-02-07 00:19:36 +1100 Jan Schmidt + + * gst/multifile/gstsplitmuxpartreader.c: + * gst/multifile/gstsplitmuxsrc.c: + * tests/check/elements/splitmux.c: + splitmux: Fix memory leaks until the test valgrinds clean + +2015-02-06 06:42:17 +1100 Jan Schmidt + + * gst/multifile/gstsplitmuxpartreader.c: + splitmux: Handle early EOS during part preparation + Handle the case where a short file reaches EOS while we're still + waiting for no-more-pads, and make sure we continue to the internal + READY state for real playback to work properly later. + +2015-02-06 05:03:19 +1100 Jan Schmidt + + * tests/files/splitvideo00.ogg: + * tests/files/splitvideo01.ogg: + * tests/files/splitvideo02.ogg: + tests: Change splitmux test video files + Avoid test failure by changing the stored video resolution + from 80x60 to 80x64, which needs bug 741030 to be fixed. + +2014-08-01 00:07:53 +1000 Jan Schmidt + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-good-plugins-docs.sgml: + * docs/plugins/gst-plugins-good-plugins-sections.txt: + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * docs/plugins/gst-plugins-good-plugins.interfaces: + * gst/multifile/Makefile.am: + * gst/multifile/gstmultifile.c: + * gst/multifile/gstsplitfilesrc.c: + * gst/multifile/gstsplitmuxpartreader.c: + * gst/multifile/gstsplitmuxpartreader.h: + * gst/multifile/gstsplitmuxsink.c: + * gst/multifile/gstsplitmuxsink.h: + * gst/multifile/gstsplitmuxsrc.c: + * gst/multifile/gstsplitmuxsrc.h: + * gst/multifile/gstsplitutils.c: + * gst/multifile/gstsplitutils.h: + * gst/multifile/test-splitmuxpartreader.c: + * tests/check/Makefile.am: + * tests/check/elements/.gitignore: + * tests/check/elements/splitmux.c: + * tests/files/splitvideo00.ogg: + * tests/files/splitvideo01.ogg: + * tests/files/splitvideo02.ogg: + splitmux: Implement new elements for splitting files at mux level. + Implement 2 new elements - splitmuxsink and splitmuxsrc. + splitmuxsink is a bin which wraps a muxer and takes 1 video stream, + plus audio/subtitle streams, and starts a new file + whenever necessary to avoid overrunning a threshold of either bytes + or time. New files are started at a keyframe, and corresponding audio + and subtitle streams are split at packet boundaries to match + video GOP timestamps. + splitmuxsrc is a corresponding source element which handles + the splitmux:// URL and plays back all component files, + reconstructing the original elementary streams as it goes. + +2015-02-04 16:32:14 -0300 Thiago Santos + + * tests/check/elements/souphttpsrc.c: + * tests/files/test-cert.pem: + * tests/files/test-key.pem: + tests: souphttpsrc: update ssl key/cert pair + Our ones were expired. The new ones were copied from libsoup's + tests files. + Also sets the property to use our own cert to validate the + server, otherwise the default system certs would be used + and it would fail. + +2015-02-04 02:25:44 -0300 Thiago Santos + + * gst/rtp/gstrtph264depay.c: + rtph264depay: prevent trying to get 0 bytes from adapter + This causes an assertion and would lead to getting a NULL instead + of a buffer. Without proper checking this would easily lead to + a segfault + https://bugzilla.gnome.org/show_bug.cgi?id=737199 + +2015-02-04 21:50:51 +1100 Jan Schmidt + + * gst/isomp4/qtdemux.c: + qtdemux: Simple implementation of GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS + When the trickmode key-units flag is set on the segment, simply skip + any sample on a video stream that isn't a keyframe + +2015-02-03 17:35:52 +0100 Wim Taymans + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: fix container handling + We detect a container correctly now so we need to revert the weird + check there was before. + Use gst_rtspsrc_stream_push_event() to push the caps event on the + right pad. + See https://bugzilla.gnome.org/show_bug.cgi?id=739391 + +2015-02-02 19:46:27 -0300 Thiago Santos + + * gst/matroska/matroska-ids.h: + * gst/matroska/matroska-mux.c: + * gst/matroska/matroska-mux.h: + matroskamux: store and write stream tags + Separate global from stream tags storage and write them to the + appropriate tags entry in the output + +2015-02-02 13:35:59 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: parse stream tags + Keep global and stream tags separately and parse the udta node + that can be found under the trak atom. The udta will contain + stream specific tags and will be pushed as such + https://bugzilla.gnome.org/show_bug.cgi?id=692473 + +2015-01-31 14:32:34 -0300 Thiago Santos + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmux.h: + qtmux: store stream and container tags separately + Tags received via events, when marked as stream tags, will + be stored on that stream's trak atom instead of being stored + in the main tags atom. This allows the resulting file to have + global and stream tags stored. + https://bugzilla.gnome.org/show_bug.cgi?id=692473 + +2015-01-31 13:14:44 -0300 Thiago Santos + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + * gst/isomp4/gstqtmux.c: + qtmux: refactor tags functions to accomodata UDTA at trak level + Refactor the functions that were bound to the 'moov' atom to + directly pass the desired 'udta' that should receive the tags. + This allows the tags to be written to 'udta' at the 'moov' or + the 'trak' level, creating tags that are for the container or + for a stream only. + https://bugzilla.gnome.org/show_bug.cgi?id=692473 + +2015-01-31 10:47:40 -0300 Thiago Santos + + * gst/isomp4/gstqtmux.c: + qtmux: map application name to _swr tag + It refers to the application name and version used to create the + file + https://bugzilla.gnome.org/show_bug.cgi?id=692473 + +2015-01-31 02:30:40 +1100 Jan Schmidt + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-parse.c: + * gst/matroska/matroska-read-common.c: + * gst/matroska/matroska-read-common.h: + matroska: Fix seeking past the end of the file in reverse mode. + Snap to the end of the file when seeking past the end in reverse mode, + and also fix GST_SEEK_TYPE_END and GST_SEEK_TYPE_NONE handling + for the stop position by always seeking on a segment in stream time + +2015-01-30 18:22:31 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Fix signal name + This wasn't meant to be pushed at all yet, but now that it's there + already it won't hurt to make it correct at least. + +2015-01-30 16:56:35 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpstats.h: + rtpstats: Fix typo in documentation + +2015-01-30 16:50:36 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpsession: Add new on-receiving-rtcp signal + This will be emitted whenever an RTCP packet is received. Different to + on-feedback-rtcp, this signal gets every complete RTCP packet and not + just the individual feedback packets. + +2015-01-28 14:02:15 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: simplify segment.base math + Remove a fix for heavily edited files added for fixing + https://bugzilla.gnome.org/show_bug.cgi?id=345830 to work + with seeks and proper gaps playback. The fix was replaced + for a more general solution that bases on using previous + segment's duration, just like it works for media segments + playback. + https://bugzilla.gnome.org/show_bug.cgi?id=743518 + +2015-01-27 14:00:35 +0000 Luis de Bethencourt + + * gst/videomixer/videomixerorc-dist.c: + videomixer: update orc files + +2015-01-26 17:08:12 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: Fix data dropping for fragmented streams + For fragmented streams with extra data at the end of the mdat + qtdemux was not dropping those bytes and would try to use + that extra data as the beginning of a new atom, causing the + stream to fail. + https://bugzilla.gnome.org/show_bug.cgi?id=743407 + +2015-01-25 17:30:33 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Deprecate rtcp-immediate-feedback-threshold property + It had no effect since quite some time and also is not needed in general, + especially not to switch between immediate feedback mode and early feedback + mode. The latest understanding of the RFC is that from the endpoint point of + view, both modes are exactly the same. RTCP is only allowed to use the + bandwidth as given by the RFC constraints, as such it is only ever possible + to schedule a RTCP packet early but it's against the RFC to schedule more RTCP + packets. + The difference between immediate feedback mode and early feedback mode is that + the former guarantees that an RTCP packet can be sent for every event + "immediately", which means that the bandwidth calculations from the RFC have + resulted in an RTCP scheduling interval that is small enough. Early feedback + mode on the other hand means that we can schedule some packets early to make + that happen, but it's not guaranteed at all that it's possible to schedule + an RTCP packet per event (i.e. they need to be accumulated or dropped). + +2015-01-22 10:29:39 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Delay the next regular RTCP packet after early RTCP + This is required to not exceed the short term average RTCP bitrate when + using early feedback as compared to without early feedback. + +2015-01-22 10:28:52 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Add new send-rtcp-full signal + This indicates with a boolean return value if scheduling a new RTCP packet + within the requested delay was possible. Otherwise it behaves exactly like + send-rtcp. The only reason for adding a new signal is ABI compatibility. + +2015-01-20 00:32:00 +0000 Jimmy Ohn + + * ext/pulse/pulsesink.c: + pulsesink: Free format_info in query_getcaps + If we can not create probe stream in query_getcaps function, it will appear + memory leakage from format info. + The following patch prevent memory leakage in pulsesink. + https://bugzilla.gnome.org/show_bug.cgi?id=743178 + +2015-01-23 17:35:51 +0000 Luis de Bethencourt + + * gst/matroska/matroska-read-common.c: + matroskademux: remove unnecessary check + No matter if gst_matroska_read_common_parse_index_cuetrack () returns that the + flow is OK or not, the check there will be a break from the switch. Removing the + check since the outcome is the same. + CID #1265762 + +2015-01-23 15:16:25 +0100 Edward Hervey + + * gst/matroska/matroska-mux.c: + matroskamux: Avoid using freed variable + the name variable might have been attributed to pad_name, make sure we + free it only *after* pad_name has been used. + Coverity CID : 1265774 + +2015-01-23 15:13:55 +0100 Edward Hervey + + * gst/avi/gstavimux.c: + avimux: Avoid using freed variable + the name variable might have been attributed to pad_name, make sure we + free it only *after* pad_name has been used. + Coverity CID : 1265775 + +2014-11-14 12:59:31 +0100 Peter Seiderer + + * sys/v4l2/gstv4l2object.c: + v4l2object: reuse caps framerate if not overwritten by v4l2 device + Enables duration setting in v4l2src. + https://bugzilla.gnome.org/show_bug.cgi?id=740403 + +2015-01-22 10:29:24 +0100 Sebastian Dröge + + * gst/rtpmanager/rtpsession.c: + rtpsession: Fix indention + +2015-01-21 17:36:26 +0100 Edward Hervey + + * gst/isomp4/qtdemux_dump.c: + qtdemux_dump: Bypass even more code if debugging is disabled + And avoid using variables that won't exist when debugging is disabled + +2015-01-21 15:30:33 +0100 Edward Hervey + + * gst/isomp4/qtdemux_dump.c: + qtdemux: Only traverse/dump nodes if guaranteed to be used + __gst_debug_min is the "global" lowest debug level set. There's no + guarantee the qtdemux debug category is actually set at that level. + +2014-12-20 17:09:14 +0100 Edward Hervey + + * gst/matroska/ebml-read.c: + matroska: Avoid debugging below category threshold + This part alone was what made the matroska thread take a full core + on an android phone ... + +2015-01-21 09:55:30 +0100 Sebastian Dröge + + * ext/dv/gstsmptetimecode.c: + * ext/mikmod/mikmod_types.c: + * gst/audiofx/audiodynamic.c: + * gst/audiofx/audiopanorama.c: + * gst/effectv/gstradioac.c: + * gst/isomp4/atoms.c: + * gst/isomp4/gstqtmuxmap.c: + * gst/isomp4/qtdemux.c: + * gst/rtsp/gstrtspsrc.c: + * gst/videofilter/gstvideotemplate.c: + * gst/wavparse/gstwavparse.c: + Constify some static arrays everywhere + +2015-01-19 17:49:54 +0000 Vincent Penquerc'h + + * gst/isomp4/qtdemux.c: + qtdemux: fix deadlock seeking in files without seek entries + A mutex unlock was missing. + https://bugzilla.gnome.org/show_bug.cgi?id=739975 + +2015-01-19 12:34:25 +0000 Vincent Penquerc'h + + * gst/videomixer/blend.c: + videomixer: fix illegal memory access in blend function with negative ypos + https://bugzilla.gnome.org/show_bug.cgi?id=741115 + +2015-01-13 16:49:34 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2videodec.c: + v4l2videodec: Proxy getcaps + Replace the sink_query with new getcaps() virtual and use the proxy + helper with the probed caps. This allow upstream element taking decision + base on what is supported downstream. + +2015-01-13 19:05:20 +0100 Sebastian Dröge + + * gst/isomp4/fourcc.h: + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmuxmap.c: + qtmux: Add support for v210 + +2015-01-13 18:58:01 +0100 Sebastian Dröge + + * gst/isomp4/qtdemux.c: + qtdemux: v210 is v210, not UYVY and yuv2 is YUY2, not I420 + Also add a few other raw video formats we support: v308, v216 + and add comments for a few others we don't support yet. + https://developer.apple.com/library/mac/technotes/tn2162/ + +2015-01-12 15:56:29 +0100 Stefan Sauer + + * common: + Automatic update of common submodule + From f2c6b95 to bc76a8b + +2015-01-10 15:51:16 +0100 Sebastian Dröge + + * sys/osxvideo/cocoawindow.h: + * sys/osxvideo/cocoawindow.m: + * sys/osxvideo/osxvideosink.h: + * sys/osxvideo/osxvideosink.m: + osxvideosink: Disable hack for NSApp iteration with a special #define + The hack causes deadlocks and other interesting problems and it really + can only be fixed properly inside GLib. We will include a patch for + GLib in our builds for now that handles this, and hopefully at some + point GLib will also merge a proper solution. + A proper solution would first require to refactor the polling in + GMainContext to only provide a single fd, e.g. via epoll/kqueue + or a thread like the one added by our patch. Then this single + fd could be retrieved from the GMainContext and directly integrated + into a NSRunLoop. + https://bugzilla.gnome.org/show_bug.cgi?id=741450 + https://bugzilla.gnome.org/show_bug.cgi?id=704374 + +2015-01-08 21:07:05 +0100 Mark Nauwelaerts + + * ext/pulse/pulsesink.c: + pulsesink: uncork if needed upon commit + ... to provide for a running clock. + +2015-01-09 16:59:53 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2videodec.c: + v4l2videodec: Prevent renegotiation + Renegotiation isn't supported, simply prevent it the way we do in + v4l2src. + +2015-01-06 13:54:25 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2videodec.c: + v4l2videodec: Don't unlock the stream lock twice + +2015-01-09 11:40:40 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: fix stream time conversion + Use the right macro to convert to the correct scale or the + segment information will be wrong + https://bugzilla.gnome.org/show_bug.cgi?id=742572 + +2015-01-07 18:48:58 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: Add protection against driver bug + v4l2loopback driver has a this nasty bug that if the queue is larger + then 2 buffers, it returns random index on dqbuf. So far we assumed + that the index was always right, which would lead to memory being + unref twice, and eventually crash. + +2015-01-07 17:58:05 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + * sys/v4l2/gstv4l2allocator.h: + * sys/v4l2/gstv4l2bufferpool.c: + v4l2: Don't use allocator size to iterate + As the buffer array is fixed size and small, it's safer to simply + use this static size to cleanup the buffers. This is also more + consistent with the rest. The associated method is no longer + required and can be dropped. + +2015-01-07 17:55:14 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Don't clean buffer array in dispose + This should already have been done, plus this code is incorrect + and may lead to crash. + https://bugzilla.gnome.org/show_bug.cgi?id=742074 + +2015-01-07 17:48:31 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Don't ref queued output buffer + This partly revert to the old 1.2 behavior. Instead of keeping a + reference to the output buffer queued, we simply release them but + don't forward it to GstBufferPool. This way, the buffer pool don't + need to be flushed to be stopped. + https://bugzilla.gnome.org/show_bug.cgi?id=742074 + +2015-01-08 11:37:23 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Never fail on streamoff + Failing streamoff prevents allocator from being disposed hence + lead to device FD leak. There is no known cases where streamoff + may fails for which we'd still be streaming. streamoff is known + to fail when a device is being unplugged (in which case errno + 19/ENODEV is set). + https://bugzilla.gnome.org/show_bug.cgi?id=732734 + +2015-01-07 21:52:17 -0500 Brad Smith + + * configure.ac: + v4l2: Add support for detecting the presence of V4L2 support on OpenBSD + https://bugzilla.gnome.org/review?bug=742503 + +2015-01-04 15:57:10 +0100 Matej Knopp + + * gst/audioparsers/gstac3parse.c: + ac3parse: request at least 8 bytes to properly parse header + https://bugzilla.gnome.org/show_bug.cgi?id=742325 + +2015-01-07 16:20:03 -0800 Michael Smith + + * gst/wavparse/gstwavparse.c: + wavparse: skip an additional uninteresting chunk type before the fmt chunk. + +2015-01-07 18:16:12 +0000 Luis de Bethencourt + + * gst/audiofx/audiodynamic.c: + audiodynamic: assert func_index is inside bounds + Bringing back the check removed in the previous commit but have that check be a + g_assert. Changing the function to static void since return can never be False, + because audio format will never be unkown. + +2015-01-07 17:31:39 +0000 Luis de Bethencourt + + * gst/audiofx/audiodynamic.c: + audiodynamic: remove always-true conditional + func_index is set by the sum of three ternary operators which add, 0:4, 0:2, + and 1:0. Minimum value would be 0+0+0=0, and maximum would be 4+2+1=7. + The conditional checking if func_index is >= 0 and < 8 will always be true. + Removing it. + CID 1226442 + +2015-01-07 18:05:18 +0100 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: If we get a gap with a buffer without DTS, error out + We (currently?) can't really handle gaps between RTP packets if they're not + properly timestamped. The current code would go into calculations with + GST_CLOCK_TIME_NONE and then cause assertions everywhere. It's probably + better to error out cleanly instead. + +2014-11-21 11:39:19 -0800 Aleix Conchillo Flaqué + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: set PLAYING state after configuring caps + We set to PLAYING after we have configured the caps, otherwise we + might end up calling request_key (with SRTP) while caps are still + being configured, ending in a crash. + https://bugzilla.gnome.org/show_bug.cgi?id=740505 + +2014-12-30 18:03:22 +0000 Tim-Philipp Müller + + * tests/icles/gdkpixbufoverlay-test.c: + tests: gdkpixbufoverlay-test: remove outdated FIXME + +2014-12-30 17:19:42 +0000 Tim-Philipp Müller + + * tests/check/elements/rtpcollision.c: + tests: rtpcollision: use alawenc/dec in these tests instead of Speex + They should always be built, while the speex elements are not. + Need to check for a smaller number of buffers then (7->4) because + speexenc will add 3 header buffers while alawenc will just output + as many buffers as it receives as input. + https://bugzilla.gnome.org/show_bug.cgi?id=742098 + +2014-12-30 16:36:02 +0000 Tim-Philipp Müller + + * tests/check/pipelines/simple-launch-lines.c: + tests: simple-launch-lines: only run jpeg/png tests if elements are available + +2014-12-30 16:26:58 +0100 Sebastian Dröge + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: Don't return a buffer when returning not GST_FLOW_OK + basesrc assumes that we don't return a buffer if + something else than OK is returned. It will just + leak any buffer we might accidentially provide + here. + This can potentially happen during flushing. + Maybe fixes https://bugzilla.gnome.org/show_bug.cgi?id=741993 + +2014-12-30 14:52:42 +0000 Tim-Philipp Müller + + * tests/check/elements/rtpaux.c: + tests: rtpaux: use alawenc/dec in these tests instead of Speex + They should always be built, while the speex elements are not. + https://bugzilla.gnome.org/show_bug.cgi?id=742098 + +2014-12-29 15:35:19 +0100 Sebastian Dröge + + * gst/matroska/matroska-demux.c: + matroskademux: Improve detection of being stuck at the same offset + Only error out if we read from the same position again and got the + same length. Just the same position is not necessarily enough. + +2014-12-29 15:00:02 +0100 Sebastian Dröge + + * gst/matroska/matroska-demux.c: + matroskademux: Don't get stuck at the same offset when searching for clusters + This could happen if there is an invalid cluster with size 0, and in that + case just error out instead of looping forever. + +2014-12-25 21:32:40 +0000 Tim-Philipp Müller + + * gst/isomp4/gstqtmux.c: + qtmux: fix ALAC muxing + Actually copy the codec data instead of copying nothing + and then bombing out because there's no data. + Fixes: gst-launch-1.0 audiotestsrc ! avenc_alac ! qtmux ! fakesink + https://bugzilla.gnome.org/show_bug.cgi?id=741783 + +2014-12-25 15:48:04 +0000 Tim-Philipp Müller + + * gst/rtpmanager/gstrtpptdemux.c: + rtpptdemux: just drop invalid rtp packets instead of erroring out + Apparently linphone sends an invalid RTP packet as very + first packet. We want to ignore that instead of erroring + out (same for any other invalid packets really). + https://bugzilla.gnome.org/show_bug.cgi?id=741398 + +2014-12-25 15:44:15 +0000 Tim-Philipp Müller + + * gst/rtpmanager/gstrtpptdemux.c: + rtpptdemux: fix 0.10-ism in docs + +2014-12-25 14:58:12 +0000 Tim-Philipp Müller + + * tests/icles/gdkpixbufoverlay-test.c: + tests: gdkpixbufoverlay-test: use absolute positioning to fix demo + https://bugzilla.gnome.org/show_bug.cgi?id=739566 + +2014-12-25 14:53:09 +0000 Tim-Philipp Müller + + * ext/gdk_pixbuf/gstgdkpixbufoverlay.c: + * ext/gdk_pixbuf/gstgdkpixbufoverlay.h: + gdkpixbufoverlay: add "positioning-mode" property to allow absolute positions + Set positioning-mode=pixels-absolute to allow positioning with + absolute coordinates, meaning negative x/y offsets will be + interpreted as being to the left/above the video frame instead + of being interpreted as relative to the right/bottom edge of + the video frame (which is a silly default, but that's how it is). + This means we can nicely slide images into and out of the frame, + see gdkpixbufoverlay-test. + https://bugzilla.gnome.org/show_bug.cgi?id=739566 + +2014-12-22 15:33:51 +0100 Sebastian Dröge + + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + osxaudio: Directly return the ringbuffer's caps if it is acquired + +2014-12-22 12:56:19 +0100 Sebastian Dröge + + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + osxaudio: Put all audio formats into the template caps + We report the proper caps later from the get_caps() vfunc implementation after + probing the selected device. + +2014-12-22 12:56:05 +0100 Sebastian Dröge + + * sys/osxaudio/gstosxaudioringbuffer.c: + osxaudio: Also set the big endian flag for floating point samples + +2014-12-22 11:45:59 +0100 Sebastian Dröge + + * MAINTAINERS: + MAINTAINERS: Update my mail address + +2014-12-22 10:23:01 +0100 Sebastian Dröge + + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + osxaudio: Fix deadlock and property change notification in device selection code + After creating the ringbuffer we have to set the device on the ringbuffer as + it defaults to kAudioDeviceUnknown. At this point it can't have changed to + anything else yet and we don't have to notify about changes to the sink/src + "device" property. It's also not a good idea because GstAudioBaseSrc has the + object lock taken while the ringbuffer is created, which might cause a + deadlock if something calls back into the element from "notify::device". + Once the base class is done with the NULL_TO_READY state change, it has opened + the device via the ringbuffer and this might have chosen a different device. + Especially if we initially used kAudioDeviceUnknown. Also notify about this + property change as initially intended by this code. + +2014-12-19 12:30:03 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2pool: Update configuration size + We already update our copy of VideoInfo.size to proper size, now also + the configuration so the size matches on release. + https://bugzilla.gnome.org/show_bug.cgi?id=741420 + +2014-12-19 10:57:29 +0100 Edward Hervey + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-demux.h: + matroska-demux: Cache upstream length + Instead of constantly querying upstream, just cache the last duration, + and in the unlikelyness we might have gone over query again before + deciding we are EOS. + Cut 15% cpu off matroskademux streaming thread (srsly...) + +2014-12-17 17:36:18 +0000 Vincent Penquerc'h + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-ids.c: + * gst/matroska/matroska-ids.h: + * gst/matroska/matroska-mux.c: + matroska: mux/demux the OpusHead header + This is meant to be so (https://wiki.xiph.org/MatroskaOpus - while + it is marked as a draft, this part was confirmed to be correct on + IRC), and allows one to determine whether a demuxed stream is + multistream or not, and thus set the multistream caps field + accordingly. In turn, this means downstream does not have to guess. + https://bugzilla.gnome.org/show_bug.cgi?id=740744 + +2014-12-18 11:50:33 +0100 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Don't dereference NULL if a suitable stream for the AUX element can't be found + CID 1258717 + +2014-12-18 10:53:39 +0100 Sebastian Dröge + + * common: + Automatic update of common submodule + From ef1ffdc to f2c6b95 + +2014-12-12 23:06:07 +0000 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstmultiudpsink.h: + udpsink: allocate scratch space for render functions on the heap + and not the stack. Our allocations could get a bit too large + to be sure it's not going to cause trouble using the stack. + +2014-06-24 01:16:37 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + multiudpsink: re-use send_buffers() code path for render() function + It's like rendering a buffer list, just with one buffer. + Has the added advantage that if there are multiple clients + we can send the buffer to all the clients in one go. + +2014-06-24 01:15:25 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstmultiudpsink.h: + multiudpsink: keep client list consistent during removals + We unlock and re-lock the client lock while emitting the + removed signal, which causes inconsistencies in the client + list vs. the client counts. Instead, remove the client from + the list already before emitting the signal and put it into + a temporary list of clients to be removed. That way things + look consistent to the streaming thread, but signal callbacks + can still do things like get stats from removed clients. + +2014-06-24 00:56:27 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + multiudpsink: fix client count after removal + +2014-06-23 18:43:21 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + multiudpsink: keep client list sorted by socket family + We make use of in the send_buffers() function if we + need to use different sockets to send to IPv4 and + IPv6 destinations. + +2014-06-20 11:36:19 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstmultiudpsink.h: + multiudpsink: add sendmmsg-ready render_list function prototype + Add prototype for a render_list() function that can use a + sendmmsg-style g_socket_send_messages() function once it lands + in GLib. We can use this infrastructure to send multiple buffers + made up by multiple memories to multiple clients in one go, which + drastically reduces the number of syscalls made when sending + high-bitrate video streams. + https://bugzilla.gnome.org/show_bug.cgi?id=732152 + +2014-06-19 19:16:01 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstmultiudpsink.h: + multiudpsink: make udp client structure refcounted + Use the refcount for memory management and keep track + of the number of duplicate clients in a separate + variable. This will be useful later, and means we + don't have to hold the OBJECT_LOCK all the time. + https://bugzilla.gnome.org/show_bug.cgi?id=732866 + +2014-06-19 18:31:05 +0100 Tim-Philipp Müller + + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstmultiudpsink.h: + multiudpsink: keep count of number of unique and non-unique IPv4 and IPv6 clients + This will come in handy later. + +2014-12-16 15:00:22 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Disable create_buf with libv4l2 + Libv4l2 does not work with CREATE_BUFS. Instead of failing on random + error caused by libv4l2, disable CREATE_BUFS when an emulated format is + detected. + +2014-12-09 17:39:12 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: Add protection against broken libv4l2 + It looks like libv4l2 support for CREATE_BUF is incomplete. That + combine with existing bugs may lead to crash in GStreamer. These + check will make it robust by: + - Checking create buf index isn't an already in used index + - Checking that the index out of QUERYBUF matches the requested + index + +2014-12-16 16:37:24 +0100 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Add something to the debug logs if an RTX AUX element can't be added + ... because the application already has a signal handler set up here. + +2014-11-21 14:13:34 +1100 Matthew Waters + + * gst/rtsp/gstrtspsrc.c: + * gst/rtsp/gstrtspsrc.h: + rtspsrc: add retransmission support according to RFC4588 + Based on the client-rtpaux example + +2014-12-16 13:25:01 +0100 Wim Taymans + + * sys/osxvideo/osxvideosink.m: + osxvideosink: clear rectangle structures before use + +2014-12-09 15:09:56 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2object.c: + v4l2object: Always set format + Right now we try to be clever by detecting if device format have + changed or not, and skip setting format in this case. This is valid + behaviour with V4L2, but it's also very error prone. The rational + for not setting these all the time is for speed, though I can't + measure any noticeable gain on any HW I own. Also, until recently, + we where doing get/set on the format for each format we where + probing, making it near to impossible that the format would match. + This also fixes bug where we where skipping frame-rate setting if + format didn't change. + https://bugzilla.gnome.org/show_bug.cgi?id=740636 + +2014-12-15 18:30:01 -0500 Nicolas Dufresne + + * gst/videocrop/gstvideocrop.c: + videocrop: Remove todo about caps filter + The filter is already interected. + +2014-12-15 18:19:05 -0500 Nicolas Dufresne + + * gst/videocrop/gstvideocrop.c: + * gst/videocrop/gstvideocrop.h: + videocrop: Make sure new crop is applied + Since "basetransform: Fix caps equality check" commit a7f357, + set_info() will not be called anymore if crop didn't change + the caps. This is fixed by setting "need_update" boolean when + cropping properties has been changed, and then applying these + if they where not applied before rendering the next frame. This + patch also fixed the locking, dropping un-needed custom lock, + and no holding needless lock while doing the operation as we + already hold the streaming lock. + https://bugzilla.gnome.org/show_bug.cgi?id=740787 + +2014-12-12 18:10:35 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + osxaudiosink: Prefer filter caps order while getting caps + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-12-09 13:38:26 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + osxaudiosink: Add some error handling around channel layout parsing + For now we just spit a warning and ignore the channel layout if we can't + support it. + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-12-08 22:38:22 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + osxaudio: Take lock around sink/source before accessing the ringbuffer + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-12-01 21:06:27 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosink.h: + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + * sys/osxaudio/gstosxcoreaudioremoteio.c: + osxaudiosrc: Probe channel layout too + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-12-01 20:32:04 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + osxaudiosink: Only fix up channels/layout for PCM caps while probing + It's unlikely that setting a channel layout will do much for AC3/DTS + streams. If we find at some point that it does make sense, we can + perform the structure copying unconditionally (i.e., the current code is + wrong, since AC3/DTS will get two structures now - one with the channel + layout, one without). + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-12-01 19:41:35 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxaudiosrc.h: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + osxaudiosrc: Implement caps probing + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-12-01 19:29:57 +0530 Arun Raghavan + + * sys/osxaudio/gstosxcoreaudiohal.c: + osxaudio: Bind audio device to audio unit early + We want to bind the device during open so that subsequent format queries + on the audio unit are as specific as possible from that point onwards. + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-29 23:16:30 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + osxaudiosink: Fix up caps querying a bit + This should make caps queries correct in PAUSED and higher as well. + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-28 22:32:36 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxcoreaudio.c: + osxaudio: Move osxaudiosrc-specific code out of the generic path + Avoids one layering violation (GstCoreAudio referring to + GstOsxAudioSrc). + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-28 22:23:17 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudioringbuffer.c: + * sys/osxaudio/gstosxaudioringbuffer.h: + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + * sys/osxaudio/gstosxcoreaudiohal.c: + * sys/osxaudio/gstosxcoreaudioremoteio.c: + osxaudio: Clean up a GstCoreAudio -> GstOsxAudioSrc/Sink reference + Now that device selection has no sink/source-specific bits, we can have + generic device selection for this path. We do need to now track state + changes so we can look up the final device_id once the device is open, + though. + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-28 19:40:52 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + osxaudiosink: Move device caps probing to get_caps() + This should be preferred to running the probe at device open time. + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-28 18:37:02 +0530 Arun Raghavan + + * sys/osxaudio/gstosxcoreaudiohal.c: + osxaudio: Make some debug code compile conditionally + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-28 15:06:35 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudioringbuffer.c: + * sys/osxaudio/gstosxaudioringbuffer.h: + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + osxaudio: Move device selection to ringbuffer->open_device() + This is conceptually the right thing to do, and allows us to correctly + catch errors in device selection as well, which we could not do while + creating the ringbuffer. + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-28 14:34:34 +0530 Arun Raghavan + + * sys/osxaudio/gstosxaudiosink.c: + * sys/osxaudio/gstosxaudiosrc.c: + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudio.h: + * sys/osxaudio/gstosxcoreaudiohal.c: + * sys/osxaudio/gstosxcoreaudioremoteio.c: + osxaudio: Consolidate input and output code paths a bit + https://bugzilla.gnome.org/show_bug.cgi?id=740987 + +2014-11-21 11:54:18 +0100 Thibault Saunier + + * gst/deinterlace/gstdeinterlace.c: + Deinterlace: in query_caps return only supported formats if filter is interlaced + In some cases the currently set GstVideoInfo is not interlaced, but + upstream caps are interlaced and the info is passed in the filter, + we should take that info into account and make sure that we do not + consider that case as a "pass through" case. + https://bugzilla.gnome.org/show_bug.cgi?id=741407 + +2014-12-12 11:06:17 +0100 Edward Hervey + + * gst/isomp4/qtdemux.c: + qtdemux: Fix debug statement + It was using the non-increasing offset variable, which made that statement + not so useful :) + +2014-12-12 11:03:15 +0100 Edward Hervey + + * gst/isomp4/qtdemux.c: + qtdemux: Add macros for the various timescale conversions + This helps make the code more readable and avoid future bad usage of + scaling function argument order. + +2014-12-11 10:16:06 +0100 Patrick Radizi + + * gst/rtp/gstrtph264pay.c: + rtph264pay: fix potential crash when shutting down + A race condition in the state change function may cause buffers + to be unreffed while they are still used by the streaming thread + in gst_rtp_h264_pay_send_sps_pps() resulting in a crash. Chain + up to the parent class first in the state change function to + make sure streaming has stopped and only then free those buffers. + https://bugzilla.gnome.org/show_bug.cgi?id=741381 + +2014-12-12 00:42:06 +1100 Jan Schmidt + + * gst/isomp4/qtdemux.c: + qtdemux: Copy flags of the overall segment to output segments + Preserve the segment flags of the overall demux segment on the output + segments for each pad. + +2014-12-09 02:43:00 +0100 Matej Knopp + + * gst/isomp4/gstqtmux.c: + qtmux: use 64bit chunk_offset + https://bugzilla.gnome.org/show_bug.cgi?id=741279 + +2014-12-10 17:39:17 +0100 Edward Hervey + + * gst/isomp4/qtdemux.c: + qtdemux: Fix rounding errors in duration update + Make sure we store updated segment stop/duration with the same + granularity as the duration timescale. + And add more debug + +2014-12-10 16:55:44 +0100 Edward Hervey + + * gst/isomp4/qtdemux.c: + qtdemux: Update duration when we get more information + When dealing with fragmented files, we will get more accurate duration + information via the mfra and moof atoms. + In order for playback to not stop at the initial duration (from the + moov atom), we need to check and update the various duration variables + when we find more information. + Fixes playback of fragmented files in pull mode + +2014-12-10 15:08:40 +0100 Edward Hervey + + * gst/isomp4/qtdemux.c: + qtdemux: Remove variable assignments never read + As detected by clang/scan-build + +2014-12-10 14:56:06 +0100 Edward Hervey + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: Use GstClockTime for nanosecond-based time variables/fields + Avoids confusion with timescaled-based variables and bytes (offset) + variables. + And use GST_CLOCK_TIME_NONE where applicable + +2014-12-03 14:47:05 +0100 Edward Hervey + + * gst/debugutils/gstpushfilesrc.c: + * gst/debugutils/gstpushfilesrc.h: + pushfilesrc: Add TIME SEGMENT capability + Adds a new set of properties to make pushfilesrc output a TIME SEGMENT + (instead of the filesrc BYTE SEGMENT). + When time-segment is set to True the following will happen: + * Seeks are refused (data starts from the beginning of the file) + * The BYTE segment will be replaced by a TIME segment with the values + specified in the various properties + * The first outgoing buffer will have a timestamp set on it (by default + it has a value of GST_CLOCK_TIME_NONE) + +2014-12-10 11:35:29 +0100 Sebastian Dröge + + * gst/audioparsers/gstaacparse.c: + aacparse: Also only unref caps if they're not NULL + +2014-12-10 11:34:42 +0100 Sebastian Dröge + + * gst/audioparsers/gstaacparse.c: + aacparse: gst_pad_get_allowed_caps() will return NULL if there is no peer + +2014-12-09 16:38:38 +0100 Thibault Saunier + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + vpXenc: CLOCK_TIME_NONE is not a valid min_latency value + We should just use 0 if we do not have the information + +2014-12-03 17:26:56 +0100 Thibault Saunier + + * gst/rtpmanager/gstrtpsession.c: + rtpsession: Use an empty iterator in iterate_internal_link when no links + And not a NULL Iterator, so it is consistent with the way it usually + works and avoid user to need a different code paths to handle that. + +2014-12-09 14:01:50 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: set buffer interlace flags when field is V4L2_FIELD_INTERLACED + If v4l2_buffer.field is V4L2_FIELD_INTERLACED, we set corresponding + GstVideoBuffer flags depending on the video standard. + According to V4L2 specification, M/NTSC transmits the bottom field + first, all other standards the top field first. + https://bugzilla.gnome.org/show_bug.cgi?id=737603 + +2014-12-08 21:26:18 +0100 Patrick Radizi + + * gst/rtp/gstrtph264pay.c: + rtph264pay: Fixes buffer leak when using SPS/PPS + Fixes a buffer leak that would occurr if the pipeline was shutdown + while a SPS/PPS header was being created. + https://bugzilla.gnome.org/show_bug.cgi?id=741271 + +2014-12-09 04:43:29 +0100 Mathieu Duponchelle + + * gst/effectv/gstaging.c: + agingtv: fix memcpy when no color aging requested. + video_size is the size in pixels, actual size of the memcpy + has to be stride * height. + +2014-12-07 17:33:51 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2: Workaround libv4l2 RW emulation bug + When libv4l2 emulates RW mode on top of MMAP devices, the queues are + only initialized on first read. The problem is that poll() will fail + if called before the queues are initialized and streaming. Workaround + this by doing a zero size read when pool is started in that IO mode. + https://bugzilla.gnome.org/show_bug.cgi?id=740633 + +2014-12-07 17:27:37 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2: Fix RW io mode + In RW, allocator can be null, max_buffers can be zero, and we need not + to wait while the queue is empty since there is no queue. + https://bugzilla.gnome.org/show_bug.cgi?id=740633 + +2014-12-03 16:40:49 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Cleanup uneeded check and cases + There is nothing in between the break and the "done:" anymore, plus + USERPTR and DMABUF_IMPORT case is exactly the same. + +2014-12-03 17:07:49 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2pool: Fix CREATE_BUFS support for capture + This patch fixes CREATE_BUFS support for capture devices. Initially we + would only try and allocate more buffers when the copy threshold + is reached. When the threshold was not set (needed) it would never + happen. Another problem is that on capture side, acquire returns + filled buffer, hence need to pool. We need to set a special flag to + force allocation to happen. + https://bugzilla.gnome.org/show_bug.cgi?id=741134 + +2014-12-03 16:27:59 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: Fix CREATE_BUF probing + Current for every memory type we where probing MMAP CREATE_BUFS ioct. + https://bugzilla.gnome.org/show_bug.cgi?id=741134 + +2014-11-18 16:52:40 +0100 Nicola Murino + + * gst/matroska/matroska-demux.c: + matroskademux: set framerate 0/1 when duration is not known + https://bugzilla.gnome.org/show_bug.cgi?id=740130 + +2014-12-04 17:25:55 +1100 Jan Schmidt + + * gst/isomp4/qtdemux.c: + qtdemux: More fixes for reverse playback + When seeking or finding the previous keyframe, do + comparisons against targets and segments using composition time + to correctly decide which sample times match. + +2014-12-03 11:12:55 +0100 Thibault Saunier + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Use an empty iterator in iterate_internal_link when no links + We used to setup an iterator with 1 GValue set with a NULL object + pointer which is not the normal way to do that. Instead we should make + sure that the first call to gst_iterator_next returns GST_ITERATOR_DONE. + +2014-12-03 13:20:57 +1100 Jan Schmidt + + * gst/isomp4/qtdemux.c: + qtdemux: Handle seeks past EOS as a seek to the end + Fix reverse playback of every frame by making seeks past/to EOS + find the last segment and start there. + +2014-12-02 15:33:25 -0500 Olivier Crête + + * gst/rtp/gstrtpmpadepay.c: + rtpmpadepay: Relax caps to allow any clock-rate + Some Wowza setups seem to send an invalid non-90000 clock-rate. + +2014-12-01 21:04:02 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: don't use GST_CLOCK_TIME_NONE in non GstClockTime variables + Use -1 instead as those are gint64/guint64 variables and not GstClockTime + +2014-11-07 17:06:49 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2allocator.h: + v4l2allocator: fix gst_v4l2_allocator_stop prototype + gst_v4l2_allocator_stop returns a GstV4l2Return, not a gboolean. + https://bugzilla.gnome.org/show_bug.cgi?id=739792 + +2014-11-07 16:41:52 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: unref pool when v4l2_allocator_new() fails + https://bugzilla.gnome.org/show_bug.cgi?id=739791 + +2014-11-30 17:52:47 -0500 Nicolas Dufresne + + * sys/v4l2/v4l2_calls.h: + v4l2: Remove last include to linux/videodev2.h + We now use and update our internal copy so we no longer have to ifdef + the entire code for features and defines that where added over the + years. + https://bugzilla.gnome.org/show_bug.cgi?id=740905 + +2014-08-24 13:38:08 +0100 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: implement seeking in fragmented mp4 files in pull mode based on the mfra table + +2014-11-29 15:25:51 +0000 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + qtdemux: use track fragment decoding time (tfdt) in parse_trun() for interpolation + As fallback if we don't have any existing samples + as reference point yet. + Based on patch by David Corvoysier + +2014-11-29 14:37:25 +0000 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: parse mfra random access box for fragmented mp4 files + If it's present, and we operate in pull mode. + +2014-08-15 14:58:26 +0200 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + qtdemux: stop parsing headers for fragmented mp4s at the first moof + Currently during header parsing, we scan through the entire file + and skip every moof+mdat chunk for fragmented mp4s, which makes + start-up incredibly slow. Instead, just stop at the first moof + chunk when have a moov, and start exposing the streams, so we + can go and start handling the moofs for real. + +2014-11-29 13:59:35 +0000 Tim-Philipp Müller + + * tests/icles/.gitignore: + * tests/icles/Makefile.am: + * tests/icles/gdkpixbufoverlay-test.c: + tests: add interactive gdkpixbufoverlay test + Just need to fix the coordinate system now so + that negative offsets are actually negative + and not flipped to position things from the + opposite border. + +2014-11-29 13:53:03 +0000 Tim-Philipp Müller + + * ext/gdk_pixbuf/gstgdkpixbufoverlay.c: + * ext/gdk_pixbuf/gstgdkpixbufoverlay.h: + gdkpixbufoverlay: add "pixbuf" property + So we can set a GdkPixbuf directly instead of + reading it from an image file on the file system. + +2014-11-29 13:23:50 +0000 Tim-Philipp Müller + + * ext/gdk_pixbuf/Makefile.am: + * ext/gdk_pixbuf/pixbufscale.c: + * ext/gdk_pixbuf/pixbufscale.h: + gdkpixbuf: remove pixbufscale code that was never ported + Don't think we'll need this again. + +2014-11-29 18:35:42 -0500 Olivier Crête + + * gst/rtpmanager/gstrtprtxreceive.c: + rtprtxreceive: Use offset when copying header + The header is not always at the start of the packet, so we need to compute + the offset first. + +2014-11-28 13:12:46 +0000 Tim-Philipp Müller + + * ext/taglib/gstapev2mux.cc: + apev2mux: write APE tags at end for wavpack files + http://www.wavpack.com/file_format.txt: + "Both the APEv2 tags and/or ID3v1 tags must come at the end of the + WavPack file, with the ID3v1 coming last if both are present." + WavPack files that contain APEv2 tags at the beginning of the files + are unplayable on players that use FFmpeg (like VLC) and most other + software (except Banshee). Players that use libwavpack directly can + play the files because it skips the tags, but does not recognize the + tag data at that location. + https://bugzilla.gnome.org/show_bug.cgi?id=711437 + +2014-11-28 10:41:55 +0000 Tim-Philipp Müller + + * tests/icles/.gitignore: + * tests/icles/Makefile.am: + * tests/icles/test-segment-seeks.c: + tests: add interactive test for gapless playback using SEGMENT seeks + Not working too well yet, there are glitches even with WAV or FLAC. + https://bugzilla.gnome.org/show_bug.cgi?id=692368 + +2014-11-26 10:33:09 +0300 Andrei Sarakeev + + * gst/videocrop/gstaspectratiocrop.c: + * gst/videocrop/gstaspectratiocrop.h: + aspectratiocrop: Handle resolution changes properly + When an caps-event is received, we must immediately change the crop + to videocrop correctly changed caps-event dimension, otherwise the + videocrop will first use the previous value of the crop that when + resizing video to a smaller resolution may cause an error. + https://bugzilla.gnome.org/show_bug.cgi?id=740671 + +2014-11-27 17:10:53 +0100 Edward Hervey + + * common: + Automatic update of common submodule + From 7bb2bce to ef1ffdc + +2014-11-27 11:20:36 +0000 Tim-Philipp Müller + + * tests/icles/test-accurate-seek.c: + test: use gst_util_uint64_scale_round() for timestamp to sample calculation + +2014-11-27 11:16:35 +0000 Tim-Philipp Müller + + * tests/icles/.gitignore: + * tests/icles/Makefile.am: + * tests/icles/test-accurate-seek.c: + tests: add interactive test for accurate seeking + For some audio formats. + https://bugzilla.gnome.org/show_bug.cgi?id=655276 + +2014-11-26 16:04:26 +0100 Edward Hervey + + * gst/isomp4/qtdemux.c: + isomp4: Check presence of mfhd in moof + The 'mfhd' atom is mandatory in 'moof'. We can later on check whether + the fragment number properly increases + +2014-11-26 15:59:36 +0100 Edward Hervey + + * gst/isomp4/qtdemux_dump.c: + isomp4: Fix mfro and tfra atom dumping + mfro was skipping the version/flags + tfra had wrong byte_reader return value checks + +2014-11-26 15:58:26 +0100 Edward Hervey + + * gst/isomp4/qtdemux_dump.c: + * gst/isomp4/qtdemux_dump.h: + * gst/isomp4/qtdemux_types.c: + isomp4: Add mfhd atom dumping + +2014-11-27 00:15:02 +1100 Jan Schmidt + + * gst/isomp4/qtdemux.c: + qtdemux: Handle empty segments when seeking in reverse play. + Empty segments in an edit list have a media_start time of -1, + as they don't actually play any media. Allow for that when + aligning to the reference stream in reverse play. + +2014-11-24 10:36:54 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + Revert "v4l2allocator: Remove unused variable" + This reverts commit ad4480d53408a4d97ab531174ef37f258f3253c0. + +2014-11-24 10:36:30 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + * sys/v4l2/gstv4l2allocator.h: + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + Revert "v4l2: move vb_queue probing from allocator to v4l2object" + This reverts commit ec6b8b84af719d828ddd91c724e715c0b4a556bc. + +2014-11-24 10:33:29 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + Revert "v4l2object: allow to automatic selection of dmabuf" + This reverts commit e6c2ad5571e5dedb212287efe238eb450032cd4f. + +2014-11-23 16:34:15 +0000 Tim-Philipp Müller + + * REQUIREMENTS: + REQUIREMENTS: update a little + People actually look at that it seems. + +2014-11-23 16:22:12 +0000 Tim-Philipp Müller + + * gst/icydemux/Makefile.am: + icydemux: does not need to link against zlib + +2014-11-22 21:28:35 +0000 Tim-Philipp Müller + + * configure.ac: + * ext/speex/gstspeexdec.h: + * ext/speex/gstspeexenc.h: + speex: remove support for ancient speex versions + +2014-11-21 11:21:18 +0100 Branislav Katreniak + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: log connection events at info level + https://bugzilla.gnome.org/show_bug.cgi?id=739305 + +2014-10-20 13:00:37 +0200 Miguel París Díaz + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: ensure rtx_retry_period >= 0 + https://bugzilla.gnome.org/show_bug.cgi?id=739344 + +2014-11-21 11:44:24 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: Remove unused variable + this was introduced by commit ec6b8b + https://bugzilla.gnome.org/show_bug.cgi?id=699382 + +2014-11-16 12:34:17 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2bufferpool.h: + * sys/v4l2/gstv4l2src.c: + * sys/v4l2/gstv4l2transform.c: + * sys/v4l2/gstv4l2videodec.c: + v4l2: Handle corrupted buffer with empty payload + This allow skipping buffer flagged with ERROR that has no payload. + This is typical behaviour when a recovererable error occured during + capture in the driver, but that no valid data was ever written into that + buffer. This patch also translate V4L2_BUF_FLAG_ERROR into + GST_BUFFER_FLAG_CORRUPTED. Hence decoding error produce + by decoder due to missing frames will now be correctly marked. Finally, + this fixes a buffer leak when EOS is reached. + https://bugzilla.gnome.org/show_bug.cgi?id=740040 + +2014-11-21 16:36:15 +0100 Benjamin Gaignard + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + v4l2object: allow to automatic selection of dmabuf + If the v4l2 queue support dmabuf select this buffer pool mode + and update the query with allocator. + This patch only concern exporting dmabuf and not importing dmabuf + fd from downstream element. + https://bugzilla.gnome.org/show_bug.cgi?id=699382 + +2014-11-21 16:13:05 +0100 Benjamin Gaignard + + * sys/v4l2/gstv4l2allocator.c: + * sys/v4l2/gstv4l2allocator.h: + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + v4l2: move vb_queue probing from allocator to v4l2object + The goal is to make those information available in v4l2_object + to be able later to select the best allocation method for the pool + https://bugzilla.gnome.org/show_bug.cgi?id=699382 + +2014-11-20 22:42:59 +0530 Arun Raghavan + + * gst/rtpmanager/gstrtpbin.h: + rtpbin: Fix up new_jitterbuffer signal prototype + +2014-11-20 20:19:25 +0530 Arun Raghavan + + * gst/rtpmanager/gstrtpbin.c: + rtpbin: Document how to control per-SSRC retransmission + +2014-11-20 20:18:45 +0530 Arun Raghavan + + * docs/design/design-rtpretransmission.txt: + doc: Trivial spelling and consistency update + +2014-11-20 13:14:14 +0100 Wim Taymans + + * gst/rtp/gstrtpgstdepay.c: + * gst/rtp/gstrtpgstpay.c: + rtpgstpay: put 0-byte at the end of events + Put a 0-byte at the end of the event string. Does not break ABI because + old depayloaders will skip the 0 byte (which is included in the length). + Expect a 0-byte at the end of the event string or a ; for old + payloaders. + See https://bugzilla.gnome.org/show_bug.cgi?id=737591 + +2014-11-20 12:40:28 +0100 Wim Taymans + + * gst/rtp/gstrtpgstdepay.c: + rtpgstdepay: avoid buffer overread. + Check that a caps event string is 0 terminated and the event string is + terminated with a ; to avoid buffer overreads. + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=737591 + +2014-11-20 10:45:07 +0000 Tim-Philipp Müller + + * gst/isomp4/gstqtmuxmap.c: + qtmux: don't limit max video resolution to 4096x4096 + MAX isn't entirely correct as upper limit either, + it should really be MAXUINT32, but it's unlikely + to be a problem in the near future. + https://bugzilla.gnome.org/show_bug.cgi?id=740407 + +2014-11-19 15:06:00 -0800 Aleix Conchillo Flaqué + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: fix leak for mikey base64 decoded key-mgmt + https://bugzilla.gnome.org/show_bug.cgi?id=740392 + +2014-11-20 09:01:38 +0100 Wim Taymans + + * gst/videofilter/gstvideobalance.c: + videobalance: fix unhandled format in passthrough + In passthrough we can handle all formats. + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740387 + +2014-11-19 16:12:38 +0100 Jan Alexander Steffens (heftig) + + * gst/flv/gstflvdemux.c: + flvdemux: Restrict resyncing to TS regressions + The behavior of resyncing video and audio indepen- + dently can cause A/V desyncs. Lets restrict resyncs + to jumps backward for now. + https://bugzilla.gnome.org/show_bug.cgi?id=736397 + +2014-11-17 23:16:03 +1100 Matthew Waters + + * gst/videomixer/videomixer2.c: + * gst/videomixer/videomixer2.h: + videomixer: fix up QoS handling for live sources + Only attempt adaptive drop when we are not live + https://bugzilla.gnome.org/show_bug.cgi?id=739996 + +2014-11-10 22:34:39 +0100 Henning Heinold + + * tests/examples/rtp/client-PCMA.py: + * tests/examples/rtp/server-alsasrc-PCMA.py: + examples: port python rtp PCMA client/server tests to 1.0 + https://bugzilla.gnome.org/show_bug.cgi?id=739930 + +2014-06-04 12:11:10 +0100 Vincent Penquerc'h + + * ext/flac/gstflacdec.c: + flacdec: set the channel positions using the appropriate API + This avoids _set_format setting the unpositioned flag when passed + NULL as channel positions, as it would not be cleared when setting + actual channel positions later. + +2014-11-01 22:39:41 +0100 Aurélien Zanelli + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + vpx: mark arnr-type properties as deprecated and set them to no-op + ARNR type control in libvpx has been deprecated so this commit mark the + vp8enc and vp9enc associated properties as deprecated and change their + behavior to just display a warning message. + https://bugzilla.gnome.org/show_bug.cgi?id=739476 + +2014-11-10 13:16:01 +0530 Arun Raghavan + + * gst/rtpmanager/gstrtpbin.c: + rtpmanager: Trivial typo fix + +2014-11-09 11:04:33 +0100 Sebastian Dröge + + * gst/matroska/matroska-mux.c: + matroska-mux: Use G_DEFINE_TYPE() to register the pad instead of manually registering it + +2014-11-06 15:37:28 +0100 Göran Jönsson + + * gst/matroska/matroska-mux.c: + matroskamux: make GstMatroskamuxPad get_type() function thread-safe + https://bugzilla.gnome.org/show_bug.cgi?id=739722 + +2014-11-07 16:11:24 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: fix error message if allocator is already active + https://bugzilla.gnome.org/show_bug.cgi?id=739789 + +2014-11-06 21:21:40 -0500 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: Improve buffer validation + Improve buffer validation by making sure each memory are the right + one and that each memory is writable. This fixes tearing issues in + case downstream uses gst_buffer_make_writable() or other type + of GstBuffer copy where memory are only reffed. + https://bugzilla.gnome.org/show_bug.cgi?id=739754 + +2014-11-06 21:38:43 +0100 Josep Torra + + * gst/rtsp/Makefile.am: + rtsp: fix build in gst-uninstalled setup + +2014-10-29 18:44:43 +0100 Thibault Saunier + + * gst/imagefreeze/gstimagefreeze.c: + * gst/imagefreeze/gstimagefreeze.h: + imagefreeze: Handle seqnums + https://bugzilla.gnome.org/show_bug.cgi?id=739366 + +2014-11-04 08:18:41 +0530 Vineeth T M + + * ext/libpng/gstpngdec.c: + * ext/libpng/gstpngdec.h: + pngdec: change parse logic + Right now in parse logic the signature is checked every time the parse function + is called, and the whole data is the scanned each and every time, even though the + data is scanned in the previous instance. Changing the logic such that, we skip + the bytes which are already scanned in the previous instances of parse. This + helps in avoiding multiple scan of already scanned data/signature. + https://bugzilla.gnome.org/show_bug.cgi?id=737708 + +2014-11-03 15:26:06 +0100 Wim Taymans + + * gst/videomixer/videomixer2.c: + videomixer2: reverse order of params for converter + +2014-11-03 11:44:28 +0100 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: fix typo in flags + https://bugzilla.gnome.org/show_bug.cgi?id=739549 + +2014-11-02 23:33:23 +0000 Tim-Philipp Müller + + * sys/v4l2/gstv4l2object.c: + v4l2src: fix a couple of minor leaks + +2014-11-02 19:42:03 +0000 Tim-Philipp Müller + + * gst/goom2k1/gstgoom.c: + * gst/goom2k1/gstgoom.h: + goom2k1: post QoS messages when dropping frames due to QoS + +2014-11-02 19:29:52 +0000 Tim-Philipp Müller + + * gst/goom/gstgoom.c: + * gst/goom/gstgoom.h: + goom: post QoS messages when dropping frames due to QoS + +2014-11-02 19:02:35 +0000 Tim-Philipp Müller + + * gst/matroska/matroska-mux.c: + matroskamux: tweak writing app tag string a little + +2014-11-02 16:51:23 +0000 Tim-Philipp Müller + + * ext/jpeg/gstjpegdec.c: + * gst/isomp4/gstqtmux.c: + * gst/level/gstlevel.c: + * gst/udp/gstmultiudpsink.c: + * gst/udp/gstudpsrc.c: + Sprinkle some G_PARAM_DEPRECATED and #ifndef GST_REMOVE_DEPRECATED + +2014-11-02 16:58:07 +0000 Tim-Philipp Müller + + * tests/check/elements/level.c: + tests: don't use deprecated property in level unit test + +2014-11-02 13:06:33 +0000 Tim-Philipp Müller + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: implement get/set for new rtx-min-retry-timeout property + Properties are so much more useful if you can actually set + and get their values. + +2014-10-30 17:41:19 +0000 Simon Farnsworth + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2src.c: + v4l2: Clean up interlace support + Rather than try and guess interlace support as part of checking supported + sizes, look for interlace support specifically in its own function. + As a cleanup, use V4L2_FIELD_ANY when probing sizes, which should result in + the driver doing the right thing. + With my capture setup, this gets me the following sample caps: + For 1080i resolution: + video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, framerate=(fraction){ 25/1, 30/1 } + For 720p resolution: + video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction){ 50/1, 60/1 } + For 576i/p resolution (both possible at the point of query): + video/x-raw, format=(string)YUY2, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string){ progressive, interleaved }, framerate=(fraction){ 25/1, 50/1 } + This, in turn, makes 576i work correctly; with the old code, + the caps would be interlace-mode=progressive for interlaced video. + https://bugzilla.gnome.org/show_bug.cgi?id=726194 + +2014-11-01 12:18:02 +0100 Aurélien Zanelli + + * ext/vpx/gstvp8utils.h: + vpx: remove compatibility defines + We are guaranteed to have VPX_IMG_FMT_I420, VPX_PLANE_Y, + VPX_PLANE_U and VPX_PLANE_V as we require libvpx > 1.1.0. + https://bugzilla.gnome.org/show_bug.cgi?id=739476 + +2014-11-01 15:33:23 +0000 Tim-Philipp Müller + + * configure.ac: + * ext/wavpack/gstwavpackcommon.c: + * ext/wavpack/gstwavpackdec.c: + * ext/wavpack/gstwavpackenc.c: + wavpack: remove support for ancient API version + +2014-11-01 10:14:31 -0400 Nicolas Dufresne + + * gst/rtp/gstrtpvp8depay.c: + * gst/rtp/gstrtpvp8pay.c: + rtpvp8: Use VP8 encoding name + Both Firefox and Chrome uses VP8 as the encoding in their SDP. + Adding this now defacto standard name removes the need for special + case in SDP parsing code. + https://bugzilla.gnome.org/show_bug.cgi?id=737810 + +2014-11-01 11:59:26 +0000 Tim-Philipp Müller + + * gst/rtp/gstrtpmp2tpay.c: + rtpmp2tpay: fix up template caps so we can output the default pt 33 + Add fixed payload type for mp2t to template caps as well, so + our output caps match the advertised default pt. Fixes a + regression from 1.2. + There's still something wrong with caps negotiation though, + rtpmp2tpay payload=96 ! fakesink will not output caps with + payload=96. + +2014-10-30 15:37:36 -0700 Aleix Conchillo Flaqué + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: mikey related memory leaks + https://bugzilla.gnome.org/show_bug.cgi?id=739430 + +2014-06-10 10:04:07 +0100 Vincent Penquerc'h + + * ext/speex/gstspeexenc.c: + * ext/speex/gstspeexenc.h: + speexenc: update output segment stop time to match clipped samples + This will let oggmux generate a granpos on the last page that properly + represents the clipped samples at the end of the stream. + +2014-06-10 10:59:13 +0100 Vincent Penquerc'h + + * ext/flac/gstflacenc.c: + * ext/flac/gstflacenc.h: + flacenc: update output segment stop time to match clipped samples + This will let oggmux generate a granpos on the last page that properly + represents the clipped samples at the end of the stream. + +2014-10-07 15:29:33 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: cleanly handle streamon failure for output device + On streamon failure, the queued buffer is not released from the + bufferpool class point of view because it is queued to the driver and + the flush logic is not performed since we are not in streaming state. + It causes the v4l2 bufferpool to always return that stop method failed + and to leak v4l2 objects and buffers. + This commit solve this by performing the flush logic in error case, ie + flushing the allocator and restoring queued buffer state to non-queued. + https://bugzilla.gnome.org/show_bug.cgi?id=738102 + +2014-10-08 10:31:21 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: implement dispose method + Unref objects in dispose method rather than in finalize in order to + prevent circular reference. + https://bugzilla.gnome.org/show_bug.cgi?id=738102 + +2014-10-08 10:35:14 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: check that allocator is non null when stopping pool + Otherwise, we could dereference NULL allocator when the stop method is + called by the GstBufferPool's finalize method. + https://bugzilla.gnome.org/show_bug.cgi?id=738102 + +2014-10-09 12:15:05 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2sink.c: + v4l2sink: Implement unlock/unlock_stop + This will prevent deadlocks, but will also properly flush the pool and allocator + when going to READY state. It should also fix issues reported on mailing list + when seeking is performed. + https://bugzilla.gnome.org/show_bug.cgi?id=738152 + +2014-10-28 21:32:06 +0000 Tim-Philipp Müller + + * ext/pulse/pulsedeviceprovider.h: + * sys/v4l2/gstv4l2deviceprovider.h: + * sys/v4l2/gstv4l2tuner.h: + pulse, v4l2: add missing G_END_DECLS in some places + +2014-10-27 17:57:20 +0100 Sebastian Dröge + + * common: + Automatic update of common submodule + From 84d06cd to 7bb2bce + +2014-10-27 11:08:20 +0100 Sebastian Dröge + + * tests/check/elements/aacparse.c: + aacparse: Fix unit test now that we always have profile/level in the caps + +2014-10-26 14:55:49 +0000 Tim-Philipp Müller + + * Makefile.am: + Parallelise 'make check-valgrind' + Some of the RTP unit tests are very flaky and will + fail more often with the CPU maxed out fully. Those + tests need to be fixed in any case though, they also + fail on slower machines and also occasionally with + normal 'make check'. + +2014-10-26 11:47:25 +0100 Sebastian Dröge + + * gst/audioparsers/gstaacparse.c: + aacparse: Always set profile/level on the caps + We have the information already, so why not use it? + +2014-10-25 12:36:02 +0100 Tim-Philipp Müller + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: fix crash on some 32-bit systems + Make sure to pass right number of bits to gst_structure_new() + which is a vararg function. + Fixes elements/rtpaux unit test on ppc32. + +2014-10-25 00:56:02 +0100 Tim-Philipp Müller + + * tests/check/elements/rgvolume.c: + tests: fix rgvolume test on big-endian systems + +2014-10-25 00:53:39 +0100 Tim-Philipp Müller + + * tests/check/Makefile.am: + * tests/check/elements/mulawdec.c: + * tests/check/elements/mulawenc.c: + tests: fix mulawdec/mulawenc test for big endian systems + +2014-10-24 23:48:30 +0100 Tim-Philipp Müller + + * gst/interleave/interleave.c: + interleave: intersect result with filter caps in caps query + Fixes crash in audiotestsrc because of an unsupported format + getting negotiated on big-endian systems with + audiotestsrc ! interleave ! audioconvert ! wavenc + +2014-10-23 15:46:13 +0100 Tim-Philipp Müller + + * ext/pulse/pulsedeviceprovider.c: + * ext/pulse/pulsedeviceprovider.h: + pulse: remove some unused typedefs + +2014-10-22 15:28:44 +0200 Ananda + + * ext/speex/gstspeexdec.c: + * ext/speex/gstspeexenc.c: + speex: Fix segfault when resetting the codecs multiple times + https://bugzilla.gnome.org/show_bug.cgi?id=738793 + +2014-10-22 22:50:54 +0530 Arun Raghavan + + * ext/pulse/pulsesink.c: + pulsesink: Temporarily disable stream status posting + We need a mechanism in PulseAudio to allow running code outside the + mainloop lock. Then we'd be able to post to the bus (taking the + GST_OBJECT_LOCK), without worrying about locking order with the mainloop + lock, which is the current cause of deadlocks while trying to post the + stream status messages. + https://bugzilla.gnome.org/show_bug.cgi?id=736071 + +2014-10-22 15:04:24 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: limit the retry frequency + When the RTT and jitter are very low (such as on a local network), the + calculated retransmission timeout is very small. Set some sensible lower + boundary to the timeout by adding a new property. We use the packet + spacing as a lower boundary by default. + +2014-10-22 13:40:58 +0200 Miguel París Díaz + + * gst/rtpmanager/gstrtpjitterbuffer.c: + gstrtpjitterbuffer: add "rtx-min-delay" property + This property is useful to set a min time to wait before sending a + retransmission event. + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=735378 + +2014-10-22 13:29:48 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpjitterbuffer.c: + jitterbuffer: Refactor code + Refactor some code dealing with calculating various timeouts. + See https://bugzilla.gnome.org/show_bug.cgi?id=735378 + +2014-10-10 19:50:06 +0200 Miguel París Díaz + + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpsession: fix Early Feedback Transmission + In early retransmission we are allowed to schedule 1 regular RTCP packet + at an earlier time. When we do that, we need to set allow_early to FALSE + and ignore/drop (or merge) all future requests for early transmission. + We now first check if we can schedule an early RTCP and if we can, + actually prepare the data for the next RTCP interval. + After we send the next regular RTCP after the early RTCP, we set + allow_early to TRUE again to allow more early requests. + Remove the condition for the immediate feedback for now. + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=738319 + +2014-10-21 13:01:32 +0100 Tim-Philipp Müller + + * common: + Automatic update of common submodule + From a8c8939 to 84d06cd + +2014-10-21 13:10:24 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: make debug line less confusing + +2014-10-21 12:58:13 +0200 Stefan Sauer + + * README: + * common: + Automatic update of common submodule + From 36388a1 to a8c8939 + +2014-07-02 17:50:35 +0200 Wim Taymans + + * gst/rtpmanager/rtpjitterbuffer.c: + * gst/rtpmanager/rtpjitterbuffer.h: + jitterbuffer: rework resync handling + Add a need-resync state, this is when we need to try to lock on to a + time/RTPtime pair. + Always check the RTP timestamps and if they go backwards, mark ourselves + as need-resync. + Only resync when need-resync is TRUE and we have a valid time. Otherwise + we keep the old values. This avoids locking on to an invalid time and + causing us to timestamp everything with -1. + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730417 + +2014-10-03 17:28:06 -0700 Aleix Conchillo Flaqué + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: set full stream caps on internal src TCP pads + Set the complete stream caps on the TCP internal src pads. Otherwise, + ptdemux will not properly detect the caps change. + https://bugzilla.gnome.org/show_bug.cgi?id=737868 + +2014-10-17 22:23:27 +0200 Sjoerd Simons + + * gst/rtpmanager/gstrtpmux.c: + * tests/check/elements/rtpmux.c: + rtpmux: Don't set PROXY_CAPS flag on the src pad + rtpmux behaves like a funnel in that it forwards whatever upstream is + sending buffers. So setting proxy caps doesn't make sense as the + upstream don't have to have compatible caps, thus resulting in an empty + caps set as a result of a caps query. Instead set fixed caps just + as funnel does. + https://bugzilla.gnome.org/show_bug.cgi?id=738722 + +2014-10-20 11:57:38 +0530 Vineeth T M + + * gst/videobox/gstvideobox.c: + videobox: critical error when element properties set as max/min + left, right, top, bottom can be set from range of -2147483648 to 2147483647 + when i launch the videobox element with that values, it gives a critical error + (gst-check-1.0:29869): GStreamer-CRITICAL **: gst_value_set_int_range_step: assertion 'start < end' failed + This happens because min cannot be equal to max. + https://bugzilla.gnome.org/show_bug.cgi?id=738838 + +2014-10-15 17:45:24 +0100 Tim-Philipp Müller + + * gst/rtp/Makefile.am: + * gst/rtp/gstrtp.c: + * gst/rtp/gstrtph265depay.c: + * gst/rtp/gstrtph265depay.h: + * gst/rtp/gstrtph265pay.c: + * gst/rtp/gstrtph265pay.h: + Revert "rtp: add h265 RTP payloader + depayloader" + This reverts commit d06ba9051f904a7eb482c07a97a1827169158663. + This breaks the build, as it depends on parser API in -bad. + +2014-10-15 17:34:50 +0200 Jurgen Slowack + + * gst/rtp/Makefile.am: + * gst/rtp/gstrtp.c: + * gst/rtp/gstrtph265depay.c: + * gst/rtp/gstrtph265depay.h: + * gst/rtp/gstrtph265pay.c: + * gst/rtp/gstrtph265pay.h: + rtp: add h265 RTP payloader + depayloader + +2014-10-05 21:24:27 +0200 Peter G. Baum + + * gst/wavenc/gstwavenc.c: + * gst/wavenc/gstwavenc.h: + wavenc: Support RF64 format + https://bugzilla.gnome.org/show_bug.cgi?id=725145 + +2014-10-11 11:18:42 +1100 David Sansome + + * gst/equalizer/gstiirequalizer.c: + equalizer: Don't call iirequalizer's transform_ip in passthrough mode + It tries to map the read-only buffer with GST_MAP_READWRITE and crashes. + https://bugzilla.gnome.org/show_bug.cgi?id=737886 + +2014-10-10 18:30:07 -0400 Olivier Crête + + * gst/rtpmanager/rtpsource.c: + * gst/rtpmanager/rtpsource.h: + rtpsource: Rename seqnum-base to seqnum-offset in caps + This was modified back in 1.0 in GstRtpBasePayload + +2014-10-10 18:11:19 -0400 Olivier Crête + + * gst/dtmf/gstrtpdtmfsrc.c: + * tests/check/elements/dtmf.c: + rtpdtmfsrc: clock-base and seqnum-base -> timestamp-offset and seqnum-offset + These were renamed in GstRTPBasePayload in 1.0 + +2014-10-10 17:30:24 -0400 Olivier Crête + + * gst/rtpmanager/gstrtpmux.c: + * gst/rtpmanager/gstrtpmux.h: + * tests/check/elements/rtpmux.c: + rtpmux: clock-base and seqnum-base -> timestamp-offset and seqnum-offset + These were renamed in GstRTPBasePayload in 1.0 + +2014-10-06 14:23:22 +0100 Luis de Bethencourt + + * gst/goom2k1/filters.c: + goom2k1: removing block of code that does nothing + The loop in zoomFilterSetResolution is meant to change the values in the + zf->firedec[] array. Each iteration writes the value of decc onto the arrya, + but no conditions that change the value of decc are ever met and the array is + filled with zero for each element. Which is the initial state of the + array before the loop begins. + The loop does nothing. + https://bugzilla.gnome.org/show_bug.cgi?id=728353 + +2014-10-04 17:17:13 +0200 Stefan Sauer + + * gst/rtpmanager/rtpjitterbuffer.c: + rtpjitterbuffer: don't log all clock_rate changes as warnings. + We never initialize clock_rate explicitly, therefore it is 0 by default. The + parameter is a uint32 and the only caller ensure that it is >0, therefore it + won't become -1 ever. + +2014-10-02 14:26:08 +0530 Nirbheek Chauhan + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Fix lifetime of stream headers and queued buffers + Stream headers are updated whenever ::set_caps is called, so we can't assume + they'll be valid before the message body is written out. We *can* assume that + for queued buffers, but SOUP_MEMORY_STATIC is still wrong for those. + Also, add some debug logging for stream header interactions. + https://bugzilla.gnome.org/show_bug.cgi?id=737771 + +2014-10-02 03:26:22 +0200 Matej Knopp + + * gst/audioparsers/gstaacparse.c: + aacparse: fix memory leak when prepending ADTS headers + https://bugzilla.gnome.org/show_bug.cgi?id=737761 + +2014-09-23 10:48:09 +0200 Antonio Ospite + + * gst/interleave/interleave.c: + * gst/interleave/interleave.h: + interleave: interleave samples following the Default Channel Ordering + In order to have a full mapping between channel positions in the audio + stream and loudspeaker positions, the channel-mask alone is not enough: + the channels must be interleaved following some Default Channel Ordering + as mentioned in the WAVEFORMATEXTENSIBLE[1] specification. + As a Default Channel Ordering use the one implied by + GstAudioChannelPosition which follows the ordering defined in SMPTE + 2036-2-2008[2]. + NOTE that the relative order in the Top Layer is not exactly the same as + the one from the WAVEFORMATEXTENSIBLE[1] specification; let's hope users + using so may channels are already aware of such discrepancies. + [1] http://msdn.microsoft.com/en-us/library/windows/hardware/dn653308%28v=vs.85%29.aspx + [2] http://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BS.2159-2-2011-PDF-E.pdf + Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=737127 + +2014-10-02 10:10:11 +0300 Sebastian Dröge + + * gst/wavenc/gstwavenc.c: + wavenc: Send CAPS event after the pad was activated + Otherwise the CAPS event will be dropped and we never configure any caps at + all, leading to weird behaviour in many situations. Especially header + rewriting is not going to work if a capsfilter is after wavenc. + https://bugzilla.gnome.org/show_bug.cgi?id=737735 + +2014-10-01 23:12:30 +0530 Nirbheek Chauhan + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Add some more useful debug logging + +2014-10-01 23:05:03 +0530 Nirbheek Chauhan + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Free queued buffers in ::reset + ::render sets a new callback for writing out new buffers only if there aren't + already buffers queued for writing with a previously-scheduled callback. + However, if the previously-scheduled callback is interrupted by a state change + (either manually or due to an error) and there are still buffers in the queue, + restarting the pipeline will result in buffers being queued forever, and no + callbacks will ever be scheduled, and no buffers will be written out. + https://bugzilla.gnome.org/show_bug.cgi?id=737739 + +2014-10-01 17:29:29 +0300 Sebastian Dröge + + * gst/videomixer/videomixer2.c: + videomixer: Actually use the correct GstVideoInfo for conversion + +2014-10-01 17:24:59 +0300 Sebastian Dröge + + * gst/videomixer/videomixer2.c: + videomixer: Revert the last commit and handle resolutions differences properly + This is about converting the format, not about converting any widths and + heights. Subclasses are expected to handler different resolutions themselves, + like the videomixers already do properly. + +2014-10-01 17:12:59 +0300 Sebastian Dröge + + * gst/videomixer/videomixer2.c: + videomixer: GstVideoConverter currently can't rescale and will assert + Leads to ugly assertions instead of properly erroring out: + CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed + +2014-09-30 11:35:12 +0300 Sebastian Dröge + + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp9enc.c: + vp8enc/vp9enc: Protect the encoder with a mutex in all situations + +2014-09-30 11:31:43 +0300 Sebastian Dröge + + * ext/vpx/gstvp9enc.c: + vp9enc: Allow caps renegotiation + https://bugzilla.gnome.org/show_bug.cgi?id=726329 + +2014-09-30 11:28:39 +0300 Sebastian Dröge + + * ext/vpx/gstvp8enc.c: + vp8enc: finish() and drain() should return a GstFlowReturn + +2014-03-14 12:59:02 +0100 Jose Antonio Santos Cadenas + + * ext/vpx/gstvp8enc.c: + vp8enc: Allow caps renegotiation + https://bugzilla.gnome.org/show_bug.cgi?id=726329 + +2014-09-29 11:49:45 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2object.c: + v4l2object: set colorspace for output devices + When the v4l2 device is an output device, the application shall set the + colorspace. So map GStreamer colorimetry info to V4L2 colorspace and set + on set_format. In case we have no colorimetry information, we try to + guess it according to pixel format and video size. + https://bugzilla.gnome.org/show_bug.cgi?id=737579 + +2014-09-29 22:48:16 +0530 Arun Raghavan + + * ext/pulse/pulsesink.c: + * ext/pulse/pulsesrc.c: + pulse: Add some documentation about threading and synchronisation + This gives a quick introduction to how the pulsesink/pulsesrc code + interacts with the pa_threaded_mainloop that we start up to communicate + with the server. + +2014-09-29 20:18:08 +0530 Arun Raghavan + + * ext/pulse/pulsesink.c: + pulsesink: Make emitting stream status messages synchronous + The stream status messages are emitted in the PA mainloop thread, which + means the mainloop lock is taken, followed by the Gst object lock (by + gst_element_post_message()). In all other locations, the order of + locking is reversed (this is unavoidable in a bunch of cases where the + object lock is taken by GstBaseSink or GstAudioBaseSink, and then we get + control to take the mainloop lock). + The only way to guarantee that the defer callback for stream status + messages doesn't deadlock is to either stop posting those messages, or + make sure that the message emission is completed before we proceed to + any point that might take the object lock before the mainloop lock + (which is what we do after this patch). + https://bugzilla.gnome.org/show_bug.cgi?id=736071 + +2014-09-16 12:12:49 +0200 Antonio Ospite + + * gst/wavenc/gstwavenc.c: + wavenc: print channel masks in hexadecimal + +2014-09-27 16:01:21 +0100 Tim-Philipp Müller + + * sys/v4l2/gstv4l2deviceprovider.h: + v4l2: remove redundant struct declaration + +2014-09-26 13:46:16 +0300 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Fix compiler warnings + gstrtspsrc.c:7939:11: error: implicit conversion from enumeration type 'GstSDPResult' to different enumeration type + 'GstRTSPResult' [-Werror,-Wenum-conversion] + res = gst_sdp_message_new (&sdp); + ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ + gstrtspsrc.c:7944:11: error: implicit conversion from enumeration type 'GstSDPResult' to different enumeration type + 'GstRTSPResult' [-Werror,-Wenum-conversion] + res = gst_sdp_message_parse_uri (uri, sdp); + ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +2014-09-25 15:01:14 +0200 Jonas Holmberg + + * gst/matroska/matroska-demux.c: + matroskademux: make demuxer reusable + Remove pads from flow combiner and reset last + flow return to FLOW_OK by resetting the flow combiner. + This prevents FLOW_FLUSHING when trying to re-use the + demuxer after setting it back to NULL/READY state. + https://bugzilla.gnome.org/show_bug.cgi?id=737359 + +2014-09-24 16:46:36 +0200 Wim Taymans + + * gst/videomixer/Makefile.am: + * gst/videomixer/gstcms.c: + * gst/videomixer/gstcms.h: + * gst/videomixer/videoconvert.c: + * gst/videomixer/videoconvert.h: + * gst/videomixer/videomixer2.c: + * gst/videomixer/videomixer2pad.h: + * gst/videomixer/videomixerorc-dist.c: + * gst/videomixer/videomixerorc-dist.h: + * gst/videomixer/videomixerorc.orc: + videomixer: use video library code instead of copy + +2014-09-18 16:39:19 +0530 Sanjay NM + + * gst/audioparsers/gstmpegaudioparse.c: + audioparsers: Added index check before using the index + https://bugzilla.gnome.org/show_bug.cgi?id=736878 + +2014-09-23 23:33:37 +0200 Matej Knopp + + * gst/isomp4/gstqtmux.c: + qtmux: Do not infer DTS on buffers from sparse streams. + DTS delta is used to calculate sample duration. If buffer has missing DTS, we take either segment start or previous buffer end time, whichever is later. + This must only be done for non sparse streams, sparse streams can have gaps between buffers (which is handled later by adding extra empty buffer with duration that fills the gap) + https://bugzilla.gnome.org/show_bug.cgi?id=737095 + +2014-09-18 17:08:37 +0530 Sanjay NM + + * gst/goom/ifs.c: + goom: Clarified precedence between % and ? + https://bugzilla.gnome.org/show_bug.cgi?id=736887 + +2014-09-18 17:59:31 +0530 Sanjay NM + + * gst/rtsp/gstrtspsrc.c: + rtsp: clarify expression so operator precedence is clear + https://bugzilla.gnome.org/show_bug.cgi?id=736903 + +2014-09-18 16:04:03 +0530 Sanjay NM + + * ext/libpng/gstpngdec.c: + * gst/alpha/gstalpha.c: + * gst/audiofx/audiodynamic.c: + * gst/audiofx/audiofxbasefirfilter.c: + * gst/audiofx/gstscaletempo.c: + * gst/avi/gstavidemux.c: + * gst/avi/gstavimux.c: + * gst/deinterlace/gstdeinterlace.c: + * gst/isomp4/qtdemux.c: + * gst/matroska/matroska-mux.c: + * gst/rtpmanager/gstrtpmux.c: + * gst/rtpmanager/gstrtprtxreceive.c: + * gst/rtpmanager/rtpsession.c: + Miscellaneous minor cleanups + Fix redundant variables and assignments, + and unreachable breaks. + https://bugzilla.gnome.org/show_bug.cgi?id=736875 + https://bugzilla.gnome.org/show_bug.cgi?id=736876 + https://bugzilla.gnome.org/show_bug.cgi?id=736879 + https://bugzilla.gnome.org/show_bug.cgi?id=736880 + https://bugzilla.gnome.org/show_bug.cgi?id=736881 + https://bugzilla.gnome.org/show_bug.cgi?id=736888 + https://bugzilla.gnome.org/show_bug.cgi?id=736890 + https://bugzilla.gnome.org/show_bug.cgi?id=736892 + https://bugzilla.gnome.org/show_bug.cgi?id=736893 + https://bugzilla.gnome.org/show_bug.cgi?id=736894 + +2014-09-24 00:12:14 +0100 Tim-Philipp Müller + + * gst/videobox/gstvideobox.c: + videobox: remove duplicate assignments + https://bugzilla.gnome.org/show_bug.cgi?id=736897 + +2014-09-23 22:55:48 +0300 Sebastian Dröge + + * gst/audioparsers/gstflacparse.c: + flacparse: Only calculate with durations != -1 + +2014-09-23 19:08:48 +0200 Matej Knopp + + * gst/isomp4/gstqtmux.c: + qtmux: collect pad for sparse stream should be created with lock set to false + Avoids waiting for buffers from sparse streams + https://bugzilla.gnome.org/show_bug.cgi?id=737095 + +2014-09-23 19:07:25 +0200 Matej Knopp + + * gst/isomp4/gstqtmux.c: + qtmux: fix subtitle buffer duration and strip null termination + Strip the \0 off the subtitle as we already know the size and also remember + to set the duration as buffer copying doesn't do it. + https://bugzilla.gnome.org/show_bug.cgi?id=737095 + +2014-09-23 19:06:18 +0200 Matej Knopp + + * gst/isomp4/atoms.c: + qtmux: move subtitle layer above video and set alternate group + layer -1 is above video, that is 0 + And having all subtitles in alternate group 2 means that only one + should be selected at a time. + https://bugzilla.gnome.org/show_bug.cgi?id=737095 + +2014-09-23 09:47:31 +0200 Edward Hervey + + * tests/check/elements/souphttpsrc.c: + check/soup: Temporarily disable G_ENABLE_DIAGNOSTIC + The SOUP_SERVER_PORT property has been deprecated in recent libsoup + versions. + +2014-09-23 09:43:05 +0200 Edward Hervey + + * tests/check/elements/souphttpsrc.c: + check/soup: Define minimum version required + To avoid deprecation warnings + +2014-09-19 19:14:28 +0200 Matej Knopp + + * gst/isomp4/qtdemux.c: + qtdemux: Handle mp4a without ESDS atom + https://bugzilla.gnome.org/show_bug.cgi?id=736986 + +2014-09-22 16:15:27 +0200 Linus Svensson + + * sys/ximage/gstximagesrc.c: + ximagesrc: Fix build problem without XFIXES + +2014-09-19 14:34:13 +0530 Sanjay NM + + * gst/dtmf/gstrtpdtmfdepay.c: + dtmf: Removed unused structure members + https://bugzilla.gnome.org/show_bug.cgi?id=736883 + +2014-09-11 13:48:44 -0300 Reynaldo H. Verdejo Pinochet + + * gst/isomp4/atoms.c: + isomp4: fix wrong DAR calculation for PAR <= 1 + CID #1226452 + https://bugzilla.gnome.org/show_bug.cgi?id=736396 + +2014-09-18 16:59:52 +0530 Sanjay NM + + * gst/flv/gstflvdemux.c: + flv: Removed unreachable break statements + https://bugzilla.gnome.org/show_bug.cgi?id=736884 + +2014-09-17 16:37:11 +0200 Ognyan Tonchev + + * gst/rtpmanager/gstrtpbin.c: + rtpbin: do not leak encsink pad in error case + https://bugzilla.gnome.org/show_bug.cgi?id=736807 + +2014-09-17 16:23:21 +0200 Ognyan Tonchev + + * gst/multipart/multipartdemux.c: + multipartdemux: do not leak new stream event + https://bugzilla.gnome.org/show_bug.cgi?id=736805 + +2014-09-15 09:08:18 +0530 Ravi Kiran K N + + * gst/y4m/gsty4mencode.c: + * gst/y4m/gsty4mencode.h: + y4menc: port y4menc to use GstVideoEncoder base class + https://bugzilla.gnome.org/show_bug.cgi?id=735085 + +2014-09-17 13:55:18 +0300 Sebastian Dröge + + * sys/osxaudio/gstosxcoreaudio.c: + * sys/osxaudio/gstosxcoreaudiocommon.c: + * sys/osxaudio/gstosxcoreaudiohal.c: + * sys/osxaudio/gstosxcoreaudioremoteio.c: + osxaudio: OSStatus is not a fourcc, so don't print it as one... + +2014-09-16 14:26:08 +0200 Ognyan Tonchev + + * gst/audioparsers/gstflacparse.c: + flacparse: do not leak uid after parsing TOC event + https://bugzilla.gnome.org/show_bug.cgi?id=736739 + +2014-09-16 22:47:13 +0300 Sebastian Dröge + + * gst/rtp/gstrtpvrawdepay.c: + rtpvrawdepay: Declare some more required caps fields in the sink template caps + Now only missing are width and height, which are expressed as strings + for RTP... so we can't put them into the template caps. + +2014-09-16 16:46:07 +0530 Vineeth T M + + * ext/gdk_pixbuf/gstgdkpixbufdec.c: + * ext/gdk_pixbuf/gstgdkpixbufdec.h: + gdkpixbufdec: modify wrong packetized mode logic + packetized mode is being set when framerate is being set + which is not correct. Changing the same by checking the + input segement format. If input segment is in TIME it is + Packetized, and if it is in BYTES it is not. + https://bugzilla.gnome.org/show_bug.cgi?id=736252 + +2014-09-16 11:26:22 +0300 Sebastian Dröge + + * ext/jpeg/gstjpegdec.c: + jpegdec: Remove unused variable and use correct decoder variable name + +2014-09-16 11:25:42 +0300 Sebastian Dröge + + * ext/libpng/gstpngdec.c: + pngdec: Remove unused variable + +2014-09-16 13:24:15 +0530 Vineeth T M + + * ext/jpeg/gstjpegdec.c: + jpeggdec: modify wrong packetized mode logic + packetized mode is being set when framerate is being set + which is not correct. Changing the same by checking the + input segement format. If input segment is in TIME it is + Packetized, and if it is in BYTES it is not. + https://bugzilla.gnome.org/show_bug.cgi?id=736252 + +2014-09-16 13:23:16 +0530 Vineeth T M + + * ext/libpng/gstpngdec.c: + pngdec: modify wrong packetized mode logic + packetized mode is being set when framerate is being set + which is not correct. Changing the same by checking the + input segement format. If input segment is in TIME it is + Packetized, and if it is in BYTES it is not. + https://bugzilla.gnome.org/show_bug.cgi?id=736252 + +2014-09-15 14:39:41 +0200 Antonio Ospite + + * sys/ximage/gstximagesrc.c: + * sys/ximage/gstximagesrc.h: + * sys/ximage/ximageutil.c: + * sys/ximage/ximageutil.h: + ximagesrc: Remove unused screen-num property + The screen number can be still specified as part of the display-name + property (e.g. for screen 1 of display 0 use display-name=":0.1"). + https://bugzilla.gnome.org/show_bug.cgi?id=736122 + +2014-09-04 16:10:51 +0200 Antonio Ospite + + * sys/ximage/gstximagesrc.c: + ximagesrc: Draw the cursor only when it is active in the capturing region + Use XQueryPointer to check that the pointer is actually active inside + the capturing region. + This prevents drawing the cursor when the pointer is partially outside + of the captured region but not active inside the region; in particular + this avoids drawing the "window resize" cursor shapes to the captured + image when the mouse pointer crosses a window border. + NOTE that this is not only an optimization, this also happen to fix + a serious problem in multi-screen setups. + Because XFixes gives no information of what screen the pointer is on, + ximagesrc was always drawing the cursor on the captured screen even if + the mouse pointer was on another screen. + For example, when capturing from screen 1 (i.e. display-name=":0.1") the + cursor was drawn in the captured image even when the mouse pointer was + actually on screen 0, which is wrong and visually confusing. + https://bugzilla.gnome.org/show_bug.cgi?id=690646 + +2014-09-05 11:33:31 +0200 Antonio Ospite + + * sys/ximage/gstximagesrc.c: + ximagesrc: Fix drawing the cursor when it is outside the capturing region + When the cursor is partially or totally out of the capturing region on + the top side or on the left side, it gets drawn fully inside of the + region with its coordinates rounded up to the left or to the top border. + This is immediately noticeable when using the xid property to capture + a specific window. + To fix the issue, allow negative cx and cx coordinates when checking the + boundaries before drawing the cursor. + NOTE that the boundaries checking calculations still allows the cursor + to be drawn when it is only partially outside of the capturing region, + but this makes sense and gives a more pleasing visual behaviour. + https://bugzilla.gnome.org/show_bug.cgi?id=690646 + +2014-09-05 00:15:30 +0200 Antonio Ospite + + * sys/ximage/gstximagesrc.c: + * sys/ximage/gstximagesrc.h: + ximagesrc: Fix the destination coordinates of the cursor + XFixes provides the cursor coordinates relative to the root window, this + is not taken into account when using the xid property to capture + a specific window, the result is that the cursor gets drawn at the wrong + position. + In order to fix this consider the window location when calculating the + cursor position in the destination image. + https://bugzilla.gnome.org/show_bug.cgi?id=690646 + +2014-09-15 14:51:24 +0200 Peter Korsgaard + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: O_CLOEXEC needs _GNU_SOURCE + Similar to 94f3d6fc / bz 709423 + On some systems (E.G. uClibc and older Glibc versions), O_CLOEXEC is only + defined when _GNU_SOURCE is specified, so do so. + https://bugzilla.gnome.org/show_bug.cgi?id=736670 + +2014-09-15 18:11:37 +0200 Wim Taymans + + * gst/debugutils/gstcapssetter.c: + capssetter: update to 1.0 transform_caps sematics + In 1.0, we pass the complete caps to transform_caps to allow for better + optimizations. Make this function actually work on non-simple caps + instead of just ignoring the configured filter caps. + +2014-09-08 14:06:00 +0200 Peter G. Baum + + * gst/wavenc/gstwavenc.c: + * gst/wavenc/gstwavenc.h: + wavenc: use WAVE_FORMAT_EXTENSIBLE for more than 2 channels + https://bugzilla.gnome.org/show_bug.cgi?id=733444 + +2014-09-12 15:06:50 +0300 Sebastian Dröge + + * gst/wavparse/gstwavparse.c: + wavparse: Fix parsing of adtl chunks + We have to skip 12 bytes of data for the chunk, and the data size + passed to the sub-chunk parsing functions should have 4 bytes less + than the data size. + Also when parsing the sub-chunks, check if we actually have enough + data to read instead of just crashing. + https://bugzilla.gnome.org/show_bug.cgi?id=736266 + +2014-09-12 10:55:23 +0530 Sanjay NM + + * gst/udp/gstudpsrc.c: + udp: include string.h for memcmp and memset + https://bugzilla.gnome.org//show_bug.cgi?id=736528 + +2014-09-12 13:36:18 +0530 Anuj Jaiswal + + * gst/matroska/matroska-mux.c: + matroskamux: don't bitwise OR the same flag twice + https://bugzilla.gnome.org//show_bug.cgi?id=736543 + +2014-09-12 10:35:36 +0100 Tim-Philipp Müller + + * gst/matroska/matroska-demux.c: + matroskademux: handle real audio 28_8 + Fixes duplicate check for 14_4. + https://bugzilla.gnome.org//show_bug.cgi?id=736543 + +2014-09-11 14:46:09 +0530 Anuj Jaiswal + + * gst/multifile/gstmultifilesink.c: + multifilesink: don't OR the same flag twice + https://bugzilla.gnome.org/show_bug.cgi?id=736462 + +2014-09-11 12:52:11 +0300 Sebastian Dröge + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: If the server reports "Accept-Ranges: none" don't try range requests + +2014-09-10 09:50:45 +0200 Ognyan Tonchev + + * sys/v4l2/gstv4l2sink.c: + v4l2sink: Unref pool after usage + https://bugzilla.gnome.org/show_bug.cgi?id=736384 + +2014-09-09 19:03:50 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2transform.c: + v4l2transform: Don't rank it for now + This will prevent the converter to be picked automatically in case + someone implement dynamic converter selection support. I'd like this + to be ranked only for known device, as it's hard to be sure a device is + a converter suited for general purpose. Re-negotiation is also needed + before we can rank it. + https://bugzilla.gnome.org/show_bug.cgi?id=733607 + +2014-09-05 08:29:20 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2src.c: + * sys/v4l2/gstv4l2src.h: + v4l2: Detect bad drivers timestamps + Even though the UVC driver do a great deal of effort to prevent bad + timestamp to be sent to userspace, there still exist UVC hardware that + are so buggy that the timestamp endup nearly random. This code detect + and ignore timestamp from these drivers, making these camera usable. + This has been tested on both invalid and valid cameras, making sure it + does not trigger for valid cameras. + https://bugzilla.gnome.org/show_bug.cgi?id=732910 + +2014-08-29 17:09:30 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + v4l2allocator: Workaround driver that don't support REQBUFS(0) + There is still around 18 drivers not yet ported to videobuf2. These driver + don't support freeing buffetrs through REQBUFS(0) hence for these the + memory type probing fails. In order to gain back our previous behaviour in + presence of these, we implement a workaround that assuming MMAP is + supported. Note that an allocator is only created for device with + STREAMING support in the device capabilities. In such case one of MMAP, + USERPTR and DMABUF is required. Though DMABUF came afterward, so is + not an option and in practice none of these drivers will only do USERPTR. + https://bugzilla.gnome.org/show_bug.cgi?id=735660 + Also-by: Hans de Goede + +2014-09-04 15:11:40 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + * sys/v4l2/gstv4l2videodec.c: + v4l2: Merge min_buffers_for* variable into one + Reuse the same min_buffers variable for both capture and output, this + reduce the length of lines and make the code more readable. + https://bugzilla.gnome.org/show_bug.cgi?id=736072 + +2014-09-04 18:35:46 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + v4l2: set min_latency for output device according to required minimum number of buffers + Since we can get the minimum number of buffers needed by an output + device to work, use it to set min_latency which will determine how many + buffers are queued. + https://bugzilla.gnome.org/show_bug.cgi?id=736072 + +2014-09-09 16:10:56 +0100 Tim-Philipp Müller + + * tests/check/elements/udpsrc.c: + tests: udpsrc: add check to make sure multiple memory chunks are used + +2014-09-09 15:55:18 +0100 Tim-Philipp Müller + + * tests/check/elements/udpsrc.c: + tests: udpsrc: wait for buffers with GCond instead of sleeping + Avoids half-second sleep for no reason. + +2014-09-09 15:31:32 +0100 Tim-Philipp Müller + + * tests/check/elements/udpsrc.c: + tests: udpsrc: split out socket setup + +2014-09-09 13:46:56 +0100 Tim-Philipp Müller + + * gst/udp/gstudpsrc.c: + udpsrc: more efficient memory handling + Drop use of g_socket_get_available_bytes() which is + not useful on all systems (where it returns the size + of the entire buffer not that of the next pending + packet), and is yet another syscall and apparently + very inefficient on Windows in the UDP case. + Instead, when reading UDP packets, use the more featureful + g_socket_receive_message() call that allows to read into + scattered memory, and allocate one memory chunk which is + likely to be large enough for a packet, while also providing + a larger allocated memory chunk just in case the packet + is larger than expected. If the received data fits into the + first chunk, we'll just add that to the buffer we return + and re-use the fallback buffer for next time, otherwise we + add both chunks to the buffer. + This reduces memory waste more reliably on systems where + get_available_bytes() doesn't work properly. + In a multimedia streaming scenario, incoming UDP packets + are almost never fragmented and thus almost always smaller + than the MTU size, which is also why we don't try to do + something smarter with more fallback memory chunks of + different sizes. The fallback scenario is just for when + someone built a broken sender pipeline (not using a + payloader or somesuch) + https://bugzilla.gnome.org/show_bug.cgi?id=610364 + +2014-09-09 12:15:43 +0100 Tim-Philipp Müller + + * gst/udp/gstudpsrc.c: + * gst/udp/gstudpsrc.h: + udpsrc: rework memory allocation bits and ensure we always have two chunks of memories to read into + First chunk is the likely/expected buffer size, second is as + fallback in case the packet is larger in the end. + Next step: actually use these. + +2014-09-09 09:42:15 +0100 Tim-Philipp Müller + + * gst/udp/gstudpsrc.c: + * gst/udp/gstudpsrc.h: + udpsrc: track max packet size and save allocator negotiated by GstBaseSrc + +2014-09-08 16:15:05 +0100 Tim-Philipp Müller + + * gst/audiofx/audioecho.c: + audioecho: fix example command line + +2014-09-07 12:46:08 +0100 Tim-Philipp Müller + + * gst/avi/gstavidemux.c: + avidemux: fix crash with certain videos + This is a regression from 1.2 caused by the port + to the pad flow combiner. + https://bugzilla.gnome.org/show_bug.cgi?id=736192 + +2014-09-04 16:21:20 +0300 Sebastian Dröge + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-read-common.h: + matroska-demux: Don't handle parse errors at the end of file as an error + But only if they happen after the Matroska segment. + https://bugzilla.gnome.org/show_bug.cgi?id=735833 + +2014-09-04 12:14:11 +0300 Sebastian Dröge + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: Include redirection target in error messages + Just giving the original URI can give the false impression that e.g. + that one failed host name resolution, while actually the redirection target + did. + +2014-09-02 11:13:44 +0400 Andrei Sarakeev + + * gst/videomixer/videomixer2.c: + videomixer: Fix synchronization if dynamically changing the FPS + https://bugzilla.gnome.org/show_bug.cgi?id=735859 + +2014-09-02 13:52:43 +0530 Ravi Kiran K N + + * gst/smpte/gstsmpte.c: + smpte: Check if input caps are the same and create output caps from video info + This makes sure that also properties like the pixel-aspect-ratio are the same + between both streams and that the output caps contain all fields necessary for + complete video caps. + https://bugzilla.gnome.org/show_bug.cgi?id=735804 + +2014-09-02 17:22:07 +0530 Vineeth T M + + * gst/imagefreeze/gstimagefreeze.c: + imagefreeze: replace with gst_buffer_copy + gst_buffer_ref and gst_buffer_writable is being used to create a writable copy of source buffer. + replacing the same with gst_buffer_copy as the functionality is same. + https://bugzilla.gnome.org/show_bug.cgi?id=735880 + +2014-09-03 23:06:53 +0100 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + qtdemux: mark jpeg and png as parsed so avdec_mjpeg can be used too + https://bugzilla.gnome.org/show_bug.cgi?id=735971 + +2014-09-03 11:46:13 +0530 Vineeth T M + + * ext/gdk_pixbuf/gstgdkpixbufdec.c: + gdkpixbufdec: free query after use + In gst_gdk_pixbuf_dec_setup_pool(), query is being allocated using + gst_query_new_allocation(), but the same is not unreferenced + hence calling gst_query_unref() after usage of query. + https://bugzilla.gnome.org/show_bug.cgi?id=735950 + +2014-09-03 23:46:34 +1000 Jan Schmidt + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux_types.c: + qtdemux: Silence some warnings for normal file contents + +2014-09-01 09:56:02 +0200 Nicolas Huet + + * gst/audioparsers/gstaacparse.c: + aacparse: Fix parsing issue when the buffer does not have a complete ADTS/LOAS frame + https://bugzilla.gnome.org/show_bug.cgi?id=735520 + +2014-09-02 09:09:49 +0300 Sebastian Dröge + + * ext/vpx/gstvp9dec.c: + vp9dec: Get input width/height from the codec instead of the input caps + They are reported properly by libvpx if the correct struct members are used. + This also fixes handling of resolution changes without input caps changes. + https://bugzilla.gnome.org/show_bug.cgi?id=719359 + +2013-10-22 18:49:22 +0100 Tom Greenwood + + * ext/vpx/gstvp8dec.c: + vp8dec: Fix for handling resolution changes when decoding VP8 + If the resolution changes in the bitstream without the input caps changing we + would previously output corrupted video or crash. + https://bugzilla.gnome.org/show_bug.cgi?id=719359 + +2014-09-02 00:55:17 -0300 Thiago Santos + + * ext/vpx/gstvp9dec.c: + vp9dec: Fix segfault when a new caps is received + Remember to unref the output caps when a new caps event is received + as it should generate a new one based on the new caps. + https://bugzilla.gnome.org/show_bug.cgi?id=734266 + +2014-09-02 00:54:35 -0300 Thiago Santos + + * tests/check/elements/vp8dec.c: + tests: vp8dec: add test for caps renegotiation + Check that vp8dec can properly accept a new caps when upstream + changes it + https://bugzilla.gnome.org/show_bug.cgi?id=734266 + +2014-08-05 10:34:39 +0200 Jose Antonio Santos Cadenas + + * ext/vpx/gstvp8dec.c: + vp8dec: Reset output and input states when changing format + https://bugzilla.gnome.org/show_bug.cgi?id=734266 + +2014-09-01 16:39:23 +0530 Vineeth T M + + * gst/imagefreeze/gstimagefreeze.c: + imagefreeze: Don't call gst_caps_unref() on template caps when already unreferenced + Adding an extra condition while calling gst_caps_unref (templ) + and replacing gst_caps_make_writable (gst_caps_ref (caps)) with + gst_caps_copy (caps) in line 177, since the functionality is same. + https://bugzilla.gnome.org/show_bug.cgi?id=735795 + +2014-08-29 12:01:27 +0200 Hans de Goede + + * sys/v4l2/gstv4l2object.c: + v4l2: get_nearest_size: Fix "Unsupported field type" errors + Most V4L2 ioctls like try_fmt will adjust input fields to match what the + hardware can do rather then returning -EINVAL. As is docmented here: + http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-fmt.html + EINVAL is only returned if the buffer type field is invalid or not supported. + So upon requesting V4L2_FIELD_NONE devices which can only do interlaced + mode will change the field value to e.g. V4L2_FIELD_BOTTOM as only returning + half the lines is the closest they can do to progressive modes. + In essence this means that we've failed to get a (usable) progessive mode + and should fall back to interlaced mode. + This commit adds a check for having gotten a usable field value after the first + try_fmt, to force fallback to interlaced mode even if the try_fmt succeeded, + thereby fixing get_nearest_size failing on these devices. + https://bugzilla.gnome.org/show_bug.cgi?id=735660 + +2014-08-29 10:57:20 +0200 Hans de Goede + + * sys/v4l2/gstv4l2object.c: + v4l2: get_nearest_size: Always reinit all struct fields on retry + They may have been modified by the ioctl even if it failed. This also makes + the S_FMT fallback path try progressive first, making it consistent with the + preferred TRY_FMT path. + https://bugzilla.gnome.org/show_bug.cgi?id=735660 + +2014-08-29 11:55:26 +0300 Sebastian Dröge + + * gst/wavparse/gstwavparse.c: + wavparse: Store size of data tag in a 64 bit integer locally too + Otherwise we will clip the DS64 value of RF64 files to 32 bits again. + +2014-08-29 11:53:23 +0300 Sebastian Dröge + + * gst/wavparse/gstwavparse.c: + wavparse: Use 64 bit scaling functions now that fact is a 64 bit integer + +2014-08-27 18:55:18 +0200 Peter G. Baum + + * gst/wavparse/gstwavparse.c: + * gst/wavparse/gstwavparse.h: + wavparse: support rf64 format + https://bugzilla.gnome.org/show_bug.cgi?id=735627 + +2014-08-28 13:48:50 -0600 Jason Litzinger + + * gst/multipart/multipartdemux.c: + multipartdemux: Ensure caps before pad added. + This stores the stream-start, sets caps, and then adds the pad, + which ensures that the caps are set for the "pad-added" callback. + https://bugzilla.gnome.org/show_bug.cgi?id=735626 + +2014-08-28 15:03:50 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + flvmux: Fallback to PTS if DTS is missing + Fixing a regression introduce when fixing: + https://bugzilla.gnome.org/show_bug.cgi?id=731352 + +2014-08-28 16:13:29 +0530 Vineeth T M + + * gst/imagefreeze/gstimagefreeze.c: + imagefreeze: Remove impossible error condition + We return EOS after the first buffer, and GstPad will make sure now that we + won't get any other buffer afterwards until a flush happens. No need to check + for it ourselves. + https://bugzilla.gnome.org/show_bug.cgi?id=735581 + +2014-08-28 13:53:23 +0530 Vineeth T M + + * ext/gdk_pixbuf/gstgdkpixbufdec.c: + gdkpixbufdec: EOS and NOT_LINKED are no errors in general + Don't post an error message for them but let upstream handle + anything accordingly. + https://bugzilla.gnome.org/show_bug.cgi?id=735564 + +2014-08-27 21:07:26 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + * gst/flv/gstflvmux.h: + flvmux: Correctly offset timestamp + The previous method would break AV sync in the case audio or video + didn't start at the same point in running time. + https://bugzilla.gnome.org/show_bug.cgi?id=731352 + +2014-08-27 20:56:12 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + flvmux: Save dts from buffer + We no longer set dts in muxed buffer. This would lead to encoding tags + with timestamp 0 instead of the timestamp of previous buffer. + https://bugzilla.gnome.org/show_bug.cgi?id=731352 + +2014-07-28 20:58:59 -0400 Nicolas Dufresne + + * gst/flv/gstflvmux.c: + * gst/flv/gstflvmux.h: + flvmux: Ensure Timestamp starts at 0 + FLV documentation stipulates that timestamp must start at zero. + In order to respect this rule, keep the first timestamp around + and offset the timestamp from this value. This allow for longer + recording time in presence of timestamp that does not start + at 0 already. + https://bugzilla.gnome.org/show_bug.cgi?id=731352 + +2014-06-06 23:17:52 -0400 Nicolas Dufresne + + * gst/flv/gstflvdemux.c: + * gst/flv/gstflvdemux.h: + * gst/flv/gstflvmux.c: + flv: Tag timestamp are DTS not PTS + The tags in FLV are DTS. In audio cases, and for many video format this makes + no difference, but for AVC with B-Frames, PTS need to be computed from + composition timestamp CTS, with PTS = DTS + CTS. + https://bugzilla.gnome.org/show_bug.cgi?id=731352 + +2014-08-07 21:58:14 -0400 Youness Alaoui + + * gst/rtpmanager/gstrtpjitterbuffer.c: + jitterbuffer: Allow rtp caps without clock-rate + The jitterbuffer shouldn't force clock-rate on its sink pad, this will cause a negotiation issue since rtpssrcdemux doesn't have the clock-rate and doesn't add it to the caps. The documentation states that the clock-rate can either be specified through the caps or through the request-pt-map signal, so we must remove clock-rate from the pad templates and we must accept the GST_EVENT_CAPS if the caps don't have the clock-rate. + https://bugzilla.gnome.org/show_bug.cgi?id=734322 + +2014-08-18 14:05:52 -0300 Thiago Santos + + * gst/isomp4/qtdemux.c: + qtdemux: avoid crashing on dash streams + DASH/fragmented moov might have no samples as those are carried + in moof fragments. Avoid crashing or failing the stream because + of that. + +2014-08-18 10:33:48 +0530 Ravi Kiran K N + + * tests/examples/equalizer/demo.c: + * tests/examples/spectrum/demo-audiotest.c: + * tests/examples/spectrum/demo-osssrc.c: + examples: use 'post-messages' property instead of deprecated 'message' property + https://bugzilla.gnome.org/show_bug.cgi?id=734979 + +2014-08-18 11:45:54 +0200 Víctor Manuel Jáquez Leal + + * gst/udp/gstudpsrc.c: + udp: fix udpsrc documentation + udpsrc gtk-doc documentation refers to sockfd and closefd properties which has + been removed. This patch replaces those references to socket and close-socket + respectively. + https://bugzilla.gnome.org/show_bug.cgi?id=734987 + +2014-08-15 10:09:56 +1000 Jan Schmidt + + * gst/isomp4/gstqtmux.c: + qtmux: Make the default timescale 1/1800 second + The old default timescale of 1 millisecond produces irrational + numbers for a lot of framerate/audio-packet-duration multiples. + 1/1800 is a nicer number, as it tends to produce better fractions + and therefore slightly higher accuracy overall + +2014-08-15 01:17:27 +1000 Jan Schmidt + + * gst/matroska/matroska-demux.c: + matroska: Use gst_video_guess_framerate() function + Remove local framerate guessing function in favour of + the new gst_video_guess_framerate() function. + +2014-08-15 01:12:20 +1000 Jan Schmidt + + * gst/isomp4/Makefile.am: + * gst/isomp4/qtdemux.c: + qtdemux: Improve framerate calculation/guessing + Change the way the output framerate is calculated + to ignore the first sample (which is sometimes truncated + in my testing) and use the new gst_video_guess_framerate() + function to recognise common standard framerates better. + Remove the code that was sorting the first 20 sample + durations and then ignoring the result. + +2014-08-14 16:36:44 +0300 Sebastian Dröge + + * gst/videomixer/videomixer2.c: + videomixer: Use the best width/height/etc if downstream can handle that + Before it was always using whatever downstream preferred, while + the code and documentation claimed something different. + https://bugzilla.gnome.org/show_bug.cgi?id=727180 + +2014-08-14 11:29:00 +0530 Ravi Kiran K N + + * gst/videomixer/videomixer2.c: + videomixer: Avoid double free of VideoConvert + https://bugzilla.gnome.org/show_bug.cgi?id=734764 + +2014-08-13 11:58:35 +0100 Tim-Philipp Müller + + * gst/flv/gstflvdemux.c: + flvdemux: fix indentation + +2014-08-13 11:54:26 +0100 Tim-Philipp Müller + + * gst/flv/gstflvdemux.c: + flvdemux: un-break duration querying + Commit 2b9493b5 broke this in two ways: a) we should only + pass duration queries in TIME format upstream (or at least + not those in DEFAULT or BYTE format), and b) we mustn't + overwrite the default value of 'res' from TRUE to FALSE + and not set it again later. This led to bogus durations + being reported for FLV playback from file, because TIME + queries would fail (as 'res' had been set to FALSE) and + parsers then do a BYTE query as fallback and try to guesstimate something in return, which of course goes horribly wrong since the BYTE size returned is for the muxed file. +2014-08-13 13:23:10 +0300 Sebastian Dröge + + * gst/videofilter/gstvideobalance.c: + videobalance: Allow any raw caps in passthrough mode, not just the ones we handle + +2014-08-13 13:04:21 +0300 Sebastian Dröge + + * gst/videofilter/gstvideobalance.c: + videobalance: Allow ANY capsfeatures, but only in passthrough mode + When changing the properties to not be in passthrough mode anymore, + we will only accept caps we can process ourselves, potentially causing + a not-negotiated error. + https://bugzilla.gnome.org/show_bug.cgi?id=720345 + +2014-08-12 11:34:30 +0100 Tim-Philipp Müller + + * docs/plugins/inspect/plugin-1394.xml: + * docs/plugins/inspect/plugin-aasink.xml: + * docs/plugins/inspect/plugin-alaw.xml: + * docs/plugins/inspect/plugin-alpha.xml: + * docs/plugins/inspect/plugin-alphacolor.xml: + * docs/plugins/inspect/plugin-apetag.xml: + * docs/plugins/inspect/plugin-audiofx.xml: + * docs/plugins/inspect/plugin-audioparsers.xml: + * docs/plugins/inspect/plugin-auparse.xml: + * docs/plugins/inspect/plugin-autodetect.xml: + * docs/plugins/inspect/plugin-avi.xml: + * docs/plugins/inspect/plugin-cacasink.xml: + * docs/plugins/inspect/plugin-cairo.xml: + * docs/plugins/inspect/plugin-cutter.xml: + * docs/plugins/inspect/plugin-debug.xml: + * docs/plugins/inspect/plugin-deinterlace.xml: + * docs/plugins/inspect/plugin-dtmf.xml: + * docs/plugins/inspect/plugin-dv.xml: + * docs/plugins/inspect/plugin-effectv.xml: + * docs/plugins/inspect/plugin-equalizer.xml: + * docs/plugins/inspect/plugin-flac.xml: + * docs/plugins/inspect/plugin-flv.xml: + * docs/plugins/inspect/plugin-flxdec.xml: + * docs/plugins/inspect/plugin-gdkpixbuf.xml: + * docs/plugins/inspect/plugin-goom.xml: + * docs/plugins/inspect/plugin-goom2k1.xml: + * docs/plugins/inspect/plugin-icydemux.xml: + * docs/plugins/inspect/plugin-id3demux.xml: + * docs/plugins/inspect/plugin-imagefreeze.xml: + * docs/plugins/inspect/plugin-interleave.xml: + * docs/plugins/inspect/plugin-isomp4.xml: + * docs/plugins/inspect/plugin-jack.xml: + * docs/plugins/inspect/plugin-jpeg.xml: + * docs/plugins/inspect/plugin-level.xml: + * docs/plugins/inspect/plugin-matroska.xml: + * docs/plugins/inspect/plugin-mulaw.xml: + * docs/plugins/inspect/plugin-multifile.xml: + * docs/plugins/inspect/plugin-multipart.xml: + * docs/plugins/inspect/plugin-navigationtest.xml: + * docs/plugins/inspect/plugin-oss4.xml: + * docs/plugins/inspect/plugin-ossaudio.xml: + * docs/plugins/inspect/plugin-png.xml: + * docs/plugins/inspect/plugin-pulseaudio.xml: + * docs/plugins/inspect/plugin-replaygain.xml: + * docs/plugins/inspect/plugin-rtp.xml: + * docs/plugins/inspect/plugin-rtpmanager.xml: + * docs/plugins/inspect/plugin-rtsp.xml: + * docs/plugins/inspect/plugin-shapewipe.xml: + * docs/plugins/inspect/plugin-shout2send.xml: + * docs/plugins/inspect/plugin-smpte.xml: + * docs/plugins/inspect/plugin-soup.xml: + * docs/plugins/inspect/plugin-spectrum.xml: + * docs/plugins/inspect/plugin-speex.xml: + * docs/plugins/inspect/plugin-taglib.xml: + * docs/plugins/inspect/plugin-udp.xml: + * docs/plugins/inspect/plugin-video4linux2.xml: + * docs/plugins/inspect/plugin-videobox.xml: + * docs/plugins/inspect/plugin-videocrop.xml: + * docs/plugins/inspect/plugin-videofilter.xml: + * docs/plugins/inspect/plugin-videomixer.xml: + * docs/plugins/inspect/plugin-vpx.xml: + * docs/plugins/inspect/plugin-wavenc.xml: + * docs/plugins/inspect/plugin-wavpack.xml: + * docs/plugins/inspect/plugin-wavparse.xml: + * docs/plugins/inspect/plugin-ximagesrc.xml: + * docs/plugins/inspect/plugin-y4menc.xml: + docs: update for git + +2014-08-12 11:33:56 +0100 Tim-Philipp Müller + + * configure.ac: + configure: build ximagesrc again when checks succeed + Third time lucky, hopefully. + +2014-08-11 09:26:17 +0100 Tim-Philipp Müller + + * configure.ac: + configure: fix x11 checks to be non-fatal again + Must pass an action-if-not-found argument to + PKG_CHECK_MODULES or it will error out when + it can't find the module requested. Also fix + AC_CHECK_LIB usage, extra libs argument was + in the wrong place. + +2014-08-07 17:12:38 +0300 George Kiagiadakis + + * gst/isomp4/qtdemux.c: + qtdemux: forward DISCONT from upstream to the output streams + This makes sense in DASH reverse playback, where the upstream dashdemux + will download DASH segments in reverse order, but push their buffers + forward to qtdemux and mark each segment start as DISCONT. This needs + to be forwarded downstream to the parser/decoder, otherwise it won't work. + https://bugzilla.gnome.org/show_bug.cgi?id=734443 + +2014-08-10 18:55:07 +0100 Tim-Philipp Müller + + * configure.ac: + configure: use pkg-config to detect x11 and simplify checks + AC_PATH_XTRA macro unnecessarily pulls in libSM and libICE. + https://bugzilla.gnome.org/show_bug.cgi?id=731047 + +2014-08-10 12:30:07 +0200 Mark Nauwelaerts + + * tests/check/elements/rtp-payloading.c: + tests: rtp-payloading: adjust test data to avoid NAL chopping + ... and correspondingly unexpected buffer sizes. + +2014-08-09 14:22:42 +0200 Sebastian Rasmussen + + * ext/speex/gstspeexenc.c: + speexenc: Improve annotation of internal function + https://bugzilla.gnome.org/show_bug.cgi?id=734542 + 2014-08-08 12:54:30 +0200 Sebastian Rasmussen * gst/shapewipe/gstshapewipe.c: @@ -516,20 +9444,24 @@ shapewipe: Unref caps and element after usage https://bugzilla.gnome.org/show_bug.cgi?id=734478 -2014-07-28 16:49:16 +0200 Philippe Normand +2014-08-09 20:47:30 +0100 Tim-Philipp Müller - * gst/interleave/interleave.c: - * tests/check/elements/interleave.c: - interleave: set output caps layout to interleaved - Set output caps layout independently from input caps layout which can - be either non-interleaved or interleaved. - https://bugzilla.gnome.org/show_bug.cgi?id=733866 + * gst/isomp4/qtdemux.c: + qtdemux: improve debug logging of fourccs + If we can't show ASCII, at least show them + in big endian order. -2014-08-10 12:30:07 +0200 Mark Nauwelaerts +2014-08-09 20:46:04 +0100 Tim-Philipp Müller - * tests/check/elements/rtp-payloading.c: - tests: rtp-payloading: adjust test data to avoid NAL chopping - ... and correspondingly unexpected buffer sizes. + * gst/isomp4/qtdemux.c: + qtdemux: add support for 'wma ' mapping as found in some ismv files + e.g. To_The_Limit_720_2962.ismv + +2014-08-09 18:31:20 +0100 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + qtdemux: add support for 'vc-1' mapping as found in some ismv files + e.g. To_The_Limit_720_2962.ismv 2014-08-07 16:34:36 +0200 Sebastian Rasmussen @@ -561,11 +9493,49 @@ rtpmux: Unref pad template caps after usage Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734473 +2014-08-05 11:47:39 +0200 Srimanta Panda + + * gst/rtp/gstrtph264pay.c: + rtph264pay: append packetization mode parameter to SDP + Append packetization-mode parameter to SDP description. + Packetization mode signals the properties of an RTP payload type. + https://bugzilla.gnome.org/show_bug.cgi?id=733556 + +2014-08-08 03:58:14 +1000 Jan Schmidt + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/qtdemux.c: + isomp4/qtmux: Write correct file duration when gaps exist. + When writing out a trak with an edit list, make sure the + overall file duration is also updated to reflect the + lengthening of the stream. + Add some more debug to qtdemux to warn about streams that + are longer than the file and get truncated. + +2014-08-04 15:39:17 +0200 Sebastian Dröge + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Push the correct segment in TCP mode when seeking + 2014-08-03 12:33:32 +0200 Mark Nauwelaerts * gst/rtp/gstrtph264pay.c: rtph264pay: unbreak au aligned byte-stream payloading +2014-07-22 13:24:09 +0200 Srimanta Panda + + * gst/rtp/gstrtph264pay.c: + rtph264pay: append profile-level-id to SDP + Append profile-level-id to SDP if available. + https://bugzilla.gnome.org/show_bug.cgi?id=733539 + +2014-07-31 18:47:49 +0200 Edward Hervey + + * Makefile.am: + * common: + Makefile: Add usage of build-checks step + Allows building checks without running them + 2014-07-31 09:53:53 -0400 Nicolas Dufresne * sys/ximage/ximageutil.c: @@ -581,6 +9551,87 @@ free the buffers, or already TRUE and lead to a crash: Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=733695 +2014-07-28 16:49:16 +0200 Philippe Normand + + * gst/interleave/interleave.c: + * tests/check/elements/interleave.c: + interleave: set output caps layout to interleaved + Set output caps layout independently from input caps layout which can + be either non-interleaved or interleaved. + https://bugzilla.gnome.org/show_bug.cgi?id=733866 + +2014-07-26 12:06:39 -0300 Thiago Santos + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: clear gcond + +2014-07-25 14:30:33 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + Revert "v4l2bufferpool: Workaround elements not requesting any buffers" + This was a tempory workaround, we should fix the encoders that do not + negotatiate the amount of buffers they need. + This reverts commit d03bcba3db15d06dbdea6b776a6f28ed2f03272a. + +2014-07-08 14:31:59 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2object.c: + v4l2object: Don't share own pool if min exceed V4L2 capacity + If the minimum required buffer exceed V4L2 capacity, don't share down + pool. This allow support very high latency, like with x264enc default + encoding settings. + https://bugzilla.gnome.org/show_bug.cgi?id=732288 + +2014-07-25 17:42:20 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2object.c: + v4l2object: query minimum required buffers for output + Some v4l2 devices could require a minimum buffers different from default + values. Rather than blindly propose a pool with min-buffers set to the + default value, it ask the device using control ioctl. + https://bugzilla.gnome.org/show_bug.cgi?id=733750 + +2014-07-23 18:40:10 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2sink.c: + v4l2sink: use directly 'obj' instead of 'v4l2sink->v4l2object' + https://bugzilla.gnome.org/show_bug.cgi?id=733616 + +2014-07-23 18:39:50 +0200 Aurélien Zanelli + + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2sink.c: + v4l2: set debug messages according to device type and IO mode + https://bugzilla.gnome.org/show_bug.cgi?id=733616 + +2014-05-24 19:02:59 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2object.c: + v4l2object: Remove is_active checks + These checks are no longer required with recent change to the bufferpool. This + should allow changing the configuartion, hence the way forward renegotiation + support. + https://bugzilla.gnome.org/show_bug.cgi?id=728268 + +2014-07-21 18:11:16 +0100 Tim-Philipp Müller + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux_lang.c: + qtdemux: fix language code parsing for 3-letter codes starting with 'a' + And handle special value for 'unspecified' explicitly. + https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html + +2014-07-08 02:18:27 +0200 Nicola Murino + + * ext/jpeg/gstjpegenc.c: + jpegenc: Add support for encoding from NV21 and NV12 + https://bugzilla.gnome.org/show_bug.cgi?id=732870 + +2014-07-19 18:04:38 +0200 Sebastian Dröge + + * configure.ac: + Back to development + === release 1.4.0 === 2014-07-19 17:20:34 +0200 Sebastian Dröge diff -Nru gst-plugins-good1.0-1.4.3/common/check.mak gst-plugins-good1.0-1.6.1/common/check.mak --- gst-plugins-good1.0-1.4.3/common/check.mak 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/check.mak 2015-10-22 08:03:07.000000000 +0000 @@ -16,37 +16,38 @@ # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ - $(TESTS_ENVIRONMENT) \ + $(AM_TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # just like 'check', but don't run it again if it fails (useful for debugging) %.check-norepeat: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ - $(TESTS_ENVIRONMENT) \ + $(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ - $(TESTS_ENVIRONMENT) \ + $(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % - @$(TESTS_ENVIRONMENT) \ + @valgrind_log=$(subst /,-,$*-valgrind.log); \ + $(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ @@ -55,16 +56,16 @@ --tool=memcheck --leak-check=full --trace-children=yes \ --show-possibly-lost=no \ --leak-resolution=high --num-callers=20 \ - ./$* 2>&1 | tee valgrind.log - @if grep "==" valgrind.log > /dev/null 2>&1; then \ - rm valgrind.log; \ + ./$* 2>&1 | tee $$valgrind_log ; \ + if grep "==" $$valgrind_log > /dev/null 2>&1; then \ + rm $$valgrind_log; \ exit 1; \ - fi - @rm valgrind.log + fi ; \ + rm $$valgrind_log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ @@ -94,7 +95,7 @@ # gdb any given test by running make test.gdb %.gdb: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_FORK=no \ $(LIBTOOL) --mode=execute \ gdb $* @@ -150,19 +151,13 @@ # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." - @failed=0; \ + @failed=0; valgrind_targets=""; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ - $(MAKE) $$t.valgrind; \ - if test "$$?" -ne 0; then \ - echo "Valgrind error for test $$t"; \ - failed=`expr $$failed + 1`; \ - whicht="$$whicht $$t"; \ - fi; \ + valgrind_targets="$$valgrind_targets $$t.valgrind"; \ done; \ - if test "$$failed" -ne 0; then \ - echo "$$failed tests had leaks or errors under valgrind:"; \ - echo "$$whicht"; \ - false; \ + if ! $(MAKE) $$valgrind_targets ; then \ + echo "Some tests had leaks or errors under valgrind"; \ + false; \ fi # valgrind all tests until failure @@ -210,11 +205,14 @@ GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_API_VERSION) inspect: @echo "Inspecting features ..." - @for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ + @for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done +# build all tests +build-checks: $(TESTS) + help: @echo @echo "make check -- run all checks" @@ -237,6 +235,7 @@ @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" + @echo "make build-checks -- build all checks (but don't run them)" @echo @echo @echo "Additionally, you can use the GST_CHECKS environment variable to" diff -Nru gst-plugins-good1.0-1.4.3/common/gst-autogen.sh gst-plugins-good1.0-1.6.1/common/gst-autogen.sh --- gst-plugins-good1.0-1.4.3/common/gst-autogen.sh 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/gst-autogen.sh 2015-10-22 08:03:07.000000000 +0000 @@ -20,216 +20,6 @@ fi } -version_get () -# based on the command's version output, set variables -# _MAJOR, _MINOR, _MICRO, _VERSION, using the given prefix as variable prefix -# -# arg 1: command binary name -# arg 2: (uppercased) variable name prefix -{ - COMMAND=$1 - VARPREFIX=`echo $2 | tr .,- _` - local ${VARPREFIX}_VERSION - - # strip everything that's not a digit, then use cut to get the first field - pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1` - debug "pkg_version $pkg_version" - # remove any non-digit characters from the version numbers to permit numeric - # comparison - pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g` - pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g` - pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g` - test -z "$pkg_major" && pkg_major=0 - test -z "$pkg_minor" && pkg_minor=0 - test -z "$pkg_micro" && pkg_micro=0 - debug "found major $pkg_major minor $pkg_minor micro $pkg_micro" - eval ${VARPREFIX}_MAJOR=$pkg_major - eval ${VARPREFIX}_MINOR=$pkg_minor - eval ${VARPREFIX}_MICRO=$pkg_micro - eval ${VARPREFIX}_VERSION=$pkg_version -} - -version_compare () -# Checks whether the version of VARPREFIX is equal to or -# newer than the requested version -# arg1: VARPREFIX -# arg2: MAJOR -# arg3: MINOR -# arg4: MICRO -{ - VARPREFIX=`echo $1 | tr .,- _` - MAJOR=$2 - MINOR=$3 - MICRO=$4 - - eval pkg_major=\$${VARPREFIX}_MAJOR; - eval pkg_minor=\$${VARPREFIX}_MINOR; - eval pkg_micro=\$${VARPREFIX}_MICRO; - - #start checking the version - debug "version_compare: $VARPREFIX against $MAJOR.$MINOR.$MICRO" - - # reset check - WRONG= - - if [ ! "$pkg_major" -gt "$MAJOR" ]; then - debug "major: $pkg_major <= $MAJOR" - if [ "$pkg_major" -lt "$MAJOR" ]; then - debug "major: $pkg_major < $MAJOR" - WRONG=1 - elif [ ! "$pkg_minor" -gt "$MINOR" ]; then - debug "minor: $pkg_minor <= $MINOR" - if [ "$pkg_minor" -lt "$MINOR" ]; then - debug "minor: $pkg_minor < $MINOR" - WRONG=1 - elif [ "$pkg_micro" -lt "$MICRO" ]; then - debug "micro: $pkg_micro < $MICRO" - WRONG=1 - fi - fi - fi - if test ! -z "$WRONG"; then - debug "version_compare: $VARPREFIX older than $MAJOR.$MINOR.$MICRO" - return 1 - fi - debug "version_compare: $VARPREFIX equal to/newer than $MAJOR.$MINOR.$MICRO" - return 0 -} - - -version_check () -# check the version of a package -# first argument : package name (executable) -# second argument : optional path where to look for it instead -# third argument : source download url -# rest of arguments : major, minor, micro version -# all consecutive ones : suggestions for binaries to use -# (if not specified in second argument) -{ - PACKAGE=$1 - PKG_PATH=$2 - URL=$3 - MAJOR=$4 - MINOR=$5 - MICRO=$6 - - # for backwards compatibility, we let PKG_PATH=PACKAGE when PKG_PATH null - if test -z "$PKG_PATH"; then PKG_PATH=$PACKAGE; fi - debug "major $MAJOR minor $MINOR micro $MICRO" - VERSION=$MAJOR - if test ! -z "$MINOR"; then VERSION=$VERSION.$MINOR; else MINOR=0; fi - if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi - - debug "major $MAJOR minor $MINOR micro $MICRO" - - for SUGGESTION in $PKG_PATH; do - COMMAND="$SUGGESTION" - - # don't check if asked not to - test -z "$NOCHECK" && { - printf " checking for $COMMAND >= $VERSION ... " - } || { - # we set a var with the same name as the package, but stripped of - # unwanted chars - VAR=`echo $PACKAGE | sed 's/-//g'` - debug "setting $VAR" - eval $VAR="$COMMAND" - return 0 - } - - which $COMMAND > /dev/null 2>&1 - if test $? -eq 1; - then - debug "$COMMAND not found" - continue - fi - - VARPREFIX=`echo $COMMAND | sed 's/-//g' | tr [:lower:] [:upper:]` - version_get $COMMAND $VARPREFIX - - version_compare $VARPREFIX $MAJOR $MINOR $MICRO - if test $? -ne 0; then - echo "found $pkg_version, not ok !" - continue - else - echo "found $pkg_version, ok." - # we set a var with the same name as the package, but stripped of - # unwanted chars - VAR=`echo $PACKAGE | sed 's/-//g'` - debug "setting $VAR" - eval $VAR="$COMMAND" - return 0 - fi - done - - echo "$PACKAGE not found !" - echo "You must have $PACKAGE installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at $URL" - return 1; -} - -aclocal_check () -{ - # normally aclocal is part of automake - # so we expect it to be in the same place as automake - # so if a different automake is supplied, we need to adapt as well - # so how's about replacing automake with aclocal in the set var, - # and saving that in $aclocal ? - # note, this will fail if the actual automake isn't called automake* - # or if part of the path before it contains it - if [ -z "$automake" ]; then - echo "Error: no automake variable set !" - return 1 - else - aclocal=`echo $automake | sed s/automake/aclocal/` - debug "aclocal: $aclocal" - if [ "$aclocal" != "aclocal" ]; - then - CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal" - fi - if [ ! -x `which $aclocal` ]; then - echo "Error: cannot execute $aclocal !" - return 1 - fi - fi -} - -autoheader_check () -{ - # same here - autoheader is part of autoconf - # use the same voodoo - if [ -z "$autoconf" ]; then - echo "Error: no autoconf variable set !" - return 1 - else - autoheader=`echo $autoconf | sed s/autoconf/autoheader/` - debug "autoheader: $autoheader" - if [ "$autoheader" != "autoheader" ]; - then - CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader" - fi - if [ ! -x `which $autoheader` ]; then - echo "Error: cannot execute $autoheader !" - return 1 - fi - fi - -} - -die_check () -{ - # call with $DIE - # if set to 1, we need to print something helpful then die - DIE=$1 - if test "x$DIE" = "x1"; - then - echo - echo "- Please get the right tools before proceeding." - echo "- Alternatively, if you're sure we're wrong, run with --nocheck." - exit 1 - fi -} autogen_options () { diff -Nru gst-plugins-good1.0-1.4.3/common/gstdoc-scangobj gst-plugins-good1.0-1.6.1/common/gstdoc-scangobj --- gst-plugins-good1.0-1.4.3/common/gstdoc-scangobj 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/gstdoc-scangobj 2015-10-22 08:03:07.000000000 +0000 @@ -110,6 +110,8 @@ my $new_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites.new"; my $old_args_filename = "$OUTPUT_DIR/$MODULE.args"; my $new_args_filename = "$OUTPUT_DIR/$MODULE.args.new"; +my $old_sections_filename = "$OUTPUT_DIR/$MODULE-sections"; +my $new_sections_filename = "$OUTPUT_DIR/$MODULE-sections.new"; my $debug_log="g_message"; if (!defined($VERBOSE) or $VERBOSE eq "0") { @@ -437,32 +439,30 @@ const gchar *interfaces_filename = "$new_interfaces_filename"; const gchar *prerequisites_filename = "$new_prerequisites_filename"; const gchar *args_filename = "$new_args_filename"; +const gchar *sections_filename = "$new_sections_filename"; static void output_signals (void); -static void output_object_signals (FILE *fp, - GType object_type); -static void output_object_signal (FILE *fp, - const gchar *object_class_name, +static void output_object_signals (FILE *fp, GType object_type); +static void output_object_signal (FILE *fp, const gchar *object_class_name, guint signal_id); -static const gchar * get_type_name (GType type, - gboolean * is_pointer); +static const gchar * get_type_name (GType type, gboolean * is_pointer); static void output_object_hierarchy (void); -static void output_hierarchy (FILE *fp, - GType type, - guint level); +static void output_hierarchy (FILE *fp, GType type, guint level); static void output_object_interfaces (void); -static void output_interfaces (FILE *fp, - GType type); +static void output_interfaces (FILE *fp, GType type); static void output_interface_prerequisites (void); -static void output_prerequisites (FILE *fp, - GType type); +static void output_prerequisites (FILE *fp, GType type); static void output_args (void); static void output_object_args (FILE *fp, GType object_type); +static void output_sections (void); +static void output_object_section (FILE *fp, GType object_type); + + int main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char *argv[]) { @@ -475,6 +475,8 @@ output_object_interfaces (); output_interface_prerequisites (); output_args (); + + output_sections (); return 0; } @@ -1570,6 +1572,139 @@ break; } } + +static void +output_sections (void) +{ + FILE *fp; + gint i; + + fp = fopen (sections_filename, "w"); + if (fp == NULL) + { + g_warning ("Couldn't open output file: %s : %s", sections_filename, g_strerror(errno)); + return; + } + + for (i = 0; object_types[i]; i++) { } + qsort (object_types, i, sizeof (GType), compare_types); + + for (i = 0; object_types[i]; i++) { + output_object_section (fp, object_types[i]); + } + + fclose (fp); +} + +static gboolean +find_by_type (GstPluginFeature *f, gpointer data) { + return (GST_IS_ELEMENT_FACTORY(f) && + ((GType)data == gst_element_factory_get_element_type (GST_ELEMENT_FACTORY(f)))); +} + +static void +output_object_section (FILE *fp, GType object_type) +{ + /* e.g. GstFakeSink */ + const gchar *tn = g_type_name (object_type); + const gchar *cct = &tn[3]; /* cut 'Gst' */ + gchar *title, *lct, *uct; + gint i, j, l = strlen(cct); + gpointer class; + GParamSpec **properties; + guint n_properties; + const gchar *ptn; + gchar *ptns; + GString *strbuf = g_string_new (NULL); + GList *fl; + GstPluginFeature *f = NULL; + gboolean need_unserscore = TRUE, have_abbrev = FALSE; + + fl = gst_registry_feature_filter (gst_registry_get(), find_by_type, TRUE, + (gpointer)object_type); + if (fl) { + f = fl->data; + g_list_free(fl); + } + if (f) { + title = g_strdup (gst_plugin_feature_get_name(f)); + g_object_unref (f); + } else { + title = g_ascii_strdown(cct, -1); + } + + /* turn CamelCase into '_' separated all lower, resulting string is atmost + * twice as long, special casing for abbevs like GstTCPClientSink */ + lct = g_malloc(2*l); + for (i = 0, j = 0; i < l; i++) { + if (g_ascii_isupper (cct[i])) { + if (need_unserscore) { + if (i > 0) { + lct[j++] = '_'; + } + } else { + have_abbrev = TRUE; + } + lct[j++] = g_ascii_tolower(cct[i]); + need_unserscore = FALSE; + } else { + if (have_abbrev) { + lct[j] = lct[j-1]; + lct[j-1] = '_'; + j++; + have_abbrev = FALSE; + } + lct[j++] = cct[i]; + need_unserscore = TRUE; + } + } + lct[j] = '\\0'; + uct = g_ascii_strup(lct, -1); + + /* scan properties and find local enums */ + class = g_type_class_peek (object_type); + properties = g_object_class_list_properties (class, &n_properties); + qsort (properties, n_properties, sizeof (GParamSpec *), compare_param_specs); + for (i = 0; i < n_properties; i++) { + GParamSpec *spec = properties[i]; + if (!(G_IS_PARAM_SPEC_ENUM (spec) || G_IS_PARAM_SPEC_FLAGS (spec))) { + continue; + } + ptn = g_type_name(spec->value_type); + // does it start with tn? + if (strncmp(tn, ptn, strlen(tn))) { + continue; + } + g_string_append_c(strbuf, '\\n'); + g_string_append(strbuf, ptn); + } + ptns = g_string_free (strbuf, FALSE); + + /* later we can remove the SUBSECTION Standart/Private, since we only need to + * highlight what is public API */ + fprintf (fp, "
\\n" + "element-%s\\n" + "%s\\n" + "Gst%s%s\\n" + "\\n" + "Gst%sClass\\n" + "GST_%s\\n" + "GST_%s_CAST\\n" + "GST_IS_%s\\n" + "GST_%s_CLASS\\n" + "GST_IS_%s_CLASS\\n" + "GST_TYPE_%s\\n" + "\\n" + "gst_%s_get_type\\n" + "
\\n\\n", + title, title, cct, ptns, + cct, uct, uct, uct, uct, uct, uct, lct); + g_free (title); + g_free (lct); + g_free (uct); + g_free (ptns); +} + EOT close OUTPUT; @@ -1614,4 +1749,4 @@ #&UpdateFileIfChanged ($old_prerequisites_filename, $new_prerequisites_filename, 0); #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0); #&UpdateFileIfChanged ($old_args_filename, $new_args_filename, 0); - +#&UpdateFileIfChanged ($old_sections_filename, $new_sections_filename, 0); diff -Nru gst-plugins-good1.0-1.4.3/common/gst-indent gst-plugins-good1.0-1.6.1/common/gst-indent --- gst-plugins-good1.0-1.4.3/common/gst-indent 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/gst-indent 2015-10-22 08:03:07.000000000 +0000 @@ -9,13 +9,19 @@ version=`gnuindent --version 2>/dev/null` if test "x$version" = "x"; then - version=`indent --version 2>/dev/null` + version=`gindent --version 2>/dev/null` if test "x$version" = "x"; then - echo "GStreamer git pre-commit hook:" - echo "Did not find GNU indent, please install it before continuing." - exit 1 + version=`indent --version 2>/dev/null` + if test "x$version" = "x"; then + echo "GStreamer git pre-commit hook:" + echo "Did not find GNU indent, please install it before continuing." + exit 1 + else + INDENT=indent + fi + else + INDENT=gindent fi - INDENT=indent else INDENT=gnuindent fi diff -Nru gst-plugins-good1.0-1.4.3/common/gst.supp gst-plugins-good1.0-1.6.1/common/gst.supp --- gst-plugins-good1.0-1.4.3/common/gst.supp 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/gst.supp 2015-10-22 08:03:07.000000000 +0000 @@ -3965,3 +3965,58 @@ ... fun:g_quark_from*_string } + +{ + + Memcheck:Param + timer_create(evp) + fun:timer_create@@GLIBC_2.3.3 +} + +{ + closures aren't valgrind friendly (bgo#739850) + Memcheck:Leak + match-leak-kinds: possible + fun:calloc + ... + fun:g_cclosure_new +} + +{ + closures aren't valgrind friendly (bgo#739850) + Memcheck:Leak + match-leak-kinds: possible + fun:malloc + ... + fun:g_closure_add_invalidate_notifier +} + +{ + closures aren't valgrind friendly (bgo#739850) + Memcheck:Leak + match-leak-kinds: possible + fun:calloc + ... + fun:g_closure_new_simple +} + +{ + glib/giomodules2 (from libsoup.supp) + Memcheck:Leak + ... + fun:_g_io_module_get_default +} + +{ + + Memcheck:Addr8 + fun:__GI___strncasecmp_l + fun:____strtod_l_internal + fun:gst_value_deserialize_double +} + +{ + + Memcheck:Addr8 + fun:do_lookup_x +} diff -Nru gst-plugins-good1.0-1.4.3/common/gtk-doc.mak gst-plugins-good1.0-1.6.1/common/gtk-doc.mak --- gst-plugins-good1.0-1.4.3/common/gtk-doc.mak 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/gtk-doc.mak 2015-10-22 08:03:07.000000000 +0000 @@ -3,7 +3,16 @@ ########################################################################### # thomas: except of course that we did -# thomas: copied from glib-2 +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = $(LIBTOOL) --mode=execute +else +GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = +endif + # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then @@ -81,15 +90,22 @@ --ignore-headers="$(IGNORE_HFILES)" @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; then \ echo " DOC Introspecting gobjects"; \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$$?" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ + fi; \ + fi; \ GST_PLUGIN_SYSTEM_PATH_1_0=`cd $(top_builddir) && pwd` \ GST_PLUGIN_PATH_1_0= \ GST_REGISTRY_1_0=doc-registry.xml \ $(GTKDOC_EXTRA_ENVIRONMENT) \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj --type-init-func="gst_init(NULL,NULL)" \ - --module=$(DOC_MODULE) ; \ + $$scanobj_options --module=$(DOC_MODULE) ; \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ diff -Nru gst-plugins-good1.0-1.4.3/common/gtk-doc-plugins.mak gst-plugins-good1.0-1.6.1/common/gtk-doc-plugins.mak --- gst-plugins-good1.0-1.4.3/common/gtk-doc-plugins.mak 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/gtk-doc-plugins.mak 2015-10-22 08:03:07.000000000 +0000 @@ -16,6 +16,16 @@ update: scanobj-update $(MAKE) check-outdated-docs +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = $(LIBTOOL) --mode=execute +else +GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = +endif + # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then @@ -44,11 +54,9 @@ # maintainers and result is commited to git DOC_STAMPS = \ scan-build.stamp \ - tmpl-build.stamp \ sgml-build.stamp \ html-build.stamp \ scan.stamp \ - tmpl.stamp \ sgml.stamp \ html.stamp @@ -122,7 +130,7 @@ scanobj_options="--verbose"; \ fi; \ $(INSPECT_ENVIRONMENT) \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ $(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)" \ @@ -161,29 +169,9 @@ --ignore-headers="$(IGNORE_HFILES)"; \ touch scan-build.stamp -#### update templates; done on every build #### - -# in a non-srcdir build, we need to copy files from the previous step -# and the files from previous runs of this step -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) - @echo ' DOC Rebuilding template files' - @if test x"$(srcdir)" != x. ; then \ - for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ - do \ - if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ - done; \ - fi - @gtkdoc-mktmpl --module=$(DOC_MODULE) - @$(PYTHON) \ - $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl - @touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - #### xml #### -sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files) +sgml-build.stamp: scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files) @echo ' DOC Building XML' @-mkdir -p xml @for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \ @@ -199,6 +187,7 @@ --output-format=xml \ --ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \ $(MKDB_OPTIONS) + @$(PYTHON) $(top_srcdir)/common/mangle-db.py xml @cp ../version.entities xml @touch sgml-build.stamp diff -Nru gst-plugins-good1.0-1.4.3/common/m4/ax_pthread.m4 gst-plugins-good1.0-1.6.1/common/m4/ax_pthread.m4 --- gst-plugins-good1.0-1.4.3/common/m4/ax_pthread.m4 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/ax_pthread.m4 2015-10-22 08:03:07.000000000 +0000 @@ -0,0 +1,332 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). (This +# is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also link it with them as well. e.g. you should link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threads programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name +# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program 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 General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 21 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) + AC_MSG_RESULT([$ax_pthread_ok]) + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + ax_pthread_flags="-pthread $ax_pthread_flags" + ;; +esac + +# Clang doesn't consider unrecognized options an error unless we specify +# -Werror. We throw in some extra Clang-specific options to ensure that +# this doesn't happen for GCC, which also accepts -Werror. + +AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) +save_CFLAGS="$CFLAGS" +ax_pthread_extra_flags="-Werror" +CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], + [AC_MSG_RESULT([yes])], + [ax_pthread_extra_flags= + AC_MSG_RESULT([no])]) +CFLAGS="$save_CFLAGS" + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT([$ax_pthread_ok]) + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $attr; return attr /* ; */])], + [attr_name=$attr; break], + []) + done + AC_MSG_RESULT([$attr_name]) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + # TODO: What about Clang on Solaris? + flag="-mt -D_REENTRANT" + fi + ;; + esac + AC_MSG_RESULT([$flag]) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + [ax_cv_PTHREAD_PRIO_INHERIT], [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], + [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AC_SUBST([PTHREAD_CC]) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff -Nru gst-plugins-good1.0-1.4.3/common/m4/gst-arch.m4 gst-plugins-good1.0-1.6.1/common/m4/gst-arch.m4 --- gst-plugins-good1.0-1.4.3/common/m4/gst-arch.m4 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/gst-arch.m4 2015-10-22 08:03:07.000000000 +0000 @@ -45,9 +45,15 @@ xalpha*) HAVE_CPU_ALPHA=yes AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;; + xarc*) + HAVE_CPU_ARC=yes + AC_DEFINE(HAVE_CPU_ARC, 1, [Define if the target CPU is an ARC]) ;; xarm*) HAVE_CPU_ARM=yes AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;; + xaarch64*) + HAVE_CPU_AARCH64=yes + AC_DEFINE(HAVE_CPU_AARCH64, 1, [Define if the target CPU is AARCH64]) ;; xsparc*) HAVE_CPU_SPARC=yes AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a SPARC]) ;; @@ -84,6 +90,7 @@ AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes") AM_CONDITIONAL(HAVE_CPU_PPC64, test "x$HAVE_CPU_PPC64" = "xyes") AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes") + AM_CONDITIONAL(HAVE_CPU_ARC, test "x$HAVE_CPU_ARC" = "xyes") AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes") AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes") AM_CONDITIONAL(HAVE_CPU_HPPA, test "x$HAVE_CPU_HPPA" = "xyes") @@ -104,7 +111,7 @@ AC_MSG_CHECKING([if unaligned memory access works correctly]) if test x"$as_cv_unaligned_access" = x ; then case $host in - alpha*|arm*|hp*|mips*|sh*|sparc*|ia64*) + alpha*|arc*|arm*|aarch64*|hp*|mips*|sh*|sparc*|ia64*) _AS_ECHO_N([(blacklisted) ]) as_cv_unaligned_access=no ;; diff -Nru gst-plugins-good1.0-1.4.3/common/m4/gst-error.m4 gst-plugins-good1.0-1.6.1/common/m4/gst-error.m4 --- gst-plugins-good1.0-1.4.3/common/m4/gst-error.m4 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/gst-error.m4 2015-10-22 08:03:07.000000000 +0000 @@ -76,14 +76,6 @@ ]) done ]) - else - dnl Add -fno-strict-aliasing for GLib versions before 2.19.8 - dnl as before G_LOCK and friends caused strict aliasing compiler - dnl warnings. - PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [ - AS_COMPILER_FLAG(-fno-strict-aliasing, - ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing") - ]) fi fi diff -Nru gst-plugins-good1.0-1.4.3/common/m4/gst-glib2.m4 gst-plugins-good1.0-1.6.1/common/m4/gst-glib2.m4 --- gst-plugins-good1.0-1.4.3/common/m4/gst-glib2.m4 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/gst-glib2.m4 2015-10-22 08:03:07.000000000 +0000 @@ -120,6 +120,10 @@ GIO_LIBDIR="`$PKG_CONFIG --variable=libdir gio-2.0`" AC_DEFINE_UNQUOTED(GIO_LIBDIR, "$GIO_LIBDIR", [The GIO library directory.]) + GIO_PREFIX="`$PKG_CONFIG --variable=prefix gio-2.0`" + AC_DEFINE_UNQUOTED(GIO_PREFIX, "$GIO_PREFIX", + [The GIO install prefix.]) + AC_SUBST(GIO_CFLAGS) AC_SUBST(GIO_LIBS) AC_SUBST(GIO_LDFLAGS) diff -Nru gst-plugins-good1.0-1.4.3/common/m4/gst-parser.m4 gst-plugins-good1.0-1.6.1/common/m4/gst-parser.m4 --- gst-plugins-good1.0-1.4.3/common/m4/gst-parser.m4 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/gst-parser.m4 2015-10-22 08:03:07.000000000 +0000 @@ -15,7 +15,7 @@ bison_version=`$BISON_PATH --version | head -n 1 | sed 's/^[[^0-9]]*//' | sed 's/[[^0-9]]*$//' | cut -d' ' -f1` AC_MSG_CHECKING([bison version $bison_version >= $bison_min_version]) - if perl -we "exit ((v$bison_version ge v$bison_min_version) ? 0 : 1)"; then + if perl -we "exit (('v$bison_version' ge 'v$bison_min_version') ? 0 : 1)"; then AC_MSG_RESULT([yes]) else AC_MSG_ERROR([no]) diff -Nru gst-plugins-good1.0-1.4.3/common/m4/gst-x11.m4 gst-plugins-good1.0-1.6.1/common/m4/gst-x11.m4 --- gst-plugins-good1.0-1.4.3/common/m4/gst-x11.m4 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/gst-x11.m4 2015-10-22 08:03:07.000000000 +0000 @@ -9,7 +9,11 @@ CPPFLAGS="$CPPFLAGS $X_CFLAGS" dnl now try to find the HEADER - AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") + HAVE_X="no" + AC_CHECK_HEADER([X11/Xlib.h], [ + dnl and then the library with the most uniquitous function + AC_CHECK_LIB(X11, [XSync], [HAVE_X="yes"], [], [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS]) + ], [], [AC_INCLUDES_DEFAULT]) if test "x$HAVE_X" = "xno" then diff -Nru gst-plugins-good1.0-1.4.3/common/m4/introspection.m4 gst-plugins-good1.0-1.6.1/common/m4/introspection.m4 --- gst-plugins-good1.0-1.4.3/common/m4/introspection.m4 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/introspection.m4 2015-10-22 08:03:07.000000000 +0000 @@ -62,6 +62,7 @@ INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection + INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);" fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) @@ -71,6 +72,7 @@ AC_SUBST(INTROSPECTION_CFLAGS) AC_SUBST(INTROSPECTION_LIBS) AC_SUBST(INTROSPECTION_MAKEFILE) + AC_SUBST(INTROSPECTION_INIT) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) diff -Nru gst-plugins-good1.0-1.4.3/common/m4/Makefile.am gst-plugins-good1.0-1.6.1/common/m4/Makefile.am --- gst-plugins-good1.0-1.4.3/common/m4/Makefile.am 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/Makefile.am 2015-10-22 08:03:07.000000000 +0000 @@ -11,6 +11,7 @@ as-python.m4 \ as-version.m4 \ ax_create_stdint_h.m4 \ + ax_pthread.m4 \ glib-gettext.m4 \ gst-arch.m4 \ gst-args.m4 \ diff -Nru gst-plugins-good1.0-1.4.3/common/m4/Makefile.in gst-plugins-good1.0-1.6.1/common/m4/Makefile.in --- gst-plugins-good1.0-1.4.3/common/m4/Makefile.in 2014-09-24 07:25:54.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/m4/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,7 +89,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = common/m4 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README 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 \ @@ -101,7 +110,6 @@ $(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 \ @@ -116,6 +124,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -140,6 +149,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -272,9 +282,6 @@ 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@ @@ -392,17 +399,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -455,6 +462,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -480,6 +488,7 @@ as-python.m4 \ as-version.m4 \ ax_create_stdint_h.m4 \ + ax_pthread.m4 \ glib-gettext.m4 \ gst-arch.m4 \ gst-args.m4 \ @@ -523,7 +532,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/m4/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -698,6 +706,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/common/Makefile.am gst-plugins-good1.0-1.6.1/common/Makefile.am --- gst-plugins-good1.0-1.4.3/common/Makefile.am 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/Makefile.am 2015-10-22 08:03:07.000000000 +0000 @@ -8,7 +8,7 @@ parallel-subdirs.mak \ gst-autogen.sh \ check-exports \ - c-to-xml.py mangle-tmpl.py scangobj-merge.py \ + c-to-xml.py mangle-db.py scangobj-merge.py \ gtk-doc-plugins.mak \ plugins.xsl gstdoc-scangobj \ gst.supp check.mak \ diff -Nru gst-plugins-good1.0-1.4.3/common/Makefile.in gst-plugins-good1.0-1.6.1/common/Makefile.in --- gst-plugins-good1.0-1.4.3/common/Makefile.in 2014-09-24 07:25:54.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,8 +89,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = common -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ChangeLog \ - README 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 \ @@ -102,7 +110,6 @@ $(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 \ @@ -117,6 +124,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -176,6 +184,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in ChangeLog README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -333,9 +342,6 @@ 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@ @@ -453,17 +459,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -516,6 +522,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -537,7 +544,7 @@ parallel-subdirs.mak \ gst-autogen.sh \ check-exports \ - c-to-xml.py mangle-tmpl.py scangobj-merge.py \ + c-to-xml.py mangle-db.py scangobj-merge.py \ gtk-doc-plugins.mak \ plugins.xsl gstdoc-scangobj \ gst.supp check.mak \ @@ -565,7 +572,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -860,6 +866,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/common/mangle-db.py gst-plugins-good1.0-1.6.1/common/mangle-db.py --- gst-plugins-good1.0-1.4.3/common/mangle-db.py 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/mangle-db.py 2015-10-22 08:03:07.000000000 +0000 @@ -0,0 +1,71 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +""" +Insert includes for the element-*-details.xml files into the related docbook +files. +""" + +from __future__ import print_function, unicode_literals + +import codecs +import glob +import os +import sys + +import xml.dom.minidom + +def patch(related, details): + try: + doc = xml.dom.minidom.parse(related) + except IOError: + return + + # find the insertion point + elem = None + for e in doc.childNodes: + if e.nodeType == e.ELEMENT_NODE and e.localName == 'refentry': + elem = e + break + if elem == None: + return + + elem2 = None + for e in elem.childNodes: + if e.nodeType == e.ELEMENT_NODE and e.localName == 'refsect1': + id = e.getAttributeNode('id') + role = e.getAttributeNode('role') + if id and id.nodeValue.endswith('.description') and role and role.nodeValue == 'desc': + elem2 = e + break + if elem2 == None: + return + + # insert include + include = doc.createElement('include') + include.setAttribute('xmlns', 'http://www.w3.org/2003/XInclude') + include.setAttribute('href', details) + fallback = doc.createElement('fallback') + fallback.setAttribute('xmlns', 'http://www.w3.org/2003/XInclude') + include.appendChild(fallback) + elem2.appendChild(include) + + # store patched file + result = codecs.open(related, mode="w", encoding="utf-8") + #result = open(related, "wb") + doc.writexml(result) + result.close() + +def main(): + if not len(sys.argv) == 2: + sys.stderr.write('Please specify the xml/ dir') + sys.exit(1) + + xmldir = sys.argv[1] + + # parse all *-details.xml files and patch includes into the corresponding + # xml files + for details in glob.glob("%s/element-*-details.xml" % xmldir): + patch (details.replace("-details", ""), os.path.basename(details)) + +main() diff -Nru gst-plugins-good1.0-1.4.3/common/mangle-tmpl.py gst-plugins-good1.0-1.6.1/common/mangle-tmpl.py --- gst-plugins-good1.0-1.4.3/common/mangle-tmpl.py 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/mangle-tmpl.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 - -""" -use the output from gst-xmlinspect.py to mangle tmpl/*.sgml and -insert/overwrite Short Description and Long Description -""" - -# FIXME: right now it uses pygst and scans on its own; -# we really should use inspect/*.xml instead since the result of -# gst-xmlinspect.py is committed by the docs maintainer, who can be -# expected to have pygst, but this step should be done for every docs build, -# so no pygst allowed - -# read in inspect/*.xml -# for every tmpl/element-(name).xml: mangle with details from element - -from __future__ import print_function, unicode_literals - -import glob -import re -import sys -import os - -class Tmpl: - def __init__(self, filename): - self.filename = filename - self._sectionids = [] - self._sections = {} - - def read(self): - """ - Read and parse the sections from the given file. - """ - lines = open(self.filename).readlines() - matcher = re.compile("\n") - id = None - - for line in lines: - match = matcher.search(line) - if match: - id = match.expand("\\1") - self._sectionids.append(id) - self._sections[id] = [] - else: - if not id: - sys.stderr.write( - "WARNING: line before a SECTION header: %s" % line) - else: - self._sections[id].append(line) - - def get_section(self, id): - """ - Get the content from the given section. - """ - return self._sections[id] - - def set_section(self, id, content): - """ - Replace the given section id with the given content. - """ - self._sections[id] = content - - def output(self): - """ - Return the output of the current template in the tmpl/*.sgml format. - """ - lines = [] - for id in self._sectionids: - lines.append("\n" % id) - for line in self._sections[id]: - lines.append(line) - - return "".join(lines) - - def write(self, backup=False): - """ - Write out the template file again, backing up the previous one. - """ - if backup: - target = self.filename + ".mangle.bak" - os.rename(self.filename, target) - - handle = open(self.filename, "w") - handle.write(self.output()) - handle.close() - -import xml.dom.minidom - -def get_elements(file): - elements = {} - doc = xml.dom.minidom.parse(file) - - elem = None - for e in doc.childNodes: - if e.nodeType == e.ELEMENT_NODE and e.localName == 'plugin': - elem = e - break - if elem == None: - return None - - elem2 = None - for e in elem.childNodes: - if e.nodeType == e.ELEMENT_NODE and e.localName == 'elements': - elem2 = e - break - if elem2 == None: - return None - - elem = elem2 - - for e in elem.childNodes: - if e.nodeType == e.ELEMENT_NODE and e.localName == 'element': - name = None - description = None - - for e2 in e.childNodes: - if e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'name': - name = e2.childNodes[0].nodeValue.encode("UTF-8") - elif e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'description': - if e2.childNodes: - description = e2.childNodes[0].nodeValue.encode("UTF-8") - else: - description = 'No description' - - if name != None and description != None: - elements[name] = {'description': description} - - return elements - -def main(): - if not len(sys.argv) == 3: - sys.stderr.write('Please specify the inspect/ dir and the tmpl/ dir') - sys.exit(1) - - inspectdir = sys.argv[1] - tmpldir = sys.argv[2] - - # parse all .xml files; build map of element name -> short desc - #for file in glob.glob("inspect/plugin-*.xml"): - elements = {} - for file in glob.glob("%s/plugin-*.xml" % inspectdir): - elements.update(get_elements(file)) - - for file in glob.glob("%s/element-*.sgml" % tmpldir): - base = os.path.basename(file) - element = base[len("element-"):-len(".sgml")] - tmpl = Tmpl(file) - tmpl.read() - if element in elements.keys(): - description = elements[element]['description'] - tmpl.set_section("Short_Description", "%s\n\n" % description) - - # put in an include if not yet there - line = '' + \ - '' + \ - '\n' - section = tmpl.get_section("Long_Description") - if not section[0] == line: - section.insert(0, line) - tmpl.set_section("Long_Description", section) - tmpl.write() - -main() diff -Nru gst-plugins-good1.0-1.4.3/common/scangobj-merge.py gst-plugins-good1.0-1.6.1/common/scangobj-merge.py --- gst-plugins-good1.0-1.4.3/common/scangobj-merge.py 2014-07-21 08:49:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/common/scangobj-merge.py 2015-10-22 08:03:07.000000000 +0000 @@ -8,8 +8,9 @@ from __future__ import print_function, unicode_literals -import sys +import codecs import os +import sys def debug(*args): pass @@ -105,10 +106,12 @@ class GDoc: def load_file(self, filename): try: - lines = open(filename).readlines() + lines = codecs.open(filename, encoding='utf-8').readlines() self.load_data("".join(lines)) except IOError: print ("WARNING - could not read from %s" % filename) + except UnicodeDecodeError as e: + print ("WARNING - could not parse %s: %s" % (filename, e)) def save_file(self, filename, backup=False): """ @@ -116,7 +119,7 @@ """ olddata = None try: - lines = open(filename).readlines() + lines = codecs.open(filename, encoding='utf-8').readlines() olddata = "".join(lines) except IOError: print ("WARNING - could not read from %s" % filename) @@ -128,7 +131,7 @@ if backup: os.rename(filename, filename + '.bak') - handle = open(filename, "w") + handle = codecs.open(filename, "w", encoding='utf-8') handle.write(newdata) handle.close() diff -Nru gst-plugins-good1.0-1.4.3/compile gst-plugins-good1.0-1.6.1/compile --- gst-plugins-good1.0-1.4.3/compile 2014-08-27 10:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/compile 2015-10-30 12:10:14.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -Nru gst-plugins-good1.0-1.4.3/config.guess gst-plugins-good1.0-1.6.1/config.guess --- gst-plugins-good1.0-1.4.3/config.guess 2014-08-27 10:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/config.guess 2015-10-30 12:10:14.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2014-03-23' +timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,12 +24,12 @@ # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -168,20 +168,27 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -197,6 +204,13 @@ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -207,13 +221,13 @@ release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -235,6 +249,9 @@ *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -579,8 +596,9 @@ else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -932,6 +950,9 @@ crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -1020,7 +1041,7 @@ echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} diff -Nru gst-plugins-good1.0-1.4.3/config.h.in gst-plugins-good1.0-1.6.1/config.h.in --- gst-plugins-good1.0-1.4.3/config.h.in 2014-09-24 07:26:22.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/config.h.in 2015-10-30 12:10:13.000000000 +0000 @@ -34,6 +34,9 @@ /* The GIO modules directory. */ #undef GIO_MODULE_DIR +/* The GIO install prefix. */ +#undef GIO_PREFIX + /* GStreamer API Version */ #undef GST_API_VERSION @@ -85,9 +88,15 @@ /* Define to 1 if you have the `cosh' function. */ #undef HAVE_COSH +/* Define if the target CPU is AARCH64 */ +#undef HAVE_CPU_AARCH64 + /* Define if the target CPU is an Alpha */ #undef HAVE_CPU_ALPHA +/* Define if the target CPU is an ARC */ +#undef HAVE_CPU_ARC + /* Define if the target CPU is an ARM */ #undef HAVE_CPU_ARM @@ -341,7 +350,13 @@ /* Define to enable X libraries and plugins (used by ximagesrc). */ #undef HAVE_X -/* Define to enable X Shared Memory extension. */ +/* Defined if Xdamage is available */ +#undef HAVE_XDAMAGE + +/* Defined if Xfixes is available */ +#undef HAVE_XFIXES + +/* Defined if XShm is available */ #undef HAVE_XSHM /* Define to enable zlib support for qtdemux/matroska. */ @@ -396,9 +411,6 @@ /* The size of `void*', as computed by sizeof. */ #undef SIZEOF_VOIDP -/* defined if speex 1.0.x API detected */ -#undef SPEEX_1_0 - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -408,9 +420,6 @@ /* Version number of package */ #undef VERSION -/* old wavpack API */ -#undef WAVPACK_OLD_API - /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD @@ -422,6 +431,3 @@ # undef WORDS_BIGENDIAN # endif #endif - -/* Define to 1 if the X Window System is missing or not being used. */ -#undef X_DISPLAY_MISSING diff -Nru gst-plugins-good1.0-1.4.3/config.sub gst-plugins-good1.0-1.6.1/config.sub --- gst-plugins-good1.0-1.4.3/config.sub 2014-08-27 10:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/config.sub 2015-10-30 12:10:14.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2014-05-01' +timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -68,7 +68,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,7 +117,7 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -255,12 +255,13 @@ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ @@ -302,9 +303,10 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -312,6 +314,7 @@ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -326,6 +329,9 @@ c6x) basic_machine=tic6x-unknown ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none @@ -371,12 +377,13 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -423,12 +430,13 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -436,6 +444,7 @@ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -512,6 +521,9 @@ basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -773,6 +785,9 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -828,6 +843,10 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1360,7 +1379,7 @@ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1373,7 +1392,7 @@ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ diff -Nru gst-plugins-good1.0-1.4.3/configure gst-plugins-good1.0-1.6.1/configure --- gst-plugins-good1.0-1.4.3/configure 2014-09-24 07:25:53.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/configure 2015-10-30 12:10:13.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GStreamer Good Plug-ins 1.4.3. +# Generated by GNU Autoconf 2.69 for GStreamer Good Plug-ins 1.6.1. # # Report bugs to . # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='GStreamer Good Plug-ins' PACKAGE_TARNAME='gst-plugins-good' -PACKAGE_VERSION='1.4.3' -PACKAGE_STRING='GStreamer Good Plug-ins 1.4.3' +PACKAGE_VERSION='1.6.1' +PACKAGE_STRING='GStreamer Good Plug-ins 1.6.1' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer' PACKAGE_URL='' @@ -672,7 +672,6 @@ TAGLIB_CFLAGS USE_SPEEX_FALSE USE_SPEEX_TRUE -HAVE_SPEEX SPEEX_LIBS SPEEX_CFLAGS USE_SOUP_FALSE @@ -739,22 +738,18 @@ AALIB_LIBS AALIB_CFLAGS AALIB_CONFIG -USE_XSHM_FALSE -USE_XSHM_TRUE -XSHM_LIBS -HAVE_XSHM USE_X_FALSE USE_X_TRUE +XSHM_CFLAGS +XSHM_LIBS +XEXT_LIBS +XEXT_CFLAGS XDAMAGE_LIBS XDAMAGE_CFLAGS XFIXES_LIBS XFIXES_CFLAGS -HAVE_X -X_EXTRA_LIBS X_LIBS -X_PRE_LIBS X_CFLAGS -XMKMF LIBV4L2_LIBS LIBV4L2_CFLAGS GUDEV_LIBS @@ -1002,6 +997,8 @@ HAVE_CPU_SPARC_TRUE HAVE_CPU_ARM_FALSE HAVE_CPU_ARM_TRUE +HAVE_CPU_ARC_FALSE +HAVE_CPU_ARC_TRUE HAVE_CPU_ALPHA_FALSE HAVE_CPU_ALPHA_TRUE HAVE_CPU_PPC64_FALSE @@ -1168,6 +1165,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1287,8 +1285,6 @@ with_gudev with_libv4l2 enable_x -with_x -enable_xshm enable_aalib with_aalib_prefix with_aalib_exec_prefix @@ -1362,11 +1358,14 @@ GUDEV_LIBS LIBV4L2_CFLAGS LIBV4L2_LIBS -XMKMF +X_CFLAGS +X_LIBS XFIXES_CFLAGS XFIXES_LIBS XDAMAGE_CFLAGS XDAMAGE_LIBS +XEXT_CFLAGS +XEXT_LIBS CAIRO_CFLAGS CAIRO_LIBS FLAC_CFLAGS @@ -1443,6 +1442,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1695,6 +1695,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1832,7 +1841,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1945,7 +1954,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GStreamer Good Plug-ins 1.4.3 to adapt to many kinds of systems. +\`configure' configures GStreamer Good Plug-ins 1.6.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1985,6 +1994,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2008,10 +2018,6 @@ --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR - System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] @@ -2021,7 +2027,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GStreamer Good Plug-ins 1.4.3:";; + short | recursive ) echo "Configuration of GStreamer Good Plug-ins 1.6.1:";; esac cat <<\_ACEOF @@ -2116,7 +2122,6 @@ --disable-osx_video disable OSX video: osxvideosink --disable-gst_v4l2 disable Video 4 Linux 2: video4linux2 --disable-x disable X libraries and plugins: ximagesrc - --disable-xshm disable X Shared Memory extension --disable-aalib disable aalib ASCII Art library: aasink --disable-aalibtest do not try to compile and run a test AALIB program --disable-cairo disable Cairo graphics rendering and gobject bindings: cairo @@ -2175,7 +2180,6 @@ specify default visualizer --with-gudev device detection with gudev --with-libv4l2 support video buffer conversion using libv4l2 - --with-x use the X Window System --with-aalib-prefix=PFX prefix where AALIB is installed (optional) --with-aalib-exec-prefix=PFX exec prefix where AALIB is installed (optional) @@ -2248,7 +2252,8 @@ C compiler flags for LIBV4L2, overriding pkg-config LIBV4L2_LIBS linker flags for LIBV4L2, overriding pkg-config - XMKMF Path to xmkmf, Makefile generator for X Window System + X_CFLAGS C compiler flags for X, overriding pkg-config + X_LIBS linker flags for X, overriding pkg-config XFIXES_CFLAGS C compiler flags for XFIXES, overriding pkg-config XFIXES_LIBS linker flags for XFIXES, overriding pkg-config @@ -2256,6 +2261,8 @@ C compiler flags for XDAMAGE, overriding pkg-config XDAMAGE_LIBS linker flags for XDAMAGE, overriding pkg-config + XEXT_CFLAGS C compiler flags for XEXT, overriding pkg-config + XEXT_LIBS linker flags for XEXT, overriding pkg-config CAIRO_CFLAGS C compiler flags for CAIRO, overriding pkg-config CAIRO_LIBS linker flags for CAIRO, overriding pkg-config @@ -2384,7 +2391,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GStreamer Good Plug-ins configure 1.4.3 +GStreamer Good Plug-ins configure 1.6.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3195,7 +3202,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GStreamer Good Plug-ins $as_me 1.4.3, which was +It was created by GStreamer Good Plug-ins $as_me 1.6.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3691,7 +3698,7 @@ -am__api_version='1.14' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3863,8 +3870,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -3883,7 +3890,7 @@ $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -4177,7 +4184,7 @@ # Define the identity of the package. PACKAGE='gst-plugins-good' - VERSION='1.4.3' + VERSION='1.6.1' cat >>confdefs.h <<_ACEOF @@ -4211,8 +4218,8 @@ # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -4388,9 +4395,9 @@ - PACKAGE_VERSION_MAJOR=$(echo 1.4.3 | cut -d'.' -f1) - PACKAGE_VERSION_MINOR=$(echo 1.4.3 | cut -d'.' -f2) - PACKAGE_VERSION_MICRO=$(echo 1.4.3 | cut -d'.' -f3) + PACKAGE_VERSION_MAJOR=$(echo 1.6.1 | cut -d'.' -f1) + PACKAGE_VERSION_MINOR=$(echo 1.6.1 | cut -d'.' -f2) + PACKAGE_VERSION_MICRO=$(echo 1.6.1 | cut -d'.' -f3) @@ -4401,7 +4408,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 $as_echo_n "checking nano version... " >&6; } - NANO=$(echo 1.4.3 | cut -d'.' -f4) + NANO=$(echo 1.6.1 | cut -d'.' -f4) if test x"$NANO" = x || test "x$NANO" = "x0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 @@ -9057,10 +9064,10 @@ done - GST_CURRENT=403 + GST_CURRENT=601 GST_REVISION=0 - GST_AGE=403 - GST_LIBVERSION=403:0:403 + GST_AGE=601 + GST_LIBVERSION=601:0:601 @@ -13385,8 +13392,8 @@ -GST_REQ=1.4.0 -GSTPB_REQ=1.4.0 +GST_REQ=1.6.1 +GSTPB_REQ=1.6.1 @@ -16196,11 +16203,21 @@ $as_echo "#define HAVE_CPU_ALPHA 1" >>confdefs.h ;; + xarc*) + HAVE_CPU_ARC=yes + +$as_echo "#define HAVE_CPU_ARC 1" >>confdefs.h + ;; xarm*) HAVE_CPU_ARM=yes $as_echo "#define HAVE_CPU_ARM 1" >>confdefs.h ;; + xaarch64*) + HAVE_CPU_AARCH64=yes + +$as_echo "#define HAVE_CPU_AARCH64 1" >>confdefs.h + ;; xsparc*) HAVE_CPU_SPARC=yes @@ -16505,6 +16522,14 @@ HAVE_CPU_ALPHA_FALSE= fi + if test "x$HAVE_CPU_ARC" = "xyes"; then + HAVE_CPU_ARC_TRUE= + HAVE_CPU_ARC_FALSE='#' +else + HAVE_CPU_ARC_TRUE='#' + HAVE_CPU_ARC_FALSE= +fi + if test "x$HAVE_CPU_ARM" = "xyes"; then HAVE_CPU_ARM_TRUE= HAVE_CPU_ARM_FALSE='#' @@ -24386,6 +24411,13 @@ #define GIO_LIBDIR "$GIO_LIBDIR" _ACEOF + GIO_PREFIX="`$PKG_CONFIG --variable=prefix gio-2.0`" + +cat >>confdefs.h <<_ACEOF +#define GIO_PREFIX "$GIO_PREFIX" +_ACEOF + + @@ -25883,52 +25915,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 < 2.19.8\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 < 2.19.8") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -fno-strict-aliasing" >&5 -$as_echo_n "checking to see if compiler understands -fno-strict-aliasing... " >&6; } - - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-strict-aliasing" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - flag_ok=yes -else - flag_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" - - if test "X$flag_ok" = Xyes ; then - ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing" - true - else - - true - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } - - -fi fi fi @@ -29001,7 +28987,7 @@ save_LIBS="$LIBS" CFLAGS="$CFLAGS $DIRECTSOUND_CFLAGS" LDFLAGS="$LDFLAGS $DIRECTSOUND_LDFLAGS" - LIBS="$LIBS -ldsound -ldxerr9 -luser32" + LIBS="$LIBS -ldsound -ldxerr9 -luser32 -lole32" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectSound LDFLAGS" >&5 $as_echo_n "checking for DirectSound LDFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29017,6 +29003,7 @@ DXGetErrorString9 (0); DirectSoundCreate(NULL, NULL, NULL); + CLSIDFromString(NULL, NULL); ; return 0; @@ -29037,7 +29024,7 @@ LIBS=$save_LIBS if test "x$HAVE_DIRECTSOUND" = "xyes"; then - DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32" + DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32 -lole32" @@ -29814,6 +29801,15 @@ ac_fn_c_check_header_mongrel "$LINENO" "sys/videodev2.h" "ac_cv_header_sys_videodev2_h" "$ac_includes_default" if test "x$ac_cv_header_sys_videodev2_h" = xyes; then : HAVE_GST_V4L2=yes +else + + ac_fn_c_check_header_mongrel "$LINENO" "sys/videoio.h" "ac_cv_header_sys_videoio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_videoio_h" = xyes; then : + HAVE_GST_V4L2=yes +fi + + + fi @@ -30052,199 +30048,6 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then : - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : - $as_echo_n "(cached) " >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R7/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R7 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R7/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R7 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # We can compile using X headers with no special include directory. -ac_x_includes= -else - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi -rm -f conftest.err conftest.i conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 -$as_echo "$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } -fi - echo { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: X libraries and plugins ***" >&5 $as_echo "$as_me: *** checking feature: X libraries and plugins ***" >&6;} @@ -30293,528 +30096,76 @@ HAVE_X=no - if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 -$as_echo "neither works" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XOpenDisplay (); -int -main () -{ -return XOpenDisplay (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_dnet_ntoa=yes -else - ac_cv_lib_dnet_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet_stub $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_stub_dnet_ntoa=yes +if test -n "$PKG_CONFIG"; then + if test -n "$X_CFLAGS"; then + pkg_cv_X_CFLAGS="$X_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` else - ac_cv_lib_dnet_stub_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" + pkg_failed=yes fi - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes; then : - -fi - - if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_gethostbyname=yes else - ac_cv_lib_nsl_gethostbyname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" + pkg_failed=untried fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if ${ac_cv_lib_bsd_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bsd_gethostbyname=yes +if test -n "$PKG_CONFIG"; then + if test -n "$X_LIBS"; then + pkg_cv_X_LIBS="$X_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` else - ac_cv_lib_bsd_gethostbyname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" + pkg_failed=yes fi - - fi fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = xyes; then : - -fi - - if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if ${ac_cv_lib_socket_connect+:} false; then : - $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_connect=yes -else - ac_cv_lib_socket_connect=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = xyes; then : - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -fi - - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = xyes; then : - -fi - - if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } -if ${ac_cv_lib_posix_remove+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_posix_remove=yes -else - ac_cv_lib_posix_remove=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = xyes; then : - + pkg_failed=untried fi - if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } -if ${ac_cv_lib_ipc_shmat+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ipc_shmat=yes -else - ac_cv_lib_ipc_shmat=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -fi - fi - fi - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +if test $pkg_failed = yes; then -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ICE_IceConnectionNumber=yes +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - ac_cv_lib_ICE_IceConnectionNumber=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + X_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + X_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$X_PKG_ERRORS" >&5 - ac_cflags_save="$CFLAGS" - ac_cppflags_save="$CPPFLAGS" - CFLAGS="$CFLAGS $X_CFLAGS" - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - - ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xlib_h" = xyes; then : - HAVE_X="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_X="no" +elif test $pkg_failed = untried; then + HAVE_X="no" else - HAVE_X="no" -fi - - - - if test "x$HAVE_X" = "xno" - then - { $as_echo "$as_me:${as_lineno-$LINENO}: cannot find X11 development files" >&5 -$as_echo "$as_me: cannot find X11 development files" >&6;} - else - X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS" - X_LIBS="$X_LIBS -lX11" - - - fi - - - CFLAGS="$ac_cflags_save" - CPPFLAGS="$ac_cppflags_save" - + X_CFLAGS=$pkg_cv_X_CFLAGS + X_LIBS=$pkg_cv_X_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - if test "x$HAVE_X" = "xyes" - then + HAVE_X="yes" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFIXES" >&5 @@ -30825,12 +30176,12 @@ pkg_cv_XFIXES_CFLAGS="$XFIXES_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfixes\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xfixes") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" xfixes \""; } >&5 + ($PKG_CONFIG --exists --print-errors " xfixes ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XFIXES_CFLAGS=`$PKG_CONFIG --cflags "xfixes" 2>/dev/null` + pkg_cv_XFIXES_CFLAGS=`$PKG_CONFIG --cflags " xfixes " 2>/dev/null` else pkg_failed=yes fi @@ -30843,12 +30194,12 @@ pkg_cv_XFIXES_LIBS="$XFIXES_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfixes\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xfixes") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" xfixes \""; } >&5 + ($PKG_CONFIG --exists --print-errors " xfixes ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XFIXES_LIBS=`$PKG_CONFIG --libs "xfixes" 2>/dev/null` + pkg_cv_XFIXES_LIBS=`$PKG_CONFIG --libs " xfixes " 2>/dev/null` else pkg_failed=yes fi @@ -30867,31 +30218,29 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfixes"` + XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " xfixes "` else - XFIXES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfixes"` + XFIXES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " xfixes "` fi # Put the nasty error message in config.log where it belongs echo "$XFIXES_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - HAVE_XFIXES="no" + HAVE_XFIXES="no" elif test $pkg_failed = untried; then - HAVE_XFIXES="no" + HAVE_XFIXES="no" else XFIXES_CFLAGS=$pkg_cv_XFIXES_CFLAGS XFIXES_LIBS=$pkg_cv_XFIXES_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_XFIXES="yes" -fi - if test "x$HAVE_XFIXES" = "xyes" - then - XFIXES_CFLAGS="-DHAVE_XFIXES $XFIXES_CFLAGS" - fi +$as_echo "#define HAVE_XFIXES 1" >>confdefs.h + + +fi pkg_failed=no @@ -30903,12 +30252,12 @@ pkg_cv_XDAMAGE_CFLAGS="$XDAMAGE_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdamage\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xdamage") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" xdamage \""; } >&5 + ($PKG_CONFIG --exists --print-errors " xdamage ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XDAMAGE_CFLAGS=`$PKG_CONFIG --cflags "xdamage" 2>/dev/null` + pkg_cv_XDAMAGE_CFLAGS=`$PKG_CONFIG --cflags " xdamage " 2>/dev/null` else pkg_failed=yes fi @@ -30921,12 +30270,12 @@ pkg_cv_XDAMAGE_LIBS="$XDAMAGE_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdamage\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xdamage") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" xdamage \""; } >&5 + ($PKG_CONFIG --exists --print-errors " xdamage ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XDAMAGE_LIBS=`$PKG_CONFIG --libs "xdamage" 2>/dev/null` + pkg_cv_XDAMAGE_LIBS=`$PKG_CONFIG --libs " xdamage " 2>/dev/null` else pkg_failed=yes fi @@ -30945,128 +30294,126 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XDAMAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xdamage"` + XDAMAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " xdamage "` else - XDAMAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xdamage"` + XDAMAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " xdamage "` fi # Put the nasty error message in config.log where it belongs echo "$XDAMAGE_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - HAVE_XDAMAGE="no" + HAVE_XDAMAGE="no" elif test $pkg_failed = untried; then - HAVE_XDAMAGE="no" + HAVE_XDAMAGE="no" else XDAMAGE_CFLAGS=$pkg_cv_XDAMAGE_CFLAGS XDAMAGE_LIBS=$pkg_cv_XDAMAGE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_XDAMAGE="yes" -fi - if test "x$HAVE_XDAMAGE" = "xyes" - then - XDAMAGE_CFLAGS="-DHAVE_XDAMAGE $XDAMAGE_CFLAGS" - fi - fi +$as_echo "#define HAVE_XDAMAGE 1" >>confdefs.h - LIBS=$gst_check_save_LIBS - LDFLAGS=$gst_check_save_LDFLAGS - CFLAGS=$gst_check_save_CFLAGS - CPPFLAGS=$gst_check_save_CPPFLAGS - CXXFLAGS=$gst_check_save_CXXFLAGS - - if test x$HAVE_X = xno; then - USE_X=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: ximagesrc" >&5 -$as_echo "$as_me: *** These plugins will be built: ximagesrc" >&6;} - fi fi -if test x$USE_X = xyes; then - : - if test "xximagesrc" != "x"; then - GST_PLUGINS_YES="\tximagesrc\n$GST_PLUGINS_YES" - fi -$as_echo "#define HAVE_X /**/" >>confdefs.h +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 +$as_echo_n "checking for XEXT... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_CFLAGS"; then + pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" xext \""; } >&5 + ($PKG_CONFIG --exists --print-errors " xext ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags " xext " 2>/dev/null` else - { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: ximagesrc" >&5 -$as_echo "$as_me: *** These plugins will not be built: ximagesrc" >&6;} - if test "xximagesrc" != "x"; then - GST_PLUGINS_NO="\tximagesrc\n$GST_PLUGINS_NO" - fi - : + pkg_failed=yes fi - if test x$USE_X = xyes; then - USE_X_TRUE= - USE_X_FALSE='#' + fi else - USE_X_TRUE='#' - USE_X_FALSE= + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_LIBS"; then + pkg_cv_XEXT_LIBS="$XEXT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" xext \""; } >&5 + ($PKG_CONFIG --exists --print-errors " xext ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs " xext " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -echo -{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: X Shared Memory extension ***" >&5 -$as_echo "$as_me: *** checking feature: X Shared Memory extension ***" >&6;} -if test "x" != "x" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: ***" >&5 -$as_echo "$as_me: *** for plug-ins: ***" >&6;} -fi -NOUSE= -if test "x$USE_XSHM" = "xno"; then - NOUSE="yes" -fi -# Check whether --enable-xshm was given. -if test "${enable_xshm+set}" = set; then : - enableval=$enable_xshm; case "${enableval}" in - yes) USE_XSHM=yes;; - no) USE_XSHM=no;; - *) as_fn_error $? "bad value ${enableval} for --enable-xshm" "$LINENO" 5 ;; - esac +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - USE_XSHM=yes + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " xext "` + else + XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " xext "` + fi + # Put the nasty error message in config.log where it belongs + echo "$XEXT_PKG_ERRORS" >&5 -if test "x$NOUSE" = "xyes"; then - USE_XSHM="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** pre-configured not to be built" >&5 -$as_echo "$as_me: WARNING: *** pre-configured not to be built" >&2;} -fi -NOUSE= + as_fn_error $? "Package requirements ( xext ) were not met: -if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " XSHM " > /dev/null; then - USE_XSHM="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** not ported" >&5 -$as_echo "$as_me: WARNING: *** not ported" >&2;} -fi +$XEXT_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -if test x$USE_XSHM = xyes; then +Alternatively, you may set the environment variables XEXT_CFLAGS +and XEXT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - gst_check_save_LIBS=$LIBS - gst_check_save_LDFLAGS=$LDFLAGS - gst_check_save_CFLAGS=$CFLAGS - gst_check_save_CPPFLAGS=$CPPFLAGS - gst_check_save_CXXFLAGS=$CXXFLAGS +Alternatively, you may set the environment variables XEXT_CFLAGS +and XEXT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - HAVE_XSHM=no +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS + XEXT_LIBS=$pkg_cv_XEXT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - if test x$HAVE_X = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmAttach in -lXext" >&5 -$as_echo_n "checking for XShmAttach in -lXext... " >&6; } -if ${ac_cv_lib_Xext_XShmAttach+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmAttach in -lXext" >&5 +$as_echo_n "checking for XShmAttach in -lXext... " >&6; } +if ${ac_cv_lib_Xext__XShmAttach_+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lXext $X_LIBS $LIBS" +LIBS="-lXext $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -31076,82 +30423,44 @@ #ifdef __cplusplus extern "C" #endif -char XShmAttach (); +char XShmAttach (); int main () { -return XShmAttach (); +return XShmAttach (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xext_XShmAttach=yes + ac_cv_lib_Xext__XShmAttach_=yes else - ac_cv_lib_Xext_XShmAttach=no + ac_cv_lib_Xext__XShmAttach_=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShmAttach" >&5 -$as_echo "$ac_cv_lib_Xext_XShmAttach" >&6; } -if test "x$ac_cv_lib_Xext_XShmAttach" = xyes; then : - HAVE_XSHM="yes" -else - HAVE_XSHM="no" -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext__XShmAttach_" >&5 +$as_echo "$ac_cv_lib_Xext__XShmAttach_" >&6; } +if test "x$ac_cv_lib_Xext__XShmAttach_" = xyes; then : - if test "x$HAVE_XSHM" = "xyes"; then - XSHM_LIBS="-lXext" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmAttach in -lXextSam" >&5 -$as_echo_n "checking for XShmAttach in -lXextSam... " >&6; } -if ${ac_cv_lib_XextSam_XShmAttach+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXextSam $X_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XShmAttach (); -int -main () -{ -return XShmAttach (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_XextSam_XShmAttach=yes +$as_echo "#define HAVE_XSHM 1" >>confdefs.h + + XSHM_LIBS="$XEXT_LIBS" + XSHM_CFLAGS="$XEXT_CFLAGS" + else - ac_cv_lib_XextSam_XShmAttach=no + HAVE_XEXT="no" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmAttach" >&5 -$as_echo "$ac_cv_lib_XextSam_XShmAttach" >&6; } -if test "x$ac_cv_lib_XextSam_XShmAttach" = xyes; then : - HAVE_XSHM="yes" -else - HAVE_XSHM="no" + + fi - if test "x$HAVE_XSHM" = "xyes"; then - XSHM_LIBS="-lXext -lXextSam" - fi - fi - fi + + +fi LIBS=$gst_check_save_LIBS @@ -31160,36 +30469,35 @@ CPPFLAGS=$gst_check_save_CPPFLAGS CXXFLAGS=$gst_check_save_CXXFLAGS - if test x$HAVE_XSHM = xno; then - USE_XSHM=no + if test x$HAVE_X = xno; then + USE_X=no else - : + { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: ximagesrc" >&5 +$as_echo "$as_me: *** These plugins will be built: ximagesrc" >&6;} fi fi -if test x$USE_XSHM = xyes; then - - - - - if test "x" != "x"; then - GST_PLUGINS_YES="\t\n$GST_PLUGINS_YES" +if test x$USE_X = xyes; then + : + if test "xximagesrc" != "x"; then + GST_PLUGINS_YES="\tximagesrc\n$GST_PLUGINS_YES" fi -$as_echo "#define HAVE_XSHM /**/" >>confdefs.h +$as_echo "#define HAVE_X /**/" >>confdefs.h else - : - if test "x" != "x"; then - GST_PLUGINS_NO="\t\n$GST_PLUGINS_NO" + { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: ximagesrc" >&5 +$as_echo "$as_me: *** These plugins will not be built: ximagesrc" >&6;} + if test "xximagesrc" != "x"; then + GST_PLUGINS_NO="\tximagesrc\n$GST_PLUGINS_NO" fi : fi - if test x$USE_XSHM = xyes; then - USE_XSHM_TRUE= - USE_XSHM_FALSE='#' + if test x$USE_X = xyes; then + USE_X_TRUE= + USE_X_FALSE='#' else - USE_XSHM_TRUE='#' - USE_XSHM_FALSE= + USE_X_TRUE='#' + USE_X_FALSE= fi @@ -34525,180 +33833,6 @@ fi - if test $HAVE_SPEEX = no - then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speex_bits_init in -lspeex" >&5 -$as_echo_n "checking for speex_bits_init in -lspeex... " >&6; } -if ${ac_cv_lib_speex_speex_bits_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lspeex $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char speex_bits_init (); -int -main () -{ -return speex_bits_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_speex_speex_bits_init=yes -else - ac_cv_lib_speex_speex_bits_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_speex_speex_bits_init" >&5 -$as_echo "$ac_cv_lib_speex_speex_bits_init" >&6; } -if test "x$ac_cv_lib_speex_speex_bits_init" = xyes; then : - HAVE_SPEEX=yes -else - HAVE_SPEEX=no -fi - - if test "x$HAVE_SPEEX" = "xyes"; then - ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default" -if test "x$ac_cv_header_speex_speex_h" = xyes; then : - : -else - HAVE_SPEEX=no -fi - - - if test "x$HAVE_SPEEX" = "xyes"; then - - ac_fn_c_check_header_mongrel "$LINENO" "speex/speex_jitter.h" "ac_cv_header_speex_speex_jitter_h" "$ac_includes_default" -if test "x$ac_cv_header_speex_speex_jitter_h" = xyes; then : - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speex_encode_int in -lspeex" >&5 -$as_echo_n "checking for speex_encode_int in -lspeex... " >&6; } -if ${ac_cv_lib_speex_speex_encode_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lspeex $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char speex_encode_int (); -int -main () -{ -return speex_encode_int (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_speex_speex_encode_int=yes -else - ac_cv_lib_speex_speex_encode_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_speex_speex_encode_int" >&5 -$as_echo "$ac_cv_lib_speex_speex_encode_int" >&6; } -if test "x$ac_cv_lib_speex_speex_encode_int" = xyes; then : - HAVE_SPEEX=yes -else - HAVE_SPEEX=no -fi - - if test "x$HAVE_SPEEX" = "xyes"; then - ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default" -if test "x$ac_cv_header_speex_speex_h" = xyes; then : - : -else - HAVE_SPEEX=no -fi - - - if test "x$HAVE_SPEEX" = "xyes"; then - - HAVE_SPEEX="yes" - SPEEX_LIBS="-lspeex" - - - - else - - HAVE_SPEEX="no" - - fi - else - - HAVE_SPEEX="no" - - fi - - - - -else - - ac_fn_c_check_decl "$LINENO" "SPEEX_GET_LOOKAHEAD" "ac_cv_have_decl_SPEEX_GET_LOOKAHEAD" " -#include - -" -if test "x$ac_cv_have_decl_SPEEX_GET_LOOKAHEAD" = xyes; then : - - HAVE_SPEEX="yes" - SPEEX_LIBS="-lspeex" - - - - -cat >>confdefs.h <<_ACEOF -#define SPEEX_1_0 1 -_ACEOF - - -else - - HAVE_SPEEX="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: You need at least 1.0.4 to compile the speex plugin" >&5 -$as_echo "$as_me: You need at least 1.0.4 to compile the speex plugin" >&6;} - -fi - - -fi - - - - else - : - fi - else - : - fi - - - - fi LIBS=$gst_check_save_LIBS @@ -35460,149 +34594,8 @@ HAVE_WAVPACK=no -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAVPACK" >&5 -$as_echo_n "checking for WAVPACK... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$WAVPACK_CFLAGS"; then - pkg_cv_WAVPACK_CFLAGS="$WAVPACK_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wavpack >= 4.40.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wavpack >= 4.40.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_WAVPACK_CFLAGS=`$PKG_CONFIG --cflags "wavpack >= 4.40.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$WAVPACK_LIBS"; then - pkg_cv_WAVPACK_LIBS="$WAVPACK_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wavpack >= 4.40.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wavpack >= 4.40.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_WAVPACK_LIBS=`$PKG_CONFIG --libs "wavpack >= 4.40.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - WAVPACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wavpack >= 4.40.0"` - else - WAVPACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wavpack >= 4.40.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$WAVPACK_PKG_ERRORS" >&5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAVPACK" >&5 -$as_echo_n "checking for WAVPACK... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$WAVPACK_CFLAGS"; then - pkg_cv_WAVPACK_CFLAGS="$WAVPACK_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wavpack >= 4.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wavpack >= 4.20") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_WAVPACK_CFLAGS=`$PKG_CONFIG --cflags "wavpack >= 4.20" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$WAVPACK_LIBS"; then - pkg_cv_WAVPACK_LIBS="$WAVPACK_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wavpack >= 4.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wavpack >= 4.20") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_WAVPACK_LIBS=`$PKG_CONFIG --libs "wavpack >= 4.20" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - WAVPACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wavpack >= 4.20"` - else - WAVPACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wavpack >= 4.20"` - fi - # Put the nasty error message in config.log where it belongs - echo "$WAVPACK_PKG_ERRORS" >&5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - HAVE_WAVPACK=no - -elif test $pkg_failed = untried; then - - HAVE_WAVPACK=no - -else - WAVPACK_CFLAGS=$pkg_cv_WAVPACK_CFLAGS - WAVPACK_LIBS=$pkg_cv_WAVPACK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - HAVE_WAVPACK=yes - -$as_echo "#define WAVPACK_OLD_API 1" >>confdefs.h - - -fi - -elif test $pkg_failed = untried; then + which="wavpack >= 4.60.0" + required="no" pkg_failed=no @@ -35614,12 +34607,12 @@ pkg_cv_WAVPACK_CFLAGS="$WAVPACK_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wavpack >= 4.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wavpack >= 4.20") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$which") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WAVPACK_CFLAGS=`$PKG_CONFIG --cflags "wavpack >= 4.20" 2>/dev/null` + pkg_cv_WAVPACK_CFLAGS=`$PKG_CONFIG --cflags "$which" 2>/dev/null` else pkg_failed=yes fi @@ -35632,12 +34625,12 @@ pkg_cv_WAVPACK_LIBS="$WAVPACK_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wavpack >= 4.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wavpack >= 4.20") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$which") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WAVPACK_LIBS=`$PKG_CONFIG --libs "wavpack >= 4.20" 2>/dev/null` + pkg_cv_WAVPACK_LIBS=`$PKG_CONFIG --libs "$which" 2>/dev/null` else pkg_failed=yes fi @@ -35656,9 +34649,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - WAVPACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wavpack >= 4.20"` + WAVPACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$which"` else - WAVPACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wavpack >= 4.20"` + WAVPACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$which"` fi # Put the nasty error message in config.log where it belongs echo "$WAVPACK_PKG_ERRORS" >&5 @@ -35666,11 +34659,23 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - HAVE_WAVPACK=no + HAVE_WAVPACK="no" + if test "x$required" = "xyes"; then + as_fn_error $? "$WAVPACK_PKG_ERRORS" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: $WAVPACK_PKG_ERRORS" >&5 +$as_echo "$as_me: $WAVPACK_PKG_ERRORS" >&6;} + fi elif test $pkg_failed = untried; then - HAVE_WAVPACK=no + HAVE_WAVPACK="no" + if test "x$required" = "xyes"; then + as_fn_error $? "$WAVPACK_PKG_ERRORS" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: $WAVPACK_PKG_ERRORS" >&5 +$as_echo "$as_me: $WAVPACK_PKG_ERRORS" >&6;} + fi else WAVPACK_CFLAGS=$pkg_cv_WAVPACK_CFLAGS @@ -35678,21 +34683,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_WAVPACK=yes - -$as_echo "#define WAVPACK_OLD_API 1" >>confdefs.h - + HAVE_WAVPACK="yes" fi -else - WAVPACK_CFLAGS=$pkg_cv_WAVPACK_CFLAGS - WAVPACK_LIBS=$pkg_cv_WAVPACK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_WAVPACK=yes -fi - @@ -36222,14 +35216,6 @@ fi if false; then - USE_XSHM_TRUE= - USE_XSHM_FALSE='#' -else - USE_XSHM_TRUE='#' - USE_XSHM_FALSE= -fi - - if false; then USE_ZLIB_TRUE= USE_ZLIB_FALSE='#' else @@ -36499,6 +35485,10 @@ as_fn_error $? "conditional \"HAVE_CPU_ALPHA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_CPU_ARC_TRUE}" && test -z "${HAVE_CPU_ARC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CPU_ARC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_CPU_ARM_TRUE}" && test -z "${HAVE_CPU_ARM_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_ARM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -36828,10 +35818,6 @@ as_fn_error $? "conditional \"USE_X\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${USE_XSHM_TRUE}" && test -z "${USE_XSHM_FALSE}"; then - as_fn_error $? "conditional \"USE_XSHM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${USE_AALIB_TRUE}" && test -z "${USE_AALIB_FALSE}"; then as_fn_error $? "conditional \"USE_AALIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -37020,10 +36006,6 @@ as_fn_error $? "conditional \"USE_X\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${USE_XSHM_TRUE}" && test -z "${USE_XSHM_FALSE}"; then - as_fn_error $? "conditional \"USE_XSHM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${USE_ZLIB_TRUE}" && test -z "${USE_ZLIB_FALSE}"; then as_fn_error $? "conditional \"USE_ZLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -37425,7 +36407,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GStreamer Good Plug-ins $as_me 1.4.3, which was +This file was extended by GStreamer Good Plug-ins $as_me 1.6.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -37491,7 +36473,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GStreamer Good Plug-ins config.status 1.4.3 +GStreamer Good Plug-ins config.status 1.6.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru gst-plugins-good1.0-1.4.3/configure.ac gst-plugins-good1.0-1.6.1/configure.ac --- gst-plugins-good1.0-1.4.3/configure.ac 2014-09-24 07:25:30.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/configure.ac 2015-10-30 12:10:05.000000000 +0000 @@ -1,16 +1,16 @@ -AC_PREREQ([2.68]) +AC_PREREQ([2.69]) dnl please read gstreamer/docs/random/autotools before changing this file dnl initialize autoconf dnl releases only do -Wall, git and prerelease does -Werror too dnl use a three digit version number for releases, and four for git/pre -AC_INIT([GStreamer Good Plug-ins],[1.4.3],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-good]) +AC_INIT([GStreamer Good Plug-ins],[1.6.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-good]) AG_GST_INIT dnl initialize automake -AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects]) +AM_INIT_AUTOMAKE([-Wno-portability 1.14 no-dist-gzip dist-xz tar-ustar subdir-objects]) dnl define PACKAGE_VERSION_* variables AS_VERSION @@ -43,11 +43,11 @@ [GStreamer API Version]) AG_GST_LIBTOOL_PREPARE -AS_LIBTOOL(GST, 403, 0, 403) +AS_LIBTOOL(GST, 601, 0, 601) dnl *** required versions of GStreamer stuff *** -GST_REQ=1.4.0 -GSTPB_REQ=1.4.0 +GST_REQ=1.6.1 +GSTPB_REQ=1.6.1 dnl *** autotools stuff **** @@ -388,7 +388,7 @@ save_LIBS="$LIBS" CFLAGS="$CFLAGS $DIRECTSOUND_CFLAGS" LDFLAGS="$LDFLAGS $DIRECTSOUND_LDFLAGS" - LIBS="$LIBS -ldsound -ldxerr9 -luser32" + LIBS="$LIBS -ldsound -ldxerr9 -luser32 -lole32" AC_MSG_CHECKING(for DirectSound LDFLAGS) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include @@ -397,6 +397,7 @@ ]], [[ DXGetErrorString9 (0); DirectSoundCreate(NULL, NULL, NULL); + CLSIDFromString(NULL, NULL); ]]) ], [HAVE_DIRECTSOUND="yes"], @@ -408,7 +409,7 @@ if test "x$HAVE_DIRECTSOUND" = "xyes"; then dnl this is much more than we want - DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32" + DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32 -lole32" AC_SUBST(DIRECTSOUND_CFLAGS) AC_SUBST(DIRECTSOUND_LDFLAGS) AC_SUBST(DIRECTSOUND_LIBS) @@ -506,7 +507,10 @@ AC_MSG_CHECKING([Checking for video4linux2 header ...]) AC_CHECK_HEADER(linux/videodev2.h, [ HAVE_GST_V4L2=yes ], [ - AC_CHECK_HEADER(sys/videodev2.h, [ HAVE_GST_V4L2=yes ]) + AC_CHECK_HEADER(sys/videodev2.h, [ HAVE_GST_V4L2=yes ], + [ + AC_CHECK_HEADER(sys/videoio.h, [ HAVE_GST_V4L2=yes ]) + ]) ]) if test "x$HAVE_VIDEODEV" = "xno"; then AC_MSG_WARN([video4linux2 was not found]) @@ -554,55 +558,29 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_X, true) AG_GST_CHECK_FEATURE(X, [X libraries and plugins], [ximagesrc], [ - AG_GST_CHECK_X - - if test "x$HAVE_X" = "xyes" - then + PKG_CHECK_MODULES([X], [x11], [ + HAVE_X="yes" dnl check for Xfixes - PKG_CHECK_MODULES(XFIXES, xfixes, HAVE_XFIXES="yes", HAVE_XFIXES="no") - if test "x$HAVE_XFIXES" = "xyes" - then - XFIXES_CFLAGS="-DHAVE_XFIXES $XFIXES_CFLAGS" - fi - AC_SUBST(XFIXES_LIBS) - AC_SUBST(XFIXES_CFLAGS) + PKG_CHECK_MODULES([XFIXES], [ xfixes ], [ + AC_DEFINE(HAVE_XFIXES, 1, [Defined if Xfixes is available]) + ], [ HAVE_XFIXES="no" ]) dnl check for Xdamage - PKG_CHECK_MODULES(XDAMAGE, xdamage, HAVE_XDAMAGE="yes", HAVE_XDAMAGE="no") - if test "x$HAVE_XDAMAGE" = "xyes" - then - XDAMAGE_CFLAGS="-DHAVE_XDAMAGE $XDAMAGE_CFLAGS" - fi - AC_SUBST(XDAMAGE_LIBS) - AC_SUBST(XDAMAGE_CFLAGS) - fi -]) - -dnl FIXME: this should be rolled into the test above, it's just an additional -dnl feature of the ximagesrc plug-in -dnl This is the same as in gst-plugins-base -dnl check for X Shm -translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true) -AG_GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], , [ - if test x$HAVE_X = xyes; then - AC_CHECK_LIB(Xext, XShmAttach, - HAVE_XSHM="yes", HAVE_XSHM="no", - $X_LIBS) - if test "x$HAVE_XSHM" = "xyes"; then - XSHM_LIBS="-lXext" - else - dnl On AIX, it is in XextSam instead, but we still need -lXext - AC_CHECK_LIB(XextSam, XShmAttach, - HAVE_XSHM="yes", HAVE_XSHM="no", - $X_LIBS) - if test "x$HAVE_XSHM" = "xyes"; then - XSHM_LIBS="-lXext -lXextSam" - fi - fi - fi -], ,[ - AC_SUBST(HAVE_XSHM) - AC_SUBST(XSHM_LIBS) + PKG_CHECK_MODULES([XDAMAGE], [ xdamage ], [ + AC_DEFINE(HAVE_XDAMAGE, 1, [Defined if Xdamage is available]) + ], [ HAVE_XDAMAGE="no" ]) + + dnl check for X Shm + PKG_CHECK_MODULES([XEXT], [ xext ], [ + AC_CHECK_LIB([Xext], [ XShmAttach ], [ + AC_DEFINE(HAVE_XSHM, 1, [Defined if XShm is available]) + XSHM_LIBS="$XEXT_LIBS" + XSHM_CFLAGS="$XEXT_CFLAGS" + ], [ HAVE_XEXT="no" ] , [ $X_LIBS ]) + ]) + AC_SUBST(XSHM_LIBS) + AC_SUBST(XSHM_CFLAGS) + ], [ HAVE_X="no" ]) ]) dnl *** ext plug-ins *** @@ -769,47 +747,10 @@ AC_SUBST(SOUP_LIBS) ]) -dnl *** speex >= 1.0.4 or >= 1.1.5 *** -dnl 1.1.4 and earlier were not API/ABI compatible with 1.0 -dnl 1.1.6 is the first to use a .pc/pkg-config file *** -dnl speex_jitter.h is 1.1.x only +dnl *** speex *** translit(dnm, m, l) AM_CONDITIONAL(USE_SPEEX, true) AG_GST_CHECK_FEATURE(SPEEX, [speex speech codec], speex, [ AG_GST_PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6) - if test $HAVE_SPEEX = no - then - AG_GST_CHECK_LIBHEADER(SPEEX, speex, speex_bits_init, , speex/speex.h, [ - AC_CHECK_HEADER(speex/speex_jitter.h, [ - dnl speex 1.1.x : - AG_GST_CHECK_LIBHEADER(SPEEX, speex, speex_encode_int, , speex/speex.h, [ - dnl speex 1.1.5 or + : - HAVE_SPEEX="yes" - SPEEX_LIBS="-lspeex" - AC_SUBST(SPEEX_CFLAGS) - AC_SUBST(SPEEX_LIBS) - ],[ - HAVE_SPEEX="no" - ]) - ],[ - dnl speex 1.0.x : - AC_CHECK_DECL(SPEEX_GET_LOOKAHEAD, [ - dnl speex 1.0.4 - HAVE_SPEEX="yes" - SPEEX_LIBS="-lspeex" - AC_SUBST(SPEEX_CFLAGS) - AC_SUBST(SPEEX_LIBS) - - AC_DEFINE_UNQUOTED(SPEEX_1_0, 1, - [defined if speex 1.0.x API detected]) - ],[ - HAVE_SPEEX="no" - AC_MSG_NOTICE(You need at least 1.0.4 to compile the speex plugin) - ], [ -#include - ]) - ]) - ]) - fi ]) dnl *** taglib *** @@ -871,16 +812,7 @@ dnl *** wavpack *** translit(dnm, m, l) AM_CONDITIONAL(USE_WAVPACK, true) AG_GST_CHECK_FEATURE(WAVPACK, [wavpack plug-in], wavpack, [ - PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.40.0, HAVE_WAVPACK=yes, [ - PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.20, [ - HAVE_WAVPACK=yes - AC_DEFINE(WAVPACK_OLD_API, 1, [old wavpack API]) - ],[ - HAVE_WAVPACK=no - ]) - ]) - AC_SUBST(WAVPACK_CFLAGS) - AC_SUBST(WAVPACK_LIBS) + AG_GST_PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.60.0) ]) dnl *** qtdemux & matroska prefer to have zlib *** @@ -940,7 +872,6 @@ AM_CONDITIONAL(USE_WAVEFORM, false) AM_CONDITIONAL(USE_WAVPACK, false) AM_CONDITIONAL(USE_X, false) -AM_CONDITIONAL(USE_XSHM, false) AM_CONDITIONAL(USE_ZLIB, false) fi dnl of EXT plugins diff -Nru gst-plugins-good1.0-1.4.3/debian/build-deps gst-plugins-good1.0-1.6.1/debian/build-deps --- gst-plugins-good1.0-1.4.3/debian/build-deps 2014-09-24 16:44:37.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/build-deps 2015-11-02 17:38:18.000000000 +0000 @@ -1,6 +1,6 @@ @GST_LIB_DEV_DEP@ @GST_EXTRA_BUILD_DEPENDS@ -libgstreamer-plugins-base@GST_ABI@-dev (>= 1.4.0) +libgstreamer-plugins-base@GST_ABI@-dev (>= 1.2.3) autotools-dev dh-autoreconf automake (>= 1.11) @@ -13,7 +13,7 @@ pkg-config (>= 0.11.0) gtk-doc-tools (>= 1.12) libglib2.0-dev (>= 2.32) -liborc-0.4-dev (>= 1:0.4.17) +liborc-0.4-dev (>= 1:0.4.23) libcairo2-dev (>= 1.10.0) libcaca-dev libspeex-dev (>= 1.1.6) @@ -30,8 +30,8 @@ libgtk-3-dev libtag1-dev (>= 1.5) libwavpack-dev (>= 4.20) -gstreamer@GST_ABI@-plugins-base (>= 1.4.0) -libsoup2.4-dev (>= 2.40) +gstreamer@GST_ABI@-plugins-base (>= 1.0.0) +libsoup2.4-dev (>= 2.38) libpulse-dev (>= 2.0) libbz2-dev gstreamer@GST_ABI@-doc diff -Nru gst-plugins-good1.0-1.4.3/debian/build-deps.in gst-plugins-good1.0-1.6.1/debian/build-deps.in --- gst-plugins-good1.0-1.4.3/debian/build-deps.in 2014-09-24 16:44:37.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/build-deps.in 2015-11-02 17:37:05.000000000 +0000 @@ -1,6 +1,6 @@ @GST_LIB_DEV_DEP@ @GST_EXTRA_BUILD_DEPENDS@ -libgstreamer-plugins-base@GST_ABI@-dev (>= 1.4.0) +libgstreamer-plugins-base@GST_ABI@-dev (>= 1.2.3) autotools-dev dh-autoreconf automake (>= 1.11) @@ -13,7 +13,7 @@ pkg-config (>= 0.11.0) gtk-doc-tools (>= 1.12) libglib2.0-dev (>= 2.32) -liborc-0.4-dev (>= 1:0.4.17) +liborc-0.4-dev (>= 1:0.4.23) libcairo2-dev (>= 1.10.0) libcaca-dev libspeex-dev (>= 1.1.6) @@ -30,8 +30,8 @@ libgtk-3-dev libtag1-dev (>= 1.5) libwavpack-dev (>= 4.20) -gstreamer@GST_ABI@-plugins-base (>= 1.4.0) -libsoup2.4-dev (>= 2.40) +gstreamer@GST_ABI@-plugins-base (>= 1.0.0) +libsoup2.4-dev (>= 2.38) libpulse-dev (>= 2.0) libbz2-dev gstreamer@GST_ABI@-doc diff -Nru gst-plugins-good1.0-1.4.3/debian/changelog gst-plugins-good1.0-1.6.1/debian/changelog --- gst-plugins-good1.0-1.4.3/debian/changelog 2014-10-01 08:18:24.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/changelog 2015-11-02 23:20:42.000000000 +0000 @@ -1,60 +1,34 @@ -gst-plugins-good1.0 (1.4.3-1ubuntu1~ubuntu14.04.1~ppa1) trusty; urgency=medium +gst-plugins-good1.0 (1.6.1-2) trusty; urgency=medium - * No-change backport to trusty + * fix build deps - -- Vasco Alves Wed, 01 Oct 2014 09:18:24 +0100 + -- Dan Witt Mon, 1 Nov 2015 12:00:00 +0500 -gst-plugins-good1.0 (1.4.3-1ubuntu1) utopic; urgency=low - * Merge with Debian unstable; remaining changes: - + Stop installing camerabin2 basecamerabin jpegformat - plugins which have - moved to -good. - + Provide gstreamer-plugins-bad-1.0.pc with Requires on - gstreamer-plugins-good-1.0 - the package we've moved the referenced - library to. This maintains compatibility with upstream software and - other distributions. - + debian/patches/adding-mirsink-and-android-media-over-hybris-support.patch: - - Adding mirsink and Android media over hybris support, for hardware - accelerated decode using libstagefright and the hybris compat layer. - + debian/control.in: - - Making the hybris plugin as part of a separated package, and i386 and - armhf only (can only work with android compatible archs) - + debian/build-deps.in: - - Adding mirsink/android decoder specific build dependencies for i386 and - armhf (libplatform-api1-dev and libmedia-dev) - + Split videoparsers and faad out into their own packages. - + Disable gl on armhf as it's not useful there. - * Add 'pluginsdir' variable to our added pcfile for compatibility with some - external software (LP: #1343970) +gst-plugins-good1.0 (1.6.1-1) trusty; urgency=medium - -- Iain Lane Fri, 26 Sep 2014 12:42:11 +0100 + * sync with git -gst-plugins-good1.0 (1.4.3-1) unstable; urgency=medium + -- Dan Witt Mon, 1 Nov 2015 12:00:00 +0500 - * New upstream bugfix release. +gst-plugins-good1.0 (1.2.4-1~ubuntu1) trusty; urgency=medium - -- Sebastian Dröge Wed, 24 Sep 2014 12:08:04 +0300 + * 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’ -gst-plugins-good1.0 (1.4.2-1ubuntu1) utopic; urgency=low + -- Iain Lane Fri, 25 Apr 2014 11:11:42 +0100 - * 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 Mon, 22 Sep 2014 12:50:27 +0100 - -gst-plugins-good1.0 (1.4.2-1) unstable; urgency=medium - - * New upstream bugfix release. - - -- Sebastian Dröge Fri, 19 Sep 2014 14:27:09 +0300 - -gst-plugins-good1.0 (1.4.1-1ubuntu1) utopic; urgency=low +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. @@ -65,92 +39,6 @@ compiling against it. Add Breaks and Replaces against the plugins packages which formerly contained files shipped here. - -- Iain Lane Fri, 12 Sep 2014 13:09:27 +0100 - -gst-plugins-good1.0 (1.4.1-1) unstable; urgency=medium - - * New upstream bugfix release. - - -- Sebastian Dröge Wed, 27 Aug 2014 14:35:19 +0300 - -gst-plugins-good1.0 (1.4.0-1ubuntu1) utopic; 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, 13 Aug 2014 12:57:42 +0100 - -gst-plugins-good1.0 (1.4.0-1) unstable; urgency=medium - - * New upstream stable release. - - -- Sebastian Dröge Sat, 19 Jul 2014 17:04:19 +0200 - -gst-plugins-good1.0 (1.3.91-1) experimental; urgency=medium - - * New upstream release candidate: - + debian/rules, - debian/build-deps.in: - - Build-depend on GStreamer core and base >= 1.3.91. - - -- Sebastian Dröge Fri, 11 Jul 2014 11:30:26 +0200 - -gst-plugins-good1.0 (1.3.90-1) experimental; urgency=medium - - * New upstream release candidate: - + debian/rules, - debian/build-deps.in: - - Build-depend on GStreamer core and base >= 1.3.90. - - -- Sebastian Dröge Sat, 28 Jun 2014 11:44:49 +0200 - -gst-plugins-good1.0 (1.3.3-1) experimental; urgency=medium - - * New upstream development release: - + debian/rules, - debian/build-deps.in: - - Build-depend on GStreamer core and base >= 1.3.2. - * debian/rules: - + Run autopoint during autoreconf too. - - -- Sebastian Dröge Sun, 22 Jun 2014 18:01:49 +0200 - -gst-plugins-good1.0 (1.3.2-1) experimental; urgency=medium - - * New upstream development release: - + debian/rules, - debian/build-deps.in: - - Build-depend on GStreamer core and base >= 1.3.2. - - -- Sebastian Dröge Wed, 21 May 2014 12:38:54 +0200 - -gst-plugins-good1.0 (1.3.1-1) experimental; urgency=medium - - * New upstream development release: - + debian/rules, - debian/build-deps.in: - - Build-depend on GStreamer core and base >= 1.3.1. - - Build-depend on libsoup >= 2.40. - - -- Sebastian Dröge Sat, 03 May 2014 19:02:39 +0200 - -gst-plugins-good1.0 (1.2.4-1ubuntu1) utopic; urgency=low - - * Merge from Debian unstable (LP: #1312305). 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 @@ -3192,4 +3080,3 @@ * Initial Release. -- David I. Lehn Mon, 15 Jan 2001 18:25:18 -0500 - diff -Nru gst-plugins-good1.0-1.4.3/debian/control gst-plugins-good1.0-1.6.1/debian/control --- gst-plugins-good1.0-1.4.3/debian/control 2014-09-24 16:44:37.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/control 2015-11-02 23:17:19.000000000 +0000 @@ -6,7 +6,7 @@ Uploaders: Loic Minier , Sebastian Dröge , Sjoerd Simons -Build-Depends: libgstreamer1.0-dev (>= 1.4.0), 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.4.0), 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.4.0), libsoup2.4-dev (>= 2.40), libpulse-dev (>= 2.0), libbz2-dev, gstreamer1.0-doc, gstreamer1.0-plugins-base-doc, libjack-jackd2-dev, libvpx-dev (>= 1.3.0) +Build-Depends: libgstreamer1.0-dev (>= 1.6.1), 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.6.1), 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.23), 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 diff -Nru gst-plugins-good1.0-1.4.3/debian/libgstreamer-plugins-good1.0-0.install gst-plugins-good1.0-1.6.1/debian/libgstreamer-plugins-good1.0-0.install --- gst-plugins-good1.0-1.4.3/debian/libgstreamer-plugins-good1.0-0.install 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/libgstreamer-plugins-good1.0-0.install 2015-11-02 17:42:47.000000000 +0000 @@ -0,0 +1,2 @@ +debian/tmp/usr/lib/*/libgstphotography-1.0.so.* +debian/tmp/usr/lib/*/libgstbasecamerabinsrc-1.0.so.* diff -Nru gst-plugins-good1.0-1.4.3/debian/libgstreamer-plugins-good1.0-dev.install gst-plugins-good1.0-1.6.1/debian/libgstreamer-plugins-good1.0-dev.install --- gst-plugins-good1.0-1.4.3/debian/libgstreamer-plugins-good1.0-dev.install 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/libgstreamer-plugins-good1.0-dev.install 2015-11-02 17:42:47.000000000 +0000 @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/*/pkgconfig +debian/tmp/usr/include +debian/tmp/usr/lib/*/*.so diff -Nru gst-plugins-good1.0-1.4.3/debian/patches/add-pkgconfig-file gst-plugins-good1.0-1.6.1/debian/patches/add-pkgconfig-file --- gst-plugins-good1.0-1.4.3/debian/patches/add-pkgconfig-file 2014-09-26 11:36:20.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/patches/add-pkgconfig-file 2015-11-02 17:31:05.000000000 +0000 @@ -6,12 +6,11 @@ =================================================================== --- /dev/null +++ b/pkgconfig/gstreamer-plugins-good.pc.in -@@ -0,0 +1,12 @@ +@@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/gstreamer-@GST_API_VERSION@ -+pluginsdir=@libdir@/gstreamer-@GST_API_VERSION@ + +Name: GStreamer Good Plugin libraries +Description: Currently includes the photography interface library @@ -54,7 +53,7 @@ =================================================================== --- a/configure.ac +++ b/configure.ac -@@ -1106,6 +1106,7 @@ +@@ -1218,6 +1218,7 @@ docs/plugins/Makefile docs/version.entities pkgconfig/Makefile diff -Nru gst-plugins-good1.0-1.4.3/debian/patches/import-camerabin gst-plugins-good1.0-1.6.1/debian/patches/import-camerabin --- gst-plugins-good1.0-1.4.3/debian/patches/import-camerabin 2014-09-12 11:59:34.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/patches/import-camerabin 2015-11-02 17:31:05.000000000 +0000 @@ -1,6 +1,3 @@ -Description: This is a copy of the camerabin2, basecamerabin and photography plugins from gst-plugins-good. They're needed for applications in Ubuntu main, so we move them here. -Forwarded: not-needed - Index: b/configure.ac =================================================================== --- a/configure.ac @@ -31,7 +28,7 @@ AG_GST_CHECK_PLUGIN(cutter) AG_GST_CHECK_PLUGIN(debugutils) AG_GST_CHECK_PLUGIN(deinterlace) -@@ -1019,6 +1031,7 @@ +@@ -1131,6 +1143,7 @@ gst/auparse/Makefile gst/autodetect/Makefile gst/avi/Makefile @@ -39,7 +36,7 @@ gst/cutter/Makefile gst/deinterlace/Makefile gst/dtmf/Makefile -@@ -1055,6 +1068,10 @@ +@@ -1167,6 +1180,10 @@ gst/wavparse/Makefile gst/flx/Makefile gst/y4m/Makefile @@ -50,7 +47,7 @@ ext/Makefile ext/aalib/Makefile ext/cairo/Makefile -@@ -1088,6 +1105,7 @@ +@@ -1200,6 +1217,7 @@ tests/check/Makefile tests/examples/Makefile tests/examples/audiofx/Makefile @@ -368,7 +365,7 @@ =================================================================== --- /dev/null +++ b/gst/camerabin2/gstcamerabin2.c -@@ -0,0 +1,2414 @@ +@@ -0,0 +1,2430 @@ +/* GStreamer + * Copyright (C) 2010 Thiago Santos + * @@ -1427,20 +1424,11 @@ + g_mutex_unlock (&camerabin->preview_list_mutex); + + if (location) { -+ GstStructure *new_structure; + GValue value = { 0 }; -+ + g_value_init (&value, G_TYPE_STRING); + g_value_take_string (&value, location); -+ -+ /* need to do a copy because the structure isn't mutable */ -+ new_structure = gst_structure_copy (structure); -+ gst_structure_take_value (new_structure, "location", &value); -+ -+ gst_message_unref (message); -+ message = -+ gst_message_new_element (GST_OBJECT_CAST (camerabin), -+ new_structure); ++ gst_structure_take_value ((GstStructure *) structure, "location", ++ &value); + } + + GST_LOG_OBJECT (bin, "received preview-image message"); @@ -1492,8 +1480,8 @@ + default: + break; + } -+ -+ GST_BIN_CLASS (parent_class)->handle_message (bin, message); ++ if (message) ++ GST_BIN_CLASS (parent_class)->handle_message (bin, message); + + if (dec_counter) + GST_CAMERA_BIN2_PROCESSING_DEC (camerabin); @@ -2129,13 +2117,8 @@ + 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); -+ -+ if (!gst_element_link_pads (camera->src, "vfsrc", -+ camera->viewfinderbin_queue, "sink")) { -+ GST_ERROR_OBJECT (camera, -+ "Failed to link camera source's vfsrc pad to viewfinder queue"); -+ goto fail; -+ } ++ gst_element_link_pads (camera->src, "vfsrc", camera->viewfinderbin_queue, ++ "sink"); + + if (!gst_element_link_pads (camera->src, "imgsrc", + camera->imagebin_capsfilter, "sink")) { @@ -2450,6 +2433,12 @@ + } + 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, @@ -2461,9 +2450,19 @@ + } 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)); @@ -2475,9 +2474,19 @@ + 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)); @@ -2488,6 +2497,10 @@ + } else { + GST_WARNING_OBJECT (camera, "Viewfinder capsfilter missing"); + } ++ ++ if (pad) { ++ gst_object_unref (pad); ++ } + } + break; + case PROP_POST_PREVIEWS: @@ -3071,7 +3084,7 @@ +static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, -+ GST_STATIC_CAPS ("video/x-raw(ANY)") ++ GST_STATIC_CAPS ("video/x-raw") + ); + +/* class initialization */ @@ -3451,7 +3464,7 @@ =================================================================== --- /dev/null +++ b/gst/camerabin2/gstwrappercamerabinsrc.c -@@ -0,0 +1,1308 @@ +@@ -0,0 +1,1285 @@ +/* + * GStreamer + * Copyright (C) 2010 Texas Instruments, Inc @@ -3783,19 +3796,24 @@ +} + +static void -+gst_wrapper_camera_bin_src_caps_cb (GstPad * pad, GParamSpec * pspec, ++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); -+ GstCaps *caps; ++ GstPad *src_caps_src_pad; ++ GstCaps *caps = NULL; + GstStructure *in_st = NULL; + -+ caps = gst_pad_get_current_caps (pad); -+ -+ GST_DEBUG_OBJECT (self, "src-filter caps changed to %" GST_PTR_FORMAT, caps); ++ /* 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 (caps && gst_caps_get_size (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); @@ -3814,17 +3832,13 @@ + GstCaps *filtercaps; + + g_object_get (G_OBJECT (self->src_zoom_filter), "caps", &filtercaps, NULL); -+ -+ if (caps != filtercaps && (caps == NULL || filtercaps == NULL || -+ !gst_caps_is_equal (filtercaps, caps))) ++ if (!gst_caps_is_equal (filtercaps, caps)) + g_object_set (G_OBJECT (self->src_zoom_filter), "caps", caps, NULL); -+ -+ if (filtercaps) -+ gst_caps_unref (filtercaps); ++ gst_caps_unref (filtercaps); + } + -+ if (caps) -+ gst_caps_unref (caps); ++ /* drop our ref on the caps */ ++ gst_caps_unref (caps); +}; + +static void @@ -3938,10 +3952,8 @@ + if (videoconvert) { + if (!gst_element_link_pads (self->src_vid_src, "src", videoconvert, + "sink")) { -+ gst_object_unref (videoconvert); + return FALSE; + } -+ gst_object_unref (videoconvert); + } + } + @@ -4131,13 +4143,8 @@ + 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)) { -+ gst_object_unref (src_csp); -+ gst_object_unref (capsfilter); ++ capsfilter, NULL)) + goto done; -+ } -+ gst_object_unref (src_csp); -+ gst_object_unref (capsfilter); + } + } + ret = TRUE; @@ -4286,22 +4293,9 @@ + GST_TYPE_PHOTOGRAPHY); + gboolean ret = FALSE; + GstCaps *caps; -+ GstPad *pad, *peer; + + GST_DEBUG_OBJECT (self, "Starting image capture"); + -+ /* FIXME - V4L2 source will not close the device until all buffers have came -+ * back. Flushing the pipeline, will ensure it's properly closed, and that -+ * setting it back to PLAYING will work. This is more a workaround then a -+ * solution to buffer reclaiming. */ -+ pad = gst_element_get_static_pad (self->src_vid_src, "src"); -+ peer = gst_pad_get_peer (pad); -+ gst_object_unref (pad); -+ gst_pad_send_event (peer, gst_event_new_flush_start ()); -+ gst_element_set_state (self->src_vid_src, GST_STATE_READY); -+ gst_pad_send_event (peer, gst_event_new_flush_stop (TRUE)); -+ gst_object_unref (peer); -+ + if (self->image_renegotiate) { + /* clean capsfilter caps so they don't interfere here */ + g_object_set (self->src_filter, "caps", NULL, NULL); @@ -4325,20 +4319,17 @@ + } + + if (photography) { -+ gst_element_set_state (self->src_vid_src, GST_STATE_PLAYING); + 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); -+ gst_object_unref (photography); + } 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; -+ gst_element_set_state (self->src_vid_src, GST_STATE_PLAYING); + } + + return ret; @@ -4371,7 +4362,6 @@ + "capture-mode")) { + g_object_set (G_OBJECT (photography), "capture-mode", mode, NULL); + } -+ gst_object_unref (photography); + } else { + GstCaps *anycaps = gst_caps_new_any (); + gst_wrapper_camera_bin_reset_video_src_caps (self, anycaps); @@ -4947,8 +4937,8 @@ =================================================================== --- /dev/null +++ b/gst/camerabin2/Makefile.in -@@ -0,0 +1,1137 @@ -+# Makefile.in generated by automake 1.14.1 from Makefile.am. +@@ -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. @@ -5038,6 +5028,7 @@ + $(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 \ @@ -5062,12 +5053,11 @@ + $(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/libgcrypt.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 ++ $(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 @@ -5207,15 +5197,11 @@ +CC = @CC@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ ++CDAUDIO_CFLAGS = @CDAUDIO_CFLAGS@ ++CDAUDIO_LIBS = @CDAUDIO_LIBS@ +CFLAGS = @CFLAGS@ +CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ +CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ -+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@ -+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@ -+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@ -+CLUTTER_LIBS = @CLUTTER_LIBS@ -+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@ -+CLUTTER_X11_LIBS = @CLUTTER_X11_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ @@ -5244,6 +5230,7 @@ +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@ @@ -5256,6 +5243,10 @@ +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@ @@ -5288,9 +5279,6 @@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ -+GL_CFLAGS = @GL_CFLAGS@ -+GL_LIBS = @GL_LIBS@ -+GL_OBJCFLAGS = @GL_OBJCFLAGS@ +GME_LIBS = @GME_LIBS@ +GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@ +GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@ @@ -5300,9 +5288,8 @@ +GMSGFMT_015 = @GMSGFMT_015@ +GMYTH_CFLAGS = @GMYTH_CFLAGS@ +GMYTH_LIBS = @GMYTH_LIBS@ -+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@ -+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@ -+GRAPHENE_LIBS = @GRAPHENE_LIBS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ @@ -5361,45 +5348,31 @@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@ +GST_VIDEO_LIBS = @GST_VIDEO_LIBS@ -+GTK3_CFLAGS = @GTK3_CFLAGS@ -+GTK3_LIBS = @GTK3_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_BASE_DIR = @GTK_BASE_DIR@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ -+GTK_VERSION = @GTK_VERSION@ +G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ +G_UDEV_LIBS = @G_UDEV_LIBS@ -+HAVE_CLUTTER = @HAVE_CLUTTER@ -+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@ -+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@ ++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_EGL = @HAVE_EGL@ +HAVE_FAAC = @HAVE_FAAC@ +HAVE_FAAD = @HAVE_FAAD@ +HAVE_FLITE = @HAVE_FLITE@ -+HAVE_GL = @HAVE_GL@ -+HAVE_GLES2 = @HAVE_GLES2@ -+HAVE_GLU = @HAVE_GLU@ -+HAVE_GRAPHENE = @HAVE_GRAPHENE@ +HAVE_GSM = @HAVE_GSM@ -+HAVE_GTK3 = @HAVE_GTK3@ -+HAVE_JPEG = @HAVE_JPEG@ +HAVE_NAS = @HAVE_NAS@ +HAVE_OPENJPEG = @HAVE_OPENJPEG@ -+HAVE_PNG = @HAVE_PNG@ +HAVE_SRTP = @HAVE_SRTP@ +HAVE_WASAPI = @HAVE_WASAPI@ +HAVE_WILDMIDI = @HAVE_WILDMIDI@ -+HAVE_WINKS = @HAVE_WINKS@ +HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@ +HAVE_X = @HAVE_X@ +HAVE_X11 = @HAVE_X11@ @@ -5419,7 +5392,6 @@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ -+JPEG_LIBS = @JPEG_LIBS@ +KATE_CFLAGS = @KATE_CFLAGS@ +KATE_LIBS = @KATE_LIBS@ +LD = @LD@ @@ -5427,25 +5399,18 @@ +LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ +LIBDC1394_LIBS = @LIBDC1394_LIBS@ +LIBDIR = @LIBDIR@ -+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ -+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ -+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ +LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ -+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ -+LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ -+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@ -+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ @@ -5481,8 +5446,6 @@ +NAS_LIBS = @NAS_LIBS@ +NEON_CFLAGS = @NEON_CFLAGS@ +NEON_LIBS = @NEON_LIBS@ -+NETTLE_CFLAGS = @NETTLE_CFLAGS@ -+NETTLE_LIBS = @NETTLE_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ @@ -5497,12 +5460,8 @@ +OPENCV_CFLAGS = @OPENCV_CFLAGS@ +OPENCV_LIBS = @OPENCV_LIBS@ +OPENCV_PREFIX = @OPENCV_PREFIX@ -+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ -+OPENEXR_LIBS = @OPENEXR_LIBS@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ -+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@ -+OPENNI2_LIBS = @OPENNI2_LIBS@ +OPUS_CFLAGS = @OPUS_CFLAGS@ +OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ @@ -5547,7 +5506,6 @@ +SCHRO_CFLAGS = @SCHRO_CFLAGS@ +SCHRO_LIBS = @SCHRO_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ -+SDL_CLUTTER = @SDL_CLUTTER@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ @@ -5565,8 +5523,6 @@ +SPANDSP_LIBS = @SPANDSP_LIBS@ +SPC_LIBS = @SPC_LIBS@ +SRTP_LIBS = @SRTP_LIBS@ -+SSH2_CFLAGS = @SSH2_CFLAGS@ -+SSH2_LIBS = @SSH2_LIBS@ +STRIP = @STRIP@ +TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@ +TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@ @@ -5574,9 +5530,7 @@ +TIGER_LIBS = @TIGER_LIBS@ +TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ +TIMIDITY_LIBS = @TIMIDITY_LIBS@ -+USE_GLES2 = @USE_GLES2@ +USE_NLS = @USE_NLS@ -+USE_OPENGL = @USE_OPENGL@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ @@ -5592,20 +5546,13 @@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WASAPI_LIBS = @WASAPI_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ -+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ -+WEBP_CFLAGS = @WEBP_CFLAGS@ -+WEBP_LIBS = @WEBP_LIBS@ +WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ +WILDMIDI_LIBS = @WILDMIDI_LIBS@ -+WINKS_LIBS = @WINKS_LIBS@ +WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@ +WINSOCK2_LIBS = @WINSOCK2_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ -+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ -+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ @@ -5681,7 +5628,6 @@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ -+wayland_scanner = @wayland_scanner@ +plugin_LTLIBRARIES = libgstcamerabin2.la +libgstcamerabin2_la_SOURCES = gstviewfinderbin.c \ + camerabingeneral.c \ @@ -5794,25 +5740,22 @@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstwrappercamerabinsrc.Plo@am__quote@ + +.c.o: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ $< ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo ++@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 $@ $< @@ -6089,7 +6032,7 @@ =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c -@@ -0,0 +1,584 @@ +@@ -0,0 +1,566 @@ +/* + * GStreamer + * Copyright (C) 2010 Texas Instruments, Inc @@ -6106,8 +6049,8 @@ + * + * 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. ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. + */ + + @@ -6179,8 +6122,7 @@ + PROP_READY_FOR_CAPTURE, + PROP_POST_PREVIEW, + PROP_PREVIEW_CAPS, -+ PROP_PREVIEW_FILTER, -+ PROP_AUTO_START ++ PROP_PREVIEW_FILTER +}; + +enum @@ -6193,7 +6135,6 @@ +}; + +#define DEFAULT_POST_PREVIEW TRUE -+#define DEFAULT_AUTO_START FALSE + +static guint basecamerasrc_signals[LAST_SIGNAL]; + @@ -6413,9 +6354,6 @@ + "Cannot change preview filter, is element in NULL state?"); + } + break; -+ case PROP_AUTO_START: -+ self->auto_start = g_value_get_boolean (value); -+ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); + break; @@ -6452,9 +6390,6 @@ + if (self->preview_filter) + g_value_set_object (value, self->preview_filter); + break; -+ case PROP_AUTO_START: -+ g_value_set_boolean (value, self->auto_start); -+ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); + break; @@ -6521,8 +6456,6 @@ + * messages on the pipeline */ + gst_element_set_state (self->preview_pipeline->pipeline, + GST_STATE_PLAYING); -+ if (self->auto_start) -+ g_signal_emit_by_name (G_OBJECT (self), "start-capture", NULL); + break; + default: + break; @@ -6533,8 +6466,6 @@ + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_element_set_state (self->preview_pipeline->pipeline, GST_STATE_READY); -+ if (self->auto_start) -+ g_signal_emit_by_name (G_OBJECT (self), "stop-capture", NULL); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + gst_element_set_state (self->preview_pipeline->pipeline, GST_STATE_NULL); @@ -6601,11 +6532,6 @@ + "A custom preview filter to process preview image data", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + -+ g_object_class_install_property (gobject_class, PROP_AUTO_START, -+ g_param_spec_boolean ("auto-start", "Auto start capture", -+ "Automatically starts capture when going to the PAUSED state", -+ DEFAULT_AUTO_START, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -+ + /** + * GstBaseCameraSrc:ready-for-capture: + * @@ -6654,7 +6580,6 @@ + self->max_zoom = MAX_ZOOM; + self->mode = MODE_IMAGE; + -+ self->auto_start = DEFAULT_AUTO_START; + self->capturing = FALSE; + g_mutex_init (&self->capturing_mutex); + @@ -6678,7 +6603,7 @@ =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h -@@ -0,0 +1,143 @@ +@@ -0,0 +1,142 @@ +/* + * GStreamer + * Copyright (C) 2010 Texas Instruments, Inc @@ -6696,8 +6621,8 @@ + * + * 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. ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. + */ + + @@ -6749,7 +6674,6 @@ + + GstCameraBinMode mode; + -+ gboolean auto_start; + gboolean capturing; + GMutex capturing_mutex; + @@ -6843,8 +6767,8 @@ + * + * 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. ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. + */ + +#include "gstcamerabin-enum.h" @@ -6887,8 +6811,8 @@ + * + * 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. ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_CAMERABIN_ENUM_H__ @@ -6954,8 +6878,8 @@ + * + * 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. ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. + */ + +/** @@ -7366,8 +7290,8 @@ + * + * 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. ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. + */ + +#ifndef __CAMERABIN_PREVIEW_H_ @@ -7453,12 +7377,13 @@ =================================================================== --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/Makefile.in -@@ -0,0 +1,1078 @@ -+# Makefile.in generated by automake 1.14.1 from Makefile.am. +@@ -0,0 +1,913 @@ ++# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + -+# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+ ++# 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. @@ -7472,51 +7397,23 @@ + + +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 \ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ + 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;; \ ++ 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; \ -+ 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)) ++ test $$am__dry = yes; \ ++ } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ @@ -7537,14 +7434,17 @@ +host_triplet = @host@ +target_triplet = @target@ +subdir = gst-libs/gst/basecamerabinsrc -+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -+ $(top_srcdir)/depcomp \ -+ $(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS) ++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 \ @@ -7563,13 +7463,11 @@ + $(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/libgcrypt.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 \ @@ -7623,7 +7521,6 @@ +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 = +libgstbasecamerabinsrc_@GST_API_VERSION@_la_LINK = $(LIBTOOL) \ + $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) \ @@ -7631,18 +7528,6 @@ + $(CFLAGS) \ + $(libgstbasecamerabinsrc_@GST_API_VERSION@_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 @@ -7655,16 +7540,20 @@ + $(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 = ++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_CCLD_1 = ++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 = \ @@ -7673,55 +7562,40 @@ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS) -+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) ++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@ -+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@ ++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@ -+CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ -+CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ -+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@ -+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@ -+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@ -+CLUTTER_LIBS = @CLUTTER_LIBS@ -+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@ -+CLUTTER_X11_LIBS = @CLUTTER_X11_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@ @@ -7730,19 +7604,14 @@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ -+DIRECT3D_LIBS = @DIRECT3D_LIBS@ -+DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@ -+DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -+DIRECTFB_LIBS = @DIRECTFB_LIBS@ ++DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@ ++DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@ +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@ ++DV1394_CFLAGS = @DV1394_CFLAGS@ ++DV1394_LIBS = @DV1394_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ @@ -7751,53 +7620,30 @@ +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@ ++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_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@ -+GL_CFLAGS = @GL_CFLAGS@ -+GL_LIBS = @GL_LIBS@ -+GL_OBJCFLAGS = @GL_OBJCFLAGS@ -+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@ -+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@ -+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@ -+GRAPHENE_LIBS = @GRAPHENE_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@ @@ -7815,84 +7661,47 @@ +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_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_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@ -+GTK3_CFLAGS = @GTK3_CFLAGS@ -+GTK3_LIBS = @GTK3_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_BASE_DIR = @GTK_BASE_DIR@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ -+GTK_VERSION = @GTK_VERSION@ -+G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ -+G_UDEV_LIBS = @G_UDEV_LIBS@ -+HAVE_CLUTTER = @HAVE_CLUTTER@ -+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@ -+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@ ++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_DIRECT3D = @HAVE_DIRECT3D@ -+HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@ +HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@ -+HAVE_DTS = @HAVE_DTS@ -+HAVE_EGL = @HAVE_EGL@ -+HAVE_FAAC = @HAVE_FAAC@ -+HAVE_FAAD = @HAVE_FAAD@ -+HAVE_FLITE = @HAVE_FLITE@ -+HAVE_GL = @HAVE_GL@ -+HAVE_GLES2 = @HAVE_GLES2@ -+HAVE_GLU = @HAVE_GLU@ -+HAVE_GRAPHENE = @HAVE_GRAPHENE@ -+HAVE_GSM = @HAVE_GSM@ -+HAVE_GTK3 = @HAVE_GTK3@ -+HAVE_JPEG = @HAVE_JPEG@ -+HAVE_NAS = @HAVE_NAS@ -+HAVE_OPENJPEG = @HAVE_OPENJPEG@ -+HAVE_PNG = @HAVE_PNG@ -+HAVE_SRTP = @HAVE_SRTP@ -+HAVE_WASAPI = @HAVE_WASAPI@ -+HAVE_WILDMIDI = @HAVE_WILDMIDI@ -+HAVE_WINKS = @HAVE_WINKS@ -+HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@ ++HAVE_ROM1394 = @HAVE_ROM1394@ ++HAVE_SPEEX = @HAVE_SPEEX@ +HAVE_X = @HAVE_X@ -+HAVE_X11 = @HAVE_X11@ ++HAVE_XSHM = @HAVE_XSHM@ ++HAVE_ZLIB = @HAVE_ZLIB@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ @@ -7901,78 +7710,44 @@ +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@ ++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@ -+KATE_CFLAGS = @KATE_CFLAGS@ -+KATE_LIBS = @KATE_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ -+LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ -+LIBDC1394_LIBS = @LIBDC1394_LIBS@ -+LIBDIR = @LIBDIR@ -+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ -+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ -+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ ++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@ -+LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ -+LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ -+LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ -+LIBUDEV_LIBS = @LIBUDEV_LIBS@ -+LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -+LIBUSB_LIBS = @LIBUSB_LIBS@ -+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@ -+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@ -+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ -+LIBXML2_LIBS = @LIBXML2_LIBS@ ++LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@ ++LIBV4L2_LIBS = @LIBV4L2_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@ -+NETTLE_CFLAGS = @NETTLE_CFLAGS@ -+NETTLE_LIBS = @NETTLE_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ @@ -7980,21 +7755,6 @@ +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@ -+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ -+OPENEXR_LIBS = @OPENEXR_LIBS@ -+OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ -+OPENJPEG_LIBS = @OPENJPEG_LIBS@ -+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@ -+OPENNI2_LIBS = @OPENNI2_LIBS@ -+OPUS_CFLAGS = @OPUS_CFLAGS@ -+OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ +ORCC_FLAGS = @ORCC_FLAGS@ +ORC_CFLAGS = @ORC_CFLAGS@ @@ -8018,95 +7778,56 @@ +PLUGINDIR = @PLUGINDIR@ +POSUB = @POSUB@ +PROFILE_CFLAGS = @PROFILE_CFLAGS@ -+PVR_CFLAGS = @PVR_CFLAGS@ -+PVR_LIBS = @PVR_LIBS@ ++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@ -+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_CLUTTER = @SDL_CLUTTER@ -+SDL_CONFIG = @SDL_CONFIG@ -+SDL_LIBS = @SDL_LIBS@ ++RAW1394_CFLAGS = @RAW1394_CFLAGS@ ++RAW1394_LIBS = @RAW1394_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@ -+SSH2_CFLAGS = @SSH2_CFLAGS@ -+SSH2_LIBS = @SSH2_LIBS@ ++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@ -+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_GLES2 = @USE_GLES2@ ++TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ ++TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@ ++TAGLIB_LIBS = @TAGLIB_LIBS@ +USE_NLS = @USE_NLS@ -+USE_OPENGL = @USE_OPENGL@ +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@ ++VPX_CFLAGS = @VPX_CFLAGS@ ++VPX_LIBS = @VPX_LIBS@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ -+WASAPI_LIBS = @WASAPI_LIBS@ -+WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ -+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -+WAYLAND_LIBS = @WAYLAND_LIBS@ -+WEBP_CFLAGS = @WEBP_CFLAGS@ -+WEBP_LIBS = @WEBP_LIBS@ -+WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ -+WILDMIDI_LIBS = @WILDMIDI_LIBS@ -+WINKS_LIBS = @WINKS_LIBS@ -+WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@ -+WINSOCK2_LIBS = @WINSOCK2_LIBS@ -+X11_CFLAGS = @X11_CFLAGS@ -+X11_LIBS = @X11_LIBS@ -+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ -+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ ++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@ -+XVID_LIBS = @XVID_LIBS@ ++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@ -+ZBAR_CFLAGS = @ZBAR_CFLAGS@ -+ZBAR_LIBS = @ZBAR_LIBS@ ++ZLIB_LIBS = @ZLIB_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ @@ -8133,7 +7854,6 @@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ -+gsettingsschemadir = @gsettingsschemadir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ @@ -8171,7 +7891,6 @@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ -+wayland_scanner = @wayland_scanner@ +lib_LTLIBRARIES = libgstbasecamerabinsrc-@GST_API_VERSION@.la +CLEANFILES = $(BUILT_SOURCES) +libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES = \ @@ -8229,7 +7948,6 @@ +$(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=; \ @@ -8256,15 +7974,12 @@ + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) -+ @list='$(lib_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}; \ -+ } -+ ++ @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) + @@ -8279,25 +7994,22 @@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbasecamerabinsrc_@GST_API_VERSION@_la-gstcamerabinpreview.Plo@am__quote@ + +.c.o: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ $< ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo ++@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 $@ $< @@ -8349,12 +8061,58 @@ + @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) -+tags TAGS: + -+ctags CTAGS: ++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 + -+cscope cscopelist: ++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'`; \ @@ -8432,7 +8190,8 @@ +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile -+distclean-am: clean-am distclean-compile distclean-generic ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-tags + +dvi: dvi-am + @@ -8497,10 +8256,10 @@ + +.MAKE: install-am install-strip + -+.PHONY: all all-am check check-am clean clean-generic \ -+ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags-am \ -+ distclean distclean-compile distclean-generic \ -+ distclean-libtool distdir dvi dvi-am html html-am info info-am \ ++.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 \ @@ -8510,7 +8269,7 @@ + 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-am uninstall \ ++ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-libLTLIBRARIES \ + uninstall-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS + @@ -10743,7 +10502,7 @@ =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/gst-camerabin2-test.c -@@ -0,0 +1,1315 @@ +@@ -0,0 +1,1326 @@ +/* + * GStreamer + * Copyright (C) 2010 Nokia Corporation @@ -11498,20 +11257,31 @@ + if (mode == MODE_VIDEO) { + GstCaps *caps = NULL; + if (view_framerate_num > 0) -+ caps = gst_caps_new_full (gst_structure_new ("video/x-raw", ++ 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", ++ 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", ++ 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); + @@ -12123,8 +11893,8 @@ =================================================================== --- /dev/null +++ b/tests/examples/camerabin2/Makefile.in -@@ -0,0 +1,1080 @@ -+# Makefile.in generated by automake 1.14.1 from Makefile.am. +@@ -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. @@ -12215,6 +11985,7 @@ + $(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 \ @@ -12239,12 +12010,11 @@ + $(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/libgcrypt.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 ++ $(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 @@ -12365,15 +12135,11 @@ +CC = @CC@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ ++CDAUDIO_CFLAGS = @CDAUDIO_CFLAGS@ ++CDAUDIO_LIBS = @CDAUDIO_LIBS@ +CFLAGS = @CFLAGS@ +CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ +CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ -+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@ -+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@ -+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@ -+CLUTTER_LIBS = @CLUTTER_LIBS@ -+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@ -+CLUTTER_X11_LIBS = @CLUTTER_X11_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ @@ -12402,6 +12168,7 @@ +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@ @@ -12414,6 +12181,10 @@ +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@ @@ -12446,9 +12217,6 @@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ -+GL_CFLAGS = @GL_CFLAGS@ -+GL_LIBS = @GL_LIBS@ -+GL_OBJCFLAGS = @GL_OBJCFLAGS@ +GME_LIBS = @GME_LIBS@ +GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@ +GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@ @@ -12458,9 +12226,8 @@ +GMSGFMT_015 = @GMSGFMT_015@ +GMYTH_CFLAGS = @GMYTH_CFLAGS@ +GMYTH_LIBS = @GMYTH_LIBS@ -+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@ -+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@ -+GRAPHENE_LIBS = @GRAPHENE_LIBS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ @@ -12519,45 +12286,31 @@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@ +GST_VIDEO_LIBS = @GST_VIDEO_LIBS@ -+GTK3_CFLAGS = @GTK3_CFLAGS@ -+GTK3_LIBS = @GTK3_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_BASE_DIR = @GTK_BASE_DIR@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ -+GTK_VERSION = @GTK_VERSION@ +G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ +G_UDEV_LIBS = @G_UDEV_LIBS@ -+HAVE_CLUTTER = @HAVE_CLUTTER@ -+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@ -+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@ ++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_EGL = @HAVE_EGL@ +HAVE_FAAC = @HAVE_FAAC@ +HAVE_FAAD = @HAVE_FAAD@ +HAVE_FLITE = @HAVE_FLITE@ -+HAVE_GL = @HAVE_GL@ -+HAVE_GLES2 = @HAVE_GLES2@ -+HAVE_GLU = @HAVE_GLU@ -+HAVE_GRAPHENE = @HAVE_GRAPHENE@ +HAVE_GSM = @HAVE_GSM@ -+HAVE_GTK3 = @HAVE_GTK3@ -+HAVE_JPEG = @HAVE_JPEG@ +HAVE_NAS = @HAVE_NAS@ +HAVE_OPENJPEG = @HAVE_OPENJPEG@ -+HAVE_PNG = @HAVE_PNG@ +HAVE_SRTP = @HAVE_SRTP@ +HAVE_WASAPI = @HAVE_WASAPI@ +HAVE_WILDMIDI = @HAVE_WILDMIDI@ -+HAVE_WINKS = @HAVE_WINKS@ +HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@ +HAVE_X = @HAVE_X@ +HAVE_X11 = @HAVE_X11@ @@ -12577,7 +12330,6 @@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ -+JPEG_LIBS = @JPEG_LIBS@ +KATE_CFLAGS = @KATE_CFLAGS@ +KATE_LIBS = @KATE_LIBS@ +LD = @LD@ @@ -12585,25 +12337,18 @@ +LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ +LIBDC1394_LIBS = @LIBDC1394_LIBS@ +LIBDIR = @LIBDIR@ -+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ -+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ -+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ +LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ -+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ -+LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ -+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@ -+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ @@ -12639,8 +12384,6 @@ +NAS_LIBS = @NAS_LIBS@ +NEON_CFLAGS = @NEON_CFLAGS@ +NEON_LIBS = @NEON_LIBS@ -+NETTLE_CFLAGS = @NETTLE_CFLAGS@ -+NETTLE_LIBS = @NETTLE_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ @@ -12655,12 +12398,8 @@ +OPENCV_CFLAGS = @OPENCV_CFLAGS@ +OPENCV_LIBS = @OPENCV_LIBS@ +OPENCV_PREFIX = @OPENCV_PREFIX@ -+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ -+OPENEXR_LIBS = @OPENEXR_LIBS@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ -+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@ -+OPENNI2_LIBS = @OPENNI2_LIBS@ +OPUS_CFLAGS = @OPUS_CFLAGS@ +OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ @@ -12705,7 +12444,6 @@ +SCHRO_CFLAGS = @SCHRO_CFLAGS@ +SCHRO_LIBS = @SCHRO_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ -+SDL_CLUTTER = @SDL_CLUTTER@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ @@ -12723,8 +12461,6 @@ +SPANDSP_LIBS = @SPANDSP_LIBS@ +SPC_LIBS = @SPC_LIBS@ +SRTP_LIBS = @SRTP_LIBS@ -+SSH2_CFLAGS = @SSH2_CFLAGS@ -+SSH2_LIBS = @SSH2_LIBS@ +STRIP = @STRIP@ +TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@ +TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@ @@ -12732,9 +12468,7 @@ +TIGER_LIBS = @TIGER_LIBS@ +TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ +TIMIDITY_LIBS = @TIMIDITY_LIBS@ -+USE_GLES2 = @USE_GLES2@ +USE_NLS = @USE_NLS@ -+USE_OPENGL = @USE_OPENGL@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ @@ -12750,20 +12484,13 @@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WASAPI_LIBS = @WASAPI_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ -+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ -+WEBP_CFLAGS = @WEBP_CFLAGS@ -+WEBP_LIBS = @WEBP_LIBS@ +WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ +WILDMIDI_LIBS = @WILDMIDI_LIBS@ -+WINKS_LIBS = @WINKS_LIBS@ +WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@ +WINSOCK2_LIBS = @WINSOCK2_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ -+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ -+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ @@ -12839,7 +12566,6 @@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ -+wayland_scanner = @wayland_scanner@ +GST_CAMERABIN_UI_FILES = gst-camera2.ui +AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\" +@HAVE_GTK_FALSE@GST_CAMERABIN_GTK_EXAMPLES = @@ -12940,25 +12666,22 @@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Po@am__quote@ + +.c.o: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ $< ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo ++@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 $@ $< diff -Nru gst-plugins-good1.0-1.4.3/debian/patches/import-jpegformat gst-plugins-good1.0-1.6.1/debian/patches/import-jpegformat --- gst-plugins-good1.0-1.4.3/debian/patches/import-jpegformat 2014-07-22 15:20:12.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/patches/import-jpegformat 2015-11-02 17:31:05.000000000 +0000 @@ -1,6 +1,3 @@ -Description: This is a copy of the jpegformat plugin from gst-plugins-good. It's needed for Ubuntu main, so we copy it. -Forwarded: not-needed - Index: b/configure.ac =================================================================== --- a/configure.ac @@ -13,7 +10,7 @@ AG_GST_CHECK_PLUGIN(law) AG_GST_CHECK_PLUGIN(level) AG_GST_CHECK_PLUGIN(matroska) -@@ -1046,6 +1047,7 @@ +@@ -1158,6 +1159,7 @@ gst/imagefreeze/Makefile gst/interleave/Makefile gst/isomp4/Makefile @@ -1022,7 +1019,7 @@ =================================================================== --- /dev/null +++ b/gst/jpegformat/gstjpegparse.c -@@ -0,0 +1,1059 @@ +@@ -0,0 +1,1062 @@ +/* GStreamer + * + * jpegparse: a parser for JPEG streams @@ -1969,6 +1966,8 @@ + 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)) { @@ -2025,6 +2024,7 @@ + break; + } + ++ gst_object_unref (parse); + return res; +} + @@ -2182,8 +2182,8 @@ =================================================================== --- /dev/null +++ b/gst/jpegformat/Makefile.in -@@ -0,0 +1,1099 @@ -+# Makefile.in generated by automake 1.14.1 from Makefile.am. +@@ -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. @@ -2273,6 +2273,7 @@ + $(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 \ @@ -2297,12 +2298,11 @@ + $(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/libgcrypt.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 ++ $(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 @@ -2437,15 +2437,11 @@ +CC = @CC@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ ++CDAUDIO_CFLAGS = @CDAUDIO_CFLAGS@ ++CDAUDIO_LIBS = @CDAUDIO_LIBS@ +CFLAGS = @CFLAGS@ +CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@ +CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@ -+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@ -+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@ -+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@ -+CLUTTER_LIBS = @CLUTTER_LIBS@ -+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@ -+CLUTTER_X11_LIBS = @CLUTTER_X11_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ @@ -2474,6 +2470,7 @@ +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@ @@ -2486,6 +2483,10 @@ +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@ @@ -2518,9 +2519,6 @@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_PREFIX = @GLIB_PREFIX@ +GLIB_REQ = @GLIB_REQ@ -+GL_CFLAGS = @GL_CFLAGS@ -+GL_LIBS = @GL_LIBS@ -+GL_OBJCFLAGS = @GL_OBJCFLAGS@ +GME_LIBS = @GME_LIBS@ +GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@ +GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@ @@ -2530,9 +2528,8 @@ +GMSGFMT_015 = @GMSGFMT_015@ +GMYTH_CFLAGS = @GMYTH_CFLAGS@ +GMYTH_LIBS = @GMYTH_LIBS@ -+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@ -+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@ -+GRAPHENE_LIBS = @GRAPHENE_LIBS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ @@ -2591,45 +2588,31 @@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@ +GST_VIDEO_LIBS = @GST_VIDEO_LIBS@ -+GTK3_CFLAGS = @GTK3_CFLAGS@ -+GTK3_LIBS = @GTK3_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_BASE_DIR = @GTK_BASE_DIR@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ -+GTK_VERSION = @GTK_VERSION@ +G_UDEV_CFLAGS = @G_UDEV_CFLAGS@ +G_UDEV_LIBS = @G_UDEV_LIBS@ -+HAVE_CLUTTER = @HAVE_CLUTTER@ -+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@ -+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@ ++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_EGL = @HAVE_EGL@ +HAVE_FAAC = @HAVE_FAAC@ +HAVE_FAAD = @HAVE_FAAD@ +HAVE_FLITE = @HAVE_FLITE@ -+HAVE_GL = @HAVE_GL@ -+HAVE_GLES2 = @HAVE_GLES2@ -+HAVE_GLU = @HAVE_GLU@ -+HAVE_GRAPHENE = @HAVE_GRAPHENE@ +HAVE_GSM = @HAVE_GSM@ -+HAVE_GTK3 = @HAVE_GTK3@ -+HAVE_JPEG = @HAVE_JPEG@ +HAVE_NAS = @HAVE_NAS@ +HAVE_OPENJPEG = @HAVE_OPENJPEG@ -+HAVE_PNG = @HAVE_PNG@ +HAVE_SRTP = @HAVE_SRTP@ +HAVE_WASAPI = @HAVE_WASAPI@ +HAVE_WILDMIDI = @HAVE_WILDMIDI@ -+HAVE_WINKS = @HAVE_WINKS@ +HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@ +HAVE_X = @HAVE_X@ +HAVE_X11 = @HAVE_X11@ @@ -2649,7 +2632,6 @@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ -+JPEG_LIBS = @JPEG_LIBS@ +KATE_CFLAGS = @KATE_CFLAGS@ +KATE_LIBS = @KATE_LIBS@ +LD = @LD@ @@ -2657,25 +2639,18 @@ +LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@ +LIBDC1394_LIBS = @LIBDC1394_LIBS@ +LIBDIR = @LIBDIR@ -+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ -+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ -+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBMMS_CFLAGS = @LIBMMS_CFLAGS@ +LIBMMS_LIBS = @LIBMMS_LIBS@ +LIBOBJS = @LIBOBJS@ -+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ -+LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ -+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@ -+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ @@ -2711,8 +2686,6 @@ +NAS_LIBS = @NAS_LIBS@ +NEON_CFLAGS = @NEON_CFLAGS@ +NEON_LIBS = @NEON_LIBS@ -+NETTLE_CFLAGS = @NETTLE_CFLAGS@ -+NETTLE_LIBS = @NETTLE_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ @@ -2727,12 +2700,8 @@ +OPENCV_CFLAGS = @OPENCV_CFLAGS@ +OPENCV_LIBS = @OPENCV_LIBS@ +OPENCV_PREFIX = @OPENCV_PREFIX@ -+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ -+OPENEXR_LIBS = @OPENEXR_LIBS@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ -+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@ -+OPENNI2_LIBS = @OPENNI2_LIBS@ +OPUS_CFLAGS = @OPUS_CFLAGS@ +OPUS_LIBS = @OPUS_LIBS@ +ORCC = @ORCC@ @@ -2777,7 +2746,6 @@ +SCHRO_CFLAGS = @SCHRO_CFLAGS@ +SCHRO_LIBS = @SCHRO_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ -+SDL_CLUTTER = @SDL_CLUTTER@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ @@ -2795,8 +2763,6 @@ +SPANDSP_LIBS = @SPANDSP_LIBS@ +SPC_LIBS = @SPC_LIBS@ +SRTP_LIBS = @SRTP_LIBS@ -+SSH2_CFLAGS = @SSH2_CFLAGS@ -+SSH2_LIBS = @SSH2_LIBS@ +STRIP = @STRIP@ +TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@ +TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@ @@ -2804,9 +2770,7 @@ +TIGER_LIBS = @TIGER_LIBS@ +TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ +TIMIDITY_LIBS = @TIMIDITY_LIBS@ -+USE_GLES2 = @USE_GLES2@ +USE_NLS = @USE_NLS@ -+USE_OPENGL = @USE_OPENGL@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VALGRIND_PATH = @VALGRIND_PATH@ @@ -2822,20 +2786,13 @@ +WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@ +WASAPI_LIBS = @WASAPI_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ -+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ -+WEBP_CFLAGS = @WEBP_CFLAGS@ -+WEBP_LIBS = @WEBP_LIBS@ +WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@ +WILDMIDI_LIBS = @WILDMIDI_LIBS@ -+WINKS_LIBS = @WINKS_LIBS@ +WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@ +WINSOCK2_LIBS = @WINSOCK2_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ -+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ -+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ @@ -2911,7 +2868,6 @@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ -+wayland_scanner = @wayland_scanner@ +plugin_LTLIBRARIES = libgstjpegformat.la +libgstjpegformat_la_SOURCES = gstjpegformat.c gstjpegparse.c gstjifmux.c +libgstjpegformat_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \ @@ -3007,25 +2963,22 @@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstjpegformat_la-gstjpegparse.Plo@am__quote@ + +.c.o: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ $< ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@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 -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: -+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo ++@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 $@ $< diff -Nru gst-plugins-good1.0-1.4.3/debian/patches/random gst-plugins-good1.0-1.6.1/debian/patches/random --- gst-plugins-good1.0-1.4.3/debian/patches/random 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/patches/random 2015-11-02 21:22:10.000000000 +0000 @@ -0,0 +1,1378 @@ +Description: random changes made by make + . + gst-plugins-good1.0 (1.6.1-1) trusty; urgency=medium + . + * sync with git +Author: Dan Witt + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- /dev/null ++++ gst-plugins-good1.0-1.6.1/tests/examples/camerabin2/Makefile +@@ -0,0 +1,907 @@ ++# Makefile.in generated by automake 1.14.1 from Makefile.am. ++# tests/examples/camerabin2/Makefile. Generated from Makefile.in by configure. ++ ++# 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. ++ ++ ++ ++ ++ ++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)/gst-plugins-good ++pkgincludedir = $(includedir)/gst-plugins-good ++pkglibdir = $(libdir)/gst-plugins-good ++pkglibexecdir = $(libexecdir)/gst-plugins-good ++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 = x86_64-pc-linux-gnu ++host_triplet = x86_64-pc-linux-gnu ++target_triplet = x86_64-pc-linux-gnu ++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-gcc-inline-assembly.m4 \ ++ $(top_srcdir)/common/m4/as-libtool.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.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__EXEEXT_1 = gst-camera2$(EXEEXT) ++am__EXEEXT_2 = gst-camerabin2-test$(EXEEXT) ++PROGRAMS = $(noinst_PROGRAMS) ++am__gst_camera2_SOURCES_DIST = gst-camera2.h gst-camera2.c ++#am_gst_camera2_OBJECTS = \ ++# gst_camera2-gst-camera2.$(OBJEXT) ++gst_camera2_OBJECTS = $(am_gst_camera2_OBJECTS) ++am__DEPENDENCIES_1 = ++#gst_camera2_DEPENDENCIES = $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-1.0.la \ ++# $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-1.0.la \ ++# $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ ++# $(am__DEPENDENCIES_1) ++AM_V_lt = $(am__v_lt_$(V)) ++am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) ++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 ++am_gst_camerabin2_test_OBJECTS = gst_camerabin2_test-gst-camerabin2-test.$(OBJEXT) ++gst_camerabin2_test_OBJECTS = $(am_gst_camerabin2_test_OBJECTS) ++gst_camerabin2_test_DEPENDENCIES = $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-1.0.la \ ++ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ ++ $(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_$(V)) ++am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) ++am__v_P_0 = false ++am__v_P_1 = : ++AM_V_GEN = $(am__v_GEN_$(V)) ++am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) ++am__v_GEN_0 = @echo " GEN " $@; ++am__v_GEN_1 = ++AM_V_at = $(am__v_at_$(V)) ++am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) ++am__v_at_0 = @ ++am__v_at_1 = ++DEFAULT_INCLUDES = -I. -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_$(V)) ++am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) ++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_$(V)) ++am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) ++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) ++AALIB_CFLAGS = -I/usr/include ++AALIB_CONFIG = /usr/bin/aalib-config ++AALIB_LIBS = -L/usr/lib/x86_64-linux-gnu -laa ++ACLOCAL = ${SHELL} /root/debs/gst-plugins-good1.0-1.6.1/missing aclocal-1.14 ++ACLOCAL_AMFLAGS = -I m4 -I common/m4 ++AMTAR = $${TAR-tar} ++AM_DEFAULT_VERBOSITY = 1 ++AR = ar ++AS = as ++AUTOCONF = ${SHELL} /root/debs/gst-plugins-good1.0-1.6.1/missing autoconf ++AUTOHEADER = ${SHELL} /root/debs/gst-plugins-good1.0-1.6.1/missing autoheader ++AUTOMAKE = ${SHELL} /root/debs/gst-plugins-good1.0-1.6.1/missing automake-1.14 ++AWK = gawk ++BZ2_LIBS = -lbz2 ++CAIRO_CFLAGS = -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 ++CAIRO_LIBS = -lcairo-gobject -lcairo -lgobject-2.0 -lglib-2.0 ++CC = gcc -std=gnu99 ++CCAS = gcc -std=gnu99 ++CCASDEPMODE = depmode=none ++CCASFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-error ++CCDEPMODE = depmode=none ++CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-error ++CPP = gcc -E ++CPPFLAGS = -D_FORTIFY_SOURCE=2 ++CXX = g++ ++CXXCPP = g++ -E ++CXXDEPMODE = depmode=none ++CXXFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Wno-error ++CYGPATH_W = echo ++DEFAULT_AUDIOSINK = autoaudiosink ++DEFAULT_AUDIOSRC = autoaudiosrc ++DEFAULT_VIDEOSINK = autovideosink ++DEFAULT_VIDEOSRC = v4l2src ++DEFAULT_VISUALIZER = goom ++DEFS = -DHAVE_CONFIG_H ++DEPDIR = .deps ++DEPRECATED_CFLAGS = ++DIRECTSOUND_CFLAGS = ++DIRECTSOUND_LDFLAGS = ++DIRECTSOUND_LIBS = ++DLLTOOL = false ++DSYMUTIL = ++DUMPBIN = ++DV1394_CFLAGS = -DHAVE_LIBIEC61883 ++DV1394_LIBS = -lraw1394 -lavc1394 -lrom1394 -liec61883 -lraw1394 ++ECHO_C = ++ECHO_N = -n ++ECHO_T = ++EGREP = /bin/grep -E ++ERROR_CFLAGS = ++ERROR_CXXFLAGS = ++ERROR_OBJCFLAGS = ++EXEEXT = ++FFLAGS = ++FGREP = /bin/grep -F ++FLAC_CFLAGS = ++FLAC_LIBS = -lFLAC ++GCOV = ++GCOV_CFLAGS = ++GCOV_LIBS = ++GDK_PIXBUF_CFLAGS = -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GDK_PIXBUF_LIBS = -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 ++GETTEXT_MACRO_VERSION = 0.17 ++GETTEXT_PACKAGE = gst-plugins-good-1.0 ++GIO_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GIO_LDFLAGS = ++GIO_LIBS = -lgio-2.0 -lgobject-2.0 -lglib-2.0 ++GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GLIB_EXTRA_CFLAGS = -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT ++GLIB_GENMARSHAL = glib-genmarshal ++GLIB_LIBS = -pthread -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 ++GLIB_MKENUMS = glib-mkenums ++GLIB_PREFIX = /usr ++GLIB_REQ = 2.32.0 ++GMSGFMT = /usr/bin/msgfmt ++GMSGFMT_015 = /usr/bin/msgfmt ++GREP = /bin/grep ++GSTPB_PLUGINS_DIR = /usr/lib/x86_64-linux-gnu/gstreamer-1.0 ++GSTPB_PREFIX = /usr ++GST_AGE = 601 ++GST_ALL_LDFLAGS = -no-undefined ++GST_API_VERSION = 1.0 ++GST_BASE_CFLAGS = -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GST_BASE_LIBS = -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 ++GST_CFLAGS = -I$(top_srcdir)/gst-libs -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DGST_USE_UNSTABLE_API -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT $(GST_OPTION_CFLAGS) ++GST_CHECK_CFLAGS = -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GST_CHECK_LIBS = -lgstcheck-1.0 -lm -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 ++GST_CONTROLLER_CFLAGS = -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GST_CONTROLLER_LIBS = -lgstcontroller-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 ++GST_CURRENT = 601 ++GST_CXXFLAGS = -I$(top_srcdir)/gst-libs -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DGST_USE_UNSTABLE_API -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT $(GST_OPTION_CXXFLAGS) ++GST_LEVEL_DEFAULT = GST_LEVEL_NONE ++GST_LIBS = -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 ++GST_LIBVERSION = 601:0:601 ++GST_LICENSE = LGPL ++GST_LT_LDFLAGS = -version-info 601:0:601 ++GST_NET_CFLAGS = -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GST_NET_LIBS = -lgstnet-1.0 -lgstreamer-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 ++GST_OBJCFLAGS = -I$(top_srcdir)/gst-libs -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DGST_USE_UNSTABLE_API -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT $(GST_OPTION_OBJCFLAGS) ++GST_OPTION_CFLAGS = $(WARNING_CFLAGS) $(ERROR_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(GCOV_CFLAGS) $(OPT_CFLAGS) $(DEPRECATED_CFLAGS) ++GST_OPTION_CXXFLAGS = $(WARNING_CXXFLAGS) $(ERROR_CXXFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(GCOV_CFLAGS) $(OPT_CFLAGS) $(DEPRECATED_CFLAGS) ++GST_OPTION_OBJCFLAGS = $(WARNING_OBJCFLAGS) $(ERROR_OBJCFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(GCOV_CFLAGS) $(OPT_CFLAGS) $(DEPRECATED_CFLAGS) ++GST_PACKAGE_NAME = GStreamer Good Plugins (Ubuntu) ++GST_PACKAGE_ORIGIN = https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0 ++GST_PLUGINS_ALL = alpha apetag audiofx audioparsers auparse autodetect avi camerabin2 cutter debugutils deinterlace dtmf effectv equalizer flv flx goom goom2k1 icydemux id3demux imagefreeze interleave isomp4 jpegformat law level matroska monoscope multifile multipart replaygain rtp rtpmanager rtsp shapewipe smpte spectrum udp videobox videocrop videofilter videomixer wavenc wavparse y4m ++GST_PLUGINS_BASE_CFLAGS = -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GST_PLUGINS_BASE_DIR = /usr/lib/x86_64-linux-gnu/gstreamer-1.0/gst:/usr/lib/x86_64-linux-gnu/gstreamer-1.0/sys:/usr/lib/x86_64-linux-gnu/gstreamer-1.0/ext ++GST_PLUGINS_BASE_LIBS = -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 ++GST_PLUGINS_DIR = /usr/lib/x86_64-linux-gnu/gstreamer-1.0 ++GST_PLUGINS_NONPORTED = ++GST_PLUGINS_SELECTED = alpha apetag audiofx audioparsers auparse autodetect avi camerabin2 cutter debugutils deinterlace dtmf effectv equalizer flv flx goom goom2k1 icydemux id3demux imagefreeze interleave isomp4 jpegformat law level matroska monoscope multifile multipart replaygain rtp rtpmanager rtsp shapewipe smpte spectrum udp videobox videocrop videofilter videomixer wavenc wavparse y4m ++GST_PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '^_*gst_plugin_.*' -no-undefined ++GST_PLUGIN_LIBTOOLFLAGS = --tag=disable-static ++GST_PREFIX = /usr ++GST_REVISION = 0 ++GST_TOOLS_DIR = /usr/bin ++GTKDOC_CHECK = /usr/bin/gtkdoc-check ++GTKDOC_DEPS_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GTKDOC_DEPS_LIBS = -lgobject-2.0 -lglib-2.0 ++GTKDOC_MKPDF = /usr/bin/gtkdoc-mkpdf ++GTKDOC_REBASE = /usr/bin/gtkdoc-rebase ++GTK_CFLAGS = ++GTK_LIBS = ++GTK_X11_CFLAGS = ++GTK_X11_LIBS = ++GUDEV_CFLAGS = -I/usr/include/gudev-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++GUDEV_LIBS = -lgudev-1.0 -lgobject-2.0 -lglib-2.0 ++HAVE_AVC1394 = yes ++HAVE_CXX = yes ++HAVE_DIRECTSOUND = no ++HAVE_ROM1394 = yes ++HAVE_X11 = yes ++HAVE_ZLIB = yes ++HTML_DIR = ${datadir}/gtk-doc/html ++INSTALL = /usr/bin/install -c ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_SCRIPT = ${INSTALL} ++INSTALL_STRIP_PROGRAM = $(install_sh) -c -s ++INTLLIBS = ++INTL_MACOSX_LIBS = ++JACK_0_120_1_CFLAGS = ++JACK_0_120_1_LIBS = ++JACK_1_9_7_CFLAGS = ++JACK_1_9_7_LIBS = -ljack ++JACK_CFLAGS = ++JACK_LIBS = -ljack ++JPEG_LIBS = -ljpeg ++LD = /usr/bin/ld -m elf_x86_64 ++LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed ++LIBCACA_CFLAGS = ++LIBCACA_LIBS = -lcaca ++LIBDV_CFLAGS = ++LIBDV_LIBS = -ldv -lm ++LIBICONV = -liconv ++LIBIEC61883_CFLAGS = ++LIBIEC61883_LIBS = -liec61883 -lraw1394 ++LIBINTL = ++LIBM = -lm ++LIBOBJS = ++LIBPNG_CFLAGS = -I/usr/include/libpng12 ++LIBPNG_LIBS = -lpng12 ++LIBRT = ++LIBS = ++LIBTOOL = $(SHELL) $(top_builddir)/libtool ++LIBV4L2_CFLAGS = ++LIBV4L2_LIBS = -lv4l2 ++LIPO = ++LN_S = ln -s ++LOCALEDIR = /usr/share/locale ++LTLIBICONV = -liconv ++LTLIBINTL = ++LTLIBOBJS = ++MAINT = # ++MAKEINFO = ${SHELL} /root/debs/gst-plugins-good1.0-1.6.1/missing makeinfo ++MANIFEST_TOOL = : ++MKDIR_P = /bin/mkdir -p ++MSGFMT = /usr/bin/msgfmt ++MSGFMT_015 = /usr/bin/msgfmt ++MSGMERGE = /usr/bin/msgmerge ++NM = /usr/bin/nm -B ++NMEDIT = ++OBJC = gcc ++OBJCDEPMODE = depmode=none ++OBJCFLAGS = ++OBJDUMP = objdump ++OBJEXT = o ++ORCC = /usr/bin/orcc ++ORCC_FLAGS = --compat 0.4.17 ++ORC_CFLAGS = -I/usr/include/orc-0.4 ++ORC_LIBS = -lorc-0.4 ++OTOOL = ++OTOOL64 = ++PACKAGE = gst-plugins-good ++PACKAGE_BUGREPORT = http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer ++PACKAGE_NAME = GStreamer Good Plug-ins ++PACKAGE_STRING = GStreamer Good Plug-ins 1.6.1 ++PACKAGE_TARNAME = gst-plugins-good ++PACKAGE_URL = ++PACKAGE_VERSION = 1.6.1 ++PACKAGE_VERSION_MAJOR = 1 ++PACKAGE_VERSION_MICRO = 1 ++PACKAGE_VERSION_MINOR = 6 ++PACKAGE_VERSION_NANO = 0 ++PACKAGE_VERSION_RELEASE = 1 ++PATH_SEPARATOR = : ++PKG_CONFIG = /usr/bin/pkg-config ++PLUGINDIR = /usr/lib/x86_64-linux-gnu/gstreamer-1.0 ++POSUB = po ++PROFILE_CFLAGS = -g ++PULSE_CFLAGS = -D_REENTRANT ++PULSE_LIBS = -lpulse ++PYTHON = /usr/bin/python ++PYTHON_EXEC_PREFIX = ${exec_prefix} ++PYTHON_PLATFORM = linux2 ++PYTHON_PREFIX = ${prefix} ++PYTHON_VERSION = 2.7 ++RANLIB = ranlib ++RAW1394_CFLAGS = ++RAW1394_LIBS = -lraw1394 ++SED = /bin/sed ++SET_MAKE = ++SHELL = /bin/bash ++SHOUT2_CFLAGS = -pthread ++SHOUT2_LIBS = -lshout ++SOUP_CFLAGS = -pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include ++SOUP_LIBS = -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lglib-2.0 ++SPEEX_CFLAGS = ++SPEEX_LIBS = -lspeex ++STRIP = strip ++TAGLIB_CFLAGS = -I/usr/include/taglib ++TAGLIB_CXXFLAGS = -I/usr/include/taglib -Wno-attributes ++TAGLIB_LIBS = -ltag ++USE_NLS = yes ++VALGRIND_CFLAGS = ++VALGRIND_LIBS = ++VALGRIND_PATH = no ++VERSION = 1.6.1 ++VPX_130_CFLAGS = ++VPX_130_LIBS = -lvpx -lm ++VPX_CFLAGS = ++VPX_LIBS = -lvpx -lm ++WARNING_CFLAGS = -Wall -Wdeclaration-after-statement -Wvla -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wold-style-definition -Waggregate-return -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wnested-externs ++WARNING_CXXFLAGS = -Wall -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar ++WARNING_OBJCFLAGS = ++WAVPACK_CFLAGS = ++WAVPACK_LIBS = -lwavpack ++X11_CFLAGS = ++X11_LIBS = -lX11 ++XDAMAGE_CFLAGS = ++XDAMAGE_LIBS = -lXdamage -lXfixes ++XEXT_CFLAGS = ++XEXT_LIBS = -lXext ++XFIXES_CFLAGS = ++XFIXES_LIBS = -lXfixes ++XGETTEXT = /usr/bin/xgettext ++XGETTEXT_015 = /usr/bin/xgettext ++XGETTEXT_EXTRA_OPTIONS = ++XSHM_CFLAGS = ++XSHM_LIBS = -lXext ++X_CFLAGS = ++X_LIBS = -lX11 ++ZLIB_LIBS = -lz ++abs_builddir = /root/debs/gst-plugins-good1.0-1.6.1/tests/examples/camerabin2 ++abs_srcdir = /root/debs/gst-plugins-good1.0-1.6.1/tests/examples/camerabin2 ++abs_top_builddir = /root/debs/gst-plugins-good1.0-1.6.1 ++abs_top_srcdir = /root/debs/gst-plugins-good1.0-1.6.1 ++ac_ct_AR = ar ++ac_ct_CC = gcc ++ac_ct_CXX = g++ ++ac_ct_DUMPBIN = ++ac_ct_OBJC = gcc ++am__include = include ++am__leading_dot = . ++am__quote = ++am__tar = tar --format=ustar -chf - "$$tardir" ++am__untar = tar -xf - ++bindir = ${exec_prefix}/bin ++build = x86_64-pc-linux-gnu ++build_alias = x86_64-linux-gnu ++build_cpu = x86_64 ++build_os = linux-gnu ++build_vendor = pc ++builddir = . ++datadir = ${datarootdir} ++datarootdir = ${prefix}/share ++docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} ++dvidir = ${docdir} ++exec_prefix = ${prefix} ++host = x86_64-pc-linux-gnu ++host_alias = ++host_cpu = x86_64 ++host_os = linux-gnu ++host_vendor = pc ++htmldir = ${docdir} ++includedir = ${prefix}/include ++infodir = ${prefix}/share/info ++install_sh = ${SHELL} /root/debs/gst-plugins-good1.0-1.6.1/install-sh ++libdir = ${prefix}/lib/x86_64-linux-gnu ++libexecdir = ${prefix}/lib/gst-plugins-good1.0 ++localedir = ${datarootdir}/locale ++localstatedir = /var ++mandir = ${prefix}/share/man ++mkdir_p = /bin/mkdir -p ++oldincludedir = /usr/include ++pdfdir = ${docdir} ++pkgpyexecdir = ${pyexecdir}/gst-plugins-good ++pkgpythondir = ${pythondir}/gst-plugins-good ++plugindir = $(libdir)/gstreamer-1.0 ++prefix = /usr ++program_transform_name = s,x,x, ++psdir = ${docdir} ++pyexecdir = ${exec_prefix}/lib/python2.7/dist-packages ++pythondir = ${prefix}/lib/python2.7/dist-packages ++sbindir = ${exec_prefix}/sbin ++sharedstatedir = ${prefix}/com ++srcdir = . ++sysconfdir = /etc ++target = x86_64-pc-linux-gnu ++target_alias = ++target_cpu = x86_64 ++target_os = linux-gnu ++target_vendor = pc ++top_build_prefix = ../../../ ++top_builddir = ../../.. ++top_srcdir = ../../.. ++GST_CAMERABIN_UI_FILES = gst-camera2.ui ++AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\" ++GST_CAMERABIN_GTK_EXAMPLES = ++#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-1.0.la \ ++# $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-1.0.la \ ++# $(GST_PLUGINS_BAD_LIBS) \ ++# $(GST_PLUGINS_BASE_LIBS) \ ++# -lgstpbutils-1.0 \ ++# -lgstvideo-1.0 \ ++# $(GST_LIBS) \ ++# $(GTK_LIBS) \ ++# $(GMODULE_EXPORT_LIBS) ++ ++#noinst_DATA = $(GST_CAMERABIN_UI_FILES) ++#GST_CAMERABIN_X11_EXAMPLES = ++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-1.0.la \ ++ $(GST_PLUGINS_BASE_LIBS) \ ++ -lgstpbutils-1.0 \ ++ -lgstvideo-1.0 \ ++ $(GST_BASE_LIBS) \ ++ $(GST_LIBS) \ ++ $(X11_LIBS) ++ ++EXTRA_DIST = $(GST_CAMERABIN_UI_FILES) ++all: all-am ++ ++.SUFFIXES: ++.SUFFIXES: .c .lo .o .obj ++$(srcdir)/Makefile.in: # $(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: # $(am__configure_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(ACLOCAL_M4): # $(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 ++ ++#include ./$(DEPDIR)/gst_camera2-gst-camera2.Po ++#include ./$(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Po ++ ++.c.o: ++# $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ ++# $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ ++# $(am__mv) $$depbase.Tpo $$depbase.Po ++# $(AM_V_CC)source='$<' object='$@' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(AM_V_CC)$(COMPILE) -c -o $@ $< ++ ++.c.obj: ++# $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ ++# $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ ++# $(am__mv) $$depbase.Tpo $$depbase.Po ++# $(AM_V_CC)source='$<' object='$@' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ++ ++.c.lo: ++# $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ ++# $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ ++# $(am__mv) $$depbase.Tpo $$depbase.Plo ++# $(AM_V_CC)source='$<' object='$@' libtool=yes ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< ++ ++gst_camera2-gst-camera2.o: gst-camera2.c ++# $(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_V_at)$(am__mv) $(DEPDIR)/gst_camera2-gst-camera2.Tpo $(DEPDIR)/gst_camera2-gst-camera2.Po ++# $(AM_V_CC)source='gst-camera2.c' object='gst_camera2-gst-camera2.o' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(AM_V_CC)$(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_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_V_at)$(am__mv) $(DEPDIR)/gst_camera2-gst-camera2.Tpo $(DEPDIR)/gst_camera2-gst-camera2.Po ++# $(AM_V_CC)source='gst-camera2.c' object='gst_camera2-gst-camera2.obj' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(AM_V_CC)$(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_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_V_at)$(am__mv) $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Tpo $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Po ++# $(AM_V_CC)source='gst-camerabin2-test.c' object='gst_camerabin2_test-gst-camerabin2-test.o' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(AM_V_CC)$(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_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_V_at)$(am__mv) $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Tpo $(DEPDIR)/gst_camerabin2_test-gst-camerabin2-test.Po ++# $(AM_V_CC)source='gst-camerabin2-test.c' object='gst_camerabin2_test-gst-camerabin2-test.obj' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(AM_V_CC)$(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: +--- /dev/null ++++ gst-plugins-good1.0-1.6.1/win32/common/config.h-new +@@ -0,0 +1,445 @@ ++/* Autogenerated config.h created for win32 Visual Studio builds */ ++ ++/* PREFIX -- specifically added for Windows for easier moving */ ++#define PREFIX "C:\\gstreamer" ++ ++#define GST_INSTALL_PLUGINS_HELPER PREFIX "\\libexec\\gst-install-plugins-helper.exe" ++ ++/* Define if building universal (internal helper macro) */ ++#undef AC_APPLE_UNIVERSAL_BUILD ++ ++/* Default audio sink */ ++#define DEFAULT_AUDIOSINK "directsoundsink" ++ ++/* Default audio source */ ++#define DEFAULT_AUDIOSRC "audiotestsrc" ++ ++/* Default video sink */ ++#undef DEFAULT_VIDEOSINK ++ ++/* Default video source */ ++#define DEFAULT_VIDEOSRC "videotestsrc" ++ ++/* Default visualizer */ ++#define DEFAULT_VISUALIZER "goom" ++ ++/* Disable Orc */ ++#undef DISABLE_ORC ++ ++/* Define to 1 if translation of program messages to the user's native ++ language is requested. */ ++#undef ENABLE_NLS ++ ++/* gettext package name */ ++#define GETTEXT_PACKAGE "gst-plugins-good-1.0" ++ ++/* The GIO library directory. */ ++#undef GIO_LIBDIR ++ ++/* The GIO modules directory. */ ++#undef GIO_MODULE_DIR ++ ++/* The GIO install prefix. */ ++#undef GIO_PREFIX ++ ++/* GStreamer API Version */ ++#define GST_API_VERSION "1.0" ++ ++/* Defined if gcov is enabled to force a rebuild due to config.h changing */ ++#undef GST_GCOV_ENABLED ++ ++/* Default errorlevel to use */ ++#define GST_LEVEL_DEFAULT GST_LEVEL_ERROR ++ ++/* GStreamer license */ ++#define GST_LICENSE "LGPL" ++ ++/* package name in plugins */ ++#define GST_PACKAGE_NAME "GStreamer Good Plugins (Ubuntu)" ++ ++/* package origin */ ++#define GST_PACKAGE_ORIGIN "Unknown package origin" ++ ++/* GStreamer package release date/time for plugins as YYYY-MM-DD */ ++#define GST_PACKAGE_RELEASE_DATETIME "2015-10-30" ++ ++/* Define if static plugins should be built */ ++#undef GST_PLUGIN_BUILD_STATIC ++ ++/* Define to enable aalib ASCII Art library (used by aasink). */ ++#undef HAVE_AALIB ++ ++/* Define to 1 if you have the `asinh' function. */ ++#undef HAVE_ASINH ++ ++/* Define to enable bz2 library for matroska . */ ++#undef HAVE_BZ2 ++ ++/* Define to enable Cairo graphics rendering and gobject bindings (used by ++ cairo). */ ++#undef HAVE_CAIRO ++ ++/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the ++ CoreFoundation framework. */ ++#undef HAVE_CFLOCALECOPYCURRENT ++ ++/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in ++ the CoreFoundation framework. */ ++#undef HAVE_CFPREFERENCESCOPYAPPVALUE ++ ++/* Define to 1 if you have the `clock_gettime' function. */ ++#undef HAVE_CLOCK_GETTIME ++ ++/* Define to 1 if you have the `cosh' function. */ ++#undef HAVE_COSH ++ ++/* Define if the target CPU is AARCH64 */ ++#undef HAVE_CPU_AARCH64 ++ ++/* Define if the target CPU is an Alpha */ ++#undef HAVE_CPU_ALPHA ++ ++/* Define if the target CPU is an ARC */ ++#undef HAVE_CPU_ARC ++ ++/* Define if the target CPU is an ARM */ ++#undef HAVE_CPU_ARM ++ ++/* Define if the target CPU is a CRIS */ ++#undef HAVE_CPU_CRIS ++ ++/* Define if the target CPU is a CRISv32 */ ++#undef HAVE_CPU_CRISV32 ++ ++/* Define if the target CPU is a HPPA */ ++#undef HAVE_CPU_HPPA ++ ++/* Define if the target CPU is an x86 */ ++#define HAVE_CPU_I386 1 ++ ++/* Define if the target CPU is a IA64 */ ++#undef HAVE_CPU_IA64 ++ ++/* Define if the target CPU is a M68K */ ++#undef HAVE_CPU_M68K ++ ++/* Define if the target CPU is a MIPS */ ++#undef HAVE_CPU_MIPS ++ ++/* Define if the target CPU is a PowerPC */ ++#undef HAVE_CPU_PPC ++ ++/* Define if the target CPU is a 64 bit PowerPC */ ++#undef HAVE_CPU_PPC64 ++ ++/* Define if the target CPU is a S390 */ ++#undef HAVE_CPU_S390 ++ ++/* Define if the target CPU is a SPARC */ ++#undef HAVE_CPU_SPARC ++ ++/* Define if the target CPU is a x86_64 */ ++#undef HAVE_CPU_X86_64 ++ ++/* Define if the GNU dcgettext() function is already present or preinstalled. ++ */ ++#undef HAVE_DCGETTEXT ++ ++/* Define to enable DirectSound plug-in (used by directsoundsink). */ ++#undef HAVE_DIRECTSOUND ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_DLFCN_H ++ ++/* define for working do while(0) macros */ ++#undef HAVE_DOWHILE_MACROS ++ ++/* Define to enable raw1394 and avc1394 library (used by 1394). */ ++#undef HAVE_DV1394 ++ ++/* Define to enable building of experimental plug-ins. */ ++#undef HAVE_EXPERIMENTAL ++ ++/* Define to enable building of plug-ins with external deps. */ ++#undef HAVE_EXTERNAL ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_FCNTL_H ++ ++/* FIONREAD ioctl found in sys/filio.h */ ++#undef HAVE_FIONREAD_IN_SYS_FILIO ++ ++/* FIONREAD ioctl found in sys/ioclt.h */ ++#undef HAVE_FIONREAD_IN_SYS_IOCTL ++ ++/* Define to enable FLAC lossless audio (used by flac). */ ++#undef HAVE_FLAC ++ ++/* Define to 1 if you have the `fpclass' function. */ ++#undef HAVE_FPCLASS ++ ++/* Define if compiler supports gcc inline assembly */ ++#undef HAVE_GCC_ASM ++ ++/* Define to enable GDK pixbuf (used by gdkpixbuf). */ ++#undef HAVE_GDK_PIXBUF ++ ++/* Define to 1 if you have the `getpagesize' function. */ ++#undef HAVE_GETPAGESIZE ++ ++/* Define if the GNU gettext() function is already present or preinstalled. */ ++#undef HAVE_GETTEXT ++ ++/* Define to enable Video 4 Linux 2 (used by video4linux2). */ ++#undef HAVE_GST_V4L2 ++ ++/* Whether gudev is available for device detection */ ++#undef HAVE_GUDEV ++ ++/* Define if you have the iconv() function and it works. */ ++#undef HAVE_ICONV ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_INTTYPES_H ++ ++/* building for iOS platofrm */ ++#undef HAVE_IOS ++ ++/* Define if we have struct ip_mreqn */ ++#undef HAVE_IP_MREQN ++ ++/* Define to 1 if you have the `isinf' function. */ ++#undef HAVE_ISINF ++ ++/* Define to enable Jack (used by jack). */ ++#undef HAVE_JACK ++ ++/* defined if jack >= 0.120.1 is available */ ++#undef HAVE_JACK_0_120_1 ++ ++/* defined if jack >= 1.9.7 is available */ ++#undef HAVE_JACK_1_9_7 ++ ++/* Define to enable jpeg library (used by jpeg). */ ++#undef HAVE_JPEG ++ ++/* Define to enable libcaca coloured ASCII art (used by cacasink). */ ++#undef HAVE_LIBCACA ++ ++/* Define to enable libdv DV demuxer/decoder (used by dv). */ ++#undef HAVE_LIBDV ++ ++/* Define to enable Portable Network Graphics library (used by png). */ ++#undef HAVE_LIBPNG ++ ++/* Whether libv4l2 is available for video buffer conversion */ ++#undef HAVE_LIBV4L2 ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_MEMORY_H ++ ++/* Define to 1 if you have a working `mmap' system call. */ ++#undef HAVE_MMAP ++ ++/* Use Orc */ ++#undef HAVE_ORC ++ ++/* Define to enable OSS audio (used by ossaudio). */ ++#undef HAVE_OSS ++ ++/* Define to enable Open Sound System 4 (used by oss4). */ ++#undef HAVE_OSS4 ++ ++/* Define if OSS includes are in /machine/ */ ++#undef HAVE_OSS_INCLUDE_IN_MACHINE ++ ++/* Define if OSS includes are in / */ ++#undef HAVE_OSS_INCLUDE_IN_ROOT ++ ++/* Define if OSS includes are in /sys/ */ ++#undef HAVE_OSS_INCLUDE_IN_SYS ++ ++/* Define to enable OSX audio (used by osxaudio). */ ++#undef HAVE_OSX_AUDIO ++ ++/* Define to enable OSX video (used by osxvideosink). */ ++#undef HAVE_OSX_VIDEO ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_PROCESS_H 1 ++ ++/* Define to enable pulseaudio plug-in (used by pulseaudio). */ ++#undef HAVE_PULSE ++ ++/* Define if RDTSC is available */ ++#undef HAVE_RDTSC ++ ++/* Define to 1 if you have the `rint' function. */ ++#undef HAVE_RINT ++ ++/* Define to enable Shoutcast/Icecast client library (used by shout2). */ ++#undef HAVE_SHOUT2 ++ ++/* Define to 1 if you have the `sinh' function. */ ++#undef HAVE_SINH ++ ++/* Define to enable soup http client plugin (2.4) (used by souphttpsrc). */ ++#undef HAVE_SOUP ++ ++/* Define to enable speex speech codec (used by speex). */ ++#undef HAVE_SPEEX ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDINT_H ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRINGS_H ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Define to enable Sun Audio (used by sunaudio). */ ++#undef HAVE_SUNAUDIO ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_IOCTL_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_PARAM_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_SOCKET_H ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TIME_H ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_TYPES_H 1 ++ ++/* Define to enable taglib tagging library (used by taglib). */ ++#undef HAVE_TAGLIB ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_UNISTD_H ++ ++/* Define if valgrind should be used */ ++#undef HAVE_VALGRIND ++ ++/* Defined if the VP8 decoder is available */ ++#undef HAVE_VP8_DECODER ++ ++/* Defined if the VP8 encoder is available */ ++#undef HAVE_VP8_ENCODER ++ ++/* Defined if the VP9 decoder is available */ ++#undef HAVE_VP9_DECODER ++ ++/* Defined if the VP9 encoder is available */ ++#undef HAVE_VP9_ENCODER ++ ++/* Define to enable VPX decoder (used by vpx). */ ++#undef HAVE_VPX ++ ++/* Define to enable Win32 WaveForm (used by waveformsink). */ ++#undef HAVE_WAVEFORM ++ ++/* Define to enable wavpack plug-in (used by wavpack). */ ++#undef HAVE_WAVPACK ++ ++/* Define to enable X libraries and plugins (used by ximagesrc). */ ++#undef HAVE_X ++ ++/* Define if you have X11 library */ ++#undef HAVE_X11 ++ ++/* Defined if Xdamage is available */ ++#undef HAVE_XDAMAGE ++ ++/* Defined if Xfixes is available */ ++#undef HAVE_XFIXES ++ ++/* Defined if XShm is available */ ++#undef HAVE_XSHM ++ ++/* Define to enable zlib support for qtdemux/matroska. */ ++#undef HAVE_ZLIB ++ ++/* the host CPU */ ++#define HOST_CPU "i686" ++ ++/* gettext locale dir */ ++#define LOCALEDIR PREFIX "\\share\\locale" ++ ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#undef LT_OBJDIR ++ ++/* Name of package */ ++#define PACKAGE "gst-plugins-good" ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer" ++ ++/* Define to the full name of this package. */ ++#define PACKAGE_NAME "GStreamer Good Plug-ins" ++ ++/* Define to the full name and version of this package. */ ++#define PACKAGE_STRING "GStreamer Good Plug-ins 1.6.1" ++ ++/* Define to the one symbol short name of this package. */ ++#define PACKAGE_TARNAME "gst-plugins-good" ++ ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ ++/* Define to the version of this package. */ ++#define PACKAGE_VERSION "1.6.1" ++ ++/* directory where plugins are located */ ++#ifdef _DEBUG ++# define PLUGINDIR PREFIX "\\debug\\lib\\gstreamer-0.11" ++#else ++# define PLUGINDIR PREFIX "\\lib\\gstreamer-0.11" ++#endif ++ ++/* The size of `char', as computed by sizeof. */ ++#undef SIZEOF_CHAR ++ ++/* The size of `int', as computed by sizeof. */ ++#undef SIZEOF_INT ++ ++/* The size of `long', as computed by sizeof. */ ++#undef SIZEOF_LONG ++ ++/* The size of `short', as computed by sizeof. */ ++#undef SIZEOF_SHORT ++ ++/* The size of `void*', as computed by sizeof. */ ++#undef SIZEOF_VOIDP ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#undef STDC_HEADERS ++ ++/* the target CPU */ ++#undef TARGET_CPU ++ ++/* Version number of package */ ++#define VERSION "1.6.1" ++ ++/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most ++ significant byte first (like Motorola and SPARC, unlike Intel). */ ++#if defined AC_APPLE_UNIVERSAL_BUILD ++# if defined __BIG_ENDIAN__ ++# define WORDS_BIGENDIAN 1 ++# endif ++#else ++# ifndef WORDS_BIGENDIAN ++# undef WORDS_BIGENDIAN ++# endif ++#endif diff -Nru gst-plugins-good1.0-1.4.3/debian/patches/series gst-plugins-good1.0-1.6.1/debian/patches/series --- gst-plugins-good1.0-1.4.3/debian/patches/series 2014-04-25 09:40:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/patches/series 2015-11-02 21:21:51.000000000 +0000 @@ -1,3 +1,4 @@ add-pkgconfig-file import-camerabin import-jpegformat +random diff -Nru gst-plugins-good1.0-1.4.3/debian/rules gst-plugins-good1.0-1.6.1/debian/rules --- gst-plugins-good1.0-1.4.3/debian/rules 2014-09-24 16:44:37.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/debian/rules 2015-11-02 17:34:25.000000000 +0000 @@ -9,6 +9,9 @@ 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 @@ -45,7 +48,7 @@ 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.4.0) +gst_lib_dev_dep=$(gst_lib_dev) (>= 1.6.1) gst_pkgname=gstreamer$(gst_abi) gst_deb_abi=$(gst_abi)-0 diff -Nru gst-plugins-good1.0-1.4.3/depcomp gst-plugins-good1.0-1.6.1/depcomp --- gst-plugins-good1.0-1.4.3/depcomp 2014-08-27 10:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/depcomp 2015-10-30 12:10:17.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru gst-plugins-good1.0-1.4.3/docs/Makefile.in gst-plugins-good1.0-1.6.1/docs/Makefile.in --- gst-plugins-good1.0-1.4.3/docs/Makefile.in 2014-09-24 07:25:54.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,8 +89,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = docs -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/version.entities.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 \ @@ -102,7 +110,6 @@ $(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 \ @@ -117,6 +124,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version.entities @@ -175,6 +183,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.entities.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -332,9 +341,6 @@ 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@ @@ -452,17 +458,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -515,6 +521,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -551,7 +558,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -848,6 +854,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + upload: @if test "x$(SUBDIRS)" != x; then for a in $(SUBDIRS); do cd $$a; make upload; cd ..; done; fi diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.args gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.args --- gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.args 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.args 2015-10-30 14:26:54.000000000 +0000 @@ -199,6 +199,26 @@ +GstMultiFileSink::aggregate-gops +gboolean + +rw +Aggregate GOPs +Whether to aggregate GOPs and process them as a whole without splitting. +FALSE + + + +GstMultiFileSink::max-file-duration +guint64 + +rw +Maximum File Duration +Maximum file duration before starting a new file in max-size mode. +18446744073709551615 + + + GstMultiFileSrc::caps GstCaps* @@ -281,7 +301,7 @@ GstSpectrum::bands guint - +[2,1073741824] rw Bands Number of frequency bands. @@ -299,16 +319,6 @@ -GstSpectrum::message -gboolean - -rw -Message -Whether to post a 'spectrum' element message on the bus for each passed interval (deprecated, use post-messages). -TRUE - - - GstSpectrum::threshold gint <= 0 @@ -359,16 +369,6 @@ -GstVideoflip::method -GstVideoflipMethod - -rw -method -method. -Rotate clockwise 90 degrees - - - GstVideoBox::alpha gdouble [0,1] @@ -484,7 +484,7 @@ rw Multicast Group -The Address of multicast group to join. DEPRECATED: Use address property instead. +The Address of multicast group to join. (DEPRECATED: Use address property instead). "0.0.0.0" @@ -509,16 +509,6 @@ -GstUDPSrc::sockfd -gint ->= G_MAXULONG -rw -Socket Handle -Socket to use for UDP reception. (-1 == allocate). --1 - - - GstUDPSrc::buffer-size gint >= 0 @@ -539,16 +529,6 @@ -GstUDPSrc::closefd -gboolean - -rw -Close sockfd -Close sockfd if passed as property on state change. -TRUE - - - GstUDPSrc::skip-first-bytes gint >= 0 @@ -559,16 +539,6 @@ -GstUDPSrc::sock -gint ->= G_MAXULONG -r -Socket Handle -Socket currently in use for UDP reception. (-1 = no socket). --1 - - - GstUDPSrc::auto-multicast gboolean @@ -629,16 +599,6 @@ -GstUDPSrc::bind-address -gchar* - -rw -Bind Address -Address to bind the socket to. This is equivalent to the multicast-group property. -"0.0.0.0" - - - GstUDPSrc::address gchar* @@ -669,16 +629,6 @@ -GstSMPTE::fps -gfloat ->= 0 -rw -FPS -Frames per second if no input files are given (deprecated). -0 - - - GstSMPTE::type GstSMPTETransitionType @@ -974,7 +924,7 @@ rw Use pipeline clock -Use the pipeline running-time to set the NTP time in the RTCP SR messages. +Use the pipeline running-time to set the NTP time in the RTCP SR messages(DEPRECATED: Use ntp-time-source property). FALSE @@ -1009,13 +959,43 @@ -GstRTPDec::skip -gint +GstRTSPSrc::do-retransmission +gboolean rw -Skip -skip (unused). -0 +Retransmission +Ask the server to retransmit lost packets. +TRUE + + + +GstRTSPSrc::tls-interaction +GTlsInteraction* + +rw +TLS interaction +A GTlsInteraction object to promt the user for password or certificate. + + + + +GstRTSPSrc::ntp-time-source +GstRTSPSrcNtpTimeSource + +rw +NTP Time Source +NTP time source for RTCP packets. +NTP time based on realtime clock + + + +GstRTSPSrc::user-agent +gchar* + +rw +User Agent +The User-Agent string to send to the server. +"GStreamer/1.6.1" @@ -1044,7 +1024,7 @@ rw message -Post a 'level' message for each passed interval (deprecated). +Post a 'level' message for each passed interval (deprecated, use the post-messages property instead). TRUE @@ -1141,7 +1121,7 @@ GstQuarkTV::planes gint -[0,64] +[1,64] rw Planes Number of planes. @@ -1149,16 +1129,6 @@ -GstEFence::fence-top -gboolean - -rw -Fence Top -Align buffers with top of fenced region. -TRUE - - - GstAlpha::alpha gdouble [0,1] @@ -1339,16 +1309,6 @@ -GstShout2send::sync -gboolean - -rw -Sync -Sync on the clock. -FALSE - - - GstShout2send::url gchar* @@ -1389,76 +1349,6 @@ -DV1394Src::channel -gint -[0,64] -rw -Channel -Channel number for listening. -63 - - - -DV1394Src::consecutive -gint ->= 1 -rw -consecutive frames -send n consecutive frames after skipping. -1 - - - -DV1394Src::drop-incomplete -gboolean - -rw -drop_incomplete -drop incomplete frames. -TRUE - - - -DV1394Src::guid -guint64 - -rw -GUID -select one of multiple DV devices by its GUID. use a hexadecimal like 0xhhhhhhhhhhhhhhhh. (0 = no guid). -0 - - - -DV1394Src::port -gint -[-1,16] -rw -Port -Port number (-1 automatic). --1 - - - -DV1394Src::skip -gint ->= 0 -rw -skip frames -skip n frames. -0 - - - -DV1394Src::use-avc -gboolean - -rw -Use AV/C -Use AV/C VTR control. -TRUE - - - GstPngEnc::compression-level guint <= 9 @@ -1539,56 +1429,6 @@ -GstSmokeEnc::keyframe -gint -[1,100000] -rw -Keyframe -Insert keyframe every N frames. -20 - - - -GstSmokeEnc::qmax -gint -[0,100] -rw -Qmax -Maximum quality. -85 - - - -GstSmokeEnc::qmin -gint -[0,100] -rw -Qmin -Minimum quality. -10 - - - -GstSmokeEnc::threshold -gint -[0,100000000] -rw -Threshold -Motion estimation threshold. -3000 - - - -GstEsdSink::host -gchar* - -rw -Host -The host running the esound daemon. -NULL - - - GstDVDec::clamp-chroma gboolean @@ -1739,16 +1579,6 @@ -GstRtpGSMParse::frequency -gint - -rw -frequency -frequency. -8000 - - - GstSpeexEnc::abr gint >= 0 @@ -2089,16 +1919,6 @@ -GstVideoMixer::background -GstVideoMixerBackground - -rw -Background -Background type. -Checker pattern - - - GstMatroskaMux::writing-app gchar* @@ -2309,143 +2129,53 @@ -GstTextOverlay::deltax -gint +GstCutter::leaky +gboolean -w -X position modifier -Shift X position to the left or to the right. Unit is pixels. -0 +rw +Leaky +do we leak buffers when below threshold ?. +FALSE -GstTextOverlay::deltay -gint +GstCutter::pre-length +guint64 -w -Y position modifier -Shift Y position up or down. Unit is pixels. +rw +Pre-recording buffer length +Length of pre-recording buffer (in nanoseconds). 0 -GstTextOverlay::font-desc -gchararray +GstCutter::run-length +guint64 -w -font description -Pango font description of font to be used for rendering. See documentation of pango_font_description_from_string for syntax. -"" +rw +Run length +Length of drop below threshold before cut_stop (in nanoseconds). +0 -GstTextOverlay::halign -gchararray +GstCutter::threshold +gdouble -w -horizontal alignment -Horizontal alignment of the text. Can be either 'left', 'right', or 'center'. -"center" +rw +Threshold +Volume threshold before trigger. +0 -GstTextOverlay::shaded-background -gboolean +GstCutter::threshold-dB +gdouble -w -shaded background -Whether to shade the background under the text area. -FALSE - - - -GstTextOverlay::text -gchararray - -w -text -Text to be display. -"" - - - -GstTextOverlay::valign -gchararray - -w -vertical alignment -Vertical alignment of the text. Can be either 'baseline', 'bottom', or 'top'. -"baseline" - - - -GstTextOverlay::xpad -gint - -w -horizontal paddding -Horizontal paddding when using left/right alignment. -25 - - - -GstTextOverlay::ypad -gint - -w -vertical padding -Vertical padding when using top/bottom alignment. -25 - - - -GstCutter::leaky -gboolean - -rw -Leaky -do we leak buffers when below threshold ?. -FALSE - - - -GstCutter::pre-length -guint64 - -rw -Pre-recording buffer length -Length of pre-recording buffer (in nanoseconds). -0 - - - -GstCutter::run-length -guint64 - -rw -Run length -Length of drop below threshold before cut_stop (in nanoseconds). -0 - - - -GstCutter::threshold -gdouble - -rw -Threshold -Volume threshold before trigger. -0 - - - -GstCutter::threshold-dB -gdouble - -rw -Threshold (dB) -Volume threshold before trigger (in dB). -0 +rw +Threshold (dB) +Volume threshold before trigger (in dB). +0 @@ -2459,26 +2189,6 @@ -GstRtpMP4VPay::send-config -gboolean - -rw -Send Config -Send the config parameters in RTP packets as well(deprecated see config-interval). -FALSE - - - -GstRtpMP4VPay::buffer-list -gboolean - -rw -Buffer Array -Use Buffer Arrays. -FALSE - - - GstRtpMP4VPay::config-interval guint <= 3600 @@ -2489,16 +2199,6 @@ -GstRTPDepay::skip -gint - -rw -skip -skip. -0 - - - GstMultipartMux::boundary gchar* @@ -2509,126 +2209,6 @@ -GstCairoTextOverlay::deltax -gint - -w -X position modifier -Shift X position to the left or to the right. Unit is pixels. -0 - - - -GstCairoTextOverlay::deltay -gint - -w -Y position modifier -Shift Y position up or down. Unit is pixels. -0 - - - -GstCairoTextOverlay::font-desc -gchar* - -w -font description -Pango font description of font to be used for rendering. See documentation of pango_font_description_from_string for syntax. -"" - - - -GstCairoTextOverlay::halign -gchar* - -w -horizontal alignment -Horizontal alignment of the text. Can be either 'left', 'right', or 'center'. -"center" - - - -GstCairoTextOverlay::shaded-background -gboolean - -w -shaded background -Whether to shade the background under the text area. -FALSE - - - -GstCairoTextOverlay::text -gchar* - -w -text -Text to be display. -"" - - - -GstCairoTextOverlay::valign -gchar* - -w -vertical alignment -Vertical alignment of the text. Can be either 'baseline', 'bottom', or 'top'. -"baseline" - - - -GstCairoTextOverlay::xpad -gint - -w -horizontal paddding -Horizontal paddding when using left/right alignment. -25 - - - -GstCairoTextOverlay::ypad -gint - -w -vertical padding -Vertical padding when using top/bottom alignment. -25 - - - -GstCairoTextOverlay::silent -gboolean - -w -silent -Whether to render the text string. -FALSE - - - -GstOssMixerElement::device-name -gchar* - -r -Device name -Human-readable name of the sound device. -NULL - - - -GstOssMixerElement::device -gchar* - -rw -Device -OSS mixer device (usually /dev/mixer). -"/dev/mixer" - - - GstID3Demux::prefer-v1 gboolean @@ -2639,26 +2219,6 @@ -GstDynUDPSink::sockfd -gint -[G_MAXULONG,32767] -rw -socket handle -Socket to use for UDP sending. (-1 == allocate). --1 - - - -GstDynUDPSink::closefd -gboolean - -rw -Close sockfd -Close sockfd if passed as property on state change. -TRUE - - - GstDynUDPSink::close-socket gboolean @@ -2709,16 +2269,6 @@ -GstCdioCddaSrc::read-speed -gint -[-1,100] -rw -Read speed -Read from device at the specified speed (-1 = default). --1 - - - GstMultiUDPSink::bytes-served guint64 @@ -2749,36 +2299,6 @@ -GstMultiUDPSink::closefd -gboolean - -rw -Close sockfd -Close sockfd if passed as property on state change. -TRUE - - - -GstMultiUDPSink::sock -gint ->= G_MAXULONG -r -Socket Handle -Socket currently in use for UDP sending. (-1 == no socket). --1 - - - -GstMultiUDPSink::sockfd -gint ->= G_MAXULONG -rw -Socket Handle -Socket to use for UDP sending. (-1 == allocate). --1 - - - GstMultiUDPSink::auto-multicast gboolean @@ -2939,133 +2459,33 @@ -GstCmmlDec::wait-clip-end-time -gboolean +GstXImageSrc::display-name +gchar* rw -Wait clip end time -Send a tag for a clip when the clip ends, setting its end-time. Use when you need to know both clip's start-time and end-time. -FALSE +Display +X Display Name. +NULL -GstCmmlEnc::granule-rate-denominator -gint64 ->= 0 -rwx -Granulerate denominator -Granulerate denominator. -1 +GstXImageSrc::show-pointer +gboolean + +rw +Show Mouse Pointer +Show mouse pointer (if XFixes extension enabled). +TRUE -GstCmmlEnc::granule-rate-numerator -gint64 ->= 0 -rwx -Granulerate numerator -Granulerate numerator. -1000 - - - -GstCmmlEnc::granule-shift -guchar -<= 64 -rwx -Granuleshift -The number of lower bits to use for partitioning a granule position. -32 - - - -GstHalAudioSrc::udi -gchar* - -rw -UDI -Unique Device Id. -NULL - - - -GstHalAudioSink::udi -gchar* - -rw -UDI -Unique Device Id. -NULL - - - -GstPixbufScale::method -GstPixbufScaleMethod - -rw -method -method. -2 - - - -GstGdkPixbuf::silent -gboolean - -rw -Silent -Produce verbose output ? (deprecated). -FALSE - - - -GstGConfAudioSink::profile -GstGConfProfile - -rw -Profile -Profile. -Sound Events - - - -GstXImageSrc::display-name -gchar* - -rw -Display -X Display Name. -NULL - - - -GstXImageSrc::screen-num -guint -<= G_MAXINT -rw -Screen number -X Screen Number. -0 - - - -GstXImageSrc::show-pointer -gboolean - -rw -Show Mouse Pointer -Show mouse pointer (if XFixes extension enabled). -TRUE - - - -GstXImageSrc::endx -guint -<= G_MAXINT -rw -End X -X coordinate of bottom right corner of area to be recorded (0 for bottom right of screen). -0 +GstXImageSrc::endx +guint +<= G_MAXINT +rw +End X +X coordinate of bottom right corner of area to be recorded (0 for bottom right of screen). +0 @@ -3179,16 +2599,6 @@ -GstMultipartDemux::autoscan -gboolean - -rw -autoscan -Try to autofind the prefix (deprecated unused, see boundary). -FALSE - - - GstMultipartDemux::boundary gchar* @@ -3339,16 +2749,6 @@ -GstDirectDrawSink::force-aspect-ratio -gboolean - -rw -Force aspect ratio -When enabled, scaling will respect original aspect ratio. -FALSE - - - GstWavpackEnc::bitrate guint <= 9600000 @@ -3519,26 +2919,6 @@ -GstV4l2Src::queue-size -guint -[1,16] -rw -Queue size -Number of buffers to be enqueud in the driver in streaming mode. -2 - - - -GstV4l2Src::always-copy -gboolean - -rw -Always Copy -If the buffer will or not be used directly from mmap. -TRUE - - - GstV4l2Src::device-fd gint >= G_MAXULONG @@ -3569,16 +2949,6 @@ -GstV4l2Src::decimate -gint ->= 1 -rw -Decimate -Only use every nth frame. -1 - - - GstV4l2Src::hue gint @@ -3809,16 +3179,6 @@ -GstAudioWSincLimit::frequency -gdouble ->= 0 -rw -Frequency -Cut-off Frequency (Hz). -0 - - - GstAudioWSincLimit::length gint [3,256000] @@ -3889,16 +3249,6 @@ -GstAutoAudioSink::filter-caps -GstCaps* - -rw -Filter caps -Filter sink candidates using these caps. - - - - GstAutoAudioSink::ts-offset gint64 @@ -3919,16 +3269,6 @@ -GstAutoVideoSink::filter-caps -GstCaps* - -rw -Filter caps -Filter sink candidates using these caps. - - - - GstAutoVideoSink::ts-offset gint64 @@ -3999,16 +3339,6 @@ -GstGdkPixbufSink::send-messages -gboolean - -rw -Send Messages -Whether to post messages containing pixbufs on the bus (deprecated, use post-messages). -TRUE - - - GstGdkPixbufSink::post-messages gboolean @@ -4039,16 +3369,6 @@ -GstSoupHTTPSrc::iradio-genre -gchar* - -r -iradio-genre -Genre of the stream. -NULL - - - GstSoupHTTPSrc::iradio-mode gboolean @@ -4059,36 +3379,6 @@ -GstSoupHTTPSrc::iradio-name -gchar* - -r -iradio-name -Name of the stream. -NULL - - - -GstSoupHTTPSrc::iradio-title -gchar* - -r -iradio-title -Name of currently playing song. -NULL - - - -GstSoupHTTPSrc::iradio-url -gchar* - -r -iradio-url -Homepage URL for radio stream. -NULL - - - GstSoupHTTPSrc::location gchar* @@ -4259,53 +3549,43 @@ -GstRTPDVPay::mode -GstDVPayMode - -rw -Mode -The payload mode of payloading. -Video only - - - -GstRtpH264Pay::profile-level-id -gchar* +GstSoupHTTPSrc::tls-database +GTlsDatabase* rw -profile-level-id -The base64 profile-level-id to set in the sink caps (deprecated). -NULL +TLS database +TLS database with anchor certificate authorities used to validate the server certificate. + -GstRtpH264Pay::sprop-parameter-sets +GstSoupHTTPSrc::method gchar* rw -sprop-parameter-sets -The base64 sprop-parameter-sets to set in out caps (set to NULL to extract from stream). +HTTP method +The HTTP method to use (GET, HEAD, OPTIONS, etc). NULL -GstRtpH264Pay::scan-mode -GstH264PayScanMode +GstRTPDVPay::mode +GstDVPayMode rw -Scan Mode -How to scan the input buffers for NAL units. Performance can be increased when certain assumptions are made about the input buffers. -Buffers contain multiple complete NALUs +Mode +The payload mode of payloading. +Video only -GstRtpH264Pay::buffer-list -gboolean +GstRtpH264Pay::sprop-parameter-sets +gchar* rw -Buffer List -Use Buffer Lists. -FALSE +sprop-parameter-sets +The base64 sprop-parameter-sets to set in out caps (set to NULL to extract from stream). +NULL @@ -20259,66 +19539,6 @@ -GstVideoMixerPad::alpha -gdouble -[0,1] -rw -Alpha -Alpha of the picture. -1 - - - -GstVideoMixerPad::xpos -gint - -rw -X Position -X Position of the picture. -0 - - - -GstVideoMixerPad::ypos -gint - -rw -Y Position -Y Position of the picture. -0 - - - -GstVideoMixerPad::zorder -guint -<= 10000 -rw -Z-Order -Z Order of the picture. -0 - - - -GstRtpH264Depay::byte-stream -gboolean - -rw -Byte Stream -Generate byte stream format of NALU (deprecated; use caps). -TRUE - - - -GstRtpH264Depay::access-unit -gboolean - -rw -Access Unit -Merge NALU into AU (picture) (deprecated; use caps). -FALSE - - - GstAudioKaraoke::filter-band gfloat [0,441] @@ -20409,16 +19629,6 @@ -GstPulseSink::client -gchar* - -rw -Client -The PulseAudio client name to use. -"" - - - GstPulseSink::stream-properties GstStructure* @@ -20489,16 +19699,6 @@ -GstPulseSrc::client -gchar* - -rw -Client -The PulseAudio client_name_to_use. -"" - - - GstPulseSrc::mute gboolean @@ -20549,37 +19749,7 @@ -GstPulseMixer::device -gchar* - -rw -Device -The PulseAudio sink or source to control. -NULL - - - -GstPulseMixer::device-name -gchar* - -r -Device name -Human-readable name of the sound device. -NULL - - - -GstPulseMixer::server -gchar* - -rw -Server -The PulseAudio server to connect to. -NULL - - - -GstTagInject::tags +GstTagInject::tags gchar* w @@ -20779,26 +19949,6 @@ -GstAutoVideoSrc::filter-caps -GstCaps* - -rw -Filter caps -Filter src candidates using these caps. - - - - -GstAutoAudioSrc::filter-caps -GstCaps* - -rw -Filter caps -Filter sink candidates using these caps. - - - - GstRtpJPEGPay::quality gint [0,255] @@ -20819,16 +19969,6 @@ -GstRtpJPEGPay::buffer-list -gboolean - -rw -Buffer List -Use Buffer Lists. -FALSE - - - GstAudioFIRFilter::kernel GValueArray* @@ -20869,66 +20009,6 @@ -GstAudioDelay::delay -guint64 ->= 1 -rw -Delay -Delay in nanoseconds. -1 - - - -GstAudioDelay::feedback -gfloat -[0,1] -rw -Feedback -Amount of feedback. -0 - - - -GstAudioDelay::intensity -gfloat -[0,1] -rw -Intensity -Intensity of the echo. -0 - - - -GstAudioReverb::delay -guint64 ->= 1 -rw -Delay -Delay of the echo in nanoseconds. -1 - - - -GstAudioReverb::feedback -gfloat -[0,1] -rw -Feedback -Amount of feedback. -0 - - - -GstAudioReverb::intensity -gfloat -[0,1] -rw -Intensity -Intensity of the echo. -0 - - - GstAudioEcho::delay guint64 >= 1 @@ -21294,7 +20374,7 @@ rw Use pipeline clock -Use the pipeline running-time to set the NTP time in the RTCP SR messages. +Use the pipeline running-time to set the NTP time in the RTCP SR messages (DEPRECATED: Use ntp-time-source property). FALSE @@ -21344,11 +20424,31 @@ rw Do retransmission -Send an event downstream to request packet retransmission. +Enable retransmission on all streams. FALSE +GstRtpBin::rtp-profile +GstRTPProfile + +rw +RTP Profile +Default RTP profile of newly created sessions. +GST_RTP_PROFILE_AVP + + + +GstRtpBin::ntp-time-source +GstRtpNtpTimeSource + +rw +NTP Time Source +NTP time source for RTCP packets. +NTP time based on realtime clock + + + GstRtpJitterBuffer::do-lost gboolean @@ -21469,13 +20569,53 @@ +GstRtpJitterBuffer::rtx-min-delay +guint + +rw +Minimum RTX Delay +Minimum time in ms to wait before sending retransmission event. +0 + + + +GstRtpJitterBuffer::rtx-min-retry-timeout +gint +>= G_MAXULONG +rw +RTX Min Retry Timeout +Minimum timeout between sending a transmission event in ms (-1 automatic). +-1 + + + +GstRtpJitterBuffer::rtx-max-retries +gint +>= G_MAXULONG +rw +RTX Max Retries +The maximum number of retries to request a retransmission. (-1 not limited). +-1 + + + +GstRtpJitterBuffer::rtx-next-seqnum +gboolean + +rw +RTX next seqnum +Estimate when the next packet should arrive and schedule a retransmission request for it. +TRUE + + + GstRtpSession::bandwidth gdouble >= 0 rw Bandwidth The bandwidth of the session in bytes per second (0 for auto-discover). -64000 +0 @@ -21489,16 +20629,6 @@ -GstRtpSession::ntp-ns-base -guint64 - -rw -NTP base time -The NTP base time corresponding to running_time 0 (deprecated). -0 - - - GstRtpSession::num-active-sources guint @@ -21525,7 +20655,7 @@ rw RTCP Fraction The RTCP bandwidth of the session in bytes per second (or as a real fraction of the RTP bandwidth if < 1.0). -3200 +0.05 @@ -21564,7 +20694,7 @@ rw Use pipeline clock -Use the pipeline running-time to set the NTP time in the RTCP SR messages. +Use the pipeline running-time to set the NTP time in the RTCP SR messages (DEPRECATED: Use ntp-time-source property). FALSE @@ -21599,13 +20729,23 @@ -GstRtpRtxSend::rtx-payload-type -guint +GstRtpSession::rtp-profile +GstRTPProfile rw -RTX Payload Type -Payload type of the retransmission stream (fmtp in SDP). -0 +RTP Profile +RTP profile to use. +GST_RTP_PROFILE_AVP + + + +GstRtpSession::ntp-time-source +GstRtpNtpTimeSource + +rw +NTP Time Source +NTP time source for RTCP packets. +NTP time based on realtime clock @@ -21669,16 +20809,6 @@ -GstRtpRtxReceive::rtx-payload-types -string - -rw -Colon separated list of payload format type -Set through SDP (fmtp), it helps to detect restransmission streams. -"" - - - GstRtpRtxReceive::num-rtx-requests guint @@ -21799,16 +20929,6 @@ -GstV4l2Sink::queue-size -guint -[1,16] -rw -Queue size -Number of buffers to be enqueud in the driver in streaming mode. -12 - - - GstV4l2Sink::brightness gint @@ -21889,16 +21009,6 @@ -GstV4l2Sink::min-queued-bufs -guint -<= 16 -rw -Minimum queued bufs -Minimum number of queued bufs; v4l2sink won't dqbuf if the driver doesn't have more than this number (which normally you shouldn't change). -1 - - - GstV4l2Sink::io-mode GstV4l2IOMode @@ -21969,16 +21079,6 @@ -GstFlvMux::is-live -gboolean - -rw -Is Live -The stream is live and does not need an index. -FALSE - - - GstFlvMux::streamable gboolean @@ -22019,26 +21119,6 @@ -GstOss4Mixer::device -gchar* - -rw -Device -OSS mixer device (e.g. /dev/oss/hdaudio0/mix0 or /dev/mixerN) (NULL = use first mixer device found). -NULL - - - -GstOss4Mixer::device-name -gchar* - -r -Device name -Human-readable name of the sound device. -NULL - - - GstOss4Source::device gchar* @@ -22119,26 +21199,6 @@ -GstRtpJ2KPay::buffer-list -gboolean - -rw -Buffer List -Use Buffer Lists. -TRUE - - - -GstRtpJ2KDepay::buffer-list -gboolean - -rw -Buffer List -Use Buffer Lists. -TRUE - - - GstJackAudioSrc::client JackClient* @@ -22189,6 +21249,16 @@ +GstJackAudioSrc::port-pattern +gchar* + +rw +port pattern +A pattern to select which ports to connect to (NULL = first physical ports). +NULL + + + GstJackAudioSink::client JackClient* @@ -22239,6 +21309,16 @@ +GstJackAudioSink::port-pattern +gchar* + +rw +port pattern +A pattern to select which ports to connect to (NULL = first physical ports). +NULL + + + GstFlacParse::check-frame-checksums gboolean @@ -22274,7 +21354,7 @@ rwx dts-method -(DEPRECATED) Method to determine DTS time. +Method to determine DTS time (DEPRECATED). reorder @@ -22325,7 +21405,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -1000 +1800 @@ -22359,6 +21439,46 @@ +GstQTMux::reserved-bytes-per-sec +guint +<= 10000 +rwx +Reserved MOOV bytes per second, per track +Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track. +550 + + + +GstQTMux::reserved-duration-remaining +guint64 + +r +Report the approximate amount of remaining recording space (ns) +Reports the approximate amount of remaining moov header space reserved using reserved-max-duration. +0 + + + +GstQTMux::reserved-max-duration +guint64 + +rw +Reserved maximum file duration (ns) +When set to a value > 0, reserves space for index tables at the beginning of the file. +18446744073709551615 + + + +GstQTMux::reserved-moov-update-period +guint64 + +rw +Interval at which to update index tables (ns) +When used with reserved-max-duration, periodically updates the index tables with information muxed so far. +18446744073709551615 + + + GstQTMoovRecover::broken-input gchar* @@ -22404,7 +21524,7 @@ rwx dts-method -(DEPRECATED) Method to determine DTS time. +Method to determine DTS time (DEPRECATED). reorder @@ -22455,7 +21575,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -1000 +1800 @@ -22489,12 +21609,52 @@ -GstMJ2Mux::dts-method -GstQTMuxDtsMethods - +GstMP4Mux::reserved-bytes-per-sec +guint +<= 10000 +rwx +Reserved MOOV bytes per second, per track +Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track. +550 + + + +GstMP4Mux::reserved-duration-remaining +guint64 + +r +Report the approximate amount of remaining recording space (ns) +Reports the approximate amount of remaining moov header space reserved using reserved-max-duration. +0 + + + +GstMP4Mux::reserved-max-duration +guint64 + +rw +Reserved maximum file duration (ns) +When set to a value > 0, reserves space for index tables at the beginning of the file. +18446744073709551615 + + + +GstMP4Mux::reserved-moov-update-period +guint64 + +rw +Interval at which to update index tables (ns) +When used with reserved-max-duration, periodically updates the index tables with information muxed so far. +18446744073709551615 + + + +GstMJ2Mux::dts-method +GstQTMuxDtsMethods + rwx dts-method -(DEPRECATED) Method to determine DTS time. +Method to determine DTS time (DEPRECATED). reorder @@ -22545,7 +21705,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -1000 +1800 @@ -22579,12 +21739,52 @@ +GstMJ2Mux::reserved-bytes-per-sec +guint +<= 10000 +rwx +Reserved MOOV bytes per second, per track +Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track. +550 + + + +GstMJ2Mux::reserved-duration-remaining +guint64 + +r +Report the approximate amount of remaining recording space (ns) +Reports the approximate amount of remaining moov header space reserved using reserved-max-duration. +0 + + + +GstMJ2Mux::reserved-max-duration +guint64 + +rw +Reserved maximum file duration (ns) +When set to a value > 0, reserves space for index tables at the beginning of the file. +18446744073709551615 + + + +GstMJ2Mux::reserved-moov-update-period +guint64 + +rw +Interval at which to update index tables (ns) +When used with reserved-max-duration, periodically updates the index tables with information muxed so far. +18446744073709551615 + + + GstISMLMux::dts-method GstQTMuxDtsMethods rwx dts-method -(DEPRECATED) Method to determine DTS time. +Method to determine DTS time (DEPRECATED). reorder @@ -22635,7 +21835,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -1000 +1800 @@ -22669,93 +21869,43 @@ -GstGPPMux::dts-method -GstQTMuxDtsMethods - -rwx -dts-method -Method to determine DTS time. -reorder - - - -GstGPPMux::faststart -gboolean - -rw -Format file to faststart -If the file should be formatted for faststart (headers first). -FALSE - - - -GstGPPMux::faststart-file -gchar* - -rwx -File to use for storing buffers -File that will be used temporarily to store data from the stream when creating a faststart file. If null a filepath will be created automatically. -NULL - - - -GstGPPMux::fragment-duration -guint - -rwx -Fragment duration -Fragment durations in ms (produce a fragmented file if > 0). -0 - - - -GstGPPMux::moov-recovery-file -gchar* - -rwx -File to store data for posterior moov atom recovery -File to be used to store data for moov atom making movie file recovery possible in case of a crash during muxing. Null for disabled. (Experimental). -NULL - - - -GstGPPMux::movie-timescale +GstISMLMux::reserved-bytes-per-sec guint ->= 1 +<= 10000 rwx -Movie timescale -Timescale to use in the movie (units per second). -1000 +Reserved MOOV bytes per second, per track +Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track. +550 -GstGPPMux::presentation-time -gboolean +GstISMLMux::reserved-duration-remaining +guint64 -rwx -Include presentation-time info -Calculate and include presentation/composition time (in addition to decoding time). -TRUE +r +Report the approximate amount of remaining recording space (ns) +Reports the approximate amount of remaining moov header space reserved using reserved-max-duration. +0 -GstGPPMux::streamable -gboolean +GstISMLMux::reserved-max-duration +guint64 -rwx -Streamable -If set to true, the output should be as if it is to be streamed and hence no indexes written or duration written. -FALSE +rw +Reserved maximum file duration (ns) +When set to a value > 0, reserves space for index tables at the beginning of the file. +18446744073709551615 -GstGPPMux::trak-timescale -guint +GstISMLMux::reserved-moov-update-period +guint64 -rwx -Track timescale -Timescale to use for the tracks (units per second, 0 is automatic). -0 +rw +Interval at which to update index tables (ns) +When used with reserved-max-duration, periodically updates the index tables with information muxed so far. +18446744073709551615 @@ -22764,7 +21914,7 @@ rwx dts-method -(DEPRECATED) Method to determine DTS time. +Method to determine DTS time (DEPRECATED). reorder @@ -22815,7 +21965,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -1000 +1800 @@ -22849,283 +21999,63 @@ -GstSplitFileSrc::location -gchar* - -rw -File Location -Wildcard pattern to match file names of the input files. If the location is an absolute path or contains directory components, only the base file name part will be considered for pattern matching. The results will be sorted. -NULL - - - -GstMatroskaDemux::max-gap-time -guint64 - -rw -Maximum gap time -The demuxer sends out segment events for skipping gaps longer than this (0 = disabled). -2000000000 - - - -GstPulseAudioSink::alignment-threshold -guint64 -[1,18446744073709551614] -rw -Alignment Threshold -Timestamp alignment threshold in nanoseconds. -40000000 - - - -GstPulseAudioSink::async -gboolean - -rw -Async -Go asynchronously to PAUSED. -TRUE - - - -GstPulseAudioSink::blocksize +Gst3GPPMux::reserved-bytes-per-sec guint - -rw -Block size -Size in bytes to pull per buffer (0 = default). -4096 - - - -GstPulseAudioSink::buffer-time -gint64 ->= 1 -rw -Buffer Time -Size of audio buffer in microseconds. -200000 - - - -GstPulseAudioSink::can-activate-pull -gboolean - -rw -Allow Pull Scheduling -Allow pull-based scheduling. -FALSE - - - -GstPulseAudioSink::client -gchar* - -rw -Client -The PulseAudio client name to use. -"" - - - -GstPulseAudioSink::device -gchar* - -rw -Device -The PulseAudio sink device to connect to. -NULL - - - -GstPulseAudioSink::device-name -gchar* - -r -Device name -Human-readable name of the sound device. -NULL +<= 10000 +rwx +Reserved MOOV bytes per second, per track +Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track. +550 -GstPulseAudioSink::discont-wait +Gst3GPPMux::reserved-duration-remaining guint64 -<= 18446744073709551614 -rw -Discont Wait -Window of time in nanoseconds to wait before creating a discontinuity. -1000000000 - - - -GstPulseAudioSink::drift-tolerance -gint64 ->= 1 -rw -Drift Tolerance -Tolerance for clock drift in microseconds. -40000 - - - -GstPulseAudioSink::enable-last-buffer -gboolean - -rw -Enable Last Buffer -Enable the last-buffer property. -TRUE - - - -GstPulseAudioSink::last-buffer -GstBuffer* r -Last Buffer -The last buffer received in the sink. - - - - -GstPulseAudioSink::latency-time -gint64 ->= 1 -rw -Latency Time -Audio latency in microseconds. -10000 - - - -GstPulseAudioSink::max-lateness -gint64 ->= G_MAXULONG -rw -Max Lateness -Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited). --1 - - - -GstPulseAudioSink::mute -gboolean - -rw -Mute -Mute state of this stream. -FALSE - - - -GstPulseAudioSink::preroll-queue-len -guint - -rwx -Preroll queue length -Number of buffers to queue during preroll. +Report the approximate amount of remaining recording space (ns) +Reports the approximate amount of remaining moov header space reserved using reserved-max-duration. 0 -GstPulseAudioSink::provide-clock -gboolean - -rw -Provide Clock -Provide a clock to be used as the global pipeline clock. -TRUE - - - -GstPulseAudioSink::qos -gboolean - -rw -Qos -Generate Quality-of-Service events upstream. -FALSE - - - -GstPulseAudioSink::render-delay +Gst3GPPMux::reserved-max-duration guint64 rw -Render Delay -Additional render delay of the sink in nanoseconds. -0 +Reserved maximum file duration (ns) +When set to a value > 0, reserves space for index tables at the beginning of the file. +18446744073709551615 -GstPulseAudioSink::server -gchar* - -rw -Server -The PulseAudio server to connect to. -NULL - - - -GstPulseAudioSink::slave-method -GstBaseAudioSinkSlaveMethod - -rw -Slave Method -Algorithm to use to match the rate of the masterclock. -GST_BASE_AUDIO_SINK_SLAVE_SKEW - - - -GstPulseAudioSink::stream-properties -GstStructure* - -rw -stream properties -list of pulseaudio stream properties. - - - - -GstPulseAudioSink::sync -gboolean - -rw -Sync -Sync on the clock. -TRUE - - - -GstPulseAudioSink::throttle-time +Gst3GPPMux::reserved-moov-update-period guint64 rw -Throttle time -The time to keep between rendered buffers (unused). -0 +Interval at which to update index tables (ns) +When used with reserved-max-duration, periodically updates the index tables with information muxed so far. +18446744073709551615 -GstPulseAudioSink::ts-offset -gint64 +GstSplitFileSrc::location +gchar* -rw -TS Offset -Timestamp offset in nanoseconds. -0 +rw +File Location +Wildcard pattern to match file names of the input files. If the location is an absolute path or contains directory components, only the base file name part will be considered for pattern matching. The results will be sorted. +NULL -GstPulseAudioSink::volume -gdouble -[0,10] +GstMatroskaDemux::max-gap-time +guint64 + rw -Volume -Linear volume of this stream, 1.0=100%. -1 +Maximum gap time +The demuxer sends out segment events for skipping gaps longer than this (0 = disabled). +2000000000 @@ -23329,6 +22259,26 @@ +GstGdkPixbufOverlay::pixbuf +GdkPixbuf* + +rw +Pixbuf +GdkPixbuf object to render. + + + + +GstGdkPixbufOverlay::positioning-mode +GstGdkPixbufPositioningMode + +rw +Positioning mode +Positioning mode of offset-x and offset-y properties. +pixels-relative-to-edges + + + GstVP8Enc::arnr-maxframes gint [0,15] @@ -23459,36 +22409,6 @@ -GstVP8Enc::h-scaling-mode -GstVP8EncScalingMode - -rw -Horizontal scaling mode -Horizontal scaling mode. -Normal - - - -GstVP8Enc::kf-max-dist -gint ->= 0 -rw -Keyframe max distance -Maximum distance between keyframes (number of frames). -128 - - - -GstVP8Enc::kf-mode -GstVP8EncKfMode - -rw -Keyframe Mode -Keyframe placement. -Determine optimal placement automatically - - - GstVP8Enc::lag-in-frames gint [0,25] @@ -23499,16 +22419,6 @@ -GstVP8Enc::max-intra-bitrate-pct -gint ->= 0 -rw -Max Intra bitrate -Maximum Intra frame bitrate. -0 - - - GstVP8Enc::max-quantizer gint [0,63] @@ -23534,7 +22444,7 @@ rw Multipass Cache File -Multipass cache file. +Multipass cache file. If stream caps reinited, multiple files will be created: file, file.1, file.2, ... and so on. "multipass.cache" @@ -23559,16 +22469,6 @@ -GstVP8Enc::overshoot-pct -gint -[0,1000] -rw -Overshoot PCT -Datarate overshoot (max) target (%). -100 - - - GstVP8Enc::resize-allowed gboolean @@ -23649,56 +22549,6 @@ -GstVP8Enc::ts-layer-id -GValueArray* - -rw -Coding layer identification -Sequence defining coding layer membership. - - - - -GstVP8Enc::ts-number-layers -gint -[1,5] -rw -Number of coding layers -Number of coding layers to use. -1 - - - -GstVP8Enc::ts-periodicity -gint -[0,16] -rw -Layer periodicity -Length of sequence that defines layer membership periodicity. -0 - - - -GstVP8Enc::ts-rate-decimator -GValueArray* - -rw -Coding layer rate decimator -Rate decimation factors for each layer. - - - - -GstVP8Enc::ts-target-bitrate -GValueArray* - -rw -Coding layer target bitrates -Target bitrates for coding layers (one per layer, decreasing). - - - - GstVP8Enc::tuning GstVP8EncTuning @@ -23709,56 +22559,6 @@ -GstVP8Enc::twopass-vbr-bias-pct -gint -[0,100] -rw -2-pass VBR bias -CBR/VBR bias (0=CBR, 100=VBR). -50 - - - -GstVP8Enc::twopass-vbr-maxsection-pct -gint ->= 0 -rw -2-pass GOP max bitrate -GOP maximum bitrate (% target). -0 - - - -GstVP8Enc::twopass-vbr-minsection-pct -gint ->= 0 -rw -2-pass GOP min bitrate -GOP minimum bitrate (% target). -0 - - - -GstVP8Enc::undershoot-pct -gint -[0,1000] -rw -Undershoot PCT -Datarate undershoot (min) target (%). -100 - - - -GstVP8Enc::v-scaling-mode -GstVP8EncScalingMode - -rw -Vertical scaling mode -Vertical scaling mode. -Normal - - - GstVP8Enc::horizontal-scaling-mode GstVP8EncScalingMode @@ -24444,7 +23244,7 @@ rw Multipass Cache File -Multipass cache file. +Multipass cache file. If stream caps reinited, multiple files will be created: file, file.1, file.2, ... and so on. "multipass.cache" @@ -24738,3 +23538,143 @@ 10 + +GstPushFileSrc::applied-rate +gdouble +>= G_MINDOUBLE +rw +Applied Rate +Applied rate to use in TIME SEGMENT. +1 + + + +GstPushFileSrc::initial-timestamp +guint64 + +rw +Initial Timestamp +Initial Buffer Timestamp (if time-segment TRUE). +18446744073709551615 + + + +GstPushFileSrc::location +gchar* + +rw +File Location +Location of the file to read. +NULL + + + +GstPushFileSrc::rate +gdouble +>= G_MINDOUBLE +rw +Rate +Rate to use in TIME SEGMENT. +1 + + + +GstPushFileSrc::start-time +gint64 +>= 0 +rw +Start Time +Initial Start Time (if time-segment TRUE). +0 + + + +GstPushFileSrc::stream-time +gint64 +>= 0 +rw +Stream Time +Initial Stream Time (if time-segment TRUE). +0 + + + +GstPushFileSrc::time-segment +gboolean + +rw +Time Segment +Emit TIME SEGMENTS. +FALSE + + + +GstSplitMuxSrc::location +gchar* + +rw +File Input Pattern +Glob pattern for the location of the files to read. +NULL + + + +GstSplitMuxSink::location +gchar* + +rw +File Output Pattern +Format string pattern for the location of the files to write (e.g. video%05d.mp4). +NULL + + + +GstSplitMuxSink::max-size-bytes +guint64 + +rw +Max. size bytes +Max. amount of data per file (in bytes, 0=disable). +0 + + + +GstSplitMuxSink::max-size-time +guint64 + +rw +Max. size (ns) +Max. amount of time per file (in ns, 0=disable). +0 + + + +GstSplitMuxSink::mux-overhead +gdouble +[0,1] +rw +Muxing Overhead +Extra size overhead of muxing (0.02 = 2%). +0.02 + + + +GstSplitMuxSink::muxer +GstElement* + +rw +Muxer +The muxer element to use (NULL = default mp4mux). + + + + +GstSplitMuxSink::sink +GstElement* + +rw +Sink +The sink element (or element chain) to use (NULL = default filesink). + + + diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins-docs.sgml gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins-docs.sgml --- gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins-docs.sgml 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins-docs.sgml 2015-10-22 08:02:54.000000000 +0000 @@ -23,10 +23,10 @@ - - + + @@ -34,15 +34,15 @@ + + - - - - - + + + @@ -68,6 +68,7 @@ + @@ -77,26 +78,28 @@ - + + - + + - + - + @@ -117,23 +120,25 @@ - - + + - + + + @@ -141,34 +146,49 @@ + + + + + + + + + + + - - + - + + + + - + + + - - - + + + @@ -178,8 +198,8 @@ - + @@ -194,10 +214,11 @@ - + + @@ -209,14 +230,14 @@ - + - + @@ -238,8 +259,8 @@ - + diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.hierarchy gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.hierarchy --- gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.hierarchy 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.hierarchy 2015-10-22 08:02:54.000000000 +0000 @@ -19,20 +19,24 @@ GstV4l2DeviceProvider GstElement Gst3GPPMux - GstALawDec - GstALawEnc GstAsteriskh263 GstAuParse GstAudioDecoder + GstALawDec GstFlacDec GstMuLawDec GstSpeexDec GstWavpackDec GstAudioEncoder + GstALawEnc GstFlacEnc GstMuLawEnc GstSpeexEnc GstWavpackEnc + GstAudioVisualizer-ExtGoom + GstGoom + GstAudioVisualizer-ExtGoom2k1 + GstGoom2k1 GstAviDemux GstAviMux GstAviSubtitle @@ -152,6 +156,8 @@ GstRTSPSrc GstRgVolume GstRtpBin + GstSplitMuxSink + GstSplitMuxSrc GstCutter GstDVDec GstDVDemux @@ -162,8 +168,6 @@ GstFlvMux GstFlxDec GstGdkPixbufDec - GstGoom - GstGoom2k1 GstICYDemux GstISMLMux GstImageFreeze @@ -193,11 +197,13 @@ GstRtpG726Depay GstRtpG729Depay GstRtpGSTDepay + GstRtpH261Depay GstRtpH263Depay GstRtpH263PDepay GstRtpH264Depay GstRtpJ2KDepay GstRtpJPEGDepay + GstRtpKlvDepay GstRtpL16Depay GstRtpL24Depay GstRtpMP1SDepay @@ -241,11 +247,13 @@ GstRtpAMRPay GstRtpCELTPay GstRtpGSTPay + GstRtpH261Pay GstRtpH263PPay GstRtpH263Pay GstRtpH264Pay GstRtpJ2KPay GstRtpJPEGPay + GstRtpKlvPay GstRtpMP4APay GstRtpMP4GPay GstRtpMP4VPay @@ -287,10 +295,10 @@ GstPngEnc GstVP8Enc GstVP9Enc + GstY4mEncode GstVideoMixer2 GstWavEnc GstWavParse - GstY4mEncode GstPad GstInterleavePad GstVideoMixer2Pad @@ -305,6 +313,7 @@ GstTaskPool GSocket GTlsDatabase + GTlsInteraction GUdevClient GUdevDevice GdkPixbuf diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.interfaces gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.interfaces --- gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.interfaces 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.interfaces 2015-10-22 08:02:54.000000000 +0000 @@ -2,6 +2,7 @@ GdkPixbuf GIcon GdkPixbuf GIcon GLoadableIcon Gst3GPPMux GstTagSetter GstTagXmpWriter +GstALawEnc GstPreset GstApev2Mux GstTagSetter GstAspectRatioCrop GstChildProxy GstAudioEncoder GstPreset @@ -71,6 +72,8 @@ GstSpeexEnc GstPreset GstTagSetter GstSpeexEnc GstTagSetter GstPreset GstSplitFileSrc GstURIHandler +GstSplitMuxSink GstChildProxy +GstSplitMuxSrc GstChildProxy GstURIHandler GstSwitchSink GstChildProxy GstSwitchSrc GstChildProxy GstTagLibMux GstTagSetter @@ -95,3 +98,4 @@ GstWavpackEnc GstPreset GstWebMMux GstTagSetter GstWebMMux GstTagSetter GstTocSetter +GstY4mEncode GstPreset diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins-sections.txt gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins-sections.txt --- gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins-sections.txt 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins-sections.txt 2015-10-30 14:27:13.000000000 +0000 @@ -889,21 +889,23 @@
element-goom2k1 goom2k1 -GstGoom +GstGoom2k1 -GstGoomClass -GOOM_SAMPLES -GST_GOOM -GST_IS_GOOM -GST_TYPE_GOOM -GST_GOOM_CLASS -GST_IS_GOOM_CLASS +GstGoomClass2k1 +GOOM2K1_SAMPLES +GST_GOOM2K1 +GST_IS_GOOM2K1 +GST_TYPE_GOOM2K1 +GST_GOOM2K1_CLASS +GST_IS_GOOM2K1_CLASS
element-rtpbin rtpbin GstRtpBin +RTPJitterBufferMode +GstRTCPSync GstRtpBinPrivate GstRtpBinClass @@ -1743,6 +1745,68 @@
+element-rtph261depay +rtph261depay +GstRtpH261Depay + +GstRtpH261DepayClass +GST_RTP_H261_DEPAY +GST_IS_RTP_H261_DEPAY +GST_TYPE_RTP_H261_DEPAY +GST_RTP_H261_DEPAY_CLASS +GST_IS_RTP_H261_DEPAY_CLASS +gst_rtp_h261_depay_plugin_init +gst_rtp_h261_depay_get_type +
+ +
+element-rtph261pay +rtph261pay +GstRtpH261Pay + +GstRtpH261PayClass +GST_RTP_H261_PAY +GST_IS_RTP_H261_PAY +GST_TYPE_RTP_H261_PAY +GST_RTP_H261_PAY_CLASS +GST_IS_RTP_H261_PAY_CLASS +gst_rtp_h261_pay_plugin_init +gst_rtp_h261_pay_get_type +
+ +
+element-rtpklvdepay +rtpklvdepay +GstRtpKlvDepay + +GstRtpKlvDepayClass +GST_RTP_KLV_DEPAY +GST_RTP_KLV_DEPAY_CAST +GST_IS_RTP_KLV_DEPAY +GST_RTP_KLV_DEPAY_CLASS +GST_IS_RTP_KLV_DEPAY_CLASS +GST_TYPE_RTP_KLV_DEPAY + +gst_rtp_klv_depay_get_type +
+ +
+element-rtpklvpay +rtpklvpay +GstRtpKlvPay + +GstRtpKlvPayClass +GST_RTP_KLV_PAY +GST_RTP_KLV_PAY_CAST +GST_IS_RTP_KLV_PAY +GST_RTP_KLV_PAY_CLASS +GST_IS_RTP_KLV_PAY_CLASS +GST_TYPE_RTP_KLV_PAY + +gst_rtp_klv_pay_get_type +
+ +
element-rtpL16depay rtpL16depay GstRtpL16Depay @@ -2014,6 +2078,34 @@
+element-splitmuxsrc +splitmuxsrc +GstSplitMuxSrc + +GstSplitMuxSrcClass +GST_SPLITMUX_SRC +GST_SPLITMUX_SRC_CLASS +GST_IS_SPLITMUX_SRC +GST_IS_SPLITMUX_SRC_CLASS +GST_TYPE_SPLITMUX_SRC +gst_split_mux_src_get_type +
+ +
+element-splitmuxsink +splitmuxsink +GstSplitMuxSink + +GstSplitMuxSinkClass +GST_SPLITMUX_SINK +GST_SPLITMUX_SINK_CLASS +GST_IS_SPLITMUX_SINK +GST_IS_SPLITMUX_SINK_CLASS +GST_TYPE_SPLITMUX_SINK +gst_split_mux_sink_get_type +
+ +
element-taginject taginject GstTagInject diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.signals gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.signals --- gst-plugins-good1.0-1.4.3/docs/plugins/gst-plugins-good-plugins.signals 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/gst-plugins-good-plugins.signals 2015-10-22 08:02:54.000000000 +0000 @@ -1,17 +1,4 @@ -GstQTDemux::got-redirect -void -GstQTDemux *gstqtdemux -gchar *arg1 - - - -GstGSMEnc::frame-encoded -void -GstGSMEnc *gstgsmenc - - - GstMultiUDPSink::add void la @@ -73,24 +60,6 @@ -GstFdSrc::timeout -void -GstFdSrc *gstfdsrc - - - -GstDiceTV::reset -void -GstDiceTV *gstdicetv - - - -GstVertigoTV::reset-parms -void -GstVertigoTV *gstvertigotv - - - GstShout2send::connection-problem void c @@ -99,163 +68,6 @@ -DV1394Src::frame-dropped -void -DV1394Src *dv1394src - - - -GstJpegEnc::frame-encoded -void -l -GstJpegEnc *gstjpegenc - - - -GstAASink::frame-displayed -void -l -GstAASink *gstaasink - - - -GstAASink::have-size -void -l -GstAASink *gstaasink -guint arg1 -guint arg2 - - - -GstMultiFdSink::add -void -GstMultiFdSink *gstmultifdsink -gint arg1 - - - -GstMultiFdSink::clear -void -GstMultiFdSink *gstmultifdsink - - - -GstMultiFdSink::client-added -void -GstMultiFdSink *gstmultifdsink -gint arg1 - - - -GstMultiFdSink::client-removed -void -GstMultiFdSink *gstmultifdsink -gint arg1 -GstClientStatus arg2 - - - -GstMultiFdSink::get-stats -GValueArray* -GstMultiFdSink *gstmultifdsink -gint arg1 - - - -GstMultiFdSink::remove -void -GstMultiFdSink *gstmultifdsink -gint arg1 - - - -GstDecodeBin::new-decoded-pad -void -GstDecodeBin *gstdecodebin -GstPad *arg1 -gboolean arg2 - - - -GstDecodeBin::removed-decoded-pad -void -GstDecodeBin *gstdecodebin -GstPad *arg1 - - - -GstDecodeBin::unknown-type -void -GstDecodeBin *gstdecodebin -GstPad *arg1 -GstCaps *arg2 - - - -GstFakeSrc::handoff -void -GstFakeSrc *gstfakesrc -GstBuffer arg1 -GstPad *arg2 - - - -GstFakeSink::handoff -void -GstFakeSink *gstfakesink -GstBuffer arg1 -GstPad *arg2 - - - -GstIdentity::handoff -void -GstIdentity *gstidentity -GstBuffer arg1 - - - -GstTypeFindElement::have-type -void -GstTypeFindElement *gsttypefindelement -guint arg1 -GstCaps *arg2 - - - -GstQueue::overrun -void -GstQueue *gstqueue - - - -GstQueue::running -void -GstQueue *gstqueue - - - -GstQueue::underrun -void -GstQueue *gstqueue - - - -GstBin::element-added -void -GstBin *gstbin -GstElement *arg1 - - - -GstBin::element-removed -void -GstBin *gstbin -GstElement *arg1 - - - GstDV1394Src::frame-dropped void l @@ -789,3 +601,11 @@ guint arg1 + +GstSplitMuxSink::format-location +gchar* +l +GstSplitMuxSink *gstsplitmuxsink +guint arg1 + + diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/ch01.html gst-plugins-good1.0-1.6.1/docs/plugins/html/ch01.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/ch01.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/ch01.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: gst-plugins-good Elements +gst-plugins-good Elements: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,510 +30,1140 @@ aacparse — AAC parser
-aasink — An ASCII art videosink +aasink
ac3parse — AC3 parser
-agingtv — AgingTV adds age to video input using scratches and dust +agingtv
-alpha — Adds an alpha channel to video - uniform or via chroma-keying +alawdec
-alphacolor — ARGB from/to AYUV colorspace conversion preserving the alpha channel +alawenc
-alawdec — Convert 8bit A law to 16bit PCM +alphacolor
-alawenc — Convert 16bit PCM to 8bit A law +alpha
amrparse — AMR parser
-apedemux — Read and output APE tags while demuxing the contents +apedemux
-apev2mux — Adds an APEv2 header to the beginning of files using taglib +apev2mux
-aspectratiocrop — Crops video into a user-defined aspect-ratio +aspectratiocrop
-audioamplify — Amplifies an audio stream by a given factor +audioamplify
-audiochebband — Chebyshev band pass and band reject filter +audiochebband
-audiocheblimit — Chebyshev low pass and high pass filter +audiocheblimit
-audiofirfilter — Generic audio FIR filter with custom filter kernel +audiodynamic
-audioiirfilter — Generic audio IIR filter with custom filter kernel +audioecho
-audiowsincband — Band pass and band reject windowed sinc filter +audiofirfilter
-audiowsinclimit — Low pass and high pass windowed sinc filter +audioiirfilter
-audioecho — Adds an echo or reverb effect to an audio stream +audioinvert
-audiodynamic — Compressor and Expander +audiokaraoke
-audioinvert — Swaps upper and lower half of audio samples +audiopanorama
-audiopanorama — Positions audio streams in the stereo panorama +audiowsincband
-audiokaraoke — Removes voice from sound +audiowsinclimit
-auparse — Parse an .au file into raw audio +auparse
-autoaudiosink — Wrapper audio sink for automatically detected audio sink +autoaudiosink
-autoaudiosrc — Wrapper audio source for automatically detected audio source +autoaudiosrc
-autovideosink — Wrapper video sink for automatically detected video sink +autovideosink
-autovideosrc — Wrapper video source for automatically detected video source +autovideosrc
-avidemux — Demultiplex an avi file into audio and video +avidemux
-avimux — Muxes audio and video into an avi stream +avimux
-avisubtitle — Parse avi subtitle stream +avisubtitle
-cacasink — A colored ASCII art videosink +cacasink
-cairooverlay — Render overlay on a video stream using Cairo +cairooverlay
-capssetter — Set/merge caps on stream +capssetter
-cutter — Audio Cutter to split audio into non-silent bits +cutter
dcaparse — DCA (DTS Coherent Acoustics) parser
-deinterlace — Deinterlace Methods ported from DScaler/TvTime +deinterlace
-deinterleave — Splits one interleaved multichannel audio stream into many mono audio streams +deinterleave
-dicetv — 'Dices' the screen up into many small squares +dicetv
-directsoundsink — DirectSound audio sink +directsoundsink
-dtmfsrc — Generates DTMF tones +dtmfsrc
-dv1394src — Source for DV video data from firewire port +dv1394src
-dvdec — Uses libdv to decode DV video (smpte314) (libdv.sourceforge.net) +dvdec
-dvdemux — Uses libdv to separate DV audio from DV video (libdv.sourceforge.net) +dvdemux
-edgetv — Apply edge detect on video +edgetv
-equalizer-10bands — Direct Form 10 band IIR equalizer +equalizer-10bands
-equalizer-3bands — Direct Form 3 band IIR equalizer +equalizer-3bands
-equalizer-nbands — Direct Form IIR equalizer +equalizer-nbands
-flacdec — Decodes FLAC lossless audio streams +flacdec
-flacenc — Encodes audio with the FLAC lossless audio encoder +flacenc
-flacparse — Parses audio with the FLAC lossless audio codec +flacparse
-flactag — Rewrite tags in a FLAC file +flactag
-flvdemux — Demux FLV feeds into digital streams +flvdemux
-flvmux — Muxes video/audio streams into a FLV stream +flvmux
-flxdec — FLC/FLI/FLX video decoder +flxdec
-gamma — Adjusts gamma on a video stream +gamma
-gdkpixbufsink — Output images as GdkPixbuf objects in bus messages +gdkpixbufsink
-goom — Takes frames of data and outputs video frames using the GOOM filter +goom2k1
-goom2k1 — Takes frames of data and outputs video frames using the GOOM 2k1 filter +goom
-hdv1394src — Source for MPEG-TS video data from firewire port +hdv1394src
-icydemux — Read and output ICY tags while demuxing the contents +icydemux
-id3demux — Read and output ID3v1 and ID3v2 tags while demuxing the contents +id3demux
-id3v2mux — Adds an ID3v2 header to the beginning of MP3 files using taglib +id3v2mux
-imagefreeze — Generates a still frame stream from an image +imagefreeze
-interleave — Folds many mono channels into one interleaved audio stream +interleave
ismlmux — Muxer for ISML smooth streaming (.isml) files
-jackaudiosrc — Captures audio from a JACK server +jackaudiosink
-jackaudiosink — Output audio to a JACK server +jackaudiosrc
-jpegdec — Decode images from JPEG format +jpegdec
-jpegenc — Encode images in JPEG format +jpegenc
-level — RMS/Peak/Decaying Peak Level messager for audio/raw +level
-matroskamux — Muxes video/audio/subtitle streams into a matroska stream +matroskademux
-matroskademux — Demuxes Matroska/WebM streams into video/audio/subtitles +matroskamux
mj2mux — Muxer for Motion JPEG-2000 (.mj2) files
-monoscope — Displays a highly stabilised waveform of audio input +monoscope
-mpegaudioparse — MPEG audio parser +mp4mux — Muxer for ISO MPEG-4 (.mp4) files
-mp4mux — Muxer for ISO MPEG-4 (.mp4) files +mpegaudioparse — MPEG audio parser
-mulawdec — Convert 8bit mu law to 16bit PCM +mulawdec
-mulawenc — Convert 16bit PCM to 8bit mu law +mulawenc
-multifilesink — Write buffers to a sequentially named set of files +multifilesink
-multifilesrc — Read a sequentially named set of files into buffers +multifilesrc
-multipartdemux — demux multipart streams +multipartdemux
-multipartmux — mux multipart streams +multipartmux
-multiudpsink — Send data over the network via UDP to one or multiple recipients which can be added or removed at runtime using action signals +multiudpsink
-optv — Optical art meets real-time video effect +optv
-oss4sink — Output to a sound card via OSS version 4 +oss4sink
-oss4src — Capture from a sound card via OSS version 4 +oss4src
-osssink — Output to a sound card via OSS +osssink
-osssrc — Capture from a sound card via OSS +osssrc
-osxaudiosink — Output to a sound card in OS X +osxaudiosink
-osxaudiosrc — Input from a sound card in OS X +osxaudiosrc
-osxvideosink — OSX native videosink +osxvideosink
-pngdec — Decode a png video frame to a raw image +pngdec
-pngenc — Encode a video frame to a .png image +pngenc
-progressreport — Periodically query and report on processing progress +progressreport
-pulsesink — Plays audio to a PulseAudio server +pulsesink
-pulsesrc — Captures audio from a PulseAudio server +pulsesrc
-quarktv — Motion dissolver +qtdemux
-qtdemux — Demultiplex a QuickTime file into audio and video streams +qtmoovrecover — Utility element for recovering unfinished quicktime files
qtmux — Muxer for quicktime(.mov) files
-qtmoovrecover — Utility element for recovering unfinished quicktime files +quarktv +
+
+radioactv +
+
+revtv +
+
+rganalysis +
+
+rglimiter +
+
+rgvolume +
+
+rippletv +
+
+rtpac3depay +
+
+rtpac3pay +
+
+rtpamrdepay +
+
+rtpamrpay +
+
+rtpbin +
+
+rtpbvdepay +
+
+rtpbvpay +
+
+rtph261depay +
+
+rtph261pay +
+
+rtpL16depay
-radioactv — motion-enlightment effect +rtpL16pay
-revtv — A video waveform monitor for each line of video processed +rtpj2kpay
-rganalysis — Perform the ReplayGain analysis +rtpjpegpay
-rglimiter — Apply signal compression to raw audio data +rtpsbcpay
-rgvolume — Apply ReplayGain volume adjustment +rtspsrc
-rippletv — RippleTV does ripple mark effect on the video input +rtpbin
-rtpdec — Accepts raw RTP and RTCP packets and sends them forward +rtpdec
-rtpac3depay — Extracts AC3 audio from RTP packets (RFC 4184) +rtpdtmfdepay
-rtpac3pay — Payload AC3 audio as RTP packets (RFC 4184) +rtpdtmfmux
-rtpamrdepay — Extracts AMR or AMR-WB audio from RTP packets (RFC 3267) +rtpdtmfsrc
-rtpamrpay — Payload-encode AMR or AMR-WB audio into RTP packets (RFC 3267) +rtpj2kpay
-rtpbvdepay — Extracts BroadcomVoice audio from RTP packets (RFC 4298) +rtpjitterbuffer
-rtpbvpay — Packetize BroadcomVoice audio streams into RTP packets (RFC 4298) +rtpjpegpay
-rtpL16depay — Extracts raw audio from RTP packets +rtpklvdepay
-rtpL16pay — Payload-encode Raw audio into RTP packets (RFC 3551) +rtpklvpay
-rtpj2kpay — Payload-encodes JPEG 2000 pictures into RTP packets (RFC 5371) +rtpL16depay
-rtpjpegpay — Payload-encodes JPEG pictures into RTP packets (RFC 2435) +rtpL16pay
-rtpsbcpay — Payload SBC audio as RTP packets +rtpmux
-rtspsrc — Receive data over the network via RTSP (RFC 2326) +rtpptdemux
-rtpbin — Real-Time Transport Protocol bin +rtprtxreceive
-rtpdtmfmux — mixes RTP DTMF streams into other RTP streams +rtprtxsend
-rtpdtmfsrc — Generates RTP DTMF packets +rtpsbcpay
-rtpjitterbuffer — A buffer that deals with network jitter and other transmission faults +rtpsession
-rtpmux — multiplex N rtp streams into one +rtpssrcdemux
-rtpptdemux — Parses codec streams transmitted in the same RTP session +rtspsrc
-rtpsession — Implement an RTP session +sbcparse
-rtpssrcdemux — Splits RTP streams based on the SSRC +scaletempo
-rtprtxsend — Retransmit RTP packets when needed, according to RFC4588 +shagadelictv
-rtprtxreceive — Receive retransmitted RTP packets according to RFC4588 +shapewipe
-sbcparse — Parses an SBC bluetooth audio stream +shout2send
-scaletempo — Sync audio tempo with playback rate +smokedec
-shagadelictv — Oh behave, ShagedelicTV makes images shagadelic! +smokeenc
-shapewipe — Adds a shape wipe transition to a video stream +smptealpha
-shout2send — Sends data to an icecast server +smpte
-smpte — Apply the standard SMPTE transitions on video images +souphttpsrc
-smptealpha — Apply the standard SMPTE transitions as alpha on video images +spectrum
-souphttpsrc — Receive data as a client over the network via HTTP using SOUP +speexdec
-spectrum — Run an FFT on the audio signal, output spectrum data +speexenc
-speexenc — Encodes audio in Speex format +splitfilesrc
-speexdec — decode speex streams to audio +splitmuxsink — Muxer wrapper for splitting output stream by size or time
-splitfilesrc — Read a sequentially named set of files as if it was one large file +splitmuxsrc — Split Demuxer bin that recombines files created by +the splitmuxsink element.
-streaktv — StreakTV makes after images of moving objects +streaktv
-taginject — inject metadata tags +taginject
-udpsrc — Receive data over the network via UDP +udpsink
-udpsink — Send data over the network via UDP +udpsrc
-v4l2src — Reads frames from a Video4Linux2 device +v4l2radio
-v4l2sink — Displays frames on a video4linux2 device +v4l2sink
-v4l2radio — Controls a Video4Linux2 radio device +v4l2src
-vertigotv — A loopback alpha blending effector with rotating and scaling +vertigotv
-videobalance — Adjusts brightness, contrast, hue, saturation on a video stream +videobalance
-videobox — Resizes a video by adding borders or cropping +videobox
-videocrop — Crops video into a user-defined region +videocrop
-videoflip — Flips and rotates video +videoflip
-videomixer — Mix multiple video streams +videomixer
-vp8dec — Decode VP8 video streams +vp8dec
-vp8enc — Encode VP8 video streams +vp8enc
-warptv — WarpTV does realtime goo'ing of the video input +warptv
-wavenc — Encode raw audio into WAV +waveformsink
-waveformsink — WaveForm audio sink +wavenc
-wavpackdec — Decodes Wavpack audio data +wavpackdec
-wavpackenc — Encodes audio with the Wavpack lossless/lossy audio codec +wavpackenc
wavpackparse — Wavpack parser
-wavparse — Parse a .wav file into raw audio +wavparse
-webmmux — Muxes video and audio streams into a WebM stream +webmmux
-ximagesrc — Creates a screenshot video stream +ximagesrc
-y4menc — Encodes a YUV frame into the yuv4mpeg format (mjpegtools) +y4menc
+
+/* GStreamer
+ * Copyright (C) 2009 Sebastian Droege <sebastian.droege@collabora.co.uk>
+ *
+ * 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 small sample application creates a bandpass FIR filter
+ * by transforming the frequency response to the filter kernel.
+ */
+
+/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
+#include <string.h>
+#include <math.h>
+
+#include <gst/gst.h>
+#include <gst/fft/gstfftf64.h>
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+  GMainLoop *loop = (GMainLoop *) user_data;
+
+  switch (GST_MESSAGE_TYPE (message)) {
+    case GST_MESSAGE_ERROR:
+      g_error ("Got ERROR");
+      g_main_loop_quit (loop);
+      break;
+    case GST_MESSAGE_WARNING:
+      g_warning ("Got WARNING");
+      g_main_loop_quit (loop);
+      break;
+    case GST_MESSAGE_EOS:
+      g_main_loop_quit (loop);
+      break;
+    default:
+      break;
+  }
+
+  return TRUE;
+}
+
+static void
+on_rate_changed (GstElement * element, gint rate, gpointer user_data)
+{
+  GValueArray *va;
+  GValue v = { 0, };
+  GstFFTF64 *fft;
+  GstFFTF64Complex frequency_response[17];
+  gdouble tmp[32];
+  gdouble filter_kernel[32];
+  guint i;
+
+  /* Create the frequency response: zero outside
+   * a small frequency band */
+  for (i = 0; i < 17; i++) {
+    if (i < 5 || i > 11)
+      frequency_response[i].r = 0.0;
+    else
+      frequency_response[i].r = 1.0;
+
+    frequency_response[i].i = 0.0;
+  }
+
+  /* Calculate the inverse FT of the frequency response */
+  fft = gst_fft_f64_new (32, TRUE);
+  gst_fft_f64_inverse_fft (fft, frequency_response, tmp);
+  gst_fft_f64_free (fft);
+
+  /* Shift the inverse FT of the frequency response by 16,
+   * i.e. the half of the kernel length to get the
+   * impulse response. See http://www.dspguide.com/ch17/1.htm
+   * for more information.
+   */
+  for (i = 0; i < 32; i++)
+    filter_kernel[i] = tmp[(i + 16) % 32];
+
+  /* Apply the hamming window to the impulse response to get
+   * a better result than given from the rectangular window
+   */
+  for (i = 0; i < 32; i++)
+    filter_kernel[i] *= (0.54 - 0.46 * cos (2 * G_PI * i / 32));
+
+  va = g_value_array_new (1);
+
+  g_value_init (&v, G_TYPE_DOUBLE);
+  for (i = 0; i < 32; i++) {
+    g_value_set_double (&v, filter_kernel[i]);
+    g_value_array_append (va, &v);
+    g_value_reset (&v);
+  }
+  g_object_set (G_OBJECT (element), "kernel", va, NULL);
+  /* Latency is 1/2 of the kernel length for this method of
+   * calculating a filter kernel from the frequency response
+   */
+  g_object_set (G_OBJECT (element), "latency", (gint64) (32 / 2), NULL);
+  g_value_array_free (va);
+}
+
+gint
+main (gint argc, gchar * argv[])
+{
+  GstElement *pipeline, *src, *filter, *conv, *sink;
+  GstBus *bus;
+  GMainLoop *loop;
+
+  gst_init (NULL, NULL);
+
+  pipeline = gst_element_factory_make ("pipeline", NULL);
+
+  src = gst_element_factory_make ("audiotestsrc", NULL);
+  g_object_set (G_OBJECT (src), "wave", 5, NULL);
+
+  filter = gst_element_factory_make ("audiofirfilter", NULL);
+  g_signal_connect (G_OBJECT (filter), "rate-changed",
+      G_CALLBACK (on_rate_changed), NULL);
+
+  conv = gst_element_factory_make ("audioconvert", NULL);
+
+  sink = gst_element_factory_make ("autoaudiosink", NULL);
+  g_return_val_if_fail (sink != NULL, -1);
+
+  gst_bin_add_many (GST_BIN (pipeline), src, filter, conv, sink, NULL);
+  if (!gst_element_link_many (src, filter, conv, sink, NULL)) {
+    g_error ("Failed to link elements");
+    return -2;
+  }
+
+  loop = g_main_loop_new (NULL, FALSE);
+
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  gst_bus_add_signal_watch (bus);
+  g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+  gst_object_unref (GST_OBJECT (bus));
+
+  if (gst_element_set_state (pipeline,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
+    g_error ("Failed to go into PLAYING state");
+    return -3;
+  }
+
+  g_main_loop_run (loop);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+
+  g_main_loop_unref (loop);
+  gst_object_unref (pipeline);
+
+  return 0;
+}
+
+
+
+/* GStreamer
+ * Copyright (C) 2009 Sebastian Droege <sebastian.droege@collabora.co.uk>
+ *
+ * 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 small sample application creates a lowpass IIR filter
+ * and applies it to white noise.
+ * See http://www.dspguide.com/ch19/2.htm for a description
+ * of the IIR filter that is used.
+ */
+
+/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
+#include <string.h>
+#include <math.h>
+
+#include <gst/gst.h>
+
+/* Cutoff of 4000 Hz */
+#define CUTOFF (4000.0)
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+  GMainLoop *loop = (GMainLoop *) user_data;
+
+  switch (GST_MESSAGE_TYPE (message)) {
+    case GST_MESSAGE_ERROR:
+      g_error ("Got ERROR");
+      g_main_loop_quit (loop);
+      break;
+    case GST_MESSAGE_WARNING:
+      g_warning ("Got WARNING");
+      g_main_loop_quit (loop);
+      break;
+    case GST_MESSAGE_EOS:
+      g_main_loop_quit (loop);
+      break;
+    default:
+      break;
+  }
+
+  return TRUE;
+}
+
+static void
+on_rate_changed (GstElement * element, gint rate, gpointer user_data)
+{
+  GValueArray *va;
+  GValue v = { 0, };
+  gdouble x;
+
+  if (rate / 2.0 > CUTOFF)
+    x = exp (-2.0 * G_PI * (CUTOFF / rate));
+  else
+    x = 0.0;
+
+  va = g_value_array_new (1);
+
+  g_value_init (&v, G_TYPE_DOUBLE);
+  g_value_set_double (&v, 1.0 - x);
+  g_value_array_append (va, &v);
+  g_value_reset (&v);
+  g_object_set (G_OBJECT (element), "a", va, NULL);
+  g_value_array_free (va);
+
+  va = g_value_array_new (1);
+  g_value_set_double (&v, x);
+  g_value_array_append (va, &v);
+  g_value_reset (&v);
+  g_object_set (G_OBJECT (element), "b", va, NULL);
+  g_value_array_free (va);
+}
+
+gint
+main (gint argc, gchar * argv[])
+{
+  GstElement *pipeline, *src, *filter, *conv, *sink;
+  GstBus *bus;
+  GMainLoop *loop;
+
+  gst_init (NULL, NULL);
+
+  pipeline = gst_element_factory_make ("pipeline", NULL);
+
+  src = gst_element_factory_make ("audiotestsrc", NULL);
+  g_object_set (G_OBJECT (src), "wave", 5, NULL);
+
+  filter = gst_element_factory_make ("audioiirfilter", NULL);
+  g_signal_connect (G_OBJECT (filter), "rate-changed",
+      G_CALLBACK (on_rate_changed), NULL);
+
+  conv = gst_element_factory_make ("audioconvert", NULL);
+
+  sink = gst_element_factory_make ("autoaudiosink", NULL);
+  g_return_val_if_fail (sink != NULL, -1);
+
+  gst_bin_add_many (GST_BIN (pipeline), src, filter, conv, sink, NULL);
+  if (!gst_element_link_many (src, filter, conv, sink, NULL)) {
+    g_error ("Failed to link elements");
+    return -2;
+  }
+
+  loop = g_main_loop_new (NULL, FALSE);
+
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  gst_bus_add_signal_watch (bus);
+  g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+  gst_object_unref (GST_OBJECT (bus));
+
+  if (gst_element_set_state (pipeline,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
+    g_error ("Failed to go into PLAYING state");
+    return -3;
+  }
+
+  g_main_loop_run (loop);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+
+  g_main_loop_unref (loop);
+  gst_object_unref (pipeline);
+
+  return 0;
+}
+
+
+
+/* GStreamer
+ * Copyright (C) 2000,2001,2002,2003,2005
+ *           Thomas Vander Stichele <thomas at apestaart dot org>
+ *
+ * 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.
+ */
+
+#include <string.h>
+#include <math.h>
+
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
+#include <gst/gst.h>
+
+static gboolean
+message_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+
+  if (message->type == GST_MESSAGE_ELEMENT) {
+    const GstStructure *s = gst_message_get_structure (message);
+    const gchar *name = gst_structure_get_name (s);
+
+    if (strcmp (name, "level") == 0) {
+      gint channels;
+      GstClockTime endtime;
+      gdouble rms_dB, peak_dB, decay_dB;
+      gdouble rms;
+      const GValue *array_val;
+      const GValue *value;
+      GValueArray *rms_arr, *peak_arr, *decay_arr;
+      gint i;
+
+      if (!gst_structure_get_clock_time (s, "endtime", &endtime))
+        g_warning ("Could not parse endtime");
+
+      /* the values are packed into GValueArrays with the value per channel */
+      array_val = gst_structure_get_value (s, "rms");
+      rms_arr = (GValueArray *) g_value_get_boxed (array_val);
+
+      array_val = gst_structure_get_value (s, "peak");
+      peak_arr = (GValueArray *) g_value_get_boxed (array_val);
+
+      array_val = gst_structure_get_value (s, "decay");
+      decay_arr = (GValueArray *) g_value_get_boxed (array_val);
+
+      /* we can get the number of channels as the length of any of the value
+       * arrays */
+      channels = rms_arr->n_values;
+      g_print ("endtime: %" GST_TIME_FORMAT ", channels: %d\n",
+          GST_TIME_ARGS (endtime), channels);
+      for (i = 0; i < channels; ++i) {
+
+        g_print ("channel %d\n", i);
+        value = g_value_array_get_nth (rms_arr, i);
+        rms_dB = g_value_get_double (value);
+
+        value = g_value_array_get_nth (peak_arr, i);
+        peak_dB = g_value_get_double (value);
+
+        value = g_value_array_get_nth (decay_arr, i);
+        decay_dB = g_value_get_double (value);
+        g_print ("    RMS: %f dB, peak: %f dB, decay: %f dB\n",
+            rms_dB, peak_dB, decay_dB);
+
+        /* converting from dB to normal gives us a value between 0.0 and 1.0 */
+        rms = pow (10, rms_dB / 20);
+        g_print ("    normalized rms value: %f\n", rms);
+      }
+    }
+  }
+  /* we handled the message we want, and ignored the ones we didn't want.
+   * so the core can unref the message for us */
+  return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+  GstElement *audiotestsrc, *audioconvert, *level, *fakesink;
+  GstElement *pipeline;
+  GstCaps *caps;
+  GstBus *bus;
+  guint watch_id;
+  GMainLoop *loop;
+
+  gst_init (&argc, &argv);
+
+  caps = gst_caps_from_string ("audio/x-raw,channels=2");
+
+  pipeline = gst_pipeline_new (NULL);
+  g_assert (pipeline);
+  audiotestsrc = gst_element_factory_make ("audiotestsrc", NULL);
+  g_assert (audiotestsrc);
+  audioconvert = gst_element_factory_make ("audioconvert", NULL);
+  g_assert (audioconvert);
+  level = gst_element_factory_make ("level", NULL);
+  g_assert (level);
+  fakesink = gst_element_factory_make ("fakesink", NULL);
+  g_assert (fakesink);
+
+  gst_bin_add_many (GST_BIN (pipeline), audiotestsrc, audioconvert, level,
+      fakesink, NULL);
+  if (!gst_element_link (audiotestsrc, audioconvert))
+    g_error ("Failed to link audiotestsrc and audioconvert");
+  if (!gst_element_link_filtered (audioconvert, level, caps))
+    g_error ("Failed to link audioconvert and level");
+  if (!gst_element_link (level, fakesink))
+    g_error ("Failed to link level and fakesink");
+
+  /* make sure we'll get messages */
+  g_object_set (G_OBJECT (level), "post-messages", TRUE, NULL);
+  /* run synced and not as fast as we can */
+  g_object_set (G_OBJECT (fakesink), "sync", TRUE, NULL);
+
+  bus = gst_element_get_bus (pipeline);
+  watch_id = gst_bus_add_watch (bus, message_handler, NULL);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  /* we need to run a GLib main loop to get the messages */
+  loop = g_main_loop_new (NULL, FALSE);
+  g_main_loop_run (loop);
+
+  g_source_remove (watch_id);
+  g_main_loop_unref (loop);
+  return 0;
+}
+
+
+
+/* GStreamer
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ * Copyright (C) 2008 Jan Schmidt <jan.schmidt@sun.com>
+ *
+ * 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.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <gst/gst.h>
+
+static guint spect_bands = 20;
+
+#define AUDIOFREQ 32000
+
+/* receive spectral data from element message */
+static gboolean
+message_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+  if (message->type == GST_MESSAGE_ELEMENT) {
+    const GstStructure *s = gst_message_get_structure (message);
+    const gchar *name = gst_structure_get_name (s);
+    GstClockTime endtime;
+
+    if (strcmp (name, "spectrum") == 0) {
+      const GValue *magnitudes;
+      const GValue *phases;
+      const GValue *mag, *phase;
+      gdouble freq;
+      guint i;
+
+      if (!gst_structure_get_clock_time (s, "endtime", &endtime))
+        endtime = GST_CLOCK_TIME_NONE;
+
+      g_print ("New spectrum message, endtime %" GST_TIME_FORMAT "\n",
+          GST_TIME_ARGS (endtime));
+
+      magnitudes = gst_structure_get_value (s, "magnitude");
+      phases = gst_structure_get_value (s, "phase");
+
+      for (i = 0; i < spect_bands; ++i) {
+        freq = (gdouble) ((AUDIOFREQ / 2) * i + AUDIOFREQ / 4) / spect_bands;
+        mag = gst_value_list_get_value (magnitudes, i);
+        phase = gst_value_list_get_value (phases, i);
+
+        if (mag != NULL && phase != NULL) {
+          g_print ("band %d (freq %g): magnitude %f dB phase %f\n", i, freq,
+              g_value_get_float (mag), g_value_get_float (phase));
+        }
+      }
+      g_print ("\n");
+    }
+  }
+  return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+  GstElement *bin;
+  GstElement *src, *audioconvert, *spectrum, *sink;
+  GstBus *bus;
+  GstCaps *caps;
+  GMainLoop *loop;
+
+  gst_init (&argc, &argv);
+
+  bin = gst_pipeline_new ("bin");
+
+  src = gst_element_factory_make ("audiotestsrc", "src");
+  g_object_set (G_OBJECT (src), "wave", 0, "freq", 6000.0, NULL);
+  audioconvert = gst_element_factory_make ("audioconvert", NULL);
+  g_assert (audioconvert);
+
+  spectrum = gst_element_factory_make ("spectrum", "spectrum");
+  g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80,
+      "post-messages", TRUE, "message-phase", TRUE, NULL);
+
+  sink = gst_element_factory_make ("fakesink", "sink");
+  g_object_set (G_OBJECT (sink), "sync", TRUE, NULL);
+
+  gst_bin_add_many (GST_BIN (bin), src, audioconvert, spectrum, sink, NULL);
+
+  caps = gst_caps_new_simple ("audio/x-raw",
+      "rate", G_TYPE_INT, AUDIOFREQ, NULL);
+
+  if (!gst_element_link (src, audioconvert) ||
+      !gst_element_link_filtered (audioconvert, spectrum, caps) ||
+      !gst_element_link (spectrum, sink)) {
+    fprintf (stderr, "can't link elements\n");
+    exit (1);
+  }
+  gst_caps_unref (caps);
+
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_watch (bus, message_handler, NULL);
+  gst_object_unref (bus);
+
+  gst_element_set_state (bin, GST_STATE_PLAYING);
+
+  /* we need to run a GLib main loop to get the messages */
+  loop = g_main_loop_new (NULL, FALSE);
+  g_main_loop_run (loop);
+
+  gst_element_set_state (bin, GST_STATE_NULL);
+
+  gst_object_unref (bin);
+
+  return 0;
+}
+
+
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/ch02.html gst-plugins-good1.0-1.6.1/docs/plugins/html/ch02.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/ch02.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/ch02.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: gst-plugins-good Plugins +gst-plugins-good Plugins: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -24,219 +24,221 @@ gst-plugins-good Plugins
-1394Source for video data via IEEE1394 interface +1394 — Source for video data via IEEE1394 interface
-aasinkASCII Art video sink +aasink — ASCII Art video sink
-alawALaw audio conversion routines +alaw — ALaw audio conversion routines
-alphaadds an alpha channel to video - constant or via chroma-keying +alphacolor — RGBA from/to AYUV colorspace conversion preserving the alpha channel
-alphacolorRGBA from/to AYUV colorspace conversion preserving the alpha channel +alpha — adds an alpha channel to video - constant or via chroma-keying
-apetagAPEv1/2 tag reader +apetag — APEv1/2 tag reader
-audiofxAudio effects plugin +audiofx — Audio effects plugin
-auparseparses au streams +audioparsers — Parsers for various audio formats
-autodetectPlugin contains auto-detection plugins for video/audio in- and outputs +auparse — parses au streams
-aviAVI stream handling +autodetect — Plugin contains auto-detection plugins for video/audio in- and outputs
-cacasinkColored ASCII Art video sink +avi — AVI stream handling
-cairoCairo-based elements +cacasink — Colored ASCII Art video sink
-cutterAudio Cutter to split audio into non-silent bits +cairo — Cairo-based elements
-debugelements for testing and debugging +cutter — Audio Cutter to split audio into non-silent bits
-deinterlaceDeinterlacer +debug — elements for testing and debugging
-directsoundDirectSound plugin +deinterlace — Deinterlacer
-dtmfDTMF plugins +directsound — DirectSound plugin
-dvDV demuxer and decoder based on libdv (libdv.sf.net) +dtmf — DTMF plugins
-equalizerGStreamer audio equalizers +dv — DV demuxer and decoder based on libdv (libdv.sf.net)
-effectveffect plugins from the effectv project +effectv — effect plugins from the effectv project
-flacThe FLAC Lossless compressor Codec +equalizer — GStreamer audio equalizers
-flvFLV muxing and demuxing plugin +flac — The FLAC Lossless compressor Codec
-flxdecFLC/FLI/FLX video decoder +flv — FLV muxing and demuxing plugin
-gdkpixbufGdkPixbuf-based image decoder, overlay and sink +flxdec — FLC/FLI/FLX video decoder
-goomGOOM visualization filter +gdkpixbuf — GdkPixbuf-based image decoder, overlay and sink
-goom2k1GOOM 2k1 visualization filter +goom2k1 — GOOM 2k1 visualization filter
-icydemuxDemux ICY tags from a stream +goom — GOOM visualization filter
-id3demuxDemux ID3v1 and ID3v2 tags from a file +icydemux — Demux ICY tags from a stream
-imagefreezeStill frame stream generator +id3demux — Demux ID3v1 and ID3v2 tags from a file
-interleaveAudio interleaver/deinterleaver +imagefreeze — Still frame stream generator
-isomp4ISO base media file format support (mp4, 3gpp, qt, mj2) +interleave — Audio interleaver/deinterleaver
-jackJACK audio elements +isomp4 — ISO base media file format support (mp4, 3gpp, qt, mj2)
-jpegJPeg plugin library +jack — JACK audio elements
-levelAudio level plugin +jpeg — JPeg plugin library
-matroskaMatroska and WebM stream handling +level — Audio level plugin
-monoscopeMonoscope visualization +matroska — Matroska and WebM stream handling
-mulawMuLaw audio conversion routines +monoscope — Monoscope visualization
-multifileReads/Writes buffers from/to sequentially named files +mulaw — MuLaw audio conversion routines
-multipartmultipart stream manipulation +multifile — Reads/Writes buffers from/to sequentially named files
-navigationtestTemplate for a video filter +multipart — multipart stream manipulation
-oss4Open Sound System (OSS) version 4 support for GStreamer +navigationtest — Template for a video filter
-ossaudioOSS (Open Sound System) support for GStreamer +oss4 — Open Sound System (OSS) version 4 support for GStreamer
-osxaudioOSX (Mac OS X) audio support for GStreamer +ossaudio — OSS (Open Sound System) support for GStreamer
-osxvideoOSX native video output plugin +osxaudio — OSX (Mac OS X) audio support for GStreamer
-pngPNG plugin library +osxvideo — OSX native video output plugin
-pulseaudioPulseAudio plugin library +png — PNG plugin library
-replaygainReplayGain volume normalization +pulseaudio — PulseAudio plugin library
-rtpReal-time protocol plugins +replaygain — ReplayGain volume normalization
-rtpmanagerRTP session management plugin library +rtpmanager — RTP session management plugin library
-rtsptransfer data via RTSP +rtp — Real-time protocol plugins
-shapewipeShape Wipe transition filter +rtsp — transfer data via RTSP
-shout2sendSends data to an icecast server using libshout2 +shapewipe — Shape Wipe transition filter
-smpteApply the standard SMPTE transitions on video images +shout2send — Sends data to an icecast server using libshout2
-souplibsoup HTTP client src/sink +smpte — Apply the standard SMPTE transitions on video images
-spectrumRun an FFT on the audio signal, output spectrum data +soup — libsoup HTTP client src/sink
-speexSpeex plugin library +spectrum — Run an FFT on the audio signal, output spectrum data
-taglibTag writing plug-in based on taglib +speex — Speex plugin library
-udptransfer data via UDP +taglib — Tag writing plug-in based on taglib
-video4linux2elements for Video 4 Linux +udp — transfer data via UDP
-videoboxresizes a video by adding borders or cropping +video4linux2 — elements for Video 4 Linux
-videocropCrops video into a user-defined region +videobox — resizes a video by adding borders or cropping
-videofilterVideo filters plugin +videocrop — Crops video into a user-defined region
-videomixerVideo mixer +videofilter — Video filters plugin
-vpxVP8 plugin +videomixer — Video mixer
-waveformWaveForm API based plugin +vpx — VP8 plugin
-wavencEncode raw audio into WAV +waveform — WaveForm API based plugin
-wavpackWavpack lossless/lossy audio format handling +wavenc — Encode raw audio into WAV
-wavparseParse a .wav file into raw audio +wavpack — Wavpack lossless/lossy audio format handling
-ximagesrcX11 video input plugin using standard Xlib calls +wavparse — Parse a .wav file into raw audio
-y4mencEncodes a YUV frame into the yuv4mpeg format (mjpegtools) +ximagesrc — X11 video input plugin using standard Xlib calls +
+
+y4menc — Encodes a YUV frame into the yuv4mpeg format (mjpegtools)
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/ch03.html gst-plugins-good1.0-1.6.1/docs/plugins/html/ch03.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/ch03.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/ch03.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: gst-plugins-good Base Classes +gst-plugins-good Base Classes: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -32,7 +32,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/GstIirEqualizer.html gst-plugins-good1.0-1.6.1/docs/plugins/html/GstIirEqualizer.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/GstIirEqualizer.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/GstIirEqualizer.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: GstIirEqualizer +GstIirEqualizer: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -68,24 +68,20 @@

Description

-

-

Functions

+

Types and Values

struct GstIirEqualizer

struct GstIirEqualizer;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 2015-10-30 14:27:13.000000000 +0000 @@ -1,5 +1,4 @@ - @@ -8,10 +7,10 @@ - - + + @@ -19,15 +18,15 @@ + + - - - - - + + + @@ -62,8 +61,8 @@ - + @@ -71,17 +70,17 @@ - + - + - + @@ -102,23 +101,25 @@ - - + + - + + + @@ -126,34 +127,48 @@ + + + + + + + + + + + - - + - + + + - + + + - - - + + + @@ -163,8 +178,8 @@ - + @@ -177,10 +192,11 @@ - + + @@ -192,14 +208,14 @@ - + - + @@ -221,8 +237,8 @@ - + @@ -251,9 +267,6 @@ - - - @@ -264,12 +277,11 @@ - - - + + + + - - @@ -282,22 +294,15 @@ - - - - - - - - - - + + + @@ -310,38 +315,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -349,156 +330,83 @@ - - - - - - + + + + + + + + + + - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -507,26 +415,13 @@ - - - - - - - - - - - - - @@ -537,23 +432,13 @@ - - - - - - - - - - @@ -565,24 +450,13 @@ - - - - - - - - - - - @@ -599,79 +473,34 @@ - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - @@ -682,58 +511,43 @@ - - - - - - - - - - + + + + - - + + + + + + + + - - - - - - - - - - + + + - - - - - - - - @@ -744,17 +558,11 @@ - - - + + + + - - - - - - - @@ -765,15 +573,13 @@ - - + + + + + - - - - - @@ -782,9 +588,8 @@ - - - + + @@ -792,27 +597,15 @@ - - - - - - - - - - - - @@ -835,101 +628,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -940,49 +699,28 @@ - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - @@ -990,70 +728,63 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - @@ -1085,15 +816,18 @@ + + + + - - - + + @@ -1107,6 +841,8 @@ + + @@ -1129,11 +865,20 @@ - - + + + + + + + + + + + + + - - @@ -1143,9 +888,7 @@ - - - + @@ -1159,34 +902,49 @@ + + + + - - - + + + + + + + - - - - - - + + + + + + + + + + + + + + - @@ -1197,6 +955,8 @@ + + @@ -1208,55 +968,60 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - @@ -1266,40 +1031,28 @@ - - - - - - - - - - - - - - + + - - + + + + + + - - - - @@ -1317,20 +1070,18 @@ - - - + + - - - + + @@ -1342,75 +1093,43 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -1420,7 +1139,6 @@ - @@ -1429,27 +1147,29 @@ - - - - - - - - - + + + + + + + + + + + + + + + - - - - @@ -1464,33 +1184,20 @@ - - - - - - - - - - - - - @@ -1505,17 +1212,12 @@ - - - - - @@ -1524,17 +1226,7 @@ - - - - - - - - - - @@ -1551,22 +1243,10 @@ - - - - - - - - - - - + - - @@ -1575,24 +1255,12 @@ - - - - - - - - - - - - @@ -1602,10 +1270,42 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-3gppmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-3gppmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-3gppmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-3gppmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: 3gppmux +3gppmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -90,6 +90,26 @@ trak-timescale Read / Write / Construct + +guint +reserved-bytes-per-sec +Read / Write / Construct + + +guint64 +reserved-duration-remaining +Read + + +guint64 +reserved-max-duration +Read / Write + + +guint64 +reserved-moov-update-period +Read / Write + @@ -170,7 +190,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -196,7 +216,7 @@
-

Element Pads

+

Element Pads

@@ -231,6 +251,10 @@ + + + +

audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]

audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 1, 2147483647 ]
@@ -277,19 +301,19 @@ - + - + - + - +

details

video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]video/x-h263, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
@@ -319,19 +343,16 @@
-

-

Functions

+

Types and Values

Gst3GPPMux

typedef struct _Gst3GPPMux Gst3GPPMux;
-

-

@@ -339,7 +360,7 @@

The “dts-method” property

  “dts-method”               GstQTMuxDtsMethods
-

(DEPRECATED) Method to determine DTS time.

+

Method to determine DTS time (DEPRECATED).

Flags: Read / Write / Construct

Default value: reorder

@@ -382,7 +403,7 @@

Timescale to use in the movie (units per second).

Flags: Read / Write / Construct

Allowed values: >= 1

-

Default value: 1000

+

Default value: 1800


@@ -408,10 +429,42 @@

Flags: Read / Write / Construct

Default value: 0

+
+
+

The “reserved-bytes-per-sec” property

+
  “reserved-bytes-per-sec”   guint
+

Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track.

+

Flags: Read / Write / Construct

+

Allowed values: <= 10000

+

Default value: 550

+
+
+

The “reserved-duration-remaining” property

+
  “reserved-duration-remaining” guint64
+

Reports the approximate amount of remaining moov header space reserved using reserved-max-duration.

+

Flags: Read

+

Default value: 0

- +
+

The “reserved-max-duration” property

+
  “reserved-max-duration”    guint64
+

When set to a value > 0, reserves space for index tables at the beginning of the file.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+
+
+

The “reserved-moov-update-period” property

+
  “reserved-moov-update-period” guint64
+

When used with reserved-max-duration, periodically updates the index tables with information muxed so far.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-aacparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-aacparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-aacparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-aacparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: aacparse +aacparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -88,7 +88,7 @@

plugin

- audioparsers + audioparsers @@ -155,11 +155,10 @@ -

-

Functions

+

Types and Values

@@ -175,7 +174,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-aasink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-aasink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-aasink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-aasink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: aasink +aasink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -17,8 +17,7 @@ Top  |  Description  |  Object Hierarchy  |  - Properties  |  - Signals + Properties Home Up @@ -30,7 +29,7 @@

aasink

-

aasink — An ASCII art videosink

+

aasink

@@ -101,28 +100,6 @@ -
-

Signals

-
----- - - - - - - - - - - - - -
voidframe-displayedRun Last
voidhave-sizeRun Last
-

Types and Values

@@ -152,7 +129,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -178,7 +155,7 @@
-

Element Pads

+

Element Pads

@@ -205,19 +182,16 @@
-

-

Functions

+

Types and Values

struct GstAASink

struct GstAASink;
-

-

@@ -311,77 +285,8 @@

Default value: 0

-
-

Signal Details

-
-

The “frame-displayed” signal

-
void
-user_function (GstAASink *gstaasink,
-               gpointer   user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstaasink

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “have-size” signal

-
void
-user_function (GstAASink *gstaasink,
-               guint      arg1,
-               guint      arg2,
-               gpointer   user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstaasink

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-ac3parse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-ac3parse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-ac3parse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-ac3parse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: ac3parse +ac3parse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -85,7 +85,7 @@

plugin

- audioparsers + audioparsers @@ -168,11 +168,10 @@ -

-

Functions

+

Types and Values

@@ -188,7 +187,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-agingtv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-agingtv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-agingtv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-agingtv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: agingtv +agingtv: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

agingtv

-

agingtv — AgingTV adds age to video input using scratches and dust

+

agingtv

@@ -187,19 +187,16 @@
-

-

Functions

+

Types and Values

struct GstAgingTV

struct GstAgingTV;
-

-

@@ -239,7 +236,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alawdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alawdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alawdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alawdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: alawdec +alawdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

alawdec

-

alawdec — Convert 8bit A law to 16bit PCM

+

alawdec

@@ -51,7 +51,8 @@ ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement - ╰── GstALawDec + ╰── GstAudioDecoder + ╰── GstALawDec
@@ -60,7 +61,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -86,7 +87,7 @@
-

Element Pads

+

Element Pads

@@ -137,24 +138,20 @@
-

-

Functions

+

Types and Values

struct GstALawDec

struct GstALawDec;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alawenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alawenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alawenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alawenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: alawenc +alawenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -21,14 +21,14 @@ Home Up Prev -Next +Next

alawenc

-

alawenc — Convert 16bit PCM to 8bit A law

+

alawenc

@@ -51,7 +51,8 @@ ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement - ╰── GstALawEnc + ╰── GstAudioEncoder + ╰── GstALawEnc
@@ -60,7 +61,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -86,7 +87,7 @@
-

Element Pads

+

Element Pads

@@ -137,24 +138,20 @@
-

-

Functions

+

Types and Values

struct GstALawEnc

struct GstALawEnc;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alphacolor.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alphacolor.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alphacolor.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alphacolor.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: alphacolor +alphacolor: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -20,15 +20,15 @@ Home Up -Prev -Next +Prev +Next

alphacolor

-

alphacolor — ARGB from/to AYUV colorspace conversion preserving the alpha channel

+

alphacolor

@@ -76,24 +76,100 @@

-

-

+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ alphacolor +

author

Wim Taymans <wim.taymans@gmail.com>

class

Filter/Converter/Video
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

sink

direction

sink

presence

always

details

video/x-raw, format=(string){ RGBA, BGRA, ARGB, ABGR, AYUV }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
++++ + + + + + + + + + + + + + + + + + + +

name

src

direction

source

presence

always

details

video/x-raw, format=(string){ RGBA, BGRA, ARGB, ABGR, AYUV }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
+

Functions

+

Types and Values

struct GstAlphaColor

struct GstAlphaColor;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alpha.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alpha.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-alpha.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-alpha.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: alpha +alpha: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

alpha

-

alpha — Adds an alpha channel to video - uniform or via chroma-keying

+

alpha

@@ -147,13 +147,13 @@
-

+

This pipeline adds a alpha channel to the SMPTE color bars with green as the transparent color and mixes the output with a snow video stream.

Synopsis

-

Element Information

+

Element Information

@@ -181,7 +181,7 @@
-

Element Pads

+

Element Pads

@@ -232,25 +232,22 @@
-

-

Functions

+

Types and Values

struct GstAlpha

struct GstAlpha;
-

-


enum GstAlphaMethod

-

Members

+

Members

@@ -383,7 +380,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-amrparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-amrparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-amrparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-amrparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: amrparse +amrparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ - +
Home UpPrevPrev Next
@@ -86,7 +86,7 @@

plugin

- audioparsers + audioparsers @@ -161,11 +161,10 @@
-

-

Functions

+

Types and Values

@@ -192,7 +191,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-apedemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-apedemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-apedemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-apedemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: apedemux +apedemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

apedemux

-

apedemux — Read and output APE tags while demuxing the contents

+

apedemux

@@ -163,24 +163,20 @@ -

-

Functions

+

Types and Values

struct GstApeDemux

struct GstApeDemux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-apev2mux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-apev2mux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-apev2mux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-apev2mux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: apev2mux +apev2mux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

apev2mux

-

apev2mux — Adds an APEv2 header to the beginning of files using taglib

+

apev2mux

@@ -144,24 +144,20 @@ -

-

Functions

+

Types and Values

struct GstApev2Mux

struct GstApev2Mux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-aspectratiocrop.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-aspectratiocrop.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-aspectratiocrop.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-aspectratiocrop.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: aspectratiocrop +aspectratiocrop: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

aspectratiocrop

-

aspectratiocrop — Crops video into a user-defined aspect-ratio

+

aspectratiocrop

@@ -177,19 +177,16 @@ -

-

Functions

+

Types and Values

struct GstAspectRatioCrop

struct GstAspectRatioCrop;
-

-

@@ -207,7 +204,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audioamplify +audioamplify: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

audioamplify

-

audioamplify — Amplifies an audio stream by a given factor

+

audioamplify

@@ -93,8 +93,8 @@ 2 3
gst-launch-1.0 audiotestsrc wave=saw ! audioamplify amplification=1.5 ! alsasink
-gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioamplify amplification=1.5 method=wrap-negative ! alsasink
-gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioamplify amplification=1.5 method=wrap-positive ! audioconvert ! alsasink
+gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioamplify amplification=1.5 clipping-method=wrap-negative ! alsasink +gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioamplify amplification=1.5 clipping-method=wrap-positive ! audioconvert ! alsasink @@ -181,19 +181,16 @@ -

-

Functions

+

Types and Values

struct GstAudioAmplify

struct GstAudioAmplify;
-

-

@@ -218,7 +215,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiochebband +audiochebband: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

audiochebband

-

audiochebband — Chebyshev band pass and band reject filter

+

audiochebband

@@ -215,19 +215,16 @@ -

-

Functions

+

Types and Values

struct GstAudioChebBand

struct GstAudioChebBand;
-

-

@@ -287,7 +284,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiocheblimit.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiocheblimit.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiocheblimit.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiocheblimit.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiocheblimit +audiocheblimit: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

audiocheblimit

-

audiocheblimit — Chebyshev low pass and high pass filter

+

audiocheblimit

@@ -210,19 +210,16 @@
-

-

Functions

+

Types and Values

struct GstAudioChebLimit

struct GstAudioChebLimit;
-

-

@@ -273,7 +270,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiodynamic +audiodynamic: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

audiodynamic

-

audiodynamic — Compressor and Expander

+

audiodynamic

@@ -96,7 +96,7 @@ a expander does the same for all samples below a specific threshold. If soft-knee mode is selected the ratio is applied smoothly.

-

Example launch line

+

Example launch line

@@ -104,8 +104,8 @@ - @@ -116,7 +116,7 @@

Synopsis

-

Element Information

+

Element Information

1
 2
 3
gst-launch-1.0 audiotestsrc wave=saw ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.5 rate=0.5 ! alsasink
-gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiodynamic characteristics=hard-knee mode=expander threshold=0.2 rate=4.0 ! alsasink
+        
gst-launch-1.0 audiotestsrc wave=saw ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.5 ratio=0.5 ! alsasink
+gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiodynamic characteristics=hard-knee mode=expander threshold=0.2 ratio=4.0 ! alsasink
 gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audiodynamic ! audioconvert ! alsasink
@@ -142,7 +142,7 @@
-

Element Pads

+

Element Pads

@@ -193,19 +193,16 @@
-

-

Functions

+

Types and Values

struct GstAudioDynamic

struct GstAudioDynamic;
-

-

@@ -246,7 +243,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioecho.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioecho.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioecho.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioecho.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audioecho +audioecho: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

audioecho

-

audioecho — Adds an echo or reverb effect to an audio stream

+

audioecho

@@ -100,14 +100,14 @@ will be used. This can only be set before going to the PAUSED or PLAYING state and will be set to the current delay by default.

-

Example launch line

+

Example launch line

- @@ -118,7 +118,7 @@

Synopsis

-

Element Information

+

Element Information

1
 2
gst-launch-1.0 filesrc location="melo1.ogg" ! audioconvert ! audioecho delay=500000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink
+        
gst-launch-1.0 autoaudiosrc ! audioconvert ! audioecho delay=500000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink
 gst-launch-1.0 filesrc location="melo1.ogg" ! decodebin ! audioconvert ! audioecho delay=50000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink
@@ -144,7 +144,7 @@
-

Element Pads

+

Element Pads

@@ -195,19 +195,16 @@
-

-

Functions

+

Types and Values

struct GstAudioEcho

struct GstAudioEcho;
-

-

@@ -250,7 +247,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiofirfilter.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiofirfilter.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiofirfilter.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiofirfilter.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiofirfilter +audiofirfilter: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -22,7 +22,7 @@ Home Up -Prev +Prev Next
@@ -30,7 +30,7 @@

audiofirfilter

-

audiofirfilter — Generic audio FIR filter with custom filter kernel

+

audiofirfilter

@@ -68,7 +68,7 @@ void rate-changed -Run Last +Run Last
@@ -112,7 +112,7 @@ "rate-changed" signal can be used. This should be done for most FIR filters as they're depending on the sampling rate.

-

Example application

+

Example application

@@ -456,7 +456,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -482,7 +482,7 @@
-

Element Pads

+

Element Pads

@@ -533,11 +533,10 @@
-

-

Functions

+

Types and Values

@@ -576,7 +575,7 @@ will be called from the streaming thread and processing will stop until the event is handled.

-

Parameters

+

Parameters

@@ -602,12 +601,11 @@
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioiirfilter.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioiirfilter.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioiirfilter.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioiirfilter.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audioiirfilter +audioiirfilter: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -23,14 +23,14 @@ Home Up Prev -Next +Next

audioiirfilter

-

audioiirfilter — Generic audio IIR filter with custom filter kernel

+

audioiirfilter

@@ -69,7 +69,7 @@ void rate-changed -Run Last +Run Last
@@ -109,7 +109,7 @@ "rate-changed" signal can be used. This should be done for most IIR filters as they're depending on the sampling rate.

-

Example application

+

Example application

@@ -405,7 +405,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -431,7 +431,7 @@
-

Element Pads

+

Element Pads

@@ -482,11 +482,10 @@
-

-

Functions

+

Types and Values

@@ -524,7 +523,7 @@ will be called from the streaming thread and processing will stop until the event is handled.

-

Parameters

+

Parameters

@@ -550,12 +549,11 @@
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioinvert.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioinvert.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audioinvert.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audioinvert.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audioinvert +audioinvert: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

audioinvert

-

audioinvert — Swaps upper and lower half of audio samples

+

audioinvert

@@ -78,7 +78,7 @@ the original with a slight delay can produce effects that sound like resonance. Creating a stereo sample from a mono source, with one channel inverted produces wide-stereo sounds.

-

Example launch line

+

Example launch line

@@ -86,9 +86,9 @@ - +
1
 2
 3
gst-launch-1.0 audiotestsrc wave=saw ! audioinvert invert=0.4 ! alsasink
-gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioinvert invert=0.4 ! alsasink
-gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioinvert invert=0.4 ! audioconvert ! alsasink
gst-launch-1.0 audiotestsrc wave=saw ! audioinvert degree=0.4 ! alsasink
+gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioinvert degree=0.4 ! alsasink
+gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioinvert degree=0.4 ! audioconvert ! alsasink
@@ -98,7 +98,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -124,7 +124,7 @@
-

Element Pads

+

Element Pads

@@ -175,19 +175,16 @@
-

-

Functions

+

Types and Values

struct GstAudioInvert

struct GstAudioInvert;
-

-

@@ -203,7 +200,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiokaraoke.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiokaraoke.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiokaraoke.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiokaraoke.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiokaraoke +audiokaraoke: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

audiokaraoke

-

audiokaraoke — Removes voice from sound

+

audiokaraoke

@@ -94,7 +94,7 @@

Remove the voice from audio by filtering the center channel. This plugin is useful for karaoke applications.

-

Example launch line

+

Example launch line

@@ -110,7 +110,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -136,7 +136,7 @@
-

Element Pads

+

Element Pads

@@ -187,19 +187,16 @@
-

-

Functions

+

Types and Values

struct GstAudioKaraoke

struct GstAudioKaraoke;
-

-

@@ -242,7 +239,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiopanorama.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiopanorama.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiopanorama.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiopanorama.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiopanorama +audiopanorama: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

audiopanorama

-

audiopanorama — Positions audio streams in the stereo panorama

+

audiopanorama

@@ -83,7 +83,7 @@

Stereo panorama effect with controllable pan position. One can choose between the default psychoacoustic panning method, which keeps the same perceived loudness, and a simple panning method that just controls the volume on one channel.

-

Example launch line

+

Example launch line

@@ -105,7 +105,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -131,7 +131,7 @@
-

Element Pads

+

Element Pads

@@ -182,19 +182,16 @@
-

-

Functions

+

Types and Values

struct GstAudioPanorama

struct GstAudioPanorama;
-

-

@@ -220,7 +217,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiowsincband.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiowsincband.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiowsincband.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiowsincband.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiowsincband +audiowsincband: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -21,7 +21,7 @@ Home Up -Prev +Prev Next
@@ -29,7 +29,7 @@

audiowsincband

-

audiowsincband — Band pass and band reject windowed sinc filter

+

audiowsincband

@@ -105,7 +105,7 @@ a much better rolloff when using a larger kernel size and almost linear phase. The only disadvantage is the much slower execution time with larger kernels.

-

Example launch line

+

Example launch line

@@ -113,7 +113,7 @@ - @@ -125,7 +125,7 @@

Synopsis

-

Element Information

+

Element Information

1
 2
 3
gst-launch-1.0 audiotestsrc freq=1500 ! audioconvert ! audiosincband mode=band-pass lower-frequency=3000 upper-frequency=10000 length=501 window=blackman ! audioconvert ! alsasink
+        
gst-launch-1.0 audiotestsrc freq=1500 ! audioconvert ! audiowsincband mode=band-pass lower-frequency=3000 upper-frequency=10000 length=501 window=blackman ! audioconvert ! alsasink
 gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiowsincband mode=band-reject lower-frequency=59 upper-frequency=61 length=10001 window=hamming ! audioconvert ! alsasink
 gst-launch-1.0 audiotestsrc wave=white-noise ! audioconvert ! audiowsincband mode=band-pass lower-frequency=1000 upper-frequency=2000 length=31 ! audioconvert ! alsasink
@@ -151,7 +151,7 @@
-

Element Pads

+

Element Pads

@@ -202,11 +202,10 @@
-

-

Functions

+

Types and Values

@@ -263,7 +262,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiowsinclimit.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiowsinclimit.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-audiowsinclimit.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-audiowsinclimit.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiowsinclimit +audiowsinclimit: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

audiowsinclimit

-

audiowsinclimit — Low pass and high pass windowed sinc filter

+

audiowsinclimit

@@ -43,11 +43,6 @@ -gdouble -frequency -Read / Write - - gint length Read / Write @@ -105,7 +100,7 @@ a much better rolloff when using a larger kernel size and almost linear phase. The only disadvantage is the much slower execution time with larger kernels.

-

Example launch line

+

Example launch line

@@ -125,7 +120,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -151,7 +146,7 @@
-

Element Pads

+

Element Pads

@@ -202,11 +197,10 @@
-

-

Functions

+

Types and Values

@@ -219,15 +213,6 @@

Property Details

-

The “frequency” property

-
  “frequency”                gdouble
-

Cut-off Frequency (Hz).

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 0

-
-
-

The “length” property

  “length”                   gint

Filter kernel length, will be rounded to the next odd number.

@@ -263,7 +248,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-auparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-auparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-auparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-auparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: auparse +auparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

auparse

-

auparse — Parse an .au file into raw audio

+

auparse

@@ -60,7 +60,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -86,7 +86,7 @@
-

Element Pads

+

Element Pads

@@ -153,24 +153,20 @@
-

-

Functions

+

Types and Values

struct GstAuParse

struct GstAuParse;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autoaudiosink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autoaudiosink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autoaudiosink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autoaudiosink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: autoaudiosink +autoaudiosink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

autoaudiosink

-

autoaudiosink — Wrapper audio sink for automatically detected audio sink

+

autoaudiosink

@@ -44,12 +44,6 @@ - -GstCaps * -filter-caps -Read / Write - - gint64 ts-offset Read / Write @@ -168,31 +162,21 @@ -

-

Functions

+

Types and Values

GstAutoAudioSink

typedef struct _GstAutoAudioSink GstAutoAudioSink;
-

-

Property Details

-

The “filter-caps” property

-
  “filter-caps”              GstCaps *
-

Filter sink candidates using these caps.

-

Flags: Read / Write

-
-
-

The “ts-offset” property

  “ts-offset”                gint64

Timestamp offset in nanoseconds.

@@ -214,7 +198,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autoaudiosrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autoaudiosrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autoaudiosrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autoaudiosrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: autoaudiosrc +autoaudiosrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -17,8 +17,7 @@ Top  |  Description  |  Object Hierarchy  |  - Implemented Interfaces  |  - Properties + Implemented Interfaces Home Up @@ -30,26 +29,10 @@

autoaudiosrc

-

autoaudiosrc — Wrapper audio source for automatically detected audio source

+

autoaudiosrc

-
-

Properties

-
----- - - - - - -
-GstCaps *filter-capsRead / Write
-

Types and Values

@@ -87,7 +70,7 @@ that have Source and Audio in the class field of their element information, and also have a non-zero autoplugging rank.

-

Example launch line

+

Example launch line

@@ -103,7 +86,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -129,7 +112,7 @@
-

Element Pads

+

Element Pads

@@ -156,28 +139,16 @@
-

-

Functions

+

Types and Values

GstAutoAudioSrc

typedef struct _GstAutoAudioSrc GstAutoAudioSrc;
-

-

-
-
-
-

Property Details

-
-

The “filter-caps” property

-
  “filter-caps”              GstCaps *
-

Filter sink candidates using these caps.

-

Flags: Read / Write

@@ -186,7 +157,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autovideosink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autovideosink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autovideosink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autovideosink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: autovideosink +autovideosink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

autovideosink

-

autovideosink — Wrapper video sink for automatically detected video sink

+

autovideosink

@@ -44,12 +44,6 @@ - -GstCaps * -filter-caps -Read / Write - - gint64 ts-offset Read / Write @@ -168,31 +162,21 @@ -

-

Functions

+

Types and Values

GstAutoVideoSink

typedef struct _GstAutoVideoSink GstAutoVideoSink;
-

-

Property Details

-

The “filter-caps” property

-
  “filter-caps”              GstCaps *
-

Filter sink candidates using these caps.

-

Flags: Read / Write

-
-
-

The “ts-offset” property

  “ts-offset”                gint64

Timestamp offset in nanoseconds.

@@ -214,7 +198,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autovideosrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autovideosrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-autovideosrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-autovideosrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: autovideosrc +autovideosrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -17,8 +17,7 @@ Top  |  Description  |  Object Hierarchy  |  - Implemented Interfaces  |  - Properties + Implemented Interfaces Home Up @@ -30,26 +29,10 @@

autovideosrc

-

autovideosrc — Wrapper video source for automatically detected video source

+

autovideosrc

-
-

Properties

-
----- - - - - - -
-GstCaps *filter-capsRead / Write
-

Types and Values

@@ -87,7 +70,7 @@ that have Source and Video in the class field of their element information, and also have a non-zero autoplugging rank.

-

Example launch line

+

Example launch line

@@ -103,7 +86,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -129,7 +112,7 @@
-

Element Pads

+

Element Pads

@@ -156,28 +139,16 @@
-

-

Functions

+

Types and Values

GstAutoVideoSrc

typedef struct _GstAutoVideoSrc GstAutoVideoSrc;
-

-

-
-
-
-

Property Details

-
-

The “filter-caps” property

-
  “filter-caps”              GstCaps *
-

Filter src candidates using these caps.

-

Flags: Read / Write

@@ -186,7 +157,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-avidemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-avidemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-avidemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-avidemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: avidemux +avidemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

avidemux

-

avidemux — Demultiplex an avi file into audio and video

+

avidemux

@@ -664,24 +664,20 @@ -

-

Functions

+

Types and Values

GstAviDemux

typedef struct _GstAviDemux GstAviDemux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-avimux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-avimux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-avimux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-avimux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: avimux +avimux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

avimux

-

avimux — Muxes audio and video into an avi stream

+

avimux

@@ -148,7 +148,7 @@

author

-GStreamer maintainers <gstreamer-devel@lists.sourceforge.net> +GStreamer maintainers <gstreamer-devel@lists.freedesktop.org>

class

@@ -302,19 +302,16 @@ -

-

Functions

+

Types and Values

struct GstAviMux

struct GstAviMux;
-

-

@@ -329,7 +326,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-avisubtitle.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-avisubtitle.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-avisubtitle.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-avisubtitle.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: avisubtitle +avisubtitle: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

avisubtitle

-

avisubtitle — Parse avi subtitle stream

+

avisubtitle

@@ -150,24 +150,20 @@ -

-

Functions

+

Types and Values

struct GstAviSubtitle

struct GstAviSubtitle;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-cacasink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-cacasink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-cacasink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-cacasink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: cacasink +cacasink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

cacasink

-

cacasink — A colored ASCII art videosink

+

cacasink

@@ -146,19 +146,16 @@ -

-

Functions

+

Types and Values

struct GstCACASink

struct GstCACASink;
-

-

@@ -199,7 +196,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-cairooverlay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-cairooverlay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-cairooverlay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-cairooverlay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: cairooverlay +cairooverlay: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

cairooverlay

-

cairooverlay — Render overlay on a video stream using Cairo

+

cairooverlay

@@ -161,19 +161,16 @@ -

-

Functions

+

Types and Values

struct GstCairoOverlay

struct GstCairoOverlay;
-

-

@@ -184,30 +181,6 @@ user_function (GstCairoOverlay *gstcairooverlay, GstCaps *arg1, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstcairooverlay

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-

@@ -218,35 +191,10 @@ guint64 arg2, guint64 arg3, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstcairooverlay

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-capssetter.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-capssetter.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-capssetter.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-capssetter.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: capssetter +capssetter: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

capssetter

-

capssetter — Set/merge caps on stream

+

capssetter

@@ -104,7 +104,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -130,7 +130,7 @@
-

Element Pads

+

Element Pads

@@ -181,19 +181,16 @@
-

-

Functions

+

Types and Values

struct GstCapsSetter

struct GstCapsSetter;
-

-

@@ -223,7 +220,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-cutter.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-cutter.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-cutter.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-cutter.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: cutter +cutter: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

cutter

-

cutter — Audio Cutter to split audio into non-silent bits

+

cutter

@@ -204,19 +204,16 @@ -

-

Functions

+

Types and Values

struct GstCutter

struct GstCutter;
-

-

@@ -263,7 +260,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dcaparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dcaparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dcaparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dcaparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dcaparse +dcaparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -85,7 +85,7 @@

plugin

- audioparsers + audioparsers @@ -156,11 +156,10 @@ -

-

Functions

+

Types and Values

@@ -176,7 +175,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-deinterlace.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-deinterlace.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-deinterlace.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-deinterlace.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: deinterlace +deinterlace: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

deinterlace

-

deinterlace — Deinterlace Methods ported from DScaler/TvTime

+

deinterlace

@@ -120,7 +120,7 @@
1
-
gst-launch-1.0 -v filesrc location=/path/to/file ! decodebin2 ! videoconvert ! deinterlace ! videoconvert ! autovideosink
+
gst-launch-1.0 -v filesrc location=/path/to/file ! decodebin ! videoconvert ! deinterlace ! videoconvert ! autovideosink
@@ -181,7 +181,7 @@

- video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] + video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] @@ -209,25 +209,22 @@

- video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] + video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] -

-

Functions

+

Types and Values

struct GstDeinterlace

struct GstDeinterlace;
-

-

@@ -344,7 +341,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-deinterleave.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-deinterleave.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-deinterleave.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-deinterleave.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: deinterleave +deinterleave: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

deinterleave

-

deinterleave — Splits one interleaved multichannel audio stream into many mono audio streams

+

deinterleave

@@ -187,19 +187,16 @@ -

-

Functions

+

Types and Values

struct GstDeinterleave

struct GstDeinterleave;
-

-

@@ -221,7 +218,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dicetv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dicetv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dicetv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dicetv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dicetv +dicetv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -17,8 +17,7 @@ Top  |  Description  |  Object Hierarchy  |  - Properties  |  - Signals + Properties Home Up @@ -30,7 +29,7 @@

dicetv

-

dicetv — 'Dices' the screen up into many small squares

+

dicetv

@@ -49,21 +48,6 @@ -
-

Signals

-
----- - - - - - -
voidresetAction
-

Types and Values

@@ -97,7 +81,7 @@ counterclockwise). The direction of each square normally remains consistent between each frame.

-

Example launch line

+

Example launch line

@@ -113,7 +97,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -139,7 +123,7 @@
-

Element Pads

+

Element Pads

@@ -190,19 +174,16 @@
-

-

Functions

+

Types and Values

struct GstDiceTV

struct GstDiceTV;
-

-

@@ -216,43 +197,8 @@

Default value: 4

-
-

Signal Details

-
-

The “reset” signal

-
void
-user_function (GstDiceTV *gstdicetv,
-               gpointer   user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstdicetv

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Action

-
-
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-directsoundsink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-directsoundsink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-directsoundsink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-directsoundsink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: directsoundsink +directsoundsink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -27,7 +27,7 @@

directsoundsink

-

directsoundsink — DirectSound audio sink

+

directsoundsink

@@ -78,11 +78,10 @@

Element Pads

-

-

Functions

+

Types and Values

@@ -109,6 +108,9 @@ /* current volume setup by mixer interface */ glong volume; gboolean mute; + + /* current directsound device ID */ + gchar * device_id; GstCaps *cached_caps; /* lock used to protect writes and resets */ @@ -119,13 +121,10 @@ GstAudioRingBufferFormatType type; }; -

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dtmfsrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dtmfsrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dtmfsrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dtmfsrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dtmfsrc +dtmfsrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

dtmfsrc

-

dtmfsrc — Generates DTMF tones

+

dtmfsrc

@@ -157,7 +157,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -183,7 +183,7 @@
-

Element Pads

+

Element Pads

@@ -210,11 +210,10 @@
-

-

Functions

+

Types and Values

@@ -252,7 +251,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dv1394src.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dv1394src.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dv1394src.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dv1394src.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dv1394src +dv1394src: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -31,7 +31,7 @@

dv1394src

-

dv1394src — Source for DV video data from firewire port

+

dv1394src

@@ -99,7 +99,7 @@ void frame-dropped -Run Last +Run Last @@ -131,7 +131,7 @@

Implemented Interfaces

GstDV1394Src implements - GstURIHandler and GstPropertyProbe.

+ GstURIHandler and GstPropertyProbe.

Description

@@ -191,19 +191,16 @@
-

-

Functions

+

Types and Values

struct GstDV1394Src

struct GstDV1394Src;
-

-

@@ -283,36 +280,11 @@
void
 user_function (GstDV1394Src *gstdv1394src,
                gpointer      user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstdv1394src

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dvdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dvdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dvdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dvdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dvdec +dvdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

dvdec

-

dvdec — Uses libdv to decode DV video (smpte314) (libdv.sourceforge.net)

+

dvdec

@@ -169,19 +169,16 @@ -

-

Functions

+

Types and Values

struct GstDVDec

struct GstDVDec;
-

-

@@ -221,7 +218,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dvdemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dvdemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-dvdemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-dvdemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dvdemux +dvdemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

dvdemux

-

dvdemux — Uses libdv to separate DV audio from DV video (libdv.sourceforge.net)

+

dvdemux

@@ -160,24 +160,20 @@ -

-

Functions

+

Types and Values

struct GstDVDemux

struct GstDVDemux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-edgetv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-edgetv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-edgetv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-edgetv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: edgetv +edgetv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

edgetv

-

edgetv — Apply edge detect on video

+

edgetv

@@ -154,24 +154,20 @@ -

-

Functions

+

Types and Values

struct GstEdgeTV

struct GstEdgeTV;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-equalizer-10bands.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-equalizer-10bands.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-equalizer-10bands.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-equalizer-10bands.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: equalizer-10bands +equalizer-10bands: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

equalizer-10bands

-

equalizer-10bands — Direct Form 10 band IIR equalizer

+

equalizer-10bands

@@ -225,19 +225,16 @@ -

-

Functions

+

Types and Values

struct GstIirEqualizer10Bands

struct GstIirEqualizer10Bands;
-

-

@@ -334,7 +331,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-equalizer-3bands.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-equalizer-3bands.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-equalizer-3bands.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-equalizer-3bands.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: equalizer-3bands +equalizer-3bands: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

equalizer-3bands

-

equalizer-3bands — Direct Form 3 band IIR equalizer

+

equalizer-3bands

@@ -190,19 +190,16 @@ -

-

Functions

+

Types and Values

struct GstIirEqualizer3Bands

struct GstIirEqualizer3Bands;
-

-

@@ -236,7 +233,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-equalizer-nbands.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-equalizer-nbands.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-equalizer-nbands.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-equalizer-nbands.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: equalizer-nbands +equalizer-nbands: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

equalizer-nbands

-

equalizer-nbands — Direct Form IIR equalizer

+

equalizer-nbands

@@ -268,19 +268,16 @@ -

-

Functions

+

Types and Values

struct GstIirEqualizerNBands

struct GstIirEqualizerNBands;
-

-

@@ -296,7 +293,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flacdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flacdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flacdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flacdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flacdec +flacdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

flacdec

-

flacdec — Decodes FLAC lossless audio streams

+

flacdec

@@ -60,7 +60,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -86,7 +86,7 @@
-

Element Pads

+

Element Pads

@@ -137,24 +137,20 @@
-

-

Functions

+

Types and Values

struct GstFlacDec

struct GstFlacDec;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flacenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flacenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flacenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flacenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flacenc +flacenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

flacenc

-

flacenc — Encodes audio with the FLAC lossless audio encoder

+

flacenc

@@ -155,7 +155,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -181,7 +181,7 @@
-

Element Pads

+

Element Pads

@@ -202,7 +202,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

details

audio/x-raw, format=(string){ S24LE, S24_32LE, S16LE, S8 }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)[ 1, 8 ]audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)1

audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003

audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)3, channel-mask=(bitmask)0x0000000000000007

audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)4, channel-mask=(bitmask)0x0000000000000033

audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)5, channel-mask=(bitmask)0x0000000000000037

audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)6, channel-mask=(bitmask)0x000000000000003f

audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)7, channel-mask=(bitmask)0x000000000000013f

audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f
@@ -232,19 +260,16 @@
-

-

Functions

+

Types and Values

struct GstFlacEnc

struct GstFlacEnc;
-

-

@@ -378,7 +403,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flacparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flacparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flacparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flacparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flacparse +flacparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

flacparse

-

flacparse — Parses audio with the FLAC lossless audio codec

+

flacparse

@@ -84,7 +84,7 @@ which allows you to (for example) remux an ogg/flac or convert a native FLAC format file to an ogg bitstream.

-

Example pipelines

+

Example pipelines

@@ -104,7 +104,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -114,7 +114,7 @@ @@ -130,7 +130,7 @@
-

Element Pads

+

Element Pads

plugin

- audioparsers + audioparsers
@@ -181,19 +181,16 @@
-

-

Functions

+

Types and Values

struct GstFlacParse

struct GstFlacParse;
-

-

@@ -212,7 +209,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flactag.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flactag.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flactag.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flactag.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flactag +flactag: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

flactag

-

flactag — Rewrite tags in a FLAC file

+

flactag

@@ -66,7 +66,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -92,7 +92,7 @@
-

Element Pads

+

Element Pads

@@ -143,24 +143,20 @@
-

-

Functions

+

Types and Values

struct GstFlacTag

struct GstFlacTag;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flvdemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flvdemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flvdemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flvdemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flvdemux +flvdemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

flvdemux

-

flvdemux — Demux FLV feeds into digital streams

+

flvdemux

@@ -58,7 +58,7 @@

Description

flvdemux demuxes an FLV file into the different contained streams.

-

Example launch line

+

Example launch line

@@ -74,7 +74,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -100,7 +100,7 @@
-

Element Pads

+

Element Pads

@@ -219,24 +219,20 @@
-

-

Functions

+

Types and Values

struct GstFlvDemux

struct GstFlvDemux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flvmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flvmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flvmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flvmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flvmux +flvmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

flvmux

-

flvmux — Muxes video/audio streams into a FLV stream

+

flvmux

@@ -42,18 +42,11 @@ - - -gboolean -is-live -Read / Write - - + gboolean streamable Read / Write - - +
@@ -88,7 +81,7 @@

Description

flvmux muxes different streams into an FLV file.

-

Example launch line

+

Example launch line

@@ -104,7 +97,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -130,7 +123,7 @@
-

Element Pads

+

Element Pads

@@ -249,32 +242,21 @@
-

-

Functions

+

Types and Values

GstFlvMux

typedef struct _GstFlvMux GstFlvMux;
-

-

Property Details

-

The “is-live” property

-
  “is-live”                  gboolean
-

The stream is live and does not need an index.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-

The “streamable” property

  “streamable”               gboolean

If True, the output will be streaming friendly. (ie without indexes and @@ -285,7 +267,6 @@

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flxdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flxdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-flxdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-flxdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flxdec +flxdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

flxdec

-

flxdec — FLC/FLI/FLX video decoder

+

flxdec

@@ -60,7 +60,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -86,7 +86,7 @@
-

Element Pads

+

Element Pads

@@ -137,24 +137,20 @@
-

-

Functions

+

Types and Values

struct GstFlxDec

struct GstFlxDec;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-gamma.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-gamma.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-gamma.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-gamma.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: gamma +gamma: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

gamma

-

gamma — Adjusts gamma on a video stream

+

gamma

@@ -76,7 +76,7 @@

Description

Performs gamma correction on a video stream.

-

Example launch line

+

Example launch line

@@ -103,7 +103,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -129,7 +129,7 @@
-

Element Pads

+

Element Pads

@@ -180,11 +180,10 @@
-

-

Functions

+

Types and Values

@@ -207,7 +206,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: gdkpixbufsink +gdkpixbufsink: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

gdkpixbufsink

-

gdkpixbufsink — Output images as GdkPixbuf objects in bus messages

+

gdkpixbufsink

@@ -44,17 +44,12 @@ -GdkPixbuf * +GdkPixbuf * last-pixbuf Read gboolean -send-messages -Read / Write - - -gboolean post-messages Read / Write @@ -90,7 +85,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -116,7 +111,7 @@
-

Element Pads

+

Element Pads

@@ -147,39 +142,28 @@
-

-

Functions

+

Types and Values

struct GstGdkPixbufSink

struct GstGdkPixbufSink;
-

-

Property Details

The “last-pixbuf” property

-
  “last-pixbuf”              GdkPixbuf *
+
  “last-pixbuf”              GdkPixbuf *

Last GdkPixbuf object rendered.

Flags: Read


-

The “send-messages” property

-
  “send-messages”            gboolean
-

Whether to post messages containing pixbufs on the bus (deprecated, use post-messages).

-

Flags: Read / Write

-

Default value: TRUE

-
-
-

The “post-messages” property

  “post-messages”            gboolean

Whether to post messages containing pixbufs on the bus.

@@ -189,7 +173,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: goom2k1 +goom2k1: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -20,19 +20,19 @@ Home Up -Prev -Next +Prev +Next

goom2k1

-

goom2k1 — Takes frames of data and outputs video frames using the GOOM 2k1 filter

+

goom2k1

-
+

Types and Values

@@ -41,7 +41,7 @@ - +
structGstGoomGstGoom2k1
@@ -51,7 +51,8 @@ ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement - ╰── GstGoom + ╰── GstAudioVisualizer-ExtGoom2k1 + ╰── GstGoom2k1
@@ -157,19 +158,16 @@
-

-

Functions

+

Types and Values

-

struct GstGoom

-
struct GstGoom;
-

-

+

struct GstGoom2k1

+
struct GstGoom2k1;
@@ -178,7 +176,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-goom.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-goom.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-goom.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-goom.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: goom +goom: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -20,15 +20,15 @@ Home Up -Prev -Next +Prev +Next

goom

-

goom — Takes frames of data and outputs video frames using the GOOM filter

+

goom

@@ -51,7 +51,8 @@ ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement - ╰── GstGoom + ╰── GstAudioVisualizer-ExtGoom + ╰── GstGoom
@@ -59,7 +60,7 @@

Goom is an audio visualisation element. It creates warping structures based on the incoming audio signal.

-

Example launch line

+

Example launch line

@@ -75,7 +76,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -101,7 +102,7 @@
-

Element Pads

+

Element Pads

@@ -156,19 +157,16 @@
-

-

Functions

+

Types and Values

struct GstGoom

struct GstGoom;
-

-

@@ -177,7 +175,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-GstVideoMixerPad.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-GstVideoMixerPad.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-GstVideoMixerPad.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-GstVideoMixerPad.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,12 +2,12 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: GstVideoMixerPad +GstVideoMixerPad: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -32,18 +32,16 @@

Description

-

-

Functions

+

Types and Values

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-hdv1394src.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-hdv1394src.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-hdv1394src.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-hdv1394src.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: hdv1394src +hdv1394src: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -22,7 +22,7 @@ Home Up -Prev +Prev Next
@@ -30,7 +30,7 @@

hdv1394src

-

hdv1394src — Source for MPEG-TS video data from firewire port

+

hdv1394src

@@ -100,14 +100,14 @@

Implemented Interfaces

GstHDV1394Src implements - GstURIHandler and GstPropertyProbe.

+ GstURIHandler and GstPropertyProbe.

Description

Synopsis

-

Element Information

+

Element Information

@@ -133,7 +133,7 @@
-

Element Pads

+

Element Pads

@@ -160,19 +160,16 @@
-

-

Functions

+

Types and Values

struct GstHDV1394Src

struct GstHDV1394Src;
-

-

@@ -221,7 +218,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-icydemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-icydemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-icydemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-icydemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: icydemux +icydemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

icydemux

-

icydemux — Read and output ICY tags while demuxing the contents

+

icydemux

@@ -62,7 +62,7 @@ detected using typefind functions, and the appropriate output mime type set on outgoing buffers.

-

Example launch line

+

Example launch line

@@ -81,7 +81,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -107,7 +107,7 @@
-

Element Pads

+

Element Pads

@@ -158,24 +158,20 @@
-

-

Functions

+

Types and Values

struct GstICYDemux

struct GstICYDemux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-id3demux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-id3demux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-id3demux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-id3demux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: id3demux +id3demux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

id3demux

-

id3demux — Read and output ID3v1 and ID3v2 tags while demuxing the contents

+

id3demux

@@ -85,7 +85,7 @@

This id3demux element replaced an older element with the same name which relied on libid3tag from the MAD project.

-

Example launch line

+

Example launch line

@@ -103,7 +103,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -129,7 +129,7 @@
-

Element Pads

+

Element Pads

@@ -180,19 +180,16 @@
-

-

Functions

+

Types and Values

struct GstID3Demux

struct GstID3Demux;
-

-

@@ -207,7 +204,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-id3v2mux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-id3v2mux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-id3v2mux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-id3v2mux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: id3v2mux +id3v2mux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

id3v2mux

-

id3v2mux — Adds an ID3v2 header to the beginning of MP3 files using taglib

+

id3v2mux

@@ -67,7 +67,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -93,7 +93,7 @@
-

Element Pads

+

Element Pads

@@ -144,24 +144,20 @@
-

-

Functions

+

Types and Values

struct GstId3v2Mux

struct GstId3v2Mux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-imagefreeze.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-imagefreeze.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-imagefreeze.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-imagefreeze.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: imagefreeze +imagefreeze: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

imagefreeze

-

imagefreeze — Generates a still frame stream from an image

+

imagefreeze

@@ -60,13 +60,13 @@ the input. It duplicates the first frame with the framerate requested by downstream, allows seeking and answers queries.

-

Example launch line

+

Example launch line

- +
1
gst-launch-1.0 -v filesrc location=some.png ! decodebin2 ! imagefreeze ! autovideosink
gst-launch-1.0 -v filesrc location=some.png ! decodebin ! imagefreeze ! autovideosink
@@ -76,7 +76,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -102,7 +102,7 @@
-

Element Pads

+

Element Pads

@@ -153,24 +153,20 @@
-

-

Functions

+

Types and Values

struct GstImageFreeze

struct GstImageFreeze;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-interleave.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-interleave.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-interleave.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-interleave.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: interleave +interleave: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

interleave

-

interleave — Folds many mono channels into one interleaved audio stream

+

interleave

@@ -89,7 +89,7 @@ caps is _not_ supported yet.

The channel number of every sinkpad in the out can be retrieved from the "channel" property of the pad.

-

Example launch line

+

Example launch line

@@ -118,7 +118,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -144,7 +144,7 @@
-

Element Pads

+

Element Pads

@@ -195,19 +195,16 @@
-

-

Functions

+

Types and Values

struct GstInterleave

struct GstInterleave;
-

-

@@ -243,7 +240,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-ismlmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-ismlmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-ismlmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-ismlmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: ismlmux +ismlmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -23,7 +23,7 @@ Home Up Prev -Next +Next
@@ -90,6 +90,26 @@ trak-timescale Read / Write / Construct + +guint +reserved-bytes-per-sec +Read / Write / Construct + + +guint64 +reserved-duration-remaining +Read + + +guint64 +reserved-max-duration +Read / Write + + +guint64 +reserved-moov-update-period +Read / Write +
@@ -151,7 +171,7 @@ “streamable” allows foregoing to add index metadata (at the end of file).

-

Example pipelines

+

Example pipelines

@@ -170,7 +190,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -196,7 +216,7 @@
-

Element Pads

+

Element Pads

@@ -245,15 +265,15 @@ - + - + - +

details

video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
@@ -283,19 +303,16 @@
-

-

Functions

+

Types and Values

GstISMLMux

typedef struct _GstISMLMux GstISMLMux;
-

-

@@ -303,7 +320,7 @@

The “dts-method” property

  “dts-method”               GstQTMuxDtsMethods
-

(DEPRECATED) Method to determine DTS time.

+

Method to determine DTS time (DEPRECATED).

Flags: Read / Write / Construct

Default value: reorder

@@ -346,7 +363,7 @@

Timescale to use in the movie (units per second).

Flags: Read / Write / Construct

Allowed values: >= 1

-

Default value: 1000

+

Default value: 1800


@@ -372,10 +389,42 @@

Flags: Read / Write / Construct

Default value: 0

+
+
+

The “reserved-bytes-per-sec” property

+
  “reserved-bytes-per-sec”   guint
+

Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track.

+

Flags: Read / Write / Construct

+

Allowed values: <= 10000

+

Default value: 550

+
+
+

The “reserved-duration-remaining” property

+
  “reserved-duration-remaining” guint64
+

Reports the approximate amount of remaining moov header space reserved using reserved-max-duration.

+

Flags: Read

+

Default value: 0

- +
+

The “reserved-max-duration” property

+
  “reserved-max-duration”    guint64
+

When set to a value > 0, reserves space for index tables at the beginning of the file.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+
+
+

The “reserved-moov-update-period” property

+
  “reserved-moov-update-period” guint64
+

When used with reserved-max-duration, periodically updates the index tables with information muxed so far.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jackaudiosink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jackaudiosink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jackaudiosink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jackaudiosink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: jackaudiosink +jackaudiosink: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

jackaudiosink

-

jackaudiosink — Output audio to a JACK server

+

jackaudiosink

@@ -70,6 +70,12 @@ transport Read / Write + + +gchar * +port-pattern +Read / Write +
@@ -102,7 +108,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -128,7 +134,7 @@
-

Element Pads

+

Element Pads

@@ -155,19 +161,16 @@
-

-

Functions

+

Types and Values

struct GstJackAudioSink

struct GstJackAudioSink;
-

-

@@ -209,10 +212,17 @@

Jack transport behaviour of the client.

Flags: Read / Write

+
+
+

The “port-pattern” property

+
  “port-pattern”             gchar *
+

A pattern to select which ports to connect to (NULL = first physical ports).

+

Flags: Read / Write

+

Default value: NULL

+
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jackaudiosrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jackaudiosrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jackaudiosrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jackaudiosrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: jackaudiosrc +jackaudiosrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

jackaudiosrc

-

jackaudiosrc — Captures audio from a JACK server

+

jackaudiosrc

@@ -70,6 +70,12 @@ transport Read / Write + + +gchar * +port-pattern +Read / Write +
@@ -103,7 +109,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -129,7 +135,7 @@
-

Element Pads

+

Element Pads

@@ -156,19 +162,16 @@
-

-

Functions

+

Types and Values

struct GstJackAudioSrc

struct GstJackAudioSrc;
-

-

@@ -210,10 +213,17 @@

Jack transport behaviour of the client.

Flags: Read / Write

+
+
+

The “port-pattern” property

+
  “port-pattern”             gchar *
+

A pattern to select which ports to connect to (NULL = first physical ports).

+

Flags: Read / Write

+

Default value: NULL

+
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jpegdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jpegdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jpegdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jpegdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: jpegdec +jpegdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -21,7 +21,7 @@ Home Up -Prev +Prev Next
@@ -29,7 +29,7 @@

jpegdec

-

jpegdec — Decode images from JPEG format

+

jpegdec

@@ -83,7 +83,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -109,7 +109,7 @@
-

Element Pads

+

Element Pads

@@ -160,19 +160,16 @@
-

-

Functions

+

Types and Values

struct GstJpegDec

struct GstJpegDec;
-

-

@@ -196,7 +193,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jpegenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jpegenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-jpegenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-jpegenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: jpegenc +jpegenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -18,8 +18,7 @@ Description  |  Object Hierarchy  |  Implemented Interfaces  |  - Properties  |  - Signals + Properties Home Up @@ -31,7 +30,7 @@

jpegenc

-

jpegenc — Encode images in JPEG format

+

jpegenc

@@ -57,21 +56,6 @@ -
-

Signals

-
----- - - - - - -
voidframe-encodedRun Last
-

Types and Values

@@ -106,7 +90,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -132,7 +116,7 @@
-

Element Pads

+

Element Pads

@@ -153,7 +137,7 @@ - +

details

video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, Y41B, Y42B, YVYU, Y444, RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, Y41B, Y42B, YVYU, Y444, NV21, NV12, RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
@@ -183,19 +167,16 @@
-

-

Functions

+

Types and Values

struct GstJpegEnc

struct GstJpegEnc;
-

-

@@ -217,43 +198,8 @@

Default value: Faster, less accurate integer method

-
-

Signal Details

-
-

The “frame-encoded” signal

-
void
-user_function (GstJpegEnc *gstjpegenc,
-               gpointer    user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstjpegenc

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-level.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-level.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-level.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-level.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: level +level: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

level

-

level — RMS/Peak/Decaying Peak Level messager for audio/raw

+

level

@@ -148,7 +148,7 @@

-

Example application

+

Example application

@@ -442,7 +442,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -468,7 +468,7 @@
-

Element Pads

+

Element Pads

@@ -519,11 +519,10 @@
-

-

Functions

+

Types and Values

@@ -547,7 +546,7 @@

The “message” property

  “message”                  gboolean
-

Post a 'level' message for each passed interval (deprecated).

+

Post a 'level' message for each passed interval (deprecated, use the post-messages property instead).

Flags: Read / Write

Default value: TRUE

@@ -579,12 +578,11 @@

Flags: Read / Write

Default value: TRUE

-

Since 1.1.0

+

Since: 1.1.0

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-matroskademux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-matroskademux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-matroskademux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-matroskademux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: matroskademux +matroskademux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

matroskademux

-

matroskademux — Demuxes Matroska/WebM streams into video/audio/subtitles

+

matroskademux

@@ -74,7 +74,7 @@

Description

matroskademux demuxes a Matroska file into the different contained streams.

-

Example launch line

+

Example launch line

@@ -90,7 +90,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -105,7 +105,7 @@ - + @@ -116,7 +116,7 @@
-

Element Pads

+

Element Pads

author

GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>GStreamer maintainers <gstreamer-devel@lists.freedesktop.org>

class

@@ -259,19 +259,16 @@
-

-

Functions

+

Types and Values

GstMatroskaDemux

typedef struct _GstMatroskaDemux GstMatroskaDemux;
-

-

@@ -286,7 +283,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: matroskamux +matroskamux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

matroskamux

-

matroskamux — Muxes video/audio/subtitle streams into a matroska stream

+

matroskamux

@@ -75,8 +75,8 @@ -  -GstMatroskaMux +struct +GstMatroskaMux
@@ -100,7 +100,7 @@

Description

matroskamux muxes different input streams into a Matroska file.

-

Example launch line

+

Example launch line

@@ -127,7 +127,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -142,7 +142,7 @@ - + @@ -153,7 +153,7 @@
-

Element Pads

+

Element Pads

author

GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>GStreamer maintainers <gstreamer-devel@lists.freedesktop.org>

class

@@ -404,19 +404,16 @@
-

-

Functions

+

Types and Values

-

GstMatroskaMux

-
typedef struct _GstMatroskaMux GstMatroskaMux;
-

-

+

struct GstMatroskaMux

+
struct GstMatroskaMux;
@@ -457,7 +454,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: mj2mux +mj2mux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -22,7 +22,7 @@ Home Up -Prev +Prev Next
@@ -90,6 +90,26 @@ trak-timescale Read / Write / Construct + +guint +reserved-bytes-per-sec +Read / Write / Construct + + +guint64 +reserved-duration-remaining +Read + + +guint64 +reserved-max-duration +Read / Write + + +guint64 +reserved-moov-update-period +Read / Write +
@@ -151,7 +171,7 @@ “streamable” allows foregoing to add index metadata (at the end of file).

-

Example pipelines

+

Example pipelines

@@ -170,7 +190,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -196,7 +216,7 @@
-

Element Pads

+

Element Pads

@@ -245,11 +265,11 @@ - + - +

details

image/x-j2c, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]image/x-j2c, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

image/x-jpc, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] image/x-jpc, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
@@ -279,19 +299,16 @@
-

-

Functions

+

Types and Values

GstMJ2Mux

typedef struct _GstMJ2Mux GstMJ2Mux;
-

-

@@ -299,7 +316,7 @@

The “dts-method” property

  “dts-method”               GstQTMuxDtsMethods
-

(DEPRECATED) Method to determine DTS time.

+

Method to determine DTS time (DEPRECATED).

Flags: Read / Write / Construct

Default value: reorder

@@ -342,7 +359,7 @@

Timescale to use in the movie (units per second).

Flags: Read / Write / Construct

Allowed values: >= 1

-

Default value: 1000

+

Default value: 1800


@@ -368,10 +385,42 @@

Flags: Read / Write / Construct

Default value: 0

+
+
+

The “reserved-bytes-per-sec” property

+
  “reserved-bytes-per-sec”   guint
+

Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track.

+

Flags: Read / Write / Construct

+

Allowed values: <= 10000

+

Default value: 550

+
+
+

The “reserved-duration-remaining” property

+
  “reserved-duration-remaining” guint64
+

Reports the approximate amount of remaining moov header space reserved using reserved-max-duration.

+

Flags: Read

+

Default value: 0

- +
+

The “reserved-max-duration” property

+
  “reserved-max-duration”    guint64
+

When set to a value > 0, reserves space for index tables at the beginning of the file.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+
+
+

The “reserved-moov-update-period” property

+
  “reserved-moov-update-period” guint64
+

When used with reserved-max-duration, periodically updates the index tables with information muxed so far.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-monoscope.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-monoscope.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-monoscope.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-monoscope.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: monoscope +monoscope: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -20,14 +20,14 @@ Home Up Prev -Next +Next

monoscope

-

monoscope — Displays a highly stabilised waveform of audio input

+

monoscope

@@ -49,7 +49,7 @@

Monoscope is an audio visualisation element. It creates a coloured curve of the audio signal like on an oscilloscope.

-

Example launch line

+

Example launch line

@@ -65,7 +65,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -91,7 +91,7 @@
-

Element Pads

+

Element Pads

@@ -142,11 +142,10 @@
-

-

Functions

+

Types and Values

@@ -185,8 +184,6 @@ struct monoscope_state *visstate; }; -

-

@@ -195,7 +192,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: mp4mux +mp4mux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,8 +22,8 @@ Home Up -Prev -Next +Prev +Next
@@ -90,6 +90,26 @@ trak-timescale Read / Write / Construct + +guint +reserved-bytes-per-sec +Read / Write / Construct + + +guint64 +reserved-duration-remaining +Read + + +guint64 +reserved-max-duration +Read / Write + + +guint64 +reserved-moov-update-period +Read / Write +
@@ -151,7 +171,7 @@ “streamable” allows foregoing to add index metadata (at the end of file).

-

Example pipelines

+

Example pipelines

@@ -169,7 +189,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -195,7 +215,7 @@
-

Element Pads

+

Element Pads

@@ -224,6 +244,10 @@ + + + + @@ -272,19 +296,19 @@ - + - + - + - +

audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 1, 2147483647 ]

audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]

details

video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-mp4-part, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-mp4-part, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
@@ -314,19 +338,16 @@
-

-

Functions

+

Types and Values

GstMP4Mux

typedef struct _GstMP4Mux GstMP4Mux;
-

-

@@ -334,7 +355,7 @@

The “dts-method” property

  “dts-method”               GstQTMuxDtsMethods
-

(DEPRECATED) Method to determine DTS time.

+

Method to determine DTS time (DEPRECATED).

Flags: Read / Write / Construct

Default value: reorder

@@ -377,7 +398,7 @@

Timescale to use in the movie (units per second).

Flags: Read / Write / Construct

Allowed values: >= 1

-

Default value: 1000

+

Default value: 1800


@@ -403,10 +424,42 @@

Flags: Read / Write / Construct

Default value: 0

+
+
+

The “reserved-bytes-per-sec” property

+
  “reserved-bytes-per-sec”   guint
+

Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track.

+

Flags: Read / Write / Construct

+

Allowed values: <= 10000

+

Default value: 550

+
+
+

The “reserved-duration-remaining” property

+
  “reserved-duration-remaining” guint64
+

Reports the approximate amount of remaining moov header space reserved using reserved-max-duration.

+

Flags: Read

+

Default value: 0

- +
+

The “reserved-max-duration” property

+
  “reserved-max-duration”    guint64
+

When set to a value > 0, reserves space for index tables at the beginning of the file.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+
+
+

The “reserved-moov-update-period” property

+
  “reserved-moov-update-period” guint64
+

When used with reserved-max-duration, periodically updates the index tables with information muxed so far.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mpegaudioparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mpegaudioparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mpegaudioparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mpegaudioparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: mpegaudioparse +mpegaudioparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -20,8 +20,8 @@ Home Up -Prev -Next +Prev +Next
@@ -59,7 +59,7 @@

Description

Parses and frames mpeg1 audio streams. Provides seeking.

-

Example launch line

+

Example launch line

@@ -75,7 +75,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -85,7 +85,7 @@ @@ -101,7 +101,7 @@
-

Element Pads

+

Element Pads

plugin

- audioparsers + audioparsers
@@ -152,11 +152,10 @@
-

-

Functions

+

Types and Values

@@ -172,7 +171,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mulawdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mulawdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mulawdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mulawdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: mulawdec +mulawdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

mulawdec

-

mulawdec — Convert 8bit mu law to 16bit PCM

+

mulawdec

@@ -61,7 +61,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -87,7 +87,7 @@
-

Element Pads

+

Element Pads

@@ -138,24 +138,20 @@
-

-

Functions

+

Types and Values

struct GstMuLawDec

struct GstMuLawDec;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mulawenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mulawenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-mulawenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-mulawenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: mulawenc +mulawenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

mulawenc

-

mulawenc — Convert 16bit PCM to 8bit mu law

+

mulawenc

@@ -61,7 +61,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -87,7 +87,7 @@
-

Element Pads

+

Element Pads

@@ -138,24 +138,20 @@
-

-

Functions

+

Types and Values

struct GstMuLawEnc

struct GstMuLawEnc;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: multifilesink +multifilesink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

multifilesink

-

multifilesink — Write buffers to a sequentially named set of files

+

multifilesink

@@ -73,6 +73,16 @@ max-file-size Read / Write + +gboolean +aggregate-gops +Read / Write + + +guint64 +max-file-duration +Read / Write + @@ -108,6 +118,12 @@

Description

Write incoming data to a series of sequentially-named files.

+

This element is usually used with data where each buffer is an +independent unit of data in its own right (e.g. raw video buffers or +encoded JPEG or PNG images) or with streamable container formats such +as MPEG-TS or MPEG-PS.

+

It is not possible to use this element to create independently playable +mp4 files, use the splitmuxsink element for that instead.

The filename property should contain a string with a %d placeholder that will be substituted with the index for each filename.

If the “post-messages” property is TRUE, it sends an application @@ -158,7 +174,7 @@

-

Example launch line

+

Example launch line

@@ -176,7 +192,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -202,7 +218,7 @@
-

Element Pads

+

Element Pads

@@ -229,26 +245,23 @@
-

-

Functions

+

Types and Values

struct GstMultiFileSink

struct GstMultiFileSink;
-

-


enum GstMultiFileSinkNext

File splitting modes.

-

Members

+

Members

@@ -294,6 +307,14 @@ + + + + +
 

GST_MULTI_FILE_SINK_NEXT_MAX_DURATION

+

New file when the configured maximum duration + would be exceeded with the next buffer or buffer list

+
 
@@ -350,6 +371,27 @@

Flags: Read / Write

Default value: 2147483648

+
+
+

The “aggregate-gops” property

+
  “aggregate-gops”           gboolean
+

Whether to aggregate complete GOPs before doing any processing. Set this +to TRUE to make sure each new file starts with a keyframe. This requires +the upstream element to flag buffers containing key units and delta +units correctly. At least the MPEG-PS and MPEG-TS muxers should be doing +this.

+

Flags: Read / Write

+

Default value: FALSE

+

Since: 1.6

+
+
+
+

The “max-file-duration” property

+
  “max-file-duration”        guint64
+

Maximum file size before starting a new file in max-size mode.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+

See Also

@@ -357,7 +399,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multifilesrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multifilesrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multifilesrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multifilesrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: multifilesrc +multifilesrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

multifilesrc

-

multifilesrc — Read a sequentially named set of files into buffers

+

multifilesrc

@@ -110,7 +110,7 @@ on all buffers after the first one in accordance with the framerate.

File names are created by replacing "%d" with the index using printf().

-

Example launch line

+

Example launch line

@@ -131,7 +131,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -157,7 +157,7 @@
-

Element Pads

+

Element Pads

@@ -184,19 +184,16 @@
-

-

Functions

+

Types and Values

struct GstMultiFileSrc

struct GstMultiFileSrc;
-

-

@@ -257,7 +254,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multipartdemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multipartdemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multipartdemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multipartdemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: multipartdemux +multipartdemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

multipartdemux

-

multipartdemux — demux multipart streams

+

multipartdemux

@@ -43,11 +43,6 @@ -gboolean -autoscan -Read / Write - - gchar * boundary @@ -96,7 +91,7 @@ be configured specifically with the “boundary” property otherwise it will be autodetected.

-

Sample pipelines

+

Sample pipelines

@@ -113,7 +108,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -139,7 +134,7 @@
-

Element Pads

+

Element Pads

@@ -190,11 +185,10 @@
-

-

Functions

+

Types and Values

@@ -207,14 +201,6 @@

Property Details

-

The “autoscan” property

-
  “autoscan”                 gboolean
-

Try to autofind the prefix (deprecated unused, see boundary).

-

Flags: Read / Write

-

Default value: FALSE

-
-
-

The “boundary” property

  “boundary”                 gchar *

The boundary string separating data, automatic if NULL.

@@ -238,7 +224,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multipartmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multipartmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multipartmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multipartmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: multipartmux +multipartmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

multipartmux

-

multipartmux — mux multipart streams

+

multipartmux

@@ -77,7 +77,7 @@ incoming buffers when muxing them to a multipart stream. Most of the time multipart streams are sequential JPEG frames.

-

Sample pipelines

+

Sample pipelines

@@ -94,7 +94,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -120,7 +120,7 @@
-

Element Pads

+

Element Pads

@@ -171,11 +171,10 @@
-

-

Functions

+

Types and Values

@@ -197,7 +196,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multiudpsink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multiudpsink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-multiudpsink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-multiudpsink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: multiudpsink +multiudpsink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

multiudpsink

-

multiudpsink — Send data over the network via UDP to one or multiple recipients which can be added or removed at runtime using action signals

+

multiudpsink

@@ -61,21 +61,6 @@ gboolean -closefd -Read / Write - - -gint -sock -Read - - -gint -sockfd -Read / Write - - -gboolean auto-multicast Read / Write @@ -175,33 +160,33 @@ void add -Action +Action void clear -Action +Action void client-added -Run Last +Run Last void client-removed -Run Last +Run Last GstStructure* get-stats -Action +Action void remove -Action +Action @@ -238,7 +223,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -264,7 +249,7 @@
-

Element Pads

+

Element Pads

@@ -291,19 +276,16 @@
-

-

Functions

+

Types and Values

struct GstMultiUDPSink

struct GstMultiUDPSink;
-

-

@@ -333,32 +315,6 @@

-

The “closefd” property

-
  “closefd”                  gboolean
-

Close sockfd if passed as property on state change.

-

Flags: Read / Write

-

Default value: TRUE

-
-
-
-

The “sock” property

-
  “sock”                     gint
-

Socket currently in use for UDP sending. (-1 == no socket).

-

Flags: Read

-

Allowed values: >= G_MAXULONG

-

Default value: -1

-
-
-
-

The “sockfd” property

-
  “sockfd”                   gint
-

Socket to use for UDP sending. (-1 == allocate).

-

Flags: Read / Write

-

Allowed values: >= G_MAXULONG

-

Default value: -1

-
-
-

The “auto-multicast” property

  “auto-multicast”           gboolean

Automatically join/leave the multicast groups, FALSE means user has to do it himself.

@@ -506,7 +462,7 @@ calls must be performed to actually remove the host/port pair from the list of destinations.

-

Parameters

+

Parameters

@@ -537,7 +493,7 @@
-

Flags: Action

+

Flags: Action


@@ -547,7 +503,7 @@ gpointer user_data)

Clear the list of clients.

-

Parameters

+

Parameters

@@ -568,7 +524,7 @@
-

Flags: Action

+

Flags: Action


@@ -581,7 +537,7 @@

Signal emited when a new client is added to the list of clients.

-

Parameters

+

Parameters

@@ -612,7 +568,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -625,7 +581,7 @@

Signal emited when a client is removed from the list of clients.

-

Parameters

+

Parameters

@@ -656,7 +612,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -670,7 +626,7 @@ and port .

-

Parameters

+

Parameters

@@ -702,12 +658,11 @@
-

Returns

+

Returns

a GstStructure: bytes_sent, packets_sent, connect_time (in epoch seconds), disconnect_time (in epoch seconds)

-

-

Flags: Action

+

Flags: Action


@@ -722,7 +677,7 @@ from the list of clients.

-

Parameters

+

Parameters

@@ -753,7 +708,7 @@
-

Flags: Action

+

Flags: Action

@@ -762,7 +717,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-optv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-optv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-optv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-optv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: optv +optv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

optv

-

optv — Optical art meets real-time video effect

+

optv

@@ -90,7 +90,7 @@ real-time video effect. Input images are binarized and combined with various optical pattern.

-

Example launch line

+

Example launch line

@@ -106,7 +106,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -132,7 +132,7 @@
-

Element Pads

+

Element Pads

@@ -183,19 +183,16 @@
-

-

Functions

+

Types and Values

struct GstOpTV

struct GstOpTV;
-

-

@@ -227,7 +224,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-oss4sink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-oss4sink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-oss4sink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-oss4sink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: oss4sink +oss4sink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

oss4sink

-

oss4sink — Output to a sound card via OSS version 4

+

oss4sink

@@ -97,14 +97,14 @@

Implemented Interfaces

GstOss4Sink implements - GstStreamVolume and GstPropertyProbe.

+ GstStreamVolume and GstPropertyProbe.

Description

Synopsis

-

Element Information

+

Element Information

@@ -130,7 +130,7 @@
-

Element Pads

+

Element Pads

@@ -165,19 +165,16 @@
-

-

Functions

+

Types and Values

struct GstOss4Sink

struct GstOss4Sink;
-

-

@@ -217,7 +214,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-oss4src.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-oss4src.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-oss4src.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-oss4src.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: oss4src +oss4src: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

oss4src

-

oss4src — Capture from a sound card via OSS version 4

+

oss4src

@@ -88,14 +88,14 @@

Implemented Interfaces

GstOss4Source implements - GstImplementsInterface, GstMixer and GstPropertyProbe.

+ GstImplementsInterface, GstMixer and GstPropertyProbe.

Description

Synopsis

-

Element Information

+

Element Information

@@ -121,7 +121,7 @@
-

Element Pads

+

Element Pads

@@ -156,19 +156,16 @@
-

-

Functions

+

Types and Values

struct GstOss4Source

struct GstOss4Source;
-

-

@@ -191,7 +188,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osssink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osssink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osssink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osssink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: osssink +osssink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

osssink

-

osssink — Output to a sound card via OSS

+

osssink

@@ -79,7 +79,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -105,7 +105,7 @@
-

Element Pads

+

Element Pads

@@ -136,19 +136,16 @@
-

-

Functions

+

Types and Values

struct GstOssSink

struct GstOssSink;
-

-

@@ -163,7 +160,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osssrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osssrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osssrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osssrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: osssrc +osssrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

osssrc

-

osssrc — Capture from a sound card via OSS

+

osssrc

@@ -88,14 +88,14 @@

Implemented Interfaces

GstOssSrc implements - GstImplementsInterface and GstMixer.

+ GstImplementsInterface and GstMixer.

Description

Synopsis

-

Element Information

+

Element Information

@@ -121,7 +121,7 @@
-

Element Pads

+

Element Pads

@@ -152,19 +152,16 @@
-

-

Functions

+

Types and Values

struct GstOssSrc

struct GstOssSrc;
-

-

@@ -187,7 +184,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osxaudiosink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osxaudiosink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osxaudiosink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osxaudiosink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: osxaudiosink +osxaudiosink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

osxaudiosink

-

osxaudiosink — Output to a sound card in OS X

+

osxaudiosink

@@ -65,7 +65,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -91,14 +91,13 @@
-

Element Pads

+

Element Pads

-

-

Functions

+

Types and Values

@@ -111,14 +110,10 @@ AudioUnit audiounit; double volume; - GstCaps *cached_caps; guint channels; - GstAudioChannelPosition channel_positions[GST_OSX_AUDIO_MAX_CHANNEL]; }; -

-

@@ -134,7 +129,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osxaudiosrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osxaudiosrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osxaudiosrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osxaudiosrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: osxaudiosrc +osxaudiosrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

osxaudiosrc

-

osxaudiosrc — Input from a sound card in OS X

+

osxaudiosrc

@@ -65,7 +65,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -91,14 +91,13 @@
-

Element Pads

+

Element Pads

-

-

Functions

+

Types and Values

@@ -108,13 +107,8 @@ GstAudioBaseSrc src; AudioDeviceID device_id; - - /* actual number of channels reported by input device */ - int deviceChannels; }; -

-

@@ -130,7 +124,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osxvideosink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osxvideosink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-osxvideosink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-osxvideosink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: osxvideosink +osxvideosink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

osxvideosink

-

osxvideosink — OSX native videosink

+

osxvideosink

@@ -72,7 +72,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -98,14 +98,13 @@
-

Element Pads

+

Element Pads

-

-

Functions

+

Types and Values

@@ -121,8 +120,6 @@ GstVideoInfo info; }; -

-

@@ -145,7 +142,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: 1394 +1394: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -42,7 +42,7 @@ - + @@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: aasink +aasink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -42,7 +42,7 @@ - + @@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: alaw +alaw: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -17,7 +17,7 @@ - +

version

1.4.31.6.1

run-time license

version

1.4.31.6.1

run-time license

Home Up PrevNextNext
@@ -42,7 +42,7 @@

version

-1.4.3 +1.6.1

run-time license

@@ -80,7 +80,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: alphacolor +alphacolor: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ Home Up -Prev -Next +Prev +Next
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: alpha +alpha: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ - - + +
Home UpPrevNextPrevNext
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: apetag +apetag: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -16,7 +16,7 @@ - +
Home UpPrevPrev Next
@@ -42,7 +42,7 @@

version

-1.4.3 +1.6.1

run-time license

@@ -74,7 +74,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: audiofx +audiofx: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -17,7 +17,7 @@ Home Up Prev -Next +Next
@@ -42,7 +42,7 @@

version

-1.4.3 +1.6.1

run-time license

@@ -124,7 +124,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,109 @@ + + + + +audioparsers: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

audioparsers

+

audioparsers — Parsers for various audio formats

+
+
+

Plugin Information

+
++++ + + + + + + + + + + + + + + + + + + + + + + +

filename

libgstaudioparsers.so

version

1.6.1

run-time license

LGPL

package

GStreamer Good Plug-ins source release

origin

Unknown package origin
+
+
+

Elements

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

aacparse

Advanced Audio Coding parser

ac3parse

AC3 parser

amrparse

Adaptive Multi-Rate audio parser

dcaparse

DCA parser

flacparse

Parses audio with the FLAC lossless audio codec

mpegaudioparse

Parses and frames mpeg1 audio streams (levels 1-3), provides seek

sbcparse

Parses an SBC bluetooth audio stream

wavpackparse

Wavpack parser
+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: auparse +auparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -16,7 +16,7 @@ Home Up -Prev +Prev Next
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: autodetect +autodetect: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -88,7 +88,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: avi +avi: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -84,7 +84,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: cacasink +cacasink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: cairo +cairo: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: cutter +cutter: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: debug +debug: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -108,7 +108,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: deinterlace +deinterlace: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-directsound.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-directsound.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-directsound.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-directsound.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: directsound +directsound: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -60,7 +60,7 @@
-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dtmf +dtmf: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -72,7 +72,7 @@ - + @@ -84,7 +84,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: dv +dv: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -17,7 +17,7 @@ - +
Generates DTMF tones

rtpdtmfdepay

rtpdtmfdepay

Generates DTMF Sound from telephone-event RTP packets
Home Up PrevNextNext
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: effectv +effectv: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ - - + +
Home UpPrevNextPrevNext
@@ -42,7 +42,7 @@

version

-1.4.3 +1.6.1

run-time license

@@ -120,7 +120,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: equalizer +equalizer: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ Home Up -Prev -Next +Prev +Next
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -84,7 +84,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flac +flac: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -16,7 +16,7 @@ - +
Home UpPrevPrev Next
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -84,7 +84,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flv +flv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: flxdec +flxdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: gdkpixbuf +gdkpixbuf: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -17,7 +17,7 @@ - +
Home Up PrevNextNext
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -84,7 +84,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: goom2k1 +goom2k1: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ - - + +
Home UpPrevNextPrevNext
@@ -42,7 +42,7 @@

version

-1.4.3 +1.6.1

run-time license

@@ -74,7 +74,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: goom +goom: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ Home Up -Prev -Next +Prev +Next
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: icydemux +icydemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -16,7 +16,7 @@ - +
Home UpPrevPrev Next
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: id3demux +id3demux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: imagefreeze +imagefreeze: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: interleave +interleave: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: isomp4 +isomp4: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -104,7 +104,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: jack +jack: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: jpeg +jpeg: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: level +level: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: matroska +matroska: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -88,7 +88,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-monoscope.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-monoscope.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-monoscope.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-monoscope.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: monoscope +monoscope: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -60,7 +60,7 @@
-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: mulaw +mulaw: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: multifile +multifile: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -79,12 +79,19 @@ + + + + + + + +

splitfilesrc

Read a sequentially named set of files as if it was one large file

splitmuxsink

Convenience bin that muxes incoming streams into multiple time/size limited files

splitmuxsrc

Source that reads a set of files created by splitmuxsink
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: multipart +multipart: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: navigationtest +navigationtest: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: oss4 +oss4: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: ossaudio +ossaudio: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-osxaudio.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-osxaudio.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-osxaudio.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-osxaudio.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: osxaudio +osxaudio: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -60,7 +60,7 @@
-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-osxvideo.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-osxvideo.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-osxvideo.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-osxvideo.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: osxvideo +osxvideo: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -60,7 +60,7 @@
-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: png +png: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: pulseaudio +pulseaudio: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: replaygain +replaygain: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -17,7 +17,7 @@ - +
Home Up PrevNextNext
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -84,7 +84,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtp +rtp: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ - - + +
Home UpPrevNextPrevNext
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -176,6 +176,14 @@ + + + + + + + + @@ -224,6 +232,14 @@ + + + + + + + + @@ -376,7 +392,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpmanager +rtpmanager: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,8 +16,8 @@ - - + +
Payload GStreamer buffers as RTP packets

rtph261depay

Extracts H261 video from RTP packets (RFC 4587)

rtph261pay

Payload-encodes H261 video in RTP packets (RFC 4587)

rtph263depay

Extracts H263 video from RTP packets (RFC 2190)
Payload-encodes JPEG pictures into RTP packets (RFC 2435)

rtpklvdepay

Extracts KLV (SMPTE ST 336) metadata from RTP packets

rtpklvpay

Payloads KLV (SMPTE ST 336) metadata as RTP packets

rtpmp1sdepay

Extracts MPEG1 System Streams from RTP packets (RFC 3555)
Home UpPrevNextPrevNext
@@ -42,7 +42,7 @@

version

-1.4.3 +1.6.1

run-time license

@@ -112,7 +112,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtsp +rtsp: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -16,7 +16,7 @@ Home Up -Prev +Prev Next
@@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: shapewipe +shapewipe: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: shout2send +shout2send: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: smpte +smpte: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: soup +soup: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: spectrum +spectrum: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: speex +speex: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: taglib +taglib: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: udp +udp: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -88,7 +88,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: video4linux2 +video4linux2: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -84,7 +84,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videobox +videobox: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videocrop +videocrop: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videofilter +videofilter: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -88,7 +88,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videomixer +videomixer: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: vpx +vpx: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -88,7 +88,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-waveform.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-waveform.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-waveform.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-waveform.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: waveform +waveform: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -60,7 +60,7 @@
-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavenc +wavenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavpack +wavpack: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -80,7 +80,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavparse +wavparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: ximagesrc +ximagesrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: y4menc +y4menc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@
-

Plugin Information

+

Plugin Information

@@ -42,7 +42,7 @@ - + @@ -60,7 +60,7 @@

version

1.4.31.6.1

run-time license

-

Elements

+

Elements

@@ -74,7 +74,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pngdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pngdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pngdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pngdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: pngdec +pngdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

pngdec

-

pngdec — Decode a png video frame to a raw image

+

pngdec

@@ -60,7 +60,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -86,7 +86,7 @@
-

Element Pads

+

Element Pads

@@ -137,24 +137,20 @@
-

-

Functions

+

Types and Values

struct GstPngDec

struct GstPngDec;
-

-

+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pngenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pngenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pngenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pngenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: pngenc +pngenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

pngenc

-

pngenc — Encode a video frame to a .png image

+

pngenc

@@ -90,7 +90,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -116,7 +116,7 @@
-

Element Pads

+

Element Pads

@@ -167,19 +167,16 @@
-

-

Functions

+

Types and Values

struct GstPngEnc

struct GstPngEnc;
-

-

@@ -203,7 +200,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-progressreport.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-progressreport.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-progressreport.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-progressreport.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: progressreport +progressreport: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

progressreport

-

progressreport — Periodically query and report on processing progress

+

progressreport

@@ -117,7 +117,7 @@ is in reference to an internal point of a pipeline and not the pipeline as a whole).

-

Example launch line

+

Example launch line

@@ -144,7 +144,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -170,7 +170,7 @@
-

Element Pads

+

Element Pads

@@ -221,19 +221,16 @@
-

-

Functions

+

Types and Values

struct GstProgressReport

struct GstProgressReport;
-

-

@@ -273,7 +270,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pulsesink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pulsesink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pulsesink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pulsesink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: pulsesink +pulsesink: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

pulsesink

-

pulsesink — Plays audio to a PulseAudio server

+

pulsesink

@@ -73,12 +73,6 @@ -gchar * -client -Read / Write - - - GstStructure * stream-properties Read / Write @@ -126,14 +120,14 @@

Implemented Interfaces

GstPulseSink implements - GstStreamVolume, GstImplementsInterface and GstPropertyProbe.

+ GstStreamVolume, GstImplementsInterface and GstPropertyProbe.

Description

Synopsis

-

Element Information

+

Element Information

@@ -159,7 +153,7 @@
-

Element Pads

+

Element Pads

@@ -214,19 +208,16 @@
-

-

Functions

+

Types and Values

struct GstPulseSink

struct GstPulseSink;
-

-

@@ -273,14 +264,6 @@

-

The “client” property

-
  “client”                   gchar *
-

The PulseAudio client name to use.

-

Flags: Read / Write

-

Default value: "<unknown>"

-
-
-

The “stream-properties” property

  “stream-properties”        GstStructure *

list of pulseaudio stream properties.

@@ -305,7 +288,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pulsesrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pulsesrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-pulsesrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-pulsesrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: pulsesrc +pulsesrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -23,14 +23,14 @@ Home Up Prev -Next +Next

pulsesrc

-

pulsesrc — Captures audio from a PulseAudio server

+

pulsesrc

@@ -68,12 +68,6 @@ Read / Write - -gchar * -client -Read / Write - - gboolean mute Read / Write @@ -133,14 +127,14 @@

Implemented Interfaces

GstPulseSrc implements - GstStreamVolume, GstImplementsInterface, GstMixer and GstPropertyProbe.

+ GstStreamVolume, GstImplementsInterface, GstMixer and GstPropertyProbe.

Description

Synopsis

-

Element Information

+

Element Information

@@ -166,7 +160,7 @@
-

Element Pads

+

Element Pads

@@ -201,19 +195,16 @@
-

-

Functions

+

Types and Values

struct GstPulseSrc

struct GstPulseSrc;
-

-

@@ -250,14 +241,6 @@

-

The “client” property

-
  “client”                   gchar *
-

The PulseAudio client_name_to_use.

-

Flags: Read / Write

-

Default value: "<unknown>"

-
-
-

The “mute” property

  “mute”                     gboolean

Mute state of this stream.

@@ -300,7 +283,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: qtdemux +qtdemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,38 +16,22 @@ Top  |  Description  |  - Object Hierarchy  |  - Signals + Object Hierarchy Home Up -Prev -Next +Prev +Next

qtdemux

-

qtdemux — Demultiplex a QuickTime file into audio and video streams

+

qtdemux

-
-

Signals

-
----- - - - - - -
voidgot-redirect 
-

Types and Values

@@ -76,13 +60,13 @@

This element supports both push and pull-based scheduling, depending on the capabilities of the upstream elements.

-

Example launch line

+

Example launch line

- +
1
gst-launch-1.0 filesrc location=test.mov ! qtdemux name=demux  demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink   demux.video_0 ! queue ! decodebin ! videoconvert ! videoscale ! autovideosink
gst-launch-1.0 filesrc location=test.mov ! qtdemux name=demux  demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink   demux.video_0 ! queue ! decodebin ! videoconvert ! videoscale ! autovideosink
@@ -95,7 +79,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -121,7 +105,7 @@
-

Element Pads

+

Element Pads

@@ -232,58 +216,20 @@
-

-

Functions

+

Types and Values

struct GstQTDemux

struct GstQTDemux;
-

-

-
-
-
-

Signal Details

-
-

The “got-redirect” signal

-
void
-user_function (GstQTDemux *gstqtdemux,
-               gchar      *arg1,
-               gpointer    user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstqtdemux

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-qtmoovrecover.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-qtmoovrecover.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-qtmoovrecover.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-qtmoovrecover.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: qtmoovrecover +qtmoovrecover: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,8 +22,8 @@ Home Up -Prev -Next +Prev +Next
@@ -135,7 +135,7 @@

Description

-

Example pipelines

+

Example pipelines

This element recovers quicktime files created with qtmux using the moov recovery feature. @@ -151,7 +151,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -177,11 +177,9 @@
-

Element Pads

+

Element Pads

-

-

Functions

@@ -189,24 +187,12 @@

gst_qt_moov_recover_get_type ()

GType
 gst_qt_moov_recover_get_type (void);
-

-

-
-

Returns

-

-

gst_qt_moov_recover_register ()

gboolean
 gst_qt_moov_recover_register (GstPlugin *plugin);
-

-

-
-

Returns

-

-
@@ -214,8 +200,6 @@

struct GstQTMoovRecover

struct GstQTMoovRecover;
-

-


@@ -224,8 +208,6 @@ GstPipelineClass parent_class; }; -

-

@@ -264,7 +246,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-qtmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-qtmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-qtmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-qtmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: qtmux +qtmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,8 +22,8 @@ - - + +
Home UpPrevNextPrevNext
@@ -90,6 +90,26 @@ trak-timescale Read / Write / Construct + +guint +reserved-bytes-per-sec +Read / Write / Construct + + +guint64 +reserved-duration-remaining +Read + + +guint64 +reserved-max-duration +Read / Write + + +guint64 +reserved-moov-update-period +Read / Write +
@@ -150,8 +170,21 @@ If such fragmented layout is intended for streaming purposes, then “streamable” allows foregoing to add index metadata (at the end of file).

+

When the maximum duration to be recorded can be known in advance, GstQTMux +also supports a 'Robust Muxing' mode. In robust muxing mode, space for the +headers are reserved at the start of muxing, and rewritten at a configurable +interval, so that the output file is always playable, even if the recording +is interrupted uncleanly by a crash. Robust muxing mode requires a seekable +output, such as filesink, because it needs to rewrite the start of the file.

+

To enable robust muxing mode, set the “reserved-moov-update-period” +and “reserved-max-duration” property. Also present is the +“reserved-bytes-per-sec” property, which can be increased if +for some reason the default is not large enough and the initial reserved +space for headers is too small. Applications can monitor the +“reserved-duration-remaining” property to see how close to full +the reserved space is becoming.

-

Example pipelines

+

Example pipelines

@@ -168,7 +201,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -194,7 +227,7 @@
-

Element Pads

+

Element Pads

@@ -215,19 +248,15 @@ - - - - - + - + - + @@ -307,47 +336,51 @@ - + + + + + - + - + - + - + - + - + - + - + - + - +

details

audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]

audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]audio/x-raw, format=(string){ S32LE, S32BE, S24LE, S24BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]

audio/x-raw, format=(string){ S24LE, S24BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ] audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]

audio/x-raw, format=(string){ S32LE, S32BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ] audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]

details

video/x-raw, format=(string){ RGB, UYVY }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]video/x-raw, format=(string){ RGB, UYVY, v210 }, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-prores, variant=(string){ standard, lt, hq, proxy }, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-h263, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-svq, svqversion=(int)3, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-svq, svqversion=(int)3, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-dv, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-dv, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] image/jpeg, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-vp8, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-vp8, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-dirac, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-dirac, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]

video/x-qt-part, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ] video/x-qt-part, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
@@ -381,19 +414,16 @@
-

-

Functions

+

Types and Values

struct GstQTMux

struct GstQTMux;
-

-

@@ -401,7 +431,7 @@

The “dts-method” property

  “dts-method”               GstQTMuxDtsMethods
-

(DEPRECATED) Method to determine DTS time.

+

Method to determine DTS time (DEPRECATED).

Flags: Read / Write / Construct

Default value: reorder

@@ -444,7 +474,7 @@

Timescale to use in the movie (units per second).

Flags: Read / Write / Construct

Allowed values: >= 1

-

Default value: 1000

+

Default value: 1800


@@ -470,10 +500,42 @@

Flags: Read / Write / Construct

Default value: 0

+
+
+

The “reserved-bytes-per-sec” property

+
  “reserved-bytes-per-sec”   guint
+

Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track.

+

Flags: Read / Write / Construct

+

Allowed values: <= 10000

+

Default value: 550

+
+
+

The “reserved-duration-remaining” property

+
  “reserved-duration-remaining” guint64
+

Reports the approximate amount of remaining moov header space reserved using reserved-max-duration.

+

Flags: Read

+

Default value: 0

- +
+

The “reserved-max-duration” property

+
  “reserved-max-duration”    guint64
+

When set to a value > 0, reserves space for index tables at the beginning of the file.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+
+
+

The “reserved-moov-update-period” property

+
  “reserved-moov-update-period” guint64
+

When used with reserved-max-duration, periodically updates the index tables with information muxed so far.

+

Flags: Read / Write

+

Default value: 18446744073709551615

+
+
+
+ \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-quarktv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-quarktv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-quarktv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-quarktv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: quarktv +quarktv: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

quarktv

-

quarktv — Motion dissolver

+

quarktv

@@ -77,7 +77,7 @@

QuarkTV disolves moving objects. It picks up pixels from the last frames randomly.

-

Example launch line

+

Example launch line

@@ -93,7 +93,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -119,7 +119,7 @@
-

Element Pads

+

Element Pads

@@ -170,19 +170,16 @@
-

-

Functions

+

Types and Values

struct GstQuarkTV

struct GstQuarkTV;
-

-

@@ -192,13 +189,12 @@
  “planes”                   gint

Number of planes.

Flags: Read / Write

-

Allowed values: [0,64]

+

Allowed values: [1,64]

Default value: 16

+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-radioactv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-radioactv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-radioactv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-radioactv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: radioactv +radioactv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -21,7 +21,7 @@ Home Up -Prev +Prev Next
@@ -29,7 +29,7 @@

radioactv

-

radioactv — motion-enlightment effect

+

radioactv

@@ -99,7 +99,7 @@ current frame and previous frame dropped, while strobe2 mode uses the difference from previous frame displayed. The effect of strobe2 is stronger than strobe1.

-

Example launch line

+

Example launch line

@@ -115,7 +115,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -141,7 +141,7 @@
-

Element Pads

+

Element Pads

@@ -192,19 +192,16 @@
-

-

Functions

+

Types and Values

struct GstRadioacTV

struct GstRadioacTV;
-

-

@@ -244,7 +241,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-revtv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-revtv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-revtv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-revtv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: revtv +revtv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

revtv

-

revtv — A video waveform monitor for each line of video processed

+

revtv

@@ -90,7 +90,7 @@ processed. This creates a pseudo 3D effect based on the brightness of the video along each line.

-

Example launch line

+

Example launch line

@@ -106,7 +106,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -132,7 +132,7 @@
-

Element Pads

+

Element Pads

@@ -183,19 +183,16 @@
-

-

Functions

+

Types and Values

struct GstRevTV

struct GstRevTV;
-

-

@@ -229,7 +226,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rganalysis.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rganalysis.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rganalysis.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rganalysis.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rganalysis +rganalysis: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

rganalysis

-

rganalysis — Perform the ReplayGain analysis

+

rganalysis

@@ -108,7 +108,7 @@ the album gain and peak values need to be associated with all tracks of an album, not just the last one.

-

Example launch lines

+

Example launch lines

@@ -154,7 +154,7 @@
-

Acknowledgements

+

Acknowledgements

This element is based on code used in the vorbisgain program and many others. The relevant parts are copyrighted by David Robinson, Glen Sawyer @@ -164,7 +164,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -190,7 +190,7 @@
-

Element Pads

+

Element Pads

@@ -249,11 +249,10 @@
-

-

Functions

+

Types and Values

@@ -354,7 +353,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rglimiter.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rglimiter.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rglimiter.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rglimiter.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rglimiter +rglimiter: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

rglimiter

-

rglimiter — Apply signal compression to raw audio data

+

rglimiter

@@ -77,7 +77,7 @@ performs strict hard limiting with soft-knee characteristics, using a threshold of -6 dB. This type of filter is mentioned in the proposed ReplayGain standard.

-

Example launch line

+

Example launch line

@@ -97,7 +97,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -123,7 +123,7 @@
-

Element Pads

+

Element Pads

@@ -174,11 +174,10 @@
-

-

Functions

+

Types and Values

@@ -204,7 +203,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rgvolume.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rgvolume.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rgvolume.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rgvolume.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rgvolume +rgvolume: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

rgvolume

-

rgvolume — Apply ReplayGain volume adjustment

+

rgvolume

@@ -127,7 +127,7 @@ included with this plugin: The rglimiter element applies -6 dB hard limiting as mentioned in the ReplayGain standard.

-

Example launch line

+

Example launch line

@@ -145,7 +145,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -171,7 +171,7 @@
-

Element Pads

+

Element Pads

@@ -222,11 +222,10 @@
-

-

Functions

+

Types and Values

@@ -349,7 +348,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rippletv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rippletv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rippletv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rippletv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rippletv +rippletv: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

rippletv

-

rippletv — RippleTV does ripple mark effect on the video input

+

rippletv

@@ -84,7 +84,7 @@

RippleTV does ripple mark effect on the video input. The ripple is caused by motion or random rain drops.

-

Example launch line

+

Example launch line

@@ -100,7 +100,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -126,7 +126,7 @@
-

Element Pads

+

Element Pads

@@ -177,19 +177,16 @@
-

-

Functions

+

Types and Values

struct GstRippleTV

struct GstRippleTV;
-

-

@@ -212,7 +209,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpac3depay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpac3depay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpac3depay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpac3depay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpac3depay +rtpac3depay: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

rtpac3depay

-

rtpac3depay — Extracts AC3 audio from RTP packets (RFC 4184)

+

rtpac3depay

@@ -60,7 +60,7 @@

Extract AC3 audio from RTP packets according to RFC 4184. For detailed information see: http://www.rfc-editor.org/rfc/rfc4184.txt

-

Example pipeline

+

Example pipeline

@@ -77,7 +77,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -103,7 +103,7 @@
-

Element Pads

+

Element Pads

@@ -154,19 +154,16 @@
-

-

Functions

+

Types and Values

struct GstRtpAC3Depay

struct GstRtpAC3Depay;
-

-

@@ -175,7 +172,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpac3pay +rtpac3pay: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

rtpac3pay

-

rtpac3pay — Payload AC3 audio as RTP packets (RFC 4184)

+

rtpac3pay

@@ -60,13 +60,13 @@

Payload AC3 audio into RTP packets according to RFC 4184. For detailed information see: http://www.rfc-editor.org/rfc/rfc4184.txt

-

Example pipeline

+

Example pipeline

- +
1
gst-launch -v audiotestsrc ! avenc_ac3 ! rtpac3pay ! udpsink
gst-launch-1.0 -v audiotestsrc ! avenc_ac3 ! rtpac3pay ! udpsink
@@ -77,7 +77,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -103,7 +103,7 @@
-

Element Pads

+

Element Pads

@@ -158,19 +158,16 @@
-

-

Functions

+

Types and Values

struct GstRtpAC3Pay

struct GstRtpAC3Pay;
-

-

@@ -179,7 +176,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpamrdepay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpamrdepay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpamrdepay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpamrdepay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpamrdepay +rtpamrdepay: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

rtpamrdepay

-

rtpamrdepay — Extracts AMR or AMR-WB audio from RTP packets (RFC 3267)

+

rtpamrdepay

@@ -60,7 +60,7 @@

Extract AMR audio from RTP packets according to RFC 3267. For detailed information see: http://www.rfc-editor.org/rfc/rfc3267.txt

-

Example pipeline

+

Example pipeline

@@ -77,7 +77,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -103,7 +103,7 @@
-

Element Pads

+

Element Pads

@@ -162,19 +162,16 @@
-

-

Functions

+

Types and Values

struct GstRtpAMRDepay

struct GstRtpAMRDepay;
-

-

@@ -183,7 +180,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpamrpay +rtpamrpay: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -21,14 +21,14 @@ Home Up Prev -Next +Next

rtpamrpay

-

rtpamrpay — Payload-encode AMR or AMR-WB audio into RTP packets (RFC 3267)

+

rtpamrpay

@@ -60,13 +60,13 @@

Payload AMR audio into RTP packets according to RFC 3267. For detailed information see: http://www.rfc-editor.org/rfc/rfc3267.txt

-

Example pipeline

+

Example pipeline

- +
1
gst-launch -v audiotestsrc ! amrnbenc ! rtpamrpay ! udpsink
gst-launch-1.0 -v audiotestsrc ! amrnbenc ! rtpamrpay ! udpsink
@@ -77,7 +77,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -103,7 +103,7 @@
-

Element Pads

+

Element Pads

@@ -162,19 +162,16 @@
-

-

Functions

+

Types and Values

struct GstRtpAMRPay

struct GstRtpAMRPay;
-

-

@@ -183,7 +180,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpbin +rtpbin: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -24,14 +24,14 @@ Home Up Prev -Next +Next

rtpbin

-

rtpbin — Real-Time Transport Protocol bin

+

rtpbin

@@ -71,7 +71,7 @@ Read / Write -RTPJitterBufferMode +RTPJitterBufferMode buffer-mode Read / Write @@ -86,7 +86,7 @@ Read / Write -GstRTCPSync +GstRTCPSync rtcp-sync Read / Write @@ -110,6 +110,16 @@ do-retransmission Read / Write + +GstRTPProfile +rtp-profile +Read / Write + + +GstRtpNtpTimeSource +ntp-time-source +Read / Write +
@@ -125,120 +135,120 @@ void clear-pt-map -Action +Action RTPSession* get-internal-session -Action +Action void on-bye-ssrc -Run Last +Run Last void on-bye-timeout -Run Last +Run Last void on-new-ssrc -Run Last +Run Last void on-npt-stop -Run Last +Run Last void on-sender-timeout -Run Last +Run Last void on-ssrc-active -Run Last +Run Last void on-ssrc-collision -Run Last +Run Last void on-ssrc-sdes -Run Last +Run Last void on-ssrc-validated -Run Last +Run Last void on-timeout -Run Last +Run Last GstCaps* request-pt-map -Run Last +Run Last void reset-sync -Action +Action void payload-type-change -Run Last +Run Last void new-jitterbuffer -Run Last +Run Last GstElement* request-aux-receiver -Run Last +Run Last GstElement* request-aux-sender -Run Last +Run Last GstElement* request-rtcp-decoder -Run Last +Run Last GstElement* request-rtcp-encoder -Run Last +Run Last GstElement* request-rtp-decoder -Run Last +Run Last GstElement* request-rtp-encoder -Run Last +Run Last
@@ -250,10 +260,20 @@ - + + struct GstRtpBin - + + +enum +RTPJitterBufferMode + + +enum +GstRTCPSync + +
@@ -324,12 +344,12 @@ sink_%u pad that matches the sessionid in the signal and it should have 1 or more src_%u pads. For each src_%\u pad, a session will be made (if needed) and the pad will be linked to the session send_rtp_sink pad. Each session will -then expose its source pad ad send_rtp_src_%u on GstRtpBin. +then expose its source pad as send_rtp_src_%u on GstRtpBin. An AUX receiver has 1 src_%u pad that much match the sessionid in the signal and 1 or more sink_%u pads. A session will be made for each sink_%u pad when the corresponding recv_rtp_sink_%u pad is requested on GstRtpBin.

-

Example pipelines

+

Example pipelines

@@ -421,7 +441,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -447,7 +467,7 @@
-

Element Pads

+

Element Pads

@@ -610,19 +630,102 @@
-

-

Functions

+

Types and Values

struct GstRtpBin

struct GstRtpBin;
-

-

+
+
+
+

enum RTPJitterBufferMode

+

RTP_JITTER_BUFFER_MODE_NONE: don't do any skew correction, outgoing + timestamps are calculated directly from the RTP timestamps. This mode is + good for recording but not for real-time applications. +RTP_JITTER_BUFFER_MODE_SLAVE: calculate the skew between sender and receiver + and produce smoothed adjusted outgoing timestamps. This mode is good for + low latency communications. +RTP_JITTER_BUFFER_MODE_BUFFER: buffer packets between low/high watermarks. + This mode is good for streaming communication. +RTP_JITTER_BUFFER_MODE_SYNCED: sender and receiver clocks are synchronized, + like RTP_JITTER_BUFFER_MODE_SLAVE but skew is assumed to be 0. Good for + low latency communication when sender and receiver clocks are + synchronized and there is thus no clock skew. +RTP_JITTER_BUFFER_MODE_LAST: last buffer mode.

+

The different buffer modes for a jitterbuffer.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

RTP_JITTER_BUFFER_MODE_NONE

  

RTP_JITTER_BUFFER_MODE_SLAVE

  

RTP_JITTER_BUFFER_MODE_BUFFER

  

RTP_JITTER_BUFFER_MODE_SYNCED

  

RTP_JITTER_BUFFER_MODE_LAST

  
+
+
+
+
+

enum GstRTCPSync

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

GST_RTP_BIN_RTCP_SYNC_ALWAYS

  

GST_RTP_BIN_RTCP_SYNC_INITIAL

  

GST_RTP_BIN_RTCP_SYNC_RTP

  
+
@@ -668,7 +771,7 @@

The “buffer-mode” property

-
  “buffer-mode”              RTPJitterBufferMode
+
  “buffer-mode”              RTPJitterBufferMode

Control the buffering and timestamping mode used by the jitterbuffer.

Flags: Read / Write

Default value: Slave receiver to sender clock

@@ -689,14 +792,14 @@

The “use-pipeline-clock” property

  “use-pipeline-clock”       gboolean
-

Use the pipeline running-time to set the NTP time in the RTCP SR messages.

+

Use the pipeline running-time to set the NTP time in the RTCP SR messages (DEPRECATED: Use ntp-time-source property).

Flags: Read / Write

Default value: FALSE


The “rtcp-sync” property

-
  “rtcp-sync”                GstRTCPSync
+
  “rtcp-sync”                GstRTCPSync

If not synchronizing (directly) to the NTP clock, determines how to sync the various streams.

Flags: Read / Write

@@ -730,10 +833,30 @@

The “do-retransmission” property

  “do-retransmission”        gboolean
-

Send an event downstream to request packet retransmission.

+

Enables RTP retransmission on all streams. To control retransmission on +a per-SSRC basis, connect to the “new-jitterbuffer” signal and +set the “do-retransmission” property on the +GstRtpJitterBuffer object instead.

Flags: Read / Write

Default value: FALSE

+
+
+

The “rtp-profile” property

+
  “rtp-profile”              GstRTPProfile
+

Sets the default RTP profile of newly created RTP sessions. The +profile can be changed afterwards on a per-session basis.

+

Flags: Read / Write

+

Default value: GST_RTP_PROFILE_AVP

+
+
+
+

The “ntp-time-source” property

+
  “ntp-time-source”          GstRtpNtpTimeSource
+

NTP time source for RTCP packets.

+

Flags: Read / Write

+

Default value: NTP time based on realtime clock

+

Signal Details

@@ -745,7 +868,7 @@

Clear all previously cached pt-mapping obtained with “request-pt-map”.

-

Parameters

+

Parameters

@@ -766,7 +889,7 @@
-

Flags: Action

+

Flags: Action


@@ -778,7 +901,7 @@

Request the internal RTPSession object as GObject in session id .

-

Parameters

+

Parameters

@@ -804,7 +927,7 @@
-

Flags: Action

+

Flags: Action


@@ -816,7 +939,7 @@ gpointer user_data)

Notify of an SSRC that became inactive because of a BYE packet.

-

Parameters

+

Parameters

@@ -847,7 +970,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -859,7 +982,7 @@ gpointer user_data)

Notify of an SSRC that has timed out because of BYE

-

Parameters

+

Parameters

@@ -890,7 +1013,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -903,7 +1026,7 @@

Notify of a new SSRC that entered session .

-

Parameters

+

Parameters

@@ -934,7 +1057,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -946,7 +1069,7 @@ gpointer user_data)

Notify that SSRC sender has sent data up to the configured NPT stop time.

-

Parameters

+

Parameters

@@ -977,7 +1100,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -989,7 +1112,7 @@ gpointer user_data)

Notify of a sender SSRC that has timed out and became a receiver

-

Parameters

+

Parameters

@@ -1020,7 +1143,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1032,7 +1155,7 @@ gpointer user_data)

Notify of a SSRC that is active, i.e., sending RTCP.

-

Parameters

+

Parameters

@@ -1063,7 +1186,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1075,7 +1198,7 @@ gpointer user_data)

Notify when we have an SSRC collision

-

Parameters

+

Parameters

@@ -1106,7 +1229,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1118,7 +1241,7 @@ gpointer user_data)

Notify of a SSRC that is active, i.e., sending RTCP.

-

Parameters

+

Parameters

@@ -1149,7 +1272,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1161,7 +1284,7 @@ gpointer user_data)

Notify of a new SSRC that became validated.

-

Parameters

+

Parameters

@@ -1192,7 +1315,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1204,7 +1327,7 @@ gpointer user_data)

Notify of an SSRC that has timed out

-

Parameters

+

Parameters

@@ -1235,7 +1358,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1249,7 +1372,7 @@ in session .

-

Parameters

+

Parameters

@@ -1280,7 +1403,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1291,7 +1414,7 @@

Reset all currently configured lip-sync parameters and require new SR packets for all streams before lip-sync is attempted again.

-

Parameters

+

Parameters

@@ -1312,7 +1435,7 @@
-

Flags: Action

+

Flags: Action


@@ -1326,7 +1449,7 @@ in session .

-

Parameters

+

Parameters

@@ -1357,7 +1480,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -1375,7 +1498,7 @@ This signal can, for example, be used to configure jitterbuffer .

-

Parameters

+

Parameters

@@ -1411,8 +1534,8 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4


@@ -1426,7 +1549,7 @@ element will be added to the bin.

If no handler is connected, no AUX element will be used.

-

Parameters

+

Parameters

@@ -1452,8 +1575,8 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4


@@ -1467,7 +1590,7 @@ element will be added to the bin.

If no handler is connected, no AUX element will be used.

-

Parameters

+

Parameters

@@ -1493,8 +1616,8 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4


@@ -1508,7 +1631,7 @@ element will be added to the bin if not previously added.

If no handler is connected, no encoder will be used.

-

Parameters

+

Parameters

@@ -1534,8 +1657,8 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4


@@ -1549,7 +1672,7 @@ element will be added to the bin if not previously added.

If no handler is connected, no encoder will be used.

-

Parameters

+

Parameters

@@ -1575,8 +1698,8 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4


@@ -1590,7 +1713,7 @@ element will be added to the bin if not previously added.

If no handler is connected, no encoder will be used.

-

Parameters

+

Parameters

@@ -1616,8 +1739,8 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4


@@ -1631,7 +1754,7 @@ element will be added to the bin if not previously added.

If no handler is connected, no encoder will be used.

-

Parameters

+

Parameters

@@ -1657,8 +1780,8 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4

@@ -1667,7 +1790,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpbvdepay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpbvdepay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpbvdepay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpbvdepay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpbvdepay +rtpbvdepay: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -19,7 +19,7 @@ Home Up -Prev +Prev Next
@@ -27,7 +27,7 @@

rtpbvdepay

-

rtpbvdepay — Extracts BroadcomVoice audio from RTP packets (RFC 4298)

+

rtpbvdepay

@@ -38,7 +38,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -64,7 +64,7 @@
-

Element Pads

+

Element Pads

@@ -119,11 +119,10 @@
-

-

Functions

+

Types and Values

@@ -134,7 +133,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpbvpay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpbvpay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpbvpay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpbvpay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpbvpay +rtpbvpay: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -20,14 +20,14 @@ Home Up Prev -Next +Next

rtpbvpay

-

rtpbvpay — Packetize BroadcomVoice audio streams into RTP packets (RFC 4298)

+

rtpbvpay

@@ -38,7 +38,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -64,7 +64,7 @@
-

Element Pads

+

Element Pads

@@ -119,11 +119,10 @@
-

-

Functions

+

Types and Values

@@ -134,7 +133,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpdec +rtpdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

rtpdec

-

rtpdec — Accepts raw RTP and RTCP packets and sends them forward

+

rtpdec

@@ -42,18 +42,11 @@ - - -gint -skip -Read / Write - - + guint latency Read / Write - - +
@@ -68,43 +61,43 @@ void clear-pt-map -Run Last +Run Last GstCaps* request-pt-map -Run Last +Run Last void on-bye-ssrc -Run Last +Run Last void on-bye-timeout -Run Last +Run Last void on-new-ssrc -Run Last +Run Last void on-ssrc-collision -Run Last +Run Last void on-ssrc-validated -Run Last +Run Last void on-timeout -Run Last +Run Last
@@ -137,7 +130,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -163,7 +156,7 @@
-

Element Pads

+

Element Pads

@@ -262,32 +255,21 @@
-

-

Functions

+

Types and Values

struct GstRTPDec

struct GstRTPDec;
-

-

Property Details

-

The “skip” property

-
  “skip”                     gint
-

skip (unused).

-

Flags: Read / Write

-

Default value: 0

-
-
-

The “latency” property

  “latency”                  guint

Amount of ms to buffer.

@@ -302,31 +284,7 @@
void
 user_function (GstRTPDec *gstrtpdec,
                gpointer   user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstrtpdec

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last


@@ -340,7 +298,7 @@ in session .

-

Parameters

+

Parameters

@@ -371,7 +329,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -383,7 +341,7 @@ gpointer user_data)

Notify of an SSRC that became inactive because of a BYE packet.

-

Parameters

+

Parameters

@@ -414,7 +372,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -426,7 +384,7 @@ gpointer user_data)

Notify of an SSRC that has timed out because of BYE

-

Parameters

+

Parameters

@@ -457,7 +415,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -470,7 +428,7 @@

Notify of a new SSRC that entered session .

-

Parameters

+

Parameters

@@ -501,7 +459,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -511,31 +469,7 @@ guint arg1, guint arg2, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstrtpdec

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last


@@ -545,31 +479,7 @@ guint arg1, guint arg2, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstrtpdec

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last


@@ -581,7 +491,7 @@ gpointer user_data)

Notify of an SSRC that has timed out

-

Parameters

+

Parameters

@@ -612,12 +522,11 @@
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfdepay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfdepay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfdepay.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfdepay.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,254 @@ + + + + +rtpdtmfdepay: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

rtpdtmfdepay

+

rtpdtmfdepay

+
+
+

Properties

+
+++++ + + + + + + + + + + + + +
guintmax-durationRead / Write
guintunit-timeRead / Write
+
+
+

Types and Values

+
++++ + + + + +
structGstRtpDTMFDepay
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GInitiallyUnowned
+        ╰── GstObject
+            ╰── GstElement
+                ╰── GstRTPBaseDepayload
+                    ╰── GstRtpDTMFDepay
+
+
+
+

Description

+

This element takes RTP DTMF packets and produces sound. It also emits a +message on the GstBus.

+

The message is called "dtmf-event" and has the following fields

+
++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameGTypePossible valuesPurpose
typeG_TYPE_INT0-1Which of the two methods +specified in RFC 2833 to use. The value should be 0 for tones and 1 for +named events. Tones are specified by their frequencies and events are specied +by their number. This element currently only recognizes events. +Do not confuse with "method" which specified the output. +
numberG_TYPE_INT0-16The event number.
volumeG_TYPE_INT0-36This field describes the power level of the tone, expressed in dBm0 +after dropping the sign. Power levels range from 0 to -63 dBm0. The range of +valid DTMF is from 0 to -36 dBm0. +
methodG_TYPE_INT1This field will always been 1 (ie RTP event) from this element. +
+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ dtmf +

author

Youness Alaoui <youness.alaoui@collabora.co.uk>

class

Codec/Depayloader/Network
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

sink

direction

sink

presence

always

details

application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)[ 0, 2147483647 ], encoding-name=(string)TELEPHONE-EVENT
+
++++ + + + + + + + + + + + + + + + + + + +

name

src

direction

source

presence

always

details

audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)1
+
+
+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstRtpDTMFDepay

+
struct GstRtpDTMFDepay;
+
+
+
+

Property Details

+
+

The “max-duration” property

+
  “max-duration”             guint
+

The maxumimum duration (ms) of the outgoing soundpacket. (0 = no limit).

+

Flags: Read / Write

+

Default value: 0

+
+
+
+

The “unit-time” property

+
  “unit-time”                guint
+

The smallest unit (ms) the duration must be a multiple of (0 disables it).

+

Flags: Read / Write

+

Allowed values: <= 1000

+

Default value: 0

+
+
+
+

See Also

+

rtpdtmfsrc, rtpdtmfmux

+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpdtmfmux +rtpdtmfmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

rtpdtmfmux

-

rtpdtmfmux — mixes RTP DTMF streams into other RTP streams

+

rtpdtmfmux

@@ -59,15 +59,15 @@

Description

The RTP "DTMF" Muxer muxes multiple RTP streams into a valid RTP stream. It does exactly what its parent (rtpmux) does, except -that it prevent buffers coming over a regular sink_%u pad from going through -for the duration of buffers that came in a priority_sink_%u pad.

+that it prevent buffers coming over a regular sink_%u pad from going through +for the duration of buffers that came in a priority_sink_%u pad.

This is especially useful if a discontinuous source like dtmfsrc or rtpdtmfsrc are connected to the priority sink pads. This way, the generated DTMF signal can replace the recorded audio while the tone is being sent.

Synopsis

-

Element Information

+

Element Information

@@ -93,7 +93,7 @@
-

Element Pads

+

Element Pads

@@ -168,11 +168,10 @@
-

-

Functions

+

Types and Values

@@ -188,7 +187,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfsrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfsrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfsrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpdtmfsrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpdtmfsrc +rtpdtmfsrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

rtpdtmfsrc

-

rtpdtmfsrc — Generates RTP DTMF packets

+

rtpdtmfsrc

@@ -194,7 +194,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -220,7 +220,7 @@
-

Element Pads

+

Element Pads

@@ -247,11 +247,10 @@
-

-

Functions

+

Types and Values

@@ -260,7 +259,7 @@
struct GstRTPDTMFSrc;

The opaque GstRTPDTMFSrc data structure.

-

Members

+

Members

@@ -348,7 +347,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtph261depay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtph261depay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtph261depay.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtph261depay.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,184 @@ + + + + +rtph261depay: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + +
+ + + + + + +
+
+
+ + +
+

rtph261depay

+

rtph261depay

+
+
+

Types and Values

+
++++ + + + + +
structGstRtpH261Depay
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GInitiallyUnowned
+        ╰── GstObject
+            ╰── GstElement
+                ╰── GstRTPBaseDepayload
+                    ╰── GstRtpH261Depay
+
+
+
+

Description

+

Extract encoded H.261 video frames from RTP packets according to RFC 4587. +For detailed information see: https://www.rfc-editor.org/rfc/rfc4587.txt

+

The depayloader takes an RTP packet and extracts its H.261 stream. It +aggregates the extracted stream until a complete frame is received before +it pushes it downstream.

+
+

Example pipeline

+
+ + + + + + + +
1
gst-launch-1.0 udpsrc caps='application/x-rtp, payload=31' ! rtph261depay ! avdec_h261 ! autovideosink
+
+ This example pipeline will depayload and decode an RTP H.261 video stream. +Refer to the rtph261pay example to create the RTP stream. +
+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ rtp +

author

Stian Selnes <stian@pexip.com>

class

Codec/Depayloader/Network/RTP
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + + + + + +

name

sink

direction

sink

presence

always

details

application/x-rtp, media=(string)video, payload=(int)31, clock-rate=(int)90000, encoding-name=(string)H261

application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)H261
+
++++ + + + + + + + + + + + + + + + + + + +

name

src

direction

source

presence

always

details

video/x-h261
+
+
+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstRtpH261Depay

+
struct GstRtpH261Depay;
+
+
+
+

See Also

+

rtph261pay

+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtph261pay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtph261pay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtph261pay.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtph261pay.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,190 @@ + + + + +rtph261pay: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

rtph261pay

+

rtph261pay

+
+
+

Types and Values

+
++++ + + + + +
structGstRtpH261Pay
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GInitiallyUnowned
+        ╰── GstObject
+            ╰── GstElement
+                ╰── GstRTPBasePayload
+                    ╰── GstRtpH261Pay
+
+
+
+

Description

+

Payload encoded H.261 video frames into RTP packets according to RFC 4587. +For detailed information see: https://www.rfc-editor.org/rfc/rfc4587.txt

+

The payloader takes a H.261 frame, parses it and splits it into fragments +on MB boundaries in order to match configured MTU size. For each fragment +an RTP packet is constructed with an RTP packet header followed by the +fragment. In addition the payloader will make sure the packetized H.261 +stream appears as a continuous bit-stream after depacketization by shifting +the encoded bit-stream of a frame to align with the last significant bit of +the previous frame. This helps interoperability in the case where the +encoder does not produce a continuous bit-stream but the decoder requires +it.

+
+

Example launch line

+
+ + + + + + + +
1
gst-launch-1.0 videotestsrc ! avenc_h261 ! rtph261pay ! udpsink
+
+ This will encode a test video and payload it. Refer to the rtph261depay +example to depayload and play the RTP stream. +
+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ rtp +

author

Stian Selnes <stian@pexip.com>

class

Codec/Payloader/Network/RTP
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

sink

direction

sink

presence

always

details

video/x-h261
+
++++ + + + + + + + + + + + + + + + + + + + + + + +

name

src

direction

source

presence

always

details

application/x-rtp, media=(string)video, payload=(int)31, clock-rate=(int)90000, encoding-name=(string)H261

application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)H261
+
+
+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstRtpH261Pay

+
struct GstRtpH261Pay;
+
+
+
+

See Also

+

rtph261depay

+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpj2kpay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpj2kpay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpj2kpay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpj2kpay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpj2kpay +rtpj2kpay: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -16,38 +16,22 @@ Top  |  Description  |  - Object Hierarchy  |  - Properties + Object Hierarchy Home Up -Prev -Next +Prev +Next

rtpj2kpay

-

rtpj2kpay — Payload-encodes JPEG 2000 pictures into RTP packets (RFC 5371)

+

rtpj2kpay

-
-

Properties

-
----- - - - - - -
gbooleanbuffer-listRead / Write
-

Types and Values

@@ -81,7 +65,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -107,7 +91,7 @@
-

Element Pads

+

Element Pads

@@ -158,34 +142,20 @@
-

-

Functions

+

Types and Values

struct GstRtpJ2KPay

struct GstRtpJ2KPay;
-

-

-
-
-
-

Property Details

-
-

The “buffer-list” property

-
  “buffer-list”              gboolean
-

Use Buffer Lists.

-

Flags: Read / Write

-

Default value: TRUE

+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpjitterbuffer +rtpjitterbuffer: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

rtpjitterbuffer

-

rtpjitterbuffer — A buffer that deals with network jitter and other transmission faults

+

rtpjitterbuffer

@@ -64,7 +64,7 @@ Read / Write -RTPJitterBufferMode +RTPJitterBufferMode mode Read / Write @@ -104,6 +104,26 @@ stats Read + +guint +rtx-min-delay +Read / Write + + +gint +rtx-min-retry-timeout +Read / Write + + +gint +rtx-max-retries +Read / Write + + +gboolean +rtx-next-seqnum +Read / Write +
@@ -119,28 +139,28 @@ void clear-pt-map -Action +Action void handle-sync -Run Last +Run Last void on-npt-stop -Run Last +Run Last GstCaps* request-pt-map -Run Last +Run Last guint64 set-active -Action +Action @@ -218,7 +238,7 @@ to the pipeline.

This element will automatically be used inside rtpbin.

-

Example pipelines

+

Example pipelines

@@ -236,7 +256,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -262,7 +282,7 @@
-

Element Pads

+

Element Pads

@@ -283,7 +303,7 @@ - +

details

application/x-rtp, clock-rate=(int)[ 1, 2147483647 ]application/x-rtp
@@ -337,11 +357,10 @@
-

-

Functions

+

Types and Values

@@ -390,7 +409,7 @@

The “mode” property

-
  “mode”                     RTPJitterBufferMode
+
  “mode”                     RTPJitterBufferMode

Control the buffering and timestamping mode used by the jitterbuffer.

Flags: Read / Write

Default value: Slave receiver to sender clock

@@ -412,7 +431,7 @@ late and should be retransmitted.

Flags: Read / Write

Default value: FALSE

-

Since 1.2

+

Since: 1.2


@@ -424,7 +443,7 @@

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: -1

-

Since 1.2

+

Since: 1.2


@@ -437,7 +456,7 @@

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: 3

-

Since 1.2

+

Since: 1.2


@@ -449,7 +468,7 @@

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: -1

-

Since 1.2

+

Since: 1.2


@@ -466,12 +485,74 @@
  “stats”                    GstStructure *

Various jitterbuffer statistics. This property returns a GstStructure with name application/x-rtp-jitterbuffer-stats with the following fields:

-

"rtx-count" G_TYPE_UINT64 The number of retransmissions requested - "rtx-success-count" G_TYPE_UINT64 The number of successful retransmissions - "rtx-per-packet" G_TYPE_DOUBLE Average number of RTX per packet - "rtx-rtt" G_TYPE_UINT64 Average round trip time per RTX

+
    +
  • + guint64 + "rtx-count": + the number of retransmissions requested. +

  • +
  • + guint64 + "rtx-success-count": + the number of successful retransmissions. +

  • +
  • + gdouble + "rtx-per-packet": + average number of RTX per packet. +

  • +
  • + guint64 + "rtx-rtt": + average round trip time per RTX. +

  • +

Flags: Read

-

Since 1.4

+

Since: 1.4

+
+
+
+

The “rtx-min-delay” property

+
  “rtx-min-delay”            guint
+

When a packet did not arrive at the expected time, wait at least this extra amount +of time before sending a retransmission event.

+

Flags: Read / Write

+

Default value: 0

+

Since: 1.6

+
+
+
+

The “rtx-min-retry-timeout” property

+
  “rtx-min-retry-timeout”    gint
+

Minimum timeout between sending a transmission event in ms (-1 automatic).

+

Flags: Read / Write

+

Allowed values: >= G_MAXULONG

+

Default value: -1

+
+
+
+

The “rtx-max-retries” property

+
  “rtx-max-retries”          gint
+

The maximum number of retries to request a retransmission.

+

This implies that as maximum (rtx-max-retries + 1) retransmissions will be requested. +When -1 is used, the number of retransmission request will not be limited.

+

Flags: Read / Write

+

Allowed values: >= G_MAXULONG

+

Default value: -1

+

Since: 1.6

+
+
+
+

The “rtx-next-seqnum” property

+
  “rtx-next-seqnum”          gboolean
+

Estimate when the next packet should arrive and schedule a retransmission +request for it. +This is, when packet N arrives, a GstRTPRetransmission event is schedule +for packet N+1. So it will be requested if it does not arrive at the expected time. +The expected time is calculated using the dts of N and the packet spacing.

+

Flags: Read / Write

+

Default value: TRUE

+

Since: 1.6

@@ -484,7 +565,7 @@

Invalidate the clock-rate as obtained with the “request-pt-map” signal.

-

Parameters

+

Parameters

@@ -505,7 +586,7 @@
-

Flags: Action

+

Flags: Action


@@ -516,7 +597,7 @@ gpointer user_data)

Be notified of new sync values.

-

Parameters

+

Parameters

@@ -542,7 +623,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -553,7 +634,7 @@

Signal that the jitterbufer has pushed the RTP packet that corresponds to the npt-stop position.

-

Parameters

+

Parameters

@@ -574,7 +655,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -586,7 +667,7 @@

Request the payload type as GstCaps for pt .

-

Parameters

+

Parameters

@@ -612,7 +693,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -625,7 +706,7 @@

Start pushing out packets with the given base time. This signal is only useful in buffering mode.

-

Parameters

+

Parameters

@@ -647,16 +728,14 @@
-

Returns

+

Returns

the time of the last pushed packet.

-

-

Flags: Action

+

Flags: Action

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpjpegpay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpjpegpay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpjpegpay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpjpegpay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpjpegpay +rtpjpegpay: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

rtpjpegpay

-

rtpjpegpay — Payload-encodes JPEG pictures into RTP packets (RFC 2435)

+

rtpjpegpay

@@ -52,11 +52,6 @@ type Read / Write - -gboolean -buffer-list -Read / Write -
@@ -94,7 +89,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -120,7 +115,7 @@
-

Element Pads

+

Element Pads

@@ -171,23 +166,24 @@ + + + +

details

application/x-rtp, media=(string)video, payload=(int)26, clock-rate=(int)90000, encoding-name=(string)JPEG, width=(int)[ 1, 65536 ], height=(int)[ 1, 65536 ]

application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)JPEG, width=(int)[ 1, 65536 ], height=(int)[ 1, 65536 ]
-

-

Functions

+

Types and Values

struct GstRtpJPEGPay

struct GstRtpJPEGPay;
-

-

@@ -209,18 +205,9 @@

Allowed values: [0,255]

Default value: 1

-
-
-

The “buffer-list” property

-
  “buffer-list”              gboolean
-

Use Buffer Lists.

-

Flags: Read / Write

-

Default value: FALSE

-
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpklvdepay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpklvdepay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpklvdepay.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpklvdepay.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,177 @@ + + + + +rtpklvdepay: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

rtpklvdepay

+

rtpklvdepay

+
+
+

Types and Values

+
++++ + + + + +
structGstRtpKlvDepay
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GInitiallyUnowned
+        ╰── GstObject
+            ╰── GstElement
+                ╰── GstRTPBaseDepayload
+                    ╰── GstRtpKlvDepay
+
+
+
+

Description

+

Extract KLV metadata from RTP packets according to RFC 6597. +For detailed information see: http://tools.ietf.org/html/rfc6597

+
+

Example pipeline

+
+ + + + + + + +
1
gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)application, clock-rate=(int)90000, encoding-name=(string)SMPTE336M' ! rtpklvdepay ! fakesink dump=true
+
+ This example pipeline will depayload an RTP KLV stream and display +a hexdump of the KLV data on stdout. +
+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ rtp +

author

Tim-Philipp Müller <tim@centricular.com>

class

Codec/Depayloader/Network/RTP
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

sink

direction

sink

presence

always

details

application/x-rtp, media=(string)application, clock-rate=(int)[ 1, 2147483647 ], encoding-name=(string)SMPTE336M
+
++++ + + + + + + + + + + + + + + + + + + +

name

src

direction

source

presence

always

details

meta/x-klv, parsed=(boolean)true
+
+
+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstRtpKlvDepay

+
struct GstRtpKlvDepay;
+
+
+
+

See Also

+

rtpklvpay

+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpklvpay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpklvpay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpklvpay.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpklvpay.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,177 @@ + + + + +rtpklvpay: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

rtpklvpay

+

rtpklvpay

+
+
+

Types and Values

+
++++ + + + + +
structGstRtpKlvPay
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GInitiallyUnowned
+        ╰── GstObject
+            ╰── GstElement
+                ╰── GstRTPBasePayload
+                    ╰── GstRtpKlvPay
+
+
+
+

Description

+

Payloads KLV metadata into RTP packets according to RFC 6597. +For detailed information see: http://tools.ietf.org/html/rfc6597

+
+

Example pipeline

+
+ + + + + + + +
1
gst-launch-1.0 filesrc location=video-with-klv.ts ! tsdemux ! rtpklvpay ! udpsink
+
+ This example pipeline will payload an RTP KLV stream extracted from an +MPEG-TS stream and send it via UDP to an RTP receiver. +
+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ rtp +

author

Tim-Philipp Müller <tim@centricular.com>

class

Codec/Payloader/Network/RTP
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

sink

direction

sink

presence

always

details

meta/x-klv, parsed=(boolean)true
+
++++ + + + + + + + + + + + + + + + + + + +

name

src

direction

source

presence

always

details

application/x-rtp, media=(string)application, clock-rate=(int)[ 1, 2147483647 ], encoding-name=(string)SMPTE336M
+
+
+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstRtpKlvPay

+
struct GstRtpKlvPay;
+
+
+
+

See Also

+

rtpklvdepay

+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpL16depay +rtpL16depay: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

rtpL16depay

-

rtpL16depay — Extracts raw audio from RTP packets

+

rtpL16depay

@@ -60,13 +60,13 @@

Extract raw audio from RTP packets according to RFC 3551. For detailed information see: http://www.rfc-editor.org/rfc/rfc3551.txt

-

Example pipeline

+

Example pipeline

- +
1
gst-launch udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL16depay ! pulsesink
gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL16depay ! pulsesink
@@ -77,7 +77,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -103,7 +103,7 @@
-

Element Pads

+

Element Pads

@@ -158,19 +158,16 @@
-

-

Functions

+

Types and Values

struct GstRtpL16Depay

struct GstRtpL16Depay;
-

-

@@ -179,7 +176,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpL16pay +rtpL16pay: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -21,14 +21,14 @@ Home Up Prev -Next +Next

rtpL16pay

-

rtpL16pay — Payload-encode Raw audio into RTP packets (RFC 3551)

+

rtpL16pay

@@ -61,13 +61,13 @@

Payload raw audio into RTP packets according to RFC 3551. For detailed information see: http://www.rfc-editor.org/rfc/rfc3551.txt

-

Example pipeline

+

Example pipeline

- +
1
gst-launch -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink
gst-launch-1.0 -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink
@@ -78,7 +78,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -104,7 +104,7 @@
-

Element Pads

+

Element Pads

@@ -163,19 +163,16 @@
-

-

Functions

+

Types and Values

struct GstRtpL16Pay

struct GstRtpL16Pay;
-

-

@@ -184,7 +181,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpmux +rtpmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -21,7 +21,7 @@ Home Up -Prev +Prev Next
@@ -29,7 +29,7 @@

rtpmux

-

rtpmux — multiplex N rtp streams into one

+

rtpmux

@@ -93,7 +93,7 @@

The rtp muxer takes multiple RTP streams having the same clock-rate and muxes into a single stream with a single SSRC.

-

Example pipelines

+

Example pipelines

@@ -104,7 +104,7 @@ 4 5 6 - - +
gst-launch rtpmux name=mux ! udpsink host=127.0.0.1 port=8888        \
+        
gst-launch-1.0 rtpmux name=mux ! udpsink host=127.0.0.1 port=8888        \
              alsasrc ! alawenc ! rtppcmapay !                        \
              application/x-rtp, payload=8, rate=8000 ! mux.sink_0    \
              audiotestsrc is-live=1 !                                \
@@ -122,7 +122,7 @@
 

Synopsis

-

Element Information

+

Element Information

@@ -148,7 +148,7 @@
-

Element Pads

+

Element Pads

@@ -199,11 +199,10 @@
-

-

Functions

+

Types and Values

@@ -255,7 +254,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpptdemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpptdemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpptdemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpptdemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpptdemux +rtpptdemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@
Home Up PrevNextNext

rtpptdemux

-

rtpptdemux — Parses codec streams transmitted in the same RTP session

+

rtpptdemux

@@ -45,23 +45,23 @@ void clear-pt-map -Action +Action void new-payload-type -Run Last +Run Last void payload-type-change -Run Last +Run Last GstCaps* request-pt-map -Run Last +Run Last
@@ -97,11 +97,11 @@ “new-payload-type” signal will be emitted. When the payload for the RTP stream changes, the “payload-type-change” signal will be emitted.

-

The element will try to set complete and unique application/x-rtp caps on the -outgoing buffers and pads based on the result of the -“request-pt-map” signal.

+

The element will try to set complete and unique application/x-rtp caps +on the output pads based on the result of the “request-pt-map” +signal.

-

Example pipelines

+

Example pipelines

@@ -118,7 +118,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -144,7 +144,7 @@
-

Element Pads

+

Element Pads

@@ -195,19 +195,16 @@
-

-

Functions

+

Types and Values

struct GstRtpPtDemux

struct GstRtpPtDemux;
-

-

@@ -220,7 +217,7 @@

The application can call this signal to instruct the element to discard the currently cached payload type map.

-

Parameters

+

Parameters

@@ -241,7 +238,7 @@
-

Flags: Action

+

Flags: Action


@@ -254,7 +251,7 @@

Emited when a new payload type pad has been created in demux .

-

Parameters

+

Parameters

@@ -285,7 +282,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -296,7 +293,7 @@ gpointer user_data)

Emited when the payload type changed.

-

Parameters

+

Parameters

@@ -322,7 +319,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -334,7 +331,7 @@

Request the payload type as GstCaps for pt .

-

Parameters

+

Parameters

@@ -360,12 +357,11 @@
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtprtxreceive.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtprtxreceive.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtprtxreceive.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtprtxreceive.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtprtxreceive +rtprtxreceive: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

rtprtxreceive

-

rtprtxreceive — Receive retransmitted RTP packets according to RFC4588

+

rtprtxreceive

@@ -43,11 +43,6 @@ -string -rtx-payload-types -Read / Write - - guint num-rtx-requests Read @@ -109,7 +104,7 @@ it can depayload and forward them to the source pad of the element. RTX is SSRC-multiplexed. See GstRtpRtxSend

-

Example pipelines

+

Example pipelines

@@ -242,7 +237,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -268,7 +263,7 @@
-

Element Pads

+

Element Pads

@@ -319,32 +314,21 @@
-

-

Functions

+

Types and Values

struct GstRtpRtxReceive

struct GstRtpRtxReceive;
-

-

Property Details

-

The “rtx-payload-types” property

-
  “rtx-payload-types”        string
-

Set through SDP (fmtp), it helps to detect restransmission streams.

-

Flags: Read / Write

-

Default value: ""

-
-
-

The “num-rtx-requests” property

  “num-rtx-requests”         guint

Number of retransmission events received.

@@ -381,7 +365,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtprtxsend.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtprtxsend.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtprtxsend.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtprtxsend.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtprtxsend +rtprtxsend: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

rtprtxsend

-

rtprtxsend — Retransmit RTP packets when needed, according to RFC4588

+

rtprtxsend

@@ -44,11 +44,6 @@ guint -rtx-payload-type -Read / Write - - -guint max-size-time Read / Write @@ -117,7 +112,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -143,7 +138,7 @@
-

Element Pads

+

Element Pads

@@ -194,32 +189,21 @@
-

-

Functions

+

Types and Values

struct GstRtpRtxSend

struct GstRtpRtxSend;
-

-

Property Details

-

The “rtx-payload-type” property

-
  “rtx-payload-type”         guint
-

Payload type of the retransmission stream (fmtp in SDP).

-

Flags: Read / Write

-

Default value: 0

-
-
-

The “max-size-time” property

  “max-size-time”            guint

Amount of ms to queue (0 = unlimited).

@@ -268,7 +252,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpsbcpay.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpsbcpay.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpsbcpay.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpsbcpay.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpsbcpay +rtpsbcpay: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

rtpsbcpay

-

rtpsbcpay — Payload SBC audio as RTP packets

+

rtpsbcpay

@@ -76,7 +76,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -102,7 +102,7 @@
-

Element Pads

+

Element Pads

@@ -153,19 +153,16 @@
-

-

Functions

+

Types and Values

struct GstRtpSBCPay

struct GstRtpSBCPay;
-

-

@@ -181,7 +178,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpsession +rtpsession: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -22,7 +22,7 @@ Home Up -Prev +Prev Next
@@ -30,7 +30,7 @@

rtpsession

-

rtpsession — Implement an RTP session

+

rtpsession

@@ -55,11 +55,6 @@ Read -guint64 -ntp-ns-base -Read / Write - - guint num-active-sources Read @@ -111,6 +106,16 @@ stats Read + +GstRTPProfile +rtp-profile +Read / Write + + +GstRtpNtpTimeSource +ntp-time-source +Read / Write +
@@ -126,58 +131,58 @@ void clear-pt-map -Action +Action void on-bye-ssrc -Run Last +Run Last void on-bye-timeout -Run Last +Run Last void on-new-ssrc -Run Last +Run Last void on-sender-timeout -Run Last +Run Last void on-ssrc-active -Run Last +Run Last void on-ssrc-collision -Run Last +Run Last void on-ssrc-sdes -Run Last +Run Last void on-ssrc-validated -Run Last +Run Last void on-timeout -Run Last +Run Last GstCaps* request-pt-map -Run Last +Run Last @@ -243,7 +248,7 @@ mapping. One can clear the cached values with the “clear-pt-map” signal.

-

Example pipelines

+

Example pipelines

@@ -311,7 +316,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -337,7 +342,7 @@
-

Element Pads

+

Element Pads

@@ -508,19 +513,16 @@
-

-

Functions

+

Types and Values

struct GstRtpSession

struct GstRtpSession;
-

-

@@ -531,7 +533,7 @@

The bandwidth of the session in bytes per second (0 for auto-discover).

Flags: Read / Write

Allowed values: >= 0

-

Default value: 64000

+

Default value: 0


@@ -542,14 +544,6 @@

-

The “ntp-ns-base” property

-
  “ntp-ns-base”              guint64
-

The NTP base time corresponding to running_time 0 (deprecated).

-

Flags: Read / Write

-

Default value: 0

-
-
-

The “num-active-sources” property

  “num-active-sources”       guint

The number of active sources in the session.

@@ -571,7 +565,7 @@

The RTCP bandwidth of the session in bytes per second (or as a real fraction of the RTP bandwidth if < 1.0).

Flags: Read / Write

Allowed values: >= 0

-

Default value: 3200

+

Default value: 0.05


@@ -602,7 +596,7 @@

The “use-pipeline-clock” property

  “use-pipeline-clock”       gboolean
-

Use the pipeline running-time to set the NTP time in the RTCP SR messages.

+

Use the pipeline running-time to set the NTP time in the RTCP SR messages (DEPRECATED: Use ntp-time-source property).

Flags: Read / Write

Default value: FALSE

@@ -629,6 +623,22 @@

Various statistics.

Flags: Read

+
+
+

The “rtp-profile” property

+
  “rtp-profile”              GstRTPProfile
+

RTP profile to use.

+

Flags: Read / Write

+

Default value: GST_RTP_PROFILE_AVP

+
+
+
+

The “ntp-time-source” property

+
  “ntp-time-source”          GstRtpNtpTimeSource
+

NTP time source for RTCP packets.

+

Flags: Read / Write

+

Default value: NTP time based on realtime clock

+

Signal Details

@@ -639,7 +649,7 @@ gpointer user_data)

Clear the cached pt-maps requested with “request-pt-map”.

-

Parameters

+

Parameters

@@ -660,7 +670,7 @@
-

Flags: Action

+

Flags: Action


@@ -671,7 +681,7 @@ gpointer user_data)

Notify of an SSRC that became inactive because of a BYE packet.

-

Parameters

+

Parameters

@@ -697,7 +707,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -708,7 +718,7 @@ gpointer user_data)

Notify of an SSRC that has timed out because of BYE

-

Parameters

+

Parameters

@@ -734,7 +744,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -746,7 +756,7 @@

Notify of a new SSRC that entered session .

-

Parameters

+

Parameters

@@ -772,7 +782,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -783,7 +793,7 @@ gpointer user_data)

Notify of a sender SSRC that has timed out and became a receiver

-

Parameters

+

Parameters

@@ -809,7 +819,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -818,31 +828,7 @@ user_function (GstRtpSession *gstrtpsession, guint arg1, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstrtpsession

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last


@@ -851,31 +837,7 @@ user_function (GstRtpSession *gstrtpsession, guint arg1, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstrtpsession

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last


@@ -886,7 +848,7 @@ gpointer user_data)

Notify that a new SDES was received for SSRC.

-

Parameters

+

Parameters

@@ -912,7 +874,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -921,31 +883,7 @@ user_function (GstRtpSession *gstrtpsession, guint arg1, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstrtpsession

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last


@@ -956,7 +894,7 @@ gpointer user_data)

Notify of an SSRC that has timed out

-

Parameters

+

Parameters

@@ -982,7 +920,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -994,7 +932,7 @@

Request the payload type as GstCaps for pt .

-

Parameters

+

Parameters

@@ -1020,7 +958,7 @@
-

Flags: Run Last

+

Flags: Run Last

@@ -1029,7 +967,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpssrcdemux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpssrcdemux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtpssrcdemux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtpssrcdemux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtpssrcdemux +rtpssrcdemux: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

rtpssrcdemux

-

rtpssrcdemux — Splits RTP streams based on the SSRC

+

rtpssrcdemux

@@ -45,17 +45,17 @@ void clear-ssrc -Action +Action void new-ssrc-pad -Run Last +Run Last void removed-ssrc-pad -Run Last +Run Last
@@ -90,7 +90,7 @@

For each SSRC that is detected, a new pad will be created and the “new-ssrc-pad” signal will be emitted.

-

Example pipelines

+

Example pipelines

@@ -107,7 +107,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -133,7 +133,7 @@
-

Element Pads

+

Element Pads

@@ -232,19 +232,16 @@
-

-

Functions

+

Types and Values

struct GstRtpSsrcDemux

struct GstRtpSsrcDemux;
-

-

@@ -257,7 +254,7 @@ gpointer user_data)

Action signal to remove the pad for SSRC.

-

Parameters

+

Parameters

@@ -283,7 +280,7 @@
-

Flags: Action

+

Flags: Action


@@ -295,7 +292,7 @@ gpointer user_data)

Emited when a new SSRC pad has been created.

-

Parameters

+

Parameters

@@ -326,7 +323,7 @@
-

Flags: Run Last

+

Flags: Run Last


@@ -338,7 +335,7 @@ gpointer user_data)

Emited when a SSRC pad has been removed.

-

Parameters

+

Parameters

@@ -369,12 +366,11 @@
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: rtspsrc +rtspsrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -23,15 +23,15 @@ Home Up -Prev -Next +Prev +Next

rtspsrc

-

rtspsrc — Receive data over the network via RTSP (RFC 2326)

+

rtspsrc

@@ -204,6 +204,28 @@ tls-validation-flags Read / Write + +gboolean +do-retransmission +Read / Write + + + +GTlsInteraction * +tls-interaction +Read / Write + + +GstRTSPSrcNtpTimeSource +ntp-time-source +Read / Write + + + +gchar * +user-agent +Read / Write +
@@ -229,18 +251,18 @@ gboolean select-stream -Run First +Run First void new-manager -Run First +Run First GstCaps* request-rtcp-key -Run Last +Run Last @@ -284,7 +306,7 @@ UDP unicast/UDP multicast/TCP. The order cannot be changed but the allowed protocols can be controlled with the “protocols” property.

rtspsrc currently understands SDP as the format of the session description. -For each stream listed in the SDP a new rtp_streamd pad will be created +For each stream listed in the SDP a new rtp_stream%d pad will be created with caps derived from the SDP media description. This is a caps of mime type "application/x-rtp" that can be connected to any available RTP depayloader element.

@@ -295,7 +317,7 @@

rtspsrc acts like a live source and will therefore only generate data in the PLAYING state.

-

Example launch line

+

Example launch line

@@ -312,7 +334,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -338,7 +360,7 @@
-

Element Pads

+

Element Pads

@@ -369,19 +391,16 @@
-

-

Functions

+

Types and Values

struct GstRTSPSrc

struct GstRTSPSrc;
-

-

@@ -577,7 +596,7 @@ "proxy" property contains a user-id already, that will take precedence.

Flags: Read / Write

Default value: ""

-

Since 1.2

+

Since: 1.2


@@ -587,7 +606,7 @@ "proxy" property contains a password already, that will take precedence.

Flags: Read / Write

Default value: ""

-

Since 1.2

+

Since: 1.2


@@ -609,7 +628,7 @@

The “use-pipeline-clock” property

  “use-pipeline-clock”       gboolean
-

Use the pipeline running-time to set the NTP time in the RTCP SR messages.

+

Use the pipeline running-time to set the NTP time in the RTCP SR messages(DEPRECATED: Use ntp-time-source property).

Flags: Read / Write

Default value: FALSE

@@ -635,6 +654,37 @@

Flags: Read / Write

Default value: G_TLS_CERTIFICATE_UNKNOWN_CA|G_TLS_CERTIFICATE_BAD_IDENTITY|G_TLS_CERTIFICATE_NOT_ACTIVATED|G_TLS_CERTIFICATE_EXPIRED|G_TLS_CERTIFICATE_REVOKED|G_TLS_CERTIFICATE_INSECURE|G_TLS_CERTIFICATE_GENERIC_ERROR

+
+
+

The “do-retransmission” property

+
  “do-retransmission”        gboolean
+

Ask the server to retransmit lost packets.

+

Flags: Read / Write

+

Default value: TRUE

+
+
+
+

The “tls-interaction” property

+
  “tls-interaction”          GTlsInteraction *
+

A GTlsInteraction object to promt the user for password or certificate.

+

Flags: Read / Write

+
+
+
+

The “ntp-time-source” property

+
  “ntp-time-source”          GstRTSPSrcNtpTimeSource
+

NTP time source for RTCP packets.

+

Flags: Read / Write

+

Default value: NTP time based on realtime clock

+
+
+
+

The “user-agent” property

+
  “user-agent”               gchar *
+

The User-Agent string to send to the server.

+

Flags: Read / Write

+

Default value: "GStreamer/1.6.1"

+

Signal Details

@@ -652,10 +702,10 @@ do any state changes on rtspsrc because this might deadlock. If you want to modify the state as a result of this signal, post a -GST_MESSAGE_REQUEST_STATE message on the bus or signal the main thread +GST_MESSAGE_REQUEST_STATE message on the bus or signal the main thread in some other way.

-

Parameters

+

Parameters

@@ -686,7 +736,7 @@
-

Since 1.2

+

Since: 1.2


@@ -702,10 +752,10 @@ do any state changes on rtspsrc because this might deadlock. If you want to modify the state as a result of this signal, post a -GST_MESSAGE_REQUEST_STATE message on the bus or signal the main thread +GST_MESSAGE_REQUEST_STATE message on the bus or signal the main thread in some other way.

-

Parameters

+

Parameters

@@ -731,7 +781,7 @@
-

Since 1.2

+

Since: 1.2


@@ -746,7 +796,7 @@ caps .

-

Parameters

+

Parameters

@@ -778,13 +828,12 @@
-

Returns

+

Returns

TRUE when the stream should be selected, FALSE when the stream is to be ignored.

-

-

Flags: Run First

-

Since 1.2

+

Flags: Run First

+

Since: 1.2


@@ -796,7 +845,7 @@

Emited after a new manager (like rtpbin) was created and the default properties were configured.

-

Parameters

+

Parameters

@@ -822,8 +871,8 @@
-

Flags: Run First

-

Since 1.4

+

Flags: Run First

+

Since: 1.4


@@ -836,7 +885,7 @@ stream. User should provide the key and the RTCP encryption ciphers and authentication, and return them wrapped in a GstCaps.

-

Parameters

+

Parameters

@@ -862,13 +911,12 @@
-

Flags: Run Last

-

Since 1.4

+

Flags: Run Last

+

Since: 1.4

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-sbcparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-sbcparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-sbcparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-sbcparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: sbcparse +sbcparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

sbcparse

-

sbcparse — Parses an SBC bluetooth audio stream

+

sbcparse

@@ -62,7 +62,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -72,7 +72,7 @@ @@ -88,7 +88,7 @@
-

Element Pads

+

Element Pads

plugin

- audioparsers + audioparsers
@@ -139,19 +139,16 @@
-

-

Functions

+

Types and Values

struct GstSbcParse

struct GstSbcParse;
-

-

@@ -160,7 +157,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: scaletempo +scaletempo: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

scaletempo

-

scaletempo — Sync audio tempo with playback rate

+

scaletempo

@@ -95,7 +95,7 @@ Inspired by SoundTouch library by Olli Parviainen

Use Sceletempo to apply playback rates without the chipmunk effect.

-

Example pipelines

+

Example pipelines

@@ -148,7 +148,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -174,7 +174,7 @@
-

Element Pads

+

Element Pads

@@ -233,19 +233,16 @@
-

-

Functions

+

Types and Values

struct GstScaletempo

struct GstScaletempo;
-

-

@@ -288,7 +285,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-shagadelictv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-shagadelictv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-shagadelictv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-shagadelictv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: shagadelictv +shagadelictv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -28,7 +28,7 @@

shagadelictv

-

shagadelictv — Oh behave, ShagedelicTV makes images shagadelic!

+

shagadelictv

@@ -60,7 +60,7 @@

Description

Oh behave, ShagedelicTV makes images shagadelic!

-

Example launch line

+

Example launch line

@@ -76,7 +76,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -102,7 +102,7 @@
-

Element Pads

+

Element Pads

@@ -153,24 +153,20 @@
-

-

Functions

+

Types and Values

struct GstShagadelicTV

struct GstShagadelicTV;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-shapewipe.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-shapewipe.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-shapewipe.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-shapewipe.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: shapewipe +shapewipe: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

shapewipe

-

shapewipe — Adds a shape wipe transition to a video stream

+

shapewipe

@@ -86,7 +86,7 @@

Transition bitmaps can be downloaded from the

Cinelerra transition

page.

-

Example launch line

+

Example launch line

@@ -102,7 +102,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -128,7 +128,7 @@
-

Element Pads

+

Element Pads

@@ -207,19 +207,16 @@
-

-

Functions

+

Types and Values

struct GstShapeWipe

struct GstShapeWipe;
-

-

@@ -244,7 +241,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-shout2send.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-shout2send.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-shout2send.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-shout2send.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: shout2send +shout2send: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -24,14 +24,14 @@ Home Up Prev -Next +Next

shout2send

-

shout2send — Sends data to an icecast server

+

shout2send

@@ -91,11 +91,6 @@ Read / Write -gboolean -sync -Read / Write - - gchar * url @@ -164,7 +159,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -190,7 +185,7 @@
-

Element Pads

+

Element Pads

@@ -237,19 +232,16 @@
-

-

Functions

+

Types and Values

struct GstShout2send

struct GstShout2send;
-

-

@@ -320,14 +312,6 @@

-

The “sync” property

-
  “sync”                     gboolean
-

Sync on the clock.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-

The “url” property

  “url”                      gchar *

the stream's homepage URL.

@@ -359,36 +343,11 @@ user_function (GstShout2send *gstshout2send, gint arg1, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstshout2send

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-

Flags: Cleanup

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smokedec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smokedec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smokedec.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smokedec.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,87 @@ + + + + +smokedec: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

smokedec

+

smokedec

+
+
+

Types and Values

+
++++ + + + + +
structGstSmokeDec
+
+
+

Description

+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstSmokeDec

+
struct GstSmokeDec {
+  GstElement element;
+
+  /* pads */
+  GstPad *sinkpad,*srcpad;
+
+  /* video state */
+  gint format;
+  gint width;
+  gint height;
+  gint fps_num;
+  gint fps_denom;
+  GstClockTime next_time;
+
+  SmokeCodecInfo *info;
+
+  gint threshold;
+  gint quality;
+  gint smoothing;
+
+  gboolean need_keyframe;
+};
+
+
+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smokeenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smokeenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smokeenc.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smokeenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,87 @@ + + + + +smokeenc: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

smokeenc

+

smokeenc

+
+
+

Types and Values

+
++++ + + + + +
structGstSmokeEnc
+
+
+

Description

+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstSmokeEnc

+
struct GstSmokeEnc {
+  GstElement element;
+
+  /* pads */
+  GstPad *sinkpad,*srcpad;
+
+  /* video state */
+  gint format;
+  gint width;
+  gint height;
+  gint frame;
+  gint keyframe;
+  gint fps_num, fps_denom;
+
+  SmokeCodecInfo *info;
+
+  gint threshold;
+  gint min_quality;
+  gint max_quality;
+
+  gboolean need_header;
+};
+
+
+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smptealpha.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smptealpha.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smptealpha.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smptealpha.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: smptealpha +smptealpha: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

smptealpha

-

smptealpha — Apply the standard SMPTE transitions as alpha on video images

+

smptealpha

@@ -107,7 +107,7 @@ A higher presision will create a mask with smoother gradients in order to avoid banding.

-

Sample pipelines

+

Sample pipelines

Here is a pipeline to demonstrate the smpte transition :

@@ -124,7 +124,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -150,7 +150,7 @@
-

Element Pads

+

Element Pads

@@ -241,19 +241,16 @@
-

-

Functions

+

Types and Values

struct GstSMPTEAlpha

struct GstSMPTEAlpha;
-

-

@@ -303,7 +300,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smpte.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smpte.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-smpte.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-smpte.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: smpte +smpte: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

smpte

-

smpte — Apply the standard SMPTE transitions on video images

+

smpte

@@ -53,11 +53,6 @@ Read / Write -gfloat -fps -Read / Write - - GstSMPTETransitionType type Read / Write @@ -106,7 +101,7 @@ higher presision will create a mask with smoother gradients in order to avoid banding.

-

Sample pipelines

+

Sample pipelines

@@ -125,7 +120,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -151,7 +146,7 @@
-

Element Pads

+

Element Pads

@@ -226,19 +221,16 @@
-

-

Functions

+

Types and Values

struct GstSMPTE

struct GstSMPTE;
-

-

@@ -262,15 +254,6 @@

-

The “fps” property

-
  “fps”                      gfloat
-

Frames per second if no input files are given (deprecated).

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 0

-
-
-

The “type” property

  “type”                     GstSMPTETransitionType

The type of transition to use.

@@ -296,7 +279,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: souphttpsrc +souphttpsrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -22,7 +22,7 @@ Home Up -Prev +Prev Next
@@ -30,7 +30,7 @@

souphttpsrc

-

souphttpsrc — Receive data as a client over the network via HTTP using SOUP

+

souphttpsrc

@@ -49,17 +49,11 @@ Read / Write -GStrv +GStrv cookies Read / Write - -gchar * -iradio-genre -Read - - gboolean iradio-mode Read / Write @@ -67,24 +61,6 @@ gchar * -iradio-name -Read - - - -gchar * -iradio-title -Read - - - -gchar * -iradio-url -Read - - - -gchar * location Read / Write @@ -146,7 +122,7 @@ Read / Write -SoupLoggerLogLevel +SoupLoggerLogLevel http-log-level Read / Write @@ -176,6 +152,18 @@ ssl-use-system-ca-file Read / Write + + +GTlsDatabase * +tls-database +Read / Write + + + +gchar * +method +Read / Write +
@@ -214,7 +202,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -240,7 +228,7 @@
-

Element Pads

+

Element Pads

@@ -267,19 +255,16 @@
-

-

Functions

+

Types and Values

struct GstSoupHTTPSrc

struct GstSoupHTTPSrc;
-

-

@@ -294,20 +279,12 @@

The “cookies” property

-
  “cookies”                  GStrv
+
  “cookies”                  GStrv

HTTP request cookies.

Flags: Read / Write


-

The “iradio-genre” property

-
  “iradio-genre”             gchar *
-

Genre of the stream.

-

Flags: Read

-

Default value: NULL

-
-
-

The “iradio-mode” property

  “iradio-mode”              gboolean

Enable internet radio mode (ask server to send shoutcast/icecast metadata interleaved with the actual stream data).

@@ -316,30 +293,6 @@

-

The “iradio-name” property

-
  “iradio-name”              gchar *
-

Name of the stream.

-

Flags: Read

-

Default value: NULL

-
-
-
-

The “iradio-title” property

-
  “iradio-title”             gchar *
-

Name of currently playing song.

-

Flags: Read

-

Default value: NULL

-
-
-
-

The “iradio-url” property

-
  “iradio-url”               gchar *
-

Homepage URL for radio stream.

-

Flags: Read

-

Default value: NULL

-
-
-

The “location” property

  “location”                 gchar *

Location to read from.

@@ -429,7 +382,7 @@

The “http-log-level” property

-
  “http-log-level”           SoupLoggerLogLevel
+
  “http-log-level”           SoupLoggerLogLevel

Set log level for soup's HTTP session log.

Flags: Read / Write

Default value: SOUP_LOGGER_LOG_HEADERS

@@ -475,10 +428,24 @@

Flags: Read / Write

Default value: TRUE

+
+
+

The “tls-database” property

+
  “tls-database”             GTlsDatabase *
+

TLS database with anchor certificate authorities used to validate the server certificate.

+

Flags: Read / Write

+
+
+
+

The “method” property

+
  “method”                   gchar *
+

The HTTP method to use (GET, HEAD, OPTIONS, etc).

+

Flags: Read / Write

+

Default value: NULL

+
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-spectrum.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-spectrum.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-spectrum.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-spectrum.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: spectrum +spectrum: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

spectrum

-

spectrum — Run an FFT on the audio signal, output spectrum data

+

spectrum

@@ -53,11 +53,6 @@ Read / Write -gboolean -message -Read / Write - - gint threshold Read / Write @@ -159,10 +154,10 @@

If “multi-channel” property is set to true. magnitude and phase -fields will be each a nested GstValueArray. The first dimension are the +fields will be each a nested GstValueArray. The first dimension are the channels and the second dimension are the values.

-

Example application

+

Example application

@@ -424,7 +419,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -450,7 +445,7 @@
-

Element Pads

+

Element Pads

@@ -501,19 +496,16 @@
-

-

Functions

+

Types and Values

struct GstSpectrum

struct GstSpectrum;
-

-

@@ -523,6 +515,7 @@
  “bands”                    guint

Number of frequency bands.

Flags: Read / Write

+

Allowed values: [2,1073741824]

Default value: 128


@@ -536,14 +529,6 @@
-

The “message” property

-
  “message”                  gboolean
-

Whether to post a 'spectrum' element message on the bus for each passed interval (deprecated, use post-messages).

-

Flags: Read / Write

-

Default value: TRUE

-
-
-

The “threshold” property

  “threshold”                gint

dB threshold for result. All lower values will be set to this.

@@ -586,7 +571,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-speexdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-speexdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-speexdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-speexdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: speexdec +speexdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ Home Up -Prev -Next +Prev +Next

speexdec

-

speexdec — decode speex streams to audio

+

speexdec

@@ -76,7 +76,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -102,7 +102,7 @@
-

Element Pads

+

Element Pads

@@ -153,19 +153,16 @@
-

-

Functions

+

Types and Values

struct GstSpeexDec

struct GstSpeexDec;
-

-

@@ -180,7 +177,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-speexenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-speexenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-speexenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-speexenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: speexenc +speexenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

speexenc

-

speexenc — Encodes audio in Speex format

+

speexenc

@@ -131,7 +131,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -157,7 +157,7 @@
-

Element Pads

+

Element Pads

@@ -212,19 +212,16 @@
-

-

Functions

+

Types and Values

struct GstSpeexEnc

struct GstSpeexEnc;
-

-

@@ -316,7 +313,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-splitfilesrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-splitfilesrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-splitfilesrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-splitfilesrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: splitfilesrc +splitfilesrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

splitfilesrc

-

splitfilesrc — Read a sequentially named set of files as if it was one large file

+

splitfilesrc

@@ -89,7 +89,7 @@ (and expects) shell-style wildcards (but only for the filename, not for directories). The results will be sorted.

-

Example launch lines

+

Example launch lines

@@ -116,7 +116,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -142,7 +142,7 @@
-

Element Pads

+

Element Pads

@@ -169,19 +169,16 @@
-

-

Functions

+

Types and Values

struct GstSplitFileSrc

struct GstSplitFileSrc;
-

-

@@ -200,7 +197,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-splitmuxsink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-splitmuxsink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-splitmuxsink.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-splitmuxsink.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,371 @@ + + + + +splitmuxsink: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

splitmuxsink

+

splitmuxsink — Muxer wrapper for splitting output stream by size or time

+
+
+

Properties

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+gchar *locationRead / Write
guint64max-size-bytesRead / Write
guint64max-size-timeRead / Write
gdoublemux-overheadRead / Write
+GstElement *muxerRead / Write
+GstElement *sinkRead / Write
+
+
+

Signals

+
+++++ + + + + + +
+gchar*format-locationRun Last
+
+
+

Types and Values

+
++++ + + + + +
structGstSplitMuxSink
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GInitiallyUnowned
+        ╰── GstObject
+            ╰── GstElement
+                ╰── GstBin
+                    ╰── GstSplitMuxSink
+
+
+
+

Implemented Interfaces

+

+GstSplitMuxSink implements + GstChildProxy.

+
+
+

Description

+

This element wraps a muxer and a sink, and starts a new file when the mux +contents are about to cross a threshold of maximum size of maximum time, +splitting at video keyframe boundaries. Exactly one input video stream +can be muxed, with as many accompanying audio and subtitle streams as +desired.

+

By default, it uses mp4mux and filesink, but they can be changed via +the 'muxer' and 'sink' properties.

+

The minimum file size is 1 GOP, however - so limits may be overrun if the +distance between any 2 keyframes is larger than the limits.

+

If a video stream is available, the splitting process is driven by the video +stream contents, and the video stream must contain closed GOPs for the output +file parts to be played individually correctly. In the absence of a video +stream, the first available stream is used as reference for synchronization.

+
+

Example pipelines

+
+ + + + + + + +
1
gst-launch-1.0 -e v4l2src num-buffers=500 ! video/x-raw,width=320,height=240 ! videoconvert ! queue ! timeoverlay ! x264enc key-int-max=10 ! h264parse ! splitmuxsink location=video%02d.mov max-size-time=10000000000 max-size-bytes=1000000
+
+ +Records a video stream captured from a v4l2 device and muxes it into +ISO mp4 files, splitting as needed to limit size/duration to 10 seconds +and 1MB maximum size. +
+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ multifile +

author

Jan Schmidt <jan@centricular.com>

class

Generic/Bin/Muxer
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

audio_%u

direction

sink

presence

request

details

ANY
+
++++ + + + + + + + + + + + + + + + + + + +

name

subtitle_%u

direction

sink

presence

request

details

ANY
+
++++ + + + + + + + + + + + + + + + + + + +

name

video

direction

sink

presence

request

details

ANY
+
+
+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstSplitMuxSink

+
struct GstSplitMuxSink;
+
+
+
+

Property Details

+
+

The “location” property

+
  “location”                 gchar *
+

Format string pattern for the location of the files to write (e.g. video%05d.mp4).

+

Flags: Read / Write

+

Default value: NULL

+
+
+
+

The “max-size-bytes” property

+
  “max-size-bytes”           guint64
+

Max. amount of data per file (in bytes, 0=disable).

+

Flags: Read / Write

+

Default value: 0

+
+
+
+

The “max-size-time” property

+
  “max-size-time”            guint64
+

Max. amount of time per file (in ns, 0=disable).

+

Flags: Read / Write

+

Default value: 0

+
+
+
+

The “mux-overhead” property

+
  “mux-overhead”             gdouble
+

Extra size overhead of muxing (0.02 = 2%).

+

Flags: Read / Write

+

Allowed values: [0,1]

+

Default value: 0.02

+
+
+
+

The “muxer” property

+
  “muxer”                    GstElement *
+

The muxer element to use (NULL = default mp4mux).

+

Flags: Read / Write

+
+
+
+

The “sink” property

+
  “sink”                     GstElement *
+

The sink element (or element chain) to use (NULL = default filesink).

+

Flags: Read / Write

+
+
+
+

Signal Details

+
+

The “format-location” signal

+
gchar*
+user_function (GstSplitMuxSink *splitmux,
+               guint            fragment_id,
+               gpointer         user_data)
+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

splitmux

the GstSplitMuxSink

 

fragment_id

the sequence number of the file to be created

 

user_data

user data set when the signal handler was connected.

 
+
+
+

Returns

+

the location to be used for the next output file

+
+

Flags: Run Last

+
+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-splitmuxsrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-splitmuxsrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-splitmuxsrc.html 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-splitmuxsrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -0,0 +1,245 @@ + + + + +splitmuxsrc: GStreamer Good Plugins 1.0 Plugins Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

splitmuxsrc

+

splitmuxsrc — Split Demuxer bin that recombines files created by +the splitmuxsink element.

+
+
+

Properties

+
+++++ + + + + + +
+gchar *locationRead / Write
+
+
+

Types and Values

+
++++ + + + + +
structGstSplitMuxSrc
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GInitiallyUnowned
+        ╰── GstObject
+            ╰── GstElement
+                ╰── GstBin
+                    ╰── GstSplitMuxSrc
+
+
+
+

Implemented Interfaces

+

+GstSplitMuxSrc implements + GstChildProxy and GstURIHandler.

+
+
+

Description

+

This element reads a set of input files created by the splitmuxsink element +containing contiguous elementary streams split across multiple files.

+

This element is similar to splitfilesrc, except that it recombines the +streams in each file part at the demuxed elementary level, rather than +as a single larger bytestream.

+
+

Example pipelines

+
+ + + + + + + +
1
gst-launch-1.0 splitmuxsrc location=video*.mov ! decodebin ! xvimagesink
+
+ Demux each file part and output the video stream as one continuous stream +
+ + + + + + + +
1
gst-launch-1.0 playbin uri="splitmux://path/to/foo.mp4.*"
+
+ Play back a set of files created by splitmuxsink +
+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ multifile +

author

Jan Schmidt <jan@centricular.com>

class

Generic/Bin/Demuxer
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

audio_%u

direction

source

presence

sometimes

details

ANY
+
++++ + + + + + + + + + + + + + + + + + + +

name

subtitle_%u

direction

source

presence

sometimes

details

ANY
+
++++ + + + + + + + + + + + + + + + + + + +

name

video

direction

source

presence

sometimes

details

ANY
+
+
+
+
+

Functions

+

+
+
+

Types and Values

+
+

struct GstSplitMuxSrc

+
struct GstSplitMuxSrc;
+
+
+
+

Property Details

+
+

The “location” property

+
  “location”                 gchar *
+

Glob pattern for the location of the files to read.

+

Flags: Read / Write

+

Default value: NULL

+
+
+
+ + + \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-streaktv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-streaktv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-streaktv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-streaktv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: streaktv +streaktv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -21,7 +21,7 @@ Home Up -Prev +Prev Next
@@ -29,7 +29,7 @@

streaktv

-

streaktv — StreakTV makes after images of moving objects

+

streaktv

@@ -76,7 +76,7 @@

Description

StreakTV makes after images of moving objects.

-

Example launch line

+

Example launch line

@@ -92,7 +92,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -118,7 +118,7 @@
-

Element Pads

+

Element Pads

@@ -169,19 +169,16 @@
-

-

Functions

+

Types and Values

struct GstStreakTV

struct GstStreakTV;
-

-

@@ -196,7 +193,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-taginject.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-taginject.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-taginject.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-taginject.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: taginject +taginject: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -22,14 +22,14 @@ Home Up Prev -Next +Next

taginject

-

taginject — inject metadata tags

+

taginject

@@ -77,7 +77,7 @@

Element that injects new metadata tags, but passes incomming data through unmodified.

-

Example launch lines

+

Example launch lines

@@ -104,7 +104,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -130,7 +130,7 @@
-

Element Pads

+

Element Pads

@@ -181,11 +181,10 @@
-

-

Functions

+

Types and Values

@@ -207,7 +206,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-udpsink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-udpsink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-udpsink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-udpsink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: udpsink +udpsink: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

udpsink

-

udpsink — Send data over the network via UDP

+

udpsink

@@ -92,7 +92,7 @@

udpsink is a network sink that sends UDP packets to the network. It can be combined with RTP payloaders to implement RTP streaming.

-

Examples

+

Examples

@@ -108,7 +108,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -134,7 +134,7 @@
-

Element Pads

+

Element Pads

@@ -161,19 +161,16 @@
-

-

Functions

+

Types and Values

struct GstUDPSink

struct GstUDPSink;
-

-

@@ -201,7 +198,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: udpsrc +udpsrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

udpsrc

-

udpsrc — Receive data over the network via UDP

+

udpsrc

@@ -68,11 +68,6 @@ gint -sockfd -Read / Write - - -gint buffer-size Read / Write @@ -82,21 +77,11 @@ Read / Write -gboolean -closefd -Read / Write - - gint skip-first-bytes Read / Write -gint -sock -Read - - gboolean auto-multicast Read / Write @@ -132,12 +117,6 @@ gchar * -bind-address -Read / Write - - - -gchar * address Read / Write @@ -183,7 +162,7 @@ allocated port can be obtained by reading the port property.

udpsrc can read from multicast groups by setting the “multicast-group” property to the IP address of the multicast group.

-

Alternatively one can provide a custom socket to udpsrc with the “sockfd” +

Alternatively one can provide a custom socket to udpsrc with the “socket” property, udpsrc will then not allocate a socket itself but use the provided one.

The “caps” property is mainly used to give a type to the UDP packet @@ -217,12 +196,12 @@

The message is typically used to detect that no UDP arrives in the receiver because it is blocked by a firewall.

A custom file descriptor can be configured with the -“sockfd” property. The socket will be closed when setting the -element to READY by default. This behaviour can be -overriden with the “closefd” property, in which case the application -is responsible for closing the file descriptor.

+“socket” property. The socket will be closed when setting +the element to READY by default. This behaviour can be overriden +with the “close-socket” property, in which case the +application is responsible for closing the file descriptor.

-

Examples

+

Examples

@@ -263,7 +242,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -289,7 +268,7 @@
-

Element Pads

+

Element Pads

@@ -316,19 +295,16 @@
-

-

Functions

+

Types and Values

struct GstUDPSrc

struct GstUDPSrc;
-

-

@@ -343,7 +319,7 @@

The “multicast-group” property

  “multicast-group”          gchar *
-

The Address of multicast group to join. DEPRECATED: Use address property instead.

+

The Address of multicast group to join. (DEPRECATED: Use address property instead).

Flags: Read / Write

Default value: "0.0.0.0"

@@ -366,15 +342,6 @@

-

The “sockfd” property

-
  “sockfd”                   gint
-

Socket to use for UDP reception. (-1 == allocate).

-

Flags: Read / Write

-

Allowed values: >= G_MAXULONG

-

Default value: -1

-
-
-

The “buffer-size” property

  “buffer-size”              gint

Size of the kernel receive buffer in bytes, 0=default.

@@ -392,14 +359,6 @@

-

The “closefd” property

-
  “closefd”                  gboolean
-

Close sockfd if passed as property on state change.

-

Flags: Read / Write

-

Default value: TRUE

-
-
-

The “skip-first-bytes” property

  “skip-first-bytes”         gint

number of bytes to skip for each udp packet.

@@ -409,15 +368,6 @@

-

The “sock” property

-
  “sock”                     gint
-

Socket currently in use for UDP reception. (-1 = no socket).

-

Flags: Read

-

Allowed values: >= G_MAXULONG

-

Default value: -1

-
-
-

The “auto-multicast” property

  “auto-multicast”           gboolean

Automatically join/leave multicast groups.

@@ -464,14 +414,6 @@

-

The “bind-address” property

-
  “bind-address”             gchar *
-

Address to bind the socket to. This is equivalent to the multicast-group property.

-

Flags: Read / Write

-

Default value: "0.0.0.0"

-
-
-

The “address” property

  “address”                  gchar *

Address to receive packets for. This is equivalent to the multicast-group property for now.

@@ -485,7 +427,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-v4l2radio.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-v4l2radio.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-v4l2radio.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-v4l2radio.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: v4l2radio +v4l2radio: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ Home Up -Prev -Next +Prev +Next

v4l2radio

-

v4l2radio — Controls a Video4Linux2 radio device

+

v4l2radio

@@ -83,14 +83,14 @@

Implemented Interfaces

GstV4l2Radio implements - GstURIHandler and GstTuner.

+ GstURIHandler and GstTuner.

Description

Synopsis

-

Element Information

+

Element Information

@@ -116,22 +116,19 @@
-

Element Pads

+

Element Pads

-

-

Functions

+

Types and Values

struct GstV4l2Radio

struct GstV4l2Radio;
-

-

@@ -155,7 +152,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: v4l2sink +v4l2sink: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -22,15 +22,15 @@ - - + +
Home UpPrevNextPrevNext

v4l2sink

-

v4l2sink — Displays frames on a video4linux2 device

+

v4l2sink

@@ -86,11 +86,6 @@ Read / Write -guint -queue-size -Read / Write - - gint brightness Read / Write @@ -131,11 +126,6 @@ Read / Write -guint -min-queued-bufs -Read / Write - - GstV4l2IOMode io-mode Read / Write @@ -193,14 +183,14 @@

Implemented Interfaces

GstV4l2Sink implements - GstTuner, GstVideoOverlay, GstNavigation, GstColorBalance and GstVideoOrientation.

+ GstTuner, GstVideoOverlay, GstNavigation, GstColorBalance and GstVideoOrientation.

Description

Synopsis

-

Element Information

+

Element Information

@@ -226,7 +216,7 @@
-

Element Pads

+

Element Pads

@@ -263,7 +253,7 @@ - + @@ -279,19 +269,19 @@ - + - + - + - + @@ -301,19 +291,16 @@

video/x-bayer, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

-

-

Functions

+

Types and Values

struct GstV4l2Sink

struct GstV4l2Sink;
-

-

@@ -383,15 +370,6 @@

-

The “queue-size” property

-
  “queue-size”               guint
-

Number of buffers to be enqueud in the driver in streaming mode.

-

Flags: Read / Write

-

Allowed values: [1,16]

-

Default value: 12

-
-
-

The “brightness” property

  “brightness”               gint

Picture brightness, or more precisely, the black level.

@@ -456,15 +434,6 @@

-

The “min-queued-bufs” property

-
  “min-queued-bufs”          guint
-

Minimum number of queued bufs; v4l2sink won't dqbuf if the driver doesn't have more than this number (which normally you shouldn't change).

-

Flags: Read / Write

-

Allowed values: <= 16

-

Default value: 1

-
-
-

The “io-mode” property

  “io-mode”                  GstV4l2IOMode

I/O mode.

@@ -505,7 +474,6 @@
+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: v4l2src +v4l2src: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -23,15 +23,15 @@ Home Up -Prev -Next +Prev +Next

v4l2src

-

v4l2src — Reads frames from a Video4Linux2 device

+

v4l2src

@@ -62,16 +62,6 @@ Read -guint -queue-size -Read / Write - - -gboolean -always-copy -Read / Write - - gint device-fd Read @@ -88,11 +78,6 @@ gint -decimate -Read / Write - - -gint hue Read / Write @@ -142,7 +127,7 @@ void prepare-format -Run Last +Run Last
@@ -174,14 +159,14 @@

Implemented Interfaces

GstV4l2Src implements - GstURIHandler, GstTuner, GstColorBalance and GstVideoOrientation.

+ GstURIHandler, GstTuner, GstColorBalance and GstVideoOrientation.

Description

Synopsis

-

Element Information

+

Element Information

@@ -207,7 +192,7 @@
-

Element Pads

+

Element Pads

@@ -244,7 +229,7 @@ - + @@ -260,19 +245,19 @@ - + - + - + - + @@ -282,19 +267,16 @@

video/x-bayer, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ] video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

-

-

Functions

+

Types and Values

struct GstV4l2Src

struct GstV4l2Src;
-

-

@@ -323,23 +305,6 @@

-

The “queue-size” property

-
  “queue-size”               guint
-

Number of buffers to be enqueud in the driver in streaming mode.

-

Flags: Read / Write

-

Allowed values: [1,16]

-

Default value: 2

-
-
-
-

The “always-copy” property

-
  “always-copy”              gboolean
-

If the buffer will or not be used directly from mmap.

-

Flags: Read / Write

-

Default value: TRUE

-
-
-

The “device-fd” property

  “device-fd”                gint

File descriptor of the device.

@@ -365,15 +330,6 @@

-

The “decimate” property

-
  “decimate”                 gint
-

Only use every nth frame.

-

Flags: Read / Write

-

Allowed values: >= 1

-

Default value: 1

-
-
-

The “hue” property

  “hue”                      gint

Hue or color balance.

@@ -437,36 +393,11 @@ gint arg1, GstCaps *arg2, gpointer user_data) -

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstv4l2src

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-vertigotv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-vertigotv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-vertigotv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-vertigotv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: vertigotv +vertigotv: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -17,12 +17,11 @@ Top  |  Description  |  Object Hierarchy  |  - Properties  |  - Signals + Properties Home Up -Prev +Prev Next
@@ -30,7 +29,7 @@

vertigotv

-

vertigotv — A loopback alpha blending effector with rotating and scaling

+

vertigotv

@@ -56,21 +55,6 @@
-
-

Signals

-
----- - - - - - -
voidreset-parmsAction
-

Types and Values

@@ -99,7 +83,7 @@

Description

VertigoTV is a loopback alpha blending effector with rotating and scaling.

-

Example launch line

+

Example launch line

@@ -115,7 +99,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -141,7 +125,7 @@
-

Element Pads

+

Element Pads

@@ -192,19 +176,16 @@
-

-

Functions

+

Types and Values

struct GstVertigoTV

struct GstVertigoTV;
-

-

@@ -227,43 +208,8 @@

Default value: 1.01

-
-

Signal Details

-
-

The “reset-parms” signal

-
void
-user_function (GstVertigoTV *gstvertigotv,
-               gpointer      user_data)
-

-

-
-

Parameters

-
----- - - - - - - - - - - - - -

gstvertigotv

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Action

-
-
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videobalance.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videobalance.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videobalance.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videobalance.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videobalance +videobalance: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

videobalance

-

videobalance — Adjusts brightness, contrast, hue, saturation on a video stream

+

videobalance

@@ -94,13 +94,13 @@

Implemented Interfaces

GstVideoBalance implements - GstImplementsInterface and GstColorBalance.

+ GstImplementsInterface and GstColorBalance.

Description

Adjusts brightness, contrast, hue, saturation on a video stream.

-

Example launch line

+

Example launch line

@@ -117,7 +117,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -143,7 +143,7 @@
-

Element Pads

+

Element Pads

@@ -166,6 +166,10 @@ + + + +

details

video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, I420, YV12, IYUV, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-raw(ANY)
@@ -190,15 +194,18 @@ + + + +

details

video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, I420, YV12, IYUV, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-raw(ANY)
-

-

Functions

+

Types and Values

@@ -248,7 +255,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videobox.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videobox.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videobox.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videobox.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videobox +videobox: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

videobox

-

videobox — Resizes a video by adding borders or cropping

+

videobox

@@ -146,19 +146,96 @@

-

-

+
+

Synopsis

+
+

Element Information

+
++++ + + + + + + + + + + + + + + +

plugin

+ videobox +

author

Wim Taymans <wim@fluendo.com>

class

Filter/Effect/Video
+
+
+
+

Element Pads

+
++++ + + + + + + + + + + + + + + + + + + +

name

sink

direction

sink

presence

always

details

video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y444, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
++++ + + + + + + + + + + + + + + + + + + +

name

src

direction

source

presence

always

details

video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y444, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
+

Functions

+

Types and Values

struct GstVideoBox

struct GstVideoBox;
-

-

@@ -236,7 +313,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videocrop.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videocrop.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videocrop.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videocrop.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videocrop +videocrop: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

videocrop

-

videocrop — Crops video into a user-defined region

+

videocrop

@@ -106,7 +106,7 @@ “top” property is set to an odd number. This doesn't matter for most use cases, but it might matter for yours.

-

Example launch line

+

Example launch line

@@ -122,7 +122,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -148,7 +148,7 @@
-

Element Pads

+

Element Pads

@@ -199,19 +199,16 @@
-

-

Functions

+

Types and Values

struct GstVideoCrop

struct GstVideoCrop;
-

-

@@ -258,7 +255,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videoflip.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videoflip.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videoflip.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videoflip.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videoflip +videoflip: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

videoflip

-

videoflip — Flips and rotates video

+

videoflip

@@ -82,7 +82,7 @@

Description

Flips and rotates video.

-

Example launch line

+

Example launch line

@@ -98,7 +98,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -124,7 +124,7 @@
-

Element Pads

+

Element Pads

@@ -175,11 +175,10 @@
-

-

Functions

+

Types and Values

@@ -193,7 +192,7 @@

enum GstVideoFlipMethod

The different flip methods.

-

Members

+

Members

@@ -281,7 +280,6 @@ +
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videomixer.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videomixer.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-videomixer.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-videomixer.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: videomixer +videomixer: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -27,7 +27,7 @@

videomixer

-

videomixer — Mix multiple video streams

+

videomixer

@@ -39,9 +39,9 @@ biggest incoming video stream and the framerate of the fastest incoming one.

Videomixer will do colorspace conversion.

Individual parameters for each input stream can be configured on the -GstVideoMixer2Pad.

+GstVideoMixer2Pad.

-

Sample pipelines

+

Sample pipelines

@@ -140,7 +140,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -166,7 +166,7 @@
-

Element Pads

+

Element Pads

@@ -217,18 +217,16 @@
-

-

Functions

+

Types and Values

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: vp8dec +vp8dec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

vp8dec

-

vp8dec — Decode VP8 video streams

+

vp8dec

@@ -98,7 +98,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -124,7 +124,7 @@
-

Element Pads

+

Element Pads

@@ -175,19 +175,16 @@
-

-

Functions

+

Types and Values

struct GstVP8Dec

struct GstVP8Dec;
-

-

@@ -237,7 +234,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: vp8enc +vp8enc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

vp8enc

-

vp8enc — Encode VP8 video streams

+

vp8enc

@@ -109,32 +109,12 @@ Read / Write -GstVP8EncScalingMode -h-scaling-mode -Read / Write - - -gint -kf-max-dist -Read / Write - - -GstVP8EncKfMode -kf-mode -Read / Write - - gint lag-in-frames Read / Write gint -max-intra-bitrate-pct -Read / Write - - -gint max-quantizer Read / Write @@ -160,11 +140,6 @@ Read / Write -gint -overshoot-pct -Read / Write - - gboolean resize-allowed Read / Write @@ -205,64 +180,11 @@ Read / Write - -GValueArray * -ts-layer-id -Read / Write - - -gint -ts-number-layers -Read / Write - - -gint -ts-periodicity -Read / Write - - - -GValueArray * -ts-rate-decimator -Read / Write - - - -GValueArray * -ts-target-bitrate -Read / Write - - GstVP8EncTuning tuning Read / Write -gint -twopass-vbr-bias-pct -Read / Write - - -gint -twopass-vbr-maxsection-pct -Read / Write - - -gint -twopass-vbr-minsection-pct -Read / Write - - -gint -undershoot-pct -Read / Write - - -GstVP8EncScalingMode -v-scaling-mode -Read / Write - - GstVP8EncScalingMode horizontal-scaling-mode Read / Write @@ -382,7 +304,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -408,7 +330,7 @@
-

Element Pads

+

Element Pads

@@ -429,7 +351,7 @@ - +

details

video/x-raw, format=(string)I420, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]video/x-raw, format=(string)I420, width=(int)[ 1, 16383 ], height=(int)[ 1, 16383 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
@@ -459,19 +381,16 @@
-

-

Functions

+

Types and Values

struct GstVP8Enc

struct GstVP8Enc;
-

-

@@ -590,31 +509,6 @@

-

The “h-scaling-mode” property

-
  “h-scaling-mode”           GstVP8EncScalingMode
-

Horizontal scaling mode.

-

Flags: Read / Write

-

Default value: Normal

-
-
-
-

The “kf-max-dist” property

-
  “kf-max-dist”              gint
-

Maximum distance between keyframes (number of frames).

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 128

-
-
-
-

The “kf-mode” property

-
  “kf-mode”                  GstVP8EncKfMode
-

Keyframe placement.

-

Flags: Read / Write

-

Default value: Determine optimal placement automatically

-
-
-

The “lag-in-frames” property

  “lag-in-frames”            gint

Maximum number of frames to lag.

@@ -624,15 +518,6 @@

-

The “max-intra-bitrate-pct” property

-
  “max-intra-bitrate-pct”    gint
-

Maximum Intra frame bitrate.

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 0

-
-
-

The “max-quantizer” property

  “max-quantizer”            gint

Maximum Quantizer (worst).

@@ -653,7 +538,7 @@

The “multipass-cache-file” property

  “multipass-cache-file”     gchar *
-

Multipass cache file.

+

Multipass cache file. If stream caps reinited, multiple files will be created: file, file.1, file.2, ... and so on.

Flags: Read / Write

Default value: "multipass.cache"

@@ -676,15 +561,6 @@

-

The “overshoot-pct” property

-
  “overshoot-pct”            gint
-

Datarate overshoot (max) target (%).

-

Flags: Read / Write

-

Allowed values: [0,1000]

-

Default value: 100

-
-
-

The “resize-allowed” property

  “resize-allowed”           gboolean

Allow spatial resampling.

@@ -755,45 +631,6 @@

-

The “ts-layer-id” property

-
  “ts-layer-id”              GValueArray *
-

Sequence defining coding layer membership.

-

Flags: Read / Write

-
-
-
-

The “ts-number-layers” property

-
  “ts-number-layers”         gint
-

Number of coding layers to use.

-

Flags: Read / Write

-

Allowed values: [1,5]

-

Default value: 1

-
-
-
-

The “ts-periodicity” property

-
  “ts-periodicity”           gint
-

Length of sequence that defines layer membership periodicity.

-

Flags: Read / Write

-

Allowed values: [0,16]

-

Default value: 0

-
-
-
-

The “ts-rate-decimator” property

-
  “ts-rate-decimator”        GValueArray *
-

Rate decimation factors for each layer.

-

Flags: Read / Write

-
-
-
-

The “ts-target-bitrate” property

-
  “ts-target-bitrate”        GValueArray *
-

Target bitrates for coding layers (one per layer, decreasing).

-

Flags: Read / Write

-
-
-

The “tuning” property

  “tuning”                   GstVP8EncTuning

Tuning.

@@ -802,50 +639,6 @@

-

The “twopass-vbr-bias-pct” property

-
  “twopass-vbr-bias-pct”     gint
-

CBR/VBR bias (0=CBR, 100=VBR).

-

Flags: Read / Write

-

Allowed values: [0,100]

-

Default value: 50

-
-
-
-

The “twopass-vbr-maxsection-pct” property

-
  “twopass-vbr-maxsection-pct” gint
-

GOP maximum bitrate (% target).

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 0

-
-
-
-

The “twopass-vbr-minsection-pct” property

-
  “twopass-vbr-minsection-pct” gint
-

GOP minimum bitrate (% target).

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 0

-
-
-
-

The “undershoot-pct” property

-
  “undershoot-pct”           gint
-

Datarate undershoot (min) target (%).

-

Flags: Read / Write

-

Allowed values: [0,1000]

-

Default value: 100

-
-
-
-

The “v-scaling-mode” property

-
  “v-scaling-mode”           GstVP8EncScalingMode
-

Vertical scaling mode.

-

Flags: Read / Write

-

Default value: Normal

-
-
-

The “horizontal-scaling-mode” property

  “horizontal-scaling-mode”  GstVP8EncScalingMode

Horizontal scaling mode.

@@ -980,7 +773,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-warptv.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-warptv.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-warptv.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-warptv.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: warptv +warptv: GStreamer Good Plugins 1.0 Plugins Reference Manual - - + + @@ -21,14 +21,14 @@ Home Up Prev -Next +Next

warptv

-

warptv — WarpTV does realtime goo'ing of the video input

+

warptv

@@ -60,7 +60,7 @@

Description

WarpTV does realtime goo'ing of the video input.

-

Example launch line

+

Example launch line

@@ -76,7 +76,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -102,7 +102,7 @@
-

Element Pads

+

Element Pads

@@ -153,24 +153,20 @@
-

-

Functions

+

Types and Values

struct GstWarpTV

struct GstWarpTV;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-waveformsink.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-waveformsink.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-waveformsink.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-waveformsink.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: waveformsink +waveformsink: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -19,15 +19,15 @@ Home Up -Prev -Next +Prev +Next

waveformsink

-

waveformsink — WaveForm audio sink

+

waveformsink

@@ -49,7 +49,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -75,14 +75,13 @@
-

Element Pads

+

Element Pads

-

-

Functions

+

Types and Values

@@ -126,13 +125,10 @@ gchar error_string[ERROR_LENGTH]; }; -

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavenc +wavenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - - - + + + @@ -21,15 +21,15 @@ - - + +
Home UpPrevNextPrevNext

wavenc

-

wavenc — Encode raw audio into WAV

+

wavenc

@@ -65,7 +65,7 @@

Description

Format an audio stream into the wav format.

-

Example launch line

+

Example launch line

@@ -92,7 +92,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -118,7 +118,7 @@
-

Element Pads

+

Element Pads

@@ -139,11 +139,7 @@ - - - - - + @@ -177,28 +173,28 @@ + + + +

details

audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)1, format=(string){ S32LE, S24LE, S16LE, U8, F32LE, F64LE }, layout=(string)interleaved

audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003, format=(string){ S32LE, S24LE, S16LE, U8, F32LE, F64LE }, layout=(string)interleavedaudio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 65535 ], format=(string){ S32LE, S24LE, S16LE, U8, F32LE, F64LE }, layout=(string)interleaved

details

audio/x-wav

audio/x-rf64
-

-

Functions

+

Types and Values

struct GstWavEnc

struct GstWavEnc;
-

-

+
Generated by GTK-Doc V1.24
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavpackdec.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavpackdec.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavpackdec.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavpackdec.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavpackdec +wavpackdec: GStreamer Good Plugins 1.0 Plugins Reference Manual - + - + @@ -20,7 +20,7 @@ Home Up -Prev +Prev Next
@@ -28,7 +28,7 @@

wavpackdec

-

wavpackdec — Decodes Wavpack audio data

+

wavpackdec

@@ -60,7 +60,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -86,7 +86,7 @@
-

Element Pads

+

Element Pads

@@ -145,24 +145,20 @@
-

-

Functions

+

Types and Values

struct GstWavpackDec

struct GstWavpackDec;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavpackenc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavpackenc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavpackenc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavpackenc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavpackenc +wavpackenc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -30,7 +30,7 @@

wavpackenc

-

wavpackenc — Encodes audio with the Wavpack lossless/lossy audio codec

+

wavpackenc

@@ -115,7 +115,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -141,7 +141,7 @@
-

Element Pads

+

Element Pads

@@ -216,19 +216,16 @@
-

-

Functions

+

Types and Values

struct GstWavpackEnc

struct GstWavpackEnc;
-

-

@@ -294,7 +291,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavpackparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavpackparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavpackparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavpackparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavpackparse +wavpackparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -59,7 +59,7 @@

Description

This is an Wavpack parser.

-

Example launch line

+

Example launch line

@@ -75,7 +75,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -85,7 +85,7 @@ @@ -101,7 +101,7 @@
-

Element Pads

+

Element Pads

plugin

- audioparsers + audioparsers
@@ -156,11 +156,10 @@
-

-

Functions

+

Types and Values

@@ -176,7 +175,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavparse.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavparse.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-wavparse.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-wavparse.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: wavparse +wavparse: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

wavparse

-

wavparse — Parse a .wav file into raw audio

+

wavparse

@@ -76,7 +76,7 @@

Wavparse supports both push and pull mode operations, making it possible to stream from a network source.

-

Example launch line

+

Example launch line

@@ -104,7 +104,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -130,7 +130,7 @@
-

Element Pads

+

Element Pads

@@ -285,11 +285,10 @@
-

-

Functions

+

Types and Values

@@ -315,7 +314,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-webmmux.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-webmmux.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-webmmux.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-webmmux.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: webmmux +webmmux: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

webmmux

-

webmmux — Muxes video and audio streams into a WebM stream

+

webmmux

@@ -66,7 +66,7 @@

Description

webmmux muxes VP8 video and Vorbis audio streams into a WebM file.

-

Example launch line

+

Example launch line

@@ -103,7 +103,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -118,7 +118,7 @@ - + @@ -129,7 +129,7 @@
-

Element Pads

+

Element Pads

author

GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>GStreamer maintainers <gstreamer-devel@lists.freedesktop.org>

class

@@ -260,24 +260,20 @@
-

-

Functions

+

Types and Values

struct GstWebMMux

struct GstWebMMux;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-ximagesrc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-ximagesrc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-ximagesrc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-ximagesrc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: ximagesrc +ximagesrc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -29,7 +29,7 @@

ximagesrc

-

ximagesrc — Creates a screenshot video stream

+

ximagesrc

@@ -49,11 +49,6 @@ Read / Write -guint -screen-num -Read / Write - - gboolean show-pointer Read / Write @@ -131,7 +126,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -157,7 +152,7 @@
-

Element Pads

+

Element Pads

@@ -184,19 +179,16 @@
-

-

Functions

+

Types and Values

struct GstXImageSrc

struct GstXImageSrc;
-

-

@@ -210,15 +202,6 @@

-

The “screen-num” property

-
  “screen-num”               guint
-

X Screen Number.

-

Flags: Read / Write

-

Allowed values: <= G_MAXINT

-

Default value: 0

-
-
-

The “show-pointer” property

  “show-pointer”             gboolean

Show mouse pointer (if XFixes extension enabled).

@@ -296,7 +279,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-y4menc.html gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-y4menc.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/gst-plugins-good-plugins-y4menc.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/gst-plugins-good-plugins-y4menc.html 2015-10-30 14:27:13.000000000 +0000 @@ -2,13 +2,13 @@ -GStreamer Good Plugins 1.0 Plugins Reference Manual: y4menc +y4menc: GStreamer Good Plugins 1.0 Plugins Reference Manual - + @@ -16,7 +16,8 @@ Top  |  Description  |  - Object Hierarchy + Object Hierarchy  |  + Implemented Interfaces Home Up @@ -28,7 +29,7 @@

y4menc

-

y4menc — Encodes a YUV frame into the yuv4mpeg format (mjpegtools)

+

y4menc

@@ -51,13 +52,20 @@ ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement - ╰── GstY4mEncode + ╰── GstVideoEncoder + ╰── GstY4mEncode
+

Implemented Interfaces

+

+GstY4mEncode implements + GstPreset.

+
+

Description

-

Example launch line

+

Example launch line

Creates a YU4MPEG2 raw video stream as defined by the mjpegtools project.

@@ -65,7 +73,7 @@ (write everything in one line, without the backslash characters)

-gst-launch-0.10 videotestsrc num-buffers=250 \
+gst-launch-1.0 videotestsrc num-buffers=250 \
 ! 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' \
 ! y4menc ! filesink location=test.yuv
 
@@ -75,7 +83,7 @@

Synopsis

-

Element Information

+

Element Information

@@ -101,7 +109,7 @@
-

Element Pads

+

Element Pads

@@ -152,24 +160,20 @@
-

-

Functions

+

Types and Values

struct GstY4mEncode

struct GstY4mEncode;
-

-

+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/index.html gst-plugins-good1.0-1.6.1/docs/plugins/html/index.html --- gst-plugins-good1.0-1.4.3/docs/plugins/html/index.html 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/index.html 2015-10-30 14:27:13.000000000 +0000 @@ -6,7 +6,7 @@ - + @@ -15,7 +15,7 @@

- for GStreamer Good Plugins 1.0 (1.4.3) + for GStreamer Good Plugins 1.0 (1.6.1) The latest version of this documentation can be found on-line at http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/.

@@ -32,718 +32,770 @@ aacparse — AAC parser
-aasink — An ASCII art videosink +aasink
ac3parse — AC3 parser
-agingtv — AgingTV adds age to video input using scratches and dust +agingtv
-alpha — Adds an alpha channel to video - uniform or via chroma-keying +alawdec
-alphacolor — ARGB from/to AYUV colorspace conversion preserving the alpha channel +alawenc
-alawdec — Convert 8bit A law to 16bit PCM +alphacolor
-alawenc — Convert 16bit PCM to 8bit A law +alpha
amrparse — AMR parser
-apedemux — Read and output APE tags while demuxing the contents +apedemux
-apev2mux — Adds an APEv2 header to the beginning of files using taglib +apev2mux
-aspectratiocrop — Crops video into a user-defined aspect-ratio +aspectratiocrop
-audioamplify — Amplifies an audio stream by a given factor +audioamplify
-audiochebband — Chebyshev band pass and band reject filter +audiochebband
-audiocheblimit — Chebyshev low pass and high pass filter +audiocheblimit
-audiofirfilter — Generic audio FIR filter with custom filter kernel +audiodynamic
-audioiirfilter — Generic audio IIR filter with custom filter kernel +audioecho
-audiowsincband — Band pass and band reject windowed sinc filter +audiofirfilter
-audiowsinclimit — Low pass and high pass windowed sinc filter +audioiirfilter
-audioecho — Adds an echo or reverb effect to an audio stream +audioinvert
-audiodynamic — Compressor and Expander +audiokaraoke
-audioinvert — Swaps upper and lower half of audio samples +audiopanorama
-audiopanorama — Positions audio streams in the stereo panorama +audiowsincband
-audiokaraoke — Removes voice from sound +audiowsinclimit
-auparse — Parse an .au file into raw audio +auparse
-autoaudiosink — Wrapper audio sink for automatically detected audio sink +autoaudiosink
-autoaudiosrc — Wrapper audio source for automatically detected audio source +autoaudiosrc
-autovideosink — Wrapper video sink for automatically detected video sink +autovideosink
-autovideosrc — Wrapper video source for automatically detected video source +autovideosrc
-avidemux — Demultiplex an avi file into audio and video +avidemux
-avimux — Muxes audio and video into an avi stream +avimux
-avisubtitle — Parse avi subtitle stream +avisubtitle
-cacasink — A colored ASCII art videosink +cacasink
-cairooverlay — Render overlay on a video stream using Cairo +cairooverlay
-capssetter — Set/merge caps on stream +capssetter
-cutter — Audio Cutter to split audio into non-silent bits +cutter
dcaparse — DCA (DTS Coherent Acoustics) parser
-deinterlace — Deinterlace Methods ported from DScaler/TvTime +deinterlace
-deinterleave — Splits one interleaved multichannel audio stream into many mono audio streams +deinterleave
-dicetv — 'Dices' the screen up into many small squares +dicetv
-directsoundsink — DirectSound audio sink +directsoundsink
-dtmfsrc — Generates DTMF tones +dtmfsrc
-dv1394src — Source for DV video data from firewire port +dv1394src
-dvdec — Uses libdv to decode DV video (smpte314) (libdv.sourceforge.net) +dvdec
-dvdemux — Uses libdv to separate DV audio from DV video (libdv.sourceforge.net) +dvdemux
-edgetv — Apply edge detect on video +edgetv
-equalizer-10bands — Direct Form 10 band IIR equalizer +equalizer-10bands
-equalizer-3bands — Direct Form 3 band IIR equalizer +equalizer-3bands
-equalizer-nbands — Direct Form IIR equalizer +equalizer-nbands
-flacdec — Decodes FLAC lossless audio streams +flacdec
-flacenc — Encodes audio with the FLAC lossless audio encoder +flacenc
-flacparse — Parses audio with the FLAC lossless audio codec +flacparse
-flactag — Rewrite tags in a FLAC file +flactag
-flvdemux — Demux FLV feeds into digital streams +flvdemux
-flvmux — Muxes video/audio streams into a FLV stream +flvmux
-flxdec — FLC/FLI/FLX video decoder +flxdec
-gamma — Adjusts gamma on a video stream +gamma
-gdkpixbufsink — Output images as GdkPixbuf objects in bus messages +gdkpixbufsink
-goom — Takes frames of data and outputs video frames using the GOOM filter +goom2k1
-goom2k1 — Takes frames of data and outputs video frames using the GOOM 2k1 filter +goom
-hdv1394src — Source for MPEG-TS video data from firewire port +hdv1394src
-icydemux — Read and output ICY tags while demuxing the contents +icydemux
-id3demux — Read and output ID3v1 and ID3v2 tags while demuxing the contents +id3demux
-id3v2mux — Adds an ID3v2 header to the beginning of MP3 files using taglib +id3v2mux
-imagefreeze — Generates a still frame stream from an image +imagefreeze
-interleave — Folds many mono channels into one interleaved audio stream +interleave
ismlmux — Muxer for ISML smooth streaming (.isml) files
-jackaudiosrc — Captures audio from a JACK server +jackaudiosink
-jackaudiosink — Output audio to a JACK server +jackaudiosrc
-jpegdec — Decode images from JPEG format +jpegdec
-jpegenc — Encode images in JPEG format +jpegenc
-level — RMS/Peak/Decaying Peak Level messager for audio/raw +level
-matroskamux — Muxes video/audio/subtitle streams into a matroska stream +matroskademux
-matroskademux — Demuxes Matroska/WebM streams into video/audio/subtitles +matroskamux
mj2mux — Muxer for Motion JPEG-2000 (.mj2) files
-monoscope — Displays a highly stabilised waveform of audio input +monoscope
-mpegaudioparse — MPEG audio parser +mp4mux — Muxer for ISO MPEG-4 (.mp4) files
-mp4mux — Muxer for ISO MPEG-4 (.mp4) files +mpegaudioparse — MPEG audio parser
-mulawdec — Convert 8bit mu law to 16bit PCM +mulawdec
-mulawenc — Convert 16bit PCM to 8bit mu law +mulawenc
-multifilesink — Write buffers to a sequentially named set of files +multifilesink
-multifilesrc — Read a sequentially named set of files into buffers +multifilesrc
-multipartdemux — demux multipart streams +multipartdemux
-multipartmux — mux multipart streams +multipartmux
-multiudpsink — Send data over the network via UDP to one or multiple recipients which can be added or removed at runtime using action signals +multiudpsink
-optv — Optical art meets real-time video effect +optv
-oss4sink — Output to a sound card via OSS version 4 +oss4sink
-oss4src — Capture from a sound card via OSS version 4 +oss4src
-osssink — Output to a sound card via OSS +osssink
-osssrc — Capture from a sound card via OSS +osssrc
-osxaudiosink — Output to a sound card in OS X +osxaudiosink
-osxaudiosrc — Input from a sound card in OS X +osxaudiosrc
-osxvideosink — OSX native videosink +osxvideosink
-pngdec — Decode a png video frame to a raw image +pngdec
-pngenc — Encode a video frame to a .png image +pngenc
-progressreport — Periodically query and report on processing progress +progressreport
-pulsesink — Plays audio to a PulseAudio server +pulsesink
-pulsesrc — Captures audio from a PulseAudio server +pulsesrc
-quarktv — Motion dissolver +qtdemux
-qtdemux — Demultiplex a QuickTime file into audio and video streams +qtmoovrecover — Utility element for recovering unfinished quicktime files
qtmux — Muxer for quicktime(.mov) files
-qtmoovrecover — Utility element for recovering unfinished quicktime files +quarktv
-radioactv — motion-enlightment effect +radioactv
-revtv — A video waveform monitor for each line of video processed +revtv
-rganalysis — Perform the ReplayGain analysis +rganalysis
-rglimiter — Apply signal compression to raw audio data +rglimiter
-rgvolume — Apply ReplayGain volume adjustment +rgvolume
-rippletv — RippleTV does ripple mark effect on the video input +rippletv
-rtpdec — Accepts raw RTP and RTCP packets and sends them forward +rtpac3depay
-rtpac3depay — Extracts AC3 audio from RTP packets (RFC 4184) +rtpac3pay
-rtpac3pay — Payload AC3 audio as RTP packets (RFC 4184) +rtpamrdepay
-rtpamrdepay — Extracts AMR or AMR-WB audio from RTP packets (RFC 3267) +rtpamrpay
-rtpamrpay — Payload-encode AMR or AMR-WB audio into RTP packets (RFC 3267) +rtpbin
-rtpbvdepay — Extracts BroadcomVoice audio from RTP packets (RFC 4298) +rtpbvdepay
-rtpbvpay — Packetize BroadcomVoice audio streams into RTP packets (RFC 4298) +rtpbvpay
-rtpL16depay — Extracts raw audio from RTP packets +rtph261depay
-rtpL16pay — Payload-encode Raw audio into RTP packets (RFC 3551) +rtph261pay
-rtpj2kpay — Payload-encodes JPEG 2000 pictures into RTP packets (RFC 5371) +rtpL16depay
-rtpjpegpay — Payload-encodes JPEG pictures into RTP packets (RFC 2435) +rtpL16pay
-rtpsbcpay — Payload SBC audio as RTP packets +rtpj2kpay
-rtspsrc — Receive data over the network via RTSP (RFC 2326) +rtpjpegpay
-rtpbin — Real-Time Transport Protocol bin +rtpsbcpay
-rtpdtmfmux — mixes RTP DTMF streams into other RTP streams +rtspsrc
-rtpdtmfsrc — Generates RTP DTMF packets +rtpbin
-rtpjitterbuffer — A buffer that deals with network jitter and other transmission faults +rtpdec
-rtpmux — multiplex N rtp streams into one +rtpdtmfdepay
-rtpptdemux — Parses codec streams transmitted in the same RTP session +rtpdtmfmux
-rtpsession — Implement an RTP session +rtpdtmfsrc
-rtpssrcdemux — Splits RTP streams based on the SSRC +rtpj2kpay
-rtprtxsend — Retransmit RTP packets when needed, according to RFC4588 +rtpjitterbuffer
-rtprtxreceive — Receive retransmitted RTP packets according to RFC4588 +rtpjpegpay
-sbcparse — Parses an SBC bluetooth audio stream +rtpklvdepay
-scaletempo — Sync audio tempo with playback rate +rtpklvpay
-shagadelictv — Oh behave, ShagedelicTV makes images shagadelic! +rtpL16depay
-shapewipe — Adds a shape wipe transition to a video stream +rtpL16pay
-shout2send — Sends data to an icecast server +rtpmux
-smpte — Apply the standard SMPTE transitions on video images +rtpptdemux
-smptealpha — Apply the standard SMPTE transitions as alpha on video images +rtprtxreceive
-souphttpsrc — Receive data as a client over the network via HTTP using SOUP +rtprtxsend
-spectrum — Run an FFT on the audio signal, output spectrum data +rtpsbcpay
-speexenc — Encodes audio in Speex format +rtpsession
-speexdec — decode speex streams to audio +rtpssrcdemux
-splitfilesrc — Read a sequentially named set of files as if it was one large file +rtspsrc
-streaktv — StreakTV makes after images of moving objects +sbcparse
-taginject — inject metadata tags +scaletempo
-udpsrc — Receive data over the network via UDP +shagadelictv
-udpsink — Send data over the network via UDP +shapewipe
-v4l2src — Reads frames from a Video4Linux2 device +shout2send
-v4l2sink — Displays frames on a video4linux2 device +smokedec
-v4l2radio — Controls a Video4Linux2 radio device +smokeenc
-vertigotv — A loopback alpha blending effector with rotating and scaling +smptealpha
-videobalance — Adjusts brightness, contrast, hue, saturation on a video stream +smpte
-videobox — Resizes a video by adding borders or cropping +souphttpsrc
-videocrop — Crops video into a user-defined region +spectrum
-videoflip — Flips and rotates video +speexdec
-videomixer — Mix multiple video streams +speexenc
-vp8dec — Decode VP8 video streams +splitfilesrc
-vp8enc — Encode VP8 video streams +splitmuxsink — Muxer wrapper for splitting output stream by size or time
-warptv — WarpTV does realtime goo'ing of the video input +splitmuxsrc — Split Demuxer bin that recombines files created by +the splitmuxsink element.
-wavenc — Encode raw audio into WAV +streaktv
-waveformsink — WaveForm audio sink +taginject
-wavpackdec — Decodes Wavpack audio data +udpsink
-wavpackenc — Encodes audio with the Wavpack lossless/lossy audio codec +udpsrc +
+
+v4l2radio +
+
+v4l2sink +
+
+v4l2src +
+
+vertigotv +
+
+videobalance +
+
+videobox +
+
+videocrop +
+
+videoflip +
+
+videomixer +
+
+vp8dec +
+
+vp8enc +
+
+warptv +
+
+waveformsink +
+
+wavenc +
+
+wavpackdec +
+
+wavpackenc
wavpackparse — Wavpack parser
-wavparse — Parse a .wav file into raw audio +wavparse
-webmmux — Muxes video and audio streams into a WebM stream +webmmux
-ximagesrc — Creates a screenshot video stream +ximagesrc
-y4menc — Encodes a YUV frame into the yuv4mpeg format (mjpegtools) +y4menc
gst-plugins-good Plugins
-1394Source for video data via IEEE1394 interface +1394 — Source for video data via IEEE1394 interface
-aasinkASCII Art video sink +aasink — ASCII Art video sink
-alawALaw audio conversion routines +alaw — ALaw audio conversion routines
-alphaadds an alpha channel to video - constant or via chroma-keying +alphacolor — RGBA from/to AYUV colorspace conversion preserving the alpha channel
-alphacolorRGBA from/to AYUV colorspace conversion preserving the alpha channel +alpha — adds an alpha channel to video - constant or via chroma-keying
-apetagAPEv1/2 tag reader +apetag — APEv1/2 tag reader
-audiofxAudio effects plugin +audiofx — Audio effects plugin
-auparseparses au streams +audioparsers — Parsers for various audio formats
-autodetectPlugin contains auto-detection plugins for video/audio in- and outputs +auparse — parses au streams
-aviAVI stream handling +autodetect — Plugin contains auto-detection plugins for video/audio in- and outputs
-cacasinkColored ASCII Art video sink +avi — AVI stream handling
-cairoCairo-based elements +cacasink — Colored ASCII Art video sink
-cutterAudio Cutter to split audio into non-silent bits +cairo — Cairo-based elements
-debugelements for testing and debugging +cutter — Audio Cutter to split audio into non-silent bits
-deinterlaceDeinterlacer +debug — elements for testing and debugging
-directsoundDirectSound plugin +deinterlace — Deinterlacer
-dtmfDTMF plugins +directsound — DirectSound plugin
-dvDV demuxer and decoder based on libdv (libdv.sf.net) +dtmf — DTMF plugins
-equalizerGStreamer audio equalizers +dv — DV demuxer and decoder based on libdv (libdv.sf.net)
-effectveffect plugins from the effectv project +effectv — effect plugins from the effectv project
-flacThe FLAC Lossless compressor Codec +equalizer — GStreamer audio equalizers
-flvFLV muxing and demuxing plugin +flac — The FLAC Lossless compressor Codec
-flxdecFLC/FLI/FLX video decoder +flv — FLV muxing and demuxing plugin
-gdkpixbufGdkPixbuf-based image decoder, overlay and sink +flxdec — FLC/FLI/FLX video decoder
-goomGOOM visualization filter +gdkpixbuf — GdkPixbuf-based image decoder, overlay and sink
-goom2k1GOOM 2k1 visualization filter +goom2k1 — GOOM 2k1 visualization filter
-icydemuxDemux ICY tags from a stream +goom — GOOM visualization filter
-id3demuxDemux ID3v1 and ID3v2 tags from a file +icydemux — Demux ICY tags from a stream
-imagefreezeStill frame stream generator +id3demux — Demux ID3v1 and ID3v2 tags from a file
-interleaveAudio interleaver/deinterleaver +imagefreeze — Still frame stream generator
-isomp4ISO base media file format support (mp4, 3gpp, qt, mj2) +interleave — Audio interleaver/deinterleaver
-jackJACK audio elements +isomp4 — ISO base media file format support (mp4, 3gpp, qt, mj2)
-jpegJPeg plugin library +jack — JACK audio elements
-levelAudio level plugin +jpeg — JPeg plugin library
-matroskaMatroska and WebM stream handling +level — Audio level plugin
-monoscopeMonoscope visualization +matroska — Matroska and WebM stream handling
-mulawMuLaw audio conversion routines +monoscope — Monoscope visualization
-multifileReads/Writes buffers from/to sequentially named files +mulaw — MuLaw audio conversion routines
-multipartmultipart stream manipulation +multifile — Reads/Writes buffers from/to sequentially named files
-navigationtestTemplate for a video filter +multipart — multipart stream manipulation
-oss4Open Sound System (OSS) version 4 support for GStreamer +navigationtest — Template for a video filter
-ossaudioOSS (Open Sound System) support for GStreamer +oss4 — Open Sound System (OSS) version 4 support for GStreamer
-osxaudioOSX (Mac OS X) audio support for GStreamer +ossaudio — OSS (Open Sound System) support for GStreamer
-osxvideoOSX native video output plugin +osxaudio — OSX (Mac OS X) audio support for GStreamer
-pngPNG plugin library +osxvideo — OSX native video output plugin
-pulseaudioPulseAudio plugin library +png — PNG plugin library
-replaygainReplayGain volume normalization +pulseaudio — PulseAudio plugin library
-rtpReal-time protocol plugins +replaygain — ReplayGain volume normalization
-rtpmanagerRTP session management plugin library +rtpmanager — RTP session management plugin library
-rtsptransfer data via RTSP +rtp — Real-time protocol plugins
-shapewipeShape Wipe transition filter +rtsp — transfer data via RTSP
-shout2sendSends data to an icecast server using libshout2 +shapewipe — Shape Wipe transition filter
-smpteApply the standard SMPTE transitions on video images +shout2send — Sends data to an icecast server using libshout2
-souplibsoup HTTP client src/sink +smpte — Apply the standard SMPTE transitions on video images
-spectrumRun an FFT on the audio signal, output spectrum data +soup — libsoup HTTP client src/sink
-speexSpeex plugin library +spectrum — Run an FFT on the audio signal, output spectrum data
-taglibTag writing plug-in based on taglib +speex — Speex plugin library
-udptransfer data via UDP +taglib — Tag writing plug-in based on taglib
-video4linux2elements for Video 4 Linux +udp — transfer data via UDP
-videoboxresizes a video by adding borders or cropping +video4linux2 — elements for Video 4 Linux
-videocropCrops video into a user-defined region +videobox — resizes a video by adding borders or cropping
-videofilterVideo filters plugin +videocrop — Crops video into a user-defined region
-videomixerVideo mixer +videofilter — Video filters plugin
-vpxVP8 plugin +videomixer — Video mixer
-waveformWaveForm API based plugin +vpx — VP8 plugin
-wavencEncode raw audio into WAV +waveform — WaveForm API based plugin
-wavpackWavpack lossless/lossy audio format handling +wavenc — Encode raw audio into WAV
-wavparseParse a .wav file into raw audio +wavpack — Wavpack lossless/lossy audio format handling
-ximagesrcX11 video input plugin using standard Xlib calls +wavparse — Parse a .wav file into raw audio
-y4mencEncodes a YUV frame into the yuv4mpeg format (mjpegtools) +ximagesrc — X11 video input plugin using standard Xlib calls +
+
+y4menc — Encodes a YUV frame into the yuv4mpeg format (mjpegtools)
gst-plugins-good Base Classes
@@ -758,7 +810,6 @@
+
Generated by GTK-Doc V1.24 \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/index.sgml gst-plugins-good1.0-1.6.1/docs/plugins/html/index.sgml --- gst-plugins-good1.0-1.4.3/docs/plugins/html/index.sgml 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/index.sgml 2015-10-30 14:27:13.000000000 +0000 @@ -19,6 +19,10 @@ + + + + @@ -30,7 +34,6 @@ - @@ -50,9 +53,6 @@ - - - @@ -76,6 +76,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -86,6 +111,10 @@ + + + + @@ -97,31 +126,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - @@ -204,6 +208,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -234,6 +266,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -259,76 +328,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -348,12 +351,10 @@ - - @@ -362,8 +363,6 @@ - - @@ -376,12 +375,10 @@ - - @@ -390,8 +387,6 @@ - - @@ -516,7 +511,6 @@ - @@ -526,8 +520,6 @@ - - @@ -719,7 +711,6 @@ - @@ -751,8 +742,16 @@ - + + + + + + + + + @@ -762,15 +761,6 @@ - - - - - - - - - @@ -856,21 +846,10 @@ - - - - - - - - - - - - - - - + + + + @@ -886,6 +865,23 @@ + + + + + + + + + + + + + + + + + @@ -900,7 +896,6 @@ - @@ -912,8 +907,6 @@ - - @@ -929,6 +922,17 @@ + + + + + + + + + + + @@ -944,17 +948,6 @@ - - - - - - - - - - - @@ -975,6 +968,10 @@ + + + + @@ -982,15 +979,6 @@ - - - - - - - - - @@ -1011,7 +999,20 @@ - + + + + + + + + + + + + + + @@ -1038,6 +1039,12 @@ + + + + + + @@ -1045,6 +1052,8 @@ + + @@ -1073,7 +1082,6 @@ - @@ -1102,9 +1110,6 @@ - - - @@ -1273,7 +1278,6 @@ - @@ -1292,25 +1296,12 @@ - - - - - - - - - - - - - @@ -1318,8 +1309,25 @@ - - + + + + + + + + + + + + + + + + + + + @@ -1340,25 +1348,21 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -1443,28 +1447,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -1501,6 +1483,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1511,6 +1554,24 @@ + + + + + + + + + + + + + + + + + + @@ -1530,7 +1591,6 @@ - @@ -1538,8 +1598,6 @@ - - @@ -1552,7 +1610,6 @@ - @@ -1606,6 +1663,10 @@ + + + + @@ -1623,6 +1684,16 @@ + + + + + + + + + + @@ -1637,6 +1708,8 @@ + + @@ -1661,6 +1734,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1689,6 +1796,14 @@ + + + + + + + + @@ -1712,12 +1827,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1747,6 +1914,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1760,7 +1969,6 @@ - @@ -1771,6 +1979,8 @@ + + @@ -1797,39 +2007,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1893,28 +2122,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + @@ -1930,6 +2154,21 @@ + + + + + + + + + + + + + + + @@ -1943,11 +2182,7 @@ - - - - @@ -1965,6 +2200,8 @@ + + @@ -1977,12 +2214,22 @@ - + + + + + + + + + + + @@ -2004,17 +2251,6 @@ - - - - - - - - - - - @@ -2028,6 +2264,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2050,6 +2318,20 @@ + + + + + + + + + + + + + + @@ -2065,65 +2347,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -2143,7 +2390,6 @@ - @@ -2152,28 +2398,40 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -2184,8 +2442,6 @@ - - @@ -2245,6 +2501,15 @@ + + + + + + + + + @@ -2290,17 +2555,12 @@ - - - - - @@ -2309,17 +2569,7 @@ - - - - - - - - - - @@ -2344,6 +2594,12 @@ + + + + + + @@ -2353,12 +2609,6 @@ - - - - - - @@ -2425,7 +2675,6 @@ - @@ -2439,6 +2688,7 @@ + @@ -2449,14 +2699,16 @@ - - + + + + @@ -2479,10 +2731,10 @@ - - + + @@ -2491,10 +2743,10 @@ - - + + @@ -2537,10 +2789,10 @@ - - + + diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/html/style.css gst-plugins-good1.0-1.6.1/docs/plugins/html/style.css --- gst-plugins-good1.0-1.4.3/docs/plugins/html/style.css 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/html/style.css 2015-10-30 14:27:13.000000000 +0000 @@ -60,7 +60,7 @@ div.informaltable table { border-collapse: separate; - border-spacing: 1em 0.5em; + border-spacing: 1em 0.3em; border: none; } @@ -148,6 +148,8 @@ h4 { color: #555753; + margin-top: 1em; + margin-bottom: 1em; } hr @@ -166,17 +168,16 @@ padding-bottom: 0.25em; } -dl.toc > dd > dl > dt +dl.toc > dt { padding-top: 0.25em; padding-bottom: 0.25em; + font-weight: bold; } -dl.toc > dt +dl.toc > dl { - padding-top: 1em; padding-bottom: 0.5em; - font-weight: bold; } .parameter @@ -346,7 +347,9 @@ } @media screen { - sup a.footnote + /* these have a as a first child, but since there are no parent selectors + * we can't use that. */ + a.footnote { position: relative; top: 0em ! important; diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-1394.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-1394.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-1394.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-1394.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Source for video data via IEEE1394 interface ../../ext/raw1394/.libs/libgst1394.so libgst1394.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-aasink.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-aasink.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-aasink.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-aasink.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ ASCII Art video sink ../../ext/aalib/.libs/libgstaasink.so libgstaasink.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-alaw.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-alaw.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-alaw.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-alaw.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ ALaw audio conversion routines ../../gst/law/.libs/libgstalaw.so libgstalaw.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-alphacolor.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-alphacolor.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-alphacolor.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-alphacolor.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ RGBA from/to AYUV colorspace conversion preserving the alpha channel ../../gst/alpha/.libs/libgstalphacolor.so libgstalphacolor.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-alpha.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-alpha.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-alpha.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-alpha.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ adds an alpha channel to video - constant or via chroma-keying ../../gst/alpha/.libs/libgstalpha.so libgstalpha.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-apetag.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-apetag.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-apetag.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-apetag.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ APEv1/2 tag reader ../../gst/apetag/.libs/libgstapetag.so libgstapetag.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-audiofx.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-audiofx.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-audiofx.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-audiofx.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Audio effects plugin ../../gst/audiofx/.libs/libgstaudiofx.so libgstaudiofx.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-audioparsers.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-audioparsers.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-audioparsers.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-audioparsers.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Parsers for various audio formats ../../gst/audioparsers/.libs/libgstaudioparsers.so libgstaudioparsers.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-auparse.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-auparse.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-auparse.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-auparse.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ parses au streams ../../gst/auparse/.libs/libgstauparse.so libgstauparse.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-autodetect.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-autodetect.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-autodetect.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-autodetect.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Plugin contains auto-detection plugins for video/audio in- and outputs ../../gst/autodetect/.libs/libgstautodetect.so libgstautodetect.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-avi.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-avi.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-avi.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-avi.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ AVI stream handling ../../gst/avi/.libs/libgstavi.so libgstavi.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -53,7 +53,7 @@ Avi muxer Codec/Muxer Muxes audio and video into an avi stream - GStreamer maintainers <gstreamer-devel@lists.sourceforge.net> + GStreamer maintainers <gstreamer-devel@lists.freedesktop.org> audio_%u diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-cacasink.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-cacasink.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-cacasink.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-cacasink.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Colored ASCII Art video sink ../../ext/libcaca/.libs/libgstcacasink.so libgstcacasink.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-cairo.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-cairo.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-cairo.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-cairo.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Cairo-based elements ../../ext/cairo/.libs/libgstcairo.so libgstcairo.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-cutter.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-cutter.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-cutter.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-cutter.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Audio Cutter to split audio into non-silent bits ../../gst/cutter/.libs/libgstcutter.so libgstcutter.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-debug.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-debug.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-debug.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-debug.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ elements for testing and debugging ../../gst/debugutils/.libs/libgstdebug.so libgstdebug.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-deinterlace.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-deinterlace.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-deinterlace.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-deinterlace.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Deinterlacer ../../gst/deinterlace/.libs/libgstdeinterlace.so libgstdeinterlace.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -20,13 +20,13 @@ sink sink always -
video/x-raw, format=(string){ AYUV, ARGB, ABGR, RGBA, BGRA, Y444, xRGB, xBGR, RGBx, BGRx, RGB, BGR, YUY2, YVYU, UYVY, Y42B, I420, YV12, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw, format=(string){ AYUV, ARGB, ABGR, RGBA, BGRA, Y444, xRGB, xBGR, RGBx, BGRx, RGB, BGR, YUY2, YVYU, UYVY, Y42B, I420, YV12, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
src source always -
video/x-raw, format=(string){ AYUV, ARGB, ABGR, RGBA, BGRA, Y444, xRGB, xBGR, RGBx, BGRx, RGB, BGR, YUY2, YVYU, UYVY, Y42B, I420, YV12, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw, format=(string){ AYUV, ARGB, ABGR, RGBA, BGRA, Y444, xRGB, xBGR, RGBx, BGRx, RGB, BGR, YUY2, YVYU, UYVY, Y42B, I420, YV12, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-dtmf.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-dtmf.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-dtmf.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-dtmf.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ DTMF plugins ../../gst/dtmf/.libs/libgstdtmf.so libgstdtmf.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-dv.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-dv.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-dv.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-dv.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ DV demuxer and decoder based on libdv (libdv.sf.net) ../../ext/dv/.libs/libgstdv.so libgstdv.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-effectv.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-effectv.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-effectv.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-effectv.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ effect plugins from the effectv project ../../gst/effectv/.libs/libgsteffectv.so libgsteffectv.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-equalizer.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-equalizer.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-equalizer.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-equalizer.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ GStreamer audio equalizers ../../gst/equalizer/.libs/libgstequalizer.so libgstequalizer.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-flac.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-flac.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-flac.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-flac.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ The FLAC Lossless compressor Codec ../../ext/flac/.libs/libgstflac.so libgstflac.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -41,7 +41,7 @@ sink sink always -
audio/x-raw, format=(string){ S24LE, S24_32LE, S16LE, S8 }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)[ 1, 8 ]
+
audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)1; audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003; audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)3, channel-mask=(bitmask)0x0000000000000007; audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)4, channel-mask=(bitmask)0x0000000000000033; audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)5, channel-mask=(bitmask)0x0000000000000037; audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)6, channel-mask=(bitmask)0x000000000000003f; audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)7, channel-mask=(bitmask)0x000000000000013f; audio/x-raw, format=(string){ S8, S16LE, S24LE, S24_32LE }, layout=(string)interleaved, rate=(int)[ 1, 655350 ], channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f
src diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-flv.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-flv.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-flv.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-flv.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ FLV muxing and demuxing plugin ../../gst/flv/.libs/libgstflv.so libgstflv.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-flxdec.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-flxdec.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-flxdec.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-flxdec.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ FLC/FLI/FLX video decoder ../../gst/flx/.libs/libgstflxdec.so libgstflxdec.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-gdkpixbuf.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-gdkpixbuf.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-gdkpixbuf.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-gdkpixbuf.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ GdkPixbuf-based image decoder, overlay and sink ../../ext/gdk_pixbuf/.libs/libgstgdkpixbuf.so libgstgdkpixbuf.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-goom2k1.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-goom2k1.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-goom2k1.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-goom2k1.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ GOOM 2k1 visualization filter ../../gst/goom2k1/.libs/libgstgoom2k1.so libgstgoom2k1.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-goom.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-goom.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-goom.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-goom.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ GOOM visualization filter ../../gst/goom/.libs/libgstgoom.so libgstgoom.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-icydemux.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-icydemux.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-icydemux.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-icydemux.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Demux ICY tags from a stream ../../gst/icydemux/.libs/libgsticydemux.so libgsticydemux.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-id3demux.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-id3demux.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-id3demux.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-id3demux.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Demux ID3v1 and ID3v2 tags from a file ../../gst/id3demux/.libs/libgstid3demux.so libgstid3demux.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-imagefreeze.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-imagefreeze.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-imagefreeze.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-imagefreeze.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Still frame stream generator ../../gst/imagefreeze/.libs/libgstimagefreeze.so libgstimagefreeze.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-interleave.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-interleave.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-interleave.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-interleave.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Audio interleaver/deinterleaver ../../gst/interleave/.libs/libgstinterleave.so libgstinterleave.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-isomp4.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-isomp4.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-isomp4.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-isomp4.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ ISO base media file format support (mp4, 3gpp, qt, mj2) ../../gst/isomp4/.libs/libgstisomp4.so libgstisomp4.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -20,7 +20,7 @@ audio_%u sink request -
audio/AMR, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/AMR-WB, rate=(int)16000, channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]
+
audio/AMR, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/AMR-WB, rate=(int)16000, channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 1, 2147483647 ]
subtitle_%u @@ -32,7 +32,7 @@ video_%u sink request -
video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
+
video/x-h263, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
src @@ -59,7 +59,7 @@ video_%u sink request -
video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
+
video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
src @@ -86,7 +86,7 @@ video_%u sink request -
image/x-j2c, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; image/x-jpc, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
+
image/x-j2c, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; image/x-jpc, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
src @@ -107,7 +107,7 @@ audio_%u sink request -
audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]
+
audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 1, 2147483647 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]
subtitle_%u @@ -119,7 +119,7 @@ video_%u sink request -
video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-mp4-part, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
+
video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-mp4-part, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
src @@ -182,7 +182,7 @@ audio_%u sink request -
audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S24LE, S24BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S32LE, S32BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)dvi, block_align=(int)[ 64, 8096 ], channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-alaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-mulaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/AMR, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/AMR-WB, rate=(int)16000, channels=(int)[ 1, 2 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]
+
audio/x-raw, format=(string){ S32LE, S32BE, S24LE, S24BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)dvi, block_align=(int)[ 64, 8096 ], channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-alaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-mulaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/AMR, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/AMR-WB, rate=(int)16000, channels=(int)[ 1, 2 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]
subtitle_%u @@ -194,7 +194,7 @@ video_%u sink request -
video/x-raw, format=(string){ RGB, UYVY }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-svq, svqversion=(int)3, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dv, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-vp8, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dirac, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-qt-part, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
+
video/x-raw, format=(string){ RGB, UYVY, v210 }, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-prores, variant=(string){ standard, lt, hq, proxy }, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-h263, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-svq, svqversion=(int)3, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-dv, systemstream=(boolean)false, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; image/jpeg, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-vp8, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-dirac, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]; video/x-qt-part, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
src diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-jack.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-jack.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-jack.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-jack.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ JACK audio elements ../../ext/jack/.libs/libgstjack.so libgstjack.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-jpeg.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-jpeg.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-jpeg.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-jpeg.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ JPeg plugin library ../../ext/jpeg/.libs/libgstjpeg.so libgstjpeg.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -41,7 +41,7 @@ sink sink always -
video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, Y41B, Y42B, YVYU, Y444, RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, Y41B, Y42B, YVYU, Y444, NV21, NV12, RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
src diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-level.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-level.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-level.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-level.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Audio level plugin ../../gst/level/.libs/libgstlevel.so libgstlevel.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-matroska.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-matroska.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-matroska.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-matroska.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Matroska and WebM stream handling ../../gst/matroska/.libs/libgstmatroska.so libgstmatroska.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -14,7 +14,7 @@ Matroska demuxer Codec/Demuxer Demuxes Matroska/WebM streams into video/audio/subtitles - GStreamer maintainers <gstreamer-devel@lists.sourceforge.net> + GStreamer maintainers <gstreamer-devel@lists.freedesktop.org> sink @@ -47,7 +47,7 @@ Matroska muxer Codec/Muxer Muxes video/audio/subtitle streams into a matroska stream - GStreamer maintainers <gstreamer-devel@lists.sourceforge.net> + GStreamer maintainers <gstreamer-devel@lists.freedesktop.org> audio_%u @@ -80,7 +80,7 @@ Matroska parser Codec/Parser Parses Matroska/WebM streams into video/audio/subtitles - GStreamer maintainers <gstreamer-devel@lists.sourceforge.net> + GStreamer maintainers <gstreamer-devel@lists.freedesktop.org> sink @@ -101,7 +101,7 @@ WebM muxer Codec/Muxer Muxes video and audio streams into a WebM stream - GStreamer maintainers <gstreamer-devel@lists.sourceforge.net> + GStreamer maintainers <gstreamer-devel@lists.freedesktop.org> audio_%u diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-mulaw.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-mulaw.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-mulaw.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-mulaw.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ MuLaw audio conversion routines ../../gst/law/.libs/libgstmulaw.so libgstmulaw.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-multifile.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-multifile.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-multifile.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-multifile.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Reads/Writes buffers from/to sequentially named files ../../gst/multifile/.libs/libgstmultifile.so libgstmultifile.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -53,6 +53,60 @@
ANY
+ + + splitmuxsink + Split Muxing Bin + Generic/Bin/Muxer + Convenience bin that muxes incoming streams into multiple time/size limited files + Jan Schmidt <jan@centricular.com> + + + audio_%u + sink + request +
ANY
+
+ + subtitle_%u + sink + request +
ANY
+
+ + video + sink + request +
ANY
+
+
+
+ + splitmuxsrc + Split File Demuxing Bin + Generic/Bin/Demuxer + Source that reads a set of files created by splitmuxsink + Jan Schmidt <jan@centricular.com> + + + audio_%u + source + sometimes +
ANY
+
+ + subtitle_%u + source + sometimes +
ANY
+
+ + video + source + sometimes +
ANY
+
+
\ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-multipart.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-multipart.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-multipart.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-multipart.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ multipart stream manipulation ../../gst/multipart/.libs/libgstmultipart.so libgstmultipart.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-navigationtest.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-navigationtest.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-navigationtest.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-navigationtest.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Template for a video filter ../../gst/debugutils/.libs/libgstnavigationtest.so libgstnavigationtest.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-oss4.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-oss4.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-oss4.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-oss4.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Open Sound System (OSS) version 4 support for GStreamer ../../sys/oss4/.libs/libgstoss4audio.so libgstoss4audio.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-ossaudio.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-ossaudio.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-ossaudio.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-ossaudio.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ OSS (Open Sound System) support for GStreamer ../../sys/oss/.libs/libgstossaudio.so libgstossaudio.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-png.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-png.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-png.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-png.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ PNG plugin library ../../ext/libpng/.libs/libgstpng.so libgstpng.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-pulseaudio.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-pulseaudio.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-pulseaudio.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-pulseaudio.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ PulseAudio plugin library ../../ext/pulse/.libs/libgstpulse.so libgstpulse.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-replaygain.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-replaygain.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-replaygain.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-replaygain.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ ReplayGain volume normalization ../../gst/replaygain/.libs/libgstreplaygain.so libgstreplaygain.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-rtpmanager.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-rtpmanager.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-rtpmanager.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-rtpmanager.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ RTP session management plugin library ../../gst/rtpmanager/.libs/libgstrtpmanager.so libgstrtpmanager.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -92,7 +92,7 @@ sink sink always -
application/x-rtp, clock-rate=(int)[ 1, 2147483647 ]
+
application/x-rtp
sink_rtcp diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-rtp.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-rtp.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-rtp.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-rtp.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Real-time protocol plugins ../../gst/rtp/.libs/libgstrtp.so libgstrtp.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -362,7 +362,7 @@ src source always -
application/x-rtp, media=(string)audio, encoding-name=(string)G722, payload=(int)9, clock-rate=(int)8000
+
application/x-rtp, media=(string)audio, encoding-name=(string)G722, payload=(int)9, clock-rate=(int)8000; application/x-rtp, media=(string)audio, encoding-name=(string)G722, payload=(int)[ 96, 127 ], clock-rate=(int)8000
@@ -425,7 +425,7 @@ src source always -
audio/x-adpcm, channels=(int)1, rate=(int)8000, bitrate=(int){ 16000, 24000, 32000, 40000 }, layout=(string)g726
+
audio/x-adpcm, channels=(int)1, rate=(int)8000, bitrate=(int){ 16000, 24000, 32000, 40000 }, block_align=(int){ 2, 3, 4, 5 }, layout=(string)g726
@@ -577,6 +577,48 @@
+ rtph261depay + RTP H261 depayloader + Codec/Depayloader/Network/RTP + Extracts H261 video from RTP packets (RFC 4587) + Stian Selnes <stian@pexip.com> + + + sink + sink + always +
application/x-rtp, media=(string)video, payload=(int)31, clock-rate=(int)90000, encoding-name=(string)H261; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)H261
+
+ + src + source + always +
video/x-h261
+
+
+
+ + rtph261pay + RTP H261 packet payloader + Codec/Payloader/Network/RTP + Payload-encodes H261 video in RTP packets (RFC 4587) + Stian Selnes <stian@pexip.com> + + + sink + sink + always +
video/x-h261
+
+ + src + source + always +
application/x-rtp, media=(string)video, payload=(int)31, clock-rate=(int)90000, encoding-name=(string)H261; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)H261
+
+
+
+ rtph263depay RTP H263 depayloader Codec/Depayloader/Network/RTP @@ -824,7 +866,49 @@ src source always -
application/x-rtp, media=(string)video, payload=(int)26, clock-rate=(int)90000, encoding-name=(string)JPEG, width=(int)[ 1, 65536 ], height=(int)[ 1, 65536 ]
+
application/x-rtp, media=(string)video, payload=(int)26, clock-rate=(int)90000, encoding-name=(string)JPEG, width=(int)[ 1, 65536 ], height=(int)[ 1, 65536 ]; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)JPEG, width=(int)[ 1, 65536 ], height=(int)[ 1, 65536 ]
+
+ + + + rtpklvdepay + RTP KLV Depayloader + Codec/Depayloader/Network/RTP + Extracts KLV (SMPTE ST 336) metadata from RTP packets + Tim-Philipp Müller <tim@centricular.com> + + + sink + sink + always +
application/x-rtp, media=(string)application, clock-rate=(int)[ 1, 2147483647 ], encoding-name=(string)SMPTE336M
+
+ + src + source + always +
meta/x-klv, parsed=(boolean)true
+
+
+
+ + rtpklvpay + RTP KLV Payloader + Codec/Payloader/Network/RTP + Payloads KLV (SMPTE ST 336) metadata as RTP packets + Tim-Philipp Müller <tim@centricular.com> + + + sink + sink + always +
meta/x-klv, parsed=(boolean)true
+
+ + src + source + always +
application/x-rtp, media=(string)application, clock-rate=(int)[ 1, 2147483647 ], encoding-name=(string)SMPTE336M
@@ -887,7 +971,7 @@ src source always -
application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)MP2T
+
application/x-rtp, media=(string)video, payload=(int)33, clock-rate=(int)90000, encoding-name=(string)MP2T; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)MP2T
@@ -1028,7 +1112,7 @@ sink sink always -
application/x-rtp, media=(string)audio, clock-rate=(int)90000, encoding-name=(string)MPA; application/x-rtp, media=(string)audio, payload=(int)14, clock-rate=(int)90000
+
application/x-rtp, media=(string)audio, payload=(int)14, clock-rate=(int)90000; application/x-rtp, media=(string)audio, encoding-name=(string)MPA, clock-rate=(int)[ 1, 2147483647 ]
src @@ -1118,7 +1202,7 @@ src source always -
application/x-rtp, media=(string)video, payload=(int)32, clock-rate=(int)90000, encoding-name=(string)MPV
+
application/x-rtp, media=(string)video, payload=(int)32, clock-rate=(int)90000, encoding-name=(string)MPV; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)MPV
@@ -1502,10 +1586,10 @@ rtpvorbispay - RTP Vorbis depayloader + RTP Vorbis payloader Codec/Payloader/Network/RTP Payload-encode Vorbis audio into RTP packets (RFC 5215) - Wim Taymans <wimi.taymans@gmail.com> + Wim Taymans <wim.taymans@gmail.com> sink @@ -1532,7 +1616,7 @@ sink sink always -
application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=(string)VP8-DRAFT-IETF-01
+
application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=(string){ VP8, VP8-DRAFT-IETF-01 }
src @@ -1559,7 +1643,7 @@ src source always -
application/x-rtp, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)VP8-DRAFT-IETF-01
+
application/x-rtp, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string){ VP8, VP8-DRAFT-IETF-01 }
@@ -1574,7 +1658,7 @@ sink sink always -
application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW
+
application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string){ RGB, RGBA, BGR, BGRA, YCbCr-4:4:4, YCbCr-4:2:2, YCbCr-4:2:0, YCbCr-4:1:1 }, depth=(string){ 8, 10, 12, 16 }
src diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-rtsp.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-rtsp.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-rtsp.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-rtsp.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ transfer data via RTSP ../../gst/rtsp/.libs/libgstrtsp.so libgstrtsp.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-shapewipe.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-shapewipe.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-shapewipe.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-shapewipe.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Shape Wipe transition filter ../../gst/shapewipe/.libs/libgstshapewipe.so libgstshapewipe.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-shout2send.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-shout2send.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-shout2send.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-shout2send.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Sends data to an icecast server using libshout2 ../../ext/shout2/.libs/libgstshout2.so libgstshout2.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good libshout2 diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-smpte.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-smpte.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-smpte.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-smpte.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Apply the standard SMPTE transitions on video images ../../gst/smpte/.libs/libgstsmpte.so libgstsmpte.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-soup.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-soup.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-soup.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-soup.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ libsoup HTTP client src/sink ../../ext/soup/.libs/libgstsouphttpsrc.so libgstsouphttpsrc.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-spectrum.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-spectrum.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-spectrum.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-spectrum.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Run an FFT on the audio signal, output spectrum data ../../gst/spectrum/.libs/libgstspectrum.so libgstspectrum.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-speex.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-speex.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-speex.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-speex.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Speex plugin library ../../ext/speex/.libs/libgstspeex.so libgstspeex.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-taglib.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-taglib.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-taglib.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-taglib.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Tag writing plug-in based on taglib ../../ext/taglib/.libs/libgsttaglib.so libgsttaglib.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-udp.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-udp.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-udp.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-udp.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ transfer data via UDP ../../gst/udp/.libs/libgstudp.so libgstudp.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-video4linux2.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-video4linux2.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-video4linux2.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-video4linux2.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ elements for Video 4 Linux ../../sys/v4l2/.libs/libgstvideo4linux2.so libgstvideo4linux2.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -29,7 +29,7 @@ sink sink always -
image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string)byte-stream, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-vp8
+
image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string)byte-stream, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8
@@ -44,7 +44,7 @@ src source always -
image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string)byte-stream, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-vp8
+
image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string)byte-stream, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8
diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videobox.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videobox.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videobox.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videobox.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ resizes a video by adding borders or cropping ../../gst/videobox/.libs/libgstvideobox.so libgstvideobox.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videocrop.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videocrop.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videocrop.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videocrop.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Crops video into a user-defined region ../../gst/videocrop/.libs/libgstvideocrop.so libgstvideocrop.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videofilter.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videofilter.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videofilter.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videofilter.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Video filters plugin ../../gst/videofilter/.libs/libgstvideofilter.so libgstvideofilter.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -41,13 +41,13 @@ sink sink always -
video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, I420, YV12, IYUV, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, I420, YV12, IYUV, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY)
src source always -
video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, I420, YV12, IYUV, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, I420, YV12, IYUV, Y41B, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY)
diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videomixer.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videomixer.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-videomixer.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-videomixer.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Video mixer ../../gst/videomixer/.libs/libgstvideomixer.so libgstvideomixer.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-vpx.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-vpx.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-vpx.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-vpx.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ VP8 plugin ../../ext/vpx/.libs/libgstvpx.so libgstvpx.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -41,7 +41,7 @@ sink sink always -
video/x-raw, format=(string)I420, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw, format=(string)I420, width=(int)[ 1, 16383 ], height=(int)[ 1, 16383 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
src diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-wavenc.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-wavenc.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-wavenc.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-wavenc.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Encode raw audio into WAV ../../gst/wavenc/.libs/libgstwavenc.so libgstwavenc.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release @@ -20,13 +20,13 @@ sink sink always -
audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)1, format=(string){ S32LE, S24LE, S16LE, U8, F32LE, F64LE }, layout=(string)interleaved; audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003, format=(string){ S32LE, S24LE, S16LE, U8, F32LE, F64LE }, layout=(string)interleaved; audio/x-alaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]; audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]
+
audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 65535 ], format=(string){ S32LE, S24LE, S16LE, U8, F32LE, F64LE }, layout=(string)interleaved; audio/x-alaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]; audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]
src source always -
audio/x-wav
+
audio/x-wav; audio/x-rf64
diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-wavpack.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-wavpack.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-wavpack.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-wavpack.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Wavpack lossless/lossy audio format handling ../../ext/wavpack/.libs/libgstwavpack.so libgstwavpack.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-wavparse.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-wavparse.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-wavparse.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-wavparse.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Parse a .wav file into raw audio ../../gst/wavparse/.libs/libgstwavparse.so libgstwavparse.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-ximagesrc.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-ximagesrc.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-ximagesrc.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-ximagesrc.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ X11 video input plugin using standard Xlib calls ../../sys/ximage/.libs/libgstximagesrc.so libgstximagesrc.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-y4menc.xml gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-y4menc.xml --- gst-plugins-good1.0-1.4.3/docs/plugins/inspect/plugin-y4menc.xml 2014-09-24 08:30:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/inspect/plugin-y4menc.xml 2015-10-30 14:26:54.000000000 +0000 @@ -3,7 +3,7 @@ Encodes a YUV frame into the yuv4mpeg format (mjpegtools) ../../gst/y4m/.libs/libgsty4menc.so libgsty4menc.so - 1.4.3 + 1.6.1 LGPL gst-plugins-good GStreamer Good Plug-ins source release diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/Makefile.am gst-plugins-good1.0-1.6.1/docs/plugins/Makefile.am --- gst-plugins-good1.0-1.4.3/docs/plugins/Makefile.am 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -157,6 +157,8 @@ $(top_srcdir)/gst/multifile/gstmultifilesink.h \ $(top_srcdir)/gst/multifile/gstmultifilesrc.h \ $(top_srcdir)/gst/multifile/gstsplitfilesrc.h \ + $(top_srcdir)/gst/multifile/gstsplitmuxsrc.h \ + $(top_srcdir)/gst/multifile/gstsplitmuxsink.h \ $(top_srcdir)/gst/multipart/multipartdemux.h \ $(top_srcdir)/gst/multipart/multipartmux.h \ $(top_srcdir)/gst/isomp4/qtdemux.h \ @@ -231,9 +233,6 @@ GTKDOC_CFLAGS = $(GST_BASE_CFLAGS) -I$(top_builddir) GTKDOC_LIBS = $(GST_BASE_LIBS) -GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC) -GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC) - # If you need to override some of the declarations, place them in this file # and uncomment this line. #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt diff -Nru gst-plugins-good1.0-1.4.3/docs/plugins/Makefile.in gst-plugins-good1.0-1.6.1/docs/plugins/Makefile.in --- gst-plugins-good1.0-1.4.3/docs/plugins/Makefile.in 2014-09-24 07:25:54.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/docs/plugins/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,7 +31,17 @@ # This is an include file specifically tuned for building documentation # for GStreamer plug-ins VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -95,9 +105,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/upload-doc.mak \ - $(top_srcdir)/common/gtk-doc-plugins.mak $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am subdir = docs/plugins ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -120,7 +127,6 @@ $(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 \ @@ -135,6 +141,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -159,6 +166,9 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/common/gtk-doc-plugins.mak \ + $(top_srcdir)/common/upload-doc.mak DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -291,9 +301,6 @@ 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@ @@ -411,17 +418,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -474,6 +481,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -648,6 +656,8 @@ $(top_srcdir)/gst/multifile/gstmultifilesink.h \ $(top_srcdir)/gst/multifile/gstmultifilesrc.h \ $(top_srcdir)/gst/multifile/gstsplitfilesrc.h \ + $(top_srcdir)/gst/multifile/gstsplitmuxsrc.h \ + $(top_srcdir)/gst/multifile/gstsplitmuxsink.h \ $(top_srcdir)/gst/multipart/multipartdemux.h \ $(top_srcdir)/gst/multipart/multipartmux.h \ $(top_srcdir)/gst/isomp4/qtdemux.h \ @@ -723,13 +733,17 @@ # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = $(GST_BASE_CFLAGS) -I$(top_builddir) GTKDOC_LIBS = $(GST_BASE_LIBS) -GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) -GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) # If you need to override some of the declarations, place them in this file # and uncomment this line. #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt DOC_OVERRIDES = +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to @@ -759,11 +773,9 @@ # maintainers and result is commited to git DOC_STAMPS = \ scan-build.stamp \ - tmpl-build.stamp \ sgml-build.stamp \ html-build.stamp \ scan.stamp \ - tmpl.stamp \ sgml.stamp \ html.stamp @@ -832,7 +844,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/plugins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -841,7 +852,7 @@ 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/upload-doc.mak $(top_srcdir)/common/gtk-doc-plugins.mak: +$(top_srcdir)/common/upload-doc.mak $(top_srcdir)/common/gtk-doc-plugins.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1012,6 +1023,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-local +.PRECIOUS: Makefile + html: html-build.stamp upload: $(FORMATS) @@ -1099,7 +1112,7 @@ @ENABLE_GTK_DOC_TRUE@ scanobj_options="--verbose"; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ $(INSPECT_ENVIRONMENT) \ -@ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ +@ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \ @ENABLE_GTK_DOC_TRUE@ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \ @ENABLE_GTK_DOC_TRUE@ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ @ENABLE_GTK_DOC_TRUE@ $(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)" \ @@ -1138,29 +1151,9 @@ @ENABLE_GTK_DOC_TRUE@ --ignore-headers="$(IGNORE_HFILES)"; \ @ENABLE_GTK_DOC_TRUE@ touch scan-build.stamp -#### update templates; done on every build #### - -# in a non-srcdir build, we need to copy files from the previous step -# and the files from previous runs of this step -@ENABLE_GTK_DOC_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) -@ENABLE_GTK_DOC_TRUE@ @echo ' DOC Rebuilding template files' -@ENABLE_GTK_DOC_TRUE@ @if test x"$(srcdir)" != x. ; then \ -@ENABLE_GTK_DOC_TRUE@ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ -@ENABLE_GTK_DOC_TRUE@ do \ -@ENABLE_GTK_DOC_TRUE@ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ -@ENABLE_GTK_DOC_TRUE@ done; \ -@ENABLE_GTK_DOC_TRUE@ fi -@ENABLE_GTK_DOC_TRUE@ @gtkdoc-mktmpl --module=$(DOC_MODULE) -@ENABLE_GTK_DOC_TRUE@ @$(PYTHON) \ -@ENABLE_GTK_DOC_TRUE@ $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl -@ENABLE_GTK_DOC_TRUE@ @touch tmpl-build.stamp - -@ENABLE_GTK_DOC_TRUE@tmpl.stamp: tmpl-build.stamp -@ENABLE_GTK_DOC_TRUE@ @true - #### xml #### -@ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files) +@ENABLE_GTK_DOC_TRUE@sgml-build.stamp: scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building XML' @ENABLE_GTK_DOC_TRUE@ @-mkdir -p xml @ENABLE_GTK_DOC_TRUE@ @for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \ @@ -1176,6 +1169,7 @@ @ENABLE_GTK_DOC_TRUE@ --output-format=xml \ @ENABLE_GTK_DOC_TRUE@ --ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \ @ENABLE_GTK_DOC_TRUE@ $(MKDB_OPTIONS) +@ENABLE_GTK_DOC_TRUE@ @$(PYTHON) $(top_srcdir)/common/mangle-db.py xml @ENABLE_GTK_DOC_TRUE@ @cp ../version.entities xml @ENABLE_GTK_DOC_TRUE@ @touch sgml-build.stamp diff -Nru gst-plugins-good1.0-1.4.3/ext/aalib/Makefile.in gst-plugins-good1.0-1.6.1/ext/aalib/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/aalib/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/aalib/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/aalib -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -577,7 +585,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/aalib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/aalib/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -886,6 +893,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/cairo/Makefile.in gst-plugins-good1.0-1.6.1/ext/cairo/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/cairo/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/cairo/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/cairo -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -590,7 +598,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/cairo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/cairo/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -907,6 +914,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/dv/gstdvdemux.c gst-plugins-good1.0-1.6.1/ext/dv/gstdvdemux.c --- gst-plugins-good1.0-1.4.3/ext/dv/gstdvdemux.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/dv/gstdvdemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -258,7 +258,6 @@ dvdemux->frame_offset = 0; dvdemux->audio_offset = 0; dvdemux->video_offset = 0; - dvdemux->framecount = 0; g_atomic_int_set (&dvdemux->found_header, 0); dvdemux->frame_len = -1; dvdemux->need_segment = FALSE; @@ -303,6 +302,8 @@ GstPad *pad; GstEvent *event; gchar *stream_id; + gchar rec_datetime[40]; + GstDateTime *rec_dt; pad = gst_pad_new_from_static_template (template, template->name_template); @@ -341,6 +342,16 @@ tags = gst_tag_list_new (GST_TAG_CONTAINER_FORMAT, "DV", NULL); gst_tag_list_set_scope (tags, GST_TAG_SCOPE_GLOBAL); + + if (dv_get_recording_datetime (dvdemux->decoder, rec_datetime)) { + rec_dt = gst_date_time_new_from_iso8601_string (rec_datetime); + if (rec_dt) { + gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_DATE_TIME, + rec_dt, NULL); + gst_date_time_unref (rec_dt); + } + } + if (dvdemux->videosrcpad) gst_pad_push_event (dvdemux->videosrcpad, gst_event_new_tag (gst_tag_list_ref (tags))); diff -Nru gst-plugins-good1.0-1.4.3/ext/dv/gstdvdemux.h gst-plugins-good1.0-1.6.1/ext/dv/gstdvdemux.h --- gst-plugins-good1.0-1.4.3/ext/dv/gstdvdemux.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/dv/gstdvdemux.h 2015-10-22 08:02:54.000000000 +0000 @@ -69,8 +69,6 @@ gint frequency; gint channels; - gint framecount; - gint64 frame_offset; gint64 audio_offset; gint64 video_offset; diff -Nru gst-plugins-good1.0-1.4.3/ext/dv/gstsmptetimecode.c gst-plugins-good1.0-1.6.1/ext/dv/gstsmptetimecode.c --- gst-plugins-good1.0-1.4.3/ext/dv/gstsmptetimecode.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/dv/gstsmptetimecode.c 2015-10-22 08:02:54.000000000 +0000 @@ -229,8 +229,8 @@ g_return_val_if_fail (time_code != NULL, GST_CLOCK_TIME_NONE); if (gst_smpte_time_code_get_frame_number (system, &frame_number, time_code)) { - static int framerate_n[3] = { 3000, 25, 24 }; - static int framerate_d[3] = { 1001, 1, 1 }; + static const int framerate_n[3] = { 3000, 25, 24 }; + static const int framerate_d[3] = { 1001, 1, 1 }; return gst_util_uint64_scale (frame_number, GST_SECOND * framerate_d[system], framerate_n[system]); diff -Nru gst-plugins-good1.0-1.4.3/ext/dv/Makefile.in gst-plugins-good1.0-1.6.1/ext/dv/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/dv/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/dv/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,8 +93,6 @@ target_triplet = @target@ noinst_PROGRAMS = smpte_test$(EXEEXT) subdir = ext/dv -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 \ @@ -106,7 +114,6 @@ $(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 \ @@ -121,6 +128,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -237,6 +246,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -369,9 +379,6 @@ 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@ @@ -489,17 +496,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -552,6 +559,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -594,7 +602,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/dv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/dv/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -970,6 +977,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/flac/gstflacdec.c gst-plugins-good1.0-1.6.1/ext/flac/gstflacdec.c --- gst-plugins-good1.0-1.4.3/ext/flac/gstflacdec.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/flac/gstflacdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -100,6 +100,8 @@ gst_flac_dec_write_stream (const FLAC__StreamDecoder * decoder, const FLAC__Frame * frame, const FLAC__int32 * const buffer[], void *client_data); +static gboolean +gst_flac_dec_handle_decoder_error (GstFlacDec * dec, gboolean msg); static void gst_flac_dec_metadata_cb (const FLAC__StreamDecoder * decoder, const FLAC__StreamMetadata * metadata, void *client_data); static void gst_flac_dec_error_cb (const FLAC__StreamDecoder * @@ -177,6 +179,9 @@ gst_flac_dec_init (GstFlacDec * flacdec) { gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (flacdec), TRUE); + gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST + (flacdec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (flacdec)); } static gboolean @@ -275,6 +280,14 @@ GST_DEBUG_OBJECT (dec, "Processing headers and metadata"); if (!FLAC__stream_decoder_process_until_end_of_metadata (flacdec->decoder)) { GST_WARNING_OBJECT (dec, "process_until_end_of_metadata failed"); + if (FLAC__stream_decoder_get_state (flacdec->decoder) == + FLAC__STREAM_DECODER_ABORTED) { + GST_WARNING_OBJECT (flacdec, "Read callback caused internal abort"); + /* allow recovery */ + gst_adapter_clear (flacdec->adapter); + FLAC__stream_decoder_flush (flacdec->decoder); + gst_flac_dec_handle_decoder_error (flacdec, TRUE); + } } GST_INFO_OBJECT (dec, "headers and metadata are now processed"); return TRUE; @@ -433,13 +446,14 @@ const FLAC__StreamMetadata * metadata, void *client_data) { GstFlacDec *flacdec = GST_FLAC_DEC (client_data); + GstAudioChannelPosition position[8]; GST_LOG_OBJECT (flacdec, "metadata type: %d", metadata->type); switch (metadata->type) { case FLAC__METADATA_TYPE_STREAMINFO:{ gint64 samples; - guint depth, width, gdepth; + guint depth, width, gdepth, channels; samples = metadata->data.stream_info.total_samples; @@ -458,20 +472,18 @@ gdepth = width = 32; } + channels = metadata->data.stream_info.channels; + memcpy (position, channel_positions[channels - 1], sizeof (position)); + gst_audio_channel_positions_to_valid_order (position, channels); + /* Note: we create the inverse reordering map here */ + gst_audio_get_channel_reorder_map (channels, + position, channel_positions[channels - 1], + flacdec->channel_reorder_map); + gst_audio_info_set_format (&flacdec->info, gst_audio_format_build_integer (TRUE, G_BYTE_ORDER, width, gdepth), metadata->data.stream_info.sample_rate, - metadata->data.stream_info.channels, NULL); - - memcpy (flacdec->info.position, - channel_positions[flacdec->info.channels - 1], - sizeof (GstAudioChannelPosition) * flacdec->info.channels); - gst_audio_channel_positions_to_valid_order (flacdec->info.position, - flacdec->info.channels); - /* Note: we create the inverse reordering map here */ - gst_audio_get_channel_reorder_map (flacdec->info.channels, - flacdec->info.position, channel_positions[flacdec->info.channels - 1], - flacdec->channel_reorder_map); + metadata->data.stream_info.channels, position); GST_DEBUG_OBJECT (flacdec, "blocksize: min=%u, max=%u", flacdec->min_blocksize, flacdec->max_blocksize); @@ -555,6 +567,7 @@ guint j, i; GstMapInfo map; gboolean caps_changed; + GstAudioChannelPosition chanpos[8]; GST_LOG_OBJECT (flacdec, "samples in frame header: %d", samples); @@ -611,15 +624,14 @@ GST_DEBUG_OBJECT (flacdec, "Negotiating %d Hz @ %d channels", sample_rate, channels); + memcpy (chanpos, channel_positions[flacdec->info.channels - 1], + sizeof (chanpos)); + gst_audio_channel_positions_to_valid_order (chanpos, + flacdec->info.channels); gst_audio_info_set_format (&flacdec->info, gst_audio_format_build_integer (TRUE, G_BYTE_ORDER, width, gdepth), - sample_rate, channels, NULL); + sample_rate, channels, chanpos); - memcpy (flacdec->info.position, - channel_positions[flacdec->info.channels - 1], - sizeof (GstAudioChannelPosition) * flacdec->info.channels); - gst_audio_channel_positions_to_valid_order (flacdec->info.position, - flacdec->info.channels); /* Note: we create the inverse reordering map here */ gst_audio_get_channel_reorder_map (flacdec->info.channels, flacdec->info.position, channel_positions[flacdec->info.channels - 1], @@ -782,6 +794,14 @@ if (!FLAC__stream_decoder_process_single (dec->decoder)) { GST_INFO_OBJECT (dec, "process_single failed"); + if (FLAC__stream_decoder_get_state (dec->decoder) == + FLAC__STREAM_DECODER_ABORTED) { + GST_WARNING_OBJECT (dec, "Read callback caused internal abort"); + /* allow recovery */ + gst_adapter_clear (dec->adapter); + FLAC__stream_decoder_flush (dec->decoder); + gst_flac_dec_handle_decoder_error (dec, TRUE); + } } return dec->last_flow; diff -Nru gst-plugins-good1.0-1.4.3/ext/flac/gstflacenc.c gst-plugins-good1.0-1.6.1/ext/flac/gstflacenc.c --- gst-plugins-good1.0-1.4.3/ext/flac/gstflacenc.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/flac/gstflacenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -97,31 +97,12 @@ GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT} }; -#if G_BYTE_ORDER == G_LITTLE_ENDIAN -#define FORMATS "{ S24LE, S24_32LE, S16LE, S8 } " -#else -#define FORMATS "{ S24BE, S24_32BE, S16BE, S8 } " -#endif - -#define FLAC_SINK_CAPS \ - "audio/x-raw, " \ - "format = (string) " FORMATS ", " \ - "layout = (string) interleaved, " \ - "rate = (int) [ 1, 655350 ], " \ - "channels = (int) [ 1, 8 ]" - static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-flac") ); -static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (FLAC_SINK_CAPS) - ); - enum { PROP_0, @@ -160,9 +141,13 @@ static GstCaps *gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter); static gboolean gst_flac_enc_sink_event (GstAudioEncoder * enc, GstEvent * event); +static gboolean gst_flac_enc_sink_query (GstAudioEncoder * enc, + GstQuery * query); static void gst_flac_enc_finalize (GObject * object); +static GstCaps *gst_flac_enc_generate_sink_caps (void); + static gboolean gst_flac_enc_update_quality (GstFlacEnc * flacenc, gint quality); static void gst_flac_enc_set_property (GObject * object, guint prop_id, @@ -246,6 +231,8 @@ GObjectClass *gobject_class; GstElementClass *gstelement_class; GstAudioEncoderClass *base_class; + GstCaps *sink_caps; + GstPadTemplate *sink_templ; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; @@ -356,8 +343,12 @@ gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sink_factory)); + + sink_caps = gst_flac_enc_generate_sink_caps (); + sink_templ = gst_pad_template_new ("sink", + GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps); + gst_element_class_add_pad_template (gstelement_class, sink_templ); + gst_caps_unref (sink_caps); gst_element_class_set_static_metadata (gstelement_class, "FLAC audio encoder", "Codec/Encoder/Audio", @@ -370,6 +361,7 @@ base_class->handle_frame = GST_DEBUG_FUNCPTR (gst_flac_enc_handle_frame); base_class->getcaps = GST_DEBUG_FUNCPTR (gst_flac_enc_getcaps); base_class->sink_event = GST_DEBUG_FUNCPTR (gst_flac_enc_sink_event); + base_class->sink_query = GST_DEBUG_FUNCPTR (gst_flac_enc_sink_query); } static void @@ -408,6 +400,8 @@ flacenc->eos = FALSE; flacenc->tags = gst_tag_list_new_empty (); flacenc->toc = NULL; + flacenc->samples_in = 0; + flacenc->samples_out = 0; return TRUE; } @@ -534,8 +528,8 @@ (FLAC__uint64) gst_util_uint64_scale_round (start, sample_rate, GST_SECOND); track->number = (FLAC__byte) track_num + 1; - if (isrc) - strcpy (track->isrc, isrc); + if (isrc != NULL && strlen (isrc) <= 12) + g_strlcpy (track->isrc, isrc, 13); if (track->number <= 0) return FALSE; if (!FLAC__metadata_object_cuesheet_insert_track (cuesheet, track_num, @@ -716,6 +710,55 @@ } static GstCaps * +gst_flac_enc_generate_sink_caps (void) +{ + GstCaps *ret; + gint i; + GValue v_list = { 0, }; + GValue v = { 0, }; + GstStructure *s, *s2; + + g_value_init (&v_list, GST_TYPE_LIST); + g_value_init (&v, G_TYPE_STRING); + + /* Use system's endianness */ + g_value_set_static_string (&v, "S8"); + gst_value_list_append_value (&v_list, &v); + g_value_set_static_string (&v, GST_AUDIO_NE (S16)); + gst_value_list_append_value (&v_list, &v); + g_value_set_static_string (&v, GST_AUDIO_NE (S24)); + gst_value_list_append_value (&v_list, &v); + g_value_set_static_string (&v, GST_AUDIO_NE (S24_32)); + gst_value_list_append_value (&v_list, &v); + g_value_unset (&v); + + s = gst_structure_new_empty ("audio/x-raw"); + gst_structure_take_value (s, "format", &v_list); + + gst_structure_set (s, "layout", G_TYPE_STRING, "interleaved", + "rate", GST_TYPE_INT_RANGE, 1, 655350, NULL); + + ret = gst_caps_new_empty (); + s2 = gst_structure_copy (s); + gst_structure_set (s2, "channels", G_TYPE_INT, 1, NULL); + gst_caps_append_structure (ret, s2); + for (i = 2; i <= 8; i++) { + guint64 channel_mask; + + s2 = gst_structure_copy (s); + gst_audio_channel_positions_to_mask (channel_positions[i - 1], i, + FALSE, &channel_mask); + gst_structure_set (s2, "channels", G_TYPE_INT, i, "channel-mask", + GST_TYPE_BITMASK, channel_mask, NULL); + + gst_caps_append_structure (ret, s2); + } + gst_structure_free (s); + + return ret; +} + +static GstCaps * gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter) { GstCaps *ret = NULL, *caps = NULL; @@ -726,48 +769,7 @@ if (gst_pad_has_current_caps (pad)) { ret = gst_pad_get_current_caps (pad); } else { - gint i; - GValue v_list = { 0, }; - GValue v = { 0, }; - GstStructure *s, *s2; - - g_value_init (&v_list, GST_TYPE_LIST); - g_value_init (&v, G_TYPE_STRING); - - g_value_set_static_string (&v, "S8"); - gst_value_list_append_value (&v_list, &v); - g_value_set_static_string (&v, GST_AUDIO_NE (S16)); - gst_value_list_append_value (&v_list, &v); - g_value_set_static_string (&v, GST_AUDIO_NE (S24)); - gst_value_list_append_value (&v_list, &v); - g_value_set_static_string (&v, GST_AUDIO_NE (S24_32)); - gst_value_list_append_value (&v_list, &v); - g_value_unset (&v); - - s = gst_structure_new_empty ("audio/x-raw"); - gst_structure_take_value (s, "format", &v_list); - - gst_structure_set (s, "layout", G_TYPE_STRING, "interleaved", - "rate", GST_TYPE_INT_RANGE, 1, 655350, NULL); - - ret = gst_caps_new_empty (); - for (i = 1; i <= 8; i++) { - s2 = gst_structure_copy (s); - - if (i == 1) { - gst_structure_set (s2, "channels", G_TYPE_INT, 1, NULL); - } else { - guint64 channel_mask; - - gst_audio_channel_positions_to_mask (channel_positions[i - 1], i, - FALSE, &channel_mask); - gst_structure_set (s2, "channels", G_TYPE_INT, i, "channel-mask", - GST_TYPE_BITMASK, channel_mask, NULL); - } - - gst_caps_append_structure (ret, s2); - } - gst_structure_free (s); + ret = gst_pad_get_pad_template_caps (pad); } GST_DEBUG_OBJECT (pad, "Return caps %" GST_PTR_FORMAT, ret); @@ -1124,6 +1126,8 @@ GstFlowReturn ret = GST_FLOW_OK; GstFlacEnc *flacenc; GstBuffer *outbuf; + GstSegment *segment; + GstClockTime duration; flacenc = GST_FLAC_ENC (client_data); @@ -1159,6 +1163,28 @@ ret = gst_pad_push (GST_AUDIO_ENCODER_SRC_PAD (flacenc), outbuf); } else { /* regular frame data, pass to base class */ + if (flacenc->eos && flacenc->samples_in == flacenc->samples_out + samples) { + /* If encoding part of a frame, and we have no set stop time on + * the output segment, we update the segment stop time to reflect + * the last sample. This will let oggmux set the last page's + * granpos to tell a decoder the dummy samples should be clipped. + */ + segment = &GST_AUDIO_ENCODER_OUTPUT_SEGMENT (flacenc); + if (!GST_CLOCK_TIME_IS_VALID (segment->stop)) { + GST_DEBUG_OBJECT (flacenc, + "No stop time and partial frame, updating segment"); + duration = + gst_util_uint64_scale (flacenc->samples_out + samples, + GST_SECOND, + FLAC__stream_encoder_get_sample_rate (flacenc->encoder)); + segment->stop = segment->start + duration; + GST_DEBUG_OBJECT (flacenc, "new output segment %" GST_SEGMENT_FORMAT, + segment); + gst_pad_push_event (GST_AUDIO_ENCODER_SRC_PAD (flacenc), + gst_event_new_segment (segment)); + } + } + GST_LOG ("Pushing buffer: samples=%u, size=%u, pos=%" G_GUINT64_FORMAT, samples, (guint) bytes, flacenc->offset); ret = gst_audio_encoder_finish_frame (GST_AUDIO_ENCODER (flacenc), @@ -1229,6 +1255,11 @@ } ret = GST_AUDIO_ENCODER_CLASS (parent_class)->sink_event (enc, event); break; + case GST_EVENT_SEGMENT: + flacenc->samples_in = 0; + flacenc->samples_out = 0; + ret = GST_AUDIO_ENCODER_CLASS (parent_class)->sink_event (enc, event); + break; default: ret = GST_AUDIO_ENCODER_CLASS (parent_class)->sink_event (enc, event); break; @@ -1237,6 +1268,41 @@ return ret; } +static gboolean +gst_flac_enc_sink_query (GstAudioEncoder * enc, GstQuery * query) +{ + GstPad *pad = GST_AUDIO_ENCODER_SINK_PAD (enc); + gboolean ret = FALSE; + + GST_DEBUG ("Received %s query on sinkpad, %" GST_PTR_FORMAT, + GST_QUERY_TYPE_NAME (query), query); + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_ACCEPT_CAPS:{ + GstCaps *acceptable, *caps; + + if (gst_pad_has_current_caps (pad)) { + acceptable = gst_pad_get_current_caps (pad); + } else { + acceptable = gst_pad_get_pad_template_caps (pad); + } + + gst_query_parse_accept_caps (query, &caps); + + gst_query_set_accept_caps_result (query, + gst_caps_is_subset (caps, acceptable)); + gst_caps_unref (acceptable); + ret = TRUE; + } + break; + default: + ret = GST_AUDIO_ENCODER_CLASS (parent_class)->sink_query (enc, query); + break; + } + + return ret; +} + #if G_BYTE_ORDER == G_LITTLE_ENDIAN #define READ_INT24 GST_READ_UINT24_LE #else @@ -1328,6 +1394,7 @@ res = FLAC__stream_encoder_process_interleaved (flacenc->encoder, (const FLAC__int32 *) data, samples); + flacenc->samples_in += samples; g_free (data); diff -Nru gst-plugins-good1.0-1.4.3/ext/flac/gstflacenc.h gst-plugins-good1.0-1.6.1/ext/flac/gstflacenc.h --- gst-plugins-good1.0-1.4.3/ext/flac/gstflacenc.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/flac/gstflacenc.h 2015-10-22 08:02:54.000000000 +0000 @@ -59,6 +59,8 @@ GstTagList * tags; GstToc * toc; + guint64 samples_in; + guint64 samples_out; gboolean eos; /* queue headers until we have them all so we can add streamheaders to caps */ gboolean got_headers; diff -Nru gst-plugins-good1.0-1.4.3/ext/flac/Makefile.in gst-plugins-good1.0-1.6.1/ext/flac/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/flac/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/flac/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/flac -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -229,6 +238,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +371,6 @@ 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@ @@ -481,17 +488,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +551,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -585,7 +593,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/flac/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/flac/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -918,6 +925,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufdec.c gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufdec.c --- gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufdec.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -215,6 +215,7 @@ filter->last_timestamp = GST_CLOCK_TIME_NONE; filter->pixbuf_loader = NULL; + filter->packetized = FALSE; } static gboolean @@ -246,6 +247,8 @@ min = max = 0; } + gst_query_unref (query); + if (pool == NULL) { /* we did not get a pool, make one ourselves then */ pool = gst_buffer_pool_new (); @@ -410,9 +413,10 @@ /* as long as we don't have flow returns for event functions we need * to post an error here, or the application might never know that * things failed */ - if (res != GST_FLOW_OK && res != GST_FLOW_FLUSHING) { - GST_ELEMENT_ERROR (pixbuf, STREAM, FAILED, (NULL), - ("Flow: %s", gst_flow_get_name (res))); + if (res != GST_FLOW_OK && res != GST_FLOW_FLUSHING + && res != GST_FLOW_EOS && res != GST_FLOW_NOT_LINKED) { + GST_ELEMENT_ERROR (pixbuf, STREAM, FAILED, (NULL), ("Flow: %s", + gst_flow_get_name (res))); forward = FALSE; ret = FALSE; } @@ -424,12 +428,20 @@ pixbuf->pending_events = NULL; /* Fall through */ case GST_EVENT_SEGMENT: + { + const GstSegment *segment; + gst_event_parse_segment (event, &segment); + if (segment->format == GST_FORMAT_BYTES) + pixbuf->packetized = FALSE; + else + pixbuf->packetized = TRUE; if (pixbuf->pixbuf_loader != NULL) { gdk_pixbuf_loader_close (pixbuf->pixbuf_loader, NULL); g_object_unref (G_OBJECT (pixbuf->pixbuf_loader)); pixbuf->pixbuf_loader = NULL; } break; + } default: break; } @@ -479,9 +491,7 @@ &error)) goto error; - /* packetised mode? *//* FIXME: shouln't this be fps_d != 0, since 0/1 - * might be packetised mode but variable framerate */ - if (filter->in_fps_n != 0) { + if (filter->packetized == TRUE) { gdk_pixbuf_loader_close (filter->pixbuf_loader, NULL); ret = gst_gdk_pixbuf_dec_flush (filter); g_object_unref (filter->pixbuf_loader); diff -Nru gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufdec.h gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufdec.h --- gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufdec.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufdec.h 2015-10-22 08:02:54.000000000 +0000 @@ -47,14 +47,15 @@ GstPad *sinkpad, *srcpad; - GstClockTime last_timestamp; - GdkPixbufLoader *pixbuf_loader; + GstClockTime last_timestamp; + GdkPixbufLoader *pixbuf_loader; gint in_fps_n, in_fps_d; - GstVideoInfo info; + GstVideoInfo info; GstBufferPool *pool; - GList *pending_events; + GList *pending_events; + gboolean packetized; }; struct _GstGdkPixbufDecClass diff -Nru gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufoverlay.c gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufoverlay.c --- gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufoverlay.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufoverlay.c 2015-10-22 08:02:54.000000000 +0000 @@ -1,5 +1,5 @@ /* GStreamer GdkPixbuf overlay - * Copyright (C) 2012 Tim-Philipp Müller + * Copyright (C) 2012-2014 Tim-Philipp Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -73,11 +73,15 @@ static gboolean gst_gdk_pixbuf_overlay_load_image (GstGdkPixbufOverlay * overlay, GError ** err); +static void gst_gdk_pixbuf_overlay_set_pixbuf (GstGdkPixbufOverlay * overlay, + GdkPixbuf * pixbuf); enum { PROP_0, PROP_LOCATION, + PROP_PIXBUF, + PROP_POSITIONING_MODE, PROP_OFFSET_X, PROP_OFFSET_Y, PROP_RELATIVE_X, @@ -94,6 +98,10 @@ "IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, " \ "GRAY8, GRAY16_BE, GRAY16_LE }" +/* FIXME 2.0: change to absolute positioning */ +#define DEFAULT_POSITIONING_MODE \ + GST_GDK_PIXBUF_POSITIONING_PIXELS_RELATIVE_TO_EDGES + static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -109,6 +117,29 @@ G_DEFINE_TYPE (GstGdkPixbufOverlay, gst_gdk_pixbuf_overlay, GST_TYPE_VIDEO_FILTER); +#define GST_TYPE_GDK_PIXBUF_POSITIONING_MODE \ + (gst_gdk_pixbuf_positioning_mode_get_type()) + +static GType +gst_gdk_pixbuf_positioning_mode_get_type (void) +{ + static const GEnumValue pos_modes[] = { + {GST_GDK_PIXBUF_POSITIONING_PIXELS_RELATIVE_TO_EDGES, + "pixels-relative-to-edges", "pixels-relative-to-edges"}, + {GST_GDK_PIXBUF_POSITIONING_PIXELS_ABSOLUTE, "pixels-absolute", + "pixels-absolute"}, + {0, NULL, NULL}, + }; + + static GType type; /* 0 */ + + if (!type) { + type = g_enum_register_static ("GstGdkPixbufPositioningMode", pos_modes); + } + + return type; +} + static void gst_gdk_pixbuf_overlay_class_init (GstGdkPixbufOverlayClass * klass) { @@ -179,6 +210,35 @@ g_param_spec_double ("alpha", "Alpha", "Global alpha of overlay image", 0.0, 1.0, 1.0, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstGdkPixbufOverlay:pixbuf: + * + * GdkPixbuf object to render. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_PIXBUF, + g_param_spec_object ("pixbuf", "Pixbuf", "GdkPixbuf object to render", + GDK_TYPE_PIXBUF, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING + | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstGdkPixbufOverlay:positioning-mode: + * + * Positioning mode of offset-x and offset-y properties. Determines how + * negative x/y offsets will be interpreted. By default negative values + * are for positioning relative to the right/bottom edge of the video + * image, but you can use this property to select absolute positioning + * relative to a (0, 0) origin in the top-left corner. That way negative + * offsets will be to the left/above the video image, which allows you to + * smoothly slide logos into and out of the frame if desired. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_POSITIONING_MODE, + g_param_spec_enum ("positioning-mode", "Positioning mode", + "Positioning mode of offset-x and offset-y properties", + GST_TYPE_GDK_PIXBUF_POSITIONING_MODE, DEFAULT_POSITIONING_MODE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_template)); @@ -202,10 +262,14 @@ overlay->relative_x = 0.0; overlay->relative_y = 0.0; + overlay->positioning_mode = DEFAULT_POSITIONING_MODE; + overlay->overlay_width = 0; overlay->overlay_height = 0; overlay->alpha = 1.0; + + overlay->pixbuf = NULL; } void @@ -226,8 +290,17 @@ err->message); g_error_free (err); } + break; } + case PROP_PIXBUF:{ + GdkPixbuf *pixbuf = g_value_get_object (value); + + if (overlay->pixbuf != NULL) + g_object_unref (overlay->pixbuf); + overlay->pixbuf = g_object_ref (pixbuf); + gst_gdk_pixbuf_overlay_set_pixbuf (overlay, g_object_ref (pixbuf)); break; + } case PROP_OFFSET_X: overlay->offset_x = g_value_get_int (value); overlay->update_composition = TRUE; @@ -256,6 +329,10 @@ overlay->alpha = g_value_get_double (value); overlay->update_composition = TRUE; break; + case PROP_POSITIONING_MODE: + overlay->positioning_mode = g_value_get_enum (value); + overlay->update_composition = TRUE; + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -276,6 +353,9 @@ case PROP_LOCATION: g_value_set_string (value, overlay->location); break; + case PROP_PIXBUF: + g_value_set_object (value, overlay->pixbuf); + break; case PROP_OFFSET_X: g_value_set_int (value, overlay->offset_x); break; @@ -297,6 +377,9 @@ case PROP_ALPHA: g_value_set_double (value, overlay->alpha); break; + case PROP_POSITIONING_MODE: + g_value_set_enum (value, overlay->positioning_mode); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -319,16 +402,26 @@ static gboolean gst_gdk_pixbuf_overlay_load_image (GstGdkPixbufOverlay * overlay, GError ** err) { - GstVideoMeta *video_meta; GdkPixbuf *pixbuf; - guint8 *pixels, *p; - gint width, height, stride, w, h, plane; pixbuf = gdk_pixbuf_new_from_file (overlay->location, err); if (pixbuf == NULL) return FALSE; + gst_gdk_pixbuf_overlay_set_pixbuf (overlay, pixbuf); + return TRUE; +} + +/* Takes ownership of pixbuf; call with OBJECT_LOCK */ +static void +gst_gdk_pixbuf_overlay_set_pixbuf (GstGdkPixbufOverlay * overlay, + GdkPixbuf * pixbuf) +{ + GstVideoMeta *video_meta; + guint8 *pixels, *p; + gint width, height, stride, w, h, plane; + if (!gdk_pixbuf_get_has_alpha (pixbuf)) { GdkPixbuf *alpha_pixbuf; @@ -369,6 +462,9 @@ } } + if (overlay->pixels) + gst_buffer_unref (overlay->pixels); + /* assume we have row padding even for the last row */ /* transfer ownership of pixbuf to the buffer */ overlay->pixels = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, @@ -384,8 +480,7 @@ overlay->update_composition = TRUE; - GST_INFO_OBJECT (overlay, "Loaded image, %d x %d", width, height); - return TRUE; + GST_INFO_OBJECT (overlay, "Updated pixbuf, %d x %d", width, height); } static gboolean @@ -442,6 +537,7 @@ static void gst_gdk_pixbuf_overlay_update_composition (GstGdkPixbufOverlay * overlay) { + GstGdkPixbufPositioningMode positioning_mode; GstVideoOverlayComposition *comp; GstVideoOverlayRectangle *rect; GstVideoMeta *overlay_meta; @@ -461,14 +557,21 @@ overlay_meta = gst_buffer_get_video_meta (overlay->pixels); - x = overlay->offset_x < 0 ? - video_width + overlay->offset_x - overlay_meta->width + - (overlay->relative_x * overlay_meta->width) : - overlay->offset_x + (overlay->relative_x * overlay_meta->width); - y = overlay->offset_y < 0 ? - video_height + overlay->offset_y - overlay_meta->height + - (overlay->relative_y * overlay_meta->height) : - overlay->offset_y + (overlay->relative_y * overlay_meta->height); + positioning_mode = overlay->positioning_mode; + + if (positioning_mode == GST_GDK_PIXBUF_POSITIONING_PIXELS_ABSOLUTE) { + x = overlay->offset_x + (overlay->relative_x * overlay_meta->width); + y = overlay->offset_y + (overlay->relative_y * overlay_meta->height); + } else { + x = overlay->offset_x < 0 ? + video_width + overlay->offset_x - overlay_meta->width + + (overlay->relative_x * overlay_meta->width) : + overlay->offset_x + (overlay->relative_x * overlay_meta->width); + y = overlay->offset_y < 0 ? + video_height + overlay->offset_y - overlay_meta->height + + (overlay->relative_y * overlay_meta->height) : + overlay->offset_y + (overlay->relative_y * overlay_meta->height); + } width = overlay->overlay_width; if (width == 0) diff -Nru gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufoverlay.h gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufoverlay.h --- gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/gstgdkpixbufoverlay.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/gstgdkpixbufoverlay.h 2015-10-22 08:02:54.000000000 +0000 @@ -1,5 +1,5 @@ /* GStreamer GdkPixbuf overlay - * Copyright (C) 2012 Tim-Philipp Müller + * Copyright (C) 2012-2014 Tim-Philipp Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -37,6 +37,11 @@ typedef struct _GstGdkPixbufOverlay GstGdkPixbufOverlay; typedef struct _GstGdkPixbufOverlayClass GstGdkPixbufOverlayClass; +typedef enum { + GST_GDK_PIXBUF_POSITIONING_PIXELS_RELATIVE_TO_EDGES, + GST_GDK_PIXBUF_POSITIONING_PIXELS_ABSOLUTE +} GstGdkPixbufPositioningMode; + /** * GstGdkPixbufOverlay: * @@ -49,19 +54,24 @@ /* properties */ gchar * location; + /* pixbuf set via pixbuf property */ + GdkPixbuf * pixbuf; + gint offset_x; gint offset_y; gdouble relative_x; gdouble relative_y; + GstGdkPixbufPositioningMode positioning_mode; + gint overlay_width; gint overlay_height; gdouble alpha; /* the loaded image, as BGRA/ARGB pixels, with GstVideoMeta */ - GstBuffer * pixels; + GstBuffer * pixels; /* OBJECT_LOCK */ GstVideoOverlayComposition * comp; diff -Nru gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/Makefile.am gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/Makefile.am --- gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/Makefile.am 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -1,7 +1,5 @@ plugin_LTLIBRARIES = libgstgdkpixbuf.la -# pixbufscale.[ch] - not sure the world needs this -# # gstgdkanimation.[ch] - GdkPixbuf animations decode everything from the start, # which means it's easy to make us go OOM with manipulated input, disabled diff -Nru gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/Makefile.in gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/gdk_pixbuf/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/gdk_pixbuf/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/gdk_pixbuf -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -230,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -362,9 +372,6 @@ 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@ @@ -482,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -545,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -559,8 +567,6 @@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libgstgdkpixbuf.la -# pixbufscale.[ch] - not sure the world needs this -# # gstgdkanimation.[ch] - GdkPixbuf animations decode everything from the start, # which means it's easy to make us go OOM with manipulated input, disabled libgstgdkpixbuf_la_SOURCES = \ @@ -604,7 +610,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/gdk_pixbuf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/gdk_pixbuf/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -937,6 +942,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosink.c gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosink.c --- gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosink.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosink.c 2015-10-22 08:02:54.000000000 +0000 @@ -458,8 +458,13 @@ /* find all the physical input ports. A physical input port is a port * associated with a hardware device. Someone needs connect to a physical * port in order to hear something. */ - ports = jack_get_ports (client, NULL, NULL, - JackPortIsPhysical | JackPortIsInput); + if (sink->port_pattern == NULL) { + ports = jack_get_ports (client, NULL, NULL, + JackPortIsPhysical | JackPortIsInput); + } else { + ports = jack_get_ports (client, sink->port_pattern, NULL, + JackPortIsInput); + } if (ports == NULL) { /* no ports? fine then we don't do anything except for posting a warning * message. */ @@ -675,6 +680,7 @@ #define DEFAULT_PROP_CONNECT GST_JACK_CONNECT_AUTO #define DEFAULT_PROP_SERVER NULL #define DEFAULT_PROP_CLIENT_NAME NULL +#define DEFAULT_PROP_PORT_PATTERN NULL #define DEFAULT_PROP_TRANSPORT GST_JACK_TRANSPORT_AUTONOMOUS enum @@ -684,6 +690,7 @@ PROP_SERVER, PROP_CLIENT, PROP_CLIENT_NAME, + PROP_PORT_PATTERN, PROP_TRANSPORT, PROP_LAST }; @@ -750,6 +757,19 @@ GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstJackAudioSink:port-pattern + * + * autoconnect to ports matching pattern, when NULL connect to physical ports + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_PORT_PATTERN, + g_param_spec_string ("port-pattern", "port pattern", + "A pattern to select which ports to connect to (NULL = first physical ports)", + DEFAULT_PROP_PORT_PATTERN, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstJackAudioSink:transport: * @@ -805,6 +825,11 @@ sink->client_name = NULL; } + if (sink->port_pattern != NULL) { + g_free (sink->port_pattern); + sink->port_pattern = NULL; + } + G_OBJECT_CLASS (parent_class)->dispose (object); } @@ -821,6 +846,10 @@ g_free (sink->client_name); sink->client_name = g_value_dup_string (value); break; + case PROP_PORT_PATTERN: + g_free (sink->port_pattern); + sink->port_pattern = g_value_dup_string (value); + break; case PROP_CONNECT: sink->connect = g_value_get_enum (value); break; @@ -855,6 +884,9 @@ case PROP_CLIENT_NAME: g_value_set_string (value, sink->client_name); break; + case PROP_PORT_PATTERN: + g_value_set_string (value, sink->port_pattern); + break; case PROP_CONNECT: g_value_set_enum (value, sink->connect); break; diff -Nru gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosink.h gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosink.h --- gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosink.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosink.h 2015-10-22 08:02:54.000000000 +0000 @@ -59,6 +59,7 @@ gchar *server; jack_client_t *jclient; gchar *client_name; + gchar *port_pattern; guint transport; /* our client */ diff -Nru gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosrc.c gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosrc.c --- gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosrc.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -469,9 +469,15 @@ /* find all the physical output ports. A physical output port is a port * associated with a hardware device. Someone needs connect to a physical * port in order to capture something. */ - ports = - jack_get_ports (client, NULL, NULL, - JackPortIsPhysical | JackPortIsOutput); + + if (src->port_pattern == NULL) { + ports = jack_get_ports (client, NULL, NULL, + JackPortIsPhysical | JackPortIsOutput); + } else { + ports = jack_get_ports (client, src->port_pattern, NULL, + JackPortIsOutput); + } + if (ports == NULL) { /* no ports? fine then we don't do anything except for posting a warning * message. */ @@ -680,7 +686,7 @@ #define DEFAULT_PROP_SERVER NULL #define DEFAULT_PROP_CLIENT_NAME NULL #define DEFAULT_PROP_TRANSPORT GST_JACK_TRANSPORT_AUTONOMOUS - +#define DEFAULT_PROP_PORT_PATTERN NULL enum { PROP_0, @@ -688,11 +694,11 @@ PROP_SERVER, PROP_CLIENT, PROP_CLIENT_NAME, + PROP_PORT_PATTERN, PROP_TRANSPORT, PROP_LAST }; - /* the capabilities of the inputs and outputs. * * describe the real formats here. @@ -771,6 +777,18 @@ GST_TYPE_JACK_CLIENT, GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstJackAudioSrc:port-pattern + * + * autoconnect to ports matching pattern, when NULL connect to physical ports + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_PORT_PATTERN, + g_param_spec_string ("port-pattern", "port pattern", + "A pattern to select which ports to connect to (NULL = first physical ports)", + DEFAULT_PROP_PORT_PATTERN, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstJackAudioSink:transport: @@ -828,6 +846,11 @@ src->client_name = NULL; } + if (src->port_pattern != NULL) { + g_free (src->port_pattern); + src->port_pattern = NULL; + } + G_OBJECT_CLASS (parent_class)->dispose (object); } @@ -842,6 +865,10 @@ g_free (src->client_name); src->client_name = g_value_dup_string (value); break; + case PROP_PORT_PATTERN: + g_free (src->port_pattern); + src->port_pattern = g_value_dup_string (value); + break; case PROP_CONNECT: src->connect = g_value_get_enum (value); break; @@ -874,6 +901,9 @@ case PROP_CLIENT_NAME: g_value_set_string (value, src->client_name); break; + case PROP_PORT_PATTERN: + g_value_set_string (value, src->port_pattern); + break; case PROP_CONNECT: g_value_set_enum (value, src->connect); break; diff -Nru gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosrc.h gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosrc.h --- gst-plugins-good1.0-1.4.3/ext/jack/gstjackaudiosrc.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jack/gstjackaudiosrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -76,6 +76,7 @@ gchar *server; jack_client_t *jclient; gchar *client_name; + gchar *port_pattern; guint transport; /* our client */ diff -Nru gst-plugins-good1.0-1.4.3/ext/jack/Makefile.in gst-plugins-good1.0-1.6.1/ext/jack/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/jack/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jack/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/jack -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -229,6 +238,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +371,6 @@ 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@ @@ -481,17 +488,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +551,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -579,7 +587,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/jack/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/jack/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -920,6 +927,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/jpeg/gstjpegdec.c gst-plugins-good1.0-1.6.1/ext/jpeg/gstjpegdec.c --- gst-plugins-good1.0-1.4.3/ext/jpeg/gstjpegdec.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jpeg/gstjpegdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -151,12 +151,14 @@ * * Deprecated: 1.3.1: Property wasn't used internally */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MAX_ERRORS, g_param_spec_int ("max-errors", "Maximum Consecutive Decoding Errors", "(Deprecated) Error out after receiving N consecutive decoding errors" " (-1 = never fail, 0 = automatic, 1 = fail on first error)", -1, G_MAXINT, JPEG_DEFAULT_MAX_ERRORS, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); +#endif gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_jpeg_dec_src_pad_template)); @@ -276,6 +278,10 @@ /* init properties */ dec->idct_method = JPEG_DEFAULT_IDCT_METHOD; dec->max_errors = JPEG_DEFAULT_MAX_ERRORS; + + gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST + (dec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec)); } static inline gboolean @@ -593,12 +599,8 @@ gst_jpeg_dec_set_format (GstVideoDecoder * dec, GstVideoCodecState * state) { GstJpegDec *jpeg = GST_JPEG_DEC (dec); - GstVideoInfo *info = &state->info; - /* FIXME : previously jpegdec would handled input as packetized - * if the framerate was present. Here we consider it packetized if - * the fps is != 1/1 */ - if (GST_VIDEO_INFO_FPS_N (info) != 1 && GST_VIDEO_INFO_FPS_D (info) != 1) + if (dec->input_segment.format == GST_FORMAT_TIME) gst_video_decoder_set_packetized (dec, TRUE); else gst_video_decoder_set_packetized (dec, FALSE); @@ -996,6 +998,7 @@ guint code, hdr_ok; gboolean need_unmap = TRUE; GstVideoCodecState *state = NULL; + gboolean release_frame = TRUE; dec->current_frame = frame; gst_buffer_map (frame->input_buffer, &dec->current_frame_map, GST_MAP_READ); @@ -1143,6 +1146,7 @@ gst_buffer_unmap (frame->input_buffer, &dec->current_frame_map); ret = gst_video_decoder_finish_frame (bdec, frame); + release_frame = FALSE; need_unmap = FALSE; done: @@ -1152,6 +1156,9 @@ if (need_unmap) gst_buffer_unmap (frame->input_buffer, &dec->current_frame_map); + if (release_frame) + gst_video_decoder_release_frame (bdec, frame); + if (state) gst_video_codec_state_unref (state); @@ -1185,6 +1192,7 @@ gst_buffer_unmap (frame->input_buffer, &dec->current_frame_map); gst_video_decoder_drop_frame (bdec, frame); + release_frame = FALSE; need_unmap = FALSE; jpeg_abort_decompress (&dec->cinfo); @@ -1306,10 +1314,11 @@ case PROP_IDCT_METHOD: dec->idct_method = g_value_get_enum (value); break; +#ifndef GST_REMOVE_DEPRECATED case PROP_MAX_ERRORS: g_atomic_int_set (&dec->max_errors, g_value_get_int (value)); break; - +#endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1328,10 +1337,11 @@ case PROP_IDCT_METHOD: g_value_set_enum (value, dec->idct_method); break; +#ifndef GST_REMOVE_DEPRECATED case PROP_MAX_ERRORS: g_value_set_int (value, g_atomic_int_get (&dec->max_errors)); break; - +#endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; diff -Nru gst-plugins-good1.0-1.4.3/ext/jpeg/gstjpegenc.c gst-plugins-good1.0-1.6.1/ext/jpeg/gstjpegenc.c --- gst-plugins-good1.0-1.4.3/ext/jpeg/gstjpegenc.c 2014-07-21 08:35:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jpeg/gstjpegenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -98,8 +98,8 @@ GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE - ("{ I420, YV12, YUY2, UYVY, Y41B, Y42B, YVYU, Y444, " - "RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 }")) + ("{ I420, YV12, YUY2, UYVY, Y41B, Y42B, YVYU, Y444, NV21, " + "NV12, RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 }")) ); /* *INDENT-ON* */ @@ -283,6 +283,8 @@ static void gst_jpegenc_init (GstJpegEnc * jpegenc) { + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (jpegenc)); + /* setup jpeglib */ memset (&jpegenc->cinfo, 0, sizeof (jpegenc->cinfo)); memset (&jpegenc->jerr, 0, sizeof (jpegenc->jerr)); diff -Nru gst-plugins-good1.0-1.4.3/ext/jpeg/Makefile.in gst-plugins-good1.0-1.6.1/ext/jpeg/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/jpeg/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/jpeg/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/jpeg -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -588,7 +596,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/jpeg/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/jpeg/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -913,6 +920,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # deprecated gstsmokeenc.h gstsmokedec.h smokecodec.h smokeformat.h # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru gst-plugins-good1.0-1.4.3/ext/libcaca/Makefile.in gst-plugins-good1.0-1.6.1/ext/libcaca/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/libcaca/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/libcaca/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/libcaca -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -588,7 +596,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/libcaca/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/libcaca/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -897,6 +904,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/libpng/gstpngdec.c gst-plugins-good1.0-1.6.1/ext/libpng/gstpngdec.c --- gst-plugins-good1.0-1.4.3/ext/libpng/gstpngdec.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/libpng/gstpngdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -111,6 +111,11 @@ pngdec->color_type = -1; pngdec->image_ready = FALSE; + pngdec->read_data = 0; + + gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST + (pngdec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (pngdec)); } static void @@ -129,7 +134,7 @@ user_info_callback (png_structp png_ptr, png_infop info) { GstPngDec *pngdec = NULL; - GstFlowReturn ret = GST_FLOW_OK; + GstFlowReturn ret; GST_LOG ("info ready"); @@ -155,13 +160,12 @@ gst_pngdec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state) { GstPngDec *pngdec = (GstPngDec *) decoder; - GstVideoInfo *info = &state->info; if (pngdec->input_state) gst_video_codec_state_unref (pngdec->input_state); pngdec->input_state = gst_video_codec_state_ref (state); - if (GST_VIDEO_INFO_FPS_N (info) != 1 && GST_VIDEO_INFO_FPS_D (info) != 1) + if (decoder->input_segment.format == GST_FORMAT_TIME) gst_video_decoder_set_packetized (decoder, TRUE); else gst_video_decoder_set_packetized (decoder, FALSE); @@ -412,6 +416,7 @@ gconstpointer data; guint64 signature; gsize size; + GstPngDec *pngdec = (GstPngDec *) decoder; GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame); @@ -426,39 +431,42 @@ data = gst_adapter_map (adapter, size); gst_byte_reader_init (&reader, data, size); - if (!gst_byte_reader_peek_uint64_be (&reader, &signature)) - goto need_more_data; - - if (signature != PNG_SIGNATURE) { - for (;;) { - guint offset; - - offset = gst_byte_reader_masked_scan_uint32 (&reader, 0xffffffff, - 0x89504E47, 0, gst_byte_reader_get_remaining (&reader)); - - if (offset == -1) { - gst_adapter_flush (adapter, - gst_byte_reader_get_remaining (&reader) - 4); - goto need_more_data; - } - - if (!gst_byte_reader_skip (&reader, offset)) - goto need_more_data; - - if (!gst_byte_reader_peek_uint64_be (&reader, &signature)) - goto need_more_data; + if (pngdec->read_data == 0) { + if (!gst_byte_reader_peek_uint64_be (&reader, &signature)) + goto need_more_data; - if (signature == PNG_SIGNATURE) { - /* We're skipping, go out, we'll be back */ - gst_adapter_flush (adapter, gst_byte_reader_get_pos (&reader)); - goto need_more_data; + if (signature != PNG_SIGNATURE) { + for (;;) { + guint offset; + + offset = gst_byte_reader_masked_scan_uint32 (&reader, 0xffffffff, + 0x89504E47, 0, gst_byte_reader_get_remaining (&reader)); + + if (offset == -1) { + gst_adapter_flush (adapter, + gst_byte_reader_get_remaining (&reader) - 4); + goto need_more_data; + } + + if (!gst_byte_reader_skip (&reader, offset)) + goto need_more_data; + + if (!gst_byte_reader_peek_uint64_be (&reader, &signature)) + goto need_more_data; + + if (signature == PNG_SIGNATURE) { + /* We're skipping, go out, we'll be back */ + gst_adapter_flush (adapter, gst_byte_reader_get_pos (&reader)); + goto need_more_data; + } + if (!gst_byte_reader_skip (&reader, 4)) + goto need_more_data; } - if (!gst_byte_reader_skip (&reader, 4)) - goto need_more_data; } + pngdec->read_data = 8; } - if (!gst_byte_reader_skip (&reader, 8)) + if (!gst_byte_reader_skip (&reader, pngdec->read_data)) goto need_more_data; for (;;) { @@ -478,8 +486,10 @@ toadd = gst_byte_reader_get_pos (&reader); GST_DEBUG_OBJECT (decoder, "Have complete frame of size %" G_GSIZE_FORMAT, toadd); + pngdec->read_data = 0; goto have_full_frame; - } + } else + pngdec->read_data += length + 12; } g_assert_not_reached (); @@ -592,6 +602,7 @@ } pngdec->color_type = -1; + pngdec->read_data = 0; } static gboolean diff -Nru gst-plugins-good1.0-1.4.3/ext/libpng/gstpngdec.h gst-plugins-good1.0-1.6.1/ext/libpng/gstpngdec.h --- gst-plugins-good1.0-1.4.3/ext/libpng/gstpngdec.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/libpng/gstpngdec.h 2015-10-22 08:02:54.000000000 +0000 @@ -56,6 +56,7 @@ gint color_type; gboolean image_ready; + gsize read_data; }; struct _GstPngDecClass diff -Nru gst-plugins-good1.0-1.4.3/ext/libpng/gstpngenc.c gst-plugins-good1.0-1.6.1/ext/libpng/gstpngenc.c --- gst-plugins-good1.0-1.4.3/ext/libpng/gstpngenc.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/libpng/gstpngenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -199,6 +199,8 @@ static void gst_pngenc_init (GstPngEnc * pngenc) { + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (pngenc)); + /* init settings */ pngenc->png_struct_ptr = NULL; pngenc->png_info_ptr = NULL; diff -Nru gst-plugins-good1.0-1.4.3/ext/libpng/Makefile.in gst-plugins-good1.0-1.6.1/ext/libpng/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/libpng/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/libpng/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/libpng -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -580,7 +588,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/libpng/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/libpng/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -905,6 +912,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/Makefile.am gst-plugins-good1.0-1.6.1/ext/Makefile.am --- gst-plugins-good1.0-1.4.3/ext/Makefile.am 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -52,12 +52,6 @@ LIBPNG_DIR = endif -# if USE_MIKMOD -# MIKMOD_DIR = mikmod -# else -MIKMOD_DIR = -# endif - if USE_DV1394 DV1394_DIR = raw1394 else @@ -119,7 +113,6 @@ $(LIBDV_DIR) \ $(LIBMNG_DIR) \ $(LIBPNG_DIR) \ - $(MIKMOD_DIR) \ $(PULSE_DIR) \ $(SHOUT2_DIR) \ $(SOUP_DIR) \ diff -Nru gst-plugins-good1.0-1.4.3/ext/Makefile.in gst-plugins-good1.0-1.6.1/ext/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -19,7 +19,17 @@ # descending into all subdirectories a second time, but only after the first # (parallel) run has finished, so it should go right through the second time. VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,8 +93,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am subdir = ext ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -107,7 +115,6 @@ $(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 \ @@ -122,6 +129,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -180,6 +188,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/common/parallel-subdirs.mak DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -337,9 +347,6 @@ 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@ @@ -457,17 +464,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -520,6 +527,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -550,13 +558,7 @@ @USE_LIBDV_TRUE@LIBDV_DIR = dv @USE_LIBPNG_FALSE@LIBPNG_DIR = @USE_LIBPNG_TRUE@LIBPNG_DIR = libpng - -# if USE_MIKMOD -# MIKMOD_DIR = mikmod -# else -MIKMOD_DIR = @USE_DV1394_FALSE@DV1394_DIR = -# endif @USE_DV1394_TRUE@DV1394_DIR = raw1394 @USE_PULSE_FALSE@PULSE_DIR = @USE_PULSE_TRUE@PULSE_DIR = pulse @@ -584,7 +586,6 @@ $(LIBDV_DIR) \ $(LIBMNG_DIR) \ $(LIBPNG_DIR) \ - $(MIKMOD_DIR) \ $(PULSE_DIR) \ $(SHOUT2_DIR) \ $(SOUP_DIR) \ @@ -627,7 +628,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -636,7 +636,7 @@ 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/parallel-subdirs.mak: +$(top_srcdir)/common/parallel-subdirs.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -923,6 +923,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + .PHONY: independent-subdirs $(SUBDIRS) diff -Nru gst-plugins-good1.0-1.4.3/ext/pulse/Makefile.in gst-plugins-good1.0-1.6.1/ext/pulse/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/pulse/Makefile.in 2014-09-24 07:25:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/pulse/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/pulse -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -230,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -362,9 +372,6 @@ 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@ @@ -482,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -545,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -594,7 +602,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/pulse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/pulse/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -935,6 +942,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/pulse/pulsedeviceprovider.c gst-plugins-good1.0-1.6.1/ext/pulse/pulsedeviceprovider.c --- gst-plugins-good1.0-1.4.3/ext/pulse/pulsedeviceprovider.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/pulse/pulsedeviceprovider.c 2015-10-22 08:02:54.000000000 +0000 @@ -1,7 +1,7 @@ /* GStreamer * Copyright (C) 2012 Olivier Crete * - * gstv4l2deviceprovider.c: V4l2 device probing and monitoring + * pulsedeviceprovider.c: pulseaudio device probing and monitoring * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -40,7 +40,7 @@ static GstDevice *gst_pulse_device_new (guint id, const gchar * device_name, GstCaps * caps, const gchar * internal_name, - GstPulseDeviceType type); + GstPulseDeviceType type, GstStructure * properties); G_DEFINE_TYPE (GstPulseDeviceProvider, gst_pulse_device_provider, GST_TYPE_DEVICE_PROVIDER); @@ -189,6 +189,7 @@ new_source (const pa_source_info * info) { GstCaps *caps; + GstStructure *props; guint i; caps = gst_caps_new_empty (); @@ -196,14 +197,17 @@ for (i = 0; i < info->n_formats; i++) gst_caps_append (caps, gst_pulse_format_info_to_caps (info->formats[i])); + props = gst_pulse_make_structure (info->proplist); + return gst_pulse_device_new (info->index, info->description, - caps, info->name, GST_PULSE_DEVICE_TYPE_SOURCE); + caps, info->name, GST_PULSE_DEVICE_TYPE_SOURCE, props); } static GstDevice * new_sink (const pa_sink_info * info) { GstCaps *caps; + GstStructure *props; guint i; caps = gst_caps_new_empty (); @@ -211,8 +215,10 @@ for (i = 0; i < info->n_formats; i++) gst_caps_append (caps, gst_pulse_format_info_to_caps (info->formats[i])); + props = gst_pulse_make_structure (info->proplist); + return gst_pulse_device_new (info->index, info->description, - caps, info->name, GST_PULSE_DEVICE_TYPE_SINK); + caps, info->name, GST_PULSE_DEVICE_TYPE_SINK, props); } static void @@ -603,7 +609,8 @@ static GstDevice * gst_pulse_device_new (guint device_index, const gchar * device_name, - GstCaps * caps, const gchar * internal_name, GstPulseDeviceType type) + GstCaps * caps, const gchar * internal_name, GstPulseDeviceType type, + GstStructure * props) { GstPulseDevice *gstdev; const gchar *element = NULL; @@ -631,7 +638,7 @@ gstdev = g_object_new (GST_TYPE_PULSE_DEVICE, "display-name", device_name, "caps", caps, "device-class", klass, - "internal-name", internal_name, NULL); + "internal-name", internal_name, "properties", props, NULL); gstdev->type = type; gstdev->device_index = device_index; diff -Nru gst-plugins-good1.0-1.4.3/ext/pulse/pulsedeviceprovider.h gst-plugins-good1.0-1.6.1/ext/pulse/pulsedeviceprovider.h --- gst-plugins-good1.0-1.4.3/ext/pulse/pulsedeviceprovider.h 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/pulse/pulsedeviceprovider.h 2015-10-22 08:02:54.000000000 +0000 @@ -35,7 +35,6 @@ G_BEGIN_DECLS typedef struct _GstPulseDeviceProvider GstPulseDeviceProvider; -typedef struct _GstPulseDeviceProviderPrivate GstPulseDeviceProviderPrivate; typedef struct _GstPulseDeviceProviderClass GstPulseDeviceProviderClass; #define GST_TYPE_PULSE_DEVICE_PROVIDER (gst_pulse_device_provider_get_type()) @@ -69,7 +68,6 @@ typedef struct _GstPulseDevice GstPulseDevice; -typedef struct _GstPulseDevicePrivate GstPulseDevicePrivate; typedef struct _GstPulseDeviceClass GstPulseDeviceClass; #define GST_TYPE_PULSE_DEVICE (gst_pulse_device_get_type()) @@ -95,4 +93,6 @@ GType gst_pulse_device_get_type (void); +G_END_DECLS + #endif /* __GST_PULSE_DEVICE_PROVIDER_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/ext/pulse/pulsesink.c gst-plugins-good1.0-1.6.1/ext/pulse/pulsesink.c --- gst-plugins-good1.0-1.4.3/ext/pulse/pulsesink.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/pulse/pulsesink.c 2015-10-22 08:02:54.000000000 +0000 @@ -107,6 +107,30 @@ typedef struct _GstPulseContext GstPulseContext; +/* A note on threading. + * + * We use a pa_threaded_mainloop to interact with the PulseAudio server. This + * starts up a separate thread that runs a mainloop to carry back events, + * messages and timing updates from the PulseAudio server. + * + * In most cases, the PulseAudio API we use communicates with the server and + * processes replies asynchronously. Operations on PA objects that result in + * such communication are protected with a pa_threaded_mainloop_lock() and + * pa_threaded_mainloop_unlock(). These guarantee mutual exclusion with the + * mainloop thread -- when an iteration of the mainloop thread begins, it first + * tries to acquire this lock, and cannot do so if our code also holds that + * lock. + * + * When we need to complete an operation synchronously, we use + * pa_threaded_mainloop_wait() and pa_threaded_mainloop_signal(). These work + * much as pthread conditionals do. pa_threaded_mainloop_wait() is called with + * the mainloop lock held. It releases the lock (thereby allowing the mainloop + * to execute), and waits till one of our callbacks to be executed by the + * mainloop thread calls pa_threaded_mainloop_signal(). At the end of the + * mainloop iteration, the pa_threaded_mainloop_wait() will reacquire the + * mainloop lock and return control to the caller. + */ + /* Store the PA contexts in a hash table to allow easy sharing among * multiple instances of the sink. Keys are $context_name@$server_name * (strings) and values should be GstPulseContext pointers. @@ -1161,7 +1185,8 @@ pa_threaded_mainloop_unlock (mainloop); } -/* called from pulse with the mainloop lock */ +#if 0 +/* called from pulse thread with the mainloop lock */ static void mainloop_enter_defer_cb (pa_mainloop_api * api, void *userdata) { @@ -1183,6 +1208,7 @@ pulsesink->defer_pending--; pa_threaded_mainloop_signal (mainloop, 0); } +#endif /* start/resume playback ASAP, we don't uncork here but in the commit method */ static gboolean @@ -1196,11 +1222,6 @@ pa_threaded_mainloop_lock (mainloop); - GST_DEBUG_OBJECT (psink, "scheduling stream status"); - psink->defer_pending++; - pa_mainloop_api_once (pa_threaded_mainloop_get_api (mainloop), - mainloop_enter_defer_cb, psink); - GST_DEBUG_OBJECT (psink, "starting"); pbuf->paused = FALSE; @@ -1209,6 +1230,21 @@ g_atomic_int_get (&GST_AUDIO_BASE_SINK (psink)->eos_rendering)) gst_pulsering_set_corked (pbuf, FALSE, FALSE); +#if 0 + GST_DEBUG_OBJECT (psink, "scheduling stream status"); + psink->defer_pending++; + pa_mainloop_api_once (pa_threaded_mainloop_get_api (mainloop), + mainloop_enter_defer_cb, psink); + + /* Wait for the stream status message to be posted. This needs to be done + * synchronously because the callback will take the mainloop lock + * (implicitly) and then take the GST_OBJECT_LOCK. Everywhere else, we take + * the locks in the reverse order, so not doing this synchronously could + * cause a deadlock. */ + GST_DEBUG_OBJECT (psink, "waiting for stream status (ENTER) to be posted"); + pa_threaded_mainloop_wait (mainloop); +#endif + pa_threaded_mainloop_unlock (mainloop); return TRUE; @@ -1240,7 +1276,8 @@ return res; } -/* called from pulse with the mainloop lock */ +#if 0 +/* called from pulse thread with the mainloop lock */ static void mainloop_leave_defer_cb (pa_mainloop_api * api, void *userdata) { @@ -1262,6 +1299,7 @@ pulsesink->defer_pending--; pa_threaded_mainloop_signal (mainloop, 0); } +#endif /* stop playback, we flush everything. */ static gboolean @@ -1309,12 +1347,21 @@ pa_operation_cancel (o); pa_operation_unref (o); } - +#if 0 GST_DEBUG_OBJECT (psink, "scheduling stream status"); psink->defer_pending++; pa_mainloop_api_once (pa_threaded_mainloop_get_api (mainloop), mainloop_leave_defer_cb, psink); + /* Wait for the stream status message to be posted. This needs to be done + * synchronously because the callback will take the mainloop lock + * (implicitly) and then take the GST_OBJECT_LOCK. Everywhere else, we take + * the locks in the reverse order, so not doing this synchronously could + * cause a deadlock. */ + GST_DEBUG_OBJECT (psink, "waiting for stream status (LEAVE) to be posted"); + pa_threaded_mainloop_wait (mainloop); +#endif + pa_threaded_mainloop_unlock (mainloop); return res; @@ -1469,6 +1516,12 @@ if (pbuf->paused) goto was_paused; + /* ensure running clock for whatever out there */ + if (pbuf->corked) { + if (!gst_pulsering_set_corked (pbuf, FALSE, FALSE)) + goto uncork_failed; + } + /* offset is in bytes */ offset = *sample * bpf; @@ -2089,6 +2142,8 @@ goto unlock; } + ret = gst_caps_new_empty (); + if (pbuf->stream) { /* We're in PAUSED or higher */ stream = pbuf->stream; @@ -2111,18 +2166,17 @@ pbuf->probe_stream = gst_pulsesink_create_probe_stream (psink, pbuf, format); + + pa_format_info_free (format); + if (!pbuf->probe_stream) { GST_WARNING_OBJECT (psink, "Could not create probe stream"); goto unlock; } - pa_format_info_free (format); - stream = pbuf->probe_stream; } - ret = gst_caps_new_empty (); - if (!(o = pa_context_get_sink_info_by_name (pbuf->context, pa_stream_get_device_name (stream), gst_pulsesink_sink_info_cb, &device_info))) @@ -2139,6 +2193,11 @@ gst_pulse_format_info_to_caps ((pa_format_info *) i->data)); } +unlock: + pa_threaded_mainloop_unlock (mainloop); + /* FIXME: this could be freed after device_name is got */ + GST_OBJECT_UNLOCK (pbuf); + if (filter) { GstCaps *tmp = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST); @@ -2146,11 +2205,6 @@ ret = tmp; } -unlock: - pa_threaded_mainloop_unlock (mainloop); - /* FIXME: this could be freed after device_name is got */ - GST_OBJECT_UNLOCK (pbuf); - out: free_device_info (&device_info); @@ -3120,7 +3174,7 @@ gst_pulsesink_query (GstBaseSink * sink, GstQuery * query) { GstPulseSink *pulsesink = GST_PULSESINK_CAST (sink); - gboolean ret; + gboolean ret = FALSE; switch (GST_QUERY_TYPE (query)) { case GST_QUERY_CAPS: @@ -3133,10 +3187,9 @@ if (caps) { gst_query_set_caps_result (query, caps); gst_caps_unref (caps); - return TRUE; - } else { - return FALSE; + ret = TRUE; } + break; } case GST_QUERY_ACCEPT_CAPS: { diff -Nru gst-plugins-good1.0-1.4.3/ext/pulse/pulsesrc.c gst-plugins-good1.0-1.6.1/ext/pulse/pulsesrc.c --- gst-plugins-good1.0-1.4.3/ext/pulse/pulsesrc.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/pulse/pulsesrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -60,6 +60,9 @@ #define DEFAULT_MUTE FALSE #define MAX_VOLUME 10.0 +/* See the pulsesink code for notes on how we interact with the PA mainloop + * thread. */ + enum { PROP_0, @@ -1498,7 +1501,20 @@ pa_operation_unref (o); - wanted.maxlength = -1; + /* There's a bit of a disconnect here between the audio ringbuffer and what + * PulseAudio provides. The audio ringbuffer provide a total of buffer_time + * worth of buffering, divided into segments of latency_time size. We're + * asking PulseAudio to provide a total latency of latency_time, which, with + * PA_STREAM_ADJUST_LATENCY, effectively sets itself up as a ringbuffer with + * one segment being the hardware buffer, and the other the software buffer. + * This segment size is returned as the fragsize. + * + * Since the two concepts don't map very well, what we do is keep segsize as + * it is (unless fragsize is even larger, in which case we use that). We'll + * get data from PulseAudio in smaller chunks than we want to pass on as an + * element, and we coalesce those chunks in the ringbuffer memory and pass it + * on in the expected chunk size. */ + wanted.maxlength = spec->segsize * spec->segtotal; wanted.tlength = -1; wanted.prebuf = 0; wanted.minreq = -1; @@ -1571,11 +1587,14 @@ GST_INFO_OBJECT (pulsesrc, "fragsize: %d (wanted %d)", actual->fragsize, wanted.fragsize); - if (actual->fragsize >= wanted.fragsize) { + if (actual->fragsize >= spec->segsize) { spec->segsize = actual->fragsize; } else { - spec->segsize = actual->fragsize * (wanted.fragsize / actual->fragsize); + /* fragsize is smaller than what we wanted, so let the read function + * coalesce the smaller chunks as they come in */ } + + /* Fix up the total ringbuffer size based on what we actually got */ spec->segtotal = actual->maxlength / spec->segsize; if (!pulsesrc->paused) { diff -Nru gst-plugins-good1.0-1.4.3/ext/pulse/pulseutil.c gst-plugins-good1.0-1.6.1/ext/pulse/pulseutil.c --- gst-plugins-good1.0-1.4.3/ext/pulse/pulseutil.c 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/pulse/pulseutil.c 2015-10-22 08:02:54.000000000 +0000 @@ -376,6 +376,28 @@ return proplist; } +GstStructure * +gst_pulse_make_structure (pa_proplist * properties) +{ + GstStructure *str; + void *state = NULL; + + str = gst_structure_new_empty ("pulse-proplist"); + + while (TRUE) { + const char *key, *val; + + key = pa_proplist_iterate (properties, &state); + if (key == NULL) + break; + + val = pa_proplist_gets (properties, key); + + gst_structure_set (str, key, G_TYPE_STRING, val, NULL); + } + return str; +} + static gboolean gst_pulse_format_info_int_prop_to_value (pa_format_info * format, const char *key, GValue * value) diff -Nru gst-plugins-good1.0-1.4.3/ext/pulse/pulseutil.h gst-plugins-good1.0-1.6.1/ext/pulse/pulseutil.h --- gst-plugins-good1.0-1.4.3/ext/pulse/pulseutil.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/pulse/pulseutil.h 2015-10-22 08:02:54.000000000 +0000 @@ -87,6 +87,7 @@ void gst_pulse_cvolume_from_linear (pa_cvolume *v, unsigned channels, gdouble volume); pa_proplist *gst_pulse_make_proplist (const GstStructure *properties); +GstStructure *gst_pulse_make_structure (pa_proplist *properties); GstCaps * gst_pulse_format_info_to_caps (pa_format_info * format); diff -Nru gst-plugins-good1.0-1.4.3/ext/raw1394/gstdv1394src.c gst-plugins-good1.0-1.6.1/ext/raw1394/gstdv1394src.c --- gst-plugins-good1.0-1.4.3/ext/raw1394/gstdv1394src.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/raw1394/gstdv1394src.c 2015-10-22 08:02:54.000000000 +0000 @@ -980,7 +980,7 @@ switch (GST_QUERY_TYPE (query)) { case GST_QUERY_LATENCY: { - gst_query_set_latency (query, TRUE, GST_SECOND / 25, GST_CLOCK_TIME_NONE); + gst_query_set_latency (query, TRUE, GST_SECOND / 25, GST_SECOND / 25); } break; default: diff -Nru gst-plugins-good1.0-1.4.3/ext/raw1394/Makefile.in gst-plugins-good1.0-1.6.1/ext/raw1394/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/raw1394/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/raw1394/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/raw1394 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(am__noinst_HEADERS_DIST) 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -234,6 +243,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -366,9 +376,6 @@ 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@ @@ -486,17 +493,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -549,6 +556,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -603,7 +611,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/raw1394/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/raw1394/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -944,6 +951,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/shout2/gstshout2.c gst-plugins-good1.0-1.6.1/ext/shout2/gstshout2.c --- gst-plugins-good1.0-1.4.3/ext/shout2/gstshout2.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/shout2/gstshout2.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,7 @@ * * Example launch line * |[ - * gst-launch uridecodebin uri=file:///path/to/audiofile ! audioconvert ! vorbisenc ! oggmux ! shout2send mount=/stream.ogg port=8000 username=source password=somepassword ip=server_IP_address_or_hostname + * gst-launch-1.0 uridecodebin uri=file:///path/to/audiofile ! audioconvert ! vorbisenc ! oggmux ! shout2send mount=/stream.ogg port=8000 username=source password=somepassword ip=server_IP_address_or_hostname * ]| This pipeline demuxes, decodes, re-encodes and re-muxes an audio * media file into oggvorbis and sends the resulting stream to an Icecast * server. Properties mount, port, username and password are all server-config diff -Nru gst-plugins-good1.0-1.4.3/ext/shout2/Makefile.in gst-plugins-good1.0-1.6.1/ext/shout2/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/shout2/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/shout2/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/shout2 -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -576,7 +584,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/shout2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/shout2/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -885,6 +892,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/soup/gstsouphttpclientsink.c gst-plugins-good1.0-1.6.1/ext/soup/gstsouphttpclientsink.c --- gst-plugins-good1.0-1.4.3/ext/soup/gstsouphttpclientsink.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/soup/gstsouphttpclientsink.c 2015-10-22 08:02:54.000000000 +0000 @@ -244,6 +244,9 @@ static void gst_soup_http_client_sink_reset (GstSoupHttpClientSink * souphttpsink) { + g_list_free_full (souphttpsink->queued_buffers, + (GDestroyNotify) gst_buffer_unref); + souphttpsink->queued_buffers = NULL; g_free (souphttpsink->reason_phrase); souphttpsink->reason_phrase = NULL; souphttpsink->status_code = 0; @@ -425,6 +428,7 @@ if (souphttpsink->proxy) soup_uri_free (souphttpsink->proxy); g_free (souphttpsink->location); + g_strfreev (souphttpsink->cookies); g_cond_clear (&souphttpsink->cond); g_mutex_clear (&souphttpsink->mutex); @@ -442,6 +446,7 @@ const GValue *value_array; int i, n; + GST_DEBUG_OBJECT (souphttpsink, "new stream headers set"); structure = gst_caps_get_structure (caps, 0); value_array = gst_structure_get_value (structure, "streamheader"); if (value_array) { @@ -531,11 +536,19 @@ g_mutex_unlock (&souphttpsink->mutex); GST_LOG_OBJECT (souphttpsink, "main loop thread running"); - souphttpsink->session = - soup_session_async_new_with_options (SOUP_SESSION_ASYNC_CONTEXT, - souphttpsink->context, SOUP_SESSION_USER_AGENT, - souphttpsink->user_agent, SOUP_SESSION_TIMEOUT, souphttpsink->timeout, - NULL); + if (souphttpsink->proxy == NULL) { + souphttpsink->session = + soup_session_async_new_with_options (SOUP_SESSION_ASYNC_CONTEXT, + souphttpsink->context, SOUP_SESSION_USER_AGENT, + souphttpsink->user_agent, SOUP_SESSION_TIMEOUT, souphttpsink->timeout, + NULL); + } else { + souphttpsink->session = + soup_session_async_new_with_options (SOUP_SESSION_ASYNC_CONTEXT, + souphttpsink->context, SOUP_SESSION_USER_AGENT, + souphttpsink->user_agent, SOUP_SESSION_TIMEOUT, souphttpsink->timeout, + SOUP_SESSION_PROXY_URI, souphttpsink->proxy, NULL); + } g_signal_connect (souphttpsink->session, "authenticate", G_CALLBACK (authenticate), souphttpsink); @@ -636,12 +649,24 @@ /* If the URI went away, drop all these buffers */ if (souphttpsink->location == NULL) { + GST_DEBUG_OBJECT (souphttpsink, "URI went away, dropping queued buffers"); free_buffer_list (souphttpsink->queued_buffers); souphttpsink->queued_buffers = NULL; return; } souphttpsink->message = soup_message_new ("PUT", souphttpsink->location); + soup_message_set_flags (souphttpsink->message, + (souphttpsink->automatic_redirect ? 0 : SOUP_MESSAGE_NO_REDIRECT)); + + if (souphttpsink->cookies) { + gchar **cookie; + + for (cookie = souphttpsink->cookies; *cookie != NULL; cookie++) { + soup_message_headers_append (souphttpsink->message->request_headers, + "Cookie", *cookie); + } + } n = 0; if (souphttpsink->offset == 0) { @@ -649,10 +674,13 @@ GstBuffer *buffer = g->data; GstMapInfo map; - /* FIXME, lifetime of the buffer? */ + GST_DEBUG_OBJECT (souphttpsink, "queueing stream headers"); gst_buffer_map (buffer, &map, GST_MAP_READ); + /* Stream headers are updated whenever ::set_caps is called, so there's + * no guarantees about their lifetime and we ask libsoup to copy them + * into the message body with SOUP_MEMORY_COPY. */ soup_message_body_append (souphttpsink->message->request_body, - SOUP_MEMORY_STATIC, map.data, map.size); + SOUP_MEMORY_COPY, map.data, map.size); n += map.size; gst_buffer_unmap (buffer, &map); } @@ -663,10 +691,13 @@ if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER)) { GstMapInfo map; - /* FIXME, lifetime of the buffer? */ gst_buffer_map (buffer, &map, GST_MAP_READ); + /* Queued buffers are only freed in the next iteration of the mainloop + * after the message body has been written out, so we don't need libsoup + * to copy those while appending to the body. However, if the buffer is + * used elsewhere, it should be copied. Hence, SOUP_MEMORY_TEMPORARY. */ soup_message_body_append (souphttpsink->message->request_body, - SOUP_MEMORY_STATIC, map.data, map.size); + SOUP_MEMORY_TEMPORARY, map.data, map.size); n += map.size; gst_buffer_unmap (buffer, &map); } @@ -682,6 +713,8 @@ } if (n == 0) { + GST_DEBUG_OBJECT (souphttpsink, + "total size of buffers queued is 0, freeing everything"); free_buffer_list (souphttpsink->queued_buffers); souphttpsink->queued_buffers = NULL; g_object_unref (souphttpsink->message); @@ -760,6 +793,7 @@ g_list_append (souphttpsink->queued_buffers, gst_buffer_ref (buffer)); if (wake) { + GST_DEBUG_OBJECT (souphttpsink, "setting callback for new buffers"); source = g_idle_source_new (); g_source_set_callback (source, (GSourceFunc) (send_message), souphttpsink, NULL); @@ -779,9 +813,15 @@ GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (user_data); if (!retrying) { - if (souphttpsink->user_id && souphttpsink->user_pw) { - soup_auth_authenticate (auth, - souphttpsink->user_id, souphttpsink->user_pw); + /* First time authentication only, if we fail and are called again with retry true fall through */ + if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) { + if (souphttpsink->user_id && souphttpsink->user_pw) + soup_auth_authenticate (auth, souphttpsink->user_id, + souphttpsink->user_pw); + } else if (msg->status_code == SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) { + if (souphttpsink->proxy_id && souphttpsink->proxy_pw) + soup_auth_authenticate (auth, souphttpsink->proxy_id, + souphttpsink->proxy_pw); } } } diff -Nru gst-plugins-good1.0-1.4.3/ext/soup/gstsouphttpsrc.c gst-plugins-good1.0-1.6.1/ext/soup/gstsouphttpsrc.c --- gst-plugins-good1.0-1.4.3/ext/soup/gstsouphttpsrc.c 2014-09-11 09:57:06.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/soup/gstsouphttpsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -122,7 +122,9 @@ PROP_SSL_STRICT, PROP_SSL_CA_FILE, PROP_SSL_USE_SYSTEM_CA_FILE, - PROP_RETRIES + PROP_TLS_DATABASE, + PROP_RETRIES, + PROP_METHOD }; #define DEFAULT_USER_AGENT "GStreamer souphttpsrc " @@ -133,8 +135,10 @@ #define DEFAULT_SSL_STRICT TRUE #define DEFAULT_SSL_CA_FILE NULL #define DEFAULT_SSL_USE_SYSTEM_CA_FILE TRUE +#define DEFAULT_TLS_DATABASE NULL #define DEFAULT_TIMEOUT 15 #define DEFAULT_RETRIES 3 +#define DEFAULT_SOUP_METHOD NULL static void gst_soup_http_src_uri_handler_init (gpointer g_iface, gpointer iface_data); @@ -335,6 +339,10 @@ * A SSL anchor CA file that should be used for checking certificates * instead of the system CA file. * + * If this property is non-%NULL, #GstSoupHTTPSrc::ssl-use-system-ca-file + * value will be ignored. + * + * Deprecated: Use #GstSoupHTTPSrc::tls-database property instead. * Since: 1.4 */ g_object_class_install_property (gobject_class, PROP_SSL_CA_FILE, @@ -346,7 +354,8 @@ * GstSoupHTTPSrc::ssl-use-system-ca-file: * * If set to %TRUE, souphttpsrc will use the system's CA file for - * checking certificates. + * checking certificates, unless #GstSoupHTTPSrc::ssl-ca-file or + * #GstSoupHTTPSrc::tls-database are non-%NULL. * * Since: 1.4 */ @@ -355,6 +364,22 @@ "Use system CA file", DEFAULT_SSL_USE_SYSTEM_CA_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstSoupHTTPSrc::tls-database: + * + * TLS database with anchor certificate authorities used to validate + * the server certificate. + * + * If this property is non-%NULL, #GstSoupHTTPSrc::ssl-use-system-ca-file + * and #GstSoupHTTPSrc::ssl-ca-file values will be ignored. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_TLS_DATABASE, + g_param_spec_object ("tls-database", "TLS database", + "TLS database with anchor certificate authorities used to validate the server certificate", + G_TYPE_TLS_DATABASE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstSoupHTTPSrc::retries: * @@ -368,6 +393,18 @@ G_MAXINT, DEFAULT_RETRIES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstSoupHTTPSrc::method + * + * The HTTP method to use when making a request + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_METHOD, + g_param_spec_string ("method", "HTTP method", + "The HTTP method to use (GET, HEAD, OPTIONS, etc)", + DEFAULT_SOUP_METHOD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&srctemplate)); @@ -446,9 +483,11 @@ src->log_level = DEFAULT_SOUP_LOG_LEVEL; src->ssl_strict = DEFAULT_SSL_STRICT; src->ssl_use_system_ca_file = DEFAULT_SSL_USE_SYSTEM_CA_FILE; + src->tls_database = DEFAULT_TLS_DATABASE; src->max_retries = DEFAULT_RETRIES; + src->method = DEFAULT_SOUP_METHOD; proxy = g_getenv ("http_proxy"); - if (proxy && !gst_soup_http_src_set_proxy (src, proxy)) { + if (!gst_soup_http_src_set_proxy (src, proxy)) { GST_WARNING_OBJECT (src, "The proxy in the http_proxy env var (\"%s\") cannot be parsed.", proxy); @@ -501,6 +540,10 @@ g_free (src->ssl_ca_file); + if (src->tls_database) + g_object_unref (src->tls_database); + g_free (src->method); + G_OBJECT_CLASS (parent_class)->finalize (gobject); } @@ -543,11 +586,6 @@ const gchar *proxy; proxy = g_value_get_string (value); - - if (proxy == NULL) { - GST_WARNING ("proxy property cannot be NULL"); - goto done; - } if (!gst_soup_http_src_set_proxy (src, proxy)) { GST_WARNING ("badly formatted proxy URI"); goto done; @@ -613,9 +651,17 @@ case PROP_SSL_USE_SYSTEM_CA_FILE: src->ssl_use_system_ca_file = g_value_get_boolean (value); break; + case PROP_TLS_DATABASE: + g_clear_object (&src->tls_database); + src->tls_database = g_value_dup_object (value); + break; case PROP_RETRIES: src->max_retries = g_value_get_int (value); break; + case PROP_METHOD: + g_free (src->method); + src->method = g_value_dup_string (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -693,11 +739,17 @@ g_value_set_string (value, src->ssl_ca_file); break; case PROP_SSL_USE_SYSTEM_CA_FILE: - g_value_set_boolean (value, src->ssl_strict); + g_value_set_boolean (value, src->ssl_use_system_ca_file); + break; + case PROP_TLS_DATABASE: + g_value_set_object (value, src->tls_database); break; case PROP_RETRIES: g_value_set_int (value, src->max_retries); break; + case PROP_METHOD: + g_value_set_string (value, src->method); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -718,7 +770,7 @@ gst_soup_http_src_cancel_message (GstSoupHTTPSrc * src) { if (src->msg != NULL) { - GST_DEBUG_OBJECT (src, "Cancelling message"); + GST_INFO_OBJECT (src, "Cancelling message"); src->session_io_status = GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_CANCELLED; soup_session_cancel_message (src->session, src->msg, SOUP_STATUS_CANCELLED); } @@ -903,7 +955,9 @@ /* Set up logging */ gst_soup_util_log_setup (src->session, src->log_level, GST_ELEMENT (src)); - if (src->ssl_ca_file) + if (src->tls_database) + g_object_set (src->session, "tls-database", src->tls_database, NULL); + else if (src->ssl_ca_file) g_object_set (src->session, "ssl-ca-file", src->ssl_ca_file, NULL); else g_object_set (src->session, "ssl-use-system-ca-file", @@ -1265,7 +1319,7 @@ GST_DEBUG_OBJECT (src, "finished, but not for current message"); return; } - GST_DEBUG_OBJECT (src, "finished"); + GST_INFO_OBJECT (src, "finished, io status: %d", src->session_io_status); src->ret = GST_FLOW_EOS; if (src->session_io_status == GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_CANCELLED) { /* gst_soup_http_src_cancel_message() triggered this; probably a seek @@ -1453,7 +1507,7 @@ /* Ignore redirections. */ return; } - GST_DEBUG_OBJECT (src, "got response %d: %s", msg->status_code, + GST_INFO_OBJECT (src, "got response %d: %s", msg->status_code, msg->reason_phrase); if (src->session_io_status == GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_RUNNING && src->read_position > 0 && (src->have_size @@ -1509,7 +1563,7 @@ src->ret = GST_FLOW_CUSTOM_ERROR; } else { SOUP_HTTP_SRC_ERROR (src, msg, RESOURCE, READ, - _("A network error occured, or the server closed the connection " + _("A network error occurred, or the server closed the connection " "unexpectedly.")); src->ret = GST_FLOW_ERROR; } @@ -1649,12 +1703,12 @@ src->outbuf = outbuf; do { if (src->interrupted) { - GST_DEBUG_OBJECT (src, "interrupted"); + GST_INFO_OBJECT (src, "interrupted"); src->ret = GST_FLOW_FLUSHING; break; } if (src->retry) { - GST_DEBUG_OBJECT (src, "Reconnecting"); + GST_INFO_OBJECT (src, "Reconnecting"); if (!gst_soup_http_src_build_message (src, method)) { return GST_FLOW_ERROR; } @@ -1668,7 +1722,7 @@ switch (src->session_io_status) { case GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_IDLE: - GST_DEBUG_OBJECT (src, "Queueing connection request"); + GST_INFO_OBJECT (src, "Queueing connection request"); gst_soup_http_src_queue_message (src); break; case GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_QUEUED: @@ -1709,6 +1763,18 @@ src->ret = GST_FLOW_EOS; g_cond_signal (&src->request_finished_cond); + /* basesrc assumes that we don't return a buffer if + * something else than OK is returned. It will just + * leak any buffer we might accidentially provide + * here. + * + * This can potentially happen during flushing. + */ + if (src->ret != GST_FLOW_OK && outbuf && *outbuf) { + gst_buffer_unref (*outbuf); + *outbuf = NULL; + } + return src->ret; } @@ -1723,7 +1789,9 @@ g_mutex_lock (&src->mutex); *outbuf = NULL; - ret = gst_soup_http_src_do_request (src, SOUP_METHOD_GET, outbuf); + ret = + gst_soup_http_src_do_request (src, + src->method ? src->method : SOUP_METHOD_GET, outbuf); http_headers_event = src->http_headers_event; src->http_headers_event = NULL; g_mutex_unlock (&src->mutex); @@ -1991,6 +2059,10 @@ soup_uri_free (src->proxy); src->proxy = NULL; } + + if (uri == NULL || *uri == '\0') + return TRUE; + if (g_str_has_prefix (uri, "http://")) { src->proxy = soup_uri_new (uri); } else { @@ -2000,7 +2072,7 @@ g_free (new_uri); } - return TRUE; + return (src->proxy != NULL); } static guint diff -Nru gst-plugins-good1.0-1.4.3/ext/soup/gstsouphttpsrc.h gst-plugins-good1.0-1.6.1/ext/soup/gstsouphttpsrc.h --- gst-plugins-good1.0-1.4.3/ext/soup/gstsouphttpsrc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/soup/gstsouphttpsrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -71,6 +71,7 @@ gboolean retry; /* Should attempt to reconnect. */ gint retry_count; /* Number of retries since we received data */ gint max_retries; /* Maximum number of retries */ + gchar *method; /* HTTP method */ gboolean got_headers; /* Already received headers from the server */ gboolean have_size; /* Received and parsed Content-Length @@ -90,6 +91,7 @@ gboolean ssl_strict; gchar *ssl_ca_file; gboolean ssl_use_system_ca_file; + GTlsDatabase *tls_database; /* Shoutcast/icecast metadata extraction handling. */ gboolean iradio_mode; diff -Nru gst-plugins-good1.0-1.4.3/ext/soup/Makefile.in gst-plugins-good1.0-1.6.1/ext/soup/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/soup/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/soup/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/soup -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -230,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -362,9 +372,6 @@ 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@ @@ -482,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -545,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -584,7 +592,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/soup/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/soup/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -917,6 +924,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/speex/gstspeexdec.c gst-plugins-good1.0-1.6.1/ext/speex/gstspeexdec.c --- gst-plugins-good1.0-1.4.3/ext/speex/gstspeexdec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/speex/gstspeexdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -136,6 +136,7 @@ free (dec->header); dec->header = NULL; speex_bits_destroy (&dec->bits); + speex_bits_set_bit_buffer (&dec->bits, NULL, 0); gst_buffer_replace (&dec->streamheader, NULL); gst_buffer_replace (&dec->vorbiscomment, NULL); @@ -155,6 +156,9 @@ gst_speex_dec_init (GstSpeexDec * dec) { gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE); + gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST + (dec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec)); dec->enh = DEFAULT_ENH; diff -Nru gst-plugins-good1.0-1.4.3/ext/speex/gstspeexdec.h gst-plugins-good1.0-1.6.1/ext/speex/gstspeexdec.h --- gst-plugins-good1.0-1.4.3/ext/speex/gstspeexdec.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/speex/gstspeexdec.h 2015-10-22 08:02:54.000000000 +0000 @@ -50,11 +50,7 @@ void *state; SpeexStereoState *stereo; -#ifdef SPEEX_1_0 - SpeexMode *mode; -#else const SpeexMode *mode; -#endif SpeexHeader *header; SpeexCallback callback; SpeexBits bits; diff -Nru gst-plugins-good1.0-1.4.3/ext/speex/gstspeexenc.c gst-plugins-good1.0-1.6.1/ext/speex/gstspeexenc.c --- gst-plugins-good1.0-1.4.3/ext/speex/gstspeexenc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/speex/gstspeexenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -242,6 +242,7 @@ /* arrange granulepos marking (and required perfect ts) */ gst_audio_encoder_set_mark_granule (benc, TRUE); gst_audio_encoder_set_perfect_timestamp (benc, TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc)); } static gboolean @@ -253,6 +254,7 @@ speex_bits_init (&enc->bits); enc->tags = gst_tag_list_new_empty (); enc->header_sent = FALSE; + enc->encoded_samples = 0; return TRUE; } @@ -269,6 +271,7 @@ enc->state = NULL; } speex_bits_destroy (&enc->bits); + speex_bits_set_bit_buffer (&enc->bits, NULL, 0); gst_tag_list_unref (enc->tags); enc->tags = NULL; @@ -510,6 +513,9 @@ } break; } + case GST_EVENT_SEGMENT: + enc->encoded_samples = 0; + break; default: break; } @@ -529,6 +535,8 @@ gsize bsize, size; GstBuffer *outbuf; GstFlowReturn ret = GST_FLOW_OK; + GstSegment *segment; + GstClockTime duration; if (G_LIKELY (buf)) { gst_buffer_map (buf, &map, GST_MAP_READ); @@ -538,6 +546,28 @@ if (G_UNLIKELY (bsize % bytes)) { GST_DEBUG_OBJECT (enc, "draining; adding silence samples"); + /* If encoding part of a frame, and we have no set stop time on + * the output segment, we update the segment stop time to reflect + * the last sample. This will let oggmux set the last page's + * granpos to tell a decoder the dummy samples should be clipped. + */ + segment = &GST_AUDIO_ENCODER_OUTPUT_SEGMENT (enc); + GST_DEBUG_OBJECT (enc, "existing output segment %" GST_SEGMENT_FORMAT, + segment); + if (!GST_CLOCK_TIME_IS_VALID (segment->stop)) { + int input_samples = bsize / (enc->channels * 2); + GST_DEBUG_OBJECT (enc, + "No stop time and partial frame, updating segment"); + duration = + gst_util_uint64_scale (enc->encoded_samples + input_samples, + GST_SECOND, enc->rate); + segment->stop = segment->start + duration; + GST_DEBUG_OBJECT (enc, "new output segment %" GST_SEGMENT_FORMAT, + segment); + gst_pad_push_event (GST_AUDIO_ENCODER_SRC_PAD (enc), + gst_event_new_segment (segment)); + } + size = ((bsize / bytes) + 1) * bytes; data0 = data = g_malloc0 (size); memcpy (data, bdata, bsize); @@ -602,6 +632,7 @@ ret = gst_audio_encoder_finish_frame (GST_AUDIO_ENCODER (enc), outbuf, samples); + enc->encoded_samples += frame_size; done: g_free (data0); @@ -611,16 +642,17 @@ /* * (really really) FIXME: move into core (dixit tpm) */ -/** +/* * _gst_caps_set_buffer_array: - * @caps: a #GstCaps + * @caps: (transfer full): a #GstCaps * @field: field in caps to set * @buf: header buffers * * Adds given buffers to an array of buffers set as the given @field * on the given @caps. List of buffer arguments must be NULL-terminated. * - * Returns: input caps with a streamheader field added, or NULL if some error + * Returns: (transfer full): input caps with a streamheader field added, or NULL + * if some error occurred */ static GstCaps * _gst_caps_set_buffer_array (GstCaps * caps, const gchar * field, diff -Nru gst-plugins-good1.0-1.4.3/ext/speex/gstspeexenc.h gst-plugins-good1.0-1.6.1/ext/speex/gstspeexenc.h --- gst-plugins-good1.0-1.4.3/ext/speex/gstspeexenc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/speex/gstspeexenc.h 2015-10-22 08:02:54.000000000 +0000 @@ -57,11 +57,7 @@ SpeexBits bits; SpeexHeader header; -#ifdef SPEEX_1_0 - SpeexMode *speex_mode; -#else const SpeexMode *speex_mode; -#endif void *state; /* properties */ @@ -80,6 +76,7 @@ gint rate; gboolean header_sent; + guint64 encoded_samples; GstTagList *tags; diff -Nru gst-plugins-good1.0-1.4.3/ext/speex/Makefile.in gst-plugins-good1.0-1.6.1/ext/speex/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/speex/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/speex/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/speex -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -589,7 +597,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/speex/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/speex/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -914,6 +921,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/taglib/gstapev2mux.cc gst-plugins-good1.0-1.6.1/ext/taglib/gstapev2mux.cc --- gst-plugins-good1.0-1.4.3/ext/taglib/gstapev2mux.cc 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/taglib/gstapev2mux.cc 2015-10-22 08:02:54.000000000 +0000 @@ -71,7 +71,7 @@ G_DEFINE_TYPE (GstApev2Mux, gst_apev2_mux, GST_TYPE_TAG_MUX); -static GstBuffer *gst_apev2_mux_render_tag (GstTagMux * mux, +static GstBuffer *gst_apev2_mux_render_start_tag (GstTagMux * mux, const GstTagList * taglist); static GstBuffer *gst_apev2_mux_render_end_tag (GstTagMux * mux, const GstTagList * taglist); @@ -82,7 +82,7 @@ GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GST_TAG_MUX_CLASS (klass)->render_start_tag = - GST_DEBUG_FUNCPTR (gst_apev2_mux_render_tag); + GST_DEBUG_FUNCPTR (gst_apev2_mux_render_start_tag); GST_TAG_MUX_CLASS (klass)->render_end_tag = GST_DEBUG_FUNCPTR (gst_apev2_mux_render_end_tag); @@ -106,6 +106,29 @@ /* nothing to do */ } +static gboolean +gst_apev2_mux_have_wavpack (GstApev2Mux * apev2mux) +{ + const GstStructure *s; + gboolean ret; + GstCaps *caps; + GstPad *sink; + + sink = gst_element_get_static_pad (GST_ELEMENT_CAST (apev2mux), "sink"); + caps = gst_pad_get_current_caps (sink); + gst_object_unref (sink); + + if (caps == NULL) + return FALSE; + + s = gst_caps_get_structure (caps, 0); + ret = gst_structure_has_name (s, "audio/x-wavpack"); + gst_caps_unref (caps); + + GST_LOG_OBJECT (apev2mux, "got wavpack input: %s", ret ? "yes" : "no"); + return ret; +} + static void add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) { @@ -369,7 +392,19 @@ } static GstBuffer * +gst_apev2_mux_render_start_tag (GstTagMux * mux, const GstTagList * taglist) +{ + if (gst_apev2_mux_have_wavpack (GST_APEV2_MUX (mux))) + return NULL; + + return gst_apev2_mux_render_tag (mux, taglist); +} + +static GstBuffer * gst_apev2_mux_render_end_tag (GstTagMux * mux, const GstTagList * taglist) { + if (gst_apev2_mux_have_wavpack (GST_APEV2_MUX (mux))) + return gst_apev2_mux_render_tag (mux, taglist); + return NULL; } diff -Nru gst-plugins-good1.0-1.4.3/ext/taglib/Makefile.in gst-plugins-good1.0-1.6.1/ext/taglib/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/taglib/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/taglib/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/taglib -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -245,6 +254,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -377,9 +387,6 @@ 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@ @@ -497,17 +504,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -560,6 +567,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -608,7 +616,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/taglib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/taglib/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -957,6 +964,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8dec.c gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8dec.c --- gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8dec.c 2014-09-02 06:12:30.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8dec.c 2015-10-22 08:02:54.000000000 +0000 @@ -32,7 +32,7 @@ * * Example pipeline * |[ - * gst-launch -v filesrc location=videotestsrc.webm ! matroskademux ! vp8dec ! xvimagesink + * gst-launch-1.0 -v filesrc location=videotestsrc.webm ! matroskademux ! vp8dec ! videoconvert ! videoscale ! autovideosink * ]| This example pipeline will decode a WebM stream and decodes the VP8 video. * */ @@ -207,6 +207,8 @@ gst_vp8_dec->noise_level = DEFAULT_NOISE_LEVEL; gst_video_decoder_set_needs_format (decoder, TRUE); + gst_video_decoder_set_use_default_pad_acceptcaps (decoder, TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (decoder)); } static void @@ -378,22 +380,30 @@ if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) { GST_ERROR_OBJECT (dec, "Could not map video buffer"); + return; } for (comp = 0; comp < 3; comp++) { dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp); src = img->planes[comp]; - width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp); + width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp) + * GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp); height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp); deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp); srcstride = img->stride[comp]; - /* FIXME (Edward) : Do a plane memcpy is srcstride == deststride instead - * of copying line by line */ - for (line = 0; line < height; line++) { - memcpy (dest, src, width); - dest += deststride; - src += srcstride; + if (srcstride == deststride) { + GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane", + comp, srcstride); + memcpy (dest, src, srcstride * height); + } else { + GST_TRACE_OBJECT (dec, "Stride mismatch. Comp %d: %d != %d, copying " + "line by line.", comp, srcstride, deststride); + for (line = 0; line < height; line++) { + memcpy (dest, src, width); + dest += deststride; + src += srcstride; + } } } @@ -428,12 +438,12 @@ if (status != VPX_CODEC_OK) { GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s", gst_vpx_error_name (status)); - gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame); + gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); return GST_FLOW_CUSTOM_SUCCESS_1; } if (!stream_info.is_kf) { GST_WARNING_OBJECT (dec, "No keyframe, skipping"); - gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame); + gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); return GST_FLOW_CUSTOM_SUCCESS_1; } @@ -577,7 +587,7 @@ gst_vp8_dec_image_to_buffer (dec, img, frame->output_buffer); ret = gst_video_decoder_finish_frame (decoder, frame); } else { - gst_video_decoder_finish_frame (decoder, frame); + gst_video_decoder_drop_frame (decoder, frame); } } diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8enc.c gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8enc.c --- gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8enc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8enc.c 2015-10-22 08:02:54.000000000 +0000 @@ -40,7 +40,7 @@ * * Example pipeline * |[ - * gst-launch -v videotestsrc num-buffers=1000 ! vp8enc ! webmmux ! filesink location=videotestsrc.webm + * gst-launch-1.0 -v videotestsrc num-buffers=1000 ! vp8enc ! webmmux ! filesink location=videotestsrc.webm * ]| This example pipeline will encode a test video source to VP8 muxed in an * WebM container. * @@ -369,7 +369,9 @@ static gboolean gst_vp8_enc_stop (GstVideoEncoder * encoder); static gboolean gst_vp8_enc_set_format (GstVideoEncoder * video_encoder, GstVideoCodecState * state); -static gboolean gst_vp8_enc_finish (GstVideoEncoder * video_encoder); +static GstFlowReturn gst_vp8_enc_finish (GstVideoEncoder * video_encoder); +static gboolean gst_vp8_enc_flush (GstVideoEncoder * video_encoder); +static GstFlowReturn gst_vp8_enc_drain (GstVideoEncoder * video_encoder); static GstFlowReturn gst_vp8_enc_handle_frame (GstVideoEncoder * video_encoder, GstVideoCodecFrame * frame); static GstFlowReturn gst_vp8_enc_pre_push (GstVideoEncoder * encoder, @@ -383,7 +385,10 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420")) + GST_STATIC_CAPS ("video/x-raw, " + "format = (string) \"I420\", " + "width = (int) [1, 16383], " + "height = (int) [1, 16383], framerate = (fraction) [ 0/1, MAX ]") ); static GstStaticPadTemplate gst_vp8_enc_src_template = @@ -428,6 +433,7 @@ video_encoder_class->stop = gst_vp8_enc_stop; video_encoder_class->handle_frame = gst_vp8_enc_handle_frame; video_encoder_class->set_format = gst_vp8_enc_set_format; + video_encoder_class->flush = gst_vp8_enc_flush; video_encoder_class->finish = gst_vp8_enc_finish; video_encoder_class->pre_push = gst_vp8_enc_pre_push; video_encoder_class->sink_event = gst_vp8_enc_sink_event; @@ -551,7 +557,9 @@ g_object_class_install_property (gobject_class, PROP_MULTIPASS_CACHE_FILE, g_param_spec_string ("multipass-cache-file", "Multipass Cache File", - "Multipass cache file", + "Multipass cache file. " + "If stream caps reinited, multiple files will be created: " + "file, file.1, file.2, ... and so on.", DEFAULT_MULTIPASS_CACHE_FILE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); @@ -682,7 +690,8 @@ g_param_spec_int ("arnr-type", "AltRef type", "AltRef type", 1, 3, DEFAULT_ARNR_TYPE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + G_PARAM_DEPRECATED))); g_object_class_install_property (gobject_class, PROP_TUNING, g_param_spec_enum ("tuning", "Tuning", @@ -717,6 +726,7 @@ vpx_codec_err_t status; GST_DEBUG_OBJECT (gst_vp8_enc, "init"); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (gst_vp8_enc)); status = vpx_codec_enc_config_default (&vpx_codec_vp8_cx_algo, &gst_vp8_enc->cfg, @@ -752,7 +762,9 @@ gst_vp8_enc->cfg.kf_mode = DEFAULT_KF_MODE; gst_vp8_enc->cfg.kf_max_dist = DEFAULT_KF_MAX_DIST; gst_vp8_enc->cfg.g_pass = DEFAULT_MULTIPASS_MODE; - gst_vp8_enc->multipass_cache_file = g_strdup (DEFAULT_MULTIPASS_CACHE_FILE); + gst_vp8_enc->multipass_cache_prefix = g_strdup (DEFAULT_MULTIPASS_CACHE_FILE); + gst_vp8_enc->multipass_cache_file = NULL; + gst_vp8_enc->multipass_cache_idx = 0; gst_vp8_enc->cfg.ts_number_layers = DEFAULT_TS_NUMBER_LAYERS; gst_vp8_enc->n_ts_target_bitrate = 0; gst_vp8_enc->n_ts_rate_decimator = 0; @@ -794,8 +806,10 @@ g_return_if_fail (GST_IS_VP8_ENC (object)); gst_vp8_enc = GST_VP8_ENC (object); + g_free (gst_vp8_enc->multipass_cache_prefix); g_free (gst_vp8_enc->multipass_cache_file); - gst_vp8_enc->multipass_cache_file = NULL; + gst_vp8_enc->multipass_cache_idx = 0; + if (gst_vp8_enc->input_state) gst_video_codec_state_unref (gst_vp8_enc->input_state); @@ -803,7 +817,6 @@ g_mutex_clear (&gst_vp8_enc->encoder_lock); G_OBJECT_CLASS (parent_class)->finalize (object); - } static void @@ -898,9 +911,9 @@ global = TRUE; break; case PROP_MULTIPASS_CACHE_FILE: - if (gst_vp8_enc->multipass_cache_file) - g_free (gst_vp8_enc->multipass_cache_file); - gst_vp8_enc->multipass_cache_file = g_value_dup_string (value); + if (gst_vp8_enc->multipass_cache_prefix) + g_free (gst_vp8_enc->multipass_cache_prefix); + gst_vp8_enc->multipass_cache_prefix = g_value_dup_string (value); break; case PROP_TS_NUMBER_LAYERS: gst_vp8_enc->cfg.ts_number_layers = g_value_get_int (value); @@ -1126,15 +1139,8 @@ break; case PROP_ARNR_TYPE: gst_vp8_enc->arnr_type = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_ARNR_TYPE, - gst_vp8_enc->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_ARNR_TYPE: %s", - gst_vpx_error_name (status)); - } - } + g_warning ("arnr-type is a no-op since control has been deprecated " + "in libvpx"); break; case PROP_TUNING: gst_vp8_enc->tuning = g_value_get_enum (value); @@ -1265,7 +1271,7 @@ g_value_set_enum (value, gst_vp8_enc->cfg.g_pass); break; case PROP_MULTIPASS_CACHE_FILE: - g_value_set_string (value, gst_vp8_enc->multipass_cache_file); + g_value_set_string (value, gst_vp8_enc->multipass_cache_prefix); break; case PROP_TS_NUMBER_LAYERS: g_value_set_int (value, gst_vp8_enc->cfg.ts_number_layers); @@ -1421,15 +1427,9 @@ return TRUE; } -static gboolean -gst_vp8_enc_stop (GstVideoEncoder * video_encoder) +static void +gst_vp8_enc_destroy_encoder (GstVP8Enc * encoder) { - GstVP8Enc *encoder; - - GST_DEBUG_OBJECT (video_encoder, "stop"); - - encoder = GST_VP8_ENC (video_encoder); - g_mutex_lock (&encoder->encoder_lock); if (encoder->inited) { vpx_codec_destroy (&encoder->encoder); @@ -1447,9 +1447,25 @@ encoder->cfg.rc_twopass_stats_in.sz = 0; } g_mutex_unlock (&encoder->encoder_lock); +} + +static gboolean +gst_vp8_enc_stop (GstVideoEncoder * video_encoder) +{ + GstVP8Enc *encoder; + + GST_DEBUG_OBJECT (video_encoder, "stop"); + + encoder = GST_VP8_ENC (video_encoder); + + gst_vp8_enc_destroy_encoder (encoder); gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder)); + g_free (encoder->multipass_cache_file); + encoder->multipass_cache_file = NULL; + encoder->multipass_cache_idx = 0; + return TRUE; } @@ -1505,16 +1521,21 @@ GstVideoInfo *info = &state->info; GstVideoCodecState *output_state; gchar *profile_str; + GstClockTime latency; encoder = GST_VP8_ENC (video_encoder); GST_DEBUG_OBJECT (video_encoder, "set_format"); if (encoder->inited) { - GST_DEBUG_OBJECT (video_encoder, "refusing renegotiation"); - return FALSE; + gst_vp8_enc_drain (video_encoder); + g_mutex_lock (&encoder->encoder_lock); + vpx_codec_destroy (&encoder->encoder); + encoder->inited = FALSE; + encoder->multipass_cache_idx++; + } else { + g_mutex_lock (&encoder->encoder_lock); } - g_mutex_lock (&encoder->encoder_lock); encoder->cfg.g_profile = gst_vp8_enc_get_downstream_profile (encoder); /* Scale default bitrate to our size */ @@ -1531,36 +1552,48 @@ GST_DEBUG_OBJECT (video_encoder, "Using timebase configuration"); encoder->cfg.g_timebase.num = encoder->timebase_n; encoder->cfg.g_timebase.den = encoder->timebase_d; - } else if (GST_VIDEO_INFO_FPS_D (info) != 0 - && GST_VIDEO_INFO_FPS_N (info) != 0) { - /* GstVideoInfo holds either the framerate or max-framerate (if framerate - * is 0) in FPS so this will be used if max-framerate or framerate - * is set */ - GST_DEBUG_OBJECT (video_encoder, "Setting timebase from framerate"); - encoder->cfg.g_timebase.num = GST_VIDEO_INFO_FPS_D (info); - encoder->cfg.g_timebase.den = GST_VIDEO_INFO_FPS_N (info); } else { /* Zero framerate and max-framerate but still need to setup the timebase to avoid * a divide by zero error. Presuming the lowest common denominator will be RTP - * VP8 payload draft states clock rate of 90000 which should work for anyone where * FPS < 90000 (shouldn't be too many cases where it's higher) though wouldn't be optimal. RTP specification * http://tools.ietf.org/html/draft-ietf-payload-vp8-01 section 6.3.1 */ - GST_WARNING_OBJECT (encoder, - "No timebase and zero framerate setting timebase to 1/90000"); encoder->cfg.g_timebase.num = 1; encoder->cfg.g_timebase.den = 90000; } + if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS || + encoder->cfg.g_pass == VPX_RC_LAST_PASS) { + if (!encoder->multipass_cache_prefix) { + GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, + ("No multipass cache file provided"), (NULL)); + g_mutex_unlock (&encoder->encoder_lock); + return FALSE; + } + + g_free (encoder->multipass_cache_file); + + if (encoder->multipass_cache_idx > 0) + encoder->multipass_cache_file = g_strdup_printf ("%s.%u", + encoder->multipass_cache_prefix, encoder->multipass_cache_idx); + else + encoder->multipass_cache_file = + g_strdup (encoder->multipass_cache_prefix); + } + if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { + if (encoder->first_pass_cache_content != NULL) + g_byte_array_free (encoder->first_pass_cache_content, TRUE); + encoder->first_pass_cache_content = g_byte_array_sized_new (4096); + } else if (encoder->cfg.g_pass == VPX_RC_LAST_PASS) { GError *err = NULL; - if (!encoder->multipass_cache_file) { - GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, - ("No multipass cache file provided"), (NULL)); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; + if (encoder->cfg.rc_twopass_stats_in.buf != NULL) { + g_free (encoder->cfg.rc_twopass_stats_in.buf); + encoder->cfg.rc_twopass_stats_in.buf = NULL; + encoder->cfg.rc_twopass_stats_in.sz = 0; } if (!g_file_get_contents (encoder->multipass_cache_file, @@ -1654,12 +1687,6 @@ "Failed to set VP8E_SET_ARNR_STRENGTH: %s", gst_vpx_error_name (status)); } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_TYPE, - encoder->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_TYPE: %s", gst_vpx_error_name (status)); - } status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, encoder->tuning); if (status != VPX_CODEC_OK) { @@ -1681,14 +1708,16 @@ } if (GST_VIDEO_INFO_FPS_D (info) == 0 || GST_VIDEO_INFO_FPS_N (info) == 0) { - gst_video_encoder_set_latency (video_encoder, GST_CLOCK_TIME_NONE, - GST_CLOCK_TIME_NONE); + /* FIXME: Assume 25fps for unknown framerates. Better than reporting + * that we introduce no latency while we actually do + */ + latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, + 1 * GST_SECOND, 25); } else { - gst_video_encoder_set_latency (video_encoder, 0, - gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, - GST_VIDEO_INFO_FPS_D (info) * GST_SECOND, - GST_VIDEO_INFO_FPS_N (info))); + latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, + GST_VIDEO_INFO_FPS_D (info) * GST_SECOND, GST_VIDEO_INFO_FPS_N (info)); } + gst_video_encoder_set_latency (video_encoder, latency, latency); encoder->inited = TRUE; /* Store input state */ @@ -1866,22 +1895,29 @@ return ret; } +/* This function should be called holding then stream lock*/ static GstFlowReturn -gst_vp8_enc_finish (GstVideoEncoder * video_encoder) +gst_vp8_enc_drain (GstVideoEncoder * video_encoder) { GstVP8Enc *encoder; int flags = 0; vpx_codec_err_t status; - - GST_DEBUG_OBJECT (video_encoder, "finish"); + gint64 deadline; + vpx_codec_pts_t pts; encoder = GST_VP8_ENC (video_encoder); g_mutex_lock (&encoder->encoder_lock); - status = - vpx_codec_encode (&encoder->encoder, NULL, encoder->n_frames, 1, flags, - encoder->deadline); + deadline = encoder->deadline; + + pts = + gst_util_uint64_scale (encoder->last_pts, + encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + + status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline); g_mutex_unlock (&encoder->encoder_lock); + if (status != 0) { GST_ERROR_OBJECT (encoder, "encode returned %d %s", status, gst_vpx_error_name (status)); @@ -1891,6 +1927,7 @@ /* dispatch remaining frames */ gst_vp8_enc_process (encoder); + g_mutex_lock (&encoder->encoder_lock); if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS && encoder->multipass_cache_file) { GError *err = NULL; @@ -1902,10 +1939,49 @@ g_error_free (err); } } + g_mutex_unlock (&encoder->encoder_lock); return GST_FLOW_OK; } +static gboolean +gst_vp8_enc_flush (GstVideoEncoder * video_encoder) +{ + GstVP8Enc *encoder; + + GST_DEBUG_OBJECT (video_encoder, "flush"); + + encoder = GST_VP8_ENC (video_encoder); + + gst_vp8_enc_destroy_encoder (encoder); + if (encoder->input_state) { + gst_video_codec_state_ref (encoder->input_state); + gst_vp8_enc_set_format (video_encoder, encoder->input_state); + gst_video_codec_state_unref (encoder->input_state); + } + + return TRUE; +} + +static GstFlowReturn +gst_vp8_enc_finish (GstVideoEncoder * video_encoder) +{ + GstVP8Enc *encoder; + GstFlowReturn ret; + + GST_DEBUG_OBJECT (video_encoder, "finish"); + + encoder = GST_VP8_ENC (video_encoder); + + if (encoder->inited) { + ret = gst_vp8_enc_drain (video_encoder); + } else { + ret = GST_FLOW_OK; + } + + return ret; +} + static vpx_image_t * gst_vp8_enc_buffer_to_image (GstVP8Enc * enc, GstVideoFrame * frame) { @@ -1934,13 +2010,13 @@ vpx_image_t *image; GstVP8EncUserData *user_data; GstVideoFrame vframe; + vpx_codec_pts_t pts; + unsigned long duration; GST_DEBUG_OBJECT (video_encoder, "handle_frame"); encoder = GST_VP8_ENC (video_encoder); - encoder->n_frames++; - GST_DEBUG_OBJECT (video_encoder, "size %d %d", GST_VIDEO_INFO_WIDTH (&encoder->input_state->info), GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info)); @@ -1959,8 +2035,24 @@ } g_mutex_lock (&encoder->encoder_lock); + pts = + gst_util_uint64_scale (frame->pts, + encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + encoder->last_pts = frame->pts; + + if (frame->duration != GST_CLOCK_TIME_NONE) { + duration = + gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + encoder->last_pts += frame->duration; + } else { + duration = 1; + } + status = vpx_codec_encode (&encoder->encoder, image, - encoder->n_frames, 1, flags, encoder->deadline); + pts, duration, flags, encoder->deadline); + g_mutex_unlock (&encoder->encoder_lock); gst_video_frame_unmap (&vframe); diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8enc.h gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8enc.h --- gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8enc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8enc.h 2015-10-22 08:02:54.000000000 +0000 @@ -73,6 +73,8 @@ gint n_ts_layer_id; /* Global two-pass options */ gchar *multipass_cache_file; + gchar *multipass_cache_prefix; + guint multipass_cache_idx; GByteArray *first_pass_cache_content; /* Encode parameter */ @@ -102,7 +104,7 @@ vpx_image_t image; - int n_frames; + GstClockTime last_pts; int keyframe_distance; GstVideoCodecState *input_state; diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8utils.h gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8utils.h --- gst-plugins-good1.0-1.4.3/ext/vpx/gstvp8utils.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/gstvp8utils.h 2015-10-22 08:02:54.000000000 +0000 @@ -25,23 +25,6 @@ G_BEGIN_DECLS -/* Some compatibility defines for older libvpx versions */ -#ifndef VPX_IMG_FMT_I420 -#define VPX_IMG_FMT_I420 IMG_FMT_I420 -#endif - -#ifndef VPX_PLANE_Y -#define VPX_PLANE_Y PLANE_Y -#endif - -#ifndef VPX_PLANE_U -#define VPX_PLANE_U PLANE_U -#endif - -#ifndef VPX_PLANE_V -#define VPX_PLANE_V PLANE_V -#endif - const char * gst_vpx_error_name (vpx_codec_err_t status); G_END_DECLS diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/gstvp9dec.c gst-plugins-good1.0-1.6.1/ext/vpx/gstvp9dec.c --- gst-plugins-good1.0-1.4.3/ext/vpx/gstvp9dec.c 2014-09-02 06:12:37.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/gstvp9dec.c 2015-10-22 08:02:54.000000000 +0000 @@ -32,7 +32,7 @@ * * Example pipeline * |[ - * gst-launch -v filesrc location=videotestsrc.webm ! matroskademux ! vp9dec ! xvimagesink + * gst-launch-1.0 -v filesrc location=videotestsrc.webm ! matroskademux ! vp9dec ! videoconvert ! videoscale ! autovideosink * ]| This example pipeline will decode a WebM stream and decodes the VP9 video. * */ @@ -207,6 +207,8 @@ gst_vp9_dec->noise_level = DEFAULT_NOISE_LEVEL; gst_video_decoder_set_needs_format (decoder, TRUE); + gst_video_decoder_set_use_default_pad_acceptcaps (decoder, TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (decoder)); } static void @@ -375,22 +377,30 @@ if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) { GST_ERROR_OBJECT (dec, "Could not map video buffer"); + return; } for (comp = 0; comp < 3; comp++) { dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp); src = img->planes[comp]; - width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp); + width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp) + * GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp); height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp); deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp); srcstride = img->stride[comp]; - /* FIXME (Edward) : Do a plane memcpy is srcstride == deststride instead - * of copying line by line */ - for (line = 0; line < height; line++) { - memcpy (dest, src, width); - dest += deststride; - src += srcstride; + if (srcstride == deststride) { + GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane", + comp, srcstride); + memcpy (dest, src, srcstride * height); + } else { + GST_TRACE_OBJECT (dec, "Stride mismatch. Comp %d: %d != %d, copying " + "line by line.", comp, srcstride, deststride); + for (line = 0; line < height; line++) { + memcpy (dest, src, width); + dest += deststride; + src += srcstride; + } } } @@ -424,12 +434,12 @@ if (status != VPX_CODEC_OK) { GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s", gst_vpx_error_name (status)); - gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame); + gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); return GST_FLOW_CUSTOM_SUCCESS_1; } if (!stream_info.is_kf) { GST_WARNING_OBJECT (dec, "No keyframe, skipping"); - gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame); + gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); return GST_FLOW_CUSTOM_SUCCESS_1; } @@ -582,7 +592,7 @@ gst_vp9_dec_image_to_buffer (dec, img, frame->output_buffer); ret = gst_video_decoder_finish_frame (decoder, frame); } else { - gst_video_decoder_finish_frame (decoder, frame); + gst_video_decoder_drop_frame (decoder, frame); } } diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/gstvp9enc.c gst-plugins-good1.0-1.6.1/ext/vpx/gstvp9enc.c --- gst-plugins-good1.0-1.4.3/ext/vpx/gstvp9enc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/gstvp9enc.c 2015-10-22 08:02:54.000000000 +0000 @@ -40,7 +40,7 @@ * * Example pipeline * |[ - * gst-launch -v videotestsrc num-buffers=1000 ! vp9enc ! webmmux ! filesink location=videotestsrc.webm + * gst-launch-1.0 -v videotestsrc num-buffers=1000 ! vp9enc ! webmmux ! filesink location=videotestsrc.webm * ]| This example pipeline will encode a test video source to VP9 muxed in an * WebM container. * @@ -345,7 +345,9 @@ static gboolean gst_vp9_enc_stop (GstVideoEncoder * encoder); static gboolean gst_vp9_enc_set_format (GstVideoEncoder * video_encoder, GstVideoCodecState * state); -static gboolean gst_vp9_enc_finish (GstVideoEncoder * video_encoder); +static GstFlowReturn gst_vp9_enc_finish (GstVideoEncoder * video_encoder); +static gboolean gst_vp9_enc_flush (GstVideoEncoder * video_encoder); +static GstFlowReturn gst_vp9_enc_drain (GstVideoEncoder * video_encoder); static GstFlowReturn gst_vp9_enc_handle_frame (GstVideoEncoder * video_encoder, GstVideoCodecFrame * frame); static gboolean gst_vp9_enc_sink_event (GstVideoEncoder * @@ -404,6 +406,7 @@ video_encoder_class->stop = gst_vp9_enc_stop; video_encoder_class->handle_frame = gst_vp9_enc_handle_frame; video_encoder_class->set_format = gst_vp9_enc_set_format; + video_encoder_class->flush = gst_vp9_enc_flush; video_encoder_class->finish = gst_vp9_enc_finish; video_encoder_class->sink_event = gst_vp9_enc_sink_event; video_encoder_class->propose_allocation = gst_vp9_enc_propose_allocation; @@ -526,7 +529,9 @@ g_object_class_install_property (gobject_class, PROP_MULTIPASS_CACHE_FILE, g_param_spec_string ("multipass-cache-file", "Multipass Cache File", - "Multipass cache file", + "Multipass cache file. " + "If stream caps reinited, multiple files will be created: " + "file, file.1, file.2, ... and so on.", DEFAULT_MULTIPASS_CACHE_FILE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); @@ -657,7 +662,8 @@ g_param_spec_int ("arnr-type", "AltRef type", "AltRef type", 1, 3, DEFAULT_ARNR_TYPE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + G_PARAM_DEPRECATED))); g_object_class_install_property (gobject_class, PROP_TUNING, g_param_spec_enum ("tuning", "Tuning", @@ -692,6 +698,7 @@ vpx_codec_err_t status; GST_DEBUG_OBJECT (gst_vp9_enc, "init"); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (gst_vp9_enc)); status = vpx_codec_enc_config_default (&vpx_codec_vp9_cx_algo, &gst_vp9_enc->cfg, @@ -727,7 +734,9 @@ gst_vp9_enc->cfg.kf_mode = DEFAULT_KF_MODE; gst_vp9_enc->cfg.kf_max_dist = DEFAULT_KF_MAX_DIST; gst_vp9_enc->cfg.g_pass = DEFAULT_MULTIPASS_MODE; - gst_vp9_enc->multipass_cache_file = g_strdup (DEFAULT_MULTIPASS_CACHE_FILE); + gst_vp9_enc->multipass_cache_prefix = g_strdup (DEFAULT_MULTIPASS_CACHE_FILE); + gst_vp9_enc->multipass_cache_file = NULL; + gst_vp9_enc->multipass_cache_idx = 0; gst_vp9_enc->cfg.ts_number_layers = DEFAULT_TS_NUMBER_LAYERS; gst_vp9_enc->n_ts_target_bitrate = 0; gst_vp9_enc->n_ts_rate_decimator = 0; @@ -769,8 +778,9 @@ g_return_if_fail (GST_IS_VP9_ENC (object)); gst_vp9_enc = GST_VP9_ENC (object); + g_free (gst_vp9_enc->multipass_cache_prefix); g_free (gst_vp9_enc->multipass_cache_file); - gst_vp9_enc->multipass_cache_file = NULL; + gst_vp9_enc->multipass_cache_idx = 0; if (gst_vp9_enc->input_state) gst_video_codec_state_unref (gst_vp9_enc->input_state); @@ -778,7 +788,6 @@ g_mutex_clear (&gst_vp9_enc->encoder_lock); G_OBJECT_CLASS (parent_class)->finalize (object); - } static void @@ -873,9 +882,9 @@ global = TRUE; break; case PROP_MULTIPASS_CACHE_FILE: - if (gst_vp9_enc->multipass_cache_file) - g_free (gst_vp9_enc->multipass_cache_file); - gst_vp9_enc->multipass_cache_file = g_value_dup_string (value); + if (gst_vp9_enc->multipass_cache_prefix) + g_free (gst_vp9_enc->multipass_cache_prefix); + gst_vp9_enc->multipass_cache_prefix = g_value_dup_string (value); break; case PROP_TS_NUMBER_LAYERS: gst_vp9_enc->cfg.ts_number_layers = g_value_get_int (value); @@ -1103,15 +1112,8 @@ break; case PROP_ARNR_TYPE: gst_vp9_enc->arnr_type = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_ARNR_TYPE, - gst_vp9_enc->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_ARNR_TYPE: %s", - gst_vpx_error_name (status)); - } - } + g_warning ("arnr-type is a no-op since control has been deprecated " + "in libvpx"); break; case PROP_TUNING: gst_vp9_enc->tuning = g_value_get_enum (value); @@ -1242,7 +1244,7 @@ g_value_set_enum (value, gst_vp9_enc->cfg.g_pass); break; case PROP_MULTIPASS_CACHE_FILE: - g_value_set_string (value, gst_vp9_enc->multipass_cache_file); + g_value_set_string (value, gst_vp9_enc->multipass_cache_prefix); break; case PROP_TS_NUMBER_LAYERS: g_value_set_int (value, gst_vp9_enc->cfg.ts_number_layers); @@ -1398,15 +1400,9 @@ return TRUE; } -static gboolean -gst_vp9_enc_stop (GstVideoEncoder * video_encoder) +static void +gst_vp9_enc_destroy_encoder (GstVP9Enc * encoder) { - GstVP9Enc *encoder; - - GST_DEBUG_OBJECT (video_encoder, "stop"); - - encoder = GST_VP9_ENC (video_encoder); - g_mutex_lock (&encoder->encoder_lock); if (encoder->inited) { vpx_codec_destroy (&encoder->encoder); @@ -1424,9 +1420,25 @@ encoder->cfg.rc_twopass_stats_in.sz = 0; } g_mutex_unlock (&encoder->encoder_lock); +} + +static gboolean +gst_vp9_enc_stop (GstVideoEncoder * video_encoder) +{ + GstVP9Enc *encoder; + + GST_DEBUG_OBJECT (video_encoder, "stop"); + + encoder = GST_VP9_ENC (video_encoder); + + gst_vp9_enc_destroy_encoder (encoder); gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder)); + g_free (encoder->multipass_cache_file); + encoder->multipass_cache_file = NULL; + encoder->multipass_cache_idx = 0; + return TRUE; } @@ -1481,16 +1493,21 @@ GstVideoInfo *info = &state->info; GstVideoCodecState *output_state; gchar *profile_str; + GstClockTime latency; encoder = GST_VP9_ENC (video_encoder); GST_DEBUG_OBJECT (video_encoder, "set_format"); if (encoder->inited) { - GST_DEBUG_OBJECT (video_encoder, "refusing renegotiation"); - return FALSE; + gst_vp9_enc_drain (video_encoder); + g_mutex_lock (&encoder->encoder_lock); + vpx_codec_destroy (&encoder->encoder); + encoder->inited = FALSE; + encoder->multipass_cache_idx++; + } else { + g_mutex_lock (&encoder->encoder_lock); } - g_mutex_lock (&encoder->encoder_lock); encoder->cfg.g_profile = gst_vp9_enc_get_downstream_profile (encoder); /* Scale default bitrate to our size */ @@ -1507,36 +1524,48 @@ GST_DEBUG_OBJECT (video_encoder, "Using timebase configuration"); encoder->cfg.g_timebase.num = encoder->timebase_n; encoder->cfg.g_timebase.den = encoder->timebase_d; - } else if (GST_VIDEO_INFO_FPS_D (info) != 0 - && GST_VIDEO_INFO_FPS_N (info) != 0) { - /* GstVideoInfo holds either the framerate or max-framerate (if framerate - * is 0) in FPS so this will be used if max-framerate or framerate - * is set */ - GST_DEBUG_OBJECT (video_encoder, "Setting timebase from framerate"); - encoder->cfg.g_timebase.num = GST_VIDEO_INFO_FPS_D (info); - encoder->cfg.g_timebase.den = GST_VIDEO_INFO_FPS_N (info); } else { /* Zero framerate and max-framerate but still need to setup the timebase to avoid * a divide by zero error. Presuming the lowest common denominator will be RTP - * VP9 payload draft states clock rate of 90000 which should work for anyone where * FPS < 90000 (shouldn't be too many cases where it's higher) though wouldn't be optimal. RTP specification * http://tools.ietf.org/html/draft-ietf-payload-vp9-01 section 6.3.1 */ - GST_WARNING_OBJECT (encoder, - "No timebase and zero framerate setting timebase to 1/90000"); encoder->cfg.g_timebase.num = 1; encoder->cfg.g_timebase.den = 90000; } + if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS || + encoder->cfg.g_pass == VPX_RC_LAST_PASS) { + if (!encoder->multipass_cache_prefix) { + GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, + ("No multipass cache file provided"), (NULL)); + g_mutex_unlock (&encoder->encoder_lock); + return FALSE; + } + + g_free (encoder->multipass_cache_file); + + if (encoder->multipass_cache_idx > 0) + encoder->multipass_cache_file = g_strdup_printf ("%s.%u", + encoder->multipass_cache_prefix, encoder->multipass_cache_idx); + else + encoder->multipass_cache_file = + g_strdup (encoder->multipass_cache_prefix); + } + if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { + if (encoder->first_pass_cache_content != NULL) + g_byte_array_free (encoder->first_pass_cache_content, TRUE); + encoder->first_pass_cache_content = g_byte_array_sized_new (4096); + } else if (encoder->cfg.g_pass == VPX_RC_LAST_PASS) { GError *err = NULL; - if (!encoder->multipass_cache_file) { - GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, - ("No multipass cache file provided"), (NULL)); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; + if (encoder->cfg.rc_twopass_stats_in.buf != NULL) { + g_free (encoder->cfg.rc_twopass_stats_in.buf); + encoder->cfg.rc_twopass_stats_in.buf = NULL; + encoder->cfg.rc_twopass_stats_in.sz = 0; } if (!g_file_get_contents (encoder->multipass_cache_file, @@ -1633,12 +1662,6 @@ "Failed to set VP8E_SET_ARNR_STRENGTH: %s", gst_vpx_error_name (status)); } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_TYPE, - encoder->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_TYPE: %s", gst_vpx_error_name (status)); - } status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, encoder->tuning); if (status != VPX_CODEC_OK) { @@ -1660,14 +1683,16 @@ } if (GST_VIDEO_INFO_FPS_D (info) == 0 || GST_VIDEO_INFO_FPS_N (info) == 0) { - gst_video_encoder_set_latency (video_encoder, GST_CLOCK_TIME_NONE, - GST_CLOCK_TIME_NONE); + /* FIXME: Assume 25fps for unknown framerates. Better than reporting + * that we introduce no latency while we actually do + */ + latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, + 1 * GST_SECOND, 25); } else { - gst_video_encoder_set_latency (video_encoder, 0, - gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, - GST_VIDEO_INFO_FPS_D (info) * GST_SECOND, - GST_VIDEO_INFO_FPS_N (info))); + latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, + GST_VIDEO_INFO_FPS_D (info) * GST_SECOND, GST_VIDEO_INFO_FPS_N (info)); } + gst_video_encoder_set_latency (video_encoder, latency, latency); encoder->inited = TRUE; /* Store input state */ @@ -1805,22 +1830,29 @@ return ret; } +/* This function should be called holding then stream lock*/ static GstFlowReturn -gst_vp9_enc_finish (GstVideoEncoder * video_encoder) +gst_vp9_enc_drain (GstVideoEncoder * video_encoder) { GstVP9Enc *encoder; int flags = 0; vpx_codec_err_t status; - - GST_DEBUG_OBJECT (video_encoder, "finish"); + gint64 deadline; + vpx_codec_pts_t pts; encoder = GST_VP9_ENC (video_encoder); g_mutex_lock (&encoder->encoder_lock); - status = - vpx_codec_encode (&encoder->encoder, NULL, encoder->n_frames, 1, flags, - encoder->deadline); + deadline = encoder->deadline; + + pts = + gst_util_uint64_scale (encoder->last_pts, + encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + + status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline); g_mutex_unlock (&encoder->encoder_lock); + if (status != 0) { GST_ERROR_OBJECT (encoder, "encode returned %d %s", status, gst_vpx_error_name (status)); @@ -1830,6 +1862,7 @@ /* dispatch remaining frames */ gst_vp9_enc_process (encoder); + g_mutex_lock (&encoder->encoder_lock); if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS && encoder->multipass_cache_file) { GError *err = NULL; @@ -1841,10 +1874,49 @@ g_error_free (err); } } + g_mutex_unlock (&encoder->encoder_lock); return GST_FLOW_OK; } +static gboolean +gst_vp9_enc_flush (GstVideoEncoder * video_encoder) +{ + GstVP9Enc *encoder; + + GST_DEBUG_OBJECT (video_encoder, "flush"); + + encoder = GST_VP9_ENC (video_encoder); + + gst_vp9_enc_destroy_encoder (encoder); + if (encoder->input_state) { + gst_video_codec_state_ref (encoder->input_state); + gst_vp9_enc_set_format (video_encoder, encoder->input_state); + gst_video_codec_state_unref (encoder->input_state); + } + + return TRUE; +} + +static GstFlowReturn +gst_vp9_enc_finish (GstVideoEncoder * video_encoder) +{ + GstVP9Enc *encoder; + GstFlowReturn ret; + + GST_DEBUG_OBJECT (video_encoder, "finish"); + + encoder = GST_VP9_ENC (video_encoder); + + if (encoder->inited) { + ret = gst_vp9_enc_drain (video_encoder); + } else { + ret = GST_FLOW_OK; + } + + return ret; +} + static vpx_image_t * gst_vp9_enc_buffer_to_image (GstVP9Enc * enc, GstVideoFrame * frame) { @@ -1872,13 +1944,13 @@ int flags = 0; vpx_image_t *image; GstVideoFrame vframe; + vpx_codec_pts_t pts; + unsigned long duration; GST_DEBUG_OBJECT (video_encoder, "handle_frame"); encoder = GST_VP9_ENC (video_encoder); - encoder->n_frames++; - GST_DEBUG_OBJECT (video_encoder, "size %d %d", GST_VIDEO_INFO_WIDTH (&encoder->input_state->info), GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info)); @@ -1892,8 +1964,24 @@ } g_mutex_lock (&encoder->encoder_lock); + pts = + gst_util_uint64_scale (frame->pts, + encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + encoder->last_pts = frame->pts; + + if (frame->duration != GST_CLOCK_TIME_NONE) { + duration = + gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + encoder->last_pts += frame->duration; + } else { + duration = 1; + } + status = vpx_codec_encode (&encoder->encoder, image, - encoder->n_frames, 1, flags, encoder->deadline); + pts, duration, flags, encoder->deadline); + g_mutex_unlock (&encoder->encoder_lock); gst_video_frame_unmap (&vframe); diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/gstvp9enc.h gst-plugins-good1.0-1.6.1/ext/vpx/gstvp9enc.h --- gst-plugins-good1.0-1.4.3/ext/vpx/gstvp9enc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/gstvp9enc.h 2015-10-22 08:02:54.000000000 +0000 @@ -73,6 +73,8 @@ gint n_ts_layer_id; /* Global two-pass options */ gchar *multipass_cache_file; + gchar *multipass_cache_prefix; + guint multipass_cache_idx; GByteArray *first_pass_cache_content; /* Encode parameter */ @@ -102,8 +104,7 @@ vpx_image_t image; - int n_frames; - + GstClockTime last_pts; GstVideoCodecState *input_state; }; diff -Nru gst-plugins-good1.0-1.4.3/ext/vpx/Makefile.in gst-plugins-good1.0-1.6.1/ext/vpx/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/vpx/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/vpx/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,8 +92,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/vpx -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 \ @@ -105,7 +113,6 @@ $(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 \ @@ -120,6 +127,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -232,6 +241,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -364,9 +374,6 @@ 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@ @@ -484,17 +491,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -547,6 +554,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -609,7 +617,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/vpx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/vpx/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -979,6 +986,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-pluginLTLIBRARIES uninstall-presetDATA +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/ext/wavpack/gstwavpackcommon.c gst-plugins-good1.0-1.6.1/ext/wavpack/gstwavpackcommon.c --- gst-plugins-good1.0-1.4.3/ext/wavpack/gstwavpackcommon.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/wavpack/gstwavpackcommon.c 2015-10-22 08:02:54.000000000 +0000 @@ -38,11 +38,7 @@ { memmove (header, buf, sizeof (WavpackHeader)); -#ifndef WAVPACK_OLD_API WavpackLittleEndianToNative (header, (char *) WavpackHeaderFormat); -#else - little_endian_to_native (header, WavpackHeaderFormat); -#endif return (memcmp (header->ckID, "wvpk", 4) == 0); } diff -Nru gst-plugins-good1.0-1.4.3/ext/wavpack/gstwavpackdec.c gst-plugins-good1.0-1.6.1/ext/wavpack/gstwavpackdec.c --- gst-plugins-good1.0-1.4.3/ext/wavpack/gstwavpackdec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/wavpack/gstwavpackdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -142,6 +142,9 @@ dec->stream_reader = gst_wavpack_stream_reader_new (); gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE); + gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST + (dec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec)); gst_wavpack_dec_reset (dec); } @@ -263,6 +266,7 @@ (guint) bitrate, NULL); gst_audio_decoder_merge_tags (GST_AUDIO_DECODER (dec), list, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (list); } } @@ -325,11 +329,7 @@ (dec->sample_rate != WavpackGetSampleRate (dec->context)) || (dec->channels != WavpackGetNumChannels (dec->context)) || (dec->depth != WavpackGetBytesPerSample (dec->context) * 8) || -#ifdef WAVPACK_OLD_API - (dec->channel_mask != dec->context->config.channel_mask); -#else (dec->channel_mask != WavpackGetChannelMask (dec->context)); -#endif if (!gst_pad_has_current_caps (GST_AUDIO_DECODER_SRC_PAD (dec)) || format_changed) { @@ -339,11 +339,7 @@ dec->channels = WavpackGetNumChannels (dec->context); dec->depth = WavpackGetBytesPerSample (dec->context) * 8; -#ifdef WAVPACK_OLD_API - channel_mask = dec->context->config.channel_mask; -#else channel_mask = WavpackGetChannelMask (dec->context); -#endif if (channel_mask == 0) channel_mask = gst_wavpack_get_default_channel_mask (dec->channels); @@ -454,11 +450,7 @@ const gchar *reason = "unknown"; if (dec->context) { -#ifdef WAVPACK_OLD_API - reason = dec->context->error_message; -#else reason = WavpackGetErrorMessage (dec->context); -#endif } else { reason = "couldn't create decoder context"; } diff -Nru gst-plugins-good1.0-1.4.3/ext/wavpack/gstwavpackenc.c gst-plugins-good1.0-1.6.1/ext/wavpack/gstwavpackenc.c --- gst-plugins-good1.0-1.4.3/ext/wavpack/gstwavpackenc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/wavpack/gstwavpackenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -136,9 +136,7 @@ {GST_WAVPACK_ENC_MODE_FAST, "Fast Compression", "fast"}, {GST_WAVPACK_ENC_MODE_DEFAULT, "Normal Compression", "normal"}, {GST_WAVPACK_ENC_MODE_HIGH, "High Compression", "high"}, -#ifndef WAVPACK_OLD_API {GST_WAVPACK_ENC_MODE_VERY_HIGH, "Very High Compression", "veryhigh"}, -#endif {0, NULL, NULL} }; @@ -347,6 +345,8 @@ /* require perfect ts */ gst_audio_encoder_set_perfect_timestamp (benc, TRUE); + + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc)); } @@ -466,12 +466,10 @@ case GST_WAVPACK_ENC_MODE_HIGH: enc->wp_config->flags |= CONFIG_HIGH_FLAG; break; -#ifndef WAVPACK_OLD_API case GST_WAVPACK_ENC_MODE_VERY_HIGH: enc->wp_config->flags |= CONFIG_HIGH_FLAG; enc->wp_config->flags |= CONFIG_VERY_HIGH_FLAG; break; -#endif } /* Bitrate, enables lossy mode */ diff -Nru gst-plugins-good1.0-1.4.3/ext/wavpack/Makefile.in gst-plugins-good1.0-1.6.1/ext/wavpack/Makefile.in --- gst-plugins-good1.0-1.4.3/ext/wavpack/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ext/wavpack/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = ext/wavpack -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -231,6 +240,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -363,9 +373,6 @@ 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@ @@ -483,17 +490,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -546,6 +553,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -596,7 +604,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/wavpack/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ext/wavpack/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -937,6 +944,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/gst/alpha/gstalpha.c gst-plugins-good1.0-1.6.1/gst/alpha/gstalpha.c --- gst-plugins-good1.0-1.4.3/gst/alpha/gstalpha.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/alpha/gstalpha.c 2015-10-22 08:02:54.000000000 +0000 @@ -120,8 +120,7 @@ PROP_NOISE_LEVEL, PROP_BLACK_SENSITIVITY, PROP_WHITE_SENSITIVITY, - PROP_PREFER_PASSTHROUGH, - PROP_LAST + PROP_PREFER_PASSTHROUGH }; static GstStaticPadTemplate gst_alpha_src_template = @@ -1880,7 +1879,7 @@ y = src[p[0]]; u = src[p[1]]; - v = src[p[3]];; + v = src[p[3]]; dest[1] = y; dest[2] = u; @@ -1901,7 +1900,7 @@ y = src[p[0]]; u = src[p[1]]; - v = src[p[3]];; + v = src[p[3]]; dest[1] = y; dest[2] = u; @@ -2455,7 +2454,6 @@ break; } break; - break; default: break; } @@ -2537,7 +2535,6 @@ break; } break; - break; default: break; } diff -Nru gst-plugins-good1.0-1.4.3/gst/alpha/Makefile.am gst-plugins-good1.0-1.6.1/gst/alpha/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/alpha/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/alpha/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -17,17 +17,3 @@ libgstalphacolor_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstalpha.h gstalphacolor.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstalpha -:SHARED libgstalpha \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstalpha_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalpha_la_CFLAGS) \ - -:LDFLAGS $(libgstalpha_la_LDFLAGS) \ - $(libgstalpha_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/alpha/Makefile.in gst-plugins-good1.0-1.6.1/gst/alpha/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/alpha/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/alpha/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/alpha -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -236,6 +245,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -368,9 +378,6 @@ 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@ @@ -488,17 +495,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -551,6 +558,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -599,7 +607,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/alpha/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/alpha/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -919,20 +926,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstalpha -:SHARED libgstalpha \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstalpha_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalpha_la_CFLAGS) \ - -:LDFLAGS $(libgstalpha_la_LDFLAGS) \ - $(libgstalpha_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/apetag/Makefile.am gst-plugins-good1.0-1.6.1/gst/apetag/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/apetag/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/apetag/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -14,17 +14,3 @@ libgstapetag_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstapedemux.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstapetag -:SHARED libgstapetag \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstapetag_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapetag_la_CFLAGS) \ - -:LDFLAGS $(libgstapetag_la_LDFLAGS) \ - $(libgstapetag_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/apetag/Makefile.in gst-plugins-good1.0-1.6.1/gst/apetag/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/apetag/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/apetag/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/apetag -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -585,7 +593,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/apetag/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/apetag/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -894,20 +901,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstapetag -:SHARED libgstapetag \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstapetag_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapetag_la_CFLAGS) \ - -:LDFLAGS $(libgstapetag_la_LDFLAGS) \ - $(libgstapetag_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audioamplify.c gst-plugins-good1.0-1.6.1/gst/audiofx/audioamplify.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audioamplify.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audioamplify.c 2015-10-22 08:02:54.000000000 +0000 @@ -29,8 +29,8 @@ * Example launch line * |[ * gst-launch-1.0 audiotestsrc wave=saw ! audioamplify amplification=1.5 ! alsasink - * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioamplify amplification=1.5 method=wrap-negative ! alsasink - * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioamplify amplification=1.5 method=wrap-positive ! audioconvert ! alsasink + * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioamplify amplification=1.5 clipping-method=wrap-negative ! alsasink + * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioamplify amplification=1.5 clipping-method=wrap-positive ! audioconvert ! alsasink * ]| * */ diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audiodynamic.c gst-plugins-good1.0-1.6.1/gst/audiofx/audiodynamic.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audiodynamic.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audiodynamic.c 2015-10-22 08:02:54.000000000 +0000 @@ -29,8 +29,8 @@ * * Example launch line * |[ - * gst-launch-1.0 audiotestsrc wave=saw ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.5 rate=0.5 ! alsasink - * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiodynamic characteristics=hard-knee mode=expander threshold=0.2 rate=4.0 ! alsasink + * gst-launch-1.0 audiotestsrc wave=saw ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.5 ratio=0.5 ! alsasink + * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiodynamic characteristics=hard-knee mode=expander threshold=0.2 ratio=4.0 ! alsasink * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audiodynamic ! audioconvert ! alsasink * ]| * @@ -110,7 +110,7 @@ gst_audio_dynamic_transform_soft_knee_expander_float (GstAudioDynamic * filter, gfloat * data, guint num_samples); -static GstAudioDynamicProcessFunc process_functions[] = { +static const GstAudioDynamicProcessFunc process_functions[] = { (GstAudioDynamicProcessFunc) gst_audio_dynamic_transform_hard_knee_compressor_int, (GstAudioDynamicProcessFunc) @@ -180,25 +180,19 @@ return gtype; } -static gboolean +static void gst_audio_dynamic_set_process_function (GstAudioDynamic * filter, const GstAudioInfo * info) { gint func_index; - if (GST_AUDIO_INFO_FORMAT (info) == GST_AUDIO_FORMAT_UNKNOWN) - return FALSE; - func_index = (filter->mode == MODE_COMPRESSOR) ? 0 : 4; func_index += (filter->characteristics == CHARACTERISTICS_HARD_KNEE) ? 0 : 2; func_index += (GST_AUDIO_INFO_FORMAT (info) == GST_AUDIO_FORMAT_F32) ? 1 : 0; - if (func_index >= 0 && func_index < 8) { - filter->process = process_functions[func_index]; - return TRUE; - } + g_assert (func_index >= 0 && func_index < G_N_ELEMENTS (process_functions)); - return FALSE; + filter->process = process_functions[func_index]; } /* GObject vmethod implementations */ @@ -333,11 +327,9 @@ gst_audio_dynamic_setup (GstAudioFilter * base, const GstAudioInfo * info) { GstAudioDynamic *filter = GST_AUDIO_DYNAMIC (base); - gboolean ret = TRUE; - - ret = gst_audio_dynamic_set_process_function (filter, info); - return ret; + gst_audio_dynamic_set_process_function (filter, info); + return TRUE; } static void diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audioecho.c gst-plugins-good1.0-1.6.1/gst/audiofx/audioecho.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audioecho.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audioecho.c 2015-10-22 08:02:54.000000000 +0000 @@ -35,7 +35,7 @@ * * Example launch line * |[ - * gst-launch-1.0 filesrc location="melo1.ogg" ! audioconvert ! audioecho delay=500000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink + * gst-launch-1.0 autoaudiosrc ! audioconvert ! audioecho delay=500000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink * gst-launch-1.0 filesrc location="melo1.ogg" ! decodebin ! audioconvert ! audioecho delay=50000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink * ]| * @@ -200,6 +200,10 @@ } else { self->delay = delay; self->max_delay = MAX (delay, max_delay); + if (delay > max_delay) { + g_free (self->buffer); + self->buffer = NULL; + } } rate = GST_AUDIO_FILTER_RATE (self); if (rate > 0) @@ -210,18 +214,18 @@ break; } case PROP_MAX_DELAY:{ - guint64 max_delay, delay; + guint64 max_delay; g_mutex_lock (&self->lock); max_delay = g_value_get_uint64 (value); - delay = self->delay; if (GST_STATE (self) > GST_STATE_READY) { GST_ERROR_OBJECT (self, "Can't change maximum delay in" " PLAYING or PAUSED state"); } else { - self->delay = delay; self->max_delay = max_delay; + g_free (self->buffer); + self->buffer = NULL; } g_mutex_unlock (&self->lock); break; diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audiofxbasefirfilter.c gst-plugins-good1.0-1.6.1/gst/audiofx/audiofxbasefirfilter.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audiofxbasefirfilter.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audiofxbasefirfilter.c 2015-10-22 08:02:54.000000000 +0000 @@ -110,13 +110,13 @@ gint off; \ gdouble *buffer = self->buffer; \ gdouble *kernel = self->kernel; \ - guint buffer_length = self->buffer_length; \ \ if (!buffer) { \ - self->buffer_length = buffer_length = kernel_length * channels; \ + self->buffer_length = kernel_length * channels; \ self->buffer = buffer = g_new0 (gdouble, self->buffer_length); \ } \ \ + input_samples *= channels; \ /* convolution */ \ for (i = 0; i < input_samples; i++) { \ dst[i] = 0.0; \ @@ -156,7 +156,7 @@ if (self->buffer_fill > kernel_length) \ self->buffer_fill = kernel_length; \ \ - return input_samples; \ + return input_samples / channels; \ } G_STMT_END DEFINE_PROCESS_FUNC (32, float); diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audioinvert.c gst-plugins-good1.0-1.6.1/gst/audiofx/audioinvert.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audioinvert.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audioinvert.c 2015-10-22 08:02:54.000000000 +0000 @@ -29,9 +29,9 @@ * * Example launch line * |[ - * gst-launch-1.0 audiotestsrc wave=saw ! audioinvert invert=0.4 ! alsasink - * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioinvert invert=0.4 ! alsasink - * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioinvert invert=0.4 ! audioconvert ! alsasink + * gst-launch-1.0 audiotestsrc wave=saw ! audioinvert degree=0.4 ! alsasink + * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioinvert degree=0.4 ! alsasink + * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioinvert degree=0.4 ! audioconvert ! alsasink * ]| * */ diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audiokaraoke.c gst-plugins-good1.0-1.6.1/gst/audiofx/audiokaraoke.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audiokaraoke.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audiokaraoke.c 2015-10-22 08:02:54.000000000 +0000 @@ -66,8 +66,7 @@ PROP_LEVEL, PROP_MONO_LEVEL, PROP_FILTER_BAND, - PROP_FILTER_WIDTH, - PROP_LAST + PROP_FILTER_WIDTH }; #define ALLOWED_CAPS \ diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audiopanorama.c gst-plugins-good1.0-1.6.1/gst/audiofx/audiopanorama.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audiopanorama.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audiopanorama.c 2015-10-22 08:02:54.000000000 +0000 @@ -139,7 +139,7 @@ /* Table with processing functions: [channels][format][method] */ -static GstAudioPanoramaProcessFunc panorama_process_functions[2][2][2] = { +static const GstAudioPanoramaProcessFunc panorama_process_functions[2][2][2] = { { { (GstAudioPanoramaProcessFunc) gst_audio_panorama_m2s_int, diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audiopanoramaorc-dist.c gst-plugins-good1.0-1.6.1/gst/audiofx/audiopanoramaorc-dist.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audiopanoramaorc-dist.c 2014-09-24 08:30:49.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audiopanoramaorc-dist.c 2015-10-30 14:27:10.000000000 +0000 @@ -264,7 +264,7 @@ static const orc_uint8 bc[] = { 1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 49, 95, 110, 111, 110, 101, 11, 4, 4, 12, 2, 2, 195, 0, 4, 4, 2, 0, }; @@ -390,7 +390,7 @@ static const orc_uint8 bc[] = { 1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 49, 95, 110, 111, 110, 101, 11, 8, 8, 12, 4, 4, 194, 0, 4, 4, 2, 0, }; @@ -502,7 +502,7 @@ static const orc_uint8 bc[] = { 1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 50, 95, 110, 111, 110, 101, 11, 4, 4, 12, 4, 4, 21, 1, 79, 0, 4, 2, 0, }; @@ -614,7 +614,7 @@ static const orc_uint8 bc[] = { 1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 50, 95, 110, 111, 110, 101, 11, 8, 8, 12, 8, 8, 21, 1, 112, 0, 4, 2, 0, }; @@ -842,7 +842,7 @@ static const orc_uint8 bc[] = { 1, 9, 38, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 49, 95, 112, 115, 121, 11, 4, 4, 12, 2, 2, 17, 4, 17, 4, 20, 8, 20, 4, 20, 4, 153, 33, 4, 211, 33, 33, 202, 34, 33, 25, 202, 33, 33, 24, 194, 32, 33, 34, 21, 1, 210, 32, 32, @@ -1053,7 +1053,7 @@ static const orc_uint8 bc[] = { 1, 9, 38, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 49, 95, 112, 115, 121, 11, 8, 8, 12, 4, 4, 17, 4, 17, 4, 20, 4, 20, 4, 202, 33, 4, 25, 202, 32, 4, 24, 194, 0, 32, 33, 2, 0, @@ -1355,7 +1355,7 @@ static const orc_uint8 bc[] = { 1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 50, 95, 112, 115, 121, 95, 114, 105, 103, 104, 116, 11, 4, 4, 12, 4, 4, 17, 4, 17, 4, 20, 8, 20, 4, 20, 4, 20, 4, 21, 1, 153, 32, 4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 34, @@ -1675,7 +1675,7 @@ static const orc_uint8 bc[] = { 1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 50, 95, 112, 115, 121, 95, 108, 101, 102, 116, 11, 4, 4, 12, 4, 4, 17, 4, 17, 4, 20, 8, 20, 4, 20, 4, 20, 4, 21, 1, 153, 32, 4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 35, 32, @@ -1945,7 +1945,7 @@ static const orc_uint8 bc[] = { 1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 50, 95, 112, 115, 121, 95, 114, 105, 103, 104, 116, 11, 8, 8, 12, 8, 8, 17, 4, 17, 4, 20, 4, 20, 4, 20, 4, 192, 32, 4, 193, 33, 4, 202, 34, 32, 25, 202, 32, 32, 24, 200, 33, 34, @@ -2205,7 +2205,7 @@ static const orc_uint8 bc[] = { 1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 50, 95, 112, 115, 121, 95, 108, 101, 102, 116, 11, 8, 8, 12, 8, 8, 17, 4, 17, 4, 20, 4, 20, 4, 20, 4, 192, 32, 4, 193, 34, 4, 202, 33, 34, 24, 202, 34, 34, 25, 200, 32, 33, 32, @@ -2433,7 +2433,7 @@ static const orc_uint8 bc[] = { 1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 49, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11, 4, 4, 12, 2, 2, 17, 4, 20, 8, 20, 4, 20, 4, 153, 33, 4, 211, 33, 33, 202, 34, 33, 24, 194, 32, 33, 34, 21, 1, 210, 32, 32, @@ -2655,7 +2655,7 @@ static const orc_uint8 bc[] = { 1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 49, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 4, 4, 12, 2, 2, 17, 4, 20, 8, 20, 4, 20, 4, 153, 34, 4, 211, 34, 34, 202, 33, 34, 24, 194, 32, 33, 34, 21, 1, 210, 32, 32, 21, @@ -2909,7 +2909,7 @@ static const orc_uint8 bc[] = { 1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 50, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11, 4, 4, 12, 4, 4, 17, 4, 20, 8, 20, 4, 20, 4, 21, 1, 153, 32, 4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 34, 32, 202, 34, 34, @@ -3168,7 +3168,7 @@ static const orc_uint8 bc[] = { 1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115, - 49, + 49, 54, 95, 99, 104, 50, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 4, 4, 12, 4, 4, 17, 4, 20, 8, 20, 4, 20, 4, 21, 1, 153, 32, 4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 34, 32, 202, 33, 33, 24, @@ -3355,7 +3355,7 @@ static const orc_uint8 bc[] = { 1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 49, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11, 8, 8, 12, 4, 4, 17, 4, 20, 4, 20, 4, 112, 32, 4, 202, 33, 4, 24, 194, 0, 32, 33, 2, 0, @@ -3529,7 +3529,7 @@ static const orc_uint8 bc[] = { 1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 49, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 8, 8, 12, 4, 4, 17, 4, 20, 4, 20, 4, 202, 32, 4, 24, 112, 33, 4, 194, 0, 32, 33, 2, 0, @@ -3725,7 +3725,7 @@ static const orc_uint8 bc[] = { 1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 50, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11, 8, 8, 12, 8, 8, 17, 4, 20, 4, 20, 4, 192, 32, 4, 193, 33, 4, 202, 33, 33, 24, 194, 0, 32, 33, 2, 0, @@ -3923,7 +3923,7 @@ static const orc_uint8 bc[] = { 1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97, 109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102, - 51, + 51, 50, 95, 99, 104, 50, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 8, 8, 12, 8, 8, 17, 4, 20, 4, 20, 4, 192, 32, 4, 193, 33, 4, 202, 32, 32, 24, 194, 0, 32, 33, 2, 0, diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/audiowsincband.c gst-plugins-good1.0-1.6.1/gst/audiofx/audiowsincband.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/audiowsincband.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/audiowsincband.c 2015-10-22 08:02:54.000000000 +0000 @@ -45,7 +45,7 @@ * * Example launch line * |[ - * gst-launch-1.0 audiotestsrc freq=1500 ! audioconvert ! audiosincband mode=band-pass lower-frequency=3000 upper-frequency=10000 length=501 window=blackman ! audioconvert ! alsasink + * gst-launch-1.0 audiotestsrc freq=1500 ! audioconvert ! audiowsincband mode=band-pass lower-frequency=3000 upper-frequency=10000 length=501 window=blackman ! audioconvert ! alsasink * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiowsincband mode=band-reject lower-frequency=59 upper-frequency=61 length=10001 window=hamming ! audioconvert ! alsasink * gst-launch-1.0 audiotestsrc wave=white-noise ! audioconvert ! audiowsincband mode=band-pass lower-frequency=1000 upper-frequency=2000 length=31 ! audioconvert ! alsasink * ]| diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/gstscaletempo.c gst-plugins-good1.0-1.6.1/gst/audiofx/gstscaletempo.c --- gst-plugins-good1.0-1.4.3/gst/audiofx/gstscaletempo.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/gstscaletempo.c 2015-10-27 15:32:17.000000000 +0000 @@ -391,6 +391,35 @@ st->reinit_buffers = FALSE; } +static GstBuffer * +reverse_buffer (GstScaletempo * st, GstBuffer * inbuf) +{ + GstBuffer *outbuf; + GstMapInfo imap, omap; + + gst_buffer_map (inbuf, &imap, GST_MAP_READ); + outbuf = gst_buffer_new_and_alloc (imap.size); + gst_buffer_map (outbuf, &omap, GST_MAP_WRITE); + + { + const gint32 *ip = (const gint32 *) imap.data; + gint32 *op = (gint32 *) (omap.data + omap.size - 4 * st->samples_per_frame); + guint i, n = imap.size / (4 * st->samples_per_frame); + guint j, c = st->samples_per_frame; + + for (i = 0; i < n; i++) { + for (j = 0; j < c; j++) + op[j] = ip[j]; + op -= c; + ip += c; + } + } + + gst_buffer_unmap (inbuf, &imap); + gst_buffer_unmap (outbuf, &omap); + + return outbuf; +} /* GstBaseTransform vmethod implementations */ static GstFlowReturn @@ -402,10 +431,16 @@ guint offset_in, bytes_out; GstMapInfo omap; GstClockTime timestamp; + GstBuffer *tmpbuf = NULL; + + if (st->reverse) + tmpbuf = reverse_buffer (st, inbuf); gst_buffer_map (outbuf, &omap, GST_MAP_WRITE); pout = (gint8 *) omap.data; - offset_in = fill_queue (st, inbuf, 0); + bytes_out = omap.size; + + offset_in = fill_queue (st, tmpbuf ? tmpbuf : inbuf, 0); bytes_out = 0; while (st->bytes_queued >= st->bytes_queue_max) { guint bytes_off = 0; @@ -432,25 +467,53 @@ st->bytes_to_slide = frames_to_stride_whole * st->bytes_per_frame; st->frames_stride_error = frames_to_slide - frames_to_stride_whole; - offset_in += fill_queue (st, inbuf, offset_in); + offset_in += fill_queue (st, tmpbuf ? tmpbuf : inbuf, offset_in); } - gst_buffer_unmap (outbuf, &omap); - timestamp = GST_BUFFER_TIMESTAMP (inbuf) - st->segment_start; - if (timestamp < st->latency) - timestamp = 0; - else - timestamp -= st->latency; - GST_BUFFER_TIMESTAMP (outbuf) = timestamp / st->scale + st->segment_start; + if (st->reverse) { + timestamp = st->in_segment.stop - GST_BUFFER_TIMESTAMP (inbuf); + if (timestamp < st->latency) + timestamp = 0; + else + timestamp -= st->latency; + } else { + timestamp = GST_BUFFER_TIMESTAMP (inbuf) - st->in_segment.start; + if (timestamp < st->latency) + timestamp = 0; + else + timestamp -= st->latency; + } + GST_BUFFER_TIMESTAMP (outbuf) = timestamp / st->scale + st->in_segment.start; GST_BUFFER_DURATION (outbuf) = gst_util_uint64_scale (bytes_out, GST_SECOND, st->bytes_per_frame * st->sample_rate); gst_buffer_set_size (outbuf, bytes_out); + if (tmpbuf) + gst_buffer_unref (tmpbuf); + return GST_FLOW_OK; } +static GstFlowReturn +gst_scaletempo_submit_input_buffer (GstBaseTransform * trans, + gboolean is_discont, GstBuffer * input) +{ + GstScaletempo *scaletempo = GST_SCALETEMPO (trans); + + if (scaletempo->in_segment.format == GST_FORMAT_TIME) { + input = + gst_audio_buffer_clip (input, &scaletempo->in_segment, + scaletempo->sample_rate, scaletempo->bytes_per_frame); + if (!input) + return GST_FLOW_OK; + } + + return GST_BASE_TRANSFORM_CLASS (parent_class)->submit_input_buffer (trans, + is_discont, input); +} + static gboolean gst_scaletempo_transform_size (GstBaseTransform * trans, GstPadDirection direction, @@ -482,21 +545,25 @@ static gboolean gst_scaletempo_sink_event (GstBaseTransform * trans, GstEvent * event) { + GstScaletempo *scaletempo = GST_SCALETEMPO (trans); + if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) { - GstScaletempo *scaletempo = GST_SCALETEMPO (trans); GstSegment segment; gst_event_copy_segment (event, &segment); - if (scaletempo->scale != segment.rate) { - if (ABS (segment.rate - 1.0) < 1e-10) { + if (segment.format != GST_FORMAT_TIME + || scaletempo->scale != ABS (segment.rate) + || ! !scaletempo->reverse != ! !(segment.rate < 0.0)) { + if (segment.format != GST_FORMAT_TIME || ABS (segment.rate - 1.0) < 1e-10) { scaletempo->scale = 1.0; gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (scaletempo), TRUE); } else { gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (scaletempo), FALSE); - scaletempo->scale = segment.rate; + scaletempo->scale = ABS (segment.rate); + scaletempo->reverse = segment.rate < 0.0; scaletempo->bytes_stride_scaled = scaletempo->bytes_stride * scaletempo->scale; scaletempo->frames_stride_scaled = @@ -509,22 +576,36 @@ } } - if (scaletempo->scale != 1.0) { - scaletempo->segment_start = segment.start; - segment.applied_rate = scaletempo->scale; + scaletempo->in_segment = segment; + scaletempo->out_segment = segment; + + if (scaletempo->scale != 1.0 || scaletempo->reverse) { + guint32 seqnum; + + segment.applied_rate = segment.rate; segment.rate = 1.0; - gst_event_unref (event); if (segment.stop != -1) { - segment.stop = (segment.stop - segment.start) / segment.applied_rate + + segment.stop = + (segment.stop - segment.start) / ABS (segment.applied_rate) + segment.start; } + scaletempo->out_segment = segment; + + seqnum = gst_event_get_seqnum (event); + gst_event_unref (event); + event = gst_event_new_segment (&segment); - gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (trans), event); - return TRUE; + gst_event_set_seqnum (event, seqnum); + + return gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (trans), event); } + } else if (GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) { + gst_segment_init (&scaletempo->in_segment, GST_FORMAT_UNDEFINED); + gst_segment_init (&scaletempo->out_segment, GST_FORMAT_UNDEFINED); } + return GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, event); } @@ -566,6 +647,17 @@ } static gboolean +gst_scaletempo_start (GstBaseTransform * trans) +{ + GstScaletempo *scaletempo = GST_SCALETEMPO (trans); + + gst_segment_init (&scaletempo->in_segment, GST_FORMAT_UNDEFINED); + gst_segment_init (&scaletempo->out_segment, GST_FORMAT_UNDEFINED); + + return TRUE; +} + +static gboolean gst_scaletempo_query (GstBaseTransform * trans, GstPadDirection direction, GstQuery * query) { @@ -575,10 +667,9 @@ switch (GST_QUERY_TYPE (query)) { case GST_QUERY_LATENCY:{ GstPad *peer; - gboolean res; if ((peer = gst_pad_get_peer (GST_BASE_TRANSFORM_SINK_PAD (trans)))) { - if ((res = gst_pad_query (peer, query))) { + if ((gst_pad_query (peer, query))) { GstClockTime min, max; gboolean live; @@ -604,12 +695,10 @@ } return TRUE; - break; } default:{ return GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction, query); - break; } } } else { @@ -726,6 +815,9 @@ GST_DEBUG_FUNCPTR (gst_scaletempo_transform_size); basetransform_class->transform = GST_DEBUG_FUNCPTR (gst_scaletempo_transform); basetransform_class->query = GST_DEBUG_FUNCPTR (gst_scaletempo_query); + basetransform_class->start = GST_DEBUG_FUNCPTR (gst_scaletempo_start); + basetransform_class->submit_input_buffer = + GST_DEBUG_FUNCPTR (gst_scaletempo_submit_input_buffer); } static void @@ -743,5 +835,6 @@ scaletempo->bytes_stride = 0; scaletempo->bytes_queued = 0; scaletempo->bytes_to_slide = 0; - scaletempo->segment_start = 0; + gst_segment_init (&scaletempo->in_segment, GST_FORMAT_UNDEFINED); + gst_segment_init (&scaletempo->out_segment, GST_FORMAT_UNDEFINED); } diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/gstscaletempo.h gst-plugins-good1.0-1.6.1/gst/audiofx/gstscaletempo.h --- gst-plugins-good1.0-1.4.3/gst/audiofx/gstscaletempo.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/gstscaletempo.h 2015-10-27 15:31:52.000000000 +0000 @@ -41,6 +41,7 @@ GstBaseTransform element; gdouble scale; + gboolean reverse; /* parameters */ guint ms_stride; @@ -80,7 +81,7 @@ guint (*best_overlap_offset) (GstScaletempo * scaletempo); /* gstreamer */ - gint64 segment_start; + GstSegment in_segment, out_segment; GstClockTime latency; /* threads */ diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/Makefile.am gst-plugins-good1.0-1.6.1/gst/audiofx/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/audiofx/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -59,17 +59,3 @@ audioecho.h \ gstscaletempo.h \ math_compat.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstaudiofx -:SHARED libgstaudiofx \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstaudiofx_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiofx_la_CFLAGS) \ - -:LDFLAGS $(libgstaudiofx_la_LDFLAGS) \ - $(libgstaudiofx_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/audiofx/Makefile.in gst-plugins-good1.0-1.6.1/gst/audiofx/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/audiofx/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audiofx/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,7 +40,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -104,8 +114,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/orc.mak $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/depcomp $(noinst_HEADERS) subdir = gst/audiofx ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -128,7 +136,6 @@ $(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 \ @@ -143,6 +150,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -270,6 +279,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \ + $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -404,9 +415,6 @@ 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@ @@ -524,17 +532,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -587,6 +595,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -683,7 +692,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/audiofx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/audiofx/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -692,7 +700,7 @@ 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/orc.mak: +$(top_srcdir)/common/orc.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1128,6 +1136,8 @@ tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + orc-update: tmp-orc.c $(ORC_SOURCE).h $(top_srcdir)/common/gst-indent tmp-orc.c @@ -1165,20 +1175,6 @@ cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstaudiofx -:SHARED libgstaudiofx \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstaudiofx_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiofx_la_CFLAGS) \ - -:LDFLAGS $(libgstaudiofx_la_LDFLAGS) \ - $(libgstaudiofx_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: diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstaacparse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstaacparse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstaacparse.c 2014-09-04 09:54:25.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstaacparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -82,7 +82,7 @@ static const gint loas_channels_table[32] = { 0, 1, 2, 3, 4, 5, 6, 8, - 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 7, 8, 0, 8, 0 }; static gboolean gst_aac_parse_start (GstBaseParse * parse); @@ -144,6 +144,7 @@ { GST_DEBUG ("initialized"); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (aacparse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (aacparse)); } @@ -164,8 +165,9 @@ GstCaps *src_caps = NULL, *allowed; gboolean res = FALSE; const gchar *stream_format; - GstBuffer *codec_data; + guint8 codec_data[2]; guint16 codec_data_data; + gint sample_rate_idx; GST_DEBUG_OBJECT (aacparse, "sink caps: %" GST_PTR_FORMAT, sink_caps); if (sink_caps) @@ -194,6 +196,17 @@ stream_format = NULL; } + /* Generate codec data to be able to set profile/level on the caps */ + sample_rate_idx = + gst_codec_utils_aac_get_index_from_sample_rate (aacparse->sample_rate); + if (sample_rate_idx < 0) + goto not_a_known_rate; + codec_data_data = + (aacparse->object_type << 11) | + (sample_rate_idx << 7) | (aacparse->channels << 3); + GST_WRITE_UINT16_BE (codec_data, codec_data_data); + gst_codec_utils_aac_caps_set_level_and_profile (src_caps, codec_data, 2); + s = gst_caps_get_structure (src_caps, 0); if (aacparse->sample_rate > 0) gst_structure_set (s, "rate", G_TYPE_INT, aacparse->sample_rate, NULL); @@ -203,7 +216,7 @@ gst_structure_set (s, "stream-format", G_TYPE_STRING, stream_format, NULL); allowed = gst_pad_get_allowed_caps (GST_BASE_PARSE (aacparse)->srcpad); - if (!gst_caps_can_intersect (src_caps, allowed)) { + if (allowed && !gst_caps_can_intersect (src_caps, allowed)) { GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad, "Caps can not intersect"); if (aacparse->header_type == DSPAAC_HEADER_ADTS) { @@ -212,14 +225,7 @@ gst_caps_set_simple (src_caps, "stream-format", G_TYPE_STRING, "raw", NULL); if (gst_caps_can_intersect (src_caps, allowed)) { - GstMapInfo map; - int idx; - - idx = - gst_codec_utils_aac_get_index_from_sample_rate - (aacparse->sample_rate); - if (idx < 0) - goto not_a_known_rate; + GstBuffer *codec_data_buffer; GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad, "Caps can intersect, we will drop the ADTS layer"); @@ -227,15 +233,10 @@ /* The codec_data data is according to AudioSpecificConfig, ISO/IEC 14496-3, 1.6.2.1 */ - codec_data = gst_buffer_new_and_alloc (2); - gst_buffer_map (codec_data, &map, GST_MAP_WRITE); - codec_data_data = - (aacparse->object_type << 11) | - (idx << 7) | (aacparse->channels << 3); - GST_WRITE_UINT16_BE (map.data, codec_data_data); - gst_buffer_unmap (codec_data, &map); + codec_data_buffer = gst_buffer_new_and_alloc (2); + gst_buffer_fill (codec_data_buffer, 0, codec_data, 2); gst_caps_set_simple (src_caps, "codec_data", GST_TYPE_BUFFER, - codec_data, NULL); + codec_data_buffer, NULL); } } else if (aacparse->header_type == DSPAAC_HEADER_NONE) { GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad, @@ -249,7 +250,8 @@ } } } - gst_caps_unref (allowed); + if (allowed) + gst_caps_unref (allowed); GST_DEBUG_OBJECT (aacparse, "setting src caps: %" GST_PTR_FORMAT, src_caps); @@ -258,7 +260,8 @@ return res; not_a_known_rate: - gst_caps_unref (allowed); + GST_ERROR_OBJECT (aacparse, "Not a known sample rate: %d", + aacparse->sample_rate); gst_caps_unref (src_caps); return FALSE; } @@ -306,6 +309,12 @@ aacparse->sample_rate = gst_codec_utils_aac_get_sample_rate_from_index (sr_idx); aacparse->channels = (map.data[1] & 0x78) >> 3; + if (aacparse->channels == 7) + aacparse->channels = 8; + else if (aacparse->channels == 11) + aacparse->channels = 7; + else if (aacparse->channels == 12 || aacparse->channels == 14) + aacparse->channels = 8; aacparse->header_type = DSPAAC_HEADER_NONE; aacparse->mpegversion = 4; aacparse->frame_samples = (map.data[1] & 4) ? 960 : 1024; @@ -572,9 +581,11 @@ if (!gst_bit_reader_get_bits_uint8 (&br, &u8, 1)) return FALSE; if (u8) { - GST_DEBUG_OBJECT (aacparse, "Frame uses previous config"); + GST_LOG_OBJECT (aacparse, "Frame uses previous config"); if (!aacparse->sample_rate || !aacparse->channels) { - GST_WARNING_OBJECT (aacparse, "No previous config to use"); + GST_DEBUG_OBJECT (aacparse, + "No previous config to use. We'll look for more data."); + return FALSE; } *sample_rate = aacparse->sample_rate; *channels = aacparse->channels; @@ -644,6 +655,7 @@ GST_LOG_OBJECT (aacparse, "More data ignored"); } else { GST_WARNING_OBJECT (aacparse, "Spec says \"TBD\"..."); + return FALSE; } return TRUE; } @@ -757,8 +769,11 @@ *rate = gst_codec_utils_aac_get_sample_rate_from_index (sr_idx); } - if (channels) + if (channels) { *channels = ((data[2] & 0x01) << 2) | ((data[3] & 0xc0) >> 6); + if (*channels == 7) + *channels = 8; + } if (version) *version = (data[1] & 0x08) ? 2 : 4; @@ -807,7 +822,7 @@ for (i = 0; i < avail - 4; i++) { if (((data[i] == 0xff) && ((data[i + 1] & 0xf6) == 0xf0)) || - ((data[0] == 0x56) && ((data[1] & 0xe0) == 0xe0)) || + ((data[i] == 0x56) && ((data[i + 1] & 0xe0) == 0xe0)) || strncmp ((char *) data + i, "ADIF", 4) == 0) { GST_DEBUG_OBJECT (aacparse, "Found signature at offset %u", i); found = TRUE; @@ -856,7 +871,7 @@ if (gst_aac_parse_check_loas_frame (aacparse, data, avail, drain, framesize, &need_data_loas)) { - gint rate, channels; + gint rate = 0, channels = 0; GST_INFO ("LOAS, framesize: %d", *framesize); @@ -864,7 +879,9 @@ if (!gst_aac_parse_read_loas_config (aacparse, data, avail, &rate, &channels, &aacparse->mpegversion)) { - GST_WARNING_OBJECT (aacparse, "Error reading LOAS config"); + /* This is pretty normal when skipping data at the start of + * random stream (MPEG-TS capture for example) */ + GST_LOG_OBJECT (aacparse, "Error reading LOAS config"); return FALSE; } @@ -872,10 +889,10 @@ gst_base_parse_set_frame_rate (GST_BASE_PARSE (aacparse), rate, aacparse->frame_samples, 2, 2); + /* Don't store the sample rate and channels yet - + * this is just format detection. */ GST_DEBUG ("LOAS: samplerate %d, channels %d, objtype %d, version %d", rate, channels, aacparse->object_type, aacparse->mpegversion); - aacparse->sample_rate = rate; - aacparse->channels = channels; } gst_base_parse_set_syncable (GST_BASE_PARSE (aacparse), TRUE); @@ -1044,6 +1061,10 @@ return (guint8) 7U; else return G_MAXUINT8; + + /* FIXME: Add support for configurations 11, 12 and 14 from + * ISO/IEC 14496-3:2009/PDAM 4 based on the actual channel layout + */ } /** @@ -1152,7 +1173,7 @@ adts_headers[6] = 0xFCU; mem = gst_memory_new_wrapped (0, adts_headers, ADTS_HEADERS_LENGTH, 0, - ADTS_HEADERS_LENGTH, NULL, NULL); + ADTS_HEADERS_LENGTH, adts_headers, g_free); gst_buffer_prepend_memory (frame->out_buffer, mem); return TRUE; @@ -1192,7 +1213,7 @@ gboolean lost_sync; GstBuffer *buffer; guint framesize; - gint rate, channels; + gint rate = 0, channels = 0; aacparse = GST_AAC_PARSE (parse); buffer = frame->buffer; @@ -1277,9 +1298,15 @@ frame->overhead = 3; if (!gst_aac_parse_read_loas_config (aacparse, map.data, map.size, &rate, - &channels, NULL)) { - GST_WARNING_OBJECT (aacparse, "Error reading LOAS config"); - } else if (G_UNLIKELY (rate != aacparse->sample_rate + &channels, NULL) || !rate || !channels) { + /* This is pretty normal when skipping data at the start of + * random stream (MPEG-TS capture for example) */ + GST_DEBUG_OBJECT (aacparse, "Error reading LOAS config. Skipping."); + *skipsize = map.size; + goto exit; + } + + if (G_UNLIKELY (rate != aacparse->sample_rate || channels != aacparse->channels)) { aacparse->sample_rate = rate; aacparse->channels = channels; @@ -1348,8 +1375,8 @@ GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (aacparse), - gst_event_new_tag (taglist)); + gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); /* also signals the end of first-frame processing */ aacparse->sent_codec_tag = TRUE; diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstac3parse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstac3parse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstac3parse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstac3parse.c 2015-10-22 08:02:54.000000000 +0000 @@ -219,11 +219,12 @@ static void gst_ac3_parse_init (GstAc3Parse * ac3parse) { - gst_base_parse_set_min_frame_size (GST_BASE_PARSE (ac3parse), 6); + gst_base_parse_set_min_frame_size (GST_BASE_PARSE (ac3parse), 8); gst_ac3_parse_reset (ac3parse); ac3parse->baseparse_chainfunc = GST_BASE_PARSE_SINK_PAD (GST_BASE_PARSE (ac3parse))->chainfunc; GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (ac3parse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (ac3parse)); } static void @@ -478,7 +479,8 @@ goto cleanup; } else { GST_DEBUG_OBJECT (parse, "unexpected bsid %d", bsid); - return FALSE; + ret = FALSE; + goto cleanup; } GST_DEBUG_OBJECT (parse, "unexpected bsid %d", bsid); @@ -509,7 +511,7 @@ gst_buffer_map (buf, &map, GST_MAP_READ); - if (G_UNLIKELY (map.size < 6)) { + if (G_UNLIKELY (map.size < 8)) { *skipsize = 1; goto cleanup; } @@ -601,7 +603,7 @@ if (more || !gst_byte_reader_skip (&reader, frmsiz) || !gst_byte_reader_get_uint16_be (&reader, &word)) { GST_DEBUG_OBJECT (ac3parse, "... but not sufficient data"); - gst_base_parse_set_min_frame_size (parse, framesize + 6); + gst_base_parse_set_min_frame_size (parse, framesize + 8); *skipsize = 0; goto cleanup; } else { @@ -792,8 +794,8 @@ GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (ac3parse), - gst_event_new_tag (taglist)); + gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); /* also signals the end of first-frame processing */ ac3parse->sent_codec_tag = TRUE; diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstamrparse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstamrparse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstamrparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstamrparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -133,6 +133,7 @@ gst_base_parse_set_min_frame_size (GST_BASE_PARSE (amrparse), 62); GST_DEBUG ("initialized"); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (amrparse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (amrparse)); } @@ -433,8 +434,8 @@ GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (amrparse), - gst_event_new_tag (taglist)); + gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); /* also signals the end of first-frame processing */ amrparse->sent_codec_tag = TRUE; diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstamrparse.h gst-plugins-good1.0-1.6.1/gst/audioparsers/gstamrparse.h --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstamrparse.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstamrparse.h 2015-10-22 08:02:54.000000000 +0000 @@ -49,11 +49,6 @@ * @block_size: Pointer to frame size lookup table. * @need_header: Tells whether the MIME header should be read in the beginning. * @wide: Wideband mode. - * @eos: Indicates the EOS situation. Set when EOS event is received. - * @sync: Tells whether the parser is in sync. - * @framecount: Total amount of frames handled. - * @bytecount: Total amount of bytes handled. - * @ts: Timestamp of the current media. * * The opaque GstAacParse data structure. */ diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstdcaparse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstdcaparse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstdcaparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstdcaparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -139,6 +139,7 @@ GST_BASE_PARSE_SINK_PAD (GST_BASE_PARSE (dcaparse))->chainfunc; GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (dcaparse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (dcaparse)); } static void @@ -320,11 +321,10 @@ GstDcaParse *dcaparse = GST_DCA_PARSE (parse); GstBuffer *buf = frame->buffer; GstByteReader r; - gboolean parser_draining; gboolean parser_in_sync; gboolean terminator; guint32 sync = 0; - guint size, rate, chans, num_blocks, samples_per_block, depth; + guint size = 0, rate, chans, num_blocks, samples_per_block, depth; gint block_size; gint endianness; gint off = -1; @@ -378,6 +378,12 @@ dcaparse->last_sync = sync; + /* FIXME: Don't look for a second syncword, there are streams out there + * that consistently contain garbage between every frame so we never ever + * find a second consecutive syncword. + * See https://bugzilla.gnome.org/show_bug.cgi?id=738237 + */ +#if 0 parser_draining = GST_BASE_PARSE_DRAINING (parse); if (!parser_in_sync && !parser_draining) { @@ -408,6 +414,7 @@ goto cleanup; } } +#endif /* found frame */ ret = GST_FLOW_OK; @@ -566,8 +573,8 @@ GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (dcaparse), - gst_event_new_tag (taglist)); + gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); /* also signals the end of first-frame processing */ dcaparse->sent_codec_tag = TRUE; diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstflacparse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstflacparse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstflacparse.c 2014-09-24 07:11:23.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstflacparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -258,6 +258,7 @@ { flacparse->check_frame_checksums = DEFAULT_CHECK_FRAME_CHECKSUMS; GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (flacparse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (flacparse)); } static void @@ -305,6 +306,10 @@ gst_toc_unref (flacparse->toc); flacparse->toc = NULL; } + if (flacparse->seektable) { + gst_buffer_unref (flacparse->seektable); + flacparse->seektable = NULL; + } g_list_foreach (flacparse->headers, (GFunc) gst_mini_object_unref, NULL); g_list_free (flacparse->headers); @@ -362,6 +367,10 @@ gst_toc_unref (flacparse->toc); flacparse->toc = NULL; } + if (flacparse->seektable) { + gst_buffer_unref (flacparse->seektable); + flacparse->seektable = NULL; + } g_list_foreach (flacparse->headers, (GFunc) gst_mini_object_unref, NULL); g_list_free (flacparse->headers); @@ -1132,21 +1141,16 @@ if (gst_byte_reader_get_pos (&reader) + img_len > map.size) goto error; - if (!flacparse->tags) - flacparse->tags = gst_tag_list_new_empty (); - GST_INFO_OBJECT (flacparse, "Got image of %d bytes", img_len); if (img_len > 0) { + if (flacparse->tags == NULL) + flacparse->tags = gst_tag_list_new_empty (); + gst_tag_list_add_id3_image (flacparse->tags, map.data + gst_byte_reader_get_pos (&reader), img_len, img_type); } - if (gst_tag_list_is_empty (flacparse->tags)) { - gst_tag_list_unref (flacparse->tags); - flacparse->tags = NULL; - } - gst_buffer_unmap (buffer, &map); return TRUE; @@ -1163,6 +1167,8 @@ GST_DEBUG_OBJECT (flacparse, "storing seektable"); /* only store for now; * offset of the first frame is needed to get real info */ + if (flacparse->seektable) + gst_buffer_unref (flacparse->seektable); flacparse->seektable = gst_buffer_ref (buffer); return TRUE; @@ -1639,16 +1645,18 @@ /* also cater for oggmux metadata */ if (flacparse->blocking_strategy == 0) { - GST_BUFFER_TIMESTAMP (buffer) = + GST_BUFFER_PTS (buffer) = gst_util_uint64_scale (flacparse->sample_number, flacparse->block_size * GST_SECOND, flacparse->samplerate); + GST_BUFFER_DTS (buffer) = GST_BUFFER_PTS (buffer); GST_BUFFER_OFFSET_END (buffer) = flacparse->sample_number * flacparse->block_size + flacparse->block_size; } else { - GST_BUFFER_TIMESTAMP (buffer) = + GST_BUFFER_PTS (buffer) = gst_util_uint64_scale (flacparse->sample_number, GST_SECOND, flacparse->samplerate); + GST_BUFFER_DTS (buffer) = GST_BUFFER_PTS (buffer); GST_BUFFER_OFFSET_END (buffer) = flacparse->sample_number + flacparse->block_size; } @@ -1656,7 +1664,7 @@ gst_util_uint64_scale (GST_BUFFER_OFFSET_END (buffer), GST_SECOND, flacparse->samplerate); GST_BUFFER_DURATION (buffer) = - GST_BUFFER_OFFSET (buffer) - GST_BUFFER_TIMESTAMP (buffer); + GST_BUFFER_OFFSET (buffer) - GST_BUFFER_PTS (buffer); /* To simplify, we just assume that it's a fixed size header and ignore * subframe headers. The first could lead us to being off by 88 bits and @@ -1693,30 +1701,24 @@ GstFlacParse *flacparse = GST_FLAC_PARSE (parse); if (!flacparse->sent_codec_tag) { - GstTagList *taglist; GstCaps *caps; - taglist = gst_tag_list_new_empty (); + if (flacparse->tags == NULL) + flacparse->tags = gst_tag_list_new_empty (); /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); - gst_pb_utils_add_codec_description_to_tag_list (taglist, + gst_pb_utils_add_codec_description_to_tag_list (flacparse->tags, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (flacparse), - gst_event_new_tag (taglist)); + /* Announce our pending tags */ + gst_base_parse_merge_tags (parse, flacparse->tags, GST_TAG_MERGE_REPLACE); /* also signals the end of first-frame processing */ flacparse->sent_codec_tag = TRUE; } - /* Push tags */ - if (flacparse->tags) { - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (flacparse), - gst_event_new_tag (flacparse->tags)); - flacparse->tags = NULL; - } /* Push toc */ if (flacparse->toc) { gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (flacparse), diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstmpegaudioparse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstmpegaudioparse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstmpegaudioparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstmpegaudioparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -227,6 +227,7 @@ { gst_mpeg_audio_parse_reset (mp3parse); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (mp3parse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (mp3parse)); } static void @@ -434,7 +435,7 @@ if (G_UNLIKELY (!bpf)) { GST_DEBUG_OBJECT (mp3parse, "next header invalid (bitrate 0)"); *valid = FALSE; - return TRUE; + goto cleanup; } offset += bpf; @@ -606,7 +607,7 @@ GstMpegAudioParse *mp3parse = GST_MPEG_AUDIO_PARSE (parse); GstBuffer *buf = frame->buffer; GstByteReader reader; - gint off, bpf; + gint off, bpf = 0; gboolean lost_sync, draining, valid, caps_change; guint32 header; guint bitrate, layer, rate, channels, version, mode, crc; @@ -672,7 +673,7 @@ /* not enough data */ gst_base_parse_set_min_frame_size (parse, valid); *skipsize = 0; - return FALSE; + goto cleanup; } else { GST_DEBUG_OBJECT (parse, "determined freeform size %d", valid); mp3parse->freerate = valid; @@ -684,7 +685,7 @@ if (!bpf) { /* did not come up with valid freeform length, reject after all */ *skipsize = 1; - return FALSE; + goto cleanup; } } @@ -927,7 +928,7 @@ if (table[percent] == i) { mp3parse->xing_seek_table_inverse[i] = percent * 100; - } else if (table[percent] < i && percent < 99) { + } else if (percent < 99 && table[percent]) { gdouble fa, fb, fx; gint a = percent, b = percent + 1; @@ -1320,45 +1321,16 @@ GstBaseParseFrame * frame) { GstMpegAudioParse *mp3parse = GST_MPEG_AUDIO_PARSE (parse); - GstTagList *taglist; - - /* tag sending done late enough in hook to ensure pending events - * have already been sent */ - - if (!mp3parse->sent_codec_tag) { - GstCaps *caps; - - taglist = gst_tag_list_new_empty (); - - /* codec tag */ - caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); - gst_pb_utils_add_codec_description_to_tag_list (taglist, - GST_TAG_AUDIO_CODEC, caps); - gst_caps_unref (caps); - - if (mp3parse->hdr_bitrate > 0 && mp3parse->xing_bitrate == 0 && - mp3parse->vbri_bitrate == 0) { - /* We don't have a VBR bitrate, so post the available bitrate as - * nominal and let baseparse calculate the real bitrate */ - gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_NOMINAL_BITRATE, mp3parse->hdr_bitrate, NULL); - } - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (mp3parse), - gst_event_new_tag (taglist)); - - /* also signals the end of first-frame processing */ - mp3parse->sent_codec_tag = TRUE; - } + GstTagList *taglist = NULL; /* we will create a taglist (if any of the parameters has changed) * to add the tags that changed */ - taglist = NULL; if (mp3parse->last_posted_crc != mp3parse->last_crc) { gboolean using_crc; - if (!taglist) { + if (!taglist) taglist = gst_tag_list_new_empty (); - } + mp3parse->last_posted_crc = mp3parse->last_crc; if (mp3parse->last_posted_crc == CRC_PROTECTED) { using_crc = TRUE; @@ -1370,19 +1342,45 @@ } if (mp3parse->last_posted_channel_mode != mp3parse->last_mode) { - if (!taglist) { + if (!taglist) taglist = gst_tag_list_new_empty (); - } + mp3parse->last_posted_channel_mode = mp3parse->last_mode; gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_MODE, gst_mpeg_audio_channel_mode_get_nick (mp3parse->last_mode), NULL); } - /* if the taglist exists, we need to send it */ + /* tag sending done late enough in hook to ensure pending events + * have already been sent */ + if (taglist != NULL || !mp3parse->sent_codec_tag) { + GstCaps *caps; + + if (taglist == NULL) + taglist = gst_tag_list_new_empty (); + + /* codec tag */ + caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + gst_pb_utils_add_codec_description_to_tag_list (taglist, + GST_TAG_AUDIO_CODEC, caps); + gst_caps_unref (caps); + + if (mp3parse->hdr_bitrate > 0 && mp3parse->xing_bitrate == 0 && + mp3parse->vbri_bitrate == 0) { + /* We don't have a VBR bitrate, so post the available bitrate as + * nominal and let baseparse calculate the real bitrate */ + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, + GST_TAG_NOMINAL_BITRATE, mp3parse->hdr_bitrate, NULL); + } + + /* also signals the end of first-frame processing */ + mp3parse->sent_codec_tag = TRUE; + } + + /* if the taglist exists, we need to update it so it gets sent out */ if (taglist) { - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (mp3parse), - gst_event_new_tag (taglist)); + gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); } /* usual clipping applies */ diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstsbcparse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstsbcparse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstsbcparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstsbcparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -125,6 +125,7 @@ { gst_sbc_parse_reset (sbcparse); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (sbcparse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (sbcparse)); } static gboolean @@ -514,8 +515,8 @@ GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (sbcparse), - gst_event_new_tag (taglist)); + gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); /* also signals the end of first-frame processing */ sbcparse->sent_codec_tag = TRUE; diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/gstwavpackparse.c gst-plugins-good1.0-1.6.1/gst/audioparsers/gstwavpackparse.c --- gst-plugins-good1.0-1.4.3/gst/audioparsers/gstwavpackparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/gstwavpackparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -124,6 +124,7 @@ { gst_wavpack_parse_reset (wvparse); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (wvparse)); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (wvparse)); } static void @@ -543,11 +544,12 @@ GST_LOG_OBJECT (parse, "rate: %u, width: %u, chans: %u", rate, width, chans); - GST_BUFFER_TIMESTAMP (buf) = + GST_BUFFER_PTS (buf) = gst_util_uint64_scale_int (wph.block_index, GST_SECOND, rate); + GST_BUFFER_DTS (buf) = GST_BUFFER_PTS (buf); GST_BUFFER_DURATION (buf) = gst_util_uint64_scale_int (wph.block_index + wph.block_samples, - GST_SECOND, rate) - GST_BUFFER_TIMESTAMP (buf); + GST_SECOND, rate) - GST_BUFFER_PTS (buf); if (G_UNLIKELY (wvparse->sample_rate != rate || wvparse->channels != chans || wvparse->width != width || wvparse->channel_mask != mask)) { @@ -686,8 +688,8 @@ GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); - gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (wavpackparse), - gst_event_new_tag (taglist)); + gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (taglist); /* also signals the end of first-frame processing */ wavpackparse->sent_codec_tag = TRUE; diff -Nru gst-plugins-good1.0-1.4.3/gst/audioparsers/Makefile.in gst-plugins-good1.0-1.6.1/gst/audioparsers/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/audioparsers/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/audioparsers/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/audioparsers -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -235,6 +244,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -367,9 +377,6 @@ 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@ @@ -487,17 +494,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -550,6 +557,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -599,7 +607,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/audioparsers/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/audioparsers/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -972,6 +979,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/gst/auparse/gstauparse.c gst-plugins-good1.0-1.6.1/gst/auparse/gstauparse.c --- gst-plugins-good1.0-1.4.3/gst/auparse/gstauparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/auparse/gstauparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -756,6 +756,7 @@ switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: ret = gst_au_parse_handle_seek (auparse, event); + gst_event_unref (event); break; default: ret = gst_pad_event_default (pad, parent, event); diff -Nru gst-plugins-good1.0-1.4.3/gst/auparse/Makefile.am gst-plugins-good1.0-1.6.1/gst/auparse/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/auparse/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/auparse/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -7,17 +7,3 @@ libgstauparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstauparse.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstauparse -:SHARED libgstauparse \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstauparse_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstauparse_la_CFLAGS) \ - -:LDFLAGS $(libgstauparse_la_LDFLAGS) \ - $(libgstauparse_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/auparse/Makefile.in gst-plugins-good1.0-1.6.1/gst/auparse/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/auparse/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/auparse/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/auparse -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -576,7 +584,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/auparse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/auparse/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -885,20 +892,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstauparse -:SHARED libgstauparse \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstauparse_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstauparse_la_CFLAGS) \ - -:LDFLAGS $(libgstauparse_la_LDFLAGS) \ - $(libgstauparse_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/autodetect/Makefile.am gst-plugins-good1.0-1.6.1/gst/autodetect/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/autodetect/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/autodetect/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -17,17 +17,3 @@ gstautodetect.h \ gstautovideosink.h \ gstautovideosrc.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstautodetect -:SHARED libgstautodetect \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstautodetect_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstautodetect_la_CFLAGS) \ - -:LDFLAGS $(libgstautodetect_la_LDFLAGS) \ - $(libgstautodetect_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/autodetect/Makefile.in gst-plugins-good1.0-1.6.1/gst/autodetect/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/autodetect/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/autodetect/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/autodetect -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -230,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -362,9 +372,6 @@ 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@ @@ -482,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -545,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -592,7 +600,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/autodetect/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/autodetect/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -933,20 +940,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstautodetect -:SHARED libgstautodetect \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstautodetect_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstautodetect_la_CFLAGS) \ - -:LDFLAGS $(libgstautodetect_la_LDFLAGS) \ - $(libgstautodetect_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/avi/gstavidemux.c gst-plugins-good1.0-1.6.1/gst/avi/gstavidemux.c --- gst-plugins-good1.0-1.4.3/gst/avi/gstavidemux.c 2014-09-11 09:57:06.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/avi/gstavidemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -135,7 +135,7 @@ GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); GObjectClass *gobject_class = (GObjectClass *) klass; GstPadTemplate *videosrctempl, *audiosrctempl, *subsrctempl, *subpicsrctempl; - GstCaps *audcaps, *vidcaps, *subcaps, *subpiccaps;; + GstCaps *audcaps, *vidcaps, *subcaps, *subpiccaps; GST_DEBUG_CATEGORY_INIT (avidemux_debug, "avidemux", 0, "Demuxer for AVI streams"); @@ -482,18 +482,11 @@ guint64 xlen = avi->avih->us_frame * avi->avih->tot_frames * GST_USECOND; - if (stream->is_vbr) { - pos = gst_util_uint64_scale (xlen, stream->current_entry, - stream->idx_n); - GST_DEBUG_OBJECT (avi, "VBR perc convert frame %u, time %" - GST_TIME_FORMAT, stream->current_entry, GST_TIME_ARGS (pos)); - } else { - pos = gst_util_uint64_scale (xlen, stream->current_total, - stream->total_bytes); - GST_DEBUG_OBJECT (avi, - "CBR perc convert bytes %u, time %" GST_TIME_FORMAT, - stream->current_total, GST_TIME_ARGS (pos)); - } + pos = gst_util_uint64_scale (xlen, stream->current_total, + stream->total_bytes); + GST_DEBUG_OBJECT (avi, + "CBR perc convert bytes %u, time %" GST_TIME_FORMAT, + stream->current_total, GST_TIME_ARGS (pos)); } else { /* we don't know */ res = FALSE; @@ -673,7 +666,7 @@ } #endif -static guint +static gint gst_avi_demux_index_entry_offset_search (GstAviIndexEntry * entry, guint64 * offset) { @@ -3016,7 +3009,7 @@ gst_avi_demux_peek_tag (GstAviDemux * avi, guint64 offset, guint32 * tag, guint * size) { - GstFlowReturn res = GST_FLOW_OK; + GstFlowReturn res; GstBuffer *buf = NULL; GstMapInfo map; @@ -3472,6 +3465,7 @@ if (avi->globaltags) { gst_tag_list_insert (avi->globaltags, tags, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (tags); } else { avi->globaltags = tags; } @@ -4058,6 +4052,7 @@ if (avi->globaltags) { gst_tag_list_insert (avi->globaltags, tags, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (tags); } else { avi->globaltags = tags; } @@ -4074,6 +4069,7 @@ if (avi->globaltags) { gst_tag_list_insert (avi->globaltags, tags, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (tags); } else { avi->globaltags = tags; } @@ -4187,6 +4183,7 @@ if (avi->globaltags) { gst_tag_list_insert (avi->globaltags, tags, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (tags); } else { avi->globaltags = tags; } @@ -4221,6 +4218,7 @@ if (avi->globaltags) { gst_tag_list_insert (avi->globaltags, tags, GST_TAG_MERGE_REPLACE); + gst_tag_list_unref (tags); } else { avi->globaltags = tags; } @@ -4362,9 +4360,11 @@ } pull_range_failed: { + if (res == GST_FLOW_FLUSHING) + return res; GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL), ("pull_range flow reading header: %s", gst_flow_get_name (res))); - return GST_FLOW_ERROR; + return res; } } @@ -4641,6 +4641,8 @@ GST_DEBUG_OBJECT (avi, "marking DISCONT"); avi->stream[i].discont = TRUE; } + /* likewise for the whole new segment */ + gst_flow_combiner_reset (avi->flowcombiner); GST_PAD_STREAM_UNLOCK (avi->sinkpad); return TRUE; @@ -5005,7 +5007,7 @@ { GST_LOG_OBJECT (avi, "Stream %s:%s flow return: %s", GST_DEBUG_PAD_NAME (stream->pad), gst_flow_get_name (ret)); - ret = gst_flow_combiner_update_flow (avi->flowcombiner, ret); + ret = gst_flow_combiner_update_pad_flow (avi->flowcombiner, stream->pad, ret); GST_LOG_OBJECT (avi, "combined to return %s", gst_flow_get_name (ret)); return ret; @@ -5761,8 +5763,10 @@ GST_OBJECT_UNLOCK (avi); /* calculate and perform seek */ - if (!avi_demux_handle_seek_push (avi, avi->sinkpad, event)) + if (!avi_demux_handle_seek_push (avi, avi->sinkpad, event)) { + gst_event_unref (event); goto seek_failed; + } gst_event_unref (event); avi->state = GST_AVI_DEMUX_MOVI; diff -Nru gst-plugins-good1.0-1.4.3/gst/avi/gstavimux.c gst-plugins-good1.0-1.6.1/gst/avi/gstavimux.c --- gst-plugins-good1.0-1.4.3/gst/avi/gstavimux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/avi/gstavimux.c 2015-10-22 08:02:54.000000000 +0000 @@ -76,8 +76,8 @@ enum { - ARG_0, - ARG_BIGFILE + PROP_0, + PROP_BIGFILE }; #define DEFAULT_BIGFILE TRUE @@ -242,7 +242,7 @@ gobject_class->set_property = gst_avi_mux_set_property; gobject_class->finalize = gst_avi_mux_finalize; - g_object_class_install_property (gobject_class, ARG_BIGFILE, + g_object_class_install_property (gobject_class, PROP_BIGFILE, g_param_spec_boolean ("bigfile", "Bigfile Support (>2GB)", "Support for openDML-2.0 (big) AVI files", DEFAULT_BIGFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -262,7 +262,7 @@ gst_element_class_set_static_metadata (gstelement_class, "Avi muxer", "Codec/Muxer", "Muxes audio and video into an avi stream", - "GStreamer maintainers "); + "GStreamer maintainers "); } /* reset pad to initial state @@ -997,8 +997,6 @@ newpad = gst_pad_new_from_template (templ, pad_name); - g_free (name); - avipad->collect = gst_collect_pads_add_pad (avimux->collect, newpad, sizeof (GstAviCollectData), NULL, TRUE); ((GstAviCollectData *) (avipad->collect))->avipad = avipad; @@ -1006,6 +1004,8 @@ if (!gst_element_add_pad (element, newpad)) goto pad_add_failed; + g_free (name); + GST_DEBUG_OBJECT (newpad, "Added new request pad"); return newpad; @@ -1034,6 +1034,7 @@ pad_add_failed: { GST_WARNING_OBJECT (avimux, "Adding the new pad '%s' failed", pad_name); + g_free (name); gst_object_unref (newpad); return NULL; } @@ -1076,16 +1077,15 @@ gst_avi_mux_start_chunk (GstByteWriter * bw, const gchar * tag, guint32 fourcc) { guint chunk_offset; - gboolean hdl = TRUE; if (tag) - hdl &= gst_byte_writer_put_data (bw, (const guint8 *) tag, 4); + gst_byte_writer_put_data (bw, (const guint8 *) tag, 4); else - hdl &= gst_byte_writer_put_uint32_le (bw, fourcc); + gst_byte_writer_put_uint32_le (bw, fourcc); chunk_offset = gst_byte_writer_get_pos (bw); /* real chunk size comes later */ - hdl &= gst_byte_writer_put_uint32_le (bw, 0); + gst_byte_writer_put_uint32_le (bw, 0); return chunk_offset; } @@ -1094,17 +1094,16 @@ gst_avi_mux_end_chunk (GstByteWriter * bw, guint chunk_offset) { guint size; - gboolean hdl = TRUE; size = gst_byte_writer_get_pos (bw); gst_byte_writer_set_pos (bw, chunk_offset); - hdl &= gst_byte_writer_put_uint32_le (bw, size - chunk_offset - 4); + gst_byte_writer_put_uint32_le (bw, size - chunk_offset - 4); gst_byte_writer_set_pos (bw, size); /* arrange for even padding */ if (size & 1) - hdl &= gst_byte_writer_put_uint8 (bw, 0); + gst_byte_writer_put_uint8 (bw, 0); } /* maybe some of these functions should be moved to riff.h? */ @@ -2218,7 +2217,7 @@ avimux = GST_AVI_MUX (object); switch (prop_id) { - case ARG_BIGFILE: + case PROP_BIGFILE: g_value_set_boolean (value, avimux->enable_large_avi); break; default: @@ -2236,7 +2235,7 @@ avimux = GST_AVI_MUX (object); switch (prop_id) { - case ARG_BIGFILE: + case PROP_BIGFILE: avimux->enable_large_avi = g_value_get_boolean (value); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/avi/Makefile.am gst-plugins-good1.0-1.6.1/gst/avi/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/avi/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/avi/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -26,17 +26,3 @@ libgstavi_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) EXTRA_DIST = README - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstavi -:SHARED libgstavi \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstavi_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstavi_la_CFLAGS) \ - -:LDFLAGS $(libgstavi_la_LDFLAGS) \ - $(libgstavi_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/avi/Makefile.in gst-plugins-good1.0-1.6.1/gst/avi/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/avi/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/avi/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/avi -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -597,7 +605,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/avi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/avi/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -930,20 +937,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstavi -:SHARED libgstavi \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstavi_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstavi_la_CFLAGS) \ - -:LDFLAGS $(libgstavi_la_LDFLAGS) \ - $(libgstavi_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/cutter/gstcutter.c gst-plugins-good1.0-1.6.1/gst/cutter/gstcutter.c --- gst-plugins-good1.0-1.4.3/gst/cutter/gstcutter.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/cutter/gstcutter.c 2015-10-22 08:02:54.000000000 +0000 @@ -97,6 +97,9 @@ #define gst_cutter_parent_class parent_class G_DEFINE_TYPE (GstCutter, gst_cutter, GST_TYPE_ELEMENT); +static GstStateChangeReturn +gst_cutter_change_state (GstElement * element, GstStateChange transition); + static void gst_cutter_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_cutter_get_property (GObject * object, guint prop_id, @@ -152,6 +155,7 @@ "Filter/Editor/Audio", "Audio Cutter to split audio into non-silent bits", "Thomas Vander Stichele "); + element_class->change_state = gst_cutter_change_state; } static void @@ -236,6 +240,25 @@ return gst_pad_set_caps (filter->srcpad, caps); } +static GstStateChangeReturn +gst_cutter_change_state (GstElement * element, GstStateChange transition) +{ + GstStateChangeReturn ret; + GstCutter *filter = GST_CUTTER (element); + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + g_list_free_full (filter->pre_buffer, (GDestroyNotify) gst_buffer_unref); + filter->pre_buffer = NULL; + break; + default: + break; + } + return ret; +} + static gboolean gst_cutter_event (GstPad * pad, GstObject * parent, GstEvent * event) { diff -Nru gst-plugins-good1.0-1.4.3/gst/cutter/Makefile.am gst-plugins-good1.0-1.6.1/gst/cutter/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/cutter/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/cutter/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -9,17 +9,3 @@ noinst_HEADERS = gstcutter.h filter.func EXTRA_DIST = README - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstcutter -:SHARED libgstcutter \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstcutter_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcutter_la_CFLAGS) \ - -:LDFLAGS $(libgstcutter_la_LDFLAGS) \ - $(libgstcutter_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/cutter/Makefile.in gst-plugins-good1.0-1.6.1/gst/cutter/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/cutter/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/cutter/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/cutter -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -577,7 +585,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/cutter/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/cutter/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -886,20 +893,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstcutter -:SHARED libgstcutter \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstcutter_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcutter_la_CFLAGS) \ - -:LDFLAGS $(libgstcutter_la_LDFLAGS) \ - $(libgstcutter_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/breakmydata.c gst-plugins-good1.0-1.6.1/gst/debugutils/breakmydata.c --- gst-plugins-good1.0-1.4.3/gst/debugutils/breakmydata.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/breakmydata.c 2015-10-22 08:02:54.000000000 +0000 @@ -49,11 +49,11 @@ enum { - ARG_0, - ARG_SEED, - ARG_SET_TO, - ARG_SKIP, - ARG_PROBABILITY + PROP_0, + PROP_SEED, + PROP_SET_TO, + PROP_SKIP, + PROP_PROBABILITY }; typedef struct _GstBreakMyData GstBreakMyData; @@ -118,22 +118,22 @@ gobject_class->set_property = gst_break_my_data_set_property; gobject_class->get_property = gst_break_my_data_get_property; - g_object_class_install_property (gobject_class, ARG_SEED, + g_object_class_install_property (gobject_class, PROP_SEED, g_param_spec_uint ("seed", "seed", "seed for randomness (initialized when going from READY to PAUSED)", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_SET_TO, + g_object_class_install_property (gobject_class, PROP_SET_TO, g_param_spec_int ("set-to", "set-to", "set changed bytes to this value (-1 means random value", -1, G_MAXUINT8, -1, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_SKIP, + g_object_class_install_property (gobject_class, PROP_SKIP, g_param_spec_uint ("skip", "skip", "amount of bytes skipped at the beginning of stream", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_PROBABILITY, + g_object_class_install_property (gobject_class, PROP_PROBABILITY, g_param_spec_double ("probability", "probability", "probability for each byte in the buffer to be changed", 0.0, 1.0, 0.0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); @@ -168,16 +168,16 @@ GST_OBJECT_LOCK (bmd); switch (prop_id) { - case ARG_SEED: + case PROP_SEED: bmd->seed = g_value_get_uint (value); break; - case ARG_SET_TO: + case PROP_SET_TO: bmd->set = g_value_get_int (value); break; - case ARG_SKIP: + case PROP_SKIP: bmd->skip = g_value_get_uint (value); break; - case ARG_PROBABILITY: + case PROP_PROBABILITY: bmd->probability = g_value_get_double (value); break; default: @@ -197,16 +197,16 @@ GST_OBJECT_LOCK (bmd); switch (prop_id) { - case ARG_SEED: + case PROP_SEED: g_value_set_uint (value, bmd->seed); break; - case ARG_SET_TO: + case PROP_SET_TO: g_value_set_int (value, bmd->set); break; - case ARG_SKIP: + case PROP_SKIP: g_value_set_uint (value, bmd->skip); break; - case ARG_PROBABILITY: + case PROP_PROBABILITY: g_value_set_double (value, bmd->probability); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/cpureport.c gst-plugins-good1.0-1.6.1/gst/debugutils/cpureport.c --- gst-plugins-good1.0-1.4.3/gst/debugutils/cpureport.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/cpureport.c 2015-10-22 08:02:54.000000000 +0000 @@ -31,7 +31,7 @@ enum { - ARG_0, + PROP_0, }; GstStaticPadTemplate cpu_report_src_template = GST_STATIC_PAD_TEMPLATE ("src", diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/gstnavseek.c gst-plugins-good1.0-1.6.1/gst/debugutils/gstnavseek.c --- gst-plugins-good1.0-1.4.3/gst/debugutils/gstnavseek.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/gstnavseek.c 2015-10-22 08:02:54.000000000 +0000 @@ -33,8 +33,8 @@ enum { - ARG_0, - ARG_SEEKOFFSET + PROP_0, + PROP_SEEKOFFSET }; GstStaticPadTemplate navseek_src_template = GST_STATIC_PAD_TEMPLATE ("src", @@ -80,7 +80,7 @@ gobject_class->get_property = gst_navseek_get_property; g_object_class_install_property (gobject_class, - ARG_SEEKOFFSET, g_param_spec_double ("seek-offset", "Seek Offset", + PROP_SEEKOFFSET, g_param_spec_double ("seek-offset", "Seek Offset", "Time in seconds to seek by", 0.0, G_MAXDOUBLE, 5.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -302,7 +302,7 @@ GstNavSeek *navseek = GST_NAVSEEK (object); switch (prop_id) { - case ARG_SEEKOFFSET: + case PROP_SEEKOFFSET: GST_OBJECT_LOCK (navseek); navseek->seek_offset = g_value_get_double (value); GST_OBJECT_UNLOCK (navseek); @@ -320,7 +320,7 @@ GstNavSeek *navseek = GST_NAVSEEK (object); switch (prop_id) { - case ARG_SEEKOFFSET: + case PROP_SEEKOFFSET: GST_OBJECT_LOCK (navseek); g_value_set_double (value, navseek->seek_offset); GST_OBJECT_UNLOCK (navseek); diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/gstpushfilesrc.c gst-plugins-good1.0-1.6.1/gst/debugutils/gstpushfilesrc.c --- gst-plugins-good1.0-1.4.3/gst/debugutils/gstpushfilesrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/gstpushfilesrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -48,6 +48,30 @@ GST_DEBUG_CATEGORY_STATIC (pushfilesrc_debug); #define GST_CAT_DEFAULT pushfilesrc_debug +enum +{ + PROP_0, + PROP_LOCATION, + PROP_TIME_SEGMENT, + PROP_STREAM_TIME, + PROP_START_TIME, + PROP_INITIAL_TIMESTAMP, + PROP_RATE, + PROP_APPLIED_RATE +}; + +#define DEFAULT_TIME_SEGMENT FALSE +#define DEFAULT_STREAM_TIME 0 +#define DEFAULT_START_TIME 0 +#define DEFAULT_INITIAL_TIMESTAMP GST_CLOCK_TIME_NONE +#define DEFAULT_RATE 1.0 +#define DEFAULT_APPLIED_RATE 1.0 + +static void gst_push_file_src_set_property (GObject * object, + guint prop_id, const GValue * value, GParamSpec * pspec); +static void gst_push_file_src_get_property (GObject * object, + guint prop_id, GValue * value, GParamSpec * pspec); + static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -91,6 +115,42 @@ "pushfilesrc element"); gobject_class->dispose = gst_push_file_src_dispose; + gobject_class->set_property = gst_push_file_src_set_property; + gobject_class->get_property = gst_push_file_src_get_property; + + g_object_class_install_property (gobject_class, PROP_LOCATION, + g_param_spec_string ("location", "File Location", + "Location of the file to read", NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + GST_PARAM_MUTABLE_READY)); + + g_object_class_install_property (gobject_class, PROP_TIME_SEGMENT, + g_param_spec_boolean ("time-segment", "Time Segment", + "Emit TIME SEGMENTS", DEFAULT_TIME_SEGMENT, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, PROP_STREAM_TIME, + g_param_spec_int64 ("stream-time", "Stream Time", + "Initial Stream Time (if time-segment TRUE)", 0, G_MAXINT64, + DEFAULT_STREAM_TIME, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, PROP_START_TIME, + g_param_spec_int64 ("start-time", "Start Time", + "Initial Start Time (if time-segment TRUE)", 0, G_MAXINT64, + DEFAULT_START_TIME, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, PROP_INITIAL_TIMESTAMP, + g_param_spec_uint64 ("initial-timestamp", "Initial Timestamp", + "Initial Buffer Timestamp (if time-segment TRUE)", 0, G_MAXUINT64, + DEFAULT_INITIAL_TIMESTAMP, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, PROP_RATE, + g_param_spec_double ("rate", "Rate", "Rate to use in TIME SEGMENT", + G_MINDOUBLE, G_MAXDOUBLE, DEFAULT_RATE, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, PROP_APPLIED_RATE, + g_param_spec_double ("applied-rate", "Applied Rate", + "Applied rate to use in TIME SEGMENT", G_MINDOUBLE, G_MAXDOUBLE, + DEFAULT_APPLIED_RATE, G_PARAM_READWRITE)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&srctemplate)); @@ -101,15 +161,157 @@ "Tim-Philipp Müller "); } +static void +gst_push_file_src_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstPushFileSrc *src = (GstPushFileSrc *) object; + + switch (prop_id) { + case PROP_LOCATION: + g_object_set_property (G_OBJECT (src->filesrc), "location", value); + break; + case PROP_TIME_SEGMENT: + src->time_segment = g_value_get_boolean (value); + break; + case PROP_STREAM_TIME: + src->stream_time = g_value_get_int64 (value); + break; + case PROP_START_TIME: + src->start_time = g_value_get_int64 (value); + break; + case PROP_INITIAL_TIMESTAMP: + src->initial_timestamp = g_value_get_uint64 (value); + break; + case PROP_RATE: + src->rate = g_value_get_double (value); + break; + case PROP_APPLIED_RATE: + src->applied_rate = g_value_get_double (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_push_file_src_get_property (GObject * object, guint prop_id, GValue * value, + GParamSpec * pspec) +{ + GstPushFileSrc *src = (GstPushFileSrc *) object; + + switch (prop_id) { + case PROP_LOCATION: + g_object_get_property (G_OBJECT (src->filesrc), "location", value); + break; + case PROP_TIME_SEGMENT: + g_value_set_boolean (value, src->time_segment); + break; + case PROP_STREAM_TIME: + g_value_set_int64 (value, src->stream_time); + break; + case PROP_START_TIME: + g_value_set_int64 (value, src->start_time); + break; + case PROP_INITIAL_TIMESTAMP: + g_value_set_uint64 (value, src->initial_timestamp); + break; + case PROP_RATE: + g_value_set_double (value, src->rate); + break; + case PROP_APPLIED_RATE: + g_value_set_double (value, src->applied_rate); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static GstPadProbeReturn +gst_push_file_src_ghostpad_buffer_probe (GstPad * pad, GstPadProbeInfo * info, + GstPushFileSrc * src) +{ + GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info); + + if (src->time_segment && !src->seen_first_buffer) { + GST_BUFFER_TIMESTAMP (buffer) = src->initial_timestamp; + src->seen_first_buffer = TRUE; + } + return GST_PAD_PROBE_OK; +} + +static GstPadProbeReturn +gst_push_file_src_ghostpad_event_probe (GstPad * pad, GstPadProbeInfo * info, + GstPushFileSrc * src) +{ + GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEGMENT: + { + if (src->time_segment) { + GstSegment segment; + GstEvent *replacement; + GST_DEBUG_OBJECT (src, "Replacing outgoing segment with TIME SEGMENT"); + gst_segment_init (&segment, GST_FORMAT_TIME); + segment.start = src->start_time; + segment.time = src->stream_time; + segment.rate = src->rate; + segment.applied_rate = src->applied_rate; + replacement = gst_event_new_segment (&segment); + gst_event_unref (event); + GST_PAD_PROBE_INFO_DATA (info) = replacement; + } + } + default: + break; + } + return GST_PAD_PROBE_OK; +} + +static gboolean +gst_push_file_src_ghostpad_event (GstPad * pad, GstObject * parent, + GstEvent * event) +{ + GstPushFileSrc *src = (GstPushFileSrc *) parent; + gboolean ret; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEEK: + if (src->time_segment) { + /* When working in time we don't allow seeks */ + GST_DEBUG_OBJECT (src, "Refusing seek event in TIME mode"); + gst_event_unref (event); + ret = FALSE; + break; + } + /* PASSTHROUGH */ + default: + ret = gst_pad_event_default (pad, parent, event); + break; + } + + return ret; +} + static gboolean gst_push_file_src_ghostpad_query (GstPad * pad, GstObject * parent, GstQuery * query) { + GstPushFileSrc *src = (GstPushFileSrc *) parent; gboolean res; switch (GST_QUERY_TYPE (query)) { case GST_QUERY_SCHEDULING: - gst_query_set_scheduling (query, GST_SCHEDULING_FLAG_SEEKABLE, 1, -1, 0); + /* When working in time we don't allow seeks */ + if (src->time_segment) + gst_query_set_scheduling (query, GST_SCHEDULING_FLAG_SEQUENTIAL, 1, -1, + 0); + else + gst_query_set_scheduling (query, GST_SCHEDULING_FLAG_SEEKABLE, 1, -1, + 0); gst_query_add_scheduling_mode (query, GST_PAD_MODE_PUSH); res = TRUE; break; @@ -123,6 +325,14 @@ static void gst_push_file_src_init (GstPushFileSrc * src) { + src->time_segment = DEFAULT_TIME_SEGMENT; + src->stream_time = DEFAULT_STREAM_TIME; + src->start_time = DEFAULT_START_TIME; + src->initial_timestamp = DEFAULT_INITIAL_TIMESTAMP; + src->rate = DEFAULT_RATE; + src->applied_rate = DEFAULT_APPLIED_RATE; + src->seen_first_buffer = FALSE; + src->filesrc = gst_element_factory_make ("filesrc", "real-filesrc"); if (src->filesrc) { GstPad *pad; @@ -135,6 +345,15 @@ * this and watch core bugginess (some pad stays in flushing state) */ gst_pad_set_query_function (src->srcpad, GST_DEBUG_FUNCPTR (gst_push_file_src_ghostpad_query)); + gst_pad_set_event_function (src->srcpad, + GST_DEBUG_FUNCPTR (gst_push_file_src_ghostpad_event)); + /* Add outgoing event probe to replace segment and buffer timestamp */ + gst_pad_add_probe (src->srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, + (GstPadProbeCallback) gst_push_file_src_ghostpad_event_probe, + src, NULL); + gst_pad_add_probe (src->srcpad, GST_PAD_PROBE_TYPE_BUFFER, + (GstPadProbeCallback) gst_push_file_src_ghostpad_buffer_probe, + src, NULL); gst_element_add_pad (GST_ELEMENT (src), src->srcpad); gst_object_unref (pad); } @@ -165,7 +384,7 @@ if (src->filesrc == NULL) return NULL; - fileuri = gst_uri_handler_get_uri (GST_URI_HANDLER (src->filesrc));; + fileuri = gst_uri_handler_get_uri (GST_URI_HANDLER (src->filesrc)); if (fileuri == NULL) return NULL; pushfileuri = g_strconcat ("push", fileuri, NULL); diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/gstpushfilesrc.h gst-plugins-good1.0-1.6.1/gst/debugutils/gstpushfilesrc.h --- gst-plugins-good1.0-1.4.3/gst/debugutils/gstpushfilesrc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/gstpushfilesrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -43,6 +43,14 @@ /*< private > */ GstElement *filesrc; GstPad *srcpad; + + gboolean time_segment; + gboolean seen_first_buffer; + gint64 stream_time; + gint64 start_time; + guint64 initial_timestamp; + gdouble rate; + gdouble applied_rate; }; struct _GstPushFileSrcClass diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/Makefile.am gst-plugins-good1.0-1.6.1/gst/debugutils/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/debugutils/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -39,17 +39,3 @@ libgstdebug_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) libgstdebug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdebug_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstdebug -:SHARED libgstdebug \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstdebug_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdebug_la_CFLAGS) \ - -:LDFLAGS $(libgstdebug_la_LDFLAGS) \ - $(libgstdebug_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/Makefile.in gst-plugins-good1.0-1.6.1/gst/debugutils/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/debugutils/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/debugutils -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -243,6 +252,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -375,9 +385,6 @@ 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@ @@ -495,17 +502,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -558,6 +565,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -626,7 +634,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/debugutils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/debugutils/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1026,20 +1033,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstdebug -:SHARED libgstdebug \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstdebug_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdebug_la_CFLAGS) \ - -:LDFLAGS $(libgstdebug_la_LDFLAGS) \ - $(libgstdebug_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/progressreport.c gst-plugins-good1.0-1.6.1/gst/debugutils/progressreport.c --- gst-plugins-good1.0-1.4.3/gst/debugutils/progressreport.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/progressreport.c 2015-10-22 08:02:54.000000000 +0000 @@ -78,11 +78,11 @@ enum { - ARG_0, - ARG_UPDATE_FREQ, - ARG_SILENT, - ARG_DO_QUERY, - ARG_FORMAT + PROP_0, + PROP_UPDATE_FREQ, + PROP_SILENT, + PROP_DO_QUERY, + PROP_FORMAT }; GstStaticPadTemplate progress_report_src_template = @@ -145,23 +145,23 @@ gobject_class->get_property = gst_progress_report_get_property; g_object_class_install_property (gobject_class, - ARG_UPDATE_FREQ, g_param_spec_int ("update-freq", "Update Frequency", + PROP_UPDATE_FREQ, g_param_spec_int ("update-freq", "Update Frequency", "Number of seconds between reports when data is flowing", 1, G_MAXINT, DEFAULT_UPDATE_FREQ, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, - ARG_SILENT, g_param_spec_boolean ("silent", + PROP_SILENT, g_param_spec_boolean ("silent", "Do not print output to stdout", "Do not print output to stdout", DEFAULT_SILENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, - ARG_DO_QUERY, g_param_spec_boolean ("do-query", + PROP_DO_QUERY, g_param_spec_boolean ("do-query", "Use a query instead of buffer metadata to determine stream position", "Use a query instead of buffer metadata to determine stream position", DEFAULT_DO_QUERY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, - ARG_FORMAT, g_param_spec_string ("format", "format", + PROP_FORMAT, g_param_spec_string ("format", "format", "Format to use for the querying", DEFAULT_FORMAT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -452,22 +452,22 @@ filter = GST_PROGRESS_REPORT (object); switch (prop_id) { - case ARG_UPDATE_FREQ: + case PROP_UPDATE_FREQ: GST_OBJECT_LOCK (filter); filter->update_freq = g_value_get_int (value); GST_OBJECT_UNLOCK (filter); break; - case ARG_SILENT: + case PROP_SILENT: GST_OBJECT_LOCK (filter); filter->silent = g_value_get_boolean (value); GST_OBJECT_UNLOCK (filter); break; - case ARG_DO_QUERY: + case PROP_DO_QUERY: GST_OBJECT_LOCK (filter); filter->do_query = g_value_get_boolean (value); GST_OBJECT_UNLOCK (filter); break; - case ARG_FORMAT: + case PROP_FORMAT: GST_OBJECT_LOCK (filter); g_free (filter->format); filter->format = g_value_dup_string (value); @@ -489,22 +489,22 @@ filter = GST_PROGRESS_REPORT (object); switch (prop_id) { - case ARG_UPDATE_FREQ: + case PROP_UPDATE_FREQ: GST_OBJECT_LOCK (filter); g_value_set_int (value, filter->update_freq); GST_OBJECT_UNLOCK (filter); break; - case ARG_SILENT: + case PROP_SILENT: GST_OBJECT_LOCK (filter); g_value_set_boolean (value, filter->silent); GST_OBJECT_UNLOCK (filter); break; - case ARG_DO_QUERY: + case PROP_DO_QUERY: GST_OBJECT_LOCK (filter); g_value_set_boolean (value, filter->do_query); GST_OBJECT_UNLOCK (filter); break; - case ARG_FORMAT: + case PROP_FORMAT: GST_OBJECT_LOCK (filter); g_value_set_string (value, filter->format); GST_OBJECT_UNLOCK (filter); diff -Nru gst-plugins-good1.0-1.4.3/gst/debugutils/rndbuffersize.c gst-plugins-good1.0-1.6.1/gst/debugutils/rndbuffersize.c --- gst-plugins-good1.0-1.4.3/gst/debugutils/rndbuffersize.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/debugutils/rndbuffersize.c 2015-10-22 08:02:54.000000000 +0000 @@ -65,9 +65,9 @@ enum { - ARG_SEED = 1, - ARG_MINIMUM, - ARG_MAXIMUM + PROP_SEED = 1, + PROP_MINIMUM, + PROP_MAXIMUM }; #define DEFAULT_SEED 0 @@ -132,16 +132,16 @@ gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rnd_buffer_size_change_state); - g_object_class_install_property (gobject_class, ARG_SEED, + g_object_class_install_property (gobject_class, PROP_SEED, g_param_spec_uint ("seed", "random number seed", "seed for randomness (initialized when going from READY to PAUSED)", 0, G_MAXUINT32, DEFAULT_SEED, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_MINIMUM, + g_object_class_install_property (gobject_class, PROP_MINIMUM, g_param_spec_int ("min", "mininum", "mininum buffer size", 0, G_MAXINT32, DEFAULT_MIN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_MAXIMUM, + g_object_class_install_property (gobject_class, PROP_MAXIMUM, g_param_spec_int ("max", "maximum", "maximum buffer size", 1, G_MAXINT32, DEFAULT_MAX, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); @@ -195,13 +195,13 @@ GstRndBufferSize *self = GST_RND_BUFFER_SIZE (object); switch (prop_id) { - case ARG_SEED: + case PROP_SEED: self->seed = g_value_get_uint (value); break; - case ARG_MINIMUM: + case PROP_MINIMUM: self->min = g_value_get_int (value); break; - case ARG_MAXIMUM: + case PROP_MAXIMUM: self->max = g_value_get_int (value); break; default: @@ -218,13 +218,13 @@ GstRndBufferSize *self = GST_RND_BUFFER_SIZE (object); switch (prop_id) { - case ARG_SEED: + case PROP_SEED: g_value_set_uint (value, self->seed); break; - case ARG_MINIMUM: + case PROP_MINIMUM: g_value_set_int (value, self->min); break; - case ARG_MAXIMUM: + case PROP_MAXIMUM: g_value_set_int (value, self->max); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/deinterlace/gstdeinterlace.c gst-plugins-good1.0-1.6.1/gst/deinterlace/gstdeinterlace.c --- gst-plugins-good1.0-1.4.3/gst/deinterlace/gstdeinterlace.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/deinterlace/gstdeinterlace.c 2015-10-22 08:02:54.000000000 +0000 @@ -29,7 +29,7 @@ * * Example launch line * |[ - * gst-launch-1.0 -v filesrc location=/path/to/file ! decodebin2 ! videoconvert ! deinterlace ! videoconvert ! autovideosink + * gst-launch-1.0 -v filesrc location=/path/to/file ! decodebin ! videoconvert ! deinterlace ! videoconvert ! autovideosink * ]| This pipeline deinterlaces a video file with the default deinterlacing options. * */ @@ -75,8 +75,7 @@ PROP_FIELD_LAYOUT, PROP_LOCKING, PROP_IGNORE_OBSCURE, - PROP_DROP_ORPHANS, - PROP_LAST + PROP_DROP_ORPHANS }; #define GST_DEINTERLACE_BUFFER_STATE_P (1<<0) @@ -1501,9 +1500,7 @@ restart: ret = GST_FLOW_OK; - fields_required = 0; hl_no_lock = FALSE; - same_buffer = FALSE; flush_one = FALSE; self->need_more = FALSE; phase = self->pattern_phase; @@ -1998,11 +1995,10 @@ gst_deinterlace_get_latency (GstDeinterlace * self) { if (self->locking == GST_DEINTERLACE_LOCKING_AUTO) { - gboolean res; GstQuery *query; query = gst_query_new_latency (); - if ((res = gst_pad_peer_query (self->sinkpad, query))) { + if ((gst_pad_peer_query (self->sinkpad, query))) { gboolean is_live; /* if upstream is live, we use low-latency passive locking mode * else high-latency active locking mode */ @@ -2138,6 +2134,8 @@ gboolean half; GstVideoInterlaceMode interlacing_mode; + gboolean filter_interlaced = FALSE; + otherpad = (pad == self->srcpad) ? self->sinkpad : self->srcpad; half = pad != self->srcpad; @@ -2145,9 +2143,27 @@ peercaps = gst_pad_peer_query_caps (otherpad, NULL); interlacing_mode = GST_VIDEO_INFO_INTERLACE_MODE (&self->vinfo); + if (interlacing_mode == GST_VIDEO_INTERLACE_MODE_PROGRESSIVE && filter) { + guint i, caps_size; + + filter_interlaced = TRUE; + caps_size = gst_caps_get_size (filter); + for (i = 0; i < caps_size; i++) { + const gchar *interlace_mode; + GstStructure *structure = gst_caps_get_structure (filter, i); + + interlace_mode = gst_structure_get_string (structure, "interlace-mode"); + + if (!interlace_mode || g_strcmp0 (interlace_mode, "progressive") == 0) { + filter_interlaced = FALSE; + } + } + } + if (self->mode == GST_DEINTERLACE_MODE_INTERLACED || (self->mode == GST_DEINTERLACE_MODE_AUTO && - interlacing_mode != GST_VIDEO_INTERLACE_MODE_PROGRESSIVE)) { + (interlacing_mode != GST_VIDEO_INTERLACE_MODE_PROGRESSIVE || + filter_interlaced))) { gst_caps_unref (ourcaps); ourcaps = gst_caps_from_string (DEINTERLACE_CAPS); } diff -Nru gst-plugins-good1.0-1.4.3/gst/deinterlace/Makefile.am gst-plugins-good1.0-1.6.1/gst/deinterlace/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/deinterlace/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/deinterlace/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -51,18 +51,3 @@ tvtime/tomsmocomp/TomsMoCompAll.inc \ tvtime/tomsmocomp/tomsmocompmacros.h \ tvtime/tomsmocomp/WierdBob.inc - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstdeinterlace -:SHARED libgstdeinterlace \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstdeinterlace_la_SOURCES) \ - $(nodist_libgstdeinterlace_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdeinterlace_la_CFLAGS) \ - -:LDFLAGS $(libgstdeinterlace_la_LDFLAGS) \ - $(libgstdeinterlace_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/deinterlace/Makefile.in gst-plugins-good1.0-1.6.1/gst/deinterlace/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/deinterlace/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/deinterlace/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -38,7 +38,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -102,8 +112,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/orc.mak $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/depcomp $(noinst_HEADERS) subdir = gst/deinterlace ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -126,7 +134,6 @@ $(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 \ @@ -141,6 +148,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -266,6 +275,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \ + $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -398,9 +409,6 @@ 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@ @@ -518,17 +526,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -581,6 +589,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -671,7 +680,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/deinterlace/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/deinterlace/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -680,7 +688,7 @@ 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/orc.mak: +$(top_srcdir)/common/orc.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1115,6 +1123,8 @@ tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + orc-update: tmp-orc.c $(ORC_SOURCE).h $(top_srcdir)/common/gst-indent tmp-orc.c @@ -1152,21 +1162,6 @@ cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstdeinterlace -:SHARED libgstdeinterlace \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstdeinterlace_la_SOURCES) \ - $(nodist_libgstdeinterlace_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdeinterlace_la_CFLAGS) \ - -:LDFLAGS $(libgstdeinterlace_la_LDFLAGS) \ - $(libgstdeinterlace_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: diff -Nru gst-plugins-good1.0-1.4.3/gst/deinterlace/tvtime-dist.c gst-plugins-good1.0-1.6.1/gst/deinterlace/tvtime-dist.c --- gst-plugins-good1.0-1.4.3/gst/deinterlace/tvtime-dist.c 2014-09-24 08:30:50.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/deinterlace/tvtime-dist.c 2015-10-30 14:27:10.000000000 +0000 @@ -225,13 +225,13 @@ /* 9: addw */ var47.i = var45.i + var46.i; /* 10: shlw */ - var48.i = var47.i << 2; + var48.i = ((orc_uint16) var47.i) << 2; /* 11: loadb */ var39 = ptr6[i]; /* 12: convubw */ var49.i = (orc_uint8) var39; /* 13: shlw */ - var50.i = var49.i << 1; + var50.i = ((orc_uint16) var49.i) << 1; /* 14: subw */ var51.i = var48.i - var44.i; /* 15: addw */ @@ -317,13 +317,13 @@ /* 9: addw */ var47.i = var45.i + var46.i; /* 10: shlw */ - var48.i = var47.i << 2; + var48.i = ((orc_uint16) var47.i) << 2; /* 11: loadb */ var39 = ptr6[i]; /* 12: convubw */ var49.i = (orc_uint8) var39; /* 13: shlw */ - var50.i = var49.i << 1; + var50.i = ((orc_uint16) var49.i) << 1; /* 14: subw */ var51.i = var48.i - var44.i; /* 15: addw */ @@ -359,8 +359,8 @@ static const orc_uint8 bc[] = { 1, 9, 21, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 105, 110, 101, 95, 118, 102, 105, 114, 11, 1, 1, 12, 1, 1, 12, 1, - 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 4, 2, 0, 0, 0, - 14, 4, 1, 0, 0, 0, 14, 4, 4, 0, 0, 0, 14, 4, 3, 0, + 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 2, 0, 0, 0, + 14, 2, 1, 0, 0, 0, 14, 2, 4, 0, 0, 0, 14, 2, 3, 0, 0, 0, 20, 2, 20, 2, 20, 2, 150, 32, 4, 150, 33, 8, 70, 32, 32, 33, 150, 33, 5, 150, 34, 7, 70, 33, 33, 34, 93, 33, 33, 16, 150, 34, 6, 93, 34, 34, 17, 98, 33, 33, 32, 70, 33, 33, 34, 70, @@ -378,10 +378,10 @@ orc_program_add_source (p, 1, "s3"); orc_program_add_source (p, 1, "s4"); orc_program_add_source (p, 1, "s5"); - orc_program_add_constant (p, 4, 0x00000002, "c1"); - orc_program_add_constant (p, 4, 0x00000001, "c2"); - orc_program_add_constant (p, 4, 0x00000004, "c3"); - orc_program_add_constant (p, 4, 0x00000003, "c4"); + orc_program_add_constant (p, 2, 0x00000002, "c1"); + orc_program_add_constant (p, 2, 0x00000001, "c2"); + orc_program_add_constant (p, 2, 0x00000004, "c3"); + orc_program_add_constant (p, 2, 0x00000003, "c4"); orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t3"); @@ -713,8 +713,8 @@ static const orc_uint8 bc[] = { 1, 9, 29, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 95, 98, 108, 101, 110, - 100, - 11, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 4, 2, 0, + 100, + 11, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 2, 0, 0, 0, 20, 2, 20, 2, 20, 2, 150, 32, 4, 150, 33, 5, 150, 34, 6, 70, 32, 32, 33, 70, 34, 34, 34, 70, 32, 32, 34, 70, 32, 32, 16, 94, 32, 32, 16, 160, 0, 32, 2, 0, @@ -731,7 +731,7 @@ orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s3"); - orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_constant (p, 2, 0x00000002, "c1"); orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t3"); @@ -797,11 +797,7 @@ #else orc_int8 var44; #endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var45; -#else orc_int8 var45; -#endif orc_int8 var46; orc_int8 var47; orc_int8 var48; @@ -825,8 +821,6 @@ orc_int8 var66; orc_int8 var67; orc_int8 var68; - orc_int8 var69; - orc_int8 var70; ptr0 = (orc_int8 *) d1; ptr4 = (orc_int8 *) s1; @@ -836,62 +830,58 @@ /* 11: loadpb */ var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 13: loadpb */ - var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 21: loadpb */ - var46 = p1; - /* 23: loadpb */ - var47 = p1; + /* 20: loadpb */ + var45 = p1; for (i = 0; i < n; i++) { /* 0: loadb */ - var49 = ptr4[i]; + var47 = ptr4[i]; /* 1: loadb */ - var50 = ptr7[i]; + var48 = ptr7[i]; /* 2: loadb */ - var51 = ptr6[i]; + var49 = ptr6[i]; /* 3: loadb */ - var52 = ptr5[i]; + var50 = ptr5[i]; /* 4: avgub */ - var53 = ((orc_uint8) var52 + (orc_uint8) var51 + 1) >> 1; + var51 = ((orc_uint8) var50 + (orc_uint8) var49 + 1) >> 1; /* 5: maxub */ - var54 = ORC_MAX ((orc_uint8) var49, (orc_uint8) var53); + var52 = ORC_MAX ((orc_uint8) var47, (orc_uint8) var51); /* 6: minub */ - var55 = ORC_MIN ((orc_uint8) var49, (orc_uint8) var53); + var53 = ORC_MIN ((orc_uint8) var47, (orc_uint8) var51); /* 7: subb */ - var56 = var54 - var55; + var54 = var52 - var53; /* 8: maxub */ - var57 = ORC_MAX ((orc_uint8) var50, (orc_uint8) var53); + var55 = ORC_MAX ((orc_uint8) var48, (orc_uint8) var51); /* 9: minub */ - var58 = ORC_MIN ((orc_uint8) var50, (orc_uint8) var53); + var56 = ORC_MIN ((orc_uint8) var48, (orc_uint8) var51); /* 10: subb */ - var59 = var57 - var58; + var57 = var55 - var56; /* 12: xorb */ - var60 = var56 ^ var44; - /* 14: xorb */ - var61 = var59 ^ var45; - /* 15: cmpgtsb */ - var62 = (var60 > var61) ? (~0) : 0; - /* 16: andb */ - var63 = var50 & var62; - /* 17: andnb */ - var64 = (~var62) & var49; - /* 18: orb */ - var65 = var63 | var64; - /* 19: maxub */ - var66 = ORC_MAX ((orc_uint8) var52, (orc_uint8) var51); - /* 20: minub */ - var67 = ORC_MIN ((orc_uint8) var52, (orc_uint8) var51); - /* 22: addusb */ - var68 = ORC_CLAMP_UB ((orc_uint8) var66 + (orc_uint8) var46); - /* 24: subusb */ - var69 = ORC_CLAMP_UB ((orc_uint8) var67 - (orc_uint8) var47); - /* 25: minub */ - var70 = ORC_MIN ((orc_uint8) var65, (orc_uint8) var68); - /* 26: maxub */ - var48 = ORC_MAX ((orc_uint8) var70, (orc_uint8) var69); - /* 27: storeb */ - ptr0[i] = var48; + var58 = var54 ^ var44; + /* 13: xorb */ + var59 = var57 ^ var44; + /* 14: cmpgtsb */ + var60 = (var58 > var59) ? (~0) : 0; + /* 15: andb */ + var61 = var48 & var60; + /* 16: andnb */ + var62 = (~var60) & var47; + /* 17: orb */ + var63 = var61 | var62; + /* 18: maxub */ + var64 = ORC_MAX ((orc_uint8) var50, (orc_uint8) var49); + /* 19: minub */ + var65 = ORC_MIN ((orc_uint8) var50, (orc_uint8) var49); + /* 21: addusb */ + var66 = ORC_CLAMP_UB ((orc_uint8) var64 + (orc_uint8) var45); + /* 22: subusb */ + var67 = ORC_CLAMP_UB ((orc_uint8) var65 - (orc_uint8) var45); + /* 23: minub */ + var68 = ORC_MIN ((orc_uint8) var63, (orc_uint8) var66); + /* 24: maxub */ + var46 = ORC_MAX ((orc_uint8) var68, (orc_uint8) var67); + /* 25: storeb */ + ptr0[i] = var46; } } @@ -912,11 +902,7 @@ #else orc_int8 var44; #endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var45; -#else orc_int8 var45; -#endif orc_int8 var46; orc_int8 var47; orc_int8 var48; @@ -940,8 +926,6 @@ orc_int8 var66; orc_int8 var67; orc_int8 var68; - orc_int8 var69; - orc_int8 var70; ptr0 = (orc_int8 *) ex->arrays[0]; ptr4 = (orc_int8 *) ex->arrays[4]; @@ -951,62 +935,58 @@ /* 11: loadpb */ var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 13: loadpb */ - var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 21: loadpb */ - var46 = ex->params[24]; - /* 23: loadpb */ - var47 = ex->params[24]; + /* 20: loadpb */ + var45 = ex->params[24]; for (i = 0; i < n; i++) { /* 0: loadb */ - var49 = ptr4[i]; + var47 = ptr4[i]; /* 1: loadb */ - var50 = ptr7[i]; + var48 = ptr7[i]; /* 2: loadb */ - var51 = ptr6[i]; + var49 = ptr6[i]; /* 3: loadb */ - var52 = ptr5[i]; + var50 = ptr5[i]; /* 4: avgub */ - var53 = ((orc_uint8) var52 + (orc_uint8) var51 + 1) >> 1; + var51 = ((orc_uint8) var50 + (orc_uint8) var49 + 1) >> 1; /* 5: maxub */ - var54 = ORC_MAX ((orc_uint8) var49, (orc_uint8) var53); + var52 = ORC_MAX ((orc_uint8) var47, (orc_uint8) var51); /* 6: minub */ - var55 = ORC_MIN ((orc_uint8) var49, (orc_uint8) var53); + var53 = ORC_MIN ((orc_uint8) var47, (orc_uint8) var51); /* 7: subb */ - var56 = var54 - var55; + var54 = var52 - var53; /* 8: maxub */ - var57 = ORC_MAX ((orc_uint8) var50, (orc_uint8) var53); + var55 = ORC_MAX ((orc_uint8) var48, (orc_uint8) var51); /* 9: minub */ - var58 = ORC_MIN ((orc_uint8) var50, (orc_uint8) var53); + var56 = ORC_MIN ((orc_uint8) var48, (orc_uint8) var51); /* 10: subb */ - var59 = var57 - var58; + var57 = var55 - var56; /* 12: xorb */ - var60 = var56 ^ var44; - /* 14: xorb */ - var61 = var59 ^ var45; - /* 15: cmpgtsb */ - var62 = (var60 > var61) ? (~0) : 0; - /* 16: andb */ - var63 = var50 & var62; - /* 17: andnb */ - var64 = (~var62) & var49; - /* 18: orb */ - var65 = var63 | var64; - /* 19: maxub */ - var66 = ORC_MAX ((orc_uint8) var52, (orc_uint8) var51); - /* 20: minub */ - var67 = ORC_MIN ((orc_uint8) var52, (orc_uint8) var51); - /* 22: addusb */ - var68 = ORC_CLAMP_UB ((orc_uint8) var66 + (orc_uint8) var46); - /* 24: subusb */ - var69 = ORC_CLAMP_UB ((orc_uint8) var67 - (orc_uint8) var47); - /* 25: minub */ - var70 = ORC_MIN ((orc_uint8) var65, (orc_uint8) var68); - /* 26: maxub */ - var48 = ORC_MAX ((orc_uint8) var70, (orc_uint8) var69); - /* 27: storeb */ - ptr0[i] = var48; + var58 = var54 ^ var44; + /* 13: xorb */ + var59 = var57 ^ var44; + /* 14: cmpgtsb */ + var60 = (var58 > var59) ? (~0) : 0; + /* 15: andb */ + var61 = var48 & var60; + /* 16: andnb */ + var62 = (~var60) & var47; + /* 17: orb */ + var63 = var61 | var62; + /* 18: maxub */ + var64 = ORC_MAX ((orc_uint8) var50, (orc_uint8) var49); + /* 19: minub */ + var65 = ORC_MIN ((orc_uint8) var50, (orc_uint8) var49); + /* 21: addusb */ + var66 = ORC_CLAMP_UB ((orc_uint8) var64 + (orc_uint8) var45); + /* 22: subusb */ + var67 = ORC_CLAMP_UB ((orc_uint8) var65 - (orc_uint8) var45); + /* 23: minub */ + var68 = ORC_MIN ((orc_uint8) var63, (orc_uint8) var66); + /* 24: maxub */ + var46 = ORC_MAX ((orc_uint8) var68, (orc_uint8) var67); + /* 25: storeb */ + ptr0[i] = var46; } } @@ -1031,7 +1011,7 @@ static const orc_uint8 bc[] = { 1, 9, 23, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 105, 110, 101, 95, 103, 114, 101, 101, 100, 121, 11, 1, 1, 12, 1, 1, - 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 4, 128, 0, 0, 0, 16, + 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 1, 128, 0, 0, 0, 16, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 43, 32, 4, 43, 33, 7, 43, 34, 6, 43, 35, 5, 39, 36, 35, 34, 53, 39, 32, 36, 55, 40, 32, @@ -1052,7 +1032,7 @@ orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s3"); orc_program_add_source (p, 1, "s4"); - orc_program_add_constant (p, 4, 0x00000080, "c1"); + orc_program_add_constant (p, 1, 0x00000080, "c1"); orc_program_add_parameter (p, 1, "p1"); orc_program_add_temporary (p, 1, "t1"); orc_program_add_temporary (p, 1, "t2"); diff -Nru gst-plugins-good1.0-1.4.3/gst/dtmf/gstdtmfsrc.c gst-plugins-good1.0-1.6.1/gst/dtmf/gstdtmfsrc.c --- gst-plugins-good1.0-1.4.3/gst/dtmf/gstdtmfsrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/dtmf/gstdtmfsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -234,6 +234,7 @@ static gboolean gst_dtmf_src_unlock_stop (GstBaseSrc * src); static gboolean gst_dtmf_src_negotiate (GstBaseSrc * basesrc); +static gboolean gst_dtmf_src_query (GstBaseSrc * basesrc, GstQuery * query); static void @@ -277,6 +278,7 @@ gstbasesrc_class->event = GST_DEBUG_FUNCPTR (gst_dtmf_src_handle_event); gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_dtmf_src_create); gstbasesrc_class->negotiate = GST_DEBUG_FUNCPTR (gst_dtmf_src_negotiate); + gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_dtmf_src_query); } static void @@ -894,6 +896,33 @@ return ret; } +static gboolean +gst_dtmf_src_query (GstBaseSrc * basesrc, GstQuery * query) +{ + GstDTMFSrc *dtmfsrc = GST_DTMF_SRC (basesrc); + gboolean res = FALSE; + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_LATENCY: + { + GstClockTime latency; + + latency = dtmfsrc->interval * GST_MSECOND; + gst_query_set_latency (query, gst_base_src_is_live (basesrc), latency, + GST_CLOCK_TIME_NONE); + GST_DEBUG_OBJECT (dtmfsrc, "Reporting latency of %" GST_TIME_FORMAT, + GST_TIME_ARGS (latency)); + res = TRUE; + } + break; + default: + res = GST_BASE_SRC_CLASS (parent_class)->query (basesrc, query); + break; + } + + return res; +} + static GstStateChangeReturn gst_dtmf_src_change_state (GstElement * element, GstStateChange transition) { diff -Nru gst-plugins-good1.0-1.4.3/gst/dtmf/gstrtpdtmfdepay.c gst-plugins-good1.0-1.6.1/gst/dtmf/gstrtpdtmfdepay.c --- gst-plugins-good1.0-1.4.3/gst/dtmf/gstrtpdtmfdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/dtmf/gstrtpdtmfdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -108,29 +108,27 @@ typedef struct st_dtmf_key { - const char *event_name; - int event_encoding; float low_frequency; float high_frequency; } DTMF_KEY; static const DTMF_KEY DTMF_KEYS[] = { - {"DTMF_KEY_EVENT_0", 0, 941, 1336}, - {"DTMF_KEY_EVENT_1", 1, 697, 1209}, - {"DTMF_KEY_EVENT_2", 2, 697, 1336}, - {"DTMF_KEY_EVENT_3", 3, 697, 1477}, - {"DTMF_KEY_EVENT_4", 4, 770, 1209}, - {"DTMF_KEY_EVENT_5", 5, 770, 1336}, - {"DTMF_KEY_EVENT_6", 6, 770, 1477}, - {"DTMF_KEY_EVENT_7", 7, 852, 1209}, - {"DTMF_KEY_EVENT_8", 8, 852, 1336}, - {"DTMF_KEY_EVENT_9", 9, 852, 1477}, - {"DTMF_KEY_EVENT_S", 10, 941, 1209}, - {"DTMF_KEY_EVENT_P", 11, 941, 1477}, - {"DTMF_KEY_EVENT_A", 12, 697, 1633}, - {"DTMF_KEY_EVENT_B", 13, 770, 1633}, - {"DTMF_KEY_EVENT_C", 14, 852, 1633}, - {"DTMF_KEY_EVENT_D", 15, 941, 1633}, + {941, 1336}, + {697, 1209}, + {697, 1336}, + {697, 1477}, + {770, 1209}, + {770, 1336}, + {770, 1477}, + {852, 1209}, + {852, 1336}, + {852, 1477}, + {941, 1209}, + {941, 1477}, + {697, 1633}, + {770, 1633}, + {852, 1633}, + {941, 1633}, }; #define MAX_DTMF_EVENTS 16 @@ -160,8 +158,6 @@ enum { - - /* FILL ME */ LAST_SIGNAL }; @@ -173,11 +169,6 @@ PROP_MAX_DURATION }; -enum -{ - ARG_0 -}; - static GstStaticPadTemplate gst_rtp_dtmf_depay_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, @@ -343,7 +334,7 @@ double amplitude, f1, f2; double volume_factor; DTMF_KEY key = DTMF_KEYS[payload.event]; - guint32 clock_rate = 8000 /* default */ ; + guint32 clock_rate; GstRTPBaseDepayload *depayload = GST_RTP_BASE_DEPAYLOAD (rtpdtmfdepay); gint volume; static GstAllocationParams params = { 0, 1, 0, 0, }; diff -Nru gst-plugins-good1.0-1.4.3/gst/dtmf/gstrtpdtmfsrc.c gst-plugins-good1.0-1.6.1/gst/dtmf/gstrtpdtmfsrc.c --- gst-plugins-good1.0-1.4.3/gst/dtmf/gstrtpdtmfsrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/dtmf/gstrtpdtmfsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -196,6 +196,7 @@ static GstFlowReturn gst_rtp_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, guint length, GstBuffer ** buffer); static gboolean gst_rtp_dtmf_src_negotiate (GstBaseSrc * basesrc); +static gboolean gst_rtp_dtmf_src_query (GstBaseSrc * basesrc, GstQuery * query); static void @@ -274,6 +275,7 @@ gstbasesrc_class->event = GST_DEBUG_FUNCPTR (gst_rtp_dtmf_src_handle_event); gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_rtp_dtmf_src_create); gstbasesrc_class->negotiate = GST_DEBUG_FUNCPTR (gst_rtp_dtmf_src_negotiate); + gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_rtp_dtmf_src_query); } static void @@ -893,9 +895,9 @@ gst_caps_set_simple (srccaps, "payload", G_TYPE_INT, dtmfsrc->pt, "ssrc", G_TYPE_UINT, dtmfsrc->current_ssrc, - "clock-base", G_TYPE_UINT, dtmfsrc->ts_base, + "timestamp-offset", G_TYPE_UINT, dtmfsrc->ts_base, "clock-rate", G_TYPE_INT, dtmfsrc->clock_rate, - "seqnum-base", G_TYPE_UINT, dtmfsrc->seqnum_base, NULL); + "seqnum-offset", G_TYPE_UINT, dtmfsrc->seqnum_base, NULL); GST_DEBUG_OBJECT (dtmfsrc, "no peer caps: %" GST_PTR_FORMAT, srccaps); } else { @@ -970,26 +972,28 @@ dtmfsrc->current_ssrc); } - if (gst_structure_has_field_typed (s, "clock-base", G_TYPE_UINT)) { - value = gst_structure_get_value (s, "clock-base"); + if (gst_structure_has_field_typed (s, "timestamp-offset", G_TYPE_UINT)) { + value = gst_structure_get_value (s, "timestamp-offset"); dtmfsrc->ts_base = g_value_get_uint (value); - GST_LOG_OBJECT (dtmfsrc, "using peer clock-base %u", dtmfsrc->ts_base); + GST_LOG_OBJECT (dtmfsrc, "using peer timestamp-offset %u", + dtmfsrc->ts_base); } else { /* FIXME, fixate_nearest_uint would be even better */ - gst_structure_set (s, "clock-base", G_TYPE_UINT, dtmfsrc->ts_base, NULL); - GST_LOG_OBJECT (dtmfsrc, "using internal clock-base %u", + gst_structure_set (s, "timestamp-offset", G_TYPE_UINT, dtmfsrc->ts_base, + NULL); + GST_LOG_OBJECT (dtmfsrc, "using internal timestamp-offset %u", dtmfsrc->ts_base); } - if (gst_structure_has_field_typed (s, "seqnum-base", G_TYPE_UINT)) { - value = gst_structure_get_value (s, "seqnum-base"); + if (gst_structure_has_field_typed (s, "seqnum-offset", G_TYPE_UINT)) { + value = gst_structure_get_value (s, "seqnum-offset"); dtmfsrc->seqnum_base = g_value_get_uint (value); - GST_LOG_OBJECT (dtmfsrc, "using peer seqnum-base %u", + GST_LOG_OBJECT (dtmfsrc, "using peer seqnum-offset %u", dtmfsrc->seqnum_base); } else { /* FIXME, fixate_nearest_uint would be even better */ - gst_structure_set (s, "seqnum-base", G_TYPE_UINT, dtmfsrc->seqnum_base, + gst_structure_set (s, "seqnum-offset", G_TYPE_UINT, dtmfsrc->seqnum_base, NULL); - GST_LOG_OBJECT (dtmfsrc, "using internal seqnum-base %u", + GST_LOG_OBJECT (dtmfsrc, "using internal seqnum-offset %u", dtmfsrc->seqnum_base); } @@ -1021,6 +1025,33 @@ } +static gboolean +gst_rtp_dtmf_src_query (GstBaseSrc * basesrc, GstQuery * query) +{ + GstRTPDTMFSrc *dtmfsrc = GST_RTP_DTMF_SRC (basesrc); + gboolean res = FALSE; + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_LATENCY: + { + GstClockTime latency; + + latency = dtmfsrc->ptime * GST_MSECOND; + gst_query_set_latency (query, gst_base_src_is_live (basesrc), latency, + GST_CLOCK_TIME_NONE); + GST_DEBUG_OBJECT (dtmfsrc, "Reporting latency of %" GST_TIME_FORMAT, + GST_TIME_ARGS (latency)); + res = TRUE; + } + break; + default: + res = GST_BASE_SRC_CLASS (gst_rtp_dtmf_src_parent_class)->query (basesrc, + query); + break; + } + + return res; +} static void gst_rtp_dtmf_src_ready_to_paused (GstRTPDTMFSrc * dtmfsrc) diff -Nru gst-plugins-good1.0-1.4.3/gst/dtmf/Makefile.am gst-plugins-good1.0-1.6.1/gst/dtmf/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/dtmf/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/dtmf/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -15,17 +15,3 @@ $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) libgstdtmf_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdtmf_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstdtmf -:SHARED libgstdtmf \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstdtmf_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdtmf_la_CFLAGS) \ - -:LDFLAGS $(libgstdtmf_la_LDFLAGS) \ - $(libgstdtmf_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/dtmf/Makefile.in gst-plugins-good1.0-1.6.1/gst/dtmf/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/dtmf/Makefile.in 2014-09-24 07:25:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/dtmf/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/dtmf -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -229,6 +238,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +371,6 @@ 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@ @@ -481,17 +488,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +551,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -589,7 +597,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/dtmf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/dtmf/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -922,20 +929,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstdtmf -:SHARED libgstdtmf \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstdtmf_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdtmf_la_CFLAGS) \ - -:LDFLAGS $(libgstdtmf_la_LDFLAGS) \ - $(libgstdtmf_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/effectv/gstaging.c gst-plugins-good1.0-1.6.1/gst/effectv/gstaging.c --- gst-plugins-good1.0-1.4.3/gst/effectv/gstaging.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/effectv/gstaging.c 2015-10-22 08:02:54.000000000 +0000 @@ -334,7 +334,7 @@ if (agingtv->color_aging) coloraging (src, dest, video_size, &agingtv->coloraging_state); else - memcpy (dest, src, video_size); + memcpy (dest, src, stride * height); scratching (agingtv->scratches, agingtv->scratch_lines, dest, width, height); if (agingtv->pits) diff -Nru gst-plugins-good1.0-1.4.3/gst/effectv/gstquark.c gst-plugins-good1.0-1.6.1/gst/effectv/gstquark.c --- gst-plugins-good1.0-1.4.3/gst/effectv/gstquark.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/effectv/gstquark.c 2015-10-22 08:02:54.000000000 +0000 @@ -272,7 +272,7 @@ g_object_class_install_property (gobject_class, PROP_PLANES, g_param_spec_int ("planes", "Planes", - "Number of planes", 0, 64, PLANES, + "Number of planes", 1, 64, PLANES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE)); gst_element_class_set_static_metadata (gstelement_class, "QuarkTV effect", diff -Nru gst-plugins-good1.0-1.4.3/gst/effectv/gstradioac.c gst-plugins-good1.0-1.6.1/gst/effectv/gstradioac.c --- gst-plugins-good1.0-1.4.3/gst/effectv/gstradioac.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/effectv/gstradioac.c 2015-10-22 08:02:54.000000000 +0000 @@ -131,7 +131,7 @@ #define RATIO 0.95 static guint32 palettes[COLORS * PATTERN]; -static gint swap_tab[] = { 2, 1, 0, 3 }; +static const gint swap_tab[] = { 2, 1, 0, 3 }; #define gst_radioactv_parent_class parent_class G_DEFINE_TYPE (GstRadioacTV, gst_radioactv, GST_TYPE_VIDEO_FILTER); diff -Nru gst-plugins-good1.0-1.4.3/gst/effectv/Makefile.am gst-plugins-good1.0-1.6.1/gst/effectv/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/effectv/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/effectv/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -20,17 +20,3 @@ noinst_HEADERS = gsteffectv.h gstaging.h gstdice.h gstedge.h \ gstquark.h gstrev.h gstshagadelic.h gstvertigo.h gstwarp.h gstop.h \ gstradioac.h gststreak.h gstripple.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgsteffectv -:SHARED libgsteffectv \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgsteffectv_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsteffectv_la_CFLAGS) \ - -:LDFLAGS $(libgsteffectv_la_LDFLAGS) \ - $(libgsteffectv_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/effectv/Makefile.in gst-plugins-good1.0-1.6.1/gst/effectv/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/effectv/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/effectv/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/effectv -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -234,6 +243,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -366,9 +376,6 @@ 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@ @@ -486,17 +493,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -549,6 +556,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -601,7 +609,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/effectv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/effectv/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1006,20 +1013,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgsteffectv -:SHARED libgsteffectv \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgsteffectv_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsteffectv_la_CFLAGS) \ - -:LDFLAGS $(libgsteffectv_la_LDFLAGS) \ - $(libgsteffectv_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/equalizer/gstiirequalizer.c gst-plugins-good1.0-1.6.1/gst/equalizer/gstiirequalizer.c --- gst-plugins-good1.0-1.4.3/gst/equalizer/gstiirequalizer.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/equalizer/gstiirequalizer.c 2015-10-22 08:02:54.000000000 +0000 @@ -49,6 +49,7 @@ const GstAudioInfo * info); static GstFlowReturn gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf); +static void set_passthrough (GstIirEqualizer * equ); #define ALLOWED_CAPS \ "audio/x-raw," \ @@ -159,6 +160,7 @@ BANDS_LOCK (equ); equ->need_new_coefficients = TRUE; band->gain = gain; + set_passthrough (equ); BANDS_UNLOCK (equ); GST_DEBUG_OBJECT (band, "changed gain = %lf ", band->gain); } @@ -362,6 +364,7 @@ gobject_class->finalize = gst_iir_equalizer_finalize; audio_filter_class->setup = gst_iir_equalizer_setup; btrans_class->transform_ip = gst_iir_equalizer_transform_ip; + btrans_class->transform_ip_on_passthrough = FALSE; caps = gst_caps_from_string (ALLOWED_CAPS); gst_audio_filter_class_add_pad_templates (audio_filter_class, caps); @@ -372,7 +375,8 @@ gst_iir_equalizer_init (GstIirEqualizer * eq) { g_mutex_init (&eq->bands_lock); - eq->need_new_coefficients = TRUE; + /* Band gains are 0 by default, passthrough until they are changed */ + gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (eq), TRUE); } static void @@ -831,9 +835,6 @@ need_new_coefficients = equ->need_new_coefficients; BANDS_UNLOCK (equ); - if (!need_new_coefficients && gst_base_transform_is_passthrough (btrans)) - return GST_FLOW_OK; - timestamp = GST_BUFFER_TIMESTAMP (buf); timestamp = gst_segment_to_stream_time (&btrans->segment, GST_FORMAT_TIME, timestamp); @@ -854,7 +855,6 @@ BANDS_LOCK (equ); if (need_new_coefficients) { update_coefficients (equ); - set_passthrough (equ); } BANDS_UNLOCK (equ); diff -Nru gst-plugins-good1.0-1.4.3/gst/equalizer/Makefile.am gst-plugins-good1.0-1.6.1/gst/equalizer/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/equalizer/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/equalizer/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -20,17 +20,3 @@ preset_DATA = GstIirEqualizer3Bands.prs GstIirEqualizer10Bands.prs EXTRA_DIST = $(preset_DATA) - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstequalizer -:SHARED libgstequalizer \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstequalizer_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstequalizer_la_CFLAGS) \ - -:LDFLAGS $(libgstequalizer_la_LDFLAGS) \ - $(libgstequalizer_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/equalizer/Makefile.in gst-plugins-good1.0-1.6.1/gst/equalizer/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/equalizer/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/equalizer/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,8 +92,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/equalizer -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 \ @@ -105,7 +113,6 @@ $(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 \ @@ -120,6 +127,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -232,6 +241,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -364,9 +374,6 @@ 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@ @@ -484,17 +491,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -547,6 +554,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -595,7 +603,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/equalizer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/equalizer/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -949,20 +956,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-pluginLTLIBRARIES uninstall-presetDATA +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstequalizer -:SHARED libgstequalizer \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstequalizer_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstequalizer_la_CFLAGS) \ - -:LDFLAGS $(libgstequalizer_la_LDFLAGS) \ - $(libgstequalizer_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/flv/gstflvdemux.c gst-plugins-good1.0-1.6.1/gst/flv/gstflvdemux.c --- gst-plugins-good1.0-1.4.3/gst/flv/gstflvdemux.c 2014-08-13 11:44:11.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flv/gstflvdemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -43,6 +43,7 @@ #include #include #include +#include /* FIXME: don't rely on own GstIndex */ #include "gstindex.c" @@ -93,9 +94,12 @@ /* 1 byte of tag type + 3 bytes of tag data size */ #define FLV_TAG_TYPE_SIZE 4 -/* two seconds - consider pts are resynced to another base if this different */ +/* two seconds - consider dts are resynced to another base if this different */ #define RESYNC_THRESHOLD 2000 +/* how much stream time to wait for audio tags to appear after we have video, or vice versa */ +#define NO_MORE_PADS_THRESHOLD (6 * GST_SECOND) + static gboolean flv_demux_handle_seek_push (GstFlvDemux * demux, GstEvent * event); static gboolean gst_flv_demux_handle_seek_pull (GstFlvDemux * demux, @@ -659,7 +663,7 @@ gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag, guint32 rate, guint32 channels, guint32 width) { - GstCaps *caps = NULL; + GstCaps *caps = NULL, *old_caps; gchar *codec_name = NULL; gboolean ret = FALSE; guint adjusted_rate = rate; @@ -700,29 +704,32 @@ break; case 10: { - if (demux->audio_codec_data) { - GstMapInfo map; + GstMapInfo map; + if (!demux->audio_codec_data) { + GST_DEBUG_OBJECT (demux, "don't have AAC codec data yet"); + ret = TRUE; + goto done; + } - gst_buffer_map (demux->audio_codec_data, &map, GST_MAP_READ); + gst_buffer_map (demux->audio_codec_data, &map, GST_MAP_READ); - /* use codec-data to extract and verify samplerate */ - if (map.size >= 2) { - gint freq_index; - - freq_index = GST_READ_UINT16_BE (map.data); - freq_index = (freq_index & 0x0780) >> 7; - adjusted_rate = - gst_codec_utils_aac_get_sample_rate_from_index (freq_index); - - if (adjusted_rate && (rate != adjusted_rate)) { - GST_LOG_OBJECT (demux, "Ajusting AAC sample rate %d -> %d", rate, - adjusted_rate); - } else { - adjusted_rate = rate; - } + /* use codec-data to extract and verify samplerate */ + if (map.size >= 2) { + gint freq_index; + + freq_index = GST_READ_UINT16_BE (map.data); + freq_index = (freq_index & 0x0780) >> 7; + adjusted_rate = + gst_codec_utils_aac_get_sample_rate_from_index (freq_index); + + if (adjusted_rate && (rate != adjusted_rate)) { + GST_LOG_OBJECT (demux, "Ajusting AAC sample rate %d -> %d", rate, + adjusted_rate); + } else { + adjusted_rate = rate; } - gst_buffer_unmap (demux->audio_codec_data, &map); } + gst_buffer_unmap (demux->audio_codec_data, &map); caps = gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 4, "framed", G_TYPE_BOOLEAN, TRUE, @@ -807,18 +814,27 @@ demux->audio_codec_data, NULL); } - stream_id = - gst_pad_create_stream_id (demux->audio_pad, GST_ELEMENT_CAST (demux), - "audio"); - - event = gst_event_new_stream_start (stream_id); - if (have_group_id (demux)) - gst_event_set_group_id (event, demux->group_id); - gst_pad_push_event (demux->audio_pad, event); - g_free (stream_id); + old_caps = gst_pad_get_current_caps (demux->audio_pad); + if (!old_caps) { + stream_id = + gst_pad_create_stream_id (demux->audio_pad, GST_ELEMENT_CAST (demux), + "audio"); + + event = gst_event_new_stream_start (stream_id); + if (have_group_id (demux)) + gst_event_set_group_id (event, demux->group_id); + gst_pad_push_event (demux->audio_pad, event); + g_free (stream_id); + } + if (!old_caps || !gst_caps_is_equal (old_caps, caps)) + ret = gst_pad_set_caps (demux->audio_pad, caps); + else + ret = TRUE; - ret = gst_pad_set_caps (demux->audio_pad, caps); + if (old_caps) + gst_caps_unref (old_caps); +done: if (G_LIKELY (ret)) { /* Store the caps we got from tags */ demux->audio_codec_tag = codec_tag; @@ -826,24 +842,29 @@ demux->channels = channels; demux->width = width; - codec_name = gst_pb_utils_get_codec_description (caps); + if (caps) { + codec_name = gst_pb_utils_get_codec_description (caps); - if (codec_name) { - if (demux->taglist == NULL) - demux->taglist = gst_tag_list_new_empty (); - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_AUDIO_CODEC, codec_name, NULL); - g_free (codec_name); - } + if (codec_name) { + if (demux->taglist == NULL) + demux->taglist = gst_tag_list_new_empty (); + gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, + GST_TAG_AUDIO_CODEC, codec_name, NULL); + g_free (codec_name); + } - GST_DEBUG_OBJECT (demux->audio_pad, "successfully negotiated caps %" - GST_PTR_FORMAT, caps); + GST_DEBUG_OBJECT (demux->audio_pad, "successfully negotiated caps %" + GST_PTR_FORMAT, caps); + } else { + GST_DEBUG_OBJECT (demux->audio_pad, "delayed setting caps"); + } } else { GST_WARNING_OBJECT (demux->audio_pad, "failed negotiating caps %" GST_PTR_FORMAT, caps); } - gst_caps_unref (caps); + if (caps) + gst_caps_unref (caps); beach: return ret; @@ -889,23 +910,23 @@ } static gboolean -gst_flv_demux_update_resync (GstFlvDemux * demux, guint32 pts, gboolean discont, +gst_flv_demux_update_resync (GstFlvDemux * demux, guint32 dts, gboolean discont, guint32 * last, GstClockTime * offset) { gboolean ret = FALSE; - gint32 dpts = pts - *last; - if (!discont && ABS (dpts) >= RESYNC_THRESHOLD) { + gint32 ddts = dts - *last; + if (!discont && ddts <= -RESYNC_THRESHOLD) { /* Theoretically, we should use substract the duration of the last buffer, but this demuxer sends no durations on buffers, not sure if it cannot know, or just does not care to calculate. */ - *offset -= dpts * GST_MSECOND; + *offset -= ddts * GST_MSECOND; GST_WARNING_OBJECT (demux, - "Large pts gap (%" G_GINT32_FORMAT " ms), assuming resync, offset now %" - GST_TIME_FORMAT "", dpts, GST_TIME_ARGS (*offset)); + "Large dts gap (%" G_GINT32_FORMAT " ms), assuming resync, offset now %" + GST_TIME_FORMAT "", ddts, GST_TIME_ARGS (*offset)); ret = TRUE; } - *last = pts; + *last = dts; return ret; } @@ -923,9 +944,14 @@ GST_LOG_OBJECT (demux, "parsing an audio tag"); - if (demux->no_more_pads && !demux->audio_pad) { - GST_WARNING_OBJECT (demux, - "Signaled no-more-pads already but had no audio pad -- ignoring"); + if (G_UNLIKELY (!demux->audio_pad && demux->no_more_pads)) { +#ifndef GST_DISABLE_DEBUG + if (G_UNLIKELY (!demux->no_audio_warned)) { + GST_WARNING_OBJECT (demux, + "Signaled no-more-pads already but had no audio pad -- ignoring"); + demux->no_audio_warned = TRUE; + } +#endif return GST_FLOW_OK; } @@ -1057,6 +1083,8 @@ codec_tag != demux->audio_codec_tag || width != demux->width)) { GST_DEBUG_OBJECT (demux, "audio settings have changed, changing caps"); + gst_buffer_replace (&demux->audio_codec_data, NULL); + /* Negotiate caps */ if (!gst_flv_demux_audio_negotiate (demux, codec_tag, rate, channels, width)) { @@ -1094,9 +1122,14 @@ /* Use that buffer data in the caps */ gst_flv_demux_audio_negotiate (demux, codec_tag, rate, channels, width); goto beach; - break; } case 1: + if (!demux->audio_codec_data) { + GST_ERROR_OBJECT (demux, "got AAC audio packet before codec data"); + ret = GST_FLOW_OK; + gst_buffer_unref (outbuf); + goto beach; + } /* AAC raw packet */ GST_LOG_OBJECT (demux, "got a raw AAC audio packet"); break; @@ -1108,12 +1141,13 @@ /* detect (and deem to be resyncs) large pts gaps */ if (gst_flv_demux_update_resync (demux, pts, demux->audio_need_discont, - &demux->last_audio_pts, &demux->audio_time_offset)) { + &demux->last_audio_pts, &demux->audio_time_offset)) { GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } /* Fill buffer with data */ - GST_BUFFER_TIMESTAMP (outbuf) = pts * GST_MSECOND + demux->audio_time_offset; + GST_BUFFER_PTS (outbuf) = pts * GST_MSECOND + demux->audio_time_offset; + GST_BUFFER_DTS (outbuf) = GST_BUFFER_PTS (outbuf); GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE; GST_BUFFER_OFFSET (outbuf) = demux->audio_offset++; GST_BUFFER_OFFSET_END (outbuf) = demux->audio_offset; @@ -1170,7 +1204,7 @@ if (G_UNLIKELY (!demux->no_more_pads && (GST_CLOCK_DIFF (demux->audio_start, - GST_BUFFER_TIMESTAMP (outbuf)) > 6 * GST_SECOND))) { + GST_BUFFER_TIMESTAMP (outbuf)) > NO_MORE_PADS_THRESHOLD))) { GST_DEBUG_OBJECT (demux, "Signalling no-more-pads because no video stream was found" " after 6 seconds of audio"); @@ -1194,7 +1228,8 @@ goto beach; } - ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret); + ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, + demux->audio_pad, ret); beach: gst_buffer_unmap (buffer, &map); @@ -1206,7 +1241,7 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag) { gboolean ret = FALSE; - GstCaps *caps = NULL; + GstCaps *caps = NULL, *old_caps; gchar *codec_name = NULL; GstEvent *event; gchar *stream_id; @@ -1228,6 +1263,11 @@ caps = gst_caps_new_empty_simple ("video/x-vp6-alpha"); break; case 7: + if (!demux->video_codec_data) { + GST_DEBUG_OBJECT (demux, "don't have h264 codec data yet"); + ret = TRUE; + goto done; + } caps = gst_caps_new_simple ("video/x-h264", "stream-format", G_TYPE_STRING, "avc", NULL); @@ -1255,7 +1295,7 @@ if (G_LIKELY (demux->framerate)) { gint num = 0, den = 0; - gst_util_double_to_fraction (demux->framerate, &num, &den); + gst_video_guess_framerate (GST_SECOND / demux->framerate, &num, &den); GST_DEBUG_OBJECT (demux->video_pad, "fps to be used on caps %f (as a fraction = %d/%d)", demux->framerate, num, den); @@ -1268,39 +1308,55 @@ demux->video_codec_data, NULL); } - stream_id = - gst_pad_create_stream_id (demux->video_pad, GST_ELEMENT_CAST (demux), - "video"); - event = gst_event_new_stream_start (stream_id); - g_free (stream_id); - - if (have_group_id (demux)) - gst_event_set_group_id (event, demux->group_id); - gst_pad_push_event (demux->video_pad, event); - ret = gst_pad_set_caps (demux->video_pad, caps); + old_caps = gst_pad_get_current_caps (demux->video_pad); + if (!old_caps) { + stream_id = + gst_pad_create_stream_id (demux->video_pad, GST_ELEMENT_CAST (demux), + "video"); + event = gst_event_new_stream_start (stream_id); + g_free (stream_id); + + if (have_group_id (demux)) + gst_event_set_group_id (event, demux->group_id); + gst_pad_push_event (demux->video_pad, event); + } + + if (!old_caps || !gst_caps_is_equal (old_caps, caps)) + ret = gst_pad_set_caps (demux->video_pad, caps); + else + ret = TRUE; + + if (old_caps) + gst_caps_unref (old_caps); +done: if (G_LIKELY (ret)) { /* Store the caps we have set */ demux->video_codec_tag = codec_tag; - codec_name = gst_pb_utils_get_codec_description (caps); + if (caps) { + codec_name = gst_pb_utils_get_codec_description (caps); - if (codec_name) { - if (demux->taglist == NULL) - demux->taglist = gst_tag_list_new_empty (); - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_VIDEO_CODEC, codec_name, NULL); - g_free (codec_name); - } + if (codec_name) { + if (demux->taglist == NULL) + demux->taglist = gst_tag_list_new_empty (); + gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, + GST_TAG_VIDEO_CODEC, codec_name, NULL); + g_free (codec_name); + } - GST_DEBUG_OBJECT (demux->video_pad, "successfully negotiated caps %" - GST_PTR_FORMAT, caps); + GST_DEBUG_OBJECT (demux->video_pad, "successfully negotiated caps %" + GST_PTR_FORMAT, caps); + } else { + GST_DEBUG_OBJECT (demux->video_pad, "delayed setting caps"); + } } else { GST_WARNING_OBJECT (demux->video_pad, "failed negotiating caps %" GST_PTR_FORMAT, caps); } - gst_caps_unref (caps); + if (caps) + gst_caps_unref (caps); beach: return ret; @@ -1310,7 +1366,8 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer) { GstFlowReturn ret = GST_FLOW_OK; - guint32 pts = 0, codec_data = 1, pts_ext = 0; + guint32 dts = 0, codec_data = 1, dts_ext = 0; + gint32 cts = 0; gboolean keyframe = FALSE; guint8 flags = 0, codec_tag = 0; GstBuffer *outbuf; @@ -1322,11 +1379,18 @@ GST_LOG_OBJECT (demux, "parsing a video tag"); - if (demux->no_more_pads && !demux->video_pad) { - GST_WARNING_OBJECT (demux, - "Signaled no-more-pads already but had no audio pad -- ignoring"); + if G_UNLIKELY + (!demux->video_pad && demux->no_more_pads) { +#ifndef GST_DISABLE_DEBUG + if G_UNLIKELY + (!demux->no_video_warned) { + GST_WARNING_OBJECT (demux, + "Signaled no-more-pads already but had no video pad -- ignoring"); + demux->no_video_warned = TRUE; + } +#endif return GST_FLOW_OK; - } + } if (gst_buffer_get_size (buffer) < 12) { GST_ERROR_OBJECT (demux, "Too small tag size"); @@ -1337,14 +1401,14 @@ data = map.data; /* Grab information about video tag */ - pts = GST_READ_UINT24_BE (data); - /* read the pts extension to 32 bits integer */ - pts_ext = GST_READ_UINT8 (data + 3); + dts = GST_READ_UINT24_BE (data); + /* read the dts extension to 32 bits integer */ + dts_ext = GST_READ_UINT8 (data + 3); /* Combine them */ - pts |= pts_ext << 24; + dts |= dts_ext << 24; - GST_LOG_OBJECT (demux, "pts bytes %02X %02X %02X %02X (%d)", data[0], data[1], - data[2], data[3], pts); + GST_LOG_OBJECT (demux, "dts bytes %02X %02X %02X %02X (%d)", data[0], data[1], + data[2], data[3], dts); /* Skip the stream id and go directly to the flags */ flags = GST_READ_UINT8 (data + 7); @@ -1358,18 +1422,12 @@ if (codec_tag == 4 || codec_tag == 5) { codec_data = 2; } else if (codec_tag == 7) { - gint32 cts; - codec_data = 5; cts = GST_READ_UINT24_BE (data + 9); cts = (cts + 0xff800000) ^ 0xff800000; GST_LOG_OBJECT (demux, "got cts %d", cts); - - /* avoid negative overflow */ - if (cts >= 0 || pts >= -cts) - pts += cts; } GST_LOG_OBJECT (demux, "video tag with codec tag %u, keyframe (%d) " @@ -1439,8 +1497,8 @@ /* Check if caps have changed */ if (G_UNLIKELY (codec_tag != demux->video_codec_tag || demux->got_par)) { - GST_DEBUG_OBJECT (demux, "video settings have changed, changing caps"); + gst_buffer_replace (&demux->video_codec_data, NULL); if (!gst_flv_demux_video_negotiate (demux, codec_tag)) { ret = GST_FLOW_ERROR; @@ -1481,10 +1539,15 @@ /* Use that buffer data in the caps */ gst_flv_demux_video_negotiate (demux, codec_tag); goto beach; - break; } case 1: /* H.264 NALU packet */ + if (!demux->video_codec_data) { + GST_ERROR_OBJECT (demux, "got H.264 video packet before codec data"); + ret = GST_FLOW_OK; + gst_buffer_unref (outbuf); + goto beach; + } GST_LOG_OBJECT (demux, "got a H.264 NALU video packet"); break; default: @@ -1493,14 +1556,18 @@ } } - /* detect (and deem to be resyncs) large pts gaps */ - if (gst_flv_demux_update_resync (demux, pts, demux->video_need_discont, - &demux->last_video_pts, &demux->video_time_offset)) { + /* detect (and deem to be resyncs) large dts gaps */ + if (gst_flv_demux_update_resync (demux, dts, demux->video_need_discont, + &demux->last_video_dts, &demux->video_time_offset)) { GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } /* Fill buffer with data */ - GST_BUFFER_TIMESTAMP (outbuf) = pts * GST_MSECOND + demux->video_time_offset; + GST_LOG_OBJECT (demux, "dts %u pts %u cts %d", dts, dts + cts, cts); + + GST_BUFFER_PTS (outbuf) = + (dts + cts) * GST_MSECOND + demux->video_time_offset; + GST_BUFFER_DTS (outbuf) = dts * GST_MSECOND + demux->video_time_offset; GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE; GST_BUFFER_OFFSET (outbuf) = demux->video_offset++; GST_BUFFER_OFFSET_END (outbuf) = demux->video_offset; @@ -1543,10 +1610,10 @@ } GST_LOG_OBJECT (demux, - "pushing %" G_GSIZE_FORMAT " bytes buffer at pts %" GST_TIME_FORMAT + "pushing %" G_GSIZE_FORMAT " bytes buffer at dts %" GST_TIME_FORMAT " with duration %" GST_TIME_FORMAT ", offset %" G_GUINT64_FORMAT ", keyframe (%d)", gst_buffer_get_size (outbuf), - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), + GST_TIME_ARGS (GST_BUFFER_DTS (outbuf)), GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)), GST_BUFFER_OFFSET (outbuf), keyframe); @@ -1559,7 +1626,7 @@ if (G_UNLIKELY (!demux->no_more_pads && (GST_CLOCK_DIFF (demux->video_start, - GST_BUFFER_TIMESTAMP (outbuf)) > 6 * GST_SECOND))) { + GST_BUFFER_TIMESTAMP (outbuf)) > NO_MORE_PADS_THRESHOLD))) { GST_DEBUG_OBJECT (demux, "Signalling no-more-pads because no audio stream was found" " after 6 seconds of video"); @@ -1583,7 +1650,8 @@ goto beach; } - ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret); + ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, + demux->video_pad, ret); beach: gst_buffer_unmap (buffer, &map); @@ -1594,7 +1662,7 @@ gst_flv_demux_parse_tag_timestamp (GstFlvDemux * demux, gboolean index, GstBuffer * buffer, size_t * tag_size) { - guint32 pts = 0, pts_ext = 0; + guint32 dts = 0, dts_ext = 0; guint32 tag_data_size; guint8 type; gboolean keyframe = TRUE; @@ -1636,15 +1704,15 @@ data += 4; - GST_LOG_OBJECT (demux, "pts bytes %02X %02X %02X %02X", data[0], data[1], + GST_LOG_OBJECT (demux, "dts bytes %02X %02X %02X %02X", data[0], data[1], data[2], data[3]); /* Grab timestamp of tag tag */ - pts = GST_READ_UINT24_BE (data); - /* read the pts extension to 32 bits integer */ - pts_ext = GST_READ_UINT8 (data + 3); + dts = GST_READ_UINT24_BE (data); + /* read the dts extension to 32 bits integer */ + dts_ext = GST_READ_UINT8 (data + 3); /* Combine them */ - pts |= pts_ext << 24; + dts |= dts_ext << 24; if (type == 9) { data += 7; @@ -1652,8 +1720,8 @@ keyframe = ((data[0] >> 4) == 1); } - ret = pts * GST_MSECOND; - GST_LOG_OBJECT (demux, "pts: %" GST_TIME_FORMAT, GST_TIME_ARGS (ret)); + ret = dts * GST_MSECOND; + GST_LOG_OBJECT (demux, "dts: %" GST_TIME_FORMAT, GST_TIME_ARGS (ret)); if (index && !demux->indexed && (type == 9 || (type == 8 && !demux->has_video))) { @@ -1823,11 +1891,16 @@ demux->index_max_time = 0; demux->audio_start = demux->video_start = GST_CLOCK_TIME_NONE; - demux->last_audio_pts = demux->last_video_pts = 0; + demux->last_audio_pts = demux->last_video_dts = 0; demux->audio_time_offset = demux->video_time_offset = 0; demux->no_more_pads = FALSE; +#ifndef GST_DISABLE_DEBUG + demux->no_audio_warned = FALSE; + demux->no_video_warned = FALSE; +#endif + gst_segment_init (&demux->segment, GST_FORMAT_TIME); demux->w = demux->h = 0; @@ -2336,7 +2409,6 @@ gst_object_unref (index); } - done: return ret; } @@ -2545,7 +2617,7 @@ demux->no_more_pads = TRUE; } - if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) { + if (demux->segment.flags & GST_SEGMENT_FLAG_SEGMENT) { gint64 stop; /* for segment playback we need to post when (in stream time) @@ -2596,7 +2668,8 @@ } static guint64 -gst_flv_demux_find_offset (GstFlvDemux * demux, GstSegment * segment) +gst_flv_demux_find_offset (GstFlvDemux * demux, GstSegment * segment, + GstSeekFlags seek_flags) { gint64 bytes = 0; gint64 time = 0; @@ -2612,8 +2685,9 @@ if (index) { /* Let's check if we have an index entry for that seek time */ entry = gst_index_get_assoc_entry (index, demux->index_id, - GST_INDEX_LOOKUP_BEFORE, GST_ASSOCIATION_FLAG_KEY_UNIT, - GST_FORMAT_TIME, time); + seek_flags & GST_SEEK_FLAG_SNAP_AFTER ? + GST_INDEX_LOOKUP_AFTER : GST_INDEX_LOOKUP_BEFORE, + GST_ASSOCIATION_FLAG_KEY_UNIT, GST_FORMAT_TIME, time); if (entry) { gst_index_entry_assoc_map (entry, GST_FORMAT_BYTES, &bytes); @@ -2624,11 +2698,9 @@ GST_TIME_ARGS (segment->position), GST_TIME_ARGS (time), bytes); /* Key frame seeking */ - if (segment->flags & GST_SEEK_FLAG_KEY_UNIT) { + if (seek_flags & GST_SEEK_FLAG_KEY_UNIT) { /* Adjust the segment so that the keyframe fits in */ - if (time < segment->start) { - segment->start = segment->time = time; - } + segment->start = segment->time = time; segment->position = time; } } else { @@ -2660,7 +2732,6 @@ goto wrong_format; flush = ! !(flags & GST_SEEK_FLAG_FLUSH); - /* FIXME : the keyframe flag is never used ! */ /* Work on a copy until we are sure the seek succeeded. */ memcpy (&seeksegment, &demux->segment, sizeof (GstSegment)); @@ -2677,18 +2748,19 @@ if (flush || seeksegment.position != demux->segment.position) { /* Do the actual seeking */ - guint64 offset = gst_flv_demux_find_offset (demux, &seeksegment); + guint64 offset = gst_flv_demux_find_offset (demux, &seeksegment, flags); GST_DEBUG_OBJECT (demux, "generating an upstream seek at position %" G_GUINT64_FORMAT, offset); ret = gst_pad_push_event (demux->sinkpad, gst_event_new_seek (seeksegment.rate, GST_FORMAT_BYTES, - seeksegment.flags | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, + flags | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, offset, GST_SEEK_TYPE_NONE, 0)); if (G_UNLIKELY (!ret)) { GST_WARNING_OBJECT (demux, "upstream seek failed"); } + gst_flow_combiner_reset (demux->flowcombiner); /* Tell all the stream we moved to a different position (discont) */ demux->audio_need_discont = TRUE; demux->video_need_discont = TRUE; @@ -2709,6 +2781,11 @@ gst_event_unref (demux->new_seg_event); demux->new_seg_event = NULL; } + GST_DEBUG_OBJECT (demux, "preparing newsegment from %" + GST_TIME_FORMAT " to %" GST_TIME_FORMAT, + GST_TIME_ARGS (demux->segment.start), + GST_TIME_ARGS (demux->segment.stop)); + demux->new_seg_event = gst_event_new_segment (&demux->segment); gst_event_unref (event); } else { ret = gst_pad_push_event (demux->sinkpad, event); @@ -2821,7 +2898,6 @@ GST_OBJECT_UNLOCK (demux); flush = ! !(flags & GST_SEEK_FLAG_FLUSH); - /* FIXME : the keyframe flag is never used */ if (flush) { /* Flush start up and downstream to make sure data flow and loops are @@ -2876,9 +2952,10 @@ ret = TRUE; goto exit; } + /* now index should be as reliable as it can be for current purpose */ gst_flv_demux_move_to_offset (demux, - gst_flv_demux_find_offset (demux, &seeksegment), TRUE); + gst_flv_demux_find_offset (demux, &seeksegment, flags), TRUE); ret = TRUE; } else { ret = TRUE; @@ -2894,12 +2971,13 @@ memcpy (&demux->segment, &seeksegment, sizeof (GstSegment)); /* Notify about the start of a new segment */ - if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) { + if (demux->segment.flags & GST_SEGMENT_FLAG_SEGMENT) { gst_element_post_message (GST_ELEMENT (demux), gst_message_new_segment_start (GST_OBJECT (demux), demux->segment.format, demux->segment.position)); } + gst_flow_combiner_reset (demux->flowcombiner); /* Tell all the stream a new segment is needed */ demux->audio_need_segment = TRUE; demux->video_need_segment = TRUE; @@ -2909,15 +2987,11 @@ gst_event_unref (demux->new_seg_event); demux->new_seg_event = NULL; } - if (demux->segment.rate < 0.0) { - /* we can't generate a segment by locking on - * to the first timestamp we see */ - GST_DEBUG_OBJECT (demux, "preparing newsegment from %" - GST_TIME_FORMAT " to %" GST_TIME_FORMAT, - GST_TIME_ARGS (demux->segment.start), - GST_TIME_ARGS (demux->segment.stop)); - demux->new_seg_event = gst_event_new_segment (&demux->segment); - } + GST_DEBUG_OBJECT (demux, "preparing newsegment from %" + GST_TIME_FORMAT " to %" GST_TIME_FORMAT, + GST_TIME_ARGS (demux->segment.start), + GST_TIME_ARGS (demux->segment.stop)); + demux->new_seg_event = gst_event_new_segment (&demux->segment); } exit: @@ -3090,6 +3164,7 @@ demux->new_seg_event = NULL; } } + gst_flow_combiner_reset (demux->flowcombiner); break; } default: @@ -3113,9 +3188,12 @@ switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: /* Try to push upstream first */ + gst_event_ref (event); ret = gst_pad_push_event (demux->sinkpad, event); - if (ret) + if (ret) { + gst_event_unref (event); break; + } if (demux->random_access) { ret = gst_flv_demux_handle_seek_pull (demux, event, TRUE); } else { diff -Nru gst-plugins-good1.0-1.4.3/gst/flv/gstflvdemux.h gst-plugins-good1.0-1.6.1/gst/flv/gstflvdemux.h --- gst-plugins-good1.0-1.4.3/gst/flv/gstflvdemux.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flv/gstflvdemux.h 2015-10-22 08:02:54.000000000 +0000 @@ -118,7 +118,7 @@ gboolean got_par; GstBuffer * video_codec_data; GstClockTime video_start; - guint32 last_video_pts; + guint32 last_video_dts; GstClockTime video_time_offset; gdouble framerate; @@ -132,6 +132,11 @@ gboolean no_more_pads; +#ifndef GST_DISABLE_DEBUG + gboolean no_audio_warned; + gboolean no_video_warned; +#endif + gboolean seeking; gboolean building_index; gboolean indexed; /* TRUE if index is completely built */ diff -Nru gst-plugins-good1.0-1.4.3/gst/flv/gstflvmux.c gst-plugins-good1.0-1.6.1/gst/flv/gstflvmux.c --- gst-plugins-good1.0-1.4.3/gst/flv/gstflvmux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flv/gstflvmux.c 2015-10-22 08:02:54.000000000 +0000 @@ -253,6 +253,7 @@ mux->have_audio = mux->have_video = FALSE; mux->duration = GST_CLOCK_TIME_NONE; mux->new_tags = FALSE; + mux->first_timestamp = GST_CLOCK_STIME_NONE; mux->state = GST_FLV_MUX_STATE_HEADER; @@ -279,23 +280,37 @@ return gst_pad_event_default (pad, parent, event); } +/* Extract per-codec relevant tags for + * insertion into the metadata later - ie bitrate, + * but maybe others in the future */ +static void +gst_flv_mux_store_codec_tags (GstFlvMux * mux, + GstFlvPad * flvpad, GstTagList * list) +{ + /* Look for a bitrate as either nominal or actual bitrate tag */ + if (gst_tag_list_get_uint (list, GST_TAG_NOMINAL_BITRATE, &flvpad->bitrate) || + gst_tag_list_get_uint (list, GST_TAG_BITRATE, &flvpad->bitrate)) { + GST_DEBUG_OBJECT (mux, "Stored bitrate for pad %" GST_PTR_FORMAT " = %u", + flvpad, flvpad->bitrate); + } +} + static gboolean gst_flv_mux_handle_sink_event (GstCollectPads * pads, GstCollectData * data, GstEvent * event, gpointer user_data) { GstFlvMux *mux = GST_FLV_MUX (user_data); + GstFlvPad *flvpad = (GstFlvPad *) data; gboolean ret = TRUE; switch (GST_EVENT_TYPE (event)) { case GST_EVENT_CAPS: { GstCaps *caps; - GstFlvPad *flvpad; gst_event_parse_caps (event, &caps); /* find stream data */ - flvpad = (GstFlvPad *) data; g_assert (flvpad); if (flvpad->video) { @@ -315,6 +330,7 @@ gst_event_parse_tag (event, &list); gst_tag_setter_merge_tags (setter, list, mode); + gst_flv_mux_store_codec_tags (mux, flvpad, list); mux->new_tags = TRUE; ret = TRUE; gst_event_unref (event); @@ -530,6 +546,8 @@ cpad->video_codec_data = NULL; cpad->video_codec = G_MAXUINT; cpad->last_timestamp = 0; + cpad->pts = GST_CLOCK_STIME_NONE; + cpad->dts = GST_CLOCK_STIME_NONE; } static GstPad * @@ -885,6 +903,13 @@ script_tag = gst_buffer_append (script_tag, tmp); tags_written++; } + + GST_DEBUG_OBJECT (mux, "putting videodatarate %u KB/s in the metadata", + cpad->bitrate / 1024); + tmp = gst_flv_mux_create_number_script_value ("videodatarate", + cpad->bitrate / 1024); + script_tag = gst_buffer_append (script_tag, tmp); + tags_written++; } } @@ -909,6 +934,13 @@ cpad->audio_codec); script_tag = gst_buffer_append (script_tag, tmp); tags_written++; + + GST_DEBUG_OBJECT (mux, "putting audiodatarate %u KB/s in the metadata", + cpad->bitrate / 1024); + tmp = gst_flv_mux_create_number_script_value ("audiodatarate", + cpad->bitrate / 1024); + script_tag = gst_buffer_append (script_tag, tmp); + tags_written++; } } @@ -976,7 +1008,7 @@ data[1] = 0; data[2] = 9; /* end marker */ script_tag = gst_buffer_append (script_tag, tmp); - tags_written++; + _gst_buffer_new_and_alloc (4, &tmp, &data); GST_WRITE_UINT32_BE (data, gst_buffer_get_size (script_tag)); @@ -1001,15 +1033,36 @@ GstBuffer *tag; GstMapInfo map; guint size; - guint32 timestamp = - (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) ? GST_BUFFER_TIMESTAMP (buffer) / - GST_MSECOND : cpad->last_timestamp / GST_MSECOND; - guint8 *data, *bdata; - gsize bsize; - - gst_buffer_map (buffer, &map, GST_MAP_READ); - bdata = map.data; - bsize = map.size; + guint32 pts, dts, cts; + guint8 *data, *bdata = NULL; + gsize bsize = 0; + + if (!GST_CLOCK_STIME_IS_VALID (cpad->dts)) { + pts = dts = cpad->last_timestamp / GST_MSECOND; + } else { + pts = cpad->pts / GST_MSECOND; + dts = cpad->dts / GST_MSECOND; + } + + /* Be safe in case TS are buggy */ + if (pts > dts) + cts = pts - dts; + else + cts = 0; + + /* Timestamp must start at zero */ + if (GST_CLOCK_STIME_IS_VALID (mux->first_timestamp)) { + dts -= mux->first_timestamp / GST_MSECOND; + pts = dts + cts; + } + + GST_LOG_OBJECT (mux, "got pts %i dts %i cts %i\n", pts, dts, cts); + + if (buffer != NULL) { + gst_buffer_map (buffer, &map, GST_MAP_READ); + bdata = map.data; + bsize = map.size; + } size = 11; if (cpad->video) { @@ -1028,7 +1081,6 @@ size += 4; _gst_buffer_new_and_alloc (size, &tag, &data); - GST_BUFFER_TIMESTAMP (tag) = timestamp * GST_MSECOND; memset (data, 0, size); data[0] = (cpad->video) ? 9 : 8; @@ -1037,17 +1089,13 @@ data[2] = ((size - 11 - 4) >> 8) & 0xff; data[3] = ((size - 11 - 4) >> 0) & 0xff; - /* wrap the timestamp every G_MAXINT32 miliseconds */ - timestamp &= 0x7fffffff; - data[4] = (timestamp >> 16) & 0xff; - data[5] = (timestamp >> 8) & 0xff; - data[6] = (timestamp >> 0) & 0xff; - data[7] = (timestamp >> 24) & 0xff; + GST_WRITE_UINT24_BE (data + 4, dts); + data[7] = (((guint) dts) >> 24) & 0xff; data[8] = data[9] = data[10] = 0; if (cpad->video) { - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)) + if (buffer && GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)) data[11] |= 2 << 4; else data[11] |= 1 << 4; @@ -1055,11 +1103,18 @@ data[11] |= cpad->video_codec & 0x0f; if (cpad->video_codec == 7) { - data[12] = is_codec_data ? 0 : 1; - - /* FIXME: what to do about composition time */ - data[13] = data[14] = data[15] = 0; - + if (is_codec_data) { + data[12] = 0; + GST_WRITE_UINT24_BE (data + 13, 0); + } else if (bsize == 0) { + /* AVC end of sequence */ + data[12] = 2; + GST_WRITE_UINT24_BE (data + 13, 0); + } else { + /* ACV NALU */ + data[12] = 1; + GST_WRITE_UINT24_BE (data + 13, cts); + } memcpy (data + 11 + 1 + 4, bdata, bsize); } else { memcpy (data + 11 + 1, bdata, bsize); @@ -1079,23 +1134,29 @@ } } - gst_buffer_unmap (buffer, &map); + if (buffer) + gst_buffer_unmap (buffer, &map); GST_WRITE_UINT32_BE (data + size - 4, size - 4); - GST_BUFFER_TIMESTAMP (tag) = GST_BUFFER_TIMESTAMP (buffer); - GST_BUFFER_DURATION (tag) = GST_BUFFER_DURATION (buffer); - GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET (buffer); - GST_BUFFER_OFFSET_END (tag) = GST_BUFFER_OFFSET_END (buffer); - - /* mark the buffer if it's an audio buffer and there's also video being muxed - * or it's a video interframe */ - if ((mux->have_video && !cpad->video) || - GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)) + GST_BUFFER_PTS (tag) = GST_CLOCK_TIME_NONE; + GST_BUFFER_DTS (tag) = GST_CLOCK_TIME_NONE; + GST_BUFFER_DURATION (tag) = GST_CLOCK_TIME_NONE; + + if (buffer) { + GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET (buffer); + GST_BUFFER_OFFSET_END (tag) = GST_BUFFER_OFFSET_END (buffer); + + /* mark the buffer if it's an audio buffer and there's also video being muxed + * or it's a video interframe */ + if ((mux->have_video && !cpad->video) || + GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)) + GST_BUFFER_FLAG_SET (tag, GST_BUFFER_FLAG_DELTA_UNIT); + } else { GST_BUFFER_FLAG_SET (tag, GST_BUFFER_FLAG_DELTA_UNIT); - - GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET_END (tag) = - GST_BUFFER_OFFSET_NONE; + GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET_END (tag) = + GST_BUFFER_OFFSET_NONE; + } return tag; } @@ -1114,6 +1175,12 @@ return gst_flv_mux_buffer_to_tag_internal (mux, buffer, cpad, TRUE); } +static inline GstBuffer * +gst_flv_mux_eos_to_tag (GstFlvMux * mux, GstFlvPad * cpad) +{ + return gst_flv_mux_buffer_to_tag_internal (mux, NULL, cpad, FALSE); +} + static void gst_flv_mux_put_buffer_in_streamheader (GValue * streamheader, GstBuffer * buffer) @@ -1267,11 +1334,10 @@ GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT))) return; - if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) { + if (GST_BUFFER_PTS_IS_VALID (buffer)) { GstFlvMuxIndexEntry *entry = g_slice_new (GstFlvMuxIndexEntry); entry->position = mux->byte_count; - entry->time = - gst_guint64_to_gdouble (GST_BUFFER_TIMESTAMP (buffer)) / GST_SECOND; + entry->time = gst_guint64_to_gdouble (GST_BUFFER_PTS (buffer)) / GST_SECOND; mux->index = g_list_prepend (mux->index, entry); } } @@ -1281,6 +1347,7 @@ { GstBuffer *tag; GstFlowReturn ret; + GstClockTime dts = GST_BUFFER_DTS (buffer); /* clipping function arranged for running_time */ @@ -1293,8 +1360,9 @@ ret = gst_flv_mux_push (mux, tag); - if (ret == GST_FLOW_OK && GST_BUFFER_TIMESTAMP_IS_VALID (tag)) - cpad->last_timestamp = GST_BUFFER_TIMESTAMP (tag); + if (ret == GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (dts)) + cpad->last_timestamp = dts; + return ret; } @@ -1323,6 +1391,29 @@ } static GstFlowReturn +gst_flv_mux_write_eos (GstFlvMux * mux) +{ + GstBuffer *tag; + GstFlvPad *video_pad = NULL; + GSList *l = mux->collect->data; + + if (!mux->have_video) + return GST_FLOW_OK; + + for (; l; l = l->next) { + GstFlvPad *cpad = l->data; + if (cpad && cpad->video) { + video_pad = cpad; + break; + } + } + + tag = gst_flv_mux_eos_to_tag (mux, video_pad); + + return gst_flv_mux_push (mux, tag); +} + +static GstFlowReturn gst_flv_mux_rewrite_header (GstFlvMux * mux) { GstBuffer *rewrite, *index, *tmp; @@ -1466,7 +1557,7 @@ { GstFlvMux *mux = GST_FLV_MUX (user_data); GstFlvPad *best; - GstClockTime best_time; + gint64 best_time = GST_CLOCK_STIME_NONE; GstFlowReturn ret; if (mux->state == GST_FLV_MUX_STATE_HEADER) { @@ -1480,6 +1571,11 @@ if (ret != GST_FLOW_OK) return ret; mux->state = GST_FLV_MUX_STATE_DATA; + + if (GST_COLLECT_PADS_DTS_IS_VALID (cdata)) + mux->first_timestamp = GST_COLLECT_PADS_DTS (cdata); + else + mux->first_timestamp = 0; } if (mux->new_tags) { @@ -1492,15 +1588,27 @@ best = (GstFlvPad *) cdata; if (best) { g_assert (buffer); - best_time = GST_BUFFER_TIMESTAMP (buffer); + best->dts = GST_COLLECT_PADS_DTS (cdata); + + if (GST_CLOCK_STIME_IS_VALID (best->dts)) + best_time = best->dts - mux->first_timestamp; + + if (GST_BUFFER_PTS_IS_VALID (buffer)) + best->pts = GST_BUFFER_PTS (buffer); + else + best->pts = best->dts; + + GST_LOG_OBJECT (mux, "got buffer PTS %" GST_TIME_FORMAT " DTS %" + GST_STIME_FORMAT "\n", GST_TIME_ARGS (best->pts), + GST_STIME_ARGS (best->dts)); } else { - best_time = GST_CLOCK_TIME_NONE; + best_time = GST_CLOCK_STIME_NONE; } /* The FLV timestamp is an int32 field. For non-live streams error out if a bigger timestamp is seen, for live the timestamp will get wrapped in gst_flv_mux_buffer_to_tag */ - if (!mux->streamable && GST_CLOCK_TIME_IS_VALID (best_time) + if (!mux->streamable && (GST_CLOCK_STIME_IS_VALID (best_time)) && best_time / GST_MSECOND > G_MAXINT32) { GST_WARNING_OBJECT (mux, "Timestamp larger than FLV supports - EOS"); gst_buffer_unref (buffer); @@ -1511,6 +1619,8 @@ if (best) { return gst_flv_mux_write_buffer (mux, best, buffer); } else { + /* FIXME check return values */ + gst_flv_mux_write_eos (mux); gst_flv_mux_rewrite_header (mux); gst_pad_push_event (mux->srcpad, gst_event_new_eos ()); return GST_FLOW_EOS; diff -Nru gst-plugins-good1.0-1.4.3/gst/flv/gstflvmux.h gst-plugins-good1.0-1.6.1/gst/flv/gstflvmux.h --- gst-plugins-good1.0-1.4.3/gst/flv/gstflvmux.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flv/gstflvmux.h 2015-10-22 08:02:54.000000000 +0000 @@ -52,7 +52,11 @@ guint video_codec; GstBuffer *video_codec_data; + guint bitrate; + GstClockTime last_timestamp; + gint64 pts; + gint64 dts; } GstFlvPad; typedef enum @@ -78,6 +82,7 @@ GList *index; guint64 byte_count; guint64 duration; + gint64 first_timestamp; } GstFlvMux; typedef struct _GstFlvMuxClass { diff -Nru gst-plugins-good1.0-1.4.3/gst/flv/gstindex.c gst-plugins-good1.0-1.6.1/gst/flv/gstindex.c --- gst-plugins-good1.0-1.4.3/gst/flv/gstindex.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flv/gstindex.c 2015-10-22 08:02:54.000000000 +0000 @@ -70,8 +70,8 @@ enum { - ARG_0, - ARG_RESOLVER + PROP_0, + PROP_RESOLVER /* FILL ME */ }; @@ -178,7 +178,7 @@ gobject_class->get_property = gst_index_get_property; gobject_class->finalize = gst_index_finalize; - g_object_class_install_property (gobject_class, ARG_RESOLVER, + g_object_class_install_property (gobject_class, PROP_RESOLVER, g_param_spec_enum ("resolver", "Resolver", "Select a predefined object to string mapper", GST_TYPE_INDEX_RESOLVER, GST_INDEX_RESOLVER_PATH, @@ -250,7 +250,7 @@ index = GST_INDEX (object); switch (prop_id) { - case ARG_RESOLVER: + case PROP_RESOLVER: index->method = (GstIndexResolverMethod) g_value_get_enum (value); index->resolver = resolvers[index->method].resolver; index->resolver_user_data = resolvers[index->method].user_data; @@ -270,7 +270,7 @@ index = GST_INDEX (object); switch (prop_id) { - case ARG_RESOLVER: + case PROP_RESOLVER: g_value_set_enum (value, index->method); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/flv/Makefile.am gst-plugins-good1.0-1.6.1/gst/flv/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/flv/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flv/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -1,7 +1,8 @@ plugin_LTLIBRARIES = libgstflv.la libgstflv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@\ +libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ \ + -lgstvideo-@GST_API_VERSION@ \ $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) libgstflv_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} libgstflv_la_SOURCES = gstflvdemux.c gstflvmux.c @@ -10,17 +11,3 @@ noinst_HEADERS = gstflvdemux.h gstflvmux.h amfdefs.h gstindex.h EXTRA_DIST = gstindex.c gstmemindex.c - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstflv -:SHARED libgstflv \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstflv_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflv_la_CFLAGS) \ - -:LDFLAGS $(libgstflv_la_LDFLAGS) \ - $(libgstflv_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/flv/Makefile.in gst-plugins-good1.0-1.6.1/gst/flv/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/flv/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flv/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/flv -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -556,7 +564,8 @@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libgstflv.la libgstflv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@\ +libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ \ + -lgstvideo-@GST_API_VERSION@ \ $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) libgstflv_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} @@ -580,7 +589,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/flv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/flv/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -897,20 +905,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstflv -:SHARED libgstflv \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstflv_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflv_la_CFLAGS) \ - -:LDFLAGS $(libgstflv_la_LDFLAGS) \ - $(libgstflv_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/flx/Makefile.am gst-plugins-good1.0-1.6.1/gst/flx/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/flx/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flx/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -7,18 +7,3 @@ libgstflxdec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = flx_fmt.h flx_color.h gstflxdec.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstflxdec -:SHARED libgstflxdec \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstflxdec_la_SOURCES) \ - $(nodist_libgstflxdec_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflxdec_la_CFLAGS) \ - -:LDFLAGS $(libgstflxdec_la_LDFLAGS) \ - $(libgstflxdec_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/flx/Makefile.in gst-plugins-good1.0-1.6.1/gst/flx/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/flx/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/flx/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/flx -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -577,7 +585,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/flx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/flx/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -894,21 +901,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstflxdec -:SHARED libgstflxdec \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstflxdec_la_SOURCES) \ - $(nodist_libgstflxdec_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflxdec_la_CFLAGS) \ - -:LDFLAGS $(libgstflxdec_la_LDFLAGS) \ - $(libgstflxdec_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/goom_core.c gst-plugins-good1.0-1.6.1/gst/goom/goom_core.c --- gst-plugins-good1.0-1.4.3/gst/goom/goom_core.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/goom_core.c 2015-10-22 08:02:54.000000000 +0000 @@ -673,7 +673,7 @@ */ if ((goomInfo->update.stop_lines & 0xf000) || (!goomInfo->curGState->drawScope)) { - float param1, param2, amplitude; + float param1 = 0, param2 = 0, amplitude; int couleur; int mode; @@ -847,6 +847,9 @@ *amplitude = 1.5f; } break; + default: + *param1 = *param2 = 0; + break; } *couleur = goom_irand (goomInfo->gRandom, 6); diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/gstaudiovisualizer.c gst-plugins-good1.0-1.6.1/gst/goom/gstaudiovisualizer.c --- gst-plugins-good1.0-1.4.3/gst/goom/gstaudiovisualizer.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/gstaudiovisualizer.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,1455 @@ +/* GStreamer + * Copyright (C) <2011> Stefan Kost + * Copyright (C) <2015> Luis de Bethencourt + * + * gstaudiovisualizer.c: class for audio visualisation elements + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + */ +/** + * SECTION:gstaudiovisualizer + * + * A class for scopes (visualizers). It takes care of re-fitting the audio-rate + * to video-rate and handles renegotiation (downstream video size changes). + * + * It also provides several background shading effects. These effects are + * applied to a previous picture before the render() implementation can draw a + * new frame. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "gstaudiovisualizer.h" + +GST_DEBUG_CATEGORY_STATIC (audio_visualizer_debug); +#define GST_CAT_DEFAULT (audio_visualizer_debug) + +#define DEFAULT_SHADER GST_AUDIO_VISUALIZER_SHADER_FADE +#define DEFAULT_SHADE_AMOUNT 0x000a0a0a + +enum +{ + PROP_0, + PROP_SHADER, + PROP_SHADE_AMOUNT +}; + +static GstBaseTransformClass *parent_class = NULL; + +static void gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass); +static void gst_audio_visualizer_init (GstAudioVisualizer * scope, + GstAudioVisualizerClass * g_class); +static void gst_audio_visualizer_set_property (GObject * object, + guint prop_id, const GValue * value, GParamSpec * pspec); +static void gst_audio_visualizer_get_property (GObject * object, + guint prop_id, GValue * value, GParamSpec * pspec); +static void gst_audio_visualizer_finalize (GObject * object); + +static gboolean gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope); +static gboolean gst_audio_visualizer_src_setcaps (GstAudioVisualizer * + scope, GstCaps * caps); +static gboolean gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * + scope, GstCaps * caps); + +static GstFlowReturn gst_audio_visualizer_chain (GstPad * pad, + GstObject * parent, GstBuffer * buffer); + +static gboolean gst_audio_visualizer_src_event (GstPad * pad, + GstObject * parent, GstEvent * event); +static gboolean gst_audio_visualizer_sink_event (GstPad * pad, + GstObject * parent, GstEvent * event); + +static gboolean gst_audio_visualizer_src_query (GstPad * pad, + GstObject * parent, GstQuery * query); + +static GstStateChangeReturn gst_audio_visualizer_change_state (GstElement * + element, GstStateChange transition); + +static gboolean gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, + GstCaps * outcaps); + +static gboolean +default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query); + +#define GST_AUDIO_VISUALIZER_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_AUDIO_VISUALIZER, GstAudioVisualizerPrivate)) + +struct _GstAudioVisualizerPrivate +{ + gboolean negotiated; + + GstBufferPool *pool; + gboolean pool_active; + GstAllocator *allocator; + GstAllocationParams params; + GstQuery *query; + + /* pads */ + GstPad *srcpad, *sinkpad; + + GstAudioVisualizerShader shader_type; + GstAudioVisualizerShaderFunc shader; + guint32 shade_amount; + + GstAdapter *adapter; + + GstBuffer *inbuf; + GstBuffer *tempbuf; + GstVideoFrame tempframe; + + guint spf; /* samples per video frame */ + guint64 frame_duration; + + /* QoS stuff *//* with LOCK */ + gdouble proportion; + GstClockTime earliest_time; + + guint dropped; /* frames dropped / not dropped */ + guint processed; + + /* configuration mutex */ + GMutex config_lock; + + GstSegment segment; +}; + +/* shading functions */ + +#define GST_TYPE_AUDIO_VISUALIZER_SHADER (gst_audio_visualizer_shader_get_type()) +static GType +gst_audio_visualizer_shader_get_type (void) +{ + static GType shader_type = 0; + static const GEnumValue shaders[] = { + {GST_AUDIO_VISUALIZER_SHADER_NONE, "None", "none"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE, "Fade", "fade"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, "Fade and move up", + "fade-and-move-up"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, "Fade and move down", + "fade-and-move-down"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, "Fade and move left", + "fade-and-move-left"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, + "Fade and move right", + "fade-and-move-right"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, + "Fade and move horizontally out", "fade-and-move-horiz-out"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, + "Fade and move horizontally in", "fade-and-move-horiz-in"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, + "Fade and move vertically out", "fade-and-move-vert-out"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN, + "Fade and move vertically in", "fade-and-move-vert-in"}, + {0, NULL, NULL}, + }; + + if (G_UNLIKELY (shader_type == 0)) { + /* TODO: rename when exporting it as a library */ + shader_type = + g_enum_register_static ("GstAudioVisualizerShader-ExtGoom", shaders); + } + return shader_type; +} + +/* we're only supporting GST_VIDEO_FORMAT_xRGB right now) */ +#if G_BYTE_ORDER == G_LITTLE_ENDIAN + +#define SHADE(_d, _s, _i, _r, _g, _b) \ +G_STMT_START { \ + _d[_i * 4 + 0] = (_s[_i * 4 + 0] > _b) ? _s[_i * 4 + 0] - _b : 0; \ + _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _g) ? _s[_i * 4 + 1] - _g : 0; \ + _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _r) ? _s[_i * 4 + 2] - _r : 0; \ + _d[_i * 4 + 3] = 0; \ +} G_STMT_END + +#else /* G_BYTE_ORDER == G_LITTLE_ENDIAN */ + +#define SHADE(_d, _s, _i, _r, _g, _b) \ +G_STMT_START { \ + _d[_i * 4 + 0] = 0; \ + _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _r) ? _s[_i * 4 + 1] - _r : 0; \ + _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _g) ? _s[_i * 4 + 2] - _g : 0; \ + _d[_i * 4 + 3] = (_s[_i * 4 + 3] > _b) ? _s[_i * 4 + 3] - _b : 0; \ +} G_STMT_END + +#endif + +static void +shader_fade (GstAudioVisualizer * scope, const GstVideoFrame * sframe, + GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + d += ds; + } +} + +static void +shader_fade_and_move_up (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 1; j < height; j++) { + s += ss; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + } +} + +static void +shader_fade_and_move_down (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 1; j < height; j++) { + d += ds; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + } +} + +static void +shader_fade_and_move_left (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + width -= 1; + s += 4; + + /* move to the left */ + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + s += ss; + } +} + +static void +shader_fade_and_move_right (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + width -= 1; + d += 4; + + /* move to the right */ + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + s += ss; + } +} + +static void +shader_fade_and_move_horiz_out (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + /* move upper half up */ + for (j = 0; j < height / 2; j++) { + s += ss; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + } + /* move lower half down */ + for (j = 0; j < height / 2; j++) { + d += ds; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + } +} + +static void +shader_fade_and_move_horiz_in (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + /* move upper half down */ + for (j = 0; j < height / 2; j++) { + d += ds; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + } + /* move lower half up */ + for (j = 0; j < height / 2; j++) { + s += ss; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + } +} + +static void +shader_fade_and_move_vert_out (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *s1, *d, *d1; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 0; j < height; j++) { + /* move left half to the left */ + s1 = s + 1; + for (i = 0; i < width / 2; i++) { + SHADE (d, s1, i, r, g, b); + } + /* move right half to the right */ + d1 = d + 1; + for (; i < width - 1; i++) { + SHADE (d1, s, i, r, g, b); + } + s += ss; + d += ds; + } +} + +static void +shader_fade_and_move_vert_in (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *s1, *d, *d1; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 0; j < height; j++) { + /* move left half to the right */ + d1 = d + 1; + for (i = 0; i < width / 2; i++) { + SHADE (d1, s, i, r, g, b); + } + /* move right half to the left */ + s1 = s + 1; + for (; i < width - 1; i++) { + SHADE (d, s1, i, r, g, b); + } + s += ss; + d += ds; + } +} + +static void +gst_audio_visualizer_change_shader (GstAudioVisualizer * scope) +{ + GstAudioVisualizerShaderFunc shader; + + switch (scope->priv->shader_type) { + case GST_AUDIO_VISUALIZER_SHADER_NONE: + shader = NULL; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE: + shader = shader_fade; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: + shader = shader_fade_and_move_up; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: + shader = shader_fade_and_move_down; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: + shader = shader_fade_and_move_left; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: + shader = shader_fade_and_move_right; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: + shader = shader_fade_and_move_horiz_out; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: + shader = shader_fade_and_move_horiz_in; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: + shader = shader_fade_and_move_vert_out; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: + shader = shader_fade_and_move_vert_in; + break; + default: + GST_ERROR ("invalid shader function"); + shader = NULL; + break; + } + + scope->priv->shader = shader; +} + +/* class */ + +GType +goom_gst_audio_visualizer_get_type (void) +{ + static volatile gsize audio_visualizer_type = 0; + + if (g_once_init_enter (&audio_visualizer_type)) { + static const GTypeInfo audio_visualizer_info = { + sizeof (GstAudioVisualizerClass), + NULL, + NULL, + (GClassInitFunc) gst_audio_visualizer_class_init, + NULL, + NULL, + sizeof (GstAudioVisualizer), + 0, + (GInstanceInitFunc) gst_audio_visualizer_init, + }; + GType _type; + + /* TODO: rename when exporting it as a library */ + _type = g_type_register_static (GST_TYPE_ELEMENT, + "GstAudioVisualizer-ExtGoom", &audio_visualizer_info, + G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&audio_visualizer_type, _type); + } + return (GType) audio_visualizer_type; +} + +static void +gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass) +{ + GObjectClass *gobject_class = (GObjectClass *) klass; + GstElementClass *element_class = (GstElementClass *) klass; + + g_type_class_add_private (klass, sizeof (GstAudioVisualizerPrivate)); + + parent_class = g_type_class_peek_parent (klass); + + GST_DEBUG_CATEGORY_INIT (audio_visualizer_debug, + "audiovisualizer-goom", 0, "audio visualisation class"); + + gobject_class->set_property = gst_audio_visualizer_set_property; + gobject_class->get_property = gst_audio_visualizer_get_property; + gobject_class->finalize = gst_audio_visualizer_finalize; + + element_class->change_state = + GST_DEBUG_FUNCPTR (gst_audio_visualizer_change_state); + + klass->decide_allocation = GST_DEBUG_FUNCPTR (default_decide_allocation); + + g_object_class_install_property (gobject_class, PROP_SHADER, + g_param_spec_enum ("shader", "shader type", + "Shader function to apply on each frame", + GST_TYPE_AUDIO_VISUALIZER_SHADER, DEFAULT_SHADER, + G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_SHADE_AMOUNT, + g_param_spec_uint ("shade-amount", "shade amount", + "Shading color to use (big-endian ARGB)", 0, G_MAXUINT32, + DEFAULT_SHADE_AMOUNT, + G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); +} + +static void +gst_audio_visualizer_init (GstAudioVisualizer * scope, + GstAudioVisualizerClass * g_class) +{ + GstPadTemplate *pad_template; + + scope->priv = GST_AUDIO_VISUALIZER_GET_PRIVATE (scope); + + /* create the sink and src pads */ + pad_template = + gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "sink"); + g_return_if_fail (pad_template != NULL); + scope->priv->sinkpad = gst_pad_new_from_template (pad_template, "sink"); + gst_pad_set_chain_function (scope->priv->sinkpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_chain)); + gst_pad_set_event_function (scope->priv->sinkpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_event)); + gst_element_add_pad (GST_ELEMENT (scope), scope->priv->sinkpad); + + pad_template = + gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "src"); + g_return_if_fail (pad_template != NULL); + scope->priv->srcpad = gst_pad_new_from_template (pad_template, "src"); + gst_pad_set_event_function (scope->priv->srcpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_event)); + gst_pad_set_query_function (scope->priv->srcpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_query)); + gst_element_add_pad (GST_ELEMENT (scope), scope->priv->srcpad); + + scope->priv->adapter = gst_adapter_new (); + scope->priv->inbuf = gst_buffer_new (); + + /* properties */ + scope->priv->shader_type = DEFAULT_SHADER; + gst_audio_visualizer_change_shader (scope); + scope->priv->shade_amount = DEFAULT_SHADE_AMOUNT; + + /* reset the initial video state */ + gst_video_info_init (&scope->vinfo); + scope->priv->frame_duration = GST_CLOCK_TIME_NONE; + + /* reset the initial state */ + gst_audio_info_init (&scope->ainfo); + gst_video_info_init (&scope->vinfo); + + g_mutex_init (&scope->priv->config_lock); +} + +static void +gst_audio_visualizer_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); + + switch (prop_id) { + case PROP_SHADER: + scope->priv->shader_type = g_value_get_enum (value); + gst_audio_visualizer_change_shader (scope); + break; + case PROP_SHADE_AMOUNT: + scope->priv->shade_amount = g_value_get_uint (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_audio_visualizer_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); + + switch (prop_id) { + case PROP_SHADER: + g_value_set_enum (value, scope->priv->shader_type); + break; + case PROP_SHADE_AMOUNT: + g_value_set_uint (value, scope->priv->shade_amount); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_audio_visualizer_finalize (GObject * object) +{ + GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); + GstAudioVisualizerPrivate *priv = scope->priv; + + if (priv->adapter) { + g_object_unref (priv->adapter); + priv->adapter = NULL; + } + if (priv->inbuf) { + gst_buffer_unref (priv->inbuf); + priv->inbuf = NULL; + } + if (priv->tempbuf) { + gst_video_frame_unmap (&priv->tempframe); + gst_buffer_unref (priv->tempbuf); + priv->tempbuf = NULL; + } + + g_mutex_clear (&priv->config_lock); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gst_audio_visualizer_reset (GstAudioVisualizer * scope) +{ + GstAudioVisualizerPrivate *priv = scope->priv; + + gst_adapter_clear (priv->adapter); + gst_segment_init (&priv->segment, GST_FORMAT_UNDEFINED); + + GST_OBJECT_LOCK (scope); + priv->proportion = 1.0; + priv->earliest_time = -1; + priv->dropped = 0; + priv->processed = 0; + GST_OBJECT_UNLOCK (scope); +} + +static gboolean +gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * scope, GstCaps * caps) +{ + GstAudioInfo info; + + if (!gst_audio_info_from_caps (&info, caps)) + goto wrong_caps; + + scope->ainfo = info; + + GST_DEBUG_OBJECT (scope, "audio: channels %d, rate %d", + GST_AUDIO_INFO_CHANNELS (&info), GST_AUDIO_INFO_RATE (&info)); + + if (!gst_audio_visualizer_src_negotiate (scope)) { + goto not_negotiated; + } + + return TRUE; + + /* Errors */ +wrong_caps: + { + GST_WARNING_OBJECT (scope, "could not parse caps"); + return FALSE; + } +not_negotiated: + { + GST_WARNING_OBJECT (scope, "failed to negotiate"); + return FALSE; + } +} + +static gboolean +gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps) +{ + GstVideoInfo info; + GstAudioVisualizerClass *klass; + GstAudioVisualizerPrivate *priv; + gboolean res; + + if (!gst_video_info_from_caps (&info, caps)) + goto wrong_caps; + + klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); + + priv = scope->priv; + + scope->vinfo = info; + + priv->frame_duration = gst_util_uint64_scale_int (GST_SECOND, + GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); + priv->spf = gst_util_uint64_scale_int (GST_AUDIO_INFO_RATE (&scope->ainfo), + GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); + scope->req_spf = priv->spf; + + if (priv->tempbuf) { + gst_video_frame_unmap (&priv->tempframe); + gst_buffer_unref (priv->tempbuf); + } + priv->tempbuf = gst_buffer_new_wrapped (g_malloc0 (scope->vinfo.size), + scope->vinfo.size); + gst_video_frame_map (&priv->tempframe, &scope->vinfo, priv->tempbuf, + GST_MAP_READWRITE); + + if (klass->setup && !klass->setup (scope)) + goto setup_failed; + + GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d", + GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info), + GST_VIDEO_INFO_FPS_N (&info), GST_VIDEO_INFO_FPS_D (&info)); + GST_DEBUG_OBJECT (scope, "blocks: spf %u, req_spf %u", priv->spf, + scope->req_spf); + + gst_pad_set_caps (priv->srcpad, caps); + + /* find a pool for the negotiated caps now */ + res = gst_audio_visualizer_do_bufferpool (scope, caps); + gst_caps_unref (caps); + + return res; + + /* ERRORS */ +wrong_caps: + { + gst_caps_unref (caps); + GST_DEBUG_OBJECT (scope, "error parsing caps"); + return FALSE; + } + +setup_failed: + { + GST_WARNING_OBJECT (scope, "failed to set up"); + return FALSE; + } +} + +static gboolean +gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope) +{ + GstCaps *othercaps, *target; + GstStructure *structure; + GstCaps *templ; + gboolean ret; + + templ = gst_pad_get_pad_template_caps (scope->priv->srcpad); + + GST_DEBUG_OBJECT (scope, "performing negotiation"); + + /* see what the peer can do */ + othercaps = gst_pad_peer_query_caps (scope->priv->srcpad, NULL); + if (othercaps) { + target = gst_caps_intersect (othercaps, templ); + gst_caps_unref (othercaps); + gst_caps_unref (templ); + + if (gst_caps_is_empty (target)) + goto no_format; + + target = gst_caps_truncate (target); + } else { + target = templ; + } + + target = gst_caps_make_writable (target); + structure = gst_caps_get_structure (target, 0); + gst_structure_fixate_field_nearest_int (structure, "width", 320); + gst_structure_fixate_field_nearest_int (structure, "height", 200); + gst_structure_fixate_field_nearest_fraction (structure, "framerate", 25, 1); + + target = gst_caps_fixate (target); + + GST_DEBUG_OBJECT (scope, "final caps are %" GST_PTR_FORMAT, target); + + ret = gst_audio_visualizer_src_setcaps (scope, target); + + return ret; + +no_format: + { + gst_caps_unref (target); + return FALSE; + } +} + +/* takes ownership of the pool, allocator and query */ +static gboolean +gst_audio_visualizer_set_allocation (GstAudioVisualizer * scope, + GstBufferPool * pool, GstAllocator * allocator, + GstAllocationParams * params, GstQuery * query) +{ + GstAllocator *oldalloc; + GstBufferPool *oldpool; + GstQuery *oldquery; + GstAudioVisualizerPrivate *priv = scope->priv; + + GST_OBJECT_LOCK (scope); + oldpool = priv->pool; + priv->pool = pool; + priv->pool_active = FALSE; + + oldalloc = priv->allocator; + priv->allocator = allocator; + + oldquery = priv->query; + priv->query = query; + + if (params) + priv->params = *params; + else + gst_allocation_params_init (&priv->params); + GST_OBJECT_UNLOCK (scope); + + if (oldpool) { + GST_DEBUG_OBJECT (scope, "deactivating old pool %p", oldpool); + gst_buffer_pool_set_active (oldpool, FALSE); + gst_object_unref (oldpool); + } + if (oldalloc) { + gst_object_unref (oldalloc); + } + if (oldquery) { + gst_query_unref (oldquery); + } + return TRUE; +} + +static gboolean +gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, + GstCaps * outcaps) +{ + GstQuery *query; + gboolean result = TRUE; + GstBufferPool *pool = NULL; + GstAudioVisualizerClass *klass; + GstAllocator *allocator; + GstAllocationParams params; + + /* not passthrough, we need to allocate */ + /* find a pool for the negotiated caps now */ + GST_DEBUG_OBJECT (scope, "doing allocation query"); + query = gst_query_new_allocation (outcaps, TRUE); + + if (!gst_pad_peer_query (scope->priv->srcpad, query)) { + /* not a problem, we use the query defaults */ + GST_DEBUG_OBJECT (scope, "allocation query failed"); + } + + klass = GST_AUDIO_VISUALIZER_GET_CLASS (scope); + + GST_DEBUG_OBJECT (scope, "calling decide_allocation"); + g_assert (klass->decide_allocation != NULL); + result = klass->decide_allocation (scope, query); + + GST_DEBUG_OBJECT (scope, "ALLOCATION (%d) params: %" GST_PTR_FORMAT, result, + query); + + if (!result) + goto no_decide_allocation; + + /* we got configuration from our peer or the decide_allocation method, + * parse them */ + if (gst_query_get_n_allocation_params (query) > 0) { + gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); + } else { + allocator = NULL; + gst_allocation_params_init (¶ms); + } + + if (gst_query_get_n_allocation_pools (query) > 0) + gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL); + + /* now store */ + result = + gst_audio_visualizer_set_allocation (scope, pool, allocator, ¶ms, + query); + + return result; + + /* Errors */ +no_decide_allocation: + { + GST_WARNING_OBJECT (scope, "Subclass failed to decide allocation"); + gst_query_unref (query); + + return result; + } +} + +static gboolean +default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query) +{ + GstCaps *outcaps; + GstBufferPool *pool; + guint size, min, max; + GstAllocator *allocator; + GstAllocationParams params; + GstStructure *config; + gboolean update_allocator; + gboolean update_pool; + + gst_query_parse_allocation (query, &outcaps, NULL); + + /* we got configuration from our peer or the decide_allocation method, + * parse them */ + if (gst_query_get_n_allocation_params (query) > 0) { + /* try the allocator */ + gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); + update_allocator = TRUE; + } else { + allocator = NULL; + gst_allocation_params_init (¶ms); + update_allocator = FALSE; + } + + if (gst_query_get_n_allocation_pools (query) > 0) { + gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); + update_pool = TRUE; + } else { + pool = NULL; + size = GST_VIDEO_INFO_SIZE (&scope->vinfo); + min = max = 0; + update_pool = FALSE; + } + + if (pool == NULL) { + /* we did not get a pool, make one ourselves then */ + pool = gst_video_buffer_pool_new (); + } + + config = gst_buffer_pool_get_config (pool); + gst_buffer_pool_config_set_params (config, outcaps, size, min, max); + gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); + gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); + gst_buffer_pool_set_config (pool, config); + + if (update_allocator) + gst_query_set_nth_allocation_param (query, 0, allocator, ¶ms); + else + gst_query_add_allocation_param (query, allocator, ¶ms); + + if (allocator) + gst_object_unref (allocator); + + if (update_pool) + gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max); + else + gst_query_add_allocation_pool (query, pool, size, min, max); + + if (pool) + gst_object_unref (pool); + + return TRUE; +} + +static GstFlowReturn +default_prepare_output_buffer (GstAudioVisualizer * scope, GstBuffer ** outbuf) +{ + GstAudioVisualizerPrivate *priv; + + priv = scope->priv; + + g_assert (priv->pool != NULL); + + /* we can't reuse the input buffer */ + if (!priv->pool_active) { + GST_DEBUG_OBJECT (scope, "setting pool %p active", priv->pool); + if (!gst_buffer_pool_set_active (priv->pool, TRUE)) + goto activate_failed; + priv->pool_active = TRUE; + } + GST_DEBUG_OBJECT (scope, "using pool alloc"); + + return gst_buffer_pool_acquire_buffer (priv->pool, outbuf, NULL); + + /* ERRORS */ +activate_failed: + { + GST_ELEMENT_ERROR (scope, RESOURCE, SETTINGS, + ("failed to activate bufferpool"), ("failed to activate bufferpool")); + return GST_FLOW_ERROR; + } +} + +static GstFlowReturn +gst_audio_visualizer_chain (GstPad * pad, GstObject * parent, + GstBuffer * buffer) +{ + GstFlowReturn ret = GST_FLOW_OK; + GstAudioVisualizer *scope; + GstAudioVisualizerPrivate *priv; + GstAudioVisualizerClass *klass; + GstBuffer *inbuf; + guint64 dist, ts; + guint avail, sbpf; + gpointer adata; + gint bps, channels, rate; + + scope = GST_AUDIO_VISUALIZER (parent); + priv = scope->priv; + klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); + + GST_LOG_OBJECT (scope, "chainfunc called"); + + /* resync on DISCONT */ + if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { + gst_adapter_clear (priv->adapter); + } + + /* Make sure have an output format */ + if (gst_pad_check_reconfigure (priv->srcpad)) { + if (!gst_audio_visualizer_src_negotiate (scope)) { + gst_pad_mark_reconfigure (priv->srcpad); + goto not_negotiated; + } + } + + channels = GST_AUDIO_INFO_CHANNELS (&scope->ainfo); + rate = GST_AUDIO_INFO_RATE (&scope->ainfo); + bps = GST_AUDIO_INFO_BPS (&scope->ainfo); + + if (bps == 0) { + ret = GST_FLOW_NOT_NEGOTIATED; + goto beach; + } + + gst_adapter_push (priv->adapter, buffer); + + g_mutex_lock (&priv->config_lock); + + /* this is what we want */ + sbpf = scope->req_spf * channels * sizeof (gint16); + + inbuf = priv->inbuf; + /* FIXME: the timestamp in the adapter would be different */ + gst_buffer_copy_into (inbuf, buffer, GST_BUFFER_COPY_METADATA, 0, -1); + + /* this is what we have */ + avail = gst_adapter_available (priv->adapter); + GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); + while (avail >= sbpf) { + GstBuffer *outbuf; + GstVideoFrame outframe; + + /* get timestamp of the current adapter content */ + ts = gst_adapter_prev_pts (priv->adapter, &dist); + if (GST_CLOCK_TIME_IS_VALID (ts)) { + /* convert bytes to time */ + dist /= bps; + ts += gst_util_uint64_scale_int (dist, GST_SECOND, rate); + } + + /* check for QoS, don't compute buffers that are known to be late */ + if (GST_CLOCK_TIME_IS_VALID (ts)) { + GstClockTime earliest_time; + gdouble proportion; + gint64 qostime; + + qostime = + gst_segment_to_running_time (&priv->segment, GST_FORMAT_TIME, + ts) + priv->frame_duration; + + GST_OBJECT_LOCK (scope); + earliest_time = priv->earliest_time; + proportion = priv->proportion; + GST_OBJECT_UNLOCK (scope); + + if (GST_CLOCK_TIME_IS_VALID (earliest_time) && qostime <= earliest_time) { + GstClockTime stream_time, jitter; + GstMessage *qos_msg; + + GST_DEBUG_OBJECT (scope, + "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT, + GST_TIME_ARGS (qostime), GST_TIME_ARGS (earliest_time)); + + ++priv->dropped; + stream_time = gst_segment_to_stream_time (&priv->segment, + GST_FORMAT_TIME, ts); + jitter = GST_CLOCK_DIFF (qostime, earliest_time); + qos_msg = gst_message_new_qos (GST_OBJECT (scope), FALSE, qostime, + stream_time, ts, GST_BUFFER_DURATION (buffer)); + gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000); + gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS, + priv->processed, priv->dropped); + gst_element_post_message (GST_ELEMENT (scope), qos_msg); + + goto skip; + } + } + + ++priv->processed; + + g_mutex_unlock (&priv->config_lock); + ret = default_prepare_output_buffer (scope, &outbuf); + g_mutex_lock (&priv->config_lock); + /* recheck as the value could have changed */ + sbpf = scope->req_spf * channels * sizeof (gint16); + + /* no buffer allocated, we don't care why. */ + if (ret != GST_FLOW_OK) + break; + + /* sync controlled properties */ + if (GST_CLOCK_TIME_IS_VALID (ts)) + gst_object_sync_values (GST_OBJECT (scope), ts); + + GST_BUFFER_TIMESTAMP (outbuf) = ts; + GST_BUFFER_DURATION (outbuf) = priv->frame_duration; + + /* this can fail as the data size we need could have changed */ + if (!(adata = (gpointer) gst_adapter_map (priv->adapter, sbpf))) + break; + + gst_video_frame_map (&outframe, &scope->vinfo, outbuf, GST_MAP_READWRITE); + + if (priv->shader) { + gst_video_frame_copy (&outframe, &priv->tempframe); + } else { + /* gst_video_frame_clear() or is output frame already cleared */ + gint i; + + for (i = 0; i < scope->vinfo.finfo->n_planes; i++) { + memset (outframe.data[i], 0, outframe.map[i].size); + } + } + + gst_buffer_replace_all_memory (inbuf, + gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0, + sbpf, NULL, NULL)); + + /* call class->render() vmethod */ + if (klass->render) { + if (!klass->render (scope, inbuf, &outframe)) { + ret = GST_FLOW_ERROR; + gst_video_frame_unmap (&outframe); + goto beach; + } else { + /* run various post processing (shading and geometric transformation) */ + /* FIXME: SHADER assumes 32bpp */ + if (priv->shader && GST_VIDEO_INFO_COMP_PSTRIDE (&scope->vinfo, 0) == 4) { + priv->shader (scope, &outframe, &priv->tempframe); + } + } + } + gst_video_frame_unmap (&outframe); + + g_mutex_unlock (&priv->config_lock); + ret = gst_pad_push (priv->srcpad, outbuf); + outbuf = NULL; + g_mutex_lock (&priv->config_lock); + + skip: + /* recheck as the value could have changed */ + sbpf = scope->req_spf * channels * sizeof (gint16); + GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); + /* we want to take less or more, depending on spf : req_spf */ + if (avail - sbpf >= sbpf) { + gst_adapter_flush (priv->adapter, sbpf); + gst_adapter_unmap (priv->adapter); + } else if (avail >= sbpf) { + /* just flush a bit and stop */ + gst_adapter_flush (priv->adapter, (avail - sbpf)); + gst_adapter_unmap (priv->adapter); + break; + } + avail = gst_adapter_available (priv->adapter); + + if (ret != GST_FLOW_OK) + break; + } + + g_mutex_unlock (&priv->config_lock); + +beach: + return ret; + + /* ERRORS */ +not_negotiated: + { + GST_DEBUG_OBJECT (scope, "Failed to renegotiate"); + return GST_FLOW_NOT_NEGOTIATED; + } +} + +static gboolean +gst_audio_visualizer_src_event (GstPad * pad, GstObject * parent, + GstEvent * event) +{ + gboolean res; + GstAudioVisualizer *scope; + GstAudioVisualizerPrivate *priv; + + scope = GST_AUDIO_VISUALIZER (parent); + priv = scope->priv; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_QOS: + { + gdouble proportion; + GstClockTimeDiff diff; + GstClockTime timestamp; + + gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); + + /* save stuff for the _chain() function */ + GST_OBJECT_LOCK (scope); + priv->proportion = proportion; + if (diff >= 0) + /* we're late, this is a good estimate for next displayable + * frame (see part-qos.txt) */ + priv->earliest_time = timestamp + 2 * diff + priv->frame_duration; + else + priv->earliest_time = timestamp + diff; + GST_OBJECT_UNLOCK (scope); + + res = gst_pad_push_event (priv->sinkpad, event); + break; + } + case GST_EVENT_RECONFIGURE: + /* dont't forward */ + gst_event_unref (event); + res = TRUE; + break; + default: + res = gst_pad_event_default (pad, parent, event); + break; + } + + return res; +} + +static gboolean +gst_audio_visualizer_sink_event (GstPad * pad, GstObject * parent, + GstEvent * event) +{ + gboolean res; + GstAudioVisualizer *scope; + + scope = GST_AUDIO_VISUALIZER (parent); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CAPS: + { + GstCaps *caps; + + gst_event_parse_caps (event, &caps); + res = gst_audio_visualizer_sink_setcaps (scope, caps); + gst_event_unref (event); + break; + } + case GST_EVENT_FLUSH_STOP: + gst_audio_visualizer_reset (scope); + res = gst_pad_push_event (scope->priv->srcpad, event); + break; + case GST_EVENT_SEGMENT: + { + /* the newsegment values are used to clip the input samples + * and to convert the incomming timestamps to running time so + * we can do QoS */ + gst_event_copy_segment (event, &scope->priv->segment); + + res = gst_pad_push_event (scope->priv->srcpad, event); + break; + } + default: + res = gst_pad_event_default (pad, parent, event); + break; + } + + return res; +} + +static gboolean +gst_audio_visualizer_src_query (GstPad * pad, GstObject * parent, + GstQuery * query) +{ + gboolean res = FALSE; + GstAudioVisualizer *scope; + + scope = GST_AUDIO_VISUALIZER (parent); + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_LATENCY: + { + /* We need to send the query upstream and add the returned latency to our + * own */ + GstClockTime min_latency, max_latency; + gboolean us_live; + GstClockTime our_latency; + guint max_samples; + gint rate = GST_AUDIO_INFO_RATE (&scope->ainfo); + + if (rate == 0) + break; + + if ((res = gst_pad_peer_query (scope->priv->sinkpad, query))) { + gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); + + GST_DEBUG_OBJECT (scope, "Peer latency: min %" + GST_TIME_FORMAT " max %" GST_TIME_FORMAT, + GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); + + /* the max samples we must buffer buffer */ + max_samples = MAX (scope->req_spf, scope->priv->spf); + our_latency = gst_util_uint64_scale_int (max_samples, GST_SECOND, rate); + + GST_DEBUG_OBJECT (scope, "Our latency: %" GST_TIME_FORMAT, + GST_TIME_ARGS (our_latency)); + + /* we add some latency but only if we need to buffer more than what + * upstream gives us */ + min_latency += our_latency; + if (max_latency != -1) + max_latency += our_latency; + + GST_DEBUG_OBJECT (scope, "Calculated total latency : min %" + GST_TIME_FORMAT " max %" GST_TIME_FORMAT, + GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); + + gst_query_set_latency (query, TRUE, min_latency, max_latency); + } + break; + } + default: + res = gst_pad_query_default (pad, parent, query); + break; + } + + return res; +} + +static GstStateChangeReturn +gst_audio_visualizer_change_state (GstElement * element, + GstStateChange transition) +{ + GstStateChangeReturn ret; + GstAudioVisualizer *scope; + + scope = GST_AUDIO_VISUALIZER (element); + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + gst_audio_visualizer_reset (scope); + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_audio_visualizer_set_allocation (scope, NULL, NULL, NULL, NULL); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + + return ret; +} diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/gstaudiovisualizer.h gst-plugins-good1.0-1.6.1/gst/goom/gstaudiovisualizer.h --- gst-plugins-good1.0-1.4.3/gst/goom/gstaudiovisualizer.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/gstaudiovisualizer.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,105 @@ +/* GStreamer + * Copyright (C) <2011> Stefan Kost + * Copyright (C) <2015> Luis de Bethencourt + * + * gstaudiovisualizer.c: base class for audio visualisation elements + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_AUDIO_VISUALIZER_H__ +#define __GST_AUDIO_VISUALIZER_H__ + +#include +#include + +#include +#include +#include + +G_BEGIN_DECLS +#define GST_TYPE_AUDIO_VISUALIZER (goom_gst_audio_visualizer_get_type()) +#define GST_AUDIO_VISUALIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizer)) +#define GST_AUDIO_VISUALIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) +#define GST_AUDIO_VISUALIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) +#define GST_IS_SYNAESTHESIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_VISUALIZER)) +#define GST_IS_SYNAESTHESIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_VISUALIZER)) +typedef struct _GstAudioVisualizer GstAudioVisualizer; +typedef struct _GstAudioVisualizerClass GstAudioVisualizerClass; +typedef struct _GstAudioVisualizerPrivate GstAudioVisualizerPrivate; + +typedef void (*GstAudioVisualizerShaderFunc)(GstAudioVisualizer *scope, const GstVideoFrame *s, GstVideoFrame *d); + +/** + * GstAudioVisualizerShader: + * @GST_AUDIO_VISUALIZER_SHADER_NONE: no shading + * @GST_AUDIO_VISUALIZER_SHADER_FADE: plain fading + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: fade and move up + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: fade and move down + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: fade and move left + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: fade and move right + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: fade and move horizontally out + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: fade and move horizontally in + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: fade and move vertically out + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: fade and move vertically in + * + * Different types of supported background shading functions. + */ +typedef enum { + GST_AUDIO_VISUALIZER_SHADER_NONE, + GST_AUDIO_VISUALIZER_SHADER_FADE, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN +} GstAudioVisualizerShader; + +struct _GstAudioVisualizer +{ + GstElement parent; + + guint req_spf; /* min samples per frame wanted by the subclass */ + + /* video state */ + GstVideoInfo vinfo; + + /* audio state */ + GstAudioInfo ainfo; + + /* */ + GstAudioVisualizerPrivate *priv; +}; + +struct _GstAudioVisualizerClass +{ + GstElementClass parent_class; + + /* virtual function, called whenever the format changes */ + gboolean (*setup) (GstAudioVisualizer * scope); + + /* virtual function for rendering a frame */ + gboolean (*render) (GstAudioVisualizer * scope, GstBuffer * audio, GstVideoFrame * video); + + gboolean (*decide_allocation) (GstAudioVisualizer * scope, GstQuery *query); +}; + +GType goom_gst_audio_visualizer_get_type (void); + +G_END_DECLS +#endif /* __GST_AUDIO_VISUALIZER_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/gstgoom.c gst-plugins-good1.0-1.6.1/gst/goom/gstgoom.c --- gst-plugins-good1.0-1.4.3/gst/goom/gstgoom.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/gstgoom.c 2015-10-22 08:02:54.000000000 +0000 @@ -2,6 +2,7 @@ * Copyright (C) <2001> Richard Boulton * (C) <2006> Wim Taymans * (C) <2011> Wim Taymans + * (C) <2015> Luis de Bethencourt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -39,10 +40,7 @@ #endif #include -#include #include "gstgoom.h" -#include -#include #include "goom.h" #if HAVE_ORC @@ -54,8 +52,6 @@ #define DEFAULT_WIDTH 320 #define DEFAULT_HEIGHT 240 -#define DEFAULT_FPS_N 25 -#define DEFAULT_FPS_D 1 /* signals and args */ enum @@ -98,32 +94,22 @@ static void gst_goom_finalize (GObject * object); -static GstStateChangeReturn gst_goom_change_state (GstElement * element, - GstStateChange transition); +static gboolean gst_goom_setup (GstAudioVisualizer * base); +static gboolean gst_goom_render (GstAudioVisualizer * base, GstBuffer * audio, + GstVideoFrame * video); -static GstFlowReturn gst_goom_chain (GstPad * pad, GstObject * parent, - GstBuffer * buffer); -static gboolean gst_goom_src_event (GstPad * pad, GstObject * parent, - GstEvent * event); -static gboolean gst_goom_sink_event (GstPad * pad, GstObject * parent, - GstEvent * event); - -static gboolean gst_goom_src_query (GstPad * pad, GstObject * parent, - GstQuery * query); - -static gboolean gst_goom_src_negotiate (GstGoom * goom); - -#define gst_goom_parent_class parent_class -G_DEFINE_TYPE (GstGoom, gst_goom, GST_TYPE_ELEMENT); +G_DEFINE_TYPE (GstGoom, gst_goom, GST_TYPE_AUDIO_VISUALIZER); static void gst_goom_class_init (GstGoomClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; + GstAudioVisualizerClass *visualizer_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; + visualizer_class = (GstAudioVisualizerClass *) klass; gobject_class->finalize = gst_goom_finalize; @@ -136,36 +122,16 @@ gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_template)); - gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_goom_change_state); + visualizer_class->setup = GST_DEBUG_FUNCPTR (gst_goom_setup); + visualizer_class->render = GST_DEBUG_FUNCPTR (gst_goom_render); } static void gst_goom_init (GstGoom * goom) { - /* create the sink and src pads */ - goom->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink"); - gst_pad_set_chain_function (goom->sinkpad, - GST_DEBUG_FUNCPTR (gst_goom_chain)); - gst_pad_set_event_function (goom->sinkpad, - GST_DEBUG_FUNCPTR (gst_goom_sink_event)); - gst_element_add_pad (GST_ELEMENT (goom), goom->sinkpad); - - goom->srcpad = gst_pad_new_from_static_template (&src_template, "src"); - gst_pad_set_event_function (goom->srcpad, - GST_DEBUG_FUNCPTR (gst_goom_src_event)); - gst_pad_set_query_function (goom->srcpad, - GST_DEBUG_FUNCPTR (gst_goom_src_query)); - gst_element_add_pad (GST_ELEMENT (goom), goom->srcpad); - - goom->adapter = gst_adapter_new (); - goom->width = DEFAULT_WIDTH; goom->height = DEFAULT_HEIGHT; - goom->fps_n = DEFAULT_FPS_N; /* desired frame rate */ - goom->fps_d = DEFAULT_FPS_D; /* desired frame rate */ goom->channels = 0; - goom->rate = 0; - goom->duration = 0; goom->plugin = goom_init (goom->width, goom->height); } @@ -178,491 +144,50 @@ goom_close (goom->plugin); goom->plugin = NULL; - g_object_unref (goom->adapter); - if (goom->pool) - gst_object_unref (goom->pool); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void -gst_goom_reset (GstGoom * goom) -{ - gst_adapter_clear (goom->adapter); - gst_segment_init (&goom->segment, GST_FORMAT_UNDEFINED); - - GST_OBJECT_LOCK (goom); - goom->proportion = 1.0; - goom->earliest_time = -1; - GST_OBJECT_UNLOCK (goom); + G_OBJECT_CLASS (gst_goom_parent_class)->finalize (object); } static gboolean -gst_goom_sink_setcaps (GstGoom * goom, GstCaps * caps) +gst_goom_setup (GstAudioVisualizer * base) { - GstStructure *structure; + GstGoom *goom = GST_GOOM (base); - structure = gst_caps_get_structure (caps, 0); - - gst_structure_get_int (structure, "channels", &goom->channels); - gst_structure_get_int (structure, "rate", &goom->rate); - - goom->bps = goom->channels * sizeof (gint16); - - return gst_goom_src_negotiate (goom); -} - -static gboolean -gst_goom_src_setcaps (GstGoom * goom, GstCaps * caps) -{ - GstStructure *structure; - gboolean res; - - structure = gst_caps_get_structure (caps, 0); - if (!gst_structure_get_int (structure, "width", &goom->width) || - !gst_structure_get_int (structure, "height", &goom->height) || - !gst_structure_get_fraction (structure, "framerate", &goom->fps_n, - &goom->fps_d)) - goto error; - - goom_set_resolution (goom->plugin, goom->width, goom->height); - - /* size of the output buffer in bytes, depth is always 4 bytes */ - goom->outsize = goom->width * goom->height * 4; - goom->duration = - gst_util_uint64_scale_int (GST_SECOND, goom->fps_d, goom->fps_n); - goom->spf = gst_util_uint64_scale_int (goom->rate, goom->fps_d, goom->fps_n); - goom->bpf = goom->spf * goom->bps; - - GST_DEBUG_OBJECT (goom, "dimension %dx%d, framerate %d/%d, spf %d", - goom->width, goom->height, goom->fps_n, goom->fps_d, goom->spf); - - res = gst_pad_set_caps (goom->srcpad, caps); - - return res; - - /* ERRORS */ -error: - { - GST_DEBUG_OBJECT (goom, "error parsing caps"); - return FALSE; - } -} - -static gboolean -gst_goom_src_negotiate (GstGoom * goom) -{ - GstCaps *othercaps, *target; - GstStructure *structure; - GstCaps *templ; - GstQuery *query; - GstBufferPool *pool; - GstStructure *config; - guint size, min, max; - - templ = gst_pad_get_pad_template_caps (goom->srcpad); - - GST_DEBUG_OBJECT (goom, "performing negotiation"); - - /* see what the peer can do */ - othercaps = gst_pad_peer_query_caps (goom->srcpad, NULL); - if (othercaps) { - target = gst_caps_intersect (othercaps, templ); - gst_caps_unref (othercaps); - gst_caps_unref (templ); - - if (gst_caps_is_empty (target)) - goto no_format; - - target = gst_caps_truncate (target); - } else { - target = templ; - } - - target = gst_caps_make_writable (target); - structure = gst_caps_get_structure (target, 0); - gst_structure_fixate_field_nearest_int (structure, "width", DEFAULT_WIDTH); - gst_structure_fixate_field_nearest_int (structure, "height", DEFAULT_HEIGHT); - gst_structure_fixate_field_nearest_fraction (structure, "framerate", - DEFAULT_FPS_N, DEFAULT_FPS_D); - - gst_goom_src_setcaps (goom, target); - - /* try to get a bufferpool now */ - /* find a pool for the negotiated caps now */ - query = gst_query_new_allocation (target, TRUE); - - if (!gst_pad_peer_query (goom->srcpad, query)) { - /* no problem, we use the query defaults */ - GST_DEBUG_OBJECT (goom, "ALLOCATION query failed"); - } - - if (gst_query_get_n_allocation_pools (query) > 0) { - /* we got configuration from our peer, parse them */ - gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); - } else { - pool = NULL; - size = goom->outsize; - min = max = 0; - } - - if (pool == NULL) { - /* we did not get a pool, make one ourselves then */ - pool = gst_buffer_pool_new (); - } - - config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set_params (config, target, size, min, max); - gst_buffer_pool_set_config (pool, config); - - if (goom->pool) { - gst_buffer_pool_set_active (goom->pool, FALSE); - gst_object_unref (goom->pool); - } - goom->pool = pool; - - /* and activate */ - gst_buffer_pool_set_active (pool, TRUE); - - gst_caps_unref (target); + goom->width = GST_VIDEO_INFO_WIDTH (&base->vinfo); + goom->height = GST_VIDEO_INFO_HEIGHT (&base->vinfo); return TRUE; - -no_format: - { - gst_caps_unref (target); - return FALSE; - } -} - -static gboolean -gst_goom_src_event (GstPad * pad, GstObject * parent, GstEvent * event) -{ - gboolean res; - GstGoom *goom; - - goom = GST_GOOM (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_QOS: - { - gdouble proportion; - GstClockTimeDiff diff; - GstClockTime timestamp; - - gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); - - /* save stuff for the _chain() function */ - GST_OBJECT_LOCK (goom); - goom->proportion = proportion; - if (diff >= 0) - /* we're late, this is a good estimate for next displayable - * frame (see part-qos.txt) */ - goom->earliest_time = timestamp + 2 * diff + goom->duration; - else - goom->earliest_time = timestamp + diff; - GST_OBJECT_UNLOCK (goom); - - res = gst_pad_event_default (pad, parent, event); - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; -} - -static gboolean -gst_goom_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) -{ - gboolean res; - GstGoom *goom; - - goom = GST_GOOM (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - res = gst_goom_sink_setcaps (goom, caps); - gst_event_unref (event); - break; - } - case GST_EVENT_FLUSH_STOP: - gst_goom_reset (goom); - res = gst_pad_event_default (pad, parent, event); - break; - case GST_EVENT_SEGMENT: - { - /* the newsegment values are used to clip the input samples - * and to convert the incomming timestamps to running time so - * we can do QoS */ - gst_event_copy_segment (event, &goom->segment); - - res = gst_pad_event_default (pad, parent, event); - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; } static gboolean -gst_goom_src_query (GstPad * pad, GstObject * parent, GstQuery * query) +gst_goom_render (GstAudioVisualizer * base, GstBuffer * audio, + GstVideoFrame * video) { - gboolean res = FALSE; - GstGoom *goom; - - goom = GST_GOOM (parent); - - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_LATENCY: - { - /* We need to send the query upstream and add the returned latency to our - * own */ - GstClockTime min_latency, max_latency; - gboolean us_live; - GstClockTime our_latency; - guint max_samples; - - if (goom->rate == 0) - break; - - if ((res = gst_pad_peer_query (goom->sinkpad, query))) { - gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); - - GST_DEBUG_OBJECT (goom, "Peer latency: min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - /* the max samples we must buffer buffer */ - max_samples = MAX (GOOM_SAMPLES, goom->spf); - our_latency = - gst_util_uint64_scale_int (max_samples, GST_SECOND, goom->rate); - - GST_DEBUG_OBJECT (goom, "Our latency: %" GST_TIME_FORMAT, - GST_TIME_ARGS (our_latency)); - - /* we add some latency but only if we need to buffer more than what - * upstream gives us */ - min_latency += our_latency; - if (max_latency != -1) - max_latency += our_latency; - - GST_DEBUG_OBJECT (goom, "Calculated total latency : min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - gst_query_set_latency (query, TRUE, min_latency, max_latency); - } - break; + GstGoom *goom = GST_GOOM (base); + GstMapInfo amap; + gint16 datain[2][GOOM_SAMPLES]; + gint16 *adata; + gint i; + + /* get next GOOM_SAMPLES, we have at least this amount of samples */ + gst_buffer_map (audio, &amap, GST_MAP_READ); + adata = (gint16 *) amap.data; + + if (goom->channels == 2) { + for (i = 0; i < GOOM_SAMPLES; i++) { + datain[0][i] = *adata++; + datain[1][i] = *adata++; } - default: - res = gst_pad_query_default (pad, parent, query); - break; - } - - return res; -} - -/* make sure we are negotiated */ -static GstFlowReturn -ensure_negotiated (GstGoom * goom) -{ - if (gst_pad_check_reconfigure (goom->srcpad)) { - if (!gst_goom_src_negotiate (goom)) - return GST_FLOW_NOT_NEGOTIATED; - } - return GST_FLOW_OK; -} - - -static GstFlowReturn -gst_goom_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) -{ - GstGoom *goom; - GstFlowReturn ret; - GstBuffer *outbuf = NULL; - - goom = GST_GOOM (parent); - if (goom->bps == 0) { - gst_buffer_unref (buffer); - ret = GST_FLOW_NOT_NEGOTIATED; - goto beach; - } - - /* Make sure have an output format */ - ret = ensure_negotiated (goom); - if (ret != GST_FLOW_OK) { - gst_buffer_unref (buffer); - goto beach; - } - - /* don't try to combine samples from discont buffer */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { - gst_adapter_clear (goom->adapter); - } - - GST_DEBUG_OBJECT (goom, - "Input buffer has %" G_GSIZE_FORMAT " samples, time=%" G_GUINT64_FORMAT, - gst_buffer_get_size (buffer) / goom->bps, GST_BUFFER_TIMESTAMP (buffer)); - - /* Collect samples until we have enough for an output frame */ - gst_adapter_push (goom->adapter, buffer); - - ret = GST_FLOW_OK; - - while (TRUE) { - const guint16 *data; - guchar *out_frame; - gint i; - guint avail, to_flush; - guint64 dist, timestamp; - - avail = gst_adapter_available (goom->adapter); - GST_DEBUG_OBJECT (goom, "avail now %u", avail); - - /* we need GOOM_SAMPLES to get a meaningful result from goom. */ - if (avail < (GOOM_SAMPLES * goom->bps)) - break; - - /* we also need enough samples to produce one frame at least */ - if (avail < goom->bpf) - break; - - GST_DEBUG_OBJECT (goom, "processing buffer"); - - /* get timestamp of the current adapter byte */ - timestamp = gst_adapter_prev_pts (goom->adapter, &dist); - if (GST_CLOCK_TIME_IS_VALID (timestamp)) { - /* convert bytes to time */ - dist /= goom->bps; - timestamp += gst_util_uint64_scale_int (dist, GST_SECOND, goom->rate); - } - - if (GST_CLOCK_TIME_IS_VALID (timestamp)) { - gint64 qostime; - gboolean need_skip; - - qostime = gst_segment_to_running_time (&goom->segment, GST_FORMAT_TIME, - timestamp) + goom->duration; - - GST_OBJECT_LOCK (goom); - /* check for QoS, don't compute buffers that are known to be late */ - need_skip = goom->earliest_time != -1 && qostime <= goom->earliest_time; - GST_OBJECT_UNLOCK (goom); - - if (need_skip) { - GST_WARNING_OBJECT (goom, - "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT, - GST_TIME_ARGS (qostime), GST_TIME_ARGS (goom->earliest_time)); - goto skip; - } - } - - /* get next GOOM_SAMPLES, we have at least this amount of samples */ - data = - (const guint16 *) gst_adapter_map (goom->adapter, - GOOM_SAMPLES * goom->bps); - - if (goom->channels == 2) { - for (i = 0; i < GOOM_SAMPLES; i++) { - goom->datain[0][i] = *data++; - goom->datain[1][i] = *data++; - } - } else { - for (i = 0; i < GOOM_SAMPLES; i++) { - goom->datain[0][i] = *data; - goom->datain[1][i] = *data++; - } - } - - /* alloc a buffer if we don't have one yet, this happens - * when we pushed a buffer in this while loop before */ - if (outbuf == NULL) { - GST_DEBUG_OBJECT (goom, "allocating output buffer"); - ret = gst_buffer_pool_acquire_buffer (goom->pool, &outbuf, NULL); - if (ret != GST_FLOW_OK) { - gst_adapter_unmap (goom->adapter); - goto beach; - } + } else { + for (i = 0; i < GOOM_SAMPLES; i++) { + datain[0][i] = *adata; + datain[1][i] = *adata++; } - - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; - GST_BUFFER_DURATION (outbuf) = goom->duration; - - out_frame = (guchar *) goom_update (goom->plugin, goom->datain, 0, 0); - gst_buffer_fill (outbuf, 0, out_frame, goom->outsize); - - gst_adapter_unmap (goom->adapter); - - GST_DEBUG ("Pushing frame with time=%" GST_TIME_FORMAT ", duration=%" - GST_TIME_FORMAT, GST_TIME_ARGS (timestamp), - GST_TIME_ARGS (goom->duration)); - - ret = gst_pad_push (goom->srcpad, outbuf); - outbuf = NULL; - - skip: - /* Now flush the samples we needed for this frame, which might be more than - * the samples we used (GOOM_SAMPLES). */ - to_flush = goom->bpf; - - GST_DEBUG_OBJECT (goom, "finished frame, flushing %u bytes from input", - to_flush); - gst_adapter_flush (goom->adapter, to_flush); - - if (ret != GST_FLOW_OK) - break; } - if (outbuf != NULL) - gst_buffer_unref (outbuf); - -beach: - - return ret; -} - -static GstStateChangeReturn -gst_goom_change_state (GstElement * element, GstStateChange transition) -{ - GstGoom *goom = GST_GOOM (element); - GstStateChangeReturn ret; + video->data[0] = goom_update (goom->plugin, datain, 0, 0); + gst_buffer_unmap (audio, &amap); - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - gst_goom_reset (goom); - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - - switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: - if (goom->pool) { - gst_buffer_pool_set_active (goom->pool, FALSE); - gst_object_replace ((GstObject **) & goom->pool, NULL); - } - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return ret; + return TRUE; } static gboolean diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/gstgoom.h gst-plugins-good1.0-1.6.1/gst/goom/gstgoom.h --- gst-plugins-good1.0-1.4.3/gst/goom/gstgoom.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/gstgoom.h 2015-10-22 08:02:54.000000000 +0000 @@ -1,5 +1,6 @@ /* gstgoom.c: implementation of goom drawing element * Copyright (C) <2001> Richard Boulton + * Copyright (C) <2015> Luis de Bethencourt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,12 +21,11 @@ #ifndef __GST_GOOM_H__ #define __GST_GOOM_H__ -G_BEGIN_DECLS - -#include -#include +#include "gstaudiovisualizer.h" #include "goom.h" +G_BEGIN_DECLS + #define GOOM_SAMPLES 512 #define GST_TYPE_GOOM (gst_goom_get_type()) @@ -39,49 +39,26 @@ struct _GstGoom { - GstElement element; - - /* pads */ - GstPad *sinkpad, *srcpad; - GstAdapter *adapter; + GstAudioVisualizer parent; /* input tracking */ - gint rate; gint channels; - guint bps; /* video state */ - gint fps_n; - gint fps_d; gint width; gint height; - GstClockTime duration; - guint outsize; - GstBufferPool *pool; - - /* samples per frame */ - guint spf; - /* bytes per frame */ - guint bpf; /* goom stuff */ - gint16 datain[2][GOOM_SAMPLES]; PluginInfo *plugin; - - /* segment state */ - GstSegment segment; - - /* QoS stuff *//* with LOCK */ - gdouble proportion; - GstClockTime earliest_time; }; struct _GstGoomClass { - GstElementClass parent_class; + GstAudioVisualizerClass parent_class; }; GType gst_goom_get_type (void); +gboolean gst_goom_plugin_init (GstPlugin * plugin); G_END_DECLS diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/ifs.c gst-plugins-good1.0-1.6.1/gst/goom/ifs.c --- gst-plugins-good1.0-1.4.3/gst/goom/ifs.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/ifs.c 2015-10-22 08:02:54.000000000 +0000 @@ -605,7 +605,7 @@ if (((col[VERT] > 32) && (col[ROUGE] < col[VERT] + 40) && (col[VERT] < col[ROUGE] + 20) && (col[BLEU] < 64) && (RAND () % 20 == 0)) && (justChanged < 0)) { - mode = RAND () % 3 ? MOD_FEU : MOD_MERVER; + mode = (RAND () % 3) ? MOD_FEU : MOD_MERVER; justChanged = 250; } } else if (mode == MOD_MERVER) { @@ -656,7 +656,7 @@ if (((col[VERT] > 32) && (col[ROUGE] < col[VERT] + 40) && (col[VERT] < col[ROUGE] + 20) && (col[BLEU] < 64) && (RAND () % 20 == 0)) && (justChanged < 0)) { - mode = RAND () % 3 ? MOD_FEU : MOD_MER; + mode = (RAND () % 3) ? MOD_FEU : MOD_MER; justChanged = 250; } } else if (mode == MOD_FEU) { @@ -714,7 +714,7 @@ if (((col[ROUGE] < 64) && (col[VERT] > 32) && (col[VERT] < col[BLEU]) && (col[BLEU] > 32) && (RAND () % 20 == 0)) && (justChanged < 0)) { - mode = RAND () % 2 ? MOD_MER : MOD_MERVER; + mode = (RAND () % 2) ? MOD_MER : MOD_MERVER; justChanged = 250; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/Makefile.am gst-plugins-good1.0-1.6.1/gst/goom/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/goom/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -35,27 +35,14 @@ goom.h goom_typedefs.h goom_graphic.h \ goom_config_param.h goom_visual_fx.h goom_filters.h \ goom_tools.h goom_tools.h goom_config.h \ + gstaudiovisualizer.c gstaudiovisualizer.h \ $(ARCH_FILES) libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) $(ARCH_CFLAGS) $(ORC_CFLAGS) -libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) $(ORC_LIBS) +libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) $(LIBM) $(ORC_LIBS) libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) EXTRA_DIST = $(PPC_FILES) $(MMX_FILES) .NOTPARALLEL: - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstgoom -:SHARED libgstgoom \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstgoom_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom_la_CFLAGS) \ - -:LDFLAGS $(libgstgoom_la_LDFLAGS) \ - $(libgstgoom_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/goom/Makefile.in gst-plugins-good1.0-1.6.1/gst/goom/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/goom/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,8 +90,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/goom -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp README 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 \ @@ -103,7 +111,6 @@ $(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 \ @@ -118,6 +125,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -163,8 +171,8 @@ motif_goom2.h plugin_info.c goom_plugin_info.h goom_tools.c \ config_param.c filters.c goom_core.c graphic.c goom.h \ goom_typedefs.h goom_graphic.h goom_config_param.h \ - goom_filters.h goom_tools.h goom_config.h mmx.c xmmx.c mmx.h \ - xmmx.h + goom_filters.h goom_tools.h goom_config.h gstaudiovisualizer.c \ + gstaudiovisualizer.h mmx.c xmmx.c mmx.h xmmx.h am__objects_1 = libgstgoom_la-mmx.lo libgstgoom_la-xmmx.lo @HAVE_CPU_I386_TRUE@am__objects_2 = $(am__objects_1) am_libgstgoom_la_OBJECTS = libgstgoom_la-gstgoom.lo \ @@ -176,7 +184,7 @@ libgstgoom_la-plugin_info.lo libgstgoom_la-goom_tools.lo \ libgstgoom_la-config_param.lo libgstgoom_la-filters.lo \ libgstgoom_la-goom_core.lo libgstgoom_la-graphic.lo \ - $(am__objects_2) + libgstgoom_la-gstaudiovisualizer.lo $(am__objects_2) libgstgoom_la_OBJECTS = $(am_libgstgoom_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -246,6 +254,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -378,9 +387,6 @@ 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@ @@ -498,17 +504,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -561,6 +567,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -601,10 +608,11 @@ goom.h goom_typedefs.h goom_graphic.h \ goom_config_param.h goom_visual_fx.h goom_filters.h \ goom_tools.h goom_tools.h goom_config.h \ + gstaudiovisualizer.c gstaudiovisualizer.h \ $(ARCH_FILES) libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) $(ARCH_CFLAGS) $(ORC_CFLAGS) -libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) $(ORC_LIBS) +libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) $(LIBM) $(ORC_LIBS) libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) EXTRA_DIST = $(PPC_FILES) $(MMX_FILES) @@ -624,7 +632,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/goom/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/goom/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -695,6 +702,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-goom_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-goom_tools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-graphic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-gstgoom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-ifs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-lines.Plo@am__quote@ @@ -850,6 +858,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -c -o libgstgoom_la-graphic.lo `test -f 'graphic.c' || echo '$(srcdir)/'`graphic.c +libgstgoom_la-gstaudiovisualizer.lo: gstaudiovisualizer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -MT libgstgoom_la-gstaudiovisualizer.lo -MD -MP -MF $(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Tpo -c -o libgstgoom_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Tpo $(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstaudiovisualizer.c' object='libgstgoom_la-gstaudiovisualizer.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 $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -c -o libgstgoom_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c + libgstgoom_la-mmx.lo: mmx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -MT libgstgoom_la-mmx.lo -MD -MP -MF $(DEPDIR)/libgstgoom_la-mmx.Tpo -c -o libgstgoom_la-mmx.lo `test -f 'mmx.c' || echo '$(srcdir)/'`mmx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstgoom_la-mmx.Tpo $(DEPDIR)/libgstgoom_la-mmx.Plo @@ -1077,23 +1092,11 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + .NOTPARALLEL: -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstgoom -:SHARED libgstgoom \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstgoom_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom_la_CFLAGS) \ - -:LDFLAGS $(libgstgoom_la_LDFLAGS) \ - $(libgstgoom_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: diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/filters.c gst-plugins-good1.0-1.6.1/gst/goom2k1/filters.c --- gst-plugins-good1.0-1.4.3/gst/goom2k1/filters.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/filters.c 2015-10-22 08:02:54.000000000 +0000 @@ -334,48 +334,6 @@ sintable[us] = (int) (1024.0f * sin (us * 2 * 3.31415f / 0xffff)); } } - - { - int loopv; - - for (loopv = zf->res_y; loopv != 0;) { - int decc = 0; - int spdc = 0; - int accel = 0; - - loopv--; - zf->firedec[loopv] = decc; - decc += spdc / 10; - spdc += RAND (gd) % 3; - spdc -= RAND (gd) % 3; - - if (decc > 4) - spdc -= 1; - if (decc < -4) - spdc += 1; - - if (spdc > 30) - spdc = spdc - RAND (gd) % 3 + accel / 10; - if (spdc < -30) - spdc = spdc + RAND (gd) % 3 + accel / 10; - - if (decc > 8 && spdc > 1) - spdc -= RAND (gd) % 3 - 2; - - if (decc < -8 && spdc < -1) - spdc += RAND (gd) % 3 + 2; - - if (decc > 8 || decc < -8) - decc = decc * 8 / 9; - - accel += RAND (gd) % 2; - accel -= RAND (gd) % 2; - if (accel > 20) - accel -= 2; - if (accel < -20) - accel += 2; - } - } } void diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/gstaudiovisualizer.c gst-plugins-good1.0-1.6.1/gst/goom2k1/gstaudiovisualizer.c --- gst-plugins-good1.0-1.4.3/gst/goom2k1/gstaudiovisualizer.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/gstaudiovisualizer.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,1455 @@ +/* GStreamer + * Copyright (C) <2011> Stefan Kost + * Copyright (C) <2015> Luis de Bethencourt + * + * gstaudiovisualizer.c: class for audio visualisation elements + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + */ +/** + * SECTION:gstaudiovisualizer + * + * A class for scopes (visualizers). It takes care of re-fitting the audio-rate + * to video-rate and handles renegotiation (downstream video size changes). + * + * It also provides several background shading effects. These effects are + * applied to a previous picture before the render() implementation can draw a + * new frame. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "gstaudiovisualizer.h" + +GST_DEBUG_CATEGORY_STATIC (audio_visualizer_debug); +#define GST_CAT_DEFAULT (audio_visualizer_debug) + +#define DEFAULT_SHADER GST_AUDIO_VISUALIZER_SHADER_FADE +#define DEFAULT_SHADE_AMOUNT 0x000a0a0a + +enum +{ + PROP_0, + PROP_SHADER, + PROP_SHADE_AMOUNT +}; + +static GstBaseTransformClass *parent_class = NULL; + +static void gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass); +static void gst_audio_visualizer_init (GstAudioVisualizer * scope, + GstAudioVisualizerClass * g_class); +static void gst_audio_visualizer_set_property (GObject * object, + guint prop_id, const GValue * value, GParamSpec * pspec); +static void gst_audio_visualizer_get_property (GObject * object, + guint prop_id, GValue * value, GParamSpec * pspec); +static void gst_audio_visualizer_finalize (GObject * object); + +static gboolean gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope); +static gboolean gst_audio_visualizer_src_setcaps (GstAudioVisualizer * + scope, GstCaps * caps); +static gboolean gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * + scope, GstCaps * caps); + +static GstFlowReturn gst_audio_visualizer_chain (GstPad * pad, + GstObject * parent, GstBuffer * buffer); + +static gboolean gst_audio_visualizer_src_event (GstPad * pad, + GstObject * parent, GstEvent * event); +static gboolean gst_audio_visualizer_sink_event (GstPad * pad, + GstObject * parent, GstEvent * event); + +static gboolean gst_audio_visualizer_src_query (GstPad * pad, + GstObject * parent, GstQuery * query); + +static GstStateChangeReturn gst_audio_visualizer_change_state (GstElement * + element, GstStateChange transition); + +static gboolean gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, + GstCaps * outcaps); + +static gboolean +default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query); + +#define GST_AUDIO_VISUALIZER_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_AUDIO_VISUALIZER, GstAudioVisualizerPrivate)) + +struct _GstAudioVisualizerPrivate +{ + gboolean negotiated; + + GstBufferPool *pool; + gboolean pool_active; + GstAllocator *allocator; + GstAllocationParams params; + GstQuery *query; + + /* pads */ + GstPad *srcpad, *sinkpad; + + GstAudioVisualizerShader shader_type; + GstAudioVisualizerShaderFunc shader; + guint32 shade_amount; + + GstAdapter *adapter; + + GstBuffer *inbuf; + GstBuffer *tempbuf; + GstVideoFrame tempframe; + + guint spf; /* samples per video frame */ + guint64 frame_duration; + + /* QoS stuff *//* with LOCK */ + gdouble proportion; + GstClockTime earliest_time; + + guint dropped; /* frames dropped / not dropped */ + guint processed; + + /* configuration mutex */ + GMutex config_lock; + + GstSegment segment; +}; + +/* shading functions */ + +#define GST_TYPE_AUDIO_VISUALIZER_SHADER (gst_audio_visualizer_shader_get_type()) +static GType +gst_audio_visualizer_shader_get_type (void) +{ + static GType shader_type = 0; + static const GEnumValue shaders[] = { + {GST_AUDIO_VISUALIZER_SHADER_NONE, "None", "none"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE, "Fade", "fade"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, "Fade and move up", + "fade-and-move-up"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, "Fade and move down", + "fade-and-move-down"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, "Fade and move left", + "fade-and-move-left"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, + "Fade and move right", + "fade-and-move-right"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, + "Fade and move horizontally out", "fade-and-move-horiz-out"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, + "Fade and move horizontally in", "fade-and-move-horiz-in"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, + "Fade and move vertically out", "fade-and-move-vert-out"}, + {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN, + "Fade and move vertically in", "fade-and-move-vert-in"}, + {0, NULL, NULL}, + }; + + if (G_UNLIKELY (shader_type == 0)) { + /* TODO: rename when exporting it as a library */ + shader_type = + g_enum_register_static ("GstAudioVisualizerShader-ExtGoom2k1", shaders); + } + return shader_type; +} + +/* we're only supporting GST_VIDEO_FORMAT_xRGB right now) */ +#if G_BYTE_ORDER == G_LITTLE_ENDIAN + +#define SHADE(_d, _s, _i, _r, _g, _b) \ +G_STMT_START { \ + _d[_i * 4 + 0] = (_s[_i * 4 + 0] > _b) ? _s[_i * 4 + 0] - _b : 0; \ + _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _g) ? _s[_i * 4 + 1] - _g : 0; \ + _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _r) ? _s[_i * 4 + 2] - _r : 0; \ + _d[_i * 4 + 3] = 0; \ +} G_STMT_END + +#else /* G_BYTE_ORDER == G_LITTLE_ENDIAN */ + +#define SHADE(_d, _s, _i, _r, _g, _b) \ +G_STMT_START { \ + _d[_i * 4 + 0] = 0; \ + _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _r) ? _s[_i * 4 + 1] - _r : 0; \ + _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _g) ? _s[_i * 4 + 2] - _g : 0; \ + _d[_i * 4 + 3] = (_s[_i * 4 + 3] > _b) ? _s[_i * 4 + 3] - _b : 0; \ +} G_STMT_END + +#endif + +static void +shader_fade (GstAudioVisualizer * scope, const GstVideoFrame * sframe, + GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + d += ds; + } +} + +static void +shader_fade_and_move_up (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 1; j < height; j++) { + s += ss; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + } +} + +static void +shader_fade_and_move_down (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 1; j < height; j++) { + d += ds; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + } +} + +static void +shader_fade_and_move_left (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + width -= 1; + s += 4; + + /* move to the left */ + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + s += ss; + } +} + +static void +shader_fade_and_move_right (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + width -= 1; + d += 4; + + /* move to the right */ + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + s += ss; + } +} + +static void +shader_fade_and_move_horiz_out (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + /* move upper half up */ + for (j = 0; j < height / 2; j++) { + s += ss; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + } + /* move lower half down */ + for (j = 0; j < height / 2; j++) { + d += ds; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + } +} + +static void +shader_fade_and_move_horiz_in (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *d; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + /* move upper half down */ + for (j = 0; j < height / 2; j++) { + d += ds; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + s += ss; + } + /* move lower half up */ + for (j = 0; j < height / 2; j++) { + s += ss; + for (i = 0; i < width; i++) { + SHADE (d, s, i, r, g, b); + } + d += ds; + } +} + +static void +shader_fade_and_move_vert_out (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *s1, *d, *d1; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 0; j < height; j++) { + /* move left half to the left */ + s1 = s + 1; + for (i = 0; i < width / 2; i++) { + SHADE (d, s1, i, r, g, b); + } + /* move right half to the right */ + d1 = d + 1; + for (; i < width - 1; i++) { + SHADE (d1, s, i, r, g, b); + } + s += ss; + d += ds; + } +} + +static void +shader_fade_and_move_vert_in (GstAudioVisualizer * scope, + const GstVideoFrame * sframe, GstVideoFrame * dframe) +{ + guint i, j; + guint32 shade_amount = scope->priv->shade_amount; + guint r = (shade_amount >> 16) & 0xff; + guint g = (shade_amount >> 8) & 0xff; + guint b = (shade_amount >> 0) & 0xff; + guint8 *s, *s1, *d, *d1; + gint ss, ds, width, height; + + s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); + ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); + d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); + ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); + + width = GST_VIDEO_FRAME_WIDTH (sframe); + height = GST_VIDEO_FRAME_HEIGHT (sframe); + + for (j = 0; j < height; j++) { + /* move left half to the right */ + d1 = d + 1; + for (i = 0; i < width / 2; i++) { + SHADE (d1, s, i, r, g, b); + } + /* move right half to the left */ + s1 = s + 1; + for (; i < width - 1; i++) { + SHADE (d, s1, i, r, g, b); + } + s += ss; + d += ds; + } +} + +static void +gst_audio_visualizer_change_shader (GstAudioVisualizer * scope) +{ + GstAudioVisualizerShaderFunc shader; + + switch (scope->priv->shader_type) { + case GST_AUDIO_VISUALIZER_SHADER_NONE: + shader = NULL; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE: + shader = shader_fade; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: + shader = shader_fade_and_move_up; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: + shader = shader_fade_and_move_down; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: + shader = shader_fade_and_move_left; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: + shader = shader_fade_and_move_right; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: + shader = shader_fade_and_move_horiz_out; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: + shader = shader_fade_and_move_horiz_in; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: + shader = shader_fade_and_move_vert_out; + break; + case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: + shader = shader_fade_and_move_vert_in; + break; + default: + GST_ERROR ("invalid shader function"); + shader = NULL; + break; + } + + scope->priv->shader = shader; +} + +/* class */ + +GType +goom2k1_gst_audio_visualizer_get_type (void) +{ + static volatile gsize audio_visualizer_type = 0; + + if (g_once_init_enter (&audio_visualizer_type)) { + static const GTypeInfo audio_visualizer_info = { + sizeof (GstAudioVisualizerClass), + NULL, + NULL, + (GClassInitFunc) gst_audio_visualizer_class_init, + NULL, + NULL, + sizeof (GstAudioVisualizer), + 0, + (GInstanceInitFunc) gst_audio_visualizer_init, + }; + GType _type; + + /* TODO: rename when exporting it as a library */ + _type = g_type_register_static (GST_TYPE_ELEMENT, + "GstAudioVisualizer-ExtGoom2k1", &audio_visualizer_info, + G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&audio_visualizer_type, _type); + } + return (GType) audio_visualizer_type; +} + +static void +gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass) +{ + GObjectClass *gobject_class = (GObjectClass *) klass; + GstElementClass *element_class = (GstElementClass *) klass; + + g_type_class_add_private (klass, sizeof (GstAudioVisualizerPrivate)); + + parent_class = g_type_class_peek_parent (klass); + + GST_DEBUG_CATEGORY_INIT (audio_visualizer_debug, + "audiovisualizer-goom2k1", 0, "audio visualisation class"); + + gobject_class->set_property = gst_audio_visualizer_set_property; + gobject_class->get_property = gst_audio_visualizer_get_property; + gobject_class->finalize = gst_audio_visualizer_finalize; + + element_class->change_state = + GST_DEBUG_FUNCPTR (gst_audio_visualizer_change_state); + + klass->decide_allocation = GST_DEBUG_FUNCPTR (default_decide_allocation); + + g_object_class_install_property (gobject_class, PROP_SHADER, + g_param_spec_enum ("shader", "shader type", + "Shader function to apply on each frame", + GST_TYPE_AUDIO_VISUALIZER_SHADER, DEFAULT_SHADER, + G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_SHADE_AMOUNT, + g_param_spec_uint ("shade-amount", "shade amount", + "Shading color to use (big-endian ARGB)", 0, G_MAXUINT32, + DEFAULT_SHADE_AMOUNT, + G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); +} + +static void +gst_audio_visualizer_init (GstAudioVisualizer * scope, + GstAudioVisualizerClass * g_class) +{ + GstPadTemplate *pad_template; + + scope->priv = GST_AUDIO_VISUALIZER_GET_PRIVATE (scope); + + /* create the sink and src pads */ + pad_template = + gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "sink"); + g_return_if_fail (pad_template != NULL); + scope->priv->sinkpad = gst_pad_new_from_template (pad_template, "sink"); + gst_pad_set_chain_function (scope->priv->sinkpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_chain)); + gst_pad_set_event_function (scope->priv->sinkpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_event)); + gst_element_add_pad (GST_ELEMENT (scope), scope->priv->sinkpad); + + pad_template = + gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "src"); + g_return_if_fail (pad_template != NULL); + scope->priv->srcpad = gst_pad_new_from_template (pad_template, "src"); + gst_pad_set_event_function (scope->priv->srcpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_event)); + gst_pad_set_query_function (scope->priv->srcpad, + GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_query)); + gst_element_add_pad (GST_ELEMENT (scope), scope->priv->srcpad); + + scope->priv->adapter = gst_adapter_new (); + scope->priv->inbuf = gst_buffer_new (); + + /* properties */ + scope->priv->shader_type = DEFAULT_SHADER; + gst_audio_visualizer_change_shader (scope); + scope->priv->shade_amount = DEFAULT_SHADE_AMOUNT; + + /* reset the initial video state */ + gst_video_info_init (&scope->vinfo); + scope->priv->frame_duration = GST_CLOCK_TIME_NONE; + + /* reset the initial state */ + gst_audio_info_init (&scope->ainfo); + gst_video_info_init (&scope->vinfo); + + g_mutex_init (&scope->priv->config_lock); +} + +static void +gst_audio_visualizer_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); + + switch (prop_id) { + case PROP_SHADER: + scope->priv->shader_type = g_value_get_enum (value); + gst_audio_visualizer_change_shader (scope); + break; + case PROP_SHADE_AMOUNT: + scope->priv->shade_amount = g_value_get_uint (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_audio_visualizer_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); + + switch (prop_id) { + case PROP_SHADER: + g_value_set_enum (value, scope->priv->shader_type); + break; + case PROP_SHADE_AMOUNT: + g_value_set_uint (value, scope->priv->shade_amount); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_audio_visualizer_finalize (GObject * object) +{ + GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); + GstAudioVisualizerPrivate *priv = scope->priv; + + if (priv->adapter) { + g_object_unref (priv->adapter); + priv->adapter = NULL; + } + if (priv->inbuf) { + gst_buffer_unref (priv->inbuf); + priv->inbuf = NULL; + } + if (priv->tempbuf) { + gst_video_frame_unmap (&priv->tempframe); + gst_buffer_unref (priv->tempbuf); + priv->tempbuf = NULL; + } + + g_mutex_clear (&priv->config_lock); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gst_audio_visualizer_reset (GstAudioVisualizer * scope) +{ + GstAudioVisualizerPrivate *priv = scope->priv; + + gst_adapter_clear (priv->adapter); + gst_segment_init (&priv->segment, GST_FORMAT_UNDEFINED); + + GST_OBJECT_LOCK (scope); + priv->proportion = 1.0; + priv->earliest_time = -1; + priv->dropped = 0; + priv->processed = 0; + GST_OBJECT_UNLOCK (scope); +} + +static gboolean +gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * scope, GstCaps * caps) +{ + GstAudioInfo info; + + if (!gst_audio_info_from_caps (&info, caps)) + goto wrong_caps; + + scope->ainfo = info; + + GST_DEBUG_OBJECT (scope, "audio: channels %d, rate %d", + GST_AUDIO_INFO_CHANNELS (&info), GST_AUDIO_INFO_RATE (&info)); + + if (!gst_audio_visualizer_src_negotiate (scope)) { + goto not_negotiated; + } + + return TRUE; + + /* Errors */ +wrong_caps: + { + GST_WARNING_OBJECT (scope, "could not parse caps"); + return FALSE; + } +not_negotiated: + { + GST_WARNING_OBJECT (scope, "failed to negotiate"); + return FALSE; + } +} + +static gboolean +gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps) +{ + GstVideoInfo info; + GstAudioVisualizerClass *klass; + GstAudioVisualizerPrivate *priv; + gboolean res; + + if (!gst_video_info_from_caps (&info, caps)) + goto wrong_caps; + + klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); + + priv = scope->priv; + + scope->vinfo = info; + + priv->frame_duration = gst_util_uint64_scale_int (GST_SECOND, + GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); + priv->spf = gst_util_uint64_scale_int (GST_AUDIO_INFO_RATE (&scope->ainfo), + GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); + scope->req_spf = priv->spf; + + if (priv->tempbuf) { + gst_video_frame_unmap (&priv->tempframe); + gst_buffer_unref (priv->tempbuf); + } + priv->tempbuf = gst_buffer_new_wrapped (g_malloc0 (scope->vinfo.size), + scope->vinfo.size); + gst_video_frame_map (&priv->tempframe, &scope->vinfo, priv->tempbuf, + GST_MAP_READWRITE); + + if (klass->setup && !klass->setup (scope)) + goto setup_failed; + + GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d", + GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info), + GST_VIDEO_INFO_FPS_N (&info), GST_VIDEO_INFO_FPS_D (&info)); + GST_DEBUG_OBJECT (scope, "blocks: spf %u, req_spf %u", priv->spf, + scope->req_spf); + + gst_pad_set_caps (priv->srcpad, caps); + + /* find a pool for the negotiated caps now */ + res = gst_audio_visualizer_do_bufferpool (scope, caps); + gst_caps_unref (caps); + + return res; + + /* ERRORS */ +wrong_caps: + { + gst_caps_unref (caps); + GST_DEBUG_OBJECT (scope, "error parsing caps"); + return FALSE; + } + +setup_failed: + { + GST_WARNING_OBJECT (scope, "failed to set up"); + return FALSE; + } +} + +static gboolean +gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope) +{ + GstCaps *othercaps, *target; + GstStructure *structure; + GstCaps *templ; + gboolean ret; + + templ = gst_pad_get_pad_template_caps (scope->priv->srcpad); + + GST_DEBUG_OBJECT (scope, "performing negotiation"); + + /* see what the peer can do */ + othercaps = gst_pad_peer_query_caps (scope->priv->srcpad, NULL); + if (othercaps) { + target = gst_caps_intersect (othercaps, templ); + gst_caps_unref (othercaps); + gst_caps_unref (templ); + + if (gst_caps_is_empty (target)) + goto no_format; + + target = gst_caps_truncate (target); + } else { + target = templ; + } + + target = gst_caps_make_writable (target); + structure = gst_caps_get_structure (target, 0); + gst_structure_fixate_field_nearest_int (structure, "width", 320); + gst_structure_fixate_field_nearest_int (structure, "height", 200); + gst_structure_fixate_field_nearest_fraction (structure, "framerate", 25, 1); + + target = gst_caps_fixate (target); + + GST_DEBUG_OBJECT (scope, "final caps are %" GST_PTR_FORMAT, target); + + ret = gst_audio_visualizer_src_setcaps (scope, target); + + return ret; + +no_format: + { + gst_caps_unref (target); + return FALSE; + } +} + +/* takes ownership of the pool, allocator and query */ +static gboolean +gst_audio_visualizer_set_allocation (GstAudioVisualizer * scope, + GstBufferPool * pool, GstAllocator * allocator, + GstAllocationParams * params, GstQuery * query) +{ + GstAllocator *oldalloc; + GstBufferPool *oldpool; + GstQuery *oldquery; + GstAudioVisualizerPrivate *priv = scope->priv; + + GST_OBJECT_LOCK (scope); + oldpool = priv->pool; + priv->pool = pool; + priv->pool_active = FALSE; + + oldalloc = priv->allocator; + priv->allocator = allocator; + + oldquery = priv->query; + priv->query = query; + + if (params) + priv->params = *params; + else + gst_allocation_params_init (&priv->params); + GST_OBJECT_UNLOCK (scope); + + if (oldpool) { + GST_DEBUG_OBJECT (scope, "deactivating old pool %p", oldpool); + gst_buffer_pool_set_active (oldpool, FALSE); + gst_object_unref (oldpool); + } + if (oldalloc) { + gst_object_unref (oldalloc); + } + if (oldquery) { + gst_query_unref (oldquery); + } + return TRUE; +} + +static gboolean +gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, + GstCaps * outcaps) +{ + GstQuery *query; + gboolean result = TRUE; + GstBufferPool *pool = NULL; + GstAudioVisualizerClass *klass; + GstAllocator *allocator; + GstAllocationParams params; + + /* not passthrough, we need to allocate */ + /* find a pool for the negotiated caps now */ + GST_DEBUG_OBJECT (scope, "doing allocation query"); + query = gst_query_new_allocation (outcaps, TRUE); + + if (!gst_pad_peer_query (scope->priv->srcpad, query)) { + /* not a problem, we use the query defaults */ + GST_DEBUG_OBJECT (scope, "allocation query failed"); + } + + klass = GST_AUDIO_VISUALIZER_GET_CLASS (scope); + + GST_DEBUG_OBJECT (scope, "calling decide_allocation"); + g_assert (klass->decide_allocation != NULL); + result = klass->decide_allocation (scope, query); + + GST_DEBUG_OBJECT (scope, "ALLOCATION (%d) params: %" GST_PTR_FORMAT, result, + query); + + if (!result) + goto no_decide_allocation; + + /* we got configuration from our peer or the decide_allocation method, + * parse them */ + if (gst_query_get_n_allocation_params (query) > 0) { + gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); + } else { + allocator = NULL; + gst_allocation_params_init (¶ms); + } + + if (gst_query_get_n_allocation_pools (query) > 0) + gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL); + + /* now store */ + result = + gst_audio_visualizer_set_allocation (scope, pool, allocator, ¶ms, + query); + + return result; + + /* Errors */ +no_decide_allocation: + { + GST_WARNING_OBJECT (scope, "Subclass failed to decide allocation"); + gst_query_unref (query); + + return result; + } +} + +static gboolean +default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query) +{ + GstCaps *outcaps; + GstBufferPool *pool; + guint size, min, max; + GstAllocator *allocator; + GstAllocationParams params; + GstStructure *config; + gboolean update_allocator; + gboolean update_pool; + + gst_query_parse_allocation (query, &outcaps, NULL); + + /* we got configuration from our peer or the decide_allocation method, + * parse them */ + if (gst_query_get_n_allocation_params (query) > 0) { + /* try the allocator */ + gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); + update_allocator = TRUE; + } else { + allocator = NULL; + gst_allocation_params_init (¶ms); + update_allocator = FALSE; + } + + if (gst_query_get_n_allocation_pools (query) > 0) { + gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); + update_pool = TRUE; + } else { + pool = NULL; + size = GST_VIDEO_INFO_SIZE (&scope->vinfo); + min = max = 0; + update_pool = FALSE; + } + + if (pool == NULL) { + /* we did not get a pool, make one ourselves then */ + pool = gst_video_buffer_pool_new (); + } + + config = gst_buffer_pool_get_config (pool); + gst_buffer_pool_config_set_params (config, outcaps, size, min, max); + gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); + gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); + gst_buffer_pool_set_config (pool, config); + + if (update_allocator) + gst_query_set_nth_allocation_param (query, 0, allocator, ¶ms); + else + gst_query_add_allocation_param (query, allocator, ¶ms); + + if (allocator) + gst_object_unref (allocator); + + if (update_pool) + gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max); + else + gst_query_add_allocation_pool (query, pool, size, min, max); + + if (pool) + gst_object_unref (pool); + + return TRUE; +} + +static GstFlowReturn +default_prepare_output_buffer (GstAudioVisualizer * scope, GstBuffer ** outbuf) +{ + GstAudioVisualizerPrivate *priv; + + priv = scope->priv; + + g_assert (priv->pool != NULL); + + /* we can't reuse the input buffer */ + if (!priv->pool_active) { + GST_DEBUG_OBJECT (scope, "setting pool %p active", priv->pool); + if (!gst_buffer_pool_set_active (priv->pool, TRUE)) + goto activate_failed; + priv->pool_active = TRUE; + } + GST_DEBUG_OBJECT (scope, "using pool alloc"); + + return gst_buffer_pool_acquire_buffer (priv->pool, outbuf, NULL); + + /* ERRORS */ +activate_failed: + { + GST_ELEMENT_ERROR (scope, RESOURCE, SETTINGS, + ("failed to activate bufferpool"), ("failed to activate bufferpool")); + return GST_FLOW_ERROR; + } +} + +static GstFlowReturn +gst_audio_visualizer_chain (GstPad * pad, GstObject * parent, + GstBuffer * buffer) +{ + GstFlowReturn ret = GST_FLOW_OK; + GstAudioVisualizer *scope; + GstAudioVisualizerPrivate *priv; + GstAudioVisualizerClass *klass; + GstBuffer *inbuf; + guint64 dist, ts; + guint avail, sbpf; + gpointer adata; + gint bps, channels, rate; + + scope = GST_AUDIO_VISUALIZER (parent); + priv = scope->priv; + klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); + + GST_LOG_OBJECT (scope, "chainfunc called"); + + /* resync on DISCONT */ + if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { + gst_adapter_clear (priv->adapter); + } + + /* Make sure have an output format */ + if (gst_pad_check_reconfigure (priv->srcpad)) { + if (!gst_audio_visualizer_src_negotiate (scope)) { + gst_pad_mark_reconfigure (priv->srcpad); + goto not_negotiated; + } + } + + channels = GST_AUDIO_INFO_CHANNELS (&scope->ainfo); + rate = GST_AUDIO_INFO_RATE (&scope->ainfo); + bps = GST_AUDIO_INFO_BPS (&scope->ainfo); + + if (bps == 0) { + ret = GST_FLOW_NOT_NEGOTIATED; + goto beach; + } + + gst_adapter_push (priv->adapter, buffer); + + g_mutex_lock (&priv->config_lock); + + /* this is what we want */ + sbpf = scope->req_spf * channels * sizeof (gint16); + + inbuf = priv->inbuf; + /* FIXME: the timestamp in the adapter would be different */ + gst_buffer_copy_into (inbuf, buffer, GST_BUFFER_COPY_METADATA, 0, -1); + + /* this is what we have */ + avail = gst_adapter_available (priv->adapter); + GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); + while (avail >= sbpf) { + GstBuffer *outbuf; + GstVideoFrame outframe; + + /* get timestamp of the current adapter content */ + ts = gst_adapter_prev_pts (priv->adapter, &dist); + if (GST_CLOCK_TIME_IS_VALID (ts)) { + /* convert bytes to time */ + dist /= bps; + ts += gst_util_uint64_scale_int (dist, GST_SECOND, rate); + } + + /* check for QoS, don't compute buffers that are known to be late */ + if (GST_CLOCK_TIME_IS_VALID (ts)) { + GstClockTime earliest_time; + gdouble proportion; + gint64 qostime; + + qostime = + gst_segment_to_running_time (&priv->segment, GST_FORMAT_TIME, + ts) + priv->frame_duration; + + GST_OBJECT_LOCK (scope); + earliest_time = priv->earliest_time; + proportion = priv->proportion; + GST_OBJECT_UNLOCK (scope); + + if (GST_CLOCK_TIME_IS_VALID (earliest_time) && qostime <= earliest_time) { + GstClockTime stream_time, jitter; + GstMessage *qos_msg; + + GST_DEBUG_OBJECT (scope, + "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT, + GST_TIME_ARGS (qostime), GST_TIME_ARGS (earliest_time)); + + ++priv->dropped; + stream_time = gst_segment_to_stream_time (&priv->segment, + GST_FORMAT_TIME, ts); + jitter = GST_CLOCK_DIFF (qostime, earliest_time); + qos_msg = gst_message_new_qos (GST_OBJECT (scope), FALSE, qostime, + stream_time, ts, GST_BUFFER_DURATION (buffer)); + gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000); + gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS, + priv->processed, priv->dropped); + gst_element_post_message (GST_ELEMENT (scope), qos_msg); + + goto skip; + } + } + + ++priv->processed; + + g_mutex_unlock (&priv->config_lock); + ret = default_prepare_output_buffer (scope, &outbuf); + g_mutex_lock (&priv->config_lock); + /* recheck as the value could have changed */ + sbpf = scope->req_spf * channels * sizeof (gint16); + + /* no buffer allocated, we don't care why. */ + if (ret != GST_FLOW_OK) + break; + + /* sync controlled properties */ + if (GST_CLOCK_TIME_IS_VALID (ts)) + gst_object_sync_values (GST_OBJECT (scope), ts); + + GST_BUFFER_TIMESTAMP (outbuf) = ts; + GST_BUFFER_DURATION (outbuf) = priv->frame_duration; + + /* this can fail as the data size we need could have changed */ + if (!(adata = (gpointer) gst_adapter_map (priv->adapter, sbpf))) + break; + + gst_video_frame_map (&outframe, &scope->vinfo, outbuf, GST_MAP_READWRITE); + + if (priv->shader) { + gst_video_frame_copy (&outframe, &priv->tempframe); + } else { + /* gst_video_frame_clear() or is output frame already cleared */ + gint i; + + for (i = 0; i < scope->vinfo.finfo->n_planes; i++) { + memset (outframe.data[i], 0, outframe.map[i].size); + } + } + + gst_buffer_replace_all_memory (inbuf, + gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0, + sbpf, NULL, NULL)); + + /* call class->render() vmethod */ + if (klass->render) { + if (!klass->render (scope, inbuf, &outframe)) { + ret = GST_FLOW_ERROR; + gst_video_frame_unmap (&outframe); + goto beach; + } else { + /* run various post processing (shading and geometric transformation) */ + /* FIXME: SHADER assumes 32bpp */ + if (priv->shader && GST_VIDEO_INFO_COMP_PSTRIDE (&scope->vinfo, 0) == 4) { + priv->shader (scope, &outframe, &priv->tempframe); + } + } + } + gst_video_frame_unmap (&outframe); + + g_mutex_unlock (&priv->config_lock); + ret = gst_pad_push (priv->srcpad, outbuf); + outbuf = NULL; + g_mutex_lock (&priv->config_lock); + + skip: + /* recheck as the value could have changed */ + sbpf = scope->req_spf * channels * sizeof (gint16); + GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); + /* we want to take less or more, depending on spf : req_spf */ + if (avail - sbpf >= sbpf) { + gst_adapter_flush (priv->adapter, sbpf); + gst_adapter_unmap (priv->adapter); + } else if (avail >= sbpf) { + /* just flush a bit and stop */ + gst_adapter_flush (priv->adapter, (avail - sbpf)); + gst_adapter_unmap (priv->adapter); + break; + } + avail = gst_adapter_available (priv->adapter); + + if (ret != GST_FLOW_OK) + break; + } + + g_mutex_unlock (&priv->config_lock); + +beach: + return ret; + + /* ERRORS */ +not_negotiated: + { + GST_DEBUG_OBJECT (scope, "Failed to renegotiate"); + return GST_FLOW_NOT_NEGOTIATED; + } +} + +static gboolean +gst_audio_visualizer_src_event (GstPad * pad, GstObject * parent, + GstEvent * event) +{ + gboolean res; + GstAudioVisualizer *scope; + GstAudioVisualizerPrivate *priv; + + scope = GST_AUDIO_VISUALIZER (parent); + priv = scope->priv; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_QOS: + { + gdouble proportion; + GstClockTimeDiff diff; + GstClockTime timestamp; + + gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); + + /* save stuff for the _chain() function */ + GST_OBJECT_LOCK (scope); + priv->proportion = proportion; + if (diff >= 0) + /* we're late, this is a good estimate for next displayable + * frame (see part-qos.txt) */ + priv->earliest_time = timestamp + 2 * diff + priv->frame_duration; + else + priv->earliest_time = timestamp + diff; + GST_OBJECT_UNLOCK (scope); + + res = gst_pad_push_event (priv->sinkpad, event); + break; + } + case GST_EVENT_RECONFIGURE: + /* dont't forward */ + gst_event_unref (event); + res = TRUE; + break; + default: + res = gst_pad_event_default (pad, parent, event); + break; + } + + return res; +} + +static gboolean +gst_audio_visualizer_sink_event (GstPad * pad, GstObject * parent, + GstEvent * event) +{ + gboolean res; + GstAudioVisualizer *scope; + + scope = GST_AUDIO_VISUALIZER (parent); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CAPS: + { + GstCaps *caps; + + gst_event_parse_caps (event, &caps); + res = gst_audio_visualizer_sink_setcaps (scope, caps); + gst_event_unref (event); + break; + } + case GST_EVENT_FLUSH_STOP: + gst_audio_visualizer_reset (scope); + res = gst_pad_push_event (scope->priv->srcpad, event); + break; + case GST_EVENT_SEGMENT: + { + /* the newsegment values are used to clip the input samples + * and to convert the incomming timestamps to running time so + * we can do QoS */ + gst_event_copy_segment (event, &scope->priv->segment); + + res = gst_pad_push_event (scope->priv->srcpad, event); + break; + } + default: + res = gst_pad_event_default (pad, parent, event); + break; + } + + return res; +} + +static gboolean +gst_audio_visualizer_src_query (GstPad * pad, GstObject * parent, + GstQuery * query) +{ + gboolean res = FALSE; + GstAudioVisualizer *scope; + + scope = GST_AUDIO_VISUALIZER (parent); + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_LATENCY: + { + /* We need to send the query upstream and add the returned latency to our + * own */ + GstClockTime min_latency, max_latency; + gboolean us_live; + GstClockTime our_latency; + guint max_samples; + gint rate = GST_AUDIO_INFO_RATE (&scope->ainfo); + + if (rate == 0) + break; + + if ((res = gst_pad_peer_query (scope->priv->sinkpad, query))) { + gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); + + GST_DEBUG_OBJECT (scope, "Peer latency: min %" + GST_TIME_FORMAT " max %" GST_TIME_FORMAT, + GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); + + /* the max samples we must buffer buffer */ + max_samples = MAX (scope->req_spf, scope->priv->spf); + our_latency = gst_util_uint64_scale_int (max_samples, GST_SECOND, rate); + + GST_DEBUG_OBJECT (scope, "Our latency: %" GST_TIME_FORMAT, + GST_TIME_ARGS (our_latency)); + + /* we add some latency but only if we need to buffer more than what + * upstream gives us */ + min_latency += our_latency; + if (max_latency != -1) + max_latency += our_latency; + + GST_DEBUG_OBJECT (scope, "Calculated total latency : min %" + GST_TIME_FORMAT " max %" GST_TIME_FORMAT, + GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); + + gst_query_set_latency (query, TRUE, min_latency, max_latency); + } + break; + } + default: + res = gst_pad_query_default (pad, parent, query); + break; + } + + return res; +} + +static GstStateChangeReturn +gst_audio_visualizer_change_state (GstElement * element, + GstStateChange transition) +{ + GstStateChangeReturn ret; + GstAudioVisualizer *scope; + + scope = GST_AUDIO_VISUALIZER (element); + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + gst_audio_visualizer_reset (scope); + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_audio_visualizer_set_allocation (scope, NULL, NULL, NULL, NULL); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + + return ret; +} diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/gstaudiovisualizer.h gst-plugins-good1.0-1.6.1/gst/goom2k1/gstaudiovisualizer.h --- gst-plugins-good1.0-1.4.3/gst/goom2k1/gstaudiovisualizer.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/gstaudiovisualizer.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,105 @@ +/* GStreamer + * Copyright (C) <2011> Stefan Kost + * Copyright (C) <2015> Luis de Bethencourt + * + * gstaudiovisualizer.c: base class for audio visualisation elements + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_AUDIO_VISUALIZER_H__ +#define __GST_AUDIO_VISUALIZER_H__ + +#include +#include + +#include +#include +#include + +G_BEGIN_DECLS +#define GST_TYPE_AUDIO_VISUALIZER (goom2k1_gst_audio_visualizer_get_type()) +#define GST_AUDIO_VISUALIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizer)) +#define GST_AUDIO_VISUALIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) +#define GST_AUDIO_VISUALIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) +#define GST_IS_SYNAESTHESIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_VISUALIZER)) +#define GST_IS_SYNAESTHESIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_VISUALIZER)) +typedef struct _GstAudioVisualizer GstAudioVisualizer; +typedef struct _GstAudioVisualizerClass GstAudioVisualizerClass; +typedef struct _GstAudioVisualizerPrivate GstAudioVisualizerPrivate; + +typedef void (*GstAudioVisualizerShaderFunc)(GstAudioVisualizer *scope, const GstVideoFrame *s, GstVideoFrame *d); + +/** + * GstAudioVisualizerShader: + * @GST_AUDIO_VISUALIZER_SHADER_NONE: no shading + * @GST_AUDIO_VISUALIZER_SHADER_FADE: plain fading + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: fade and move up + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: fade and move down + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: fade and move left + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: fade and move right + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: fade and move horizontally out + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: fade and move horizontally in + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: fade and move vertically out + * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: fade and move vertically in + * + * Different types of supported background shading functions. + */ +typedef enum { + GST_AUDIO_VISUALIZER_SHADER_NONE, + GST_AUDIO_VISUALIZER_SHADER_FADE, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, + GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN +} GstAudioVisualizerShader; + +struct _GstAudioVisualizer +{ + GstElement parent; + + guint req_spf; /* min samples per frame wanted by the subclass */ + + /* video state */ + GstVideoInfo vinfo; + + /* audio state */ + GstAudioInfo ainfo; + + /* */ + GstAudioVisualizerPrivate *priv; +}; + +struct _GstAudioVisualizerClass +{ + GstElementClass parent_class; + + /* virtual function, called whenever the format changes */ + gboolean (*setup) (GstAudioVisualizer * scope); + + /* virtual function for rendering a frame */ + gboolean (*render) (GstAudioVisualizer * scope, GstBuffer * audio, GstVideoFrame * video); + + gboolean (*decide_allocation) (GstAudioVisualizer * scope, GstQuery *query); +}; + +GType goom2k1_gst_audio_visualizer_get_type (void); + +G_END_DECLS +#endif /* __GST_AUDIO_VISUALIZER_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/gstgoom.c gst-plugins-good1.0-1.6.1/gst/goom2k1/gstgoom.c --- gst-plugins-good1.0-1.4.3/gst/goom2k1/gstgoom.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/gstgoom.c 2015-10-22 08:02:54.000000000 +0000 @@ -1,6 +1,7 @@ /* gstgoom.c: implementation of goom drawing element * Copyright (C) <2001> Richard Boulton * (C) <2006> Wim Taymans + * (C) <2015> Luis de Bethencourt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -39,33 +40,17 @@ #endif #include -#include #include "gstgoom.h" -#include -#include #include "goom_core.h" -GST_DEBUG_CATEGORY_STATIC (goom_debug); -#define GST_CAT_DEFAULT goom_debug +GST_DEBUG_CATEGORY_STATIC (goom2k1_debug); +#define GST_CAT_DEFAULT goom2k1_debug #define DEFAULT_WIDTH 320 #define DEFAULT_HEIGHT 240 #define DEFAULT_FPS_N 25 #define DEFAULT_FPS_D 1 -/* signals and args */ -enum -{ - /* FILL ME */ - LAST_SIGNAL -}; - -enum -{ - ARG_0 - /* FILL ME */ -}; - static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -91,42 +76,27 @@ "channel-mask = (bitmask) 0x3, " "layout = (string) interleaved") ); -static void gst_goom_finalize (GObject * object); +static void gst_goom2k1_finalize (GObject * object); -static GstStateChangeReturn gst_goom_change_state (GstElement * element, - GstStateChange transition); +static gboolean gst_goom2k1_setup (GstAudioVisualizer * base); +static gboolean gst_goom2k1_render (GstAudioVisualizer * base, + GstBuffer * audio, GstVideoFrame * video); -static GstFlowReturn gst_goom_chain (GstPad * pad, GstObject * parent, - GstBuffer * buffer); -static gboolean gst_goom_src_event (GstPad * pad, GstObject * parent, - GstEvent * event); -static gboolean gst_goom_sink_event (GstPad * pad, GstObject * parent, - GstEvent * event); - -static gboolean gst_goom_src_query (GstPad * pad, GstObject * parent, - GstQuery * query); - -static gboolean gst_goom_src_negotiate (GstGoom * goom); - -#define gst_goom_parent_class parent_class -typedef GstGoom GstGoom2k1; -typedef GstGoomClass GstGoom2k1Class; -G_DEFINE_TYPE (GstGoom2k1, gst_goom, GST_TYPE_ELEMENT); + +G_DEFINE_TYPE (GstGoom2k1, gst_goom2k1, GST_TYPE_AUDIO_VISUALIZER); static void -gst_goom_class_init (GstGoomClass * klass) +gst_goom2k1_class_init (GstGoom2k1Class * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; + GstAudioVisualizerClass *visualizer_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; + visualizer_class = (GstAudioVisualizerClass *) klass; - parent_class = g_type_class_peek_parent (klass); - - gobject_class->finalize = gst_goom_finalize; - - gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_goom_change_state); + gobject_class->finalize = gst_goom2k1_finalize; gst_element_class_set_static_metadata (gstelement_class, "GOOM: what a GOOM! 2k1 edition", "Visualization", @@ -137,535 +107,83 @@ gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_template)); - GST_DEBUG_CATEGORY_INIT (goom_debug, "goom", 0, "goom visualisation element"); + GST_DEBUG_CATEGORY_INIT (goom2k1_debug, "goom2k1", 0, + "goom2k1 visualisation element"); + + visualizer_class->setup = GST_DEBUG_FUNCPTR (gst_goom2k1_setup); + visualizer_class->render = GST_DEBUG_FUNCPTR (gst_goom2k1_render); } static void -gst_goom_init (GstGoom * goom) +gst_goom2k1_init (GstGoom2k1 * goom) { - /* create the sink and src pads */ - goom->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink"); - gst_pad_set_chain_function (goom->sinkpad, - GST_DEBUG_FUNCPTR (gst_goom_chain)); - gst_pad_set_event_function (goom->sinkpad, - GST_DEBUG_FUNCPTR (gst_goom_sink_event)); - gst_element_add_pad (GST_ELEMENT (goom), goom->sinkpad); - - goom->srcpad = gst_pad_new_from_static_template (&src_template, "src"); - gst_pad_set_event_function (goom->srcpad, - GST_DEBUG_FUNCPTR (gst_goom_src_event)); - gst_pad_set_query_function (goom->srcpad, - GST_DEBUG_FUNCPTR (gst_goom_src_query)); - gst_element_add_pad (GST_ELEMENT (goom), goom->srcpad); - - goom->adapter = gst_adapter_new (); - goom->width = DEFAULT_WIDTH; goom->height = DEFAULT_HEIGHT; - goom->fps_n = DEFAULT_FPS_N; /* desired frame rate */ - goom->fps_d = DEFAULT_FPS_D; /* desired frame rate */ goom->channels = 0; - goom->rate = 0; - goom->duration = 0; goom_init (&(goom->goomdata), goom->width, goom->height); } static void -gst_goom_finalize (GObject * object) +gst_goom2k1_finalize (GObject * object) { - GstGoom *goom = GST_GOOM (object); + GstGoom2k1 *goom = GST_GOOM2K1 (object); goom_close (&(goom->goomdata)); - g_object_unref (goom->adapter); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void -gst_goom_reset (GstGoom * goom) -{ - gst_adapter_clear (goom->adapter); - gst_segment_init (&goom->segment, GST_FORMAT_UNDEFINED); - - GST_OBJECT_LOCK (goom); - goom->proportion = 1.0; - goom->earliest_time = -1; - GST_OBJECT_UNLOCK (goom); -} - -static gboolean -gst_goom_sink_setcaps (GstGoom * goom, GstCaps * caps) -{ - GstStructure *structure; - gboolean res; - - structure = gst_caps_get_structure (caps, 0); - - res = gst_structure_get_int (structure, "channels", &goom->channels); - res &= gst_structure_get_int (structure, "rate", &goom->rate); - if (!res) - return FALSE; - - goom->bps = goom->channels * sizeof (gint16); - - return gst_goom_src_negotiate (goom); + G_OBJECT_CLASS (gst_goom2k1_parent_class)->finalize (object); } static gboolean -gst_goom_src_setcaps (GstGoom * goom, GstCaps * caps) +gst_goom2k1_setup (GstAudioVisualizer * base) { - GstStructure *structure; + GstGoom2k1 *goom = GST_GOOM2K1 (base); - structure = gst_caps_get_structure (caps, 0); - - if (!gst_structure_get_int (structure, "width", &goom->width) || - !gst_structure_get_int (structure, "height", &goom->height) || - !gst_structure_get_fraction (structure, "framerate", &goom->fps_n, - &goom->fps_d)) - goto error; + goom->width = GST_VIDEO_INFO_WIDTH (&base->vinfo); + goom->height = GST_VIDEO_INFO_HEIGHT (&base->vinfo); goom_set_resolution (&(goom->goomdata), goom->width, goom->height); - /* size of the output buffer in bytes, depth is always 4 bytes */ - goom->outsize = goom->width * goom->height * 4; - goom->duration = - gst_util_uint64_scale_int (GST_SECOND, goom->fps_d, goom->fps_n); - goom->spf = gst_util_uint64_scale_int (goom->rate, goom->fps_d, goom->fps_n); - goom->bpf = goom->spf * goom->bps; - - GST_DEBUG_OBJECT (goom, "dimension %dx%d, framerate %d/%d, spf %d", - goom->width, goom->height, goom->fps_n, goom->fps_d, goom->spf); - - return gst_pad_set_caps (goom->srcpad, caps); - - /* ERRORS */ -error: - { - GST_DEBUG_OBJECT (goom, "error parsing caps"); - return FALSE; - } -} - -static gboolean -gst_goom_src_negotiate (GstGoom * goom) -{ - GstCaps *othercaps, *target; - GstStructure *structure; - GstCaps *templ; - GstQuery *query; - GstBufferPool *pool = NULL; - GstStructure *config; - guint size, min, max; - - templ = gst_pad_get_pad_template_caps (goom->srcpad); - - GST_DEBUG_OBJECT (goom, "performing negotiation"); - - /* see what the peer can do */ - othercaps = gst_pad_peer_query_caps (goom->srcpad, NULL); - if (othercaps) { - target = gst_caps_intersect (othercaps, templ); - gst_caps_unref (templ); - gst_caps_unref (othercaps); - - if (gst_caps_is_empty (target)) - goto no_format; - - target = gst_caps_truncate (target); - } else { - target = gst_caps_copy (templ); - } - - structure = gst_caps_get_structure (target, 0); - gst_structure_fixate_field_nearest_int (structure, "width", DEFAULT_WIDTH); - gst_structure_fixate_field_nearest_int (structure, "height", DEFAULT_HEIGHT); - gst_structure_fixate_field_nearest_fraction (structure, "framerate", - DEFAULT_FPS_N, DEFAULT_FPS_D); - - gst_goom_src_setcaps (goom, target); - - /* find a pool for the negotiated caps now */ - query = gst_query_new_allocation (target, TRUE); - - if (!gst_pad_peer_query (goom->srcpad, query)) { - /* no problem, we use the query defaults */ - GST_DEBUG_OBJECT (goom, "ALLOCATION query failed"); - } - - if (gst_query_get_n_allocation_pools (query) > 0) { - /* we got configuration from our peer, parse them */ - gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); - } else { - pool = NULL; - size = goom->outsize; - min = max = 0; - } - - if (pool == NULL) { - /* we did not get a pool, make one ourselves then */ - pool = gst_buffer_pool_new (); - } - - config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set_params (config, target, size, min, max); - gst_buffer_pool_set_config (pool, config); - - if (goom->pool) { - gst_buffer_pool_set_active (goom->pool, FALSE); - gst_object_unref (goom->pool); - } - goom->pool = pool; - - /* and activate */ - gst_buffer_pool_set_active (pool, TRUE); - - gst_caps_unref (target); - return TRUE; - -no_format: - { - gst_caps_unref (target); - return FALSE; - } } static gboolean -gst_goom_src_event (GstPad * pad, GstObject * parent, GstEvent * event) +gst_goom2k1_render (GstAudioVisualizer * base, GstBuffer * audio, + GstVideoFrame * video) { - gboolean res; - GstGoom *goom; - - goom = GST_GOOM (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_QOS: - { - gdouble proportion; - GstClockTimeDiff diff; - GstClockTime timestamp; - - gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); - - /* save stuff for the _chain() function */ - GST_OBJECT_LOCK (goom); - goom->proportion = proportion; - if (diff >= 0) - /* we're late, this is a good estimate for next displayable - * frame (see part-qos.txt) */ - goom->earliest_time = timestamp + 2 * diff + goom->duration; - else - goom->earliest_time = timestamp + diff; - GST_OBJECT_UNLOCK (goom); - - res = gst_pad_event_default (pad, parent, event); - break; + GstGoom2k1 *goom = GST_GOOM2K1 (base); + GstMapInfo amap; + gint16 datain[2][GOOM2K1_SAMPLES]; + gint16 *adata; + gint i; + + /* get next GOOM2K1_SAMPLES, we have at least this amount of samples */ + gst_buffer_map (audio, &amap, GST_MAP_READ); + adata = (gint16 *) amap.data; + + if (goom->channels == 2) { + for (i = 0; i < GOOM2K1_SAMPLES; i++) { + datain[0][i] = *adata++; + datain[1][i] = *adata++; } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; -} - -static gboolean -gst_goom_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) -{ - gboolean res; - GstGoom *goom; - - goom = GST_GOOM (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - res = gst_goom_sink_setcaps (goom, caps); - gst_event_unref (event); - break; - } - case GST_EVENT_FLUSH_STOP: - gst_goom_reset (goom); - res = gst_pad_event_default (pad, parent, event); - break; - case GST_EVENT_SEGMENT: - { - /* the newsegment values are used to clip the input samples - * and to convert the incomming timestamps to running time so - * we can do QoS */ - gst_event_copy_segment (event, &goom->segment); - - res = gst_pad_event_default (pad, parent, event); - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; -} - -static gboolean -gst_goom_src_query (GstPad * pad, GstObject * parent, GstQuery * query) -{ - gboolean res; - GstGoom *goom; - - goom = GST_GOOM (parent); - - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_LATENCY: - { - /* We need to send the query upstream and add the returned latency to our - * own */ - GstClockTime min_latency, max_latency; - gboolean us_live; - GstClockTime our_latency; - guint max_samples; - - if ((res = gst_pad_peer_query (goom->sinkpad, query))) { - gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); - - GST_DEBUG_OBJECT (goom, "Peer latency: min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - /* the max samples we must buffer buffer */ - max_samples = MAX (GOOM_SAMPLES, goom->spf); - our_latency = - gst_util_uint64_scale_int (max_samples, GST_SECOND, goom->rate); - - GST_DEBUG_OBJECT (goom, "Our latency: %" GST_TIME_FORMAT, - GST_TIME_ARGS (our_latency)); - - /* we add some latency but only if we need to buffer more than what - * upstream gives us */ - min_latency += our_latency; - if (max_latency != -1) - max_latency += our_latency; - - GST_DEBUG_OBJECT (goom, "Calculated total latency : min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - gst_query_set_latency (query, TRUE, min_latency, max_latency); - } - break; - } - default: - res = gst_pad_query_default (pad, parent, query); - break; - } - - return res; -} - -/* make sure we are negotiated */ -static GstFlowReturn -ensure_negotiated (GstGoom * goom) -{ - if (gst_pad_check_reconfigure (goom->srcpad)) { - if (!gst_goom_src_negotiate (goom)) - return GST_FLOW_NOT_NEGOTIATED; - } - return GST_FLOW_OK; -} - -static GstFlowReturn -gst_goom_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) -{ - GstGoom *goom; - GstFlowReturn ret; - GstBuffer *outbuf = NULL; - - goom = GST_GOOM (parent); - - /* If we don't have an output format yet, preallocate a buffer to try and - * set one */ - if (goom->bps == 0) { - gst_buffer_unref (buffer); - ret = GST_FLOW_NOT_NEGOTIATED; - goto beach; - } - - /* Make sure have an output format */ - ret = ensure_negotiated (goom); - if (ret != GST_FLOW_OK) { - gst_buffer_unref (buffer); - goto beach; - } - - /* don't try to combine samples from discont buffer */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { - gst_adapter_clear (goom->adapter); - } - - GST_DEBUG_OBJECT (goom, - "Input buffer has %" G_GSIZE_FORMAT " samples, time=%" G_GUINT64_FORMAT, - gst_buffer_get_size (buffer) / goom->bps, GST_BUFFER_TIMESTAMP (buffer)); - - /* Collect samples until we have enough for an output frame */ - gst_adapter_push (goom->adapter, buffer); - - ret = GST_FLOW_OK; - - while (TRUE) { - const guint16 *data; - gboolean need_skip; - guchar *out_frame; - gint i; - guint avail, to_flush; - guint64 dist, timestamp; - - avail = gst_adapter_available (goom->adapter); - GST_DEBUG_OBJECT (goom, "avail now %u", avail); - - /* we need GOOM_SAMPLES to get a meaningful result from goom. */ - if (avail < (GOOM_SAMPLES * goom->bps)) - break; - - /* we also need enough samples to produce one frame at least */ - if (avail < goom->bpf) - break; - - GST_DEBUG_OBJECT (goom, "processing buffer"); - - /* get timestamp of the current adapter byte */ - timestamp = gst_adapter_prev_pts (goom->adapter, &dist); - if (GST_CLOCK_TIME_IS_VALID (timestamp)) { - /* convert bytes to time */ - dist /= goom->bps; - timestamp += gst_util_uint64_scale_int (dist, GST_SECOND, goom->rate); - } - - if (timestamp != -1) { - gint64 qostime; - - qostime = gst_segment_to_running_time (&goom->segment, GST_FORMAT_TIME, - timestamp); - qostime += goom->duration; - - GST_OBJECT_LOCK (goom); - /* check for QoS, don't compute buffers that are known to be late */ - need_skip = goom->earliest_time != -1 && qostime <= goom->earliest_time; - GST_OBJECT_UNLOCK (goom); - - if (need_skip) { - GST_WARNING_OBJECT (goom, - "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT, - GST_TIME_ARGS (qostime), GST_TIME_ARGS (goom->earliest_time)); - goto skip; - } - } - - /* get next GOOM_SAMPLES, we have at least this amount of samples */ - data = - (const guint16 *) gst_adapter_map (goom->adapter, - GOOM_SAMPLES * goom->bps); - - if (goom->channels == 2) { - for (i = 0; i < GOOM_SAMPLES; i++) { - goom->datain[0][i] = *data++; - goom->datain[1][i] = *data++; - } - } else { - for (i = 0; i < GOOM_SAMPLES; i++) { - goom->datain[0][i] = *data; - goom->datain[1][i] = *data++; - } - } - - /* alloc a buffer if we don't have one yet, this happens - * when we pushed a buffer in this while loop before */ - if (outbuf == NULL) { - GST_DEBUG_OBJECT (goom, "allocating output buffer"); - ret = gst_buffer_pool_acquire_buffer (goom->pool, &outbuf, NULL); - if (ret != GST_FLOW_OK) { - gst_adapter_unmap (goom->adapter); - goto beach; - } + } else { + for (i = 0; i < GOOM2K1_SAMPLES; i++) { + datain[0][i] = *adata; + datain[1][i] = *adata++; } - - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; - GST_BUFFER_DURATION (outbuf) = goom->duration; - - out_frame = (guchar *) goom_update (&(goom->goomdata), goom->datain); - gst_buffer_fill (outbuf, 0, out_frame, goom->outsize); - - gst_adapter_unmap (goom->adapter); - - GST_DEBUG ("Pushing frame with time=%" GST_TIME_FORMAT ", duration=%" - GST_TIME_FORMAT, GST_TIME_ARGS (timestamp), - GST_TIME_ARGS (goom->duration)); - - ret = gst_pad_push (goom->srcpad, outbuf); - outbuf = NULL; - - skip: - /* Now flush the samples we needed for this frame, which might be more than - * the samples we used (GOOM_SAMPLES). */ - to_flush = goom->bpf; - - GST_DEBUG_OBJECT (goom, "finished frame, flushing %u bytes from input", - to_flush); - gst_adapter_flush (goom->adapter, to_flush); - - if (ret != GST_FLOW_OK) - break; - } - - if (outbuf != NULL) - gst_buffer_unref (outbuf); - -beach: - - return ret; -} - -static GstStateChangeReturn -gst_goom_change_state (GstElement * element, GstStateChange transition) -{ - GstGoom *goom = GST_GOOM (element); - GstStateChangeReturn ret; - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - gst_goom_reset (goom); - break; - default: - break; } - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + video->data[0] = goom_update (&(goom->goomdata), datain); + gst_buffer_unmap (audio, &amap); - switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: - if (goom->pool) { - gst_buffer_pool_set_active (goom->pool, FALSE); - gst_object_replace ((GstObject **) & goom->pool, NULL); - } - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return ret; + return TRUE; } static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "goom2k1", GST_RANK_NONE, GST_TYPE_GOOM); + return gst_element_register (plugin, "goom2k1", GST_RANK_NONE, + GST_TYPE_GOOM2K1); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/gstgoom.h gst-plugins-good1.0-1.6.1/gst/goom2k1/gstgoom.h --- gst-plugins-good1.0-1.4.3/gst/goom2k1/gstgoom.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/gstgoom.h 2015-10-22 08:02:54.000000000 +0000 @@ -1,5 +1,7 @@ /* gstgoom.c: implementation of goom drawing element * Copyright (C) <2001> Richard Boulton + * (C) <2006> Wim Taymans + * Copyright (C) <2015> Luis de Bethencourt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,68 +22,44 @@ #ifndef __GST_GOOM_H__ #define __GST_GOOM_H__ -G_BEGIN_DECLS - -#include -#include +#include "gstaudiovisualizer.h" #include "goom_core.h" -#define GOOM_SAMPLES 512 +G_BEGIN_DECLS -#define GST_TYPE_GOOM (gst_goom_get_type()) -#define GST_GOOM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GOOM,GstGoom)) -#define GST_GOOM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GOOM,GstGoomClass)) -#define GST_IS_GOOM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GOOM)) -#define GST_IS_GOOM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GOOM)) +#define GOOM2K1_SAMPLES 512 -typedef struct _GstGoom GstGoom; -typedef struct _GstGoomClass GstGoomClass; +#define GST_TYPE_GOOM2K1 (gst_goom2k1_get_type()) +#define GST_GOOM2K1(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GOOM2K1,GstGoom2k1)) +#define GST_GOOM2K1_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GOOM2K1,GstGoom2k1Class)) +#define GST_IS_GOOM2K1(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GOOM2K1)) +#define GST_IS_GOOM2K1_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GOOM2K1)) -struct _GstGoom -{ - GstElement element; +typedef struct _GstGoom2k1 GstGoom2k1; +typedef struct _GstGoom2k1Class GstGoom2k1Class; - /* pads */ - GstPad *sinkpad, *srcpad; - GstAdapter *adapter; +struct _GstGoom2k1 +{ + GstAudioVisualizer parent; /* input tracking */ - gint rate; gint channels; - guint bps; /* video state */ - gint fps_n; - gint fps_d; gint width; gint height; - GstClockTime duration; - guint outsize; - GstBufferPool *pool; - - /* samples per frame */ - guint spf; - /* bytes per frame */ - guint bpf; /* goom stuff */ - gint16 datain[2][GOOM_SAMPLES]; GoomData goomdata; - - /* segment state */ - GstSegment segment; - - /* QoS stuff *//* with LOCK */ - gdouble proportion; - GstClockTime earliest_time; }; -struct _GstGoomClass +struct _GstGoom2k1Class { - GstElementClass parent_class; + GstAudioVisualizerClass parent_class; }; -GType gst_goom_get_type (void); +GType gst_goom2k1_get_type (void); +gboolean gst_goom2k1_plugin_init (GstPlugin * plugin); G_END_DECLS diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/lines.c gst-plugins-good1.0-1.6.1/gst/goom2k1/lines.c --- gst-plugins-good1.0-1.4.3/gst/goom2k1/lines.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/lines.c 2015-10-22 08:02:54.000000000 +0000 @@ -88,8 +88,8 @@ { float z; unsigned int monX = resolx / 2; - float monY = resoly / 4; - float monY2 = resoly / 2; + float monY = (float) resoly / 4; + float monY2 = (float) resoly / 2; for (z = 0; z < 6.2832f; z += 1.0f / monY) { /* float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000; */ diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/Makefile.am gst-plugins-good1.0-1.6.1/gst/goom2k1/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/goom2k1/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -3,9 +3,11 @@ GOOM_FILTER_FILES = filters.c GOOM_FILTER_CFLAGS = -UMMX -UUSE_ASM -noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h +noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h \ + gstaudiovisualizer.h -libgstgoom2k1_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c lines.c +libgstgoom2k1_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c \ + lines.c gstaudiovisualizer.c libgstgoom2k1_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) \ -Dgst_goom_get_type=gst_goom2k1_get_type \ @@ -22,22 +24,8 @@ -DzoomFilterDestroy=zoomFilterDestroy2k1 \ -DzoomFilterNew=zoomFilterNew2k1 -libgstgoom2k1_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) +libgstgoom2k1_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) libgstgoom2k1_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom2k1_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) EXTRA_DIST = filters.c - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstgoom2k1 -:SHARED libgstgoom2k1 \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstgoom2k1_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom2k1_la_CFLAGS) \ - -:LDFLAGS $(libgstgoom2k1_la_LDFLAGS) \ - $(libgstgoom2k1_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/goom2k1/Makefile.in gst-plugins-good1.0-1.6.1/gst/goom2k1/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/goom2k1/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/goom2k1/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/goom2k1 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -158,7 +167,8 @@ am__objects_1 = libgstgoom2k1_la-filters.lo am_libgstgoom2k1_la_OBJECTS = libgstgoom2k1_la-gstgoom.lo \ libgstgoom2k1_la-goom_core.lo $(am__objects_1) \ - libgstgoom2k1_la-graphic.lo libgstgoom2k1_la-lines.lo + libgstgoom2k1_la-graphic.lo libgstgoom2k1_la-lines.lo \ + libgstgoom2k1_la-gstaudiovisualizer.lo libgstgoom2k1_la_OBJECTS = $(am_libgstgoom2k1_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -229,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +372,6 @@ 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@ @@ -481,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -559,8 +568,12 @@ plugin_LTLIBRARIES = libgstgoom2k1.la GOOM_FILTER_FILES = filters.c GOOM_FILTER_CFLAGS = -UMMX -UUSE_ASM -noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h -libgstgoom2k1_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c lines.c +noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h \ + gstaudiovisualizer.h + +libgstgoom2k1_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c \ + lines.c gstaudiovisualizer.c + libgstgoom2k1_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) \ -Dgst_goom_get_type=gst_goom2k1_get_type \ -Dgoom_init=goom2k1_init \ @@ -576,7 +589,7 @@ -DzoomFilterDestroy=zoomFilterDestroy2k1 \ -DzoomFilterNew=zoomFilterNew2k1 -libgstgoom2k1_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) +libgstgoom2k1_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) libgstgoom2k1_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom2k1_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) EXTRA_DIST = filters.c @@ -596,7 +609,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/goom2k1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/goom2k1/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -662,6 +674,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-filters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-goom_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-graphic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-gstgoom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-lines.Plo@am__quote@ @@ -724,6 +737,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom2k1_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom2k1_la_CFLAGS) $(CFLAGS) -c -o libgstgoom2k1_la-lines.lo `test -f 'lines.c' || echo '$(srcdir)/'`lines.c +libgstgoom2k1_la-gstaudiovisualizer.lo: gstaudiovisualizer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom2k1_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom2k1_la_CFLAGS) $(CFLAGS) -MT libgstgoom2k1_la-gstaudiovisualizer.lo -MD -MP -MF $(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Tpo -c -o libgstgoom2k1_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Tpo $(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstaudiovisualizer.c' object='libgstgoom2k1_la-gstaudiovisualizer.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 $(libgstgoom2k1_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom2k1_la_CFLAGS) $(CFLAGS) -c -o libgstgoom2k1_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c + mostlyclean-libtool: -rm -f *.lo @@ -937,20 +957,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstgoom2k1 -:SHARED libgstgoom2k1 \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstgoom2k1_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom2k1_la_CFLAGS) \ - -:LDFLAGS $(libgstgoom2k1_la_LDFLAGS) \ - $(libgstgoom2k1_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/icydemux/gsticydemux.c gst-plugins-good1.0-1.6.1/gst/icydemux/gsticydemux.c --- gst-plugins-good1.0-1.4.3/gst/icydemux/gsticydemux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/icydemux/gsticydemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -551,6 +551,7 @@ if (icydemux->meta_interval == 0) { ret = gst_icydemux_typefind_or_forward (icydemux, buf); + buf = NULL; goto done; } diff -Nru gst-plugins-good1.0-1.4.3/gst/icydemux/Makefile.am gst-plugins-good1.0-1.6.1/gst/icydemux/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/icydemux/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/icydemux/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -2,22 +2,8 @@ libgsticydemux_la_SOURCES = gsticydemux.c libgsticydemux_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgsticydemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) +libgsticydemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) libgsticydemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgsticydemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gsticydemux.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgsticydemux -:SHARED libgsticydemux \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgsticydemux_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsticydemux_la_CFLAGS) \ - -:LDFLAGS $(libgsticydemux_la_LDFLAGS) \ - $(libgsticydemux_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/icydemux/Makefile.in gst-plugins-good1.0-1.6.1/gst/icydemux/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/icydemux/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/icydemux/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/icydemux -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -154,8 +163,7 @@ LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libgsticydemux_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libgsticydemux_la_OBJECTS = libgsticydemux_la-gsticydemux.lo libgsticydemux_la_OBJECTS = $(am_libgsticydemux_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -227,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +368,6 @@ 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@ @@ -479,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -557,7 +564,7 @@ plugin_LTLIBRARIES = libgsticydemux.la libgsticydemux_la_SOURCES = gsticydemux.c libgsticydemux_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgsticydemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) +libgsticydemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) libgsticydemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgsticydemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gsticydemux.h @@ -577,7 +584,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/icydemux/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/icydemux/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -886,20 +892,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgsticydemux -:SHARED libgsticydemux \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgsticydemux_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsticydemux_la_CFLAGS) \ - -:LDFLAGS $(libgsticydemux_la_LDFLAGS) \ - $(libgsticydemux_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/id3demux/gstid3demux.c gst-plugins-good1.0-1.6.1/gst/id3demux/gstid3demux.c --- gst-plugins-good1.0-1.4.3/gst/id3demux/gstid3demux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/id3demux/gstid3demux.c 2015-10-22 08:02:54.000000000 +0000 @@ -58,8 +58,8 @@ enum { - ARG_0, - ARG_PREFER_V1 + PROP_0, + PROP_PREFER_V1 }; #define DEFAULT_PREFER_V1 FALSE @@ -102,7 +102,7 @@ gobject_class->set_property = gst_id3demux_set_property; gobject_class->get_property = gst_id3demux_get_property; - g_object_class_install_property (gobject_class, ARG_PREFER_V1, + g_object_class_install_property (gobject_class, PROP_PREFER_V1, g_param_spec_boolean ("prefer-v1", "Prefer version 1 tag", "Prefer tags from ID3v1 tag at end of file when both ID3v1 " "and ID3v2 tags are present", DEFAULT_PREFER_V1, @@ -239,7 +239,7 @@ id3demux = GST_ID3DEMUX (object); switch (prop_id) { - case ARG_PREFER_V1:{ + case PROP_PREFER_V1:{ GST_OBJECT_LOCK (id3demux); id3demux->prefer_v1 = g_value_get_boolean (value); GST_OBJECT_UNLOCK (id3demux); @@ -260,7 +260,7 @@ id3demux = GST_ID3DEMUX (object); switch (prop_id) { - case ARG_PREFER_V1: + case PROP_PREFER_V1: GST_OBJECT_LOCK (id3demux); g_value_set_boolean (value, id3demux->prefer_v1); GST_OBJECT_UNLOCK (id3demux); diff -Nru gst-plugins-good1.0-1.4.3/gst/id3demux/Makefile.am gst-plugins-good1.0-1.6.1/gst/id3demux/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/id3demux/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/id3demux/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -8,17 +8,3 @@ libgstid3demux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstid3demux.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstid3demux -:SHARED libgstid3demux \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstid3demux_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstid3demux_la_CFLAGS) \ - -:LDFLAGS $(libgstid3demux_la_LDFLAGS) \ - $(libgstid3demux_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/id3demux/Makefile.in gst-plugins-good1.0-1.6.1/gst/id3demux/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/id3demux/Makefile.in 2014-09-24 07:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/id3demux/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/id3demux -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -578,7 +586,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/id3demux/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/id3demux/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -887,20 +894,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstid3demux -:SHARED libgstid3demux \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstid3demux_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstid3demux_la_CFLAGS) \ - -:LDFLAGS $(libgstid3demux_la_LDFLAGS) \ - $(libgstid3demux_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/imagefreeze/gstimagefreeze.c gst-plugins-good1.0-1.6.1/gst/imagefreeze/gstimagefreeze.c --- gst-plugins-good1.0-1.4.3/gst/imagefreeze/gstimagefreeze.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/imagefreeze/gstimagefreeze.c 2015-10-22 08:02:54.000000000 +0000 @@ -28,7 +28,7 @@ * * Example launch line * |[ - * gst-launch-1.0 -v filesrc location=some.png ! decodebin2 ! imagefreeze ! autovideosink + * gst-launch-1.0 -v filesrc location=some.png ! decodebin ! imagefreeze ! autovideosink * ]| This pipeline shows a still frame stream of a PNG file. * */ @@ -158,6 +158,7 @@ self->fps_n = self->fps_d = 0; self->offset = 0; + self->seqnum = 0; g_mutex_unlock (&self->lock); g_atomic_int_set (&self->seeking, 0); @@ -174,7 +175,7 @@ GstPad *pad; pad = self->sinkpad; - caps = gst_caps_make_writable (gst_caps_ref (caps)); + caps = gst_caps_copy (caps); GST_DEBUG_OBJECT (pad, "Setting caps: %" GST_PTR_FORMAT, caps); @@ -285,7 +286,8 @@ GST_LOG_OBJECT (self, "going to copy"); ret = gst_caps_copy (templ); } - gst_caps_unref (templ); + if (templ) + gst_caps_unref (templ); if (filter) gst_caps_unref (filter); @@ -569,6 +571,7 @@ gint64 last_stop; gboolean start_task; gboolean flush; + guint32 seqnum; gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start, &stop_type, &stop); @@ -597,11 +600,13 @@ } } + seqnum = gst_event_get_seqnum (event); if (flush) { GstEvent *e; g_atomic_int_set (&self->seeking, 1); e = gst_event_new_flush_start (); + gst_event_set_seqnum (e, seqnum); gst_pad_push_event (self->srcpad, e); } else { gst_pad_pause_task (self->srcpad); @@ -623,6 +628,7 @@ GstEvent *e; e = gst_event_new_flush_stop (TRUE); + gst_event_set_seqnum (e, seqnum); gst_pad_push_event (self->srcpad, e); g_atomic_int_set (&self->seeking, 0); } @@ -635,6 +641,7 @@ gst_element_post_message (GST_ELEMENT (self), m); } + self->seqnum = seqnum; GST_PAD_STREAM_UNLOCK (self->srcpad); GST_DEBUG_OBJECT (pad, "Seek successful"); @@ -710,8 +717,8 @@ g_mutex_unlock (&self->lock); goto pause_task; } - buffer = gst_buffer_ref (self->buffer); - buffer = gst_buffer_make_writable (buffer); + buffer = gst_buffer_copy (self->buffer); + g_mutex_unlock (&self->lock); if (self->need_segment) { @@ -721,6 +728,9 @@ &self->segment); e = gst_event_new_segment (&self->segment); + if (self->seqnum) + gst_event_set_seqnum (e, self->seqnum); + g_mutex_lock (&self->lock); if (self->segment.rate >= 0) { self->offset = @@ -827,14 +837,25 @@ gst_element_post_message (GST_ELEMENT_CAST (self), m); gst_pad_push_event (self->srcpad, e); } else { + GstEvent *e = gst_event_new_eos (); + GST_DEBUG_OBJECT (pad, "Sending EOS at end of segment"); - gst_pad_push_event (self->srcpad, gst_event_new_eos ()); + + if (self->seqnum) + gst_event_set_seqnum (e, self->seqnum); + gst_pad_push_event (self->srcpad, e); } } else if (flow_ret == GST_FLOW_NOT_LINKED || flow_ret < GST_FLOW_EOS) { + GstEvent *e = gst_event_new_eos (); + GST_ELEMENT_ERROR (self, STREAM, FAILED, ("Internal data stream error."), ("stream stopped, reason %s", reason)); - gst_pad_push_event (self->srcpad, gst_event_new_eos ()); + + if (self->seqnum) + gst_event_set_seqnum (e, self->seqnum); + + gst_pad_push_event (self->srcpad, e); } return; } diff -Nru gst-plugins-good1.0-1.4.3/gst/imagefreeze/gstimagefreeze.h gst-plugins-good1.0-1.6.1/gst/imagefreeze/gstimagefreeze.h --- gst-plugins-good1.0-1.4.3/gst/imagefreeze/gstimagefreeze.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/imagefreeze/gstimagefreeze.h 2015-10-22 08:02:54.000000000 +0000 @@ -53,6 +53,7 @@ GstSegment segment; gboolean need_segment; + guint seqnum; guint64 offset; diff -Nru gst-plugins-good1.0-1.4.3/gst/imagefreeze/Makefile.am gst-plugins-good1.0-1.6.1/gst/imagefreeze/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/imagefreeze/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/imagefreeze/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -8,17 +8,3 @@ libgstimagefreeze_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstimagefreeze.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstimagefreeze -:SHARED libgstimagefreeze \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstimagefreeze_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstimagefreeze_la_CFLAGS) \ - -:LDFLAGS $(libgstimagefreeze_la_LDFLAGS) \ - $(libgstimagefreeze_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/imagefreeze/Makefile.in gst-plugins-good1.0-1.6.1/gst/imagefreeze/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/imagefreeze/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/imagefreeze/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/imagefreeze -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -576,7 +584,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/imagefreeze/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/imagefreeze/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -885,20 +892,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstimagefreeze -:SHARED libgstimagefreeze \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstimagefreeze_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstimagefreeze_la_CFLAGS) \ - -:LDFLAGS $(libgstimagefreeze_la_LDFLAGS) \ - $(libgstimagefreeze_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/interleave/interleave.c gst-plugins-good1.0-1.6.1/gst/interleave/interleave.c --- gst-plugins-good1.0-1.4.3/gst/interleave/interleave.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/interleave/interleave.c 2015-10-22 08:02:54.000000000 +0000 @@ -255,9 +255,24 @@ G_OBJECT_CLASS (parent_class)->finalize (object); } +static gint +compare_positions (gconstpointer a, gconstpointer b, gpointer user_data) +{ + const gint i = *(const gint *) a; + const gint j = *(const gint *) b; + const gint *pos = (const gint *) user_data; + + if (pos[i] < pos[j]) + return -1; + else if (pos[i] > pos[j]) + return 1; + else + return 0; +} + static gboolean gst_interleave_channel_positions_to_mask (GValueArray * positions, - guint64 * mask) + gint default_ordering_map[64], guint64 * mask) { gint i; guint channels; @@ -274,6 +289,13 @@ pos[i] = g_value_get_enum (val); } + /* sort the default ordering map according to the position order */ + for (i = 0; i < channels; i++) { + default_ordering_map[i] = i; + } + g_qsort_with_data (default_ordering_map, channels, + sizeof (*default_ordering_map), compare_positions, pos); + ret = gst_audio_channel_positions_to_mask (pos, channels, FALSE, mask); g_free (pos); @@ -288,7 +310,7 @@ if (self->channel_positions != NULL && self->channels == self->channel_positions->n_values) { if (!gst_interleave_channel_positions_to_mask (self->channel_positions, - &channel_mask)) { + self->default_channels_ordering_map, &channel_mask)) { GST_WARNING_OBJECT (self, "Invalid channel positions, using NONE"); channel_mask = 0; } @@ -431,7 +453,6 @@ self->channel_positions = g_value_dup_boxed (value); self->channel_positions_from_input = FALSE; - self->channels = self->channel_positions->n_values; break; case PROP_CHANNEL_POSITIONS_FROM_INPUT: self->channel_positions_from_input = g_value_get_boolean (value); @@ -475,23 +496,23 @@ GstInterleave *self = GST_INTERLEAVE (element); GstPad *new_pad; gchar *pad_name; - gint channels, padnumber; + gint channel, padnumber; GValue val = { 0, }; if (templ->direction != GST_PAD_SINK) goto not_sink_pad; padnumber = g_atomic_int_add (&self->padcounter, 1); - if (self->channel_positions_from_input) - channels = g_atomic_int_add (&self->channels, 1); - else - channels = padnumber; + + channel = g_atomic_int_add (&self->channels, 1); + if (!self->channel_positions_from_input) + channel = padnumber; pad_name = g_strdup_printf ("sink_%u", padnumber); new_pad = GST_PAD_CAST (g_object_new (GST_TYPE_INTERLEAVE_PAD, "name", pad_name, "direction", templ->direction, "template", templ, NULL)); - GST_INTERLEAVE_PAD_CAST (new_pad)->channel = channels; + GST_INTERLEAVE_PAD_CAST (new_pad)->channel = channel; GST_DEBUG_OBJECT (self, "requested new pad %s", pad_name); g_free (pad_name); @@ -728,6 +749,16 @@ GST_OBJECT_UNLOCK (self); + if (filter != NULL) { + GstCaps *caps = result; + + GST_LOG_OBJECT (pad, "intersecting filter caps %" GST_PTR_FORMAT " with " + "preliminary result %" GST_PTR_FORMAT, filter, caps); + + result = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (caps); + } + GST_DEBUG_OBJECT (pad, "Returning caps %" GST_PTR_FORMAT, result); return result; @@ -1005,91 +1036,6 @@ } static gboolean -gst_interleave_src_query_latency (GstInterleave * self, GstQuery * query) -{ - GstClockTime min, max; - gboolean live; - gboolean res; - GstIterator *it; - gboolean done; - - res = TRUE; - done = FALSE; - - live = FALSE; - min = 0; - max = GST_CLOCK_TIME_NONE; - - /* Take maximum of all latency values */ - it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (self)); - while (!done) { - GstIteratorResult ires; - GValue item = { 0, }; - - ires = gst_iterator_next (it, &item); - switch (ires) { - case GST_ITERATOR_DONE: - done = TRUE; - break; - case GST_ITERATOR_OK: - { - GstPad *pad = GST_PAD_CAST (g_value_dup_object (&item)); - GstQuery *peerquery; - GstClockTime min_cur, max_cur; - gboolean live_cur; - - peerquery = gst_query_new_latency (); - - /* Ask peer for latency */ - res &= gst_pad_peer_query (pad, peerquery); - - /* take max from all valid return values */ - if (res) { - gst_query_parse_latency (peerquery, &live_cur, &min_cur, &max_cur); - - if (min_cur > min) - min = min_cur; - - if (max_cur != GST_CLOCK_TIME_NONE && - ((max != GST_CLOCK_TIME_NONE && max_cur > max) || - (max == GST_CLOCK_TIME_NONE))) - max = max_cur; - - live = live || live_cur; - } - - gst_query_unref (peerquery); - gst_object_unref (pad); - g_value_unset (&item); - break; - } - case GST_ITERATOR_RESYNC: - live = FALSE; - min = 0; - max = GST_CLOCK_TIME_NONE; - res = TRUE; - gst_iterator_resync (it); - break; - default: - res = FALSE; - done = TRUE; - break; - } - } - gst_iterator_free (it); - - if (res) { - /* store the results */ - GST_DEBUG_OBJECT (self, "Calculated total latency: live %s, min %" - GST_TIME_FORMAT ", max %" GST_TIME_FORMAT, - (live ? "yes" : "no"), GST_TIME_ARGS (min), GST_TIME_ARGS (max)); - gst_query_set_latency (query, live, min, max); - } - - return res; -} - -static gboolean gst_interleave_src_query (GstPad * pad, GstObject * parent, GstQuery * query) { GstInterleave *self = GST_INTERLEAVE (parent); @@ -1125,9 +1071,6 @@ case GST_QUERY_DURATION: res = gst_interleave_src_query_duration (self, query); break; - case GST_QUERY_LATENCY: - res = gst_interleave_src_query_latency (self, query); - break; default: /* FIXME, needs a custom query handler because we have multiple * sinkpads */ @@ -1264,6 +1207,7 @@ GstBuffer *inbuf; guint8 *outdata; GstMapInfo input_info; + gint channel; cdata = (GstCollectData *) collected->data; @@ -1282,8 +1226,9 @@ goto next; empty = FALSE; + channel = GST_INTERLEAVE_PAD_CAST (cdata->pad)->channel; outdata = - write_info.data + width * GST_INTERLEAVE_PAD_CAST (cdata->pad)->channel; + write_info.data + width * self->default_channels_ordering_map[channel]; self->func (outdata, input_info.data, self->channels, nsamples); gst_buffer_unmap (inbuf, &input_info); diff -Nru gst-plugins-good1.0-1.4.3/gst/interleave/interleave.h gst-plugins-good1.0-1.6.1/gst/interleave/interleave.h --- gst-plugins-good1.0-1.4.3/gst/interleave/interleave.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/interleave/interleave.h 2015-10-22 08:02:54.000000000 +0000 @@ -60,6 +60,8 @@ GValueArray *input_channel_positions; gboolean channel_positions_from_input; + gint default_channels_ordering_map[64]; + GstCaps *sinkcaps; gint configured_sinkpads_counter; diff -Nru gst-plugins-good1.0-1.4.3/gst/interleave/Makefile.am gst-plugins-good1.0-1.6.1/gst/interleave/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/interleave/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/interleave/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -8,17 +8,3 @@ libgstinterleave_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = plugin.h interleave.h deinterleave.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstinterleave -:SHARED libgstinterleave \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstinterleave_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinterleave_la_CFLAGS) \ - -:LDFLAGS $(libgstinterleave_la_LDFLAGS) \ - $(libgstinterleave_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/interleave/Makefile.in gst-plugins-good1.0-1.6.1/gst/interleave/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/interleave/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/interleave/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/interleave -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -578,7 +586,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/interleave/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/interleave/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -903,20 +910,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstinterleave -:SHARED libgstinterleave \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstinterleave_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinterleave_la_CFLAGS) \ - -:LDFLAGS $(libgstinterleave_la_LDFLAGS) \ - $(libgstinterleave_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/atoms.c gst-plugins-good1.0-1.6.1/gst/isomp4/atoms.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/atoms.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/atoms.c 2015-10-22 08:02:54.000000000 +0000 @@ -48,8 +48,9 @@ #include #include #include +#include -/** +/* * Creates a new AtomsContext for the given flavor. */ AtomsContext * @@ -60,7 +61,7 @@ return context; } -/** +/* * Frees an AtomsContext and all memory associated with it */ void @@ -195,14 +196,22 @@ static void atom_data_alloc_mem (AtomData * data, guint32 size) { - if (data->data) { - g_free (data->data); - } + g_free (data->data); data->data = g_new0 (guint8, size); data->datalen = size; } static AtomData * +atom_data_new_from_data (guint32 fourcc, const guint8 * mem, gsize size) +{ + AtomData *data = atom_data_new (fourcc); + + atom_data_alloc_mem (data, size); + memcpy (data->data, mem, size); + return data; +} + +static AtomData * atom_data_new_from_gst_buffer (guint32 fourcc, const GstBuffer * buf) { AtomData *data = atom_data_new (fourcc); @@ -1040,42 +1049,6 @@ } static void -atom_trak_init (AtomTRAK * trak, AtomsContext * context) -{ - atom_header_set (&trak->header, FOURCC_trak, 0, 0); - - atom_tkhd_init (&trak->tkhd, context); - trak->edts = NULL; - atom_mdia_init (&trak->mdia, context); -} - -AtomTRAK * -atom_trak_new (AtomsContext * context) -{ - AtomTRAK *trak = g_new0 (AtomTRAK, 1); - - atom_trak_init (trak, context); - return trak; -} - -static void -atom_trak_clear (AtomTRAK * trak) -{ - atom_clear (&trak->header); - atom_tkhd_clear (&trak->tkhd); - if (trak->edts) - atom_edts_free (trak->edts); - atom_mdia_clear (&trak->mdia); -} - -static void -atom_trak_free (AtomTRAK * trak) -{ - atom_trak_clear (trak); - g_free (trak); -} - -static void atom_ilst_init (AtomILST * ilst) { atom_header_set (&ilst->header, FOURCC_ilst, 0, 0); @@ -1134,23 +1107,30 @@ } static void -atom_udta_init (AtomUDTA * udta) +atom_udta_init_metatags (AtomUDTA * udta, AtomsContext * context) { - atom_header_set (&udta->header, FOURCC_udta, 0, 0); - udta->meta = NULL; + if (context->flavor != ATOMS_TREE_FLAVOR_3GP) { + if (!udta->meta) { + udta->meta = atom_meta_new (context); + } + if (!udta->meta->ilst) { + udta->meta->ilst = atom_ilst_new (); + } + } } -static AtomUDTA * -atom_udta_new (void) +static void +atom_udta_init (AtomUDTA * udta, AtomsContext * context) { - AtomUDTA *udta = g_new0 (AtomUDTA, 1); + atom_header_set (&udta->header, FOURCC_udta, 0, 0); + udta->meta = NULL; + udta->context = context; - atom_udta_init (udta); - return udta; + atom_udta_init_metatags (udta, context); } static void -atom_udta_free (AtomUDTA * udta) +atom_udta_clear (AtomUDTA * udta) { atom_clear (&udta->header); if (udta->meta) @@ -1158,7 +1138,20 @@ udta->meta = NULL; if (udta->entries) atom_info_list_free (udta->entries); - g_free (udta); +} + +/* Clear added tags, but keep the context/flavor the same */ +void +atom_udta_clear_tags (AtomUDTA * udta) +{ + if (udta->entries) { + atom_info_list_free (udta->entries); + udta->entries = NULL; + } + if (udta->meta && udta->meta->ilst->entries) { + atom_info_list_free (udta->meta->ilst->entries); + udta->meta->ilst->entries = NULL; + } } static void @@ -1253,12 +1246,52 @@ } static void +atom_trak_init (AtomTRAK * trak, AtomsContext * context) +{ + atom_header_set (&trak->header, FOURCC_trak, 0, 0); + + atom_tkhd_init (&trak->tkhd, context); + trak->context = context; + atom_udta_init (&trak->udta, context); + trak->edts = NULL; + atom_mdia_init (&trak->mdia, context); +} + +AtomTRAK * +atom_trak_new (AtomsContext * context) +{ + AtomTRAK *trak = g_new0 (AtomTRAK, 1); + + atom_trak_init (trak, context); + return trak; +} + +static void +atom_trak_clear (AtomTRAK * trak) +{ + atom_clear (&trak->header); + atom_tkhd_clear (&trak->tkhd); + if (trak->edts) + atom_edts_free (trak->edts); + atom_udta_clear (&trak->udta); + atom_mdia_clear (&trak->mdia); +} + +static void +atom_trak_free (AtomTRAK * trak) +{ + atom_trak_clear (trak); + g_free (trak); +} + + +static void atom_moov_init (AtomMOOV * moov, AtomsContext * context) { atom_header_set (&(moov->header), FOURCC_moov, 0, 0); atom_mvhd_init (&(moov->mvhd)); atom_mvex_init (&(moov->mvex)); - moov->udta = NULL; + atom_udta_init (&moov->udta, context); moov->traks = NULL; moov->context = *context; } @@ -1310,11 +1343,7 @@ g_list_free (moov->traks); moov->traks = NULL; - if (moov->udta) { - atom_udta_free (moov->udta); - moov->udta = NULL; - } - + atom_udta_clear (&moov->udta); atom_mvex_clear (&moov->mvex); g_free (moov); @@ -1721,23 +1750,6 @@ } static guint64 -atom_mp4s_copy_data (SampleTableEntryMP4S * mp4s, guint8 ** buffer, - guint64 * size, guint64 * offset) -{ - guint64 original_offset = *offset; - - if (!atom_sample_entry_copy_data (&mp4s->se, buffer, size, offset)) { - return 0; - } - if (!atom_esds_copy_data (&mp4s->es, buffer, size, offset)) { - return 0; - } - - atom_write_size (buffer, size, offset, original_offset); - return *offset - original_offset; -} - -static guint64 atom_hint_sample_entry_copy_data (AtomHintSampleEntry * hse, guint8 ** buffer, guint64 * size, guint64 * offset) { @@ -1973,12 +1985,13 @@ prop_copy_ensure_buffer (buffer, size, offset, 8 * atom_array_get_len (&stco64->entries)); for (i = 0; i < atom_array_get_len (&stco64->entries); i++) { - guint64 *value = &atom_array_index (&stco64->entries, i); + guint64 value = + atom_array_index (&stco64->entries, i) + stco64->chunk_offset; if (trunc_to_32) { - prop_copy_uint32 ((guint32) * value, buffer, size, offset); + prop_copy_uint32 ((guint32) value, buffer, size, offset); } else { - prop_copy_uint64 (*value, buffer, size, offset); + prop_copy_uint64 (value, buffer, size, offset); } } @@ -2039,12 +2052,6 @@ return 0; } break; - case FOURCC_mp4s: - if (!atom_mp4s_copy_data ((SampleTableEntryMP4S *) walker->data, - buffer, size, offset)) { - return 0; - } - break; case FOURCC_mp4v: if (!sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *) walker->data, buffer, size, offset)) { @@ -2302,32 +2309,6 @@ return *offset - original_offset; } -guint64 -atom_trak_copy_data (AtomTRAK * trak, guint8 ** buffer, guint64 * size, - guint64 * offset) -{ - guint64 original_offset = *offset; - - if (!atom_copy_data (&trak->header, buffer, size, offset)) { - return 0; - } - if (!atom_tkhd_copy_data (&trak->tkhd, buffer, size, offset)) { - return 0; - } - if (trak->edts) { - if (!atom_edts_copy_data (trak->edts, buffer, size, offset)) { - return 0; - } - } - - if (!atom_mdia_copy_data (&trak->mdia, buffer, size, offset)) { - return 0; - } - - atom_write_size (buffer, size, offset, original_offset); - return *offset - original_offset; -} - static guint64 atom_tag_data_copy_data (AtomTagData * data, guint8 ** buffer, guint64 * size, guint64 * offset) @@ -2492,6 +2473,37 @@ } guint64 +atom_trak_copy_data (AtomTRAK * trak, guint8 ** buffer, guint64 * size, + guint64 * offset) +{ + guint64 original_offset = *offset; + + if (!atom_copy_data (&trak->header, buffer, size, offset)) { + return 0; + } + if (!atom_tkhd_copy_data (&trak->tkhd, buffer, size, offset)) { + return 0; + } + if (trak->edts) { + if (!atom_edts_copy_data (trak->edts, buffer, size, offset)) { + return 0; + } + } + + if (!atom_mdia_copy_data (&trak->mdia, buffer, size, offset)) { + return 0; + } + + if (!atom_udta_copy_data (&trak->udta, buffer, size, offset)) { + return 0; + } + + atom_write_size (buffer, size, offset, original_offset); + return *offset - original_offset; +} + + +guint64 atom_moov_copy_data (AtomMOOV * atom, guint8 ** buffer, guint64 * size, guint64 * offset) { @@ -2512,10 +2524,8 @@ walker = g_list_next (walker); } - if (atom->udta) { - if (!atom_udta_copy_data (atom->udta, buffer, size, offset)) { - return 0; - } + if (!atom_udta_copy_data (&atom->udta, buffer, size, offset)) { + return 0; } if (atom->fragmented) { @@ -2739,6 +2749,12 @@ atom_moov_add_trex (moov, atom_trex_new (trak)); } +guint +atom_moov_get_trak_count (AtomMOOV * moov) +{ + return g_list_length (moov->traks); +} + static guint64 atom_trak_get_duration (AtomTRAK * trak) { @@ -2811,28 +2827,27 @@ } void -atom_stco64_chunks_add_offset (AtomSTCO64 * stco64, guint32 offset) +atom_stco64_chunks_set_offset (AtomSTCO64 * stco64, guint32 offset) { - guint i; - - for (i = 0; i < atom_array_get_len (&stco64->entries); i++) { - guint64 *value = &atom_array_index (&stco64->entries, i); - - *value += offset; - } + stco64->chunk_offset = offset; } void -atom_moov_chunks_add_offset (AtomMOOV * moov, guint32 offset) +atom_moov_chunks_set_offset (AtomMOOV * moov, guint32 offset) { GList *traks = moov->traks; + if (offset == moov->chunks_offset) + return; /* Nothing to do */ + while (traks) { AtomTRAK *trak = (AtomTRAK *) traks->data; - atom_stco64_chunks_add_offset (&trak->mdia.minf.stbl.stco64, offset); + atom_stco64_chunks_set_offset (&trak->mdia.minf.stbl.stco64, offset); traks = g_list_next (traks); } + + moov->chunks_offset = offset; } void @@ -2948,22 +2963,6 @@ * Meta tags functions */ static void -atom_moov_init_metatags (AtomMOOV * moov, AtomsContext * context) -{ - if (!moov->udta) { - moov->udta = atom_udta_new (); - } - if (context->flavor != ATOMS_TREE_FLAVOR_3GP) { - if (!moov->udta->meta) { - moov->udta->meta = atom_meta_new (context); - } - if (!moov->udta->meta->ilst) { - moov->udta->meta->ilst = atom_ilst_new (); - } - } -} - -static void atom_tag_data_alloc_data (AtomTagData * data, guint size) { if (data->data != NULL) { @@ -2974,20 +2973,19 @@ } static void -atom_moov_append_tag (AtomMOOV * moov, AtomInfo * tag) +atom_udta_append_tag (AtomUDTA * udta, AtomInfo * tag) { GList **entries; - atom_moov_init_metatags (moov, &moov->context); - if (moov->udta->meta) - entries = &moov->udta->meta->ilst->entries; + if (udta->meta) + entries = &udta->meta->ilst->entries; else - entries = &moov->udta->entries; + entries = &udta->entries; *entries = g_list_append (*entries, tag); } void -atom_moov_add_tag (AtomMOOV * moov, guint32 fourcc, guint32 flags, +atom_udta_add_tag (AtomUDTA * udta, guint32 fourcc, guint32 flags, const guint8 * data, guint size) { AtomTag *tag; @@ -2998,53 +2996,43 @@ atom_tag_data_alloc_data (tdata, size); memmove (tdata->data, data, size); - atom_moov_append_tag (moov, + atom_udta_append_tag (udta, build_atom_info_wrapper ((Atom *) tag, atom_tag_copy_data, atom_tag_free)); } void -atom_moov_add_str_tag (AtomMOOV * moov, guint32 fourcc, const gchar * value) +atom_udta_add_str_tag (AtomUDTA * udta, guint32 fourcc, const gchar * value) { gint len = strlen (value); if (len > 0) - atom_moov_add_tag (moov, fourcc, METADATA_TEXT_FLAG, (guint8 *) value, len); + atom_udta_add_tag (udta, fourcc, METADATA_TEXT_FLAG, (guint8 *) value, len); } void -atom_moov_add_uint_tag (AtomMOOV * moov, guint32 fourcc, guint32 flags, +atom_udta_add_uint_tag (AtomUDTA * udta, guint32 fourcc, guint32 flags, guint32 value) { guint8 data[8] = { 0, }; if (flags) { GST_WRITE_UINT16_BE (data, value); - atom_moov_add_tag (moov, fourcc, flags, data, 2); + atom_udta_add_tag (udta, fourcc, flags, data, 2); } else { GST_WRITE_UINT32_BE (data + 2, value); - atom_moov_add_tag (moov, fourcc, flags, data, 8); + atom_udta_add_tag (udta, fourcc, flags, data, 8); } } -static GstBuffer * -_gst_buffer_new_wrapped (gpointer mem, gsize size, GFreeFunc free_func) -{ - GstBuffer *buf; - - buf = gst_buffer_new (); - gst_buffer_append_memory (buf, - gst_memory_new_wrapped (free_func ? 0 : GST_MEMORY_FLAG_READONLY, - mem, size, 0, size, mem, free_func)); - - return buf; -} +#define GST_BUFFER_NEW_READONLY(mem, size) \ + gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, mem, size, \ + 0, size, mem, NULL) void -atom_moov_add_blob_tag (AtomMOOV * moov, guint8 * data, guint size) +atom_udta_add_blob_tag (AtomUDTA * udta, guint8 * data, guint size) { AtomData *data_atom; - GstBuffer *buf; guint len; guint32 fourcc; @@ -3058,34 +3046,29 @@ if (len > size) return; - buf = _gst_buffer_new_wrapped (data + 8, len - 8, NULL); - data_atom = atom_data_new_from_gst_buffer (fourcc, buf); - gst_buffer_unref (buf); + data_atom = atom_data_new_from_data (fourcc, data + 8, len - 8); - atom_moov_append_tag (moov, + atom_udta_append_tag (udta, build_atom_info_wrapper ((Atom *) data_atom, atom_data_copy_data, atom_data_free)); } void -atom_moov_add_3gp_tag (AtomMOOV * moov, guint32 fourcc, guint8 * data, +atom_udta_add_3gp_tag (AtomUDTA * udta, guint32 fourcc, guint8 * data, guint size) { AtomData *data_atom; - GstBuffer *buf; - guint8 *bdata; + + data_atom = atom_data_new (fourcc); /* need full atom */ - bdata = g_malloc (size + 4); - /* full atom: version and flags */ - GST_WRITE_UINT32_BE (bdata, 0); - memcpy (bdata + 4, data, size); + atom_data_alloc_mem (data_atom, size + 4); - buf = _gst_buffer_new_wrapped (bdata, size + 4, g_free); - data_atom = atom_data_new_from_gst_buffer (fourcc, buf); - gst_buffer_unref (buf); + /* full atom: version and flags */ + GST_WRITE_UINT32_BE (data_atom->data, 0); + memcpy (data_atom->data + 4, data, size); - atom_moov_append_tag (moov, + atom_udta_append_tag (udta, build_atom_info_wrapper ((Atom *) data_atom, atom_data_copy_data, atom_data_free)); } @@ -3101,7 +3084,7 @@ } void -atom_moov_add_3gp_str_int_tag (AtomMOOV * moov, guint32 fourcc, +atom_udta_add_3gp_str_int_tag (AtomUDTA * udta, guint32 fourcc, const gchar * value, gint16 ivalue) { gint len = 0, size = 0; @@ -3132,39 +3115,37 @@ } } - atom_moov_add_3gp_tag (moov, fourcc, data, size); + atom_udta_add_3gp_tag (udta, fourcc, data, size); g_free (data); } void -atom_moov_add_3gp_str_tag (AtomMOOV * moov, guint32 fourcc, const gchar * value) +atom_udta_add_3gp_str_tag (AtomUDTA * udta, guint32 fourcc, const gchar * value) { - atom_moov_add_3gp_str_int_tag (moov, fourcc, value, -1); + atom_udta_add_3gp_str_int_tag (udta, fourcc, value, -1); } void -atom_moov_add_3gp_uint_tag (AtomMOOV * moov, guint32 fourcc, guint16 value) +atom_udta_add_3gp_uint_tag (AtomUDTA * udta, guint32 fourcc, guint16 value) { - atom_moov_add_3gp_str_int_tag (moov, fourcc, NULL, value); + atom_udta_add_3gp_str_int_tag (udta, fourcc, NULL, value); } void -atom_moov_add_xmp_tags (AtomMOOV * moov, GstBuffer * xmpbuffer) +atom_udta_add_xmp_tags (AtomUDTA * udta, GstBuffer * xmpbuffer) { AtomData *data_atom = NULL; - if (moov->context.flavor == ATOMS_TREE_FLAVOR_MOV) { + if (udta->context->flavor == ATOMS_TREE_FLAVOR_MOV) { if (xmpbuffer) { data_atom = atom_data_new_from_gst_buffer (FOURCC_XMP_, xmpbuffer); - atom_moov_init_metatags (moov, &moov->context); - moov->udta->entries = g_list_append (moov->udta->entries, + udta->entries = g_list_append (udta->entries, build_atom_info_wrapper ((Atom *) data_atom, atom_data_copy_data, atom_data_free)); } } else { GST_DEBUG ("Not adding xmp to moov atom, it is only used in 'mov' format"); } - } /* @@ -3288,31 +3269,41 @@ static void -atom_edts_add_entry (AtomEDTS * edts, EditListEntry * entry) +atom_edts_add_entry (AtomEDTS * edts, gint index, EditListEntry * entry) { - edts->elst.entries = g_slist_append (edts->elst.entries, entry); + EditListEntry *e = + (EditListEntry *) g_slist_nth_data (edts->elst.entries, index); + /* Create a new entry if missing (appends to the list if index is larger) */ + if (e == NULL) { + e = g_new (EditListEntry, 1); + edts->elst.entries = g_slist_insert (edts->elst.entries, e, index); + } + + /* Update the entry */ + *e = *entry; } -/* - * Adds a new entry to this trak edits list +/* + * Update an entry in this trak edits list, creating it if needed. + * index is the index of the entry to update, or create if it's past the end. * duration is in the moov's timescale * media_time is the offset in the media time to start from (media's timescale) * rate is a 32 bits fixed-point */ void -atom_trak_add_elst_entry (AtomTRAK * trak, guint32 duration, guint32 media_time, - guint32 rate) +atom_trak_set_elst_entry (AtomTRAK * trak, gint index, + guint32 duration, guint32 media_time, guint32 rate) { - EditListEntry *entry = g_new (EditListEntry, 1); + EditListEntry entry; - entry->duration = duration; - entry->media_time = media_time; - entry->media_rate = rate; + entry.duration = duration; + entry.media_time = media_time; + entry.media_rate = rate; - if (trak->edts == NULL) { + if (trak->edts == NULL) trak->edts = atom_edts_new (); - } - atom_edts_add_entry (trak->edts, entry); + + atom_edts_add_entry (trak->edts, index, &entry); } /* re-negotiation is prevented at top-level, so only 1 entry expected. @@ -3425,9 +3416,28 @@ { atom_trak_set_subtitle (trak, context); trak->mdia.mdhd.time_info.timescale = 1000; + + trak->tkhd.alternate_group = 2; /* same for all subtitles */ + trak->tkhd.layer = -1; /* above video (layer 0) */ } void +sample_table_entry_add_ext_atom (SampleTableEntry * ste, AtomInfo * ext) +{ + GList **list = NULL; + if (ste->kind == AUDIO) { + list = &(((SampleTableEntryMP4A *) ste)->extension_atoms); + } else if (ste->kind == VIDEO) { + list = &(((SampleTableEntryMP4V *) ste)->extension_atoms); + } else { + g_assert_not_reached (); + return; + } + + *list = g_list_prepend (*list, ext); +} + +SampleTableEntryMP4A * atom_trak_set_audio_type (AtomTRAK * trak, AtomsContext * context, AudioSampleEntry * entry, guint32 scale, AtomInfo * ext, gint sample_size) { @@ -3456,34 +3466,33 @@ /* 0 size means variable size */ atom_trak_set_constant_size_samples (trak, sample_size); + + return ste; } static AtomInfo * build_pasp_extension (AtomTRAK * trak, gint par_width, gint par_height) { - AtomData *atom_data; - GstBuffer *buf; + AtomData *atom_data = atom_data_new (FOURCC_pasp); guint8 *data; - data = g_malloc (8); + atom_data_alloc_mem (atom_data, 8); + data = atom_data->data; + /* ihdr = image header box */ GST_WRITE_UINT32_BE (data, par_width); GST_WRITE_UINT32_BE (data + 4, par_height); - buf = _gst_buffer_new_wrapped (data, 8, g_free); - atom_data = atom_data_new_from_gst_buffer (FOURCC_pasp, buf); - gst_buffer_unref (buf); - return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, atom_data_free); } -void +SampleTableEntryMP4V * atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context, VisualSampleEntry * entry, guint32 scale, GList * ext_atoms_list) { SampleTableEntryMP4V *ste; - gint dwidth, dheight; + guint dwidth, dheight; gint par_n = 0, par_d = 0; if ((entry->par_n != 1 || entry->par_d != 1) && @@ -3497,12 +3506,10 @@ /* ISO file spec says track header w/h indicates track's visual presentation * (so this together with pixels w/h implicitly defines PAR) */ if (par_n && (context->flavor != ATOMS_TREE_FLAVOR_MOV)) { - if (par_n > par_d) { - dwidth = entry->width * par_n / par_d; - dheight = entry->height; - } else { - dwidth = entry->width * par_n / par_d; - dheight = entry->height; + /* Assumes square pixels display */ + if (!gst_video_calculate_display_ratio (&dwidth, &dheight, entry->width, + entry->height, par_n, par_d, 1, 1)) { + GST_WARNING ("Could not calculate display ratio"); } } @@ -3529,6 +3536,8 @@ ste->extension_atoms = g_list_append (ste->extension_atoms, build_pasp_extension (trak, par_n, par_d)); } + + return ste; } void @@ -3539,7 +3548,7 @@ entry->foreground_color_rgba = 0xFFFFFFFF; /* all white, opaque */ } -void +SampleTableEntryTX3G * atom_trak_set_subtitle_type (AtomTRAK * trak, AtomsContext * context, SubtitleSampleEntry * entry) { @@ -3555,6 +3564,8 @@ trak->is_video = FALSE; trak->is_h264 = FALSE; + + return tx3g; } static void @@ -4262,19 +4273,16 @@ build_btrt_extension (guint32 buffer_size_db, guint32 avg_bitrate, guint32 max_bitrate) { - AtomData *atom_data; - GstBuffer *buf; + AtomData *atom_data = atom_data_new (FOURCC_btrt); guint8 *data; - data = g_malloc (12); + atom_data_alloc_mem (atom_data, 12); + data = atom_data->data; + GST_WRITE_UINT32_BE (data, buffer_size_db); GST_WRITE_UINT32_BE (data + 4, max_bitrate); GST_WRITE_UINT32_BE (data + 8, avg_bitrate); - buf = _gst_buffer_new_wrapped (data, 12, g_free); - atom_data = atom_data_new_from_gst_buffer (FOURCC_btrt, buf); - gst_buffer_unref (buf); - return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, atom_data_free); } @@ -4330,7 +4338,7 @@ /* Add MP4A atom to the WAVE: * not really in spec, but makes offset based players happy */ - buf = _gst_buffer_new_wrapped (&tmp, 4, NULL); + buf = GST_BUFFER_NEW_READONLY (&tmp, 4); mp4a = build_codec_data_extension (FOURCC_mp4a, buf); gst_buffer_unref (buf); @@ -4351,17 +4359,14 @@ build_fiel_extension (gint fields) { AtomData *atom_data; - GstBuffer *buf; guint8 f = fields; if (fields == 1) { return NULL; } - buf = _gst_buffer_new_wrapped (&f, 1, NULL); atom_data = - atom_data_new_from_gst_buffer (GST_MAKE_FOURCC ('f', 'i', 'e', 'l'), buf); - gst_buffer_unref (buf); + atom_data_new_from_data (GST_MAKE_FOURCC ('f', 'i', 'e', 'l'), &f, 1); return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, atom_data_free); @@ -4558,7 +4563,7 @@ /* frames per sample */ GST_WRITE_UINT8 (ext + 8, 1); - buf = _gst_buffer_new_wrapped (ext, sizeof (ext), NULL); + buf = GST_BUFFER_NEW_READONLY (ext, sizeof (ext)); res = build_codec_data_extension (GST_MAKE_FOURCC ('d', 'a', 'm', 'r'), buf); gst_buffer_unref (buf); return res; @@ -4580,7 +4585,7 @@ GST_WRITE_UINT8 (ext + 5, 10); GST_WRITE_UINT8 (ext + 6, 0); - buf = _gst_buffer_new_wrapped (ext, sizeof (ext), NULL); + buf = GST_BUFFER_NEW_READONLY (ext, sizeof (ext)); res = build_codec_data_extension (GST_MAKE_FOURCC ('d', '2', '6', '3'), buf); gst_buffer_unref (buf); return res; @@ -4597,7 +4602,7 @@ gamma_fp = (guint32) 65536 *gamma; gamma_fp = GUINT32_TO_BE (gamma_fp); - buf = _gst_buffer_new_wrapped (&gamma_fp, 4, NULL); + buf = GST_BUFFER_NEW_READONLY (&gamma_fp, 4); res = build_codec_data_extension (FOURCC_gama, buf); gst_buffer_unref (buf); return res; @@ -4618,7 +4623,7 @@ GST_WRITE_UINT32_LE (data, FOURCC_SEQH); GST_WRITE_UINT32_BE (data + 4, size + 8); gst_buffer_extract ((GstBuffer *) seqh, 0, data + 8, size); - buf = _gst_buffer_new_wrapped (data, size + 8, g_free); + buf = gst_buffer_new_wrapped (data, size + 8); res = build_codec_data_extension (FOURCC_SMI_, buf); gst_buffer_unref (buf); return res; @@ -4627,10 +4632,9 @@ static AtomInfo * build_ima_adpcm_atom (gint channels, gint rate, gint blocksize) { +#define IMA_ADPCM_ATOM_SIZE 20 AtomData *atom_data; - GstBuffer *buf; guint8 *data; - const gint ima_adpcm_atom_size = 20; guint32 fourcc; gint samplesperblock; gint bytespersec; @@ -4640,7 +4644,9 @@ within the WAVE header (below), it's little endian. */ fourcc = MS_WAVE_FOURCC (0x11); - data = g_malloc (ima_adpcm_atom_size); + atom_data = atom_data_new (fourcc); + atom_data_alloc_mem (atom_data, IMA_ADPCM_ATOM_SIZE); + data = atom_data->data; /* This atom's content is a WAVE header, including 2 bytes of extra data. Note that all of this is little-endian, unlike most stuff in qt. */ @@ -4657,10 +4663,6 @@ GST_WRITE_UINT16_LE (data + 16, 2); /* Two extra bytes */ GST_WRITE_UINT16_LE (data + 18, samplesperblock); - buf = _gst_buffer_new_wrapped (data, ima_adpcm_atom_size, g_free); - atom_data = atom_data_new_from_gst_buffer (fourcc, buf); - gst_buffer_unref (buf); - return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, atom_data_free); } @@ -4698,11 +4700,42 @@ } AtomInfo * +build_ac3_extension (guint8 fscod, guint8 bsid, guint8 bsmod, guint8 acmod, + guint8 lfe_on, guint8 bitrate_code) +{ + AtomData *atom_data = atom_data_new (FOURCC_dac3); + guint8 *data; + + atom_data_alloc_mem (atom_data, 3); + data = atom_data->data; + + /* Bits from the spec + * fscod 2 + * bsid 5 + * bsmod 3 + * acmod 3 + * lfeon 1 + * bit_rate_code 5 + * reserved 5 + */ + + /* Some bit manipulation magic. Need bitwriter */ + data[0] = (fscod << 6) | (bsid << 1) | ((bsmod >> 2) & 1); + data[1] = + ((bsmod & 0x3) << 6) | (acmod << 3) | ((lfe_on & 1) << 2) | ((bitrate_code + >> 3) & 0x3); + data[2] = ((bitrate_code & 0x7) << 5); + + return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, + atom_data_free); +} + +AtomInfo * build_uuid_xmp_atom (GstBuffer * xmp_data) { AtomUUID *uuid; gsize size; - static guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB, + static const guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB, 0x97, 0xA9, 0x42, 0xE8, 0x9C, 0x71, 0x99, 0x94, 0x91, 0xE3, 0xAF, 0xAC diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/atoms.h gst-plugins-good1.0-1.6.1/gst/isomp4/atoms.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/atoms.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/atoms.h 2015-10-22 08:02:54.000000000 +0000 @@ -112,7 +112,7 @@ /* atom defs and functions */ -/** +/* * Used for storing time related values for some atoms. */ typedef struct _TimeInfo @@ -415,13 +415,6 @@ GList *extension_atoms; } SampleTableEntryMP4A; -typedef struct _SampleTableEntryMP4S -{ - SampleTableEntry se; - - AtomESDS es; -} SampleTableEntryMP4S; - typedef struct _SampleTableEntryTX3G { SampleTableEntry se; @@ -478,7 +471,8 @@ typedef struct _AtomSTCO64 { AtomFull header; - + /* Global offset to add to entries when serialising */ + guint32 chunk_offset; ATOM_ARRAY (guint64) entries; } AtomSTCO64; @@ -597,6 +591,8 @@ GList* entries; /* or list is further down */ AtomMETA *meta; + + AtomsContext *context; } AtomUDTA; enum TrFlags @@ -616,7 +612,8 @@ TF_DEFAULT_SAMPLE_DURATION = 0x08, /* default-sample-duration-present */ TF_DEFAULT_SAMPLE_SIZE = 0x010, /* default-sample-size-present */ TF_DEFAULT_SAMPLE_FLAGS = 0x020, /* default-sample-flags-present */ - TF_DURATION_IS_EMPTY = 0x010000 /* sample-composition-time-offsets-presents */ + TF_DURATION_IS_EMPTY = 0x010000, /* sample-composition-time-offsets-presents */ + TF_DEFAULT_BASE_IS_MOOF = 0x020000 /* default-base-is-moof */ }; typedef struct _AtomTRAK @@ -626,10 +623,13 @@ AtomTKHD tkhd; AtomEDTS *edts; AtomMDIA mdia; + AtomUDTA udta; /* some helper info for structural conformity checks */ gboolean is_video; gboolean is_h264; + + AtomsContext *context; } AtomTRAK; typedef struct _AtomTREX @@ -746,9 +746,10 @@ /* list of AtomTRAK */ GList *traks; - AtomUDTA *udta; + AtomUDTA udta; gboolean fragmented; + guint32 chunks_offset; } AtomMOOV; typedef struct _AtomWAVE @@ -823,7 +824,7 @@ void atom_trak_add_samples (AtomTRAK * trak, guint32 nsamples, guint32 delta, guint32 size, guint64 chunk_offset, gboolean sync, gint64 pts_offset); -void atom_trak_add_elst_entry (AtomTRAK * trak, guint32 duration, +void atom_trak_set_elst_entry (AtomTRAK * trak, gint index, guint32 duration, guint32 media_time, guint32 rate); guint32 atom_trak_get_timescale (AtomTRAK *trak); guint32 atom_trak_get_id (AtomTRAK * trak); @@ -838,12 +839,13 @@ void atom_moov_update_timescale (AtomMOOV *moov, guint32 timescale); void atom_moov_update_duration (AtomMOOV *moov); void atom_moov_set_fragmented (AtomMOOV *moov, gboolean fragmented); -void atom_moov_chunks_add_offset (AtomMOOV *moov, guint32 offset); +void atom_moov_chunks_set_offset (AtomMOOV *moov, guint32 offset); void atom_moov_add_trak (AtomMOOV *moov, AtomTRAK *trak); +guint atom_moov_get_trak_count (AtomMOOV *moov); guint64 atom_mvhd_copy_data (AtomMVHD * atom, guint8 ** buffer, guint64 * size, guint64 * offset); -void atom_stco64_chunks_add_offset (AtomSTCO64 * stco64, guint32 offset); +void atom_stco64_chunks_set_offset (AtomSTCO64 * stco64, guint32 offset); guint64 atom_trak_copy_data (AtomTRAK * atom, guint8 ** buffer, guint64 * size, guint64 * offset); void atom_stbl_clear (AtomSTBL * stbl); @@ -924,15 +926,15 @@ void subtitle_sample_entry_init (SubtitleSampleEntry * entry); -void atom_trak_set_audio_type (AtomTRAK * trak, AtomsContext * context, +SampleTableEntryMP4A * atom_trak_set_audio_type (AtomTRAK * trak, AtomsContext * context, AudioSampleEntry * entry, guint32 scale, AtomInfo * ext, gint sample_size); -void atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context, +SampleTableEntryMP4V * atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context, VisualSampleEntry * entry, guint32 rate, GList * ext_atoms_list); -void atom_trak_set_subtitle_type (AtomTRAK * trak, AtomsContext * context, +SampleTableEntryTX3G * atom_trak_set_subtitle_type (AtomTRAK * trak, AtomsContext * context, SubtitleSampleEntry * entry); void atom_trak_update_bitrates (AtomTRAK * trak, guint32 avg_bitrate, @@ -941,6 +943,8 @@ void atom_trak_tx3g_update_dimension (AtomTRAK * trak, guint32 width, guint32 height); +void sample_table_entry_add_ext_atom (SampleTableEntry * ste, AtomInfo * ext); + AtomInfo * build_codec_data_extension (guint32 fourcc, const GstBuffer * codec_data); AtomInfo * build_mov_aac_extension (AtomTRAK * trak, const GstBuffer * codec_data, guint32 avg_bitrate, guint32 max_bitrate); @@ -957,6 +961,9 @@ AtomInfo * build_jp2x_extension (const GstBuffer * prefix); AtomInfo * build_fiel_extension (gint fields); +AtomInfo * build_ac3_extension (guint8 fscod, guint8 bsid, + guint8 bsmod, guint8 acmod, + guint8 lfe_on, guint8 bitrate_code); AtomInfo * build_amr_extension (void); AtomInfo * build_h263_extension (void); AtomInfo * build_gama_atom (gdouble gamma); @@ -969,21 +976,22 @@ /* * Meta tags functions */ -void atom_moov_add_str_tag (AtomMOOV *moov, guint32 fourcc, const gchar *value); -void atom_moov_add_uint_tag (AtomMOOV *moov, guint32 fourcc, guint32 flags, +void atom_udta_clear_tags (AtomUDTA *udta); +void atom_udta_add_str_tag (AtomUDTA *udta, guint32 fourcc, const gchar *value); +void atom_udta_add_uint_tag (AtomUDTA *udta, guint32 fourcc, guint32 flags, guint32 value); -void atom_moov_add_tag (AtomMOOV *moov, guint32 fourcc, guint32 flags, +void atom_udta_add_tag (AtomUDTA *udta, guint32 fourcc, guint32 flags, const guint8 * data, guint size); -void atom_moov_add_blob_tag (AtomMOOV *moov, guint8 *data, guint size); +void atom_udta_add_blob_tag (AtomUDTA *udta, guint8 *data, guint size); -void atom_moov_add_3gp_str_tag (AtomMOOV * moov, guint32 fourcc, const gchar * value); -void atom_moov_add_3gp_uint_tag (AtomMOOV * moov, guint32 fourcc, guint16 value); -void atom_moov_add_3gp_str_int_tag (AtomMOOV * moov, guint32 fourcc, const gchar * value, +void atom_udta_add_3gp_str_tag (AtomUDTA *udta, guint32 fourcc, const gchar * value); +void atom_udta_add_3gp_uint_tag (AtomUDTA *udta, guint32 fourcc, guint16 value); +void atom_udta_add_3gp_str_int_tag (AtomUDTA *udta, guint32 fourcc, const gchar * value, gint16 ivalue); -void atom_moov_add_3gp_tag (AtomMOOV * moov, guint32 fourcc, guint8 * data, +void atom_udta_add_3gp_tag (AtomUDTA *udta, guint32 fourcc, guint8 * data, guint size); -void atom_moov_add_xmp_tags (AtomMOOV * moov, GstBuffer * xmp); +void atom_udta_add_xmp_tags (AtomUDTA *udta, GstBuffer * xmp); #define GST_QT_MUX_DEFAULT_TAG_LANGUAGE "und" /* undefined/unknown */ guint16 language_code (const char * lang); diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/atomsrecovery.c gst-plugins-good1.0-1.6.1/gst/isomp4/atomsrecovery.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/atomsrecovery.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/atomsrecovery.c 2015-10-22 08:02:54.000000000 +0000 @@ -40,7 +40,7 @@ * SOFTWARE. */ -/** +/* * This module contains functions for serializing partial information from * a mux in progress (by qtmux elements). This enables reconstruction of the * moov box if a crash happens and thus recovering the movie file. @@ -128,7 +128,7 @@ return TRUE; } -/** +/* * Writes important info on the 'moov' atom (non-trak related) * to be able to recover the moov structure after a crash. * @@ -153,7 +153,7 @@ return atom_size > 0 && writen == atom_size; } -/** +/* * Writes the number of traks to the file. * This simply writes a guint32 in BE. */ @@ -165,7 +165,7 @@ return fwrite (data, 4, 1, f) == 1; } -/** +/* * Writes the moov's timescale to the file * This simply writes a guint32 in BE. */ @@ -177,7 +177,7 @@ return fwrite (data, 4, 1, f) == 1; } -/** +/* * Writes the trak atom to the file. */ gboolean @@ -778,7 +778,7 @@ b->chunk_offset, b->sync, b->pts_offset); } -/** +/* * Parses the buffer entries in the MoovRecovFile and matches the inputs * with the data in the MdatRecovFile. Whenever a buffer entry of that * represents 'x' bytes of data, the same amount of data is 'validated' in @@ -972,7 +972,7 @@ TrakRecovData *trak = &(moovrf->traks_rd[i]); /* 16 for the mdat header */ gint64 offset = moov_size + ftell (outf) + 16; - atom_stco64_chunks_add_offset (&trak->stbl.stco64, offset); + atom_stco64_chunks_set_offset (&trak->stbl.stco64, offset); } /* write the moov */ diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/fourcc.h gst-plugins-good1.0-1.6.1/gst/isomp4/fourcc.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/fourcc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/fourcc.h 2015-10-22 08:02:54.000000000 +0000 @@ -83,6 +83,7 @@ #define FOURCC__too GST_MAKE_FOURCC(0xa9,'t','o','o') #define FOURCC__wrt GST_MAKE_FOURCC(0xa9,'w','r','t') #define FOURCC_aART GST_MAKE_FOURCC('a','A','R','T') +#define FOURCC_ac_3 GST_MAKE_FOURCC('a','c','-','3') #define FOURCC_agsm GST_MAKE_FOURCC('a','g','s','m') #define FOURCC_alac GST_MAKE_FOURCC('a','l','a','c') #define FOURCC_alaw GST_MAKE_FOURCC('a','l','a','w') @@ -101,6 +102,8 @@ #define FOURCC_crgn GST_MAKE_FOURCC('c','r','g','n') #define FOURCC_ctab GST_MAKE_FOURCC('c','t','a','b') #define FOURCC_ctts GST_MAKE_FOURCC('c','t','t','s') +#define FOURCC_cslg GST_MAKE_FOURCC('c','s','l','g') +#define FOURCC_dac3 GST_MAKE_FOURCC('d','a','c','3') #define FOURCC_data GST_MAKE_FOURCC('d','a','t','a') #define FOURCC_dcom GST_MAKE_FOURCC('d','c','o','m') #define FOURCC_desc GST_MAKE_FOURCC('d','e','s','c') @@ -180,6 +183,7 @@ #define FOURCC_sawb GST_MAKE_FOURCC('s','a','w','b') #define FOURCC_sbtl GST_MAKE_FOURCC('s','b','t','l') #define FOURCC_sdp_ GST_MAKE_FOURCC('s','d','p',' ') +#define FOURCC_sidx GST_MAKE_FOURCC('s','i','d','x') #define FOURCC_smhd GST_MAKE_FOURCC('s','m','h','d') #define FOURCC_soaa GST_MAKE_FOURCC('s','o','a','a') #define FOURCC_soal GST_MAKE_FOURCC('s','o','a','l') @@ -200,6 +204,7 @@ #define FOURCC_stsz GST_MAKE_FOURCC('s','t','s','z') #define FOURCC_stts GST_MAKE_FOURCC('s','t','t','s') #define FOURCC_subp GST_MAKE_FOURCC('s','u','b','p') +#define FOURCC_subt GST_MAKE_FOURCC('s','u','b','t') #define FOURCC_text GST_MAKE_FOURCC('t','e','x','t') #define FOURCC_tkhd GST_MAKE_FOURCC('t','k','h','d') #define FOURCC_tmpo GST_MAKE_FOURCC('t','m','p','o') @@ -216,6 +221,7 @@ #define FOURCC_ulaw GST_MAKE_FOURCC('u','l','a','w') #define FOURCC_url_ GST_MAKE_FOURCC('u','r','l',' ') #define FOURCC_uuid GST_MAKE_FOURCC('u','u','i','d') +#define FOURCC_v210 GST_MAKE_FOURCC('v','2','1','0') #define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e') #define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d') #define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e') @@ -229,6 +235,8 @@ #define FOURCC_apcs GST_MAKE_FOURCC('a','p','c','s') #define FOURCC_m1v GST_MAKE_FOURCC('m','1','v',' ') #define FOURCC_vivo GST_MAKE_FOURCC('v','i','v','o') +#define FOURCC_saiz GST_MAKE_FOURCC('s','a','i','z') +#define FOURCC_saio GST_MAKE_FOURCC('s','a','i','o') #define FOURCC_3gg6 GST_MAKE_FOURCC('3','g','g','6') #define FOURCC_3gg7 GST_MAKE_FOURCC('3','g','g','7') @@ -317,6 +325,27 @@ #define MS_WAVE_FOURCC(codecid) GST_MAKE_FOURCC( \ 'm', 's', ((codecid)>>8)&0xff, ((codecid)&0xff)) +/* MPEG Application Format , Stereo Video */ +#define FOURCC_ss01 GST_MAKE_FOURCC('s','s','0','1') +#define FOURCC_ss02 GST_MAKE_FOURCC('s','s','0','2') +#define FOURCC_svmi GST_MAKE_FOURCC('s','v','m','i') +#define FOURCC_scdi GST_MAKE_FOURCC('s','c','d','i') + +/* Protected streams */ +#define FOURCC_encv GST_MAKE_FOURCC('e','n','c','v') +#define FOURCC_enca GST_MAKE_FOURCC('e','n','c','a') +#define FOURCC_enct GST_MAKE_FOURCC('e','n','c','t') +#define FOURCC_encs GST_MAKE_FOURCC('e','n','c','s') +#define FOURCC_sinf GST_MAKE_FOURCC('s','i','n','f') +#define FOURCC_frma GST_MAKE_FOURCC('f','r','m','a') +#define FOURCC_schm GST_MAKE_FOURCC('s','c','h','m') +#define FOURCC_schi GST_MAKE_FOURCC('s','c','h','i') + +/* Common Encryption */ +#define FOURCC_pssh GST_MAKE_FOURCC('p','s','s','h') +#define FOURCC_tenc GST_MAKE_FOURCC('t','e','n','c') +#define FOURCC_cenc GST_MAKE_FOURCC('c','e','n','c') + G_END_DECLS #endif /* __FOURCC_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/gstisoff.c gst-plugins-good1.0-1.6.1/gst/isomp4/gstisoff.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/gstisoff.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/gstisoff.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,200 @@ +/* + * ISO File Format parsing library + * + * gstisoff.h + * + * Copyright (C) 2015 Samsung Electronics. All rights reserved. + * Author: 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.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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library (COPYING); if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gstisoff.h" +#include + +void +gst_isoff_qt_sidx_parser_init (GstSidxParser * parser) +{ + parser->status = GST_ISOFF_QT_SIDX_PARSER_INIT; + parser->cumulative_entry_size = 0; + parser->sidx.entries = NULL; + parser->sidx.entries_count = 0; +} + +void +gst_isoff_qt_sidx_parser_clear (GstSidxParser * parser) +{ + g_free (parser->sidx.entries); + parser->sidx.entries = NULL; +} + +static void +gst_isoff_qt_parse_sidx_entry (GstSidxBoxEntry * entry, GstByteReader * reader) +{ + guint32 aux; + + aux = gst_byte_reader_get_uint32_be_unchecked (reader); + entry->ref_type = aux >> 31; + entry->size = aux & 0x7FFFFFFF; + entry->duration = gst_byte_reader_get_uint32_be_unchecked (reader); + aux = gst_byte_reader_get_uint32_be_unchecked (reader); + entry->starts_with_sap = aux >> 31; + entry->sap_type = ((aux >> 28) & 0x7); + entry->sap_delta_time = aux & 0xFFFFFFF; +} + +GstIsoffParserResult +gst_isoff_qt_sidx_parser_add_data (GstSidxParser * parser, + const guint8 * buffer, gint length, guint * consumed) +{ + GstIsoffParserResult res = GST_ISOFF_QT_PARSER_OK; + GstByteReader reader; + gsize remaining; + guint32 fourcc; + + gst_byte_reader_init (&reader, buffer, length); + + switch (parser->status) { + case GST_ISOFF_QT_SIDX_PARSER_INIT: + if (gst_byte_reader_get_remaining (&reader) < GST_ISOFF_QT_FULL_BOX_SIZE) { + break; + } + + parser->size = gst_byte_reader_get_uint32_be_unchecked (&reader); + fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader); + if (fourcc != GST_ISOFF_QT_FOURCC_SIDX) { + res = GST_ISOFF_QT_PARSER_UNEXPECTED; + gst_byte_reader_set_pos (&reader, 0); + break; + } + if (parser->size == 1) { + if (gst_byte_reader_get_remaining (&reader) < 12) { + gst_byte_reader_set_pos (&reader, 0); + break; + } + + parser->size = gst_byte_reader_get_uint64_be_unchecked (&reader); + } + if (parser->size == 0) { + res = GST_ISOFF_QT_PARSER_ERROR; + gst_byte_reader_set_pos (&reader, 0); + break; + } + parser->sidx.version = gst_byte_reader_get_uint8_unchecked (&reader); + parser->sidx.flags = gst_byte_reader_get_uint24_le_unchecked (&reader); + + parser->status = GST_ISOFF_QT_SIDX_PARSER_HEADER; + + case GST_ISOFF_QT_SIDX_PARSER_HEADER: + remaining = gst_byte_reader_get_remaining (&reader); + if (remaining < 12 + (parser->sidx.version == 0 ? 8 : 16)) { + break; + } + + parser->sidx.ref_id = gst_byte_reader_get_uint32_be_unchecked (&reader); + parser->sidx.timescale = + gst_byte_reader_get_uint32_be_unchecked (&reader); + if (parser->sidx.version == 0) { + parser->sidx.earliest_pts = + gst_byte_reader_get_uint32_be_unchecked (&reader); + parser->sidx.first_offset = parser->sidx.earliest_pts = + gst_byte_reader_get_uint32_be_unchecked (&reader); + } else { + parser->sidx.earliest_pts = + gst_byte_reader_get_uint64_be_unchecked (&reader); + parser->sidx.first_offset = + gst_byte_reader_get_uint64_be_unchecked (&reader); + } + /* skip 2 reserved bytes */ + gst_byte_reader_skip_unchecked (&reader, 2); + parser->sidx.entries_count = + gst_byte_reader_get_uint16_be_unchecked (&reader); + + GST_LOG ("Timescale: %" G_GUINT32_FORMAT, parser->sidx.timescale); + GST_LOG ("Earliest pts: %" G_GUINT64_FORMAT, parser->sidx.earliest_pts); + GST_LOG ("First offset: %" G_GUINT64_FORMAT, parser->sidx.first_offset); + + parser->cumulative_pts = + gst_util_uint64_scale_int_round (parser->sidx.earliest_pts, + GST_SECOND, parser->sidx.timescale); + + if (parser->sidx.entries_count) { + parser->sidx.entries = + g_malloc (sizeof (GstSidxBoxEntry) * parser->sidx.entries_count); + } + parser->sidx.entry_index = 0; + + parser->status = GST_ISOFF_QT_SIDX_PARSER_DATA; + + case GST_ISOFF_QT_SIDX_PARSER_DATA: + while (parser->sidx.entry_index < parser->sidx.entries_count) { + GstSidxBoxEntry *entry = + &parser->sidx.entries[parser->sidx.entry_index]; + + remaining = gst_byte_reader_get_remaining (&reader); + if (remaining < 12) + break; + + entry->offset = parser->cumulative_entry_size; + entry->pts = parser->cumulative_pts; + gst_isoff_qt_parse_sidx_entry (entry, &reader); + entry->duration = gst_util_uint64_scale_int_round (entry->duration, + GST_SECOND, parser->sidx.timescale); + parser->cumulative_entry_size += entry->size; + parser->cumulative_pts += entry->duration; + + GST_LOG ("Sidx entry %d) offset: %" G_GUINT64_FORMAT ", pts: %" + GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT " - size %" + G_GUINT32_FORMAT, parser->sidx.entry_index, entry->offset, + GST_TIME_ARGS (entry->pts), GST_TIME_ARGS (entry->duration), + entry->size); + + parser->sidx.entry_index++; + } + + if (parser->sidx.entry_index == parser->sidx.entries_count) + parser->status = GST_ISOFF_QT_SIDX_PARSER_FINISHED; + else + break; + case GST_ISOFF_QT_SIDX_PARSER_FINISHED: + parser->sidx.entry_index = 0; + res = GST_ISOFF_QT_PARSER_DONE; + break; + } + + *consumed = gst_byte_reader_get_pos (&reader); + return res; +} + +GstIsoffParserResult +gst_isoff_qt_sidx_parser_add_buffer (GstSidxParser * parser, GstBuffer * buffer, + guint * consumed) +{ + GstIsoffParserResult res = GST_ISOFF_QT_PARSER_OK; + GstMapInfo info; + + if (!gst_buffer_map (buffer, &info, GST_MAP_READ)) { + *consumed = 0; + return GST_ISOFF_QT_PARSER_ERROR; + } + + res = + gst_isoff_qt_sidx_parser_add_data (parser, info.data, info.size, + consumed); + + gst_buffer_unmap (buffer, &info); + return res; +} diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/gstisoff.h gst-plugins-good1.0-1.6.1/gst/isomp4/gstisoff.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/gstisoff.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/gstisoff.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,100 @@ +/* + * ISO File Format parsing library + * + * gstisoff.h + * + * Copyright (C) 2015 Samsung Electronics. All rights reserved. + * Author: 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.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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library (COPYING); if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_ISOFF_QT_H__ +#define __GST_ISOFF_QT_H__ + +#include + +G_BEGIN_DECLS + +typedef enum { + GST_ISOFF_QT_PARSER_OK, + GST_ISOFF_QT_PARSER_DONE, + GST_ISOFF_QT_PARSER_UNEXPECTED, + GST_ISOFF_QT_PARSER_ERROR +} GstIsoffParserResult; + +/* this is the minimum size, it can be larger if it + * uses extended size or type */ +#define GST_ISOFF_QT_FULL_BOX_SIZE 12 + +#define GST_ISOFF_QT_FOURCC_SIDX GST_MAKE_FOURCC('s','i','d','x') +typedef struct _GstSidxBoxEntry +{ + gboolean ref_type; + guint32 size; + GstClockTime duration; + gboolean starts_with_sap; + guint8 sap_type; + guint32 sap_delta_time; + + guint64 offset; + GstClockTime pts; +} GstSidxBoxEntry; + +typedef struct _GstSidxBox +{ + guint8 version; + guint32 flags; + + guint32 ref_id; + guint32 timescale; + guint64 earliest_pts; + guint64 first_offset; + + gint entry_index; + gint entries_count; + + GstSidxBoxEntry *entries; +} GstSidxBox; + +typedef enum _GstSidxParserStatus +{ + GST_ISOFF_QT_SIDX_PARSER_INIT, + GST_ISOFF_QT_SIDX_PARSER_HEADER, + GST_ISOFF_QT_SIDX_PARSER_DATA, + GST_ISOFF_QT_SIDX_PARSER_FINISHED +} GstSidxParserStatus; + +typedef struct _GstSidxParser +{ + GstSidxParserStatus status; + + guint64 size; + guint64 cumulative_entry_size; + guint64 cumulative_pts; + + GstSidxBox sidx; +} GstSidxParser; + +void gst_isoff_qt_sidx_parser_init (GstSidxParser * parser); +void gst_isoff_qt_sidx_parser_clear (GstSidxParser * parser); +GstIsoffParserResult gst_isoff_qt_sidx_parser_add_data (GstSidxParser * parser, const guint8 * buffer, gint length, guint * consumed); +GstIsoffParserResult gst_isoff_qt_sidx_parser_add_buffer (GstSidxParser * parser, GstBuffer * buf, guint * consumed); + +G_END_DECLS + +#endif /* __GST_ISOFF_QT_H__ */ + diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/gstqtmux.c gst-plugins-good1.0-1.6.1/gst/isomp4/gstqtmux.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/gstqtmux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/gstqtmux.c 2015-10-30 12:10:05.000000000 +0000 @@ -2,6 +2,7 @@ * Copyright (C) 2008-2010 Thiago Santos * Copyright (C) 2008 Mark Nauwelaerts * Copyright (C) 2010 Nokia Corporation. All rights reserved. + * Copyright (C) 2014 Jan Schmidt * Contact: Stefan Kost * This library is free software; you can redistribute it and/or @@ -80,6 +81,21 @@ * #GstQTMux:streamable allows foregoing to add index metadata (at the end of * file). * + * When the maximum duration to be recorded can be known in advance, #GstQTMux + * also supports a 'Robust Muxing' mode. In robust muxing mode, space for the + * headers are reserved at the start of muxing, and rewritten at a configurable + * interval, so that the output file is always playable, even if the recording + * is interrupted uncleanly by a crash. Robust muxing mode requires a seekable + * output, such as filesink, because it needs to rewrite the start of the file. + * + * To enable robust muxing mode, set the #GstQTMux::reserved-moov-update-period + * and #GstQTMux::reserved-max-duration property. Also present is the + * #GstQTMux::reserved-bytes-per-sec property, which can be increased if + * for some reason the default is not large enough and the initial reserved + * space for headers is too small. Applications can monitor the + * #GstQTMux::reserved-duration-remaining property to see how close to full + * the reserved space is becoming. + * * * Example pipelines * |[ @@ -101,6 +117,8 @@ #include #include +#include +#include #include #include #include @@ -127,6 +145,71 @@ GST_DEBUG_CATEGORY_STATIC (gst_qt_mux_debug); #define GST_CAT_DEFAULT gst_qt_mux_debug +/* Hacker notes. + * + * The basic building blocks of MP4 files are: + * - an 'ftyp' box at the very start + * - an 'mdat' box which contains the raw audio/video/subtitle data; + * this is just a bunch of bytes, completely unframed and possibly + * unordered with no additional meta-information + * - a 'moov' box that contains information about the different streams + * and what they contain, as well as sample tables for each stream + * that tell the demuxer where in the mdat box each buffer/sample is + * and what its duration/timestamp etc. is, and whether it's a + * keyframe etc. + * Additionally, fragmented MP4 works by writing chunks of data in + * pairs of 'moof' and 'mdat' boxes: + * - 'moof' boxes, header preceding each mdat fragment describing the + * contents, like a moov but only for that fragment. + * - a 'mfra' box for Fragmented MP4, which is written at the end and + * contains a summary of all fragments and seek tables. + * + * Currently mp4mux can work in 4 different modes / generate 4 types + * of output files/streams: + * + * - Normal mp4: mp4mux will write a little ftyp identifier at the + * beginning, then start an mdat box into which it will write all the + * sample data. At EOS it will then write the moov header with track + * headers and sample tables at the end of the file, and rewrite the + * start of the file to fix up the mdat box size at the beginning. + * It has to wait for EOS to write the moov (which includes the + * sample tables) because it doesn't know how much space those + * tables will be. The output downstream must be seekable to rewrite + * the mdat box at EOS. + * + * - Fragmented mp4: moov header with track headers at start + * but no sample table, followed by N fragments, each containing + * track headers with sample tables followed by some data. Downstream + * does not need to be seekable if the 'streamable' flag is TRUE, + * as the final mfra and total duration will be omitted. + * + * - Fast-start mp4: the goal here is to create a file where the moov + * headers are at the beginning; what mp4mux will do is write all + * sample data into a temp file and build moov header plus sample + * tables in memory and then when EOS comes, it will push out the + * moov header plus sample tables at the beginning, followed by the + * mdat sample data at the end which is read in from the temp file + * Files created in this mode are better for streaming over the + * network, since the client doesn't have to seek to the end of the + * file to get the headers, but it requires copying all sample data + * out of the temp file at EOS, which can be expensive. Downstream does + * not need to be seekable, because of the use of the temp file. + * + * - Robust Muxing mode: In this mode, qtmux uses the reserved-max-duration + * and reserved-moov-update-period properties to reserve free space + * at the start of the file and periodically write the MOOV atom out + * to it. That means that killing the muxing at any point still + * results in a playable file, at the cost of wasting some amount of + * free space at the start of file. The approximate recording duration + * has to be known in advance to estimate how much free space to reserve + * for the moov, and the downstream must be seekable. + * If the moov header grows larger than the reserved space, an error + * is generated - so it's better to over-estimate the amount of space + * to reserve. To ensure the file is playable at any point, the moov + * is updated using a 'ping-pong' strategy, so the output is never in + * an invalid state. + */ + #ifndef GST_REMOVE_DEPRECATED enum { @@ -176,6 +259,10 @@ PROP_MOOV_RECOV_FILE, PROP_FRAGMENT_DURATION, PROP_STREAMABLE, + PROP_RESERVED_MAX_DURATION, + PROP_RESERVED_DURATION_REMAINING, + PROP_RESERVED_MOOV_UPDATE_PERIOD, + PROP_RESERVED_BYTES_PER_SEC, #ifndef GST_REMOVE_DEPRECATED PROP_DTS_METHOD, #endif @@ -185,7 +272,7 @@ /* some spare for header size as well */ #define MDAT_LARGE_FILE_LIMIT ((guint64) 1024 * 1024 * 1024 * 2) -#define DEFAULT_MOVIE_TIMESCALE 1000 +#define DEFAULT_MOVIE_TIMESCALE 1800 #define DEFAULT_TRAK_TIMESCALE 0 #define DEFAULT_DO_CTTS TRUE #define DEFAULT_FAST_START FALSE @@ -196,7 +283,9 @@ #ifndef GST_REMOVE_DEPRECATED #define DEFAULT_DTS_METHOD DTS_METHOD_REORDER #endif - +#define DEFAULT_RESERVED_MAX_DURATION GST_CLOCK_TIME_NONE +#define DEFAULT_RESERVED_MOOV_UPDATE_PERIOD GST_CLOCK_TIME_NONE +#define DEFAULT_RESERVED_BYTES_PER_SEC_PER_TRAK 550 static void gst_qt_mux_finalize (GObject * object); @@ -223,6 +312,9 @@ static GstFlowReturn gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf); +static GstFlowReturn +gst_qt_mux_robust_recording_rewrite_moov (GstQTMux * qtmux); + static GstElementClass *parent_class = NULL; static void @@ -281,6 +373,7 @@ { GObjectClass *gobject_class; GstElementClass *gstelement_class; + GParamFlags streamable_flags; const gchar *streamable_desc; gboolean streamable; #define STREAMABLE_DESC "If set to true, the output should be as if it is to "\ @@ -295,12 +388,14 @@ gobject_class->get_property = gst_qt_mux_get_property; gobject_class->set_property = gst_qt_mux_set_property; + streamable_flags = G_PARAM_READWRITE | G_PARAM_CONSTRUCT; if (klass->format == GST_QT_MUX_FORMAT_ISML) { streamable_desc = STREAMABLE_DESC; streamable = DEFAULT_STREAMABLE; } else { streamable_desc = STREAMABLE_DESC " (DEPRECATED, only valid for fragmented MP4)"; + streamable_flags |= G_PARAM_DEPRECATED; streamable = FALSE; } @@ -323,7 +418,7 @@ #ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_DTS_METHOD, g_param_spec_enum ("dts-method", "dts-method", - "(DEPRECATED) Method to determine DTS time", + "Method to determine DTS time (DEPRECATED)", GST_TYPE_QT_MUX_DTS_METHOD, DEFAULT_DTS_METHOD, G_PARAM_DEPRECATED | G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); @@ -354,7 +449,34 @@ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STREAMABLE, g_param_spec_boolean ("streamable", "Streamable", streamable_desc, - streamable, + streamable, streamable_flags | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RESERVED_MAX_DURATION, + g_param_spec_uint64 ("reserved-max-duration", + "Reserved maximum file duration (ns)", + "When set to a value > 0, reserves space for index tables at the " + "beginning of the file.", + 0, G_MAXUINT64, DEFAULT_RESERVED_MAX_DURATION, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, + PROP_RESERVED_DURATION_REMAINING, + g_param_spec_uint64 ("reserved-duration-remaining", + "Report the approximate amount of remaining recording space (ns)", + "Reports the approximate amount of remaining moov header space " + "reserved using reserved-max-duration", 0, G_MAXUINT64, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, + PROP_RESERVED_MOOV_UPDATE_PERIOD, + g_param_spec_uint64 ("reserved-moov-update-period", + "Interval at which to update index tables (ns)", + "When used with reserved-max-duration, periodically updates the " + "index tables with information muxed so far.", 0, G_MAXUINT64, + DEFAULT_RESERVED_MOOV_UPDATE_PERIOD, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RESERVED_BYTES_PER_SEC, + g_param_spec_uint ("reserved-bytes-per-sec", + "Reserved MOOV bytes per second, per track", + "Multiplier for converting reserved-max-duration into bytes of header to reserve, per second, per track", + 0, 10000, DEFAULT_RESERVED_BYTES_PER_SEC_PER_TRAK, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); gstelement_class->request_new_pad = @@ -371,7 +493,9 @@ qtpad->sample_size = 0; qtpad->sync = FALSE; qtpad->last_dts = 0; + qtpad->dts_adjustment = GST_CLOCK_TIME_NONE; qtpad->first_ts = GST_CLOCK_TIME_NONE; + qtpad->first_dts = GST_CLOCK_TIME_NONE; qtpad->prepare_buf_func = NULL; qtpad->create_empty_buffer = NULL; qtpad->avg_bitrate = 0; @@ -383,8 +507,12 @@ qtpad->buf_head = 0; qtpad->buf_tail = 0; - if (qtpad->last_buf) - gst_buffer_replace (&qtpad->last_buf, NULL); + gst_buffer_replace (&qtpad->last_buf, NULL); + + if (qtpad->tags) { + gst_tag_list_unref (qtpad->tags); + qtpad->tags = NULL; + } /* reference owned elsewhere */ qtpad->trak = NULL; @@ -410,6 +538,7 @@ qtmux->state = GST_QT_MUX_STATE_NONE; qtmux->header_size = 0; qtmux->mdat_size = 0; + qtmux->moov_pos = 0; qtmux->mdat_pos = 0; qtmux->longest_chunk = GST_CLOCK_TIME_NONE; qtmux->video_pads = 0; @@ -469,6 +598,11 @@ atom_moov_add_trak (qtmux->moov, qtpad->trak); } } + + qtmux->reserved_moov_size = 0; + qtmux->last_moov_update = GST_CLOCK_TIME_NONE; + qtmux->muxed_since_last_update = 0; + qtmux->reserved_duration_remaining = GST_CLOCK_TIME_NONE; } static void @@ -493,6 +627,11 @@ /* properties set to default upon construction */ + qtmux->reserved_max_duration = DEFAULT_RESERVED_MAX_DURATION; + qtmux->reserved_moov_update_period = DEFAULT_RESERVED_MOOV_UPDATE_PERIOD; + qtmux->reserved_bytes_per_sec_per_trak = + DEFAULT_RESERVED_BYTES_PER_SEC_PER_TRAK; + /* always need this */ qtmux->context = atoms_context_new (gst_qt_mux_map_format_to_flavor (qtmux_klass->format)); @@ -555,16 +694,19 @@ GstMapInfo frommap; GstMapInfo tomap; gsize size; + const guint8 *dataend; GST_LOG_OBJECT (qtmux, "Preparing tx3g buffer %" GST_PTR_FORMAT, buf); if (buf == NULL) return NULL; - size = gst_buffer_get_size (buf); + gst_buffer_map (buf, &frommap, GST_MAP_READ); + + dataend = memchr (frommap.data, 0, frommap.size); + size = dataend ? dataend - frommap.data : frommap.size; newbuf = gst_buffer_new_and_alloc (size + 2); - gst_buffer_map (buf, &frommap, GST_MAP_READ); gst_buffer_map (newbuf, &tomap, GST_MAP_WRITE); GST_WRITE_UINT16_BE (tomap.data, size); @@ -575,11 +717,91 @@ gst_buffer_copy_into (newbuf, buf, GST_BUFFER_COPY_METADATA, 0, size); + /* gst_buffer_copy_into is trying to be too clever and + * won't copy duration when size is different */ + GST_BUFFER_DURATION (newbuf) = GST_BUFFER_DURATION (buf); + gst_buffer_unref (buf); return newbuf; } +static void +gst_qt_mux_pad_add_ac3_extension (GstQTMux * qtmux, GstQTPad * qtpad, + guint8 fscod, guint8 frmsizcod, guint8 bsid, guint8 bsmod, guint8 acmod, + guint8 lfe_on) +{ + AtomInfo *ext; + + g_return_if_fail (qtpad->trak_ste); + + ext = build_ac3_extension (fscod, bsid, bsmod, acmod, lfe_on, frmsizcod >> 1); /* bitrate_code is inside frmsizcod */ + + sample_table_entry_add_ext_atom (qtpad->trak_ste, ext); +} + +static GstBuffer * +gst_qt_mux_prepare_parse_ac3_frame (GstQTPad * qtpad, GstBuffer * buf, + GstQTMux * qtmux) +{ + GstMapInfo map; + GstByteReader reader; + guint off; + + if (!gst_buffer_map (buf, &map, GST_MAP_READ)) { + GST_WARNING_OBJECT (qtpad->collect.pad, "Failed to map buffer"); + return buf; + } + + if (G_UNLIKELY (map.size < 8)) + goto done; + + gst_byte_reader_init (&reader, map.data, map.size); + off = gst_byte_reader_masked_scan_uint32 (&reader, 0xffff0000, 0x0b770000, + 0, map.size); + + if (off != -1) { + GstBitReader bits; + guint8 fscod, frmsizcod, bsid, bsmod, acmod, lfe_on; + + GST_DEBUG_OBJECT (qtpad->collect.pad, "Found ac3 sync point at offset: %u", + off); + + gst_bit_reader_init (&bits, map.data, map.size); + + /* off + sync + crc */ + gst_bit_reader_skip_unchecked (&bits, off * 8 + 16 + 16); + + fscod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 2); + frmsizcod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 6); + bsid = gst_bit_reader_get_bits_uint8_unchecked (&bits, 5); + bsmod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 3); + acmod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 3); + + if ((acmod & 0x1) && (acmod != 0x1)) /* 3 front channels */ + gst_bit_reader_skip_unchecked (&bits, 2); + if ((acmod & 0x4)) /* if a surround channel exists */ + gst_bit_reader_skip_unchecked (&bits, 2); + if (acmod == 0x2) /* if in 2/0 mode */ + gst_bit_reader_skip_unchecked (&bits, 2); + + lfe_on = gst_bit_reader_get_bits_uint8_unchecked (&bits, 1); + + gst_qt_mux_pad_add_ac3_extension (qtmux, qtpad, fscod, frmsizcod, bsid, + bsmod, acmod, lfe_on); + + /* AC-3 spec says that those values should be constant for the + * whole stream when muxed in mp4. We trust the input follows it */ + GST_DEBUG_OBJECT (qtpad->collect.pad, "Data parsed, removing " + "prepare buffer function"); + qtpad->prepare_buf_func = NULL; + } + +done: + gst_buffer_unmap (buf, &map); + return buf; +} + static GstBuffer * gst_qt_mux_create_empty_tx3g_buffer (GstQTPad * qtpad, gint64 duration) { @@ -588,12 +810,12 @@ data = g_malloc (2); GST_WRITE_UINT16_BE (data, 0); - return gst_buffer_new_wrapped (data, 2);; + return gst_buffer_new_wrapped (data, 2); } static void gst_qt_mux_add_mp4_tag (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { switch (gst_tag_get_type (tag)) { /* strings */ @@ -605,7 +827,7 @@ break; GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %s", GST_FOURCC_ARGS (fourcc), str); - atom_moov_add_str_tag (qtmux->moov, fourcc, str); + atom_udta_add_str_tag (udta, fourcc, str); g_free (str); break; } @@ -618,7 +840,7 @@ break; GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %u", GST_FOURCC_ARGS (fourcc), (gint) value); - atom_moov_add_uint_tag (qtmux->moov, fourcc, 21, (gint) value); + atom_udta_add_uint_tag (udta, fourcc, 21, (gint) value); break; } case G_TYPE_UINT: @@ -635,7 +857,7 @@ break; GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %u/%u", GST_FOURCC_ARGS (fourcc), value, count); - atom_moov_add_uint_tag (qtmux->moov, fourcc, 0, + atom_udta_add_uint_tag (udta, fourcc, 0, value << 16 | (count & 0xFFFF)); } else { /* unpaired unsigned integers */ @@ -643,7 +865,7 @@ break; GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %u", GST_FOURCC_ARGS (fourcc), value); - atom_moov_add_uint_tag (qtmux->moov, fourcc, 1, value); + atom_udta_add_uint_tag (udta, fourcc, 1, value); } break; } @@ -655,7 +877,7 @@ static void gst_qt_mux_add_mp4_date (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { GDate *date = NULL; GDateYear year; @@ -683,13 +905,13 @@ str = g_strdup_printf ("%u-%u-%u", year, month, day); GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %s", GST_FOURCC_ARGS (fourcc), str); - atom_moov_add_str_tag (qtmux->moov, fourcc, str); + atom_udta_add_str_tag (udta, fourcc, str); g_free (str); } static void gst_qt_mux_add_mp4_cover (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { GValue value = { 0, }; GstBuffer *buf; @@ -735,7 +957,7 @@ gst_buffer_map (buf, &map, GST_MAP_READ); GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> image size %" G_GSIZE_FORMAT "", GST_FOURCC_ARGS (fourcc), map.size); - atom_moov_add_tag (qtmux->moov, fourcc, flags, map.data, map.size); + atom_udta_add_tag (udta, fourcc, flags, map.data, map.size); gst_buffer_unmap (buf, &map); done: g_value_unset (&value); @@ -743,7 +965,7 @@ static void gst_qt_mux_add_3gp_str (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { gchar *str = NULL; guint number; @@ -761,11 +983,11 @@ if (!tag2) { GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %s", GST_FOURCC_ARGS (fourcc), str); - atom_moov_add_3gp_str_tag (qtmux->moov, fourcc, str); + atom_udta_add_3gp_str_tag (udta, fourcc, str); } else { GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %s/%d", GST_FOURCC_ARGS (fourcc), str, number); - atom_moov_add_3gp_str_int_tag (qtmux->moov, fourcc, str, number); + atom_udta_add_3gp_str_int_tag (udta, fourcc, str, number); } g_free (str); @@ -773,7 +995,7 @@ static void gst_qt_mux_add_3gp_date (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { GDate *date = NULL; GDateYear year; @@ -784,6 +1006,7 @@ return; year = g_date_get_year (date); + g_date_free (date); if (year == G_DATE_BAD_YEAR) { GST_WARNING_OBJECT (qtmux, "invalid date in tag"); @@ -792,12 +1015,12 @@ GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %d", GST_FOURCC_ARGS (fourcc), year); - atom_moov_add_3gp_uint_tag (qtmux->moov, fourcc, year); + atom_udta_add_3gp_uint_tag (udta, fourcc, year); } static void gst_qt_mux_add_3gp_location (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { gdouble latitude = -360, longitude = -360, altitude = 0; gchar *location = NULL; @@ -845,13 +1068,13 @@ GST_WRITE_UINT16_BE (data + 13, 0); GST_DEBUG_OBJECT (qtmux, "Adding tag 'loci'"); - atom_moov_add_3gp_tag (qtmux->moov, fourcc, ddata, size); + atom_udta_add_3gp_tag (udta, fourcc, ddata, size); g_free (ddata); } static void gst_qt_mux_add_3gp_keywords (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { gchar *keywords = NULL; guint8 *data, *ddata; @@ -896,7 +1119,7 @@ g_strfreev (kwds); - atom_moov_add_3gp_tag (qtmux->moov, fourcc, ddata, size); + atom_udta_add_3gp_tag (udta, fourcc, ddata, size); g_free (ddata); } @@ -974,7 +1197,7 @@ static void gst_qt_mux_add_3gp_classification (GstQTMux * qtmux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc) + AtomUDTA * udta, const char *tag, const char *tag2, guint32 fourcc) { gchar *clsf_data = NULL; gint size = 0; @@ -1009,12 +1232,13 @@ memcpy (data + 8, content, size); g_free (content); - atom_moov_add_3gp_tag (qtmux->moov, fourcc, data, 4 + 2 + 2 + size); + atom_udta_add_3gp_tag (udta, fourcc, data, 4 + 2 + 2 + size); g_free (data); } -typedef void (*GstQTMuxAddTagFunc) (GstQTMux * mux, const GstTagList * list, - const char *tag, const char *tag2, guint32 fourcc); +typedef void (*GstQTMuxAddUdtaTagFunc) (GstQTMux * mux, + const GstTagList * list, AtomUDTA * udta, const char *tag, + const char *tag2, guint32 fourcc); /* * Struct to record mappings from gstreamer tags to fourcc codes @@ -1024,7 +1248,7 @@ guint32 fourcc; const gchar *gsttag; const gchar *gsttag2; - const GstQTMuxAddTagFunc func; + const GstQTMuxAddUdtaTagFunc func; } GstTagToFourcc; /* tag list tags to fourcc matching */ @@ -1035,6 +1259,7 @@ {FOURCC_soar, GST_TAG_ARTIST_SORTNAME, NULL, gst_qt_mux_add_mp4_tag}, {FOURCC_aART, GST_TAG_ALBUM_ARTIST, NULL, gst_qt_mux_add_mp4_tag}, {FOURCC_soaa, GST_TAG_ALBUM_ARTIST_SORTNAME, NULL, gst_qt_mux_add_mp4_tag}, + {FOURCC__swr, GST_TAG_APPLICATION_NAME, NULL, gst_qt_mux_add_mp4_tag}, {FOURCC__cmt, GST_TAG_COMMENT, NULL, gst_qt_mux_add_mp4_tag}, {FOURCC__wrt, GST_TAG_COMPOSER, NULL, gst_qt_mux_add_mp4_tag}, {FOURCC_soco, GST_TAG_COMPOSER_SORTNAME, NULL, gst_qt_mux_add_mp4_tag}, @@ -1101,7 +1326,7 @@ xmp = gst_tag_xmp_writer_tag_list_to_xmp_buffer (GST_TAG_XMP_WRITER (qtmux), list, TRUE); if (xmp) - atom_moov_add_xmp_tags (qtmux->moov, xmp); + atom_udta_add_xmp_tags (&qtmux->moov->udta, xmp); } else { AtomInfo *ainfo; /* for isom/mp4, it is a top level uuid atom */ @@ -1119,7 +1344,8 @@ } static void -gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTagList * list) +gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTagList * list, + AtomUDTA * udta) { GstQTMuxClass *qtmux_klass = (GstQTMuxClass *) (G_OBJECT_GET_CLASS (qtmux)); guint32 fourcc; @@ -1143,13 +1369,16 @@ if (!tag_matches) return; + /* Clear existing tags so we don't add them over and over */ + atom_udta_clear_tags (udta); + for (i = 0; tag_matches[i].fourcc; i++) { fourcc = tag_matches[i].fourcc; tag = tag_matches[i].gsttag; tag2 = tag_matches[i].gsttag2; g_assert (tag_matches[i].func); - tag_matches[i].func (qtmux, list, tag, tag2, fourcc); + tag_matches[i].func (qtmux, list, udta, tag, tag2, fourcc); } /* add unparsed blobs if present */ @@ -1183,11 +1412,12 @@ (strcmp (style, "iso") == 0 && qtmux_klass->format == GST_QT_MUX_FORMAT_3GP)) { GST_DEBUG_OBJECT (qtmux, "Adding private tag"); - atom_moov_add_blob_tag (qtmux->moov, map.data, map.size); + atom_udta_add_blob_tag (udta, map.data, map.size); } } gst_buffer_unmap (buf, &map); } + gst_sample_unref (sample); } } @@ -1201,10 +1431,14 @@ static void gst_qt_mux_setup_metadata (GstQTMux * qtmux) { - const GstTagList *tags; + const GstTagList *tags = NULL; + GSList *walk; GST_OBJECT_LOCK (qtmux); - tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (qtmux)); + if (qtmux->tags_changed) { + tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (qtmux)); + qtmux->tags_changed = FALSE; + } GST_OBJECT_UNLOCK (qtmux); GST_LOG_OBJECT (qtmux, "tags: %" GST_PTR_FORMAT, tags); @@ -1218,11 +1452,27 @@ gst_tag_list_remove_tag (copy, GST_TAG_CONTAINER_FORMAT); GST_DEBUG_OBJECT (qtmux, "Formatting tags"); - gst_qt_mux_add_metadata_tags (qtmux, copy); + gst_qt_mux_add_metadata_tags (qtmux, copy, &qtmux->moov->udta); gst_qt_mux_add_xmp_tags (qtmux, copy); gst_tag_list_unref (copy); } else { - GST_DEBUG_OBJECT (qtmux, "No tags received"); + GST_DEBUG_OBJECT (qtmux, "No new tags received"); + } + + for (walk = qtmux->sinkpads; walk; walk = g_slist_next (walk)) { + GstCollectData *cdata = (GstCollectData *) walk->data; + GstQTPad *qpad = (GstQTPad *) cdata; + GstPad *pad = qpad->collect.pad; + + if (qpad->tags_changed && qpad->tags) { + GST_DEBUG_OBJECT (pad, "Adding tags"); + gst_tag_list_remove_tag (qpad->tags, GST_TAG_CONTAINER_FORMAT); + gst_qt_mux_add_metadata_tags (qtmux, qpad->tags, &qpad->trak->udta); + qpad->tags_changed = FALSE; + GST_DEBUG_OBJECT (pad, "Tags added"); + } else { + GST_DEBUG_OBJECT (pad, "No new tags received"); + } } } @@ -1377,46 +1627,55 @@ */ static GstFlowReturn gst_qt_mux_send_mdat_header (GstQTMux * qtmux, guint64 * off, guint64 size, - gboolean extended) + gboolean extended, gboolean fsync_after) { - Atom *node_header; GstBuffer *buf; - guint8 *data = NULL; - guint64 offset = 0; + GstMapInfo map; GST_DEBUG_OBJECT (qtmux, "Sending mdat's atom header, " "size %" G_GUINT64_FORMAT, size); - node_header = g_malloc0 (sizeof (Atom)); - node_header->type = FOURCC_mdat; + /* if the qtmux state is EOS, really write the mdat, otherwise + * allow size == 0 for a placeholder atom */ + if (qtmux->state == GST_QT_MUX_STATE_EOS || size > 0) + size += 8; + if (extended) { - /* use extended size */ - node_header->size = 1; - node_header->extended_size = 0; - if (size) - node_header->extended_size = size + 16; + gboolean large_file = (size > MDAT_LARGE_FILE_LIMIT); + /* Always write 16-bytes, but put a free atom first + * if the size is < 4GB. */ + buf = gst_buffer_new_and_alloc (16); + gst_buffer_map (buf, &map, GST_MAP_WRITE); + + if (large_file) { + /* Write extended mdat header and large_size field */ + GST_WRITE_UINT32_BE (map.data, 1); + GST_WRITE_UINT32_LE (map.data + 4, FOURCC_mdat); + GST_WRITE_UINT64_BE (map.data + 8, size + 8); + } else { + /* Write an empty free atom, then standard 32-bit mdat */ + GST_WRITE_UINT32_BE (map.data, 8); + GST_WRITE_UINT32_LE (map.data + 4, FOURCC_free); + GST_WRITE_UINT32_BE (map.data + 8, size); + GST_WRITE_UINT32_LE (map.data + 12, FOURCC_mdat); + } + gst_buffer_unmap (buf, &map); } else { - node_header->size = size + 8; - } + buf = gst_buffer_new_and_alloc (8); + gst_buffer_map (buf, &map, GST_MAP_WRITE); - size = offset = 0; - if (atom_copy_data (node_header, &data, &size, &offset) == 0) - goto serialize_error; + /* Vanilla 32-bit mdat */ + GST_WRITE_UINT32_BE (map.data, size); + GST_WRITE_UINT32_LE (map.data + 4, FOURCC_mdat); + gst_buffer_unmap (buf, &map); + } - buf = _gst_buffer_new_take_data (data, offset); - g_free (node_header); + GST_LOG_OBJECT (qtmux, "Pushing mdat header"); + if (fsync_after) + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_SYNC_AFTER); - GST_LOG_OBJECT (qtmux, "Pushing mdat start"); return gst_qt_mux_send_buffer (qtmux, buf, off, FALSE); - /* ERRORS */ -serialize_error: - { - GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), - ("Failed to serialize mdat")); - g_free (node_header); - return GST_FLOW_ERROR; - } } /* @@ -1425,38 +1684,20 @@ */ static GstFlowReturn gst_qt_mux_update_mdat_size (GstQTMux * qtmux, guint64 mdat_pos, - guint64 mdat_size, guint64 * offset) + guint64 mdat_size, guint64 * offset, gboolean fsync_after) { - GstBuffer *buf; - gboolean large_file; GstSegment segment; - GstMapInfo map; - - large_file = (mdat_size > MDAT_LARGE_FILE_LIMIT); - if (large_file) - mdat_pos += 8; + /* We must have recorded the mdat position for this to work */ + g_assert (mdat_pos != 0); /* seek and rewrite the header */ gst_segment_init (&segment, GST_FORMAT_BYTES); segment.start = mdat_pos; gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment)); - if (large_file) { - buf = gst_buffer_new_and_alloc (sizeof (guint64)); - gst_buffer_map (buf, &map, GST_MAP_WRITE); - GST_WRITE_UINT64_BE (map.data, mdat_size + 16); - } else { - buf = gst_buffer_new_and_alloc (16); - gst_buffer_map (buf, &map, GST_MAP_WRITE); - GST_WRITE_UINT32_BE (map.data, 8); - GST_WRITE_UINT32_LE (map.data + 4, FOURCC_free); - GST_WRITE_UINT32_BE (map.data + 8, mdat_size + 8); - GST_WRITE_UINT32_LE (map.data + 12, FOURCC_mdat); - } - gst_buffer_unmap (buf, &map); - - return gst_qt_mux_send_buffer (qtmux, buf, offset, FALSE); + return gst_qt_mux_send_mdat_header (qtmux, offset, mdat_size, TRUE, + fsync_after); } static GstFlowReturn @@ -1563,15 +1804,83 @@ gst_caps_unref (caps); } +/* + * Write out a free space atom. The offset is adjusted by the full + * size, but a smaller buffer is sent + */ +static GstFlowReturn +gst_qt_mux_send_free_atom (GstQTMux * qtmux, guint64 * off, guint32 size, + gboolean fsync_after) +{ + Atom *node_header; + GstBuffer *buf; + guint8 *data = NULL; + guint64 offset = 0, bsize = 0; + GstFlowReturn ret; + + GST_DEBUG_OBJECT (qtmux, "Sending free atom header of size %u", size); + + /* We can't make a free space atom smaller than the header */ + if (size < 8) + goto too_small; + + node_header = g_malloc0 (sizeof (Atom)); + node_header->type = FOURCC_free; + node_header->size = size; + + bsize = offset = 0; + if (atom_copy_data (node_header, &data, &bsize, &offset) == 0) + goto serialize_error; + + buf = _gst_buffer_new_take_data (data, offset); + g_free (node_header); + + if (fsync_after) + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_SYNC_AFTER); + + GST_LOG_OBJECT (qtmux, "Pushing free atom"); + ret = gst_qt_mux_send_buffer (qtmux, buf, off, FALSE); + + if (off) { + GstSegment segment; + + *off += size - 8; + + /* Make sure downstream position ends up at the end of this free box */ + gst_segment_init (&segment, GST_FORMAT_BYTES); + segment.start = *off; + gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment)); + } + + return ret; + + /* ERRORS */ +too_small: + { + GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), + ("Not enough free reserved space")); + return GST_FLOW_ERROR; + } +serialize_error: + { + GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), + ("Failed to serialize mdat")); + g_free (node_header); + return GST_FLOW_ERROR; + } +} + static void -gst_qt_mux_configure_moov (GstQTMux * qtmux, guint32 * _timescale) +gst_qt_mux_configure_moov (GstQTMux * qtmux) { - gboolean fragmented; + gboolean fragmented = FALSE; guint32 timescale; GST_OBJECT_LOCK (qtmux); timescale = qtmux->timescale; - fragmented = qtmux->fragment_sequence > 0; + if (qtmux->mux_mode == GST_QT_MUX_MODE_FRAGMENTED || + qtmux->mux_mode == GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE) + fragmented = TRUE; GST_OBJECT_UNLOCK (qtmux); /* inform lower layers of our property wishes, and determine duration. @@ -1583,13 +1892,11 @@ atom_moov_set_fragmented (qtmux->moov, fragmented); atom_moov_update_duration (qtmux->moov); - - if (_timescale) - *_timescale = timescale; } static GstFlowReturn -gst_qt_mux_send_moov (GstQTMux * qtmux, guint64 * _offset, gboolean mind_fast) +gst_qt_mux_send_moov (GstQTMux * qtmux, guint64 * _offset, + guint64 padded_moov_size, gboolean mind_fast, gboolean fsync_after) { guint64 offset = 0, size = 0; guint8 *data; @@ -1602,14 +1909,41 @@ GST_LOG_OBJECT (qtmux, "Copying movie header into buffer"); if (!atom_moov_copy_data (qtmux->moov, &data, &size, &offset)) goto serialize_error; + qtmux->last_moov_size = offset; + /* Check we have enough reserved space for this and a Free atom */ + if (padded_moov_size > 0 && offset + 8 > padded_moov_size) + goto too_small_reserved; buf = _gst_buffer_new_take_data (data, offset); GST_DEBUG_OBJECT (qtmux, "Pushing moov atoms"); - gst_qt_mux_set_header_on_caps (qtmux, buf); + + /* If at EOS, this is the final moov, put in the streamheader + * (apparently used by a flumotion util) */ + if (qtmux->state == GST_QT_MUX_STATE_EOS) + gst_qt_mux_set_header_on_caps (qtmux, buf); + + if (fsync_after) + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_SYNC_AFTER); ret = gst_qt_mux_send_buffer (qtmux, buf, _offset, mind_fast); - return ret; + /* Write out a free atom if needed */ + if (ret == GST_FLOW_OK && offset < padded_moov_size) { + GST_LOG_OBJECT (qtmux, "Writing out free atom of size %u", + (guint32) (padded_moov_size - offset)); + ret = + gst_qt_mux_send_free_atom (qtmux, _offset, padded_moov_size - offset, + fsync_after); + } + return ret; +too_small_reserved: + { + GST_ELEMENT_ERROR (qtmux, STREAM, MUX, + ("Not enough free reserved header space"), + ("Needed %" G_GUINT64_FORMAT " bytes, reserved %" G_GUINT64_FORMAT, + offset, padded_moov_size)); + return GST_FLOW_ERROR; + } serialize_error: { g_free (data); @@ -1661,6 +1995,75 @@ } } +static gboolean +gst_qt_mux_downstream_is_seekable (GstQTMux * qtmux) +{ + gboolean seekable = FALSE; + GstQuery *query = gst_query_new_seeking (GST_FORMAT_BYTES); + + if (gst_pad_peer_query (qtmux->srcpad, query)) { + gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); + GST_INFO_OBJECT (qtmux, "downstream is %sseekable", seekable ? "" : "not "); + } else { + /* have to assume seeking is not supported if query not handled downstream */ + GST_WARNING_OBJECT (qtmux, "downstream did not handle seeking query"); + seekable = FALSE; + } + gst_query_unref (query); + + return seekable; +} + +static void +gst_qt_mux_prepare_moov_recovery (GstQTMux * qtmux) +{ + GSList *walk; + gboolean fail = FALSE; + AtomFTYP *ftyp = NULL; + GstBuffer *prefix = NULL; + + GST_DEBUG_OBJECT (qtmux, "Openning moov recovery file: %s", + qtmux->moov_recov_file_path); + + qtmux->moov_recov_file = g_fopen (qtmux->moov_recov_file_path, "wb+"); + if (qtmux->moov_recov_file == NULL) { + GST_WARNING_OBJECT (qtmux, "Failed to open moov recovery file in %s", + qtmux->moov_recov_file_path); + return; + } + + gst_qt_mux_prepare_ftyp (qtmux, &ftyp, &prefix); + + if (!atoms_recov_write_headers (qtmux->moov_recov_file, ftyp, prefix, + qtmux->moov, qtmux->timescale, g_slist_length (qtmux->sinkpads))) { + GST_WARNING_OBJECT (qtmux, "Failed to write moov recovery file " "headers"); + goto fail; + } + + atom_ftyp_free (ftyp); + if (prefix) + gst_buffer_unref (prefix); + + for (walk = qtmux->sinkpads; walk && !fail; walk = g_slist_next (walk)) { + GstCollectData *cdata = (GstCollectData *) walk->data; + GstQTPad *qpad = (GstQTPad *) cdata; + /* write info for each stream */ + fail = atoms_recov_write_trak_info (qtmux->moov_recov_file, qpad->trak); + if (fail) { + GST_WARNING_OBJECT (qtmux, "Failed to write trak info to recovery " + "file"); + break; + } + } + +fail: + /* cleanup */ + fclose (qtmux->moov_recov_file); + qtmux->moov_recov_file = NULL; + GST_WARNING_OBJECT (qtmux, "An error was detected while writing to " + "recover file, moov recovery won't work"); +} + static GstFlowReturn gst_qt_mux_start_file (GstQTMux * qtmux) { @@ -1669,9 +2072,16 @@ GstCaps *caps; GstSegment segment; gchar s_id[32]; + GstClockTime reserved_max_duration; + guint reserved_bytes_per_sec_per_trak; GST_DEBUG_OBJECT (qtmux, "starting file"); + GST_OBJECT_LOCK (qtmux); + reserved_max_duration = qtmux->reserved_max_duration; + reserved_bytes_per_sec_per_trak = qtmux->reserved_bytes_per_sec_per_trak; + GST_OBJECT_UNLOCK (qtmux); + /* stream-start (FIXME: create id based on input ids) */ g_snprintf (s_id, sizeof (s_id), "qtmux-%08x", g_random_int ()); gst_pad_push_event (qtmux->srcpad, gst_event_new_stream_start (s_id)); @@ -1683,39 +2093,52 @@ gst_pad_set_caps (qtmux->srcpad, caps); gst_caps_unref (caps); - /* if not streaming, check if downstream is seekable */ - if (!qtmux->streamable) { - gboolean seekable; - GstQuery *query; - - query = gst_query_new_seeking (GST_FORMAT_BYTES); - if (gst_pad_peer_query (qtmux->srcpad, query)) { - gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); - GST_INFO_OBJECT (qtmux, "downstream is %sseekable", - seekable ? "" : "not "); - } else { - /* have to assume seeking is supported if query not handled downstream */ - GST_WARNING_OBJECT (qtmux, "downstream did not handle seeking query"); - seekable = FALSE; - } - gst_query_unref (query); - if (!seekable) { - if (qtmux_klass->format != GST_QT_MUX_FORMAT_ISML) { - if (!qtmux->fast_start) { - GST_ELEMENT_WARNING (qtmux, STREAM, FAILED, - ("Downstream is not seekable and headers can't be rewritten"), - (NULL)); - /* FIXME: Is there something better we can do? */ - qtmux->streamable = TRUE; - } - } else { + /* Default is 'normal' mode */ + qtmux->mux_mode = GST_QT_MUX_MODE_MOOV_AT_END; + + /* Require a sensible fragment duration when muxing + * using the ISML muxer */ + if (qtmux_klass->format == GST_QT_MUX_FORMAT_ISML && + qtmux->fragment_duration == 0) + goto invalid_isml; + + if (qtmux->fragment_duration > 0) { + if (qtmux->streamable) + qtmux->mux_mode = GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE; + else + qtmux->mux_mode = GST_QT_MUX_MODE_FRAGMENTED; + } else if (qtmux->fast_start) { + qtmux->mux_mode = GST_QT_MUX_MODE_FAST_START; + } else if (reserved_max_duration != GST_CLOCK_TIME_NONE) { + qtmux->mux_mode = GST_QT_MUX_MODE_ROBUST_RECORDING; + } + + switch (qtmux->mux_mode) { + case GST_QT_MUX_MODE_MOOV_AT_END: + case GST_QT_MUX_MODE_ROBUST_RECORDING: + /* We have to be able to seek to rewrite the mdat header, or any + * moov atom we write will not be visible in the file, because an + * MDAT with 0 as the size covers the rest of the file. A file + * with no moov is not playable, so error out now. */ + if (!gst_qt_mux_downstream_is_seekable (qtmux)) { + GST_ELEMENT_ERROR (qtmux, STREAM, MUX, + ("Downstream is not seekable - will not be able to create a playable file"), + (NULL)); + return GST_FLOW_ERROR; + } + break; + case GST_QT_MUX_MODE_FAST_START: + case GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE: + break; /* Don't need seekability, ignore */ + case GST_QT_MUX_MODE_FRAGMENTED: + if (!gst_qt_mux_downstream_is_seekable (qtmux)) { GST_WARNING_OBJECT (qtmux, "downstream is not seekable, but " "streamable=false. Will ignore that and create streamable output " "instead"); qtmux->streamable = TRUE; g_object_notify (G_OBJECT (qtmux), "streamable"); } - } + break; } /* let downstream know we think in BYTES and expect to do seeking later on */ @@ -1725,136 +2148,200 @@ /* initialize our moov recovery file */ GST_OBJECT_LOCK (qtmux); if (qtmux->moov_recov_file_path) { - GST_DEBUG_OBJECT (qtmux, "Openning moov recovery file: %s", - qtmux->moov_recov_file_path); - qtmux->moov_recov_file = g_fopen (qtmux->moov_recov_file_path, "wb+"); - if (qtmux->moov_recov_file == NULL) { - GST_WARNING_OBJECT (qtmux, "Failed to open moov recovery file in %s", - qtmux->moov_recov_file_path); - } else { - GSList *walk; - gboolean fail = FALSE; - AtomFTYP *ftyp = NULL; - GstBuffer *prefix = NULL; - - gst_qt_mux_prepare_ftyp (qtmux, &ftyp, &prefix); - - if (!atoms_recov_write_headers (qtmux->moov_recov_file, ftyp, prefix, - qtmux->moov, qtmux->timescale, - g_slist_length (qtmux->sinkpads))) { - GST_WARNING_OBJECT (qtmux, "Failed to write moov recovery file " - "headers"); - fail = TRUE; - } - - atom_ftyp_free (ftyp); - if (prefix) - gst_buffer_unref (prefix); - - for (walk = qtmux->sinkpads; walk && !fail; walk = g_slist_next (walk)) { - GstCollectData *cdata = (GstCollectData *) walk->data; - GstQTPad *qpad = (GstQTPad *) cdata; - /* write info for each stream */ - fail = atoms_recov_write_trak_info (qtmux->moov_recov_file, qpad->trak); - if (fail) { - GST_WARNING_OBJECT (qtmux, "Failed to write trak info to recovery " - "file"); - } - } - if (fail) { - /* cleanup */ - fclose (qtmux->moov_recov_file); - qtmux->moov_recov_file = NULL; - GST_WARNING_OBJECT (qtmux, "An error was detected while writing to " - "recover file, moov recovery won't work"); - } - } + gst_qt_mux_prepare_moov_recovery (qtmux); } + + /* Make sure the first time we update the moov, we'll + * include any tagsetter tags */ + qtmux->tags_changed = TRUE; + GST_OBJECT_UNLOCK (qtmux); - /* + /* * send mdat header if already needed, and mark position for later update. * We don't send ftyp now if we are on fast start mode, because we can * better fine tune using the information we gather to create the whole moov * atom. */ - if (qtmux->fast_start) { - GST_OBJECT_LOCK (qtmux); - qtmux->fast_start_file = g_fopen (qtmux->fast_start_file_path, "wb+"); - if (!qtmux->fast_start_file) - goto open_failed; - GST_OBJECT_UNLOCK (qtmux); + switch (qtmux->mux_mode) { + case GST_QT_MUX_MODE_MOOV_AT_END: + ret = gst_qt_mux_prepare_and_send_ftyp (qtmux); + if (ret != GST_FLOW_OK) + break; - /* send a dummy buffer for preroll */ - ret = gst_qt_mux_send_buffer (qtmux, gst_buffer_new (), NULL, FALSE); - if (ret != GST_FLOW_OK) - goto exit; + /* Store this as the mdat offset for later updating + * when we write the moov */ + qtmux->mdat_pos = qtmux->header_size; + /* extended atom in case we go over 4GB while writing and need + * the full 64-bit atom */ + ret = + gst_qt_mux_send_mdat_header (qtmux, &qtmux->header_size, 0, TRUE, + FALSE); + break; + case GST_QT_MUX_MODE_ROBUST_RECORDING: - } else { - ret = gst_qt_mux_prepare_and_send_ftyp (qtmux); - if (ret != GST_FLOW_OK) { - goto exit; - } + ret = gst_qt_mux_prepare_and_send_ftyp (qtmux); + if (ret != GST_FLOW_OK) + break; + + /* Pad ftyp out to an 8-byte boundary before starting the moov + * ping pong region. It should be well less than 1 disk sector, + * unless there's a bajillion compatible types listed, + * but let's be sure the free atom doesn't cross a sector + * boundary anyway */ + if (qtmux->header_size % 8) { + /* Extra 8 bytes for the padding free atom header */ + guint padding = (guint) (16 - (qtmux->header_size % 8)); + GST_LOG_OBJECT (qtmux, "Rounding ftyp by %u bytes", padding); + ret = + gst_qt_mux_send_free_atom (qtmux, &qtmux->header_size, padding, + FALSE); + if (ret != GST_FLOW_OK) + return ret; + } + + /* Store this as the moov offset for later updating. + * We record mdat position below */ + qtmux->moov_pos = qtmux->header_size; + + /* Set up the initial 'ping' state of the ping-pong buffers */ + qtmux->reserved_moov_first_active = TRUE; + + gst_qt_mux_configure_moov (qtmux); + gst_qt_mux_setup_metadata (qtmux); + /* Empty free atom to begin, starting on an 8-byte boundary */ + ret = gst_qt_mux_send_free_atom (qtmux, &qtmux->header_size, 8, FALSE); + if (ret != GST_FLOW_OK) + return ret; + /* Moov header, not padded yet */ + ret = gst_qt_mux_send_moov (qtmux, &qtmux->header_size, 0, FALSE, FALSE); + if (ret != GST_FLOW_OK) + return ret; + /* The moov we just sent contains the 'base' size of the moov, before + * we put in any time-dependent per-trak data. Use that to make + * a good estimate of how much extra to reserve */ + /* Calculate how much space to reserve for our MOOV atom. + * We actually reserve twice that, for ping-pong buffers */ + qtmux->base_moov_size = qtmux->last_moov_size; + GST_LOG_OBJECT (qtmux, "Base moov size is %u before any indexes", + qtmux->base_moov_size); + qtmux->reserved_moov_size = qtmux->base_moov_size + + gst_util_uint64_scale (reserved_max_duration, + reserved_bytes_per_sec_per_trak * + atom_moov_get_trak_count (qtmux->moov), GST_SECOND); + + /* Need space for at least 4 atom headers. More really, but + * this as an absolute minimum */ + if (qtmux->reserved_moov_size < 4 * 8) + goto reserved_moov_too_small; + + GST_DEBUG_OBJECT (qtmux, "reserving header area of size %u", + 2 * qtmux->reserved_moov_size + 16); - /* well, it's moov pos if fragmented ... */ - qtmux->mdat_pos = qtmux->header_size; + GST_OBJECT_LOCK (qtmux); + qtmux->reserved_duration_remaining = + gst_util_uint64_scale (qtmux->reserved_moov_size - + qtmux->base_moov_size, GST_SECOND, + reserved_bytes_per_sec_per_trak * + atom_moov_get_trak_count (qtmux->moov)); + GST_OBJECT_UNLOCK (qtmux); + + /* Now that we know how much reserved space is targetted, + * output a free atom to fill the extra reserved */ + ret = gst_qt_mux_send_free_atom (qtmux, &qtmux->header_size, + qtmux->reserved_moov_size - qtmux->base_moov_size, FALSE); + if (ret != GST_FLOW_OK) + return ret; + + /* Then a free atom containing 'pong' buffer, with an + * extra 8 bytes to account for the free atom header itself */ + ret = gst_qt_mux_send_free_atom (qtmux, &qtmux->header_size, + qtmux->reserved_moov_size + 8, FALSE); + if (ret != GST_FLOW_OK) + return ret; + + /* extra atoms go after the free/moov(s), before the mdat */ + ret = + gst_qt_mux_send_extra_atoms (qtmux, TRUE, &qtmux->header_size, FALSE); + if (ret != GST_FLOW_OK) + return ret; + + qtmux->mdat_pos = qtmux->header_size; + /* extended atom in case we go over 4GB while writing and need + * the full 64-bit atom */ + ret = + gst_qt_mux_send_mdat_header (qtmux, &qtmux->header_size, 0, TRUE, + FALSE); + break; + case GST_QT_MUX_MODE_FAST_START: + GST_OBJECT_LOCK (qtmux); + qtmux->fast_start_file = g_fopen (qtmux->fast_start_file_path, "wb+"); + if (!qtmux->fast_start_file) + goto open_failed; + GST_OBJECT_UNLOCK (qtmux); + /* send a dummy buffer for preroll */ + ret = gst_qt_mux_send_buffer (qtmux, gst_buffer_new (), NULL, FALSE); + break; + case GST_QT_MUX_MODE_FRAGMENTED: + case GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE: + ret = gst_qt_mux_prepare_and_send_ftyp (qtmux); + if (ret != GST_FLOW_OK) + break; + /* store the moov pos so we can update the duration later + * in non-streamable mode */ + qtmux->moov_pos = qtmux->header_size; - if (qtmux->fragment_duration) { GST_DEBUG_OBJECT (qtmux, "fragment duration %d ms, writing headers", qtmux->fragment_duration); /* also used as snapshot marker to indicate fragmented file */ qtmux->fragment_sequence = 1; /* prepare moov and/or tags */ - gst_qt_mux_configure_moov (qtmux, NULL); + gst_qt_mux_configure_moov (qtmux); gst_qt_mux_setup_metadata (qtmux); - ret = gst_qt_mux_send_moov (qtmux, &qtmux->header_size, FALSE); + ret = gst_qt_mux_send_moov (qtmux, &qtmux->header_size, 0, FALSE, FALSE); if (ret != GST_FLOW_OK) return ret; /* extra atoms */ ret = gst_qt_mux_send_extra_atoms (qtmux, TRUE, &qtmux->header_size, FALSE); if (ret != GST_FLOW_OK) - return ret; - /* prepare index */ - if (!qtmux->streamable) + break; + /* prepare index if not streamable */ + if (qtmux->mux_mode == GST_QT_MUX_MODE_FRAGMENTED) qtmux->mfra = atom_mfra_new (qtmux->context); - } else { - /* extended to ensure some spare space */ - ret = gst_qt_mux_send_mdat_header (qtmux, &qtmux->header_size, 0, TRUE); - } + break; } -exit: return ret; - /* ERRORS */ +invalid_isml: + { + GST_ELEMENT_ERROR (qtmux, STREAM, MUX, + ("Cannot create an ISML file with 0 fragment duration"), (NULL)); + return GST_FLOW_ERROR; + } +reserved_moov_too_small: + { + GST_ELEMENT_ERROR (qtmux, STREAM, MUX, + ("Not enough reserved space for creating headers"), (NULL)); + return GST_FLOW_ERROR; + } open_failed: { GST_ELEMENT_ERROR (qtmux, RESOURCE, OPEN_READ_WRITE, - (("Could not open temporary file \"%s\""), qtmux->fast_start_file_path), - GST_ERROR_SYSTEM); + (("Could not open temporary file \"%s\""), + qtmux->fast_start_file_path), GST_ERROR_SYSTEM); GST_OBJECT_UNLOCK (qtmux); return GST_FLOW_ERROR; } } static GstFlowReturn -gst_qt_mux_stop_file (GstQTMux * qtmux) +gst_qt_mux_send_last_buffers (GstQTMux * qtmux) { - gboolean ret = GST_FLOW_OK; - guint64 offset = 0, size = 0; + GstFlowReturn ret = GST_FLOW_OK; GSList *walk; - gboolean large_file; - guint32 timescale; - GstClockTime first_ts = GST_CLOCK_TIME_NONE; - /* for setting some subtitles fields */ - guint max_width = 0; - guint max_height = 0; - - GST_DEBUG_OBJECT (qtmux, "Updating remaining values and sending last data"); - - /* pushing last buffers for each pad */ for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) { GstCollectData *cdata = (GstCollectData *) walk->data; GstQTPad *qtpad = (GstQTPad *) cdata; @@ -1876,19 +2363,43 @@ "flow return: %s", GST_PAD_NAME (qtpad->collect.pad), gst_flow_get_name (ret)); } + } - /* having flushed above, can check for buffers now */ - if (!GST_CLOCK_TIME_IS_VALID (qtpad->first_ts)) { - GST_DEBUG_OBJECT (qtmux, "Pad %s has no buffers", + return ret; +} + +static void +gst_qt_mux_update_global_statistics (GstQTMux * qtmux) +{ + GSList *walk; + + /* for setting some subtitles fields */ + guint max_width = 0; + guint max_height = 0; + + qtmux->first_ts = qtmux->last_dts = GST_CLOCK_TIME_NONE; + + for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) { + GstCollectData *cdata = (GstCollectData *) walk->data; + GstQTPad *qtpad = (GstQTPad *) cdata; + + if (!qtpad->fourcc) { + GST_DEBUG_OBJECT (qtmux, "Pad %s has never had buffers", GST_PAD_NAME (qtpad->collect.pad)); continue; } - /* determine max stream duration */ - if (!GST_CLOCK_TIME_IS_VALID (first_ts) || - (GST_CLOCK_TIME_IS_VALID (qtpad->first_ts) && - qtpad->last_dts > first_ts)) { - first_ts = qtpad->last_dts; + /* having flushed above, can check for buffers now */ + if (GST_CLOCK_TIME_IS_VALID (qtpad->first_ts)) { + /* determine max stream duration */ + if (!GST_CLOCK_TIME_IS_VALID (qtmux->last_dts) + || qtpad->last_dts > qtmux->last_dts) { + qtmux->last_dts = qtpad->last_dts; + } + if (!GST_CLOCK_TIME_IS_VALID (qtmux->first_ts) + || qtpad->first_ts < qtmux->first_ts) { + qtmux->first_ts = qtpad->first_ts; + } } /* subtitles need to know the video width/height, @@ -1928,11 +2439,97 @@ atom_trak_tx3g_update_dimension (qtpad->trak, max_width, max_height); } } +} - if (qtmux->fragment_sequence) { - GstSegment segment; +/* Called after gst_qt_mux_update_global_statistics() updates the + * first_ts tracking, to create/set edit lists for delayed streams */ +static void +gst_qt_mux_update_edit_lists (GstQTMux * qtmux) +{ + GSList *walk; + + GST_DEBUG_OBJECT (qtmux, "Media first ts selected: %" GST_TIME_FORMAT, + GST_TIME_ARGS (qtmux->first_ts)); + /* add/update EDTSs for late streams. configure_moov will have + * set the trak durations above by summing the sample tables, + * here we extend that if needing to insert an empty segment */ + for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) { + GstCollectData *cdata = (GstCollectData *) walk->data; + GstQTPad *qtpad = (GstQTPad *) cdata; - if (qtmux->mfra) { + if (GST_CLOCK_TIME_IS_VALID (qtpad->first_ts)) { + guint32 lateness = 0; + guint32 duration = qtpad->trak->tkhd.duration; + gboolean has_gap; + gboolean has_shift; + + has_gap = (qtpad->first_ts > (qtmux->first_ts + qtpad->dts_adjustment)); + has_shift = (qtpad->dts_adjustment > 0); + + if (has_gap) { + GstClockTime diff; + + diff = qtpad->first_ts - (qtmux->first_ts + qtpad->dts_adjustment); + lateness = gst_util_uint64_scale_round (diff, + qtmux->timescale, GST_SECOND); + + GST_DEBUG_OBJECT (qtmux, "Pad %s is a late stream by %" GST_TIME_FORMAT, + GST_PAD_NAME (qtpad->collect.pad), GST_TIME_ARGS (lateness)); + + atom_trak_set_elst_entry (qtpad->trak, 0, lateness, (guint32) - 1, + (guint32) (1 * 65536.0)); + } + + if (has_gap || has_shift) { + GstClockTime ctts; + guint32 media_start; + + ctts = qtpad->first_ts - qtpad->first_dts; + media_start = gst_util_uint64_scale_round (ctts, + atom_trak_get_timescale (qtpad->trak), GST_SECOND); + + atom_trak_set_elst_entry (qtpad->trak, 1, duration, media_start, + (guint32) (1 * 65536.0)); + } + + /* need to add the empty time to the trak duration */ + duration += lateness; + + qtpad->trak->tkhd.duration = duration; + + /* And possibly grow the moov duration */ + if (duration > qtmux->moov->mvhd.time_info.duration) { + qtmux->moov->mvhd.time_info.duration = duration; + qtmux->moov->mvex.mehd.fragment_duration = duration; + } + } + } +} + +static GstFlowReturn +gst_qt_mux_stop_file (GstQTMux * qtmux) +{ + gboolean ret = GST_FLOW_OK; + guint64 offset = 0, size = 0; + gboolean large_file; + + GST_DEBUG_OBJECT (qtmux, "Updating remaining values and sending last data"); + + /* pushing last buffers for each pad */ + if ((ret = gst_qt_mux_send_last_buffers (qtmux)) != GST_FLOW_OK) + return ret; + + if (qtmux->mux_mode == GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE) { + /* Streamable mode; no need to write duration or MFRA */ + GST_DEBUG_OBJECT (qtmux, "streamable file; nothing to stop"); + return GST_FLOW_OK; + } + + gst_qt_mux_update_global_statistics (qtmux); + + switch (qtmux->mux_mode) { + case GST_QT_MUX_MODE_FRAGMENTED:{ + GstSegment segment; guint8 *data = NULL; GstBuffer *buf; @@ -1944,103 +2541,82 @@ ret = gst_qt_mux_send_buffer (qtmux, buf, NULL, FALSE); if (ret != GST_FLOW_OK) return ret; - } else { - /* must have been streamable; no need to write duration */ - GST_DEBUG_OBJECT (qtmux, "streamable file; nothing to stop"); - return GST_FLOW_OK; - } - timescale = qtmux->timescale; - /* only mvex duration is updated, - * mvhd should be consistent with empty moov - * (but TODO maybe some clients do not handle that well ?) */ - qtmux->moov->mvex.mehd.fragment_duration = - gst_util_uint64_scale (first_ts, timescale, GST_SECOND); - GST_DEBUG_OBJECT (qtmux, "rewriting moov with mvex duration %" - GST_TIME_FORMAT, GST_TIME_ARGS (first_ts)); - /* seek and rewrite the header */ - gst_segment_init (&segment, GST_FORMAT_BYTES); - segment.start = qtmux->mdat_pos; - gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment)); - /* no need to seek back */ - return gst_qt_mux_send_moov (qtmux, NULL, FALSE); - } - - gst_qt_mux_configure_moov (qtmux, ×cale); - - /* check for late streams */ - first_ts = GST_CLOCK_TIME_NONE; - for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) { - GstCollectData *cdata = (GstCollectData *) walk->data; - GstQTPad *qtpad = (GstQTPad *) cdata; - - if (!GST_CLOCK_TIME_IS_VALID (first_ts) || - (GST_CLOCK_TIME_IS_VALID (qtpad->first_ts) && - qtpad->first_ts < first_ts)) { - first_ts = qtpad->first_ts; + /* only mvex duration is updated, + * mvhd should be consistent with empty moov + * (but TODO maybe some clients do not handle that well ?) */ + qtmux->moov->mvex.mehd.fragment_duration = + gst_util_uint64_scale (qtmux->last_dts, qtmux->timescale, GST_SECOND); + GST_DEBUG_OBJECT (qtmux, "rewriting moov with mvex duration %" + GST_TIME_FORMAT, GST_TIME_ARGS (qtmux->last_dts)); + /* seek and rewrite the header */ + gst_segment_init (&segment, GST_FORMAT_BYTES); + segment.start = qtmux->moov_pos; + gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment)); + /* no need to seek back */ + return gst_qt_mux_send_moov (qtmux, NULL, 0, FALSE, FALSE); + } + case GST_QT_MUX_MODE_ROBUST_RECORDING:{ + ret = gst_qt_mux_robust_recording_rewrite_moov (qtmux); + if (G_UNLIKELY (ret != GST_FLOW_OK)) + return ret; + /* Finalise by writing the final size into the mdat. Up until now + * it's been 0, which means 'rest of the file' + * No need to seek back after this, we won't write any more */ + return gst_qt_mux_update_mdat_size (qtmux, qtmux->mdat_pos, + qtmux->mdat_size, NULL, TRUE); } + default: + break; } - GST_DEBUG_OBJECT (qtmux, "Media first ts selected: %" GST_TIME_FORMAT, - GST_TIME_ARGS (first_ts)); - /* add EDTSs for late streams */ - for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) { - GstCollectData *cdata = (GstCollectData *) walk->data; - GstQTPad *qtpad = (GstQTPad *) cdata; - guint32 lateness; - guint32 duration; - if (GST_CLOCK_TIME_IS_VALID (qtpad->first_ts) && qtpad->first_ts > first_ts) { - GST_DEBUG_OBJECT (qtmux, "Pad %s is a late stream by %" GST_TIME_FORMAT, - GST_PAD_NAME (qtpad->collect.pad), - GST_TIME_ARGS (qtpad->first_ts - first_ts)); - lateness = gst_util_uint64_scale_round (qtpad->first_ts - first_ts, - timescale, GST_SECOND); - duration = qtpad->trak->tkhd.duration; - atom_trak_add_elst_entry (qtpad->trak, lateness, (guint32) - 1, - (guint32) (1 * 65536.0)); - atom_trak_add_elst_entry (qtpad->trak, duration, 0, - (guint32) (1 * 65536.0)); + /* Moov-at-end or fast-start mode from here down */ + gst_qt_mux_configure_moov (qtmux); - /* need to add the empty time to the trak duration */ - qtpad->trak->tkhd.duration += lateness; - } - } + gst_qt_mux_update_edit_lists (qtmux); /* tags into file metadata */ gst_qt_mux_setup_metadata (qtmux); large_file = (qtmux->mdat_size > MDAT_LARGE_FILE_LIMIT); - /* if faststart, update the offset of the atoms in the movie with the offset - * that the movie headers before mdat will cause. - * Also, send the ftyp */ - if (qtmux->fast_start_file) { - GstFlowReturn flow_ret; - offset = size = 0; - flow_ret = gst_qt_mux_prepare_and_send_ftyp (qtmux); - if (flow_ret != GST_FLOW_OK) { - goto ftyp_error; - } - /* copy into NULL to obtain size */ - if (!atom_moov_copy_data (qtmux->moov, NULL, &size, &offset)) - goto serialize_error; - GST_DEBUG_OBJECT (qtmux, "calculated moov atom size %" G_GUINT64_FORMAT, - offset); - offset += qtmux->header_size + (large_file ? 16 : 8); + switch (qtmux->mux_mode) { + case GST_QT_MUX_MODE_FAST_START:{ + /* if faststart, update the offset of the atoms in the movie with the offset + * that the movie headers before mdat will cause. + * Also, send the ftyp */ + offset = size = 0; + + ret = gst_qt_mux_prepare_and_send_ftyp (qtmux); + if (ret != GST_FLOW_OK) { + goto ftyp_error; + } + /* copy into NULL to obtain size */ + if (!atom_moov_copy_data (qtmux->moov, NULL, &size, &offset)) + goto serialize_error; + GST_DEBUG_OBJECT (qtmux, "calculated moov atom size %" G_GUINT64_FORMAT, + offset); + offset += qtmux->header_size + (large_file ? 16 : 8); - /* sum up with the extra atoms size */ - ret = gst_qt_mux_send_extra_atoms (qtmux, FALSE, &offset, FALSE); - if (ret != GST_FLOW_OK) - return ret; - } else { - offset = qtmux->header_size; + /* sum up with the extra atoms size */ + ret = gst_qt_mux_send_extra_atoms (qtmux, FALSE, &offset, FALSE); + if (ret != GST_FLOW_OK) + return ret; + break; + } + default: + offset = qtmux->header_size; + break; } - atom_moov_chunks_add_offset (qtmux->moov, offset); - /* moov */ + /* Now that we know the size of moov + extra atoms, we can adjust + * the chunk offsets stored into the moov */ + atom_moov_chunks_set_offset (qtmux->moov, offset); + + /* write out moov and extra atoms */ /* note: as of this point, we no longer care about tracking written data size, * since there is no more use for it anyway */ - ret = gst_qt_mux_send_moov (qtmux, NULL, FALSE); + ret = gst_qt_mux_send_moov (qtmux, NULL, 0, FALSE, FALSE); if (ret != GST_FLOW_OK) return ret; @@ -2049,23 +2625,32 @@ if (ret != GST_FLOW_OK) return ret; - /* if needed, send mdat atom and move buffered data into it */ - if (qtmux->fast_start_file) { - /* mdat_size = accumulated (buffered data) */ - ret = gst_qt_mux_send_mdat_header (qtmux, NULL, qtmux->mdat_size, - large_file); - if (ret != GST_FLOW_OK) - return ret; - ret = gst_qt_mux_send_buffered_data (qtmux, NULL); - if (ret != GST_FLOW_OK) - return ret; - } else if (!qtmux->streamable) { - /* mdat needs update iff not using faststart */ - GST_DEBUG_OBJECT (qtmux, "updating mdat size"); - ret = gst_qt_mux_update_mdat_size (qtmux, qtmux->mdat_pos, - qtmux->mdat_size, NULL); - /* note; no seeking back to the end of file is done, - * since we no longer write anything anyway */ + switch (qtmux->mux_mode) { + case GST_QT_MUX_MODE_MOOV_AT_END: + { + /* mdat needs update iff not using faststart */ + GST_DEBUG_OBJECT (qtmux, "updating mdat size"); + ret = gst_qt_mux_update_mdat_size (qtmux, qtmux->mdat_pos, + qtmux->mdat_size, NULL, FALSE); + /* note; no seeking back to the end of file is done, + * since we no longer write anything anyway */ + break; + } + case GST_QT_MUX_MODE_FAST_START: + { + /* send mdat atom and move buffered data into it */ + /* mdat_size = accumulated (buffered data) */ + ret = gst_qt_mux_send_mdat_header (qtmux, NULL, qtmux->mdat_size, + large_file, FALSE); + if (ret != GST_FLOW_OK) + return ret; + ret = gst_qt_mux_send_buffered_data (qtmux, NULL); + if (ret != GST_FLOW_OK) + return ret; + break; + } + default: + g_assert_not_reached (); } return ret; @@ -2131,7 +2716,7 @@ atom_array_get_len (&pad->fragment_buffers), total_size); if (ret == GST_FLOW_OK) ret = gst_qt_mux_send_mdat_header (qtmux, &qtmux->header_size, total_size, - FALSE); + FALSE, FALSE); for (i = 0; i < atom_array_get_len (&pad->fragment_buffers); i++) { if (G_LIKELY (ret == GST_FLOW_OK)) ret = gst_qt_mux_send_buffer (qtmux, @@ -2180,26 +2765,179 @@ return ret; } -static void -check_and_subtract_ts (GstQTMux * qtmux, GstClockTime * ts_a, GstClockTime ts_b) +/* Here's the clever bit of robust recording: Updating the moov + * header is done using a ping-pong scheme inside 2 blocks of size + * 'reserved_moov_size' at the start of the file, in such a way that the + * file on-disk is always valid if interrupted. + * Inside the reserved space, we have 2 pairs of free + moov atoms + * (in that order), free-A + moov-A @ offset 0 and free-B + moov-B at + * at offset "reserved_moov_size". + * + * 1. Free-A has 0 size payload, moov-A immediately after is + * active/current, and is padded with an internal Free atom to + * end at reserved_space/2. Free-B is at reserved_space/2, sized + * to cover the remaining free space (including moov-B). + * 2. We write moov-B (which is invisible inside free-B), and pad it to + * end at the end of free space. Then, we update free-A to size + * reserved_space/2 + sizeof(free-B), which hides moov-A and the + * free-B header, and makes moov-B active. + * 3. Rewrite moov-A inside free-A, with padding out to free-B. + * Change the size of free-A to make moov-A active again. + * 4. Rinse and repeat. + * + */ +static GstFlowReturn +gst_qt_mux_robust_recording_rewrite_moov (GstQTMux * qtmux) { - if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (*ts_a))) { - if (G_LIKELY (*ts_a >= ts_b)) { - *ts_a -= ts_b; - } else { - *ts_a = 0; - GST_WARNING_OBJECT (qtmux, "Subtraction would result in negative value, " - "using 0 as result"); - } + GstSegment segment; + GstFlowReturn ret; + guint64 freeA_offset; + guint32 new_freeA_size; + guint64 new_moov_offset; + + /* Update moov info, then seek and rewrite the MOOV atom */ + gst_qt_mux_update_global_statistics (qtmux); + gst_qt_mux_configure_moov (qtmux); + + gst_qt_mux_update_edit_lists (qtmux); + + /* tags into file metadata */ + gst_qt_mux_setup_metadata (qtmux); + + /* chunks position is set relative to the first byte of the + * MDAT atom payload. Set the overall offset into the file */ + atom_moov_chunks_set_offset (qtmux->moov, qtmux->header_size); + + /* Calculate which moov to rewrite. qtmux->moov_pos points to + * the start of the free-A header */ + freeA_offset = qtmux->moov_pos; + if (qtmux->reserved_moov_first_active) { + GST_DEBUG_OBJECT (qtmux, "Updating pong moov header"); + /* After this, freeA will include itself, moovA, plus the freeB + * header */ + new_freeA_size = qtmux->reserved_moov_size + 16; + } else { + GST_DEBUG_OBJECT (qtmux, "Updating ping moov header"); + new_freeA_size = 8; + } + /* the moov we update is after free-A, calculate its offset */ + new_moov_offset = freeA_offset + new_freeA_size; + + /* Swap ping-pong cadence marker */ + qtmux->reserved_moov_first_active = !qtmux->reserved_moov_first_active; + + /* seek and rewrite the MOOV atom */ + gst_segment_init (&segment, GST_FORMAT_BYTES); + segment.start = new_moov_offset; + gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment)); + + ret = + gst_qt_mux_send_moov (qtmux, NULL, qtmux->reserved_moov_size, FALSE, + TRUE); + if (ret != GST_FLOW_OK) + return ret; + + /* Update the estimated recording space remaining, based on amount used so + * far and duration muxed so far */ + if (qtmux->last_moov_size > qtmux->base_moov_size && qtmux->last_dts > 0) { + GstClockTime remain; + GstClockTime time_muxed = qtmux->last_dts; + + remain = + gst_util_uint64_scale (qtmux->reserved_moov_size - + qtmux->last_moov_size, time_muxed, + qtmux->last_moov_size - qtmux->base_moov_size); + /* Always under-estimate slightly, so users + * have time to stop muxing before we run out */ + if (remain < GST_SECOND / 2) + remain = 0; + else + remain -= GST_SECOND / 2; + + GST_INFO_OBJECT (qtmux, + "Reserved %u header bytes. Used %u in %" GST_TIME_FORMAT + ". Remaining now %u or approx %" G_GUINT64_FORMAT " ns\n", + qtmux->reserved_moov_size, qtmux->last_moov_size, + GST_TIME_ARGS (qtmux->last_dts), + qtmux->reserved_moov_size - qtmux->last_moov_size, remain); + + GST_OBJECT_LOCK (qtmux); + qtmux->reserved_duration_remaining = remain; + qtmux->muxed_since_last_update = 0; + GST_DEBUG_OBJECT (qtmux, "reserved remaining duration now %" + G_GUINT64_FORMAT, qtmux->reserved_duration_remaining); + GST_OBJECT_UNLOCK (qtmux); } + + + /* Now update the moov-A size. Don't pass offset, since we don't need + * send_free_atom() to seek for us - all our callers seek back to + * where they need after this, or they don't need it */ + gst_segment_init (&segment, GST_FORMAT_BYTES); + segment.start = freeA_offset; + gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment)); + + ret = gst_qt_mux_send_free_atom (qtmux, NULL, new_freeA_size, TRUE); + + return ret; } +static GstFlowReturn +gst_qt_mux_robust_recording_update (GstQTMux * qtmux, GstClockTime position) +{ + GstSegment segment; + GstFlowReturn flow_ret; + + guint64 mdat_offset = qtmux->mdat_pos + 16 + qtmux->mdat_size; + + GST_OBJECT_LOCK (qtmux); + if (qtmux->reserved_moov_update_period == GST_CLOCK_TIME_NONE) { + GST_OBJECT_UNLOCK (qtmux); + return GST_FLOW_OK; + } + + /* Update if position is > the threshold or there's been no update yet */ + if (qtmux->last_moov_update != GST_CLOCK_TIME_NONE && + (position <= qtmux->last_moov_update || + (position - qtmux->last_moov_update) < + qtmux->reserved_moov_update_period)) { + /* Update the offset of how much we've muxed, so the + * report of remaining space keeps counting down */ + if (position > qtmux->last_moov_update && + position - qtmux->last_moov_update > qtmux->muxed_since_last_update) { + GST_LOG_OBJECT (qtmux, + "Muxed time %" G_GUINT64_FORMAT " since last moov update", + qtmux->muxed_since_last_update); + qtmux->muxed_since_last_update = position - qtmux->last_moov_update; + } + GST_OBJECT_UNLOCK (qtmux); + return GST_FLOW_OK; /* No update needed yet */ + } + + qtmux->last_moov_update = position; + GST_OBJECT_UNLOCK (qtmux); + + GST_DEBUG_OBJECT (qtmux, "Update moov atom, position %" GST_TIME_FORMAT + " mdat starts @ %" G_GUINT64_FORMAT " we were a %" G_GUINT64_FORMAT, + GST_TIME_ARGS (position), qtmux->mdat_pos, mdat_offset); + + flow_ret = gst_qt_mux_robust_recording_rewrite_moov (qtmux); + if (G_UNLIKELY (flow_ret != GST_FLOW_OK)) + return flow_ret; + + /* Seek back to previous position */ + gst_segment_init (&segment, GST_FORMAT_BYTES); + segment.start = mdat_offset; + gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment)); + + return flow_ret; +} static GstFlowReturn gst_qt_mux_register_and_push_sample (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buffer, gboolean is_last_buffer, guint nsamples, gint64 last_dts, gint64 scaled_duration, guint sample_size, - guint chunk_offset, gboolean sync, gboolean do_pts, gint64 pts_offset) + guint64 chunk_offset, gboolean sync, gboolean do_pts, gint64 pts_offset) { GstFlowReturn ret = GST_FLOW_OK; @@ -2215,15 +2953,25 @@ } } - if (qtmux->fragment_sequence) { - /* ensure that always sync samples are marked as such */ - ret = gst_qt_mux_pad_fragment_add_buffer (qtmux, pad, buffer, - is_last_buffer, nsamples, last_dts, (gint32) scaled_duration, - sample_size, !pad->sync || sync, pts_offset); - } else { - atom_trak_add_samples (pad->trak, nsamples, (gint32) scaled_duration, - sample_size, chunk_offset, sync, pts_offset); - ret = gst_qt_mux_send_buffer (qtmux, buffer, &qtmux->mdat_size, TRUE); + switch (qtmux->mux_mode) { + case GST_QT_MUX_MODE_MOOV_AT_END: + case GST_QT_MUX_MODE_FAST_START: + case GST_QT_MUX_MODE_ROBUST_RECORDING: + atom_trak_add_samples (pad->trak, nsamples, (gint32) scaled_duration, + sample_size, chunk_offset, sync, pts_offset); + ret = gst_qt_mux_send_buffer (qtmux, buffer, &qtmux->mdat_size, TRUE); + /* Check if it's time to re-write the headers in robust-recording mode */ + if (ret == GST_FLOW_OK + && qtmux->mux_mode == GST_QT_MUX_MODE_ROBUST_RECORDING) + ret = gst_qt_mux_robust_recording_update (qtmux, pad->total_duration); + break; + case GST_QT_MUX_MODE_FRAGMENTED: + case GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE: + /* ensure that always sync samples are marked as such */ + ret = gst_qt_mux_pad_fragment_add_buffer (qtmux, pad, buffer, + is_last_buffer, nsamples, last_dts, (gint32) scaled_duration, + sample_size, !pad->sync || sync, pts_offset); + break; } return ret; @@ -2241,7 +2989,7 @@ guint64 chunk_offset; gint64 last_dts, scaled_duration; gint64 pts_offset = 0; - gboolean sync = FALSE, do_pts = FALSE; + gboolean sync = FALSE; GstFlowReturn ret = GST_FLOW_OK; if (!pad->fourcc) @@ -2252,37 +3000,27 @@ buf = pad->prepare_buf_func (pad, buf, qtmux); } - if (G_LIKELY (buf != NULL && GST_CLOCK_TIME_IS_VALID (pad->first_ts) && - pad->first_ts != 0)) { - buf = gst_buffer_make_writable (buf); - check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (buf), pad->first_ts); - check_and_subtract_ts (qtmux, &GST_BUFFER_PTS (buf), pad->first_ts); - } - last_buf = pad->last_buf; - /* if buffer has missing DTS, we take either segment start or previous buffer end time, - which ever is later */ - if (buf && !GST_BUFFER_DTS_IS_VALID (buf)) { + /* DTS delta is used to calculate sample duration. + * If buffer has missing DTS, we take either segment start or + * previous buffer end time, whichever is later. + * This must only be done for non sparse streams, sparse streams + * can have gaps between buffers (which is handled later by adding + * extra empty buffer with duration that fills the gap). */ + if (!pad->sparse && buf && !GST_BUFFER_DTS_IS_VALID (buf)) { GstClockTime last_buf_duration = last_buf && GST_BUFFER_DURATION_IS_VALID (last_buf) ? GST_BUFFER_DURATION (last_buf) : 0; buf = gst_buffer_make_writable (buf); - GST_BUFFER_DTS (buf) = - gst_segment_to_running_time (&pad->collect.segment, GST_FORMAT_TIME, - pad->collect.segment.start); - if (GST_CLOCK_TIME_IS_VALID (pad->first_ts)) - check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (buf), pad->first_ts); + GST_BUFFER_DTS (buf) = 0; /* running-time 0 */ if (last_buf && (GST_BUFFER_DTS (last_buf) + last_buf_duration) > GST_BUFFER_DTS (buf)) { GST_BUFFER_DTS (buf) = GST_BUFFER_DTS (last_buf) + last_buf_duration; } - - if (GST_BUFFER_PTS_IS_VALID (buf)) - GST_BUFFER_DTS (buf) = MIN (GST_BUFFER_DTS (buf), GST_BUFFER_PTS (buf)); } if (last_buf && !buf && !GST_BUFFER_DURATION_IS_VALID (last_buf)) { @@ -2310,32 +3048,28 @@ /* if this is the first buffer, store the timestamp */ if (G_UNLIKELY (pad->first_ts == GST_CLOCK_TIME_NONE) && last_buf) { - if (GST_BUFFER_DTS_IS_VALID (last_buf)) { - /* first pad always has DTS. If it was not provided by upstream it was set to segment start */ + if (GST_BUFFER_PTS_IS_VALID (last_buf)) { + pad->first_ts = GST_BUFFER_PTS (last_buf); + } else if (GST_BUFFER_DTS_IS_VALID (last_buf)) { pad->first_ts = GST_BUFFER_DTS (last_buf); + } + + if (GST_BUFFER_DTS_IS_VALID (last_buf)) { + pad->first_dts = pad->last_dts = GST_BUFFER_DTS (last_buf); } else if (GST_BUFFER_PTS_IS_VALID (last_buf)) { - pad->first_ts = GST_BUFFER_PTS (last_buf); + pad->first_dts = pad->last_dts = GST_BUFFER_PTS (last_buf); } if (GST_CLOCK_TIME_IS_VALID (pad->first_ts)) { GST_DEBUG ("setting first_ts to %" G_GUINT64_FORMAT, pad->first_ts); - last_buf = gst_buffer_make_writable (last_buf); - check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (last_buf), pad->first_ts); - check_and_subtract_ts (qtmux, &GST_BUFFER_PTS (last_buf), pad->first_ts); - if (buf) { - buf = gst_buffer_make_writable (buf); - check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (buf), pad->first_ts); - check_and_subtract_ts (qtmux, &GST_BUFFER_PTS (buf), pad->first_ts); - } } else { - GST_ERROR_OBJECT (qtmux, "First buffer for pad %s has no timestamp, " + GST_WARNING_OBJECT (qtmux, "First buffer for pad %s has no timestamp, " "using 0 as first timestamp", GST_PAD_NAME (pad->collect.pad)); - pad->first_ts = 0; + pad->first_ts = pad->first_dts = 0; } GST_DEBUG_OBJECT (qtmux, "Stored first timestamp for pad %s %" GST_TIME_FORMAT, GST_PAD_NAME (pad->collect.pad), GST_TIME_ARGS (pad->first_ts)); - } if (last_buf && buf && GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (buf)) && @@ -2446,7 +3180,6 @@ } if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (last_buf))) { - do_pts = TRUE; last_dts = gst_util_uint64_scale_round (GST_BUFFER_DTS (last_buf), atom_trak_get_timescale (pad->trak), GST_SECOND); pts_offset = @@ -2455,7 +3188,6 @@ } else { pts_offset = 0; - do_pts = TRUE; last_dts = gst_util_uint64_scale_round (GST_BUFFER_PTS (last_buf), atom_trak_get_timescale (pad->trak), GST_SECOND); } @@ -2479,7 +3211,7 @@ /* now we go and register this buffer/sample all over */ ret = gst_qt_mux_register_and_push_sample (qtmux, pad, last_buf, buf == NULL, nsamples, last_dts, scaled_duration, sample_size, - chunk_offset, sync, do_pts, pts_offset); + chunk_offset, sync, TRUE, pts_offset); /* if this is sparse and we have a next buffer, check if there is any gap * between them to insert an empty sample */ @@ -2502,7 +3234,7 @@ ret = gst_qt_mux_register_and_push_sample (qtmux, pad, empty_buf, FALSE, 1, last_dts + scaled_duration, empty_duration_scaled, - gst_buffer_get_size (empty_buf), qtmux->mdat_size, sync, do_pts, 0); + gst_buffer_get_size (empty_buf), qtmux->mdat_size, sync, TRUE, 0); } else { /* our only case currently is tx3g subtitles, so there is no reason to fill this yet */ g_assert_not_reached (); @@ -2544,6 +3276,57 @@ } } +/* + * DTS running time can be negative. There is no way to represent that in + * MP4 however, thus we need to offset DTS so that it starts from 0. + */ +static void +gst_qt_pad_adjust_buffer_dts (GstQTMux * qtmux, GstQTPad * pad, + GstCollectData * cdata, GstBuffer ** buf) +{ + GstClockTime pts; + gint64 dts; + + pts = GST_BUFFER_PTS (*buf); + dts = GST_COLLECT_PADS_DTS (cdata); + + GST_LOG_OBJECT (qtmux, "selected pad %s with PTS %" GST_TIME_FORMAT + " and DTS %" GST_STIME_FORMAT, GST_PAD_NAME (cdata->pad), + GST_TIME_ARGS (pts), GST_STIME_ARGS (dts)); + + if (!GST_CLOCK_TIME_IS_VALID (pad->dts_adjustment)) { + if (GST_CLOCK_STIME_IS_VALID (dts) && dts < 0) + pad->dts_adjustment = -dts; + else + pad->dts_adjustment = 0; + } + + if (pad->dts_adjustment > 0) { + *buf = gst_buffer_make_writable (*buf); + + dts += pad->dts_adjustment; + + if (GST_CLOCK_TIME_IS_VALID (pts)) + pts += pad->dts_adjustment; + + if (GST_CLOCK_STIME_IS_VALID (dts) && dts < 0) { + GST_WARNING_OBJECT (pad, "Decreasing DTS."); + dts = 0; + } + + if (pts < dts) { + GST_WARNING_OBJECT (pad, "DTS is bigger then PTS"); + pts = dts; + } + + GST_BUFFER_PTS (*buf) = pts; + GST_BUFFER_DTS (*buf) = dts; + + GST_LOG_OBJECT (qtmux, "time adjusted to PTS %" GST_TIME_FORMAT + " and DTS %" GST_TIME_FORMAT, GST_TIME_ARGS (pts), GST_TIME_ARGS (dts)); + } +} + static GstFlowReturn gst_qt_mux_handle_buffer (GstCollectPads * pads, GstCollectData * cdata, GstBuffer * buf, gpointer user_data) @@ -2551,13 +3334,12 @@ GstFlowReturn ret = GST_FLOW_OK; GstQTMux *qtmux = GST_QT_MUX_CAST (user_data); GstQTPad *best_pad = NULL; - GstClockTime best_time = GST_CLOCK_TIME_NONE; if (G_UNLIKELY (qtmux->state == GST_QT_MUX_STATE_STARTED)) { if ((ret = gst_qt_mux_start_file (qtmux)) != GST_FLOW_OK) return ret; - else - qtmux->state = GST_QT_MUX_STATE_DATA; + + qtmux->state = GST_QT_MUX_STATE_DATA; } if (G_UNLIKELY (qtmux->state == GST_QT_MUX_STATE_EOS)) @@ -2568,11 +3350,10 @@ /* clipping already converted to running time */ if (best_pad != NULL) { g_assert (buf); - best_time = GST_BUFFER_PTS (buf); - GST_LOG_OBJECT (qtmux, "selected pad %s with time %" GST_TIME_FORMAT, - GST_PAD_NAME (best_pad->collect.pad), GST_TIME_ARGS (best_time)); + gst_qt_pad_adjust_buffer_dts (qtmux, best_pad, cdata, &buf); ret = gst_qt_mux_add_buffer (qtmux, best_pad, buf); } else { + qtmux->state = GST_QT_MUX_STATE_EOS; ret = gst_qt_mux_stop_file (qtmux); if (ret == GST_FLOW_OK) { GST_DEBUG_OBJECT (qtmux, "Pushing eos"); @@ -2582,7 +3363,6 @@ GST_WARNING_OBJECT (qtmux, "Failed to stop file: %s", gst_flow_get_name (ret)); } - qtmux->state = GST_QT_MUX_STATE_EOS; } return ret; @@ -2777,6 +3557,8 @@ entry.fourcc = FOURCC_sowt; else if (info.finfo->endianness == G_BIG_ENDIAN) entry.fourcc = FOURCC_twos; + else + entry.fourcc = FOURCC_sowt; /* maximum backward compatibility; only new version for > 16 bit */ if (info.finfo->depth <= 16) entry.version = 0; @@ -2851,7 +3633,8 @@ if (GST_READ_UINT32_LE (map.data + 4) == FOURCC_alac) { len -= 8; codec_config = - gst_buffer_copy_region ((GstBuffer *) codec_data, 0, 8, len); + gst_buffer_copy_region ((GstBuffer *) codec_data, + GST_BUFFER_COPY_MEMORY, 8, len); } else { codec_config = gst_buffer_ref ((GstBuffer *) codec_data); } @@ -2870,6 +3653,18 @@ entry.samples_per_packet = GST_READ_UINT32_BE (map.data + 4); gst_buffer_unmap (codec_config, &map); gst_buffer_unref (codec_config); + } else if (strcmp (mimetype, "audio/x-ac3") == 0) { + entry.fourcc = FOURCC_ac_3; + + /* Fixed values according to TS 102 366 but it also mentions that + * they should be ignored */ + entry.channels = 2; + entry.sample_size = 16; + + /* AC-3 needs an extension atom but its data can only be obtained from + * the stream itself. Abuse the prepare_buf_func so we parse a frame + * and get the needed data */ + qtpad->prepare_buf_func = gst_qt_mux_prepare_parse_ac3_frame; } if (!entry.fourcc) @@ -2878,7 +3673,9 @@ /* ok, set the pad info accordingly */ qtpad->fourcc = entry.fourcc; qtpad->sample_size = constant_size; - atom_trak_set_audio_type (qtpad->trak, qtmux->context, &entry, + qtpad->trak_ste = + (SampleTableEntry *) atom_trak_set_audio_type (qtpad->trak, + qtmux->context, &entry, qtmux->trak_timescale ? qtmux->trak_timescale : entry.sample_rate, ext_atom, constant_size); @@ -3029,6 +3826,13 @@ entry.depth = depth; sync = FALSE; break; + case GST_VIDEO_FORMAT_v210: + if (depth == -1) + depth = 24; + entry.fourcc = FOURCC_v210; + entry.depth = depth; + sync = FALSE; + break; default: if (GST_VIDEO_FORMAT_INFO_FLAGS (vinfo) & GST_VIDEO_FORMAT_FLAG_RGB) { entry.fourcc = FOURCC_raw_; @@ -3224,6 +4028,18 @@ gst_structure_get_uint (structure, "format", &fourcc); entry.fourcc = fourcc; + } else if (strcmp (mimetype, "video/x-prores") == 0) { + const gchar *variant; + + variant = gst_structure_get_string (structure, "format"); + if (!variant || !g_strcmp0 (variant, "standard")) + entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'n'); + else if (!g_strcmp0 (variant, "lt")) + entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 's'); + else if (!g_strcmp0 (variant, "hq")) + entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'h'); + else if (!g_strcmp0 (variant, "proxy")) + entry.fourcc = GST_MAKE_FOURCC ('a', 'p', '4', 'h'); } if (!entry.fourcc) @@ -3232,8 +4048,9 @@ /* ok, set the pad info accordingly */ qtpad->fourcc = entry.fourcc; qtpad->sync = sync; - atom_trak_set_video_type (qtpad->trak, qtmux->context, &entry, rate, - ext_atom_list); + qtpad->trak_ste = + (SampleTableEntry *) atom_trak_set_video_type (qtpad->trak, + qtmux->context, &entry, rate, ext_atom_list); gst_object_unref (qtmux); return TRUE; @@ -3264,8 +4081,6 @@ GstStructure *structure; SubtitleSampleEntry entry = { 0, }; - qtpad->prepare_buf_func = NULL; - /* does not go well to renegotiate stream mid-way, unless * the old caps are a subset of the new one (this means upstream * added more info to the caps, as both should be 'fixed' caps) */ @@ -3310,7 +4125,9 @@ goto refuse_caps; qtpad->fourcc = entry.fourcc; - atom_trak_set_subtitle_type (qtpad->trak, qtmux->context, &entry); + qtpad->trak_ste = + (SampleTableEntry *) atom_trak_set_subtitle_type (qtpad->trak, + qtmux->context, &entry); gst_object_unref (qtmux); return TRUE; @@ -3366,15 +4183,25 @@ GstTagSetter *setter = GST_TAG_SETTER (qtmux); GstTagMergeMode mode; gchar *code; + GstQTPad *collect_pad; GST_OBJECT_LOCK (qtmux); mode = gst_tag_setter_get_tag_merge_mode (setter); + collect_pad = (GstQTPad *) gst_pad_get_element_private (pad); gst_event_parse_tag (event, &list); GST_DEBUG_OBJECT (qtmux, "received tag event on pad %s:%s : %" GST_PTR_FORMAT, GST_DEBUG_PAD_NAME (pad), list); - gst_tag_setter_merge_tags (setter, list, mode); + if (gst_tag_list_get_scope (list) == GST_TAG_SCOPE_GLOBAL) { + gst_tag_setter_merge_tags (setter, list, mode); + qtmux->tags_changed = TRUE; + } else { + if (!collect_pad->tags) + collect_pad->tags = gst_tag_list_new_empty (); + gst_tag_list_insert (collect_pad->tags, list, mode); + collect_pad->tags_changed = TRUE; + } GST_OBJECT_UNLOCK (qtmux); if (gst_tag_list_get_uint (list, GST_TAG_BITRATE, &avg_bitrate) | @@ -3451,6 +4278,7 @@ GstQTPadSetCapsFunc setcaps_func; gchar *name; gint pad_id; + gboolean lock = TRUE; if (templ->direction != GST_PAD_SINK) goto wrong_direction; @@ -3479,6 +4307,7 @@ } else { name = g_strdup_printf ("subtitle_%u", qtmux->subtitle_pads++); } + lock = FALSE; } else goto wrong_template; @@ -3489,7 +4318,7 @@ g_free (name); collect_pad = (GstQTPad *) gst_collect_pads_add_pad (qtmux->collect, newpad, sizeof (GstQTPad), - (GstCollectDataDestroyNotify) (gst_qt_mux_pad_reset), TRUE); + (GstCollectDataDestroyNotify) (gst_qt_mux_pad_reset), lock); /* set up pad */ gst_qt_mux_pad_reset (collect_pad); collect_pad->trak = atom_trak_new (qtmux->context); @@ -3560,6 +4389,34 @@ case PROP_STREAMABLE: g_value_set_boolean (value, qtmux->streamable); break; + case PROP_RESERVED_MAX_DURATION: + g_value_set_uint64 (value, qtmux->reserved_max_duration); + break; + case PROP_RESERVED_DURATION_REMAINING: + if (qtmux->reserved_duration_remaining == GST_CLOCK_TIME_NONE) + g_value_set_uint64 (value, qtmux->reserved_max_duration); + else { + GstClockTime remaining = qtmux->reserved_duration_remaining; + + /* Report the remaining space as the calculated remaining, minus + * however much we've muxed since the last update */ + if (remaining > qtmux->muxed_since_last_update) + remaining -= qtmux->muxed_since_last_update; + else + remaining = 0; + GST_LOG_OBJECT (qtmux, "reserved duration remaining - reporting %" + G_GUINT64_FORMAT "(%" G_GUINT64_FORMAT " - %" G_GUINT64_FORMAT, + remaining, qtmux->reserved_duration_remaining, + qtmux->muxed_since_last_update); + g_value_set_uint64 (value, remaining); + } + break; + case PROP_RESERVED_MOOV_UPDATE_PERIOD: + g_value_set_uint64 (value, qtmux->reserved_moov_update_period); + break; + case PROP_RESERVED_BYTES_PER_SEC: + g_value_set_uint (value, qtmux->reserved_bytes_per_sec_per_trak); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -3628,6 +4485,15 @@ } break; } + case PROP_RESERVED_MAX_DURATION: + qtmux->reserved_max_duration = g_value_get_uint64 (value); + break; + case PROP_RESERVED_MOOV_UPDATE_PERIOD: + qtmux->reserved_moov_update_period = g_value_get_uint64 (value); + break; + case PROP_RESERVED_BYTES_PER_SEC: + qtmux->reserved_bytes_per_sec_per_trak = g_value_get_uint (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/gstqtmux.h gst-plugins-good1.0-1.6.1/gst/isomp4/gstqtmux.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/gstqtmux.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/gstqtmux.h 2015-10-22 08:02:54.000000000 +0000 @@ -109,15 +109,21 @@ /* dts of last_buf */ GstClockTime last_dts; + /* This is compensate for CTTS */ + GstClockTime dts_adjustment; + /* store the first timestamp for comparing with other streams and * know if there are late streams */ GstClockTime first_ts; + GstClockTime first_dts; + guint buf_head; guint buf_tail; /* all the atom and chunk book-keeping is delegated here * unowned/uncounted reference, parent MOOV owns */ AtomTRAK *trak; + SampleTableEntry *trak_ste; /* fragmented support */ /* meta data book-keeping delegated here */ AtomTRAF *traf; @@ -128,6 +134,11 @@ /* optional fragment index book-keeping */ AtomTFRA *tfra; + /* Set when tags are received, cleared when written to moov */ + gboolean tags_changed; + + GstTagList *tags; + /* if nothing is set, it won't be called */ GstQTPadPrepareBufferFunc prepare_buf_func; GstQTPadSetCapsFunc set_caps; @@ -142,6 +153,14 @@ GST_QT_MUX_STATE_EOS } GstQTMuxState; +typedef enum _GstQtMuxMode { + GST_QT_MUX_MODE_MOOV_AT_END, + GST_QT_MUX_MODE_FRAGMENTED, + GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE, + GST_QT_MUX_MODE_FAST_START, + GST_QT_MUX_MODE_ROBUST_RECORDING +} GstQtMuxMode; + struct _GstQTMux { GstElement element; @@ -153,16 +172,29 @@ /* state */ GstQTMuxState state; - /* size of header (prefix, atoms (ftyp, mdat)) */ + /* Mux mode, inferred from property + * set in gst_qt_mux_start_file() */ + GstQtMuxMode mux_mode; + + /* size of header (prefix, atoms (ftyp, possibly moov, mdat header)) */ guint64 header_size; - /* accumulated size of raw media data (a priori not including mdat header) */ + /* accumulated size of raw media data (not including mdat header) */ guint64 mdat_size; - /* position of mdat atom (for later updating) */ + /* position of the moov (for fragmented mode) or reserved moov atom + * area (for robust-muxing mode) */ + guint64 moov_pos; + /* position of mdat atom header (for later updating of size) in + * moov-at-end, fragmented and robust-muxing modes */ guint64 mdat_pos; /* keep track of the largest chunk to fine-tune brands */ GstClockTime longest_chunk; + /* Earliest timestamp across all pads/traks */ + GstClockTime first_ts; + /* Last DTS across all pads (= duration) */ + GstClockTime last_dts; + /* atom helper objects */ AtomsContext *context; AtomFTYP *ftyp; @@ -170,6 +202,10 @@ GSList *extra_atoms; /* list of extra top-level atoms (e.g. UUID for xmp) * Stored as AtomInfo structs */ + /* Set when tags are received, cleared when written to moov */ + gboolean tags_changed; + + /* fragmented file index */ AtomMFRA *mfra; @@ -194,8 +230,35 @@ gchar *fast_start_file_path; gchar *moov_recov_file_path; guint32 fragment_duration; + /* Whether or not to work in 'streamable' mode and not + * seek to rewrite headers - only valid for fragmented + * mode. */ gboolean streamable; + /* Requested target maximum duration */ + GstClockTime reserved_max_duration; + /* Estimate of remaining reserved header space (in ns of recording) */ + GstClockTime reserved_duration_remaining; + /* Multiplier for conversion from reserved_max_duration to bytes */ + guint reserved_bytes_per_sec_per_trak; + + /* Reserved minimum MOOV size in bytes + * This is converted from reserved_max_duration + * using the bytes/trak/sec estimate */ + guint32 reserved_moov_size; + /* Basic size of the moov (static headers + tags) */ + guint32 base_moov_size; + /* Size of the most recently generated moov header */ + guint32 last_moov_size; + /* True if the first moov in the ping-pong buffers + * is the active one. See gst_qt_mux_robust_recording_rewrite_moov() */ + gboolean reserved_moov_first_active; + + /* Tracking of periodic MOOV updates */ + GstClockTime last_moov_update; + GstClockTime reserved_moov_update_period; + GstClockTime muxed_since_last_update; + /* for request pad naming */ guint video_pads, audio_pads, subtitle_pads; }; diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/gstqtmuxmap.c gst-plugins-good1.0-1.6.1/gst/isomp4/gstqtmuxmap.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/gstqtmuxmap.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/gstqtmuxmap.c 2015-10-30 12:10:05.000000000 +0000 @@ -47,12 +47,12 @@ /* static info related to various format */ #define COMMON_VIDEO_CAPS \ - "width = (int) [ 16, 4096 ], " \ - "height = (int) [ 16, 4096 ]" + "width = (int) [ 16, MAX ], " \ + "height = (int) [ 16, MAX ]" #define COMMON_VIDEO_CAPS_NO_FRAMERATE \ - "width = (int) [ 16, 4096 ], " \ - "height = (int) [ 16, 4096 ] " + "width = (int) [ 16, MAX ], " \ + "height = (int) [ 16, MAX ] " #define H263_CAPS \ "video/x-h263, " \ @@ -73,6 +73,10 @@ "divxversion = (int) 5, "\ COMMON_VIDEO_CAPS +#define PRORES_CAPS \ + "video/x-prores, variant = (string) {standard, lt, hq, proxy}, " \ + COMMON_VIDEO_CAPS + #define SVQ_CAPS \ "video/x-svq, " \ "svqversion = (int) 3, " \ @@ -93,15 +97,11 @@ COMMON_AUDIO_CAPS (2, MAX) #define PCM_CAPS_FULL \ - PCM_CAPS "; " \ "audio/x-raw, " \ - "format = (string) { S24LE, S24BE }, " \ + "format = (string) { S32LE, S32BE, S24LE, S24BE }, " \ "layout = (string) interleaved, " \ COMMON_AUDIO_CAPS (2, MAX) "; " \ - "audio/x-raw, " \ - "format = (string) { S32LE, S32BE }, " \ - "layout = (string) interleaved, " \ - COMMON_AUDIO_CAPS (2, MAX) + PCM_CAPS #define MP3_CAPS \ "audio/mpeg, " \ @@ -115,6 +115,10 @@ "stream-format = (string) raw, " \ COMMON_AUDIO_CAPS (8, MAX) +#define AC3_CAPS \ + "audio/x-ac3, " \ + COMMON_AUDIO_CAPS (6, MAX) + #define AMR_CAPS \ "audio/AMR, " \ "rate = (int) 8000, " \ @@ -149,9 +153,10 @@ GST_STATIC_CAPS ("video/quicktime, variant = (string) apple; " "video/quicktime"), GST_STATIC_CAPS ("video/x-raw, " - "format = (string) { RGB, UYVY }, " + "format = (string) { RGB, UYVY, v210 }, " COMMON_VIDEO_CAPS "; " MPEG4V_CAPS "; " + PRORES_CAPS "; " H263_CAPS "; " H264_CAPS "; " SVQ_CAPS "; " @@ -184,7 +189,7 @@ GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"), GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";" "video/x-mp4-part," COMMON_VIDEO_CAPS), - GST_STATIC_CAPS (MP3_CAPS "; " AAC_CAPS " ; " ALAC_CAPS), + GST_STATIC_CAPS (MP3_CAPS "; " AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS), GST_STATIC_CAPS (TEXT_UTF8)} , /* Microsoft Smooth Streaming fmp4/isml */ @@ -210,7 +215,7 @@ "Gst3GPPMux", GST_STATIC_CAPS ("video/quicktime, variant = (string) 3gpp"), GST_STATIC_CAPS (H263_CAPS "; " MPEG4V_CAPS "; " H264_CAPS), - GST_STATIC_CAPS (AMR_CAPS "; " MP3_CAPS "; " AAC_CAPS), + GST_STATIC_CAPS (AMR_CAPS "; " MP3_CAPS "; " AAC_CAPS "; " AC3_CAPS), GST_STATIC_CAPS (TEXT_UTF8)} , /* ISO 15444-3: Motion-JPEG-2000 (also ISO base media extension) */ @@ -284,14 +289,15 @@ guint32 * _major, guint32 * _version, GList ** _compatible, AtomMOOV * moov, GstClockTime longest_chunk, gboolean faststart) { - static guint32 qt_brands[] = { 0 }; - static guint32 mp4_brands[] = { FOURCC_mp41, FOURCC_isom, FOURCC_iso2, 0 }; - static guint32 isml_brands[] = { FOURCC_iso2, 0 }; - static guint32 gpp_brands[] = { FOURCC_isom, FOURCC_iso2, 0 }; - static guint32 mjp2_brands[] = { FOURCC_isom, FOURCC_iso2, 0 }; - static guint8 mjp2_prefix[] = + static const guint32 qt_brands[] = { 0 }; + static const guint32 mp4_brands[] = + { FOURCC_mp41, FOURCC_isom, FOURCC_iso2, 0 }; + static const guint32 isml_brands[] = { FOURCC_iso2, 0 }; + static const guint32 gpp_brands[] = { FOURCC_isom, FOURCC_iso2, 0 }; + static const guint32 mjp2_brands[] = { FOURCC_isom, FOURCC_iso2, 0 }; + static const guint8 mjp2_prefix[] = { 0, 0, 0, 12, 'j', 'P', ' ', ' ', 0x0D, 0x0A, 0x87, 0x0A }; - guint32 *comp = NULL; + const guint32 *comp = NULL; guint32 major = 0, version = 0; GstBuffer *prefix = NULL; GList *result = NULL; diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/gstrtpxqtdepay.c gst-plugins-good1.0-1.6.1/gst/isomp4/gstrtpxqtdepay.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/gstrtpxqtdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/gstrtpxqtdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -73,7 +73,7 @@ enum { - ARG_0, + PROP_0, }; static GstStaticPadTemplate gst_rtp_xqt_depay_src_template = diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/Makefile.am gst-plugins-good1.0-1.6.1/gst/isomp4/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/isomp4/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -10,12 +10,12 @@ -lgstrtp-@GST_API_VERSION@ \ -lgsttag-@GST_API_VERSION@ \ -lgstpbutils-@GST_API_VERSION@ \ - $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) $(LIBM) + $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) libgstisomp4_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} libgstisomp4_la_SOURCES = isomp4-plugin.c gstrtpxqtdepay.c \ qtdemux.c qtdemux_types.c qtdemux_dump.c qtdemux_lang.c \ gstqtmux.c gstqtmoovrecover.c atoms.c atomsrecovery.c descriptors.c \ - properties.c gstqtmuxmap.c + properties.c gstqtmuxmap.c gstisoff.c libgstisomp4_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = \ @@ -33,22 +33,9 @@ descriptors.h \ properties.h \ fourcc.h \ + gstisoff.h \ gstqtmuxmap.h EXTRA_DIST = \ gstqtmux-doc.c \ gstqtmux-doc.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstisomp4 -:SHARED libgstisomp4 \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstisomp4_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstisomp4_la_CFLAGS) \ - -:LDFLAGS $(libgstisomp4_la_LDFLAGS) \ - $(libgstisomp4_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/Makefile.in gst-plugins-good1.0-1.6.1/gst/isomp4/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/isomp4/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/isomp4 -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -155,7 +164,7 @@ am__DEPENDENCIES_1 = libgstisomp4_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) am_libgstisomp4_la_OBJECTS = libgstisomp4_la-isomp4-plugin.lo \ libgstisomp4_la-gstrtpxqtdepay.lo libgstisomp4_la-qtdemux.lo \ libgstisomp4_la-qtdemux_types.lo \ @@ -164,7 +173,7 @@ libgstisomp4_la-gstqtmoovrecover.lo libgstisomp4_la-atoms.lo \ libgstisomp4_la-atomsrecovery.lo \ libgstisomp4_la-descriptors.lo libgstisomp4_la-properties.lo \ - libgstisomp4_la-gstqtmuxmap.lo + libgstisomp4_la-gstqtmuxmap.lo libgstisomp4_la-gstisoff.lo libgstisomp4_la_OBJECTS = $(am_libgstisomp4_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -235,6 +244,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -367,9 +377,6 @@ 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@ @@ -487,17 +494,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -550,6 +557,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -572,13 +580,13 @@ -lgstrtp-@GST_API_VERSION@ \ -lgsttag-@GST_API_VERSION@ \ -lgstpbutils-@GST_API_VERSION@ \ - $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) $(LIBM) + $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) libgstisomp4_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} libgstisomp4_la_SOURCES = isomp4-plugin.c gstrtpxqtdepay.c \ qtdemux.c qtdemux_types.c qtdemux_dump.c qtdemux_lang.c \ gstqtmux.c gstqtmoovrecover.c atoms.c atomsrecovery.c descriptors.c \ - properties.c gstqtmuxmap.c + properties.c gstqtmuxmap.c gstisoff.c libgstisomp4_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = \ @@ -596,6 +604,7 @@ descriptors.h \ properties.h \ fourcc.h \ + gstisoff.h \ gstqtmuxmap.h EXTRA_DIST = \ @@ -618,7 +627,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/isomp4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/isomp4/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -684,6 +692,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstisomp4_la-atoms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstisomp4_la-atomsrecovery.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstisomp4_la-descriptors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstisomp4_la-gstisoff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstisomp4_la-gstqtmoovrecover.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstisomp4_la-gstqtmux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstisomp4_la-gstqtmuxmap.Plo@am__quote@ @@ -810,6 +819,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstisomp4_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstisomp4_la_CFLAGS) $(CFLAGS) -c -o libgstisomp4_la-gstqtmuxmap.lo `test -f 'gstqtmuxmap.c' || echo '$(srcdir)/'`gstqtmuxmap.c +libgstisomp4_la-gstisoff.lo: gstisoff.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstisomp4_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstisomp4_la_CFLAGS) $(CFLAGS) -MT libgstisomp4_la-gstisoff.lo -MD -MP -MF $(DEPDIR)/libgstisomp4_la-gstisoff.Tpo -c -o libgstisomp4_la-gstisoff.lo `test -f 'gstisoff.c' || echo '$(srcdir)/'`gstisoff.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstisomp4_la-gstisoff.Tpo $(DEPDIR)/libgstisomp4_la-gstisoff.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstisoff.c' object='libgstisomp4_la-gstisoff.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 $(libgstisomp4_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstisomp4_la_CFLAGS) $(CFLAGS) -c -o libgstisomp4_la-gstisoff.lo `test -f 'gstisoff.c' || echo '$(srcdir)/'`gstisoff.c + mostlyclean-libtool: -rm -f *.lo @@ -1023,20 +1039,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstisomp4 -:SHARED libgstisomp4 \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstisomp4_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstisomp4_la_CFLAGS) \ - -:LDFLAGS $(libgstisomp4_la_LDFLAGS) \ - $(libgstisomp4_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/properties.h gst-plugins-good1.0-1.6.1/gst/isomp4/properties.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/properties.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/properties.h 2015-10-22 08:02:54.000000000 +0000 @@ -46,7 +46,7 @@ #include #include -/** +/* * Functions for copying atoms properties. * * All of them receive, as the input, the property to be copied, the destination diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux.c gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux.c 2014-09-04 09:52:04.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -6,7 +6,10 @@ * Copyright (C) <2009> Tim-Philipp Müller * Copyright (C) <2009> STEricsson * Copyright (C) <2013> Sreerenj Balachandran - * Copyright (C) <2013> Intel Coroporation + * Copyright (C) <2013> Intel Corporation + * Copyright (C) <2014> Centricular Ltd + * Copyright (C) <2015> YouView TV Ltd. + * * 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 @@ -34,7 +37,7 @@ * * Example launch line * |[ - * gst-launch-1.0 filesrc location=test.mov ! qtdemux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink demux.video_0 ! queue ! decodebin ! videoconvert ! videoscale ! autovideosink + * gst-launch-1.0 filesrc location=test.mov ! qtdemux name=demux demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink demux.video_0 ! queue ! decodebin ! videoconvert ! videoscale ! autovideosink * ]| Play (parse and decode) a .mov file and try to output it to * an automatically detected soundcard and videosink. If the MOV file contains * compressed audio or video data, this will only work if you have the @@ -90,7 +93,7 @@ #define QTDEMUX_SECONDS_FROM_1904_TO_1970 (((1970 - 1904) * (guint64) 365 + \ QTDEMUX_LEAP_YEARS_FROM_1904_TO_1970) * QTDEMUX_SECONDS_PER_DAY) -#define STREAM_IS_EOS(s) (s->time_position == -1) +#define STREAM_IS_EOS(s) (s->time_position == GST_CLOCK_TIME_NONE) GST_DEBUG_CATEGORY (qtdemux_debug); @@ -98,6 +101,8 @@ typedef struct _QtDemuxSegment QtDemuxSegment; typedef struct _QtDemuxSample QtDemuxSample; +typedef struct _QtDemuxCencSampleSetInfo QtDemuxCencSampleSetInfo; + /*struct _QtNode { guint32 type; @@ -115,15 +120,19 @@ gboolean keyframe; /* TRUE when this packet is a keyframe */ }; +/* Macros for converting to/from timescale */ +#define QTSTREAMTIME_TO_GSTTIME(stream, value) (gst_util_uint64_scale((value), GST_SECOND, (stream)->timescale)) +#define GSTTIME_TO_QTSTREAMTIME(stream, value) (gst_util_uint64_scale((value), (stream)->timescale, GST_SECOND)) + +#define QTTIME_TO_GSTTIME(qtdemux, value) (gst_util_uint64_scale((value), GST_SECOND, (qtdemux)->timescale)) +#define GSTTIME_TO_QTTIME(qtdemux, value) (gst_util_uint64_scale((value), (qtdemux)->timescale, GST_SECOND)) + /* timestamp is the DTS */ -#define QTSAMPLE_DTS(stream,sample) gst_util_uint64_scale ((sample)->timestamp,\ - GST_SECOND, (stream)->timescale) +#define QTSAMPLE_DTS(stream,sample) (QTSTREAMTIME_TO_GSTTIME((stream), (sample)->timestamp)) /* timestamp + offset is the PTS */ -#define QTSAMPLE_PTS(stream,sample) gst_util_uint64_scale ((sample)->timestamp + \ - (sample)->pts_offset, GST_SECOND, (stream)->timescale) +#define QTSAMPLE_PTS(stream,sample) (QTSTREAMTIME_TO_GSTTIME((stream), (sample)->timestamp + (stream)->cslg_shift + (sample)->pts_offset)) /* timestamp + duration - dts is the duration */ -#define QTSAMPLE_DUR_DTS(stream,sample,dts) (gst_util_uint64_scale ((sample)->timestamp + \ - (sample)->duration, GST_SECOND, (stream)->timescale) - (dts)); +#define QTSAMPLE_DUR_DTS(stream, sample, dts) (QTSTREAMTIME_TO_GSTTIME ((stream), (sample)->timestamp + (sample)->duration) - (dts)) #define QTSAMPLE_KEYFRAME(stream,sample) ((stream)->all_keyframe || (sample)->keyframe) @@ -188,17 +197,26 @@ struct _QtDemuxSegment { /* global time and duration, all gst time */ - guint64 time; - guint64 stop_time; - guint64 duration; + GstClockTime time; + GstClockTime stop_time; + GstClockTime duration; /* media time of trak, all gst time */ - guint64 media_start; - guint64 media_stop; + GstClockTime media_start; + GstClockTime media_stop; gdouble rate; + /* Media start time in trak timescale units */ + guint32 trak_media_start; }; #define QTSEGMENT_IS_EMPTY(s) ((s)->media_start == GST_CLOCK_TIME_NONE) +/* Used with fragmented MP4 files (mfra atom) */ +typedef struct +{ + GstClockTime ts; + guint64 moof_offset; +} QtDemuxRandomAccessEntry; + struct _QtDemuxStream { GstPad *pad; @@ -233,7 +251,7 @@ guint32 n_samples; QtDemuxSample *samples; gboolean all_keyframe; /* TRUE when all samples are keyframes (no stss) */ - guint32 min_duration; /* duration in timescale of first sample, used for figuring out + guint32 first_duration; /* duration in timescale of first sample, used for figuring out the framerate, in timescale units */ guint32 offset_in_sample; guint32 max_buffer_size; @@ -288,7 +306,8 @@ /* current position */ guint32 segment_index; guint32 sample_index; - guint64 time_position; /* in gst time */ + GstClockTime time_position; /* in gst time */ + guint64 accumulated_base; /* the Gst segment we are processing out, used for clipping */ GstSegment segment; @@ -297,6 +316,7 @@ /* quicktime segments */ guint32 n_segments; QtDemuxSegment *segments; + gboolean dummy_segment; guint32 from_sample; guint32 to_sample; @@ -347,6 +367,11 @@ gboolean stps_present; guint32 n_sample_partial_syncs; guint32 stps_index; + QtDemuxRandomAccessEntry *ra_entries; + guint n_ra_entries; + + const QtDemuxRandomAccessEntry *pending_seek; + /* ctts */ gboolean ctts_present; guint32 n_composition_times; @@ -355,6 +380,9 @@ guint32 ctts_count; gint32 ctts_soffset; + /* cslg */ + guint32 cslg_shift; + /* fragmented */ gboolean parsed_trex; guint32 def_sample_duration; @@ -362,6 +390,27 @@ guint32 def_sample_flags; gboolean disabled; + + /* stereoscopic video streams */ + GstVideoMultiviewMode multiview_mode; + GstVideoMultiviewFlags multiview_flags; + + /* protected streams */ + gboolean protected; + guint32 protection_scheme_type; + guint32 protection_scheme_version; + gpointer protection_scheme_info; /* specific to the protection scheme */ + GQueue protection_scheme_event_queue; +}; + +/* Contains properties and cryptographic info for a set of samples from a + * track protected using Common Encryption (cenc) */ +struct _QtDemuxCencSampleSetInfo +{ + GstStructure *default_properties; + + /* @crypto_info holds one GstStructure per sample */ + GPtrArray *crypto_info; }; enum QtDemuxState @@ -379,6 +428,8 @@ static GNode *qtdemux_tree_get_sibling_by_type_full (GNode * node, guint32 fourcc, GstByteReader * parser); +static GstFlowReturn qtdemux_add_fragmented_samples (GstQTDemux * qtdemux); + static GstStaticPadTemplate gst_qtdemux_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, @@ -412,7 +463,7 @@ static guint32 gst_qtdemux_find_index_linear (GstQTDemux * qtdemux, QtDemuxStream * str, - guint64 media_time); + GstClockTime media_time); static guint32 gst_qtdemux_find_index_for_given_media_offset_linear (GstQTDemux * qtdemux, QtDemuxStream * str, gint64 media_offset); @@ -443,6 +494,8 @@ static gboolean qtdemux_parse_node (GstQTDemux * qtdemux, GNode * node, const guint8 * buffer, guint length); static gboolean qtdemux_parse_tree (GstQTDemux * qtdemux); +static void qtdemux_parse_udta (GstQTDemux * qtdemux, GstTagList * taglist, + GNode * udta); static void gst_qtdemux_handle_esds (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * esds, GstTagList * list); @@ -471,6 +524,12 @@ static void qtdemux_do_allocation (GstQTDemux * qtdemux, QtDemuxStream * stream); +static gboolean qtdemux_pull_mfro_mfra (GstQTDemux * qtdemux); +static void check_update_duration (GstQTDemux * qtdemux, GstClockTime duration); + +static void gst_qtdemux_append_protection_system_id (GstQTDemux * qtdemux, + const gchar * id); + static void gst_qtdemux_class_init (GstQTDemuxClass * klass) { @@ -530,19 +589,21 @@ qtdemux->offset = 0; qtdemux->first_mdat = -1; qtdemux->got_moov = FALSE; - qtdemux->mdatoffset = GST_CLOCK_TIME_NONE; + qtdemux->mdatoffset = -1; qtdemux->mdatbuffer = NULL; qtdemux->restoredata_buffer = NULL; - qtdemux->restoredata_offset = GST_CLOCK_TIME_NONE; + qtdemux->restoredata_offset = -1; qtdemux->fragment_start = -1; qtdemux->fragment_start_offset = -1; qtdemux->media_caps = NULL; qtdemux->exposed = FALSE; qtdemux->mss_mode = FALSE; qtdemux->pending_newsegment = NULL; - qtdemux->upstream_newsegment = FALSE; + qtdemux->upstream_format_is_time = FALSE; qtdemux->have_group_id = FALSE; qtdemux->group_id = G_MAXUINT; + qtdemux->protection_system_ids = NULL; + g_queue_init (&qtdemux->protection_event_queue); gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME); qtdemux->flowcombiner = gst_flow_combiner_new (); @@ -559,6 +620,9 @@ qtdemux->adapter = NULL; } gst_flow_combiner_free (qtdemux->flowcombiner); + g_queue_foreach (&qtdemux->protection_event_queue, (GFunc) gst_event_unref, + NULL); + g_queue_clear (&qtdemux->protection_event_queue); G_OBJECT_CLASS (parent_class)->dispose (object); } @@ -688,11 +752,11 @@ return FALSE; *dest_value = - gst_util_uint64_scale (stream->samples[index].timestamp, - GST_SECOND, stream->timescale); - GST_DEBUG_OBJECT (qtdemux, "Format Conversion Offset->Time :%" - G_GUINT64_FORMAT "->%" GST_TIME_FORMAT, - src_value, GST_TIME_ARGS (*dest_value)); + QTSTREAMTIME_TO_GSTTIME (stream, + stream->samples[index].timestamp); + GST_DEBUG_OBJECT (qtdemux, + "Format Conversion Offset->Time :%" G_GUINT64_FORMAT "->%" + GST_TIME_FORMAT, src_value, GST_TIME_ARGS (*dest_value)); break; } default: @@ -712,7 +776,7 @@ #endif static gboolean -gst_qtdemux_get_duration (GstQTDemux * qtdemux, gint64 * duration) +gst_qtdemux_get_duration (GstQTDemux * qtdemux, GstClockTime * duration) { gboolean res = TRUE; @@ -720,8 +784,7 @@ if (qtdemux->duration != 0) { if (qtdemux->duration != G_MAXINT64 && qtdemux->timescale != 0) { - *duration = gst_util_uint64_scale (qtdemux->duration, - GST_SECOND, qtdemux->timescale); + *duration = QTTIME_TO_GSTTIME (qtdemux, qtdemux->duration); } } return res; @@ -757,9 +820,8 @@ /* First try to query upstream */ res = gst_pad_query_default (pad, parent, query); if (!res) { - gint64 duration = -1; - gst_qtdemux_get_duration (qtdemux, &duration); - if (duration > 0) { + guint64 duration; + if (gst_qtdemux_get_duration (qtdemux, &duration) && duration > 0) { gst_query_set_duration (query, GST_FORMAT_TIME, duration); res = TRUE; } @@ -795,7 +857,7 @@ if (!res) { gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL); if (fmt == GST_FORMAT_TIME) { - gint64 duration = -1; + GstClockTime duration = GST_CLOCK_TIME_NONE; gst_qtdemux_get_duration (qtdemux, &duration); seekable = TRUE; @@ -925,7 +987,7 @@ static gint find_func (QtDemuxSample * s1, guint64 * media_time, gpointer user_data) { - if (s1->timestamp > *media_time) + if (s1->timestamp + s1->pts_offset > *media_time) return 1; return -1; @@ -1008,28 +1070,32 @@ */ static guint32 gst_qtdemux_find_index_linear (GstQTDemux * qtdemux, QtDemuxStream * str, - guint64 media_time) + GstClockTime media_time) { guint32 index = 0; guint64 mov_time; + QtDemuxSample *sample; /* convert media_time to mov format */ mov_time = gst_util_uint64_scale_ceil (media_time, str->timescale, GST_SECOND); - if (mov_time == str->samples[0].timestamp) + sample = str->samples; + if (mov_time == sample->timestamp + sample->pts_offset) return index; /* use faster search if requested time in already parsed range */ + sample = str->samples + str->stbl_index; if (str->stbl_index >= 0 && - mov_time <= str->samples[str->stbl_index].timestamp) + mov_time <= (sample->timestamp + sample->pts_offset)) return gst_qtdemux_find_index (qtdemux, str, media_time); while (index < str->n_samples - 1) { if (!qtdemux_parse_samples (qtdemux, str, index + 1)) goto parse_failed; - if (mov_time < str->samples[index + 1].timestamp) + sample = str->samples + index + 1; + if (mov_time < (sample->timestamp + sample->pts_offset)) break; index++; @@ -1086,41 +1152,39 @@ /* find the segment for @time_position for @stream * - * Returns -1 if the segment cannot be found. + * Returns the index of the segment containing @time_position. + * Returns the last segment and sets the @eos variable to TRUE + * if the time is beyond the end. @eos may be NULL */ static guint32 gst_qtdemux_find_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, - guint64 time_position) + GstClockTime time_position) { gint i; guint32 seg_idx; - GST_LOG_OBJECT (qtdemux, "finding segment for %" GST_TIME_FORMAT, + GST_LOG_OBJECT (stream->pad, "finding segment for %" GST_TIME_FORMAT, GST_TIME_ARGS (time_position)); - /* find segment corresponding to time_position if we are looking - * for a segment. */ seg_idx = -1; for (i = 0; i < stream->n_segments; i++) { QtDemuxSegment *segment = &stream->segments[i]; - GST_LOG_OBJECT (qtdemux, + GST_LOG_OBJECT (stream->pad, "looking at segment %" GST_TIME_FORMAT "-%" GST_TIME_FORMAT, GST_TIME_ARGS (segment->time), GST_TIME_ARGS (segment->stop_time)); /* For the last segment we include stop_time in the last segment */ if (i < stream->n_segments - 1) { if (segment->time <= time_position && time_position < segment->stop_time) { - GST_LOG_OBJECT (qtdemux, "segment %d matches", i); + GST_LOG_OBJECT (stream->pad, "segment %d matches", i); seg_idx = i; break; } } else { - if (segment->time <= time_position && time_position <= segment->stop_time) { - GST_LOG_OBJECT (qtdemux, "segment %d matches", i); - seg_idx = i; - break; - } + /* Last segment always matches */ + seg_idx = i; + break; } } return seg_idx; @@ -1152,7 +1216,7 @@ static void gst_qtdemux_adjust_seek (GstQTDemux * qtdemux, gint64 desired_time, - gint64 * key_time, gint64 * key_offset) + gboolean use_sparse, gint64 * key_time, gint64 * key_offset) { guint64 min_offset; gint64 min_byte_offset = -1; @@ -1166,20 +1230,19 @@ QtDemuxStream *str; guint32 index, kindex; guint32 seg_idx; - guint64 media_start; - guint64 media_time; - guint64 seg_time; + GstClockTime media_start; + GstClockTime media_time; + GstClockTime seg_time; QtDemuxSegment *seg; str = qtdemux->streams[n]; + if (str->sparse && !use_sparse) + continue; + seg_idx = gst_qtdemux_find_segment (qtdemux, str, desired_time); GST_DEBUG_OBJECT (qtdemux, "align segment %d", seg_idx); - /* segment not found, continue with normal flow */ - if (seg_idx == -1) - continue; - /* get segment and time in the segment */ seg = &str->segments[seg_idx]; seg_time = desired_time - seg->time; @@ -1202,18 +1265,17 @@ index = kindex; /* get timestamp of keyframe */ - media_time = - gst_util_uint64_scale (str->samples[kindex].timestamp, GST_SECOND, - str->timescale); - GST_DEBUG_OBJECT (qtdemux, "keyframe at %u with time %" GST_TIME_FORMAT - " at offset %" G_GUINT64_FORMAT, - kindex, GST_TIME_ARGS (media_time), str->samples[kindex].offset); + media_time = QTSAMPLE_DTS (str, &str->samples[kindex]); + GST_DEBUG_OBJECT (qtdemux, + "keyframe at %u with time %" GST_TIME_FORMAT " at offset %" + G_GUINT64_FORMAT, kindex, GST_TIME_ARGS (media_time), + str->samples[kindex].offset); /* keyframes in the segment get a chance to change the * desired_offset. keyframes out of the segment are * ignored. */ if (media_time >= seg->media_start) { - guint64 seg_time; + GstClockTime seg_time; /* this keyframe is inside the segment, convert back to * segment time */ @@ -1289,7 +1351,7 @@ stop_type, &stop)) goto no_format; - /* Upstrea seek in bytes will have undefined stop, but qtdemux stores + /* Upstream seek in bytes will have undefined stop, but qtdemux stores * the original stop position to use when upstream pushes the new segment * for this seek */ original_stop = stop; @@ -1298,7 +1360,7 @@ /* find reasonable corresponding BYTE position, * also try to mind about keyframes, since we can not go back a bit for them * later on */ - gst_qtdemux_adjust_seek (qtdemux, cur, &key_cur, &byte_cur); + gst_qtdemux_adjust_seek (qtdemux, cur, FALSE, &key_cur, &byte_cur); if (byte_cur == -1) goto abort_seek; @@ -1367,7 +1429,7 @@ */ static gboolean gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment, - guint32 seqnum) + guint32 seqnum, GstSeekFlags flags) { gint64 desired_offset; gint n; @@ -1380,20 +1442,22 @@ /* may not have enough fragmented info to do this adjustment, * and we can't scan (and probably should not) at this time with * possibly flushing upstream */ - if ((segment->flags & GST_SEEK_FLAG_KEY_UNIT) && !qtdemux->fragmented) { + if ((flags & GST_SEEK_FLAG_KEY_UNIT) && !qtdemux->fragmented) { gint64 min_offset; - gst_qtdemux_adjust_seek (qtdemux, desired_offset, &min_offset, NULL); + gst_qtdemux_adjust_seek (qtdemux, desired_offset, TRUE, &min_offset, NULL); GST_DEBUG_OBJECT (qtdemux, "keyframe seek, align to %" GST_TIME_FORMAT, GST_TIME_ARGS (min_offset)); desired_offset = min_offset; } /* and set all streams to the final position */ + gst_flow_combiner_reset (qtdemux->flowcombiner); for (n = 0; n < qtdemux->n_streams; n++) { QtDemuxStream *stream = qtdemux->streams[n]; stream->time_position = desired_offset; + stream->accumulated_base = 0; stream->sample_index = -1; stream->offset_in_sample = 0; stream->segment_index = -1; @@ -1405,11 +1469,18 @@ } segment->position = desired_offset; segment->time = desired_offset; - qtdemux->segment_base = desired_offset; + if (segment->rate >= 0) { + segment->start = desired_offset; - /* we stop at the end */ - if (segment->stop == -1) - segment->stop = segment->duration; + /* we stop at the end */ + if (segment->stop == -1) + segment->stop = segment->duration; + } else { + segment->stop = desired_offset; + } + + if (qtdemux->fragmented) + qtdemux->fragmented_seek_pending = TRUE; return TRUE; } @@ -1479,7 +1550,7 @@ } /* now do the seek, this actually never returns FALSE */ - gst_qtdemux_perform_seek (qtdemux, &seeksegment, seqnum); + gst_qtdemux_perform_seek (qtdemux, &seeksegment, seqnum, flags); /* prepare for streaming again */ if (flush) { @@ -1502,6 +1573,7 @@ gst_element_post_message (GST_ELEMENT_CAST (qtdemux), msg); } + /* restart streaming, NEWSEGMENT will be sent from the streaming thread. */ gst_pad_start_task (qtdemux->sinkpad, (GstTaskFunction) gst_qtdemux_loop, qtdemux->sinkpad, NULL); @@ -1556,7 +1628,7 @@ GstClockTime ts = gst_util_get_timestamp (); #endif - if (qtdemux->upstream_newsegment && qtdemux->fragmented) { + if (qtdemux->upstream_format_is_time && qtdemux->fragmented) { /* seek should be handled by upstream, we might need to re-download fragments */ GST_DEBUG_OBJECT (qtdemux, "let upstream handle seek for fragmented playback"); @@ -1663,8 +1735,7 @@ /* avoid index from sparse streams since they might be far away */ if (!str->sparse) { /* determine min/max time */ - time = str->samples[i].timestamp + str->samples[i].pts_offset; - time = gst_util_uint64_scale (time, GST_SECOND, str->timescale); + time = QTSAMPLE_PTS (str, &str->samples[i]); if (min_time == -1 || (!fw && time > min_time) || (fw && time < min_time)) { min_time = time; @@ -1710,6 +1781,13 @@ stream->sample_index = -1; stream->offset_in_sample = 0; stream->new_stream = TRUE; + stream->multiview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE; + stream->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE; + stream->protected = FALSE; + stream->protection_scheme_type = 0; + stream->protection_scheme_version = 0; + stream->protection_scheme_info = NULL; + g_queue_init (&stream->protection_scheme_event_queue); return stream; } @@ -1800,7 +1878,7 @@ GST_DEBUG_OBJECT (qtdemux, "Resetting demux"); gst_pad_stop_task (qtdemux->sinkpad); - if (hard || qtdemux->upstream_newsegment) { + if (hard || qtdemux->upstream_format_is_time) { qtdemux->state = QTDEMUX_STATE_INITIAL; qtdemux->neededbytes = 16; qtdemux->todrop = 0; @@ -1808,8 +1886,8 @@ qtdemux->posted_redirect = FALSE; qtdemux->first_mdat = -1; qtdemux->header_size = 0; - qtdemux->mdatoffset = GST_CLOCK_TIME_NONE; - qtdemux->restoredata_offset = GST_CLOCK_TIME_NONE; + qtdemux->mdatoffset = -1; + qtdemux->restoredata_offset = -1; if (qtdemux->mdatbuffer) gst_buffer_unref (qtdemux->mdatbuffer); if (qtdemux->restoredata_buffer) @@ -1837,23 +1915,29 @@ if (qtdemux->pending_newsegment) gst_event_unref (qtdemux->pending_newsegment); qtdemux->pending_newsegment = NULL; - qtdemux->upstream_newsegment = FALSE; + qtdemux->upstream_format_is_time = FALSE; qtdemux->upstream_seekable = FALSE; qtdemux->upstream_size = 0; qtdemux->fragment_start = -1; qtdemux->fragment_start_offset = -1; qtdemux->duration = 0; - qtdemux->mfra_offset = 0; qtdemux->moof_offset = 0; qtdemux->chapters_track_id = 0; qtdemux->have_group_id = FALSE; qtdemux->group_id = G_MAXUINT; + + if (qtdemux->protection_system_ids) { + g_ptr_array_free (qtdemux->protection_system_ids, TRUE); + qtdemux->protection_system_ids = NULL; + } + g_queue_foreach (&qtdemux->protection_event_queue, (GFunc) gst_event_unref, + NULL); + g_queue_clear (&qtdemux->protection_event_queue); } qtdemux->offset = 0; gst_adapter_clear (qtdemux->adapter); gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME); - qtdemux->segment_base = 0; if (hard) { for (n = 0; n < qtdemux->n_streams; n++) { @@ -1871,13 +1955,16 @@ qtdemux->timescale = 0; qtdemux->got_moov = FALSE; } else if (qtdemux->mss_mode) { + gst_flow_combiner_reset (qtdemux->flowcombiner); for (n = 0; n < qtdemux->n_streams; n++) gst_qtdemux_stream_clear (qtdemux, qtdemux->streams[n]); } else { + gst_flow_combiner_reset (qtdemux->flowcombiner); for (n = 0; n < qtdemux->n_streams; n++) { qtdemux->streams[n]->sent_eos = FALSE; qtdemux->streams[n]->segment_seqnum = 0; qtdemux->streams[n]->time_position = 0; + qtdemux->streams[n]->accumulated_base = 0; } } } @@ -1908,7 +1995,7 @@ if (segment.format == GST_FORMAT_TIME) { GST_DEBUG_OBJECT (demux, "new pending_newsegment"); gst_event_replace (&demux->pending_newsegment, event); - demux->upstream_newsegment = TRUE; + demux->upstream_format_is_time = TRUE; } else { GST_DEBUG_OBJECT (demux, "Not storing upstream newsegment, " "not in time format"); @@ -1960,16 +2047,9 @@ segment.stop = MAX (segment.stop, segment.start); } } else if (segment.format == GST_FORMAT_TIME) { - /* NOP */ -#if 0 - gst_qtdemux_push_event (demux, gst_event_ref (event)); - gst_event_new_new_segment_full (segment.update, segment.rate, - segment.arate, GST_FORMAT_TIME, segment.start, segment.stop, - segment.start); - gst_adapter_clear (demux->adapter); - demux->neededbytes = 16; - goto exit; -#endif + /* push all data on the adapter before starting this + * new segment */ + gst_qtdemux_process_adapter (demux, TRUE); } else { GST_DEBUG_OBJECT (demux, "unsupported segment format, ignoring"); goto exit; @@ -1990,26 +2070,30 @@ /* clear leftover in current segment, if any */ gst_adapter_clear (demux->adapter); + /* set up streaming thread */ - gst_qtdemux_find_sample (demux, offset, TRUE, TRUE, &stream, &idx, NULL); demux->offset = offset; - if (stream) { - demux->todrop = stream->samples[idx].offset - offset; - demux->neededbytes = demux->todrop + stream->samples[idx].size; + if (demux->upstream_format_is_time) { + GST_DEBUG_OBJECT (demux, "Upstream is driving in time format, " + "set values to restart reading from a new atom"); + demux->neededbytes = 16; + demux->todrop = 0; } else { - /* set up for EOS */ - if (demux->upstream_newsegment) { - demux->neededbytes = 16; + gst_qtdemux_find_sample (demux, offset, TRUE, TRUE, &stream, &idx, + NULL); + if (stream) { + demux->todrop = stream->samples[idx].offset - offset; + demux->neededbytes = demux->todrop + stream->samples[idx].size; } else { + /* set up for EOS */ demux->neededbytes = -1; + demux->todrop = 0; } - demux->todrop = 0; } exit: gst_event_unref (event); res = TRUE; goto drop; - break; } case GST_EVENT_FLUSH_STOP: { @@ -2051,7 +2135,21 @@ res = TRUE; gst_event_unref (event); goto drop; - break; + } + case GST_EVENT_PROTECTION: + { + const gchar *system_id = NULL; + + gst_event_parse_protection (event, &system_id, NULL, NULL); + GST_DEBUG_OBJECT (demux, "Received protection event for system ID %s", + system_id); + gst_qtdemux_append_protection_system_id (demux, system_id); + /* save the event for later, for source pads that have not been created */ + g_queue_push_tail (&demux->protection_event_queue, gst_event_ref (event)); + /* send it to all pads that already exist */ + gst_qtdemux_push_event (demux, event); + res = TRUE; + goto drop; } default: break; @@ -2122,6 +2220,35 @@ } static void +gst_qtdemux_stream_flush_segments_data (GstQTDemux * qtdemux, + QtDemuxStream * stream) +{ + g_free (stream->segments); + stream->segments = NULL; + stream->segment_index = -1; + stream->accumulated_base = 0; +} + +static void +gst_qtdemux_stream_flush_samples_data (GstQTDemux * qtdemux, + QtDemuxStream * stream) +{ + g_free (stream->samples); + stream->samples = NULL; + gst_qtdemux_stbl_free (stream); + + /* fragments */ + g_free (stream->ra_entries); + stream->ra_entries = NULL; + stream->n_ra_entries = 0; + + stream->sample_index = -1; + stream->stbl_index = -1; + stream->n_samples = 0; + stream->time_position = 0; +} + +static void gst_qtdemux_stream_clear (GstQTDemux * qtdemux, QtDemuxStream * stream) { if (stream->allocator) @@ -2134,25 +2261,34 @@ gst_memory_unref (stream->rgb8_palette); stream->rgb8_palette = NULL; } - g_free (stream->samples); - stream->samples = NULL; - g_free (stream->segments); - stream->segments = NULL; + if (stream->pending_tags) gst_tag_list_unref (stream->pending_tags); stream->pending_tags = NULL; g_free (stream->redirect_uri); stream->redirect_uri = NULL; - /* free stbl sub-atoms */ - gst_qtdemux_stbl_free (stream); - stream->sent_eos = FALSE; - stream->segment_index = -1; - stream->time_position = 0; - stream->sample_index = -1; - stream->stbl_index = -1; - stream->n_samples = 0; stream->sparse = FALSE; + stream->protected = FALSE; + if (stream->protection_scheme_info) { + if (stream->protection_scheme_type == FOURCC_cenc) { + QtDemuxCencSampleSetInfo *info = + (QtDemuxCencSampleSetInfo *) stream->protection_scheme_info; + if (info->default_properties) + gst_structure_free (info->default_properties); + if (info->crypto_info) + g_ptr_array_free (info->crypto_info, TRUE); + } + g_free (stream->protection_scheme_info); + stream->protection_scheme_info = NULL; + } + stream->protection_scheme_type = 0; + stream->protection_scheme_version = 0; + g_queue_foreach (&stream->protection_scheme_event_queue, + (GFunc) gst_event_unref, NULL); + g_queue_clear (&stream->protection_scheme_event_queue); + gst_qtdemux_stream_flush_segments_data (qtdemux, stream); + gst_qtdemux_stream_flush_samples_data (qtdemux, stream); } static void @@ -2226,32 +2362,35 @@ } static void -qtdemux_handle_xmp_taglist (GstQTDemux * qtdemux, GstTagList * taglist) +qtdemux_handle_xmp_taglist (GstQTDemux * qtdemux, GstTagList * taglist, + GstTagList * xmptaglist) { /* Strip out bogus fields */ - if (taglist) { - gst_tag_list_remove_tag (taglist, GST_TAG_VIDEO_CODEC); + if (xmptaglist) { + if (gst_tag_list_get_scope (taglist) == GST_TAG_SCOPE_GLOBAL) { + gst_tag_list_remove_tag (xmptaglist, GST_TAG_VIDEO_CODEC); + gst_tag_list_remove_tag (xmptaglist, GST_TAG_AUDIO_CODEC); + } else { + gst_tag_list_remove_tag (xmptaglist, GST_TAG_CONTAINER_FORMAT); + } - GST_DEBUG_OBJECT (qtdemux, "Found XMP tags %" GST_PTR_FORMAT, taglist); + GST_DEBUG_OBJECT (qtdemux, "Found XMP tags %" GST_PTR_FORMAT, xmptaglist); - if (qtdemux->tag_list) { - /* prioritize native tags using _KEEP mode */ - gst_tag_list_insert (qtdemux->tag_list, taglist, GST_TAG_MERGE_KEEP); - gst_tag_list_unref (taglist); - } else - qtdemux->tag_list = taglist; + /* prioritize native tags using _KEEP mode */ + gst_tag_list_insert (taglist, xmptaglist, GST_TAG_MERGE_KEEP); + gst_tag_list_unref (xmptaglist); } } static void qtdemux_parse_uuid (GstQTDemux * qtdemux, const guint8 * buffer, gint length) { - static guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB, + static const guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB, 0x97, 0xA9, 0x42, 0xE8, 0x9C, 0x71, 0x99, 0x94, 0x91, 0xE3, 0xAF, 0xAC }; - static guint8 playready_uuid[] = { + static const guint8 playready_uuid[] = { 0xd0, 0x8a, 0x4f, 0x18, 0x10, 0xf3, 0x4a, 0x82, 0xb6, 0xc8, 0x32, 0xd8, 0xab, 0xa1, 0x83, 0xd3 }; @@ -2276,7 +2415,7 @@ taglist = gst_tag_list_from_xmp_buffer (buf); gst_buffer_unref (buf); - qtdemux_handle_xmp_taglist (qtdemux, taglist); + qtdemux_handle_xmp_taglist (qtdemux, qtdemux->tag_list, taglist); } else if (memcmp (buffer + offset, playready_uuid, 16) == 0) { int len; @@ -2302,6 +2441,25 @@ } } +static void +qtdemux_parse_sidx (GstQTDemux * qtdemux, const guint8 * buffer, gint length) +{ + GstSidxParser sidx_parser; + GstIsoffParserResult res; + guint consumed; + + gst_isoff_qt_sidx_parser_init (&sidx_parser); + + res = + gst_isoff_qt_sidx_parser_add_data (&sidx_parser, buffer, length, + &consumed); + GST_DEBUG_OBJECT (qtdemux, "sidx parse result: %d", res); + if (res == GST_ISOFF_QT_PARSER_DONE) { + check_update_duration (qtdemux, sidx_parser.cumulative_pts); + } + gst_isoff_qt_sidx_parser_clear (&sidx_parser); +} + /* caller verifies at least 8 bytes in buf */ static void extract_initial_length_and_fourcc (const guint8 * data, guint size, @@ -2316,7 +2474,7 @@ GST_DEBUG ("atom type %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); if (length == 0) { - length = G_MAXUINT32; + length = G_MAXUINT64; } else if (length == 1 && size >= 16) { /* this means we have an extended size, which is the 64 bit value of * the next 8 bytes */ @@ -2334,7 +2492,7 @@ qtdemux_parse_mehd (GstQTDemux * qtdemux, GstByteReader * br) { guint32 version = 0; - guint64 duration = 0; + GstClockTime duration = 0; if (!gst_byte_reader_get_uint32_be (br, &version)) goto failed; @@ -2426,12 +2584,66 @@ return TRUE; } +/* This method should be called whenever a more accurate duration might + * have been found. It will update all relevant variables if/where needed + */ +static void +check_update_duration (GstQTDemux * qtdemux, GstClockTime duration) +{ + guint i; + guint64 movdur; + GstClockTime prevdur; + + movdur = GSTTIME_TO_QTTIME (qtdemux, duration); + + if (movdur > qtdemux->duration) { + prevdur = QTTIME_TO_GSTTIME (qtdemux, qtdemux->duration); + GST_DEBUG_OBJECT (qtdemux, + "Updating total duration to %" GST_TIME_FORMAT " was %" GST_TIME_FORMAT, + GST_TIME_ARGS (duration), GST_TIME_ARGS (prevdur)); + qtdemux->duration = movdur; + GST_DEBUG_OBJECT (qtdemux, + "qtdemux->segment.duration: %" GST_TIME_FORMAT " .stop: %" + GST_TIME_FORMAT, GST_TIME_ARGS (qtdemux->segment.duration), + GST_TIME_ARGS (qtdemux->segment.stop)); + if (qtdemux->segment.duration == prevdur) { + /* If the current segment has duration/stop identical to previous duration + * update them also (because they were set at that point in time with + * the wrong duration */ + /* We convert the value *from* the timescale version to avoid rounding errors */ + GstClockTime fixeddur = QTTIME_TO_GSTTIME (qtdemux, movdur); + GST_DEBUG_OBJECT (qtdemux, "Updated segment.duration and segment.stop"); + qtdemux->segment.duration = fixeddur; + qtdemux->segment.stop = fixeddur; + } + } + for (i = 0; i < qtdemux->n_streams; i++) { + QtDemuxStream *stream = qtdemux->streams[i]; + if (stream) { + movdur = GSTTIME_TO_QTSTREAMTIME (stream, duration); + if (movdur > stream->duration) { + GST_DEBUG_OBJECT (qtdemux, + "Updating stream #%d duration to %" GST_TIME_FORMAT, i, + GST_TIME_ARGS (duration)); + stream->duration = movdur; + if (stream->dummy_segment) { + /* Update all dummy values to new duration */ + stream->segments[0].stop_time = duration; + stream->segments[0].duration = duration; + stream->segments[0].media_stop = duration; + } + } + } + } +} + static gboolean qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun, QtDemuxStream * stream, guint32 d_sample_duration, guint32 d_sample_size, guint32 d_sample_flags, gint64 moof_offset, gint64 moof_length, - gint64 * base_offset, gint64 * running_offset) + gint64 * base_offset, gint64 * running_offset, gint64 decode_ts) { + GstClockTime gst_ts = GST_CLOCK_TIME_NONE; guint64 timestamp; gint32 data_offset = 0; guint32 flags = 0, first_flags = 0, samples_count = 0; @@ -2442,9 +2654,14 @@ gboolean ismv = FALSE; GST_LOG_OBJECT (qtdemux, "parsing trun stream %d; " - "default dur %d, size %d, flags 0x%x, base offset %" G_GINT64_FORMAT, - stream->track_id, d_sample_duration, d_sample_size, d_sample_flags, - *base_offset); + "default dur %d, size %d, flags 0x%x, base offset %" G_GINT64_FORMAT ", " + "decode ts %" G_GINT64_FORMAT, stream->track_id, d_sample_duration, + d_sample_size, d_sample_flags, *base_offset, decode_ts); + + if (stream->pending_seek && moof_offset < stream->pending_seek->moof_offset) { + GST_INFO_OBJECT (stream->pad, "skipping trun before seek target fragment"); + return TRUE; + } /* presence of stss or not can't really tell us much, * and flags and so on tend to be marginally reliable in these files */ @@ -2531,40 +2748,62 @@ goto fail; data = (guint8 *) gst_byte_reader_peek_data_unchecked (trun); - if (stream->n_samples >= + if (stream->n_samples + samples_count >= QTDEMUX_MAX_SAMPLE_INDEX_SIZE / sizeof (QtDemuxSample)) goto index_too_big; GST_DEBUG_OBJECT (qtdemux, "allocating n_samples %u * %u (%.2f MB)", - stream->n_samples, (guint) sizeof (QtDemuxSample), - stream->n_samples * sizeof (QtDemuxSample) / (1024.0 * 1024.0)); + stream->n_samples + samples_count, (guint) sizeof (QtDemuxSample), + (stream->n_samples + samples_count) * + sizeof (QtDemuxSample) / (1024.0 * 1024.0)); /* create a new array of samples if it's the first sample parsed */ - if (stream->n_samples == 0) + if (stream->n_samples == 0) { + g_assert (stream->samples == NULL); stream->samples = g_try_new0 (QtDemuxSample, samples_count); - /* or try to reallocate it with space enough to insert the new samples */ - else + /* or try to reallocate it with space enough to insert the new samples */ + } else stream->samples = g_try_renew (QtDemuxSample, stream->samples, stream->n_samples + samples_count); if (stream->samples == NULL) goto out_of_memory; if (qtdemux->fragment_start != -1) { - timestamp = gst_util_uint64_scale_int (qtdemux->fragment_start, - stream->timescale, GST_SECOND); + timestamp = GSTTIME_TO_QTSTREAMTIME (stream, qtdemux->fragment_start); qtdemux->fragment_start = -1; } else { - if (G_UNLIKELY (stream->n_samples == 0)) { - /* the timestamp of the first sample is also provided by the tfra entry - * but we shouldn't rely on it as it is at the end of files */ - timestamp = 0; + if (stream->n_samples == 0) { + if (decode_ts > 0) { + timestamp = decode_ts; + } else if (stream->pending_seek != NULL) { + /* if we don't have a timestamp from a tfdt box, we'll use the one + * from the mfra seek table */ + GST_INFO_OBJECT (stream->pad, "pending seek ts = %" GST_TIME_FORMAT, + GST_TIME_ARGS (stream->pending_seek->ts)); + + /* FIXME: this is not fully correct, the timestamp refers to the random + * access sample refered to in the tfra entry, which may not necessarily + * be the first sample in the tfrag/trun (but hopefully/usually is) */ + timestamp = GSTTIME_TO_QTSTREAMTIME (stream, stream->pending_seek->ts); + } else { + timestamp = 0; + } + + gst_ts = QTSTREAMTIME_TO_GSTTIME (stream, timestamp); + GST_INFO_OBJECT (stream->pad, "first sample ts %" GST_TIME_FORMAT, + GST_TIME_ARGS (gst_ts)); } else { /* subsequent fragments extend stream */ timestamp = stream->samples[stream->n_samples - 1].timestamp + stream->samples[stream->n_samples - 1].duration; + + gst_ts = QTSTREAMTIME_TO_GSTTIME (stream, timestamp); + GST_INFO_OBJECT (qtdemux, "first sample ts %" GST_TIME_FORMAT + " (extends previous samples)", GST_TIME_ARGS (gst_ts)); } } + sample = stream->samples + stream->n_samples; for (i = 0; i < samples_count; i++) { guint32 dur, size, sflags, ct; @@ -2613,8 +2852,14 @@ sample++; } + /* Update total duration if needed */ + check_update_duration (qtdemux, QTSTREAMTIME_TO_GSTTIME (stream, timestamp)); + stream->n_samples += samples_count; + if (stream->pending_seek != NULL) + stream->pending_seek = NULL; + return TRUE; fail: @@ -2672,6 +2917,22 @@ } static gboolean +qtdemux_parse_mfhd (GstQTDemux * qtdemux, GstByteReader * mfhd, + guint32 * fragment_number) +{ + if (!gst_byte_reader_skip (mfhd, 4)) + goto fail; + if (!gst_byte_reader_get_uint32_be (mfhd, fragment_number)) + goto fail; + return TRUE; +fail: + { + GST_WARNING_OBJECT (qtdemux, "Failed to parse mfhd atom"); + return FALSE; + } +} + +static gboolean qtdemux_parse_tfhd (GstQTDemux * qtdemux, GstByteReader * tfhd, QtDemuxStream ** stream, guint32 * default_sample_duration, guint32 * default_sample_size, guint32 * default_sample_flags, @@ -2691,6 +2952,9 @@ if (G_UNLIKELY (!*stream)) goto unknown_stream; + if (flags & TF_DEFAULT_BASE_IS_MOOF) + *base_offset = qtdemux->moof_offset; + if (flags & TF_BASE_DATA_OFFSET) if (!gst_byte_reader_get_uint64_be (tfhd, (guint64 *) base_offset)) goto invalid_track; @@ -2762,14 +3026,303 @@ } } +/* Returns a pointer to a GstStructure containing the properties of + * the stream sample identified by @sample_index. The caller must unref + * the returned object after use. Returns NULL if unsuccessful. */ +static GstStructure * +qtdemux_get_cenc_sample_properties (GstQTDemux * qtdemux, + QtDemuxStream * stream, guint sample_index) +{ + QtDemuxCencSampleSetInfo *info = NULL; + + g_return_val_if_fail (stream != NULL, NULL); + g_return_val_if_fail (stream->protected, NULL); + g_return_val_if_fail (stream->protection_scheme_info != NULL, NULL); + + info = (QtDemuxCencSampleSetInfo *) stream->protection_scheme_info; + + /* Currently, cenc properties for groups of samples are not supported, so + * simply return a copy of the default sample properties */ + return gst_structure_copy (info->default_properties); +} + +/* Parses the sizes of sample auxiliary information contained within a stream, + * as given in a saiz box. Returns array of sample_count guint8 size values, + * or NULL on failure */ +static guint8 * +qtdemux_parse_saiz (GstQTDemux * qtdemux, QtDemuxStream * stream, + GstByteReader * br, guint32 * sample_count) +{ + guint32 flags = 0; + guint8 *info_sizes; + guint8 default_info_size; + + g_return_val_if_fail (qtdemux != NULL, NULL); + g_return_val_if_fail (stream != NULL, NULL); + g_return_val_if_fail (br != NULL, NULL); + g_return_val_if_fail (sample_count != NULL, NULL); + + if (!gst_byte_reader_get_uint32_be (br, &flags)) + return NULL; + + if (flags & 0x1) { + /* aux_info_type and aux_info_type_parameter are ignored */ + if (!gst_byte_reader_skip (br, 8)) + return NULL; + } + + if (!gst_byte_reader_get_uint8 (br, &default_info_size)) + return NULL; + GST_DEBUG_OBJECT (qtdemux, "default_info_size: %u", default_info_size); + + if (!gst_byte_reader_get_uint32_be (br, sample_count)) + return NULL; + GST_DEBUG_OBJECT (qtdemux, "sample_count: %u", *sample_count); + + + if (default_info_size == 0) { + if (!gst_byte_reader_dup_data (br, *sample_count, &info_sizes)) { + return NULL; + } + } else { + info_sizes = g_new (guint8, *sample_count); + memset (info_sizes, default_info_size, *sample_count); + } + + return info_sizes; +} + +/* Parses the offset of sample auxiliary information contained within a stream, + * as given in a saio box. Returns TRUE if successful; FALSE otherwise. */ +static gboolean +qtdemux_parse_saio (GstQTDemux * qtdemux, QtDemuxStream * stream, + GstByteReader * br, guint32 * info_type, guint32 * info_type_parameter, + guint64 * offset) +{ + guint8 version = 0; + guint32 flags = 0; + guint32 aux_info_type = 0; + guint32 aux_info_type_parameter = 0; + guint32 entry_count; + guint32 off_32; + guint64 off_64; + + g_return_val_if_fail (qtdemux != NULL, FALSE); + g_return_val_if_fail (stream != NULL, FALSE); + g_return_val_if_fail (br != NULL, FALSE); + g_return_val_if_fail (offset != NULL, FALSE); + + if (!gst_byte_reader_get_uint8 (br, &version)) + return FALSE; + + if (!gst_byte_reader_get_uint24_be (br, &flags)) + return FALSE; + + if (flags & 0x1) { + if (!gst_byte_reader_get_uint32_be (br, &aux_info_type)) + return FALSE; + if (!gst_byte_reader_get_uint32_be (br, &aux_info_type_parameter)) + return FALSE; + } else if (stream->protected) { + aux_info_type = stream->protection_scheme_type; + } else { + aux_info_type = stream->fourcc; + } + + if (info_type) + *info_type = aux_info_type; + if (info_type_parameter) + *info_type_parameter = aux_info_type_parameter; + + GST_DEBUG_OBJECT (qtdemux, "aux_info_type: '%" GST_FOURCC_FORMAT "', " + "aux_info_type_parameter: %#06x", + GST_FOURCC_ARGS (aux_info_type), aux_info_type_parameter); + + if (!gst_byte_reader_get_uint32_be (br, &entry_count)) + return FALSE; + + if (entry_count != 1) { + GST_ERROR_OBJECT (qtdemux, "multiple offsets are not supported"); + return FALSE; + } + + if (version == 0) { + if (!gst_byte_reader_get_uint32_be (br, &off_32)) + return FALSE; + *offset = (guint64) off_32; + } else { + if (!gst_byte_reader_get_uint64_be (br, &off_64)) + return FALSE; + *offset = off_64; + } + + GST_DEBUG_OBJECT (qtdemux, "offset: %" G_GUINT64_FORMAT, *offset); + return TRUE; +} + +static void +qtdemux_gst_structure_free (GstStructure * gststructure) +{ + if (gststructure) { + gst_structure_free (gststructure); + } +} + +/* Parses auxiliary information relating to samples protected using Common + * Encryption (cenc); the format of this information is defined in + * ISO/IEC 23001-7. Returns TRUE if successful; FALSE otherwise. */ +static gboolean +qtdemux_parse_cenc_aux_info (GstQTDemux * qtdemux, QtDemuxStream * stream, + GstByteReader * br, guint8 * info_sizes, guint32 sample_count) +{ + QtDemuxCencSampleSetInfo *ss_info = NULL; + guint8 size; + gint i; + + g_return_val_if_fail (qtdemux != NULL, FALSE); + g_return_val_if_fail (stream != NULL, FALSE); + g_return_val_if_fail (br != NULL, FALSE); + g_return_val_if_fail (stream->protected, FALSE); + g_return_val_if_fail (stream->protection_scheme_info != NULL, FALSE); + + ss_info = (QtDemuxCencSampleSetInfo *) stream->protection_scheme_info; + + if (ss_info->crypto_info) { + GST_LOG_OBJECT (qtdemux, "unreffing existing crypto_info"); + g_ptr_array_free (ss_info->crypto_info, TRUE); + } + + ss_info->crypto_info = + g_ptr_array_new_full (sample_count, + (GDestroyNotify) qtdemux_gst_structure_free); + + for (i = 0; i < sample_count; ++i) { + GstStructure *properties; + guint16 n_subsamples; + guint8 *data; + guint iv_size; + GstBuffer *buf; + + properties = qtdemux_get_cenc_sample_properties (qtdemux, stream, i); + if (properties == NULL) { + GST_ERROR_OBJECT (qtdemux, "failed to get properties for sample %u", i); + return FALSE; + } + if (!gst_structure_get_uint (properties, "iv_size", &iv_size)) { + GST_ERROR_OBJECT (qtdemux, "failed to get iv_size for sample %u", i); + gst_structure_free (properties); + return FALSE; + } + if (!gst_byte_reader_dup_data (br, iv_size, &data)) { + GST_ERROR_OBJECT (qtdemux, "failed to get IV for sample %u", i); + gst_structure_free (properties); + return FALSE; + } + buf = gst_buffer_new_wrapped (data, iv_size); + gst_structure_set (properties, "iv", GST_TYPE_BUFFER, buf, NULL); + size = info_sizes[i]; + if (size > iv_size) { + if (!gst_byte_reader_get_uint16_be (br, &n_subsamples) + || !(n_subsamples > 0)) { + gst_structure_free (properties); + GST_ERROR_OBJECT (qtdemux, + "failed to get subsample count for sample %u", i); + return FALSE; + } + GST_LOG_OBJECT (qtdemux, "subsample count: %u", n_subsamples); + if (!gst_byte_reader_dup_data (br, n_subsamples * 6, &data)) { + GST_ERROR_OBJECT (qtdemux, "failed to get subsample data for sample %u", + i); + gst_structure_free (properties); + return FALSE; + } + buf = gst_buffer_new_wrapped (data, n_subsamples * 6); + if (!buf) { + gst_structure_free (properties); + return FALSE; + } + gst_structure_set (properties, + "subsample_count", G_TYPE_UINT, n_subsamples, + "subsamples", GST_TYPE_BUFFER, buf, NULL); + } else { + gst_structure_set (properties, "subsample_count", G_TYPE_UINT, 0, NULL); + } + g_ptr_array_add (ss_info->crypto_info, properties); + } + return TRUE; +} + +/* Converts a UUID in raw byte form to a string representation, as defined in + * RFC 4122. The caller takes ownership of the returned string and is + * responsible for freeing it after use. */ +static gchar * +qtdemux_uuid_bytes_to_string (gconstpointer uuid_bytes) +{ + const guint8 *uuid = (const guint8 *) uuid_bytes; + + return g_strdup_printf ("%02x%02x%02x%02x-%02x%02x-%02x%02x-" + "%02x%02x-%02x%02x%02x%02x%02x%02x", + uuid[0], uuid[1], uuid[2], uuid[3], + uuid[4], uuid[5], uuid[6], uuid[7], + uuid[8], uuid[9], uuid[10], uuid[11], + uuid[12], uuid[13], uuid[14], uuid[15]); +} + +/* Parses a Protection System Specific Header box (pssh), as defined in the + * Common Encryption (cenc) standard (ISO/IEC 23001-7), which contains + * information needed by a specific content protection system in order to + * decrypt cenc-protected tracks. Returns TRUE if successful; FALSE + * otherwise. */ +static gboolean +qtdemux_parse_pssh (GstQTDemux * qtdemux, GNode * node) +{ + gchar *sysid_string; + guint32 pssh_size = QT_UINT32 (node->data); + GstBuffer *pssh = NULL; + GstEvent *event = NULL; + guint32 parent_box_type; + gint i; + + if (G_UNLIKELY (pssh_size < 32U)) { + GST_ERROR_OBJECT (qtdemux, "invalid box size"); + return FALSE; + } + + sysid_string = + qtdemux_uuid_bytes_to_string ((const guint8 *) node->data + 12); + + gst_qtdemux_append_protection_system_id (qtdemux, sysid_string); + + pssh = gst_buffer_new_wrapped (g_memdup (node->data, pssh_size), pssh_size); + GST_LOG_OBJECT (qtdemux, "cenc pssh size: %" G_GSIZE_FORMAT, + gst_buffer_get_size (pssh)); + + parent_box_type = QT_FOURCC ((const guint8 *) node->parent->data + 4); + + /* Push an event containing the pssh box onto the queues of all streams. */ + event = gst_event_new_protection (sysid_string, pssh, + (parent_box_type == FOURCC_moov) ? "isobmff/moov" : "isobmff/moof"); + for (i = 0; i < qtdemux->n_streams; ++i) { + g_queue_push_tail (&qtdemux->streams[i]->protection_scheme_event_queue, + gst_event_ref (event)); + } + g_free (sysid_string); + gst_event_unref (event); + gst_buffer_unref (pssh); + return TRUE; +} + static gboolean qtdemux_parse_moof (GstQTDemux * qtdemux, const guint8 * buffer, guint length, guint64 moof_offset, QtDemuxStream * stream) { - GNode *moof_node, *traf_node, *tfhd_node, *trun_node, *tfdt_node; - GstByteReader trun_data, tfhd_data, tfdt_data; + GNode *moof_node, *traf_node, *tfhd_node, *trun_node, *tfdt_node, *mfhd_node; + GstByteReader mfhd_data, trun_data, tfhd_data, tfdt_data; + GNode *saiz_node, *saio_node, *pssh_node; + GstByteReader saiz_data, saio_data; guint32 ds_size = 0, ds_duration = 0, ds_flags = 0; gint64 base_offset, running_offset; + guint32 frag_num; /* NOTE @stream ignored */ @@ -2777,10 +3330,21 @@ qtdemux_parse_node (qtdemux, moof_node, buffer, length); qtdemux_node_dump (qtdemux, moof_node); + /* Get fragment number from mfhd and check it's valid */ + mfhd_node = + qtdemux_tree_get_child_by_type_full (moof_node, FOURCC_mfhd, &mfhd_data); + if (mfhd_node == NULL) + goto missing_mfhd; + if (!qtdemux_parse_mfhd (qtdemux, &mfhd_data, &frag_num)) + goto fail; + GST_DEBUG_OBJECT (qtdemux, "Fragment #%d", frag_num); + /* unknown base_offset to start with */ base_offset = running_offset = -1; traf_node = qtdemux_tree_get_child_by_type (moof_node, FOURCC_traf); while (traf_node) { + guint64 decode_time = 0; + /* Fragment Header node */ tfhd_node = qtdemux_tree_get_child_by_type_full (traf_node, FOURCC_tfhd, @@ -2790,23 +3354,82 @@ if (!qtdemux_parse_tfhd (qtdemux, &tfhd_data, &stream, &ds_duration, &ds_size, &ds_flags, &base_offset)) goto missing_tfhd; + + /* The following code assumes at most a single set of sample auxiliary + * data in the fragment (consisting of a saiz box and a corresponding saio + * box); in theory, however, there could be multiple sets of sample + * auxiliary data in a fragment. */ + saiz_node = + qtdemux_tree_get_child_by_type_full (traf_node, FOURCC_saiz, + &saiz_data); + if (saiz_node) { + guint8 *info_sizes; + guint32 sample_count; + guint32 info_type = 0; + guint64 offset = 0; + guint32 info_type_parameter = 0; + + info_sizes = qtdemux_parse_saiz (qtdemux, stream, &saiz_data, + &sample_count); + if (G_UNLIKELY (info_sizes == NULL)) { + GST_ERROR_OBJECT (qtdemux, "failed to parse saiz box"); + goto fail; + } + saio_node = + qtdemux_tree_get_child_by_type_full (traf_node, FOURCC_saio, + &saio_data); + if (!saio_node) { + GST_ERROR_OBJECT (qtdemux, "saiz box without a corresponding saio box"); + goto fail; + } + + if (G_UNLIKELY (!qtdemux_parse_saio (qtdemux, stream, &saio_data, + &info_type, &info_type_parameter, &offset))) { + GST_ERROR_OBJECT (qtdemux, "failed to parse saio box"); + g_free (info_sizes); + goto fail; + } + if (base_offset > qtdemux->moof_offset) + offset += (guint64) (base_offset - qtdemux->moof_offset); + if (info_type == FOURCC_cenc && info_type_parameter == 0U) { + GstByteReader br; + if (offset > length) { + GST_ERROR_OBJECT (qtdemux, "cenc auxiliary info outside moof " + "boxes is not supported"); + g_free (info_sizes); + goto fail; + } + gst_byte_reader_init (&br, buffer + offset, length - offset); + if (!qtdemux_parse_cenc_aux_info (qtdemux, stream, &br, + info_sizes, sample_count)) { + GST_ERROR_OBJECT (qtdemux, "failed to parse cenc auxiliary info"); + goto fail; + } + } + g_free (info_sizes); + } + tfdt_node = qtdemux_tree_get_child_by_type_full (traf_node, FOURCC_tfdt, &tfdt_data); if (tfdt_node) { - guint64 decode_time = 0; GstClockTime decode_time_ts; + /* We'll use decode_time to interpolate timestamps + * in case the input timestamps are missing */ qtdemux_parse_tfdt (qtdemux, &tfdt_data, &decode_time); - /* FIXME, we can use decode_time to interpolate timestamps - * in case the input timestamps are missing */ - decode_time_ts = gst_util_uint64_scale (decode_time, GST_SECOND, - stream->timescale); + decode_time_ts = QTSTREAMTIME_TO_GSTTIME (stream, decode_time); - GST_DEBUG_OBJECT (qtdemux, "decode time %" G_GUINT64_FORMAT + GST_DEBUG_OBJECT (qtdemux, "decode time %" G_GINT64_FORMAT " (%" GST_TIME_FORMAT ")", decode_time, GST_TIME_ARGS (decode_time_ts)); + + /* Discard the fragment buffer timestamp info to avoid using it. + * Rely on tfdt instead as it is more accurate than the timestamp + * that is fetched from a manifest/playlist and is usually + * less accurate. */ + qtdemux->fragment_start = -1; } if (G_UNLIKELY (!stream)) { @@ -2817,6 +3440,10 @@ } if (G_UNLIKELY (base_offset < -1)) goto lost_offset; + + if (qtdemux->upstream_format_is_time) + gst_qtdemux_stream_flush_samples_data (qtdemux, stream); + /* Track Run node */ trun_node = qtdemux_tree_get_child_by_type_full (traf_node, FOURCC_trun, @@ -2824,7 +3451,7 @@ while (trun_node) { qtdemux_parse_trun (qtdemux, &trun_data, stream, ds_duration, ds_size, ds_flags, moof_offset, length, &base_offset, - &running_offset); + &running_offset, decode_time); /* iterate all siblings */ trun_node = qtdemux_tree_get_sibling_by_type_full (trun_node, FOURCC_trun, &trun_data); @@ -2837,6 +3464,15 @@ /* iterate all siblings */ traf_node = qtdemux_tree_get_sibling_by_type (traf_node, FOURCC_traf); } + + /* parse any protection system info */ + pssh_node = qtdemux_tree_get_child_by_type (moof_node, FOURCC_pssh); + while (pssh_node) { + GST_LOG_OBJECT (qtdemux, "Parsing pssh box."); + qtdemux_parse_pssh (qtdemux, pssh_node); + pssh_node = qtdemux_tree_get_sibling_by_type (pssh_node, FOURCC_pssh); + } + g_node_destroy (moof_node); return TRUE; @@ -2845,6 +3481,11 @@ GST_DEBUG_OBJECT (qtdemux, "missing tfhd box"); goto fail; } +missing_mfhd: + { + GST_DEBUG_OBJECT (qtdemux, "Missing mfhd box"); + goto fail; + } lost_offset: { GST_DEBUG_OBJECT (qtdemux, "lost offset"); @@ -2859,44 +3500,53 @@ } } +#if 0 /* might be used if some day we actually use mfra & co * for random access to fragments, * but that will require quite some modifications and much less relying * on a sample array */ -#if 0 +#endif + static gboolean -qtdemux_parse_tfra (GstQTDemux * qtdemux, GNode * tfra_node, - QtDemuxStream * stream) +qtdemux_parse_tfra (GstQTDemux * qtdemux, GNode * tfra_node) { - guint64 time = 0, moof_offset = 0; + QtDemuxStream *stream; guint32 ver_flags, track_id, len, num_entries, i; guint value_size, traf_size, trun_size, sample_size; + guint64 time = 0, moof_offset = 0; +#if 0 GstBuffer *buf = NULL; GstFlowReturn ret; +#endif GstByteReader tfra; - gst_byte_reader_init (&tfra, (guint8 *) tfra_node->data + (4 + 4), - QT_UINT32 ((guint8 *) tfra_node->data) - (4 + 4)); + gst_byte_reader_init (&tfra, tfra_node->data, QT_UINT32 (tfra_node->data)); - if (!gst_byte_reader_get_uint32_be (&tfra, &ver_flags)) + if (!gst_byte_reader_skip (&tfra, 8)) return FALSE; - if (!(gst_byte_reader_get_uint32_be (&tfra, &track_id) && - gst_byte_reader_get_uint32_be (&tfra, &len) && - gst_byte_reader_get_uint32_be (&tfra, &num_entries))) + if (!gst_byte_reader_get_uint32_be (&tfra, &ver_flags)) return FALSE; - GST_LOG_OBJECT (qtdemux, "id %d == stream id %d ?", - track_id, stream->track_id); - if (track_id != stream->track_id) { + if (!gst_byte_reader_get_uint32_be (&tfra, &track_id) + || !gst_byte_reader_get_uint32_be (&tfra, &len) + || !gst_byte_reader_get_uint32_be (&tfra, &num_entries)) return FALSE; - } + + GST_DEBUG_OBJECT (qtdemux, "parsing tfra box for track id %u", track_id); + + stream = qtdemux_find_stream (qtdemux, track_id); + if (stream == NULL) + goto unknown_trackid; value_size = ((ver_flags >> 24) == 1) ? sizeof (guint64) : sizeof (guint32); sample_size = (len & 3) + 1; trun_size = ((len & 12) >> 2) + 1; traf_size = ((len & 48) >> 4) + 1; + GST_DEBUG_OBJECT (qtdemux, "%u entries, sizes: value %u, traf %u, trun %u, " + "sample %u", num_entries, value_size, traf_size, trun_size, sample_size); + if (num_entries == 0) goto no_samples; @@ -2904,6 +3554,10 @@ value_size + value_size + traf_size + trun_size + sample_size)) goto corrupt_file; + g_free (stream->ra_entries); + stream->ra_entries = g_new (QtDemuxRandomAccessEntry, num_entries); + stream->n_ra_entries = num_entries; + for (i = 0; i < num_entries; i++) { qt_atom_parser_get_offset (&tfra, value_size, &time); qt_atom_parser_get_offset (&tfra, value_size, &moof_offset); @@ -2911,26 +3565,38 @@ qt_atom_parser_get_uint_with_size_unchecked (&tfra, trun_size); qt_atom_parser_get_uint_with_size_unchecked (&tfra, sample_size); - GST_LOG_OBJECT (qtdemux, - "fragment time: %" GST_TIME_FORMAT " moof_offset: %u", - GST_TIME_ARGS (gst_util_uint64_scale (time, GST_SECOND, - stream->timescale)), moof_offset); + time = QTSTREAMTIME_TO_GSTTIME (stream, time); + + GST_LOG_OBJECT (qtdemux, "fragment time: %" GST_TIME_FORMAT ", " + " moof_offset: %" G_GUINT64_FORMAT, GST_TIME_ARGS (time), moof_offset); + stream->ra_entries[i].ts = time; + stream->ra_entries[i].moof_offset = moof_offset; + + /* don't want to go through the entire file and read all moofs at startup */ +#if 0 ret = gst_qtdemux_pull_atom (qtdemux, moof_offset, 0, &buf); if (ret != GST_FLOW_OK) goto corrupt_file; qtdemux_parse_moof (qtdemux, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf), moof_offset, stream); gst_buffer_unref (buf); +#endif } + check_update_duration (qtdemux, time); + return TRUE; /* ERRORS */ +unknown_trackid: + { + GST_WARNING_OBJECT (qtdemux, "Couldn't find stream for track %u", track_id); + return FALSE; + } corrupt_file: { - GST_ELEMENT_ERROR (qtdemux, STREAM, DECODE, - (_("This file is corrupt and cannot be played.")), (NULL)); + GST_WARNING_OBJECT (qtdemux, "broken traf box, ignoring"); return FALSE; } no_samples: @@ -2941,106 +3607,113 @@ } static gboolean -qtdemux_parse_mfra (GstQTDemux * qtdemux, QtDemuxStream * stream) +qtdemux_pull_mfro_mfra (GstQTDemux * qtdemux) { - GstFlowReturn ret; + GstMapInfo mfro_map = GST_MAP_INFO_INIT; + GstMapInfo mfra_map = GST_MAP_INFO_INIT; + GstBuffer *mfro = NULL, *mfra = NULL; + GstFlowReturn flow; + gboolean ret = FALSE; GNode *mfra_node, *tfra_node; - GstBuffer *buffer; + guint64 mfra_offset = 0; + guint32 fourcc, mfra_size; + gint64 len; - if (!qtdemux->mfra_offset) - return FALSE; + /* query upstream size in bytes */ + if (!gst_pad_peer_query_duration (qtdemux->sinkpad, GST_FORMAT_BYTES, &len)) + goto size_query_failed; + + /* mfro box should be at the very end of the file */ + flow = gst_qtdemux_pull_atom (qtdemux, len - 16, 16, &mfro); + if (flow != GST_FLOW_OK) + goto exit; - ret = gst_qtdemux_pull_atom (qtdemux, qtdemux->mfra_offset, 0, &buffer); - if (ret != GST_FLOW_OK) - goto corrupt_file; + gst_buffer_map (mfro, &mfro_map, GST_MAP_READ); + + fourcc = QT_FOURCC (mfro_map.data + 4); + if (fourcc != FOURCC_mfro) + goto exit; - mfra_node = g_node_new ((guint8 *) GST_BUFFER_DATA (buffer)); - qtdemux_parse_node (qtdemux, mfra_node, GST_BUFFER_DATA (buffer), - GST_BUFFER_SIZE (buffer)); + GST_INFO_OBJECT (qtdemux, "Found mfro box"); + if (mfro_map.size < 16) + goto invalid_mfro_size; + + mfra_size = QT_UINT32 (mfro_map.data + 12); + if (mfra_size >= len) + goto invalid_mfra_size; + + mfra_offset = len - mfra_size; + + GST_INFO_OBJECT (qtdemux, "mfra offset: %" G_GUINT64_FORMAT ", size %u", + mfra_offset, mfra_size); + + /* now get and parse mfra box */ + flow = gst_qtdemux_pull_atom (qtdemux, mfra_offset, mfra_size, &mfra); + if (flow != GST_FLOW_OK) + goto broken_file; + + gst_buffer_map (mfra, &mfra_map, GST_MAP_READ); + + mfra_node = g_node_new ((guint8 *) mfra_map.data); + qtdemux_parse_node (qtdemux, mfra_node, mfra_map.data, mfra_map.size); tfra_node = qtdemux_tree_get_child_by_type (mfra_node, FOURCC_tfra); while (tfra_node) { - qtdemux_parse_tfra (qtdemux, tfra_node, stream); + qtdemux_parse_tfra (qtdemux, tfra_node); /* iterate all siblings */ tfra_node = qtdemux_tree_get_sibling_by_type (tfra_node, FOURCC_tfra); } g_node_destroy (mfra_node); - gst_buffer_unref (buffer); - return TRUE; + GST_INFO_OBJECT (qtdemux, "parsed movie fragment random access box (mfra)"); + ret = TRUE; -corrupt_file: - { - GST_ELEMENT_ERROR (qtdemux, STREAM, DECODE, - (_("This file is corrupt and cannot be played.")), (NULL)); - return FALSE; - } -} +exit: -static GstFlowReturn -qtdemux_parse_mfro (GstQTDemux * qtdemux, guint64 * mfra_offset, - guint32 * mfro_size) -{ - GstFlowReturn ret = GST_FLOW_ERROR; - GstBuffer *mfro = NULL; - guint32 fourcc; - gint64 len; - GstFormat fmt = GST_FORMAT_BYTES; + if (mfro) { + if (mfro_map.memory != NULL) + gst_buffer_unmap (mfro, &mfro_map); + gst_buffer_unref (mfro); + } + if (mfra) { + if (mfra_map.memory != NULL) + gst_buffer_unmap (mfra, &mfra_map); + gst_buffer_unref (mfra); + } + return ret; - if (!gst_pad_peer_query_duration (qtdemux->sinkpad, &fmt, &len)) { - GST_DEBUG_OBJECT (qtdemux, "upstream size not available; " - "can not locate mfro"); +/* ERRORS */ +size_query_failed: + { + GST_WARNING_OBJECT (qtdemux, "could not query upstream size"); goto exit; } - - ret = gst_qtdemux_pull_atom (qtdemux, len - 16, 16, &mfro); - if (ret != GST_FLOW_OK) +invalid_mfro_size: + { + GST_WARNING_OBJECT (qtdemux, "mfro size is too small"); goto exit; - - fourcc = QT_FOURCC (GST_BUFFER_DATA (mfro) + 4); - if (fourcc != FOURCC_mfro) + } +invalid_mfra_size: + { + GST_WARNING_OBJECT (qtdemux, "mfra_size in mfro box is invalid"); + goto exit; + } +broken_file: + { + GST_WARNING_OBJECT (qtdemux, "bogus mfra offset or size, broken file"); goto exit; - - GST_INFO_OBJECT (qtdemux, "Found mfro atom: fragmented mp4 container"); - if (GST_BUFFER_SIZE (mfro) >= 16) { - GST_DEBUG_OBJECT (qtdemux, "parsing 'mfro' atom"); - *mfro_size = QT_UINT32 (GST_BUFFER_DATA (mfro) + 12); - if (*mfro_size >= len) { - GST_WARNING_OBJECT (qtdemux, "mfro.size is invalid"); - ret = GST_FLOW_ERROR; - goto exit; - } - *mfra_offset = len - *mfro_size; } - -exit: - if (mfro) - gst_buffer_unref (mfro); - - return ret; } -static void -qtdemux_parse_fragmented (GstQTDemux * qtdemux) +static guint64 +add_offset (guint64 offset, guint64 advance) { - GstFlowReturn ret; - guint32 mfra_size = 0; - guint64 mfra_offset = 0; - - /* default */ - qtdemux->fragmented = FALSE; - - /* We check here if it is a fragmented mp4 container */ - ret = qtdemux_parse_mfro (qtdemux, &mfra_offset, &mfra_size); - if (ret == GST_FLOW_OK && mfra_size != 0 && mfra_offset != 0) { - qtdemux->fragmented = TRUE; - GST_DEBUG_OBJECT (qtdemux, - "mfra atom expected at offset %" G_GUINT64_FORMAT, mfra_offset); - qtdemux->mfra_offset = mfra_offset; - } + /* Avoid 64-bit overflow by clamping */ + if (offset > G_MAXUINT64 - advance) + return G_MAXUINT64; + return offset + advance; } -#endif static GstFlowReturn gst_qtdemux_loop_state_header (GstQTDemux * qtdemux) @@ -3077,7 +3750,17 @@ if (!qtdemux->moof_offset) { qtdemux->moof_offset = qtdemux->offset; } - /* fall-through */ + if (qtdemux_pull_mfro_mfra (qtdemux)) { + /* FIXME */ + } else { + qtdemux->offset += length; /* skip moof and keep going */ + } + if (qtdemux->got_moov) { + GST_INFO_OBJECT (qtdemux, "moof header, got moov, done with headers"); + ret = GST_FLOW_EOS; + goto beach; + } + break; case FOURCC_mdat: case FOURCC_free: case FOURCC_wide: @@ -3087,7 +3770,7 @@ GST_LOG_OBJECT (qtdemux, "skipping atom '%" GST_FOURCC_FORMAT "' at %" G_GUINT64_FORMAT, GST_FOURCC_ARGS (fourcc), cur_offset); - qtdemux->offset += length; + qtdemux->offset = add_offset (qtdemux->offset, length); break; } case FOURCC_moov: @@ -3096,7 +3779,7 @@ if (qtdemux->got_moov) { GST_DEBUG_OBJECT (qtdemux, "Skipping moov atom as we have one already"); - qtdemux->offset += length; + qtdemux->offset = add_offset (qtdemux->offset, length); goto beach; } @@ -3185,6 +3868,19 @@ gst_buffer_unref (uuid); break; } + case FOURCC_sidx: + { + GstBuffer *sidx = NULL; + ret = gst_qtdemux_pull_atom (qtdemux, cur_offset, length, &sidx); + if (ret != GST_FLOW_OK) + goto beach; + qtdemux->offset += length; + gst_buffer_map (sidx, &map, GST_MAP_READ); + qtdemux_parse_sidx (qtdemux, map.data, map.size); + gst_buffer_unmap (sidx, &map); + gst_buffer_unref (sidx); + break; + } default: { GstBuffer *unknown = NULL; @@ -3229,10 +3925,11 @@ guint8 n = 0; guint32 seg_idx = 0, k_index = 0; guint32 ref_seg_idx, ref_k_index; - guint64 k_pos = 0, last_stop = 0; + GstClockTime k_pos = 0, last_stop = 0; QtDemuxSegment *seg = NULL; QtDemuxStream *ref_str = NULL; guint64 seg_media_start_mov; /* segment media start time in mov format */ + guint64 target_ts; /* Now we choose an arbitrary stream, get the previous keyframe timestamp * and finally align all the other streams on that timestamp with their @@ -3240,14 +3937,7 @@ for (n = 0; n < qtdemux->n_streams; n++) { QtDemuxStream *str = qtdemux->streams[n]; - seg_idx = gst_qtdemux_find_segment (qtdemux, str, - qtdemux->segment.position); - - /* segment not found, continue with normal flow */ - if (seg_idx == -1) - continue; - - /* No candidate yet, take that one */ + /* No candidate yet, take the first stream */ if (!ref_str) { ref_str = str; continue; @@ -3283,34 +3973,44 @@ k_index = 0; } + target_ts = + ref_str->samples[k_index].timestamp + + ref_str->samples[k_index].pts_offset; + /* get current segment for that stream */ seg = &ref_str->segments[ref_str->segment_index]; - /* convert seg->media_start to mov format time for timestamp comparison */ - seg_media_start_mov = - gst_util_uint64_scale (seg->media_start, ref_str->timescale, GST_SECOND); + /* Use segment start in original timescale for comparisons */ + seg_media_start_mov = seg->trak_media_start; + + GST_LOG_OBJECT (qtdemux, "keyframe index %u ts %" G_GUINT64_FORMAT + " seg start %" G_GUINT64_FORMAT " %" GST_TIME_FORMAT "\n", + k_index, target_ts, seg_media_start_mov, + GST_TIME_ARGS (seg->media_start)); + /* Crawl back through segments to find the one containing this I frame */ - while (ref_str->samples[k_index].timestamp < seg_media_start_mov) { - GST_DEBUG_OBJECT (qtdemux, "keyframe position is out of segment %u", - ref_str->segment_index); + while (target_ts < seg_media_start_mov) { + GST_DEBUG_OBJECT (qtdemux, + "keyframe position (sample %u) is out of segment %u " " target %" + G_GUINT64_FORMAT " seg start %" G_GUINT64_FORMAT, k_index, + ref_str->segment_index, target_ts, seg_media_start_mov); + if (G_UNLIKELY (!ref_str->segment_index)) { /* Reached first segment, let's consider it's EOS */ goto eos; } ref_str->segment_index--; seg = &ref_str->segments[ref_str->segment_index]; - /* convert seg->media_start to mov format time for timestamp comparison */ - seg_media_start_mov = - gst_util_uint64_scale (seg->media_start, ref_str->timescale, - GST_SECOND); + /* Use segment start in original timescale for comparisons */ + seg_media_start_mov = seg->trak_media_start; } /* Calculate time position of the keyframe and where we should stop */ k_pos = - (gst_util_uint64_scale (ref_str->samples[k_index].timestamp, GST_SECOND, - ref_str->timescale) - seg->media_start) + seg->time; + QTSTREAMTIME_TO_GSTTIME (ref_str, + target_ts - seg->trak_media_start) + seg->time; last_stop = - gst_util_uint64_scale (ref_str->samples[ref_str->from_sample].timestamp, - GST_SECOND, ref_str->timescale); - last_stop = (last_stop - seg->media_start) + seg->time; + QTSTREAMTIME_TO_GSTTIME (ref_str, + ref_str->samples[ref_str->from_sample].timestamp - + seg->trak_media_start) + seg->time; GST_DEBUG_OBJECT (qtdemux, "preferred stream played from sample %u, " "now going to sample %u (pts %" GST_TIME_FORMAT ")", ref_str->from_sample, @@ -3332,7 +4032,7 @@ /* Align them all on this */ for (n = 0; n < qtdemux->n_streams; n++) { guint32 index = 0; - guint64 media_start = 0, seg_time = 0; + GstClockTime seg_time = 0; QtDemuxStream *str = qtdemux->streams[n]; /* aligning reference stream again might lead to backing up to yet another @@ -3342,27 +4042,28 @@ seg_idx = ref_seg_idx; seg = &str->segments[seg_idx]; k_index = ref_k_index; - GST_DEBUG_OBJECT (qtdemux, "reference stream segment %d, " - "sample at index %d", ref_str->segment_index, k_index); + GST_DEBUG_OBJECT (qtdemux, "reference stream %d segment %d, " + "sample at index %d", n, ref_str->segment_index, k_index); } else { seg_idx = gst_qtdemux_find_segment (qtdemux, str, k_pos); - GST_DEBUG_OBJECT (qtdemux, "align segment %d", seg_idx); - - /* segment not found, continue with normal flow */ - if (seg_idx == -1) - continue; + GST_DEBUG_OBJECT (qtdemux, + "stream %d align segment %d for keyframe pos %" GST_TIME_FORMAT, n, + seg_idx, GST_TIME_ARGS (k_pos)); /* get segment and time in the segment */ seg = &str->segments[seg_idx]; seg_time = k_pos - seg->time; - /* get the media time in the segment */ - media_start = seg->media_start + seg_time; + /* get the media time in the segment. + * No adjustment for empty "filler" segments */ + if (seg->media_start != GST_CLOCK_TIME_NONE) + seg_time += seg->media_start; /* get the index of the sample with media time */ - index = gst_qtdemux_find_index_linear (qtdemux, str, media_start); - GST_DEBUG_OBJECT (qtdemux, "sample for %" GST_TIME_FORMAT " at %u", - GST_TIME_ARGS (media_start), index); + index = gst_qtdemux_find_index_linear (qtdemux, str, seg_time); + GST_DEBUG_OBJECT (qtdemux, + "stream %d sample for %" GST_TIME_FORMAT " at %u", n, + GST_TIME_ARGS (seg_time), index); /* find previous keyframe */ k_index = gst_qtdemux_find_keyframe (qtdemux, str, index); @@ -3371,13 +4072,16 @@ /* Remember until where we want to go */ str->to_sample = str->from_sample - 1; /* Define our time position */ - str->time_position = - (gst_util_uint64_scale (str->samples[k_index].timestamp, GST_SECOND, - str->timescale) - seg->media_start) + seg->time; + target_ts = + str->samples[k_index].timestamp + str->samples[k_index].pts_offset; + str->time_position = QTSTREAMTIME_TO_GSTTIME (str, target_ts) + seg->time; + if (seg->media_start != GST_CLOCK_TIME_NONE) + str->time_position -= seg->media_start; + /* Now seek back in time */ gst_qtdemux_move_stream (qtdemux, str, k_index); - GST_DEBUG_OBJECT (qtdemux, "keyframe at %u, time position %" - GST_TIME_FORMAT " playing from sample %u to %u", k_index, + GST_DEBUG_OBJECT (qtdemux, "stream %d keyframe at %u, time position %" + GST_TIME_FORMAT " playing from sample %u to %u", n, k_index, GST_TIME_ARGS (str->time_position), str->from_sample, str->to_sample); } @@ -3393,20 +4097,22 @@ * This will push out a NEWSEGMENT event with the right values and * position the stream index to the first decodable sample before * @offset. + * + * PULL-BASED */ static gboolean gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, - guint32 seg_idx, guint64 offset) + guint32 seg_idx, GstClockTime offset) { GstEvent *event; QtDemuxSegment *segment; guint32 index, kf_index; - guint64 seg_time; - guint64 start, stop, time; + GstClockTime seg_time; + GstClockTime start, stop, time; gdouble rate; - GST_LOG_OBJECT (qtdemux, "activate segment %d, offset %" G_GUINT64_FORMAT, - seg_idx, offset); + GST_LOG_OBJECT (stream->pad, "activate segment %d, offset %" GST_TIME_FORMAT, + seg_idx, GST_TIME_ARGS (offset)); /* update the current segment */ stream->segment_index = seg_idx; @@ -3415,30 +4121,32 @@ segment = &stream->segments[seg_idx]; if (G_UNLIKELY (offset < segment->time)) { - GST_WARNING_OBJECT (qtdemux, "offset < segment->time %" G_GUINT64_FORMAT, - segment->time); + GST_WARNING_OBJECT (stream->pad, "offset < segment->time %" GST_TIME_FORMAT, + GST_TIME_ARGS (segment->time)); return FALSE; } /* segment lies beyond total indicated duration */ - if (G_UNLIKELY (qtdemux->segment.duration != -1 && + if (G_UNLIKELY (qtdemux->segment.duration != GST_CLOCK_TIME_NONE && segment->time > qtdemux->segment.duration)) { - GST_WARNING_OBJECT (qtdemux, "file duration %" G_GINT64_FORMAT - " < segment->time %" G_GUINT64_FORMAT, qtdemux->segment.duration, - segment->time); + GST_WARNING_OBJECT (stream->pad, "file duration %" GST_TIME_FORMAT + " < segment->time %" GST_TIME_FORMAT, + GST_TIME_ARGS (qtdemux->segment.duration), + GST_TIME_ARGS (segment->time)); return FALSE; } /* get time in this segment */ seg_time = offset - segment->time; - GST_LOG_OBJECT (qtdemux, "seg_time %" GST_TIME_FORMAT, + GST_LOG_OBJECT (stream->pad, "seg_time %" GST_TIME_FORMAT, GST_TIME_ARGS (seg_time)); if (G_UNLIKELY (seg_time > segment->duration)) { - GST_LOG_OBJECT (qtdemux, "seg_time > segment->duration %" GST_TIME_FORMAT, + GST_LOG_OBJECT (stream->pad, + "seg_time > segment->duration %" GST_TIME_FORMAT, GST_TIME_ARGS (segment->duration)); - return FALSE; + seg_time = segment->duration; } /* qtdemux->segment.stop is in outside-time-realm, whereas @@ -3448,9 +4156,9 @@ * into the track-time-realm */ stop = qtdemux->segment.stop; - if (stop == -1) + if (stop == GST_CLOCK_TIME_NONE) stop = qtdemux->segment.duration; - if (stop == -1) + if (stop == GST_CLOCK_TIME_NONE) stop = segment->media_stop; else stop = @@ -3459,15 +4167,14 @@ if (G_UNLIKELY (QTSEGMENT_IS_EMPTY (segment))) { start = segment->time + seg_time; time = offset; + stop = start - seg_time + segment->duration; } else if (qtdemux->segment.rate >= 0) { start = MIN (segment->media_start + seg_time, stop); time = offset; } else { if (segment->media_start >= qtdemux->segment.start) { - start = segment->media_start; time = segment->time; } else { - start = qtdemux->segment.start; time = segment->time + (qtdemux->segment.start - segment->media_start); } @@ -3475,59 +4182,74 @@ stop = MIN (segment->media_start + seg_time, stop); } - GST_DEBUG_OBJECT (qtdemux, "newsegment %d from %" GST_TIME_FORMAT + GST_DEBUG_OBJECT (stream->pad, "new segment %d from %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT ", time %" GST_TIME_FORMAT, seg_idx, GST_TIME_ARGS (start), GST_TIME_ARGS (stop), GST_TIME_ARGS (time)); /* combine global rate with that of the segment */ rate = segment->rate * qtdemux->segment.rate; + /* Copy flags from main segment */ + stream->segment.flags = qtdemux->segment.flags; + /* update the segment values used for clipping */ - /* accumulate previous segments */ - if (GST_CLOCK_TIME_IS_VALID (stream->segment.stop)) - stream->segment.base += (stream->segment.stop - stream->segment.start) / - ABS (stream->segment.rate); + stream->segment.offset = qtdemux->segment.offset; + stream->segment.base = qtdemux->segment.base + stream->accumulated_base; + stream->segment.applied_rate = qtdemux->segment.applied_rate; stream->segment.rate = rate; - stream->segment.start = start; - stream->segment.stop = stop; + stream->segment.start = start + QTSTREAMTIME_TO_GSTTIME (stream, + stream->cslg_shift); + stream->segment.stop = stop + QTSTREAMTIME_TO_GSTTIME (stream, + stream->cslg_shift); stream->segment.time = time; - stream->segment.position = start; - stream->segment.base = - segment->time > - qtdemux->segment_base ? segment->time - qtdemux->segment_base : 0; + stream->segment.position = stream->segment.start; + + GST_DEBUG_OBJECT (stream->pad, "New segment: %" GST_SEGMENT_FORMAT, + &stream->segment); /* now prepare and send the segment */ if (stream->pad) { event = gst_event_new_segment (&stream->segment); if (stream->segment_seqnum) { gst_event_set_seqnum (event, stream->segment_seqnum); - stream->segment_seqnum = 0; } gst_pad_push_event (stream->pad, event); + /* assume we can send more data now */ + GST_PAD_LAST_FLOW_RETURN (stream->pad) = GST_FLOW_OK; /* clear to send tags on this pad now */ gst_qtdemux_push_tags (qtdemux, stream); } + /* in the fragmented case, we pick a fragment that starts before our + * desired position and rely on downstream to wait for a keyframe + * (FIXME: doesn't seem to work so well with ismv and wmv, as no parser; the + * tfra entries tells us which trun/sample the key unit is in, but we don't + * make use of this additional information at the moment) */ + if (qtdemux->fragmented) { + stream->to_sample = G_MAXUINT32; + return TRUE; + } + /* and move to the keyframe before the indicated media time of the * segment */ if (G_LIKELY (!QTSEGMENT_IS_EMPTY (segment))) { if (qtdemux->segment.rate >= 0) { index = gst_qtdemux_find_index_linear (qtdemux, stream, start); stream->to_sample = G_MAXUINT32; - GST_DEBUG_OBJECT (qtdemux, "moving data pointer to %" GST_TIME_FORMAT - ", index: %u, pts %" GST_TIME_FORMAT, GST_TIME_ARGS (start), index, - GST_TIME_ARGS (gst_util_uint64_scale (stream-> - samples[index].timestamp, GST_SECOND, stream->timescale))); + GST_DEBUG_OBJECT (stream->pad, + "moving data pointer to %" GST_TIME_FORMAT ", index: %u, pts %" + GST_TIME_FORMAT, GST_TIME_ARGS (start), index, + GST_TIME_ARGS (QTSAMPLE_PTS (stream, &stream->samples[index]))); } else { index = gst_qtdemux_find_index_linear (qtdemux, stream, stop); stream->to_sample = index; - GST_DEBUG_OBJECT (qtdemux, "moving data pointer to %" GST_TIME_FORMAT - ", index: %u, pts %" GST_TIME_FORMAT, GST_TIME_ARGS (stop), index, - GST_TIME_ARGS (gst_util_uint64_scale (stream-> - samples[index].timestamp, GST_SECOND, stream->timescale))); + GST_DEBUG_OBJECT (stream->pad, + "moving data pointer to %" GST_TIME_FORMAT ", index: %u, pts %" + GST_TIME_FORMAT, GST_TIME_ARGS (stop), index, + GST_TIME_ARGS (QTSAMPLE_PTS (stream, &stream->samples[index]))); } } else { - GST_DEBUG_OBJECT (qtdemux, "No need to look for keyframe, " + GST_DEBUG_OBJECT (stream->pad, "No need to look for keyframe, " "this is an empty segment"); return TRUE; } @@ -3539,7 +4261,7 @@ /* we're at the right spot */ if (index == stream->sample_index) { - GST_DEBUG_OBJECT (qtdemux, "we are at the right index"); + GST_DEBUG_OBJECT (stream->pad, "we are at the right index"); return TRUE; } @@ -3555,26 +4277,22 @@ if (index > stream->sample_index) { /* moving forwards check if we move past a keyframe */ if (kf_index > stream->sample_index) { - GST_DEBUG_OBJECT (qtdemux, - "moving forwards to keyframe at %u (pts %" GST_TIME_FORMAT, kf_index, - GST_TIME_ARGS (gst_util_uint64_scale ( - stream->samples[kf_index].timestamp, - GST_SECOND, stream->timescale))); + GST_DEBUG_OBJECT (stream->pad, + "moving forwards to keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" )", kf_index, + GST_TIME_ARGS (QTSAMPLE_PTS(stream, &stream->samples[kf_index])), + GST_TIME_ARGS (QTSAMPLE_DTS(stream, &stream->samples[kf_index]))); gst_qtdemux_move_stream (qtdemux, stream, kf_index); } else { - GST_DEBUG_OBJECT (qtdemux, - "moving forwards, keyframe at %u (pts %" GST_TIME_FORMAT - " already sent", kf_index, - GST_TIME_ARGS (gst_util_uint64_scale ( - stream->samples[kf_index].timestamp, - GST_SECOND, stream->timescale))); + GST_DEBUG_OBJECT (stream->pad, + "moving forwards, keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" ) already sent", kf_index, + GST_TIME_ARGS (QTSAMPLE_PTS (stream, &stream->samples[kf_index])), + GST_TIME_ARGS (QTSAMPLE_DTS (stream, &stream->samples[kf_index]))); } } else { - GST_DEBUG_OBJECT (qtdemux, - "moving backwards to keyframe at %u (pts %" GST_TIME_FORMAT, kf_index, - GST_TIME_ARGS (gst_util_uint64_scale ( - stream->samples[kf_index].timestamp, - GST_SECOND, stream->timescale))); + GST_DEBUG_OBJECT (stream->pad, + "moving backwards to keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" )", kf_index, + GST_TIME_ARGS (QTSAMPLE_PTS(stream, &stream->samples[kf_index])), + GST_TIME_ARGS (QTSAMPLE_DTS(stream, &stream->samples[kf_index]))); gst_qtdemux_move_stream (qtdemux, stream, kf_index); } @@ -3588,20 +4306,23 @@ * This function will also prepare and send the segment when needed. * * Return FALSE if the stream is EOS. + * + * PULL-BASED */ static gboolean gst_qtdemux_prepare_current_sample (GstQTDemux * qtdemux, QtDemuxStream * stream, gboolean * empty, guint64 * offset, guint * size, - guint64 * dts, guint64 * pts, guint64 * duration, gboolean * keyframe) + GstClockTime * dts, GstClockTime * pts, GstClockTime * duration, + gboolean * keyframe) { QtDemuxSample *sample; - guint64 time_position; + GstClockTime time_position; guint32 seg_idx; g_return_val_if_fail (stream != NULL, FALSE); time_position = stream->time_position; - if (G_UNLIKELY (time_position == -1)) + if (G_UNLIKELY (time_position == GST_CLOCK_TIME_NONE)) goto eos; seg_idx = stream->segment_index; @@ -3609,18 +4330,14 @@ /* find segment corresponding to time_position if we are looking * for a segment. */ seg_idx = gst_qtdemux_find_segment (qtdemux, stream, time_position); - - /* nothing found, we're really eos */ - if (seg_idx == -1) - goto eos; } /* different segment, activate it, sample_index will be set. */ if (G_UNLIKELY (stream->segment_index != seg_idx)) gst_qtdemux_activate_segment (qtdemux, stream, seg_idx, time_position); - if (G_UNLIKELY (QTSEGMENT_IS_EMPTY (&stream-> - segments[stream->segment_index]))) { + if (G_UNLIKELY (QTSEGMENT_IS_EMPTY (&stream->segments[stream-> + segment_index]))) { QtDemuxSegment *seg = &stream->segments[stream->segment_index]; GST_LOG_OBJECT (qtdemux, "Empty segment activated," @@ -3635,11 +4352,29 @@ *empty = FALSE; + if (stream->sample_index == -1) + stream->sample_index = 0; + GST_LOG_OBJECT (qtdemux, "segment active, index = %u of %u", stream->sample_index, stream->n_samples); - if (G_UNLIKELY (stream->sample_index >= stream->n_samples)) - goto eos; + if (G_UNLIKELY (stream->sample_index >= stream->n_samples)) { + if (!qtdemux->fragmented) + goto eos; + + GST_INFO_OBJECT (qtdemux, "out of samples, trying to add more"); + do { + GstFlowReturn flow; + + GST_OBJECT_LOCK (qtdemux); + flow = qtdemux_add_fragmented_samples (qtdemux); + GST_OBJECT_UNLOCK (qtdemux); + + if (flow != GST_FLOW_OK) + goto eos; + } + while (stream->sample_index >= stream->n_samples); + } if (!qtdemux_parse_samples (qtdemux, stream, stream->sample_index)) { GST_LOG_OBJECT (qtdemux, "Parsing of index %u failed!", @@ -3662,7 +4397,7 @@ /* special cases */ eos: { - stream->time_position = -1; + stream->time_position = GST_CLOCK_TIME_NONE; return FALSE; } } @@ -3689,7 +4424,7 @@ /* Mark the stream as EOS */ GST_DEBUG_OBJECT (qtdemux, "reached max allowed sample %u, mark EOS", stream->to_sample); - stream->time_position = -1; + stream->time_position = GST_CLOCK_TIME_NONE; return; } @@ -3711,17 +4446,14 @@ sample = &stream->samples[stream->sample_index]; /* see if we are past the segment */ - if (G_UNLIKELY (gst_util_uint64_scale (sample->timestamp, - GST_SECOND, stream->timescale) >= segment->media_stop)) + if (G_UNLIKELY (QTSAMPLE_DTS (stream, sample) >= segment->media_stop)) goto next_segment; - if (gst_util_uint64_scale (sample->timestamp, GST_SECOND, - stream->timescale) >= segment->media_start) { + if (QTSAMPLE_DTS (stream, sample) >= segment->media_start) { /* inside the segment, update time_position, looks very familiar to * GStreamer segments, doesn't it? */ stream->time_position = - (gst_util_uint64_scale (sample->timestamp, GST_SECOND, - stream->timescale) - segment->media_start) + segment->time; + QTSAMPLE_DTS (stream, sample) - segment->media_start + segment->time; } else { /* not yet in segment, time does not yet increment. This means * that we are still prerolling keyframes to the decoder so it can @@ -3737,12 +4469,19 @@ if (stream->segment_index == stream->n_segments - 1) { /* are we at the end of the last segment, we're EOS */ - stream->time_position = -1; + stream->time_position = GST_CLOCK_TIME_NONE; } else { /* else we're only at the end of the current segment */ stream->time_position = segment->stop_time; } /* make sure we select a new segment */ + + /* accumulate previous segments */ + if (GST_CLOCK_TIME_IS_VALID (stream->segment.stop)) + stream->accumulated_base += + (stream->segment.stop - + stream->segment.start) / ABS (stream->segment.rate); + stream->segment_index = -1; } } @@ -3808,11 +4547,16 @@ * GST_FLOW_EOS: when all pads EOS or NOT_LINKED. */ static GstFlowReturn -gst_qtdemux_combine_flows (GstQTDemux * demux, GstFlowReturn ret) +gst_qtdemux_combine_flows (GstQTDemux * demux, QtDemuxStream * stream, + GstFlowReturn ret) { GST_LOG_OBJECT (demux, "flow return: %s", gst_flow_get_name (ret)); - ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret); + if (stream->pad) + ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, stream->pad, + ret); + else + ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret); GST_LOG_OBJECT (demux, "combined flow return: %s", gst_flow_get_name (ret)); return ret; @@ -4009,8 +4753,8 @@ static GstFlowReturn gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream, GstBuffer * buf, - guint64 dts, guint64 pts, guint64 duration, gboolean keyframe, - guint64 position, guint64 byte_position) + GstClockTime dts, GstClockTime pts, GstClockTime duration, + gboolean keyframe, GstClockTime position, guint64 byte_position) { GstFlowReturn ret = GST_FLOW_OK; @@ -4136,6 +4880,28 @@ GST_TIME_ARGS (pts), GST_TIME_ARGS (duration), GST_PAD_NAME (stream->pad)); + if (stream->protected && stream->protection_scheme_type == FOURCC_cenc) { + GstStructure *crypto_info; + QtDemuxCencSampleSetInfo *info = + (QtDemuxCencSampleSetInfo *) stream->protection_scheme_info; + gint index; + GstEvent *event; + + while ((event = g_queue_pop_head (&stream->protection_scheme_event_queue))) { + gst_pad_push_event (stream->pad, event); + } + + index = stream->sample_index - (stream->n_samples - info->crypto_info->len); + if (G_LIKELY (index >= 0 && index < info->crypto_info->len)) { + /* steal structure from array */ + crypto_info = g_ptr_array_index (info->crypto_info, index); + g_ptr_array_index (info->crypto_info, index) = NULL; + GST_LOG_OBJECT (qtdemux, "attaching cenc metadata [%u]", index); + if (!crypto_info || !gst_buffer_add_protection_meta (buf, crypto_info)) + GST_ERROR_OBJECT (qtdemux, "failed to attach cenc metadata to buffer"); + } + } + ret = gst_pad_push (stream->pad, buf); if (GST_CLOCK_TIME_IS_VALID (pts) && GST_CLOCK_TIME_IS_VALID (duration)) { @@ -4147,17 +4913,108 @@ return ret; } +static const QtDemuxRandomAccessEntry * +gst_qtdemux_stream_seek_fragment (GstQTDemux * qtdemux, QtDemuxStream * stream, + GstClockTime pos, gboolean after) +{ + QtDemuxRandomAccessEntry *entries = stream->ra_entries; + guint n_entries = stream->n_ra_entries; + guint i; + + /* we assume the table is sorted */ + for (i = 0; i < n_entries; ++i) { + if (entries[i].ts > pos) + break; + } + + /* FIXME: maybe save first moof_offset somewhere instead, but for now it's + * probably okay to assume that the index lists the very first fragment */ + if (i == 0) + return &entries[0]; + + if (after) + return &entries[i]; + else + return &entries[i - 1]; +} + +static gboolean +gst_qtdemux_do_fragmented_seek (GstQTDemux * qtdemux) +{ + const QtDemuxRandomAccessEntry *best_entry = NULL; + guint i; + + GST_OBJECT_LOCK (qtdemux); + + g_assert (qtdemux->n_streams > 0); + + for (i = 0; i < qtdemux->n_streams; i++) { + const QtDemuxRandomAccessEntry *entry; + QtDemuxStream *stream; + gboolean is_audio_or_video; + + stream = qtdemux->streams[i]; + + g_free (stream->samples); + stream->samples = NULL; + stream->n_samples = 0; + stream->stbl_index = -1; /* no samples have yet been parsed */ + stream->sample_index = -1; + + if (stream->ra_entries == NULL) + continue; + + if (stream->subtype == FOURCC_vide || stream->subtype == FOURCC_soun) + is_audio_or_video = TRUE; + else + is_audio_or_video = FALSE; + + entry = + gst_qtdemux_stream_seek_fragment (qtdemux, stream, + stream->time_position, !is_audio_or_video); + + GST_INFO_OBJECT (stream->pad, "%" GST_TIME_FORMAT " at offset " + "%" G_GUINT64_FORMAT, GST_TIME_ARGS (entry->ts), entry->moof_offset); + + stream->pending_seek = entry; + + /* decide position to jump to just based on audio/video tracks, not subs */ + if (!is_audio_or_video) + continue; + + if (best_entry == NULL || entry->moof_offset < best_entry->moof_offset) + best_entry = entry; + } + + if (best_entry == NULL) { + GST_OBJECT_UNLOCK (qtdemux); + return FALSE; + } + + GST_INFO_OBJECT (qtdemux, "seek to %" GST_TIME_FORMAT ", best fragment " + "moof offset: %" G_GUINT64_FORMAT ", ts %" GST_TIME_FORMAT, + GST_TIME_ARGS (qtdemux->streams[0]->time_position), + best_entry->moof_offset, GST_TIME_ARGS (best_entry->ts)); + + qtdemux->moof_offset = best_entry->moof_offset; + + qtdemux_add_fragmented_samples (qtdemux); + + GST_OBJECT_UNLOCK (qtdemux); + return TRUE; +} + static GstFlowReturn gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux) { GstFlowReturn ret = GST_FLOW_OK; GstBuffer *buf = NULL; QtDemuxStream *stream; - guint64 min_time; + GstClockTime min_time; guint64 offset = 0; - guint64 dts = GST_CLOCK_TIME_NONE; - guint64 pts = GST_CLOCK_TIME_NONE; - guint64 duration = 0; + GstClockTime dts = GST_CLOCK_TIME_NONE; + GstClockTime pts = GST_CLOCK_TIME_NONE; + GstClockTime duration = 0; gboolean keyframe = FALSE; guint sample_size = 0; gboolean empty = 0; @@ -4167,18 +5024,25 @@ gst_qtdemux_push_pending_newsegment (qtdemux); + if (qtdemux->fragmented_seek_pending) { + GST_INFO_OBJECT (qtdemux, "pending fragmented seek"); + gst_qtdemux_do_fragmented_seek (qtdemux); + GST_INFO_OBJECT (qtdemux, "fragmented seek done!"); + qtdemux->fragmented_seek_pending = FALSE; + } + /* Figure out the next stream sample to output, min_time is expressed in * global time and runs over the edit list segments. */ min_time = G_MAXUINT64; index = -1; for (i = 0; i < qtdemux->n_streams; i++) { - guint64 position; + GstClockTime position; stream = qtdemux->streams[i]; position = stream->time_position; /* position of -1 is EOS */ - if (position != -1 && position < min_time) { + if (position != GST_CLOCK_TIME_NONE && position < min_time) { min_time = position; index = i; } @@ -4196,7 +5060,7 @@ && qtdemux->segment.start > min_time)) && qtdemux->streams[index]->on_keyframe)) { GST_DEBUG_OBJECT (qtdemux, "we reached the end of our segment."); - qtdemux->streams[index]->time_position = -1; + qtdemux->streams[index]->time_position = GST_CLOCK_TIME_NONE; goto eos_stream; } @@ -4230,6 +5094,15 @@ &offset, &sample_size, &dts, &pts, &duration, &keyframe))) goto eos_stream; + /* If we're doing a keyframe-only trickmode, only push keyframes on video streams */ + if (G_UNLIKELY (qtdemux-> + segment.flags & GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS)) { + if (stream->subtype == FOURCC_vide && !keyframe) { + GST_LOG_OBJECT (qtdemux, "Skipping non-keyframe on stream %d", index); + goto next; + } + } + GST_DEBUG_OBJECT (qtdemux, "pushing from stream %d, empty %d offset %" G_GUINT64_FORMAT ", size %d, dts=%" GST_TIME_FORMAT ", pts=%" GST_TIME_FORMAT @@ -4290,9 +5163,8 @@ QtDemuxSample *sample = &stream->samples[stream->sample_index]; QtDemuxSegment *segment = &stream->segments[stream->segment_index]; - GstClockTime time_position = gst_util_uint64_scale (sample->timestamp + - stream->offset_in_sample / stream->bytes_per_frame, GST_SECOND, - stream->timescale); + GstClockTime time_position = QTSTREAMTIME_TO_GSTTIME (stream, + sample->timestamp + stream->offset_in_sample / stream->bytes_per_frame); if (time_position >= segment->media_start) { /* inside the segment, update time_position, looks very familiar to * GStreamer segments, doesn't it? */ @@ -4307,7 +5179,7 @@ } /* combine flows */ - ret = gst_qtdemux_combine_flows (qtdemux, ret); + ret = gst_qtdemux_combine_flows (qtdemux, stream, ret); /* ignore unlinked, we will not push on the pad anymore and we will EOS when * we have no more data for the pad to push */ if (ret == GST_FLOW_EOS) @@ -4611,13 +5483,47 @@ demux->upstream_size = seekable ? stop : -1; } -/* FIXME, unverified after edit list updates */ +static void +gst_qtdemux_drop_data (GstQTDemux * demux, gint bytes) +{ + g_return_if_fail (bytes <= demux->todrop); + + GST_LOG_OBJECT (demux, "Dropping %d bytes", bytes); + gst_adapter_flush (demux->adapter, bytes); + demux->neededbytes -= bytes; + demux->offset += bytes; + demux->todrop -= bytes; +} + static GstFlowReturn gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf) { GstQTDemux *demux; demux = GST_QTDEMUX (parent); + + if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DISCONT)) { + gint i; + + GST_DEBUG_OBJECT (demux, "Got DISCONT, marking all streams as DISCONT"); + + for (i = 0; i < demux->n_streams; i++) { + demux->streams[i]->discont = TRUE; + } + + /* Reverse fragmented playback, need to flush all we have before + * consuming a new fragment. + * The samples array have the timestamps calculated by accumulating the + * durations but this won't work for reverse playback of fragments as + * the timestamps of a subsequent fragment should be smaller than the + * previously received one. */ + if (demux->fragmented && demux->segment.rate < 0) { + gst_qtdemux_process_adapter (demux, TRUE); + for (i = 0; i < demux->n_streams; i++) + gst_qtdemux_stream_flush_samples_data (demux, demux->streams[i]); + } + } + gst_adapter_push (demux->adapter, inbuf); GST_DEBUG_OBJECT (demux, @@ -4837,6 +5743,7 @@ GST_TIME_ARGS (demux->fragment_start)); } + demux->moof_offset = demux->offset; if (!qtdemux_parse_moof (demux, data, demux->neededbytes, demux->offset, NULL)) { gst_adapter_unmap (demux->adapter); @@ -4862,6 +5769,9 @@ } else if (fourcc == FOURCC_uuid) { GST_DEBUG_OBJECT (demux, "Parsing [uuid]"); qtdemux_parse_uuid (demux, data, demux->neededbytes); + } else if (fourcc == FOURCC_sidx) { + GST_DEBUG_OBJECT (demux, "Parsing [sidx]"); + qtdemux_parse_sidx (demux, data, demux->neededbytes); } else { GST_WARNING_OBJECT (demux, "Unknown fourcc while parsing header : %" GST_FOURCC_FORMAT, @@ -4948,11 +5858,10 @@ break; } case QTDEMUX_STATE_MOVIE:{ - GstBuffer *outbuf; QtDemuxStream *stream = NULL; QtDemuxSample *sample; int i = -1; - guint64 dts, pts, duration; + GstClockTime dts, pts, duration; gboolean keyframe; GST_DEBUG_OBJECT (demux, @@ -4975,9 +5884,9 @@ } else { GST_DEBUG_OBJECT (demux, "data atom emptied; resuming atom scan"); /* so we are dropping more than left in this atom */ - demux->todrop -= demux->mdatleft; - demux->neededbytes -= demux->mdatleft; + gst_qtdemux_drop_data (demux, demux->mdatleft); demux->mdatleft = 0; + /* need to resume atom parsing so we do not miss any other pieces */ demux->state = QTDEMUX_STATE_INITIAL; demux->neededbytes = 16; @@ -4996,10 +5905,7 @@ } if (demux->todrop) { - GST_LOG_OBJECT (demux, "Dropping %d bytes", demux->todrop); - gst_adapter_flush (demux->adapter, demux->todrop); - demux->neededbytes -= demux->todrop; - demux->offset += demux->todrop; + gst_qtdemux_drop_data (demux, demux->todrop); } /* first buffer? */ @@ -5046,12 +5952,9 @@ sample = &stream->samples[stream->sample_index]; if (G_LIKELY (!(STREAM_IS_EOS (stream)))) { - outbuf = gst_adapter_take_buffer (demux->adapter, demux->neededbytes); GST_DEBUG_OBJECT (demux, "stream : %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (stream->fourcc)); - g_return_val_if_fail (outbuf != NULL, GST_FLOW_ERROR); - dts = QTSAMPLE_DTS (stream, sample); pts = QTSAMPLE_PTS (stream, sample); duration = QTSAMPLE_DUR_DTS (stream, sample, dts); @@ -5061,7 +5964,10 @@ if (G_UNLIKELY (demux->segment.stop != -1 && demux->segment.stop <= pts && stream->on_keyframe)) { GST_DEBUG_OBJECT (demux, "we reached the end of our segment."); - stream->time_position = -1; /* this means EOS */ + stream->time_position = GST_CLOCK_TIME_NONE; /* this means EOS */ + + /* skip this data, stream is EOS */ + gst_adapter_flush (demux->adapter, demux->neededbytes); /* check if all streams are eos */ ret = GST_FLOW_EOS; @@ -5077,12 +5983,20 @@ goto eos; } } else { + GstBuffer *outbuf; + + outbuf = + gst_adapter_take_buffer (demux->adapter, demux->neededbytes); + + /* FIXME: should either be an assert or a plain check */ + g_return_val_if_fail (outbuf != NULL, GST_FLOW_ERROR); + ret = gst_qtdemux_decorate_and_push_buffer (demux, stream, outbuf, dts, pts, duration, keyframe, dts, demux->offset); } /* combine flows */ - ret = gst_qtdemux_combine_flows (demux, ret); + ret = gst_qtdemux_combine_flows (demux, stream, ret); } else { /* skip this data, stream is EOS */ gst_adapter_flush (demux->adapter, demux->neededbytes); @@ -5654,6 +6568,16 @@ qtdemux_parse_uuid (qtdemux, buffer, end - buffer); break; } + case FOURCC_encv: + { + qtdemux_parse_container (qtdemux, node, buffer + 86, end); + break; + } + case FOURCC_enca: + { + qtdemux_parse_container (qtdemux, node, buffer + 36, end); + break; + } default: if (!strcmp (type->name, "unknown")) GST_MEMDUMP ("Unknown tag", buffer + 4, end - buffer - 4); @@ -5801,29 +6725,80 @@ } static gboolean +gst_qtdemux_configure_protected_caps (GstQTDemux * qtdemux, + QtDemuxStream * stream) +{ + GstStructure *s; + const gchar *selected_system; + + g_return_val_if_fail (qtdemux != NULL, FALSE); + g_return_val_if_fail (stream != NULL, FALSE); + g_return_val_if_fail (gst_caps_get_size (stream->caps) == 1, FALSE); + + if (stream->protection_scheme_type != FOURCC_cenc) { + GST_ERROR_OBJECT (qtdemux, "unsupported protection scheme"); + return FALSE; + } + if (qtdemux->protection_system_ids == NULL) { + GST_ERROR_OBJECT (qtdemux, "stream is protected using cenc, but no " + "cenc protection system information has been found"); + return FALSE; + } + g_ptr_array_add (qtdemux->protection_system_ids, NULL); + selected_system = gst_protection_select_system ((const gchar **) + qtdemux->protection_system_ids->pdata); + g_ptr_array_remove_index (qtdemux->protection_system_ids, + qtdemux->protection_system_ids->len - 1); + if (!selected_system) { + GST_ERROR_OBJECT (qtdemux, "stream is protected, but no " + "suitable decryptor element has been found"); + return FALSE; + } + + s = gst_caps_get_structure (stream->caps, 0); + gst_structure_set (s, + "original-media-type", G_TYPE_STRING, gst_structure_get_name (s), + GST_PROTECTION_SYSTEM_ID_CAPS_FIELD, G_TYPE_STRING, selected_system, + NULL); + gst_structure_set_name (s, "application/x-cenc"); + return TRUE; +} + +static gboolean gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream) { if (stream->subtype == FOURCC_vide) { - /* fps is calculated base on the duration of the first frames since + /* fps is calculated base on the duration of the average framerate since * qt does not have a fixed framerate. */ - if ((stream->n_samples == 1) && (stream->min_duration == 0)) { + if ((stream->n_samples == 1) && (stream->first_duration == 0)) { /* still frame */ stream->fps_n = 0; stream->fps_d = 1; } else { - /* we might need to scale the timescale to get precise framerate */ - const int required_scale = rint (log (10000) / 2.303); /* divide to get log10 */ - int current_scale = rint (log (stream->timescale) / 2.303); - int factor = pow (10.0, MAX (0, required_scale - current_scale)); + if (stream->duration == 0 || stream->n_samples < 2) { + stream->fps_n = stream->timescale; + stream->fps_d = 1; + } else { + /* Calculate a framerate, ignoring the first sample which is sometimes truncated */ + /* stream->duration is guint64, timescale, n_samples are guint32 */ + GstClockTime avg_duration = + gst_util_uint64_scale_round (stream->duration - + stream->first_duration, GST_SECOND, + (guint64) (stream->timescale) * (stream->n_samples - 1)); - stream->fps_n = stream->timescale * factor; + GST_LOG_OBJECT (qtdemux, + "Calculating avg sample duration based on stream duration %" + G_GUINT64_FORMAT + " minus first sample %u, leaving %d samples gives %" + GST_TIME_FORMAT, stream->duration, stream->first_duration, + stream->n_samples - 1, GST_TIME_ARGS (avg_duration)); - if (stream->duration == 0 || stream->n_samples == 0) - stream->fps_d = factor; - else - stream->fps_d = - gst_util_uint64_scale_int_round (stream->duration, factor, - stream->n_samples); + gst_video_guess_framerate (avg_duration, &stream->fps_n, + &stream->fps_d); + } + GST_DEBUG_OBJECT (qtdemux, + "Calculating framerate, timescale %u gave fps_n %d fps_d %d", + stream->timescale, stream->fps_n, stream->fps_d); } if (stream->caps) { @@ -5838,8 +6813,12 @@ GST_DEBUG_OBJECT (qtdemux, "video size %dx%d, target display size %dx%d", stream->width, stream->height, stream->display_width, stream->display_height); - - if (stream->display_width > 0 && stream->display_height > 0 && + /* qt file might have pasp atom */ + if (stream->par_w > 0 && stream->par_h > 0) { + GST_DEBUG_OBJECT (qtdemux, "par %d:%d", stream->par_w, stream->par_h); + gst_caps_set_simple (stream->caps, "pixel-aspect-ratio", + GST_TYPE_FRACTION, stream->par_w, stream->par_h, NULL); + } else if (stream->display_width > 0 && stream->display_height > 0 && stream->width > 0 && stream->height > 0) { gint n, d; @@ -5849,18 +6828,35 @@ if (n == d) n = d = 1; GST_DEBUG_OBJECT (qtdemux, "setting PAR to %d/%d", n, d); + stream->par_w = n; + stream->par_h = d; gst_caps_set_simple (stream->caps, "pixel-aspect-ratio", - GST_TYPE_FRACTION, n, d, NULL); + GST_TYPE_FRACTION, stream->par_w, stream->par_h, NULL); } - /* qt file might have pasp atom */ - if (stream->par_w > 0 && stream->par_h > 0) { - GST_DEBUG_OBJECT (qtdemux, "par %d:%d", stream->par_w, stream->par_h); - gst_caps_set_simple (stream->caps, "pixel-aspect-ratio", - GST_TYPE_FRACTION, stream->par_w, stream->par_h, NULL); + if (stream->multiview_mode != GST_VIDEO_MULTIVIEW_MODE_NONE) { + guint par_w = 1, par_h = 1; + + if (stream->par_w > 0 && stream->par_h > 0) { + par_w = stream->par_w; + par_h = stream->par_h; + } + + if (gst_video_multiview_guess_half_aspect (stream->multiview_mode, + stream->width, stream->height, par_w, par_h)) { + stream->multiview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT; + } + + gst_caps_set_simple (stream->caps, + "multiview-mode", G_TYPE_STRING, + gst_video_multiview_mode_to_caps_string (stream->multiview_mode), + "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, + stream->multiview_flags, GST_FLAG_SET_MASK_EXACT, NULL); } } - } else if (stream->subtype == FOURCC_soun) { + } + + else if (stream->subtype == FOURCC_soun) { if (stream->caps) { stream->caps = gst_caps_make_writable (stream->caps); if (stream->rate > 0) @@ -5887,6 +6883,14 @@ gst_pad_use_fixed_caps (stream->pad); + if (stream->protected) { + if (!gst_qtdemux_configure_protected_caps (qtdemux, stream)) { + GST_ERROR_OBJECT (qtdemux, + "Failed to configure protected stream caps."); + return FALSE; + } + } + GST_DEBUG_OBJECT (qtdemux, "setting caps %" GST_PTR_FORMAT, stream->caps); if (stream->new_stream) { gchar *stream_id; @@ -5956,7 +6960,7 @@ } else if (stream->subtype == FOURCC_strm) { GST_DEBUG_OBJECT (qtdemux, "stream type, not creating pad"); } else if (stream->subtype == FOURCC_subp || stream->subtype == FOURCC_text - || stream->subtype == FOURCC_sbtl) { + || stream->subtype == FOURCC_sbtl || stream->subtype == FOURCC_subt) { gchar *name = g_strdup_printf ("subtitle_%u", qtdemux->n_sub_streams); stream->pad = @@ -5978,6 +6982,8 @@ } if (stream->pad) { + GList *l; + GST_DEBUG_OBJECT (qtdemux, "adding pad %s %p to qtdemux %p", GST_OBJECT_NAME (stream->pad), stream->pad, qtdemux); gst_element_add_pad (GST_ELEMENT_CAST (qtdemux), stream->pad); @@ -5986,10 +6992,17 @@ if (stream->pending_tags) gst_tag_list_unref (stream->pending_tags); stream->pending_tags = list; + list = NULL; /* global tags go on each pad anyway */ stream->send_global_tags = TRUE; + /* send upstream GST_EVENT_PROTECTION events that were received before + this source pad was created */ + for (l = qtdemux->protection_event_queue.head; l != NULL; l = l->next) + gst_pad_push_event (stream->pad, gst_event_ref (l->data)); } done: + if (list) + gst_tag_list_unref (list); return TRUE; } @@ -6286,6 +7299,7 @@ return FALSE; } + g_assert (stream->samples == NULL); stream->samples = g_try_new0 (QtDemuxSample, stream->n_samples); if (!stream->samples) { GST_WARNING_OBJECT (qtdemux, "failed to allocate %d samples", @@ -6293,11 +7307,12 @@ return FALSE; } - /* composition time-to-sample */ if ((stream->ctts_present = ! !qtdemux_tree_get_child_by_type_full (stbl, FOURCC_ctts, &stream->ctts) ? TRUE : FALSE) == TRUE) { + GstByteReader cslg = GST_BYTE_READER_INIT (NULL, 0); + /* copy atom data into a new buffer for later use */ stream->ctts.data = g_memdup (stream->ctts.data, stream->ctts.size); @@ -6311,6 +7326,46 @@ if (!qt_atom_parser_has_chunks (&stream->ctts, stream->n_composition_times, 4 + 4)) goto corrupt_file; + + /* This is optional, if missing we iterate the ctts */ + if (qtdemux_tree_get_child_by_type_full (stbl, FOURCC_cslg, &cslg)) { + if (!gst_byte_reader_skip (&cslg, 1 + 3) + || !gst_byte_reader_get_uint32_be (&cslg, &stream->cslg_shift)) { + g_free ((gpointer) cslg.data); + goto corrupt_file; + } + } else { + gint32 cslg_least = 0; + guint num_entries, pos; + gint i; + + pos = gst_byte_reader_get_pos (&stream->ctts); + num_entries = stream->n_composition_times; + + stream->cslg_shift = 0; + + for (i = 0; i < num_entries; i++) { + gint32 offset; + + gst_byte_reader_skip_unchecked (&stream->ctts, 4); + offset = gst_byte_reader_get_int32_be_unchecked (&stream->ctts); + + if (offset < cslg_least) + cslg_least = offset; + } + + if (cslg_least < 0) + stream->cslg_shift = ABS (cslg_least); + else + stream->cslg_shift = 0; + + /* reset the reader so we can generate sample table */ + gst_byte_reader_set_pos (&stream->ctts, pos); + } + } else { + /* Ensure the cslg_shift value is consistent so we can use it + * unconditionnally to produce TS and Segment */ + stream->cslg_shift = 0; } return TRUE; @@ -6485,8 +7540,8 @@ GST_DEBUG_OBJECT (qtdemux, "keyframe sample %d: timestamp %" GST_TIME_FORMAT ", size %u", - j, GST_TIME_ARGS (gst_util_uint64_scale (stream->stco_sample_index, - GST_SECOND, stream->timescale)), cur->size); + j, GST_TIME_ARGS (QTSTREAMTIME_TO_GSTTIME (stream, + stream->stco_sample_index)), cur->size); cur->timestamp = stream->stco_sample_index; cur->duration = stream->samples_per_chunk; @@ -6512,7 +7567,7 @@ for (k = stream->stsc_sample_index; k < samples_per_chunk; k++) { GST_LOG_OBJECT (qtdemux, "creating entry %d with offset %" G_GUINT64_FORMAT " and size %d", - (guint) (cur - samples), stream->chunk_offset, cur->size); + (guint) (cur - samples), chunk_offset, cur->size); cur->offset = chunk_offset; chunk_offset += cur->size; @@ -6569,8 +7624,7 @@ GST_DEBUG_OBJECT (qtdemux, "sample %d: index %d, timestamp %" GST_TIME_FORMAT, (guint) (cur - samples), j, - GST_TIME_ARGS (gst_util_uint64_scale (stts_time, GST_SECOND, - stream->timescale))); + GST_TIME_ARGS (QTSTREAMTIME_TO_GSTTIME (stream, stts_time))); cur->timestamp = stts_time; cur->duration = stts_duration; @@ -6599,8 +7653,7 @@ GST_DEBUG_OBJECT (qtdemux, "fill sample %d: timestamp %" GST_TIME_FORMAT, (guint) (cur - samples), - GST_TIME_ARGS (gst_util_uint64_scale (stream->stts_time, GST_SECOND, - stream->timescale))); + GST_TIME_ARGS (QTSTREAMTIME_TO_GSTTIME (stream, stream->stts_time))); cur->timestamp = stream->stts_time; cur->duration = -1; } @@ -6718,11 +7771,13 @@ /* if index has been completely parsed, free data that is no-longer needed */ if (n + 1 == stream->n_samples) { gst_qtdemux_stbl_free (stream); - GST_DEBUG_OBJECT (qtdemux, - "parsed all available samples; checking for more"); - while (n + 1 == stream->n_samples) - if (qtdemux_add_fragmented_samples (qtdemux) != GST_FLOW_OK) - break; + GST_DEBUG_OBJECT (qtdemux, "parsed all available samples;"); + if (qtdemux->pullbased) { + GST_DEBUG_OBJECT (qtdemux, "checking for more samples"); + while (n + 1 == stream->n_samples) + if (qtdemux_add_fragmented_samples (qtdemux) != GST_FLOW_OK) + break; + } } GST_OBJECT_UNLOCK (qtdemux); @@ -6775,7 +7830,8 @@ GNode *elst; gint n_segments; gint i, count; - guint64 time, stime; + guint64 time; + GstClockTime stime; guint8 *buffer; GST_DEBUG_OBJECT (qtdemux, "looking for edit list"); @@ -6808,13 +7864,14 @@ segment->time = stime; /* add non scaled values so we don't cause roundoff errors */ time += duration; - stime = gst_util_uint64_scale (time, GST_SECOND, qtdemux->timescale); + stime = QTTIME_TO_GSTTIME (qtdemux, time); segment->stop_time = stime; segment->duration = stime - segment->time; + + segment->trak_media_start = media_time; /* media_time expressed in stream timescale */ if (media_time != G_MAXUINT32) { - segment->media_start = - gst_util_uint64_scale (media_time, GST_SECOND, stream->timescale); + segment->media_start = QTSTREAMTIME_TO_GSTTIME (stream, media_time); segment->media_stop = segment->media_start + segment->duration; } else { segment->media_start = GST_CLOCK_TIME_NONE; @@ -6833,10 +7890,23 @@ } GST_DEBUG_OBJECT (qtdemux, "created segment %d time %" GST_TIME_FORMAT - ", duration %" GST_TIME_FORMAT ", media_time %" GST_TIME_FORMAT - ", rate %g, (%d)", i, GST_TIME_ARGS (segment->time), + ", duration %" GST_TIME_FORMAT ", media_start %" GST_TIME_FORMAT + " (%" G_GUINT64_FORMAT ") , media_stop %" GST_TIME_FORMAT + " stop_time %" GST_TIME_FORMAT " rate %g, (%d) timescale %u", + i, GST_TIME_ARGS (segment->time), GST_TIME_ARGS (segment->duration), - GST_TIME_ARGS (segment->media_start), segment->rate, rate_int); + GST_TIME_ARGS (segment->media_start), media_time, + GST_TIME_ARGS (segment->media_stop), + GST_TIME_ARGS (segment->stop_time), segment->rate, rate_int, + stream->timescale); + if (segment->stop_time > qtdemux->segment.stop) { + GST_WARNING_OBJECT (qtdemux, "Segment %d " + " extends to %" GST_TIME_FORMAT + " past the end of the file duration %" GST_TIME_FORMAT + " it will be truncated", i, GST_TIME_ARGS (segment->stop_time), + GST_TIME_ARGS (qtdemux->segment.stop)); + qtdemux->segment.stop = segment->stop_time; + } } GST_DEBUG_OBJECT (qtdemux, "found %d segments", count); stream->n_segments = count; @@ -6856,14 +7926,14 @@ /* no segments, create one to play the complete trak */ if (stream->n_segments == 0) { GstClockTime stream_duration = - gst_util_uint64_scale (stream->duration, GST_SECOND, stream->timescale); + QTSTREAMTIME_TO_GSTTIME (stream, stream->duration); if (stream->segments == NULL) stream->segments = g_new (QtDemuxSegment, 1); /* represent unknown our way */ if (stream_duration == 0) - stream_duration = -1; + stream_duration = GST_CLOCK_TIME_NONE; stream->segments[0].time = 0; stream->segments[0].stop_time = stream_duration; @@ -6871,10 +7941,12 @@ stream->segments[0].media_start = 0; stream->segments[0].media_stop = stream_duration; stream->segments[0].rate = 1.0; + stream->segments[0].trak_media_start = 0; GST_DEBUG_OBJECT (qtdemux, "created dummy segment %" GST_TIME_FORMAT, GST_TIME_ARGS (stream_duration)); stream->n_segments = 1; + stream->dummy_segment = TRUE; } GST_DEBUG_OBJECT (qtdemux, "using %d segments", stream->n_segments); @@ -7069,14 +8141,6 @@ return uri; } -static gint -less_than (gconstpointer a, gconstpointer b) -{ - const guint32 *av = a, *bv = b; - - return *av - *bv; -} - #define AMR_NB_ALL_MODES 0x81ff #define AMR_WB_ALL_MODES 0x83ff static guint @@ -7188,25 +8252,21 @@ * This macro will only compare value abdegh, it expects cfi to have already * been checked */ -#define QTCHECK_MATRIX(m,a,b,d,e,g,h) ((m)[0] == (a << 16) && (m)[1] == (b << 16) && \ - (m)[3] == (d << 16) && (m)[4] == (e << 16) && \ - (m)[6] == (g << 16) && (m)[7] == (h << 16)) +#define QTCHECK_MATRIX(m,a,b,d,e) ((m)[0] == (a << 16) && (m)[1] == (b << 16) && \ + (m)[3] == (d << 16) && (m)[4] == (e << 16)) /* only handle the cases where the last column has standard values */ if (matrix[2] == 0 && matrix[5] == 0 && matrix[8] == 1 << 30) { const gchar *rotation_tag = NULL; /* no rotation needed */ - if (QTCHECK_MATRIX (matrix, 1, 0, 0, 1, 0, 0)) { + if (QTCHECK_MATRIX (matrix, 1, 0, 0, 1)) { /* NOP */ - } else if (QTCHECK_MATRIX (matrix, 0, 1, G_MAXUINT16, 0, - stream->display_height, 0)) { + } else if (QTCHECK_MATRIX (matrix, 0, 1, G_MAXUINT16, 0)) { rotation_tag = "rotate-90"; - } else if (QTCHECK_MATRIX (matrix, G_MAXUINT16, 0, 0, G_MAXUINT16, - stream->display_width, stream->display_height)) { + } else if (QTCHECK_MATRIX (matrix, G_MAXUINT16, 0, 0, G_MAXUINT16)) { rotation_tag = "rotate-180"; - } else if (QTCHECK_MATRIX (matrix, 0, G_MAXUINT16, 1, 0, 0, - stream->display_width)) { + } else if (QTCHECK_MATRIX (matrix, 0, G_MAXUINT16, 1, 0)) { rotation_tag = "rotate-270"; } else { GST_FIXME_OBJECT (qtdemux, "Unhandled transformation matrix values"); @@ -7225,6 +8285,108 @@ } } +/* Parses the boxes defined in ISO/IEC 14496-12 that enable support for + * protected streams (sinf, frma, schm and schi); if the protection scheme is + * Common Encryption (cenc), the function will also parse the tenc box (defined + * in ISO/IEC 23001-7). @container points to the node that contains these boxes + * (typically an enc[v|a|t|s] sample entry); the function will set + * @original_fmt to the fourcc of the original unencrypted stream format. + * Returns TRUE if successful; FALSE otherwise. */ +static gboolean +qtdemux_parse_protection_scheme_info (GstQTDemux * qtdemux, + QtDemuxStream * stream, GNode * container, guint32 * original_fmt) +{ + GNode *sinf; + GNode *frma; + GNode *schm; + GNode *schi; + + g_return_val_if_fail (qtdemux != NULL, FALSE); + g_return_val_if_fail (stream != NULL, FALSE); + g_return_val_if_fail (container != NULL, FALSE); + g_return_val_if_fail (original_fmt != NULL, FALSE); + + sinf = qtdemux_tree_get_child_by_type (container, FOURCC_sinf); + if (G_UNLIKELY (!sinf)) { + if (stream->protection_scheme_type == FOURCC_cenc) { + GST_ERROR_OBJECT (qtdemux, "sinf box does not contain schi box, which is " + "mandatory for Common Encryption"); + return FALSE; + } + return TRUE; + } + + frma = qtdemux_tree_get_child_by_type (sinf, FOURCC_frma); + if (G_UNLIKELY (!frma)) { + GST_ERROR_OBJECT (qtdemux, "sinf box does not contain mandatory frma box"); + return FALSE; + } + + *original_fmt = QT_FOURCC ((const guint8 *) frma->data + 8); + GST_DEBUG_OBJECT (qtdemux, "original stream format: '%" GST_FOURCC_FORMAT "'", + GST_FOURCC_ARGS (*original_fmt)); + + schm = qtdemux_tree_get_child_by_type (sinf, FOURCC_schm); + if (!schm) { + GST_DEBUG_OBJECT (qtdemux, "sinf box does not contain schm box"); + return FALSE; + } + stream->protection_scheme_type = QT_FOURCC ((const guint8 *) schm->data + 12); + stream->protection_scheme_version = + QT_UINT32 ((const guint8 *) schm->data + 16); + + GST_DEBUG_OBJECT (qtdemux, + "protection_scheme_type: %" GST_FOURCC_FORMAT ", " + "protection_scheme_version: %#010x", + GST_FOURCC_ARGS (stream->protection_scheme_type), + stream->protection_scheme_version); + + schi = qtdemux_tree_get_child_by_type (sinf, FOURCC_schi); + if (!schi) { + GST_DEBUG_OBJECT (qtdemux, "sinf box does not contain schi box"); + return FALSE; + } + if (stream->protection_scheme_type == FOURCC_cenc) { + QtDemuxCencSampleSetInfo *info; + GNode *tenc; + const guint8 *tenc_data; + guint32 isEncrypted; + guint8 iv_size; + const guint8 *default_kid; + GstBuffer *kid_buf; + + if (G_UNLIKELY (!stream->protection_scheme_info)) + stream->protection_scheme_info = + g_malloc0 (sizeof (QtDemuxCencSampleSetInfo)); + + info = (QtDemuxCencSampleSetInfo *) stream->protection_scheme_info; + + tenc = qtdemux_tree_get_child_by_type (schi, FOURCC_tenc); + if (!tenc) { + GST_ERROR_OBJECT (qtdemux, "schi box does not contain tenc box, " + "which is mandatory for Common Encryption"); + return FALSE; + } + tenc_data = (const guint8 *) tenc->data + 12; + isEncrypted = QT_UINT24 (tenc_data); + iv_size = QT_UINT8 (tenc_data + 3); + default_kid = (tenc_data + 4); + kid_buf = gst_buffer_new_allocate (NULL, 16, NULL); + gst_buffer_fill (kid_buf, 0, default_kid, 16); + if (info->default_properties) + gst_structure_free (info->default_properties); + info->default_properties = + gst_structure_new ("application/x-cenc", + "iv_size", G_TYPE_UINT, iv_size, + "encrypted", G_TYPE_BOOLEAN, (isEncrypted == 1), + "kid", GST_TYPE_BUFFER, kid_buf, NULL); + GST_DEBUG_OBJECT (qtdemux, "default sample properties: " + "is_encrypted=%u, iv_size=%u", isEncrypted, iv_size); + gst_buffer_unref (kid_buf); + } + return TRUE; +} + /* parse the traks. * With each track we associate a new QtDemuxStream that contains all the info * about the trak. @@ -7247,10 +8409,11 @@ GNode *esds; GNode *pasp; GNode *tref; + GNode *udta; + GNode *svmi; QtDemuxStream *stream = NULL; gboolean new_stream = FALSE; - GstTagList *list = NULL; gchar *codec = NULL; const guint8 *stsd_data; guint16 lang_code; /* quicktime lang code or packed iso code */ @@ -7286,8 +8449,15 @@ GST_WARNING_OBJECT (qtdemux, "Stream not found, going to ignore it"); goto skip_track; } + + /* flush samples data from this track from previous moov */ + gst_qtdemux_stream_flush_segments_data (qtdemux, stream); + gst_qtdemux_stream_flush_samples_data (qtdemux, stream); } + if (stream->pending_tags == NULL) + stream->pending_tags = gst_tag_list_new_empty (); + if ((tkhd_flags & 1) == 0) stream->disabled = TRUE; @@ -7321,8 +8491,10 @@ lang_code = QT_UINT16 ((guint8 *) mdhd->data + 28); } - if (lang_code < 0x800) { + if (lang_code < 0x400) { qtdemux_lang_map_qt_code_to_iso (stream->lang_id, lang_code); + } else if (lang_code == 0x7fff) { + stream->lang_id[0] = 0; /* unspecified */ } else { stream->lang_id[0] = 0x60 + ((lang_code >> 10) & 0x1F); stream->lang_id[1] = 0x60 + ((lang_code >> 5) & 0x1F); @@ -7375,7 +8547,8 @@ "found, assuming preview image or something; skipping track", stream->duration, stream->timescale, qtdemux->duration, qtdemux->timescale); - g_free (stream); + if (new_stream) + gst_qtdemux_stream_free (qtdemux, stream); return TRUE; } } @@ -7398,6 +8571,51 @@ if (!(stbl = qtdemux_tree_get_child_by_type (minf, FOURCC_stbl))) goto corrupt_file; + /*parse svmi header if existing */ + svmi = qtdemux_tree_get_child_by_type (stbl, FOURCC_svmi); + if (svmi) { + len = QT_UINT32 ((guint8 *) svmi->data); + version = QT_UINT32 ((guint8 *) svmi->data + 8); + if (!version) { + GstVideoMultiviewMode mode = GST_VIDEO_MULTIVIEW_MODE_NONE; + GstVideoMultiviewFlags flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE; + guint8 frame_type, frame_layout; + + /* MPEG-A stereo video */ + if (qtdemux->major_brand == FOURCC_ss02) + flags |= GST_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO; + + frame_type = QT_UINT8 ((guint8 *) svmi->data + 12); + frame_layout = QT_UINT8 ((guint8 *) svmi->data + 13) & 0x01; + switch (frame_type) { + case 0: + mode = GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE; + break; + case 1: + mode = GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED; + break; + case 2: + mode = GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME; + break; + case 3: + /* mode 3 is primary/secondary view sequence, ie + * left/right views in separate tracks. See section 7.2 + * of ISO/IEC 23000-11:2009 */ + GST_FIXME_OBJECT (qtdemux, + "Implement stereo video in separate streams"); + } + + if ((frame_layout & 0x1) == 0) + flags |= GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST; + + GST_LOG_OBJECT (qtdemux, + "StereoVideo: composition type: %u, is_left_first: %u", + frame_type, frame_layout); + stream->multiview_mode = mode; + stream->multiview_flags = flags; + } + } + /* parse stsd */ if (!(stsd = qtdemux_tree_get_child_by_type (stbl, FOURCC_stsd))) goto corrupt_file; @@ -7408,7 +8626,8 @@ if (stsd_len < 24) { /* .. but skip stream with empty stsd produced by some Vivotek cameras */ if (stream->subtype == FOURCC_vivo) { - g_free (stream); + if (new_stream) + gst_qtdemux_stream_free (qtdemux, stream); return TRUE; } else { goto corrupt_file; @@ -7427,10 +8646,16 @@ GST_FOURCC_ARGS (stream->fourcc)); GST_LOG_OBJECT (qtdemux, "stsd type len: %d", len); - if ((fourcc == FOURCC_drms) || (fourcc == FOURCC_drmi) || - ((fourcc & 0x00FFFFFF) == GST_MAKE_FOURCC ('e', 'n', 'c', 0))) + if ((fourcc == FOURCC_drms) || (fourcc == FOURCC_drmi)) goto error_encrypted; + if (fourcc == FOURCC_encv || fourcc == FOURCC_enca) { + GNode *enc = qtdemux_tree_get_child_by_type (stsd, fourcc); + stream->protected = TRUE; + if (!qtdemux_parse_protection_scheme_info (qtdemux, stream, enc, &fourcc)) + GST_ERROR_OBJECT (qtdemux, "Failed to parse protection scheme info"); + } + if (stream->subtype == FOURCC_vide) { guint32 w = 0, h = 0; gboolean gray; @@ -7454,7 +8679,8 @@ stream->display_width = w >> 16; stream->display_height = h >> 16; - qtdemux_inspect_transformation_matrix (qtdemux, stream, matrix, &list); + qtdemux_inspect_transformation_matrix (qtdemux, stream, matrix, + &stream->pending_tags); offset = 16; if (len < 86) @@ -7551,6 +8777,9 @@ } } + if (stream->caps) + gst_caps_unref (stream->caps); + stream->caps = qtdemux_video_caps (qtdemux, stream, fourcc, stsd_data, &codec); if (G_UNLIKELY (!stream->caps)) { @@ -7559,9 +8788,7 @@ } if (codec) { - if (list == NULL) - list = gst_tag_list_new_empty (); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_VIDEO_CODEC, codec, NULL); g_free (codec); codec = NULL; @@ -7603,7 +8830,11 @@ esds = NULL; pasp = NULL; /* pick 'the' stsd child */ - mp4v = qtdemux_tree_get_child_by_type (stsd, fourcc); + if (!stream->protected) + mp4v = qtdemux_tree_get_child_by_type (stsd, fourcc); + else + mp4v = qtdemux_tree_get_child_by_type (stsd, FOURCC_encv); + if (mp4v) { esds = qtdemux_tree_get_child_by_type (mp4v, FOURCC_esds); pasp = qtdemux_tree_get_child_by_type (mp4v, FOURCC_pasp); @@ -7620,7 +8851,7 @@ } if (esds) { - gst_qtdemux_handle_esds (qtdemux, stream, esds, list); + gst_qtdemux_handle_esds (qtdemux, stream, esds, stream->pending_tags); } else { switch (fourcc) { case FOURCC_H264: @@ -7711,15 +8942,12 @@ max_bitrate = temp; } - if (!list) - list = gst_tag_list_new_empty (); - if (max_bitrate > 0 && max_bitrate < G_MAXUINT32) { - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_MAXIMUM_BITRATE, max_bitrate, NULL); } if (avg_bitrate > 0 && avg_bitrate < G_MAXUINT32) { - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_BITRATE, avg_bitrate, NULL); } @@ -8079,6 +9307,45 @@ gst_buffer_unref (buf); break; } + case GST_MAKE_FOURCC ('v', 'c', '-', '1'): + { + gint len = QT_UINT32 (stsd_data) - 0x66; + const guint8 *vc1_data = stsd_data + 0x66; + + /* find dvc1 */ + while (len >= 8) { + gint size; + + if (QT_UINT32 (vc1_data) <= len) + size = QT_UINT32 (vc1_data) - 8; + else + size = len - 8; + + if (size < 1) + /* No real data, so break out */ + break; + + switch (QT_FOURCC (vc1_data + 0x4)) { + case GST_MAKE_FOURCC ('d', 'v', 'c', '1'): + { + GstBuffer *buf; + + GST_DEBUG_OBJECT (qtdemux, "found dvc1 codec_data in stsd"); + buf = gst_buffer_new_and_alloc (size); + gst_buffer_fill (buf, 0, vc1_data + 8, size); + gst_caps_set_simple (stream->caps, + "codec_data", GST_TYPE_BUFFER, buf, NULL); + gst_buffer_unref (buf); + break; + } + default: + break; + } + len -= size + 8; + vc1_data += size + 8; + } + break; + } default: break; } @@ -8243,6 +9510,9 @@ GST_WARNING_OBJECT (qtdemux, "unknown audio STSD version %08x", version); } + if (stream->caps) + gst_caps_unref (stream->caps); + stream->caps = qtdemux_audio_caps (qtdemux, stream, fourcc, stsd_data + 32, len - 16, &codec); @@ -8332,6 +9602,113 @@ } break; } + case GST_MAKE_FOURCC ('w', 'm', 'a', ' '): + { + gint len = QT_UINT32 (stsd_data) - offset; + const guint8 *wfex_data = stsd_data + offset; + const gchar *codec_name = NULL; + gint version = 1; + /* from http://msdn.microsoft.com/en-us/library/dd757720(VS.85).aspx */ + /* FIXME this should also be gst_riff_strf_auds, + * but the latter one is actually missing bits-per-sample :( */ + typedef struct + { + gint16 wFormatTag; + gint16 nChannels; + gint32 nSamplesPerSec; + gint32 nAvgBytesPerSec; + gint16 nBlockAlign; + gint16 wBitsPerSample; + gint16 cbSize; + } WAVEFORMATEX; + WAVEFORMATEX wfex; + + /* FIXME: unify with similar wavformatex parsing code above */ + GST_DEBUG_OBJECT (qtdemux, "parse wma, looking for wfex"); + + /* find wfex */ + while (len >= 8) { + gint size; + + if (QT_UINT32 (wfex_data) <= len) + size = QT_UINT32 (wfex_data) - 8; + else + size = len - 8; + + if (size < 1) + /* No real data, so break out */ + break; + + switch (QT_FOURCC (wfex_data + 4)) { + case GST_MAKE_FOURCC ('w', 'f', 'e', 'x'): + { + GST_DEBUG_OBJECT (qtdemux, "found wfex in stsd"); + + if (size < 8 + 18) + break; + + wfex.wFormatTag = GST_READ_UINT16_LE (wfex_data + 8 + 0); + wfex.nChannels = GST_READ_UINT16_LE (wfex_data + 8 + 2); + wfex.nSamplesPerSec = GST_READ_UINT32_LE (wfex_data + 8 + 4); + wfex.nAvgBytesPerSec = GST_READ_UINT32_LE (wfex_data + 8 + 8); + wfex.nBlockAlign = GST_READ_UINT16_LE (wfex_data + 8 + 12); + wfex.wBitsPerSample = GST_READ_UINT16_LE (wfex_data + 8 + 14); + wfex.cbSize = GST_READ_UINT16_LE (wfex_data + 8 + 16); + + GST_LOG_OBJECT (qtdemux, "Found wfex box in stsd:"); + GST_LOG_OBJECT (qtdemux, "FormatTag = 0x%04x, Channels = %u, " + "SamplesPerSec = %u, AvgBytesPerSec = %u, BlockAlign = %u, " + "BitsPerSample = %u, Size = %u", wfex.wFormatTag, + wfex.nChannels, wfex.nSamplesPerSec, wfex.nAvgBytesPerSec, + wfex.nBlockAlign, wfex.wBitsPerSample, wfex.cbSize); + + if (wfex.wFormatTag == 0x0161) { + codec_name = "Windows Media Audio"; + version = 2; + } else if (wfex.wFormatTag == 0x0162) { + codec_name = "Windows Media Audio 9 Pro"; + version = 3; + } else if (wfex.wFormatTag == 0x0163) { + codec_name = "Windows Media Audio 9 Lossless"; + /* is that correct? gstffmpegcodecmap.c is missing it, but + * fluendo codec seems to support it */ + version = 4; + } + + gst_caps_set_simple (stream->caps, + "wmaversion", G_TYPE_INT, version, + "block_align", G_TYPE_INT, wfex.nBlockAlign, + "bitrate", G_TYPE_INT, wfex.nAvgBytesPerSec, + "width", G_TYPE_INT, wfex.wBitsPerSample, + "depth", G_TYPE_INT, wfex.wBitsPerSample, NULL); + + if (size > wfex.cbSize) { + GstBuffer *buf; + + buf = gst_buffer_new_and_alloc (size - wfex.cbSize); + gst_buffer_fill (buf, 0, wfex_data + 8 + wfex.cbSize, + size - wfex.cbSize); + gst_caps_set_simple (stream->caps, + "codec_data", GST_TYPE_BUFFER, buf, NULL); + gst_buffer_unref (buf); + } else { + GST_WARNING_OBJECT (qtdemux, "no codec data"); + } + + if (codec_name) { + g_free (codec); + codec = g_strdup (codec_name); + } + break; + } + default: + break; + } + len -= size + 8; + wfex_data += size + 8; + } + break; + } default: break; } @@ -8340,9 +9717,7 @@ GstStructure *s; gint bitrate = 0; - if (list == NULL) - list = gst_tag_list_new_empty (); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_AUDIO_CODEC, codec, NULL); g_free (codec); codec = NULL; @@ -8351,11 +9726,15 @@ s = gst_caps_get_structure (stream->caps, 0); gst_structure_get_int (s, "bitrate", &bitrate); if (bitrate > 0) - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_BITRATE, - bitrate, NULL); + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, + GST_TAG_BITRATE, bitrate, NULL); } - mp4a = qtdemux_tree_get_child_by_type (stsd, FOURCC_mp4a); + if (stream->protected && fourcc == FOURCC_mp4a) + mp4a = qtdemux_tree_get_child_by_type (stsd, FOURCC_enca); + else + mp4a = qtdemux_tree_get_child_by_type (stsd, FOURCC_mp4a); + wave = NULL; esds = NULL; if (mp4a) { @@ -8422,7 +9801,7 @@ g_node_destroy (wavenode); } } else if (esds) { - gst_qtdemux_handle_esds (qtdemux, stream, esds, list); + gst_qtdemux_handle_esds (qtdemux, stream, esds, stream->pending_tags); } else { switch (fourcc) { #if 0 @@ -8509,9 +9888,7 @@ * the 3GPP container spec (26.244) for more details. */ if ((len - 0x34) > 8 && (bitrate = qtdemux_parse_amr_bitrate (buf, amrwb))) { - if (!list) - list = gst_tag_list_new_empty (); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_MAXIMUM_BITRATE, bitrate, NULL); } @@ -8521,6 +9898,39 @@ } break; } + case FOURCC_mp4a: + { + /* mp4a atom withtout ESDS; Attempt to build codec data from atom */ + gint len = QT_UINT32 (stsd_data); + + if (len >= 50) { + guint16 sound_version = QT_UINT16 (stsd_data + 32); + + if (sound_version == 1) { + guint16 channels = QT_UINT16 (stsd_data + 40); + guint32 time_scale = QT_UINT32 (stsd_data + 46); + guint8 codec_data[2]; + GstBuffer *buf; + gint profile = 2; /* FIXME: Can this be determined somehow? There doesn't seem to be anything in mp4a atom that specifis compression */ + + gint sample_rate_index = + gst_codec_utils_aac_get_index_from_sample_rate (time_scale); + + /* build AAC codec data */ + codec_data[0] = profile << 3; + codec_data[0] |= ((sample_rate_index >> 1) & 0x7); + codec_data[1] = (sample_rate_index & 0x01) << 7; + codec_data[1] |= (channels & 0xF) << 3; + + buf = gst_buffer_new_and_alloc (2); + gst_buffer_fill (buf, 0, codec_data, 2); + gst_caps_set_simple (stream->caps, + "codec_data", GST_TYPE_BUFFER, buf, NULL); + gst_buffer_unref (buf); + } + } + break; + } default: GST_INFO_OBJECT (qtdemux, "unhandled type %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); @@ -8541,18 +9951,15 @@ } stream->sampled = TRUE; } else if (stream->subtype == FOURCC_subp || stream->subtype == FOURCC_text - || stream->subtype == FOURCC_sbtl) { + || stream->subtype == FOURCC_sbtl || stream->subtype == FOURCC_subt) { stream->sampled = TRUE; stream->sparse = TRUE; - offset = 16; - stream->caps = qtdemux_sub_caps (qtdemux, stream, fourcc, stsd_data, &codec); if (codec) { - list = gst_tag_list_new_empty (); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_SUBTITLE_CODEC, codec, NULL); g_free (codec); codec = NULL; @@ -8575,7 +9982,7 @@ break; } - gst_qtdemux_handle_esds (qtdemux, stream, esds, list); + gst_qtdemux_handle_esds (qtdemux, stream, esds, stream->pending_tags); break; } default: @@ -8597,8 +10004,7 @@ goto unknown_stream; if (codec) { - list = gst_tag_list_new_empty (); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_SUBTITLE_CODEC, codec, NULL); g_free (codec); codec = NULL; @@ -8641,8 +10047,8 @@ /* movie duration more reliable in this case (e.g. mehd) */ if (qtdemux->segment.duration && GST_CLOCK_TIME_IS_VALID (qtdemux->segment.duration)) - stream->duration = gst_util_uint64_scale (qtdemux->segment.duration, - stream->timescale, GST_SECOND); + stream->duration = + GSTTIME_TO_QTSTREAMTIME (stream, qtdemux->segment.duration); /* need defaults for fragments */ qtdemux_parse_trex (qtdemux, stream, &dummy, &dummy, &dummy); } @@ -8656,21 +10062,22 @@ strcmp (stream->lang_id, "und")) { const gchar *lang_code; - if (!list) - list = gst_tag_list_new_empty (); - /* convert ISO 639-2 code to ISO 639-1 */ lang_code = gst_tag_get_language_code (stream->lang_id); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_LANGUAGE_CODE, (lang_code) ? lang_code : stream->lang_id, NULL); } + /* Check for UDTA tags */ + if ((udta = qtdemux_tree_get_child_by_type (trak, FOURCC_udta))) { + qtdemux_parse_udta (qtdemux, stream->pending_tags, udta); + } + /* now we are ready to add the stream */ if (qtdemux->n_streams >= GST_QTDEMUX_MAX_STREAMS) goto too_many_streams; if (!qtdemux->got_moov) { - stream->pending_tags = list; qtdemux->streams[qtdemux->n_streams] = stream; qtdemux->n_streams++; GST_DEBUG_OBJECT (qtdemux, "n_streams is now %d", qtdemux->n_streams); @@ -8683,7 +10090,7 @@ { GST_INFO_OBJECT (qtdemux, "skip disabled track"); if (new_stream) - g_free (stream); + gst_qtdemux_stream_free (qtdemux, stream); return TRUE; } corrupt_file: @@ -8691,14 +10098,14 @@ GST_ELEMENT_ERROR (qtdemux, STREAM, DEMUX, (_("This file is corrupt and cannot be played.")), (NULL)); if (new_stream) - g_free (stream); + gst_qtdemux_stream_free (qtdemux, stream); return FALSE; } error_encrypted: { GST_ELEMENT_ERROR (qtdemux, STREAM, DECRYPT, (NULL), (NULL)); if (new_stream) - g_free (stream); + gst_qtdemux_stream_free (qtdemux, stream); return FALSE; } samples_failed: @@ -8708,7 +10115,7 @@ /* free stbl sub-atoms */ gst_qtdemux_stbl_free (stream); if (new_stream) - g_free (stream); + gst_qtdemux_stream_free (qtdemux, stream); return FALSE; } existing_stream: @@ -8716,7 +10123,7 @@ GST_INFO_OBJECT (qtdemux, "stream with track id %i already exists", track_id); if (new_stream) - g_free (stream); + gst_qtdemux_stream_free (qtdemux, stream); return TRUE; } unknown_stream: @@ -8724,7 +10131,7 @@ GST_INFO_OBJECT (qtdemux, "unknown subtype %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (stream->subtype)); if (new_stream) - g_free (stream); + gst_qtdemux_stream_free (qtdemux, stream); return TRUE; } too_many_streams: @@ -8745,7 +10152,8 @@ gst_qtdemux_guess_bitrate (GstQTDemux * qtdemux) { QtDemuxStream *stream = NULL; - gint64 size, duration, sys_bitrate, sum_bitrate = 0; + gint64 size, sys_bitrate, sum_bitrate = 0; + GstClockTime duration; gint i; guint bitrate; @@ -8849,8 +10257,6 @@ for (i = 0; ret == GST_FLOW_OK && i < qtdemux->n_streams; i++) { QtDemuxStream *stream = qtdemux->streams[i]; guint32 sample_num = 0; - guint samples = 20; - GArray *durations; GST_DEBUG_OBJECT (qtdemux, "stream %d, id %d, fourcc %" GST_FOURCC_FORMAT, i, stream->track_id, GST_FOURCC_ARGS (stream->fourcc)); @@ -8881,25 +10287,16 @@ continue; } - /* parse number of initial sample to set frame rate cap */ - while (sample_num < stream->n_samples && sample_num < samples) { + /* parse the initial sample for use in setting the frame rate cap */ + while (sample_num == 0 && sample_num < stream->n_samples) { if (!qtdemux_parse_samples (qtdemux, stream, sample_num)) break; ++sample_num; } - /* collect and sort durations */ - samples = MIN (stream->stbl_index + 1, samples); - GST_DEBUG_OBJECT (qtdemux, "%d samples for framerate", samples); - if (samples) { - durations = g_array_sized_new (FALSE, FALSE, sizeof (guint32), samples); - sample_num = 0; - while (sample_num < samples) { - g_array_append_val (durations, stream->samples[sample_num].duration); - sample_num++; - } - g_array_sort (durations, less_than); - stream->min_duration = g_array_index (durations, guint32, samples / 2); - g_array_free (durations, TRUE); + if (stream->n_samples > 0 && stream->stbl_index >= 0) { + stream->first_duration = stream->samples[0].duration; + GST_LOG_OBJECT (qtdemux, "stream %d first duration %u", + stream->track_id, stream->first_duration); } } @@ -9019,8 +10416,8 @@ } static void -qtdemux_tag_add_location (GstQTDemux * qtdemux, const char *tag, - const char *dummy, GNode * node) +qtdemux_tag_add_location (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { const gchar *env_vars[] = { "GST_QT_TAG_ENCODING", "GST_TAG_ENCODING", NULL }; int offset; @@ -9047,7 +10444,7 @@ "giving up", tag); } } else { - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_GEO_LOCATION_NAME, name, NULL); offset += strlen (name); g_free (name); @@ -9070,7 +10467,7 @@ /* one invalid means all are invalid */ if (longitude >= -180.0 && longitude <= 180.0 && latitude >= -90.0 && latitude <= 90.0) { - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_GEO_LOCATION_LATITUDE, latitude, GST_TAG_GEO_LOCATION_LONGITUDE, longitude, GST_TAG_GEO_LOCATION_ELEVATION, altitude, NULL); @@ -9090,8 +10487,8 @@ static void -qtdemux_tag_add_year (GstQTDemux * qtdemux, const char *tag, const char *dummy, - GNode * node) +qtdemux_tag_add_year (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { guint16 y; GDate *date; @@ -9109,13 +10506,13 @@ GST_DEBUG_OBJECT (qtdemux, "year: %u", y); date = g_date_new_dmy (1, 1, y); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, tag, date, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag, date, NULL); g_date_free (date); } static void -qtdemux_tag_add_classification (GstQTDemux * qtdemux, const char *tag, - const char *dummy, GNode * node) +qtdemux_tag_add_classification (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { int offset; char *tag_str = NULL; @@ -9154,8 +10551,7 @@ memcpy (tag_str, entity, 4); GST_DEBUG_OBJECT (qtdemux, "classification info: %s", tag_str); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_APPEND, tag, - tag_str, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, tag, tag_str, NULL); g_free (tag_str); @@ -9170,8 +10566,8 @@ } static gboolean -qtdemux_tag_add_str_full (GstQTDemux * qtdemux, const char *tag, - const char *dummy, GNode * node) +qtdemux_tag_add_str_full (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { const gchar *env_vars[] = { "GST_QT_TAG_ENCODING", "GST_TAG_ENCODING", NULL }; GNode *data; @@ -9191,8 +10587,7 @@ env_vars); if (s) { GST_DEBUG_OBJECT (qtdemux, "adding tag %s", GST_STR_NULL (s)); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, tag, s, - NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag, s, NULL); g_free (s); } else { GST_DEBUG_OBJECT (qtdemux, "failed to convert %s tag to UTF-8", tag); @@ -9264,7 +10659,7 @@ } if (s) { GST_DEBUG_OBJECT (qtdemux, "adding tag %s", GST_STR_NULL (s)); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, tag, s, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag, s, NULL); g_free (s); ret = TRUE; } else { @@ -9275,15 +10670,15 @@ } static void -qtdemux_tag_add_str (GstQTDemux * qtdemux, const char *tag, - const char *dummy, GNode * node) +qtdemux_tag_add_str (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { - qtdemux_tag_add_str_full (qtdemux, tag, dummy, node); + qtdemux_tag_add_str_full (qtdemux, taglist, tag, dummy, node); } static void -qtdemux_tag_add_keywords (GstQTDemux * qtdemux, const char *tag, - const char *dummy, GNode * node) +qtdemux_tag_add_keywords (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { const gchar *env_vars[] = { "GST_QT_TAG_ENCODING", "GST_TAG_ENCODING", NULL }; guint8 *data; @@ -9294,7 +10689,7 @@ /* first try normal string tag if major brand not 3GP */ if (!qtdemux_is_brand_3gp (qtdemux, TRUE)) { - if (!qtdemux_tag_add_str_full (qtdemux, tag, dummy, node)) { + if (!qtdemux_tag_add_str_full (qtdemux, taglist, tag, dummy, node)) { /* hm, that did not work, maybe 3gpp storage in non-3gpp major brand; * let's try it 3gpp way after minor safety check */ data = node->data; @@ -9344,7 +10739,7 @@ done: if (k) { GST_DEBUG_OBJECT (qtdemux, "adding tag %s", GST_STR_NULL (k)); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, tag, k, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag, k, NULL); } g_free (k); @@ -9359,8 +10754,8 @@ } static void -qtdemux_tag_add_num (GstQTDemux * qtdemux, const char *tag1, - const char *tag2, GNode * node) +qtdemux_tag_add_num (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag1, const char *tag2, GNode * node) { GNode *data; int len; @@ -9376,21 +10771,19 @@ n2 = QT_UINT16 ((guint8 *) data->data + 20); if (n1 > 0) { GST_DEBUG_OBJECT (qtdemux, "adding tag %s=%d", tag1, n1); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, - tag1, n1, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag1, n1, NULL); } if (n2 > 0) { GST_DEBUG_OBJECT (qtdemux, "adding tag %s=%d", tag2, n2); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, - tag2, n2, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag2, n2, NULL); } } } } static void -qtdemux_tag_add_tmpo (GstQTDemux * qtdemux, const char *tag1, const char *dummy, - GNode * node) +qtdemux_tag_add_tmpo (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; @@ -9408,16 +10801,16 @@ if (n1) { /* do not add bpm=0 */ GST_DEBUG_OBJECT (qtdemux, "adding tag %d", n1); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, - tag1, (gdouble) n1, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag1, (gdouble) n1, + NULL); } } } } static void -qtdemux_tag_add_uint32 (GstQTDemux * qtdemux, const char *tag1, - const char *dummy, GNode * node) +qtdemux_tag_add_uint32 (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; @@ -9435,16 +10828,15 @@ if (num) { /* do not add num=0 */ GST_DEBUG_OBJECT (qtdemux, "adding tag %d", num); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, - tag1, num, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag1, num, NULL); } } } } static void -qtdemux_tag_add_covr (GstQTDemux * qtdemux, const char *tag1, const char *dummy, - GNode * node) +qtdemux_tag_add_covr (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; @@ -9461,8 +10853,7 @@ gst_tag_image_data_to_image_sample ((guint8 *) data->data + 16, len - 16, GST_TAG_IMAGE_TYPE_NONE))) { GST_DEBUG_OBJECT (qtdemux, "adding tag size %d", len - 16); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, - tag1, sample, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag1, sample, NULL); gst_sample_unref (sample); } } @@ -9470,8 +10861,8 @@ } static void -qtdemux_tag_add_date (GstQTDemux * qtdemux, const char *tag, const char *dummy, - GNode * node) +qtdemux_tag_add_date (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { GNode *data; char *s; @@ -9493,8 +10884,7 @@ GDate *date; date = g_date_new_dmy (d, m, y); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, tag, - date, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag, date, NULL); g_date_free (date); } else { GST_DEBUG_OBJECT (qtdemux, "could not parse date string '%s'", s); @@ -9505,8 +10895,8 @@ } static void -qtdemux_tag_add_gnre (GstQTDemux * qtdemux, const char *tag, const char *dummy, - GNode * node) +qtdemux_tag_add_gnre (GstQTDemux * qtdemux, GstTagList * taglist, + const char *tag, const char *dummy, GNode * node) { GNode *data; @@ -9516,7 +10906,7 @@ * or no data atom and compatible brand suggests so */ if (qtdemux_is_brand_3gp (qtdemux, TRUE) || (qtdemux_is_brand_3gp (qtdemux, FALSE) && !data)) { - qtdemux_tag_add_str (qtdemux, tag, dummy, node); + qtdemux_tag_add_str (qtdemux, taglist, tag, dummy, node); return; } @@ -9533,8 +10923,7 @@ genre = gst_tag_id3_genre_get (n - 1); if (genre != NULL) { GST_DEBUG_OBJECT (qtdemux, "adding %d [%s]", n, genre); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, - tag, genre, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag, genre, NULL); } } } @@ -9542,8 +10931,8 @@ } static void -qtdemux_add_double_tag_from_str (GstQTDemux * demux, const gchar * tag, - guint8 * data, guint32 datasize) +qtdemux_add_double_tag_from_str (GstQTDemux * demux, GstTagList * taglist, + const gchar * tag, guint8 * data, guint32 datasize) { gdouble value; gchar *datacopy; @@ -9554,7 +10943,7 @@ /* convert the str to double */ if (sscanf (datacopy, "%lf", &value) == 1) { GST_DEBUG_OBJECT (demux, "adding tag: %s [%s]", tag, datacopy); - gst_tag_list_add (demux->tag_list, GST_TAG_MERGE_REPLACE, tag, value, NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag, value, NULL); } else { GST_WARNING_OBJECT (demux, "Failed to parse double from string: %s", datacopy); @@ -9564,8 +10953,8 @@ static void -qtdemux_tag_add_revdns (GstQTDemux * demux, const char *tag, - const char *tag_bis, GNode * node) +qtdemux_tag_add_revdns (GstQTDemux * demux, GstTagList * taglist, + const char *tag, const char *tag_bis, GNode * node) { GNode *mean; GNode *name; @@ -9655,11 +11044,11 @@ if (!g_ascii_strncasecmp (tags[i].name, namestr, namesize)) { switch (gst_tag_get_type (tags[i].tag)) { case G_TYPE_DOUBLE: - qtdemux_add_double_tag_from_str (demux, tags[i].tag, + qtdemux_add_double_tag_from_str (demux, taglist, tags[i].tag, ((guint8 *) data->data) + 16, datasize - 16); break; case G_TYPE_STRING: - qtdemux_tag_add_str (demux, tags[i].tag, NULL, node); + qtdemux_tag_add_str (demux, taglist, tags[i].tag, NULL, node); break; default: /* not reached */ @@ -9697,13 +11086,13 @@ } static void -qtdemux_tag_add_id32 (GstQTDemux * demux, const char *tag, +qtdemux_tag_add_id32 (GstQTDemux * demux, GstTagList * taglist, const char *tag, const char *tag_bis, GNode * node) { guint8 *data; GstBuffer *buf; guint len; - GstTagList *taglist = NULL; + GstTagList *id32_taglist = NULL; GST_LOG_OBJECT (demux, "parsing ID32"); @@ -9717,21 +11106,19 @@ buf = gst_buffer_new_allocate (NULL, len - 14, NULL); gst_buffer_fill (buf, 0, data + 14, len - 14); - taglist = gst_tag_list_from_id3v2_tag (buf); - if (taglist) { + id32_taglist = gst_tag_list_from_id3v2_tag (buf); + if (id32_taglist) { GST_LOG_OBJECT (demux, "parsing ok"); - gst_tag_list_insert (demux->tag_list, taglist, GST_TAG_MERGE_KEEP); + gst_tag_list_insert (taglist, id32_taglist, GST_TAG_MERGE_KEEP); + gst_tag_list_unref (id32_taglist); } else { GST_LOG_OBJECT (demux, "parsing failed"); } - if (taglist) - gst_tag_list_unref (taglist); - gst_buffer_unref (buf); } -typedef void (*GstQTDemuxAddTagFunc) (GstQTDemux * demux, +typedef void (*GstQTDemuxAddTagFunc) (GstQTDemux * demux, GstTagList * taglist, const char *tag, const char *tag_bis, GNode * node); /* unmapped tags @@ -9808,8 +11195,15 @@ FOURCC_ID32, "", NULL, qtdemux_tag_add_id32} }; +struct _GstQtDemuxTagList +{ + GstQTDemux *demux; + GstTagList *taglist; +}; +typedef struct _GstQtDemuxTagList GstQtDemuxTagList; + static void -qtdemux_tag_add_blob (GNode * node, GstQTDemux * demux) +qtdemux_tag_add_blob (GNode * node, GstQtDemuxTagList * qtdemuxtaglist) { gint len; guint8 *data; @@ -9820,6 +11214,8 @@ GstStructure *s; guint i; guint8 ndata[4]; + GstQTDemux *demux = qtdemuxtaglist->demux; + GstTagList *taglist = qtdemuxtaglist->taglist; data = node->data; len = QT_UINT32 (data); @@ -9857,20 +11253,24 @@ GST_DEBUG_OBJECT (demux, "adding private tag; size %d, info %" GST_PTR_FORMAT, len, s); - gst_tag_list_add (demux->tag_list, GST_TAG_MERGE_APPEND, + gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_QT_DEMUX_PRIVATE_TAG, sample, NULL); gst_sample_unref (sample); } static void -qtdemux_parse_udta (GstQTDemux * qtdemux, GNode * udta) +qtdemux_parse_udta (GstQTDemux * qtdemux, GstTagList * taglist, GNode * udta) { GNode *meta; GNode *ilst; GNode *xmp_; GNode *node; gint i; + GstQtDemuxTagList demuxtaglist; + + demuxtaglist.demux = qtdemux; + demuxtaglist.taglist = taglist; meta = qtdemux_tree_get_child_by_type (udta, FOURCC_meta); if (meta != NULL) { @@ -9884,14 +11284,6 @@ GST_LOG_OBJECT (qtdemux, "no meta so using udta itself"); } - GST_DEBUG_OBJECT (qtdemux, "new tag list"); - if (!qtdemux->tag_list) { - qtdemux->tag_list = gst_tag_list_new_empty (); - gst_tag_list_set_scope (qtdemux->tag_list, GST_TAG_SCOPE_GLOBAL); - } else { - qtdemux->tag_list = gst_tag_list_make_writable (qtdemux->tag_list); - } - i = 0; while (i < G_N_ELEMENTS (add_funcs)) { node = qtdemux_tree_get_child_by_type (ilst, add_funcs[i].fourcc); @@ -9903,7 +11295,7 @@ GST_DEBUG_OBJECT (qtdemux, "too small tag atom %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (add_funcs[i].fourcc)); } else { - add_funcs[i].func (qtdemux, add_funcs[i].gst_tag, + add_funcs[i].func (qtdemux, taglist, add_funcs[i].gst_tag, add_funcs[i].gst_tag_bis, node); } g_node_destroy (node); @@ -9914,24 +11306,23 @@ /* parsed nodes have been removed, pass along remainder as blob */ g_node_children_foreach (ilst, G_TRAVERSE_ALL, - (GNodeForeachFunc) qtdemux_tag_add_blob, qtdemux); + (GNodeForeachFunc) qtdemux_tag_add_blob, &demuxtaglist); /* parse up XMP_ node if existing */ xmp_ = qtdemux_tree_get_child_by_type (udta, FOURCC_XMP_); if (xmp_ != NULL) { GstBuffer *buf; - GstTagList *taglist; + GstTagList *xmptaglist; buf = _gst_buffer_new_wrapped (((guint8 *) xmp_->data) + 8, QT_UINT32 ((guint8 *) xmp_->data) - 8, NULL); - taglist = gst_tag_list_from_xmp_buffer (buf); + xmptaglist = gst_tag_list_from_xmp_buffer (buf); gst_buffer_unref (buf); - qtdemux_handle_xmp_taglist (qtdemux, taglist); + qtdemux_handle_xmp_taglist (qtdemux, taglist, xmptaglist); } else { GST_DEBUG_OBJECT (qtdemux, "No XMP_ node found"); } - } typedef struct @@ -10062,32 +11453,44 @@ if (rdrf) { guint32 ref_type; guint8 *ref_data; + guint ref_len; - ref_type = QT_FOURCC ((guint8 *) rdrf->data + 12); - ref_data = (guint8 *) rdrf->data + 20; - if (ref_type == FOURCC_alis) { - guint record_len, record_version, fn_len; - - /* MacOSX alias record, google for alias-layout.txt */ - record_len = QT_UINT16 (ref_data + 4); - record_version = QT_UINT16 (ref_data + 4 + 2); - fn_len = QT_UINT8 (ref_data + 50); - if (record_len > 50 && record_version == 2 && fn_len > 0) { - ref.location = g_strndup ((gchar *) ref_data + 51, fn_len); + ref_len = QT_UINT32 ((guint8 *) rdrf->data); + if (ref_len > 20) { + ref_type = QT_FOURCC ((guint8 *) rdrf->data + 12); + ref_data = (guint8 *) rdrf->data + 20; + if (ref_type == FOURCC_alis) { + guint record_len, record_version, fn_len; + + if (ref_len > 70) { + /* MacOSX alias record, google for alias-layout.txt */ + record_len = QT_UINT16 (ref_data + 4); + record_version = QT_UINT16 (ref_data + 4 + 2); + fn_len = QT_UINT8 (ref_data + 50); + if (record_len > 50 && record_version == 2 && fn_len > 0) { + ref.location = g_strndup ((gchar *) ref_data + 51, fn_len); + } + } else { + GST_WARNING_OBJECT (qtdemux, "Invalid rdrf/alis size (%u < 70)", + ref_len); + } + } else if (ref_type == FOURCC_url_) { + ref.location = g_strndup ((gchar *) ref_data, ref_len - 8); + } else { + GST_DEBUG_OBJECT (qtdemux, + "unknown rdrf reference type %" GST_FOURCC_FORMAT, + GST_FOURCC_ARGS (ref_type)); + } + if (ref.location != NULL) { + GST_INFO_OBJECT (qtdemux, "New location: %s", ref.location); + redirects = + g_list_prepend (redirects, g_memdup (&ref, sizeof (ref))); + } else { + GST_WARNING_OBJECT (qtdemux, + "Failed to extract redirect location from rdrf atom"); } - } else if (ref_type == FOURCC_url_) { - ref.location = g_strdup ((gchar *) ref_data); - } else { - GST_DEBUG_OBJECT (qtdemux, - "unknown rdrf reference type %" GST_FOURCC_FORMAT, - GST_FOURCC_ARGS (ref_type)); - } - if (ref.location != NULL) { - GST_INFO_OBJECT (qtdemux, "New location: %s", ref.location); - redirects = g_list_prepend (redirects, g_memdup (&ref, sizeof (ref))); } else { - GST_WARNING_OBJECT (qtdemux, - "Failed to extract redirect location from rdrf atom"); + GST_WARNING_OBJECT (qtdemux, "Invalid rdrf size (%u < 20)", ref_len); } } @@ -10143,7 +11546,8 @@ GNode *trak; GNode *udta; GNode *mvex; - gint64 duration; + GstClockTime duration; + GNode *pssh; guint64 creation_time; GstDateTime *datetime = NULL; gint version; @@ -10227,14 +11631,6 @@ qtdemux_parse_mehd (qtdemux, &mehd_data); } - /* parse all traks */ - trak = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_trak); - while (trak) { - qtdemux_parse_trak (qtdemux, trak); - /* iterate all siblings */ - trak = qtdemux_tree_get_sibling_by_type (trak, FOURCC_trak); - } - /* set duration in the segment info */ gst_qtdemux_get_duration (qtdemux, &duration); if (duration) { @@ -10245,10 +11641,26 @@ qtdemux->segment.stop = duration; } + /* parse all traks */ + trak = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_trak); + while (trak) { + qtdemux_parse_trak (qtdemux, trak); + /* iterate all siblings */ + trak = qtdemux_tree_get_sibling_by_type (trak, FOURCC_trak); + } + + if (!qtdemux->tag_list) { + GST_DEBUG_OBJECT (qtdemux, "new tag list"); + qtdemux->tag_list = gst_tag_list_new_empty (); + gst_tag_list_set_scope (qtdemux->tag_list, GST_TAG_SCOPE_GLOBAL); + } else { + qtdemux->tag_list = gst_tag_list_make_writable (qtdemux->tag_list); + } + /* find tags */ udta = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_udta); if (udta) { - qtdemux_parse_udta (qtdemux, udta); + qtdemux_parse_udta (qtdemux, qtdemux->tag_list, udta); } else { GST_LOG_OBJECT (qtdemux, "No udta node found."); } @@ -10257,11 +11669,19 @@ udta = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_meta); if (udta) { GST_DEBUG_OBJECT (qtdemux, "Parsing meta box for tags."); - qtdemux_parse_udta (qtdemux, udta); + qtdemux_parse_udta (qtdemux, qtdemux->tag_list, udta); } else { GST_LOG_OBJECT (qtdemux, "No meta node found."); } + /* parse any protection system info */ + pssh = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_pssh); + while (pssh) { + GST_LOG_OBJECT (qtdemux, "Parsing pssh box."); + qtdemux_parse_pssh (qtdemux, pssh); + pssh = qtdemux_tree_get_sibling_by_type (pssh, FOURCC_pssh); + } + qtdemux->tag_list = qtdemux_add_container_format (qtdemux, qtdemux->tag_list); return TRUE; @@ -10473,11 +11893,15 @@ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); break; case 0x6C: /* MJPEG */ - caps = gst_caps_new_empty_simple ("image/jpeg"); + caps = + gst_caps_new_simple ("image/jpeg", "parsed", G_TYPE_BOOLEAN, TRUE, + NULL); codec_name = "Motion-JPEG"; break; case 0x6D: /* PNG */ - caps = gst_caps_new_empty_simple ("image/png"); + caps = + gst_caps_new_simple ("image/png", "parsed", G_TYPE_BOOLEAN, TRUE, + NULL); codec_name = "PNG still images"; break; case 0x6E: /* JPEG2000 */ @@ -10556,14 +11980,18 @@ break; case GST_MAKE_FOURCC ('j', 'p', 'e', 'g'): _codec ("JPEG still images"); - caps = gst_caps_new_empty_simple ("image/jpeg"); + caps = + gst_caps_new_simple ("image/jpeg", "parsed", G_TYPE_BOOLEAN, TRUE, + NULL); break; case GST_MAKE_FOURCC ('m', 'j', 'p', 'a'): case GST_MAKE_FOURCC ('A', 'V', 'D', 'J'): case GST_MAKE_FOURCC ('M', 'J', 'P', 'G'): case GST_MAKE_FOURCC ('d', 'm', 'b', '1'): _codec ("Motion-JPEG"); - caps = gst_caps_new_empty_simple ("image/jpeg"); + caps = + gst_caps_new_simple ("image/jpeg", "parsed", G_TYPE_BOOLEAN, TRUE, + NULL); break; case GST_MAKE_FOURCC ('m', 'j', 'p', 'b'): _codec ("Motion-JPEG format B"); @@ -10624,12 +12052,31 @@ break; case GST_MAKE_FOURCC ('2', 'v', 'u', 'y'): case GST_MAKE_FOURCC ('2', 'V', 'u', 'y'): - case GST_MAKE_FOURCC ('v', '2', '1', '0'): format = GST_VIDEO_FORMAT_UYVY; break; + case GST_MAKE_FOURCC ('v', '3', '0', '8'): + format = GST_VIDEO_FORMAT_v308; + break; + case GST_MAKE_FOURCC ('v', '2', '1', '6'): + format = GST_VIDEO_FORMAT_v216; + break; + case GST_MAKE_FOURCC ('v', '2', '1', '0'): + format = GST_VIDEO_FORMAT_v210; + break; case GST_MAKE_FOURCC ('r', '2', '1', '0'): format = GST_VIDEO_FORMAT_r210; break; + /* Packed YUV 4:4:4 10 bit in 32 bits, complex + case GST_MAKE_FOURCC ('v', '4', '1', '0'): + format = GST_VIDEO_FORMAT_v410; + break; + */ + /* Packed YUV 4:4:4:4 8 bit in 32 bits + * but different order than AYUV + case GST_MAKE_FOURCC ('v', '4', '0', '8'): + format = GST_VIDEO_FORMAT_v408; + break; + */ case GST_MAKE_FOURCC ('m', 'p', 'e', 'g'): case GST_MAKE_FOURCC ('m', 'p', 'g', '1'): _codec ("MPEG-1 video"); @@ -10893,6 +12340,7 @@ gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "4444", NULL); break; + case GST_MAKE_FOURCC ('v', 'c', '-', '1'): case FOURCC_ovc1: _codec ("VC-1"); caps = gst_caps_new_simple ("video/x-wmv", @@ -10915,6 +12363,7 @@ gst_video_info_init (&info); gst_video_info_set_format (&info, format, stream->width, stream->height); + caps = gst_video_info_to_caps (&info); *codec_name = gst_pb_utils_get_codec_description (caps); @@ -10933,31 +12382,32 @@ const GstStructure *s; const gchar *name; gint endian = 0; + GstAudioFormat format = 0; + gint depth; + + GST_DEBUG_OBJECT (qtdemux, "resolve fourcc 0x%08x", GUINT32_TO_BE (fourcc)); - GST_DEBUG_OBJECT (qtdemux, "resolve fourcc %08x", fourcc); + depth = stream->bytes_per_packet * 8; switch (fourcc) { case GST_MAKE_FOURCC ('N', 'O', 'N', 'E'): case GST_MAKE_FOURCC ('r', 'a', 'w', ' '): - _codec ("Raw 8-bit PCM audio"); - caps = gst_caps_new_simple ("audio/x-raw", - "format", G_TYPE_STRING, "U8", - "layout", G_TYPE_STRING, "interleaved", NULL); - break; + /* 8-bit audio is unsigned */ + if (depth == 8) + format = GST_AUDIO_FORMAT_U8; + /* otherwise it's signed and big-endian just like 'twos' */ case GST_MAKE_FOURCC ('t', 'w', 'o', 's'): endian = G_BIG_ENDIAN; /* fall-through */ case GST_MAKE_FOURCC ('s', 'o', 'w', 't'): { gchar *str; - gint depth; - GstAudioFormat format; if (!endian) endian = G_LITTLE_ENDIAN; - depth = stream->bytes_per_packet * 8; - format = gst_audio_format_build_integer (TRUE, endian, depth, depth); + if (!format) + format = gst_audio_format_build_integer (TRUE, endian, depth, depth); str = g_strdup_printf ("Raw %d-bit PCM audio", depth); _codec (str); @@ -11124,6 +12574,7 @@ _codec ("QualComm PureVoice"); caps = gst_caps_from_string ("audio/qcelp"); break; + case GST_MAKE_FOURCC ('w', 'm', 'a', ' '): case FOURCC_owma: _codec ("WMA"); caps = gst_caps_new_empty_simple ("audio/x-wma"); @@ -11163,8 +12614,6 @@ "layout", G_TYPE_STRING, (flags & FLAG_IS_NON_INTERLEAVED) ? "non-interleaved" : "interleaved", NULL); } else { - if (depth == 0) - depth = 32; if (width == 0) width = 32; if (width == 64) { @@ -11224,7 +12673,7 @@ { GstCaps *caps; - GST_DEBUG_OBJECT (qtdemux, "resolve fourcc %08x", fourcc); + GST_DEBUG_OBJECT (qtdemux, "resolve fourcc 0x%08x", GUINT32_TO_BE (fourcc)); switch (fourcc) { case GST_MAKE_FOURCC ('m', 'p', '4', 's'): @@ -11274,3 +12723,24 @@ } return caps; } + +static void +gst_qtdemux_append_protection_system_id (GstQTDemux * qtdemux, + const gchar * system_id) +{ + gint i; + + if (!qtdemux->protection_system_ids) + qtdemux->protection_system_ids = + g_ptr_array_new_with_free_func ((GDestroyNotify) g_free); + /* Check whether we already have an entry for this system ID. */ + for (i = 0; i < qtdemux->protection_system_ids->len; ++i) { + const gchar *id = g_ptr_array_index (qtdemux->protection_system_ids, i); + if (g_ascii_strcasecmp (system_id, id) == 0) { + return; + } + } + GST_DEBUG_OBJECT (qtdemux, "Adding cenc protection system ID %s", system_id); + g_ptr_array_add (qtdemux->protection_system_ids, g_ascii_strdown (system_id, + -1)); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_dump.c gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_dump.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_dump.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_dump.c 2015-10-22 08:02:54.000000000 +0000 @@ -499,14 +499,16 @@ gboolean qtdemux_dump_ctts (GstQTDemux * qtdemux, GstByteReader * data, int depth) { - guint32 ver_flags = 0, num_entries = 0, i, count, offset; + guint32 ver_flags = 0, num_entries = 0, i, count; + gint32 offset; + if (!gst_byte_reader_get_uint32_be (data, &ver_flags) || !gst_byte_reader_get_uint32_be (data, &num_entries)) return FALSE; GST_LOG ("%*s version/flags: %08x", depth, "", ver_flags); - GST_LOG ("%*s n entries: %d", depth, "", num_entries); + GST_LOG ("%*s n entries: %u", depth, "", num_entries); if (!qt_atom_parser_has_chunks (data, num_entries, 4 + 4)) return FALSE; @@ -520,6 +522,28 @@ } gboolean +qtdemux_dump_cslg (GstQTDemux * qtdemux, GstByteReader * data, int depth) +{ + guint32 ver_flags = 0, shift = 0; + gint32 least_offset = 0, start_time = 0, end_time = 0; + + if (!gst_byte_reader_get_uint32_be (data, &ver_flags) || + !gst_byte_reader_get_uint32_be (data, &shift) || + !gst_byte_reader_get_int32_be (data, &least_offset) || + !gst_byte_reader_get_int32_be (data, &start_time) || + !gst_byte_reader_get_int32_be (data, &end_time)) + return FALSE; + + GST_LOG ("%*s version/flags: %08x", depth, "", ver_flags); + GST_LOG ("%*s shift: %u", depth, "", shift); + GST_LOG ("%*s least offset: %d", depth, "", least_offset); + GST_LOG ("%*s start time: %d", depth, "", start_time); + GST_LOG ("%*s end time: %d", depth, "", end_time); + + return TRUE; +} + +gboolean qtdemux_dump_co64 (GstQTDemux * qtdemux, GstByteReader * data, int depth) { guint32 ver_flags = 0, num_entries = 0, i; @@ -568,11 +592,23 @@ if (!qt_atom_parser_has_remaining (data, 4)) return FALSE; + GST_LOG ("%*s version/flags: %08x", depth, "", GET_UINT32 (data)); GST_LOG ("%*s size: %d", depth, "", GET_UINT32 (data)); return TRUE; } gboolean +qtdemux_dump_mfhd (GstQTDemux * qtdemux, GstByteReader * data, int depth) +{ + if (!qt_atom_parser_has_remaining (data, 4)) + return FALSE; + + GST_LOG ("%*s version/flags: %08x", depth, "", GET_UINT32 (data)); + GST_LOG ("%*s sequence_number: %d", depth, "", GET_UINT32 (data)); + return TRUE; +} + +gboolean qtdemux_dump_tfra (GstQTDemux * qtdemux, GstByteReader * data, int depth) { guint64 time = 0, moof_offset = 0; @@ -585,8 +621,8 @@ GST_LOG ("%*s version/flags: %08x", depth, "", ver_flags); if (!gst_byte_reader_get_uint32_be (data, &track_id) || - gst_byte_reader_get_uint32_be (data, &len) || - gst_byte_reader_get_uint32_be (data, &num_entries)) + !gst_byte_reader_get_uint32_be (data, &len) || + !gst_byte_reader_get_uint32_be (data, &num_entries)) return FALSE; GST_LOG ("%*s track ID: %u", depth, "", track_id); @@ -825,6 +861,36 @@ } gboolean +qtdemux_dump_svmi (GstQTDemux * qtdemux, GstByteReader * data, int depth) +{ + guint32 version; + guint stereo_mono_change_count; + guint i; + + version = GET_UINT32 (data); + GST_LOG ("%*s version/flags: %08x", depth, "", version); + + if (!version) { + /* stereoscopic visual type information */ + GST_LOG ("%*s stereo_composition_type: %d", depth, "", + GET_UINT8 (data)); + GST_LOG ("%*s is_left_first: %d", depth, "", + ((guint8) GET_UINT8 (data)) & 0x01); + + /* stereo_mono_change information */ + stereo_mono_change_count = GET_UINT32 (data); + GST_LOG ("%*s stereo_mono_change_count: %d", depth, "", + stereo_mono_change_count); + for (i = 1; i <= stereo_mono_change_count; i++) { + GST_LOG ("%*s sample_count: %d", depth, "", GET_UINT32 (data)); + GST_LOG ("%*s stereo_flag: %d", depth, "", + ((guint8) GET_UINT8 (data)) & 0x01); + } + } + return TRUE; +} + +gboolean qtdemux_dump_unknown (GstQTDemux * qtdemux, GstByteReader * data, int depth) { int len; @@ -877,10 +943,13 @@ gboolean qtdemux_node_dump (GstQTDemux * qtdemux, GNode * node) { - if (_gst_debug_min < GST_LEVEL_LOG) +#ifndef GST_DISABLE_GST_DEBUG + /* Only traverse/dump if we know it will be outputted in the end */ + if (qtdemux_debug->threshold < GST_LEVEL_LOG) return TRUE; g_node_traverse (node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, qtdemux_node_dump_foreach, qtdemux); +#endif return TRUE; } diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_dump.h gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_dump.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_dump.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_dump.h 2015-10-22 08:02:54.000000000 +0000 @@ -61,8 +61,12 @@ int depth); gboolean qtdemux_dump_ctts (GstQTDemux * qtdemux, GstByteReader * data, int depth); +gboolean qtdemux_dump_cslg (GstQTDemux * qtdemux, GstByteReader * data, + int depth); gboolean qtdemux_dump_mfro (GstQTDemux * qtdemux, GstByteReader * data, int depth); +gboolean qtdemux_dump_mfhd (GstQTDemux * qtdemux, GstByteReader * data, + int depth); gboolean qtdemux_dump_tfra (GstQTDemux * qtdemux, GstByteReader * data, int depth); gboolean qtdemux_dump_tfhd (GstQTDemux * qtdemux, GstByteReader * data, @@ -79,6 +83,8 @@ int depth); gboolean qtdemux_dump_unknown (GstQTDemux * qtdemux, GstByteReader * data, int depth); +gboolean qtdemux_dump_svmi (GstQTDemux *qtdemux, GstByteReader *data, + int depth); gboolean qtdemux_node_dump (GstQTDemux * qtdemux, GNode * node); diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux.h gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux.h 2015-10-22 08:02:54.000000000 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include "gstisoff.h" G_BEGIN_DECLS @@ -76,11 +77,10 @@ GNode *moov_node_compressed; guint32 timescale; - guint64 duration; + GstClockTime duration; gboolean fragmented; - /* offset of the mfra atom */ - guint64 mfra_offset; + gboolean fragmented_seek_pending; guint64 moof_offset; gint state; @@ -117,16 +117,13 @@ /* configured playback region */ GstSegment segment; GstEvent *pending_newsegment; - gboolean upstream_newsegment; /* qtdemux received upstream - * newsegment in TIME format which likely - * means that upstream is driving the pipeline - * (adaptive demuxers) */ + gboolean upstream_format_is_time; /* qtdemux received upstream + * newsegment in TIME format which likely + * means that upstream is driving the pipeline + * (adaptive demuxers / dlna) */ gint64 seek_offset; gint64 push_seek_start; gint64 push_seek_stop; - guint64 segment_base; /* The offset from which playback was started, needs to - * be subtracted from GstSegment.base to get a correct - * running time whenever a new QtSegment is activated */ #if 0 /* gst index support */ @@ -148,6 +145,10 @@ guint64 fragment_start_offset; gint64 chapters_track_id; + + /* protection support */ + GPtrArray *protection_system_ids; /* Holds identifiers of all content protection systems for all tracks */ + GQueue protection_event_queue; /* holds copy of upstream protection events */ }; struct _GstQTDemuxClass { diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_lang.c gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_lang.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_lang.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_lang.c 2015-10-22 08:02:54.000000000 +0000 @@ -189,7 +189,7 @@ { const gchar *iso_code; - g_assert (qt_lang_code < 0x800); + g_assert (qt_lang_code < 0x400); if (qt_lang_code < G_N_ELEMENTS (qt_lang_map)) iso_code = qt_lang_map[qt_lang_code]; diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_types.c gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_types.c --- gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_types.c 2014-09-04 09:52:04.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_types.c 2015-10-22 08:02:54.000000000 +0000 @@ -146,6 +146,7 @@ {FOURCC_rdrf, "rdrf", 0,}, {FOURCC__gen, "Custom Genre", QT_FLAG_CONTAINER,}, {FOURCC_ctts, "Composition time to sample", 0, qtdemux_dump_ctts}, + {FOURCC_cslg, "Composition Shift Least Greatest", 0, qtdemux_dump_cslg}, {FOURCC_XiTh, "XiTh", 0}, {FOURCC_XdxT, "XdxT", 0}, {FOURCC_loci, "loci", 0}, @@ -157,7 +158,7 @@ {FOURCC_mfro, "movie fragment random access offset", 0, qtdemux_dump_mfro}, {FOURCC_moof, "movie fragment", QT_FLAG_CONTAINER,}, - {FOURCC_mfhd, "movie fragment header", 0,}, + {FOURCC_mfhd, "movie fragment header", 0, qtdemux_dump_mfhd}, {FOURCC_traf, "track fragment", QT_FLAG_CONTAINER,}, {FOURCC_tfhd, "track fragment header", 0, qtdemux_dump_tfhd}, @@ -182,6 +183,24 @@ {FOURCC_chap, "Chapter Reference"}, {FOURCC_btrt, "Bitrate information", 0}, {FOURCC_frma, "Audio codec format", 0}, + {FOURCC_name, "name", 0}, + {FOURCC_mean, "mean", 0}, + {FOURCC_svmi, "Stereoscopic Video Media Information", 0, + qtdemux_dump_svmi}, + {FOURCC_scdi, "Stereoscopic Camera and Display Information", 0, + qtdemux_dump_unknown}, + {FOURCC_saiz, "sample auxiliary information sizes", 0}, + {FOURCC_saio, "sample auxiliary information offsets", 0}, + {FOURCC_encv, "encrypted visual sample entry", 0}, + {FOURCC_enca, "encrypted audio sample entry", 0}, + {FOURCC_enct, "encrypted text sample entry", 0}, + {FOURCC_encs, "encrypted system sample entry", 0}, + {FOURCC_sinf, "protection scheme information", QT_FLAG_CONTAINER}, + {FOURCC_frma, "original format", 0}, + {FOURCC_schm, "scheme type", 0}, + {FOURCC_schi, "scheme information", QT_FLAG_CONTAINER}, + {FOURCC_pssh, "protection system specific header", 0}, + {FOURCC_tenc, "track encryption", 0}, {0, "unknown", 0,}, }; diff -Nru gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_types.h gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_types.h --- gst-plugins-good1.0-1.4.3/gst/isomp4/qtdemux_types.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/isomp4/qtdemux_types.h 2015-10-22 08:02:54.000000000 +0000 @@ -62,7 +62,8 @@ TF_DEFAULT_SAMPLE_DURATION = 0x000008, /* default-sample-duration-present */ TF_DEFAULT_SAMPLE_SIZE = 0x000010, /* default-sample-size-present */ TF_DEFAULT_SAMPLE_FLAGS = 0x000020, /* default-sample-flags-present */ - TF_DURATION_IS_EMPTY = 0x100000 /* duration-is-empty */ + TF_DURATION_IS_EMPTY = 0x010000, /* duration-is-empty */ + TF_DEFAULT_BASE_IS_MOOF = 0x020000 /* default-base-is-moof */ }; enum TrFlags diff -Nru gst-plugins-good1.0-1.4.3/gst/law/alaw-decode.c gst-plugins-good1.0-1.6.1/gst/law/alaw-decode.c --- gst-plugins-good1.0-1.4.3/gst/law/alaw-decode.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/alaw-decode.c 2015-10-22 08:02:54.000000000 +0000 @@ -34,16 +34,12 @@ GST_DEBUG_CATEGORY_STATIC (alaw_dec_debug); #define GST_CAT_DEFAULT alaw_dec_debug -static GstStateChangeReturn -gst_alaw_dec_change_state (GstElement * element, GstStateChange transition); - -static gboolean gst_alaw_dec_event (GstPad * pad, GstObject * parent, - GstEvent * event); -static GstFlowReturn gst_alaw_dec_chain (GstPad * pad, GstObject * parent, +static gboolean gst_alaw_dec_set_format (GstAudioDecoder * dec, GstCaps * caps); +static GstFlowReturn gst_alaw_dec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer); #define gst_alaw_dec_parent_class parent_class -G_DEFINE_TYPE (GstALawDec, gst_alaw_dec, GST_TYPE_ELEMENT); +G_DEFINE_TYPE (GstALawDec, gst_alaw_dec, GST_TYPE_AUDIO_DECODER); /* some day we might have defines in gstconfig.h that tell us about the * desired cpu/memory/binary size trade-offs */ @@ -115,279 +111,120 @@ #endif /* GST_ALAW_DEC_USE_TABLE */ static gboolean -gst_alaw_dec_setcaps (GstALawDec * alawdec, GstCaps * caps) +gst_alaw_dec_set_format (GstAudioDecoder * dec, GstCaps * caps) { + GstALawDec *alawdec = GST_ALAW_DEC (dec); GstStructure *structure; int rate, channels; - gboolean ret; - GstCaps *outcaps; GstAudioInfo info; structure = gst_caps_get_structure (caps, 0); - - ret = gst_structure_get_int (structure, "rate", &rate); - ret &= gst_structure_get_int (structure, "channels", &channels); - if (!ret) + if (!structure) { + GST_ERROR_OBJECT (dec, "failed to get structure from caps"); return FALSE; - - gst_audio_info_init (&info); - gst_audio_info_set_format (&info, GST_AUDIO_FORMAT_S16, rate, channels, NULL); - - outcaps = gst_audio_info_to_caps (&info); - ret = gst_pad_set_caps (alawdec->srcpad, outcaps); - gst_caps_unref (outcaps); - - if (ret) { - GST_DEBUG_OBJECT (alawdec, "rate=%d, channels=%d", rate, channels); - alawdec->info = info; - } - return ret; -} - -static GstCaps * -gst_alaw_dec_getcaps (GstPad * pad, GstCaps * filter) -{ - GstALawDec *alawdec; - GstPad *otherpad; - GstCaps *othercaps, *result; - GstCaps *templ; - const gchar *name; - gint i; - - alawdec = GST_ALAW_DEC (GST_PAD_PARENT (pad)); - - /* figure out the name of the caps we are going to return */ - if (pad == alawdec->srcpad) { - name = "audio/x-raw"; - otherpad = alawdec->sinkpad; - } else { - name = "audio/x-alaw"; - otherpad = alawdec->srcpad; - } - /* get caps from the peer, this can return NULL when there is no peer */ - othercaps = gst_pad_peer_query_caps (otherpad, NULL); - - /* get the template caps to make sure we return something acceptable */ - templ = gst_pad_get_pad_template_caps (pad); - - if (othercaps) { - /* there was a peer */ - othercaps = gst_caps_make_writable (othercaps); - - /* go through the caps and remove the fields we don't want */ - for (i = 0; i < gst_caps_get_size (othercaps); i++) { - GstStructure *structure; - - structure = gst_caps_get_structure (othercaps, i); - - /* adjust the name */ - gst_structure_set_name (structure, name); - - if (pad == alawdec->sinkpad) { - /* remove the fields we don't want */ - gst_structure_remove_fields (structure, "format", "layout", NULL); - } else { - /* add fixed fields */ - gst_structure_set (structure, "format", G_TYPE_STRING, - GST_AUDIO_NE (S16), "layout", G_TYPE_STRING, "interleaved", NULL); - } - } - /* filter against the allowed caps of the pad to return our result */ - result = gst_caps_intersect (othercaps, templ); - gst_caps_unref (othercaps); - gst_caps_unref (templ); - } else { - /* there was no peer, return the template caps */ - result = templ; } - if (filter && result) { - GstCaps *temp; - temp = gst_caps_intersect (result, filter); - gst_caps_unref (result); - result = temp; + if (!gst_structure_get_int (structure, "rate", &rate)) { + GST_ERROR_OBJECT (dec, "failed to find field rate in input caps"); + return FALSE; } - return result; -} - -static gboolean -gst_alaw_dec_query (GstPad * pad, GstObject * parent, GstQuery * query) -{ - gboolean res; - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_CAPS: - { - GstCaps *filter, *caps; - - gst_query_parse_caps (query, &filter); - caps = gst_alaw_dec_getcaps (pad, filter); - gst_query_set_caps_result (query, caps); - gst_caps_unref (caps); - - res = TRUE; - break; - } - default: - res = gst_pad_query_default (pad, parent, query); - break; + if (!gst_structure_get_int (structure, "channels", &channels)) { + GST_ERROR_OBJECT (dec, "failed to find field channels in input caps"); + return FALSE; } - return res; -} - -static void -gst_alaw_dec_class_init (GstALawDecClass * klass) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&alaw_dec_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&alaw_dec_sink_factory)); - - gst_element_class_set_static_metadata (element_class, "A Law audio decoder", - "Codec/Decoder/Audio", "Convert 8bit A law to 16bit PCM", - "Zaheer Abbas Merali "); - element_class->change_state = GST_DEBUG_FUNCPTR (gst_alaw_dec_change_state); - - GST_DEBUG_CATEGORY_INIT (alaw_dec_debug, "alawdec", 0, "A Law audio decoder"); -} - -static void -gst_alaw_dec_init (GstALawDec * alawdec) -{ - alawdec->sinkpad = - gst_pad_new_from_static_template (&alaw_dec_sink_factory, "sink"); - gst_pad_set_query_function (alawdec->sinkpad, - GST_DEBUG_FUNCPTR (gst_alaw_dec_query)); - gst_pad_set_event_function (alawdec->sinkpad, - GST_DEBUG_FUNCPTR (gst_alaw_dec_event)); - gst_pad_set_chain_function (alawdec->sinkpad, - GST_DEBUG_FUNCPTR (gst_alaw_dec_chain)); - gst_element_add_pad (GST_ELEMENT (alawdec), alawdec->sinkpad); - - alawdec->srcpad = - gst_pad_new_from_static_template (&alaw_dec_src_factory, "src"); - gst_pad_use_fixed_caps (alawdec->srcpad); - gst_pad_set_query_function (alawdec->srcpad, - GST_DEBUG_FUNCPTR (gst_alaw_dec_query)); - gst_element_add_pad (GST_ELEMENT (alawdec), alawdec->srcpad); -} - -static gboolean -gst_alaw_dec_event (GstPad * pad, GstObject * parent, GstEvent * event) -{ - GstALawDec *alawdec; - gboolean res; + gst_audio_info_init (&info); + gst_audio_info_set_format (&info, GST_AUDIO_FORMAT_S16, rate, channels, NULL); - alawdec = GST_ALAW_DEC (parent); + GST_DEBUG_OBJECT (alawdec, "rate=%d, channels=%d", rate, channels); - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - gst_alaw_dec_setcaps (alawdec, caps); - gst_event_unref (event); - - res = TRUE; - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - return res; + return gst_audio_decoder_set_output_format (dec, &info); } static GstFlowReturn -gst_alaw_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) +gst_alaw_dec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer) { - GstALawDec *alawdec; GstMapInfo inmap, outmap; gint16 *linear_data; guint8 *alaw_data; gsize alaw_size, linear_size; GstBuffer *outbuf; gint i; - GstFlowReturn ret; - - alawdec = GST_ALAW_DEC (parent); - if (G_UNLIKELY (!GST_AUDIO_INFO_IS_VALID (&alawdec->info))) - goto not_negotiated; + if (!buffer) { + return GST_FLOW_OK; + } - GST_LOG_OBJECT (alawdec, "buffer with ts=%" GST_TIME_FORMAT, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer))); + if (!gst_buffer_map (buffer, &inmap, GST_MAP_READ)) { + GST_ERROR_OBJECT (dec, "failed to map input buffer"); + goto error_failed_map_input_buffer; + } - gst_buffer_map (buffer, &inmap, GST_MAP_READ); alaw_data = inmap.data; alaw_size = inmap.size; linear_size = alaw_size * 2; - outbuf = gst_buffer_new_allocate (NULL, linear_size, NULL); - - gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE); - linear_data = (gint16 *) outmap.data; - - /* copy discont flag */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); - - GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer); - if (GST_BUFFER_DURATION_IS_VALID (buffer)) { - GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buffer); - } else { - GST_BUFFER_DURATION (outbuf) = gst_util_uint64_scale_int (GST_SECOND, - linear_size, GST_AUDIO_INFO_RATE (&alawdec->info) * - GST_AUDIO_INFO_BPF (&alawdec->info)); + outbuf = gst_audio_decoder_allocate_output_buffer (dec, linear_size); + if (!gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE)) { + GST_ERROR_OBJECT (dec, "failed to map input buffer"); + goto error_failed_map_output_buffer; } + linear_data = (gint16 *) outmap.data; for (i = 0; i < alaw_size; i++) { linear_data[i] = alaw_to_s16 (alaw_data[i]); } gst_buffer_unmap (outbuf, &outmap); gst_buffer_unmap (buffer, &inmap); - gst_buffer_unref (buffer); - ret = gst_pad_push (alawdec->srcpad, outbuf); + return gst_audio_decoder_finish_frame (dec, outbuf, -1); - return ret; +error_failed_map_output_buffer: + gst_buffer_unref (outbuf); -not_negotiated: - { - gst_buffer_unref (buffer); - GST_WARNING_OBJECT (alawdec, "no input format set: not-negotiated"); - return GST_FLOW_NOT_NEGOTIATED; - } +error_failed_map_input_buffer: + return GST_FLOW_ERROR; } -static GstStateChangeReturn -gst_alaw_dec_change_state (GstElement * element, GstStateChange transition) +static gboolean +gst_alaw_dec_start (GstAudioDecoder * dec) { - GstStateChangeReturn ret; - GstALawDec *dec = GST_ALAW_DEC (element); + gst_audio_decoder_set_estimate_rate (dec, TRUE); - switch (transition) { - default: - break; - } + return TRUE; +} - 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_audio_info_init (&dec->info); - break; - default: - break; - } +static void +gst_alaw_dec_class_init (GstALawDecClass * klass) +{ + GstElementClass *element_class = (GstElementClass *) klass; + GstAudioDecoderClass *audiodec_class = GST_AUDIO_DECODER_CLASS (klass); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&alaw_dec_src_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&alaw_dec_sink_factory)); + + audiodec_class->start = GST_DEBUG_FUNCPTR (gst_alaw_dec_start); + audiodec_class->set_format = GST_DEBUG_FUNCPTR (gst_alaw_dec_set_format); + audiodec_class->handle_frame = GST_DEBUG_FUNCPTR (gst_alaw_dec_handle_frame); - return ret; + gst_element_class_set_static_metadata (element_class, "A Law audio decoder", + "Codec/Decoder/Audio", + "Convert 8bit A law to 16bit PCM", + "Zaheer Abbas Merali "); + + GST_DEBUG_CATEGORY_INIT (alaw_dec_debug, "alawdec", 0, "A Law audio decoder"); +} + +static void +gst_alaw_dec_init (GstALawDec * alawdec) +{ + gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (alawdec), TRUE); + gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST + (alawdec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (alawdec)); } diff -Nru gst-plugins-good1.0-1.4.3/gst/law/alaw-decode.h gst-plugins-good1.0-1.6.1/gst/law/alaw-decode.h --- gst-plugins-good1.0-1.4.3/gst/law/alaw-decode.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/alaw-decode.h 2015-10-22 08:02:54.000000000 +0000 @@ -40,14 +40,11 @@ typedef struct _GstALawDecClass GstALawDecClass; struct _GstALawDec { - GstElement element; - - GstPad *sinkpad,*srcpad; - GstAudioInfo info; + GstAudioDecoder element; }; struct _GstALawDecClass { - GstElementClass parent_class; + GstAudioDecoderClass parent_class; }; GType gst_alaw_dec_get_type(void); diff -Nru gst-plugins-good1.0-1.4.3/gst/law/alaw-encode.c gst-plugins-good1.0-1.6.1/gst/law/alaw-encode.c --- gst-plugins-good1.0-1.4.3/gst/law/alaw-encode.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/alaw-encode.c 2015-10-22 08:02:54.000000000 +0000 @@ -35,12 +35,13 @@ extern GstStaticPadTemplate alaw_enc_src_factory; extern GstStaticPadTemplate alaw_enc_sink_factory; -static gboolean gst_alaw_enc_event (GstPad * pad, GstObject * parent, - GstEvent * event); -static GstFlowReturn gst_alaw_enc_chain (GstPad * pad, GstObject * parent, - GstBuffer * buffer); +G_DEFINE_TYPE (GstALawEnc, gst_alaw_enc, GST_TYPE_AUDIO_ENCODER); -G_DEFINE_TYPE (GstALawEnc, gst_alaw_enc, GST_TYPE_ELEMENT); +static gboolean gst_alaw_enc_start (GstAudioEncoder * audioenc); +static gboolean gst_alaw_enc_set_format (GstAudioEncoder * enc, + GstAudioInfo * info); +static GstFlowReturn gst_alaw_enc_handle_frame (GstAudioEncoder * enc, + GstBuffer * buffer); /* some day we might have defines in gstconfig.h that tell us about the * desired cpu/memory/binary size trade-offs */ @@ -300,198 +301,48 @@ #endif /* GST_ALAW_ENC_USE_TABLE */ -static GstCaps * -gst_alaw_enc_getcaps (GstPad * pad, GstCaps * filter) -{ - GstALawEnc *alawenc; - GstPad *otherpad; - GstCaps *othercaps, *result; - GstCaps *templ; - const gchar *name; - gint i; - - alawenc = GST_ALAW_ENC (GST_PAD_PARENT (pad)); - - /* figure out the name of the caps we are going to return */ - if (pad == alawenc->srcpad) { - name = "audio/x-alaw"; - otherpad = alawenc->sinkpad; - } else { - name = "audio/x-raw"; - otherpad = alawenc->srcpad; - } - /* get caps from the peer, this can return NULL when there is no peer */ - othercaps = gst_pad_peer_query_caps (otherpad, NULL); - - /* get the template caps to make sure we return something acceptable */ - templ = gst_pad_get_pad_template_caps (pad); - - if (othercaps) { - /* there was a peer */ - othercaps = gst_caps_make_writable (othercaps); - - /* go through the caps and remove the fields we don't want */ - for (i = 0; i < gst_caps_get_size (othercaps); i++) { - GstStructure *structure; - - structure = gst_caps_get_structure (othercaps, i); - - /* adjust the name */ - gst_structure_set_name (structure, name); - - if (pad == alawenc->srcpad) { - /* remove the fields we don't want */ - gst_structure_remove_fields (structure, "format", NULL); - } else { - /* add fixed fields */ - gst_structure_set (structure, "format", G_TYPE_STRING, - GST_AUDIO_NE (S16), NULL); - } - } - /* filter against the allowed caps of the pad to return our result */ - result = gst_caps_intersect (othercaps, templ); - gst_caps_unref (templ); - gst_caps_unref (othercaps); - } else { - /* there was no peer, return the template caps */ - result = templ; - } - if (filter && result) { - GstCaps *temp; - - temp = gst_caps_intersect (result, filter); - gst_caps_unref (result); - result = temp; - } - - return result; -} - static gboolean -gst_alaw_enc_query (GstPad * pad, GstObject * parent, GstQuery * query) +gst_alaw_enc_start (GstAudioEncoder * audioenc) { - gboolean res; + GstALawEnc *alawenc = GST_ALAW_ENC (audioenc); - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_CAPS: - { - GstCaps *filter, *caps; - - gst_query_parse_caps (query, &filter); - caps = gst_alaw_enc_getcaps (pad, filter); - gst_query_set_caps_result (query, caps); - gst_caps_unref (caps); - - res = TRUE; - break; - } - default: - res = gst_pad_query_default (pad, parent, query); - break; - } - return res; + alawenc->channels = 0; + alawenc->rate = 0; + + return TRUE; } static gboolean -gst_alaw_enc_setcaps (GstALawEnc * alawenc, GstCaps * caps) +gst_alaw_enc_set_format (GstAudioEncoder * audioenc, GstAudioInfo * info) { + GstCaps *base_caps; GstStructure *structure; + GstALawEnc *alawenc = GST_ALAW_ENC (audioenc); gboolean ret; - GstCaps *base_caps; - structure = gst_caps_get_structure (caps, 0); - gst_structure_get_int (structure, "channels", &alawenc->channels); - gst_structure_get_int (structure, "rate", &alawenc->rate); + alawenc->rate = info->rate; + alawenc->channels = info->channels; - base_caps = gst_pad_get_pad_template_caps (alawenc->srcpad); + base_caps = + gst_pad_get_pad_template_caps (GST_AUDIO_ENCODER_SRC_PAD (audioenc)); + g_assert (base_caps); base_caps = gst_caps_make_writable (base_caps); + g_assert (base_caps); + structure = gst_caps_get_structure (base_caps, 0); + g_assert (structure); gst_structure_set (structure, "rate", G_TYPE_INT, alawenc->rate, NULL); gst_structure_set (structure, "channels", G_TYPE_INT, alawenc->channels, NULL); - GST_DEBUG_OBJECT (alawenc, "rate=%d, channels=%d", alawenc->rate, - alawenc->channels); - - ret = gst_pad_set_caps (alawenc->srcpad, base_caps); - + ret = gst_audio_encoder_set_output_format (audioenc, base_caps); gst_caps_unref (base_caps); return ret; } -static void -gst_alaw_enc_class_init (GstALawEncClass * klass) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&alaw_enc_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&alaw_enc_sink_factory)); - - gst_element_class_set_static_metadata (element_class, - "A Law audio encoder", "Codec/Encoder/Audio", - "Convert 16bit PCM to 8bit A law", - "Zaheer Abbas Merali "); - - GST_DEBUG_CATEGORY_INIT (alaw_enc_debug, "alawenc", 0, "A Law audio encoder"); -} - -static void -gst_alaw_enc_init (GstALawEnc * alawenc) -{ - alawenc->sinkpad = - gst_pad_new_from_static_template (&alaw_enc_sink_factory, "sink"); - gst_pad_set_query_function (alawenc->sinkpad, - GST_DEBUG_FUNCPTR (gst_alaw_enc_query)); - gst_pad_set_event_function (alawenc->sinkpad, - GST_DEBUG_FUNCPTR (gst_alaw_enc_event)); - gst_pad_set_chain_function (alawenc->sinkpad, - GST_DEBUG_FUNCPTR (gst_alaw_enc_chain)); - gst_element_add_pad (GST_ELEMENT (alawenc), alawenc->sinkpad); - - alawenc->srcpad = - gst_pad_new_from_static_template (&alaw_enc_src_factory, "src"); - gst_pad_set_query_function (alawenc->srcpad, - GST_DEBUG_FUNCPTR (gst_alaw_enc_query)); - gst_pad_use_fixed_caps (alawenc->srcpad); - gst_element_add_pad (GST_ELEMENT (alawenc), alawenc->srcpad); - - /* init rest */ - alawenc->channels = 0; - alawenc->rate = 0; -} - -static gboolean -gst_alaw_enc_event (GstPad * pad, GstObject * parent, GstEvent * event) -{ - GstALawEnc *alawenc; - gboolean res; - - alawenc = GST_ALAW_ENC (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - gst_alaw_enc_setcaps (alawenc, caps); - gst_event_unref (event); - - res = TRUE; - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - return res; -} - static GstFlowReturn -gst_alaw_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) +gst_alaw_enc_handle_frame (GstAudioEncoder * audioenc, GstBuffer * buffer) { GstALawEnc *alawenc; GstMapInfo inmap, outmap; @@ -500,13 +351,17 @@ guint8 *alaw_data; guint alaw_size; GstBuffer *outbuf; - gint i; GstFlowReturn ret; - GstClockTime timestamp, duration; + gint i; + + if (!buffer) { + ret = GST_FLOW_OK; + goto done; + } - alawenc = GST_ALAW_ENC (parent); + alawenc = GST_ALAW_ENC (audioenc); - if (G_UNLIKELY (alawenc->rate == 0 || alawenc->channels == 0)) + if (!alawenc->rate || !alawenc->channels) goto not_negotiated; gst_buffer_map (buffer, &inmap, GST_MAP_READ); @@ -515,29 +370,12 @@ alaw_size = linear_size / 2; - timestamp = GST_BUFFER_TIMESTAMP (buffer); - duration = GST_BUFFER_DURATION (buffer); + outbuf = gst_audio_encoder_allocate_output_buffer (audioenc, alaw_size); - GST_LOG_OBJECT (alawenc, "buffer with ts=%" GST_TIME_FORMAT, - GST_TIME_ARGS (timestamp)); - - outbuf = gst_buffer_new_allocate (NULL, alaw_size, NULL); - - if (duration == GST_CLOCK_TIME_NONE) { - duration = gst_util_uint64_scale_int (alaw_size, - GST_SECOND, alawenc->rate * alawenc->channels); - } + g_assert (outbuf); gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE); alaw_data = outmap.data; - alaw_size = outmap.size; - - /* copy discont flag */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); - - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; - GST_BUFFER_DURATION (outbuf) = duration; for (i = 0; i < alaw_size; i++) { alaw_data[i] = s16_to_alaw (linear_data[i]); @@ -545,15 +383,45 @@ gst_buffer_unmap (outbuf, &outmap); gst_buffer_unmap (buffer, &inmap); - gst_buffer_unref (buffer); - ret = gst_pad_push (alawenc->srcpad, outbuf); + ret = gst_audio_encoder_finish_frame (audioenc, outbuf, -1); +done: return ret; not_negotiated: { - gst_buffer_unref (buffer); - return GST_FLOW_NOT_NEGOTIATED; + GST_DEBUG_OBJECT (alawenc, "no format negotiated"); + ret = GST_FLOW_NOT_NEGOTIATED; + goto done; } } + +static void +gst_alaw_enc_class_init (GstALawEncClass * klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + GstAudioEncoderClass *audio_encoder_class = GST_AUDIO_ENCODER_CLASS (klass); + + audio_encoder_class->start = GST_DEBUG_FUNCPTR (gst_alaw_enc_start); + audio_encoder_class->set_format = GST_DEBUG_FUNCPTR (gst_alaw_enc_set_format); + audio_encoder_class->handle_frame = + GST_DEBUG_FUNCPTR (gst_alaw_enc_handle_frame); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&alaw_enc_src_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&alaw_enc_sink_factory)); + + gst_element_class_set_static_metadata (element_class, + "A Law audio encoder", "Codec/Encoder/Audio", + "Convert 16bit PCM to 8bit A law", + "Zaheer Abbas Merali "); + GST_DEBUG_CATEGORY_INIT (alaw_enc_debug, "alawenc", 0, "A Law audio encoder"); +} + +static void +gst_alaw_enc_init (GstALawEnc * alawenc) +{ + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (alawenc)); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/law/alaw-encode.h gst-plugins-good1.0-1.6.1/gst/law/alaw-encode.h --- gst-plugins-good1.0-1.4.3/gst/law/alaw-encode.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/alaw-encode.h 2015-10-22 08:02:54.000000000 +0000 @@ -40,16 +40,14 @@ typedef struct _GstALawEncClass GstALawEncClass; struct _GstALawEnc { - GstElement element; - - GstPad *sinkpad,*srcpad; + GstAudioEncoder encoder; gint channels; gint rate; }; struct _GstALawEncClass { - GstElementClass parent_class; + GstAudioEncoderClass parent_class; }; GType gst_alaw_enc_get_type(void); diff -Nru gst-plugins-good1.0-1.4.3/gst/law/Makefile.am gst-plugins-good1.0-1.6.1/gst/law/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/law/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -15,28 +15,3 @@ libgstmulaw_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = mulaw-conversion.h alaw-encode.h alaw-decode.h mulaw-encode.h mulaw-decode.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstalaw -:SHARED libgstalaw \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstalaw_la_SOURCES) \ - $(nodist_libgstalaw_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalaw_la_CFLAGS) \ - -:LDFLAGS $(libgstalaw_la_LDFLAGS) \ - $(libgstalaw_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - -:SHARED libgstmulaw \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmulaw_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmulaw_la_CFLAGS) \ - -:LDFLAGS $(libgstmulaw_la_LDFLAGS) \ - $(libgstmulaw_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/law/Makefile.in gst-plugins-good1.0-1.6.1/gst/law/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/law/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/law -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -237,6 +246,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -369,9 +379,6 @@ 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@ @@ -489,17 +496,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -552,6 +559,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -596,7 +604,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/law/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/law/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -956,31 +963,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstalaw -:SHARED libgstalaw \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstalaw_la_SOURCES) \ - $(nodist_libgstalaw_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalaw_la_CFLAGS) \ - -:LDFLAGS $(libgstalaw_la_LDFLAGS) \ - $(libgstalaw_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - -:SHARED libgstmulaw \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmulaw_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmulaw_la_CFLAGS) \ - -:LDFLAGS $(libgstmulaw_la_LDFLAGS) \ - $(libgstmulaw_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/law/mulaw-decode.c gst-plugins-good1.0-1.6.1/gst/law/mulaw-decode.c --- gst-plugins-good1.0-1.4.3/gst/law/mulaw-decode.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/mulaw-decode.c 2015-10-22 08:02:54.000000000 +0000 @@ -47,7 +47,7 @@ enum { - ARG_0 + PROP_0 }; #define gst_mulawdec_parent_class parent_class @@ -135,6 +135,14 @@ return GST_FLOW_ERROR; } +static gboolean +gst_mulawdec_start (GstAudioDecoder * dec) +{ + gst_audio_decoder_set_estimate_rate (dec, TRUE); + + return TRUE; +} + static void gst_mulawdec_class_init (GstMuLawDecClass * klass) { @@ -147,6 +155,7 @@ gst_static_pad_template_get (&mulaw_dec_sink_factory)); + audiodec_class->start = GST_DEBUG_FUNCPTR (gst_mulawdec_start); audiodec_class->set_format = GST_DEBUG_FUNCPTR (gst_mulawdec_set_format); audiodec_class->handle_frame = GST_DEBUG_FUNCPTR (gst_mulawdec_handle_frame); @@ -160,4 +169,7 @@ gst_mulawdec_init (GstMuLawDec * mulawdec) { gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (mulawdec), TRUE); + gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST + (mulawdec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (mulawdec)); } diff -Nru gst-plugins-good1.0-1.4.3/gst/law/mulaw-encode.c gst-plugins-good1.0-1.6.1/gst/law/mulaw-encode.c --- gst-plugins-good1.0-1.4.3/gst/law/mulaw-encode.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/law/mulaw-encode.c 2015-10-22 08:02:54.000000000 +0000 @@ -43,7 +43,7 @@ enum { - ARG_0 + PROP_0 }; static gboolean gst_mulawenc_start (GstAudioEncoder * audioenc); @@ -207,5 +207,5 @@ static void gst_mulawenc_init (GstMuLawEnc * mulawenc) { - + GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (mulawenc)); } diff -Nru gst-plugins-good1.0-1.4.3/gst/level/gstlevel.c gst-plugins-good1.0-1.6.1/gst/level/gstlevel.c --- gst-plugins-good1.0-1.4.3/gst/level/gstlevel.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/level/gstlevel.c 2015-10-22 08:02:54.000000000 +0000 @@ -168,7 +168,7 @@ static void gst_level_post_message (GstLevel * filter); static gboolean gst_level_sink_event (GstBaseTransform * trans, GstEvent * event); - +static void gst_level_recalc_interval_frames (GstLevel * level); static void gst_level_class_init (GstLevelClass * klass) @@ -200,10 +200,13 @@ * * Deprecated: use the #GstLevel:post-messages property */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MESSAGE, g_param_spec_boolean ("message", "message", - "Post a 'level' message for each passed interval (deprecated)", - TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + "Post a 'level' message for each passed interval " + "(deprecated, use the post-messages property instead)", TRUE, + G_PARAM_READWRITE | G_PARAM_DEPRECATED | G_PARAM_STATIC_STRINGS)); +#endif g_object_class_install_property (gobject_class, PROP_INTERVAL, g_param_spec_uint64 ("interval", "Interval", "Interval of time between message posts (in nanoseconds)", @@ -296,10 +299,10 @@ break; case PROP_INTERVAL: filter->interval = g_value_get_uint64 (value); + /* Not exactly thread-safe, but property does not advertise that it + * can be changed at runtime anyway */ if (GST_AUDIO_INFO_RATE (&filter->info)) { - filter->interval_frames = - GST_CLOCK_TIME_TO_FRAMES (filter->interval, - GST_AUDIO_INFO_RATE (&filter->info)); + gst_level_recalc_interval_frames (filter); } break; case PROP_PEAK_TTL: @@ -428,13 +431,36 @@ } */ +static void +gst_level_recalc_interval_frames (GstLevel * level) +{ + GstClockTime interval = level->interval; + guint sample_rate = GST_AUDIO_INFO_RATE (&level->info); + guint interval_frames; + + interval_frames = GST_CLOCK_TIME_TO_FRAMES (interval, sample_rate); + + if (interval_frames == 0) { + GST_WARNING_OBJECT (level, "interval %" GST_TIME_FORMAT " is too small, " + "should be at least %" GST_TIME_FORMAT " for sample rate %u", + GST_TIME_ARGS (interval), + GST_TIME_ARGS (GST_FRAMES_TO_CLOCK_TIME (1, sample_rate)), sample_rate); + interval_frames = 1; + } + + level->interval_frames = interval_frames; + + GST_INFO_OBJECT (level, "interval_frames now %u for interval " + "%" GST_TIME_FORMAT " and sample rate %u", interval_frames, + GST_TIME_ARGS (interval), sample_rate); +} static gboolean gst_level_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out) { GstLevel *filter = GST_LEVEL (trans); GstAudioInfo info; - gint i, channels, rate; + gint i, channels; if (!gst_audio_info_from_caps (&info, in)) return FALSE; @@ -463,7 +489,6 @@ filter->info = info; channels = GST_AUDIO_INFO_CHANNELS (&info); - rate = GST_AUDIO_INFO_RATE (&info); /* allocate channel variable arrays */ g_free (filter->CS); @@ -486,7 +511,7 @@ filter->decay_peak_age[i] = G_GUINT64_CONSTANT (0); } - filter->interval_frames = GST_CLOCK_TIME_TO_FRAMES (filter->interval, rate); + gst_level_recalc_interval_frames (filter); return TRUE; } @@ -621,7 +646,7 @@ for (i = 0; i < channels; ++i) { if (!GST_BUFFER_FLAG_IS_SET (in, GST_BUFFER_FLAG_GAP)) { - filter->process (in_data, block_int_size, channels, &CS, + filter->process (in_data + (bps * i), block_int_size, channels, &CS, &filter->peak[i]); GST_LOG_OBJECT (filter, "[%d]: cumulative squares %lf, over %d samples/%d channels", @@ -630,7 +655,6 @@ } else { filter->peak[i] = 0.0; } - in_data += bps; filter->decay_peak_age[i] += GST_FRAMES_TO_CLOCK_TIME (num_frames, rate); GST_LOG_OBJECT (filter, @@ -677,7 +701,7 @@ filter->decay_peak_age[i] = G_GINT64_CONSTANT (0); } } - in_data += block_size * bps; + in_data += block_size * bps * channels; filter->num_frames += block_size; num_frames -= block_size; diff -Nru gst-plugins-good1.0-1.4.3/gst/level/Makefile.am gst-plugins-good1.0-1.6.1/gst/level/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/level/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/level/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -7,18 +7,3 @@ libgstlevel_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstlevel.h - - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstlevel -:SHARED libgstlevel \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstlevel_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstlevel_la_CFLAGS) \ - -:LDFLAGS $(libgstlevel_la_LDFLAGS) \ - $(libgstlevel_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/level/Makefile.in gst-plugins-good1.0-1.6.1/gst/level/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/level/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/level/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/level -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -576,7 +584,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/level/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/level/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -885,20 +892,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstlevel -:SHARED libgstlevel \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstlevel_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstlevel_la_CFLAGS) \ - -:LDFLAGS $(libgstlevel_la_LDFLAGS) \ - $(libgstlevel_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/Makefile.in gst-plugins-good1.0-1.6.1/gst/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/Makefile.in 2014-09-24 07:25:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -19,7 +19,17 @@ # descending into all subdirectories a second time, but only after the first # (parallel) run has finished, so it should go right through the second time. VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,8 +93,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am subdir = gst ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -107,7 +115,6 @@ $(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 \ @@ -122,6 +129,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -180,6 +188,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/common/parallel-subdirs.mak DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -337,9 +347,6 @@ 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@ @@ -457,17 +464,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -520,6 +527,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -549,7 +557,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -558,7 +565,7 @@ 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/parallel-subdirs.mak: +$(top_srcdir)/common/parallel-subdirs.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -845,6 +852,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + .PHONY: independent-subdirs $(SUBDIRS) diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/ebml-read.c gst-plugins-good1.0-1.6.1/gst/matroska/ebml-read.c --- gst-plugins-good1.0-1.4.3/gst/matroska/ebml-read.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/ebml-read.c 2015-10-22 08:02:54.000000000 +0000 @@ -221,7 +221,7 @@ gst_ebml_read_get_pos (ebml), *length, *prefix); #ifndef GST_DISABLE_GST_DEBUG - { + if (ebmlread_debug->threshold >= GST_LEVEL_LOG) { const guint8 *data = NULL; GstByteReader *br = gst_ebml_read_br (ebml); guint size = gst_byte_reader_get_remaining (br); diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/ebml-write.c gst-plugins-good1.0-1.6.1/gst/matroska/ebml-write.c --- gst-plugins-good1.0-1.4.3/gst/matroska/ebml-write.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/ebml-write.c 2015-10-22 08:02:54.000000000 +0000 @@ -255,9 +255,13 @@ if (GST_BUFFER_OFFSET (buffer) != ebml->last_pos) { gst_ebml_writer_send_segment_event (ebml, GST_BUFFER_OFFSET (buffer)); GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); + } else { + GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT); } if (ebml->writing_streamheader) { GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER); + } else { + GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_HEADER); } if (!is_keyframe) { GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT); @@ -457,12 +461,16 @@ GST_BUFFER_OFFSET_END (buf) = ebml->pos; if (ebml->writing_streamheader) { GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER); + } else { + GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_HEADER); } GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT); if (GST_BUFFER_OFFSET (buf) != ebml->last_pos) { gst_ebml_writer_send_segment_event (ebml, GST_BUFFER_OFFSET (buf)); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); + } else { + GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT); } ebml->last_pos = ebml->pos; ebml->last_write_result = gst_pad_push (ebml->srcpad, buf); diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/lzo.c gst-plugins-good1.0-1.6.1/gst/matroska/lzo.c --- gst-plugins-good1.0-1.4.3/gst/matroska/lzo.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/lzo.c 2015-10-22 08:02:54.000000000 +0000 @@ -286,6 +286,8 @@ av_log (NULL, AV_LOG_ERROR, "decompression incorrect\n"); else av_log (NULL, AV_LOG_ERROR, "decompression ok\n"); + + fclose (in); return 0; } #endif diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/Makefile.am gst-plugins-good1.0-1.6.1/gst/matroska/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/matroska/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -42,18 +42,3 @@ $(LIBM) libgstmatroska_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmatroska_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstmatroska -:SHARED libgstmatroska \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmatroska_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstmatroska_la_CFLAGS) \ - -:LDFLAGS $(libgstmatroska_la_LDFLAGS) \ - $(libgstmatroska_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/Makefile.in gst-plugins-good1.0-1.6.1/gst/matroska/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/matroska/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/matroska -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -235,6 +244,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -367,9 +377,6 @@ 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@ @@ -487,17 +494,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -550,6 +557,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -623,7 +631,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/matroska/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/matroska/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1004,20 +1011,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstmatroska -:SHARED libgstmatroska \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmatroska_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstmatroska_la_CFLAGS) \ - -:LDFLAGS $(libgstmatroska_la_LDFLAGS) \ - $(libgstmatroska_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-demux.c gst-plugins-good1.0-1.6.1/gst/matroska/matroska-demux.c --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-demux.c 2014-09-11 14:09:41.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-demux.c 2015-10-22 08:02:54.000000000 +0000 @@ -80,10 +80,10 @@ enum { - ARG_0, - ARG_METADATA, - ARG_STREAMINFO, - ARG_MAX_GAP_TIME + PROP_0, + PROP_METADATA, + PROP_STREAMINFO, + PROP_MAX_GAP_TIME }; #define DEFAULT_MAX_GAP_TIME (2 * GST_SECOND) @@ -208,7 +208,7 @@ gobject_class->get_property = gst_matroska_demux_get_property; gobject_class->set_property = gst_matroska_demux_set_property; - g_object_class_install_property (gobject_class, ARG_MAX_GAP_TIME, + g_object_class_install_property (gobject_class, PROP_MAX_GAP_TIME, g_param_spec_uint64 ("max-gap-time", "Maximum gap time", "The demuxer sends out segment events for skipping " "gaps longer than this (0 = disabled).", 0, G_MAXUINT64, @@ -239,7 +239,7 @@ gst_element_class_set_static_metadata (gstelement_class, "Matroska demuxer", "Codec/Demuxer", "Demuxes Matroska/WebM streams into video/audio/subtitles", - "GStreamer maintainers "); + "GStreamer maintainers "); } static void @@ -265,9 +265,10 @@ GST_OBJECT_FLAG_SET (demux, GST_ELEMENT_FLAG_INDEXABLE); + demux->flowcombiner = gst_flow_combiner_new (); + /* finish off */ gst_matroska_demux_reset (GST_ELEMENT (demux)); - demux->flowcombiner = gst_flow_combiner_new (); } static void @@ -327,6 +328,10 @@ } demux->invalid_duration = FALSE; + + demux->cached_length = G_MAXUINT64; + + gst_flow_combiner_clear (demux->flowcombiner); } static GstBuffer * @@ -392,11 +397,11 @@ GstPadTemplate *templ = NULL; GstStreamFlags stream_flags; GstCaps *caps = NULL; + GstTagList *cached_taglist; gchar *padname = NULL; GstFlowReturn ret; guint32 id, riff_fourcc = 0; guint16 riff_audio_fmt = 0; - GstTagList *list = NULL; GstEvent *stream_start; gchar *codec = NULL; gchar *stream_id; @@ -427,6 +432,9 @@ context->from_offset = -1; context->to_offset = G_MAXINT64; context->alignment = 1; + context->dts_only = FALSE; + context->intra_only = FALSE; + context->tags = gst_tag_list_new_empty (); demux->common.num_streams++; g_assert (demux->common.src->len == demux->common.num_streams); @@ -724,12 +732,61 @@ g_free (data); break; } + case GST_MATROSKA_ID_VIDEOSTEREOMODE: + { + guint64 num; + + if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK) + break; + + GST_DEBUG_OBJECT (demux, "StereoMode: %" G_GUINT64_FORMAT, num); + + switch (num) { + case GST_MATROSKA_STEREO_MODE_SBS_RL: + videocontext->multiview_flags = + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST; + /* fall through */ + case GST_MATROSKA_STEREO_MODE_SBS_LR: + videocontext->multiview_mode = + GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE; + break; + case GST_MATROSKA_STEREO_MODE_TB_RL: + videocontext->multiview_flags = + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST; + /* fall through */ + case GST_MATROSKA_STEREO_MODE_TB_LR: + videocontext->multiview_mode = + GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM; + break; + case GST_MATROSKA_STEREO_MODE_CHECKER_RL: + videocontext->multiview_flags = + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST; + /* fall through */ + case GST_MATROSKA_STEREO_MODE_CHECKER_LR: + videocontext->multiview_mode = + GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD; + break; + case GST_MATROSKA_STEREO_MODE_FBF_RL: + videocontext->multiview_flags = + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST; + /* fall through */ + case GST_MATROSKA_STEREO_MODE_FBF_LR: + videocontext->multiview_mode = + GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME; + /* FIXME: In frame-by-frame mode, left/right frame buffers are + * laced within one block, and we'll need to apply FIRST_IN_BUNDLE + * accordingly. See http://www.matroska.org/technical/specs/index.html#StereoMode */ + GST_FIXME_OBJECT (demux, + "Frame-by-frame stereoscopic mode not fully implemented"); + break; + } + break; + } default: GST_WARNING_OBJECT (demux, "Unknown TrackVideo subelement 0x%x - ignoring", id); /* fall through */ - case GST_MATROSKA_ID_VIDEOSTEREOMODE: case GST_MATROSKA_ID_VIDEODISPLAYUNIT: case GST_MATROSKA_ID_VIDEOPIXELCROPBOTTOM: case GST_MATROSKA_ID_VIDEOPIXELCROPTOP: @@ -1067,13 +1124,18 @@ demux->common.num_streams--; g_ptr_array_remove_index (demux->common.src, demux->common.num_streams); g_assert (demux->common.src->len == demux->common.num_streams); - if (context) { - gst_matroska_track_free (context); - } + gst_matroska_track_free (context); return ret; } + /* check for a cached track taglist */ + cached_taglist = + (GstTagList *) g_hash_table_lookup (demux->common.cached_track_taglists, + GUINT_TO_POINTER (context->uid)); + if (cached_taglist) + gst_tag_list_insert (context->tags, cached_taglist, GST_TAG_MERGE_APPEND); + /* now create the GStreamer connectivity */ switch (context->type) { case GST_MATROSKA_TRACK_TYPE_VIDEO:{ @@ -1087,7 +1149,9 @@ context->codec_priv_size, &codec, &riff_fourcc); if (codec) { - list = gst_tag_list_new (GST_TAG_VIDEO_CODEC, codec, NULL); + gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE, + GST_TAG_VIDEO_CODEC, codec, NULL); + context->tags_changed = TRUE; g_free (codec); } break; @@ -1104,7 +1168,9 @@ &codec, &riff_audio_fmt); if (codec) { - list = gst_tag_list_new (GST_TAG_AUDIO_CODEC, codec, NULL); + gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE, + GST_TAG_AUDIO_CODEC, codec, NULL); + context->tags_changed = TRUE; g_free (codec); } break; @@ -1140,13 +1206,11 @@ if (context->language) { const gchar *lang; - if (!list) - list = gst_tag_list_new_empty (); - /* Matroska contains ISO 639-2B codes, we want ISO 639-1 */ lang = gst_tag_get_language_code (context->language); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE, GST_TAG_LANGUAGE_CODE, (lang) ? lang : context->language, NULL); + context->tags_changed = TRUE; } if (caps == NULL) { @@ -1196,8 +1260,6 @@ GST_INFO_OBJECT (demux, "Adding pad '%s' with caps %" GST_PTR_FORMAT, padname, caps); - context->pending_tags = list; - gst_pad_set_element_private (context->pad, context); gst_pad_use_fixed_caps (context->pad); @@ -1233,6 +1295,29 @@ gst_pad_push_event (context->pad, stream_start); gst_pad_set_caps (context->pad, context->caps); + + if (demux->common.global_tags) { + GstEvent *tag_event; + + gst_tag_list_add (demux->common.global_tags, GST_TAG_MERGE_REPLACE, + GST_TAG_CONTAINER_FORMAT, "Matroska", NULL); + GST_DEBUG_OBJECT (context->pad, "Sending global_tags %p: %" GST_PTR_FORMAT, + demux->common.global_tags, demux->common.global_tags); + + tag_event = + gst_event_new_tag (gst_tag_list_copy (demux->common.global_tags)); + + gst_pad_push_event (context->pad, tag_event); + } + + if (G_UNLIKELY (context->tags_changed)) { + GST_DEBUG_OBJECT (context->pad, "Sending tags %p: %" + GST_PTR_FORMAT, context->tags, context->tags); + gst_pad_push_event (context->pad, + gst_event_new_tag (gst_tag_list_copy (context->tags))); + context->tags_changed = FALSE; + } + gst_element_add_pad (GST_ELEMENT (demux), context->pad); gst_flow_combiner_add_pad (demux->flowcombiner, context->pad); @@ -1390,7 +1475,6 @@ static gboolean gst_matroska_demux_send_event (GstMatroskaDemux * demux, GstEvent * event) { - gboolean is_segment; gboolean ret = FALSE; gint i; @@ -1399,8 +1483,6 @@ GST_DEBUG_OBJECT (demux, "Sending event of type %s to all source pads", GST_EVENT_TYPE_NAME (event)); - is_segment = (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT); - g_assert (demux->common.src->len == demux->common.num_streams); for (i = 0; i < demux->common.src->len; i++) { GstMatroskaTrackContext *stream; @@ -1409,26 +1491,26 @@ gst_event_ref (event); gst_pad_push_event (stream->pad, event); ret = TRUE; - - /* FIXME: send global tags before stream tags */ - if (G_UNLIKELY (is_segment && stream->pending_tags != NULL)) { - GST_DEBUG_OBJECT (demux, "Sending pending_tags %p for pad %s:%s : %" - GST_PTR_FORMAT, stream->pending_tags, - GST_DEBUG_PAD_NAME (stream->pad), stream->pending_tags); - gst_pad_push_event (stream->pad, - gst_event_new_tag (stream->pending_tags)); - stream->pending_tags = NULL; - } } - if (G_UNLIKELY (is_segment && demux->common.global_tags != NULL)) { + gst_event_unref (event); + return ret; +} + +static void +gst_matroska_demux_send_tags (GstMatroskaDemux * demux) +{ + gint i; + + if (G_UNLIKELY (demux->common.global_tags_changed)) { GstEvent *tag_event; gst_tag_list_add (demux->common.global_tags, GST_TAG_MERGE_REPLACE, GST_TAG_CONTAINER_FORMAT, "Matroska", NULL); GST_DEBUG_OBJECT (demux, "Sending global_tags %p : %" GST_PTR_FORMAT, demux->common.global_tags, demux->common.global_tags); - tag_event = gst_event_new_tag (demux->common.global_tags); + tag_event = + gst_event_new_tag (gst_tag_list_copy (demux->common.global_tags)); for (i = 0; i < demux->common.src->len; i++) { GstMatroskaTrackContext *stream; @@ -1438,11 +1520,24 @@ } gst_event_unref (tag_event); - demux->common.global_tags = NULL; + demux->common.global_tags_changed = FALSE; } - gst_event_unref (event); - return ret; + g_assert (demux->common.src->len == demux->common.num_streams); + for (i = 0; i < demux->common.src->len; i++) { + GstMatroskaTrackContext *stream; + + stream = g_ptr_array_index (demux->common.src, i); + + if (G_UNLIKELY (stream->tags_changed)) { + GST_DEBUG_OBJECT (demux, "Sending tags %p for pad %s:%s : %" + GST_PTR_FORMAT, stream->tags, + GST_DEBUG_PAD_NAME (stream->pad), stream->tags); + gst_pad_push_event (stream->pad, + gst_event_new_tag (gst_tag_list_copy (stream->tags))); + stream->tags_changed = FALSE; + } + } } static gboolean @@ -1485,6 +1580,7 @@ /* update the time */ gst_matroska_read_common_reset_streams (&demux->common, entry->time, TRUE); + gst_flow_combiner_reset (demux->flowcombiner); demux->common.segment.position = entry->time; demux->seek_block = entry->block; demux->seek_first = TRUE; @@ -1536,6 +1632,7 @@ guint64 length; guint32 id; guint needed; + gint64 oldpos, oldlength; orig_offset = demux->common.offset; @@ -1564,6 +1661,7 @@ } /* read in at newpos and scan for ebml cluster id */ + oldpos = oldlength = -1; while (1) { GstByteReader reader; gint cluster_pos; @@ -1582,6 +1680,15 @@ gst_buffer_map (buf, &map, GST_MAP_READ); data = map.data; size = map.size; + if (oldpos == newpos && oldlength == map.size) { + GST_ERROR_OBJECT (demux, "Stuck at same position"); + ret = GST_FLOW_ERROR; + goto exit; + } else { + oldpos = newpos; + oldlength = map.size; + } + gst_byte_reader_init (&reader, data, size); resume: cluster_pos = gst_byte_reader_masked_scan_uint32 (&reader, 0xffffffff, @@ -1857,10 +1964,15 @@ gboolean update = TRUE; gboolean pad_locked = FALSE; guint32 seqnum; + GstSearchMode snap_dir; + + g_return_val_if_fail (event != NULL, FALSE); if (pad) track = gst_pad_get_element_private (pad); + GST_DEBUG_OBJECT (demux, "Have seek %" GST_PTR_FORMAT, event); + gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); seqnum = gst_event_get_seqnum (event); @@ -1883,25 +1995,29 @@ seeksegment.duration = GST_CLOCK_TIME_NONE; } - if (event) { - GST_DEBUG_OBJECT (demux, "configuring seek"); - gst_segment_do_seek (&seeksegment, rate, format, flags, - cur_type, cur, stop_type, stop, &update); - /* compensate for clip start time, but only for SET seeks, - * otherwise it is already part of the segments */ - if (GST_CLOCK_TIME_IS_VALID (demux->stream_start_time)) { - if (cur_type == GST_SEEK_TYPE_SET) { - if (rate > 0.0) - seeksegment.position += demux->stream_start_time; - seeksegment.start += demux->stream_start_time; - } - if (stop_type == GST_SEEK_TYPE_SET - && GST_CLOCK_TIME_IS_VALID (seeksegment.stop)) { - if (rate < 0.0) - seeksegment.position += demux->stream_start_time; - seeksegment.stop += demux->stream_start_time; - } - } + GST_DEBUG_OBJECT (demux, "configuring seek"); + /* Subtract stream_start_time so we always seek on a segment + * in stream time */ + if (GST_CLOCK_TIME_IS_VALID (demux->stream_start_time)) { + seeksegment.start -= demux->stream_start_time; + seeksegment.position -= demux->stream_start_time; + if (GST_CLOCK_TIME_IS_VALID (seeksegment.stop)) + seeksegment.stop -= demux->stream_start_time; + else + seeksegment.stop = seeksegment.duration; + } + + gst_segment_do_seek (&seeksegment, rate, format, flags, + cur_type, cur, stop_type, stop, &update); + + /* Restore the clip timestamp offset */ + if (GST_CLOCK_TIME_IS_VALID (demux->stream_start_time)) { + seeksegment.position += demux->stream_start_time; + seeksegment.start += demux->stream_start_time; + if (!GST_CLOCK_TIME_IS_VALID (seeksegment.stop)) + seeksegment.stop = seeksegment.duration; + if (GST_CLOCK_TIME_IS_VALID (seeksegment.stop)) + seeksegment.stop += demux->stream_start_time; } /* restore segment duration (if any effect), @@ -1922,12 +2038,15 @@ /* check sanity before we start flushing and all that */ snap_next = after && !before; if (seeksegment.rate < 0) - snap_next = !snap_next; + snap_dir = snap_next ? GST_SEARCH_MODE_BEFORE : GST_SEARCH_MODE_AFTER; + else + snap_dir = snap_next ? GST_SEARCH_MODE_AFTER : GST_SEARCH_MODE_BEFORE; + GST_OBJECT_LOCK (demux); track = gst_matroska_read_common_get_seek_track (&demux->common, track); if ((entry = gst_matroska_read_common_do_index_seek (&demux->common, track, seeksegment.position, &demux->seek_index, &demux->seek_entry, - snap_next)) == NULL) { + snap_dir)) == NULL) { /* pull mode without index can scan later on */ if (demux->streaming) { GST_DEBUG_OBJECT (demux, "No matching seek entry in index"); @@ -2875,25 +2994,16 @@ if (!gst_buffer_get_size (*buf) || !gst_buffer_map (*buf, &map, GST_MAP_READ)) return GST_FLOW_OK; - /* Need \0-terminator at the end */ - if (map.data[map.size - 1] != '\0') { - newbuf = gst_buffer_new_and_alloc (map.size + 1); - - /* Copy old buffer and add a 0 at the end */ - gst_buffer_fill (newbuf, 0, map.data, map.size); - gst_buffer_memset (newbuf, map.size, 0, 1); + /* The subtitle buffer we push out should not include a NUL terminator as + * part of the data. */ + if (map.data[map.size - 1] == '\0') { + gst_buffer_set_size (*buf, map.size - 1); gst_buffer_unmap (*buf, &map); - - gst_buffer_copy_into (newbuf, *buf, - GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_FLAGS | - GST_BUFFER_COPY_META, 0, -1); - gst_buffer_unref (*buf); - *buf = newbuf; gst_buffer_map (*buf, &map, GST_MAP_READ); } if (!sub_stream->invalid_utf8) { - if (g_utf8_validate ((gchar *) map.data, map.size - 1, NULL)) { + if (g_utf8_validate ((gchar *) map.data, map.size, NULL)) { goto next; } GST_WARNING_OBJECT (element, "subtitle stream %" G_GUINT64_FORMAT @@ -3061,6 +3171,7 @@ gint flags = 0; gint64 referenceblock = 0; gint64 offset; + GstClockTime buffer_timestamp; offset = gst_ebml_read_get_offset (ebml); @@ -3439,7 +3550,15 @@ goto next_lace; } - GST_BUFFER_TIMESTAMP (sub) = lace_time; + buffer_timestamp = gst_matroska_track_get_buffer_timestamp (stream, sub); + + if (!stream->dts_only) { + GST_BUFFER_PTS (sub) = lace_time; + } else { + GST_BUFFER_DTS (sub) = lace_time; + if (stream->intra_only) + GST_BUFFER_PTS (sub) = lace_time; + } if (GST_CLOCK_TIME_IS_VALID (lace_time)) { GstClockTime last_stop_end; @@ -3548,7 +3667,7 @@ "Pushing lace %d, data of size %" G_GSIZE_FORMAT " for stream %d, time=%" GST_TIME_FORMAT " and duration=%" GST_TIME_FORMAT, n, gst_buffer_get_size (sub), stream_num, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (sub)), + GST_TIME_ARGS (buffer_timestamp), GST_TIME_ARGS (GST_BUFFER_DURATION (sub))); #if 0 @@ -3559,13 +3678,13 @@ GST_LOG_OBJECT (demux, "adding association %" GST_TIME_FORMAT "-> %" G_GUINT64_FORMAT " for writer id %d", - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (sub)), cluster_offset, + GST_TIME_ARGS (buffer_timestamp), cluster_offset, stream->index_writer_id); gst_index_add_association (demux->common.element_index, stream->index_writer_id, GST_BUFFER_FLAG_IS_SET (sub, GST_BUFFER_FLAG_DELTA_UNIT) ? 0 : GST_ASSOCIATION_FLAG_KEY_UNIT, - GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (sub), GST_FORMAT_BYTES, - cluster_offset, NULL); + GST_FORMAT_TIME, buffer_timestamp, GST_FORMAT_BYTES, cluster_offset, + NULL); } #endif @@ -3581,13 +3700,16 @@ for 32 bit samples, etc), or bad things will happen downstream as elements typically assume minimal alignment. Therefore, create an aligned copy if necessary. */ - g_assert (stream->alignment <= G_MEM_ALIGN); sub = gst_matroska_demux_align_buffer (demux, sub, stream->alignment); if (GST_BUFFER_PTS_IS_VALID (sub)) { stream->pos = GST_BUFFER_PTS (sub); if (GST_BUFFER_DURATION_IS_VALID (sub)) stream->pos += GST_BUFFER_DURATION (sub); + } else if (GST_BUFFER_DTS_IS_VALID (sub)) { + stream->pos = GST_BUFFER_DTS (sub); + if (GST_BUFFER_DURATION_IS_VALID (sub)) + stream->pos += GST_BUFFER_DURATION (sub); } ret = gst_pad_push (stream->pad, sub); @@ -3602,7 +3724,8 @@ } } /* combine flows */ - ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret); + ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, + stream->pad, ret); next_lace: size -= lace_size[n]; @@ -3628,7 +3751,8 @@ stream->eos = TRUE; ret = GST_FLOW_OK; /* combine flows */ - ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret); + ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, stream->pad, + ret); goto done; } invalid_lacing: @@ -4146,6 +4270,8 @@ GST_READ_CHECK (gst_matroska_demux_take (demux, read, &ebml)); ret = gst_matroska_read_common_parse_info (&demux->common, GST_ELEMENT_CAST (demux), &ebml); + if (ret == GST_FLOW_OK) + gst_matroska_demux_send_tags (demux); } else { GST_READ_CHECK (gst_matroska_demux_flush (demux, read)); } @@ -4247,6 +4373,8 @@ GST_READ_CHECK (gst_matroska_demux_take (demux, read, &ebml)); ret = gst_matroska_read_common_parse_attachments (&demux->common, GST_ELEMENT_CAST (demux), &ebml); + if (ret == GST_FLOW_OK) + gst_matroska_demux_send_tags (demux); } else { GST_READ_CHECK (gst_matroska_demux_flush (demux, read)); } @@ -4255,6 +4383,8 @@ GST_READ_CHECK (gst_matroska_demux_take (demux, read, &ebml)); ret = gst_matroska_read_common_parse_metadata (&demux->common, GST_ELEMENT_CAST (demux), &ebml); + if (ret == GST_FLOW_OK) + gst_matroska_demux_send_tags (demux); break; case GST_MATROSKA_ID_CHAPTERS: if (!demux->common.chapters_parsed) { @@ -4292,8 +4422,11 @@ g_assert (event); /* unlikely to fail, since we managed to seek to this point */ - if (!gst_matroska_demux_handle_seek_event (demux, NULL, event)) + if (!gst_matroska_demux_handle_seek_event (demux, NULL, event)) { + gst_event_unref (event); goto seek_failed; + } + gst_event_unref (event); /* resume data handling, main thread clear to seek again */ GST_OBJECT_LOCK (demux); demux->common.state = GST_MATROSKA_READ_STATE_DATA; @@ -4433,11 +4566,14 @@ } next: - if (G_UNLIKELY (demux->common.offset == - gst_matroska_read_common_get_length (&demux->common))) { - GST_LOG_OBJECT (demux, "Reached end of stream"); - ret = GST_FLOW_EOS; - goto eos; + if (G_UNLIKELY (demux->cached_length == G_MAXUINT64 || + demux->common.offset >= demux->cached_length)) { + demux->cached_length = gst_matroska_read_common_get_length (&demux->common); + if (demux->common.offset == demux->cached_length) { + GST_LOG_OBJECT (demux, "Reached end of stream"); + ret = GST_FLOW_EOS; + goto eos; + } } return; @@ -4464,7 +4600,7 @@ /* perform EOS logic */ /* If we were in the headers, make sure we send no-more-pads. - This will ensure decodebin2 does not get stuck thinking + This will ensure decodebin does not get stuck thinking the chain is not complete yet, and waiting indefinitely. */ if (G_UNLIKELY (demux->common.state == GST_MATROSKA_READ_STATE_HEADER)) { if (demux->common.src->len == 0) { @@ -4682,6 +4818,7 @@ GST_OBJECT_LOCK (demux); gst_matroska_read_common_reset_streams (&demux->common, GST_CLOCK_TIME_NONE, TRUE); + gst_flow_combiner_reset (demux->flowcombiner); dur = demux->common.segment.duration; gst_segment_init (&demux->common.segment, GST_FORMAT_TIME); demux->common.segment.duration = dur; @@ -4745,33 +4882,6 @@ } } -static void -gst_duration_to_fraction (guint64 duration, gint * dest_n, gint * dest_d) -{ - static const int common_den[] = { 1, 2, 3, 4, 1001 }; - int n, d; - int i; - guint64 a; - - for (i = 0; i < G_N_ELEMENTS (common_den); i++) { - d = common_den[i]; - n = floor (0.5 + (d * 1e9) / duration); - if (n > 0) { - a = gst_util_uint64_scale_int (1000000000, d, n); - if (duration >= a - 2 && duration <= a + 2) { - goto out; - } - } - } - - gst_util_double_to_fraction (1e9 / duration, &n, &d); - -out: - /* set results */ - *dest_n = n; - *dest_d = d; -} - static GstCaps * gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * videocontext, const gchar * codec_id, guint8 * data, guint size, @@ -4812,6 +4922,8 @@ memcpy (vids, data, size); } + context->dts_only = TRUE; /* VFW files only store DTS */ + /* little-endian -> byte-order */ vids->size = GUINT32_FROM_LE (vids->size); vids->width = GUINT32_FROM_LE (vids->width); @@ -4842,6 +4954,12 @@ if (caps == NULL) { GST_WARNING ("Unhandled RIFF fourcc %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (vids->compression)); + } else { + static GstStaticCaps intra_caps = GST_STATIC_CAPS ("image/jpeg; " + "video/x-raw; image/png; video/x-dv; video/x-huffyuv; video/x-ffv; " + "video/x-compressed-yuv"); + context->intra_only = + gst_caps_can_intersect (gst_static_caps_get (&intra_caps), caps); } if (buf) @@ -4887,10 +5005,13 @@ return NULL; } + context->intra_only = TRUE; + gst_video_info_set_format (&info, format, videocontext->pixel_width, videocontext->pixel_height); caps = gst_video_info_to_caps (&info); *codec_name = gst_pb_utils_get_codec_description (caps); + context->alignment = 32; } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_SP)) { caps = gst_caps_new_simple ("video/x-divx", "divxversion", G_TYPE_INT, 4, NULL); @@ -4940,6 +5061,7 @@ } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MJPEG)) { caps = gst_caps_new_empty_simple ("image/jpeg"); *codec_name = g_strdup ("Motion-JPEG"); + context->intra_only = TRUE; } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_AVC)) { caps = gst_caps_new_empty_simple ("video/x-h264"); if (data) { @@ -5092,7 +5214,7 @@ } else if (context->default_duration > 0) { int fps_n, fps_d; - gst_duration_to_fraction (context->default_duration, &fps_n, &fps_d); + gst_video_guess_framerate (context->default_duration, &fps_n, &fps_d); GST_INFO ("using default duration %" G_GUINT64_FORMAT " framerate %d/%d", context->default_duration, fps_n, fps_d); @@ -5100,16 +5222,28 @@ gst_structure_set (structure, "framerate", GST_TYPE_FRACTION, fps_n, fps_d, NULL); } else { - /* sort of a hack to get most codecs to support, - * even if the default_duration is missing */ gst_structure_set (structure, "framerate", GST_TYPE_FRACTION, - 25, 1, NULL); + 0, 1, NULL); } if (videocontext->parent.flags & GST_MATROSKA_VIDEOTRACK_INTERLACED) gst_structure_set (structure, "interlace-mode", G_TYPE_STRING, "mixed", NULL); } + if (videocontext->multiview_mode != GST_VIDEO_MULTIVIEW_MODE_NONE) { + if (gst_video_multiview_guess_half_aspect (videocontext->multiview_mode, + videocontext->pixel_width, videocontext->pixel_height, + videocontext->display_width * videocontext->pixel_height, + videocontext->display_height * videocontext->pixel_width)) { + videocontext->multiview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT; + } + gst_caps_set_simple (caps, + "multiview-mode", G_TYPE_STRING, + gst_video_multiview_mode_to_caps_string + (videocontext->multiview_mode), "multiview-flags", + GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, videocontext->multiview_flags, + GST_FLAG_SET_MASK_EXACT, NULL); + } caps = gst_caps_simplify (caps); } @@ -5304,6 +5438,18 @@ } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_OPUS)) { caps = gst_caps_new_empty_simple ("audio/x-opus"); *codec_name = g_strdup ("Opus"); + context->stream_headers = + gst_matroska_parse_opus_stream_headers (context->codec_priv, + context->codec_priv_size); + if (context->stream_headers) { + /* There was a valid header. Multistream headers are more than + * 19 bytes, as they include an extra channel mapping table. */ + gboolean multistream = (context->codec_priv_size > 19); + gst_caps_set_simple (caps, "multistream", G_TYPE_BOOLEAN, multistream, + NULL); + } + /* FIXME: mark stream as broken and skip if there are no stream headers */ + context->send_stream_headers = TRUE; } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_ACM)) { gst_riff_strf_auds auds; @@ -5442,7 +5588,7 @@ context->postprocess_frame = gst_matroska_demux_add_wvpk_header; audiocontext->wvpk_block_index = 0; } else if ((!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_14_4)) || - (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_14_4)) || + (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_28_8)) || (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_COOK))) { gint raversion = -1; @@ -5659,7 +5805,7 @@ demux = GST_MATROSKA_DEMUX (object); switch (prop_id) { - case ARG_MAX_GAP_TIME: + case PROP_MAX_GAP_TIME: GST_OBJECT_LOCK (demux); demux->max_gap_time = g_value_get_uint64 (value); GST_OBJECT_UNLOCK (demux); @@ -5680,7 +5826,7 @@ demux = GST_MATROSKA_DEMUX (object); switch (prop_id) { - case ARG_MAX_GAP_TIME: + case PROP_MAX_GAP_TIME: GST_OBJECT_LOCK (demux); g_value_set_uint64 (value, demux->max_gap_time); GST_OBJECT_UNLOCK (demux); diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-demux.h gst-plugins-good1.0-1.6.1/gst/matroska/matroska-demux.h --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-demux.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-demux.h 2015-10-22 08:02:54.000000000 +0000 @@ -63,7 +63,6 @@ /* state */ gboolean streaming; - guint level_up; guint64 seek_block; gboolean seek_first; @@ -107,6 +106,9 @@ /* for non-finalized files, with invalid segment duration */ gboolean invalid_duration; + + /* Cached upstream length (default G_MAXUINT64) */ + guint64 cached_length; } GstMatroskaDemux; typedef struct _GstMatroskaDemuxClass { diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-ids.c gst-plugins-good1.0-1.6.1/gst/matroska/matroska-ids.c --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-ids.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-ids.c 2015-10-30 12:10:05.000000000 +0000 @@ -59,6 +59,9 @@ video_context->fourcc = 0; video_context->default_fps = 0.0; video_context->earliest_time = GST_CLOCK_TIME_NONE; + video_context->multiview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE; + video_context->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE; + return TRUE; } @@ -221,6 +224,36 @@ } GstBufferList * +gst_matroska_parse_opus_stream_headers (gpointer codec_data, + gsize codec_data_size) +{ + GstBufferList *list = NULL; + GstBuffer *hdr; + guint8 *pdata = codec_data; + + GST_MEMDUMP ("opus codec data", codec_data, codec_data_size); + + if (codec_data == NULL || codec_data_size < 19) { + GST_WARNING ("not enough codec priv data for opus headers"); + return NULL; + } + + if (memcmp (pdata, "OpusHead", 8) != 0) { + GST_WARNING ("no OpusHead marker at start of stream headers"); + return NULL; + } + + list = gst_buffer_list_new (); + + hdr = + gst_buffer_new_wrapped (g_memdup (pdata, codec_data_size), + codec_data_size); + gst_buffer_list_add (list, hdr); + + return list; +} + +GstBufferList * gst_matroska_parse_flac_stream_headers (gpointer codec_data, gsize codec_data_size) { @@ -267,6 +300,20 @@ return list; } +GstClockTime +gst_matroska_track_get_buffer_timestamp (GstMatroskaTrackContext * track, + GstBuffer * buf) +{ + if (track->dts_only) { + if (GST_BUFFER_DTS_IS_VALID (buf)) + return GST_BUFFER_DTS (buf); + else + return GST_BUFFER_PTS (buf); + } else { + return GST_BUFFER_PTS (buf); + } +} + void gst_matroska_track_free (GstMatroskaTrackContext * track) { @@ -290,8 +337,8 @@ g_array_free (track->encodings, TRUE); } - if (track->pending_tags) - gst_tag_list_unref (track->pending_tags); + if (track->tags) + gst_tag_list_unref (track->tags); if (track->index_table) g_array_free (track->index_table, TRUE); diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-ids.h gst-plugins-good1.0-1.6.1/gst/matroska/matroska-ids.h --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-ids.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-ids.h 2015-10-22 08:02:54.000000000 +0000 @@ -23,6 +23,7 @@ #define __GST_MATROSKA_IDS_H__ #include +#include #include "ebml-ids.h" @@ -489,6 +490,16 @@ GST_MATROSKA_VIDEOTRACK_INTERLACED = (GST_MATROSKA_TRACK_SHIFT<<0) } GstMatroskaVideoTrackFlags; +typedef enum { + GST_MATROSKA_STEREO_MODE_SBS_LR = 0x1, + GST_MATROSKA_STEREO_MODE_TB_RL = 0x2, + GST_MATROSKA_STEREO_MODE_TB_LR = 0x3, + GST_MATROSKA_STEREO_MODE_CHECKER_RL = 0x4, + GST_MATROSKA_STEREO_MODE_CHECKER_LR = 0x5, + GST_MATROSKA_STEREO_MODE_SBS_RL = 0x9, + GST_MATROSKA_STEREO_MODE_FBF_LR = 0xD, + GST_MATROSKA_STEREO_MODE_FBF_RL = 0xE +} GstMatroskaStereoMode; typedef struct _GstMatroskaTrackContext GstMatroskaTrackContext; @@ -507,6 +518,7 @@ gint index_writer_id; /* some often-used info */ + guint64 track_uid; gchar *codec_id, *codec_name, *name, *language; gpointer codec_priv; gsize codec_priv_size; @@ -539,8 +551,10 @@ GstMatroskaTrackContext *context, GstBuffer **buffer); - /* Tags to send after newsegment event */ - GstTagList *pending_tags; + /* List of tags for this stream */ + GstTagList *tags; + /* Tags changed and should be pushed again */ + gboolean tags_changed; /* A GArray of GstMatroskaTrackEncoding structures which contain the * encoding (compression/encryption) settings for this track, if any */ @@ -551,6 +565,12 @@ /* any alignment we need our output buffers to have */ gint alignment; + + /* for compatibility with VFW files, where timestamp represents DTS */ + gboolean dts_only; + + /* indicate that the track is raw (jpeg,raw variants) and so pts=dts */ + gboolean intra_only; }; typedef struct _GstMatroskaTrackVideoContext { @@ -562,6 +582,9 @@ GstMatroskaAspectRatioMode asr_mode; guint32 fourcc; + GstVideoMultiviewMode multiview_mode; + GstVideoMultiviewFlags multiview_flags; + /* QoS */ GstClockTime earliest_time; @@ -640,8 +663,12 @@ GstBufferList * gst_matroska_parse_speex_stream_headers (gpointer codec_data, gsize codec_data_size); +GstBufferList * gst_matroska_parse_opus_stream_headers (gpointer codec_data, + gsize codec_data_size); + GstBufferList * gst_matroska_parse_flac_stream_headers (gpointer codec_data, gsize codec_data_size); void gst_matroska_track_free (GstMatroskaTrackContext * track); +GstClockTime gst_matroska_track_get_buffer_timestamp (GstMatroskaTrackContext * track, GstBuffer *buf); #endif /* __GST_MATROSKA_IDS_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-mux.c gst-plugins-good1.0-1.6.1/gst/matroska/matroska-mux.c --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-mux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-mux.c 2015-10-22 08:02:54.000000000 +0000 @@ -64,11 +64,11 @@ enum { - ARG_0, - ARG_WRITING_APP, - ARG_DOCTYPE_VERSION, - ARG_MIN_INDEX_INTERVAL, - ARG_STREAMABLE + PROP_0, + PROP_WRITING_APP, + PROP_DOCTYPE_VERSION, + PROP_MIN_INDEX_INTERVAL, + PROP_STREAMABLE }; #define DEFAULT_DOCTYPE_VERSION 2 @@ -246,6 +246,8 @@ static void gst_matroska_mux_write_simple_tag (const GstTagList * list, const gchar * tag, gpointer data); +static void gst_matroska_mux_write_streams_tags (GstMatroskaMux * mux); +static gboolean gst_matroska_mux_streams_have_tags (GstMatroskaMux * mux); /* Cannot use boilerplate macros here because we need the full init function * signature with the additional class argument, so we use the right template @@ -299,7 +301,7 @@ gst_element_class_set_static_metadata (gstelement_class, "Matroska muxer", "Codec/Muxer", "Muxes video/audio/subtitle streams into a matroska stream", - "GStreamer maintainers "); + "GStreamer maintainers "); GST_DEBUG_CATEGORY_INIT (matroskamux_debug, "matroskamux", 0, "Matroska muxer"); @@ -309,26 +311,25 @@ gobject_class->get_property = gst_matroska_mux_get_property; gobject_class->set_property = gst_matroska_mux_set_property; - g_object_class_install_property (gobject_class, ARG_WRITING_APP, + g_object_class_install_property (gobject_class, PROP_WRITING_APP, g_param_spec_string ("writing-app", "Writing application.", "The name the application that creates the matroska file.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_DOCTYPE_VERSION, + g_object_class_install_property (gobject_class, PROP_DOCTYPE_VERSION, g_param_spec_int ("version", "DocType version", "This parameter determines what Matroska features can be used.", 1, 2, DEFAULT_DOCTYPE_VERSION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_MIN_INDEX_INTERVAL, + g_object_class_install_property (gobject_class, PROP_MIN_INDEX_INTERVAL, g_param_spec_int64 ("min-index-interval", "Minimum time between index " "entries", "An index entry is created every so many nanoseconds.", 0, G_MAXINT64, DEFAULT_MIN_INDEX_INTERVAL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_STREAMABLE, + g_object_class_install_property (gobject_class, PROP_STREAMABLE, g_param_spec_boolean ("streamable", "Determines whether output should " "be streamable", "If set to true, the output should be as if it is " "to be streamed and hence no indexes written or duration written.", - DEFAULT_STREAMABLE, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_STATIC_STRINGS)); + DEFAULT_STREAMABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_matroska_mux_change_state); @@ -340,7 +341,7 @@ parent_class = g_type_class_peek_parent (klass); } -/** +/* * Start of pad option handler code */ #define DEFAULT_PAD_FRAME_DURATION TRUE @@ -359,21 +360,10 @@ gboolean frame_duration_user; } GstMatroskamuxPad; -static void gst_matroskamux_pad_class_init (GstPadClass * klass); - -static GType -gst_matroskamux_pad_get_type (void) -{ - static GType type = 0; +typedef GstPadClass GstMatroskamuxPadClass; - if (G_UNLIKELY (type == 0)) { - type = g_type_register_static_simple (GST_TYPE_PAD, - g_intern_static_string ("GstMatroskamuxPad"), sizeof (GstPadClass), - (GClassInitFunc) gst_matroskamux_pad_class_init, - sizeof (GstMatroskamuxPad), NULL, 0); - } - return type; -} +GType gst_matroskamux_pad_get_type (void); +G_DEFINE_TYPE (GstMatroskamuxPad, gst_matroskamux_pad, GST_TYPE_PAD); #define GST_TYPE_MATROSKAMUX_PAD (gst_matroskamux_pad_get_type()) #define GST_MATROSKAMUX_PAD(pad) (G_TYPE_CHECK_INSTANCE_CAST((pad),GST_TYPE_MATROSKAMUX_PAD,GstMatroskamuxPad)) @@ -414,7 +404,7 @@ } static void -gst_matroskamux_pad_class_init (GstPadClass * klass) +gst_matroskamux_pad_class_init (GstMatroskamuxPadClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; @@ -572,6 +562,10 @@ g_free (collect_pad->track->codec_priv); g_free (collect_pad->track); collect_pad->track = NULL; + if (collect_pad->tags) { + gst_tag_list_unref (collect_pad->tags); + collect_pad->tags = NULL; + } } if (!full && type != 0) { @@ -598,12 +592,14 @@ context->type = type; context->name = name; + context->track_uid = gst_matroska_mux_create_uid (collect_pad->mux); /* TODO: check default values for the context */ context->flags = GST_MATROSKA_TRACK_ENABLED | GST_MATROSKA_TRACK_DEFAULT; collect_pad->track = context; - collect_pad->duration = 0; collect_pad->start_ts = GST_CLOCK_TIME_NONE; collect_pad->end_ts = GST_CLOCK_TIME_NONE; + collect_pad->tags = gst_tag_list_new_empty (); + gst_tag_list_set_scope (collect_pad->tags, GST_TAG_SCOPE_STREAM); } } @@ -818,8 +814,12 @@ } /* FIXME: what about stream-specific tags? */ - gst_tag_setter_merge_tags (GST_TAG_SETTER (mux), list, - gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (mux))); + if (gst_tag_list_get_scope (list) == GST_TAG_SCOPE_GLOBAL) { + gst_tag_setter_merge_tags (GST_TAG_SETTER (mux), list, + gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (mux))); + } else { + gst_tag_list_insert (collect_pad->tags, list, GST_TAG_MERGE_REPLACE); + } gst_event_unref (event); /* handled this, don't want collectpads to forward it downstream */ @@ -929,7 +929,7 @@ GstMatroskaPad *collect_pad; GstStructure *structure; const gchar *mimetype; - const gchar *interlace_mode; + const gchar *interlace_mode, *s; const GValue *value = NULL; GstBuffer *codec_buf = NULL; gint width, height, pixel_width, pixel_height; @@ -1002,6 +1002,14 @@ videocontext->display_height = 0; } + /* Collect stereoscopic info, if any */ + if ((s = gst_structure_get_string (structure, "multiview-mode"))) + videocontext->multiview_mode = + gst_video_multiview_mode_from_caps_string (s); + gst_structure_get_flagset (structure, "multiview-flags", + &videocontext->multiview_flags, NULL); + + skip_details: videocontext->asr_mode = GST_MATROSKA_ASPECT_RATIO_MODE_FREE; @@ -1127,6 +1135,7 @@ gst_matroska_mux_free_codec_priv (context); context->codec_priv = (gpointer) bih; context->codec_priv_size = size; + context->dts_only = TRUE; } else if (!strcmp (mimetype, "video/x-h264")) { gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_AVC); @@ -1437,7 +1446,6 @@ videocontext->display_width = 0; videocontext->display_height = 0; } - hdr += 3 + 3; gst_buffer_unmap (buf0, &map); } @@ -1596,6 +1604,58 @@ return TRUE; } +static gboolean +opus_streamheader_to_codecdata (const GValue * streamheader, + GstMatroskaTrackContext * context) +{ + GArray *bufarr; + GValue *bufval; + GstBuffer *buf; + + if (G_VALUE_TYPE (streamheader) != GST_TYPE_ARRAY) + goto wrong_type; + + bufarr = g_value_peek_pointer (streamheader); + if (bufarr->len <= 0 || bufarr->len > 255) /* one header, and count stored in a byte */ + goto wrong_count; + if (bufarr->len != 1 && bufarr->len != 2) + goto wrong_count; + + context->xiph_headers_to_skip = bufarr->len; + + bufval = &g_array_index (bufarr, GValue, 0); + if (G_VALUE_TYPE (bufval) != GST_TYPE_BUFFER) { + goto wrong_content_type; + } + buf = g_value_peek_pointer (bufval); + + gst_matroska_mux_free_codec_priv (context); + + context->codec_priv_size = gst_buffer_get_size (buf); + context->codec_priv = g_malloc0 (context->codec_priv_size); + gst_buffer_extract (buf, 0, context->codec_priv, -1); + + return TRUE; + +/* ERRORS */ +wrong_type: + { + GST_WARNING ("streamheaders are not a GST_TYPE_ARRAY, but a %s", + G_VALUE_TYPE_NAME (streamheader)); + return FALSE; + } +wrong_count: + { + GST_WARNING ("got %u streamheaders, not 1 or 2 as expected", bufarr->len); + return FALSE; + } +wrong_content_type: + { + GST_WARNING ("streamheaders array does not contain GstBuffers"); + return FALSE; + } +} + static const gchar * aac_codec_data_to_codec_id (GstBuffer * buf) { @@ -1847,7 +1907,19 @@ goto refuse_caps; } } else if (!strcmp (mimetype, "audio/x-opus")) { + const GValue *streamheader; + gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_AUDIO_OPUS); + + streamheader = gst_structure_get_value (structure, "streamheader"); + if (streamheader) { + gst_matroska_mux_free_codec_priv (context); + if (!opus_streamheader_to_codecdata (streamheader, context)) { + GST_ELEMENT_ERROR (mux, STREAM, MUX, (NULL), + ("opus stream headers missing or malformed")); + goto refuse_caps; + } + } } else if (!strcmp (mimetype, "audio/x-ac3")) { gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_AUDIO_AC3); } else if (!strcmp (mimetype, "audio/x-eac3")) { @@ -2223,7 +2295,6 @@ newpad = g_object_new (GST_TYPE_MATROSKAMUX_PAD, "name", pad_name, "direction", templ->direction, "template", templ, NULL); - g_free (name); gst_matroskamux_pad_init (newpad); collect_pad = (GstMatroskaPad *) @@ -2231,15 +2302,19 @@ sizeof (GstMatroskamuxPad), (GstCollectDataDestroyNotify) gst_matroska_pad_free, locked); + collect_pad->mux = mux; collect_pad->track = context; gst_matroska_pad_reset (collect_pad, FALSE); collect_pad->track->codec_id = id; + collect_pad->track->dts_only = FALSE; collect_pad->capsfunc = capsfunc; gst_pad_set_active (GST_PAD (newpad), TRUE); if (!gst_element_add_pad (element, GST_PAD (newpad))) goto pad_add_failed; + g_free (name); + mux->num_streams++; GST_DEBUG_OBJECT (newpad, "Added new request pad"); @@ -2250,6 +2325,7 @@ pad_add_failed: { GST_WARNING_OBJECT (mux, "Adding the new pad '%s' failed", pad_name); + g_free (name); gst_object_unref (newpad); return NULL; } @@ -2275,18 +2351,21 @@ GstMatroskaPad *collect_pad = (GstMatroskaPad *) cdata; if (cdata->pad == pad) { - GstClockTime min_dur; /* observed minimum duration */ + /* + * observed duration, this will remain GST_CLOCK_TIME_NONE + * only if the pad is resetted + */ + GstClockTime collected_duration = GST_CLOCK_TIME_NONE; if (GST_CLOCK_TIME_IS_VALID (collect_pad->start_ts) && GST_CLOCK_TIME_IS_VALID (collect_pad->end_ts)) { - min_dur = GST_CLOCK_DIFF (collect_pad->start_ts, collect_pad->end_ts); - if (collect_pad->duration < min_dur) - collect_pad->duration = min_dur; + collected_duration = + GST_CLOCK_DIFF (collect_pad->start_ts, collect_pad->end_ts); } - if (GST_CLOCK_TIME_IS_VALID (collect_pad->duration) && - mux->duration < collect_pad->duration) - mux->duration = collect_pad->duration; + if (GST_CLOCK_TIME_IS_VALID (collected_duration) + && mux->duration < collected_duration) + mux->duration = collected_duration; break; } @@ -2318,8 +2397,7 @@ gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TRACKNUMBER, context->num); gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TRACKTYPE, context->type); - gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TRACKUID, - gst_matroska_mux_create_uid (mux)); + gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TRACKUID, context->track_uid); if (context->default_duration) { gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TRACKDEFAULTDURATION, context->default_duration); @@ -2362,6 +2440,55 @@ gst_ebml_write_binary (ebml, GST_MATROSKA_ID_VIDEOCOLOURSPACE, (gpointer) & fcc_le, 4); } + if (videocontext->multiview_mode != GST_VIDEO_MULTIVIEW_MODE_NONE) { + guint64 stereo_mode = 0; + + switch (videocontext->multiview_mode) { + case GST_VIDEO_MULTIVIEW_MODE_MONO: + break; + case GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE: + if (videocontext->multiview_flags & + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST) + stereo_mode = GST_MATROSKA_STEREO_MODE_SBS_RL; + else + stereo_mode = GST_MATROSKA_STEREO_MODE_SBS_LR; + break; + case GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM: + if (videocontext->multiview_flags & + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST) + stereo_mode = GST_MATROSKA_STEREO_MODE_TB_RL; + else + stereo_mode = GST_MATROSKA_STEREO_MODE_TB_LR; + break; + case GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD: + if (videocontext->multiview_flags & + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST) + stereo_mode = GST_MATROSKA_STEREO_MODE_CHECKER_RL; + else + stereo_mode = GST_MATROSKA_STEREO_MODE_CHECKER_LR; + break; + case GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME: + if (videocontext->multiview_flags & + GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST) + stereo_mode = GST_MATROSKA_STEREO_MODE_FBF_RL; + else + stereo_mode = GST_MATROSKA_STEREO_MODE_FBF_LR; + /* FIXME: In frame-by-frame mode, left/right frame buffers need to be + * laced within one block. See http://www.matroska.org/technical/specs/index.html#StereoMode */ + GST_FIXME_OBJECT (mux, + "Frame-by-frame stereoscopic mode not fully implemented"); + break; + default: + GST_WARNING_OBJECT (mux, + "Multiview mode %d not supported in Matroska/WebM", + videocontext->multiview_mode); + break; + } + + if (stereo_mode != 0) + gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEOSTEREOMODE, + stereo_mode); + } gst_ebml_write_master_finish (ebml, master); break; @@ -2550,7 +2677,7 @@ gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); GST_INFO_OBJECT (mux, "downstream is %sseekable", seekable ? "" : "not "); } else { - /* have to assume seeking is supported if query not handled downstream */ + /* assume seeking is not supported if query not handled downstream */ GST_WARNING_OBJECT (mux, "downstream did not handle seeking query"); seekable = FALSE; } @@ -2606,21 +2733,25 @@ if (mux->streamable) { const GstTagList *tags; + gboolean has_main_tags; /* tags */ tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux)); + has_main_tags = tags != NULL && !gst_tag_list_is_empty (tags); - if (tags != NULL && !gst_tag_list_is_empty (tags)) { + if (has_main_tags || gst_matroska_mux_streams_have_tags (mux)) { guint64 master_tags, master_tag; GST_DEBUG_OBJECT (mux, "Writing tags"); - /* TODO: maybe limit via the TARGETS id by looking at the source pad */ mux->tags_pos = ebml->pos; master_tags = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAGS); - master_tag = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAG); - gst_tag_list_foreach (tags, gst_matroska_mux_write_simple_tag, ebml); - gst_ebml_write_master_finish (ebml, master_tag); + if (has_main_tags) { + master_tag = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAG); + gst_tag_list_foreach (tags, gst_matroska_mux_write_simple_tag, ebml); + gst_ebml_write_master_finish (ebml, master_tag); + } + gst_matroska_mux_write_streams_tags (mux); gst_ebml_write_master_finish (ebml, master_tags); } } @@ -2666,7 +2797,7 @@ gst_guint64_to_gdouble (mux->time_scale)); } gst_ebml_write_utf8 (ebml, GST_MATROSKA_ID_MUXINGAPP, - "GStreamer plugin version " PACKAGE_VERSION); + "GStreamer matroskamux version " PACKAGE_VERSION); if (mux->writing_app && mux->writing_app[0]) { gst_ebml_write_utf8 (ebml, GST_MATROSKA_ID_WRITINGAPP, mux->writing_app); } @@ -2832,6 +2963,57 @@ } } +static void +gst_matroska_mux_write_stream_tags (GstMatroskaMux * mux, GstMatroskaPad * mpad) +{ + guint64 master_tag, master_targets; + GstEbmlWrite *ebml; + + ebml = mux->ebml_write; + + if (G_UNLIKELY (mpad->tags == NULL || gst_tag_list_is_empty (mpad->tags))) + return; + + master_tag = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAG); + master_targets = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TARGETS); + + gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TARGETTRACKUID, + mpad->track->track_uid); + + gst_ebml_write_master_finish (ebml, master_targets); + gst_tag_list_foreach (mpad->tags, gst_matroska_mux_write_simple_tag, ebml); + gst_ebml_write_master_finish (ebml, master_tag); +} + +static void +gst_matroska_mux_write_streams_tags (GstMatroskaMux * mux) +{ + GSList *walk; + + for (walk = mux->collect->data; walk; walk = g_slist_next (walk)) { + GstMatroskaPad *collect_pad; + + collect_pad = (GstMatroskaPad *) walk->data; + + gst_matroska_mux_write_stream_tags (mux, collect_pad); + } +} + +static gboolean +gst_matroska_mux_streams_have_tags (GstMatroskaMux * mux) +{ + GSList *walk; + + for (walk = mux->collect->data; walk; walk = g_slist_next (walk)) { + GstMatroskaPad *collect_pad; + + collect_pad = (GstMatroskaPad *) walk->data; + if (!gst_tag_list_is_empty (collect_pad->tags)) + return TRUE; + } + return FALSE; +} + #if 0 static void gst_matroska_mux_write_toc_entry_tags (GstMatroskaMux * mux, @@ -2887,6 +3069,7 @@ guint64 duration = 0; GSList *collected; const GstTagList *tags; + gboolean has_main_tags; /* finish last cluster */ if (mux->cluster) { @@ -2924,8 +3107,9 @@ /* tags */ tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux)); + has_main_tags = tags != NULL && !gst_tag_list_is_empty (tags); - if ((tags != NULL && !gst_tag_list_is_empty (tags)) + if (has_main_tags || gst_matroska_mux_streams_have_tags (mux) || gst_toc_setter_get_toc (GST_TOC_SETTER (mux)) != NULL) { guint64 master_tags = 0, master_tag; #if 0 @@ -2938,7 +3122,7 @@ toc = gst_toc_setter_get_toc (GST_TOC_SETTER (mux)); #endif - if (tags != NULL) { + if (has_main_tags) { /* TODO: maybe limit via the TARGETS id by looking at the source pad */ mux->tags_pos = ebml->pos; master_tags = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAGS); @@ -2964,6 +3148,12 @@ } #endif + if (master_tags == 0 && gst_matroska_mux_streams_have_tags (mux)) { + mux->tags_pos = ebml->pos; + master_tags = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAGS); + } + gst_matroska_mux_write_streams_tags (mux); + if (master_tags != 0) gst_ebml_write_master_finish (ebml, master_tags); } @@ -3028,7 +3218,11 @@ for (collected = mux->collect->data; collected; collected = g_slist_next (collected)) { GstMatroskaPad *collect_pad; - GstClockTime min_duration; /* observed minimum duration */ + /* + * observed duration, this will never remain GST_CLOCK_TIME_NONE + * since this means buffer without timestamps that is not possibile + */ + GstClockTime collected_duration = GST_CLOCK_TIME_NONE; collect_pad = (GstMatroskaPad *) collected->data; @@ -3040,18 +3234,18 @@ if (GST_CLOCK_TIME_IS_VALID (collect_pad->start_ts) && GST_CLOCK_TIME_IS_VALID (collect_pad->end_ts)) { - min_duration = + collected_duration = GST_CLOCK_DIFF (collect_pad->start_ts, collect_pad->end_ts); - if (collect_pad->duration < min_duration) - collect_pad->duration = min_duration; GST_DEBUG_OBJECT (collect_pad, "final track duration: %" GST_TIME_FORMAT, - GST_TIME_ARGS (collect_pad->duration)); + GST_TIME_ARGS (collected_duration)); + } else { + GST_WARNING_OBJECT (collect_pad, "unable to get final track duration"); } + if (GST_CLOCK_TIME_IS_VALID (collected_duration) && + duration < collected_duration) + duration = collected_duration; - if (GST_CLOCK_TIME_IS_VALID (collect_pad->duration) && - duration < collect_pad->duration) - duration = collect_pad->duration; } /* seek back (optional, but do anyway) */ @@ -3238,6 +3432,7 @@ gboolean is_video_invisible = FALSE; GstMatroskamuxPad *pad; gint flags = 0; + GstClockTime buffer_timestamp; /* write data */ pad = GST_MATROSKAMUX_PAD_CAST (collect_pad->collect.pad); @@ -3259,11 +3454,14 @@ return GST_FLOW_OK; } + buffer_timestamp = + gst_matroska_track_get_buffer_timestamp (collect_pad->track, buf); + /* hm, invalid timestamp (due to --to be fixed--- element upstream); * this would wreak havoc with time stored in matroska file */ /* TODO: maybe calculate a timestamp by using the previous timestamp * and default duration */ - if (!GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { + if (!GST_CLOCK_TIME_IS_VALID (buffer_timestamp)) { GST_WARNING_OBJECT (collect_pad->collect.pad, "Invalid buffer timestamp; dropping buffer"); gst_buffer_unref (buf); @@ -3271,12 +3469,12 @@ } /* set the timestamp for outgoing buffers */ - ebml->timestamp = GST_BUFFER_TIMESTAMP (buf); + ebml->timestamp = buffer_timestamp; if (collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_VIDEO) { if (!GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT)) { GST_LOG_OBJECT (mux, "have video keyframe, ts=%" GST_TIME_FORMAT, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); + GST_TIME_ARGS (buffer_timestamp)); is_video_keyframe = TRUE; } else if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DECODE_ONLY) && (!strcmp (collect_pad->track->codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP8) @@ -3284,7 +3482,7 @@ GST_MATROSKA_CODEC_ID_VIDEO_VP9))) { GST_LOG_OBJECT (mux, "have VP8 video invisible frame, " "ts=%" GST_TIME_FORMAT, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); + GST_TIME_ARGS (buffer_timestamp)); is_video_invisible = TRUE; } } @@ -3293,7 +3491,7 @@ /* start a new cluster at every keyframe, at every GstForceKeyUnit event, * or when we may be reaching the limit of the relative timestamp */ if (mux->cluster_time + - mux->max_cluster_duration < GST_BUFFER_TIMESTAMP (buf) + mux->max_cluster_duration < buffer_timestamp || is_video_keyframe || mux->force_key_unit_event) { if (!mux->streamable) gst_ebml_write_master_finish (ebml, mux->cluster); @@ -3310,13 +3508,11 @@ mux->cluster = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_CLUSTER); gst_ebml_write_uint (ebml, GST_MATROSKA_ID_CLUSTERTIMECODE, - gst_util_uint64_scale (GST_BUFFER_TIMESTAMP (buf), 1, - mux->time_scale)); + gst_util_uint64_scale (buffer_timestamp, 1, mux->time_scale)); GST_LOG_OBJECT (mux, "cluster timestamp %" G_GUINT64_FORMAT, - gst_util_uint64_scale (GST_BUFFER_TIMESTAMP (buf), 1, - mux->time_scale)); - gst_ebml_write_flush_cache (ebml, TRUE, GST_BUFFER_TIMESTAMP (buf)); - mux->cluster_time = GST_BUFFER_TIMESTAMP (buf); + gst_util_uint64_scale (buffer_timestamp, 1, mux->time_scale)); + gst_ebml_write_flush_cache (ebml, TRUE, buffer_timestamp); + mux->cluster_time = buffer_timestamp; gst_ebml_write_uint (ebml, GST_MATROSKA_ID_PREVSIZE, mux->prev_cluster_size); } @@ -3327,15 +3523,11 @@ gst_ebml_write_set_cache (ebml, 0x20); mux->cluster = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_CLUSTER); gst_ebml_write_uint (ebml, GST_MATROSKA_ID_CLUSTERTIMECODE, - gst_util_uint64_scale (GST_BUFFER_TIMESTAMP (buf), 1, mux->time_scale)); - gst_ebml_write_flush_cache (ebml, TRUE, GST_BUFFER_TIMESTAMP (buf)); - mux->cluster_time = GST_BUFFER_TIMESTAMP (buf); + gst_util_uint64_scale (buffer_timestamp, 1, mux->time_scale)); + gst_ebml_write_flush_cache (ebml, TRUE, buffer_timestamp); + mux->cluster_time = buffer_timestamp; } - /* update duration of this track */ - if (GST_BUFFER_DURATION_IS_VALID (buf)) - collect_pad->duration += GST_BUFFER_DURATION (buf); - /* We currently write index entries for all video tracks or for the audio * track in a single-track audio file. This could be improved by keeping the * index only for the *first* video track. */ @@ -3358,7 +3550,7 @@ } if (last_idx < 0 || mux->min_index_interval == 0 || - (GST_CLOCK_DIFF (mux->index[last_idx].time, GST_BUFFER_TIMESTAMP (buf)) + (GST_CLOCK_DIFF (mux->index[last_idx].time, buffer_timestamp) >= mux->min_index_interval)) { GstMatroskaIndex *idx; @@ -3369,7 +3561,7 @@ idx = &mux->index[mux->num_indexes++]; idx->pos = mux->cluster_pos; - idx->time = GST_BUFFER_TIMESTAMP (buf); + idx->time = buffer_timestamp; idx->track = collect_pad->track->num; } } @@ -3391,7 +3583,7 @@ /* write the block, for doctype v2 use SimpleBlock if possible * one slice (*breath*). * FIXME: Need to do correct lacing! */ - relative_timestamp64 = GST_BUFFER_TIMESTAMP (buf) - mux->cluster_time; + relative_timestamp64 = buffer_timestamp - mux->cluster_time; if (relative_timestamp64 >= 0) { /* round the timestamp */ relative_timestamp64 += gst_util_uint64_scale (mux->time_scale, 1, 2); @@ -3419,7 +3611,7 @@ gst_ebml_write_buffer_header (ebml, GST_MATROSKA_ID_SIMPLEBLOCK, gst_buffer_get_size (buf) + gst_buffer_get_size (hdr)); gst_ebml_write_buffer (ebml, hdr); - gst_ebml_write_flush_cache (ebml, FALSE, GST_BUFFER_TIMESTAMP (buf)); + gst_ebml_write_flush_cache (ebml, FALSE, buffer_timestamp); gst_ebml_write_buffer (ebml, buf); return gst_ebml_last_write_result (ebml); @@ -3438,7 +3630,7 @@ gst_ebml_write_buffer (ebml, hdr); gst_ebml_write_master_finish_full (ebml, blockgroup, gst_buffer_get_size (buf)); - gst_ebml_write_flush_cache (ebml, FALSE, GST_BUFFER_TIMESTAMP (buf)); + gst_ebml_write_flush_cache (ebml, FALSE, buffer_timestamp); gst_ebml_write_buffer (ebml, buf); return gst_ebml_last_write_result (ebml); @@ -3458,11 +3650,11 @@ gst_matroska_mux_handle_buffer (GstCollectPads * pads, GstCollectData * data, GstBuffer * buf, gpointer user_data) { + GstClockTime buffer_timestamp; GstMatroskaMux *mux = GST_MATROSKA_MUX (user_data); GstEbmlWrite *ebml = mux->ebml_write; GstMatroskaPad *best; GstFlowReturn ret = GST_FLOW_OK; - GST_DEBUG_OBJECT (mux, "Collected pads"); /* start with a header */ @@ -3498,15 +3690,17 @@ /* if we have a best stream, should also have a buffer */ g_assert (buf); + buffer_timestamp = gst_matroska_track_get_buffer_timestamp (best->track, buf); + GST_DEBUG_OBJECT (best->collect.pad, "best pad - buffer ts %" GST_TIME_FORMAT " dur %" GST_TIME_FORMAT, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_TIME_ARGS (buffer_timestamp), GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); /* make note of first and last encountered timestamps, so we can calculate * the actual duration later when we send an updated header on eos */ - if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { - GstClockTime start_ts = GST_BUFFER_TIMESTAMP (buf); + if (GST_CLOCK_TIME_IS_VALID (buffer_timestamp)) { + GstClockTime start_ts = buffer_timestamp; GstClockTime end_ts = start_ts; if (GST_BUFFER_DURATION_IS_VALID (buf)) @@ -3587,7 +3781,7 @@ mux = GST_MATROSKA_MUX (object); switch (prop_id) { - case ARG_WRITING_APP: + case PROP_WRITING_APP: if (!g_value_get_string (value)) { GST_WARNING_OBJECT (mux, "writing-app property can not be NULL"); break; @@ -3595,13 +3789,13 @@ g_free (mux->writing_app); mux->writing_app = g_value_dup_string (value); break; - case ARG_DOCTYPE_VERSION: + case PROP_DOCTYPE_VERSION: mux->doctype_version = g_value_get_int (value); break; - case ARG_MIN_INDEX_INTERVAL: + case PROP_MIN_INDEX_INTERVAL: mux->min_index_interval = g_value_get_int64 (value); break; - case ARG_STREAMABLE: + case PROP_STREAMABLE: mux->streamable = g_value_get_boolean (value); break; default: @@ -3620,16 +3814,16 @@ mux = GST_MATROSKA_MUX (object); switch (prop_id) { - case ARG_WRITING_APP: + case PROP_WRITING_APP: g_value_set_string (value, mux->writing_app); break; - case ARG_DOCTYPE_VERSION: + case PROP_DOCTYPE_VERSION: g_value_set_int (value, mux->doctype_version); break; - case ARG_MIN_INDEX_INTERVAL: + case PROP_MIN_INDEX_INTERVAL: g_value_set_int64 (value, mux->min_index_interval); break; - case ARG_STREAMABLE: + case PROP_STREAMABLE: g_value_set_boolean (value, mux->streamable); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-mux.h gst-plugins-good1.0-1.6.1/gst/matroska/matroska-mux.h --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-mux.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-mux.h 2015-10-22 08:02:54.000000000 +0000 @@ -55,6 +55,8 @@ typedef gboolean (*GstMatroskaCapsFunc) (GstPad *pad, GstCaps *caps); +typedef struct _GstMatroskaMux GstMatroskaMux; + /* all information needed for one matroska stream */ typedef struct { @@ -62,7 +64,10 @@ GstMatroskaCapsFunc capsfunc; GstMatroskaTrackContext *track; - guint64 duration; + GstMatroskaMux *mux; + + GstTagList *tags; + GstClockTime start_ts; GstClockTime end_ts; /* last timestamp + (if available) duration */ guint64 default_duration_scaled; @@ -70,7 +75,7 @@ GstMatroskaPad; -typedef struct _GstMatroskaMux { +struct _GstMatroskaMux { GstElement element; /* < private > */ @@ -135,7 +140,7 @@ /* used uids */ GArray *used_uids; -} GstMatroskaMux; +}; typedef struct _GstMatroskaMuxClass { GstElementClass parent; diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-parse.c gst-plugins-good1.0-1.6.1/gst/matroska/matroska-parse.c --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-parse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-parse.c 2015-10-22 08:02:54.000000000 +0000 @@ -79,9 +79,7 @@ enum { - ARG_0, - ARG_METADATA, - ARG_STREAMINFO + PROP_0 }; static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink", @@ -184,7 +182,7 @@ gst_element_class_set_static_metadata (gstelement_class, "Matroska parser", "Codec/Parser", "Parses Matroska/WebM streams into video/audio/subtitles", - "GStreamer maintainers "); + "GStreamer maintainers "); } static void @@ -942,9 +940,7 @@ parse->common.num_streams--; g_ptr_array_remove_index (parse->common.src, parse->common.num_streams); g_assert (parse->common.src->len == parse->common.num_streams); - if (context) { - gst_matroska_track_free (context); - } + gst_matroska_track_free (context); return ret; } @@ -1071,6 +1067,27 @@ return ret; } +static void +gst_matroska_parse_send_tags (GstMatroskaParse * parse) +{ + if (G_UNLIKELY (parse->common.global_tags_changed)) { + GstEvent *tag_event; + gst_tag_list_add (parse->common.global_tags, GST_TAG_MERGE_REPLACE, + GST_TAG_CONTAINER_FORMAT, "Matroska", NULL); + GST_DEBUG_OBJECT (parse, "Sending global_tags %p : %" GST_PTR_FORMAT, + parse->common.global_tags, parse->common.global_tags); + + /* Send a copy as we want to keep our local ref writable to add more tags + * if any are found */ + tag_event = + gst_event_new_tag (gst_tag_list_copy (parse->common.global_tags)); + + gst_pad_push_event (parse->srcpad, tag_event); + + parse->common.global_tags_changed = FALSE; + } +} + /* returns FALSE if there are no pads to deliver event to, * otherwise TRUE (whatever the outcome of event sending), * takes ownership of the passed event! */ @@ -1221,6 +1238,7 @@ GstMatroskaTrackContext *track = NULL; GstSegment seeksegment = { 0, }; gboolean update; + GstSearchMode snap_dir; if (pad) track = gst_pad_get_element_private (pad); @@ -1248,11 +1266,16 @@ GST_DEBUG_OBJECT (parse, "New segment %" GST_SEGMENT_FORMAT, &seeksegment); + if (seeksegment.rate < 0) + snap_dir = GST_SEARCH_MODE_AFTER; + else + snap_dir = GST_SEARCH_MODE_BEFORE; + /* check sanity before we start flushing and all that */ GST_OBJECT_LOCK (parse); if ((entry = gst_matroska_read_common_do_index_seek (&parse->common, track, seeksegment.position, &parse->seek_index, &parse->seek_entry, - FALSE)) == NULL) { + snap_dir)) == NULL) { /* pull mode without index can scan later on */ GST_DEBUG_OBJECT (parse, "No matching seek entry in index"); GST_OBJECT_UNLOCK (parse); @@ -2408,7 +2431,7 @@ gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer, gboolean keyframe) { - GstFlowReturn ret = GST_FLOW_OK; + GstFlowReturn ret; if (!parse->pushed_headers) { GstCaps *caps; @@ -2452,6 +2475,10 @@ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT); ret = gst_pad_push (parse->srcpad, buf); + if (ret != GST_FLOW_OK) { + GST_WARNING_OBJECT (parse, "Failed to push buffer"); + return ret; + } parse->pushed_headers = TRUE; } @@ -2466,9 +2493,8 @@ } else { GST_BUFFER_TIMESTAMP (buffer) = parse->last_timestamp; } - ret = gst_pad_push (parse->srcpad, gst_buffer_ref (buffer)); - return ret; + return gst_pad_push (parse->srcpad, gst_buffer_ref (buffer)); } static GstFlowReturn @@ -2558,6 +2584,8 @@ if (!parse->common.segmentinfo_parsed) { ret = gst_matroska_read_common_parse_info (&parse->common, GST_ELEMENT_CAST (parse), &ebml); + if (ret == GST_FLOW_OK) + gst_matroska_parse_send_tags (parse); } gst_matroska_parse_accumulate_streamheader (parse, ebml.buf); break; @@ -2651,6 +2679,8 @@ if (!parse->common.attachments_parsed) { ret = gst_matroska_read_common_parse_attachments (&parse->common, GST_ELEMENT_CAST (parse), &ebml); + if (ret == GST_FLOW_OK) + gst_matroska_parse_send_tags (parse); } gst_matroska_parse_output (parse, ebml.buf, FALSE); break; @@ -2658,6 +2688,8 @@ GST_READ_CHECK (gst_matroska_parse_take (parse, read, &ebml)); ret = gst_matroska_read_common_parse_metadata (&parse->common, GST_ELEMENT_CAST (parse), &ebml); + if (ret == GST_FLOW_OK) + gst_matroska_parse_send_tags (parse); gst_matroska_parse_accumulate_streamheader (parse, ebml.buf); break; case GST_MATROSKA_ID_CHAPTERS: diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-parse.h gst-plugins-good1.0-1.6.1/gst/matroska/matroska-parse.h --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-parse.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-parse.h 2015-10-22 08:02:54.000000000 +0000 @@ -62,7 +62,6 @@ /* state */ //gboolean streaming; - guint level_up; guint64 seek_block; gboolean seek_first; diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-read-common.c gst-plugins-good1.0-1.6.1/gst/matroska/matroska-read-common.c --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-read-common.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-read-common.c 2015-10-22 08:02:54.000000000 +0000 @@ -375,30 +375,32 @@ GstMatroskaIndex * gst_matroska_read_common_do_index_seek (GstMatroskaReadCommon * common, GstMatroskaTrackContext * track, gint64 seek_pos, GArray ** _index, - gint * _entry_index, gboolean next) + gint * _entry_index, GstSearchMode snap_dir) { GstMatroskaIndex *entry = NULL; GArray *index; - if (!common->index || !common->index->len) - return NULL; - /* find entry just before or at the requested position */ if (track && track->index_table) index = track->index_table; else index = common->index; + if (!index || !index->len) + return NULL; + entry = gst_util_array_binary_search (index->data, index->len, sizeof (GstMatroskaIndex), - (GCompareDataFunc) gst_matroska_index_seek_find, - next ? GST_SEARCH_MODE_AFTER : GST_SEARCH_MODE_BEFORE, &seek_pos, NULL); + (GCompareDataFunc) gst_matroska_index_seek_find, snap_dir, &seek_pos, + NULL); if (entry == NULL) { - if (next) { - return NULL; + if (snap_dir == GST_SEARCH_MODE_AFTER) { + /* Can only happen with a reverse seek past the end */ + entry = &g_array_index (index, GstMatroskaIndex, index->len - 1); } else { + /* Can only happen with a forward seek before the start */ entry = &g_array_index (index, GstMatroskaIndex, 0); } } @@ -445,26 +447,12 @@ GstElement * el, GstTagList * taglist) { if (common->global_tags) { - /* nothing sent yet, add to cache */ gst_tag_list_insert (common->global_tags, taglist, GST_TAG_MERGE_APPEND); gst_tag_list_unref (taglist); } else { - GstEvent *tag_event = gst_event_new_tag (taglist); - gint i; - - /* hm, already sent, no need to cache and wait anymore */ - GST_DEBUG_OBJECT (common->sinkpad, - "Sending late global tags %" GST_PTR_FORMAT, taglist); - - for (i = 0; i < common->src->len; i++) { - GstMatroskaTrackContext *stream; - - stream = g_ptr_array_index (common->src, i); - gst_pad_push_event (stream->pad, gst_event_ref (tag_event)); - } - - gst_event_unref (tag_event); + common->global_tags = taglist; } + common->global_tags_changed = TRUE; } gint64 @@ -769,6 +757,7 @@ } gst_toc_entry_merge_tags (entry, etags, GST_TAG_MERGE_APPEND); + gst_tag_list_unref (etags); cur = gst_toc_entry_get_sub_entries (entry); while (cur != NULL) { @@ -1503,10 +1492,8 @@ /* position in the file + track to which it belongs */ case GST_MATROSKA_ID_CUETRACKPOSITIONS: { - if ((ret = - gst_matroska_read_common_parse_index_cuetrack (common, ebml, - &nentries)) != GST_FLOW_OK) - break; + ret = gst_matroska_read_common_parse_index_cuetrack (common, ebml, + &nentries); break; } @@ -2048,6 +2035,7 @@ key_val = g_strdup_printf ("%s=%s", name_with_parent, value); gst_tag_list_add (*p_taglist, GST_TAG_MERGE_APPEND, GST_TAG_EXTENDED_COMMENT, key_val, NULL); + g_free (key_val); } else if (tag && value && *value != '\0') { gboolean matched = FALSE; guint i; @@ -2092,6 +2080,7 @@ key_val = g_strdup_printf ("%s=%s", tag, value); gst_tag_list_add (*p_taglist, GST_TAG_MERGE_APPEND, GST_TAG_EXTENDED_COMMENT, key_val, NULL); + g_free (key_val); } } @@ -2224,71 +2213,67 @@ return; for (i = 0; i < vallen; i++) { - GValue val = { 0 }; const GValue *val_ref; val_ref = gst_tag_list_get_value_index (list, tag, i); if (val_ref == NULL) continue; - g_value_init (&val, G_VALUE_TYPE (val_ref)); - g_value_copy (val_ref, &val); /* TODO: use the optional ctx->target_type somehow */ if (strcmp (tag, GST_TAG_TITLE) == 0) { if (ctx->target_type_value >= 70 && !ctx->audio_only) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_SHOW_NAME, &val); + GST_TAG_SHOW_NAME, val_ref); continue; } else if (ctx->target_type_value >= 50) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_ALBUM, &val); + GST_TAG_ALBUM, val_ref); continue; } } else if (strcmp (tag, GST_TAG_TITLE_SORTNAME) == 0) { if (ctx->target_type_value >= 70 && !ctx->audio_only) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_SHOW_SORTNAME, &val); + GST_TAG_SHOW_SORTNAME, val_ref); continue; } else if (ctx->target_type_value >= 50) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_ALBUM_SORTNAME, &val); + GST_TAG_ALBUM_SORTNAME, val_ref); continue; } } else if (strcmp (tag, GST_TAG_ARTIST) == 0) { if (ctx->target_type_value >= 50) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_ALBUM_ARTIST, &val); + GST_TAG_ALBUM_ARTIST, val_ref); continue; } } else if (strcmp (tag, GST_TAG_ARTIST_SORTNAME) == 0) { if (ctx->target_type_value >= 50) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_ALBUM_ARTIST_SORTNAME, &val); + GST_TAG_ALBUM_ARTIST_SORTNAME, val_ref); continue; } } else if (strcmp (tag, GST_TAG_TRACK_COUNT) == 0) { if (ctx->target_type_value >= 60) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_ALBUM_VOLUME_COUNT, &val); + GST_TAG_ALBUM_VOLUME_COUNT, val_ref); continue; } } else if (strcmp (tag, GST_TAG_TRACK_NUMBER) == 0) { if (ctx->target_type_value >= 60 && !ctx->audio_only) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_SHOW_SEASON_NUMBER, &val); + GST_TAG_SHOW_SEASON_NUMBER, val_ref); continue; } else if (ctx->target_type_value >= 50 && !ctx->audio_only) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_SHOW_EPISODE_NUMBER, &val); + GST_TAG_SHOW_EPISODE_NUMBER, val_ref); continue; } else if (ctx->target_type_value >= 50) { gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, - GST_TAG_ALBUM_VOLUME_NUMBER, &val); + GST_TAG_ALBUM_VOLUME_NUMBER, val_ref); continue; } } - gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, tag, &val); - g_value_unset (&val); + gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, tag, val_ref); } } @@ -2402,15 +2387,27 @@ GstMatroskaTrackContext *stream = g_ptr_array_index (common->src, j); if (stream->uid == tgt) { - gst_tag_list_insert (stream->pending_tags, taglist, - GST_TAG_MERGE_REPLACE); + gst_tag_list_insert (stream->tags, taglist, GST_TAG_MERGE_REPLACE); + stream->tags_changed = TRUE; found = TRUE; } } if (!found) { - GST_WARNING_OBJECT (common->sinkpad, + /* Cache the track taglist: possibly belongs to a track that will be parsed + later in gst_matroska_demux.c:gst_matroska_demux_add_stream (...) */ + gpointer track_uid = GUINT_TO_POINTER (tgt); + GstTagList *cached_taglist = + g_hash_table_lookup (common->cached_track_taglists, track_uid); + if (cached_taglist) + gst_tag_list_insert (cached_taglist, taglist, GST_TAG_MERGE_REPLACE); + else { + gst_tag_list_ref (taglist); + g_hash_table_insert (common->cached_track_taglists, track_uid, + taglist); + } + GST_DEBUG_OBJECT (common->sinkpad, "Found track-specific tag(s), but track %" G_GUINT64_FORMAT - " is not known (yet?)", tgt); + " is not known yet, caching", tgt); } } } else @@ -2434,8 +2431,6 @@ GList *l; guint64 curpos; - curpos = gst_ebml_read_get_pos (ebml); - /* Make sure we don't parse a tags element twice and * post it's tags twice */ curpos = gst_ebml_read_get_pos (ebml); @@ -2862,6 +2857,9 @@ ctx->index = NULL; ctx->global_tags = NULL; ctx->adapter = gst_adapter_new (); + ctx->cached_track_taglists = + g_hash_table_new_full (NULL, NULL, NULL, + (GDestroyNotify) gst_tag_list_unref); } void @@ -2878,6 +2876,9 @@ } g_object_unref (ctx->adapter); + g_hash_table_remove_all (ctx->cached_track_taglists); + g_hash_table_unref (ctx->cached_track_taglists); + } void @@ -2935,6 +2936,7 @@ ctx->chapters_parsed = FALSE; /* tags */ + ctx->global_tags_changed = FALSE; g_list_foreach (ctx->tags_parsed, (GFunc) gst_matroska_read_common_free_parsed_el, NULL); g_list_free (ctx->tags_parsed); diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/matroska-read-common.h gst-plugins-good1.0-1.6.1/gst/matroska/matroska-read-common.h --- gst-plugins-good1.0-1.4.3/gst/matroska/matroska-read-common.h 2014-09-11 14:09:41.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/matroska-read-common.h 2015-10-22 08:02:54.000000000 +0000 @@ -90,6 +90,7 @@ GstSegment segment; GstTagList *global_tags; + gboolean global_tags_changed; /* pull mode caching */ GstBuffer *cached_buffer; @@ -101,6 +102,10 @@ /* push based mode usual suspects */ GstAdapter *adapter; + + /* cache for track tags that forward-reference their tracks */ + GHashTable *cached_track_taglists ; + } GstMatroskaReadCommon; GstFlowReturn gst_matroska_decode_content_encodings (GArray * encodings); @@ -110,7 +115,7 @@ gpointer user_data); GstMatroskaIndex * gst_matroska_read_common_do_index_seek ( GstMatroskaReadCommon * common, GstMatroskaTrackContext * track, gint64 - seek_pos, GArray ** _index, gint * _entry_index, gboolean next); + seek_pos, GArray ** _index, gint * _entry_index, GstSearchMode snap_dir); void gst_matroska_read_common_found_global_tag (GstMatroskaReadCommon * common, GstElement * el, GstTagList * taglist); gint64 gst_matroska_read_common_get_length (GstMatroskaReadCommon * common); diff -Nru gst-plugins-good1.0-1.4.3/gst/matroska/webm-mux.c gst-plugins-good1.0-1.6.1/gst/matroska/webm-mux.c --- gst-plugins-good1.0-1.4.3/gst/matroska/webm-mux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/matroska/webm-mux.c 2015-10-22 08:02:54.000000000 +0000 @@ -90,7 +90,7 @@ gst_element_class_set_static_metadata (gstelement_class, "WebM muxer", "Codec/Muxer", "Muxes video and audio streams into a WebM stream", - "GStreamer maintainers "); + "GStreamer maintainers "); } static void diff -Nru gst-plugins-good1.0-1.4.3/gst/monoscope/Makefile.am gst-plugins-good1.0-1.6.1/gst/monoscope/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/monoscope/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/monoscope/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -8,17 +8,3 @@ libgstmonoscope_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) libgstmonoscope_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmonoscope_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstmonoscope -:SHARED libgstmonoscope \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmonoscope_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmonoscope_la_CFLAGS) \ - -:LDFLAGS $(libgstmonoscope_la_LDFLAGS) \ - $(libgstmonoscope_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/monoscope/Makefile.in gst-plugins-good1.0-1.6.1/gst/monoscope/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/monoscope/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/monoscope/Makefile.in 2015-10-30 12:10:15.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/monoscope -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -577,7 +585,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/monoscope/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/monoscope/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -902,20 +909,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstmonoscope -:SHARED libgstmonoscope \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmonoscope_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmonoscope_la_CFLAGS) \ - -:LDFLAGS $(libgstmonoscope_la_LDFLAGS) \ - $(libgstmonoscope_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifile.c gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifile.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifile.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifile.c 2015-10-22 08:02:54.000000000 +0000 @@ -31,6 +31,8 @@ #include "gstmultifilesink.h" #include "gstmultifilesrc.h" #include "gstsplitfilesrc.h" +#include "gstsplitmuxsink.h" +#include "gstsplitmuxsrc.h" static gboolean plugin_init (GstPlugin * plugin) @@ -42,6 +44,12 @@ gst_element_register (plugin, "splitfilesrc", GST_RANK_NONE, gst_split_file_src_get_type ()); + if (!register_splitmuxsink (plugin)) + return FALSE; + + if (!register_splitmuxsrc (plugin)) + return FALSE; + return TRUE; } diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifilesink.c gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifilesink.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifilesink.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifilesink.c 2015-10-22 08:02:54.000000000 +0000 @@ -4,6 +4,7 @@ * 2006 Wim Taymans * 2006 David A. Schleef * 2011 Collabora Ltd. + * 2015 Tim-Philipp Müller * * gstmultifilesink.c: * @@ -28,6 +29,14 @@ * * Write incoming data to a series of sequentially-named files. * + * This element is usually used with data where each buffer is an + * independent unit of data in its own right (e.g. raw video buffers or + * encoded JPEG or PNG images) or with streamable container formats such + * as MPEG-TS or MPEG-PS. + * + * It is not possible to use this element to create independently playable + * mp4 files, use the splitmuxsink element for that instead. + * * The filename property should contain a string with a \%d placeholder that will * be substituted with the index for each filename. * @@ -127,6 +136,8 @@ #define DEFAULT_NEXT_FILE GST_MULTI_FILE_SINK_NEXT_BUFFER #define DEFAULT_MAX_FILES 0 #define DEFAULT_MAX_FILE_SIZE G_GUINT64_CONSTANT(2*1024*1024*1024) +#define DEFAULT_MAX_FILE_DURATION GST_CLOCK_TIME_NONE +#define DEFAULT_AGGREGATE_GOPS FALSE enum { @@ -137,7 +148,8 @@ PROP_NEXT_FILE, PROP_MAX_FILES, PROP_MAX_FILE_SIZE, - PROP_LAST + PROP_MAX_FILE_DURATION, + PROP_AGGREGATE_GOPS }; static void gst_multi_file_sink_finalize (GObject * object); @@ -147,6 +159,7 @@ static void gst_multi_file_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); +static gboolean gst_multi_file_sink_start (GstBaseSink * bsink); static gboolean gst_multi_file_sink_stop (GstBaseSink * sink); static GstFlowReturn gst_multi_file_sink_render (GstBaseSink * sink, GstBuffer * buffer); @@ -179,6 +192,10 @@ {GST_MULTI_FILE_SINK_NEXT_MAX_SIZE, "New file when the configured maximum " "file size would be exceeded with the next buffer or buffer list", "max-size"}, + {GST_MULTI_FILE_SINK_NEXT_MAX_DURATION, + "New file when the configured maximum " + "file duration would be exceeded with the next buffer or buffer list", + "max-duration"}, {0, NULL, NULL} }; @@ -232,7 +249,7 @@ g_param_spec_enum ("next-file", "Next File", "When to start a new file", GST_TYPE_MULTI_FILE_SINK_NEXT, DEFAULT_NEXT_FILE, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** @@ -259,8 +276,37 @@ 0, G_MAXUINT64, DEFAULT_MAX_FILE_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstMultiFileSink:max-file-duration: + * + * Maximum file size before starting a new file in max-size mode. + */ + g_object_class_install_property (gobject_class, PROP_MAX_FILE_DURATION, + g_param_spec_uint64 ("max-file-duration", "Maximum File Duration", + "Maximum file duration before starting a new file in max-size mode", + 0, G_MAXUINT64, DEFAULT_MAX_FILE_DURATION, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstMultiFileSink:aggregate-gops: + * + * Whether to aggregate complete GOPs before doing any processing. Set this + * to TRUE to make sure each new file starts with a keyframe. This requires + * the upstream element to flag buffers containing key units and delta + * units correctly. At least the MPEG-PS and MPEG-TS muxers should be doing + * this. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_AGGREGATE_GOPS, + g_param_spec_boolean ("aggregate-gops", "Aggregate GOPs", + "Whether to aggregate GOPs and process them as a whole without " + "splitting", DEFAULT_AGGREGATE_GOPS, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gobject_class->finalize = gst_multi_file_sink_finalize; + gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_multi_file_sink_start); gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_multi_file_sink_stop); gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_multi_file_sink_render); gstbasesink_class->render_list = @@ -288,9 +334,13 @@ multifilesink->post_messages = DEFAULT_POST_MESSAGES; multifilesink->max_files = DEFAULT_MAX_FILES; multifilesink->max_file_size = DEFAULT_MAX_FILE_SIZE; + multifilesink->max_file_duration = DEFAULT_MAX_FILE_DURATION; multifilesink->files = NULL; multifilesink->n_files = 0; + multifilesink->aggregate_gops = DEFAULT_AGGREGATE_GOPS; + multifilesink->gop_adapter = NULL; + gst_base_sink_set_sync (GST_BASE_SINK (multifilesink), FALSE); multifilesink->next_segment = GST_CLOCK_TIME_NONE; @@ -345,6 +395,12 @@ case PROP_MAX_FILE_SIZE: sink->max_file_size = g_value_get_uint64 (value); break; + case PROP_MAX_FILE_DURATION: + sink->max_file_duration = g_value_get_uint64 (value); + break; + case PROP_AGGREGATE_GOPS: + sink->aggregate_gops = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -376,6 +432,12 @@ case PROP_MAX_FILE_SIZE: g_value_set_uint64 (value, sink->max_file_size); break; + case PROP_MAX_FILE_DURATION: + g_value_set_uint64 (value, sink->max_file_duration); + break; + case PROP_AGGREGATE_GOPS: + g_value_set_boolean (value, sink->aggregate_gops); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -383,6 +445,19 @@ } static gboolean +gst_multi_file_sink_start (GstBaseSink * bsink) +{ + GstMultiFileSink *sink = GST_MULTI_FILE_SINK (bsink); + + if (sink->aggregate_gops) + sink->gop_adapter = gst_adapter_new (); + sink->potential_next_gop = NULL; + sink->file_pts = GST_CLOCK_TIME_NONE; + + return TRUE; +} + +static gboolean gst_multi_file_sink_stop (GstBaseSink * sink) { GstMultiFileSink *multifilesink; @@ -403,6 +478,17 @@ multifilesink->streamheaders = NULL; } + if (multifilesink->gop_adapter != NULL) { + g_object_unref (multifilesink->gop_adapter); + multifilesink->gop_adapter = NULL; + } + + if (multifilesink->potential_next_gop != NULL) { + g_list_free_full (multifilesink->potential_next_gop, + (GDestroyNotify) gst_buffer_unref); + multifilesink->potential_next_gop = NULL; + } + multifilesink->force_key_unit_count = -1; return TRUE; @@ -434,6 +520,30 @@ gst_message_new_element (GST_OBJECT_CAST (multifilesink), s)); } +static void +gst_multi_file_sink_post_message_from_time (GstMultiFileSink * multifilesink, + GstClockTime timestamp, GstClockTime duration, const char *filename) +{ + GstClockTime running_time, stream_time; + guint64 offset, offset_end; + GstSegment *segment; + GstFormat format; + + if (!multifilesink->post_messages) + return; + + segment = &GST_BASE_SINK (multifilesink)->segment; + format = segment->format; + + offset = -1; + offset_end = -1; + + running_time = gst_segment_to_running_time (segment, format, timestamp); + stream_time = gst_segment_to_stream_time (segment, format, timestamp); + + gst_multi_file_sink_post_message_full (multifilesink, timestamp, duration, + offset, offset_end, running_time, stream_time, filename); +} static void gst_multi_file_sink_post_message (GstMultiFileSink * multifilesink, @@ -471,6 +581,8 @@ if (sink->streamheaders == NULL) return TRUE; + GST_DEBUG_OBJECT (sink, "Writing stream headers"); + /* we want to write these at the beginning */ g_assert (sink->cur_file_size == 0); @@ -494,35 +606,31 @@ } static GstFlowReturn -gst_multi_file_sink_render (GstBaseSink * sink, GstBuffer * buffer) +gst_multi_file_sink_write_buffer (GstMultiFileSink * multifilesink, + GstBuffer * buffer) { - GstMultiFileSink *multifilesink; GstMapInfo map; - gchar *filename; gboolean ret; - GError *error = NULL; gboolean first_file = TRUE; gst_buffer_map (buffer, &map, GST_MAP_READ); - multifilesink = GST_MULTI_FILE_SINK (sink); - switch (multifilesink->next_file) { case GST_MULTI_FILE_SINK_NEXT_BUFFER: - gst_multi_file_sink_ensure_max_files (multifilesink); - - filename = g_strdup_printf (multifilesink->filename, - multifilesink->index); - ret = g_file_set_contents (filename, (char *) map.data, map.size, &error); - if (!ret) - goto write_error; - - multifilesink->files = g_slist_append (multifilesink->files, filename); - multifilesink->n_files += 1; - - gst_multi_file_sink_post_message (multifilesink, buffer, filename); - multifilesink->index++; + if (multifilesink->files != NULL) + first_file = FALSE; + if (!gst_multi_file_sink_open_next_file (multifilesink)) + goto stdio_write_error; + if (first_file == FALSE) + gst_multi_file_sink_write_stream_headers (multifilesink); + GST_DEBUG_OBJECT (multifilesink, + "Writing buffer data (%" G_GSIZE_FORMAT " bytes) to new file", + map.size); + ret = fwrite (map.data, map.size, 1, multifilesink->file); + if (ret != 1) + goto stdio_write_error; + gst_multi_file_sink_close_file (multifilesink, buffer); break; case GST_MULTI_FILE_SINK_NEXT_DISCONT: if (GST_BUFFER_IS_DISCONT (buffer)) { @@ -621,6 +729,46 @@ multifilesink->cur_file_size += map.size; break; } + case GST_MULTI_FILE_SINK_NEXT_MAX_DURATION:{ + GstClockTime new_duration = 0; + + if (GST_BUFFER_PTS_IS_VALID (buffer) + && GST_CLOCK_TIME_IS_VALID (multifilesink->file_pts)) { + /* The new duration will extend to this new buffer pts ... */ + new_duration = GST_BUFFER_PTS (buffer) - multifilesink->file_pts; + /* ... and duration (if it has one) */ + if (GST_BUFFER_DURATION_IS_VALID (buffer)) + new_duration += GST_BUFFER_DURATION (buffer); + } + + if (new_duration > multifilesink->max_file_duration) { + + GST_INFO_OBJECT (multifilesink, + "new_duration: %" G_GUINT64_FORMAT ", max. duration %" + G_GUINT64_FORMAT, new_duration, multifilesink->max_file_duration); + + if (multifilesink->file != NULL) { + first_file = FALSE; + gst_multi_file_sink_close_file (multifilesink, buffer); + } + } + + if (multifilesink->file == NULL) { + if (!gst_multi_file_sink_open_next_file (multifilesink)) + goto stdio_write_error; + + multifilesink->file_pts = GST_BUFFER_PTS (buffer); + if (!first_file) + gst_multi_file_sink_write_stream_headers (multifilesink); + } + + ret = fwrite (map.data, map.size, 1, multifilesink->file); + + if (ret != 1) + goto stdio_write_error; + + break; + } default: g_assert_not_reached (); } @@ -629,26 +777,6 @@ return GST_FLOW_OK; /* ERRORS */ -write_error: - { - switch (error->code) { - case G_FILE_ERROR_NOSPC:{ - GST_ELEMENT_ERROR (multifilesink, RESOURCE, NO_SPACE_LEFT, (NULL), - (NULL)); - break; - } - default:{ - GST_ELEMENT_ERROR (multifilesink, RESOURCE, WRITE, - ("Error while writing to file \"%s\".", filename), - ("%s", g_strerror (errno))); - } - } - g_error_free (error); - g_free (filename); - - gst_buffer_unmap (buffer, &map); - return GST_FLOW_ERROR; - } stdio_write_error: switch (errno) { case ENOSPC: @@ -663,6 +791,76 @@ return GST_FLOW_ERROR; } +static GstFlowReturn +gst_multi_file_sink_render (GstBaseSink * bsink, GstBuffer * buffer) +{ + GstMultiFileSink *sink = GST_MULTI_FILE_SINK (bsink); + GstFlowReturn flow = GST_FLOW_OK; + gboolean key_unit, header; + + header = GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER); + key_unit = !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT); + + if (sink->aggregate_gops) { + GstBuffer *gop_buffer = NULL; + guint avail; + + avail = gst_adapter_available (sink->gop_adapter); + + GST_LOG_OBJECT (sink, "aggregate GOP: received %s%s unit buffer: " + "%" GST_PTR_FORMAT, + (key_unit) ? "key" : "delta", (header) ? " header" : "", buffer); + + /* If it's a header buffer, it might potentially be for the next GOP */ + if (header) { + GST_LOG_OBJECT (sink, "Accumulating buffer to potential next GOP"); + sink->potential_next_gop = + g_list_append (sink->potential_next_gop, gst_buffer_ref (buffer)); + } else { + if (key_unit && avail > 0) { + GstClockTime pts, dts; + GST_LOG_OBJECT (sink, "Grabbing pending completed GOP"); + pts = gst_adapter_prev_pts_at_offset (sink->gop_adapter, 0, NULL); + dts = gst_adapter_prev_dts_at_offset (sink->gop_adapter, 0, NULL); + gop_buffer = gst_adapter_take_buffer (sink->gop_adapter, avail); + GST_BUFFER_PTS (gop_buffer) = pts; + GST_BUFFER_DTS (gop_buffer) = dts; + } + + /* just accumulate the buffer */ + if (sink->potential_next_gop) { + GList *tmp; + GST_LOG_OBJECT (sink, + "Carrying over pending next GOP data into adapter"); + /* If we have pending data, put that first in the adapter */ + for (tmp = sink->potential_next_gop; tmp; tmp = tmp->next) { + GstBuffer *tmpb = (GstBuffer *) tmp->data; + gst_adapter_push (sink->gop_adapter, tmpb); + } + g_list_free (sink->potential_next_gop); + sink->potential_next_gop = NULL; + } + GST_LOG_OBJECT (sink, "storing buffer in adapter"); + gst_adapter_push (sink->gop_adapter, gst_buffer_ref (buffer)); + + if (gop_buffer != NULL) { + GST_DEBUG_OBJECT (sink, "writing out pending GOP, %u bytes", avail); + GST_DEBUG_OBJECT (sink, + "gop buffer pts:%" GST_TIME_FORMAT " dts:%" GST_TIME_FORMAT + " duration:%" GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_PTS (gop_buffer)), + GST_TIME_ARGS (GST_BUFFER_DTS (gop_buffer)), + GST_TIME_ARGS (GST_BUFFER_DURATION (gop_buffer))); + flow = gst_multi_file_sink_write_buffer (sink, gop_buffer); + gst_buffer_unref (gop_buffer); + } + } + } else { + flow = gst_multi_file_sink_write_buffer (sink, buffer); + } + return flow; +} + static gboolean buffer_list_calc_size (GstBuffer ** buf, guint idx, gpointer data) { @@ -810,13 +1008,12 @@ offset = offset_end = -1; filename = g_strdup_printf (multifilesink->filename, multifilesink->index); - gst_multi_file_sink_post_message_full (multifilesink, timestamp, - duration, offset, offset_end, running_time, stream_time, filename); - - g_free (filename); gst_multi_file_sink_close_file (multifilesink, NULL); + gst_multi_file_sink_post_message_full (multifilesink, timestamp, + duration, offset, offset_end, running_time, stream_time, filename); + g_free (filename); } if (multifilesink->file == NULL) { @@ -826,6 +1023,29 @@ break; } + case GST_EVENT_EOS: + if (multifilesink->aggregate_gops) { + GstBuffer *buf = gst_buffer_new (); + + /* push key unit buffer to force writing out the pending GOP data */ + GST_INFO_OBJECT (sink, "EOS, write pending GOP data"); + GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT); + gst_multi_file_sink_render (sink, buf); + gst_buffer_unref (buf); + } + if (multifilesink->file) { + gchar *filename; + + filename = g_strdup_printf (multifilesink->filename, + multifilesink->index); + + gst_multi_file_sink_close_file (multifilesink, NULL); + + gst_multi_file_sink_post_message_from_time (multifilesink, + GST_BASE_SINK (multifilesink)->segment.position, -1, filename); + g_free (filename); + } + break; default: break; } diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifilesink.h gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifilesink.h --- gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifilesink.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifilesink.h 2015-10-22 08:02:54.000000000 +0000 @@ -26,7 +26,7 @@ #define __GST_MULTIFILESINK_H__ #include -#include +#include #include #include #include @@ -62,6 +62,8 @@ * event * @GST_MULTI_FILE_SINK_NEXT_MAX_SIZE: New file when the configured maximum file * size would be exceeded with the next buffer or buffer list + * @GST_MULTI_FILE_SINK_NEXT_MAX_DURATION: New file when the configured maximum duration + * would be exceeded with the next buffer or buffer list * * File splitting modes. */ @@ -70,7 +72,8 @@ GST_MULTI_FILE_SINK_NEXT_DISCONT, GST_MULTI_FILE_SINK_NEXT_KEY_FRAME, GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT, - GST_MULTI_FILE_SINK_NEXT_MAX_SIZE + GST_MULTI_FILE_SINK_NEXT_MAX_SIZE, + GST_MULTI_FILE_SINK_NEXT_MAX_DURATION } GstMultiFileSinkNext; struct _GstMultiFileSink @@ -94,6 +97,13 @@ guint64 cur_file_size; guint64 max_file_size; + + GstClockTime file_pts; + GstClockTime max_file_duration; + + gboolean aggregate_gops; + GstAdapter *gop_adapter; /* to aggregate GOPs */ + GList *potential_next_gop; /* To detect false-positives */ }; struct _GstMultiFileSinkClass diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifilesrc.c gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifilesrc.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstmultifilesrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstmultifilesrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -72,13 +72,13 @@ enum { - ARG_0, - ARG_LOCATION, - ARG_INDEX, - ARG_START_INDEX, - ARG_STOP_INDEX, - ARG_CAPS, - ARG_LOOP + PROP_0, + PROP_LOCATION, + PROP_INDEX, + PROP_START_INDEX, + PROP_STOP_INDEX, + PROP_CAPS, + PROP_LOOP }; #define DEFAULT_LOCATION "%05d" @@ -143,35 +143,35 @@ gobject_class->set_property = gst_multi_file_src_set_property; gobject_class->get_property = gst_multi_file_src_get_property; - g_object_class_install_property (gobject_class, ARG_LOCATION, + g_object_class_install_property (gobject_class, PROP_LOCATION, g_param_spec_string ("location", "File Location", "Pattern to create file names of input files. File names are " "created by calling sprintf() with the pattern and the current " "index.", DEFAULT_LOCATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_INDEX, + g_object_class_install_property (gobject_class, PROP_INDEX, g_param_spec_int ("index", "File Index", "Index to use with location property to create file names. The " "index is incremented by one for each buffer read.", 0, INT_MAX, DEFAULT_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_START_INDEX, + g_object_class_install_property (gobject_class, PROP_START_INDEX, g_param_spec_int ("start-index", "Start Index", "Start value of index. The initial value of index can be set " "either by setting index or start-index. When the end of the loop " "is reached, the index will be set to the value start-index.", 0, INT_MAX, DEFAULT_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_STOP_INDEX, + g_object_class_install_property (gobject_class, PROP_STOP_INDEX, g_param_spec_int ("stop-index", "Stop Index", "Stop value of index. The special value -1 means no stop.", -1, INT_MAX, DEFAULT_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_CAPS, + g_object_class_install_property (gobject_class, PROP_CAPS, g_param_spec_boxed ("caps", "Caps", "Caps describing the format of the data.", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_LOOP, + g_object_class_install_property (gobject_class, PROP_LOOP, g_param_spec_boolean ("loop", "Loop", "Whether to repeat from the beginning when all files have been read.", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -295,19 +295,26 @@ GstMultiFileSrc *src = GST_MULTI_FILE_SRC (object); switch (prop_id) { - case ARG_LOCATION: + case PROP_LOCATION: gst_multi_file_src_set_location (src, g_value_get_string (value)); break; - case ARG_INDEX: - src->index = g_value_get_int (value); + case PROP_INDEX: + GST_OBJECT_LOCK (src); + /* index was really meant to be read-only, but for backwards-compatibility + * we set start_index to make it work as it used to */ + if (!GST_OBJECT_FLAG_IS_SET (src, GST_BASE_SRC_FLAG_STARTED)) + src->start_index = g_value_get_int (value); + else + src->index = g_value_get_int (value); + GST_OBJECT_UNLOCK (src); break; - case ARG_START_INDEX: + case PROP_START_INDEX: src->start_index = g_value_get_int (value); break; - case ARG_STOP_INDEX: + case PROP_STOP_INDEX: src->stop_index = g_value_get_int (value); break; - case ARG_CAPS: + case PROP_CAPS: { GstStructure *st = NULL; const GstCaps *caps = gst_value_get_caps (value); @@ -333,7 +340,7 @@ } } break; - case ARG_LOOP: + case PROP_LOOP: src->loop = g_value_get_boolean (value); break; default: @@ -349,22 +356,22 @@ GstMultiFileSrc *src = GST_MULTI_FILE_SRC (object); switch (prop_id) { - case ARG_LOCATION: + case PROP_LOCATION: g_value_set_string (value, src->filename); break; - case ARG_INDEX: + case PROP_INDEX: g_value_set_int (value, src->index); break; - case ARG_START_INDEX: + case PROP_START_INDEX: g_value_set_int (value, src->start_index); break; - case ARG_STOP_INDEX: + case PROP_STOP_INDEX: g_value_set_int (value, src->stop_index); break; - case ARG_CAPS: + case PROP_CAPS: gst_value_set_caps (value, src->caps); break; - case ARG_LOOP: + case PROP_LOOP: g_value_set_boolean (value, src->loop); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitfilesrc.c gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitfilesrc.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitfilesrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitfilesrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -45,16 +45,10 @@ #endif #include "gstsplitfilesrc.h" -#include "patternspec.h" +#include "gstsplitutils.h" #include -#ifdef G_OS_WIN32 -#define DEFAULT_PATTERN_MATCH_MODE MATCH_MODE_UTF8 -#else -#define DEFAULT_PATTERN_MATCH_MODE MATCH_MODE_AUTO -#endif - enum { PROP_LOCATION = 1 @@ -237,84 +231,6 @@ } } -static int -gst_split_file_src_array_sortfunc (gchar ** a, gchar ** b) -{ - return strcmp (*a, *b); -} - -static gchar ** -gst_split_file_src_find_files (GstSplitFileSrc * src, const gchar * dirname, - const gchar * basename, GError ** err) -{ - PatternSpec *pspec; - GPtrArray *files; - const gchar *name; - GDir *dir; - - if (dirname == NULL || basename == NULL) - goto invalid_location; - - GST_INFO_OBJECT (src, "checking in directory '%s' for pattern '%s'", - dirname, basename); - - dir = g_dir_open (dirname, 0, err); - if (dir == NULL) - return NULL; - - if (DEFAULT_PATTERN_MATCH_MODE == MATCH_MODE_UTF8 && - !g_utf8_validate (basename, -1, NULL)) { - goto not_utf8; - } - - /* mode will be AUTO on linux/unix and UTF8 on win32 */ - pspec = pattern_spec_new (basename, DEFAULT_PATTERN_MATCH_MODE); - - files = g_ptr_array_new (); - - while ((name = g_dir_read_name (dir))) { - GST_TRACE_OBJECT (src, "check: %s", name); - if (pattern_match_string (pspec, name)) { - GST_DEBUG_OBJECT (src, "match: %s", name); - g_ptr_array_add (files, g_build_filename (dirname, name, NULL)); - } - } - - if (files->len == 0) - goto no_matches; - - g_ptr_array_sort (files, (GCompareFunc) gst_split_file_src_array_sortfunc); - g_ptr_array_add (files, NULL); - - pattern_spec_free (pspec); - g_dir_close (dir); - - return (gchar **) g_ptr_array_free (files, FALSE); - -/* ERRORS */ -invalid_location: - { - g_set_error_literal (err, G_FILE_ERROR, G_FILE_ERROR_INVAL, - "No filename specified."); - return NULL; - } -not_utf8: - { - g_dir_close (dir); - g_set_error_literal (err, G_FILE_ERROR, G_FILE_ERROR_INVAL, - "Filename pattern must be UTF-8 on Windows."); - return NULL; - } -no_matches: - { - pattern_spec_free (pspec); - g_dir_close (dir); - g_set_error_literal (err, G_FILE_ERROR, G_FILE_ERROR_NOENT, - "Found no files matching the pattern."); - return NULL; - } -} - static gboolean gst_split_file_src_start (GstBaseSrc * basesrc) { @@ -335,7 +251,7 @@ } GST_OBJECT_UNLOCK (src); - files = gst_split_file_src_find_files (src, dirname, basename, &err); + files = gst_split_util_find_files (dirname, basename, &err); if (files == NULL || *files == NULL) goto no_files; @@ -452,24 +368,37 @@ return TRUE; } +static gint +gst_split_file_src_part_search (GstFilePart * part, guint64 * offset, + gpointer user_data) +{ + if (*offset > part->stop) + return -1; /* The target is after this part */ + else if (*offset < part->start) + return 1; /* The target is before this part */ + else + return 0; /* This is the target part */ +} + static gboolean gst_split_file_src_find_part_for_offset (GstSplitFileSrc * src, guint64 offset, guint * part_number) { + gboolean res = TRUE; GstFilePart *part; - guint i; - /* TODO: could use gst_util_array_binary_search() here */ - part = src->parts; - for (i = 0; i < src->num_parts; ++i) { - if (offset >= part->start && offset <= part->stop) { - *part_number = i; - return TRUE; - } - ++part; - } + part = + gst_util_array_binary_search (src->parts, src->num_parts, + sizeof (GstFilePart), + (GCompareDataFunc) gst_split_file_src_part_search, + GST_SEARCH_MODE_AFTER, &offset, NULL); + + if (part) + *part_number = part - src->parts; + else + res = FALSE; - return FALSE; + return res; } static GstFlowReturn diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxpartreader.c gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxpartreader.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxpartreader.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxpartreader.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,1349 @@ +/* GStreamer Split Demuxer bin that recombines files created by + * the splitmuxsink element. + * + * Copyright (C) <2014> Jan Schmidt + * + * 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 +#include "gstsplitmuxsrc.h" + +GST_DEBUG_CATEGORY_STATIC (splitmux_part_debug); +#define GST_CAT_DEFAULT splitmux_part_debug + +#define SPLITMUX_PART_LOCK(p) g_mutex_lock(&(p)->lock) +#define SPLITMUX_PART_UNLOCK(p) g_mutex_unlock(&(p)->lock) +#define SPLITMUX_PART_WAIT(p) g_cond_wait (&(p)->inactive_cond, &(p)->lock) +#define SPLITMUX_PART_BROADCAST(p) g_cond_broadcast (&(p)->inactive_cond) + +#define SPLITMUX_PART_TYPE_LOCK(p) g_mutex_lock(&(p)->type_lock) +#define SPLITMUX_PART_TYPE_UNLOCK(p) g_mutex_unlock(&(p)->type_lock) + +enum +{ + SIGNAL_PREPARED, + LAST_SIGNAL +}; + +static guint part_reader_signals[LAST_SIGNAL] = { 0 }; + +typedef struct _GstSplitMuxPartPad +{ + GstPad parent; + + /* Reader we belong to */ + GstSplitMuxPartReader *reader; + /* Output splitmuxsrc source pad */ + GstPad *target; + + GstDataQueue *queue; + + gboolean is_eos; + gboolean flushing; + gboolean seen_buffer; + + GstClockTime max_ts; + GstSegment segment; + + GstSegment orig_segment; + GstClockTime initial_ts_offset; +} GstSplitMuxPartPad; + +typedef struct _GstSplitMuxPartPadClass +{ + GstPadClass parent; +} GstSplitMuxPartPadClass; + +static GType gst_splitmux_part_pad_get_type (void); +#define SPLITMUX_TYPE_PART_PAD gst_splitmux_part_pad_get_type() +#define SPLITMUX_PART_PAD_CAST(p) ((GstSplitMuxPartPad *)(p)) + +static void splitmux_part_pad_constructed (GObject * pad); +static void splitmux_part_pad_finalize (GObject * pad); +static void handle_buffer_measuring (GstSplitMuxPartReader * reader, + GstSplitMuxPartPad * part_pad, GstBuffer * buf); + +static gboolean splitmux_data_queue_is_full_cb (GstDataQueue * queue, + guint visible, guint bytes, guint64 time, gpointer checkdata); +static void type_found (GstElement * typefind, guint probability, + GstCaps * caps, GstSplitMuxPartReader * reader); +static void check_if_pads_collected (GstSplitMuxPartReader * reader); + +/* Called with reader lock held */ +static gboolean +have_empty_queue (GstSplitMuxPartReader * reader) +{ + GList *cur; + + for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + if (part_pad->is_eos) { + GST_LOG_OBJECT (part_pad, "Pad is EOS"); + return TRUE; + } + if (gst_data_queue_is_empty (part_pad->queue)) { + GST_LOG_OBJECT (part_pad, "Queue is empty"); + return TRUE; + } + } + + return FALSE; +} + +/* Called with reader lock held */ +static gboolean +block_until_can_push (GstSplitMuxPartReader * reader) +{ + while (reader->running) { + if (reader->flushing) + goto out; + if (reader->active && have_empty_queue (reader)) + goto out; + + GST_LOG_OBJECT (reader, + "Waiting for activation or empty queue on reader %s", reader->path); + SPLITMUX_PART_WAIT (reader); + } + + GST_LOG_OBJECT (reader, "Done waiting on reader %s active %d flushing %d", + reader->path, reader->active, reader->flushing); +out: + return reader->active && !reader->flushing; +} + +static void +handle_buffer_measuring (GstSplitMuxPartReader * reader, + GstSplitMuxPartPad * part_pad, GstBuffer * buf) +{ + GstClockTime ts = GST_CLOCK_TIME_NONE; + GstClockTimeDiff offset; + + if (reader->prep_state == PART_STATE_PREPARING_COLLECT_STREAMS && + !part_pad->seen_buffer) { + /* If this is the first buffer on the pad in the collect_streams state, + * then calculate inital offset based on running time of this segment */ + part_pad->initial_ts_offset = + part_pad->orig_segment.start + part_pad->orig_segment.base - + part_pad->orig_segment.time; + GST_DEBUG_OBJECT (reader, + "Initial TS offset for pad %" GST_PTR_FORMAT " now %" GST_TIME_FORMAT, + part_pad, GST_TIME_ARGS (part_pad->initial_ts_offset)); + } + part_pad->seen_buffer = TRUE; + + /* Adjust buffer timestamps */ + offset = reader->start_offset + part_pad->segment.base; + offset -= part_pad->initial_ts_offset; + + /* Update the stored max duration on the pad, + * always preferring making DTS contiguous + * where possible */ + if (GST_BUFFER_DTS_IS_VALID (buf)) + ts = GST_BUFFER_DTS (buf) + offset; + else if (GST_BUFFER_PTS_IS_VALID (buf)) + ts = GST_BUFFER_PTS (buf) + offset; + + GST_DEBUG_OBJECT (reader, "Pad %" GST_PTR_FORMAT + " incoming PTS %" GST_TIME_FORMAT + " DTS %" GST_TIME_FORMAT " offset by %" GST_TIME_FORMAT + " to %" GST_TIME_FORMAT, part_pad, + GST_TIME_ARGS (GST_BUFFER_DTS (buf)), + GST_TIME_ARGS (GST_BUFFER_PTS (buf)), + GST_TIME_ARGS (offset), GST_TIME_ARGS (ts)); + + if (GST_CLOCK_TIME_IS_VALID (ts)) { + if (GST_BUFFER_DURATION_IS_VALID (buf)) + ts += GST_BUFFER_DURATION (buf); + + if (GST_CLOCK_TIME_IS_VALID (ts) && ts > part_pad->max_ts) { + part_pad->max_ts = ts; + GST_LOG_OBJECT (reader, + "pad %" GST_PTR_FORMAT " max TS now %" GST_TIME_FORMAT, part_pad, + GST_TIME_ARGS (part_pad->max_ts)); + } + } + /* Is it time to move to measuring state yet? */ + check_if_pads_collected (reader); +} + +static gboolean +splitmux_data_queue_is_full_cb (GstDataQueue * queue, + guint visible, guint bytes, guint64 time, gpointer checkdata) +{ + /* Arbitrary safety limit. If we hit it, playback is likely to stall */ + if (time > 20 * GST_SECOND) + return TRUE; + return FALSE; +} + +static void +splitmux_part_free_queue_item (GstDataQueueItem * item) +{ + gst_mini_object_unref (item->object); + g_slice_free (GstDataQueueItem, item); +} + +static GstFlowReturn +splitmux_part_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) +{ + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (pad); + GstSplitMuxPartReader *reader = part_pad->reader; + GstDataQueueItem *item; + GstClockTimeDiff offset; + + GST_LOG_OBJECT (reader, "Pad %" GST_PTR_FORMAT " %" GST_PTR_FORMAT, pad, buf); + SPLITMUX_PART_LOCK (reader); + + if (reader->prep_state == PART_STATE_PREPARING_COLLECT_STREAMS || + reader->prep_state == PART_STATE_PREPARING_MEASURE_STREAMS) { + handle_buffer_measuring (reader, part_pad, buf); + gst_buffer_unref (buf); + SPLITMUX_PART_UNLOCK (reader); + return GST_FLOW_OK; + } + + if (!block_until_can_push (reader)) { + /* Flushing */ + SPLITMUX_PART_UNLOCK (reader); + gst_buffer_unref (buf); + return GST_FLOW_FLUSHING; + } + + /* Adjust buffer timestamps */ + offset = reader->start_offset + part_pad->segment.base; + offset -= part_pad->initial_ts_offset; + + if (GST_BUFFER_PTS_IS_VALID (buf)) + GST_BUFFER_PTS (buf) += offset; + if (GST_BUFFER_DTS_IS_VALID (buf)) + GST_BUFFER_DTS (buf) += offset; + + /* We are active, and one queue is empty, place this buffer in + * the dataqueue */ + GST_LOG_OBJECT (reader, "Enqueueing buffer %" GST_PTR_FORMAT, buf); + item = g_slice_new (GstDataQueueItem); + item->destroy = (GDestroyNotify) splitmux_part_free_queue_item; + item->object = GST_MINI_OBJECT (buf); + item->size = gst_buffer_get_size (buf); + item->duration = GST_BUFFER_DURATION (buf); + if (item->duration == GST_CLOCK_TIME_NONE) + item->duration = 0; + item->visible = TRUE; + + gst_object_ref (part_pad); + + SPLITMUX_PART_UNLOCK (reader); + + if (!gst_data_queue_push (part_pad->queue, item)) { + splitmux_part_free_queue_item (item); + gst_object_unref (part_pad); + return GST_FLOW_FLUSHING; + } + + gst_object_unref (part_pad); + return GST_FLOW_OK; +} + +/* Called with splitmux part lock held */ +static gboolean +splitmux_part_is_eos_locked (GstSplitMuxPartReader * part) +{ + GList *cur; + for (cur = g_list_first (part->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + if (!part_pad->is_eos) + return FALSE; + } + + return TRUE; +} + +static gboolean +splitmux_part_is_prerolled_locked (GstSplitMuxPartReader * part) +{ + GList *cur; + GST_LOG_OBJECT (part, "Checking for preroll"); + for (cur = g_list_first (part->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + if (!part_pad->seen_buffer) { + GST_LOG_OBJECT (part, "Part pad %" GST_PTR_FORMAT " is not prerolled", + part_pad); + return FALSE; + } + } + GST_LOG_OBJECT (part, "Part is prerolled"); + return TRUE; +} + + +gboolean +gst_splitmux_part_is_eos (GstSplitMuxPartReader * reader) +{ + gboolean res; + + SPLITMUX_PART_LOCK (reader); + res = splitmux_part_is_eos_locked (reader); + SPLITMUX_PART_UNLOCK (reader); + + return res; +} + +/* Called with splitmux part lock held */ +static gboolean +splitmux_is_flushing (GstSplitMuxPartReader * reader) +{ + GList *cur; + for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + if (part_pad->flushing) + return TRUE; + } + + return FALSE; +} + +static gboolean +splitmux_part_pad_event (GstPad * pad, GstObject * parent, GstEvent * event) +{ + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (pad); + GstSplitMuxPartReader *reader = part_pad->reader; + gboolean ret = TRUE; + SplitMuxSrcPad *target; + GstDataQueueItem *item; + + SPLITMUX_PART_LOCK (reader); + + target = gst_object_ref (part_pad->target); + + GST_LOG_OBJECT (reader, "Pad %" GST_PTR_FORMAT " event %" GST_PTR_FORMAT, pad, + event); + + if (part_pad->flushing && GST_EVENT_TYPE (event) != GST_EVENT_FLUSH_STOP) + goto drop_event; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEGMENT:{ + GstSegment *seg = &part_pad->segment; + + GST_LOG_OBJECT (pad, "Received segment %" GST_PTR_FORMAT, event); + + gst_event_copy_segment (event, seg); + gst_event_copy_segment (event, &part_pad->orig_segment); + + if (seg->format != GST_FORMAT_TIME) + goto wrong_segment; + + /* Adjust segment */ + /* Adjust start/stop so the overall file is 0 + start_offset based */ + if (seg->stop != -1) { + seg->stop -= seg->start; + seg->stop += seg->time + reader->start_offset; + } + seg->start = seg->time + reader->start_offset; + seg->time += reader->start_offset; + seg->position += reader->start_offset; + + GST_LOG_OBJECT (pad, "Adjusted segment now %" GST_PTR_FORMAT, event); + + /* Replace event */ + gst_event_unref (event); + event = gst_event_new_segment (seg); + + if (reader->prep_state != PART_STATE_PREPARING_COLLECT_STREAMS + && reader->prep_state != PART_STATE_PREPARING_MEASURE_STREAMS) + break; /* Only do further stuff with segments during initial measuring */ + + /* Take the first segment from the first part */ + if (target->segment.format == GST_FORMAT_UNDEFINED) { + gst_segment_copy_into (seg, &target->segment); + GST_DEBUG_OBJECT (reader, + "Target pad segment now %" GST_SEGMENT_FORMAT, &target->segment); + } + + if (seg->stop != -1 && target->segment.stop != -1) { + GstClockTime stop = seg->base + seg->stop; + if (stop > target->segment.stop) { + target->segment.stop = stop; + GST_DEBUG_OBJECT (reader, + "Adjusting segment stop by %" GST_TIME_FORMAT + " output now %" GST_SEGMENT_FORMAT, + GST_TIME_ARGS (reader->start_offset), &target->segment); + } + } + GST_LOG_OBJECT (pad, "Forwarding segment %" GST_PTR_FORMAT, event); + break; + } + case GST_EVENT_EOS:{ + + GST_DEBUG_OBJECT (part_pad, + "State %u EOS event. MaxTS seen %" GST_TIME_FORMAT, + reader->prep_state, GST_TIME_ARGS (part_pad->max_ts)); + + if (reader->prep_state == PART_STATE_PREPARING_COLLECT_STREAMS || + reader->prep_state == PART_STATE_PREPARING_MEASURE_STREAMS) { + /* Mark this pad as EOS */ + part_pad->is_eos = TRUE; + if (splitmux_part_is_eos_locked (reader)) { + /* Finished measuring things, set state and tell the state change func + * so it can seek back to the start */ + GST_LOG_OBJECT (reader, + "EOS while measuring streams. Resetting for ready"); + reader->prep_state = PART_STATE_PREPARING_RESET_FOR_READY; + SPLITMUX_PART_BROADCAST (reader); + } + goto drop_event; + } + break; + } + case GST_EVENT_FLUSH_START: + reader->flushing = TRUE; + part_pad->flushing = TRUE; + GST_LOG_OBJECT (reader, "Pad %" GST_PTR_FORMAT " flushing dataqueue", + part_pad); + gst_data_queue_set_flushing (part_pad->queue, TRUE); + SPLITMUX_PART_BROADCAST (reader); + break; + case GST_EVENT_FLUSH_STOP:{ + gst_data_queue_set_flushing (part_pad->queue, FALSE); + gst_data_queue_flush (part_pad->queue); + part_pad->seen_buffer = FALSE; + part_pad->flushing = FALSE; + part_pad->is_eos = FALSE; + + reader->flushing = splitmux_is_flushing (reader); + GST_LOG_OBJECT (reader, + "%s pad %" GST_PTR_FORMAT " flush_stop. Overall flushing=%d", + reader->path, pad, reader->flushing); + SPLITMUX_PART_BROADCAST (reader); + break; + } + default: + break; + } + + /* Don't send events downstream while preparing */ + if (reader->prep_state != PART_STATE_READY) + goto drop_event; + + /* Don't pass flush events - those are done by the parent */ + if (GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_START || + GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) + goto drop_event; + + if (!block_until_can_push (reader)) { + SPLITMUX_PART_UNLOCK (reader); + gst_object_unref (target); + gst_event_unref (event); + return FALSE; + } + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_GAP:{ + /* FIXME: Drop initial gap (if any) in each segment, not all GAPs */ + goto drop_event; + } + default: + break; + } + + /* We are active, and one queue is empty, place this buffer in + * the dataqueue */ + gst_object_ref (part_pad->queue); + SPLITMUX_PART_UNLOCK (reader); + + GST_LOG_OBJECT (reader, "Enqueueing event %" GST_PTR_FORMAT, event); + item = g_slice_new (GstDataQueueItem); + item->destroy = (GDestroyNotify) splitmux_part_free_queue_item; + item->object = GST_MINI_OBJECT (event); + item->size = 0; + item->duration = 0; + if (item->duration == GST_CLOCK_TIME_NONE) + item->duration = 0; + item->visible = FALSE; + + if (!gst_data_queue_push (part_pad->queue, item)) { + splitmux_part_free_queue_item (item); + ret = FALSE; + } + + gst_object_unref (part_pad->queue); + gst_object_unref (target); + + return ret; +wrong_segment: + gst_event_unref (event); + gst_object_unref (target); + SPLITMUX_PART_UNLOCK (reader); + GST_ELEMENT_ERROR (reader, STREAM, FAILED, (NULL), + ("Received non-time segment - reader %s pad %" GST_PTR_FORMAT, + reader->path, pad)); + return FALSE; +drop_event: + GST_LOG_OBJECT (pad, "Dropping event %" GST_PTR_FORMAT + " from %" GST_PTR_FORMAT " on %" GST_PTR_FORMAT, event, pad, target); + gst_event_unref (event); + gst_object_unref (target); + SPLITMUX_PART_UNLOCK (reader); + return TRUE; +} + +static gboolean +splitmux_part_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) +{ + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (pad); + GstSplitMuxPartReader *reader = part_pad->reader; + GstPad *target; + gboolean ret = FALSE; + gboolean active; + + SPLITMUX_PART_LOCK (reader); + target = gst_object_ref (part_pad->target); + active = reader->active; + SPLITMUX_PART_UNLOCK (reader); + + if (active) { + GST_LOG_OBJECT (pad, "Forwarding query %" GST_PTR_FORMAT + " from %" GST_PTR_FORMAT " on %" GST_PTR_FORMAT, query, pad, target); + + ret = gst_pad_query (target, query); + } + + gst_object_unref (target); + + return ret; +} + +G_DEFINE_TYPE (GstSplitMuxPartPad, gst_splitmux_part_pad, GST_TYPE_PAD); + +static void +splitmux_part_pad_constructed (GObject * pad) +{ + gst_pad_set_chain_function (GST_PAD (pad), + GST_DEBUG_FUNCPTR (splitmux_part_pad_chain)); + gst_pad_set_event_function (GST_PAD (pad), + GST_DEBUG_FUNCPTR (splitmux_part_pad_event)); + gst_pad_set_query_function (GST_PAD (pad), + GST_DEBUG_FUNCPTR (splitmux_part_pad_query)); + + G_OBJECT_CLASS (gst_splitmux_part_pad_parent_class)->constructed (pad); +} + +static void +gst_splitmux_part_pad_class_init (GstSplitMuxPartPadClass * klass) +{ + GObjectClass *gobject_klass = (GObjectClass *) (klass); + + gobject_klass->constructed = splitmux_part_pad_constructed; + gobject_klass->finalize = splitmux_part_pad_finalize; +} + +static void +gst_splitmux_part_pad_init (GstSplitMuxPartPad * pad) +{ + pad->queue = gst_data_queue_new (splitmux_data_queue_is_full_cb, + NULL, NULL, pad); + gst_segment_init (&pad->segment, GST_FORMAT_UNDEFINED); + gst_segment_init (&pad->orig_segment, GST_FORMAT_UNDEFINED); +} + +static void +splitmux_part_pad_finalize (GObject * obj) +{ + GstSplitMuxPartPad *pad = (GstSplitMuxPartPad *) (obj); + + GST_DEBUG_OBJECT (obj, "finalize"); + gst_data_queue_set_flushing (pad->queue, TRUE); + gst_data_queue_flush (pad->queue); + gst_object_unref (GST_OBJECT_CAST (pad->queue)); + pad->queue = NULL; + + G_OBJECT_CLASS (gst_splitmux_part_pad_parent_class)->finalize (obj); +} + +static void +new_decoded_pad_added_cb (GstElement * element, GstPad * pad, + GstSplitMuxPartReader * part); +static void no_more_pads (GstElement * element, GstSplitMuxPartReader * reader); +static GstStateChangeReturn +gst_splitmux_part_reader_change_state (GstElement * element, + GstStateChange transition); +static gboolean gst_splitmux_part_reader_send_event (GstElement * element, + GstEvent * event); +static void gst_splitmux_part_reader_set_flushing_locked (GstSplitMuxPartReader + * part, gboolean flushing); +static void bus_handler (GstBin * bin, GstMessage * msg); +static void splitmux_part_reader_dispose (GObject * object); +static void splitmux_part_reader_finalize (GObject * object); +static void splitmux_part_reader_reset (GstSplitMuxPartReader * reader); + +#define gst_splitmux_part_reader_parent_class parent_class +G_DEFINE_TYPE (GstSplitMuxPartReader, gst_splitmux_part_reader, + GST_TYPE_PIPELINE); + +static void +gst_splitmux_part_reader_class_init (GstSplitMuxPartReaderClass * klass) +{ + GObjectClass *gobject_klass = (GObjectClass *) (klass); + GstElementClass *gstelement_class = (GstElementClass *) klass; + GstBinClass *gstbin_class = (GstBinClass *) klass; + + GST_DEBUG_CATEGORY_INIT (splitmux_part_debug, "splitmuxpartreader", 0, + "Split File Demuxing Source helper"); + + gobject_klass->dispose = splitmux_part_reader_dispose; + gobject_klass->finalize = splitmux_part_reader_finalize; + + part_reader_signals[SIGNAL_PREPARED] = + g_signal_new ("prepared", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstSplitMuxPartReaderClass, + prepared), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + gstelement_class->change_state = gst_splitmux_part_reader_change_state; + gstelement_class->send_event = gst_splitmux_part_reader_send_event; + + gstbin_class->handle_message = bus_handler; +} + +static void +gst_splitmux_part_reader_init (GstSplitMuxPartReader * reader) +{ + GstElement *typefind; + + reader->active = FALSE; + reader->duration = GST_CLOCK_TIME_NONE; + + g_cond_init (&reader->inactive_cond); + g_mutex_init (&reader->lock); + g_mutex_init (&reader->type_lock); + + /* FIXME: Create elements on a state change */ + reader->src = gst_element_factory_make ("filesrc", NULL); + if (reader->src == NULL) { + GST_ERROR_OBJECT (reader, "Failed to create filesrc element"); + return; + } + gst_bin_add (GST_BIN_CAST (reader), reader->src); + + typefind = gst_element_factory_make ("typefind", NULL); + if (!typefind) { + GST_ERROR_OBJECT (reader, + "Failed to create typefind element - check your installation"); + return; + } + + gst_bin_add (GST_BIN_CAST (reader), typefind); + reader->typefind = typefind; + + if (!gst_element_link_pads (reader->src, NULL, typefind, "sink")) { + GST_ERROR_OBJECT (reader, + "Failed to link typefind element - check your installation"); + return; + } + + g_signal_connect (reader->typefind, "have-type", G_CALLBACK (type_found), + reader); +} + +static void +splitmux_part_reader_dispose (GObject * object) +{ + GstSplitMuxPartReader *reader = (GstSplitMuxPartReader *) object; + + splitmux_part_reader_reset (reader); + + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +splitmux_part_reader_finalize (GObject * object) +{ + GstSplitMuxPartReader *reader = (GstSplitMuxPartReader *) object; + + g_mutex_clear (&reader->lock); + g_mutex_clear (&reader->type_lock); + + g_free (reader->path); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +splitmux_part_reader_reset (GstSplitMuxPartReader * reader) +{ + GList *cur; + + SPLITMUX_PART_LOCK (reader); + for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) { + GstPad *pad = GST_PAD_CAST (cur->data); + gst_pad_set_active (GST_PAD_CAST (pad), FALSE); + gst_object_unref (GST_OBJECT_CAST (pad)); + } + + g_list_free (reader->pads); + reader->pads = NULL; + SPLITMUX_PART_UNLOCK (reader); +} + +static GstSplitMuxPartPad * +gst_splitmux_part_reader_new_proxy_pad (GstSplitMuxPartReader * reader, + GstPad * target) +{ + GstSplitMuxPartPad *pad = g_object_new (SPLITMUX_TYPE_PART_PAD, + "name", GST_PAD_NAME (target), + "direction", GST_PAD_SINK, + NULL); + pad->target = target; + pad->reader = reader; + + gst_pad_set_active (GST_PAD_CAST (pad), TRUE); + + return pad; +} + +static void +new_decoded_pad_added_cb (GstElement * element, GstPad * pad, + GstSplitMuxPartReader * reader) +{ + GstPad *out_pad = NULL; + GstSplitMuxPartPad *proxy_pad; + GstCaps *caps; + GstPadLinkReturn link_ret; + + caps = gst_pad_get_current_caps (pad); + + GST_DEBUG_OBJECT (reader, "file %s new decoded pad %" GST_PTR_FORMAT + " caps %" GST_PTR_FORMAT, reader->path, pad, caps); + + gst_caps_unref (caps); + + /* Look up or create the output pad */ + if (reader->get_pad_cb) + out_pad = reader->get_pad_cb (reader, pad, reader->cb_data); + if (out_pad == NULL) + return; + + /* Create our proxy pad to interact with this new pad */ + proxy_pad = gst_splitmux_part_reader_new_proxy_pad (reader, out_pad); + GST_DEBUG_OBJECT (reader, + "created proxy pad %" GST_PTR_FORMAT " for target %" GST_PTR_FORMAT, + proxy_pad, out_pad); + + link_ret = gst_pad_link (pad, GST_PAD (proxy_pad)); + if (link_ret != GST_PAD_LINK_OK) { + gst_object_unref (proxy_pad); + GST_ELEMENT_ERROR (reader, STREAM, FAILED, (NULL), + ("Failed to link proxy pad for stream part %s pad %" GST_PTR_FORMAT + " ret %d", reader->path, pad, link_ret)); + return; + } + GST_DEBUG_OBJECT (reader, + "new decoded pad %" GST_PTR_FORMAT " linked to %" GST_PTR_FORMAT, + pad, proxy_pad); + + SPLITMUX_PART_LOCK (reader); + reader->pads = g_list_prepend (reader->pads, proxy_pad); + SPLITMUX_PART_UNLOCK (reader); +} + +static gboolean +gst_splitmux_part_reader_send_event (GstElement * element, GstEvent * event) +{ + GstSplitMuxPartReader *reader = (GstSplitMuxPartReader *) element; + gboolean ret = FALSE; + GstPad *pad = NULL; + + /* Send event to the first source pad we found */ + SPLITMUX_PART_LOCK (reader); + if (reader->pads) { + GstPad *proxy_pad = GST_PAD_CAST (reader->pads->data); + pad = gst_pad_get_peer (proxy_pad); + } + SPLITMUX_PART_UNLOCK (reader); + + if (pad) { + ret = gst_pad_send_event (pad, event); + gst_object_unref (pad); + } else { + gst_event_unref (event); + } + + return ret; +} + +/* Called with lock held. Seeks to an 'internal' time from 0 to length of this piece */ +static void +gst_splitmux_part_reader_seek_to_time_locked (GstSplitMuxPartReader * reader, + GstClockTime time) +{ + SPLITMUX_PART_UNLOCK (reader); + GST_DEBUG_OBJECT (reader, "Seeking to time %" GST_TIME_FORMAT, + GST_TIME_ARGS (time)); + gst_element_seek (GST_ELEMENT_CAST (reader), 1.0, GST_FORMAT_TIME, + GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, time, + GST_SEEK_TYPE_END, 0); + + SPLITMUX_PART_LOCK (reader); + + /* Wait for flush to finish, so old data is gone */ + while (reader->flushing) { + GST_LOG_OBJECT (reader, "%s Waiting for flush to finish", reader->path); + SPLITMUX_PART_WAIT (reader); + } +} + +/* Map the passed segment to 'internal' time from 0 to length of this piece and seek. Lock cannot be held */ +static gboolean +gst_splitmux_part_reader_seek_to_segment (GstSplitMuxPartReader * reader, + GstSegment * target_seg) +{ + GstSeekFlags flags; + GstClockTime start = 0, stop = GST_CLOCK_TIME_NONE; + + flags = target_seg->flags | GST_SEEK_FLAG_FLUSH; + + SPLITMUX_PART_LOCK (reader); + if (target_seg->start >= reader->start_offset) + start = target_seg->start - reader->start_offset; + /* If the segment stop is within this part, don't play to the end */ + if (target_seg->stop != -1 && + target_seg->stop < reader->start_offset + reader->duration) + stop = target_seg->stop - reader->start_offset; + + SPLITMUX_PART_UNLOCK (reader); + + GST_DEBUG_OBJECT (reader, + "Seeking rate %f format %d flags 0x%x start %" GST_TIME_FORMAT " stop %" + GST_TIME_FORMAT, target_seg->rate, target_seg->format, flags, + GST_TIME_ARGS (start), GST_TIME_ARGS (stop)); + + return gst_element_seek (GST_ELEMENT_CAST (reader), target_seg->rate, + target_seg->format, flags, GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_SET, + stop); +} + +/* Called with lock held */ +static void +gst_splitmux_part_reader_measure_streams (GstSplitMuxPartReader * reader) +{ + /* Trigger a flushing seek to near the end of the file and run each stream + * to EOS in order to find the smallest end timestamp to start the next + * file from + */ + if (GST_CLOCK_TIME_IS_VALID (reader->duration) + && reader->duration > GST_SECOND) { + GstClockTime seek_ts = reader->duration - (0.5 * GST_SECOND); + gst_splitmux_part_reader_seek_to_time_locked (reader, seek_ts); + } + + /* Wait for things to happen */ + while (reader->prep_state == PART_STATE_PREPARING_MEASURE_STREAMS) + SPLITMUX_PART_WAIT (reader); + + if (reader->prep_state == PART_STATE_PREPARING_RESET_FOR_READY) { + /* Fire the prepared signal and go to READY state */ + GST_DEBUG_OBJECT (reader, + "Stream measuring complete. File %s is now ready. Firing prepared signal", + reader->path); + reader->prep_state = PART_STATE_READY; + g_signal_emit (reader, part_reader_signals[SIGNAL_PREPARED], 0, NULL); + } +} + +static GstElement * +find_demuxer (GstCaps * caps) +{ + GList *factories = + gst_element_factory_list_get_elements (GST_ELEMENT_FACTORY_TYPE_DEMUXER, + GST_RANK_MARGINAL); + GList *compat_elements; + GstElement *e = NULL; + + if (factories == NULL) + return NULL; + + compat_elements = + gst_element_factory_list_filter (factories, caps, GST_PAD_SINK, TRUE); + + if (compat_elements) { + /* Just take the first (highest ranked) option */ + GstElementFactory *factory = + GST_ELEMENT_FACTORY_CAST (compat_elements->data); + e = gst_element_factory_create (factory, NULL); + gst_plugin_feature_list_free (compat_elements); + } + + if (factories) + gst_plugin_feature_list_free (factories); + + return e; +} + +static void +type_found (GstElement * typefind, guint probability, + GstCaps * caps, GstSplitMuxPartReader * reader) +{ + GstElement *demux; + + GST_INFO_OBJECT (reader, "Got type %" GST_PTR_FORMAT, caps); + + /* typefind found a type. Look for the demuxer to handle it */ + demux = reader->demux = find_demuxer (caps); + if (reader->demux == NULL) { + GST_ERROR_OBJECT (reader, "Failed to create demuxer element"); + return; + } + + gst_element_set_locked_state (demux, TRUE); + gst_bin_add (GST_BIN_CAST (reader), demux); + gst_element_link_pads (reader->typefind, "src", demux, NULL); + gst_element_sync_state_with_parent (reader->demux); + gst_element_set_locked_state (demux, FALSE); + + /* Connect to demux signals */ + g_signal_connect (demux, + "pad-added", G_CALLBACK (new_decoded_pad_added_cb), reader); + g_signal_connect (demux, "no-more-pads", G_CALLBACK (no_more_pads), reader); +} + +static void +check_if_pads_collected (GstSplitMuxPartReader * reader) +{ + if (reader->prep_state == PART_STATE_PREPARING_COLLECT_STREAMS) { + /* Check we have all pads and each pad has seen a buffer */ + if (reader->no_more_pads && splitmux_part_is_prerolled_locked (reader)) { + GST_DEBUG_OBJECT (reader, + "no more pads - file %s. Measuring stream length", reader->path); + reader->prep_state = PART_STATE_PREPARING_MEASURE_STREAMS; + SPLITMUX_PART_BROADCAST (reader); + } + } +} + +static void +no_more_pads (GstElement * element, GstSplitMuxPartReader * reader) +{ + GstClockTime duration = GST_CLOCK_TIME_NONE; + GList *cur; + /* Query the minimum duration of any pad in this piece and store it. + * FIXME: Only consider audio and video */ + SPLITMUX_PART_LOCK (reader); + for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) { + GstPad *target = GST_PAD_CAST (cur->data); + if (target) { + gint64 cur_duration; + if (gst_pad_peer_query_duration (target, GST_FORMAT_TIME, &cur_duration)) { + GST_INFO_OBJECT (reader, + "file %s pad %" GST_PTR_FORMAT " duration %" GST_TIME_FORMAT, + reader->path, target, GST_TIME_ARGS (cur_duration)); + if (cur_duration < duration) + duration = cur_duration; + } + } + } + GST_INFO_OBJECT (reader, "file %s duration %" GST_TIME_FORMAT, + reader->path, GST_TIME_ARGS (duration)); + reader->duration = (GstClockTime) duration; + + reader->no_more_pads = TRUE; + + check_if_pads_collected (reader); + SPLITMUX_PART_UNLOCK (reader); +} + +gboolean +gst_splitmux_part_reader_src_query (GstSplitMuxPartReader * part, + GstPad * src_pad, GstQuery * query) +{ + GstPad *target = NULL; + gboolean ret; + GList *cur; + + SPLITMUX_PART_LOCK (part); + /* Find the pad corresponding to the visible output target pad */ + for (cur = g_list_first (part->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + if (part_pad->target == src_pad) { + target = gst_object_ref (GST_OBJECT_CAST (part_pad)); + break; + } + } + SPLITMUX_PART_UNLOCK (part); + + if (target == NULL) + return FALSE; + + ret = gst_pad_peer_query (target, query); + gst_object_unref (GST_OBJECT_CAST (target)); + + if (ret == FALSE) + goto out; + + /* Post-massaging of queries */ + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_POSITION:{ + GstFormat fmt; + gint64 position; + + gst_query_parse_position (query, &fmt, &position); + if (fmt != GST_FORMAT_TIME) + return FALSE; + SPLITMUX_PART_LOCK (part); + position += part->start_offset; + GST_LOG_OBJECT (part, "Position %" GST_TIME_FORMAT, + GST_TIME_ARGS (position)); + SPLITMUX_PART_UNLOCK (part); + + gst_query_set_position (query, fmt, position); + break; + } + default: + break; + } + +out: + gst_object_unref (target); + return ret; +} + +static GstStateChangeReturn +gst_splitmux_part_reader_change_state (GstElement * element, + GstStateChange transition) +{ + GstStateChangeReturn ret; + GstSplitMuxPartReader *reader = (GstSplitMuxPartReader *) element; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY:{ + break; + } + case GST_STATE_CHANGE_READY_TO_PAUSED:{ + /* Hold the splitmux type lock until after the + * parent state change function has finished + * changing the states of things, and type finding can continue */ + SPLITMUX_PART_LOCK (reader); + g_object_set (reader->src, "location", reader->path, NULL); + SPLITMUX_PART_UNLOCK (reader); + SPLITMUX_PART_TYPE_LOCK (reader); + break; + } + case GST_STATE_CHANGE_READY_TO_NULL: + case GST_STATE_CHANGE_PAUSED_TO_READY: + SPLITMUX_PART_LOCK (reader); + gst_splitmux_part_reader_set_flushing_locked (reader, TRUE); + reader->running = FALSE; + SPLITMUX_PART_BROADCAST (reader); + SPLITMUX_PART_UNLOCK (reader); + break; + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + SPLITMUX_PART_LOCK (reader); + reader->active = FALSE; + gst_splitmux_part_reader_set_flushing_locked (reader, TRUE); + SPLITMUX_PART_BROADCAST (reader); + SPLITMUX_PART_UNLOCK (reader); + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (ret == GST_STATE_CHANGE_FAILURE) { + if (transition == GST_STATE_CHANGE_READY_TO_PAUSED) { + /* Make sure to release the lock we took above */ + SPLITMUX_PART_TYPE_UNLOCK (reader); + } + goto beach; + } + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + /* Sleep and wait until all streams have been collected, then do the seeks + * to measure the stream lengths. This took the type lock above, + * but it's OK to release it now and let typefinding happen... */ + SPLITMUX_PART_TYPE_UNLOCK (reader); + + SPLITMUX_PART_LOCK (reader); + reader->prep_state = PART_STATE_PREPARING_COLLECT_STREAMS; + gst_splitmux_part_reader_set_flushing_locked (reader, FALSE); + reader->running = TRUE; + + while (reader->prep_state == PART_STATE_PREPARING_COLLECT_STREAMS) { + GST_LOG_OBJECT (reader, "Waiting to collect all output streams"); + SPLITMUX_PART_WAIT (reader); + } + + if (reader->prep_state == PART_STATE_PREPARING_MEASURE_STREAMS || + reader->prep_state == PART_STATE_PREPARING_RESET_FOR_READY) { + gst_splitmux_part_reader_measure_streams (reader); + } else if (reader->prep_state == PART_STATE_FAILED) + ret = GST_STATE_CHANGE_FAILURE; + SPLITMUX_PART_UNLOCK (reader); + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + SPLITMUX_PART_LOCK (reader); + gst_splitmux_part_reader_set_flushing_locked (reader, FALSE); + reader->active = TRUE; + SPLITMUX_PART_BROADCAST (reader); + SPLITMUX_PART_UNLOCK (reader); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + reader->prep_state = PART_STATE_NULL; + splitmux_part_reader_reset (reader); + break; + default: + break; + } + +beach: + return ret; +} + +static gboolean +check_bus_messages (GstSplitMuxPartReader * part) +{ + gboolean ret = FALSE; + GstBus *bus; + GstMessage *m; + + bus = gst_element_get_bus (GST_ELEMENT_CAST (part)); + while ((m = gst_bus_pop (bus)) != NULL) { + if (GST_MESSAGE_TYPE (m) == GST_MESSAGE_ERROR) { + GST_LOG_OBJECT (part, "Got error message while preparing. Failing."); + gst_message_unref (m); + goto done; + } + gst_message_unref (m); + } + ret = TRUE; +done: + gst_object_unref (bus); + return ret; +} + +gboolean +gst_splitmux_part_reader_prepare (GstSplitMuxPartReader * part) +{ + GstStateChangeReturn ret; + + ret = gst_element_set_state (GST_ELEMENT_CAST (part), GST_STATE_PAUSED); + + if (ret != GST_STATE_CHANGE_SUCCESS) + return FALSE; + + return check_bus_messages (part); +} + +void +gst_splitmux_part_reader_unprepare (GstSplitMuxPartReader * part) +{ + gst_element_set_state (GST_ELEMENT_CAST (part), GST_STATE_NULL); +} + +void +gst_splitmux_part_reader_set_location (GstSplitMuxPartReader * reader, + const gchar * path) +{ + reader->path = g_strdup (path); +} + +gboolean +gst_splitmux_part_reader_activate (GstSplitMuxPartReader * reader, + GstSegment * seg) +{ + GST_DEBUG_OBJECT (reader, "Activating part reader"); + + if (!gst_splitmux_part_reader_seek_to_segment (reader, seg)) { + GST_ERROR_OBJECT (reader, "Failed to seek part to %" GST_SEGMENT_FORMAT, + seg); + return FALSE; + } + if (gst_element_set_state (GST_ELEMENT_CAST (reader), + GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { + GST_ERROR_OBJECT (reader, "Failed to set state to PLAYING"); + return FALSE; + } + return TRUE; +} + +void +gst_splitmux_part_reader_deactivate (GstSplitMuxPartReader * reader) +{ + GST_DEBUG_OBJECT (reader, "Deactivating reader"); + gst_element_set_state (GST_ELEMENT_CAST (reader), GST_STATE_PAUSED); +} + +void +gst_splitmux_part_reader_set_flushing_locked (GstSplitMuxPartReader * reader, + gboolean flushing) +{ + GList *cur; + + GST_LOG_OBJECT (reader, "%s dataqueues", + flushing ? "Flushing" : "Done flushing"); + for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + gst_data_queue_set_flushing (part_pad->queue, flushing); + if (flushing) + gst_data_queue_flush (part_pad->queue); + } +}; + +void +gst_splitmux_part_reader_set_callbacks (GstSplitMuxPartReader * reader, + gpointer cb_data, GstSplitMuxPartReaderPadCb get_pad_cb) +{ + reader->cb_data = cb_data; + reader->get_pad_cb = get_pad_cb; +} + +GstClockTime +gst_splitmux_part_reader_get_end_offset (GstSplitMuxPartReader * reader) +{ + GList *cur; + GstClockTime ret = GST_CLOCK_TIME_NONE; + + SPLITMUX_PART_LOCK (reader); + for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + if (part_pad->max_ts < ret) + ret = part_pad->max_ts; + } + + SPLITMUX_PART_UNLOCK (reader); + + return ret; +} + +void +gst_splitmux_part_reader_set_start_offset (GstSplitMuxPartReader * reader, + GstClockTime offset) +{ + SPLITMUX_PART_LOCK (reader); + reader->start_offset = offset; + GST_INFO_OBJECT (reader, "TS offset now %" GST_TIME_FORMAT, + GST_TIME_ARGS (offset)); + SPLITMUX_PART_UNLOCK (reader); +} + +GstClockTime +gst_splitmux_part_reader_get_start_offset (GstSplitMuxPartReader * reader) +{ + GstClockTime ret = GST_CLOCK_TIME_NONE; + + SPLITMUX_PART_LOCK (reader); + ret = reader->start_offset; + SPLITMUX_PART_UNLOCK (reader); + + return ret; +} + +GstClockTime +gst_splitmux_part_reader_get_duration (GstSplitMuxPartReader * reader) +{ + GstClockTime dur; + + SPLITMUX_PART_LOCK (reader); + dur = reader->duration; + SPLITMUX_PART_UNLOCK (reader); + + return dur; +} + +GstPad * +gst_splitmux_part_reader_lookup_pad (GstSplitMuxPartReader * reader, + GstPad * target) +{ + GstPad *result = NULL; + GList *cur; + + SPLITMUX_PART_LOCK (reader); + for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) { + GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data); + if (part_pad->target == target) { + result = (GstPad *) gst_object_ref (part_pad); + break; + } + } + SPLITMUX_PART_UNLOCK (reader); + + return result; +} + +GstFlowReturn +gst_splitmux_part_reader_pop (GstSplitMuxPartReader * reader, GstPad * pad, + GstDataQueueItem ** item) +{ + GstSplitMuxPartPad *part_pad = (GstSplitMuxPartPad *) (pad); + GstDataQueue *q; + GstFlowReturn ret; + + /* Get one item from the appropriate dataqueue */ + SPLITMUX_PART_LOCK (reader); + if (reader->prep_state == PART_STATE_FAILED) { + SPLITMUX_PART_UNLOCK (reader); + return GST_FLOW_ERROR; + } + + q = gst_object_ref (part_pad->queue); + + /* Have to drop the lock around pop, so we can be woken up for flush */ + SPLITMUX_PART_UNLOCK (reader); + if (!gst_data_queue_pop (q, item) || (*item == NULL)) { + ret = GST_FLOW_FLUSHING; + goto out; + } + + SPLITMUX_PART_LOCK (reader); + + SPLITMUX_PART_BROADCAST (reader); + if (GST_IS_EVENT ((*item)->object)) { + GstEvent *e = (GstEvent *) ((*item)->object); + /* Mark this pad as EOS */ + if (GST_EVENT_TYPE (e) == GST_EVENT_EOS) + part_pad->is_eos = TRUE; + } + + SPLITMUX_PART_UNLOCK (reader); + + ret = GST_FLOW_OK; +out: + gst_object_unref (q); + return ret; +} + +static void +bus_handler (GstBin * bin, GstMessage * message) +{ + GstSplitMuxPartReader *reader = (GstSplitMuxPartReader *) bin; + + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ERROR: + /* Make sure to set the state to failed and wake up the listener + * on error */ + SPLITMUX_PART_LOCK (reader); + reader->prep_state = PART_STATE_FAILED; + SPLITMUX_PART_BROADCAST (reader); + SPLITMUX_PART_UNLOCK (reader); + break; + default: + break; + } + + GST_BIN_CLASS (parent_class)->handle_message (bin, message); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxpartreader.h gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxpartreader.h --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxpartreader.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxpartreader.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,118 @@ +/* GStreamer Split Muxed File Source - Part reader + * Copyright (C) 2014 Jan Schmidt + * + * 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_SPLITMUX_PART_READER_H__ +#define __GST_SPLITMUX_PART_READER_H__ + +#include +#include + +G_BEGIN_DECLS + +#define GST_TYPE_SPLITMUX_PART_READER \ + (gst_splitmux_part_reader_get_type()) +#define GST_SPLITMUX_PART_READER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPLITMUX_PART_READER,GstSplitMuxSrc)) +#define GST_SPLITMUX_PART_READER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPLITMUX_PART_READER,GstSplitMuxSrcClass)) +#define GST_IS_SPLITMUX_PART_READER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPLITMUX_PART_READER)) +#define GST_IS_SPLITMUX_PART_READER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPLITMUX_PART_READER)) + +typedef struct _GstSplitMuxPartReader GstSplitMuxPartReader; +typedef struct _GstSplitMuxPartReaderClass GstSplitMuxPartReaderClass; +typedef struct _SplitMuxSrcPad SplitMuxSrcPad; +typedef struct _SplitMuxSrcPadClass SplitMuxSrcPadClass; + +typedef enum +{ + PART_STATE_NULL, + PART_STATE_PREPARING_COLLECT_STREAMS, + PART_STATE_PREPARING_MEASURE_STREAMS, + PART_STATE_PREPARING_RESET_FOR_READY, + PART_STATE_READY, + PART_STATE_FAILED, +} GstSplitMuxPartState; + +typedef GstPad *(*GstSplitMuxPartReaderPadCb)(GstSplitMuxPartReader *reader, GstPad *src_pad, gpointer cb_data); + +struct _GstSplitMuxPartReader +{ + GstPipeline parent; + + GstSplitMuxPartState prep_state; + + gchar *path; + + GstElement *src; + GstElement *typefind; + GstElement *demux; + + gboolean active; + gboolean running; + gboolean prepared; + gboolean flushing; + gboolean no_more_pads; + + GstClockTime duration; + GstClockTime start_offset; + + GList *pads; + + GCond inactive_cond; + GMutex lock; + GMutex type_lock; + + GstSplitMuxPartReaderPadCb get_pad_cb; + gpointer cb_data; +}; + +struct _GstSplitMuxPartReaderClass +{ + GstPipelineClass parent_class; + + void (*prepared) (GstSplitMuxPartReader *reader); + void (*end_of_part) (GstSplitMuxPartReader *reader); +}; + +GType gst_splitmux_part_reader_get_type (void); + +void gst_splitmux_part_reader_set_callbacks (GstSplitMuxPartReader *reader, + gpointer cb_data, GstSplitMuxPartReaderPadCb get_pad_cb); +gboolean gst_splitmux_part_reader_prepare (GstSplitMuxPartReader *part); +void gst_splitmux_part_reader_unprepare (GstSplitMuxPartReader *part); +void gst_splitmux_part_reader_set_location (GstSplitMuxPartReader *reader, + const gchar *path); +gboolean gst_splitmux_part_is_eos (GstSplitMuxPartReader *reader); + +gboolean gst_splitmux_part_reader_activate (GstSplitMuxPartReader *part, GstSegment *seg); +void gst_splitmux_part_reader_deactivate (GstSplitMuxPartReader *part); + +gboolean gst_splitmux_part_reader_src_query (GstSplitMuxPartReader *part, GstPad *src_pad, GstQuery * query); +void gst_splitmux_part_reader_set_start_offset (GstSplitMuxPartReader *part, GstClockTime offset); +GstClockTime gst_splitmux_part_reader_get_start_offset (GstSplitMuxPartReader *part); +GstClockTime gst_splitmux_part_reader_get_end_offset (GstSplitMuxPartReader *part); +GstClockTime gst_splitmux_part_reader_get_duration (GstSplitMuxPartReader * reader); + +GstPad *gst_splitmux_part_reader_lookup_pad (GstSplitMuxPartReader *reader, GstPad *target); +GstFlowReturn gst_splitmux_part_reader_pop (GstSplitMuxPartReader *reader, GstPad *part_pad, GstDataQueueItem ** item); + +G_END_DECLS + +#endif diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsink.c gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsink.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsink.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsink.c 2015-10-30 12:10:05.000000000 +0000 @@ -0,0 +1,1588 @@ +/* GStreamer Muxer bin that splits output stream by size/time + * Copyright (C) <2014> Jan Schmidt + * + * 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-splitmuxsink + * @short_description: Muxer wrapper for splitting output stream by size or time + * + * This element wraps a muxer and a sink, and starts a new file when the mux + * contents are about to cross a threshold of maximum size of maximum time, + * splitting at video keyframe boundaries. Exactly one input video stream + * can be muxed, with as many accompanying audio and subtitle streams as + * desired. + * + * By default, it uses mp4mux and filesink, but they can be changed via + * the 'muxer' and 'sink' properties. + * + * The minimum file size is 1 GOP, however - so limits may be overrun if the + * distance between any 2 keyframes is larger than the limits. + * + * If a video stream is available, the splitting process is driven by the video + * stream contents, and the video stream must contain closed GOPs for the output + * file parts to be played individually correctly. In the absence of a video + * stream, the first available stream is used as reference for synchronization. + * + * + * Example pipelines + * |[ + * gst-launch-1.0 -e v4l2src num-buffers=500 ! video/x-raw,width=320,height=240 ! videoconvert ! queue ! timeoverlay ! x264enc key-int-max=10 ! h264parse ! splitmuxsink location=video%02d.mov max-size-time=10000000000 max-size-bytes=1000000 + * ]| + * Records a video stream captured from a v4l2 device and muxes it into + * ISO mp4 files, splitting as needed to limit size/duration to 10 seconds + * and 1MB maximum size. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "gstsplitmuxsink.h" + +GST_DEBUG_CATEGORY_STATIC (splitmux_debug); +#define GST_CAT_DEFAULT splitmux_debug + +#define GST_SPLITMUX_LOCK(s) g_mutex_lock(&(s)->lock) +#define GST_SPLITMUX_UNLOCK(s) g_mutex_unlock(&(s)->lock) +#define GST_SPLITMUX_WAIT(s) g_cond_wait (&(s)->data_cond, &(s)->lock) +#define GST_SPLITMUX_BROADCAST(s) g_cond_broadcast (&(s)->data_cond) + +enum +{ + PROP_0, + PROP_LOCATION, + PROP_MAX_SIZE_TIME, + PROP_MAX_SIZE_BYTES, + PROP_MUXER_OVERHEAD, + PROP_MUXER, + PROP_SINK +}; + +#define DEFAULT_MAX_SIZE_TIME 0 +#define DEFAULT_MAX_SIZE_BYTES 0 +#define DEFAULT_MUXER_OVERHEAD 0.02 +#define DEFAULT_MUXER "mp4mux" +#define DEFAULT_SINK "filesink" + +enum +{ + SIGNAL_FORMAT_LOCATION, + SIGNAL_LAST +}; + +static guint signals[SIGNAL_LAST]; + +static GstStaticPadTemplate video_sink_template = +GST_STATIC_PAD_TEMPLATE ("video", + GST_PAD_SINK, + GST_PAD_REQUEST, + GST_STATIC_CAPS_ANY); +static GstStaticPadTemplate audio_sink_template = +GST_STATIC_PAD_TEMPLATE ("audio_%u", + GST_PAD_SINK, + GST_PAD_REQUEST, + GST_STATIC_CAPS_ANY); +static GstStaticPadTemplate subtitle_sink_template = +GST_STATIC_PAD_TEMPLATE ("subtitle_%u", + GST_PAD_SINK, + GST_PAD_REQUEST, + GST_STATIC_CAPS_ANY); + +static GQuark PAD_CONTEXT; + +static void +_do_init (void) +{ + PAD_CONTEXT = g_quark_from_static_string ("pad-context"); +} + +#define gst_splitmux_sink_parent_class parent_class +G_DEFINE_TYPE_EXTENDED (GstSplitMuxSink, gst_splitmux_sink, GST_TYPE_BIN, 0, + _do_init ()); + +static gboolean create_elements (GstSplitMuxSink * splitmux); +static gboolean create_sink (GstSplitMuxSink * splitmux); +static void gst_splitmux_sink_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_splitmux_sink_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); +static void gst_splitmux_sink_dispose (GObject * object); +static void gst_splitmux_sink_finalize (GObject * object); + +static GstPad *gst_splitmux_sink_request_new_pad (GstElement * element, + GstPadTemplate * templ, const gchar * name, const GstCaps * caps); +static void gst_splitmux_sink_release_pad (GstElement * element, GstPad * pad); + +static GstStateChangeReturn gst_splitmux_sink_change_state (GstElement * + element, GstStateChange transition); + +static void bus_handler (GstBin * bin, GstMessage * msg); +static void set_next_filename (GstSplitMuxSink * splitmux); +static void start_next_fragment (GstSplitMuxSink * splitmux); +static void check_queue_length (GstSplitMuxSink * splitmux, MqStreamCtx * ctx); +static void mq_stream_ctx_unref (MqStreamCtx * ctx); + +static MqStreamBuf * +mq_stream_buf_new (void) +{ + return g_slice_new0 (MqStreamBuf); +} + +static void +mq_stream_buf_free (MqStreamBuf * data) +{ + g_slice_free (MqStreamBuf, data); +} + +static void +gst_splitmux_sink_class_init (GstSplitMuxSinkClass * klass) +{ + GObjectClass *gobject_class = (GObjectClass *) klass; + GstElementClass *gstelement_class = (GstElementClass *) klass; + GstBinClass *gstbin_class = (GstBinClass *) klass; + + gobject_class->set_property = gst_splitmux_sink_set_property; + gobject_class->get_property = gst_splitmux_sink_get_property; + gobject_class->dispose = gst_splitmux_sink_dispose; + gobject_class->finalize = gst_splitmux_sink_finalize; + + gst_element_class_set_static_metadata (gstelement_class, + "Split Muxing Bin", "Generic/Bin/Muxer", + "Convenience bin that muxes incoming streams into multiple time/size limited files", + "Jan Schmidt "); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&video_sink_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&audio_sink_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&subtitle_sink_template)); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_splitmux_sink_change_state); + gstelement_class->request_new_pad = + GST_DEBUG_FUNCPTR (gst_splitmux_sink_request_new_pad); + gstelement_class->release_pad = + GST_DEBUG_FUNCPTR (gst_splitmux_sink_release_pad); + + gstbin_class->handle_message = bus_handler; + + g_object_class_install_property (gobject_class, PROP_LOCATION, + g_param_spec_string ("location", "File Output Pattern", + "Format string pattern for the location of the files to write (e.g. video%05d.mp4)", + NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_MUXER_OVERHEAD, + g_param_spec_double ("mux-overhead", "Muxing Overhead", + "Extra size overhead of muxing (0.02 = 2%)", 0.0, 1.0, + DEFAULT_MUXER_OVERHEAD, + G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_SIZE_TIME, + g_param_spec_uint64 ("max-size-time", "Max. size (ns)", + "Max. amount of time per file (in ns, 0=disable)", 0, G_MAXUINT64, + DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_MAX_SIZE_BYTES, + g_param_spec_uint64 ("max-size-bytes", "Max. size bytes", + "Max. amount of data per file (in bytes, 0=disable)", 0, G_MAXUINT64, + DEFAULT_MAX_SIZE_BYTES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MUXER, + g_param_spec_object ("muxer", "Muxer", + "The muxer element to use (NULL = default mp4mux)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_SINK, + g_param_spec_object ("sink", "Sink", + "The sink element (or element chain) to use (NULL = default filesink)", + GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstSplitMuxSink::format-location: + * @splitmux: the #GstSplitMuxSink + * @fragment_id: the sequence number of the file to be created + * + * Returns: the location to be used for the next output file + */ + signals[SIGNAL_FORMAT_LOCATION] = + g_signal_new ("format-location", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_STRING, 1, G_TYPE_UINT); +} + +static void +gst_splitmux_sink_init (GstSplitMuxSink * splitmux) +{ + g_mutex_init (&splitmux->lock); + g_cond_init (&splitmux->data_cond); + + splitmux->mux_overhead = DEFAULT_MUXER_OVERHEAD; + splitmux->threshold_time = DEFAULT_MAX_SIZE_TIME; + splitmux->threshold_bytes = DEFAULT_MAX_SIZE_BYTES; + + GST_OBJECT_FLAG_SET (splitmux, GST_ELEMENT_FLAG_SINK); +} + +static void +gst_splitmux_reset (GstSplitMuxSink * splitmux) +{ + if (splitmux->mq) + gst_bin_remove (GST_BIN (splitmux), splitmux->mq); + if (splitmux->muxer) + gst_bin_remove (GST_BIN (splitmux), splitmux->muxer); + if (splitmux->active_sink) + gst_bin_remove (GST_BIN (splitmux), splitmux->active_sink); + + splitmux->sink = splitmux->active_sink = splitmux->muxer = splitmux->mq = + NULL; +} + +static void +gst_splitmux_sink_dispose (GObject * object) +{ + GstSplitMuxSink *splitmux = GST_SPLITMUX_SINK (object); + + G_OBJECT_CLASS (parent_class)->dispose (object); + + /* Calling parent dispose invalidates all child pointers */ + splitmux->sink = splitmux->active_sink = splitmux->muxer = splitmux->mq = + NULL; +} + +static void +gst_splitmux_sink_finalize (GObject * object) +{ + GstSplitMuxSink *splitmux = GST_SPLITMUX_SINK (object); + g_cond_clear (&splitmux->data_cond); + g_mutex_clear (&splitmux->lock); + if (splitmux->provided_sink) + gst_object_unref (splitmux->provided_sink); + if (splitmux->provided_muxer) + gst_object_unref (splitmux->provided_muxer); + + g_free (splitmux->location); + + /* Make sure to free any un-released contexts */ + g_list_foreach (splitmux->contexts, (GFunc) mq_stream_ctx_unref, NULL); + g_list_free (splitmux->contexts); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gst_splitmux_sink_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstSplitMuxSink *splitmux = GST_SPLITMUX_SINK (object); + + switch (prop_id) { + case PROP_LOCATION:{ + GST_OBJECT_LOCK (splitmux); + g_free (splitmux->location); + splitmux->location = g_value_dup_string (value); + GST_OBJECT_UNLOCK (splitmux); + break; + } + case PROP_MAX_SIZE_BYTES: + GST_OBJECT_LOCK (splitmux); + splitmux->threshold_bytes = g_value_get_uint64 (value); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_MAX_SIZE_TIME: + GST_OBJECT_LOCK (splitmux); + splitmux->threshold_time = g_value_get_uint64 (value); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_MUXER_OVERHEAD: + GST_OBJECT_LOCK (splitmux); + splitmux->mux_overhead = g_value_get_double (value); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_SINK: + GST_OBJECT_LOCK (splitmux); + if (splitmux->provided_sink) + gst_object_unref (splitmux->provided_sink); + splitmux->provided_sink = g_value_dup_object (value); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_MUXER: + GST_OBJECT_LOCK (splitmux); + if (splitmux->provided_muxer) + gst_object_unref (splitmux->provided_muxer); + splitmux->provided_muxer = g_value_dup_object (value); + GST_OBJECT_UNLOCK (splitmux); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_splitmux_sink_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstSplitMuxSink *splitmux = GST_SPLITMUX_SINK (object); + + switch (prop_id) { + case PROP_LOCATION: + GST_OBJECT_LOCK (splitmux); + g_value_set_string (value, splitmux->location); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_MAX_SIZE_BYTES: + GST_OBJECT_LOCK (splitmux); + g_value_set_uint64 (value, splitmux->threshold_bytes); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_MAX_SIZE_TIME: + GST_OBJECT_LOCK (splitmux); + g_value_set_uint64 (value, splitmux->threshold_time); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_MUXER_OVERHEAD: + GST_OBJECT_LOCK (splitmux); + g_value_set_double (value, splitmux->mux_overhead); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_SINK: + GST_OBJECT_LOCK (splitmux); + g_value_set_object (value, splitmux->provided_sink); + GST_OBJECT_UNLOCK (splitmux); + break; + case PROP_MUXER: + GST_OBJECT_LOCK (splitmux); + g_value_set_object (value, splitmux->provided_muxer); + GST_OBJECT_UNLOCK (splitmux); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static GstPad * +mq_sink_to_src (GstElement * mq, GstPad * sink_pad) +{ + gchar *tmp, *sinkname, *srcname; + GstPad *mq_src; + + sinkname = gst_pad_get_name (sink_pad); + tmp = sinkname + 5; + srcname = g_strdup_printf ("src_%s", tmp); + + mq_src = gst_element_get_static_pad (mq, srcname); + + g_free (sinkname); + g_free (srcname); + + return mq_src; +} + +static gboolean +get_pads_from_mq (GstSplitMuxSink * splitmux, GstPad ** sink_pad, + GstPad ** src_pad) +{ + GstPad *mq_sink; + GstPad *mq_src; + + /* Request a pad from multiqueue, then connect this one, then + * discover the corresponding output pad and return both */ + mq_sink = gst_element_get_request_pad (splitmux->mq, "sink_%u"); + if (mq_sink == NULL) + return FALSE; + + mq_src = mq_sink_to_src (splitmux->mq, mq_sink); + if (mq_src == NULL) + goto fail; + + *sink_pad = mq_sink; + *src_pad = mq_src; + + return TRUE; + +fail: + gst_element_release_request_pad (splitmux->mq, mq_sink); + return FALSE; +} + +static MqStreamCtx * +mq_stream_ctx_new (GstSplitMuxSink * splitmux) +{ + MqStreamCtx *ctx; + + ctx = g_new0 (MqStreamCtx, 1); + g_atomic_int_set (&ctx->refcount, 1); + ctx->splitmux = splitmux; + gst_segment_init (&ctx->in_segment, GST_FORMAT_UNDEFINED); + gst_segment_init (&ctx->out_segment, GST_FORMAT_UNDEFINED); + ctx->in_running_time = ctx->out_running_time = 0; + g_queue_init (&ctx->queued_bufs); + return ctx; +} + +static void +mq_stream_ctx_free (MqStreamCtx * ctx) +{ + g_queue_foreach (&ctx->queued_bufs, (GFunc) mq_stream_buf_free, NULL); + g_queue_clear (&ctx->queued_bufs); + g_free (ctx); +} + +static void +mq_stream_ctx_unref (MqStreamCtx * ctx) +{ + if (g_atomic_int_dec_and_test (&ctx->refcount)) + mq_stream_ctx_free (ctx); +} + +static void +mq_stream_ctx_ref (MqStreamCtx * ctx) +{ + g_atomic_int_inc (&ctx->refcount); +} + +static void +_pad_block_destroy_sink_notify (MqStreamCtx * ctx) +{ + ctx->sink_pad_block_id = 0; + mq_stream_ctx_unref (ctx); +} + +static void +_pad_block_destroy_src_notify (MqStreamCtx * ctx) +{ + ctx->src_pad_block_id = 0; + mq_stream_ctx_unref (ctx); +} + +static void +send_fragment_opened_closed_msg (GstSplitMuxSink * splitmux, gboolean opened) +{ + gchar *location = NULL; + GstMessage *msg; + const gchar *msg_name = opened ? + "splitmuxsink-fragment-opened" : "splitmuxsink-fragment-closed"; + + g_object_get (splitmux->sink, "location", &location, NULL); + + msg = gst_message_new_element (GST_OBJECT (splitmux), + gst_structure_new (msg_name, + "location", G_TYPE_STRING, location, + "running-time", GST_TYPE_CLOCK_TIME, + splitmux->reference_ctx->out_running_time, NULL)); + gst_element_post_message (GST_ELEMENT_CAST (splitmux), msg); + + g_free (location); +} + +/* Called with lock held, drops the lock to send EOS to the + * pad + */ +static void +send_eos (GstSplitMuxSink * splitmux, MqStreamCtx * ctx) +{ + GstEvent *eos; + GstPad *pad; + + eos = gst_event_new_eos (); + pad = gst_pad_get_peer (ctx->srcpad); + + ctx->out_eos = TRUE; + + GST_INFO_OBJECT (splitmux, "Sending EOS on %" GST_PTR_FORMAT, pad); + GST_SPLITMUX_UNLOCK (splitmux); + gst_pad_send_event (pad, eos); + GST_SPLITMUX_LOCK (splitmux); + + gst_object_unref (pad); +} + +/* Called with splitmux lock held to check if this output + * context needs to sleep to wait for the release of the + * next GOP, or to send EOS to close out the current file + */ +static void +complete_or_wait_on_out (GstSplitMuxSink * splitmux, MqStreamCtx * ctx) +{ + do { + + GST_LOG_OBJECT (ctx->srcpad, + "Checking running time %" GST_TIME_FORMAT " against max %" + GST_TIME_FORMAT, GST_TIME_ARGS (ctx->out_running_time), + GST_TIME_ARGS (splitmux->max_out_running_time)); + + if (splitmux->max_out_running_time == GST_CLOCK_TIME_NONE || + ctx->out_running_time < splitmux->max_out_running_time) { + splitmux->have_muxed_something = TRUE; + return; + } + + if (ctx->flushing || splitmux->state == SPLITMUX_STATE_STOPPED) + return; + + if (splitmux->state == SPLITMUX_STATE_ENDING_FILE) { + if (ctx->out_eos == FALSE) { + send_eos (splitmux, ctx); + continue; + } + } else if (splitmux->state == SPLITMUX_STATE_START_NEXT_FRAGMENT) { + start_next_fragment (splitmux); + continue; + } + + GST_INFO_OBJECT (ctx->srcpad, + "Sleeping for running time %" + GST_TIME_FORMAT " (max %" GST_TIME_FORMAT ")", + GST_TIME_ARGS (ctx->out_running_time), + GST_TIME_ARGS (splitmux->max_out_running_time)); + ctx->out_blocked = TRUE; + /* Expand the mq if needed before sleeping */ + check_queue_length (splitmux, ctx); + GST_SPLITMUX_WAIT (splitmux); + ctx->out_blocked = FALSE; + GST_INFO_OBJECT (ctx->srcpad, + "Woken for new max running time %" GST_TIME_FORMAT, + GST_TIME_ARGS (splitmux->max_out_running_time)); + } while (1); +} + +static GstPadProbeReturn +handle_mq_output (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx) +{ + GstSplitMuxSink *splitmux = ctx->splitmux; + MqStreamBuf *buf_info = NULL; + + GST_LOG_OBJECT (pad, "Fired probe type 0x%x\n", info->type); + + /* FIXME: Handle buffer lists, until then make it clear they won't work */ + if (info->type & GST_PAD_PROBE_TYPE_BUFFER_LIST) { + g_warning ("Buffer list handling not implemented"); + return GST_PAD_PROBE_DROP; + } + if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) { + GstEvent *event = gst_pad_probe_info_get_event (info); + + GST_LOG_OBJECT (pad, "Event %" GST_PTR_FORMAT, event); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEGMENT: + gst_event_copy_segment (event, &ctx->out_segment); + break; + case GST_EVENT_FLUSH_STOP: + GST_SPLITMUX_LOCK (splitmux); + gst_segment_init (&ctx->out_segment, GST_FORMAT_UNDEFINED); + g_queue_foreach (&ctx->queued_bufs, (GFunc) mq_stream_buf_free, NULL); + g_queue_clear (&ctx->queued_bufs); + ctx->flushing = FALSE; + GST_SPLITMUX_UNLOCK (splitmux); + break; + case GST_EVENT_FLUSH_START: + GST_SPLITMUX_LOCK (splitmux); + GST_LOG_OBJECT (pad, "Flush start"); + ctx->flushing = TRUE; + GST_SPLITMUX_BROADCAST (splitmux); + GST_SPLITMUX_UNLOCK (splitmux); + break; + case GST_EVENT_EOS: + GST_SPLITMUX_LOCK (splitmux); + if (splitmux->state == SPLITMUX_STATE_STOPPED) + goto beach; + ctx->out_eos = TRUE; + GST_SPLITMUX_UNLOCK (splitmux); + break; + case GST_EVENT_GAP:{ + GstClockTime gap_ts; + + gst_event_parse_gap (event, &gap_ts, NULL); + if (gap_ts == GST_CLOCK_TIME_NONE) + break; + + GST_SPLITMUX_LOCK (splitmux); + + gap_ts = gst_segment_to_running_time (&ctx->out_segment, + GST_FORMAT_TIME, gap_ts); + + GST_LOG_OBJECT (pad, "Have GAP w/ ts %" GST_TIME_FORMAT, + GST_TIME_ARGS (gap_ts)); + + if (splitmux->state == SPLITMUX_STATE_STOPPED) + goto beach; + ctx->out_running_time = gap_ts; + complete_or_wait_on_out (splitmux, ctx); + GST_SPLITMUX_UNLOCK (splitmux); + break; + } + default: + break; + } + return GST_PAD_PROBE_PASS; + } + + /* Allow everything through until the configured next stopping point */ + GST_SPLITMUX_LOCK (splitmux); + + buf_info = g_queue_pop_tail (&ctx->queued_bufs); + if (buf_info == NULL) + /* Can only happen due to a poorly timed flush */ + goto beach; + + /* If we have popped a keyframe, decrement the queued_gop count */ + if (buf_info->keyframe && splitmux->queued_gops > 0) + splitmux->queued_gops--; + + ctx->out_running_time = buf_info->run_ts; + + GST_LOG_OBJECT (splitmux, + "Pad %" GST_PTR_FORMAT " buffer with TS %" GST_TIME_FORMAT + " size %" G_GSIZE_FORMAT, + pad, GST_TIME_ARGS (ctx->out_running_time), buf_info->buf_size); + + if (splitmux->opening_first_fragment) { + send_fragment_opened_closed_msg (splitmux, TRUE); + splitmux->opening_first_fragment = FALSE; + } + + complete_or_wait_on_out (splitmux, ctx); + + if (splitmux->muxed_out_time == GST_CLOCK_TIME_NONE || + splitmux->muxed_out_time < buf_info->run_ts) + splitmux->muxed_out_time = buf_info->run_ts; + + splitmux->muxed_out_bytes += buf_info->buf_size; + +#ifndef GST_DISABLE_GST_DEBUG + { + GstBuffer *buf = gst_pad_probe_info_get_buffer (info); + GST_LOG_OBJECT (pad, "Returning to pass buffer %" GST_PTR_FORMAT + " run ts %" GST_TIME_FORMAT, buf, + GST_TIME_ARGS (ctx->out_running_time)); + } +#endif + + GST_SPLITMUX_UNLOCK (splitmux); + + mq_stream_buf_free (buf_info); + + return GST_PAD_PROBE_PASS; + +beach: + GST_SPLITMUX_UNLOCK (splitmux); + return GST_PAD_PROBE_DROP; +} + +static gboolean +resend_sticky (GstPad * pad, GstEvent ** event, GstPad * peer) +{ + return gst_pad_send_event (peer, gst_event_ref (*event)); +} + +static void +restart_context (MqStreamCtx * ctx, GstSplitMuxSink * splitmux) +{ + GstPad *peer = gst_pad_get_peer (ctx->srcpad); + + gst_pad_sticky_events_foreach (ctx->srcpad, + (GstPadStickyEventsForeachFunction) (resend_sticky), peer); + + /* Clear EOS flag */ + ctx->out_eos = FALSE; + + gst_object_unref (peer); +} + +/* Called with lock held when a fragment + * reaches EOS and it is time to restart + * a new fragment + */ +static void +start_next_fragment (GstSplitMuxSink * splitmux) +{ + /* 1 change to new file */ + gst_element_set_state (splitmux->muxer, GST_STATE_NULL); + gst_element_set_state (splitmux->active_sink, GST_STATE_NULL); + + set_next_filename (splitmux); + + gst_element_sync_state_with_parent (splitmux->active_sink); + gst_element_sync_state_with_parent (splitmux->muxer); + + g_list_foreach (splitmux->contexts, (GFunc) restart_context, splitmux); + + /* Switch state and go back to processing */ + splitmux->state = SPLITMUX_STATE_COLLECTING_GOP_START; + + if (!splitmux->reference_ctx->in_eos) { + splitmux->max_out_running_time = splitmux->reference_ctx->in_running_time; + } else { + splitmux->max_out_running_time = GST_CLOCK_TIME_NONE; + splitmux->have_muxed_something = FALSE; + } + splitmux->have_muxed_something = + (splitmux->reference_ctx->in_running_time > splitmux->muxed_out_time); + + /* Store the overflow parameters as the basis for the next fragment */ + splitmux->mux_start_time = splitmux->muxed_out_time; + splitmux->mux_start_bytes = splitmux->muxed_out_bytes; + + GST_DEBUG_OBJECT (splitmux, + "Restarting flow for new fragment. New running time %" GST_TIME_FORMAT, + GST_TIME_ARGS (splitmux->max_out_running_time)); + + send_fragment_opened_closed_msg (splitmux, TRUE); + + GST_SPLITMUX_BROADCAST (splitmux); +} + +static void +bus_handler (GstBin * bin, GstMessage * message) +{ + GstSplitMuxSink *splitmux = GST_SPLITMUX_SINK (bin); + + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_EOS: + /* If the state is draining out the current file, drop this EOS */ + GST_SPLITMUX_LOCK (splitmux); + + send_fragment_opened_closed_msg (splitmux, FALSE); + + if (splitmux->state == SPLITMUX_STATE_ENDING_FILE && + splitmux->max_out_running_time != GST_CLOCK_TIME_NONE) { + GST_DEBUG_OBJECT (splitmux, "Caught EOS at end of fragment, dropping"); + splitmux->state = SPLITMUX_STATE_START_NEXT_FRAGMENT; + GST_SPLITMUX_BROADCAST (splitmux); + + gst_message_unref (message); + GST_SPLITMUX_UNLOCK (splitmux); + return; + } + GST_SPLITMUX_UNLOCK (splitmux); + break; + default: + break; + } + + GST_BIN_CLASS (parent_class)->handle_message (bin, message); +} + +/* Called with splitmux lock held */ +/* Called when entering ProcessingCompleteGop state + * Assess if mq contents overflowed the current file + * -> If yes, need to switch to new file + * -> if no, set max_out_running_time to let this GOP in and + * go to COLLECTING_GOP_START state + */ +static void +handle_gathered_gop (GstSplitMuxSink * splitmux) +{ + GList *cur; + gsize queued_bytes = 0; + GstClockTime queued_time = 0; + + /* Assess if the multiqueue contents overflowed the current file */ + for (cur = g_list_first (splitmux->contexts); + cur != NULL; cur = g_list_next (cur)) { + MqStreamCtx *tmpctx = (MqStreamCtx *) (cur->data); + if (tmpctx->in_running_time > queued_time) + queued_time = tmpctx->in_running_time; + queued_bytes += tmpctx->in_bytes; + } + + g_assert (queued_bytes >= splitmux->mux_start_bytes); + g_assert (queued_time >= splitmux->mux_start_time); + + queued_bytes -= splitmux->mux_start_bytes; + queued_time -= splitmux->mux_start_time; + + /* Expand queued bytes estimate by muxer overhead */ + queued_bytes += (queued_bytes * splitmux->mux_overhead); + + GST_LOG_OBJECT (splitmux, "mq at TS %" GST_TIME_FORMAT + " bytes %" G_GSIZE_FORMAT, GST_TIME_ARGS (queued_time), queued_bytes); + + /* Check for overrun - have we output at least one byte and overrun + * either threshold? */ + if (splitmux->have_muxed_something && + ((splitmux->threshold_bytes > 0 && + queued_bytes >= splitmux->threshold_bytes) || + (splitmux->threshold_time > 0 && + queued_time >= splitmux->threshold_time))) { + + splitmux->state = SPLITMUX_STATE_ENDING_FILE; + + GST_INFO_OBJECT (splitmux, + "mq overflowed since last, draining out. max out TS is %" + GST_TIME_FORMAT, GST_TIME_ARGS (splitmux->max_out_running_time)); + GST_SPLITMUX_BROADCAST (splitmux); + + } else { + /* No overflow */ + GST_LOG_OBJECT (splitmux, + "This GOP didn't overflow the fragment. Bytes sent %" G_GSIZE_FORMAT + " queued %" G_GSIZE_FORMAT " time %" GST_TIME_FORMAT " Continuing.", + splitmux->muxed_out_bytes - splitmux->mux_start_bytes, + queued_bytes, GST_TIME_ARGS (queued_time)); + + /* Wake everyone up to push this one GOP, then sleep */ + splitmux->state = SPLITMUX_STATE_COLLECTING_GOP_START; + splitmux->have_muxed_something = TRUE; + + if (!splitmux->reference_ctx->in_eos) + splitmux->max_out_running_time = splitmux->reference_ctx->in_running_time; + else + splitmux->max_out_running_time = GST_CLOCK_TIME_NONE; + + GST_LOG_OBJECT (splitmux, "Waking output for complete GOP, TS %" + GST_TIME_FORMAT, GST_TIME_ARGS (splitmux->max_out_running_time)); + GST_SPLITMUX_BROADCAST (splitmux); + } + +} + +/* Called with splitmux lock held */ +/* Called from each input pad when it is has all the pieces + * for a GOP or EOS, starting with the reference pad which has set the + * splitmux->max_in_running_time + */ +static void +check_completed_gop (GstSplitMuxSink * splitmux, MqStreamCtx * ctx) +{ + GList *cur; + gboolean ready = TRUE; + GstClockTime current_max_in_running_time; + + if (splitmux->state == SPLITMUX_STATE_WAITING_GOP_COMPLETE) { + /* Iterate each pad, and check that the input running time is at least + * up to the reference running time, and if so handle the collected GOP */ + GST_LOG_OBJECT (splitmux, "Checking GOP collected, ctx %p", ctx); + for (cur = g_list_first (splitmux->contexts); + cur != NULL; cur = g_list_next (cur)) { + MqStreamCtx *tmpctx = (MqStreamCtx *) (cur->data); + + GST_LOG_OBJECT (splitmux, + "Context %p (src pad %" GST_PTR_FORMAT ") TS %" GST_TIME_FORMAT + " EOS %d", tmpctx, tmpctx->srcpad, + GST_TIME_ARGS (tmpctx->in_running_time), tmpctx->in_eos); + + if (tmpctx->in_running_time < splitmux->max_in_running_time && + !tmpctx->in_eos) { + GST_LOG_OBJECT (splitmux, + "Context %p (src pad %" GST_PTR_FORMAT ") not ready. We'll sleep", + tmpctx, tmpctx->srcpad); + ready = FALSE; + break; + } + } + if (ready) { + GST_DEBUG_OBJECT (splitmux, + "Collected GOP is complete. Processing (ctx %p)", ctx); + /* All pads have a complete GOP, release it into the multiqueue */ + handle_gathered_gop (splitmux); + } + } + + /* Some pad is not yet ready, or GOP is being pushed + * either way, sleep and wait to get woken */ + current_max_in_running_time = splitmux->max_in_running_time; + while ((splitmux->state == SPLITMUX_STATE_WAITING_GOP_COMPLETE || + splitmux->state == SPLITMUX_STATE_START_NEXT_FRAGMENT) && + !ctx->flushing && + (current_max_in_running_time == splitmux->max_in_running_time)) { + + GST_LOG_OBJECT (splitmux, "Sleeping for %s (ctx %p)", + splitmux->state == SPLITMUX_STATE_WAITING_GOP_COMPLETE ? + "GOP complete" : "EOF draining", ctx); + GST_SPLITMUX_WAIT (splitmux); + + GST_LOG_OBJECT (splitmux, "Done waiting for complete GOP (ctx %p)", ctx); + } +} + +static void +check_queue_length (GstSplitMuxSink * splitmux, MqStreamCtx * ctx) +{ + GList *cur; + guint cur_len = g_queue_get_length (&ctx->queued_bufs); + + GST_DEBUG_OBJECT (ctx->sinkpad, + "Checking queue length len %u cur_max %u queued gops %u", + cur_len, splitmux->mq_max_buffers, splitmux->queued_gops); + + if (cur_len >= splitmux->mq_max_buffers) { + gboolean allow_grow = FALSE; + + /* If collecting a GOP and this pad might block, + * and there isn't already a pending GOP in the queue + * then grow + */ + if (splitmux->state == SPLITMUX_STATE_WAITING_GOP_COMPLETE && + ctx->in_running_time < splitmux->max_in_running_time && + splitmux->queued_gops <= 1) { + allow_grow = TRUE; + } else if (splitmux->state == SPLITMUX_STATE_COLLECTING_GOP_START && + ctx->is_reference && splitmux->queued_gops <= 1) { + allow_grow = TRUE; + } + + if (!allow_grow) { + for (cur = g_list_first (splitmux->contexts); + cur != NULL; cur = g_list_next (cur)) { + MqStreamCtx *tmpctx = (MqStreamCtx *) (cur->data); + GST_DEBUG_OBJECT (tmpctx->sinkpad, + " len %u out_blocked %d", + g_queue_get_length (&tmpctx->queued_bufs), tmpctx->out_blocked); + /* If another stream is starving, grow */ + if (tmpctx != ctx && g_queue_get_length (&tmpctx->queued_bufs) < 1) { + allow_grow = TRUE; + } + } + } + + if (allow_grow) { + splitmux->mq_max_buffers = cur_len + 1; + + GST_INFO_OBJECT (splitmux, + "Multiqueue overrun - enlarging to %u buffers ctx %p", + splitmux->mq_max_buffers, ctx); + + g_object_set (splitmux->mq, "max-size-buffers", + splitmux->mq_max_buffers, NULL); + } + } +} + +static GstPadProbeReturn +handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx) +{ + GstSplitMuxSink *splitmux = ctx->splitmux; + GstBuffer *buf; + MqStreamBuf *buf_info = NULL; + GstClockTime ts; + gboolean loop_again; + gboolean keyframe = FALSE; + + GST_LOG_OBJECT (pad, "Fired probe type 0x%x", info->type); + + /* FIXME: Handle buffer lists, until then make it clear they won't work */ + if (info->type & GST_PAD_PROBE_TYPE_BUFFER_LIST) { + g_warning ("Buffer list handling not implemented"); + return GST_PAD_PROBE_DROP; + } + if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) { + GstEvent *event = gst_pad_probe_info_get_event (info); + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEGMENT: + gst_event_copy_segment (event, &ctx->in_segment); + break; + case GST_EVENT_FLUSH_STOP: + GST_SPLITMUX_LOCK (splitmux); + gst_segment_init (&ctx->in_segment, GST_FORMAT_UNDEFINED); + ctx->in_eos = FALSE; + ctx->in_bytes = 0; + ctx->in_running_time = 0; + GST_SPLITMUX_UNLOCK (splitmux); + break; + case GST_EVENT_EOS: + GST_SPLITMUX_LOCK (splitmux); + ctx->in_eos = TRUE; + + if (splitmux->state == SPLITMUX_STATE_STOPPED) + goto beach; + + if (ctx->is_reference) { + GST_INFO_OBJECT (splitmux, "Got Reference EOS. Finishing up"); + /* Act as if this is a new keyframe with infinite timestamp */ + splitmux->max_in_running_time = GST_CLOCK_TIME_NONE; + splitmux->state = SPLITMUX_STATE_WAITING_GOP_COMPLETE; + /* Wake up other input pads to collect this GOP */ + GST_SPLITMUX_BROADCAST (splitmux); + check_completed_gop (splitmux, ctx); + } else if (splitmux->state == SPLITMUX_STATE_WAITING_GOP_COMPLETE) { + /* If we are waiting for a GOP to be completed (ie, for aux + * pads to catch up), then this pad is complete, so check + * if the whole GOP is. + */ + check_completed_gop (splitmux, ctx); + } + GST_SPLITMUX_UNLOCK (splitmux); + break; + default: + break; + } + return GST_PAD_PROBE_PASS; + } + + buf = gst_pad_probe_info_get_buffer (info); + ctx->in_running_time = gst_segment_to_running_time (&ctx->in_segment, + GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (buf)); + buf_info = mq_stream_buf_new (); + + if (GST_BUFFER_PTS_IS_VALID (buf)) + ts = GST_BUFFER_PTS (buf); + else + ts = GST_BUFFER_DTS (buf); + + GST_SPLITMUX_LOCK (splitmux); + + if (splitmux->state == SPLITMUX_STATE_STOPPED) + goto beach; + + /* If this buffer has a timestamp, advance the input timestamp of the + * stream */ + if (GST_CLOCK_TIME_IS_VALID (ts)) { + GstClockTime running_time = + gst_segment_to_running_time (&ctx->in_segment, GST_FORMAT_TIME, + GST_BUFFER_TIMESTAMP (buf)); + + if (GST_CLOCK_TIME_IS_VALID (running_time) && + (ctx->in_running_time == GST_CLOCK_TIME_NONE + || running_time > ctx->in_running_time)) + ctx->in_running_time = running_time; + } + + /* Try to make sure we have a valid running time */ + if (!GST_CLOCK_TIME_IS_VALID (ctx->in_running_time)) { + ctx->in_running_time = + gst_segment_to_running_time (&ctx->in_segment, GST_FORMAT_TIME, + ctx->in_segment.start); + } + + buf_info->run_ts = ctx->in_running_time; + buf_info->buf_size = gst_buffer_get_size (buf); + + /* Update total input byte counter for overflow detect */ + ctx->in_bytes += buf_info->buf_size; + + /* initialize mux_start_time */ + if (ctx->is_reference && splitmux->mux_start_time == 0) + splitmux->mux_start_time = buf_info->run_ts; + + GST_DEBUG_OBJECT (pad, "Buf TS %" GST_TIME_FORMAT + " total in_bytes %" G_GSIZE_FORMAT, + GST_TIME_ARGS (buf_info->run_ts), ctx->in_bytes); + + loop_again = TRUE; + do { + if (ctx->flushing) + break; + + switch (splitmux->state) { + case SPLITMUX_STATE_COLLECTING_GOP_START: + if (ctx->is_reference) { + /* If a keyframe, we have a complete GOP */ + if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT) || + !GST_CLOCK_TIME_IS_VALID (ctx->in_running_time) || + splitmux->max_in_running_time >= ctx->in_running_time) { + /* Pass this buffer through */ + loop_again = FALSE; + break; + } + GST_INFO_OBJECT (pad, + "Have keyframe with running time %" GST_TIME_FORMAT, + GST_TIME_ARGS (ctx->in_running_time)); + keyframe = TRUE; + splitmux->state = SPLITMUX_STATE_WAITING_GOP_COMPLETE; + splitmux->max_in_running_time = ctx->in_running_time; + /* Wake up other input pads to collect this GOP */ + GST_SPLITMUX_BROADCAST (splitmux); + check_completed_gop (splitmux, ctx); + } else { + /* We're still waiting for a keyframe on the reference pad, sleep */ + GST_LOG_OBJECT (pad, "Sleeping for GOP start"); + GST_SPLITMUX_WAIT (splitmux); + GST_LOG_OBJECT (pad, "Done sleeping for GOP start state now %d", + splitmux->state); + } + break; + case SPLITMUX_STATE_WAITING_GOP_COMPLETE: + /* After a GOP start is found, this buffer might complete the GOP */ + /* If we overran the target timestamp, it might be time to process + * the GOP, otherwise bail out for more data + */ + GST_LOG_OBJECT (pad, + "Checking TS %" GST_TIME_FORMAT " against max %" GST_TIME_FORMAT, + GST_TIME_ARGS (ctx->in_running_time), + GST_TIME_ARGS (splitmux->max_in_running_time)); + + if (ctx->in_running_time < splitmux->max_in_running_time) { + loop_again = FALSE; + break; + } + + GST_LOG_OBJECT (pad, + "Collected last packet of GOP. Checking other pads"); + check_completed_gop (splitmux, ctx); + break; + case SPLITMUX_STATE_ENDING_FILE: + case SPLITMUX_STATE_START_NEXT_FRAGMENT: + /* A fragment is ending, wait until that's done before continuing */ + GST_DEBUG_OBJECT (pad, "Sleeping for fragment restart"); + GST_SPLITMUX_WAIT (splitmux); + GST_DEBUG_OBJECT (pad, + "Done sleeping for fragment restart state now %d", splitmux->state); + break; + default: + loop_again = FALSE; + break; + } + } while (loop_again); + + if (keyframe) { + splitmux->queued_gops++; + buf_info->keyframe = TRUE; + } + + /* Now add this buffer to the queue just before returning */ + g_queue_push_head (&ctx->queued_bufs, buf_info); + + /* Check the buffer will fit in the mq */ + check_queue_length (splitmux, ctx); + + GST_LOG_OBJECT (pad, "Returning to queue buffer %" GST_PTR_FORMAT + " run ts %" GST_TIME_FORMAT, buf, GST_TIME_ARGS (ctx->in_running_time)); + + GST_SPLITMUX_UNLOCK (splitmux); + return GST_PAD_PROBE_PASS; + +beach: + GST_SPLITMUX_UNLOCK (splitmux); + if (buf_info) + mq_stream_buf_free (buf_info); + return GST_PAD_PROBE_PASS; +} + +static GstPad * +gst_splitmux_sink_request_new_pad (GstElement * element, + GstPadTemplate * templ, const gchar * name, const GstCaps * caps) +{ + GstSplitMuxSink *splitmux = (GstSplitMuxSink *) element; + GstPadTemplate *mux_template = NULL; + GstPad *res = NULL; + GstPad *mq_sink, *mq_src; + gchar *gname; + gboolean is_video = FALSE; + MqStreamCtx *ctx; + + GST_DEBUG_OBJECT (element, "templ:%s, name:%s", templ->name_template, name); + + GST_SPLITMUX_LOCK (splitmux); + if (!create_elements (splitmux)) + goto fail; + + if (templ->name_template) { + if (g_str_equal (templ->name_template, "video")) { + /* FIXME: Look for a pad template with matching caps, rather than by name */ + mux_template = + gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS + (splitmux->muxer), "video_%u"); + is_video = TRUE; + name = NULL; + } else { + mux_template = + gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS + (splitmux->muxer), templ->name_template); + } + if (mux_template == NULL) { + /* Fallback to find sink pad templates named 'sink_%d' (mpegtsmux) */ + mux_template = + gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS + (splitmux->muxer), "sink_%d"); + } + } + + res = gst_element_request_pad (splitmux->muxer, mux_template, name, caps); + if (res == NULL) + goto fail; + + if (is_video) + gname = g_strdup ("video"); + else if (name == NULL) + gname = gst_pad_get_name (res); + else + gname = g_strdup (name); + + if (!get_pads_from_mq (splitmux, &mq_sink, &mq_src)) { + gst_element_release_request_pad (splitmux->muxer, res); + gst_object_unref (GST_OBJECT (res)); + goto fail; + } + + if (gst_pad_link (mq_src, res) != GST_PAD_LINK_OK) { + gst_element_release_request_pad (splitmux->muxer, res); + gst_object_unref (GST_OBJECT (res)); + gst_element_release_request_pad (splitmux->mq, mq_sink); + gst_object_unref (GST_OBJECT (mq_sink)); + goto fail; + } + + gst_object_unref (GST_OBJECT (res)); + + ctx = mq_stream_ctx_new (splitmux); + ctx->srcpad = mq_src; + ctx->sinkpad = mq_sink; + + mq_stream_ctx_ref (ctx); + ctx->src_pad_block_id = + gst_pad_add_probe (mq_src, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, + (GstPadProbeCallback) handle_mq_output, ctx, (GDestroyNotify) + _pad_block_destroy_src_notify); + if (is_video && splitmux->reference_ctx != NULL) { + splitmux->reference_ctx->is_reference = FALSE; + splitmux->reference_ctx = NULL; + } + if (splitmux->reference_ctx == NULL) { + splitmux->reference_ctx = ctx; + ctx->is_reference = TRUE; + } + + res = gst_ghost_pad_new (gname, mq_sink); + g_object_set_qdata ((GObject *) (res), PAD_CONTEXT, ctx); + + mq_stream_ctx_ref (ctx); + ctx->sink_pad_block_id = + gst_pad_add_probe (mq_sink, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, + (GstPadProbeCallback) handle_mq_input, ctx, (GDestroyNotify) + _pad_block_destroy_sink_notify); + + GST_DEBUG_OBJECT (splitmux, "Request pad %" GST_PTR_FORMAT + " is mq pad %" GST_PTR_FORMAT, res, mq_sink); + + splitmux->contexts = g_list_prepend (splitmux->contexts, ctx); + + g_free (gname); + + gst_object_unref (mq_sink); + gst_object_unref (mq_src); + + gst_pad_set_active (res, TRUE); + gst_element_add_pad (element, res); + GST_SPLITMUX_UNLOCK (splitmux); + + return res; +fail: + GST_SPLITMUX_UNLOCK (splitmux); + return NULL; +} + +static void +gst_splitmux_sink_release_pad (GstElement * element, GstPad * pad) +{ + GstSplitMuxSink *splitmux = (GstSplitMuxSink *) element; + GstPad *mqsink, *mqsrc, *muxpad; + MqStreamCtx *ctx = + (MqStreamCtx *) (g_object_get_qdata ((GObject *) (pad), PAD_CONTEXT)); + + GST_SPLITMUX_LOCK (splitmux); + + if (splitmux->muxer == NULL || splitmux->mq == NULL) + goto fail; /* Elements don't exist yet - nothing to release */ + + GST_INFO_OBJECT (pad, "releasing request pad"); + + mqsink = gst_ghost_pad_get_target (GST_GHOST_PAD (pad)); + mqsrc = mq_sink_to_src (splitmux->mq, mqsink); + muxpad = gst_pad_get_peer (mqsrc); + + /* Remove the context from our consideration */ + splitmux->contexts = g_list_remove (splitmux->contexts, ctx); + + if (ctx->sink_pad_block_id) + gst_pad_remove_probe (ctx->sinkpad, ctx->sink_pad_block_id); + + if (ctx->src_pad_block_id) + gst_pad_remove_probe (ctx->srcpad, ctx->src_pad_block_id); + + /* Can release the context now */ + mq_stream_ctx_unref (ctx); + + /* Release and free the mq input */ + gst_element_release_request_pad (splitmux->mq, mqsink); + + /* Release and free the muxer input */ + gst_element_release_request_pad (splitmux->muxer, muxpad); + + gst_object_unref (mqsink); + gst_object_unref (mqsrc); + gst_object_unref (muxpad); + + gst_element_remove_pad (element, pad); + + /* Reset the internal elements only after all request pads are released */ + if (splitmux->contexts == NULL) + gst_splitmux_reset (splitmux); + +fail: + GST_SPLITMUX_UNLOCK (splitmux); +} + +static GstElement * +create_element (GstSplitMuxSink * splitmux, + const gchar * factory, const gchar * name) +{ + GstElement *ret = gst_element_factory_make (factory, name); + if (ret == NULL) { + g_warning ("Failed to create %s - splitmuxsink will not work", name); + return NULL; + } + + if (!gst_bin_add (GST_BIN (splitmux), ret)) { + g_warning ("Could not add %s element - splitmuxsink will not work", name); + gst_object_unref (ret); + return NULL; + } + + return ret; +} + +static gboolean +create_elements (GstSplitMuxSink * splitmux) +{ + /* Create internal elements */ + if (splitmux->mq == NULL) { + if ((splitmux->mq = + create_element (splitmux, "multiqueue", "multiqueue")) == NULL) + goto fail; + + splitmux->mq_max_buffers = 5; + /* No bytes or time limit, we limit buffers manually */ + g_object_set (splitmux->mq, "max-size-bytes", 0, "max-size-time", + (guint64) 0, "max-size-buffers", splitmux->mq_max_buffers, NULL); + } + + if (splitmux->muxer == NULL) { + GstElement *provided_muxer = NULL; + + GST_OBJECT_LOCK (splitmux); + if (splitmux->provided_muxer != NULL) + provided_muxer = gst_object_ref (splitmux->provided_muxer); + GST_OBJECT_UNLOCK (splitmux); + + if (provided_muxer == NULL) { + if ((splitmux->muxer = + create_element (splitmux, "mp4mux", "muxer")) == NULL) + goto fail; + } else { + if (!gst_bin_add (GST_BIN (splitmux), provided_muxer)) { + g_warning ("Could not add muxer element - splitmuxsink will not work"); + gst_object_unref (provided_muxer); + goto fail; + } + + splitmux->muxer = provided_muxer; + gst_object_unref (provided_muxer); + } + } + + return TRUE; +fail: + return FALSE; +} + +static GstElement * +find_sink (GstElement * e) +{ + GstElement *res = NULL; + GstIterator *iter; + gboolean done = FALSE; + GValue data = { 0, }; + + if (!GST_IS_BIN (e)) + return e; + + iter = gst_bin_iterate_sinks (GST_BIN (e)); + while (!done) { + switch (gst_iterator_next (iter, &data)) { + case GST_ITERATOR_OK: + { + GstElement *child = g_value_get_object (&data); + if (g_object_class_find_property (G_OBJECT_GET_CLASS (child), + "location") != NULL) { + res = child; + done = TRUE; + } + g_value_reset (&data); + break; + } + case GST_ITERATOR_RESYNC: + gst_iterator_resync (iter); + break; + case GST_ITERATOR_DONE: + done = TRUE; + break; + case GST_ITERATOR_ERROR: + g_assert_not_reached (); + break; + } + } + g_value_unset (&data); + gst_iterator_free (iter); + + return res; +} + +static gboolean +create_sink (GstSplitMuxSink * splitmux) +{ + GstElement *provided_sink = NULL; + + g_return_val_if_fail (splitmux->active_sink == NULL, TRUE); + + GST_OBJECT_LOCK (splitmux); + if (splitmux->provided_sink != NULL) + provided_sink = gst_object_ref (splitmux->provided_sink); + GST_OBJECT_UNLOCK (splitmux); + + if (provided_sink == NULL) { + if ((splitmux->sink = + create_element (splitmux, DEFAULT_SINK, "sink")) == NULL) + goto fail; + splitmux->active_sink = splitmux->sink; + } else { + if (!gst_bin_add (GST_BIN (splitmux), provided_sink)) { + g_warning ("Could not add sink elements - splitmuxsink will not work"); + gst_object_unref (provided_sink); + goto fail; + } + + splitmux->active_sink = provided_sink; + + /* The bin holds a ref now, we can drop our tmp ref */ + gst_object_unref (provided_sink); + + /* Find the sink element */ + splitmux->sink = find_sink (splitmux->active_sink); + if (splitmux->sink == NULL) { + g_warning + ("Could not locate sink element in provided sink - splitmuxsink will not work"); + goto fail; + } + } + + if (!gst_element_link (splitmux->muxer, splitmux->active_sink)) { + g_warning ("Failed to link muxer and sink- splitmuxsink will not work"); + goto fail; + } + + return TRUE; +fail: + return FALSE; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif +static void +set_next_filename (GstSplitMuxSink * splitmux) +{ + gchar *fname = NULL; + + g_signal_emit (splitmux, signals[SIGNAL_FORMAT_LOCATION], 0, + splitmux->fragment_id, &fname); + + if (!fname) + fname = splitmux->location ? + g_strdup_printf (splitmux->location, splitmux->fragment_id) : NULL; + + if (fname) { + GST_INFO_OBJECT (splitmux, "Setting file to %s", fname); + g_object_set (splitmux->sink, "location", fname, NULL); + g_free (fname); + + splitmux->fragment_id++; + } +} + +static GstStateChangeReturn +gst_splitmux_sink_change_state (GstElement * element, GstStateChange transition) +{ + GstStateChangeReturn ret; + GstSplitMuxSink *splitmux = (GstSplitMuxSink *) element; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY:{ + GST_SPLITMUX_LOCK (splitmux); + if (!create_elements (splitmux) || !create_sink (splitmux)) { + ret = GST_STATE_CHANGE_FAILURE; + GST_SPLITMUX_UNLOCK (splitmux); + goto beach; + } + GST_SPLITMUX_UNLOCK (splitmux); + splitmux->fragment_id = 0; + set_next_filename (splitmux); + break; + } + case GST_STATE_CHANGE_READY_TO_PAUSED:{ + GST_SPLITMUX_LOCK (splitmux); + /* Start by collecting one input on each pad */ + splitmux->state = SPLITMUX_STATE_COLLECTING_GOP_START; + splitmux->max_in_running_time = 0; + splitmux->muxed_out_time = splitmux->mux_start_time = 0; + splitmux->muxed_out_bytes = splitmux->mux_start_bytes = 0; + splitmux->opening_first_fragment = TRUE; + GST_SPLITMUX_UNLOCK (splitmux); + break; + } + case GST_STATE_CHANGE_PAUSED_TO_READY: + case GST_STATE_CHANGE_READY_TO_NULL: + GST_SPLITMUX_LOCK (splitmux); + splitmux->state = SPLITMUX_STATE_STOPPED; + /* Wake up any blocked threads */ + GST_LOG_OBJECT (splitmux, + "State change -> NULL or READY. Waking threads"); + GST_SPLITMUX_BROADCAST (splitmux); + GST_SPLITMUX_UNLOCK (splitmux); + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (ret == GST_STATE_CHANGE_FAILURE) + goto beach; + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_NULL: + GST_SPLITMUX_LOCK (splitmux); + splitmux->fragment_id = 0; + /* Reset internal elements only if no pad contexts are using them */ + if (splitmux->contexts == NULL) + gst_splitmux_reset (splitmux); + GST_SPLITMUX_UNLOCK (splitmux); + break; + default: + break; + } + +beach: + + if (transition == GST_STATE_CHANGE_NULL_TO_READY && + ret == GST_STATE_CHANGE_FAILURE) { + /* Cleanup elements on failed transition out of NULL */ + gst_splitmux_reset (splitmux); + } + return ret; +} + +gboolean +register_splitmuxsink (GstPlugin * plugin) +{ + GST_DEBUG_CATEGORY_INIT (splitmux_debug, "splitmuxsink", 0, + "Split File Muxing Sink"); + + return gst_element_register (plugin, "splitmuxsink", GST_RANK_NONE, + GST_TYPE_SPLITMUX_SINK); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsink.h gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsink.h --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsink.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsink.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,135 @@ +/* GStreamer split muxer bin + * Copyright (C) 2014 Jan Schmidt + * + * 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_SPLITMUXSINK_H__ +#define __GST_SPLITMUXSINK_H__ + +#include +#include + +G_BEGIN_DECLS + +#define GST_TYPE_SPLITMUX_SINK (gst_splitmux_sink_get_type()) +#define GST_SPLITMUX_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPLITMUX_SINK,GstSplitMuxSink)) +#define GST_SPLITMUX_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPLITMUX_SINK,GstSplitMuxSinkClass)) +#define GST_IS_SPLITMUX_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPLITMUX_SINK)) +#define GST_IS_SPLITMUX_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPLITMUX_SINK)) + +typedef struct _GstSplitMuxSink GstSplitMuxSink; +typedef struct _GstSplitMuxSinkClass GstSplitMuxSinkClass; + +GType gst_splitmux_sink_get_type(void); +gboolean register_splitmuxsink (GstPlugin * plugin); + +typedef enum _SplitMuxState { + SPLITMUX_STATE_STOPPED, + SPLITMUX_STATE_COLLECTING_GOP_START, + SPLITMUX_STATE_WAITING_GOP_COMPLETE, + SPLITMUX_STATE_ENDING_FILE, + SPLITMUX_STATE_START_NEXT_FRAGMENT, +} SplitMuxState; + +typedef struct _MqStreamBuf +{ + gboolean keyframe; + GstClockTime run_ts; + gsize buf_size; +} MqStreamBuf; + +typedef struct _MqStreamCtx +{ + gint refcount; + + GstSplitMuxSink *splitmux; + + guint sink_pad_block_id; + guint src_pad_block_id; + + gboolean is_reference; + + gboolean flushing; + gboolean in_eos; + gboolean out_eos; + + GstSegment in_segment; + GstSegment out_segment; + + GstClockTime in_running_time; + GstClockTime out_running_time; + + gsize in_bytes; + + GQueue queued_bufs; + + GstPad *sinkpad; + GstPad *srcpad; + + gboolean out_blocked; +} MqStreamCtx; + +struct _GstSplitMuxSink { + GstBin parent; + + GMutex lock; + GCond data_cond; + + SplitMuxState state; + gdouble mux_overhead; + + GstClockTime threshold_time; + guint64 threshold_bytes; + + guint mq_max_buffers; + + GstElement *mq; + GstElement *muxer; + GstElement *sink; + + GstElement *provided_muxer; + + GstElement *provided_sink; + GstElement *active_sink; + + gchar *location; + guint fragment_id; + + GList *contexts; + + MqStreamCtx *reference_ctx; + guint queued_gops; + GstClockTime max_in_running_time; + GstClockTime max_out_running_time; + + GstClockTime muxed_out_time; + gsize muxed_out_bytes; + gboolean have_muxed_something; + + GstClockTime mux_start_time; + gsize mux_start_bytes; + + gboolean opening_first_fragment; +}; + +struct _GstSplitMuxSinkClass { + GstBinClass parent_class; +}; + +G_END_DECLS + +#endif /* __GST_SPLITMUXSINK_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsrc.c gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsrc.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsrc.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,1199 @@ +/* GStreamer Split Demuxer bin that recombines files created by + * the splitmuxsink element. + * + * Copyright (C) <2014> Jan Schmidt + * + * 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-splitmuxsrc + * @short_description: Split Demuxer bin that recombines files created by + * the splitmuxsink element. + * + * This element reads a set of input files created by the splitmuxsink element + * containing contiguous elementary streams split across multiple files. + * + * This element is similar to splitfilesrc, except that it recombines the + * streams in each file part at the demuxed elementary level, rather than + * as a single larger bytestream. + * + * + * Example pipelines + * |[ + * gst-launch-1.0 splitmuxsrc location=video*.mov ! decodebin ! xvimagesink + * ]| Demux each file part and output the video stream as one continuous stream + * |[ + * gst-launch-1.0 playbin uri="splitmux://path/to/foo.mp4.*" + * ]| Play back a set of files created by splitmuxsink + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "gstsplitmuxsrc.h" +#include "gstsplitutils.h" + +#include "../../gst-libs/gst/gst-i18n-plugin.h" + +GST_DEBUG_CATEGORY (splitmux_debug); +#define GST_CAT_DEFAULT splitmux_debug + +enum +{ + PROP_0, + PROP_LOCATION +}; + +static GstStaticPadTemplate video_src_template = +GST_STATIC_PAD_TEMPLATE ("video", + GST_PAD_SRC, + GST_PAD_SOMETIMES, + GST_STATIC_CAPS_ANY); + +static GstStaticPadTemplate audio_src_template = +GST_STATIC_PAD_TEMPLATE ("audio_%u", + GST_PAD_SRC, + GST_PAD_SOMETIMES, + GST_STATIC_CAPS_ANY); + +static GstStaticPadTemplate subtitle_src_template = +GST_STATIC_PAD_TEMPLATE ("subtitle_%u", + GST_PAD_SRC, + GST_PAD_SOMETIMES, + GST_STATIC_CAPS_ANY); + +static GstStateChangeReturn gst_splitmux_src_change_state (GstElement * + element, GstStateChange transition); +static void gst_splitmux_src_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_splitmux_src_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); +static void gst_splitmux_src_dispose (GObject * object); +static void gst_splitmux_src_finalize (GObject * object); +static gboolean gst_splitmux_src_start (GstSplitMuxSrc * splitmux); +static gboolean gst_splitmux_src_stop (GstSplitMuxSrc * splitmux); +static void splitmux_src_pad_constructed (GObject * pad); +static gboolean splitmux_src_pad_event (GstPad * pad, GstObject * parent, + GstEvent * event); +static gboolean splitmux_src_pad_query (GstPad * pad, GstObject * parent, + GstQuery * query); +static void splitmux_src_uri_handler_init (gpointer g_iface, + gpointer iface_data); + + +static GstPad *gst_splitmux_find_output_pad (GstSplitMuxPartReader * part, + GstPad * pad, GstSplitMuxSrc * splitmux); +static void gst_splitmux_part_prepared (GstSplitMuxPartReader * reader, + GstSplitMuxSrc * splitmux); +static gboolean gst_splitmux_end_of_part (GstSplitMuxSrc * splitmux, + SplitMuxSrcPad * pad); +static gboolean gst_splitmux_check_new_caps (SplitMuxSrcPad * splitpad, + GstEvent * event); + +#define _do_init \ + G_IMPLEMENT_INTERFACE(GST_TYPE_URI_HANDLER, splitmux_src_uri_handler_init); +#define gst_splitmux_src_parent_class parent_class + +G_DEFINE_TYPE_EXTENDED (GstSplitMuxSrc, gst_splitmux_src, GST_TYPE_BIN, 0, + _do_init); + +static GstURIType +splitmux_src_uri_get_type (GType type) +{ + return GST_URI_SRC; +} + +static const gchar *const * +splitmux_src_uri_get_protocols (GType type) +{ + static const gchar *protocols[] = { "splitmux", NULL }; + + return protocols; +} + +static gchar * +splitmux_src_uri_get_uri (GstURIHandler * handler) +{ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (handler); + gchar *ret = NULL; + + GST_OBJECT_LOCK (splitmux); + if (splitmux->location) + ret = g_strdup_printf ("splitmux://%s", splitmux->location); + GST_OBJECT_UNLOCK (splitmux); + return ret; +} + +static gboolean +splitmux_src_uri_set_uri (GstURIHandler * handler, const gchar * uri, + GError ** err) +{ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (handler); + gchar *protocol, *location; + + protocol = gst_uri_get_protocol (uri); + if (protocol == NULL || !g_str_equal (protocol, "splitmux")) + goto wrong_uri; + g_free (protocol); + + location = gst_uri_get_location (uri); + GST_OBJECT_LOCK (splitmux); + g_free (splitmux->location); + splitmux->location = location; + GST_OBJECT_UNLOCK (splitmux); + + return TRUE; + +wrong_uri: + g_free (protocol); + GST_ELEMENT_ERROR (splitmux, RESOURCE, READ, (NULL), + ("Error parsing uri %s", uri)); + g_set_error_literal (err, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, + "Could not parse splitmux URI"); + return FALSE; +} + +static void +splitmux_src_uri_handler_init (gpointer g_iface, gpointer iface_data) +{ + GstURIHandlerInterface *iface = (GstURIHandlerInterface *) (g_iface); + + iface->get_type = splitmux_src_uri_get_type; + iface->get_protocols = splitmux_src_uri_get_protocols; + iface->set_uri = splitmux_src_uri_set_uri; + iface->get_uri = splitmux_src_uri_get_uri; +} + + +static void +gst_splitmux_src_class_init (GstSplitMuxSrcClass * klass) +{ + GObjectClass *gobject_class = (GObjectClass *) klass; + GstElementClass *gstelement_class = (GstElementClass *) klass; + + gobject_class->set_property = gst_splitmux_src_set_property; + gobject_class->get_property = gst_splitmux_src_get_property; + gobject_class->dispose = gst_splitmux_src_dispose; + gobject_class->finalize = gst_splitmux_src_finalize; + + gst_element_class_set_static_metadata (gstelement_class, + "Split File Demuxing Bin", "Generic/Bin/Demuxer", + "Source that reads a set of files created by splitmuxsink", + "Jan Schmidt "); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&video_src_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&audio_src_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&subtitle_src_template)); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_splitmux_src_change_state); + + g_object_class_install_property (gobject_class, PROP_LOCATION, + g_param_spec_string ("location", "File Input Pattern", + "Glob pattern for the location of the files to read", NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +} + +static void +gst_splitmux_src_init (GstSplitMuxSrc * splitmux) +{ + g_mutex_init (&splitmux->lock); + g_mutex_init (&splitmux->pads_lock); + splitmux->total_duration = GST_CLOCK_TIME_NONE; + gst_segment_init (&splitmux->play_segment, GST_FORMAT_TIME); +} + +static void +gst_splitmux_src_dispose (GObject * object) +{ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (object); + GList *cur; + + SPLITMUX_SRC_PADS_LOCK (splitmux); + + for (cur = g_list_first (splitmux->pads); + cur != NULL; cur = g_list_next (cur)) { + GstPad *pad = GST_PAD (cur->data); + gst_element_remove_pad (GST_ELEMENT (splitmux), pad); + } + g_list_free (splitmux->pads); + splitmux->pads = NULL; + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +gst_splitmux_src_finalize (GObject * object) +{ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (object); + g_mutex_clear (&splitmux->lock); + g_mutex_clear (&splitmux->pads_lock); + g_free (splitmux->location); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gst_splitmux_src_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (object); + + switch (prop_id) { + case PROP_LOCATION:{ + GST_OBJECT_LOCK (splitmux); + g_free (splitmux->location); + splitmux->location = g_value_dup_string (value); + GST_OBJECT_UNLOCK (splitmux); + break; + } + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_splitmux_src_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (object); + + switch (prop_id) { + case PROP_LOCATION: + GST_OBJECT_LOCK (splitmux); + g_value_set_string (value, splitmux->location); + GST_OBJECT_UNLOCK (splitmux); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static GstStateChangeReturn +gst_splitmux_src_change_state (GstElement * element, GstStateChange transition) +{ + GstStateChangeReturn ret; + GstSplitMuxSrc *splitmux = (GstSplitMuxSrc *) element; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY:{ + break; + } + case GST_STATE_CHANGE_READY_TO_PAUSED:{ + if (!gst_splitmux_src_start (splitmux)) + return GST_STATE_CHANGE_FAILURE; + break; + } + case GST_STATE_CHANGE_PAUSED_TO_READY: + case GST_STATE_CHANGE_READY_TO_NULL: + /* Make sure the element will shut down */ + if (!gst_splitmux_src_stop (splitmux)) + return GST_STATE_CHANGE_FAILURE; + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + return ret; +} + +static GstSplitMuxPartReader * +gst_splitmux_part_create (GstSplitMuxSrc * splitmux, char *filename) +{ + GstSplitMuxPartReader *r; + + r = g_object_new (GST_TYPE_SPLITMUX_PART_READER, NULL); + + g_signal_connect (r, "prepared", (GCallback) gst_splitmux_part_prepared, + splitmux); + + gst_splitmux_part_reader_set_callbacks (r, splitmux, + (GstSplitMuxPartReaderPadCb) gst_splitmux_find_output_pad); + gst_splitmux_part_reader_set_location (r, filename); + + return r; +} + +static gboolean +gst_splitmux_check_new_caps (SplitMuxSrcPad * splitpad, GstEvent * event) +{ + GstCaps *curcaps = gst_pad_get_current_caps ((GstPad *) (splitpad)); + GstCaps *newcaps; + GstCaps *tmpcaps; + GstCaps *tmpcurcaps; + + GstStructure *s; + gboolean res = TRUE; + + gst_event_parse_caps (event, &newcaps); + + GST_LOG_OBJECT (splitpad, "Comparing caps %" GST_PTR_FORMAT + " and %" GST_PTR_FORMAT, curcaps, newcaps); + + if (curcaps == NULL) + return TRUE; + + /* If caps are exactly equal exit early */ + if (gst_caps_is_equal (curcaps, newcaps)) { + gst_caps_unref (curcaps); + return FALSE; + } + + /* More extensive check, ignore changes in framerate, because + * demuxers get that wrong */ + tmpcaps = gst_caps_copy (newcaps); + s = gst_caps_get_structure (tmpcaps, 0); + gst_structure_remove_field (s, "framerate"); + + tmpcurcaps = gst_caps_copy (curcaps); + gst_caps_unref (curcaps); + s = gst_caps_get_structure (tmpcurcaps, 0); + gst_structure_remove_field (s, "framerate"); + + /* Now check if these filtered caps are equal */ + if (gst_caps_is_equal (tmpcurcaps, tmpcaps)) { + GST_INFO_OBJECT (splitpad, "Ignoring framerate-only caps change"); + res = FALSE; + } + + gst_caps_unref (tmpcaps); + gst_caps_unref (tmpcurcaps); + return res; +} + +static void +gst_splitmux_handle_event (GstSplitMuxSrc * splitmux, + SplitMuxSrcPad * splitpad, GstPad * part_pad, GstEvent * event) +{ + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_STREAM_START:{ + if (splitpad->sent_stream_start) + goto drop_event; + splitpad->sent_stream_start = TRUE; + break; + } + case GST_EVENT_EOS:{ + if (gst_splitmux_end_of_part (splitmux, splitpad)) + // Continuing to next part, drop the EOS + goto drop_event; + break; + } + case GST_EVENT_SEGMENT:{ + GstSegment seg; + + gst_event_copy_segment (event, &seg); + + splitpad->segment.position = seg.position; + + if (splitpad->sent_segment) + goto drop_event; /* We already forwarded a segment event */ + + /* Calculate output segment */ + GST_LOG_OBJECT (splitpad, "Pad seg %" GST_SEGMENT_FORMAT + " got seg %" GST_SEGMENT_FORMAT + " play seg %" GST_SEGMENT_FORMAT, + &splitpad->segment, &seg, &splitmux->play_segment); + + /* If playing forward, take the stop time from the overall + * seg or play_segment */ + if (splitmux->play_segment.rate > 0.0) { + if (splitmux->play_segment.stop != -1) + seg.stop = splitmux->play_segment.stop; + else + seg.stop = splitpad->segment.stop; + } else { + /* Reverse playback from stop time to start time */ + /* See if an end point was requested in the seek */ + if (splitmux->play_segment.start != -1) { + seg.start = splitmux->play_segment.start; + seg.time = splitmux->play_segment.time; + } else { + seg.start = splitpad->segment.start; + seg.time = splitpad->segment.time; + } + } + + GST_INFO_OBJECT (splitpad, + "Forwarding segment %" GST_SEGMENT_FORMAT, &seg); + + gst_event_unref (event); + event = gst_event_new_segment (&seg); + splitpad->sent_segment = TRUE; + break; + } + case GST_EVENT_CAPS:{ + if (!gst_splitmux_check_new_caps (splitpad, event)) + goto drop_event; + splitpad->sent_caps = TRUE; + break; + } + default: + break; + } + + gst_pad_push_event ((GstPad *) (splitpad), event); + return; +drop_event: + gst_event_unref (event); + return; +} + +static GstFlowReturn +gst_splitmux_handle_buffer (GstSplitMuxSrc * splitmux, + SplitMuxSrcPad * splitpad, GstBuffer * buf) +{ + GstFlowReturn ret; + + if (splitpad->clear_next_discont) { + GST_LOG_OBJECT (splitpad, "Clearing discont flag on buffer"); + GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT); + splitpad->clear_next_discont = FALSE; + } + if (splitpad->set_next_discont) { + GST_LOG_OBJECT (splitpad, "Setting discont flag on buffer"); + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); + splitpad->set_next_discont = FALSE; + } + + ret = gst_pad_push (GST_PAD_CAST (splitpad), buf); + + GST_LOG_OBJECT (splitpad, "Pad push returned %d", ret); + return ret; +} + +static void +gst_splitmux_pad_loop (GstPad * pad) +{ + /* Get one event/buffer from the associated part and push */ + SplitMuxSrcPad *splitpad = (SplitMuxSrcPad *) (pad); + GstSplitMuxSrc *splitmux = (GstSplitMuxSrc *) gst_pad_get_parent (pad); + GstDataQueueItem *item = NULL; + GstSplitMuxPartReader *reader = splitpad->reader; + GstPad *part_pad; + GstFlowReturn ret; + + GST_OBJECT_LOCK (splitpad); + if (splitpad->part_pad == NULL) { + GST_OBJECT_UNLOCK (splitpad); + return; + } + part_pad = gst_object_ref (splitpad->part_pad); + GST_OBJECT_UNLOCK (splitpad); + + GST_LOG_OBJECT (splitpad, "Popping data queue item from %" GST_PTR_FORMAT + " pad %" GST_PTR_FORMAT, reader, part_pad); + ret = gst_splitmux_part_reader_pop (reader, part_pad, &item); + if (ret == GST_FLOW_ERROR) + goto error; + if (ret == GST_FLOW_FLUSHING || item == NULL) + goto flushing; + + GST_DEBUG_OBJECT (splitpad, "Got data queue item %" GST_PTR_FORMAT, + item->object); + + if (GST_IS_EVENT (item->object)) { + GstEvent *event = (GstEvent *) (item->object); + gst_splitmux_handle_event (splitmux, splitpad, part_pad, event); + } else { + GstBuffer *buf = (GstBuffer *) (item->object); + GstFlowReturn ret = gst_splitmux_handle_buffer (splitmux, splitpad, buf); + if (G_UNLIKELY (ret != GST_FLOW_OK)) { + /* Stop immediately on error or flushing */ + GST_INFO_OBJECT (splitpad, "Stopping due to pad_push() result %d", ret); + gst_pad_pause_task (pad); + if (ret <= GST_FLOW_EOS) { + const gchar *reason = gst_flow_get_name (ret); + GST_ELEMENT_ERROR (splitmux, STREAM, FAILED, + (_("Internal data flow error.")), + ("streaming task paused, reason %s (%d)", reason, ret)); + } + } + } + g_slice_free (GstDataQueueItem, item); + + gst_object_unref (part_pad); + gst_object_unref (splitmux); + return; + +error: + /* Fall through */ + GST_ELEMENT_ERROR (splitmux, RESOURCE, OPEN_READ, (NULL), + ("Error reading part file %s", GST_STR_NULL (reader->path))); +flushing: + gst_pad_pause_task (pad); + gst_object_unref (part_pad); + gst_object_unref (splitmux); + return; +} + +static gboolean +gst_splitmux_src_activate_part (GstSplitMuxSrc * splitmux, guint part) +{ + GList *cur; + + GST_DEBUG_OBJECT (splitmux, "Activating part %d", part); + + splitmux->cur_part = part; + if (!gst_splitmux_part_reader_activate (splitmux->parts[part], + &splitmux->play_segment)) + return FALSE; + + SPLITMUX_SRC_PADS_LOCK (splitmux); + for (cur = g_list_first (splitmux->pads); + cur != NULL; cur = g_list_next (cur)) { + SplitMuxSrcPad *splitpad = (SplitMuxSrcPad *) (cur->data); + splitpad->cur_part = part; + splitpad->reader = splitmux->parts[splitpad->cur_part]; + if (splitpad->part_pad) + gst_object_unref (splitpad->part_pad); + splitpad->part_pad = + gst_splitmux_part_reader_lookup_pad (splitpad->reader, + (GstPad *) (splitpad)); + + /* Make sure we start with a DISCONT */ + splitpad->set_next_discont = TRUE; + splitpad->clear_next_discont = FALSE; + + gst_pad_start_task (GST_PAD (splitpad), + (GstTaskFunction) gst_splitmux_pad_loop, splitpad, NULL); + } + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + + return TRUE; +} + +static gboolean +gst_splitmux_src_start (GstSplitMuxSrc * splitmux) +{ + gboolean ret = FALSE; + GError *err = NULL; + gchar *basename = NULL; + gchar *dirname = NULL; + gchar **files; + GstClockTime next_offset = 0; + guint i; + GstClockTime total_duration = 0; + + GST_DEBUG_OBJECT (splitmux, "Starting"); + + GST_OBJECT_LOCK (splitmux); + if (splitmux->location != NULL && splitmux->location[0] != '\0') { + basename = g_path_get_basename (splitmux->location); + dirname = g_path_get_dirname (splitmux->location); + } + GST_OBJECT_UNLOCK (splitmux); + + files = gst_split_util_find_files (dirname, basename, &err); + + if (files == NULL || *files == NULL) + goto no_files; + + SPLITMUX_SRC_LOCK (splitmux); + splitmux->pads_complete = FALSE; + splitmux->running = TRUE; + SPLITMUX_SRC_UNLOCK (splitmux); + + splitmux->num_parts = g_strv_length (files); + + splitmux->parts = g_new0 (GstSplitMuxPartReader *, splitmux->num_parts); + + for (i = 0; i < splitmux->num_parts; i++) { + splitmux->parts[i] = gst_splitmux_part_create (splitmux, files[i]); + if (splitmux->parts[i] == NULL) + break; + + /* Figure out the next offset - the smallest one */ + gst_splitmux_part_reader_set_start_offset (splitmux->parts[i], next_offset); + if (!gst_splitmux_part_reader_prepare (splitmux->parts[i])) { + GST_WARNING_OBJECT (splitmux, + "Failed to prepare file part %s. Cannot play past there.", files[i]); + GST_ELEMENT_WARNING (splitmux, RESOURCE, READ, (NULL), + ("Failed to prepare file part %s. Cannot play past there.", + files[i])); + gst_splitmux_part_reader_unprepare (splitmux->parts[i]); + g_object_unref (splitmux->parts[i]); + splitmux->parts[i] = NULL; + break; + } + + /* Extend our total duration to cover this part */ + total_duration = + next_offset + + gst_splitmux_part_reader_get_duration (splitmux->parts[i]); + splitmux->play_segment.duration = total_duration; + + next_offset = gst_splitmux_part_reader_get_end_offset (splitmux->parts[i]); + } + + /* Update total_duration state variable */ + GST_OBJECT_LOCK (splitmux); + splitmux->total_duration = total_duration; + GST_OBJECT_UNLOCK (splitmux); + + /* Store how many parts we actually created */ + splitmux->num_parts = i; + + if (splitmux->num_parts < 1) + goto failed_part; + + /* All done preparing, activate the first part */ + GST_INFO_OBJECT (splitmux, + "All parts prepared. Total duration %" GST_TIME_FORMAT + " Activating first part", GST_TIME_ARGS (total_duration)); + ret = gst_splitmux_src_activate_part (splitmux, 0); + if (ret == FALSE) + goto failed_first_part; +done: + if (err != NULL) + g_error_free (err); + g_strfreev (files); + g_free (basename); + g_free (dirname); + + return ret; + +/* ERRORS */ +no_files: + { + GST_ELEMENT_ERROR (splitmux, RESOURCE, OPEN_READ, ("%s", err->message), + ("Failed to find files in '%s' for pattern '%s'", + GST_STR_NULL (dirname), GST_STR_NULL (basename))); + goto done; + } +failed_part: + { + GST_ELEMENT_ERROR (splitmux, RESOURCE, OPEN_READ, (NULL), + ("Failed to open any files for reading")); + goto done; + } +failed_first_part: + { + GST_ELEMENT_ERROR (splitmux, RESOURCE, OPEN_READ, (NULL), + ("Failed to activate first part for playback")); + goto done; + } +} + +static gboolean +gst_splitmux_src_stop (GstSplitMuxSrc * splitmux) +{ + gboolean ret = TRUE; + guint i; + GList *cur, *pads_list; + + SPLITMUX_SRC_LOCK (splitmux); + if (!splitmux->running) + goto out; + + GST_DEBUG_OBJECT (splitmux, "Stopping"); + + /* Stop and destroy all parts */ + for (i = 0; i < splitmux->num_parts; i++) { + if (splitmux->parts[i] == NULL) + continue; + gst_splitmux_part_reader_unprepare (splitmux->parts[i]); + g_object_unref (splitmux->parts[i]); + splitmux->parts[i] = NULL; + } + + SPLITMUX_SRC_PADS_LOCK (splitmux); + pads_list = splitmux->pads; + splitmux->pads = NULL; + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + + for (cur = g_list_first (pads_list); cur != NULL; cur = g_list_next (cur)) { + SplitMuxSrcPad *tmp = (SplitMuxSrcPad *) (cur->data); + gst_pad_stop_task (GST_PAD (tmp)); + gst_element_remove_pad (GST_ELEMENT (splitmux), GST_PAD (tmp)); + } + g_list_free (pads_list); + + g_free (splitmux->parts); + splitmux->parts = NULL; + splitmux->num_parts = 0; + splitmux->running = FALSE; + splitmux->total_duration = GST_CLOCK_TIME_NONE; + /* Reset playback segment */ + gst_segment_init (&splitmux->play_segment, GST_FORMAT_TIME); +out: + SPLITMUX_SRC_UNLOCK (splitmux); + return ret; +} + +typedef struct +{ + GstSplitMuxSrc *splitmux; + SplitMuxSrcPad *splitpad; +} SplitMuxAndPad; + +static gboolean +handle_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data) +{ + SplitMuxAndPad *splitmux_and_pad; + GstSplitMuxSrc *splitmux; + SplitMuxSrcPad *splitpad; + + splitmux_and_pad = user_data; + splitmux = splitmux_and_pad->splitmux; + splitpad = splitmux_and_pad->splitpad; + + GST_DEBUG_OBJECT (splitpad, "handle sticky event %" GST_PTR_FORMAT, *event); + gst_event_ref (*event); + gst_splitmux_handle_event (splitmux, splitpad, pad, *event); + + return TRUE; +} + +static GstPad * +gst_splitmux_find_output_pad (GstSplitMuxPartReader * part, GstPad * pad, + GstSplitMuxSrc * splitmux) +{ + GList *cur; + gchar *pad_name = gst_pad_get_name (pad); + GstPad *target = NULL; + gboolean is_new_pad = FALSE; + + SPLITMUX_SRC_LOCK (splitmux); + SPLITMUX_SRC_PADS_LOCK (splitmux); + for (cur = g_list_first (splitmux->pads); + cur != NULL; cur = g_list_next (cur)) { + GstPad *tmp = (GstPad *) (cur->data); + if (g_str_equal (GST_PAD_NAME (tmp), pad_name)) { + target = tmp; + break; + } + } + + if (target == NULL && !splitmux->pads_complete) { + SplitMuxAndPad splitmux_and_pad; + + /* No pad found, create one */ + target = g_object_new (SPLITMUX_TYPE_SRC_PAD, + "name", pad_name, "direction", GST_PAD_SRC, NULL); + splitmux->pads = g_list_prepend (splitmux->pads, target); + + gst_pad_set_active (target, TRUE); + + splitmux_and_pad.splitmux = splitmux; + splitmux_and_pad.splitpad = (SplitMuxSrcPad *) target; + gst_pad_sticky_events_foreach (pad, handle_sticky_events, + &splitmux_and_pad); + is_new_pad = TRUE; + } + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + SPLITMUX_SRC_UNLOCK (splitmux); + + g_free (pad_name); + + if (target == NULL) + goto pad_not_found; + + if (is_new_pad) + gst_element_add_pad (GST_ELEMENT_CAST (splitmux), target); + + return target; + +pad_not_found: + GST_ELEMENT_ERROR (splitmux, STREAM, FAILED, (NULL), + ("Stream part %s contains extra unknown pad %" GST_PTR_FORMAT, + part->path, pad)); + return NULL; +} + +static void +gst_splitmux_part_prepared (GstSplitMuxPartReader * reader, + GstSplitMuxSrc * splitmux) +{ + gboolean need_no_more_pads; + + GST_LOG_OBJECT (splitmux, "Part %" GST_PTR_FORMAT " prepared", reader); + SPLITMUX_SRC_LOCK (splitmux); + need_no_more_pads = !splitmux->pads_complete; + splitmux->pads_complete = TRUE; + SPLITMUX_SRC_UNLOCK (splitmux); + + if (need_no_more_pads) { + GST_DEBUG_OBJECT (splitmux, "Signalling no-more-pads"); + gst_element_no_more_pads (GST_ELEMENT_CAST (splitmux)); + } +} + +static void +gst_splitmux_push_event (GstSplitMuxSrc * splitmux, GstEvent * e, + guint32 seqnum) +{ + GList *cur; + + if (seqnum) + gst_event_set_seqnum (e, seqnum); + + SPLITMUX_SRC_PADS_LOCK (splitmux); + for (cur = g_list_first (splitmux->pads); + cur != NULL; cur = g_list_next (cur)) { + GstPad *pad = GST_PAD_CAST (cur->data); + gst_event_ref (e); + gst_pad_push_event (pad, e); + } + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + + gst_event_unref (e); +} + +static void +gst_splitmux_push_flush_stop (GstSplitMuxSrc * splitmux, guint32 seqnum) +{ + GstEvent *e = gst_event_new_flush_stop (TRUE); + GList *cur; + + if (seqnum) + gst_event_set_seqnum (e, seqnum); + + SPLITMUX_SRC_PADS_LOCK (splitmux); + for (cur = g_list_first (splitmux->pads); + cur != NULL; cur = g_list_next (cur)) { + SplitMuxSrcPad *target = (SplitMuxSrcPad *) (cur->data); + + gst_event_ref (e); + gst_pad_push_event (GST_PAD_CAST (target), e); + target->sent_caps = FALSE; + target->sent_stream_start = FALSE; + target->sent_segment = FALSE; + } + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + + gst_event_unref (e); +} + +/* Callback for when a part finishes and we need to move to the next */ +static gboolean +gst_splitmux_end_of_part (GstSplitMuxSrc * splitmux, SplitMuxSrcPad * splitpad) +{ + gint next_part = -1; + gint cur_part = splitpad->cur_part; + gboolean res = FALSE; + + if (splitmux->play_segment.rate >= 0.0) { + if (cur_part + 1 < splitmux->num_parts) + next_part = cur_part + 1; + /* Make sure the transition is seamless */ + splitpad->set_next_discont = FALSE; + splitpad->clear_next_discont = TRUE; + } else { + /* Reverse play - move to previous segment */ + if (cur_part > 0) { + next_part = cur_part - 1; + /* Non-seamless transition in reverse */ + splitpad->set_next_discont = TRUE; + splitpad->clear_next_discont = FALSE; + } + } + + SPLITMUX_SRC_LOCK (splitmux); + + /* If all pads are done with this part, deactivate it */ + if (gst_splitmux_part_is_eos (splitmux->parts[splitpad->cur_part])) + gst_splitmux_part_reader_deactivate (splitmux->parts[cur_part]); + + if (next_part != -1) { + GST_DEBUG_OBJECT (splitmux, "At EOS on pad %" GST_PTR_FORMAT + " moving to part %d", splitpad, next_part); + splitpad->cur_part = next_part; + splitpad->reader = splitmux->parts[splitpad->cur_part]; + if (splitpad->part_pad) + gst_object_unref (splitpad->part_pad); + splitpad->part_pad = + gst_splitmux_part_reader_lookup_pad (splitpad->reader, + (GstPad *) (splitpad)); + + if (splitmux->cur_part != next_part) { + GstSegment tmp; + /* If moving backward into a new part, set stop + * to -1 to ensure we play the entire file - workaround + * a bug in qtdemux that misses bits at the end */ + gst_segment_copy_into (&splitmux->play_segment, &tmp); + if (tmp.rate < 0) + tmp.stop = -1; + + /* This is the first pad to move to the new part, activate it */ + splitmux->cur_part = next_part; + GST_DEBUG_OBJECT (splitpad, + "First pad to change part. Activating part %d with seg %" + GST_SEGMENT_FORMAT, next_part, &tmp); + if (!gst_splitmux_part_reader_activate (splitpad->reader, &tmp)) + goto error; + } + res = TRUE; + } + + SPLITMUX_SRC_UNLOCK (splitmux); + return res; +error: + SPLITMUX_SRC_UNLOCK (splitmux); + GST_ELEMENT_ERROR (splitmux, RESOURCE, READ, (NULL), + ("Failed to activate part %d", splitmux->cur_part)); + return FALSE; +} + +G_DEFINE_TYPE (SplitMuxSrcPad, splitmux_src_pad, GST_TYPE_PAD); + +static void +splitmux_src_pad_constructed (GObject * pad) +{ + gst_pad_set_event_function (GST_PAD (pad), + GST_DEBUG_FUNCPTR (splitmux_src_pad_event)); + gst_pad_set_query_function (GST_PAD (pad), + GST_DEBUG_FUNCPTR (splitmux_src_pad_query)); + + G_OBJECT_CLASS (splitmux_src_pad_parent_class)->constructed (pad); +} + +static void +gst_splitmux_src_pad_dispose (GObject * object) +{ + SplitMuxSrcPad *pad = (SplitMuxSrcPad *) (object); + + GST_OBJECT_LOCK (pad); + if (pad->part_pad) { + gst_object_unref (pad->part_pad); + pad->part_pad = NULL; + } + GST_OBJECT_UNLOCK (pad); + + G_OBJECT_CLASS (splitmux_src_pad_parent_class)->dispose (object); +} + +static void +splitmux_src_pad_class_init (SplitMuxSrcPadClass * klass) +{ + GObjectClass *gobject_klass = (GObjectClass *) (klass); + + gobject_klass->constructed = splitmux_src_pad_constructed; + gobject_klass->dispose = gst_splitmux_src_pad_dispose; +} + +static void +splitmux_src_pad_init (SplitMuxSrcPad * pad) +{ +} + +/* Event handler for source pads. Proxy events into the child + * parts as needed + */ +static gboolean +splitmux_src_pad_event (GstPad * pad, GstObject * parent, GstEvent * event) +{ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (parent); + gboolean ret = FALSE; + + GST_DEBUG_OBJECT (parent, "event %" GST_PTR_FORMAT + " on %" GST_PTR_FORMAT, event, pad); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEEK:{ + GstFormat format; + gdouble rate; + GstSeekFlags flags; + GstSeekType start_type, stop_type; + gint64 start, stop; + guint32 seqnum; + gint i; + GstClockTime part_start, position; + GList *cur; + GstSegment tmp; + + gst_event_parse_seek (event, &rate, &format, &flags, + &start_type, &start, &stop_type, &stop); + + if (format != GST_FORMAT_TIME) { + GST_DEBUG_OBJECT (splitmux, "can only seek on TIME"); + goto error; + } + /* FIXME: Support non-flushing seeks, which might never wake up */ + if (!(flags & GST_SEEK_FLAG_FLUSH)) { + GST_DEBUG_OBJECT (splitmux, "Only flushing seeks supported"); + goto error; + } + seqnum = gst_event_get_seqnum (event); + + SPLITMUX_SRC_LOCK (splitmux); + if (!splitmux->running || splitmux->num_parts < 1) { + /* Not started yet */ + SPLITMUX_SRC_UNLOCK (splitmux); + goto error; + } + + gst_segment_copy_into (&splitmux->play_segment, &tmp); + + if (!gst_segment_do_seek (&tmp, rate, + format, flags, start_type, start, stop_type, stop, NULL)) { + /* Invalid seek requested, ignore it */ + SPLITMUX_SRC_UNLOCK (splitmux); + goto error; + } + position = tmp.position; + + GST_DEBUG_OBJECT (splitmux, "Performing seek with seg %" + GST_SEGMENT_FORMAT, &tmp); + + GST_DEBUG_OBJECT (splitmux, + "Handling flushing seek. Sending flush start"); + + /* Send flush_start */ + gst_splitmux_push_event (splitmux, gst_event_new_flush_start (), seqnum); + + /* Stop all parts, which will work because of the flush */ + SPLITMUX_SRC_PADS_LOCK (splitmux); + SPLITMUX_SRC_UNLOCK (splitmux); + for (cur = g_list_first (splitmux->pads); + cur != NULL; cur = g_list_next (cur)) { + SplitMuxSrcPad *target = (SplitMuxSrcPad *) (cur->data); + GstSplitMuxPartReader *reader = splitmux->parts[target->cur_part]; + gst_splitmux_part_reader_deactivate (reader); + } + + /* Shut down pad tasks */ + GST_DEBUG_OBJECT (splitmux, "Pausing pad tasks"); + for (cur = g_list_first (splitmux->pads); + cur != NULL; cur = g_list_next (cur)) { + GstPad *splitpad = (GstPad *) (cur->data); + gst_pad_pause_task (GST_PAD (splitpad)); + } + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + SPLITMUX_SRC_LOCK (splitmux); + + /* Send flush stop */ + GST_DEBUG_OBJECT (splitmux, "Sending flush stop"); + gst_splitmux_push_flush_stop (splitmux, seqnum); + + /* Everything is stopped, so update the play_segment */ + gst_segment_copy_into (&tmp, &splitmux->play_segment); + + /* Work out where to start from now */ + for (i = 0; i < splitmux->num_parts; i++) { + GstSplitMuxPartReader *reader = splitmux->parts[i]; + GstClockTime part_end = + gst_splitmux_part_reader_get_end_offset (reader); + + if (part_end > position) + break; + } + if (i == splitmux->num_parts) + i = splitmux->num_parts - 1; + + part_start = + gst_splitmux_part_reader_get_start_offset (splitmux->parts[i]); + + GST_DEBUG_OBJECT (splitmux, + "Seek to time %" GST_TIME_FORMAT " landed in part %d offset %" + GST_TIME_FORMAT, GST_TIME_ARGS (position), + i, GST_TIME_ARGS (position - part_start)); + + ret = gst_splitmux_src_activate_part (splitmux, i); + SPLITMUX_SRC_UNLOCK (splitmux); + } + default: + break; + } + + gst_event_unref (event); +error: + return ret; +} + +static gboolean +splitmux_src_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) +{ + /* Query handler for source pads. Proxy queries into the child + * parts as needed + */ + GstSplitMuxSrc *splitmux = GST_SPLITMUX_SRC (parent); + gboolean ret = FALSE; + + GST_LOG_OBJECT (parent, "query %" GST_PTR_FORMAT + " on %" GST_PTR_FORMAT, query, pad); + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_CAPS: + case GST_QUERY_POSITION:{ + GstSplitMuxPartReader *part; + SplitMuxSrcPad *anypad; + + SPLITMUX_SRC_LOCK (splitmux); + SPLITMUX_SRC_PADS_LOCK (splitmux); + anypad = (SplitMuxSrcPad *) (splitmux->pads->data); + part = splitmux->parts[anypad->cur_part]; + ret = gst_splitmux_part_reader_src_query (part, pad, query); + SPLITMUX_SRC_PADS_UNLOCK (splitmux); + SPLITMUX_SRC_UNLOCK (splitmux); + break; + } + case GST_QUERY_DURATION:{ + GstFormat fmt; + gst_query_parse_duration (query, &fmt, NULL); + if (fmt != GST_FORMAT_TIME) + break; + + GST_OBJECT_LOCK (splitmux); + if (splitmux->total_duration > 0) { + gst_query_set_duration (query, GST_FORMAT_TIME, + splitmux->total_duration); + ret = TRUE; + } + GST_OBJECT_UNLOCK (splitmux); + break; + } + case GST_QUERY_SEEKING:{ + GstFormat format; + + gst_query_parse_seeking (query, &format, NULL, NULL, NULL); + if (format != GST_FORMAT_TIME) + break; + + GST_OBJECT_LOCK (splitmux); + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, + splitmux->total_duration); + ret = TRUE; + GST_OBJECT_UNLOCK (splitmux); + + break; + } + default: + break; + } + return ret; +} + + +gboolean +register_splitmuxsrc (GstPlugin * plugin) +{ + GST_DEBUG_CATEGORY_INIT (splitmux_debug, "splitmuxsrc", 0, + "Split File Demuxing Source"); + + return gst_element_register (plugin, "splitmuxsrc", GST_RANK_NONE, + GST_TYPE_SPLITMUX_SRC); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsrc.h gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsrc.h --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitmuxsrc.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitmuxsrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,108 @@ +/* GStreamer Split Muxed File Source + * Copyright (C) 2014 Jan Schmidt + * + * 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_SPLITMUX_SRC_H__ +#define __GST_SPLITMUX_SRC_H__ + +#include + +#include "gstsplitmuxpartreader.h" + +G_BEGIN_DECLS + +#define GST_TYPE_SPLITMUX_SRC \ + (gst_splitmux_src_get_type()) +#define GST_SPLITMUX_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPLITMUX_SRC,GstSplitMuxSrc)) +#define GST_SPLITMUX_SRC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPLITMUX_SRC,GstSplitMuxSrcClass)) +#define GST_IS_SPLITMUX_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPLITMUX_SRC)) +#define GST_IS_SPLITMUX_SRC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPLITMUX_SRC)) + +typedef struct _GstSplitMuxSrc GstSplitMuxSrc; +typedef struct _GstSplitMuxSrcClass GstSplitMuxSrcClass; + +struct _GstSplitMuxSrc +{ + GstBin parent; + + GMutex lock; + gboolean running; + + gchar *location; /* OBJECT_LOCK */ + + GstSplitMuxPartReader **parts; + guint num_parts; + guint cur_part; + + gboolean pads_complete; + GMutex pads_lock; + GList *pads; /* pads_lock */ + + GstClockTime total_duration; + GstSegment play_segment; +}; + +struct _GstSplitMuxSrcClass +{ + GstBinClass parent_class; +}; + +GType splitmux_src_pad_get_type (void); +#define SPLITMUX_TYPE_SRC_PAD splitmux_src_pad_get_type() +#define SPLITMUX_SRC_PAD_CAST(p) ((SplitMuxSrcPad *)(p)) +#define SPLITMUX_SRC_PAD(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),SPLITMUX_TYPE_SRC_PAD,SplitMuxSrcPad)) + +struct _SplitMuxSrcPad +{ + GstPad parent; + + guint cur_part; + GstSplitMuxPartReader *reader; + GstPad *part_pad; + + GstSegment segment; + + gboolean set_next_discont; + gboolean clear_next_discont; + + gboolean sent_stream_start; + gboolean sent_caps; + gboolean sent_segment; +}; + +struct _SplitMuxSrcPadClass +{ + GstPadClass parent; +}; + +GType gst_splitmux_src_get_type (void); +gboolean register_splitmuxsrc (GstPlugin * plugin); + +#define SPLITMUX_SRC_LOCK(s) g_mutex_lock(&(s)->lock) +#define SPLITMUX_SRC_UNLOCK(s) g_mutex_unlock(&(s)->lock) + +#define SPLITMUX_SRC_PADS_LOCK(s) g_mutex_lock(&(s)->pads_lock) +#define SPLITMUX_SRC_PADS_UNLOCK(s) g_mutex_unlock(&(s)->pads_lock) + +G_END_DECLS + +#endif /* __GST_SPLITMUX_SRC_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitutils.c gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitutils.c --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitutils.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitutils.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,105 @@ +/* GStreamer Split Source Utility Functions + * Copyright (C) 2011 Collabora Ltd. + * Copyright (C) 2014 Jan Schmidt + * + * 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 + +#include "gstsplitutils.h" +#include "patternspec.h" + +static int +gst_split_util_array_sortfunc (gchar ** a, gchar ** b) +{ + return strcmp (*a, *b); +} + +gchar ** +gst_split_util_find_files (const gchar * dirname, + const gchar * basename, GError ** err) +{ + PatternSpec *pspec; + GPtrArray *files; + const gchar *name; + GDir *dir; + + if (dirname == NULL || basename == NULL) + goto invalid_location; + + GST_INFO ("checking in directory '%s' for pattern '%s'", dirname, basename); + + dir = g_dir_open (dirname, 0, err); + if (dir == NULL) + return NULL; + + if (DEFAULT_PATTERN_MATCH_MODE == MATCH_MODE_UTF8 && + !g_utf8_validate (basename, -1, NULL)) { + goto not_utf8; + } + + /* mode will be AUTO on linux/unix and UTF8 on win32 */ + pspec = pattern_spec_new (basename, DEFAULT_PATTERN_MATCH_MODE); + + files = g_ptr_array_new (); + + while ((name = g_dir_read_name (dir))) { + GST_TRACE ("check: %s", name); + if (pattern_match_string (pspec, name)) { + GST_DEBUG ("match: %s", name); + g_ptr_array_add (files, g_build_filename (dirname, name, NULL)); + } + } + + if (files->len == 0) + goto no_matches; + + g_ptr_array_sort (files, (GCompareFunc) gst_split_util_array_sortfunc); + g_ptr_array_add (files, NULL); + + pattern_spec_free (pspec); + g_dir_close (dir); + + return (gchar **) g_ptr_array_free (files, FALSE); + +/* ERRORS */ +invalid_location: + { + g_set_error_literal (err, G_FILE_ERROR, G_FILE_ERROR_INVAL, + "No filename specified."); + return NULL; + } +not_utf8: + { + g_dir_close (dir); + g_set_error_literal (err, G_FILE_ERROR, G_FILE_ERROR_INVAL, + "Filename pattern must be UTF-8 on Windows."); + return NULL; + } +no_matches: + { + pattern_spec_free (pspec); + g_dir_close (dir); + g_set_error_literal (err, G_FILE_ERROR, G_FILE_ERROR_NOENT, + "Found no files matching the pattern."); + return NULL; + } +} diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitutils.h gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitutils.h --- gst-plugins-good1.0-1.4.3/gst/multifile/gstsplitutils.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/gstsplitutils.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,40 @@ +/* GStreamer Split Source Utility Functions + * Copyright (C) 2011 Collabora Ltd. + * Copyright (C) 2014 Jan Schmidt + * + * 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_SPLITUTILS_H__ +#define __GST_SPLITUTILS_H__ + +#include + +G_BEGIN_DECLS + +#ifdef G_OS_WIN32 +#define DEFAULT_PATTERN_MATCH_MODE MATCH_MODE_UTF8 +#else +#define DEFAULT_PATTERN_MATCH_MODE MATCH_MODE_AUTO +#endif + +gchar ** +gst_split_util_find_files (const gchar * dirname, + const gchar * basename, GError ** err); + +G_END_DECLS + +#endif diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/Makefile.am gst-plugins-good1.0-1.6.1/gst/multifile/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/multifile/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -6,25 +6,27 @@ gstmultifilesrc.c \ gstmultifile.c \ gstsplitfilesrc.c \ + gstsplitmuxsink.c \ + gstsplitmuxpartreader.c \ + gstsplitmuxsrc.c \ + gstsplitutils.c \ patternspec.c libgstmultifile_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) libgstmultifile_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) libgstmultifile_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmultifile_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) -noinst_HEADERS = gstmultifilesrc.h gstmultifilesink.h gstsplitfilesrc.h patternspec.h +noinst_HEADERS = gstmultifilesrc.h gstmultifilesink.h gstsplitfilesrc.h gstsplitmuxsink.h \ + gstsplitmuxsrc.h gstsplitmuxpartreader.h gstsplitutils.h patternspec.h +noinst_PROGRAMS = test-splitmux-part-reader -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstmultifile -:SHARED libgstmultifile \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmultifile_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultifile_la_CFLAGS) \ - -:LDFLAGS $(libgstmultifile_la_LDFLAGS) \ - $(libgstmultifile_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ +test_splitmux_part_reader_SOURCES = \ + test-splitmuxpartreader.c \ + gstsplitmuxpartreader.c \ + gstsplitmuxsrc.c \ + gstsplitutils.c \ + patternspec.c +test_splitmux_part_reader_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) +test_splitmux_part_reader_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) +test_splitmux_part_reader_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/Makefile.in gst-plugins-good1.0-1.6.1/gst/multifile/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/multifile/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,8 +15,19 @@ @SET_MAKE@ + VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,9 +91,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +noinst_PROGRAMS = test-splitmux-part-reader$(EXEEXT) subdir = gst/multifile -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 \ @@ -104,7 +114,6 @@ $(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 \ @@ -119,6 +128,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -161,6 +172,10 @@ libgstmultifile_la-gstmultifilesrc.lo \ libgstmultifile_la-gstmultifile.lo \ libgstmultifile_la-gstsplitfilesrc.lo \ + libgstmultifile_la-gstsplitmuxsink.lo \ + libgstmultifile_la-gstsplitmuxpartreader.lo \ + libgstmultifile_la-gstsplitmuxsrc.lo \ + libgstmultifile_la-gstsplitutils.lo \ libgstmultifile_la-patternspec.lo libgstmultifile_la_OBJECTS = $(am_libgstmultifile_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -171,6 +186,22 @@ $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(libgstmultifile_la_CFLAGS) $(CFLAGS) \ $(libgstmultifile_la_LDFLAGS) $(LDFLAGS) -o $@ +PROGRAMS = $(noinst_PROGRAMS) +am_test_splitmux_part_reader_OBJECTS = \ + test_splitmux_part_reader-test-splitmuxpartreader.$(OBJEXT) \ + test_splitmux_part_reader-gstsplitmuxpartreader.$(OBJEXT) \ + test_splitmux_part_reader-gstsplitmuxsrc.$(OBJEXT) \ + test_splitmux_part_reader-gstsplitutils.$(OBJEXT) \ + test_splitmux_part_reader-patternspec.$(OBJEXT) +test_splitmux_part_reader_OBJECTS = \ + $(am_test_splitmux_part_reader_OBJECTS) +test_splitmux_part_reader_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +test_splitmux_part_reader_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) \ + $(test_splitmux_part_reader_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 @@ -205,8 +236,10 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(libgstmultifile_la_SOURCES) -DIST_SOURCES = $(libgstmultifile_la_SOURCES) +SOURCES = $(libgstmultifile_la_SOURCES) \ + $(test_splitmux_part_reader_SOURCES) +DIST_SOURCES = $(libgstmultifile_la_SOURCES) \ + $(test_splitmux_part_reader_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -232,6 +265,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -364,9 +398,6 @@ 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@ @@ -484,17 +515,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -547,6 +578,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -565,13 +597,29 @@ gstmultifilesrc.c \ gstmultifile.c \ gstsplitfilesrc.c \ + gstsplitmuxsink.c \ + gstsplitmuxpartreader.c \ + gstsplitmuxsrc.c \ + gstsplitutils.c \ patternspec.c libgstmultifile_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) libgstmultifile_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) libgstmultifile_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmultifile_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) -noinst_HEADERS = gstmultifilesrc.h gstmultifilesink.h gstsplitfilesrc.h patternspec.h +noinst_HEADERS = gstmultifilesrc.h gstmultifilesink.h gstsplitfilesrc.h gstsplitmuxsink.h \ + gstsplitmuxsrc.h gstsplitmuxpartreader.h gstsplitutils.h patternspec.h + +test_splitmux_part_reader_SOURCES = \ + test-splitmuxpartreader.c \ + gstsplitmuxpartreader.c \ + gstsplitmuxsrc.c \ + gstsplitutils.c \ + patternspec.c + +test_splitmux_part_reader_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) +test_splitmux_part_reader_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) +test_splitmux_part_reader_LDFLAGS = $(GST_PLUGIN_LDFLAGS) all: all-am .SUFFIXES: @@ -588,7 +636,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/multifile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/multifile/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -645,6 +692,19 @@ libgstmultifile.la: $(libgstmultifile_la_OBJECTS) $(libgstmultifile_la_DEPENDENCIES) $(EXTRA_libgstmultifile_la_DEPENDENCIES) $(AM_V_CCLD)$(libgstmultifile_la_LINK) -rpath $(plugindir) $(libgstmultifile_la_OBJECTS) $(libgstmultifile_la_LIBADD) $(LIBS) +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 + +test-splitmux-part-reader$(EXEEXT): $(test_splitmux_part_reader_OBJECTS) $(test_splitmux_part_reader_DEPENDENCIES) $(EXTRA_test_splitmux_part_reader_DEPENDENCIES) + @rm -f test-splitmux-part-reader$(EXEEXT) + $(AM_V_CCLD)$(test_splitmux_part_reader_LINK) $(test_splitmux_part_reader_OBJECTS) $(test_splitmux_part_reader_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -655,7 +715,16 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-gstmultifilesink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-gstmultifilesrc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-gstsplitfilesrc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-gstsplitmuxpartreader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-gstsplitmuxsink.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-gstsplitmuxsrc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-gstsplitutils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmultifile_la-patternspec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_splitmux_part_reader-gstsplitmuxpartreader.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_splitmux_part_reader-gstsplitmuxsrc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_splitmux_part_reader-gstsplitutils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_splitmux_part_reader-patternspec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_splitmux_part_reader-test-splitmuxpartreader.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -709,6 +778,34 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -c -o libgstmultifile_la-gstsplitfilesrc.lo `test -f 'gstsplitfilesrc.c' || echo '$(srcdir)/'`gstsplitfilesrc.c +libgstmultifile_la-gstsplitmuxsink.lo: gstsplitmuxsink.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -MT libgstmultifile_la-gstsplitmuxsink.lo -MD -MP -MF $(DEPDIR)/libgstmultifile_la-gstsplitmuxsink.Tpo -c -o libgstmultifile_la-gstsplitmuxsink.lo `test -f 'gstsplitmuxsink.c' || echo '$(srcdir)/'`gstsplitmuxsink.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstmultifile_la-gstsplitmuxsink.Tpo $(DEPDIR)/libgstmultifile_la-gstsplitmuxsink.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitmuxsink.c' object='libgstmultifile_la-gstsplitmuxsink.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 $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -c -o libgstmultifile_la-gstsplitmuxsink.lo `test -f 'gstsplitmuxsink.c' || echo '$(srcdir)/'`gstsplitmuxsink.c + +libgstmultifile_la-gstsplitmuxpartreader.lo: gstsplitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -MT libgstmultifile_la-gstsplitmuxpartreader.lo -MD -MP -MF $(DEPDIR)/libgstmultifile_la-gstsplitmuxpartreader.Tpo -c -o libgstmultifile_la-gstsplitmuxpartreader.lo `test -f 'gstsplitmuxpartreader.c' || echo '$(srcdir)/'`gstsplitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstmultifile_la-gstsplitmuxpartreader.Tpo $(DEPDIR)/libgstmultifile_la-gstsplitmuxpartreader.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitmuxpartreader.c' object='libgstmultifile_la-gstsplitmuxpartreader.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 $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -c -o libgstmultifile_la-gstsplitmuxpartreader.lo `test -f 'gstsplitmuxpartreader.c' || echo '$(srcdir)/'`gstsplitmuxpartreader.c + +libgstmultifile_la-gstsplitmuxsrc.lo: gstsplitmuxsrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -MT libgstmultifile_la-gstsplitmuxsrc.lo -MD -MP -MF $(DEPDIR)/libgstmultifile_la-gstsplitmuxsrc.Tpo -c -o libgstmultifile_la-gstsplitmuxsrc.lo `test -f 'gstsplitmuxsrc.c' || echo '$(srcdir)/'`gstsplitmuxsrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstmultifile_la-gstsplitmuxsrc.Tpo $(DEPDIR)/libgstmultifile_la-gstsplitmuxsrc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitmuxsrc.c' object='libgstmultifile_la-gstsplitmuxsrc.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 $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -c -o libgstmultifile_la-gstsplitmuxsrc.lo `test -f 'gstsplitmuxsrc.c' || echo '$(srcdir)/'`gstsplitmuxsrc.c + +libgstmultifile_la-gstsplitutils.lo: gstsplitutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -MT libgstmultifile_la-gstsplitutils.lo -MD -MP -MF $(DEPDIR)/libgstmultifile_la-gstsplitutils.Tpo -c -o libgstmultifile_la-gstsplitutils.lo `test -f 'gstsplitutils.c' || echo '$(srcdir)/'`gstsplitutils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstmultifile_la-gstsplitutils.Tpo $(DEPDIR)/libgstmultifile_la-gstsplitutils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitutils.c' object='libgstmultifile_la-gstsplitutils.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 $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -c -o libgstmultifile_la-gstsplitutils.lo `test -f 'gstsplitutils.c' || echo '$(srcdir)/'`gstsplitutils.c + libgstmultifile_la-patternspec.lo: patternspec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -MT libgstmultifile_la-patternspec.lo -MD -MP -MF $(DEPDIR)/libgstmultifile_la-patternspec.Tpo -c -o libgstmultifile_la-patternspec.lo `test -f 'patternspec.c' || echo '$(srcdir)/'`patternspec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstmultifile_la-patternspec.Tpo $(DEPDIR)/libgstmultifile_la-patternspec.Plo @@ -716,6 +813,76 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmultifile_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmultifile_la_CFLAGS) $(CFLAGS) -c -o libgstmultifile_la-patternspec.lo `test -f 'patternspec.c' || echo '$(srcdir)/'`patternspec.c +test_splitmux_part_reader-test-splitmuxpartreader.o: test-splitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-test-splitmuxpartreader.o -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-test-splitmuxpartreader.Tpo -c -o test_splitmux_part_reader-test-splitmuxpartreader.o `test -f 'test-splitmuxpartreader.c' || echo '$(srcdir)/'`test-splitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-test-splitmuxpartreader.Tpo $(DEPDIR)/test_splitmux_part_reader-test-splitmuxpartreader.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-splitmuxpartreader.c' object='test_splitmux_part_reader-test-splitmuxpartreader.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-test-splitmuxpartreader.o `test -f 'test-splitmuxpartreader.c' || echo '$(srcdir)/'`test-splitmuxpartreader.c + +test_splitmux_part_reader-test-splitmuxpartreader.obj: test-splitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-test-splitmuxpartreader.obj -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-test-splitmuxpartreader.Tpo -c -o test_splitmux_part_reader-test-splitmuxpartreader.obj `if test -f 'test-splitmuxpartreader.c'; then $(CYGPATH_W) 'test-splitmuxpartreader.c'; else $(CYGPATH_W) '$(srcdir)/test-splitmuxpartreader.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-test-splitmuxpartreader.Tpo $(DEPDIR)/test_splitmux_part_reader-test-splitmuxpartreader.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-splitmuxpartreader.c' object='test_splitmux_part_reader-test-splitmuxpartreader.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-test-splitmuxpartreader.obj `if test -f 'test-splitmuxpartreader.c'; then $(CYGPATH_W) 'test-splitmuxpartreader.c'; else $(CYGPATH_W) '$(srcdir)/test-splitmuxpartreader.c'; fi` + +test_splitmux_part_reader-gstsplitmuxpartreader.o: gstsplitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-gstsplitmuxpartreader.o -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxpartreader.Tpo -c -o test_splitmux_part_reader-gstsplitmuxpartreader.o `test -f 'gstsplitmuxpartreader.c' || echo '$(srcdir)/'`gstsplitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxpartreader.Tpo $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxpartreader.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitmuxpartreader.c' object='test_splitmux_part_reader-gstsplitmuxpartreader.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-gstsplitmuxpartreader.o `test -f 'gstsplitmuxpartreader.c' || echo '$(srcdir)/'`gstsplitmuxpartreader.c + +test_splitmux_part_reader-gstsplitmuxpartreader.obj: gstsplitmuxpartreader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-gstsplitmuxpartreader.obj -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxpartreader.Tpo -c -o test_splitmux_part_reader-gstsplitmuxpartreader.obj `if test -f 'gstsplitmuxpartreader.c'; then $(CYGPATH_W) 'gstsplitmuxpartreader.c'; else $(CYGPATH_W) '$(srcdir)/gstsplitmuxpartreader.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxpartreader.Tpo $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxpartreader.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitmuxpartreader.c' object='test_splitmux_part_reader-gstsplitmuxpartreader.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-gstsplitmuxpartreader.obj `if test -f 'gstsplitmuxpartreader.c'; then $(CYGPATH_W) 'gstsplitmuxpartreader.c'; else $(CYGPATH_W) '$(srcdir)/gstsplitmuxpartreader.c'; fi` + +test_splitmux_part_reader-gstsplitmuxsrc.o: gstsplitmuxsrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-gstsplitmuxsrc.o -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxsrc.Tpo -c -o test_splitmux_part_reader-gstsplitmuxsrc.o `test -f 'gstsplitmuxsrc.c' || echo '$(srcdir)/'`gstsplitmuxsrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxsrc.Tpo $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxsrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitmuxsrc.c' object='test_splitmux_part_reader-gstsplitmuxsrc.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-gstsplitmuxsrc.o `test -f 'gstsplitmuxsrc.c' || echo '$(srcdir)/'`gstsplitmuxsrc.c + +test_splitmux_part_reader-gstsplitmuxsrc.obj: gstsplitmuxsrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-gstsplitmuxsrc.obj -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxsrc.Tpo -c -o test_splitmux_part_reader-gstsplitmuxsrc.obj `if test -f 'gstsplitmuxsrc.c'; then $(CYGPATH_W) 'gstsplitmuxsrc.c'; else $(CYGPATH_W) '$(srcdir)/gstsplitmuxsrc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxsrc.Tpo $(DEPDIR)/test_splitmux_part_reader-gstsplitmuxsrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitmuxsrc.c' object='test_splitmux_part_reader-gstsplitmuxsrc.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-gstsplitmuxsrc.obj `if test -f 'gstsplitmuxsrc.c'; then $(CYGPATH_W) 'gstsplitmuxsrc.c'; else $(CYGPATH_W) '$(srcdir)/gstsplitmuxsrc.c'; fi` + +test_splitmux_part_reader-gstsplitutils.o: gstsplitutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-gstsplitutils.o -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-gstsplitutils.Tpo -c -o test_splitmux_part_reader-gstsplitutils.o `test -f 'gstsplitutils.c' || echo '$(srcdir)/'`gstsplitutils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-gstsplitutils.Tpo $(DEPDIR)/test_splitmux_part_reader-gstsplitutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitutils.c' object='test_splitmux_part_reader-gstsplitutils.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-gstsplitutils.o `test -f 'gstsplitutils.c' || echo '$(srcdir)/'`gstsplitutils.c + +test_splitmux_part_reader-gstsplitutils.obj: gstsplitutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-gstsplitutils.obj -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-gstsplitutils.Tpo -c -o test_splitmux_part_reader-gstsplitutils.obj `if test -f 'gstsplitutils.c'; then $(CYGPATH_W) 'gstsplitutils.c'; else $(CYGPATH_W) '$(srcdir)/gstsplitutils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-gstsplitutils.Tpo $(DEPDIR)/test_splitmux_part_reader-gstsplitutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsplitutils.c' object='test_splitmux_part_reader-gstsplitutils.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-gstsplitutils.obj `if test -f 'gstsplitutils.c'; then $(CYGPATH_W) 'gstsplitutils.c'; else $(CYGPATH_W) '$(srcdir)/gstsplitutils.c'; fi` + +test_splitmux_part_reader-patternspec.o: patternspec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-patternspec.o -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-patternspec.Tpo -c -o test_splitmux_part_reader-patternspec.o `test -f 'patternspec.c' || echo '$(srcdir)/'`patternspec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-patternspec.Tpo $(DEPDIR)/test_splitmux_part_reader-patternspec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='patternspec.c' object='test_splitmux_part_reader-patternspec.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-patternspec.o `test -f 'patternspec.c' || echo '$(srcdir)/'`patternspec.c + +test_splitmux_part_reader-patternspec.obj: patternspec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -MT test_splitmux_part_reader-patternspec.obj -MD -MP -MF $(DEPDIR)/test_splitmux_part_reader-patternspec.Tpo -c -o test_splitmux_part_reader-patternspec.obj `if test -f 'patternspec.c'; then $(CYGPATH_W) 'patternspec.c'; else $(CYGPATH_W) '$(srcdir)/patternspec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_splitmux_part_reader-patternspec.Tpo $(DEPDIR)/test_splitmux_part_reader-patternspec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='patternspec.c' object='test_splitmux_part_reader-patternspec.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) $(test_splitmux_part_reader_CFLAGS) $(CFLAGS) -c -o test_splitmux_part_reader-patternspec.obj `if test -f 'patternspec.c'; then $(CYGPATH_W) 'patternspec.c'; else $(CYGPATH_W) '$(srcdir)/patternspec.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -806,7 +973,7 @@ done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -843,8 +1010,8 @@ @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + clean-pluginLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -915,34 +1082,22 @@ .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 libgstmultifile -:SHARED libgstmultifile \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmultifile_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultifile_la_CFLAGS) \ - -:LDFLAGS $(libgstmultifile_la_LDFLAGS) \ - $(libgstmultifile_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ + clean-libtool clean-noinstPROGRAMS 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 + +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/gst/multifile/test-splitmuxpartreader.c gst-plugins-good1.0-1.6.1/gst/multifile/test-splitmuxpartreader.c --- gst-plugins-good1.0-1.4.3/gst/multifile/test-splitmuxpartreader.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multifile/test-splitmuxpartreader.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,104 @@ +#include +#include "gstsplitmuxpartreader.h" +#include "gstsplitmuxsrc.h" + +GST_DEBUG_CATEGORY_EXTERN (splitmux_debug); + +static const gchar *const path = "out001.mp4"; + +typedef struct _CustomData +{ + GstSplitMuxPartReader *reader; + GMainLoop *main_loop; + GstBus *bus; +} CustomData; + +static void +part_prepared (GstSplitMuxPartReader * reader) +{ + g_print ("Part prepared\n"); +} + +static gboolean +handle_message (GstBus * bus, GstMessage * msg, CustomData * data) +{ + GError *err; + gchar *debug_info; + + switch (GST_MESSAGE_TYPE (msg)) { + case GST_MESSAGE_ERROR: + gst_message_parse_error (msg, &err, &debug_info); + g_print ("Error received from element %s: %s\n", + GST_OBJECT_NAME (msg->src), err->message); + g_print ("Debugging information: %s\n", debug_info ? debug_info : "none"); + g_clear_error (&err); + g_free (debug_info); + g_main_loop_quit (data->main_loop); + break; + case GST_MESSAGE_EOS: + g_print ("End-Of-Stream reached.\n"); + g_main_loop_quit (data->main_loop); + break; + default: + break; + } + + return TRUE; +} + +static gboolean +start_reader (CustomData * data) +{ + g_print ("Preparing part reader for %s\n", path); + gst_splitmux_part_reader_prepare (data->reader); + return FALSE; +} + +static GstPad * +handle_get_pad (GstSplitMuxPartReader * reader, GstPad * src_pad, + CustomData * data) +{ + /* Create a dummy target pad for the reader */ + GstPad *new_pad = g_object_new (SPLITMUX_TYPE_SRC_PAD, + "name", GST_PAD_NAME (src_pad), "direction", GST_PAD_SRC, NULL); + + g_print ("Creating new dummy pad %s\n", GST_PAD_NAME (src_pad)); + + return new_pad; +} + +int +main (int argc, char **argv) +{ + CustomData data; + + gst_init (&argc, &argv); + + data.main_loop = g_main_loop_new (NULL, FALSE); + + data.reader = g_object_new (GST_TYPE_SPLITMUX_PART_READER, NULL); + data.bus = gst_element_get_bus (GST_ELEMENT_CAST (data.reader)); + + /* Listen for bus messages */ + gst_bus_add_watch (data.bus, (GstBusFunc) handle_message, &data); + + gst_splitmux_part_reader_set_location (data.reader, path); + + /* Connect to prepare signal */ + g_signal_connect (data.reader, "prepared", (GCallback) part_prepared, &data); + gst_splitmux_part_reader_set_callbacks (data.reader, &data, + (GstSplitMuxPartReaderPadCb) handle_get_pad); + + g_idle_add ((GSourceFunc) start_reader, &data); + + /* Run mainloop */ + g_main_loop_run (data.main_loop); + + gst_splitmux_part_reader_unprepare (data.reader); + + g_main_loop_unref (data.main_loop); + gst_object_unref (data.bus); + g_object_unref (data.reader); + + return 0; +} diff -Nru gst-plugins-good1.0-1.4.3/gst/multipart/Makefile.am gst-plugins-good1.0-1.6.1/gst/multipart/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/multipart/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multipart/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -7,18 +7,3 @@ libgstmultipart_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = multipartdemux.h multipartmux.h - - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstmultipart -:SHARED libgstmultipart \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmultipart_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultipart_la_CFLAGS) \ - -:LDFLAGS $(libgstmultipart_la_LDFLAGS) \ - $(libgstmultipart_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/multipart/Makefile.in gst-plugins-good1.0-1.6.1/gst/multipart/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/multipart/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multipart/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/multipart -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -578,7 +586,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/multipart/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/multipart/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -903,20 +910,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstmultipart -:SHARED libgstmultipart \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstmultipart_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultipart_la_CFLAGS) \ - -:LDFLAGS $(libgstmultipart_la_LDFLAGS) \ - $(libgstmultipart_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/multipart/multipartdemux.c gst-plugins-good1.0-1.6.1/gst/multipart/multipartdemux.c --- gst-plugins-good1.0-1.4.3/gst/multipart/multipartdemux.c 2014-09-19 06:38:50.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multipart/multipartdemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -322,7 +322,6 @@ gst_pad_use_fixed_caps (pad); gst_pad_set_active (pad, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (demux), pad); /* prepare and send stream-start */ if (!demux->have_group_id) { @@ -346,7 +345,7 @@ if (demux->have_group_id) gst_event_set_group_id (event, demux->group_id); - gst_pad_push_event (pad, event); + gst_pad_store_sticky_event (pad, event); g_free (stream_id); gst_event_unref (event); @@ -355,6 +354,7 @@ caps = gst_caps_from_string (capsname); GST_DEBUG_OBJECT (demux, "caps for pad: %s", capsname); gst_pad_set_caps (pad, caps); + gst_element_add_pad (GST_ELEMENT_CAST (demux), pad); gst_caps_unref (caps); if (created) { diff -Nru gst-plugins-good1.0-1.4.3/gst/multipart/multipartmux.c gst-plugins-good1.0-1.6.1/gst/multipart/multipartmux.c --- gst-plugins-good1.0-1.4.3/gst/multipart/multipartmux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/multipart/multipartmux.c 2015-10-22 08:02:54.000000000 +0000 @@ -47,8 +47,8 @@ enum { - ARG_0, - ARG_BOUNDARY + PROP_0, + PROP_BOUNDARY /* FILL ME */ }; @@ -114,7 +114,7 @@ gobject_class->get_property = gst_multipart_mux_get_property; gobject_class->set_property = gst_multipart_mux_set_property; - g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BOUNDARY, + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BOUNDARY, g_param_spec_string ("boundary", "Boundary", "Boundary string", DEFAULT_BOUNDARY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -153,8 +153,8 @@ multipart_mux->collect = gst_collect_pads_new (); gst_collect_pads_set_event_function (multipart_mux->collect, - (GstCollectPadsEventFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_sink_event), - multipart_mux); + (GstCollectPadsEventFunction) + GST_DEBUG_FUNCPTR (gst_multipart_mux_sink_event), multipart_mux); gst_collect_pads_set_function (multipart_mux->collect, (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_collected), multipart_mux); @@ -600,7 +600,7 @@ mux = GST_MULTIPART_MUX (object); switch (prop_id) { - case ARG_BOUNDARY: + case PROP_BOUNDARY: g_value_set_string (value, mux->boundary); break; default: @@ -618,7 +618,7 @@ mux = GST_MULTIPART_MUX (object); switch (prop_id) { - case ARG_BOUNDARY: + case PROP_BOUNDARY: g_free (mux->boundary); mux->boundary = g_strdup (g_value_get_string (value)); break; diff -Nru gst-plugins-good1.0-1.4.3/gst/replaygain/Makefile.am gst-plugins-good1.0-1.6.1/gst/replaygain/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/replaygain/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/replaygain/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -21,18 +21,3 @@ gstrgvolume.h \ replaygain.h \ rganalysis.h - - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstreplaygain -:SHARED libgstreplaygain \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstreplaygain_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstreplaygain_la_CFLAGS) \ - -:LDFLAGS $(libgstreplaygain_la_LDFLAGS) \ - $(libgstreplaygain_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/replaygain/Makefile.in gst-plugins-good1.0-1.6.1/gst/replaygain/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/replaygain/Makefile.in 2014-09-24 07:25:59.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/replaygain/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/replaygain -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -231,6 +240,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -363,9 +373,6 @@ 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@ @@ -483,17 +490,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -546,6 +553,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -600,7 +608,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/replaygain/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/replaygain/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -941,20 +948,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstreplaygain -:SHARED libgstreplaygain \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstreplaygain_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstreplaygain_la_CFLAGS) \ - -:LDFLAGS $(libgstreplaygain_la_LDFLAGS) \ - $(libgstreplaygain_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstasteriskh263.c gst-plugins-good1.0-1.6.1/gst/rtp/gstasteriskh263.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstasteriskh263.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstasteriskh263.c 2015-10-22 08:02:54.000000000 +0000 @@ -169,7 +169,7 @@ gst_buffer_unmap (outbuf, &map); - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; if (!gst_pad_has_current_caps (asteriskh263->srcpad)) { GstCaps *caps; @@ -226,5 +226,5 @@ gst_asteriskh263_plugin_init (GstPlugin * plugin) { return gst_element_register (plugin, "asteriskh263", - GST_RANK_SECONDARY, GST_TYPE_ASTERISK_H263); + GST_RANK_NONE, GST_TYPE_ASTERISK_H263); } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpac3depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpac3depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpac3depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpac3depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -38,9 +38,11 @@ #endif #include +#include #include #include "gstrtpac3depay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpac3depay_debug); #define GST_CAT_DEFAULT (rtpac3depay_debug) @@ -67,7 +69,7 @@ static gboolean gst_rtp_ac3_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_ac3_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_ac3_depay_class_init (GstRtpAC3DepayClass * klass) @@ -89,7 +91,7 @@ "Wim Taymans "); gstrtpbasedepayload_class->set_caps = gst_rtp_ac3_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_ac3_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_ac3_depay_process; GST_DEBUG_CATEGORY_INIT (rtpac3depay_debug, "rtpac3depay", 0, "AC3 Audio RTP Depayloader"); @@ -123,22 +125,19 @@ } static GstBuffer * -gst_rtp_ac3_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_ac3_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpAC3Depay *rtpac3depay; GstBuffer *outbuf; - GstRTPBuffer rtp = { NULL, }; guint8 *payload; guint16 FT, NF; rtpac3depay = GST_RTP_AC3_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - if (gst_rtp_buffer_get_payload_len (&rtp) < 2) + if (gst_rtp_buffer_get_payload_len (rtp) < 2) goto empty_packet; - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); /* strip off header * @@ -154,13 +153,14 @@ GST_DEBUG_OBJECT (rtpac3depay, "FT: %d, NF: %d", FT, NF); /* We don't bother with fragmented packets yet */ - outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, 2, -1); - - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, 2, -1); - if (outbuf) + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpac3depay), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); GST_DEBUG_OBJECT (rtpac3depay, "pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); + } return outbuf; @@ -169,7 +169,6 @@ { GST_ELEMENT_WARNING (rtpac3depay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpac3pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpac3pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpac3pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpac3pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,7 @@ * * Example pipeline * |[ - * gst-launch -v audiotestsrc ! avenc_ac3 ! rtpac3pay ! udpsink + * gst-launch-1.0 -v audiotestsrc ! avenc_ac3 ! rtpac3pay ! udpsink * ]| This example pipeline will encode and payload AC3 stream. Refer to * the rtpac3depay example to depayload and decode the RTP stream. * @@ -40,8 +40,10 @@ #include #include +#include #include "gstrtpac3pay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpac3pay_debug); #define GST_CAT_DEFAULT (rtpac3pay_debug) @@ -260,6 +262,7 @@ guint payload_len; guint packet_len; GstRTPBuffer rtp = { NULL, }; + GstBuffer *payload_buffer; /* this will be the total length of the packet */ packet_len = gst_rtp_buffer_calc_packet_len (2 + avail, 0, 0); @@ -271,7 +274,7 @@ payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0); /* create buffer to hold the payload */ - outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); + outbuf = gst_rtp_buffer_new_allocate (2, 0, 0); if (FT == 0) { /* check if it all fits */ @@ -314,15 +317,20 @@ payload[1] = NF; payload_len -= 2; - gst_adapter_copy (rtpac3pay->adapter, &payload[2], 0, payload_len); - gst_adapter_flush (rtpac3pay->adapter, payload_len); - - avail -= payload_len; - if (avail == 0) + if (avail == payload_len) gst_rtp_buffer_set_marker (&rtp, TRUE); gst_rtp_buffer_unmap (&rtp); - GST_BUFFER_TIMESTAMP (outbuf) = rtpac3pay->first_ts; + payload_buffer = + gst_adapter_take_buffer_fast (rtpac3pay->adapter, payload_len); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpac3pay), outbuf, payload_buffer, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + + outbuf = gst_buffer_append (outbuf, payload_buffer); + + avail -= payload_len; + + GST_BUFFER_PTS (outbuf) = rtpac3pay->first_ts; GST_BUFFER_DURATION (outbuf) = rtpac3pay->duration; ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpac3pay), outbuf); @@ -347,7 +355,7 @@ gst_buffer_map (buffer, &map, GST_MAP_READ); duration = GST_BUFFER_DURATION (buffer); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); if (GST_BUFFER_IS_DISCONT (buffer)) { GST_DEBUG_OBJECT (rtpac3pay, "DISCONT"); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpamrdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpamrdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpamrdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpamrdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -44,10 +44,12 @@ #endif #include +#include #include #include #include "gstrtpamrdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpamrdepay_debug); #define GST_CAT_DEFAULT (rtpamrdepay_debug) @@ -61,7 +63,7 @@ enum { - ARG_0 + PROP_0 }; /* input is an RTP packet @@ -74,8 +76,7 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"audio\", " - "clock-rate = (int) 8000, " - "encoding-name = (string) \"AMR\", " + "clock-rate = (int) 8000, " "encoding-name = (string) \"AMR\", " /* This is the default, so the peer doesn't have to specify it * "encoding-params = (string) \"1\", " */ /* NOTE that all values must be strings in orde to be able to do SDP <-> @@ -94,8 +95,7 @@ */ "application/x-rtp, " "media = (string) \"audio\", " - "clock-rate = (int) 16000, " - "encoding-name = (string) \"AMR-WB\", " + "clock-rate = (int) 16000, " "encoding-name = (string) \"AMR-WB\", " /* This is the default, so the peer doesn't have to specify it * "encoding-params = (string) \"1\", " */ /* NOTE that all values must be strings in orde to be able to do SDP <-> @@ -126,7 +126,7 @@ static gboolean gst_rtp_amr_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); #define gst_rtp_amr_depay_parent_class parent_class G_DEFINE_TYPE (GstRtpAMRDepay, gst_rtp_amr_depay, GST_TYPE_RTP_BASE_DEPAYLOAD); @@ -150,7 +150,7 @@ "Extracts AMR or AMR-WB audio from RTP packets (RFC 3267)", "Wim Taymans "); - gstrtpbasedepayload_class->process = gst_rtp_amr_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_amr_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_amr_depay_setcaps; GST_DEBUG_CATEGORY_INIT (rtpamrdepay_debug, "rtpamrdepay", 0, @@ -283,13 +283,12 @@ }; static GstBuffer * -gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpAMRDepay *rtpamrdepay; const gint *frame_size; GstBuffer *outbuf = NULL; gint payload_len; - GstRTPBuffer rtp = { NULL }; GstMapInfo map; rtpamrdepay = GST_RTP_AMR_DEPAY (depayload); @@ -300,8 +299,6 @@ else frame_size = wb_frame_size; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - /* when we get here, 1 channel, 8000/16000 Hz, octet aligned, no CRC, * no robust sorting, no interleaving data is to be depayloaded */ { @@ -309,14 +306,15 @@ gint i, num_packets, num_nonempty_packets; gint amr_len; gint ILL, ILP; + GstBuffer *buf; - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); /* need at least 2 bytes for the header */ if (payload_len < 2) goto too_small; - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); /* depay CMR. The CMR is used by the sender to request * a new encoding mode. @@ -421,7 +419,7 @@ /* we can set the duration because each packet is 20 milliseconds */ GST_BUFFER_DURATION (outbuf) = num_packets * 20 * GST_MSECOND; - if (gst_rtp_buffer_get_marker (&rtp)) { + if (gst_rtp_buffer_get_marker (rtp)) { /* marker bit marks a buffer after a talkspurt. */ GST_DEBUG_OBJECT (depayload, "marker bit was set"); GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); @@ -429,9 +427,13 @@ GST_DEBUG_OBJECT (depayload, "pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); + + buf = gst_rtp_buffer_get_payload_buffer (rtp); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpamrdepay), outbuf, buf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + gst_buffer_unref (buf); } - gst_rtp_buffer_unmap (&rtp); return outbuf; /* ERRORS */ @@ -468,7 +470,6 @@ bad_packet: { /* no fatal error */ - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpamrpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpamrpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpamrpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpamrpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,7 @@ * * Example pipeline * |[ - * gst-launch -v audiotestsrc ! amrnbenc ! rtpamrpay ! udpsink + * gst-launch-1.0 -v audiotestsrc ! amrnbenc ! rtpamrpay ! udpsink * ]| This example pipeline will encode and payload an AMR stream. Refer to * the rtpamrdepay example to depayload and decode the RTP stream. * @@ -53,8 +53,10 @@ #include #include +#include #include "gstrtpamrpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpamrpay_debug); #define GST_CAT_DEFAULT (rtpamrpay_debug) @@ -259,7 +261,7 @@ gst_buffer_map (buffer, &map, GST_MAP_READ); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); duration = GST_BUFFER_DURATION (buffer); /* setup frame size pointer */ @@ -315,7 +317,7 @@ gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); /* copy timestamp */ - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; if (duration != GST_CLOCK_TIME_NONE) GST_BUFFER_DURATION (outbuf) = duration; @@ -388,10 +390,13 @@ } gst_buffer_unmap (buffer, &map); - gst_buffer_unref (buffer); - gst_rtp_buffer_unmap (&rtp); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpamrpay), outbuf, buffer, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + + gst_buffer_unref (buffer); + ret = gst_rtp_base_payload_push (basepayload, outbuf); return ret; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpbvdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpbvdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpbvdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpbvdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -33,7 +33,9 @@ #include #include +#include #include "gstrtpbvdepay.h" +#include "gstrtputils.h" static GstStaticPadTemplate gst_rtp_bv_depay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -56,7 +58,7 @@ ); static GstBuffer *gst_rtp_bv_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_bv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -82,7 +84,7 @@ "Extracts BroadcomVoice audio from RTP packets (RFC 4298)", "Wim Taymans "); - gstrtpbasedepayload_class->process = gst_rtp_bv_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_bv_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_bv_depay_setcaps; } @@ -155,28 +157,29 @@ } static GstBuffer * -gst_rtp_bv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_bv_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstBuffer *outbuf; gboolean marker; - GstRTPBuffer rtp = { NULL, }; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - marker = gst_rtp_buffer_get_marker (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); GST_DEBUG ("process : got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), marker, - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); + gst_buffer_get_size (rtp->buffer), marker, + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); if (marker && outbuf) { /* mark start of talkspurt with RESYNC */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } + return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtp.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtp.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtp.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtp.c 2015-10-22 08:02:54.000000000 +0000 @@ -56,6 +56,8 @@ #include "gstrtpmparobustdepay.h" #include "gstrtpmpvdepay.h" #include "gstrtpmpvpay.h" +#include "gstrtph261pay.h" +#include "gstrtph261depay.h" #include "gstrtph263pdepay.h" #include "gstrtph263ppay.h" #include "gstrtph263depay.h" @@ -66,6 +68,8 @@ #include "gstrtpj2kpay.h" #include "gstrtpjpegdepay.h" #include "gstrtpjpegpay.h" +#include "gstrtpklvdepay.h" +#include "gstrtpklvpay.h" #include "gstrtpL16depay.h" #include "gstrtpL16pay.h" #include "gstrtpL24depay.h" @@ -204,6 +208,12 @@ if (!gst_rtp_mpv_pay_plugin_init (plugin)) return FALSE; + if (!gst_rtp_h261_pay_plugin_init (plugin)) + return FALSE; + + if (!gst_rtp_h261_depay_plugin_init (plugin)) + return FALSE; + if (!gst_rtp_h263p_pay_plugin_init (plugin)) return FALSE; @@ -234,6 +244,12 @@ if (!gst_rtp_jpeg_pay_plugin_init (plugin)) return FALSE; + if (!gst_rtp_klv_depay_plugin_init (plugin)) + return FALSE; + + if (!gst_rtp_klv_pay_plugin_init (plugin)) + return FALSE; + if (!gst_rtp_L16_pay_plugin_init (plugin)) return FALSE; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpceltdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpceltdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpceltdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpceltdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include #include +#include #include "gstrtpceltdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpceltdepay_debug); #define GST_CAT_DEFAULT (rtpceltdepay_debug) @@ -44,7 +46,7 @@ enum { - ARG_0 + PROP_0 }; static GstStaticPadTemplate gst_rtp_celt_depay_sink_template = @@ -65,7 +67,7 @@ ); static GstBuffer *gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_celt_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -95,7 +97,7 @@ "Extracts CELT audio from RTP packets", "Wim Taymans "); - gstrtpbasedepayload_class->process = gst_rtp_celt_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_celt_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_celt_depay_setcaps; } @@ -193,7 +195,7 @@ } static GstBuffer * -gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstBuffer *outbuf = NULL; guint8 *payload; @@ -203,28 +205,25 @@ GstClockTime framesize_ns = 0, timestamp; guint n = 0; GstRtpCELTDepay *rtpceltdepay; - GstRTPBuffer rtp = { NULL, }; rtpceltdepay = GST_RTP_CELT_DEPAY (depayload); clock_rate = depayload->clock_rate; frame_size = rtpceltdepay->frame_size; framesize_ns = gst_util_uint64_scale_int (frame_size, GST_SECOND, clock_rate); - timestamp = GST_BUFFER_TIMESTAMP (buf); - - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); + timestamp = GST_BUFFER_PTS (rtp->buffer); GST_LOG_OBJECT (depayload, "got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), gst_rtp_buffer_get_marker (&rtp), - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); + gst_buffer_get_size (rtp->buffer), gst_rtp_buffer_get_marker (rtp), + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); GST_LOG_OBJECT (depayload, "got clock-rate=%d, frame_size=%d, " "_ns=%" GST_TIME_FORMAT ", timestamp=%" GST_TIME_FORMAT, clock_rate, frame_size, GST_TIME_ARGS (framesize_ns), GST_TIME_ARGS (timestamp)); - payload = gst_rtp_buffer_get_payload (&rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); /* first count how many bytes are consumed by the size headers and make offset * point to the first data byte */ @@ -249,21 +248,23 @@ total_size += s + 1; } while (s == 0xff); - outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, offset, size); + outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, offset, size); offset += size; if (frame_size != -1 && clock_rate != -1) { - GST_BUFFER_TIMESTAMP (outbuf) = timestamp + framesize_ns * n; + GST_BUFFER_PTS (outbuf) = timestamp + framesize_ns * n; GST_BUFFER_DURATION (outbuf) = framesize_ns; } GST_LOG_OBJECT (depayload, "push timestamp=%" GST_TIME_FORMAT ", duration=%" GST_TIME_FORMAT, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), + GST_TIME_ARGS (GST_BUFFER_PTS (outbuf)), GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf))); + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + gst_rtp_base_depayload_push (depayload, outbuf); } - gst_rtp_buffer_unmap (&rtp); return NULL; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpceltpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpceltpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpceltpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpceltpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include #include +#include #include "gstrtpceltpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpceltpay_debug); #define GST_CAT_DEFAULT (rtpceltpay_debug) @@ -334,8 +336,8 @@ guint size; /* copy first timestamp to output */ - if (GST_BUFFER_TIMESTAMP (outbuf) == -1) - GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf); + if (GST_BUFFER_PTS (outbuf) == -1) + GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (buf); /* write the size to the header */ size = gst_buffer_get_size (buf); @@ -350,6 +352,9 @@ gst_buffer_extract (buf, 0, payload, size); payload += size; + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpceltpay), outbuf, buf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + gst_buffer_unref (buf); } gst_rtp_buffer_unmap (&rtp); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpdvdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpdvdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpdvdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpdvdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -33,6 +33,7 @@ #include #include "gstrtpdvdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY (rtpdvdepay_debug); #define GST_CAT_DEFAULT (rtpdvdepay_debug) @@ -45,7 +46,7 @@ enum { - ARG_0, + PROP_0, }; static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", @@ -75,7 +76,7 @@ gst_rtp_dv_depay_change_state (GstElement * element, GstStateChange transition); static GstBuffer *gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, - GstBuffer * in); + GstRTPBuffer * rtp); static gboolean gst_rtp_dv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -106,7 +107,7 @@ "Depayloads DV from RTP packets (RFC 3189)", "Marcel Moreaux , Wim Taymans "); - gstrtpbasedepayload_class->process = + gstrtpbasedepayload_class->process_rtp_packet = GST_DEBUG_FUNCPTR (gst_rtp_dv_depay_process); gstrtpbasedepayload_class->set_caps = GST_DEBUG_FUNCPTR (gst_rtp_dv_depay_setcaps); @@ -280,29 +281,35 @@ return location; } +static gboolean +foreach_metadata_drop (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) +{ + *meta = NULL; + return TRUE; +} + /* Process one RTP packet. Accumulate RTP payload in the proper place in a DV * frame, and return that frame if we detect a new frame, or NULL otherwise. * We assume a DV frame is 144000 bytes. That should accomodate PAL as well as * NTSC. */ static GstBuffer * -gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstBuffer * in) +gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstRTPBuffer * rtp) { GstBuffer *out = NULL; + GstBuffer *payload_buf; guint8 *payload; guint32 rtp_ts; guint payload_len, location; GstRTPDVDepay *dvdepay = GST_RTP_DV_DEPAY (base); gboolean marker; - GstRTPBuffer rtp = { NULL, }; - - gst_rtp_buffer_map (in, GST_MAP_READ, &rtp); + GstMapInfo map; - marker = gst_rtp_buffer_get_marker (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); /* Check if the received packet contains (the start of) a new frame, we do * this by checking the RTP timestamp. */ - rtp_ts = gst_rtp_buffer_get_timestamp (&rtp); + rtp_ts = gst_rtp_buffer_get_timestamp (rtp); /* we cannot copy the packet yet if the marker is set, we will do that below * after taking out the data */ @@ -313,13 +320,16 @@ /* return copy of accumulator. */ out = gst_buffer_copy (dvdepay->acc); + gst_buffer_foreach_meta (dvdepay->acc, foreach_metadata_drop, NULL); } /* Extract the payload */ - payload_len = gst_rtp_buffer_get_payload_len (&rtp); - payload = gst_rtp_buffer_get_payload (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); + payload = gst_rtp_buffer_get_payload (rtp); + payload_buf = gst_rtp_buffer_get_payload_buffer (rtp); /* copy all DIF chunks in their place. */ + gst_buffer_map (dvdepay->acc, &map, GST_MAP_READWRITE); while (payload_len >= 80) { guint offset; @@ -340,14 +350,18 @@ offset = location * 80; /* And copy it in, provided the location is sane. */ - if (offset <= dvdepay->frame_size - 80) - gst_buffer_fill (dvdepay->acc, offset, payload, 80); + if (offset <= dvdepay->frame_size - 80) { + memcpy (map.data + offset, payload, 80); + gst_rtp_copy_meta (GST_ELEMENT_CAST (dvdepay), dvdepay->acc, + payload_buf, 0); + } } payload += 80; payload_len -= 80; } - gst_rtp_buffer_unmap (&rtp); + gst_buffer_unmap (dvdepay->acc, &map); + gst_buffer_unref (payload_buf); if (marker) { GST_DEBUG_OBJECT (dvdepay, "marker bit complete frame %u", rtp_ts); @@ -357,6 +371,7 @@ * will change the timestamp but we won't copy the accumulator again because * we set the prev_ts to -1. */ out = gst_buffer_copy (dvdepay->acc); + gst_buffer_foreach_meta (dvdepay->acc, foreach_metadata_drop, NULL); } else { GST_WARNING_OBJECT (dvdepay, "waiting for frame headers %02x", dvdepay->header_mask); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpdvpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpdvpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpdvpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpdvpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,6 +27,7 @@ #include #include "gstrtpdvpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY (rtpdvpay_debug); #define GST_CAT_DEFAULT (rtpdvpay_debug) @@ -313,7 +314,7 @@ "DV RTP payloader got buffer of %" G_GSIZE_FORMAT " bytes, splitting in %u byte " "payload fragments, at time %" GST_TIME_FORMAT, size, max_payload_size, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer))); + GST_TIME_ARGS (GST_BUFFER_PTS (buffer))); if (!rtpdvpay->negotiated) { gst_dv_pay_negotiate (rtpdvpay, data, size); @@ -330,7 +331,7 @@ /* Allocate a new buffer, set the timestamp */ if (outbuf == NULL) { outbuf = gst_rtp_buffer_new_allocate (max_payload_size, 0, 0); - GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer); + GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (buffer); if (!gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp)) { gst_buffer_unref (outbuf); @@ -372,6 +373,7 @@ /* Push out the created piece, and check for errors. */ gst_rtp_buffer_unmap (&rtp); + gst_rtp_copy_meta (GST_ELEMENT_CAST (basepayload), outbuf, buffer, 0); ret = gst_rtp_base_payload_push (basepayload, outbuf); if (ret != GST_FLOW_OK) break; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg722depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg722depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg722depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg722depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -28,6 +28,7 @@ #include "gstrtpg722depay.h" #include "gstrtpchannels.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpg722depay_debug); #define GST_CAT_DEFAULT (rtpg722depay_debug) @@ -66,7 +67,7 @@ static gboolean gst_rtp_g722_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_g722_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_g722_depay_class_init (GstRtpG722DepayClass * klass) @@ -91,7 +92,7 @@ "Wim Taymans "); gstrtpbasedepayload_class->set_caps = gst_rtp_g722_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_g722_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_g722_depay_process; } static void @@ -214,34 +215,35 @@ } static GstBuffer * -gst_rtp_g722_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_g722_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpG722Depay *rtpg722depay; GstBuffer *outbuf; gint payload_len; gboolean marker; - GstRTPBuffer rtp = { NULL }; rtpg722depay = GST_RTP_G722_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len <= 0) goto empty_packet; GST_DEBUG_OBJECT (rtpg722depay, "got payload of %d bytes", payload_len); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - marker = gst_rtp_buffer_get_marker (&rtp); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); + marker = gst_rtp_buffer_get_marker (rtp); if (marker && outbuf) { /* mark talk spurt with RESYNC */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpg722depay), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } + return outbuf; /* ERRORS */ @@ -249,7 +251,6 @@ { GST_ELEMENT_WARNING (rtpg722depay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg722pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg722pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg722pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg722pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -40,13 +40,18 @@ ); static GstStaticPadTemplate gst_rtp_g722_pay_src_template = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"audio\", " "encoding-name = (string) \"G722\", " "payload = (int) " GST_RTP_PAYLOAD_G722_STRING ", " + "clock-rate = (int) 8000; " + "application/x-rtp, " + "media = (string) \"audio\", " + "encoding-name = (string) \"G722\", " + "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) 8000") ); @@ -92,6 +97,8 @@ rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpg722pay); + GST_RTP_BASE_PAYLOAD (rtpg722pay)->pt = GST_RTP_PAYLOAD_G722; + /* tell rtpbaseaudiopayload that this is a sample based codec */ gst_rtp_base_audio_payload_set_sample_based (rtpbaseaudiopayload); } @@ -136,8 +143,8 @@ * RFC 3551 although the sampling rate is 16000 Hz */ clock_rate = 8000; - gst_rtp_base_payload_set_options (basepayload, "audio", TRUE, "G722", - clock_rate); + gst_rtp_base_payload_set_options (basepayload, "audio", + basepayload->pt != GST_RTP_PAYLOAD_G722, "G722", clock_rate); params = g_strdup_printf ("%d", channels); #if 0 diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg723depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg723depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg723depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg723depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -45,7 +45,7 @@ enum { - ARG_0 + PROP_0 }; /* input is an RTP packet @@ -75,7 +75,7 @@ static gboolean gst_rtp_g723_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_g723_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); #define gst_rtp_g723_depay_parent_class parent_class G_DEFINE_TYPE (GstRtpG723Depay, gst_rtp_g723_depay, @@ -103,7 +103,7 @@ "Extracts G.723 audio from RTP packets (RFC 3551)", "Wim Taymans "); - gstrtpbasedepayload_class->process = gst_rtp_g723_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_g723_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_g723_depay_setcaps; } @@ -171,19 +171,16 @@ static GstBuffer * -gst_rtp_g723_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_g723_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpG723Depay *rtpg723depay; GstBuffer *outbuf = NULL; gint payload_len; gboolean marker; - GstRTPBuffer rtp = { NULL }; rtpg723depay = GST_RTP_G723_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); /* At least 4 bytes */ if (payload_len < 4) @@ -191,9 +188,8 @@ GST_LOG_OBJECT (rtpg723depay, "payload len %d", payload_len); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - marker = gst_rtp_buffer_get_marker (&rtp); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); + marker = gst_rtp_buffer_get_marker (rtp); if (marker) { /* marker bit starts talkspurt */ @@ -215,7 +211,6 @@ bad_packet: { /* no fatal error */ - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg723pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg723pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg723pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg723pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,11 +26,10 @@ #include #include #include +#include #include "gstrtpg723pay.h" - -#define GST_RTP_PAYLOAD_G723 4 -#define GST_RTP_PAYLOAD_G723_STRING "4" +#include "gstrtputils.h" #define G723_FRAME_DURATION (30 * GST_MSECOND) @@ -107,7 +106,6 @@ pay->adapter = gst_adapter_new (); payload->pt = GST_RTP_PAYLOAD_G723; - gst_rtp_base_payload_set_options (payload, "audio", FALSE, "G723", 8000); } static void @@ -128,16 +126,9 @@ gst_rtp_g723_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps) { gboolean res; - GstStructure *structure; - gint pt; - - structure = gst_caps_get_structure (caps, 0); - if (!gst_structure_get_int (structure, "payload", &pt)) - pt = GST_RTP_PAYLOAD_G723; - - payload->pt = pt; - payload->dynamic = pt != GST_RTP_PAYLOAD_G723; + gst_rtp_base_payload_set_options (payload, "audio", + payload->pt != GST_RTP_PAYLOAD_G723, "G723", 8000); res = gst_rtp_base_payload_set_outcaps (payload, NULL); return res; @@ -146,27 +137,23 @@ static GstFlowReturn gst_rtp_g723_pay_flush (GstRTPG723Pay * pay) { - GstBuffer *outbuf; + GstBuffer *outbuf, *payload_buf; GstFlowReturn ret; - guint8 *payload; guint avail; GstRTPBuffer rtp = { NULL }; avail = gst_adapter_available (pay->adapter); - outbuf = gst_rtp_buffer_new_allocate (avail, 0, 0); + outbuf = gst_rtp_buffer_new_allocate (0, 0, 0); gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); - payload = gst_rtp_buffer_get_payload (&rtp); - GST_BUFFER_TIMESTAMP (outbuf) = pay->timestamp; + GST_BUFFER_PTS (outbuf) = pay->timestamp; GST_BUFFER_DURATION (outbuf) = pay->duration; /* copy G723 data as payload */ - gst_adapter_copy (pay->adapter, payload, 0, avail); + payload_buf = gst_adapter_take_buffer_fast (pay->adapter, avail); - /* flush bytes from adapter */ - gst_adapter_flush (pay->adapter, avail); pay->timestamp = GST_CLOCK_TIME_NONE; pay->duration = 0; @@ -177,6 +164,10 @@ pay->discont = FALSE; } gst_rtp_buffer_unmap (&rtp); + gst_rtp_copy_meta (GST_ELEMENT_CAST (pay), outbuf, payload_buf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + + outbuf = gst_buffer_append (outbuf, payload_buf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (pay), outbuf); @@ -204,7 +195,7 @@ pay = GST_RTP_G723_PAY (payload); gst_buffer_map (buf, &map, GST_MAP_READ); - timestamp = GST_BUFFER_TIMESTAMP (buf); + timestamp = GST_BUFFER_PTS (buf); if (GST_BUFFER_IS_DISCONT (buf)) { /* flush everything on discont */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg726depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg726depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg726depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg726depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -28,13 +28,16 @@ #include #include #include +#include #include "gstrtpg726depay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpg726depay_debug); #define GST_CAT_DEFAULT (rtpg726depay_debug) #define DEFAULT_BIT_RATE 32000 +#define DEFAULT_BLOCK_ALIGN 4 #define SAMPLE_RATE 8000 #define LAYOUT_G726 "g726" @@ -50,8 +53,7 @@ enum { PROP_0, - PROP_FORCE_AAL2, - PROP_LAST + PROP_FORCE_AAL2 }; static GstStaticPadTemplate gst_rtp_g726_depay_sink_template = @@ -73,7 +75,7 @@ "channels = (int) 1, " "rate = (int) 8000, " "bitrate = (int) { 16000, 24000, 32000, 40000 }, " - "layout = (string) \"g726\"") + "block_align = (int) { 2, 3, 4, 5 }, " "layout = (string) \"g726\"") ); static void gst_rtp_g726_depay_get_property (GObject * object, guint prop_id, @@ -82,7 +84,7 @@ const GValue * value, GParamSpec * pspec); static GstBuffer *gst_rtp_g726_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_g726_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -122,7 +124,7 @@ "Extracts G.726 audio from RTP packets", "Axis Communications "); - gstrtpbasedepayload_class->process = gst_rtp_g726_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_g726_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_g726_depay_setcaps; } @@ -160,6 +162,7 @@ encoding_name = gst_structure_get_string (structure, "encoding-name"); if (encoding_name == NULL || g_ascii_strcasecmp (encoding_name, "G726") == 0) { depay->bitrate = DEFAULT_BIT_RATE; + depay->block_align = DEFAULT_BLOCK_ALIGN; } else { if (g_str_has_prefix (encoding_name, "AAL2-")) { depay->aal2 = TRUE; @@ -167,12 +170,16 @@ } if (g_ascii_strcasecmp (encoding_name, "G726-16") == 0) { depay->bitrate = 16000; + depay->block_align = 2; } else if (g_ascii_strcasecmp (encoding_name, "G726-24") == 0) { depay->bitrate = 24000; + depay->block_align = 3; } else if (g_ascii_strcasecmp (encoding_name, "G726-32") == 0) { depay->bitrate = 32000; + depay->block_align = 4; } else if (g_ascii_strcasecmp (encoding_name, "G726-40") == 0) { depay->bitrate = 40000; + depay->block_align = 5; } else goto unknown_encoding; } @@ -183,6 +190,7 @@ "channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, clock_rate, "bitrate", G_TYPE_INT, depay->bitrate, + "block_align", G_TYPE_INT, depay->block_align, "layout", G_TYPE_STRING, LAYOUT_G726, NULL); ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps); @@ -201,41 +209,43 @@ static GstBuffer * -gst_rtp_g726_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_g726_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpG726Depay *depay; GstBuffer *outbuf = NULL; gboolean marker; - GstRTPBuffer rtp = { NULL }; depay = GST_RTP_G726_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp); - - marker = gst_rtp_buffer_get_marker (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); GST_DEBUG ("process : got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), marker, - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); + gst_buffer_get_size (rtp->buffer), marker, + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); if (depay->aal2 || depay->force_aal2) { /* AAL2, we can just copy the bytes */ - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); if (!outbuf) goto bad_len; + gst_rtp_drop_meta (GST_ELEMENT_CAST (depay), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); } else { guint8 *in, *out, tmp; guint len; GstMapInfo map; - in = gst_rtp_buffer_get_payload (&rtp); - len = gst_rtp_buffer_get_payload_len (&rtp); + in = gst_rtp_buffer_get_payload (rtp); + len = gst_rtp_buffer_get_payload_len (rtp); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); if (!outbuf) goto bad_len; outbuf = gst_buffer_make_writable (outbuf); + gst_rtp_drop_meta (GST_ELEMENT_CAST (depay), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + gst_buffer_map (outbuf, &map, GST_MAP_WRITE); out = map.data; @@ -336,7 +346,9 @@ return outbuf; bad_len: - return NULL; + { + return NULL; + } } static void diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg726depay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg726depay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg726depay.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg726depay.h 2015-10-22 08:02:54.000000000 +0000 @@ -42,6 +42,7 @@ gboolean aal2; gboolean force_aal2; gint bitrate; + guint block_align; }; struct _GstRtpG726DepayClass diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg726pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg726pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg726pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg726pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -38,8 +38,7 @@ enum { PROP_0, - PROP_FORCE_AAL2, - PROP_LAST + PROP_FORCE_AAL2 }; static GstStaticPadTemplate gst_rtp_g726_pay_sink_template = @@ -203,6 +202,7 @@ /* intersect to filter */ intersect = gst_caps_intersect (peercaps, filter); gst_caps_unref (peercaps); + gst_caps_unref (filter); GST_DEBUG_OBJECT (payload, "intersected to %" GST_PTR_FORMAT, intersect); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg729depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg729depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg729depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg729depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -21,10 +21,12 @@ #endif #include +#include #include #include #include "gstrtpg729depay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpg729depay_debug); #define GST_CAT_DEFAULT (rtpg729depay_debug) @@ -43,7 +45,7 @@ enum { - ARG_0 + PROP_0 }; /* input is an RTP packet @@ -73,7 +75,7 @@ static gboolean gst_rtp_g729_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_g729_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); #define gst_rtp_g729_depay_parent_class parent_class G_DEFINE_TYPE (GstRtpG729Depay, gst_rtp_g729_depay, @@ -101,7 +103,7 @@ "Extracts G.729 audio from RTP packets (RFC 3551)", "Laurent Glayal "); - gstrtpbasedepayload_class->process = gst_rtp_g729_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_g729_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_g729_depay_setcaps; } @@ -168,19 +170,16 @@ } static GstBuffer * -gst_rtp_g729_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_g729_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpG729Depay *rtpg729depay; GstBuffer *outbuf = NULL; gint payload_len; gboolean marker; - GstRTPBuffer rtp = { NULL }; rtpg729depay = GST_RTP_G729_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); /* At least 2 bytes (CNG from G729 Annex B) */ if (payload_len < 2) { @@ -195,16 +194,17 @@ GST_LOG_OBJECT (rtpg729depay, "G729 payload contains CNG frame"); } - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - marker = gst_rtp_buffer_get_marker (&rtp); - - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); + marker = gst_rtp_buffer_get_marker (rtp); if (marker) { /* marker bit starts talkspurt */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + GST_LOG_OBJECT (depayload, "pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg729pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg729pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpg729pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpg729pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -32,8 +32,10 @@ #include #include #include +#include #include "gstrtpg729pay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpg729pay_debug); #define GST_CAT_DEFAULT (rtpg729pay_debug) @@ -121,7 +123,6 @@ GstRTPBasePayload *payload = GST_RTP_BASE_PAYLOAD (pay); payload->pt = GST_RTP_PAYLOAD_G729; - gst_rtp_base_payload_set_options (payload, "audio", FALSE, "G729", 8000); pay->adapter = gst_adapter_new (); } @@ -140,15 +141,9 @@ gst_rtp_g729_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps) { gboolean res; - GstStructure *structure; - gint pt; - structure = gst_caps_get_structure (caps, 0); - if (!gst_structure_get_int (structure, "payload", &pt)) - pt = GST_RTP_PAYLOAD_G729; - - payload->pt = pt; - payload->dynamic = pt != GST_RTP_PAYLOAD_G729; + gst_rtp_base_payload_set_options (payload, "audio", + payload->pt != GST_RTP_PAYLOAD_G729, "G729", 8000); res = gst_rtp_base_payload_set_outcaps (payload, NULL); @@ -156,16 +151,15 @@ } static GstFlowReturn -gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay, - const guint8 * data, guint payload_len) +gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay, GstBuffer * buf) { GstRTPBasePayload *basepayload; GstClockTime duration; guint frames; GstBuffer *outbuf; - guint8 *payload; GstFlowReturn ret; GstRTPBuffer rtp = { NULL }; + guint payload_len = gst_buffer_get_size (buf); basepayload = GST_RTP_BASE_PAYLOAD (rtpg729pay); @@ -173,19 +167,15 @@ payload_len, GST_TIME_ARGS (rtpg729pay->next_ts)); /* create buffer to hold the payload */ - outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); + outbuf = gst_rtp_buffer_new_allocate (0, 0, 0); gst_rtp_buffer_map (outbuf, GST_MAP_READWRITE, &rtp); - /* copy payload */ - payload = gst_rtp_buffer_get_payload (&rtp); - memcpy (payload, data, payload_len); - /* set metadata */ frames = (payload_len / G729_FRAME_SIZE) + ((payload_len % G729_FRAME_SIZE) >> 1); duration = frames * G729_FRAME_DURATION; - GST_BUFFER_TIMESTAMP (outbuf) = rtpg729pay->next_ts; + GST_BUFFER_PTS (outbuf) = rtpg729pay->next_ts; GST_BUFFER_DURATION (outbuf) = duration; GST_BUFFER_OFFSET (outbuf) = rtpg729pay->next_rtp_time; rtpg729pay->next_ts += duration; @@ -199,19 +189,13 @@ } gst_rtp_buffer_unmap (&rtp); - ret = gst_rtp_base_payload_push (basepayload, outbuf); - - return ret; -} + /* append payload */ + gst_rtp_copy_meta (GST_ELEMENT_CAST (basepayload), outbuf, buf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + outbuf = gst_buffer_append (outbuf, buf); -static GstFlowReturn -gst_rtp_g729_pay_push_and_free (GstRTPG729Pay * rtpg729pay, - guint8 * data, guint payload_len) -{ - GstFlowReturn ret; + ret = gst_rtp_base_payload_push (basepayload, outbuf); - ret = gst_rtp_g729_pay_push (rtpg729pay, data, payload_len); - g_free (data); return ret; } @@ -314,14 +298,14 @@ adapter = rtpg729pay->adapter; available = gst_adapter_available (adapter); - timestamp = GST_BUFFER_TIMESTAMP (buf); + timestamp = GST_BUFFER_PTS (buf); /* resync rtp time on discont or a discontinuous cn packet */ if (GST_BUFFER_IS_DISCONT (buf)) { /* flush remainder */ if (available > 0) { - gst_rtp_g729_pay_push_and_free (rtpg729pay, - gst_adapter_take (adapter, available), available); + gst_rtp_g729_pay_push (rtpg729pay, + gst_adapter_take_buffer_fast (adapter, available)); available = 0; } rtpg729pay->discont = TRUE; @@ -341,12 +325,7 @@ rtpg729pay->next_ts = timestamp; if (available == 0 && size >= min_payload_len && size <= max_payload_len) { - GstMapInfo map; - - gst_buffer_map (buf, &map, GST_MAP_READ); - ret = gst_rtp_g729_pay_push (rtpg729pay, map.data, map.size); - gst_buffer_unmap (buf, &map); - gst_buffer_unref (buf); + ret = gst_rtp_g729_pay_push (rtpg729pay, buf); return ret; } @@ -365,8 +344,8 @@ (available / G729_FRAME_SIZE) * G729_FRAME_SIZE); } - ret = gst_rtp_g729_pay_push_and_free (rtpg729pay, - gst_adapter_take (adapter, payload_len), payload_len); + ret = gst_rtp_g729_pay_push (rtpg729pay, + gst_adapter_take_buffer_fast (adapter, payload_len)); available -= payload_len; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgsmdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgsmdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgsmdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgsmdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,7 +24,9 @@ #include #include +#include #include "gstrtpgsmdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpgsmdepay_debug); #define GST_CAT_DEFAULT (rtpgsmdepay_debug) @@ -57,7 +59,7 @@ ); static GstBuffer *gst_rtp_gsm_depay_process (GstRTPBaseDepayload * _depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_gsm_depay_setcaps (GstRTPBaseDepayload * _depayload, GstCaps * caps); @@ -82,7 +84,7 @@ "RTP GSM depayloader", "Codec/Depayloader/Network/RTP", "Extracts GSM audio from RTP packets", "Zeeshan Ali "); - gstrtpbase_depayload_class->process = gst_rtp_gsm_depay_process; + gstrtpbase_depayload_class->process_rtp_packet = gst_rtp_gsm_depay_process; gstrtpbase_depayload_class->set_caps = gst_rtp_gsm_depay_setcaps; GST_DEBUG_CATEGORY_INIT (rtpgsmdepay_debug, "rtpgsmdepay", 0, @@ -117,29 +119,29 @@ } static GstBuffer * -gst_rtp_gsm_depay_process (GstRTPBaseDepayload * _depayload, GstBuffer * buf) +gst_rtp_gsm_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstBuffer *outbuf = NULL; gboolean marker; - GstRTPBuffer rtp = { NULL }; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - marker = gst_rtp_buffer_get_marker (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); GST_DEBUG ("process : got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), marker, - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); - - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); + gst_buffer_get_size (rtp->buffer), marker, + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); if (marker && outbuf) { /* mark start of talkspurt with RESYNC */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } + return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgsmpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgsmpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgsmpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgsmpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -25,8 +25,10 @@ #include #include #include +#include #include "gstrtpgsmpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpgsmpay_debug); #define GST_CAT_DEFAULT (rtpgsmpay_debug) @@ -107,7 +109,8 @@ if (strcmp ("audio/x-gsm", stname)) goto invalid_type; - gst_rtp_base_payload_set_options (payload, "audio", FALSE, "GSM", 8000); + gst_rtp_base_payload_set_options (payload, "audio", + payload->pt != GST_RTP_PAYLOAD_GSM, "GSM", 8000); res = gst_rtp_base_payload_set_outcaps (payload, NULL); return res; @@ -127,21 +130,16 @@ GstRTPGSMPay *rtpgsmpay; guint payload_len; GstBuffer *outbuf; - GstMapInfo map; - guint8 *payload; GstClockTime timestamp, duration; GstFlowReturn ret; - GstRTPBuffer rtp = { NULL }; rtpgsmpay = GST_RTP_GSM_PAY (basepayload); - gst_buffer_map (buffer, &map, GST_MAP_READ); - - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); duration = GST_BUFFER_DURATION (buffer); /* FIXME, only one GSM frame per RTP packet for now */ - payload_len = map.size; + payload_len = gst_buffer_get_size (buffer); /* FIXME, just error out for now */ if (payload_len > GST_RTP_BASE_PAYLOAD_MTU (rtpgsmpay)) @@ -150,20 +148,14 @@ outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); /* copy timestamp and duration */ - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; GST_BUFFER_DURATION (outbuf) = duration; - /* get payload */ - gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); - - /* copy data in payload */ - payload = gst_rtp_buffer_get_payload (&rtp); - memcpy (payload, map.data, map.size); - - gst_rtp_buffer_unmap (&rtp); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpgsmpay), outbuf, buffer, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); - gst_buffer_unmap (buffer, &map); - gst_buffer_unref (buffer); + /* append payload */ + outbuf = gst_buffer_append (outbuf, buffer); GST_DEBUG ("gst_rtp_gsm_pay_chain: pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); @@ -178,7 +170,6 @@ GST_ELEMENT_ERROR (rtpgsmpay, STREAM, ENCODE, (NULL), ("payload_len %u > mtu %u", payload_len, GST_RTP_BASE_PAYLOAD_MTU (rtpgsmpay))); - gst_buffer_unmap (buffer, &map); return GST_FLOW_ERROR; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgstdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgstdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgstdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgstdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -25,6 +25,7 @@ #include #include "gstrtpgstdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpgstdepay_debug); #define GST_CAT_DEFAULT (rtpgstdepay_debug) @@ -59,7 +60,7 @@ static gboolean gst_rtp_gst_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_gst_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_gst_depay_class_init (GstRtpGSTDepayClass * klass) @@ -91,7 +92,7 @@ gstrtpbasedepayload_class->handle_event = gst_rtp_gst_depay_handle_event; gstrtpbasedepayload_class->set_caps = gst_rtp_gst_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_gst_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_gst_depay_process; } static void @@ -232,6 +233,9 @@ if (!read_length (rtpgstdepay, map.data, map.size, &length, &offset)) goto too_small; + if (length == 0 || map.data[offset + length - 1] != '\0') + goto invalid_buffer; + GST_DEBUG_OBJECT (rtpgstdepay, "parsing caps %s", &map.data[offset]); /* parse and store in cache */ @@ -249,6 +253,13 @@ gst_buffer_unmap (buf, &map); return NULL; } +invalid_buffer: + { + GST_ELEMENT_WARNING (rtpgstdepay, STREAM, DECODE, + ("caps string not 0-terminated."), (NULL)); + gst_buffer_unmap (buf, &map); + return NULL; + } } static GstEvent * @@ -269,6 +280,14 @@ if (!read_length (rtpgstdepay, map.data, map.size, &length, &offset)) goto too_small; + if (length == 0) + goto invalid_buffer; + if (map.data[offset + length - 1] != '\0') + goto invalid_buffer; + /* backward compat, old payloader did not put 0-byte at the end */ + if (map.data[offset + length - 1] != ';') + goto invalid_buffer; + GST_DEBUG_OBJECT (rtpgstdepay, "parsing event %s", &map.data[offset]); /* parse */ @@ -307,6 +326,13 @@ gst_buffer_unmap (buf, &map); return NULL; } +invalid_buffer: + { + GST_ELEMENT_WARNING (rtpgstdepay, STREAM, DECODE, + ("event string not 0-terminated."), (NULL)); + gst_buffer_unmap (buf, &map); + return NULL; + } parse_failed: { GST_WARNING_OBJECT (rtpgstdepay, "could not parse event"); @@ -372,30 +398,27 @@ } static GstBuffer * -gst_rtp_gst_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_gst_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpGSTDepay *rtpgstdepay; GstBuffer *subbuf, *outbuf = NULL; gint payload_len; guint8 *payload; guint CV, frag_offset, avail, offset; - GstRTPBuffer rtp = { NULL }; rtpgstdepay = GST_RTP_GST_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len <= 8) goto empty_packet; - if (GST_BUFFER_IS_DISCONT (buf)) { + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { GST_WARNING_OBJECT (rtpgstdepay, "DISCONT, clear adapter"); gst_adapter_clear (rtpgstdepay->adapter); } - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); /* strip off header * @@ -415,11 +438,11 @@ goto wrong_frag; /* subbuffer skipping the 8 header bytes */ - subbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, 8, -1); + subbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, 8, -1); gst_adapter_push (rtpgstdepay->adapter, subbuf); offset = 0; - if (gst_rtp_buffer_get_marker (&rtp)) { + if (gst_rtp_buffer_get_marker (rtp)) { guint avail; GstCaps *outcaps; @@ -500,7 +523,10 @@ outbuf = NULL; } } - gst_rtp_buffer_unmap (&rtp); + + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpgstdepay), outbuf, 0); + } return outbuf; @@ -509,13 +535,11 @@ { GST_ELEMENT_WARNING (rtpgstdepay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } wrong_frag: { gst_adapter_clear (rtpgstdepay->adapter); - gst_rtp_buffer_unmap (&rtp); GST_LOG_OBJECT (rtpgstdepay, "wrong fragment, skipping"); return NULL; } @@ -523,14 +547,12 @@ { GST_WARNING_OBJECT (rtpgstdepay, "failed to parse caps"); gst_buffer_unref (outbuf); - gst_rtp_buffer_unmap (&rtp); return NULL; } no_event: { GST_WARNING_OBJECT (rtpgstdepay, "failed to parse event"); gst_buffer_unref (outbuf); - gst_rtp_buffer_unmap (&rtp); return NULL; } missing_caps: @@ -538,7 +560,6 @@ GST_ELEMENT_WARNING (rtpgstdepay, STREAM, DECODE, ("Missing caps %u.", CV), (NULL)); gst_buffer_unref (outbuf); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgstpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgstpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpgstpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpgstpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,6 +26,7 @@ #include #include "gstrtpgstpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (gst_rtp_pay_debug); #define GST_CAT_DEFAULT gst_rtp_pay_debug @@ -76,8 +77,7 @@ enum { PROP_0, - PROP_CONFIG_INTERVAL, - PROP_LAST + PROP_CONFIG_INTERVAL }; #define DEFAULT_CONFIG_INTERVAL 0 @@ -337,9 +337,10 @@ paybuf = gst_adapter_take_buffer_fast (rtpgstpay->adapter, payload_len); /* create a new group to hold the rtp header and the payload */ - gst_buffer_append (outbuf, paybuf); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpgstpay), outbuf, paybuf, 0); + outbuf = gst_buffer_append (outbuf, paybuf); - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; /* and add to list */ gst_buffer_list_insert (list, -1, outbuf); @@ -483,6 +484,8 @@ estr = gst_structure_to_string (s); elen = strlen (estr); + /* for 0 byte */ + elen++; outbuf = make_data_buffer (rtpgstpay, estr, elen); GST_DEBUG_OBJECT (rtpgstpay, "sending event=%s", estr); g_free (estr); @@ -613,7 +616,7 @@ rtpgstpay = GST_RTP_GST_PAY (basepayload); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); /* check if we need to send the caps and taglist now */ if (rtpgstpay->config_interval > 0) { diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261depay.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,295 @@ +/* GStreamer + * + * Copyright (C) <2014> Stian Selnes + * + * 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-rtph261depay + * @see_also: rtph261pay + * + * Extract encoded H.261 video frames from RTP packets according to RFC 4587. + * For detailed information see: https://www.rfc-editor.org/rfc/rfc4587.txt + * + * The depayloader takes an RTP packet and extracts its H.261 stream. It + * aggregates the extracted stream until a complete frame is received before + * it pushes it downstream. + * + * + * Example pipeline + * |[ + * gst-launch-1.0 udpsrc caps='application/x-rtp, payload=31' ! rtph261depay ! avdec_h261 ! autovideosink + * ]| This example pipeline will depayload and decode an RTP H.261 video stream. + * Refer to the rtph261pay example to create the RTP stream. + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include +#include +#include "gstrtph261depay.h" +#include "gstrtph261pay.h" /* GstRtpH261PayHeader */ +#include "gstrtputils.h" + +GST_DEBUG_CATEGORY_STATIC (rtph261depay_debug); +#define GST_CAT_DEFAULT (rtph261depay_debug) + +static const guint8 NO_LEFTOVER = 0xFF; + +static GstStaticPadTemplate gst_rtp_h261_depay_src_template = +GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-h261") + ); + +static GstStaticPadTemplate gst_rtp_h261_depay_sink_template = + GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("application/x-rtp, " + "media = (string) \"video\", " + "payload = (int) " GST_RTP_PAYLOAD_H261_STRING ", " + "clock-rate = (int) 90000, " "encoding-name = (string) \"H261\"; " + "application/x-rtp, " + "media = (string) \"video\", " + "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " + "clock-rate = (int) 90000, " "encoding-name = (string) \"H261\"") + ); + +G_DEFINE_TYPE (GstRtpH261Depay, gst_rtp_h261_depay, + GST_TYPE_RTP_BASE_DEPAYLOAD); +#define parent_class gst_rtp_h261_depay_parent_class + +static GstBuffer * +gst_rtp_h261_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) +{ + GstRtpH261Depay *depay; + GstBuffer *outbuf = NULL; + gint payload_len; + guint8 *payload; + const guint header_len = GST_RTP_H261_PAYLOAD_HEADER_LEN; + gboolean marker; + GstRtpH261PayHeader *header; + + depay = GST_RTP_H261_DEPAY (depayload); + + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { + GST_DEBUG_OBJECT (depay, "Discont buffer, flushing adapter"); + gst_adapter_clear (depay->adapter); + depay->leftover = NO_LEFTOVER; + depay->start = FALSE; + } + + payload_len = gst_rtp_buffer_get_payload_len (rtp); + payload = gst_rtp_buffer_get_payload (rtp); + + marker = gst_rtp_buffer_get_marker (rtp); + + if (payload_len < 4) { + GST_WARNING_OBJECT (depay, + "Dropping packet with payload length invalid length"); + return NULL; + } + + header = (GstRtpH261PayHeader *) payload; + + GST_DEBUG_OBJECT (depay, + "payload_len: %d, header_len: %d, sbit: %d, ebit: %d, marker %d", + payload_len, header_len, header->sbit, header->ebit, marker); + + payload += header_len; + payload_len -= header_len; + + if (!depay->start) { + /* Check for picture start code */ + guint32 bits = GST_READ_UINT32_BE (payload) << header->sbit; + if (payload_len > 4 && bits >> 12 == 0x10) { + GST_DEBUG_OBJECT (depay, "Found picture start code"); + depay->start = TRUE; + } else { + GST_DEBUG_OBJECT (depay, "No picture start code yet, skipping payload"); + goto skip; + } + } + + if (header->sbit != 0) { + /* Take the leftover from previous packet and merge it at the beginning */ + payload[0] &= 0xFF >> header->sbit; + if (depay->leftover != NO_LEFTOVER) { + /* Happens if sbit is set for first packet in frame. Then previous byte + * has already been flushed. */ + payload[0] |= depay->leftover; + } + depay->leftover = NO_LEFTOVER; + } + + if (header->ebit == 0) { + /* H.261 stream ends on byte boundary, take entire packet */ + gst_adapter_push (depay->adapter, + gst_rtp_buffer_get_payload_subbuffer (rtp, header_len, payload_len)); + } else { + /* Take the entire buffer except for the last byte, which will be kept to + * merge with next packet */ + gst_adapter_push (depay->adapter, + gst_rtp_buffer_get_payload_subbuffer (rtp, header_len, + payload_len - 1)); + depay->leftover = payload[payload_len - 1] & (0xFF << header->ebit); + } + +skip: + if (marker) { + if (depay->start) { + guint avail; + + if (depay->leftover != NO_LEFTOVER) { + GstBuffer *buf = gst_buffer_new_and_alloc (1); + gst_buffer_memset (buf, 0, depay->leftover, 1); + gst_adapter_push (depay->adapter, buf); + depay->leftover = NO_LEFTOVER; + } + + avail = gst_adapter_available (depay->adapter); + outbuf = gst_adapter_take_buffer (depay->adapter, avail); + gst_rtp_drop_meta (GST_ELEMENT_CAST (depay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + + /* Note that the I flag does not mean intra frame, but that the entire + * stream is intra coded. */ + if (header->i) + GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); + else + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); + + GST_DEBUG_OBJECT (depay, "Pushing out a buffer of %u bytes", avail); + depay->start = FALSE; + } else { + depay->start = TRUE; + } + } + + return outbuf; +} + +static gboolean +gst_rtp_h261_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps) +{ + GstCaps *srccaps; + + srccaps = gst_caps_new_empty_simple ("video/x-h261"); + gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (filter), srccaps); + gst_caps_unref (srccaps); + + return TRUE; +} + +static GstStateChangeReturn +gst_rtp_h261_depay_change_state (GstElement * element, + GstStateChange transition) +{ + GstRtpH261Depay *depay; + GstStateChangeReturn ret; + + depay = GST_RTP_H261_DEPAY (element); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + gst_adapter_clear (depay->adapter); + depay->start = FALSE; + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + return ret; +} + +static void +gst_rtp_h261_depay_dispose (GObject * object) +{ + GstRtpH261Depay *depay; + + depay = GST_RTP_H261_DEPAY (object); + + if (depay->adapter) { + gst_object_unref (depay->adapter); + depay->adapter = NULL; + } + + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +gst_rtp_h261_depay_class_init (GstRtpH261DepayClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + GstRTPBaseDepayloadClass *gstrtpbasedepayload_class; + + gobject_class = G_OBJECT_CLASS (klass); + gstelement_class = GST_ELEMENT_CLASS (klass); + gstrtpbasedepayload_class = GST_RTP_BASE_DEPAYLOAD_CLASS (klass); + + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&gst_rtp_h261_depay_src_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&gst_rtp_h261_depay_sink_template)); + + gst_element_class_set_static_metadata (gstelement_class, + "RTP H261 depayloader", "Codec/Depayloader/Network/RTP", + "Extracts H261 video from RTP packets (RFC 4587)", + "Stian Selnes "); + + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_h261_depay_process; + gstrtpbasedepayload_class->set_caps = gst_rtp_h261_depay_setcaps; + + gobject_class->dispose = gst_rtp_h261_depay_dispose; + + gstelement_class->change_state = gst_rtp_h261_depay_change_state; + + GST_DEBUG_CATEGORY_INIT (rtph261depay_debug, "rtph261depay", 0, + "H261 Video RTP Depayloader"); +} + +static void +gst_rtp_h261_depay_init (GstRtpH261Depay * depay) +{ + depay->adapter = gst_adapter_new (); + depay->leftover = NO_LEFTOVER; +} + +gboolean +gst_rtp_h261_depay_plugin_init (GstPlugin * plugin) +{ + return gst_element_register (plugin, "rtph261depay", + GST_RANK_SECONDARY, GST_TYPE_RTP_H261_DEPAY); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261depay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261depay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261depay.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261depay.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,60 @@ +/* GStreamer + * Copyright (C) <2014> Stian Selnes + * + * 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_RTP_H261_DEPAY_H__ +#define __GST_RTP_H261_DEPAY_H__ + +#include +#include +#include + +G_BEGIN_DECLS +#define GST_TYPE_RTP_H261_DEPAY \ + (gst_rtp_h261_depay_get_type()) +#define GST_RTP_H261_DEPAY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H261_DEPAY,GstRtpH261Depay)) +#define GST_RTP_H261_DEPAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H261_DEPAY,GstRtpH261DepayClass)) +#define GST_IS_RTP_H261_DEPAY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H261_DEPAY)) +#define GST_IS_RTP_H261_DEPAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H261_DEPAY)) +typedef struct _GstRtpH261Depay GstRtpH261Depay; +typedef struct _GstRtpH261DepayClass GstRtpH261DepayClass; + +struct _GstRtpH261Depay +{ + GstRTPBaseDepayload depayload; + + GstAdapter *adapter; + gboolean start; + guint8 leftover; +}; + +struct _GstRtpH261DepayClass +{ + GstRTPBaseDepayloadClass parent_class; +}; + +GType gst_rtp_h261_depay_get_type (void); + +gboolean gst_rtp_h261_depay_plugin_init (GstPlugin * plugin); + +G_END_DECLS +#endif /* __GST_RTP_H261_DEPAY_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261pay.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,1072 @@ +/* GStreamer + * Copyright (C) <2014> Stian Selnes + * + * 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-rtph261pay + * @see_also: rtph261depay + * + * Payload encoded H.261 video frames into RTP packets according to RFC 4587. + * For detailed information see: https://www.rfc-editor.org/rfc/rfc4587.txt + * + * The payloader takes a H.261 frame, parses it and splits it into fragments + * on MB boundaries in order to match configured MTU size. For each fragment + * an RTP packet is constructed with an RTP packet header followed by the + * fragment. In addition the payloader will make sure the packetized H.261 + * stream appears as a continuous bit-stream after depacketization by shifting + * the encoded bit-stream of a frame to align with the last significant bit of + * the previous frame. This helps interoperability in the case where the + * encoder does not produce a continuous bit-stream but the decoder requires + * it. + * + * + * Example launch line + * |[ + * gst-launch-1.0 videotestsrc ! avenc_h261 ! rtph261pay ! udpsink + * ]| This will encode a test video and payload it. Refer to the rtph261depay + * example to depayload and play the RTP stream. + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "gstrtph261pay.h" +#include "gstrtputils.h" +#include +#include +#include +#include + +GST_DEBUG_CATEGORY_STATIC (rtph261pay_debug); +#define GST_CAT_DEFAULT (rtph261pay_debug) + +#define GST_RTP_HEADER_LEN 12 +#define GST_RTP_H261_PAYLOAD_HEADER_LEN 4 + +static GstStaticPadTemplate gst_rtp_h261_pay_sink_template = +GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-h261") + ); + +static GstStaticPadTemplate gst_rtp_h261_pay_src_template = + GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("application/x-rtp, " + "media = (string) \"video\", " + "payload = (int) " GST_RTP_PAYLOAD_H261_STRING ", " + "clock-rate = (int) 90000, " "encoding-name = (string) \"H261\"; " + "application/x-rtp, " + "media = (string) \"video\", " + "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " + "clock-rate = (int) 90000, " "encoding-name = (string) \"H261\"") + ); + +G_DEFINE_TYPE (GstRtpH261Pay, gst_rtp_h261_pay, GST_TYPE_RTP_BASE_PAYLOAD); +#define parent_class gst_rtp_h261_pay_parent_class + +typedef struct +{ + guint32 mba; + guint32 mtype; + guint32 quant; + gint mvx; + gint mvy; + guint endpos; + gint gobn; +} Macroblock; + +typedef struct +{ + Macroblock last; + guint startpos; + guint endpos; + guint32 gn; + guint32 gquant; +} Gob; + +#define PSC_LEN 20 +#define TR_LEN 5 +#define PTYPE_LEN 6 +#define GBSC_LEN 16 +#define GN_LEN 4 +#define GQUANT_LEN 5 +#define GEI_LEN 1 +#define GSPARE_LEN 8 +#define MQUANT_LEN 5 +#define MAX_NUM_GOB 12 + +typedef enum +{ + PARSE_END_OF_BUFFER = -2, + PARSE_ERROR = -1, + PARSE_OK = 0, + PARSE_END_OF_FRAME, + PARSE_END_OF_GOB, +} ParseReturn; + + +#define SKIP_BITS(br,nbits) G_STMT_START { \ + if (!gst_bit_reader_skip (br, nbits)) \ + return PARSE_END_OF_BUFFER; \ + } G_STMT_END + +#define GET_BITS(br,val,nbits) G_STMT_START { \ + if (!gst_bit_reader_get_bits_uint32 (br, val, nbits)) \ + return PARSE_END_OF_BUFFER; \ + } G_STMT_END + +/* Unchecked since we peek outside the buffer. Ok because of padding. */ +#define PEEK_BITS(br,val,nbits) G_STMT_START { \ + *val = gst_bit_reader_peek_bits_uint16_unchecked (br, nbits); \ + } G_STMT_END + + +#define MBA_STUFFING 34 +#define MBA_START_CODE 35 +#define MBA_LEN 35 +#define MBA_WID 4 +/* [code, mask, nbits, mba] */ +static const guint16 mba_table[MBA_LEN][MBA_WID] = { + {0x8000, 0x8000, 1, 1}, + {0x6000, 0xe000, 3, 2}, + {0x4000, 0xe000, 3, 3}, + {0x3000, 0xf000, 4, 4}, + {0x2000, 0xf000, 4, 5}, + {0x1800, 0xf800, 5, 6}, + {0x1000, 0xf800, 5, 7}, + {0x0e00, 0xfe00, 7, 8}, + {0x0c00, 0xfe00, 7, 9}, + {0x0b00, 0xff00, 8, 10}, + {0x0a00, 0xff00, 8, 11}, + {0x0900, 0xff00, 8, 12}, + {0x0800, 0xff00, 8, 13}, + {0x0700, 0xff00, 8, 14}, + {0x0600, 0xff00, 8, 15}, + {0x05c0, 0xffc0, 10, 16}, + {0x0580, 0xffc0, 10, 17}, + {0x0540, 0xffc0, 10, 18}, + {0x0500, 0xffc0, 10, 19}, + {0x04c0, 0xffc0, 10, 20}, + {0x0480, 0xffc0, 10, 21}, + {0x0460, 0xffe0, 11, 22}, + {0x0440, 0xffe0, 11, 23}, + {0x0420, 0xffe0, 11, 24}, + {0x0400, 0xffe0, 11, 25}, + {0x03e0, 0xffe0, 11, 26}, + {0x03c0, 0xffe0, 11, 27}, + {0x03a0, 0xffe0, 11, 28}, + {0x0380, 0xffe0, 11, 29}, + {0x0360, 0xffe0, 11, 30}, + {0x0340, 0xffe0, 11, 31}, + {0x0320, 0xffe0, 11, 32}, + {0x0300, 0xffe0, 11, 33}, + {0x01e0, 0xffe0, 11, MBA_STUFFING}, + {0x0001, 0xffff, 16, MBA_START_CODE}, +}; + +#define MTYPE_INTRA (1 << 0) +#define MTYPE_INTER (1 << 1) +#define MTYPE_MC (1 << 2) +#define MTYPE_FIL (1 << 3) +#define MTYPE_MQUANT (1 << 4) +#define MTYPE_MVD (1 << 5) +#define MTYPE_CBP (1 << 6) +#define MTYPE_TCOEFF (1 << 7) +#define MTYPE_LEN 10 +#define MTYPE_WID 4 +/* [code, mask, nbits, flags] */ +static const guint16 mtype_table[MTYPE_LEN][MTYPE_WID] = { + {0x8000, 0x8000, 1, MTYPE_INTER | MTYPE_CBP | MTYPE_TCOEFF}, + {0x4000, 0xc000, 2, + MTYPE_INTER | MTYPE_MC | MTYPE_FIL | MTYPE_MVD | MTYPE_CBP | + MTYPE_TCOEFF}, + {0x2000, 0xe000, 3, MTYPE_INTER | MTYPE_MC | MTYPE_FIL | MTYPE_MVD}, + {0x1000, 0xf000, 4, MTYPE_INTRA | MTYPE_TCOEFF}, + {0x0800, 0xf800, 5, MTYPE_INTER | MTYPE_MQUANT | MTYPE_CBP | MTYPE_TCOEFF}, + {0x0400, 0xfc00, 6, + MTYPE_INTER | MTYPE_MC | MTYPE_FIL | MTYPE_MQUANT | MTYPE_MVD | + MTYPE_CBP | MTYPE_TCOEFF}, + {0x0200, 0xfe00, 7, MTYPE_INTRA | MTYPE_MQUANT | MTYPE_TCOEFF}, + {0x0100, 0xff00, 8, + MTYPE_INTER | MTYPE_MC | MTYPE_MVD | MTYPE_CBP | MTYPE_TCOEFF}, + {0x0080, 0xff80, 9, MTYPE_INTER | MTYPE_MC | MTYPE_MVD}, + {0x0040, 0xffc0, 10, + MTYPE_INTER | MTYPE_MC | MTYPE_MQUANT | MTYPE_MVD | MTYPE_CBP | + MTYPE_TCOEFF}, +}; + +#define MVD_LEN 32 +#define MVD_WID 5 +/* [code, mask, nbits, mvd1, mvd2] */ +static const guint16 mvd_table[MVD_LEN][MVD_WID] = { + {0x8000, 0x8000, 1, 0, 0}, + {0x6000, 0xe000, 3, -1, -1}, + {0x4000, 0xe000, 3, 1, 1}, + {0x3000, 0xf000, 4, -2, 30}, + {0x2000, 0xf000, 4, 2, -30}, + {0x1800, 0xf800, 5, -3, 29}, + {0x1000, 0xf800, 5, 3, -29}, + {0x0e00, 0xfe00, 7, -4, 28}, + {0x0c00, 0xfe00, 7, 4, -28}, + {0x0700, 0xff00, 8, -7, 25}, + {0x0900, 0xff00, 8, -6, 26}, + {0x0b00, 0xff00, 8, -5, 27}, + {0x0a00, 0xff00, 8, 5, -27}, + {0x0800, 0xff00, 8, 6, -26}, + {0x0600, 0xff00, 8, 7, -25}, + {0x04c0, 0xffc0, 10, -10, 22}, + {0x0540, 0xffc0, 10, -9, 23}, + {0x05c0, 0xffc0, 10, -8, 24}, + {0x0580, 0xffc0, 10, 8, -24}, + {0x0500, 0xffc0, 10, 9, -23}, + {0x0480, 0xffc0, 10, 10, -22}, + {0x0320, 0xffe0, 11, -16, 16}, + {0x0360, 0xffe0, 11, -15, 17}, + {0x03a0, 0xffe0, 11, -14, 18}, + {0x03e0, 0xffe0, 11, -13, 19}, + {0x0420, 0xffe0, 11, -12, 20}, + {0x0460, 0xffe0, 11, -11, 21}, + {0x0440, 0xffe0, 11, 11, -21}, + {0x0400, 0xffe0, 11, 12, -20}, + {0x03c0, 0xffe0, 11, 13, -19}, + {0x0380, 0xffe0, 11, 14, -18}, + {0x0340, 0xffe0, 11, 15, -17}, +}; + +#define CBP_LEN 63 +/* [code, mask, nbits, cbp] */ +static const guint16 cbp_table[CBP_LEN][4] = { + {0xe000, 0xe000, 3, 60}, + {0xd000, 0xf000, 4, 4}, + {0xc000, 0xf000, 4, 8}, + {0xb000, 0xf000, 4, 16}, + {0xa000, 0xf000, 4, 32}, + {0x9800, 0xf800, 5, 12}, + {0x9000, 0xf800, 5, 48}, + {0x8800, 0xf800, 5, 20}, + {0x8000, 0xf800, 5, 40}, + {0x7800, 0xf800, 5, 28}, + {0x7000, 0xf800, 5, 44}, + {0x6800, 0xf800, 5, 52}, + {0x6000, 0xf800, 5, 56}, + {0x5800, 0xf800, 5, 1}, + {0x5000, 0xf800, 5, 61}, + {0x4800, 0xf800, 5, 2}, + {0x4000, 0xf800, 5, 62}, + {0x3c00, 0xfc00, 6, 24}, + {0x3800, 0xfc00, 6, 36}, + {0x3400, 0xfc00, 6, 3}, + {0x3000, 0xfc00, 6, 63}, + {0x2e00, 0xfe00, 7, 5}, + {0x2c00, 0xfe00, 7, 9}, + {0x2a00, 0xfe00, 7, 17}, + {0x2800, 0xfe00, 7, 33}, + {0x2600, 0xfe00, 7, 6}, + {0x2400, 0xfe00, 7, 10}, + {0x2200, 0xfe00, 7, 18}, + {0x2000, 0xfe00, 7, 34}, + {0x1f00, 0xff00, 8, 7}, + {0x1e00, 0xff00, 8, 11}, + {0x1d00, 0xff00, 8, 19}, + {0x1c00, 0xff00, 8, 35}, + {0x1b00, 0xff00, 8, 13}, + {0x1a00, 0xff00, 8, 49}, + {0x1900, 0xff00, 8, 21}, + {0x1800, 0xff00, 8, 41}, + {0x1700, 0xff00, 8, 14}, + {0x1600, 0xff00, 8, 50}, + {0x1500, 0xff00, 8, 22}, + {0x1400, 0xff00, 8, 42}, + {0x1300, 0xff00, 8, 15}, + {0x1200, 0xff00, 8, 51}, + {0x1100, 0xff00, 8, 23}, + {0x1000, 0xff00, 8, 43}, + {0x0f00, 0xff00, 8, 25}, + {0x0e00, 0xff00, 8, 37}, + {0x0d00, 0xff00, 8, 26}, + {0x0c00, 0xff00, 8, 38}, + {0x0b00, 0xff00, 8, 29}, + {0x0a00, 0xff00, 8, 45}, + {0x0900, 0xff00, 8, 53}, + {0x0800, 0xff00, 8, 57}, + {0x0700, 0xff00, 8, 30}, + {0x0600, 0xff00, 8, 46}, + {0x0500, 0xff00, 8, 54}, + {0x0400, 0xff00, 8, 58}, + {0x0380, 0xff80, 9, 31}, + {0x0300, 0xff80, 9, 47}, + {0x0280, 0xff80, 9, 55}, + {0x0200, 0xff80, 9, 59}, + {0x0180, 0xff80, 9, 27}, + {0x0100, 0xff80, 9, 39}, +}; + +#define TCOEFF_EOB 0xffff +#define TCOEFF_ESC 0xfffe +#define TCOEFF_LEN 65 +/* [code, mask, nbits, run, level] */ +static const guint16 tcoeff_table[TCOEFF_LEN][5] = { + {0x8000, 0xc000, 2, TCOEFF_EOB, 0}, /* Not available for first coeff */ + /* {0x8000, 0x8000, 2, 0, 1}, *//* Available only for first Inter coeff */ + {0xc000, 0xc000, 3, 0, 1}, /* Not available for first coeff */ + {0x6000, 0xe000, 4, 1, 1}, + {0x4000, 0xf000, 5, 0, 2}, + {0x5000, 0xf000, 5, 2, 1}, + {0x2800, 0xf800, 6, 0, 3}, + {0x3800, 0xf800, 6, 3, 1}, + {0x3000, 0xf800, 6, 4, 1}, + {0x0400, 0xfc00, 6, TCOEFF_ESC, 0}, + {0x1800, 0xfc00, 7, 1, 2}, + {0x1c00, 0xfc00, 7, 5, 1}, + {0x1400, 0xfc00, 7, 6, 1}, + {0x1000, 0xfc00, 7, 7, 1}, + {0x0c00, 0xfe00, 8, 0, 4}, + {0x0800, 0xfe00, 8, 2, 2}, + {0x0e00, 0xfe00, 8, 8, 1}, + {0x0a00, 0xfe00, 8, 9, 1}, + {0x2600, 0xff00, 9, 0, 5}, + {0x2100, 0xff00, 9, 0, 6}, + {0x2500, 0xff00, 9, 1, 3}, + {0x2400, 0xff00, 9, 3, 2}, + {0x2700, 0xff00, 9, 10, 1}, + {0x2300, 0xff00, 9, 11, 1}, + {0x2200, 0xff00, 9, 12, 1}, + {0x2000, 0xff00, 9, 13, 1}, + {0x0280, 0xffc0, 11, 0, 7}, + {0x0300, 0xffc0, 11, 1, 4}, + {0x02c0, 0xffc0, 11, 2, 3}, + {0x03c0, 0xffc0, 11, 4, 2}, + {0x0240, 0xffc0, 11, 5, 2}, + {0x0380, 0xffc0, 11, 14, 1}, + {0x0340, 0xffc0, 11, 15, 1}, + {0x0200, 0xffc0, 11, 16, 1}, + {0x01d0, 0xfff0, 13, 0, 8}, + {0x0180, 0xfff0, 13, 0, 9}, + {0x0130, 0xfff0, 13, 0, 10}, + {0x0100, 0xfff0, 13, 0, 11}, + {0x01b0, 0xfff0, 13, 1, 5}, + {0x0140, 0xfff0, 13, 2, 4}, + {0x01c0, 0xfff0, 13, 3, 3}, + {0x0120, 0xfff0, 13, 4, 3}, + {0x01e0, 0xfff0, 13, 6, 2}, + {0x0150, 0xfff0, 13, 7, 2}, + {0x0110, 0xfff0, 13, 8, 2}, + {0x01f0, 0xfff0, 13, 17, 1}, + {0x01a0, 0xfff0, 13, 18, 1}, + {0x0190, 0xfff0, 13, 19, 1}, + {0x0170, 0xfff0, 13, 20, 1}, + {0x0160, 0xfff0, 13, 21, 1}, + {0x00d0, 0xfff8, 14, 0, 12}, + {0x00c8, 0xfff8, 14, 0, 13}, + {0x00c0, 0xfff8, 14, 0, 14}, + {0x00b8, 0xfff8, 14, 0, 15}, + {0x00b0, 0xfff8, 14, 1, 6}, + {0x00a8, 0xfff8, 14, 1, 7}, + {0x00a0, 0xfff8, 14, 2, 5}, + {0x0098, 0xfff8, 14, 3, 4}, + {0x0090, 0xfff8, 14, 5, 3}, + {0x0088, 0xfff8, 14, 9, 2}, + {0x0080, 0xfff8, 14, 10, 2}, + {0x00f8, 0xfff8, 14, 22, 1}, + {0x00f0, 0xfff8, 14, 23, 1}, + {0x00e8, 0xfff8, 14, 24, 1}, + {0x00e0, 0xfff8, 14, 25, 1}, + {0x00d8, 0xfff8, 14, 26, 1}, +}; + +static ParseReturn +decode_mba (GstBitReader * br, gint * mba) +{ + gint i; + guint16 code; + + *mba = -1; + do { + PEEK_BITS (br, &code, 16); + for (i = 0; i < MBA_LEN; i++) { + if ((code & mba_table[i][1]) == mba_table[i][0]) { + *mba = mba_table[i][3]; + + if (*mba == MBA_START_CODE) + return PARSE_END_OF_GOB; + SKIP_BITS (br, mba_table[i][2]); + if (*mba != MBA_STUFFING) + return PARSE_OK; + } + } + } while (*mba == MBA_STUFFING); + + /* 0x0 indicates end of frame since we appended 0-bytes */ + if (code == 0x0) + return PARSE_END_OF_FRAME; + + return PARSE_ERROR; +} + +static ParseReturn +decode_mtype (GstBitReader * br, guint * mtype) +{ + gint i; + guint16 code; + + PEEK_BITS (br, &code, 16); + for (i = 0; i < MTYPE_LEN; i++) { + if ((code & mtype_table[i][1]) == mtype_table[i][0]) { + SKIP_BITS (br, mtype_table[i][2]); + *mtype = mtype_table[i][3]; + return PARSE_OK; + } + } + + return PARSE_ERROR; +} + +static ParseReturn +decode_mvd (GstBitReader * br, gint * mvd1, gint * mvd2) +{ + gint i; + guint16 code; + + PEEK_BITS (br, &code, 16); + for (i = 0; i < MVD_LEN; i++) { + if ((code & mvd_table[i][1]) == mvd_table[i][0]) { + SKIP_BITS (br, mvd_table[i][2]); + *mvd1 = (gint16) mvd_table[i][3]; + *mvd2 = (gint16) mvd_table[i][4]; + return PARSE_OK; + } + } + + return PARSE_ERROR; +} + +static ParseReturn +decode_cbp (GstBitReader * br, guint * cbp) +{ + gint i; + guint16 code; + + PEEK_BITS (br, &code, 16); + for (i = 0; i < CBP_LEN; i++) { + if ((code & cbp_table[i][1]) == cbp_table[i][0]) { + SKIP_BITS (br, cbp_table[i][2]); + *cbp = cbp_table[i][3]; + return PARSE_OK; + } + } + + return PARSE_ERROR; +} + +static ParseReturn +decode_tcoeff (GstBitReader * br, guint mtype) +{ + gint i; + guint16 code; + gboolean eob; + + /* Special handling of first coeff */ + if (mtype & MTYPE_INTER) { + /* Inter, different vlc since EOB is not allowed */ + PEEK_BITS (br, &code, 16); + if (code & 0x8000) { + SKIP_BITS (br, 2); + GST_TRACE ("tcoeff first inter special"); + } else { + /* Fallthrough. Let the first coeff be handled like other coeffs since + * the vlc is the same as long as the first bit is not set. */ + } + } else { + /* Intra, first coeff is fixed 8-bit */ + GST_TRACE ("tcoeff first intra special"); + SKIP_BITS (br, 8); + } + + /* Block must end with EOB. */ + eob = FALSE; + while (!eob) { + PEEK_BITS (br, &code, 16); + for (i = 0; i < TCOEFF_LEN; i++) { + if ((code & tcoeff_table[i][1]) == tcoeff_table[i][0]) { + GST_TRACE ("tcoeff vlc[%d], run=%d, level=%d", i, tcoeff_table[i][3], + tcoeff_table[i][4]); + SKIP_BITS (br, tcoeff_table[i][2]); + if (tcoeff_table[i][3] == TCOEFF_EOB) { + eob = TRUE; + } else if (tcoeff_table[i][3] == TCOEFF_ESC) { +#if 0 + guint16 val; + val = gst_bit_reader_peek_bits_uint16_unchecked (br, 6 + 8); + GST_TRACE ("esc run=%d, level=%d", val >> 8, (gint8) (val & 0xff)); +#endif + SKIP_BITS (br, 6 + 8); + } + break; + } + } + if (i == TCOEFF_LEN) + /* No matching VLC */ + return PARSE_ERROR; + } + + return PARSE_OK; +} + +static gint +find_picture_header_offset (const guint8 * data, gsize size) +{ + gint i; + guint32 val; + + if (size < 4) + return -1; + + val = GST_READ_UINT32_BE (data); + for (i = 0; i < 8; i++) { + if ((val >> (12 - i)) == 0x10) + return i; + } + + return -1; +} + +static ParseReturn +parse_picture_header (GstRtpH261Pay * pay, GstBitReader * br, gint * num_gob) +{ + guint32 val; + + GET_BITS (br, &val, PSC_LEN); + if (val != 0x10) + return PARSE_ERROR; + SKIP_BITS (br, TR_LEN); + GET_BITS (br, &val, PTYPE_LEN); + *num_gob = (val & 0x04) == 0 ? 3 : 12; + + return PARSE_OK; +} + +static ParseReturn +parse_gob_header (GstRtpH261Pay * pay, GstBitReader * br, Gob * gob) +{ + guint32 val; + + GET_BITS (br, &val, GBSC_LEN); + if (val != 0x01) + return PARSE_ERROR; + GET_BITS (br, &gob->gn, GN_LEN); + GST_TRACE_OBJECT (pay, "Parsing GOB %d", gob->gn); + + GET_BITS (br, &gob->gquant, GQUANT_LEN); + GST_TRACE_OBJECT (pay, "GQUANT %d", gob->gquant); + GET_BITS (br, &val, GEI_LEN); + while (val != 0) { + SKIP_BITS (br, GSPARE_LEN); + GET_BITS (br, &val, GEI_LEN); + } + + return PARSE_OK; +} + +static ParseReturn +parse_mb (GstRtpH261Pay * pay, GstBitReader * br, const Macroblock * prev, + Macroblock * mb) +{ + gint mba_diff; + guint cbp; + ParseReturn ret; + + cbp = 0x3f; + mb->quant = prev->quant; + + if ((ret = decode_mba (br, &mba_diff)) != PARSE_OK) + return ret; + mb->mba = prev->mba == 0 ? mba_diff : prev->mba + mba_diff; + GST_TRACE_OBJECT (pay, "Parse MBA %d (mba_diff %d)", mb->mba, mba_diff); + + if ((ret = decode_mtype (br, &mb->mtype)) != PARSE_OK) + return ret; + GST_TRACE_OBJECT (pay, + "MTYPE: inter %d, mc %d, fil %d, mquant %d, mvd %d, cbp %d, tcoeff %d", + (mb->mtype & MTYPE_INTER) != 0, (mb->mtype & MTYPE_MC) != 0, + (mb->mtype & MTYPE_FIL) != 0, (mb->mtype & MTYPE_MQUANT) != 0, + (mb->mtype & MTYPE_MVD) != 0, (mb->mtype & MTYPE_CBP) != 0, + (mb->mtype & MTYPE_TCOEFF) != 0); + + if (mb->mtype & MTYPE_MQUANT) { + GET_BITS (br, &mb->quant, MQUANT_LEN); + GST_TRACE_OBJECT (pay, "MQUANT: %d", mb->quant); + } + + if (mb->mtype & MTYPE_MVD) { + gint i, pmv[2], mv[2]; + + if (mb->mba == 1 || mb->mba == 12 || mb->mba == 23 || mba_diff != 1 || + (prev->mtype & MTYPE_INTER) == 0) { + pmv[0] = 0; + pmv[1] = 0; + } else { + pmv[0] = prev->mvx; + pmv[1] = prev->mvy; + } + for (i = 0; i < 2; i++) { + gint mvd1, mvd2; + if ((ret = decode_mvd (br, &mvd1, &mvd2)) != PARSE_OK) + return ret; + if (ABS (pmv[i] + mvd1) <= 15) + mv[i] = pmv[i] + mvd1; + else + mv[i] = pmv[i] + mvd2; + } + mb->mvx = mv[0]; + mb->mvy = mv[1]; + } else { + mb->mvx = 0; + mb->mvy = 0; + } + + if (mb->mtype & MTYPE_CBP) { + if ((ret = decode_cbp (br, &cbp)) != PARSE_OK) + return ret; + } + + /* Block layer */ + if (mb->mtype & MTYPE_TCOEFF) { + gint block; + for (block = 0; block < 6; block++) { + if (cbp & (1 << (5 - block))) { + GST_TRACE_OBJECT (pay, "Decode TCOEFF for block %d", block); + if ((ret = decode_tcoeff (br, mb->mtype)) != PARSE_OK) + return ret; + } + } + } + + mb->endpos = gst_bit_reader_get_pos (br); + + return ret; +} + +/* Parse macroblocks until the next MB that exceeds maxpos. At least one MB is + * included even if it exceeds maxpos. Returns endpos of last included MB. */ +static ParseReturn +parse_mb_until_pos (GstRtpH261Pay * pay, GstBitReader * br, Gob * gob, + guint * endpos) +{ + ParseReturn ret; + gint count = 0; + gboolean stop = FALSE; + guint maxpos = *endpos; + Macroblock mb; + + GST_LOG_OBJECT (pay, "Parse until pos %u, start at pos %u, gobn %d, mba %d", + maxpos, gst_bit_reader_get_pos (br), gob->gn, gob->last.mba); + + while (!stop) { + ret = parse_mb (pay, br, &gob->last, &mb); + + switch (ret) { + case PARSE_OK: + if (mb.endpos > maxpos && count > 0) { + /* Don't include current MB */ + stop = TRUE; + } else { + /* Update to include current MB */ + *endpos = mb.endpos; + gob->last = mb; + count++; + } + break; + + case PARSE_END_OF_FRAME: + *endpos = gst_bit_reader_get_pos (br); + GST_DEBUG_OBJECT (pay, "End of frame at pos %u (last GOBN %d MBA %d)", + *endpos, gob->gn, gob->last.mba); + stop = TRUE; + break; + + case PARSE_END_OF_GOB: + /* Note that a GOB can contain nothing, so we may get here on the first + * iteration. */ + *endpos = gob->last.mba == 0 ? + gob->startpos : gst_bit_reader_get_pos (br); + GST_DEBUG_OBJECT (pay, "End of gob at pos %u (last GOBN %d MBA %d)", + *endpos, gob->gn, gob->last.mba); + stop = TRUE; + break; + + case PARSE_END_OF_BUFFER: + case PARSE_ERROR: + GST_WARNING_OBJECT (pay, "Failed to parse stream (reason %d)", ret); + return ret; + break; + + default: + g_assert_not_reached (); + break; + } + } + gob->last.gobn = gob->gn; + + if (ret == PARSE_OK) { + GST_DEBUG_OBJECT (pay, + "Split GOBN %d after MBA %d (endpos %u, maxpos %u, nextpos %u)", + gob->gn, gob->last.mba, *endpos, maxpos, mb.endpos); + gst_bit_reader_set_pos (br, *endpos); + } + + return ret; +} + +static guint +bitrange_to_bytes (guint first, guint last) +{ + return (GST_ROUND_UP_8 (last) - GST_ROUND_DOWN_8 (first)) / 8; +} + +/* Find next 16-bit GOB start code (0x0001), which may not be byte aligned. + * Returns the bit offset of the first bit of GBSC. */ +static gssize +find_gob (GstRtpH261Pay * pay, const guint8 * data, guint size, guint pos) +{ + gssize ret = -1; + guint offset; + + GST_LOG_OBJECT (pay, "Search for GOB from pos %u", pos); + + for (offset = pos / 8; offset < size - 1; offset++) { + if (data[offset] == 0x0) { + gint msb = g_bit_nth_msf (data[offset + 1], 8); + gint lsb = offset > 0 ? g_bit_nth_lsf (data[offset - 1], -1) : 0; + if (lsb == -1) + lsb = 8; + if (msb >= 0 && lsb >= msb) { + ret = offset * 8 - msb; + GST_LOG_OBJECT (pay, "Found GOB start code at bitpos %" + G_GSSIZE_FORMAT " (%02x %02x %02x)", ret, + offset > 0 ? data[offset - 1] : 0, data[offset], data[offset + 1]); + break; + } + } + } + + return ret; +} + +/* Scans after all GOB start codes and initalizes the GOB structure with start + * and end positions. */ +static ParseReturn +gst_rtp_h261_pay_init_gobs (GstRtpH261Pay * pay, Gob * gobs, gint num_gobs, + const guint8 * bits, gint len, guint pos) +{ + gint i; + + for (i = 0; i < num_gobs; i++) { + gssize gobpos = find_gob (pay, bits, len, pos); + if (gobpos == -1) { + GST_WARNING_OBJECT (pay, "Found only %d of %d GOBs", i, num_gobs); + return PARSE_ERROR; + } + GST_LOG_OBJECT (pay, "Found GOB %d at pos %" G_GSSIZE_FORMAT, i, gobpos); + pos = gobpos + GBSC_LEN; + + gobs[i].startpos = gobpos; + if (i > 0) + gobs[i - 1].endpos = gobpos; + } + gobs[num_gobs - 1].endpos = len * 8; + + return PARSE_OK; +} + +static GstFlowReturn +gst_rtp_h261_pay_fragment_push (GstRtpH261Pay * pay, GstBuffer * buffer, + const guint8 * bits, guint start, guint end, + const Macroblock * last_mb_in_previous_packet, gboolean marker) +{ + GstBuffer *outbuf; + guint8 *payload; + GstRtpH261PayHeader *header; + gint nbytes; + const Macroblock *last = last_mb_in_previous_packet; + GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; + + nbytes = bitrange_to_bytes (start, end); + + outbuf = gst_rtp_buffer_new_allocate (nbytes + + GST_RTP_H261_PAYLOAD_HEADER_LEN, 0, 0); + gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); + payload = gst_rtp_buffer_get_payload (&rtp); + header = (GstRtpH261PayHeader *) payload; + + memset (header, 0, GST_RTP_H261_PAYLOAD_HEADER_LEN); + header->v = 1; + header->sbit = start & 7; + header->ebit = (8 - (end & 7)) & 7; + + if (last != NULL && last->mba != 0 && last->mba != 33) { + /* NOTE: MVD assumes that we're running on 2's complement architecture */ + guint mbap = last->mba - 1; + header->gobn = last->gobn; + header->mbap1 = mbap >> 1; + header->mbap2 = mbap & 1; + header->quant = last->quant; + header->hmvd1 = last->mvx >> 3; + header->hmvd2 = last->mvx & 7; + header->vmvd = last->mvy; + } + + memcpy (payload + GST_RTP_H261_PAYLOAD_HEADER_LEN, + bits + GST_ROUND_DOWN_8 (start) / 8, nbytes); + + GST_BUFFER_TIMESTAMP (outbuf) = pay->timestamp; + gst_rtp_buffer_set_marker (&rtp, marker); + pay->offset = end & 7; + + GST_DEBUG_OBJECT (pay, + "Push fragment, bytes %d, sbit %d, ebit %d, gobn %d, mbap %d, marker %d", + nbytes, header->sbit, header->ebit, last != NULL ? last->gobn : 0, + last != NULL ? MAX (last->mba - 1, 0) : 0, marker); + + gst_rtp_buffer_unmap (&rtp); + + gst_rtp_copy_meta (GST_ELEMENT_CAST (pay), outbuf, buffer, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + + return gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD_CAST (pay), outbuf); +} + +static GstFlowReturn +gst_rtp_h261_packetize_and_push (GstRtpH261Pay * pay, GstBuffer * buffer, + const guint8 * bits, gsize len) +{ + GstFlowReturn ret = GST_FLOW_OK; + GstBitReader br_; + GstBitReader *br = &br_; + guint max_payload_size = + gst_rtp_buffer_calc_payload_len (GST_RTP_BASE_PAYLOAD_MTU (pay) - + GST_RTP_H261_PAYLOAD_HEADER_LEN, 0, 0); + guint startpos; + gint num_gobs; + Gob gobs[MAX_NUM_GOB]; + Gob *gob; + Macroblock last_mb_in_previous_packet = { 0 }; + gboolean marker; + ParseReturn result; + + gst_bit_reader_init (br, bits, len); + gst_bit_reader_set_pos (br, pay->offset); + startpos = pay->offset; + + if (parse_picture_header (pay, br, &num_gobs) < PARSE_OK) { + GST_WARNING_OBJECT (pay, "Failed to parse picture header"); + goto beach; + } + + if (gst_rtp_h261_pay_init_gobs (pay, gobs, num_gobs, bits, len, + gst_bit_reader_get_pos (br)) < PARSE_OK) + goto beach; + + /* Split, create and push packets */ + gob = gobs; + marker = FALSE; + while (marker == FALSE && ret == GST_FLOW_OK) { + guint endpos; + + /* Check if there is wrap around because of extremely high MTU */ + endpos = GST_ROUND_DOWN_8 (startpos) + max_payload_size * 8; + if (endpos < startpos) + endpos = G_MAXUINT; + + GST_LOG_OBJECT (pay, "Next packet startpos %u maxpos %u", startpos, endpos); + + /* Find the last GOB that does not completely fit in packet */ + for (; gob < &gobs[num_gobs - 1]; gob++) { + if (bitrange_to_bytes (startpos, gob->endpos) > max_payload_size) { + GST_LOG_OBJECT (pay, "Split gob (start %u, end %u)", + gob->startpos, gob->endpos); + break; + } + } + + if (startpos <= gob->startpos) { + /* Fast-forward until start of GOB */ + gst_bit_reader_set_pos (br, gob->startpos); + if (parse_gob_header (pay, br, gob) < PARSE_OK) { + GST_WARNING_OBJECT (pay, "Failed to parse GOB header"); + goto beach; + } + gob->last.mba = 0; + gob->last.gobn = gob->gn; + gob->last.quant = gob->gquant; + } + + /* Parse MBs to find position where to split. Can only be done on after MB + * or at GOB boundary. */ + result = parse_mb_until_pos (pay, br, gob, &endpos); + if (result < PARSE_OK) + goto beach; + + marker = result == PARSE_END_OF_FRAME; + ret = gst_rtp_h261_pay_fragment_push (pay, buffer, bits, startpos, endpos, + &last_mb_in_previous_packet, marker); + + last_mb_in_previous_packet = gob->last; + if (endpos == gob->endpos) + gob++; + startpos = endpos; + } + +beach: + return ret; +} + +/* Shift buffer to packetize a continuous stream of bits (not bytes). Some + * payloaders/decoders are very picky about correct sbit/ebit for frames. */ +static guint8 * +gst_rtp_h261_pay_shift_buffer (GstRtpH261Pay * pay, const guint8 * data, + gsize size, gint offset, gsize * newsize) +{ + /* In order to read variable length codes at the very end of the buffer + * wihout peeking into possibly unallocated data, we pad with extra 0's + * which will generate an invalid code at the end of the buffer. */ + guint pad = 4; + gsize allocsize = size + pad; + guint8 *bits = g_malloc (allocsize); + gint i; + + if (offset == 0) { + memcpy (bits, data, size); + *newsize = size; + } else if (offset > 0) { + bits[0] = 0; + for (i = 0; i < size; i++) { + bits[i] |= data[i] >> offset; + bits[i + 1] = data[i] << (8 - offset); + } + *newsize = size + 1; + } else { + gint shift = -offset; + for (i = 0; i < size - 1; i++) + bits[i] = (data[i] << shift) | (data[i + 1] >> (8 - shift)); + bits[i] = data[i] << shift; + *newsize = size; + } + for (i = *newsize; i < allocsize; i++) + bits[i] = 0; + + return bits; +} + +static GstFlowReturn +gst_rtp_h261_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer) +{ + GstFlowReturn ret = GST_FLOW_OK; + GstRtpH261Pay *pay = GST_RTP_H261_PAY (payload); + gsize len; + guint8 *bits; + gint psc_offset, shift; + GstMapInfo map; + + GST_DEBUG_OBJECT (pay, "Handle buffer of size %" G_GSIZE_FORMAT, + gst_buffer_get_size (buffer)); + + pay->timestamp = GST_BUFFER_TIMESTAMP (buffer); + + if (!gst_buffer_map (buffer, &map, GST_MAP_READ) || !map.data) { + GST_WARNING_OBJECT (pay, "Failed to map buffer"); + return GST_FLOW_ERROR; + } + + psc_offset = find_picture_header_offset (map.data, map.size); + if (psc_offset < 0) { + GST_WARNING_OBJECT (pay, "Failed to find picture header offset"); + goto beach; + } else { + GST_DEBUG_OBJECT (pay, "Picture header offset: %d", psc_offset); + } + + shift = pay->offset - psc_offset; + bits = gst_rtp_h261_pay_shift_buffer (pay, map.data, map.size, shift, &len); + ret = gst_rtp_h261_packetize_and_push (pay, buffer, bits, len); + g_free (bits); + +beach: + gst_buffer_unmap (buffer, &map); + gst_buffer_unref (buffer); + return ret; +} + + +static gboolean +gst_rtp_h261_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) +{ + gboolean res; + + gst_rtp_base_payload_set_options (payload, "video", + payload->pt != GST_RTP_PAYLOAD_H261, "H261", 90000); + res = gst_rtp_base_payload_set_outcaps (payload, NULL); + + return res; +} + +static void +gst_rtp_h261_pay_init (GstRtpH261Pay * pay) +{ + GstRTPBasePayload *payload = GST_RTP_BASE_PAYLOAD (pay); + payload->pt = GST_RTP_PAYLOAD_H261; + pay->offset = 0; +} + +static void +gst_rtp_h261_pay_class_init (GstRtpH261PayClass * klass) +{ + GstElementClass *element_class; + GstRTPBasePayloadClass *gstrtpbasepayload_class; + + element_class = GST_ELEMENT_CLASS (klass); + gstrtpbasepayload_class = GST_RTP_BASE_PAYLOAD_CLASS (klass); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&gst_rtp_h261_pay_src_template)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&gst_rtp_h261_pay_sink_template)); + + gst_element_class_set_static_metadata (element_class, + "RTP H261 packet payloader", "Codec/Payloader/Network/RTP", + "Payload-encodes H261 video in RTP packets (RFC 4587)", + "Stian Selnes "); + + gstrtpbasepayload_class->set_caps = gst_rtp_h261_pay_setcaps; + gstrtpbasepayload_class->handle_buffer = gst_rtp_h261_pay_handle_buffer; + + GST_DEBUG_CATEGORY_INIT (rtph261pay_debug, "rtph261pay", 0, + "H261 RTP Payloader"); +} + +gboolean +gst_rtp_h261_pay_plugin_init (GstPlugin * plugin) +{ + return gst_element_register (plugin, "rtph261pay", + GST_RANK_SECONDARY, GST_TYPE_RTP_H261_PAY); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261pay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261pay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph261pay.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph261pay.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,100 @@ +/* GStreamer + * Copyright (C) <2014> Stian Selnes + * + * 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. + * + * Author: Dejan Sakelsak sahel@kiberpipa.org + */ + +#ifndef __GST_RTP_H261_PAY_H__ +#define __GST_RTP_H261_PAY_H__ + +#include +#include +#include + +G_BEGIN_DECLS +#define GST_TYPE_RTP_H261_PAY \ + (gst_rtp_h261_pay_get_type()) +#define GST_RTP_H261_PAY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H261_PAY,GstRtpH261Pay)) +#define GST_RTP_H261_PAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H261_PAY,GstRtpH261PayClass)) +#define GST_IS_RTP_H261_PAY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H261_PAY)) +#define GST_IS_RTP_H261_PAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H261_PAY)) +typedef struct _GstRtpH261PayClass GstRtpH261PayClass; +typedef struct _GstRtpH261Pay GstRtpH261Pay; + +struct _GstRtpH261Pay +{ + GstRTPBasePayload payload; + + GstAdapter *adapter; + gint offset; + GstClockTime timestamp; +}; + +struct _GstRtpH261PayClass +{ + GstRTPBasePayloadClass parent_class; +}; + +typedef struct _GstRtpH261PayHeader +{ +#if G_BYTE_ORDER == G_LITTLE_ENDIAN + unsigned int v:1; /* Motion vector flag */ + unsigned int i:1; /* Intra encoded data */ + unsigned int ebit:3; /* End position */ + unsigned int sbit:3; /* Start position */ + + unsigned int mbap1:4; /* MB address predictor - part1 */ + unsigned int gobn:4; /* GOB number */ + + unsigned int hmvd1:2; /* Horizontal motion vector data - part1 */ + unsigned int quant:5; /* Quantizer */ + unsigned int mbap2:1; /* MB address predictor - part2 */ + + unsigned int vmvd:5; /* Horizontal motion vector data - part1 */ + unsigned int hmvd2:3; /* Vertical motion vector data */ +#elif G_BYTE_ORDER == G_BIG_ENDIAN + unsigned int sbit:3; /* Start position */ + unsigned int ebit:3; /* End position */ + unsigned int i:1; /* Intra encoded data */ + unsigned int v:1; /* Motion vector flag */ + + unsigned int gobn:4; /* GOB number */ + unsigned int mbap1:4; /* MB address predictor - part1 */ + + unsigned int mbap2:1; /* MB address predictor - part2 */ + unsigned int quant:5; /* Quantizer */ + unsigned int hmvd1:2; /* Horizontal motion vector data - part1 */ + + unsigned int hmvd2:3; /* Vertical motion vector data */ + unsigned int vmvd:5; /* Horizontal motion vector data - part1 */ +#else +#error "G_BYTE_ORDER should be big or little endian." +#endif +} GstRtpH261PayHeader; +#define GST_RTP_H261_PAYLOAD_HEADER_LEN 4 + +GType gst_rtp_h261_pay_get_type (void); + +gboolean gst_rtp_h261_pay_plugin_init (GstPlugin * plugin); + +G_END_DECLS +#endif /* __GST_RTP_H261_PAY_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -30,7 +30,9 @@ #include #include +#include #include "gstrtph263depay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtph263depay_debug); #define GST_CAT_DEFAULT (rtph263depay_debug) @@ -55,9 +57,16 @@ "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_H263_STRING ", " "clock-rate = (int) 90000; " + /* optional SDP attribute: + * "a-framesize = (string) \"1234-1234\", " + */ "application/x-rtp, " "media = (string) \"video\", " - "clock-rate = (int) 90000, " "encoding-name = (string) \"H263\"") + "clock-rate = (int) 90000, " "encoding-name = (string) \"H263\"" + /* optional SDP attribute: + * "a-framesize = (string) \"1234-1234\", " + */ + ) ); #define gst_rtp_h263_depay_parent_class parent_class @@ -70,7 +79,7 @@ element, GstStateChange transition); static GstBuffer *gst_rtp_h263_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); gboolean gst_rtp_h263_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps); @@ -103,7 +112,7 @@ "Philippe Kalaf , " "Edward Hervey "); - gstrtpbasedepayload_class->process = gst_rtp_h263_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_h263_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_h263_depay_setcaps; } @@ -129,20 +138,67 @@ G_OBJECT_CLASS (parent_class)->finalize (object); } +static gboolean +gst_rtp_h263_parse_framesize (GstRTPBaseDepayload * filter, + const gchar * media_attr, GstCaps * srccaps) +{ + gchar *dimension, *endptr; + gint width, height; + GstStructure *d; + + width = g_ascii_strtoull (media_attr, &endptr, 10); + if (width <= 0) { + GST_ERROR_OBJECT (filter, + "Framesize media attribute width out of valid range"); + return FALSE; + } else if (*endptr != '-') { + GST_ERROR_OBJECT (filter, + "Framesize media attribute has invalid dimension separator"); + return FALSE; + } + + dimension = endptr + 1; + height = g_ascii_strtoull (dimension, &endptr, 10); + if (height <= 0) { + GST_ERROR_OBJECT (filter, + "Framesize media attribute height out of valid range"); + return FALSE; + } else if (*endptr != '\0') { + GST_ERROR_OBJECT (filter, + "Framesize media attribute unexpectedly has trailing characters"); + return FALSE; + } + + d = gst_caps_get_structure (srccaps, 0); + gst_structure_set (d, "width", G_TYPE_INT, width, "height", G_TYPE_INT, + height, NULL); + + return TRUE; +} + gboolean gst_rtp_h263_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps) { GstCaps *srccaps; GstStructure *structure = gst_caps_get_structure (caps, 0); gint clock_rate; + const gchar *framesize; + + srccaps = gst_caps_new_simple ("video/x-h263", + "variant", G_TYPE_STRING, "itu", + "h263version", G_TYPE_STRING, "h263", NULL); if (!gst_structure_get_int (structure, "clock-rate", &clock_rate)) clock_rate = 90000; /* default */ filter->clock_rate = clock_rate; - srccaps = gst_caps_new_simple ("video/x-h263", - "variant", G_TYPE_STRING, "itu", - "h263version", G_TYPE_STRING, "h263", NULL); + framesize = gst_structure_get_string (structure, "a-framesize"); + if (framesize != NULL) { + if (!gst_rtp_h263_parse_framesize (filter, framesize, srccaps)) { + return FALSE; + } + } + gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (filter), srccaps); gst_caps_unref (srccaps); @@ -150,7 +206,7 @@ } static GstBuffer * -gst_rtp_h263_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_h263_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpH263Depay *rtph263depay; GstBuffer *outbuf; @@ -160,12 +216,11 @@ guint SBIT, EBIT; gboolean F, P, M; gboolean I; - GstRTPBuffer rtp = { NULL }; rtph263depay = GST_RTP_H263_DEPAY (depayload); /* flush remaining data on discont */ - if (GST_BUFFER_IS_DISCONT (buf)) { + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { GST_LOG_OBJECT (depayload, "Discont buffer, flushing adapter"); gst_adapter_clear (rtph263depay->adapter); rtph263depay->offset = 0; @@ -173,12 +228,13 @@ rtph263depay->start = FALSE; } - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); + payload = gst_rtp_buffer_get_payload (rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); - payload = gst_rtp_buffer_get_payload (&rtp); + M = gst_rtp_buffer_get_marker (rtp); - M = gst_rtp_buffer_get_marker (&rtp); + if (payload_len < 1) + goto too_small; /* Let's see what mode we are using */ F = (payload[0] & 0x80) == 0x80; @@ -201,6 +257,8 @@ * |F|P|SBIT |EBIT | SRC |I|U|S|A|R |DBQ| TRB | TR | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ + if (payload_len <= header_len) + goto too_small; I = (payload[1] & 0x10) == 0x10; } else { if (P == 0) { @@ -217,6 +275,8 @@ * |I|U|S|A| HMV1 | VMV1 | HMV2 | VMV2 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ + if (payload_len <= header_len) + goto too_small; I = (payload[4] & 0x80) == 0x80; } else { /* F == 1 and P == 1 @@ -234,6 +294,8 @@ * | RR |DBQ| TRB | TR | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ + if (payload_len <= header_len) + goto too_small; I = (payload[4] & 0x80) == 0x80; } } @@ -252,7 +314,7 @@ if (!F && payload_len > 4 && (GST_READ_UINT32_BE (payload) >> 10 == 0x20)) { GST_DEBUG ("Mode A with PSC => frame start"); rtph263depay->start = TRUE; - if (! !(payload[4] & 0x02) != I) { + if ((! !(payload[4] & 0x02)) != I) { GST_DEBUG ("Wrong Picture Coding Type Flag in rtp header"); I = !I; } @@ -283,13 +345,13 @@ GstBuffer *tmp; /* Take the entire buffer */ - tmp = gst_rtp_buffer_get_payload_subbuffer (&rtp, header_len, payload_len); + tmp = gst_rtp_buffer_get_payload_subbuffer (rtp, header_len, payload_len); gst_adapter_push (rtph263depay->adapter, tmp); } else { GstBuffer *tmp; /* Take the entire buffer except for the last byte */ - tmp = gst_rtp_buffer_get_payload_subbuffer (&rtp, header_len, + tmp = gst_rtp_buffer_get_payload_subbuffer (rtp, header_len, payload_len - 1); gst_adapter_push (rtph263depay->adapter, tmp); @@ -324,6 +386,9 @@ GST_DEBUG ("Pushing out a buffer of %d bytes", avail); + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtph263depay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + gst_rtp_base_depayload_push (depayload, outbuf); rtph263depay->offset = 0; rtph263depay->leftover = 0; @@ -332,9 +397,15 @@ rtph263depay->start = TRUE; } } - gst_rtp_buffer_unmap (&rtp); return NULL; + +too_small: + { + GST_ELEMENT_WARNING (rtph263depay, STREAM, DECODE, + ("Packet payload was too small"), (NULL)); + return NULL; + } } static GstStateChangeReturn diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,8 +27,10 @@ #include #include #include +#include #include "gstrtph263pay.h" +#include "gstrtputils.h" typedef enum { @@ -440,8 +442,7 @@ static void gst_rtp_h263_pay_init (GstRtpH263Pay * rtph263pay) { - rtph263pay->adapter = gst_adapter_new (); - + GST_RTP_BASE_PAYLOAD_PT (rtph263pay) = GST_RTP_PAYLOAD_H263; rtph263pay->prop_payload_mode = DEFAULT_MODE_A; } @@ -452,8 +453,7 @@ rtph263pay = GST_RTP_H263_PAY (object); - g_object_unref (rtph263pay->adapter); - rtph263pay->adapter = NULL; + gst_buffer_replace (&rtph263pay->current_buffer, NULL); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -461,13 +461,43 @@ static gboolean gst_rtp_h263_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) { + GstStructure *s = gst_caps_get_structure (caps, 0); + gint width, height; + gchar *framesize = NULL; gboolean res; - payload->pt = GST_RTP_PAYLOAD_H263; - gst_rtp_base_payload_set_options (payload, "video", TRUE, "H263", 90000); - res = gst_rtp_base_payload_set_outcaps (payload, NULL); + if (gst_structure_has_field (s, "width") && + gst_structure_has_field (s, "height")) { + if (!gst_structure_get_int (s, "width", &width) || width <= 0) { + goto invalid_dimension; + } + + if (!gst_structure_get_int (s, "height", &height) || height <= 0) { + goto invalid_dimension; + } + + framesize = g_strdup_printf ("%d-%d", width, height); + } + + gst_rtp_base_payload_set_options (payload, "video", + payload->pt != GST_RTP_PAYLOAD_H263, "H263", 90000); + + if (framesize != NULL) { + res = gst_rtp_base_payload_set_outcaps (payload, + "a-framesize", G_TYPE_STRING, framesize, NULL); + } else { + res = gst_rtp_base_payload_set_outcaps (payload, NULL); + } + g_free (framesize); return res; + + /* ERRORS */ +invalid_dimension: + { + GST_ERROR_OBJECT (payload, "Invalid width/height from caps"); + return FALSE; + } } static void @@ -1238,14 +1268,12 @@ * Splat the payload header values */ guint8 *header; - guint8 *payload; GstFlowReturn ret; GstRTPBuffer rtp = { NULL }; gst_rtp_buffer_map (package->outbuf, GST_MAP_WRITE, &rtp); header = gst_rtp_buffer_get_payload (&rtp); - payload = header + package->mode; switch (package->mode) { case GST_RTP_H263_PAYLOAD_HEADER_MODE_A: @@ -1263,17 +1291,10 @@ return GST_FLOW_ERROR; } - - /* - * Copy the payload data in the buffer - */ - GST_DEBUG ("Copying memory"); - memcpy (payload, (guint8 *) package->payload_start, package->payload_len); - /* * timestamp the buffer */ - GST_BUFFER_TIMESTAMP (package->outbuf) = rtph263pay->first_ts; + GST_BUFFER_PTS (package->outbuf) = rtph263pay->first_ts; gst_rtp_buffer_set_marker (&rtp, package->marker); if (package->marker) @@ -1281,6 +1302,17 @@ gst_rtp_buffer_unmap (&rtp); + /* + * Copy the payload data in the buffer + */ + GST_DEBUG ("Copying memory"); + gst_buffer_copy_into (package->outbuf, rtph263pay->current_buffer, + GST_BUFFER_COPY_MEMORY, package->payload_start - rtph263pay->map.data, + package->payload_len); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph263pay), package->outbuf, + rtph263pay->current_buffer, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtph263pay), package->outbuf); @@ -1313,8 +1345,7 @@ pack->gobn = context->gobs[first]->gobn; pack->mode = GST_RTP_H263_PAYLOAD_HEADER_MODE_A; - pack->outbuf = - gst_rtp_buffer_new_allocate (pack->payload_len + pack->mode, 0, 0); + pack->outbuf = gst_rtp_buffer_new_allocate (pack->mode, 0, 0); GST_DEBUG ("Sending len:%d data to push function", pack->payload_len); @@ -1370,8 +1401,7 @@ } pack->payload_len = pack->payload_end - pack->payload_start + 1; - pack->outbuf = - gst_rtp_buffer_new_allocate (pack->payload_len + pack->mode, 0, 0); + pack->outbuf = gst_rtp_buffer_new_allocate (pack->mode, 0, 0); return gst_rtp_h263_pay_push (rtph263pay, context, pack); } @@ -1384,12 +1414,11 @@ /*---------- MODE B MODE FRAGMENTATION ----------*/ - GstRtpH263PayMB *mac; + GstRtpH263PayMB *mac = NULL; guint max_payload_size; GstRtpH263PayBoundry boundry; guint mb; - //TODO remove m - GstRtpH263PayMB *m; + guint8 ebit; guint first = 0; guint payload_len; @@ -1412,7 +1441,6 @@ &boundry.end, &gob->end) != 0) { GST_ERROR ("The rest of the bits should be 0, exiting, because something bad happend"); - gst_adapter_flush (rtph263pay->adapter, rtph263pay->available_data); goto decode_error; } //The first GOB of a frame "has no" actual header - PICTURE header is his header @@ -1482,15 +1510,16 @@ // We are on MB layer - m = mac = gst_rtp_h263_pay_mb_new (&boundry, 0); + mac = gst_rtp_h263_pay_mb_new (&boundry, 0); for (mb = 0; mb < format_props[context->piclayer->ptype_srcformat][1]; mb++) { GST_DEBUG ("================ START MB %d =================", mb); //Find next macroblock boundaries + ebit = mac->ebit; if (!(mac = gst_rtp_h263_pay_B_mbfinder (context, gob, mac, mb))) { - GST_DEBUG ("Error decoding MB - sbit: %d", 8 - m->ebit); + GST_DEBUG ("Error decoding MB - sbit: %d", 8 - ebit); GST_ERROR ("Error decoding in GOB"); goto decode_error; @@ -1513,7 +1542,6 @@ gob->end = mac->end; break; } - m = mac; GST_DEBUG ("Found MB: mba: %d start: %p end: %p len: %d sbit: %d ebit: %d", mac->mba, mac->start, mac->end, mac->length, mac->sbit, mac->ebit); GST_DEBUG ("================ END MB %d =================", mb); @@ -1538,7 +1566,7 @@ if (gst_rtp_h263_pay_B_fragment_push (rtph263pay, context, gob, first, mb - 1, &boundry)) { GST_ERROR ("Oooops, there was an error sending"); - return FALSE; + goto decode_error; } payload_len = 0; @@ -1556,15 +1584,17 @@ if (gst_rtp_h263_pay_B_fragment_push (rtph263pay, context, gob, first, mb - 1, &boundry)) { GST_ERROR ("Oooops, there was an error sending!"); - return FALSE; + goto decode_error; } } /*---------- END OF MODE B FRAGMENTATION ----------*/ + gst_rtp_h263_pay_mb_destroy (mac); return TRUE; decode_error: + gst_rtp_h263_pay_mb_destroy (mac); return FALSE; } @@ -1582,8 +1612,7 @@ GST_DEBUG ("Available data: %d", rtph263pay->available_data); pack->outbuf = - gst_rtp_buffer_new_allocate (pack->payload_len + - GST_RTP_H263_PAYLOAD_HEADER_MODE_A, 0, 0); + gst_rtp_buffer_new_allocate (GST_RTP_H263_PAYLOAD_HEADER_MODE_A, 0, 0); return gst_rtp_h263_pay_push (rtph263pay, context, pack); } @@ -1608,16 +1637,15 @@ GST_RTP_H263_PAYLOAD_HEADER_MODE_C); GST_DEBUG ("MTU: %d", context->mtu); - rtph263pay->available_data = gst_adapter_available (rtph263pay->adapter); + rtph263pay->available_data = gst_buffer_get_size (rtph263pay->current_buffer); if (rtph263pay->available_data == 0) { ret = GST_FLOW_OK; goto end; } /* Get a pointer to all the data for the frame */ - rtph263pay->data = - (guint8 *) gst_adapter_map (rtph263pay->adapter, - rtph263pay->available_data); + gst_buffer_map (rtph263pay->current_buffer, &rtph263pay->map, GST_MAP_READ); + rtph263pay->data = (guint8 *) rtph263pay->map.data; /* Picture header */ context->piclayer = (GstRtpH263PayPic *) rtph263pay->data; @@ -1773,8 +1801,8 @@ end: gst_rtp_h263_pay_context_destroy (context, context->piclayer->ptype_srcformat); - gst_adapter_unmap (rtph263pay->adapter); - gst_adapter_flush (rtph263pay->adapter, rtph263pay->available_data); + gst_buffer_unmap (rtph263pay->current_buffer, &rtph263pay->map); + gst_buffer_replace (&rtph263pay->current_buffer, NULL); return ret; } @@ -1789,10 +1817,12 @@ GST_DEBUG ("-------------------- NEW FRAME ---------------"); rtph263pay = GST_RTP_H263_PAY (payload); - rtph263pay->first_ts = GST_BUFFER_TIMESTAMP (buffer); + rtph263pay->first_ts = GST_BUFFER_PTS (buffer); + + gst_buffer_replace (&rtph263pay->current_buffer, buffer); + gst_buffer_unref (buffer); /* we always encode and flush a full picture */ - gst_adapter_push (rtph263pay->adapter, buffer); ret = gst_rtp_h263_pay_flush (rtph263pay); GST_DEBUG ("-------------------- END FRAME ---------------"); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263pay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263pay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263pay.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263pay.h 2015-10-22 08:02:54.000000000 +0000 @@ -24,7 +24,6 @@ #include #include -#include G_BEGIN_DECLS #define GST_TYPE_RTP_H263_PAY \ @@ -63,7 +62,9 @@ { GstRTPBasePayload payload; - GstAdapter *adapter; + GstBuffer *current_buffer; + GstMapInfo map; + GstClockTime first_ts; gboolean prop_payload_mode; guint8 *data; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263pdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263pdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263pdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263pdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,7 +24,12 @@ #include #include +#include #include "gstrtph263pdepay.h" +#include "gstrtputils.h" + +GST_DEBUG_CATEGORY_STATIC (rtph263pdepay_debug); +#define GST_CAT_DEFAULT (rtph263pdepay_debug) static GstStaticPadTemplate gst_rtp_h263p_depay_src_template = GST_STATIC_PAD_TEMPLATE ("src", @@ -86,7 +91,7 @@ element, GstStateChange transition); static GstBuffer *gst_rtp_h263p_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); gboolean gst_rtp_h263p_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps); @@ -115,8 +120,11 @@ "Extracts H263/+/++ video from RTP packets (RFC 4629)", "Wim Taymans "); - gstrtpbasedepayload_class->process = gst_rtp_h263p_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_h263p_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_h263p_depay_setcaps; + + GST_DEBUG_CATEGORY_INIT (rtph263pdepay_debug, "rtph263pdepay", 0, + "H263+ Video RTP Depayloader"); } static void @@ -224,7 +232,8 @@ } static GstBuffer * -gst_rtp_h263p_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_h263p_depay_process (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp) { GstRtpH263PDepay *rtph263pdepay; GstBuffer *outbuf; @@ -233,28 +242,25 @@ gboolean P, V, M; guint header_len; guint8 PLEN, PEBIT; - GstRTPBuffer rtp = { NULL }; rtph263pdepay = GST_RTP_H263P_DEPAY (depayload); /* flush remaining data on discont */ - if (GST_BUFFER_IS_DISCONT (buf)) { + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { GST_LOG_OBJECT (depayload, "DISCONT, flushing adapter"); gst_adapter_clear (rtph263pdepay->adapter); rtph263pdepay->wait_start = TRUE; } - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); header_len = 2; if (payload_len < header_len) goto too_small; - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); - M = gst_rtp_buffer_get_marker (&rtp); + M = gst_rtp_buffer_get_marker (rtp); /* 0 1 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 @@ -305,39 +311,37 @@ /* frame is completed: append to previous, push it out */ guint len, padlen; guint avail; - GstMapInfo map; + GstBuffer *padbuf; GST_LOG_OBJECT (depayload, "Frame complete"); + outbuf = + gst_rtp_buffer_get_payload_subbuffer (rtp, header_len, payload_len); + gst_adapter_push (rtph263pdepay->adapter, outbuf); + outbuf = NULL; + avail = gst_adapter_available (rtph263pdepay->adapter); len = avail + payload_len; padlen = (len % 4) + 4; - outbuf = gst_buffer_new_and_alloc (len + padlen); - - gst_buffer_map (outbuf, &map, GST_MAP_WRITE); - memset (map.data + len, 0, padlen); - - /* prepend previous data */ - if (avail > 0) { - gst_adapter_copy (rtph263pdepay->adapter, map.data, 0, avail); - gst_adapter_flush (rtph263pdepay->adapter, avail); + outbuf = gst_adapter_take_buffer (rtph263pdepay->adapter, avail); + if (padlen) { + padbuf = gst_buffer_new_and_alloc (padlen); + gst_buffer_memset (padbuf, 0, 0, padlen); + outbuf = gst_buffer_append (outbuf, padbuf); } - memcpy (map.data + avail, payload, payload_len); - gst_buffer_unmap (outbuf, &map); - gst_rtp_buffer_unmap (&rtp); - return outbuf; + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtph263pdepay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + return outbuf; } else { /* frame not completed: store in adapter */ - outbuf = gst_buffer_new_and_alloc (payload_len); - GST_LOG_OBJECT (depayload, "Frame incomplete, storing %d", payload_len); - gst_buffer_fill (outbuf, 0, payload, payload_len); + outbuf = + gst_rtp_buffer_get_payload_subbuffer (rtp, header_len, payload_len); gst_adapter_push (rtph263pdepay->adapter, outbuf); - gst_rtp_buffer_unmap (&rtp); } return NULL; @@ -345,13 +349,11 @@ { GST_ELEMENT_WARNING (rtph263pdepay, STREAM, DECODE, ("Packet payload was too small"), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } waiting_start: { GST_DEBUG_OBJECT (rtph263pdepay, "waiting for picture start"); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263ppay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263ppay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph263ppay.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph263ppay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,8 +26,10 @@ #include #include +#include #include "gstrtph263ppay.h" +#include "gstrtputils.h" #define DEFAULT_FRAGMENTATION_MODE GST_FRAGMENTATION_MODE_NORMAL @@ -643,9 +645,10 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay) { guint avail; - GstBuffer *outbuf; + GstBufferList *list = NULL; + GstBuffer *outbuf = NULL; GstFlowReturn ret; - gboolean fragmented; + gboolean fragmented = FALSE; avail = gst_adapter_available (rtph263ppay->adapter); if (avail == 0) @@ -666,45 +669,44 @@ while (avail > 0) { guint towrite; guint8 *payload; - guint payload_len; gint header_len; guint next_gop = 0; gboolean found_gob = FALSE; GstRTPBuffer rtp = { NULL }; + GstBuffer *payload_buf; if (rtph263ppay->fragmentation_mode == GST_FRAGMENTATION_MODE_SYNC) { /* start after 1st gop possible */ - guint parsed_len = 3; - const guint8 *parse_data = NULL; - - parse_data = gst_adapter_map (rtph263ppay->adapter, avail); /* Check if we have a gob or eos , eossbs */ /* FIXME EOS and EOSSBS packets should never contain any gobs and vice-versa */ - if (avail >= 3 && *parse_data == 0 && *(parse_data + 1) == 0 - && *(parse_data + 2) >= 0x80) { + next_gop = + gst_adapter_masked_scan_uint32 (rtph263ppay->adapter, 0xffff8000, + 0x00008000, 0, avail); + if (next_gop == 0) { GST_DEBUG_OBJECT (rtph263ppay, " Found GOB header"); found_gob = TRUE; } + /* Find next and cut the packet accordingly */ /* TODO we should get as many gobs as possible until MTU is reached, this * code seems to just get one GOB per packet */ - while (parsed_len + 2 < avail) { - if (parse_data[parsed_len] == 0 && parse_data[parsed_len + 1] == 0 - && parse_data[parsed_len + 2] >= 0x80) { - next_gop = parsed_len; - GST_DEBUG_OBJECT (rtph263ppay, " Next GOB Detected at : %d", - next_gop); - break; - } - parsed_len++; - } - gst_adapter_unmap (rtph263ppay->adapter); + if (next_gop == 0 && avail > 3) + next_gop = + gst_adapter_masked_scan_uint32 (rtph263ppay->adapter, 0xffff8000, + 0x00008000, 3, avail - 3); + GST_DEBUG_OBJECT (rtph263ppay, " Next GOB Detected at : %d", next_gop); + if (next_gop == -1) + next_gop = 0; } /* for picture start frames (non-fragmented), we need to remove the first * two 0x00 bytes and set P=1 */ - header_len = (fragmented && !found_gob) ? 2 : 0; + if (!fragmented || found_gob) { + gst_adapter_flush (rtph263ppay->adapter, 2); + avail -= 2; + } + header_len = 2; towrite = MIN (avail, gst_rtp_buffer_calc_payload_len (GST_RTP_BASE_PAYLOAD_MTU (rtph263ppay) - header_len, 0, 0)); @@ -712,9 +714,7 @@ if (next_gop > 0) towrite = MIN (next_gop, towrite); - payload_len = header_len + towrite; - - outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); + outbuf = gst_rtp_buffer_new_allocate (header_len, 0, 0); gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); /* last fragment gets the marker bit set */ @@ -722,8 +722,6 @@ payload = gst_rtp_buffer_get_payload (&rtp); - gst_adapter_copy (rtph263ppay->adapter, &payload[header_len], 0, towrite); - /* 0 1 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -734,17 +732,41 @@ payload[0] = (fragmented && !found_gob) ? 0x00 : 0x04; payload[1] = 0; - GST_BUFFER_TIMESTAMP (outbuf) = rtph263ppay->first_timestamp; + GST_BUFFER_PTS (outbuf) = rtph263ppay->first_timestamp; GST_BUFFER_DURATION (outbuf) = rtph263ppay->first_duration; gst_rtp_buffer_unmap (&rtp); - gst_adapter_flush (rtph263ppay->adapter, towrite); + payload_buf = gst_adapter_take_buffer_fast (rtph263ppay->adapter, towrite); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph263ppay), outbuf, payload_buf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + outbuf = gst_buffer_append (outbuf, payload_buf); + avail -= towrite; + /* If more data is available and this is our first iteration, + * we create a buffer list and remember that we're fragmented. + * + * If we're fragmented already, add buffers to the previously + * created buffer list. + * + * Otherwise fragmented will be FALSE and we just push the single output + * buffer, and no list is allocated. + */ + if (avail && !fragmented) { + fragmented = TRUE; + list = gst_buffer_list_new (); + gst_buffer_list_add (list, outbuf); + } else if (fragmented) { + gst_buffer_list_add (list, outbuf); + } + } + + if (fragmented) { + ret = + gst_rtp_base_payload_push_list (GST_RTP_BASE_PAYLOAD (rtph263ppay), + list); + } else { ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtph263ppay), outbuf); - - avail -= towrite; - fragmented = TRUE; } return ret; @@ -759,7 +781,7 @@ rtph263ppay = GST_RTP_H263P_PAY (payload); - rtph263ppay->first_timestamp = GST_BUFFER_TIMESTAMP (buffer); + rtph263ppay->first_timestamp = GST_BUFFER_PTS (buffer); rtph263ppay->first_duration = GST_BUFFER_DURATION (buffer); /* we always encode and flush a full picture */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph264depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph264depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph264depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph264depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,7 +26,10 @@ #include #include +#include +#include #include "gstrtph264depay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtph264depay_debug); #define GST_CAT_DEFAULT (rtph264depay_debug) @@ -85,7 +88,7 @@ element, GstStateChange transition); static GstBuffer *gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_h264_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps); static gboolean gst_rtp_h264_depay_handle_event (GstRTPBaseDepayload * depay, @@ -115,7 +118,7 @@ "Wim Taymans "); gstelement_class->change_state = gst_rtp_h264_depay_change_state; - gstrtpbasedepayload_class->process = gst_rtp_h264_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_h264_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_h264_depay_setcaps; gstrtpbasedepayload_class->handle_event = gst_rtp_h264_depay_handle_event; } @@ -289,8 +292,6 @@ { gboolean res; GstCaps *srccaps; - guchar level = 0; - guchar profile_compat = G_MAXUINT8; if (!rtph264depay->byte_stream && (!rtph264depay->new_codec_data || @@ -310,6 +311,8 @@ guint len; guint new_size; guint i; + guchar level = 0; + guchar profile_compat = G_MAXUINT8; /* start with 7 bytes header */ len = 7; @@ -386,16 +389,131 @@ gst_buffer_unmap (codec_data, &map); gst_buffer_set_size (codec_data, new_size); - gst_caps_set_simple (srccaps, "codec_data", GST_TYPE_BUFFER, codec_data, NULL); gst_buffer_unref (codec_data); } - res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay), - srccaps); + /* Set profile a level from SPS */ + { + gint i; + GstBuffer *max_level_sps = NULL; + gint level = 0; + GstMapInfo nalmap; + + /* Get the SPS with the highest level. We assume + * all SPS have the same profile */ + for (i = 0; i < rtph264depay->sps->len; i++) { + gst_buffer_map (g_ptr_array_index (rtph264depay->sps, i), &nalmap, + GST_MAP_READ); + if (level == 0 || level < nalmap.data[3]) { + max_level_sps = g_ptr_array_index (rtph264depay->sps, i); + level = nalmap.data[3]; + } + gst_buffer_unmap (g_ptr_array_index (rtph264depay->sps, i), &nalmap); + } + + if (max_level_sps) { + gst_buffer_map (max_level_sps, &nalmap, GST_MAP_READ); + gst_codec_utils_h264_caps_set_level_and_profile (srccaps, nalmap.data + 1, + nalmap.size - 1); + gst_buffer_unmap (max_level_sps, &nalmap); + } + } + + + if (gst_pad_has_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay))) { + GstCaps *old_caps = + gst_pad_get_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay)); + + /* Only update the caps if they are not equal. For + * AVC we don't update caps if only the codec_data + * changes. This is the same behaviour as in h264parse + */ + if (rtph264depay->byte_stream) { + if (!gst_caps_is_equal (srccaps, old_caps)) + res = + gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay), + srccaps); + else + res = TRUE; + } else { + GstCaps *tmp_caps = gst_caps_copy (srccaps); + GstStructure *old_s, *tmp_s; + + old_s = gst_caps_get_structure (old_caps, 0); + tmp_s = gst_caps_get_structure (tmp_caps, 0); + if (gst_structure_has_field (old_s, "codec_data")) + gst_structure_set_value (tmp_s, "codec_data", + gst_structure_get_value (old_s, "codec_data")); + + if (!gst_caps_is_equal (old_caps, tmp_caps)) + res = + gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay), + srccaps); + else + res = TRUE; + + gst_caps_unref (tmp_caps); + } + } else { + res = + gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay), + srccaps); + } + gst_caps_unref (srccaps); + /* Insert SPS and PPS into the stream on next opportunity */ + if (rtph264depay->sps->len > 0 || rtph264depay->pps->len > 0) { + gint i; + GstBuffer *codec_data; + GstMapInfo map; + guint8 *data; + guint len = 0; + + for (i = 0; i < rtph264depay->sps->len; i++) { + len += 4 + gst_buffer_get_size (g_ptr_array_index (rtph264depay->sps, i)); + } + + for (i = 0; i < rtph264depay->pps->len; i++) { + len += 4 + gst_buffer_get_size (g_ptr_array_index (rtph264depay->pps, i)); + } + + codec_data = gst_buffer_new_and_alloc (len); + gst_buffer_map (codec_data, &map, GST_MAP_WRITE); + data = map.data; + + for (i = 0; i < rtph264depay->sps->len; i++) { + GstBuffer *sps_buf = g_ptr_array_index (rtph264depay->sps, i); + guint sps_size = gst_buffer_get_size (sps_buf); + + if (rtph264depay->byte_stream) + memcpy (data, sync_bytes, sizeof (sync_bytes)); + else + GST_WRITE_UINT32_BE (data, sps_size); + gst_buffer_extract (sps_buf, 0, data + 4, -1); + data += 4 + sps_size; + } + + for (i = 0; i < rtph264depay->pps->len; i++) { + GstBuffer *pps_buf = g_ptr_array_index (rtph264depay->pps, i); + guint pps_size = gst_buffer_get_size (pps_buf); + + if (rtph264depay->byte_stream) + memcpy (data, sync_bytes, sizeof (sync_bytes)); + else + GST_WRITE_UINT32_BE (data, pps_size); + gst_buffer_extract (pps_buf, 0, data + 4, -1); + data += 4 + pps_size; + } + + gst_buffer_unmap (codec_data, &map); + if (rtph264depay->codec_data) + gst_buffer_unref (rtph264depay->codec_data); + rtph264depay->codec_data = codec_data; + } + if (res) rtph264depay->new_codec_data = FALSE; @@ -469,7 +587,7 @@ gst_buffer_map (pps, &ppsmap, GST_MAP_READ); parse_pps (&ppsmap, &tmp_sps_id, &tmp_pps_id); - if (sps_id == tmp_sps_id && pps_id == tmp_pps_id) { + if (pps_id == tmp_pps_id) { if (map.size == ppsmap.size && memcmp (map.data, ppsmap.data, ppsmap.size) == 0) { GST_LOG_OBJECT (rtph264, "Unchanged PPS %u:%u, not updating", sps_id, @@ -764,13 +882,19 @@ /* prepend codec_data */ if (rtph264depay->codec_data) { GST_DEBUG_OBJECT (depayload, "prepending codec_data"); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph264depay), + rtph264depay->codec_data, outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); outbuf = gst_buffer_append (rtph264depay->codec_data, outbuf); rtph264depay->codec_data = NULL; out_keyframe = TRUE; } outbuf = gst_buffer_make_writable (outbuf); - GST_BUFFER_TIMESTAMP (outbuf) = out_timestamp; + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtph264depay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + + GST_BUFFER_PTS (outbuf) = out_timestamp; if (out_keyframe) GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); @@ -828,17 +952,17 @@ } static GstBuffer * -gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpH264Depay *rtph264depay; + GstBuffer *buf; GstBuffer *outbuf = NULL; guint8 nal_unit_type; - GstRTPBuffer rtp = { NULL }; rtph264depay = GST_RTP_H264_DEPAY (depayload); /* flush remaining data on discont */ - if (GST_BUFFER_IS_DISCONT (buf)) { + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { gst_adapter_clear (rtph264depay->adapter); rtph264depay->wait_start = TRUE; rtph264depay->current_fu_type = 0; @@ -854,13 +978,12 @@ GstClockTime timestamp; gboolean marker; - timestamp = GST_BUFFER_TIMESTAMP (buf); - - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); + timestamp = GST_BUFFER_PTS (rtp->buffer); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); - payload = gst_rtp_buffer_get_payload (&rtp); - marker = gst_rtp_buffer_get_marker (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); + payload = gst_rtp_buffer_get_payload (rtp); + buf = gst_rtp_buffer_get_payload_buffer (rtp); + marker = gst_rtp_buffer_get_marker (rtp); GST_DEBUG_OBJECT (rtph264depay, "receiving %d bytes", payload_len); @@ -944,6 +1067,9 @@ memcpy (map.data + sizeof (sync_bytes), payload, nalu_size); gst_buffer_unmap (outbuf, &map); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph264depay), outbuf, buf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + outbuf = gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf, timestamp, marker); @@ -955,19 +1081,21 @@ } outsize = gst_adapter_available (rtph264depay->adapter); - outbuf = gst_adapter_take_buffer (rtph264depay->adapter, outsize); - - outbuf = gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf, timestamp, - marker); + if (outsize > 0) { + outbuf = gst_adapter_take_buffer (rtph264depay->adapter, outsize); + outbuf = + gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf, timestamp, + marker); + } break; } case 26: /* MTAP16 Multi-time aggregation packet 5.7.2 */ - header_len = 5; + // header_len = 5; /* fallthrough, not implemented */ case 27: /* MTAP24 Multi-time aggregation packet 5.7.2 */ - header_len = 6; + // header_len = 6; goto not_implemented; break; case 28: @@ -1025,6 +1153,9 @@ map.data[sizeof (sync_bytes)] = nal_header; gst_buffer_unmap (outbuf, &map); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph264depay), outbuf, buf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + GST_DEBUG_OBJECT (rtph264depay, "queueing %d bytes", outsize); /* and assemble in the adapter */ @@ -1038,6 +1169,9 @@ outbuf = gst_buffer_new_and_alloc (outsize); gst_buffer_fill (outbuf, 0, payload, outsize); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph264depay), outbuf, buf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + GST_DEBUG_OBJECT (rtph264depay, "queueing %d bytes", outsize); /* and assemble in the adapter */ @@ -1073,41 +1207,45 @@ memcpy (map.data + sizeof (sync_bytes), payload, nalu_size); gst_buffer_unmap (outbuf, &map); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph264depay), outbuf, buf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + outbuf = gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf, timestamp, marker); break; } } - gst_rtp_buffer_unmap (&rtp); } + gst_buffer_unref (buf); + return outbuf; /* ERRORS */ empty_packet: { GST_DEBUG_OBJECT (rtph264depay, "empty packet"); - gst_rtp_buffer_unmap (&rtp); + gst_buffer_unref (buf); return NULL; } undefined_type: { GST_ELEMENT_WARNING (rtph264depay, STREAM, DECODE, (NULL), ("Undefined packet type")); - gst_rtp_buffer_unmap (&rtp); + gst_buffer_unref (buf); return NULL; } waiting_start: { GST_DEBUG_OBJECT (rtph264depay, "waiting for start"); - gst_rtp_buffer_unmap (&rtp); + gst_buffer_unref (buf); return NULL; } not_implemented: { GST_ELEMENT_ERROR (rtph264depay, STREAM, FORMAT, (NULL), ("NAL unit type %d not supported yet", nal_unit_type)); - gst_rtp_buffer_unmap (&rtp); + gst_buffer_unref (buf); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph264pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph264pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtph264pay.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtph264pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,11 +26,13 @@ #include #include +#include /* Included to not duplicate gst_rtp_h264_add_sps_pps () */ #include "gstrtph264depay.h" #include "gstrtph264pay.h" +#include "gstrtputils.h" #define IDR_TYPE_ID 5 @@ -72,8 +74,7 @@ { PROP_0, PROP_SPROP_PARAMETER_SETS, - PROP_CONFIG_INTERVAL, - PROP_LAST + PROP_CONFIG_INTERVAL }; #define IS_ACCESS_UNIT(x) (((x) > 0x00) && ((x) < 0x06)) @@ -390,12 +391,21 @@ } if (G_LIKELY (count)) { - /* profile is 24 bit. Force it to respect the limit */ - profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff); - /* combine into output caps */ - res = gst_rtp_base_payload_set_outcaps (basepayload, - "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL); - g_free (profile); + if (payloader->profile != 0) { + /* profile is 24 bit. Force it to respect the limit */ + profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff); + /* combine into output caps */ + res = gst_rtp_base_payload_set_outcaps (basepayload, + "packetization-mode", G_TYPE_STRING, "1", + "profile-level-id", G_TYPE_STRING, profile, + "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL); + g_free (profile); + } else { + res = gst_rtp_base_payload_set_outcaps (basepayload, + "packetization-mode", G_TYPE_STRING, "1", + "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL); + } + } else { res = gst_rtp_base_payload_set_outcaps (basepayload, NULL); } @@ -728,7 +738,7 @@ /* Not critical here; but throw a warning */ if (ret != GST_FLOW_OK) { sent_all_sps_pps = FALSE; - GST_WARNING ("Problem pushing SPS"); + GST_WARNING_OBJECT (basepayload, "Problem pushing SPS"); } } for (i = 0; i < rtph264pay->pps->len; i++) { @@ -742,7 +752,7 @@ /* Not critical here; but throw a warning */ if (ret != GST_FLOW_OK) { sent_all_sps_pps = FALSE; - GST_WARNING ("Problem pushing PPS"); + GST_WARNING_OBJECT (basepayload, "Problem pushing PPS"); } } @@ -826,8 +836,10 @@ * checking when we need to send SPS/PPS but convert to running_time first. */ rtph264pay->send_spspps = FALSE; ret = gst_rtp_h264_pay_send_sps_pps (basepayload, rtph264pay, dts, pts); - if (ret != GST_FLOW_OK) + if (ret != GST_FLOW_OK) { + gst_buffer_unref (paybuf); return ret; + } } packet_len = gst_rtp_buffer_calc_packet_len (size, 0, 0); @@ -867,6 +879,8 @@ gst_rtp_buffer_unmap (&rtp); /* insert payload memory block */ + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph264pay), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); outbuf = gst_buffer_append (outbuf, paybuf); /* push the buffer to the next element */ @@ -926,9 +940,10 @@ gst_rtp_buffer_unmap (&rtp); /* insert payload memory block */ - gst_buffer_append (outbuf, - gst_buffer_copy_region (paybuf, GST_BUFFER_COPY_MEMORY, pos, - limitedSize)); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph264pay), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + gst_buffer_copy_into (outbuf, paybuf, GST_BUFFER_COPY_MEMORY, pos, + limitedSize); if (!delta_unit) /* Only the first packet sent should not have the flag */ @@ -1078,7 +1093,7 @@ end_of_au = TRUE; } - paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_MEMORY, offset, + paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offset, nal_len); ret = gst_rtp_h264_pay_payload_nal (basepayload, paybuf, dts, pts, @@ -1325,6 +1340,13 @@ rtph264pay->send_spspps = FALSE; gst_adapter_clear (rtph264pay->adapter); break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: rtph264pay->last_spspps = -1; gst_rtp_h264_pay_clear_sps_pps (rtph264pay); @@ -1333,8 +1355,6 @@ break; } - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - return ret; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpilbcdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpilbcdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpilbcdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpilbcdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,7 +24,9 @@ #include #include #include +#include #include "gstrtpilbcdepay.h" +#include "gstrtputils.h" /* RtpiLBCDepay signals and args */ enum @@ -48,9 +50,8 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"audio\", " - "clock-rate = (int) 8000, " - "encoding-name = (string) \"ILBC\"") - /* "mode = (string) { \"20\", \"30\" }" */ + "clock-rate = (int) 8000, " "encoding-name = (string) \"ILBC\"") + /* "mode = (string) { \"20\", \"30\" }" */ ); static GstStaticPadTemplate gst_rtp_ilbc_depay_src_template = @@ -66,7 +67,7 @@ guint prop_id, GValue * value, GParamSpec * pspec); static GstBuffer *gst_rtp_ilbc_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_ilbc_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -121,7 +122,7 @@ "Extracts iLBC audio from RTP packets (RFC 3952)", "Philippe Kalaf "); - gstrtpbasedepayload_class->process = gst_rtp_ilbc_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_ilbc_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_ilbc_depay_setcaps; } @@ -171,29 +172,29 @@ } static GstBuffer * -gst_rtp_ilbc_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_ilbc_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstBuffer *outbuf; gboolean marker; - GstRTPBuffer rtp = { NULL }; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - marker = gst_rtp_buffer_get_marker (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); GST_DEBUG ("process : got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), marker, - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); - - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); + gst_buffer_get_size (rtp->buffer), marker, + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); if (marker && outbuf) { /* mark start of talkspurt with RESYNC */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } + return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpj2kdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpj2kdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpj2kdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpj2kdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -22,9 +22,11 @@ #endif #include +#include #include #include "gstrtpj2kdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpj2kdepay_debug); #define GST_CAT_DEFAULT (rtpj2kdepay_debug) @@ -78,7 +80,7 @@ static gboolean gst_rtp_j2k_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_j2k_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_j2k_depay_class_init (GstRtpJ2KDepayClass * klass) @@ -109,7 +111,7 @@ gstelement_class->change_state = gst_rtp_j2k_depay_change_state; gstrtpbasedepayload_class->set_caps = gst_rtp_j2k_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_j2k_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_j2k_depay_process; GST_DEBUG_CATEGORY_INIT (rtpj2kdepay_debug, "rtpj2kdepay", 0, "J2K Video RTP Depayloader"); @@ -400,8 +402,12 @@ buflist = gst_buffer_list_new (); - for (walk = list; walk; walk = g_list_next (walk)) + for (walk = list; walk; walk = g_list_next (walk)) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), + GST_BUFFER_CAST (walk->data), + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); gst_buffer_list_add (buflist, GST_BUFFER_CAST (walk->data)); + } g_list_free (list); @@ -426,27 +432,24 @@ } static GstBuffer * -gst_rtp_j2k_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_j2k_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpJ2KDepay *rtpj2kdepay; guint8 *payload; guint MHF, mh_id, frag_offset, tile, payload_len, j2klen; gint gap; guint32 rtptime; - GstRTPBuffer rtp = { NULL }; rtpj2kdepay = GST_RTP_J2K_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload = gst_rtp_buffer_get_payload (&rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); /* we need at least a header */ if (payload_len < 8) goto empty_packet; - rtptime = gst_rtp_buffer_get_timestamp (&rtp); + rtptime = gst_rtp_buffer_get_timestamp (rtp); /* new timestamp marks new frame */ if (rtpj2kdepay->last_rtptime != rtptime) { @@ -543,7 +546,7 @@ } /* and push in pu adapter */ GST_DEBUG_OBJECT (rtpj2kdepay, "push pu of size %u in adapter", j2klen); - pu_frag = gst_rtp_buffer_get_payload_subbuffer (&rtp, 8, -1); + pu_frag = gst_rtp_buffer_get_payload_subbuffer (rtp, 8, -1); gst_adapter_push (rtpj2kdepay->pu_adapter, pu_frag); if (MHF & 2) { @@ -556,12 +559,11 @@ } /* marker bit finishes the frame */ - if (gst_rtp_buffer_get_marker (&rtp)) { + if (gst_rtp_buffer_get_marker (rtp)) { GST_DEBUG_OBJECT (rtpj2kdepay, "marker set, last buffer"); /* then flush frame */ gst_rtp_j2k_depay_flush_frame (depayload); } - gst_rtp_buffer_unmap (&rtp); return NULL; @@ -570,7 +572,6 @@ { GST_ELEMENT_WARNING (rtpj2kdepay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } wrong_mh_id: @@ -579,7 +580,6 @@ ("Invalid mh_id %u, expected %u", mh_id, rtpj2kdepay->last_mh_id), (NULL)); gst_rtp_j2k_depay_clear_pu (rtpj2kdepay); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpj2kpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpj2kpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpj2kpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpj2kpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -34,8 +34,10 @@ #include #include +#include #include "gstrtpj2kpay.h" +#include "gstrtputils.h" static GstStaticPadTemplate gst_rtp_j2k_pay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -333,7 +335,7 @@ mtu = GST_RTP_BASE_PAYLOAD_MTU (pay); gst_buffer_map (buffer, &map, GST_MAP_READ); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); offset = pos = end = 0; GST_LOG_OBJECT (pay, @@ -427,7 +429,7 @@ /* make buffer for header */ outbuf = gst_rtp_buffer_new_allocate (HEADER_SIZE, 0, 0); - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); @@ -481,9 +483,10 @@ gst_rtp_buffer_unmap (&rtp); /* make subbuffer of j2k data */ - paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_MEMORY, + paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offset, data_size); - + gst_rtp_copy_meta (GST_ELEMENT_CAST (basepayload), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); outbuf = gst_buffer_append (outbuf, paybuf); gst_buffer_list_add (list, outbuf); @@ -494,6 +497,7 @@ state.header.tile = 0; offset += data_size; + state.header.offset = offset; } offset = pos; } while (offset < map.size); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpjpegdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpjpegdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpjpegdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpjpegdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -22,12 +22,14 @@ #endif #include +#include #include #include #include #include #include "gstrtpjpegdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpjpegdepay_debug); #define GST_CAT_DEFAULT (rtpjpegdepay_debug) @@ -50,7 +52,6 @@ /* * "a-framerate = (string) 0.00, " * "x-framerate = (string) 0.00, " - * "a-framesize = (string) 1234-1234, " * "x-dimensions = (string) \"1234,1234\", " */ "application/x-rtp, " @@ -61,7 +62,6 @@ /* * "a-framerate = (string) 0.00, " * "x-framerate = (string) 0.00, " - * "a-framesize = (string) 1234-1234, " * "x-dimensions = (string) \"1234,1234\"" */ ) @@ -79,7 +79,7 @@ static gboolean gst_rtp_jpeg_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_jpeg_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_jpeg_depay_class_init (GstRtpJPEGDepayClass * klass) @@ -107,7 +107,7 @@ gstelement_class->change_state = gst_rtp_jpeg_depay_change_state; gstrtpbasedepayload_class->set_caps = gst_rtp_jpeg_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_jpeg_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_jpeg_depay_process; GST_DEBUG_CATEGORY_INIT (rtpjpegdepay_debug, "rtpjpegdepay", 0, "JPEG Video RTP Depayloader"); @@ -458,15 +458,6 @@ } } - if ((media_attr = gst_structure_get_string (structure, "a-framesize"))) { - gint w, h; - - if (sscanf (media_attr, "%d-%d", &w, &h) == 2) { - rtpjpegdepay->media_width = w; - rtpjpegdepay->media_height = h; - } - } - /* try to get a framerate */ media_attr = gst_structure_get_string (structure, "a-framerate"); if (!media_attr) @@ -498,7 +489,7 @@ } static GstBuffer * -gst_rtp_jpeg_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_jpeg_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpJPEGDepay *rtpjpegdepay; GstBuffer *outbuf; @@ -509,23 +500,21 @@ guint type, width, height; guint16 dri, precision, length; guint8 *qtable; - GstRTPBuffer rtp = { NULL }; rtpjpegdepay = GST_RTP_JPEG_DEPAY (depayload); - if (GST_BUFFER_IS_DISCONT (buf)) { + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { GST_DEBUG_OBJECT (depayload, "DISCONT, reset adapter"); gst_adapter_clear (rtpjpegdepay->adapter); rtpjpegdepay->discont = TRUE; } - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len < 8) goto empty_packet; - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); header_len = 0; /* 0 1 2 3 @@ -685,11 +674,11 @@ /* take JPEG data, push in the adapter */ GST_DEBUG_OBJECT (rtpjpegdepay, "pushing data at offset %d", header_len); - outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, header_len, -1); + outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, header_len, -1); gst_adapter_push (rtpjpegdepay->adapter, outbuf); outbuf = NULL; - if (gst_rtp_buffer_get_marker (&rtp)) { + if (gst_rtp_buffer_get_marker (rtp)) { guint avail; guint8 end[2]; GstMapInfo map; @@ -725,11 +714,12 @@ rtpjpegdepay->discont = FALSE; } + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpjpegdepay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + GST_DEBUG_OBJECT (rtpjpegdepay, "returning %u bytes", avail); } - gst_rtp_buffer_unmap (&rtp); - return outbuf; /* ERRORS */ @@ -737,20 +727,17 @@ { GST_ELEMENT_WARNING (rtpjpegdepay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } invalid_dimension: { GST_ELEMENT_WARNING (rtpjpegdepay, STREAM, FORMAT, ("Invalid Dimension %dx%d.", width, height), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } no_qtable: { GST_WARNING_OBJECT (rtpjpegdepay, "no qtable"); - gst_rtp_buffer_unmap (&rtp); return NULL; } invalid_packet: @@ -758,7 +745,6 @@ GST_WARNING_OBJECT (rtpjpegdepay, "invalid packet"); gst_adapter_flush (rtpjpegdepay->adapter, gst_adapter_available (rtpjpegdepay->adapter)); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpjpegpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpjpegpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpjpegpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpjpegpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -38,8 +38,10 @@ #include #include +#include #include "gstrtpjpegpay.h" +#include "gstrtputils.h" static GstStaticPadTemplate gst_rtp_jpeg_pay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -49,12 +51,18 @@ ); static GstStaticPadTemplate gst_rtp_jpeg_pay_src_template = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " " media = (string) \"video\", " - " payload = (int) 26 , " + " payload = (int) " GST_RTP_PAYLOAD_JPEG_STRING ", " + " clock-rate = (int) 90000, " + " encoding-name = (string) \"JPEG\", " + " width = (int) [ 1, 65536 ], " " height = (int) [ 1, 65536 ]; " + " application/x-rtp, " + " media = (string) \"video\", " + " payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " " clock-rate = (int) 90000, " " encoding-name = (string) \"JPEG\", " " width = (int) [ 1, 65536 ], " " height = (int) [ 1, 65536 ]") @@ -114,8 +122,7 @@ { PROP_0, PROP_JPEG_QUALITY, - PROP_JPEG_TYPE, - PROP_LAST + PROP_JPEG_TYPE }; enum @@ -284,6 +291,8 @@ pay->type = DEFAULT_JPEG_TYPE; pay->width = -1; pay->height = -1; + + GST_RTP_BASE_PAYLOAD_PT (pay) = GST_RTP_PAYLOAD_JPEG; } static gboolean @@ -296,7 +305,6 @@ gint num = 0, denom; gchar *rate = NULL; gchar *dim = NULL; - gchar *size; pay = GST_RTP_JPEG_PAY (basepayload); @@ -323,7 +331,8 @@ pay->width = GST_ROUND_UP_8 (width) / 8; } - gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "JPEG", 90000); + gst_rtp_base_payload_set_options (basepayload, "video", + basepayload->pt != GST_RTP_PAYLOAD_JPEG, "JPEG", 90000); if (num > 0) { gdouble framerate; @@ -331,8 +340,6 @@ rate = g_strdup_printf ("%f", framerate); } - size = g_strdup_printf ("%d-%d", width, height); - if (pay->width == 0) { GST_DEBUG_OBJECT (pay, "width or height are greater than 2040, adding x-dimensions to caps"); @@ -341,24 +348,21 @@ if (rate != NULL && dim != NULL) { res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framerate", - G_TYPE_STRING, rate, "a-framesize", G_TYPE_STRING, size, - "x-dimensions", G_TYPE_STRING, dim, NULL); + G_TYPE_STRING, rate, "x-dimensions", G_TYPE_STRING, dim, NULL); } else if (rate != NULL && dim == NULL) { res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framerate", - G_TYPE_STRING, rate, "a-framesize", G_TYPE_STRING, size, NULL); + G_TYPE_STRING, rate, NULL); } else if (rate == NULL && dim != NULL) { res = gst_rtp_base_payload_set_outcaps (basepayload, "x-dimensions", - G_TYPE_STRING, dim, "a-framesize", G_TYPE_STRING, size, NULL); + G_TYPE_STRING, dim, NULL); } else { - res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framesize", - G_TYPE_STRING, size, NULL); + res = gst_rtp_base_payload_set_outcaps (basepayload, NULL); } if (dim != NULL) g_free (dim); if (rate != NULL) g_free (rate); - g_free (size); return res; @@ -696,7 +700,7 @@ gst_buffer_map (buffer, &map, GST_MAP_READ); data = map.data; size = map.size; - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); offset = 0; discont = GST_BUFFER_IS_DISCONT (buffer); @@ -889,13 +893,15 @@ gst_rtp_buffer_unmap (&rtp); /* create a new buf to hold the payload */ - paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_MEMORY, + paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, jpeg_header_size + offset, payload_size); /* join memory parts */ + gst_rtp_copy_meta (GST_ELEMENT_CAST (pay), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); outbuf = gst_buffer_append (outbuf, paybuf); - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; if (discont) { GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvdepay.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,377 @@ +/* GStreamer RTP KLV Depayloader + * Copyright (C) 2014-2015 Tim-Philipp Müller > + * Copyright (C) 2014-2015 Centricular Ltd + * + * 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-rtpklvdepay + * @see_also: rtpklvpay + * + * Extract KLV metadata from RTP packets according to RFC 6597. + * For detailed information see: http://tools.ietf.org/html/rfc6597 + * + * + * Example pipeline + * |[ + * gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)application, clock-rate=(int)90000, encoding-name=(string)SMPTE336M' ! rtpklvdepay ! fakesink dump=true + * ]| This example pipeline will depayload an RTP KLV stream and display + * a hexdump of the KLV data on stdout. + * + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstrtpklvdepay.h" + +#include + +GST_DEBUG_CATEGORY_STATIC (klvdepay_debug); +#define GST_CAT_DEFAULT (klvdepay_debug) + +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("meta/x-klv, parsed = (bool) true")); + +static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("application/x-rtp, " + "media = (string) application, clock-rate = (int) [1, MAX], " + "encoding-name = (string) SMPTE336M") + ); + +#define gst_rtp_klv_depay_parent_class parent_class +G_DEFINE_TYPE (GstRtpKlvDepay, gst_rtp_klv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD); + +static void gst_rtp_klv_depay_finalize (GObject * object); + +static GstStateChangeReturn gst_rtp_klv_depay_change_state (GstElement * + element, GstStateChange transition); +static gboolean gst_rtp_klv_depay_setcaps (GstRTPBaseDepayload * depayload, + GstCaps * caps); +static GstBuffer *gst_rtp_klv_depay_process (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp); + +static void gst_rtp_klv_depay_reset (GstRtpKlvDepay * klvdepay); + +static void +gst_rtp_klv_depay_class_init (GstRtpKlvDepayClass * klass) +{ + GstElementClass *element_class = (GstElementClass *) klass; + GObjectClass *gobject_class = (GObjectClass *) klass; + GstRTPBaseDepayloadClass *rtpbasedepayload_class; + + GST_DEBUG_CATEGORY_INIT (klvdepay_debug, "klvdepay", 0, + "RTP KLV Depayloader"); + + gobject_class->finalize = gst_rtp_klv_depay_finalize; + + element_class->change_state = gst_rtp_klv_depay_change_state; + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_template)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&sink_template)); + + gst_element_class_set_static_metadata (element_class, + "RTP KLV Depayloader", "Codec/Depayloader/Network/RTP", + "Extracts KLV (SMPTE ST 336) metadata from RTP packets", + "Tim-Philipp Müller "); + + rtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; + + rtpbasedepayload_class->set_caps = gst_rtp_klv_depay_setcaps; + rtpbasedepayload_class->process_rtp_packet = gst_rtp_klv_depay_process; +} + +static void +gst_rtp_klv_depay_init (GstRtpKlvDepay * klvdepay) +{ + klvdepay->adapter = gst_adapter_new (); +} + +static void +gst_rtp_klv_depay_finalize (GObject * object) +{ + GstRtpKlvDepay *klvdepay; + + klvdepay = GST_RTP_KLV_DEPAY (object); + + gst_rtp_klv_depay_reset (klvdepay); + g_object_unref (klvdepay->adapter); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gst_rtp_klv_depay_reset (GstRtpKlvDepay * klvdepay) +{ + GST_DEBUG_OBJECT (klvdepay, "resetting"); + gst_adapter_clear (klvdepay->adapter); + klvdepay->resync = TRUE; + klvdepay->last_rtp_ts = -1; +} + +static gboolean +gst_rtp_klv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps) +{ + GstStructure *s; + GstCaps *src_caps; + gboolean res; + gint clock_rate; + + s = gst_caps_get_structure (caps, 0); + + if (!gst_structure_get_int (s, "clock-rate", &clock_rate)) + return FALSE; + + depayload->clock_rate = clock_rate; + + src_caps = gst_static_pad_template_get_caps (&src_template); + res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), src_caps); + gst_caps_unref (src_caps); + + return res; +} + +static gboolean +klv_get_vlen (const guint8 * data, guint data_len, guint64 * v_len, + gsize * len_size) +{ + guint8 first_byte, len_len; + guint64 len; + + g_assert (data_len > 0); + + first_byte = *data++; + + if ((first_byte & 0x80) == 0) { + *v_len = first_byte & 0x7f; + *len_size = 1; + return TRUE; + } + + len_len = first_byte & 0x7f; + + if (len_len == 0 || len_len > 8) + return FALSE; + + if ((1 + len_len) > data_len) + return FALSE; + + *len_size = 1 + len_len; + + len = 0; + while (len_len > 0) { + len = len << 8 | *data++; + --len_len; + } + + *v_len = len; + + return TRUE; +} + +static GstBuffer * +gst_rtp_klv_depay_process_data (GstRtpKlvDepay * klvdepay) +{ + gsize avail, data_len, len_size; + GstBuffer *outbuf; + guint8 data[1 + 8]; + guint64 v_len; + + avail = gst_adapter_available (klvdepay->adapter); + + GST_TRACE_OBJECT (klvdepay, "%" G_GSIZE_FORMAT " bytes in adapter", avail); + + if (avail == 0) + return NULL; + + /* need at least 16 bytes of UL key plus 1 byte of length */ + if (avail < 16 + 1) + goto bad_klv_packet; + + /* check if the declared KLV unit size matches actual bytes available */ + data_len = MIN (avail - 16, 1 + 8); + gst_adapter_copy (klvdepay->adapter, data, 16, data_len); + if (!klv_get_vlen (data, data_len, &v_len, &len_size)) + goto bad_klv_packet; + + GST_LOG_OBJECT (klvdepay, "want %" G_GUINT64_FORMAT " bytes, " + "have %" G_GSIZE_FORMAT " bytes", 16 + len_size + v_len, avail); + + if (avail < 16 + len_size + v_len) + goto incomplete_klv_packet; + + /* something is wrong, this shouldn't ever happen */ + if (avail > 16 + len_size + v_len) + goto bad_klv_packet; + + outbuf = gst_adapter_take_buffer (klvdepay->adapter, avail); + + /* Mark buffers as key unit to signal this is the start of a KLV unit + * (for now all buffers will be flagged like this, since all buffers are + * self-contained KLV units, but in future that might change) */ + outbuf = gst_buffer_make_writable (outbuf); + GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); + + return outbuf; + +/* ERRORS */ +bad_klv_packet: + { + GST_WARNING_OBJECT (klvdepay, "bad KLV packet, dropping"); + gst_rtp_klv_depay_reset (klvdepay); + return NULL; + } +incomplete_klv_packet: + { + GST_DEBUG_OBJECT (klvdepay, "partial KLV packet: have %u bytes, want %u", + (guint) avail, (guint) (16 + len_size + v_len)); + return NULL; + } +} + +/* We're trying to be pragmatic here, not quite as strict as the spec wants + * us to be with regard to marker bits and resyncing after packet loss */ +static GstBuffer * +gst_rtp_klv_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) +{ + GstRtpKlvDepay *klvdepay = GST_RTP_KLV_DEPAY (depayload); + GstBuffer *payload, *outbuf = NULL; + gboolean marker, start = FALSE, maybe_start; + guint32 rtp_ts; + guint16 seq; + guint payload_len; + + /* Ignore DISCONT on first buffer and on buffers following a discont */ + if (GST_BUFFER_IS_DISCONT (rtp->buffer) && klvdepay->last_rtp_ts != -1) { + GST_WARNING_OBJECT (klvdepay, "DISCONT, need to resync"); + gst_rtp_klv_depay_reset (klvdepay); + } + + payload_len = gst_rtp_buffer_get_payload_len (rtp); + + /* marker bit signals last fragment of a KLV unit */ + marker = gst_rtp_buffer_get_marker (rtp); + + seq = gst_rtp_buffer_get_seq (rtp); + + /* packet directly after one with marker bit set => start */ + start = klvdepay->last_marker_seq != -1 + && gst_rtp_buffer_compare_seqnum (klvdepay->last_marker_seq, seq) == 1; + + /* deduce start of new KLV unit in case sender doesn't set marker bits + * (it's not like the spec is ambiguous about that, but what can you do) */ + rtp_ts = gst_rtp_buffer_get_timestamp (rtp); + + maybe_start = klvdepay->last_rtp_ts == -1 || klvdepay->last_rtp_ts != rtp_ts; + + klvdepay->last_rtp_ts = rtp_ts; + + /* fallback to detect self-contained single KLV unit (usual case) */ + if ((!start || !marker || maybe_start) && payload_len > 16) { + const guint8 *data; + guint64 v_len; + gsize len_size; + + data = gst_rtp_buffer_get_payload (rtp); + if (GST_READ_UINT32_BE (data) == 0x060e2b34 && + klv_get_vlen (data + 16, payload_len - 16, &v_len, &len_size)) { + if (16 + len_size + v_len == payload_len) { + GST_LOG_OBJECT (klvdepay, "Looks like a self-contained KLV unit"); + marker = TRUE; + start = TRUE; + } else if (16 + len_size + v_len > payload_len) { + GST_LOG_OBJECT (klvdepay, + "Looks like the start of a fragmented KLV unit"); + start = TRUE; + } + } + } + + /* If this is the first packet and looks like a start, clear resync flag */ + if (klvdepay->resync && klvdepay->last_marker_seq == -1 && start) + klvdepay->resync = FALSE; + + if (marker) + klvdepay->last_marker_seq = seq; + + GST_LOG_OBJECT (klvdepay, "payload of %u bytes, marker=%d, start=%d", + payload_len, marker, start); + + if (klvdepay->resync && !start) { + GST_DEBUG_OBJECT (klvdepay, "Dropping buffer, waiting to resync"); + + if (marker) + klvdepay->resync = FALSE; + + goto done; + } + + if (start && !marker) + outbuf = gst_rtp_klv_depay_process_data (klvdepay); + + payload = gst_rtp_buffer_get_payload_buffer (rtp); + gst_adapter_push (klvdepay->adapter, payload); + + if (marker) + outbuf = gst_rtp_klv_depay_process_data (klvdepay); + +done: + + return outbuf; +} + +static GstStateChangeReturn +gst_rtp_klv_depay_change_state (GstElement * element, GstStateChange transition) +{ + GstRtpKlvDepay *klvdepay; + GstStateChangeReturn ret; + + klvdepay = GST_RTP_KLV_DEPAY (element); + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + gst_rtp_klv_depay_reset (klvdepay); + klvdepay->last_marker_seq = -1; + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_rtp_klv_depay_reset (klvdepay); + break; + default: + break; + } + return ret; +} + +gboolean +gst_rtp_klv_depay_plugin_init (GstPlugin * plugin) +{ + return gst_element_register (plugin, "rtpklvdepay", + GST_RANK_SECONDARY, GST_TYPE_RTP_KLV_DEPAY); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvdepay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvdepay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvdepay.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvdepay.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,65 @@ +/* GStreamer RTP KLV Depayloader + * Copyright (C) 2014-2015 Tim-Philipp Müller > + * Copyright (C) 2014-2015 Centricular Ltd + * + * 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_RTP_KLV_DEPAY_H__ +#define __GST_RTP_KLV_DEPAY_H__ + +#include +#include +#include + +G_BEGIN_DECLS + +#define GST_TYPE_RTP_KLV_DEPAY \ + (gst_rtp_klv_depay_get_type()) +#define GST_RTP_KLV_DEPAY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_KLV_DEPAY,GstRtpKlvDepay)) +#define GST_RTP_KLV_DEPAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_KLV_DEPAY,GstRtpKlvDepayClass)) +#define GST_IS_RTP_KLV_DEPAY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_KLV_DEPAY)) +#define GST_IS_RTP_KLV_DEPAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_KLV_DEPAY)) + +typedef struct _GstRtpKlvDepay GstRtpKlvDepay; +typedef struct _GstRtpKlvDepayClass GstRtpKlvDepayClass; + +struct _GstRtpKlvDepay +{ + GstRTPBaseDepayload depayload; + + GstAdapter *adapter; + gboolean resync; + gint last_marker_seq; /* -1 if unset, otherwise 0-G_MAXUINT16 */ + gint64 last_rtp_ts; /* -1 if unset, otherwise 0-G_MAXUINT32 */ +}; + +struct _GstRtpKlvDepayClass +{ + GstRTPBaseDepayloadClass parent_class; +}; + +G_GNUC_INTERNAL GType gst_rtp_klv_depay_get_type (void); + +G_GNUC_INTERNAL gboolean gst_rtp_klv_depay_plugin_init (GstPlugin * plugin); + +G_END_DECLS + +#endif /* __GST_RTP_KLV_DEPAY_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvpay.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,206 @@ +/* GStreamer RTP KLV Payloader + * Copyright (C) 2014-2015 Tim-Philipp Müller > + * Copyright (C) 2014-2015 Centricular Ltd + * + * 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-rtpklvpay + * @see_also: rtpklvdepay + * + * Payloads KLV metadata into RTP packets according to RFC 6597. + * For detailed information see: http://tools.ietf.org/html/rfc6597 + * + * + * Example pipeline + * |[ + * gst-launch-1.0 filesrc location=video-with-klv.ts ! tsdemux ! rtpklvpay ! udpsink + * ]| This example pipeline will payload an RTP KLV stream extracted from an + * MPEG-TS stream and send it via UDP to an RTP receiver. + * + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstrtpklvpay.h" +#include "gstrtputils.h" + +#include + +GST_DEBUG_CATEGORY_STATIC (klvpay_debug); +#define GST_CAT_DEFAULT (klvpay_debug) + +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("application/x-rtp, " + "media = (string) application, clock-rate = (int) [1, MAX], " + "encoding-name = (string) SMPTE336M") + ); + +static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("meta/x-klv, parsed = (bool) true")); + +#define gst_rtp_klv_pay_parent_class parent_class +G_DEFINE_TYPE (GstRtpKlvPay, gst_rtp_klv_pay, GST_TYPE_RTP_BASE_PAYLOAD); + +static gboolean gst_rtp_klv_pay_setcaps (GstRTPBasePayload * pay, + GstCaps * caps); +static GstFlowReturn gst_rtp_klv_pay_handle_buffer (GstRTPBasePayload * pay, + GstBuffer * buf); + +static void +gst_rtp_klv_pay_class_init (GstRtpKlvPayClass * klass) +{ + GstElementClass *element_class = (GstElementClass *) klass; + GstRTPBasePayloadClass *rtpbasepay_class; + + GST_DEBUG_CATEGORY_INIT (klvpay_debug, "klvpay", 0, "RTP KLV Payloader"); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_template)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&sink_template)); + + gst_element_class_set_static_metadata (element_class, + "RTP KLV Payloader", "Codec/Payloader/Network/RTP", + "Payloads KLV (SMPTE ST 336) metadata as RTP packets", + "Tim-Philipp Müller "); + + rtpbasepay_class = (GstRTPBasePayloadClass *) klass; + + rtpbasepay_class->set_caps = gst_rtp_klv_pay_setcaps; + rtpbasepay_class->handle_buffer = gst_rtp_klv_pay_handle_buffer; +} + +static void +gst_rtp_klv_pay_init (GstRtpKlvPay * klvpay) +{ + /* nothing to do here yet */ +} + +static gboolean +gst_rtp_klv_pay_setcaps (GstRTPBasePayload * pay, GstCaps * caps) +{ + /* FIXME: allow other clock rates */ + gst_rtp_base_payload_set_options (pay, "application", TRUE, "SMPTE336M", + 90000); + + return gst_rtp_base_payload_set_outcaps (pay, NULL); +} + +static GstFlowReturn +gst_rtp_klv_pay_handle_buffer (GstRTPBasePayload * basepayload, GstBuffer * buf) +{ + GstFlowReturn ret = GST_FLOW_OK; + GstBufferList *list = NULL; + GstRtpKlvPay *pay; + GstMapInfo map; + GstBuffer *outbuf = NULL; + gsize offset; + guint mtu, rtp_header_size, max_payload_size; + + pay = GST_RTP_KLV_PAY (basepayload); + mtu = GST_RTP_BASE_PAYLOAD_MTU (basepayload); + + rtp_header_size = gst_rtp_buffer_calc_header_len (0); + max_payload_size = mtu - rtp_header_size; + + gst_buffer_map (buf, &map, GST_MAP_READ); + + if (map.size == 0) + goto done; + + /* KLV coding shall use and only use a fixed 16-byte SMPTE-administered + * Universal Label, according to SMPTE 298M as Key (Rec. ITU R-BT.1653-1) */ + if (map.size < 16 || GST_READ_UINT32_BE (map.data) != 0x060E2B34) + goto bad_input; + + if (map.size > max_payload_size) + list = gst_buffer_list_new (); + + GST_LOG_OBJECT (pay, "%" G_GSIZE_FORMAT " bytes of data to payload", + map.size); + + offset = 0; + while (offset < map.size) { + GstBuffer *payloadbuf; + GstRTPBuffer rtp = { NULL }; + guint payload_size; + guint bytes_left; + + bytes_left = map.size - offset; + payload_size = MIN (bytes_left, max_payload_size); + + outbuf = gst_rtp_buffer_new_allocate (0, 0, 0); + + if (payload_size == bytes_left) { + GST_LOG_OBJECT (pay, "last packet of KLV unit"); + gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); + gst_rtp_buffer_set_marker (&rtp, 1); + gst_rtp_buffer_unmap (&rtp); + } + + GST_LOG_OBJECT (pay, "packet with payload size %u", payload_size); + + gst_rtp_copy_meta (GST_ELEMENT_CAST (pay), outbuf, buf, 0); + + payloadbuf = gst_buffer_copy_region (buf, GST_BUFFER_COPY_MEMORY, + offset, payload_size); + + /* join rtp header + payload memory parts */ + outbuf = gst_buffer_append (outbuf, payloadbuf); + + GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (buf); + GST_BUFFER_DTS (outbuf) = GST_BUFFER_DTS (buf); + + /* and add to list */ + if (list != NULL) + gst_buffer_list_insert (list, -1, outbuf); + + offset += payload_size; + } + +done: + + gst_buffer_unmap (buf, &map); + gst_buffer_unref (buf); + + if (list != NULL) + ret = gst_rtp_base_payload_push_list (basepayload, list); + else if (outbuf != NULL) + ret = gst_rtp_base_payload_push (basepayload, outbuf); + + return ret; + +/* ERRORS */ +bad_input: + { + GST_ERROR_OBJECT (pay, "Input doesn't look like a KLV packet, ignoring"); + goto done; + } +} + +gboolean +gst_rtp_klv_pay_plugin_init (GstPlugin * plugin) +{ + return gst_element_register (plugin, "rtpklvpay", + GST_RANK_SECONDARY, GST_TYPE_RTP_KLV_PAY); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvpay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvpay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpklvpay.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpklvpay.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,60 @@ +/* GStreamer RTP KLV Payloader + * Copyright (C) 2014-2015 Tim-Philipp Müller > + * Copyright (C) 2014-2015 Centricular Ltd + * + * 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_RTP_KLV_PAY_H__ +#define __GST_RTP_KLV_PAY_H__ + +#include +#include +#include + +G_BEGIN_DECLS + +#define GST_TYPE_RTP_KLV_PAY \ + (gst_rtp_klv_pay_get_type()) +#define GST_RTP_KLV_PAY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_KLV_PAY,GstRtpKlvPay)) +#define GST_RTP_KLV_PAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_KLV_PAY,GstRtpKlvPayClass)) +#define GST_IS_RTP_KLV_PAY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_KLV_PAY)) +#define GST_IS_RTP_KLV_PAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_KLV_PAY)) + +typedef struct _GstRtpKlvPay GstRtpKlvPay; +typedef struct _GstRtpKlvPayClass GstRtpKlvPayClass; + +struct _GstRtpKlvPay +{ + GstRTPBasePayload rtpbasepayload; +}; + +struct _GstRtpKlvPayClass +{ + GstRTPBasePayloadClass rtpbasepayload_class; +}; + +G_GNUC_INTERNAL GType gst_rtp_klv_pay_get_type (void); + +G_GNUC_INTERNAL gboolean gst_rtp_klv_pay_plugin_init (GstPlugin * plugin); + +G_END_DECLS + +#endif /* __GST_RTP_KLV_PAY_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL16depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL16depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL16depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL16depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,7 @@ * * Example pipeline * |[ - * gst-launch udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL16depay ! pulsesink + * gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL16depay ! pulsesink * ]| This example pipeline will depayload an RTP raw audio stream. Refer to * the rtpL16pay example to create the RTP stream. * @@ -44,6 +44,7 @@ #include "gstrtpL16depay.h" #include "gstrtpchannels.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpL16depay_debug); #define GST_CAT_DEFAULT (rtpL16depay_debug) @@ -84,7 +85,7 @@ static gboolean gst_rtp_L16_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_L16_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_L16_depay_class_init (GstRtpL16DepayClass * klass) @@ -96,7 +97,7 @@ gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; gstrtpbasedepayload_class->set_caps = gst_rtp_L16_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_L16_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_L16_depay_process; gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&gst_rtp_L16_depay_src_template)); @@ -225,26 +226,24 @@ } static GstBuffer * -gst_rtp_L16_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_L16_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpL16Depay *rtpL16depay; GstBuffer *outbuf; gint payload_len; gboolean marker; - GstRTPBuffer rtp = { NULL }; rtpL16depay = GST_RTP_L16_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len <= 0) goto empty_packet; GST_DEBUG_OBJECT (rtpL16depay, "got payload of %d bytes", payload_len); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - marker = gst_rtp_buffer_get_marker (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); + marker = gst_rtp_buffer_get_marker (rtp); if (marker) { /* mark talk spurt with RESYNC */ @@ -259,7 +258,8 @@ goto reorder_failed; } - gst_rtp_buffer_unmap (&rtp); + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpL16depay), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); return outbuf; @@ -268,14 +268,12 @@ { GST_ELEMENT_WARNING (rtpL16depay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } reorder_failed: { GST_ELEMENT_ERROR (rtpL16depay, STREAM, DECODE, ("Channel reordering failed."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL16pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL16pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL16pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL16pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,7 @@ * * Example pipeline * |[ - * gst-launch -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink + * gst-launch-1.0 -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink * ]| This example pipeline will payload raw audio. Refer to * the rtpL16depay example to depayload and play the RTP stream. * @@ -208,16 +208,16 @@ if (gst_structure_get_int (structure, "channels", &channels)) { gst_caps_set_simple (caps, "channels", G_TYPE_INT, channels, NULL); } else if (gst_structure_get_int (structure, "payload", &pt)) { - if (pt == 10) + if (pt == GST_RTP_PAYLOAD_L16_STEREO) gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL); - else if (pt == 11) + else if (pt == GST_RTP_PAYLOAD_L16_MONO) gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL); } if (gst_structure_get_int (structure, "clock-rate", &rate)) { gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate, NULL); } else if (gst_structure_get_int (structure, "payload", &pt)) { - if (pt == 10 || pt == 11) + if (pt == GST_RTP_PAYLOAD_L16_STEREO || pt == GST_RTP_PAYLOAD_L16_MONO) gst_caps_set_simple (caps, "rate", G_TYPE_INT, 44100, NULL); } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL24depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL24depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL24depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL24depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,7 @@ * * Example pipeline * |[ - * gst-launch udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L24, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL24depay ! pulsesink + * gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L24, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL24depay ! pulsesink * ]| This example pipeline will depayload an RTP raw audio stream. Refer to * the rtpL24pay example to create the RTP stream. * @@ -44,6 +44,7 @@ #include "gstrtpL24depay.h" #include "gstrtpchannels.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpL24depay_debug); #define GST_CAT_DEFAULT (rtpL24depay_debug) @@ -73,7 +74,7 @@ static gboolean gst_rtp_L24_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_L24_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_L24_depay_class_init (GstRtpL24DepayClass * klass) @@ -85,7 +86,7 @@ gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; gstrtpbasedepayload_class->set_caps = gst_rtp_L24_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_L24_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_L24_depay_process; gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&gst_rtp_L24_depay_src_template)); @@ -203,26 +204,24 @@ } static GstBuffer * -gst_rtp_L24_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_L24_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpL24Depay *rtpL24depay; GstBuffer *outbuf; gint payload_len; gboolean marker; - GstRTPBuffer rtp = { NULL }; rtpL24depay = GST_RTP_L24_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len <= 0) goto empty_packet; GST_DEBUG_OBJECT (rtpL24depay, "got payload of %d bytes", payload_len); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - marker = gst_rtp_buffer_get_marker (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); + marker = gst_rtp_buffer_get_marker (rtp); if (marker) { /* mark talk spurt with RESYNC */ @@ -230,6 +229,10 @@ } outbuf = gst_buffer_make_writable (outbuf); + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpL24depay), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } if (rtpL24depay->order && !gst_audio_buffer_reorder_channels (outbuf, rtpL24depay->info.finfo->format, rtpL24depay->info.channels, @@ -237,8 +240,6 @@ goto reorder_failed; } - gst_rtp_buffer_unmap (&rtp); - return outbuf; /* ERRORS */ @@ -246,14 +247,12 @@ { GST_ELEMENT_WARNING (rtpL24depay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } reorder_failed: { GST_ELEMENT_ERROR (rtpL24depay, STREAM, DECODE, ("Channel reordering failed."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL24pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL24pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpL24pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpL24pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,7 @@ * * Example pipeline * |[ - * gst-launch -v audiotestsrc ! audioconvert ! rtpL24pay ! udpsink + * gst-launch-1.0 -v audiotestsrc ! audioconvert ! rtpL24pay ! udpsink * ]| This example pipeline will payload raw audio. Refer to * the rtpL24depay example to depayload and play the RTP stream. * diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp1sdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp1sdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp1sdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp1sdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -25,6 +25,7 @@ #include #include "gstrtpmp1sdepay.h" +#include "gstrtputils.h" /* RtpMP1SDepay signals and args */ enum @@ -66,7 +67,7 @@ static gboolean gst_rtp_mp1s_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_mp1s_depay_class_init (GstRtpMP1SDepayClass * klass) @@ -77,7 +78,7 @@ gstelement_class = (GstElementClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; - gstrtpbasedepayload_class->process = gst_rtp_mp1s_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_mp1s_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_mp1s_depay_setcaps; gst_element_class_add_pad_template (gstelement_class, @@ -118,19 +119,19 @@ } static GstBuffer * -gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstBuffer *outbuf; - GstRTPBuffer rtp = { NULL }; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); - if (outbuf) + if (outbuf) { GST_DEBUG ("gst_rtp_mp1s_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, 0); + } + return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp2tdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp2tdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp2tdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp2tdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -25,6 +25,7 @@ #include #include "gstrtpmp2tdepay.h" +#include "gstrtputils.h" /* RtpMP2TDepay signals and args */ enum @@ -74,7 +75,7 @@ static gboolean gst_rtp_mp2t_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mp2t_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_mp2t_depay_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -92,7 +93,7 @@ gstelement_class = (GstElementClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; - gstrtpbasedepayload_class->process = gst_rtp_mp2t_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_mp2t_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_mp2t_depay_setcaps; gobject_class->set_property = gst_rtp_mp2t_depay_set_property; @@ -146,17 +147,15 @@ } static GstBuffer * -gst_rtp_mp2t_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_mp2t_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpMP2TDepay *rtpmp2tdepay; GstBuffer *outbuf; gint payload_len, leftover; - GstRTPBuffer rtp = { NULL }; rtpmp2tdepay = GST_RTP_MP2T_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (G_UNLIKELY (payload_len <= rtpmp2tdepay->skip_first_bytes)) goto empty_packet; @@ -179,14 +178,16 @@ } outbuf = - gst_rtp_buffer_get_payload_subbuffer (&rtp, + gst_rtp_buffer_get_payload_subbuffer (rtp, rtpmp2tdepay->skip_first_bytes, payload_len); - gst_rtp_buffer_unmap (&rtp); - if (outbuf) + if (outbuf) { GST_DEBUG ("gst_rtp_mp2t_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, 0); + } + return outbuf; /* ERRORS */ @@ -194,7 +195,6 @@ { GST_ELEMENT_WARNING (rtpmp2tdepay, STREAM, DECODE, (NULL), ("Packet was empty")); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp2tpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp2tpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp2tpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp2tpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,6 +26,7 @@ #include #include "gstrtpmp2tpay.h" +#include "gstrtputils.h" static GstStaticPadTemplate gst_rtp_mp2t_pay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -36,11 +37,15 @@ ); static GstStaticPadTemplate gst_rtp_mp2t_pay_src_template = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " + "payload = (int) " GST_RTP_PAYLOAD_MP2T_STRING ", " + "clock-rate = (int) 90000, " "encoding-name = (string) \"MP2T\" ; " + "application/x-rtp, " + "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) 90000, " "encoding-name = (string) \"MP2T\"") ); @@ -108,7 +113,8 @@ { gboolean res; - gst_rtp_base_payload_set_options (payload, "video", TRUE, "MP2T", 90000); + gst_rtp_base_payload_set_options (payload, "video", + payload->pt != GST_RTP_PAYLOAD_MP2T, "MP2T", 90000); res = gst_rtp_base_payload_set_outcaps (payload, NULL); return res; @@ -150,10 +156,11 @@ /* get payload */ paybuf = gst_adapter_take_buffer_fast (rtpmp2tpay->adapter, payload_len); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpmp2tpay), outbuf, paybuf, 0); outbuf = gst_buffer_append (outbuf, paybuf); avail -= payload_len; - GST_BUFFER_TIMESTAMP (outbuf) = rtpmp2tpay->first_ts; + GST_BUFFER_PTS (outbuf) = rtpmp2tpay->first_ts; GST_BUFFER_DURATION (outbuf) = rtpmp2tpay->duration; GST_DEBUG_OBJECT (rtpmp2tpay, "pushing buffer of size %u", @@ -177,7 +184,7 @@ rtpmp2tpay = GST_RTP_MP2T_PAY (basepayload); size = gst_buffer_get_size (buffer); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); duration = GST_BUFFER_DURATION (buffer); again: diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4adepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4adepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4adepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4adepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -23,9 +23,11 @@ #include #include +#include #include #include "gstrtpmp4adepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmp4adepay_debug); #define GST_CAT_DEFAULT (rtpmp4adepay_debug) @@ -64,7 +66,7 @@ static gboolean gst_rtp_mp4a_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static GstStateChangeReturn gst_rtp_mp4a_depay_change_state (GstElement * element, GstStateChange transition); @@ -85,7 +87,7 @@ gstelement_class->change_state = gst_rtp_mp4a_depay_change_state; - gstrtpbasedepayload_class->process = gst_rtp_mp4a_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_mp4a_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_mp4a_depay_setcaps; gst_element_class_add_pad_template (gstelement_class, @@ -293,30 +295,28 @@ } static GstBuffer * -gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpMP4ADepay *rtpmp4adepay; GstBuffer *outbuf; - GstRTPBuffer rtp = { NULL }; GstMapInfo map; rtpmp4adepay = GST_RTP_MP4A_DEPAY (depayload); /* flush remaining data on discont */ - if (GST_BUFFER_IS_DISCONT (buf)) { + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { gst_adapter_clear (rtpmp4adepay->adapter); } - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); outbuf = gst_buffer_make_writable (outbuf); - GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf); + GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (rtp->buffer); gst_adapter_push (rtpmp4adepay->adapter, outbuf); /* RTP marker bit indicates the last packet of the AudioMuxElement => create * and push a buffer */ - if (gst_rtp_buffer_get_marker (&rtp)) { + if (gst_rtp_buffer_get_marker (rtp)) { guint avail; guint i; guint8 *data; @@ -361,8 +361,7 @@ /* take data out, skip the header */ pos += skip; - tmp = gst_buffer_copy_region (outbuf, GST_BUFFER_COPY_MEMORY, pos, - data_len); + tmp = gst_buffer_copy_region (outbuf, GST_BUFFER_COPY_ALL, pos, data_len); /* skip data too */ skip += data_len; @@ -372,7 +371,9 @@ data += skip; avail -= skip; - GST_BUFFER_TIMESTAMP (tmp) = timestamp; + GST_BUFFER_PTS (tmp) = timestamp; + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), tmp, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); gst_rtp_base_depayload_push (depayload, tmp); /* shift ts for next buffers */ @@ -394,7 +395,6 @@ gst_buffer_unmap (outbuf, &map); gst_buffer_unref (outbuf); } - gst_rtp_buffer_unmap (&rtp); return NULL; /* ERRORS */ @@ -404,7 +404,6 @@ ("Packet did not validate"), ("wrong packet size")); gst_buffer_unmap (outbuf, &map); gst_buffer_unref (outbuf); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4apay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4apay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4apay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4apay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include +#include #include "gstrtpmp4apay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmp4apay_debug); #define GST_CAT_DEFAULT (rtpmp4apay_debug) @@ -342,6 +344,8 @@ } } +#define RTP_HEADER_LEN 12 + /* we expect buffers as exactly one complete AU */ static GstFlowReturn @@ -350,11 +354,10 @@ { GstRtpMP4APay *rtpmp4apay; GstFlowReturn ret; - GstBuffer *outbuf; - guint count, mtu; - GstMapInfo map; + GstBufferList *list; + guint mtu; + guint offset; gsize size; - guint8 *data; gboolean fragmented; GstClockTime timestamp; @@ -362,83 +365,92 @@ rtpmp4apay = GST_RTP_MP4A_PAY (basepayload); - gst_buffer_map (buffer, &map, GST_MAP_READ); - size = map.size; - data = map.data; + offset = 0; + size = gst_buffer_get_size (buffer); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); fragmented = FALSE; mtu = GST_RTP_BASE_PAYLOAD_MTU (rtpmp4apay); + list = gst_buffer_list_new_sized (size / (mtu - RTP_HEADER_LEN) + 1); + while (size > 0) { guint towrite; - guint8 *payload; + GstBuffer *outbuf; guint payload_len; guint packet_len; + guint header_len; + GstBuffer *paybuf; GstRTPBuffer rtp = { NULL }; - /* this will be the total lenght of the packet */ - packet_len = gst_rtp_buffer_calc_packet_len (size, 0, 0); - + header_len = 0; if (!fragmented) { + guint count; /* first packet calculate space for the packet including the header */ count = size; while (count >= 0xff) { - packet_len++; + header_len++; count -= 0xff; } - packet_len++; + header_len++; } - /* fill one MTU or all available bytes */ + packet_len = gst_rtp_buffer_calc_packet_len (header_len + size, 0, 0); towrite = MIN (packet_len, mtu); - - /* this is the payload length */ payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0); + payload_len -= header_len; GST_DEBUG_OBJECT (rtpmp4apay, - "avail %" G_GSIZE_FORMAT ", towrite %d, packet_len %d, payload_len %d", - size, towrite, packet_len, payload_len); + "avail %" G_GSIZE_FORMAT + ", header_len %d, packet_len %d, payload_len %d", size, header_len, + packet_len, payload_len); /* create buffer to hold the payload. */ - outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); + outbuf = gst_rtp_buffer_new_allocate (header_len, 0, 0); /* copy payload */ gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); - payload = gst_rtp_buffer_get_payload (&rtp); if (!fragmented) { + guint8 *payload = gst_rtp_buffer_get_payload (&rtp); + guint count; + /* first packet write the header */ count = size; while (count >= 0xff) { *payload++ = 0xff; - payload_len--; count -= 0xff; } *payload++ = count; - payload_len--; } - /* copy data to payload */ - memcpy (payload, data, payload_len); - data += payload_len; - size -= payload_len; - /* marker only if the packet is complete */ - gst_rtp_buffer_set_marker (&rtp, size == 0); + gst_rtp_buffer_set_marker (&rtp, size == payload_len); gst_rtp_buffer_unmap (&rtp); - /* copy incomming timestamp (if any) to outgoing buffers */ - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + /* create a new buf to hold the payload */ + paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, + offset, payload_len); + + /* join memory parts */ + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpmp4apay), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + outbuf = gst_buffer_append (outbuf, paybuf); + gst_buffer_list_add (list, outbuf); + offset += payload_len; + size -= payload_len; - ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmp4apay), outbuf); + /* copy incomming timestamp (if any) to outgoing buffers */ + GST_BUFFER_PTS (outbuf) = timestamp; fragmented = TRUE; } - gst_buffer_unmap (buffer, &map); + ret = + gst_rtp_base_payload_push_list (GST_RTP_BASE_PAYLOAD (rtpmp4apay), list); + gst_buffer_unref (buffer); return ret; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4gdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4gdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4gdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4gdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,6 +26,7 @@ #include #include "gstrtpmp4gdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmp4gdepay_debug); #define GST_CAT_DEFAULT (rtpmp4gdepay_debug) @@ -134,7 +135,7 @@ static gboolean gst_rtp_mp4g_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_mp4g_depay_handle_event (GstRTPBaseDepayload * filter, GstEvent * event); @@ -157,7 +158,7 @@ gstelement_class->change_state = gst_rtp_mp4g_depay_change_state; - gstrtpbasedepayload_class->process = gst_rtp_mp4g_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_mp4g_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_mp4g_depay_setcaps; gstrtpbasedepayload_class->handle_event = gst_rtp_mp4g_depay_handle_event; @@ -347,6 +348,7 @@ } GST_DEBUG_OBJECT (rtpmp4gdepay, "pushing AU_index %u", AU_index); + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpmp4gdepay), outbuf, 0); gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmp4gdepay), outbuf); rtpmp4gdepay->next_AU_index = AU_index + 1; } @@ -367,6 +369,7 @@ /* we received the expected packet, push it and flush as much as we can from * the queue */ + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpmp4gdepay), outbuf, 0); gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmp4gdepay), outbuf); rtpmp4gdepay->next_AU_index++; @@ -379,6 +382,7 @@ GST_DEBUG_OBJECT (rtpmp4gdepay, "pushing expected AU_index %u", AU_index); outbuf = g_queue_pop_head (rtpmp4gdepay->packets); + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpmp4gdepay), outbuf, 0); gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmp4gdepay), outbuf); rtpmp4gdepay->next_AU_index++; @@ -418,22 +422,21 @@ } static GstBuffer * -gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpMP4GDepay *rtpmp4gdepay; GstBuffer *outbuf = NULL; GstClockTime timestamp; - GstRTPBuffer rtp = { NULL }; rtpmp4gdepay = GST_RTP_MP4G_DEPAY (depayload); /* flush remaining data on discont */ - if (GST_BUFFER_IS_DISCONT (buf)) { + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) { GST_DEBUG_OBJECT (rtpmp4gdepay, "received DISCONT"); gst_adapter_clear (rtpmp4gdepay->adapter); } - timestamp = GST_BUFFER_TIMESTAMP (buf); + timestamp = GST_BUFFER_PTS (rtp->buffer); { gint payload_len, payload_AU; @@ -443,14 +446,13 @@ guint AU_size, AU_index, AU_index_delta, payload_AU_size; gboolean M; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); - payload = gst_rtp_buffer_get_payload (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); + payload = gst_rtp_buffer_get_payload (rtp); GST_DEBUG_OBJECT (rtpmp4gdepay, "received payload of %d", payload_len); - rtptime = gst_rtp_buffer_get_timestamp (&rtp); - M = gst_rtp_buffer_get_marker (&rtp); + rtptime = gst_rtp_buffer_get_timestamp (rtp); + M = gst_rtp_buffer_get_marker (rtp); if (rtpmp4gdepay->sizelength > 0) { gint num_AU_headers, AU_headers_bytes, i; @@ -558,6 +560,15 @@ /* use number of packets and of previous frame */ cd = diff / rtpmp4gdepay->prev_AU_num; GST_DEBUG_OBJECT (depayload, "guessing constantDuration %d", cd); + if (!GST_BUFFER_IS_DISCONT (rtp->buffer)) { + /* rfc3640 - 3.2.3.2 + * if we see two consecutive packets with AU_index of 0 and + * there has been no discontinuity, we must conclude that this + * value of constantDuration is correct from now on. */ + GST_DEBUG_OBJECT (depayload, + "constantDuration of %d detected", cd); + rtpmp4gdepay->constantDuration = cd; + } } else { /* assume this frame has the same number of packets as the * previous one */ @@ -650,7 +661,7 @@ /* collect stuff in the adapter, strip header from payload and push in * the adapter */ outbuf = - gst_rtp_buffer_get_payload_subbuffer (&rtp, payload_AU, AU_size); + gst_rtp_buffer_get_payload_subbuffer (rtp, payload_AU, AU_size); gst_adapter_push (rtpmp4gdepay->adapter, outbuf); if (M) { @@ -663,12 +674,19 @@ /* copy some of the fields we calculated above on the buffer. We also * copy the AU_index so that we can sort the packets in our queue. */ - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; GST_BUFFER_OFFSET (outbuf) = AU_index; - /* make sure we don't use the timestamp again for other AUs in this - * RTP packet. */ - timestamp = -1; + if (rtpmp4gdepay->constantDuration != 0) { + /* if we have constantDuration, calculate timestamp for next AU + * in this RTP packet. */ + timestamp += (rtpmp4gdepay->constantDuration * GST_SECOND) / + depayload->clock_rate; + } else { + /* otherwise, make sure we don't use the timestamp again for other + * AUs. */ + timestamp = GST_CLOCK_TIME_NONE; + } GST_DEBUG_OBJECT (depayload, "pushing buffer of size %" G_GSIZE_FORMAT, @@ -682,7 +700,7 @@ } } else { /* push complete buffer in adapter */ - outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, 0, payload_len); + outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, 0, payload_len); gst_adapter_push (rtpmp4gdepay->adapter, outbuf); /* if this was the last packet of the VOP, create and push a buffer */ @@ -696,13 +714,11 @@ GST_DEBUG ("gst_rtp_mp4g_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); - gst_rtp_buffer_unmap (&rtp); return outbuf; } } } - gst_rtp_buffer_unmap (&rtp); return NULL; /* ERRORS */ @@ -710,7 +726,6 @@ { GST_ELEMENT_WARNING (rtpmp4gdepay, STREAM, DECODE, ("Packet payload was too short."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4gpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4gpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4gpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4gpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -27,6 +27,7 @@ #include #include "gstrtpmp4gpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmp4gpay_debug); #define GST_CAT_DEFAULT (rtpmp4gpay_debug) @@ -533,9 +534,10 @@ gst_rtp_buffer_unmap (&rtp); paybuf = gst_adapter_take_buffer_fast (rtpmp4gpay->adapter, payload_len); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpmp4gpay), outbuf, paybuf, 0); outbuf = gst_buffer_append (outbuf, paybuf); - GST_BUFFER_TIMESTAMP (outbuf) = rtpmp4gpay->first_timestamp; + GST_BUFFER_PTS (outbuf) = rtpmp4gpay->first_timestamp; GST_BUFFER_DURATION (outbuf) = rtpmp4gpay->first_duration; if (rtpmp4gpay->frame_len) { @@ -567,7 +569,7 @@ rtpmp4gpay = GST_RTP_MP4G_PAY (basepayload); - rtpmp4gpay->first_timestamp = GST_BUFFER_TIMESTAMP (buffer); + rtpmp4gpay->first_timestamp = GST_BUFFER_PTS (buffer); rtpmp4gpay->first_duration = GST_BUFFER_DURATION (buffer); rtpmp4gpay->discont = GST_BUFFER_IS_DISCONT (buffer); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4vdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4vdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4vdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4vdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -22,9 +22,11 @@ #endif #include +#include #include #include "gstrtpmp4vdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmp4vdepay_debug); #define GST_CAT_DEFAULT (rtpmp4vdepay_debug) @@ -61,7 +63,7 @@ static gboolean gst_rtp_mp4v_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mp4v_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static GstStateChangeReturn gst_rtp_mp4v_depay_change_state (GstElement * element, GstStateChange transition); @@ -81,7 +83,7 @@ gstelement_class->change_state = gst_rtp_mp4v_depay_change_state; - gstrtpbasedepayload_class->process = gst_rtp_mp4v_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_mp4v_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_mp4v_depay_setcaps; gst_element_class_add_pad_template (gstelement_class, @@ -159,23 +161,20 @@ } static GstBuffer * -gst_rtp_mp4v_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_mp4v_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpMP4VDepay *rtpmp4vdepay; GstBuffer *pbuf, *outbuf = NULL; - GstRTPBuffer rtp = { NULL }; gboolean marker; rtpmp4vdepay = GST_RTP_MP4V_DEPAY (depayload); /* flush remaining data on discont */ - if (GST_BUFFER_IS_DISCONT (buf)) + if (GST_BUFFER_IS_DISCONT (rtp->buffer)) gst_adapter_clear (rtpmp4vdepay->adapter); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - pbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - marker = gst_rtp_buffer_get_marker (&rtp); - gst_rtp_buffer_unmap (&rtp); + pbuf = gst_rtp_buffer_get_payload_buffer (rtp); + marker = gst_rtp_buffer_get_marker (rtp); gst_adapter_push (rtpmp4vdepay->adapter, pbuf); @@ -188,7 +187,10 @@ GST_DEBUG ("gst_rtp_mp4v_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpmp4vdepay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); } + return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4vpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4vpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmp4vpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmp4vpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include +#include #include "gstrtpmp4vpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmp4vpay_debug); #define GST_CAT_DEFAULT (rtpmp4vpay_debug) @@ -58,8 +60,8 @@ enum { - ARG_0, - ARG_CONFIG_INTERVAL + PROP_0, + PROP_CONFIG_INTERVAL }; @@ -103,7 +105,7 @@ "Payload MPEG-4 video as RTP packets (RFC 3016)", "Wim Taymans "); - g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CONFIG_INTERVAL, + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CONFIG_INTERVAL, g_param_spec_uint ("config-interval", "Config Send Interval", "Send Config Insertion Interval in seconds (configuration headers " "will be multiplexed in the data stream when detected.) (0 = disabled)", @@ -285,10 +287,11 @@ gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); gst_rtp_buffer_set_marker (&rtp, avail == 0); gst_rtp_buffer_unmap (&rtp); - + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpmp4vpay), outbuf, outbuf_data, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); outbuf = gst_buffer_append (outbuf, outbuf_data); - GST_BUFFER_TIMESTAMP (outbuf) = rtpmp4vpay->first_timestamp; + GST_BUFFER_PTS (outbuf) = rtpmp4vpay->first_timestamp; /* add to list */ gst_buffer_list_insert (list, -1, outbuf); @@ -434,7 +437,7 @@ gst_buffer_map (buffer, &map, GST_MAP_READ); size = map.size; - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); duration = GST_BUFFER_DURATION (buffer); avail = gst_adapter_available (rtpmp4vpay->adapter); @@ -462,9 +465,9 @@ (gint) size - strip); /* strip off header */ - subbuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_MEMORY, strip, + subbuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, strip, size - strip); - GST_BUFFER_TIMESTAMP (subbuf) = timestamp; + GST_BUFFER_PTS (subbuf) = timestamp; gst_buffer_unref (buffer); buffer = subbuf; @@ -513,7 +516,7 @@ /* insert header */ buffer = gst_buffer_append (gst_buffer_ref (rtpmp4vpay->config), buffer); - GST_BUFFER_TIMESTAMP (buffer) = timestamp; + GST_BUFFER_PTS (buffer) = timestamp; size = gst_buffer_get_size (buffer); if (timestamp != -1) { @@ -584,7 +587,7 @@ rtpmp4vpay = GST_RTP_MP4V_PAY (object); switch (prop_id) { - case ARG_CONFIG_INTERVAL: + case PROP_CONFIG_INTERVAL: rtpmp4vpay->config_interval = g_value_get_uint (value); break; default: @@ -601,7 +604,7 @@ rtpmp4vpay = GST_RTP_MP4V_PAY (object); switch (prop_id) { - case ARG_CONFIG_INTERVAL: + case PROP_CONFIG_INTERVAL: g_value_set_uint (value, rtpmp4vpay->config_interval); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpadepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpadepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpadepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpadepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -22,9 +22,11 @@ #endif #include +#include #include #include "gstrtpmpadepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmpadepay_debug); #define GST_CAT_DEFAULT (rtpmpadepay_debug) @@ -42,11 +44,11 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"audio\", " - "clock-rate = (int) 90000, " "encoding-name = (string) \"MPA\";" + "payload = (int) " GST_RTP_PAYLOAD_MPA_STRING ", " + "clock-rate = (int) 90000 ;" "application/x-rtp, " "media = (string) \"audio\", " - "payload = (int) " GST_RTP_PAYLOAD_MPA_STRING ", " - "clock-rate = (int) 90000") + "encoding-name = (string) \"MPA\", clock-rate = (int) [1, MAX]") ); #define gst_rtp_mpa_depay_parent_class parent_class @@ -55,7 +57,7 @@ static gboolean gst_rtp_mpa_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mpa_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_mpa_depay_class_init (GstRtpMPADepayClass * klass) @@ -80,7 +82,7 @@ "Wim Taymans "); gstrtpbasedepayload_class->set_caps = gst_rtp_mpa_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_mpa_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_mpa_depay_process; } static void @@ -111,11 +113,10 @@ } static GstBuffer * -gst_rtp_mpa_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_mpa_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpMPADepay *rtpmpadepay; GstBuffer *outbuf; - GstRTPBuffer rtp = { NULL }; gint payload_len; #if 0 guint8 *payload; @@ -125,9 +126,7 @@ rtpmpadepay = GST_RTP_MPA_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len <= 4) goto empty_packet; @@ -146,8 +145,8 @@ #endif /* subbuffer skipping the 4 header bytes */ - outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, 4, -1); - marker = gst_rtp_buffer_get_marker (&rtp); + outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, 4, -1); + marker = gst_rtp_buffer_get_marker (rtp); if (marker) { /* mark start of talkspurt with RESYNC */ @@ -157,7 +156,10 @@ "gst_rtp_mpa_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT "", gst_buffer_get_size (outbuf)); - gst_rtp_buffer_unmap (&rtp); + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpmpadepay), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } /* FIXME, we can push half mpeg frames when they are split over multiple * RTP packets */ @@ -168,7 +170,6 @@ { GST_ELEMENT_WARNING (rtpmpadepay, STREAM, DECODE, ("Empty Payload."), (NULL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpapay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpapay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpapay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpapay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include +#include #include "gstrtpmpapay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmpapay_debug); #define GST_CAT_DEFAULT (rtpmpapay_debug) @@ -104,6 +106,8 @@ gst_rtp_mpa_pay_init (GstRtpMPAPay * rtpmpapay) { rtpmpapay->adapter = gst_adapter_new (); + + GST_RTP_BASE_PAYLOAD (rtpmpapay)->pt = GST_RTP_PAYLOAD_MPA; } static void @@ -133,7 +137,8 @@ { gboolean res; - gst_rtp_base_payload_set_options (payload, "audio", TRUE, "MPA", 90000); + gst_rtp_base_payload_set_options (payload, "audio", + payload->pt != GST_RTP_PAYLOAD_MPA, "MPA", 90000); res = gst_rtp_base_payload_set_outcaps (payload, NULL); return res; @@ -164,6 +169,8 @@ return ret; } +#define RTP_HEADER_LEN 12 + static GstFlowReturn gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay) { @@ -171,6 +178,7 @@ GstBuffer *outbuf; GstFlowReturn ret; guint16 frag_offset; + GstBufferList *list; /* the data available in the adapter is either smaller * than the MTU or bigger. In the case it is smaller, the complete @@ -182,6 +190,10 @@ ret = GST_FLOW_OK; + list = + gst_buffer_list_new_sized (avail / (GST_RTP_BASE_PAYLOAD_MTU (rtpmpapay) - + RTP_HEADER_LEN) + 1); + frag_offset = 0; while (avail > 0) { guint towrite; @@ -231,14 +243,17 @@ gst_rtp_buffer_unmap (&rtp); paybuf = gst_adapter_take_buffer_fast (rtpmpapay->adapter, payload_len); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpmpapay), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); outbuf = gst_buffer_append (outbuf, paybuf); - GST_BUFFER_TIMESTAMP (outbuf) = rtpmpapay->first_ts; + GST_BUFFER_PTS (outbuf) = rtpmpapay->first_ts; GST_BUFFER_DURATION (outbuf) = rtpmpapay->duration; - - ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmpapay), outbuf); + gst_buffer_list_add (list, outbuf); } + ret = gst_rtp_base_payload_push_list (GST_RTP_BASE_PAYLOAD (rtpmpapay), list); + return ret; } @@ -256,7 +271,7 @@ size = gst_buffer_get_size (buffer); duration = GST_BUFFER_DURATION (buffer); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); if (GST_BUFFER_IS_DISCONT (buffer)) { GST_DEBUG_OBJECT (rtpmpapay, "DISCONT"); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmparobustdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmparobustdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmparobustdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmparobustdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -77,7 +77,7 @@ static gboolean gst_rtp_mpa_robust_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mpa_robust_depay_process (GstRTPBaseDepayload * - depayload, GstBuffer * buf); + depayload, GstRTPBuffer * rtp); static void gst_rtp_mpa_robust_depay_finalize (GObject * object) @@ -122,7 +122,8 @@ "Mark Nauwelaerts "); gstrtpbasedepayload_class->set_caps = gst_rtp_mpa_robust_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_mpa_robust_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = + gst_rtp_mpa_robust_depay_process; } static void @@ -290,7 +291,7 @@ GST_WRITE_UINT32_BE (map.data, dummy->header); gst_buffer_unmap (dummy->buffer, &map); - GST_BUFFER_TIMESTAMP (dummy->buffer) = GST_BUFFER_TIMESTAMP (frame->buffer); + GST_BUFFER_PTS (dummy->buffer) = GST_BUFFER_PTS (frame->buffer); return dummy; } @@ -609,7 +610,7 @@ flush: buf = gst_byte_writer_free_and_get_buffer (rtpmpadepay->mp3_frame); rtpmpadepay->mp3_frame = NULL; - GST_BUFFER_TIMESTAMP (buf) = GST_BUFFER_TIMESTAMP (head->buffer); + GST_BUFFER_PTS (buf) = GST_BUFFER_PTS (head->buffer); /* no longer need head ADU frame header and side info */ /* NOTE maybe head == current, then size and offset go off a bit, * but current gets reset to NULL, and then also offset and size */ @@ -641,7 +642,7 @@ static GstBuffer * gst_rtp_mpa_robust_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf) + GstRTPBuffer * rtp) { GstRtpMPARobustDepay *rtpmpadepay; gint payload_len, offset; @@ -649,19 +650,17 @@ gboolean cont, dtype; guint av, size; GstClockTime timestamp; - GstRTPBuffer rtp = { NULL }; + GstBuffer *buf; rtpmpadepay = GST_RTP_MPA_ROBUST_DEPAY (depayload); - timestamp = GST_BUFFER_TIMESTAMP (buf); - - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); + timestamp = GST_BUFFER_PTS (rtp->buffer); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len <= 1) goto short_read; - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); offset = 0; GST_LOG_OBJECT (rtpmpadepay, "payload_len: %d", payload_len); @@ -701,7 +700,7 @@ GST_LOG_OBJECT (rtpmpadepay, "offset %d has cont: %d, dtype: %d, size: %d", offset, cont, dtype, size); - buf = gst_rtp_buffer_get_payload_subbuffer (&rtp, offset, + buf = gst_rtp_buffer_get_payload_subbuffer (rtp, offset, MIN (size, payload_len)); if (cont) { @@ -716,7 +715,7 @@ if (av == size) { timestamp = gst_adapter_prev_pts (rtpmpadepay->adapter, NULL); buf = gst_adapter_take_buffer (rtpmpadepay->adapter, size); - GST_BUFFER_TIMESTAMP (buf) = timestamp; + GST_BUFFER_PTS (buf) = timestamp; gst_rtp_mpa_robust_depay_submit_adu (rtpmpadepay, buf); } else if (av > size) { GST_DEBUG_OBJECT (rtpmpadepay, @@ -730,7 +729,7 @@ /* not continuation, first fragment or whole ADU */ if (payload_len == size) { /* whole ADU */ - GST_BUFFER_TIMESTAMP (buf) = timestamp; + GST_BUFFER_PTS (buf) = timestamp; gst_rtp_mpa_robust_depay_submit_adu (rtpmpadepay, buf); } else if (payload_len < size) { /* first fragment */ @@ -745,7 +744,6 @@ /* timestamp applies to first payload, no idea for subsequent ones */ timestamp = GST_CLOCK_TIME_NONE; } - gst_rtp_buffer_unmap (&rtp); return NULL; @@ -754,7 +752,6 @@ { GST_ELEMENT_WARNING (rtpmpadepay, STREAM, DECODE, (NULL), ("Packet contains invalid data")); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpvdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpvdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpvdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpvdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -22,9 +22,11 @@ #endif #include +#include #include #include "gstrtpmpvdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmpvdepay_debug); #define GST_CAT_DEFAULT (rtpmpvdepay_debug) @@ -57,7 +59,7 @@ static gboolean gst_rtp_mpv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_mpv_depay_class_init (GstRtpMPVDepayClass * klass) @@ -79,7 +81,7 @@ "Wim Taymans "); gstrtpbasedepayload_class->set_caps = gst_rtp_mpv_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_mpv_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_mpv_depay_process; GST_DEBUG_CATEGORY_INIT (rtpmpvdepay_debug, "rtpmpvdepay", 0, "MPEG Video RTP Depayloader"); @@ -114,23 +116,20 @@ } static GstBuffer * -gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpMPVDepay *rtpmpvdepay; - GstBuffer *outbuf; - GstRTPBuffer rtp = { NULL }; + GstBuffer *outbuf = NULL; rtpmpvdepay = GST_RTP_MPV_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - { gint payload_len, payload_header; guint8 *payload; guint8 T; - payload_len = gst_rtp_buffer_get_payload_len (&rtp); - payload = gst_rtp_buffer_get_payload (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); + payload = gst_rtp_buffer_get_payload (rtp); payload_header = 0; if (payload_len <= 4) @@ -169,17 +168,19 @@ payload += 4; } - outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, payload_header, -1); + outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, payload_header, -1); if (outbuf) { GST_DEBUG_OBJECT (rtpmpvdepay, "gst_rtp_mpv_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpmpvdepay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + } - return outbuf; } - return NULL; + return outbuf; /* ERRORS */ empty_packet: diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpvpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpvpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpmpvpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpmpvpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include #include +#include #include "gstrtpmpvpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpmpvpay_debug); #define GST_CAT_DEFAULT (rtpmpvpay_debug) @@ -39,12 +41,16 @@ ); static GstStaticPadTemplate gst_rtp_mpv_pay_src_template = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_MPV_STRING ", " + "clock-rate = (int) 90000, " "encoding-name = (string) \"MPV\"; " + "application/x-rtp, " + "media = (string) \"video\", " + "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) 90000, " "encoding-name = (string) \"MPV\"") ); @@ -131,7 +137,8 @@ static gboolean gst_rtp_mpv_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) { - gst_rtp_base_payload_set_options (payload, "video", FALSE, "MPV", 90000); + gst_rtp_base_payload_set_options (payload, "video", + payload->pt != GST_RTP_PAYLOAD_MPV, "MPV", 90000); return gst_rtp_base_payload_set_outcaps (payload, NULL); } @@ -160,12 +167,15 @@ return ret; } +#define RTP_HEADER_LEN 12 + static GstFlowReturn gst_rtp_mpv_pay_flush (GstRTPMPVPay * rtpmpvpay) { - GstBuffer *outbuf; GstFlowReturn ret; guint avail; + GstBufferList *list; + GstBuffer *outbuf; guint8 *payload; @@ -173,6 +183,10 @@ ret = GST_FLOW_OK; + list = + gst_buffer_list_new_sized (avail / (GST_RTP_BASE_PAYLOAD_MTU (rtpmpvpay) - + RTP_HEADER_LEN) + 1); + while (avail > 0) { guint towrite; guint packet_len; @@ -214,13 +228,16 @@ gst_rtp_buffer_unmap (&rtp); paybuf = gst_adapter_take_buffer_fast (rtpmpvpay->adapter, payload_len); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpmpvpay), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); outbuf = gst_buffer_append (outbuf, paybuf); - GST_BUFFER_TIMESTAMP (outbuf) = rtpmpvpay->first_ts; - - ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmpvpay), outbuf); + GST_BUFFER_PTS (outbuf) = rtpmpvpay->first_ts; + gst_buffer_list_add (list, outbuf); } + ret = gst_rtp_base_payload_push_list (GST_RTP_BASE_PAYLOAD (rtpmpvpay), list); + return ret; } @@ -235,7 +252,7 @@ rtpmpvpay = GST_RTP_MPV_PAY (basepayload); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); duration = GST_BUFFER_DURATION (buffer); if (GST_BUFFER_IS_DISCONT (buffer)) { diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmadepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmadepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmadepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmadepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -25,7 +25,9 @@ #include #include +#include #include "gstrtppcmadepay.h" +#include "gstrtputils.h" /* RtpPcmaDepay signals and args */ enum @@ -36,7 +38,7 @@ enum { - ARG_0 + PROP_0 }; static GstStaticPadTemplate gst_rtp_pcma_depay_sink_template = @@ -60,7 +62,7 @@ ); static GstBuffer *gst_rtp_pcma_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_pcma_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -87,7 +89,7 @@ "Extracts PCMA audio from RTP packets", "Edgard Lima , Zeeshan Ali "); - gstrtpbasedepayload_class->process = gst_rtp_pcma_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_pcma_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_pcma_depay_setcaps; } @@ -124,24 +126,20 @@ } static GstBuffer * -gst_rtp_pcma_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_pcma_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstBuffer *outbuf = NULL; gboolean marker; guint len; - GstRTPBuffer rtp = { NULL }; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - marker = gst_rtp_buffer_get_marker (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); GST_DEBUG ("process : got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), marker, - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); + gst_buffer_get_size (rtp->buffer), marker, + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); - len = gst_rtp_buffer_get_payload_len (&rtp); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - gst_rtp_buffer_unmap (&rtp); + len = gst_rtp_buffer_get_payload_len (rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); if (outbuf) { GST_BUFFER_DURATION (outbuf) = @@ -151,8 +149,10 @@ /* mark start of talkspurt with RESYNC */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } - } + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmapay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmapay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmapay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmapay.c 2015-10-22 08:02:54.000000000 +0000 @@ -86,6 +86,7 @@ rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtppcmapay); + GST_RTP_BASE_PAYLOAD (rtppcmapay)->pt = GST_RTP_PAYLOAD_PCMA; GST_RTP_BASE_PAYLOAD (rtppcmapay)->clock_rate = 8000; /* tell rtpbaseaudiopayload that this is a sample based codec */ @@ -100,9 +101,8 @@ { gboolean res; - payload->pt = GST_RTP_PAYLOAD_PCMA; - - gst_rtp_base_payload_set_options (payload, "audio", FALSE, "PCMA", 8000); + gst_rtp_base_payload_set_options (payload, "audio", + payload->pt != GST_RTP_PAYLOAD_PCMA, "PCMA", 8000); res = gst_rtp_base_payload_set_outcaps (payload, NULL); return res; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmudepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmudepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmudepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmudepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -25,7 +25,9 @@ #include #include +#include #include "gstrtppcmudepay.h" +#include "gstrtputils.h" /* RtpPcmuDepay signals and args */ enum @@ -36,7 +38,7 @@ enum { - ARG_0 + PROP_0 }; static GstStaticPadTemplate gst_rtp_pcmu_depay_sink_template = @@ -61,7 +63,7 @@ ); static GstBuffer *gst_rtp_pcmu_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_pcmu_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -88,7 +90,7 @@ "Extracts PCMU audio from RTP packets", "Edgard Lima , Zeeshan Ali "); - gstrtpbasedepayload_class->process = gst_rtp_pcmu_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_pcmu_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_pcmu_depay_setcaps; } @@ -125,24 +127,20 @@ } static GstBuffer * -gst_rtp_pcmu_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_pcmu_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstBuffer *outbuf = NULL; guint len; gboolean marker; - GstRTPBuffer rtp = { NULL }; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - marker = gst_rtp_buffer_get_marker (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); GST_DEBUG ("process : got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), marker, - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); + gst_buffer_get_size (rtp->buffer), marker, + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); - len = gst_rtp_buffer_get_payload_len (&rtp); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - gst_rtp_buffer_unmap (&rtp); + len = gst_rtp_buffer_get_payload_len (rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); if (outbuf) { GST_BUFFER_DURATION (outbuf) = @@ -152,6 +150,9 @@ /* mark start of talkspurt with RESYNC */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC); } + + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); } return outbuf; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmupay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmupay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtppcmupay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtppcmupay.c 2015-10-22 08:02:54.000000000 +0000 @@ -86,6 +86,7 @@ rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtppcmupay); + GST_RTP_BASE_PAYLOAD (rtppcmupay)->pt = GST_RTP_PAYLOAD_PCMU; GST_RTP_BASE_PAYLOAD (rtppcmupay)->clock_rate = 8000; /* tell rtpbaseaudiopayload that this is a sample based codec */ @@ -100,9 +101,8 @@ { gboolean res; - payload->pt = GST_RTP_PAYLOAD_PCMU; - - gst_rtp_base_payload_set_options (payload, "audio", FALSE, "PCMU", 8000); + gst_rtp_base_payload_set_options (payload, "audio", + payload->pt != GST_RTP_PAYLOAD_PCMU, "PCMU", 8000); res = gst_rtp_base_payload_set_outcaps (payload, NULL); return res; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpqcelpdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpqcelpdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpqcelpdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpqcelpdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -22,10 +22,12 @@ #endif #include +#include #include #include #include "gstrtpqcelpdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpqcelpdepay_debug); #define GST_CAT_DEFAULT (rtpqcelpdepay_debug) @@ -45,7 +47,7 @@ enum { - ARG_0 + PROP_0 }; static GstStaticPadTemplate gst_rtp_qcelp_depay_sink_template = @@ -74,7 +76,7 @@ static gboolean gst_rtp_qcelp_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_qcelp_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); #define gst_rtp_qcelp_depay_parent_class parent_class G_DEFINE_TYPE (GstRtpQCELPDepay, gst_rtp_qcelp_depay, @@ -93,7 +95,7 @@ gobject_class->finalize = gst_rtp_qcelp_depay_finalize; - gstrtpbasedepayload_class->process = gst_rtp_qcelp_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_qcelp_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_qcelp_depay_setcaps; gst_element_class_add_pad_template (gstelement_class, @@ -248,7 +250,8 @@ } static GstBuffer * -gst_rtp_qcelp_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_qcelp_depay_process (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp) { GstRtpQCELPDepay *depay; GstBuffer *outbuf; @@ -256,20 +259,17 @@ guint payload_len, offset, index; guint8 *payload; guint LLL, NNN; - GstRTPBuffer rtp = { NULL }; depay = GST_RTP_QCELP_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len < 2) goto too_small; - timestamp = GST_BUFFER_TIMESTAMP (buf); + timestamp = GST_BUFFER_PTS (rtp->buffer); - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); /* 0 1 2 3 4 5 6 7 * +-+-+-+-+-+-+-+-+ @@ -351,12 +351,15 @@ outbuf = create_erasure_buffer (depay); } else { /* each frame goes into its buffer */ - outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, offset, frame_len); + outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, offset, frame_len); } - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; GST_BUFFER_DURATION (outbuf) = FRAME_DURATION; + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + if (!depay->interleaved || index == 0) { /* not interleaved or first frame in packet, just push */ gst_rtp_base_depayload_push (depayload, outbuf); @@ -393,7 +396,6 @@ flush_packets (depay); } - gst_rtp_buffer_unmap (&rtp); return NULL; /* ERRORS */ @@ -401,28 +403,24 @@ { GST_ELEMENT_WARNING (depay, STREAM, DECODE, (NULL), ("QCELP RTP payload too small (%d)", payload_len)); - gst_rtp_buffer_unmap (&rtp); return NULL; } invalid_lll: { GST_ELEMENT_WARNING (depay, STREAM, DECODE, (NULL), ("QCELP RTP invalid LLL received (%d)", LLL)); - gst_rtp_buffer_unmap (&rtp); return NULL; } invalid_nnn: { GST_ELEMENT_WARNING (depay, STREAM, DECODE, (NULL), ("QCELP RTP invalid NNN received (%d)", NNN)); - gst_rtp_buffer_unmap (&rtp); return NULL; } invalid_frame: { GST_ELEMENT_WARNING (depay, STREAM, DECODE, (NULL), ("QCELP RTP invalid frame received")); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpqdmdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpqdmdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpqdmdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpqdmdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,7 +24,9 @@ #include #include +#include #include "gstrtpqdmdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY (rtpqdm2depay_debug); #define GST_CAT_DEFAULT rtpqdm2depay_debug @@ -60,7 +62,7 @@ element, GstStateChange transition); static GstBuffer *gst_rtp_qdm2_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); gboolean gst_rtp_qdm2_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps); @@ -75,7 +77,7 @@ gstelement_class = (GstElementClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; - gstrtpbasedepayload_class->process = gst_rtp_qdm2_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_qdm2_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_qdm2_depay_setcaps; gobject_class->finalize = gst_rtp_qdm2_depay_finalize; @@ -223,12 +225,11 @@ } static GstBuffer * -gst_rtp_qdm2_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_qdm2_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpQDM2Depay *rtpqdm2depay; GstBuffer *outbuf = NULL; guint16 seq; - GstRTPBuffer rtp = { NULL }; rtpqdm2depay = GST_RTP_QDM2_DEPAY (depayload); @@ -238,20 +239,19 @@ guint avail; guint pos = 0; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len < 3) goto bad_packet; - payload = gst_rtp_buffer_get_payload (&rtp); - seq = gst_rtp_buffer_get_seq (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); + seq = gst_rtp_buffer_get_seq (rtp); if (G_UNLIKELY (seq != rtpqdm2depay->nextseq)) { GST_DEBUG ("GAP in sequence number, Resetting data !"); /* Flush previous data */ flush_data (rtpqdm2depay); /* And store new timestamp */ rtpqdm2depay->ptimestamp = rtpqdm2depay->timestamp; - rtpqdm2depay->timestamp = GST_BUFFER_TIMESTAMP (buf); + rtpqdm2depay->timestamp = GST_BUFFER_PTS (rtp->buffer); /* And that previous data will be pushed at the bottom */ } rtpqdm2depay->nextseq = seq + 1; @@ -273,7 +273,7 @@ GST_DEBUG ("Headers"); /* Store the incoming timestamp */ rtpqdm2depay->ptimestamp = rtpqdm2depay->timestamp; - rtpqdm2depay->timestamp = GST_BUFFER_TIMESTAMP (buf); + rtpqdm2depay->timestamp = GST_BUFFER_PTS (rtp->buffer); /* flush the internal data if needed */ flush_data (rtpqdm2depay); if (G_UNLIKELY (!rtpqdm2depay->configured)) { @@ -356,13 +356,12 @@ if (G_UNLIKELY (avail)) { GST_DEBUG ("Pushing out %d bytes of collected data", avail); outbuf = gst_adapter_take_buffer (rtpqdm2depay->adapter, avail); - GST_BUFFER_TIMESTAMP (outbuf) = rtpqdm2depay->ptimestamp; + GST_BUFFER_PTS (outbuf) = rtpqdm2depay->ptimestamp; GST_DEBUG ("Outgoing buffer timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (rtpqdm2depay->ptimestamp)); } } - gst_rtp_buffer_unmap (&rtp); return outbuf; /* ERRORS */ @@ -370,7 +369,6 @@ { GST_ELEMENT_WARNING (rtpqdm2depay, STREAM, DECODE, (NULL), ("Packet was too short")); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsbcdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsbcdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsbcdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsbcdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -25,7 +25,9 @@ #endif #include +#include #include "gstrtpsbcdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpsbcdepay_debug); #define GST_CAT_DEFAULT (rtpsbcdepay_debug) @@ -59,7 +61,7 @@ static gboolean gst_rtp_sbc_depay_setcaps (GstRTPBaseDepayload * base, GstCaps * caps); static GstBuffer *gst_rtp_sbc_depay_process (GstRTPBaseDepayload * base, - GstBuffer * in); + GstRTPBuffer * rtp); static void gst_rtp_sbc_depay_class_init (GstRtpSbcDepayClass * klass) @@ -72,7 +74,7 @@ gobject_class->finalize = gst_rtp_sbc_depay_finalize; gstbasertpdepayload_class->set_caps = gst_rtp_sbc_depay_setcaps; - gstbasertpdepayload_class->process = gst_rtp_sbc_depay_process; + gstbasertpdepayload_class->process_rtp_packet = gst_rtp_sbc_depay_process; gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_rtp_sbc_depay_src_template)); @@ -189,30 +191,27 @@ } static GstBuffer * -gst_rtp_sbc_depay_process (GstRTPBaseDepayload * base, GstBuffer * in) +gst_rtp_sbc_depay_process (GstRTPBaseDepayload * base, GstRTPBuffer * rtp) { GstRtpSbcDepay *depay = GST_RTP_SBC_DEPAY (base); GstBuffer *data = NULL; - GstRTPBuffer rtp = { NULL }; gboolean fragment, start, last; guint8 nframes; guint8 *payload; guint payload_len; - gst_rtp_buffer_map (in, GST_MAP_READ, &rtp); - GST_LOG_OBJECT (depay, "Got %" G_GSIZE_FORMAT " bytes", - gst_buffer_get_size (in)); + gst_buffer_get_size (rtp->buffer)); - if (gst_rtp_buffer_get_marker (&rtp)) { + if (gst_rtp_buffer_get_marker (rtp)) { /* Marker isn't supposed to be set */ GST_WARNING_OBJECT (depay, "Marker bit was set"); goto bad_packet; } - payload = gst_rtp_buffer_get_payload (&rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); fragment = payload[0] & 0x80; start = payload[0] & 0x40; @@ -222,7 +221,7 @@ payload += 1; payload_len -= 1; - data = gst_rtp_buffer_get_payload_subbuffer (&rtp, 1, -1); + data = gst_rtp_buffer_get_payload_subbuffer (rtp, 1, -1); if (fragment) { /* Got a packet with a fragment */ @@ -244,6 +243,8 @@ if (last) { data = gst_adapter_take_buffer (depay->adapter, gst_adapter_available (depay->adapter)); + gst_rtp_drop_meta (GST_ELEMENT_CAST (depay), data, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); } else data = NULL; @@ -270,7 +271,6 @@ } out: - gst_rtp_buffer_unmap (&rtp); return data; bad_packet: diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsbcpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsbcpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsbcpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsbcpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -23,9 +23,11 @@ #include #endif +#include #include "gstrtpsbcpay.h" #include #include +#include "gstrtputils.h" #define RTP_SBC_PAYLOAD_HEADER_SIZE 1 #define DEFAULT_MIN_FRAMES 0 @@ -160,7 +162,7 @@ GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; guint available; guint max_payload; - GstBuffer *outbuf; + GstBuffer *outbuf, *paybuf; guint8 *payload_data; guint frame_count; guint payload_length; @@ -183,8 +185,7 @@ if (payload_length == 0) /* Nothing to send */ return GST_FLOW_OK; - outbuf = gst_rtp_buffer_new_allocate (payload_length + - RTP_SBC_PAYLOAD_HEADER_SIZE, 0, 0); + outbuf = gst_rtp_buffer_new_allocate (RTP_SBC_PAYLOAD_HEADER_SIZE, 0, 0); /* get payload */ gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); @@ -197,15 +198,15 @@ memset (payload, 0, sizeof (struct rtp_payload)); payload->frame_count = frame_count; - gst_adapter_copy (sbcpay->adapter, payload_data + - RTP_SBC_PAYLOAD_HEADER_SIZE, 0, payload_length); - gst_rtp_buffer_unmap (&rtp); - gst_adapter_flush (sbcpay->adapter, payload_length); + paybuf = gst_adapter_take_buffer_fast (sbcpay->adapter, payload_length); + gst_rtp_copy_meta (GST_ELEMENT_CAST (sbcpay), outbuf, paybuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + outbuf = gst_buffer_append (outbuf, paybuf); /* FIXME: what about duration? */ - GST_BUFFER_TIMESTAMP (outbuf) = sbcpay->timestamp; + GST_BUFFER_PTS (outbuf) = sbcpay->timestamp; GST_DEBUG_OBJECT (sbcpay, "Pushing %d bytes", payload_length); return gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (sbcpay), outbuf); @@ -220,7 +221,7 @@ /* FIXME check for negotiation */ sbcpay = GST_RTP_SBC_PAY (payload); - sbcpay->timestamp = GST_BUFFER_TIMESTAMP (buffer); + sbcpay->timestamp = GST_BUFFER_PTS (buffer); gst_adapter_push (sbcpay->adapter, buffer); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsirendepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsirendepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsirendepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsirendepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,7 +26,9 @@ #include #include #include +#include #include "gstrtpsirendepay.h" +#include "gstrtputils.h" static GstStaticPadTemplate gst_rtp_siren_depay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -34,29 +36,27 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"audio\", " - "clock-rate = (int) 16000, " - "encoding-name = (string) \"SIREN\"") + "clock-rate = (int) 16000, " "encoding-name = (string) \"SIREN\"") /* This is the default, so the peer doesn't have to specify it */ /* " "dct-length = (int) 320") */ ); -static GstStaticPadTemplate gst_rtp_siren_depay_src_template = -GST_STATIC_PAD_TEMPLATE ("src", + static GstStaticPadTemplate gst_rtp_siren_depay_src_template = + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-siren, " "dct-length = (int) 320") ); -static GstBuffer *gst_rtp_siren_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); -static gboolean gst_rtp_siren_depay_setcaps (GstRTPBaseDepayload * depayload, - GstCaps * caps); + static GstBuffer *gst_rtp_siren_depay_process (GstRTPBaseDepayload * + depayload, GstRTPBuffer * rtp); + static gboolean gst_rtp_siren_depay_setcaps (GstRTPBaseDepayload * + depayload, GstCaps * caps); G_DEFINE_TYPE (GstRTPSirenDepay, gst_rtp_siren_depay, GST_TYPE_RTP_BASE_DEPAYLOAD); -static void -gst_rtp_siren_depay_class_init (GstRTPSirenDepayClass * klass) + static void gst_rtp_siren_depay_class_init (GstRTPSirenDepayClass * klass) { GstElementClass *gstelement_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class; @@ -64,7 +64,7 @@ gstelement_class = (GstElementClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; - gstrtpbasedepayload_class->process = gst_rtp_siren_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_siren_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_siren_depay_setcaps; gst_element_class_add_pad_template (gstelement_class, @@ -103,14 +103,17 @@ } static GstBuffer * -gst_rtp_siren_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_siren_depay_process (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp) { GstBuffer *outbuf; - GstRTPBuffer rtp = { NULL }; - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); + + if (outbuf) { + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpspeexdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpspeexdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpspeexdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpspeexdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include #include +#include #include "gstrtpspeexdepay.h" +#include "gstrtputils.h" /* RtpSPEEXDepay signals and args */ enum @@ -36,7 +38,7 @@ enum { - ARG_0 + PROP_0 }; static GstStaticPadTemplate gst_rtp_speex_depay_sink_template = @@ -58,7 +60,7 @@ ); static GstBuffer *gst_rtp_speex_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_speex_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); @@ -74,7 +76,7 @@ gstelement_class = (GstElementClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; - gstrtpbasedepayload_class->process = gst_rtp_speex_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_speex_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_speex_depay_setcaps; gst_element_class_add_pad_template (gstelement_class, @@ -195,24 +197,24 @@ } static GstBuffer * -gst_rtp_speex_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_speex_depay_process (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp) { GstBuffer *outbuf = NULL; - GstRTPBuffer rtp = { NULL }; - - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); GST_DEBUG ("process : got %" G_GSIZE_FORMAT " bytes, mark %d ts %u seqn %d", - gst_buffer_get_size (buf), - gst_rtp_buffer_get_marker (&rtp), - gst_rtp_buffer_get_timestamp (&rtp), gst_rtp_buffer_get_seq (&rtp)); + gst_buffer_get_size (rtp->buffer), + gst_rtp_buffer_get_marker (rtp), + gst_rtp_buffer_get_timestamp (rtp), gst_rtp_buffer_get_seq (rtp)); /* nothing special to be done */ - outbuf = gst_rtp_buffer_get_payload_buffer (&rtp); - gst_rtp_buffer_unmap (&rtp); + outbuf = gst_rtp_buffer_get_payload_buffer (rtp); - if (outbuf) + if (outbuf) { GST_BUFFER_DURATION (outbuf) = 20 * GST_MSECOND; + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), outbuf, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + } return outbuf; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpspeexpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpspeexpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpspeexpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpspeexpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include #include +#include #include "gstrtpspeexpay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpspeexpay_debug); #define GST_CAT_DEFAULT (rtpspeexpay_debug) @@ -236,13 +238,10 @@ GstBuffer * buffer) { GstRtpSPEEXPay *rtpspeexpay; - guint payload_len; GstMapInfo map; GstBuffer *outbuf; - guint8 *payload; GstClockTime timestamp, duration; GstFlowReturn ret; - GstRTPBuffer rtp = { NULL }; rtpspeexpay = GST_RTP_SPEEX_PAY (basepayload); @@ -252,53 +251,54 @@ case 0: /* ident packet. We need to parse the headers to construct the RTP * properties. */ - if (!gst_rtp_speex_pay_parse_ident (rtpspeexpay, map.data, map.size)) + if (!gst_rtp_speex_pay_parse_ident (rtpspeexpay, map.data, map.size)) { + gst_buffer_unmap (buffer, &map); goto parse_error; + } ret = GST_FLOW_OK; + gst_buffer_unmap (buffer, &map); goto done; case 1: /* comment packet, we ignore it */ ret = GST_FLOW_OK; + gst_buffer_unmap (buffer, &map); goto done; default: /* other packets go in the payload */ break; } + gst_buffer_unmap (buffer, &map); if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_GAP)) { ret = GST_FLOW_OK; goto done; } - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); duration = GST_BUFFER_DURATION (buffer); /* FIXME, only one SPEEX frame per RTP packet for now */ - payload_len = map.size; - outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); + outbuf = gst_rtp_buffer_new_allocate (0, 0, 0); /* FIXME, assert for now */ - g_assert (payload_len <= GST_RTP_BASE_PAYLOAD_MTU (rtpspeexpay)); + g_assert (gst_buffer_get_size (buffer) <= + GST_RTP_BASE_PAYLOAD_MTU (rtpspeexpay)); /* copy timestamp and duration */ - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_PTS (outbuf) = timestamp; GST_BUFFER_DURATION (outbuf) = duration; - gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); - /* get payload */ - payload = gst_rtp_buffer_get_payload (&rtp); - - /* copy data in payload */ - memcpy (&payload[0], map.data, map.size); - - gst_rtp_buffer_unmap (&rtp); + gst_rtp_copy_meta (GST_ELEMENT_CAST (basepayload), outbuf, buffer, + g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + outbuf = gst_buffer_append (outbuf, buffer); + buffer = NULL; ret = gst_rtp_base_payload_push (basepayload, outbuf); done: - gst_buffer_unmap (buffer, &map); - gst_buffer_unref (buffer); + if (buffer) + gst_buffer_unref (buffer); rtpspeexpay->packet++; @@ -309,7 +309,6 @@ { GST_ELEMENT_ERROR (rtpspeexpay, STREAM, DECODE, (NULL), ("Error parsing first identification packet.")); - gst_buffer_unmap (buffer, &map); gst_buffer_unref (buffer); return GST_FLOW_ERROR; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpstreamdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpstreamdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpstreamdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpstreamdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -64,6 +64,9 @@ static GstFlowReturn gst_rtp_stream_depay_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame, gint * skipsize); +static gboolean gst_rtp_stream_depay_sink_activate (GstPad * pad, + GstObject * parent); + static void gst_rtp_stream_depay_class_init (GstRtpStreamDepayClass * klass) { @@ -95,6 +98,11 @@ gst_rtp_stream_depay_init (GstRtpStreamDepay * self) { gst_base_parse_set_min_frame_size (GST_BASE_PARSE (self), 2); + + /* Force activation in push mode. We need to get a caps event from upstream + * to know the full RTP caps. */ + gst_pad_set_activate_function (GST_BASE_PARSE_SINK_PAD (self), + gst_rtp_stream_depay_sink_activate); } static gboolean @@ -211,6 +219,12 @@ return gst_base_parse_finish_frame (parse, frame, size + 2); } +static gboolean +gst_rtp_stream_depay_sink_activate (GstPad * pad, GstObject * parent) +{ + return gst_pad_activate_mode (pad, GST_PAD_MODE_PUSH, TRUE); +} + gboolean gst_rtp_stream_depay_plugin_init (GstPlugin * plugin) { diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsv3vdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsv3vdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpsv3vdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpsv3vdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,7 +24,9 @@ #include #include +#include #include "gstrtpsv3vdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY (rtpsv3vdepay_debug); #define GST_CAT_DEFAULT rtpsv3vdepay_debug @@ -56,7 +58,7 @@ element, GstStateChange transition); static GstBuffer *gst_rtp_sv3v_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); gboolean gst_rtp_sv3v_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps); @@ -71,7 +73,7 @@ gstelement_class = (GstElementClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass; - gstrtpbasedepayload_class->process = gst_rtp_sv3v_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_sv3v_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_sv3v_depay_setcaps; gobject_class->finalize = gst_rtp_sv3v_depay_finalize; @@ -125,7 +127,7 @@ } static GstBuffer * -gst_rtp_sv3v_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_sv3v_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) { GstRtpSV3VDepay *rtpsv3vdepay; static struct @@ -147,17 +149,15 @@ gboolean C, S, E; GstBuffer *outbuf = NULL; guint16 seq; - GstRTPBuffer rtp = { NULL }; rtpsv3vdepay = GST_RTP_SV3V_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); /* flush on sequence number gaps */ - seq = gst_rtp_buffer_get_seq (&rtp); + seq = gst_rtp_buffer_get_seq (rtp); GST_DEBUG ("timestamp %" GST_TIME_FORMAT ", sequence number:%d", - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), seq); + GST_TIME_ARGS (GST_BUFFER_PTS (rtp->buffer)), seq); if (seq != rtpsv3vdepay->nextseq) { GST_DEBUG ("Sequence discontinuity, clearing adapter"); @@ -165,13 +165,13 @@ } rtpsv3vdepay->nextseq = seq + 1; - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); if (payload_len < 3) goto bad_packet; - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); - M = gst_rtp_buffer_get_marker (&rtp); + M = gst_rtp_buffer_get_marker (rtp); /* This is all a guess: * 1 1 1 1 1 1 @@ -255,7 +255,7 @@ GST_DEBUG ("Storing incoming payload"); /* store data in adapter, stip off 2 bytes header */ - tmpbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, 2, -1); + tmpbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, 2, -1); gst_adapter_push (rtpsv3vdepay->adapter, tmpbuf); if (G_UNLIKELY (M)) { @@ -265,11 +265,12 @@ avail = gst_adapter_available (rtpsv3vdepay->adapter); GST_DEBUG ("Returning completed output buffer [%d bytes]", avail); outbuf = gst_adapter_take_buffer (rtpsv3vdepay->adapter, avail); + gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpsv3vdepay), outbuf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); } } beach: - gst_rtp_buffer_unmap (&rtp); return outbuf; /* ERRORS */ @@ -277,7 +278,6 @@ { GST_ELEMENT_WARNING (rtpsv3vdepay, STREAM, DECODE, (NULL), ("Packet was too short")); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtptheoradepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtptheoradepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtptheoradepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtptheoradepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -23,9 +23,11 @@ #include #include +#include #include #include "gstrtptheoradepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtptheoradepay_debug); #define GST_CAT_DEFAULT (rtptheoradepay_debug) @@ -66,12 +68,15 @@ static gboolean gst_rtp_theora_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_theora_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static gboolean gst_rtp_theora_depay_packet_lost (GstRTPBaseDepayload * depayload, GstEvent * event); static void gst_rtp_theora_depay_finalize (GObject * object); +static GstStateChangeReturn gst_rtp_theora_depay_change_state (GstElement * + element, GstStateChange transition); + static void gst_rtp_theora_depay_class_init (GstRtpTheoraDepayClass * klass) { @@ -85,7 +90,9 @@ gobject_class->finalize = gst_rtp_theora_depay_finalize; - gstrtpbasedepayload_class->process = gst_rtp_theora_depay_process; + gstelement_class->change_state = gst_rtp_theora_depay_change_state; + + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_theora_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_theora_depay_setcaps; gstrtpbasedepayload_class->packet_lost = gst_rtp_theora_depay_packet_lost; @@ -110,6 +117,20 @@ } static void +free_config (GstRtpTheoraConfig * config) +{ + g_list_free_full (config->headers, (GDestroyNotify) gst_buffer_unref); + g_free (config); +} + +static void +free_indents (GstRtpTheoraDepay * rtptheoradepay) +{ + g_list_free_full (rtptheoradepay->configs, (GDestroyNotify) free_config); + rtptheoradepay->configs = NULL; +} + +static void gst_rtp_theora_depay_finalize (GObject * object) { GstRtpTheoraDepay *rtptheoradepay = GST_RTP_THEORA_DEPAY (object); @@ -242,6 +263,7 @@ h_size = h_sizes[j]; if (size < h_size) { if (j != n_headers || size + extra != h_size) { + free_config (conf); goto too_small; } else { /* otherwise means that overall length field contained total length, @@ -253,8 +275,9 @@ GST_DEBUG_OBJECT (rtptheoradepay, "reading header %d, size %u", j, h_size); - buf = gst_buffer_new_and_alloc (h_size); - gst_buffer_fill (buf, 0, data, h_size); + buf = + gst_buffer_copy_region (confbuf, GST_BUFFER_COPY_ALL, data - map.data, + h_size); conf->headers = g_list_append (conf->headers, buf); data += h_size; size -= h_size; @@ -263,6 +286,8 @@ } gst_buffer_unmap (confbuf, &map); + gst_buffer_unref (confbuf); + return TRUE; /* ERRORS */ @@ -270,6 +295,7 @@ { GST_DEBUG_OBJECT (rtptheoradepay, "configuration too small"); gst_buffer_unmap (confbuf, &map); + gst_buffer_unref (confbuf); return FALSE; } } @@ -388,23 +414,23 @@ } static GstBuffer * -gst_rtp_theora_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_theora_depay_process (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp) { GstRtpTheoraDepay *rtptheoradepay; GstBuffer *outbuf; GstFlowReturn ret; gint payload_len; - guint8 *payload, *to_free = NULL; + GstMapInfo map; + GstBuffer *payload_buffer = NULL; + guint8 *payload; guint32 header, ident; guint8 F, TDT, packets; - GstRTPBuffer rtp = { NULL }; guint length; rtptheoradepay = GST_RTP_THEORA_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); GST_DEBUG_OBJECT (depayload, "got RTP packet of size %d", payload_len); @@ -412,7 +438,7 @@ if (G_UNLIKELY (payload_len < 4)) goto packet_short; - payload = gst_rtp_buffer_get_payload (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); header = GST_READ_UINT32_BE (payload); /* @@ -455,14 +481,9 @@ } } - /* skip header */ - payload += 4; - payload_len -= 4; - /* fragmented packets, assemble */ if (F != 0) { GstBuffer *vdata; - guint headerskip; if (F == 1) { /* if we start a packet, clear adapter and start assembling. */ @@ -474,10 +495,8 @@ if (!rtptheoradepay->assembling) goto no_output; - /* first assembled packet, reuse 2 bytes to store the length */ - headerskip = (F == 1 ? 4 : 6); /* skip header and length. */ - vdata = gst_rtp_buffer_get_payload_subbuffer (&rtp, headerskip, -1); + vdata = gst_rtp_buffer_get_payload_subbuffer (rtp, 6, -1); GST_DEBUG_OBJECT (depayload, "assemble theora packet"); gst_adapter_push (rtptheoradepay->adapter, vdata); @@ -487,20 +506,19 @@ goto no_output; /* construct assembled buffer */ - payload_len = gst_adapter_available (rtptheoradepay->adapter); - payload = gst_adapter_take (rtptheoradepay->adapter, payload_len); - - /* use this length */ - length = payload_len - 2; - - to_free = payload; + length = gst_adapter_available (rtptheoradepay->adapter); + payload_buffer = gst_adapter_take_buffer (rtptheoradepay->adapter, length); } else { - /* read length from data */ length = 0; + payload_buffer = gst_rtp_buffer_get_payload_subbuffer (rtp, 4, -1); } GST_DEBUG_OBJECT (depayload, "assemble done, payload_len %d", payload_len); + gst_buffer_map (payload_buffer, &map, GST_MAP_READ); + payload = map.data; + payload_len = map.size; + /* we not assembling anymore now */ rtptheoradepay->assembling = FALSE; gst_adapter_clear (rtptheoradepay->adapter); @@ -521,11 +539,15 @@ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* */ while (payload_len >= 2) { - if (length == 0) + /* If length is not 0, we have a reassembled packet for which we + * calculated the length already and don't have to skip over the + * length field anymore + */ + if (length == 0) { length = GST_READ_UINT16_BE (payload); - - payload += 2; - payload_len -= 2; + payload += 2; + payload_len -= 2; + } GST_DEBUG_OBJECT (depayload, "read length %u, avail: %d", length, payload_len); @@ -544,15 +566,9 @@ } /* create buffer for packet */ - if (G_UNLIKELY (to_free)) { - outbuf = - gst_buffer_new_wrapped_full (0, to_free, (payload - to_free) + length, - payload - to_free, length, to_free, g_free); - to_free = NULL; - } else { - outbuf = gst_buffer_new_and_alloc (length); - gst_buffer_fill (outbuf, 0, payload, length); - } + outbuf = + gst_buffer_copy_region (payload_buffer, GST_BUFFER_COPY_ALL, + payload - map.data, length); if (payload_len > 0 && (payload[0] & 0xC0) == 0x0) { rtptheoradepay->needs_keyframe = FALSE; @@ -576,8 +592,11 @@ out: no_output: - gst_rtp_buffer_unmap (&rtp); - g_free (to_free); + if (payload_buffer) { + gst_buffer_unmap (payload_buffer, &map); + gst_buffer_unref (payload_buffer); + } + return NULL; /* ERORRS */ @@ -629,6 +648,38 @@ } } +static GstStateChangeReturn +gst_rtp_theora_depay_change_state (GstElement * element, + GstStateChange transition) +{ + GstRtpTheoraDepay *rtptheoradepay; + GstStateChangeReturn ret; + + rtptheoradepay = GST_RTP_THEORA_DEPAY (element); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + free_indents (rtptheoradepay); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + return ret; +} + gboolean gst_rtp_theora_depay_plugin_init (GstPlugin * plugin) { diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtptheorapay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtptheorapay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtptheorapay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtptheorapay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,9 +24,11 @@ #include #include +#include #include "fnv1hash.h" #include "gstrtptheorapay.h" +#include "gstrtputils.h" #define THEORA_ID_LEN 42 @@ -151,17 +153,17 @@ if (rtptheorapay->packet) gst_buffer_unref (rtptheorapay->packet); rtptheorapay->packet = NULL; + g_list_free_full (rtptheorapay->packet_buffers, + (GDestroyNotify) gst_buffer_unref); + rtptheorapay->packet_buffers = NULL; } static void gst_rtp_theora_pay_cleanup (GstRtpTheoraPay * rtptheorapay) { - g_list_foreach (rtptheorapay->headers, (GFunc) gst_mini_object_unref, NULL); - g_list_free (rtptheorapay->headers); - rtptheorapay->headers = NULL; - gst_rtp_theora_pay_clear_packet (rtptheorapay); - + g_list_free_full (rtptheorapay->headers, (GDestroyNotify) gst_buffer_unref); + rtptheorapay->headers = NULL; if (rtptheorapay->config_data) g_free (rtptheorapay->config_data); rtptheorapay->config_data = NULL; @@ -276,8 +278,7 @@ { GST_DEBUG_OBJECT (rtptheorapay, "starting new packet, TDT: %d", TDT); - if (rtptheorapay->packet) - gst_buffer_unref (rtptheorapay->packet); + gst_rtp_theora_pay_clear_packet (rtptheorapay); /* new packet allocate max packet size */ rtptheorapay->packet = @@ -285,7 +286,7 @@ (rtptheorapay), 0, 0); gst_rtp_theora_pay_reset_packet (rtptheorapay, TDT); - GST_BUFFER_TIMESTAMP (rtptheorapay->packet) = timestamp; + GST_BUFFER_PTS (rtptheorapay->packet) = timestamp; } static GstFlowReturn @@ -295,6 +296,7 @@ guint8 *payload; guint hlen; GstRTPBuffer rtp = { NULL }; + GList *l; /* check for empty packet */ if (!rtptheorapay->packet || rtptheorapay->payload_pos <= 4) @@ -332,6 +334,15 @@ GST_BUFFER_DURATION (rtptheorapay->packet) = rtptheorapay->payload_duration; + for (l = g_list_last (rtptheorapay->packet_buffers); l; l = l->prev) { + GstBuffer *buf = GST_BUFFER_CAST (l->data); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtptheorapay), rtptheorapay->packet, + buf, g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + gst_buffer_unref (buf); + } + g_list_free (rtptheorapay->packet_buffers); + rtptheorapay->packet_buffers = NULL; + /* push, this gives away our ref to the packet, so clear it. */ ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtptheorapay), @@ -351,6 +362,7 @@ guint8 *data, *config; guint32 ident; gboolean res; + const gchar *sampling = NULL; GST_DEBUG_OBJECT (rtptheorapay, "finish headers"); @@ -497,10 +509,7 @@ gst_buffer_extract (buf, 0, data, gst_buffer_get_size (buf)); data += gst_buffer_get_size (buf); - gst_buffer_unref (buf); } - g_list_free (rtptheorapay->headers); - rtptheorapay->headers = NULL; rtptheorapay->need_headers = FALSE; /* serialize to base64 */ @@ -518,13 +527,27 @@ g_free (config); /* configure payloader settings */ + switch (rtptheorapay->pixel_format) { + case 2: + sampling = "YCbCr-4:2:2"; + break; + case 3: + sampling = "YCbCr-4:4:4"; + break; + case 0: + default: + sampling = "YCbCr-4:2:0"; + break; + } + + wstr = g_strdup_printf ("%d", rtptheorapay->width); hstr = g_strdup_printf ("%d", rtptheorapay->height); gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "THEORA", 90000); res = gst_rtp_base_payload_set_outcaps (basepayload, "sampling", G_TYPE_STRING, - "YCbCr-4:2:0", "width", G_TYPE_STRING, wstr, "height", G_TYPE_STRING, + sampling, "width", G_TYPE_STRING, wstr, "height", G_TYPE_STRING, hstr, "configuration", G_TYPE_STRING, configuration, "delivery-method", G_TYPE_STRING, "inline", /* don't set the other defaults @@ -549,7 +572,7 @@ guint size) { GstRtpTheoraPay *rtptheorapay; - gint width, height; + gint width, height, pixel_format; rtptheorapay = GST_RTP_THEORA_PAY (basepayload); @@ -569,11 +592,12 @@ width = GST_READ_UINT16_BE (data) << 4; data += 2; height = GST_READ_UINT16_BE (data) << 4; - data += 2; + data += 29; - /* FIXME, parse pixel format */ + pixel_format = (GST_READ_UINT8 (data) >> 3) & 0x03; /* store values */ + rtptheorapay->pixel_format = pixel_format; rtptheorapay->width = width; rtptheorapay->height = height; @@ -603,8 +627,8 @@ static GstFlowReturn gst_rtp_theora_pay_payload_buffer (GstRtpTheoraPay * rtptheorapay, guint8 TDT, - guint8 * data, guint size, GstClockTime timestamp, GstClockTime duration, - guint not_in_length) + GstBuffer * buffer, guint8 * data, guint size, GstClockTime timestamp, + GstClockTime duration, guint not_in_length) { GstFlowReturn ret = GST_FLOW_OK; guint newsize; @@ -635,6 +659,9 @@ if (flush) ret = gst_rtp_theora_pay_flush_packet (rtptheorapay); + if (ret != GST_FLOW_OK) + goto done; + /* create new packet if we must */ if (!rtptheorapay->packet) { gst_rtp_theora_pay_init_packet (rtptheorapay, TDT, timestamp); @@ -658,6 +685,21 @@ if (plen) memcpy (&ppos[2], data, plen); + if (buffer) { + if (!rtptheorapay->packet_buffers + || rtptheorapay->packet_buffers->data != (gpointer) buffer) + rtptheorapay->packet_buffers = + g_list_prepend (rtptheorapay->packet_buffers, + gst_buffer_ref (buffer)); + } else { + GList *l; + + for (l = rtptheorapay->headers; l; l = l->next) + rtptheorapay->packet_buffers = + g_list_prepend (rtptheorapay->packet_buffers, + gst_buffer_ref (l->data)); + } + /* only first (only) configuration cuts length field */ /* NOTE: spec (if any) is not clear on this ... */ not_in_length = 0; @@ -704,10 +746,11 @@ if (duration != GST_CLOCK_TIME_NONE) rtptheorapay->payload_duration += duration; } - } while (size); + } while (size && ret == GST_FLOW_OK); if (rtp.buffer) gst_rtp_buffer_unmap (&rtp); +done: return ret; } @@ -731,7 +774,7 @@ data = map.data; size = map.size; duration = GST_BUFFER_DURATION (buffer); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); GST_DEBUG_OBJECT (rtptheorapay, "size %" G_GSIZE_FORMAT ", duration %" GST_TIME_FORMAT, size, GST_TIME_ARGS (duration)); @@ -770,15 +813,9 @@ rtptheorapay->headers = g_list_append (rtptheorapay->headers, buffer); ret = GST_FLOW_OK; goto done; - } else if (rtptheorapay->headers) { - if (rtptheorapay->need_headers) { - if (!gst_rtp_theora_pay_finish_headers (basepayload)) - goto header_error; - } else { - g_list_free_full (rtptheorapay->headers, - (GDestroyNotify) gst_buffer_unref); - rtptheorapay->headers = NULL; - } + } else if (rtptheorapay->headers && rtptheorapay->need_headers) { + if (!gst_rtp_theora_pay_finish_headers (basepayload)) + goto header_error; } /* there is a config request, see if we need to insert it */ @@ -819,7 +856,7 @@ /* we need to send config now first */ /* different TDT type forces flush */ gst_rtp_theora_pay_payload_buffer (rtptheorapay, 1, - rtptheorapay->config_data, rtptheorapay->config_size, + NULL, rtptheorapay->config_data, rtptheorapay->config_size, timestamp, GST_CLOCK_TIME_NONE, rtptheorapay->config_extra_len); if (timestamp != -1) { @@ -828,7 +865,8 @@ } } - ret = gst_rtp_theora_pay_payload_buffer (rtptheorapay, TDT, data, size, + ret = + gst_rtp_theora_pay_payload_buffer (rtptheorapay, TDT, buffer, data, size, timestamp, duration, 0); gst_buffer_unmap (buffer, &map); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtptheorapay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtptheorapay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtptheorapay.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtptheorapay.h 2015-10-22 08:02:54.000000000 +0000 @@ -50,6 +50,7 @@ /* queues of buffers along with some stats. */ GstBuffer *packet; + GList *packet_buffers; guint payload_pos; guint payload_left; guint32 payload_ident; @@ -66,6 +67,7 @@ guint config_interval; GstClockTime last_config; + gint pixel_format; gint width; gint height; }; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtputils.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtputils.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtputils.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtputils.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,97 @@ +/* GStreamer + * Copyright (C) 2015 Sebastian Dröge + * + * 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. + */ + +#include "gstrtputils.h" + +typedef struct +{ + GstElement *element; + GstBuffer *outbuf; + GQuark copy_tag; +} CopyMetaData; + +static gboolean +foreach_metadata_copy (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) +{ + CopyMetaData *data = user_data; + GstElement *element = data->element; + GstBuffer *outbuf = data->outbuf; + GQuark copy_tag = data->copy_tag; + const GstMetaInfo *info = (*meta)->info; + const gchar *const *tags = gst_meta_api_type_get_tags (info->api); + + if (!tags || (copy_tag != 0 && g_strv_length ((gchar **) tags) == 1 + && gst_meta_api_type_has_tag (info->api, copy_tag))) { + GstMetaTransformCopy copy_data = { FALSE, 0, -1 }; + GST_DEBUG_OBJECT (element, "copy metadata %s", g_type_name (info->api)); + /* simply copy then */ + info->transform_func (outbuf, *meta, inbuf, + _gst_meta_transform_copy, ©_data); + } else { + GST_DEBUG_OBJECT (element, "not copying metadata %s", + g_type_name (info->api)); + } + + return TRUE; +} + +/* TODO: Should probably make copy_tag an array at some point */ +void +gst_rtp_copy_meta (GstElement * element, GstBuffer * outbuf, GstBuffer * inbuf, + GQuark copy_tag) +{ + CopyMetaData data = { element, outbuf, copy_tag }; + + gst_buffer_foreach_meta (inbuf, foreach_metadata_copy, &data); +} + +typedef struct +{ + GstElement *element; + GQuark keep_tag; +} DropMetaData; + +static gboolean +foreach_metadata_drop (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) +{ + DropMetaData *data = user_data; + GstElement *element = data->element; + GQuark keep_tag = data->keep_tag; + const GstMetaInfo *info = (*meta)->info; + const gchar *const *tags = gst_meta_api_type_get_tags (info->api); + + if (!tags || (keep_tag != 0 && g_strv_length ((gchar **) tags) == 1 + && gst_meta_api_type_has_tag (info->api, keep_tag))) { + GST_DEBUG_OBJECT (element, "keeping metadata %s", g_type_name (info->api)); + } else { + GST_DEBUG_OBJECT (element, "dropping metadata %s", g_type_name (info->api)); + *meta = NULL; + } + + return TRUE; +} + +/* TODO: Should probably make keep_tag an array at some point */ +void +gst_rtp_drop_meta (GstElement * element, GstBuffer * buf, GQuark keep_tag) +{ + DropMetaData data = { element, keep_tag }; + + gst_buffer_foreach_meta (buf, foreach_metadata_drop, &data); +} diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtputils.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtputils.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtputils.h 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtputils.h 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,33 @@ +/* GStreamer + * Copyright (C) 2015 Sebastian Dröge + * + * 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_RTP_UTILS_H__ +#define __GST_RTP_UTILS_H__ + +#include + +G_BEGIN_DECLS + +void gst_rtp_copy_meta (GstElement * element, GstBuffer *outbuf, GstBuffer *inbuf, GQuark copy_tag); +void gst_rtp_drop_meta (GstElement * element, GstBuffer *buf, GQuark keep_tag); + + +G_END_DECLS + +#endif /* __GST_RTP_UTILS_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvorbisdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvorbisdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvorbisdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvorbisdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -23,9 +23,11 @@ #include #include +#include #include #include "gstrtpvorbisdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpvorbisdepay_debug); #define GST_CAT_DEFAULT (rtpvorbisdepay_debug) @@ -63,7 +65,7 @@ static gboolean gst_rtp_vorbis_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); static GstBuffer *gst_rtp_vorbis_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); + GstRTPBuffer * rtp); static void gst_rtp_vorbis_depay_finalize (GObject * object); @@ -85,7 +87,7 @@ gstelement_class->change_state = gst_rtp_vorbis_depay_change_state; - gstrtpbasedepayload_class->process = gst_rtp_vorbis_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_vorbis_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_vorbis_depay_setcaps; gst_element_class_add_pad_template (gstelement_class, @@ -111,26 +113,14 @@ static void free_config (GstRtpVorbisConfig * conf) { - GList *headers; - - for (headers = conf->headers; headers; headers = g_list_next (headers)) { - GstBuffer *header = GST_BUFFER_CAST (headers->data); - - gst_buffer_unref (header); - } - g_list_free (conf->headers); + g_list_free_full (conf->headers, (GDestroyNotify) gst_buffer_unref); g_free (conf); } static void free_indents (GstRtpVorbisDepay * rtpvorbisdepay) { - GList *walk; - - for (walk = rtpvorbisdepay->configs; walk; walk = g_list_next (walk)) { - free_config ((GstRtpVorbisConfig *) walk->data); - } - g_list_free (rtpvorbisdepay->configs); + g_list_free_full (rtpvorbisdepay->configs, (GDestroyNotify) free_config); rtpvorbisdepay->configs = NULL; } @@ -288,7 +278,7 @@ GST_DEBUG_OBJECT (rtpvorbisdepay, "reading header %d, size %u", j, h_size); - buf = gst_buffer_copy_region (confbuf, GST_BUFFER_COPY_MEMORY, offset, + buf = gst_buffer_copy_region (confbuf, GST_BUFFER_COPY_ALL, offset, h_size); conf->headers = g_list_append (conf->headers, buf); offset += h_size; @@ -436,23 +426,23 @@ } static GstBuffer * -gst_rtp_vorbis_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_vorbis_depay_process (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp) { GstRtpVorbisDepay *rtpvorbisdepay; GstBuffer *outbuf; GstFlowReturn ret; gint payload_len; - guint8 *payload, *to_free = NULL; + GstBuffer *payload_buffer = NULL; + guint8 *payload; + GstMapInfo map; guint32 header, ident; guint8 F, VDT, packets; - GstRTPBuffer rtp = { NULL }; guint length; rtpvorbisdepay = GST_RTP_VORBIS_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); GST_DEBUG_OBJECT (depayload, "got RTP packet of size %d", payload_len); @@ -460,8 +450,7 @@ if (G_UNLIKELY (payload_len < 4)) goto packet_short; - payload = gst_rtp_buffer_get_payload (&rtp); - + payload = gst_rtp_buffer_get_payload (rtp); header = GST_READ_UINT32_BE (payload); /* * 0 1 2 3 @@ -503,17 +492,12 @@ } } - /* skip header */ - payload += 4; - payload_len -= 4; - GST_DEBUG_OBJECT (depayload, "ident: %u, F: %d, VDT: %d, packets: %d", ident, F, VDT, packets); /* fragmented packets, assemble */ if (F != 0) { GstBuffer *vdata; - guint headerskip; if (F == 1) { /* if we start a packet, clear adapter and start assembling. */ @@ -525,10 +509,8 @@ if (!rtpvorbisdepay->assembling) goto no_output; - /* first assembled packet, reuse 2 bytes to store the length */ - headerskip = (F == 1 ? 4 : 6); /* skip header and length. */ - vdata = gst_rtp_buffer_get_payload_subbuffer (&rtp, headerskip, -1); + vdata = gst_rtp_buffer_get_payload_subbuffer (rtp, 6, -1); GST_DEBUG_OBJECT (depayload, "assemble vorbis packet"); gst_adapter_push (rtpvorbisdepay->adapter, vdata); @@ -538,20 +520,19 @@ goto no_output; /* construct assembled buffer */ - payload_len = gst_adapter_available (rtpvorbisdepay->adapter); - payload = gst_adapter_take (rtpvorbisdepay->adapter, payload_len); - - /* use this length */ - length = payload_len - 2; - - to_free = payload; + length = gst_adapter_available (rtpvorbisdepay->adapter); + payload_buffer = gst_adapter_take_buffer (rtpvorbisdepay->adapter, length); } else { - /* read length from data */ + payload_buffer = gst_rtp_buffer_get_payload_subbuffer (rtp, 4, -1); length = 0; } GST_DEBUG_OBJECT (depayload, "assemble done"); + gst_buffer_map (payload_buffer, &map, GST_MAP_READ); + payload = map.data; + payload_len = map.size; + /* we not assembling anymore now */ rtpvorbisdepay->assembling = FALSE; gst_adapter_clear (rtpvorbisdepay->adapter); @@ -572,11 +553,15 @@ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* */ while (payload_len > 2) { - if (length == 0) + /* If length is not 0, we have a reassembled packet for which we + * calculated the length already and don't have to skip over the + * length field anymore + */ + if (length == 0) { length = GST_READ_UINT16_BE (payload); - - payload += 2; - payload_len -= 2; + payload += 2; + payload_len -= 2; + } GST_DEBUG_OBJECT (depayload, "read length %u, avail: %d", length, payload_len); @@ -595,17 +580,9 @@ } /* create buffer for packet */ - if (G_UNLIKELY (to_free)) { - outbuf = gst_buffer_new (); - gst_buffer_append_memory (outbuf, - gst_memory_new_wrapped (0, to_free, - (payload - to_free) + length, payload - to_free, length, to_free, - g_free)); - to_free = NULL; - } else { - outbuf = gst_buffer_new_and_alloc (length); - gst_buffer_fill (outbuf, 0, payload, length); - } + outbuf = + gst_buffer_copy_region (payload_buffer, GST_BUFFER_COPY_ALL, + payload - map.data, length); payload += length; payload_len -= length; @@ -617,15 +594,17 @@ break; } - g_free (to_free); - - gst_rtp_buffer_unmap (&rtp); + gst_buffer_unmap (payload_buffer, &map); + gst_buffer_unref (payload_buffer); return NULL; no_output: { - gst_rtp_buffer_unmap (&rtp); + if (payload_buffer) { + gst_buffer_unmap (payload_buffer, &map); + gst_buffer_unref (payload_buffer); + } return NULL; } /* ERORRS */ @@ -633,27 +612,35 @@ { GST_ELEMENT_WARNING (rtpvorbisdepay, STREAM, DECODE, (NULL), ("Could not switch codebooks")); - gst_rtp_buffer_unmap (&rtp); + if (payload_buffer) { + gst_buffer_unmap (payload_buffer, &map); + gst_buffer_unref (payload_buffer); + } return NULL; } packet_short: { GST_ELEMENT_WARNING (rtpvorbisdepay, STREAM, DECODE, (NULL), ("Packet was too short (%d < 4)", payload_len)); - gst_rtp_buffer_unmap (&rtp); + if (payload_buffer) { + gst_buffer_unmap (payload_buffer, &map); + gst_buffer_unref (payload_buffer); + } return NULL; } ignore_reserved: { GST_WARNING_OBJECT (rtpvorbisdepay, "reserved VDT ignored"); - gst_rtp_buffer_unmap (&rtp); return NULL; } length_short: { GST_ELEMENT_WARNING (rtpvorbisdepay, STREAM, DECODE, (NULL), ("Packet contains invalid data")); - gst_rtp_buffer_unmap (&rtp); + if (payload_buffer) { + gst_buffer_unmap (payload_buffer, &map); + gst_buffer_unref (payload_buffer); + } return NULL; } invalid_configuration: @@ -661,7 +648,10 @@ /* fatal, as we otherwise risk carrying on without output */ GST_ELEMENT_ERROR (rtpvorbisdepay, STREAM, DECODE, (NULL), ("Packet contains invalid configuration")); - gst_rtp_buffer_unmap (&rtp); + if (payload_buffer) { + gst_buffer_unmap (payload_buffer, &map); + gst_buffer_unref (payload_buffer); + } return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvorbispay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvorbispay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvorbispay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvorbispay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,9 +24,11 @@ #include #include +#include #include "fnv1hash.h" #include "gstrtpvorbispay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpvorbispay_debug); #define GST_CAT_DEFAULT (rtpvorbispay_debug) @@ -114,10 +116,10 @@ gst_static_pad_template_get (&gst_rtp_vorbis_pay_sink_template)); gst_element_class_set_static_metadata (gstelement_class, - "RTP Vorbis depayloader", + "RTP Vorbis payloader", "Codec/Payloader/Network/RTP", "Payload-encode Vorbis audio into RTP packets (RFC 5215)", - "Wim Taymans "); + "Wim Taymans "); GST_DEBUG_CATEGORY_INIT (rtpvorbispay_debug, "rtpvorbispay", 0, "Vorbis RTP Payloader"); @@ -143,17 +145,17 @@ if (rtpvorbispay->packet) gst_buffer_unref (rtpvorbispay->packet); rtpvorbispay->packet = NULL; + g_list_free_full (rtpvorbispay->packet_buffers, + (GDestroyNotify) gst_buffer_unref); + rtpvorbispay->packet_buffers = NULL; } static void gst_rtp_vorbis_pay_cleanup (GstRtpVorbisPay * rtpvorbispay) { - g_list_foreach (rtpvorbispay->headers, (GFunc) gst_mini_object_unref, NULL); - g_list_free (rtpvorbispay->headers); - rtpvorbispay->headers = NULL; - gst_rtp_vorbis_pay_clear_packet (rtpvorbispay); - + g_list_free_full (rtpvorbispay->headers, (GDestroyNotify) gst_buffer_unref); + rtpvorbispay->headers = NULL; if (rtpvorbispay->config_data) g_free (rtpvorbispay->config_data); rtpvorbispay->config_data = NULL; @@ -271,8 +273,7 @@ { GST_LOG_OBJECT (rtpvorbispay, "starting new packet, VDT: %d", VDT); - if (rtpvorbispay->packet) - gst_buffer_unref (rtpvorbispay->packet); + gst_rtp_vorbis_pay_clear_packet (rtpvorbispay); /* new packet allocate max packet size */ rtpvorbispay->packet = @@ -280,7 +281,7 @@ (rtpvorbispay), 0, 0); gst_rtp_vorbis_pay_reset_packet (rtpvorbispay, VDT); - GST_BUFFER_TIMESTAMP (rtpvorbispay->packet) = timestamp; + GST_BUFFER_PTS (rtpvorbispay->packet) = timestamp; } static GstFlowReturn @@ -290,6 +291,7 @@ guint8 *payload; guint hlen; GstRTPBuffer rtp = { NULL }; + GList *l; /* check for empty packet */ if (!rtpvorbispay->packet || rtpvorbispay->payload_pos <= 4) @@ -327,6 +329,15 @@ GST_BUFFER_DURATION (rtpvorbispay->packet) = rtpvorbispay->payload_duration; + for (l = g_list_last (rtpvorbispay->packet_buffers); l; l = l->prev) { + GstBuffer *buf = GST_BUFFER_CAST (l->data); + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpvorbispay), rtpvorbispay->packet, + buf, g_quark_from_static_string (GST_META_TAG_AUDIO_STR)); + gst_buffer_unref (buf); + } + g_list_free (rtpvorbispay->packet_buffers); + rtpvorbispay->packet_buffers = NULL; + /* push, this gives away our ref to the packet, so clear it. */ ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpvorbispay), @@ -490,10 +501,7 @@ gst_buffer_extract (buf, 0, data, gst_buffer_get_size (buf)); data += gst_buffer_get_size (buf); - gst_buffer_unref (buf); } - g_list_free (rtpvorbispay->headers); - rtpvorbispay->headers = NULL; rtpvorbispay->need_headers = FALSE; /* serialize to base64 */ @@ -597,8 +605,8 @@ static GstFlowReturn gst_rtp_vorbis_pay_payload_buffer (GstRtpVorbisPay * rtpvorbispay, guint8 VDT, - guint8 * data, guint size, GstClockTime timestamp, GstClockTime duration, - guint not_in_length) + GstBuffer * buffer, guint8 * data, guint size, GstClockTime timestamp, + GstClockTime duration, guint not_in_length) { GstFlowReturn ret = GST_FLOW_OK; guint newsize; @@ -629,6 +637,9 @@ if (flush) ret = gst_rtp_vorbis_pay_flush_packet (rtpvorbispay); + if (ret != GST_FLOW_OK) + goto done; + /* create new packet if we must */ if (!rtpvorbispay->packet) { gst_rtp_vorbis_pay_init_packet (rtpvorbispay, VDT, timestamp); @@ -652,6 +663,21 @@ if (plen) memcpy (&ppos[2], data, plen); + if (buffer) { + if (!rtpvorbispay->packet_buffers + || rtpvorbispay->packet_buffers->data != (gpointer) buffer) + rtpvorbispay->packet_buffers = + g_list_prepend (rtpvorbispay->packet_buffers, + gst_buffer_ref (buffer)); + } else { + GList *l; + + for (l = rtpvorbispay->headers; l; l = l->next) + rtpvorbispay->packet_buffers = + g_list_prepend (rtpvorbispay->packet_buffers, + gst_buffer_ref (l->data)); + } + /* only first (only) configuration cuts length field */ /* NOTE: spec (if any) is not clear on this ... */ not_in_length = 0; @@ -698,11 +724,13 @@ if (duration != GST_CLOCK_TIME_NONE) rtpvorbispay->payload_duration += duration; } - } while (size); + } while (size && ret == GST_FLOW_OK); if (rtp.buffer) gst_rtp_buffer_unmap (&rtp); +done: + return ret; } @@ -724,7 +752,7 @@ data = map.data; size = map.size; duration = GST_BUFFER_DURATION (buffer); - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); GST_LOG_OBJECT (rtpvorbispay, "size %" G_GSIZE_FORMAT ", duration %" GST_TIME_FORMAT, size, GST_TIME_ARGS (duration)); @@ -760,15 +788,9 @@ rtpvorbispay->headers = g_list_append (rtpvorbispay->headers, buffer); ret = GST_FLOW_OK; goto done; - } else if (rtpvorbispay->headers) { - if (rtpvorbispay->need_headers) { - if (!gst_rtp_vorbis_pay_finish_headers (basepayload)) - goto header_error; - } else { - g_list_free_full (rtpvorbispay->headers, - (GDestroyNotify) gst_buffer_unref); - rtpvorbispay->headers = NULL; - } + } else if (rtpvorbispay->headers && rtpvorbispay->need_headers) { + if (!gst_rtp_vorbis_pay_finish_headers (basepayload)) + goto header_error; } /* there is a config request, see if we need to insert it */ @@ -808,7 +830,7 @@ /* we need to send config now first */ /* different TDT type forces flush */ gst_rtp_vorbis_pay_payload_buffer (rtpvorbispay, 1, - rtpvorbispay->config_data, rtpvorbispay->config_size, + NULL, rtpvorbispay->config_data, rtpvorbispay->config_size, timestamp, GST_CLOCK_TIME_NONE, rtpvorbispay->config_extra_len); if (timestamp != -1) { @@ -817,7 +839,8 @@ } } - ret = gst_rtp_vorbis_pay_payload_buffer (rtpvorbispay, VDT, data, size, + ret = + gst_rtp_vorbis_pay_payload_buffer (rtpvorbispay, VDT, buffer, data, size, timestamp, duration, 0); gst_buffer_unmap (buffer, &map); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvorbispay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvorbispay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvorbispay.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvorbispay.h 2015-10-22 08:02:54.000000000 +0000 @@ -50,6 +50,7 @@ /* queues of buffers along with some stats. */ GstBuffer *packet; + GList *packet_buffers; guint payload_pos; guint payload_left; guint32 payload_ident; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvp8depay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvp8depay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvp8depay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvp8depay.c 2015-10-22 08:02:54.000000000 +0000 @@ -23,15 +23,22 @@ #endif #include "gstrtpvp8depay.h" +#include "gstrtputils.h" + +#include + +#include GST_DEBUG_CATEGORY_STATIC (gst_rtp_vp8_depay_debug); #define GST_CAT_DEFAULT gst_rtp_vp8_depay_debug static void gst_rtp_vp8_depay_dispose (GObject * object); static GstBuffer *gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); -static gboolean gst_rtp_vp8_depay_set_caps (GstRTPBaseDepayload * depayload, - GstCaps * caps); + GstRTPBuffer * rtp); +static GstStateChangeReturn gst_rtp_vp8_depay_change_state (GstElement * + element, GstStateChange transition); +static gboolean gst_rtp_vp8_depay_handle_event (GstRTPBaseDepayload * depay, + GstEvent * event); G_DEFINE_TYPE (GstRtpVP8Depay, gst_rtp_vp8_depay, GST_TYPE_RTP_BASE_DEPAYLOAD); @@ -48,7 +55,7 @@ GST_STATIC_CAPS ("application/x-rtp, " "clock-rate = (int) 90000," "media = (string) \"video\"," - "encoding-name = (string) \"VP8-DRAFT-IETF-01\"")); + "encoding-name = (string) { \"VP8\", \"VP8-DRAFT-IETF-01\" }")); static void gst_rtp_vp8_depay_init (GstRtpVP8Depay * self) @@ -78,8 +85,10 @@ object_class->dispose = gst_rtp_vp8_depay_dispose; - depay_class->process = gst_rtp_vp8_depay_process; - depay_class->set_caps = gst_rtp_vp8_depay_set_caps; + element_class->change_state = gst_rtp_vp8_depay_change_state; + + depay_class->process_rtp_packet = gst_rtp_vp8_depay_process; + depay_class->handle_event = gst_rtp_vp8_depay_handle_event; GST_DEBUG_CATEGORY_INIT (gst_rtp_vp8_depay_debug, "rtpvp8depay", 0, "VP8 Video RTP Depayloader"); @@ -101,34 +110,32 @@ } static GstBuffer * -gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depay, GstBuffer * buf) +gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depay, GstRTPBuffer * rtp) { GstRtpVP8Depay *self = GST_RTP_VP8_DEPAY (depay); GstBuffer *payload; guint8 *data; guint hdrsize; guint size; - GstRTPBuffer rtpbuffer = GST_RTP_BUFFER_INIT; - if (G_UNLIKELY (GST_BUFFER_IS_DISCONT (buf))) { + if (G_UNLIKELY (GST_BUFFER_IS_DISCONT (rtp->buffer))) { GST_LOG_OBJECT (self, "Discontinuity, flushing adapter"); gst_adapter_clear (self->adapter); self->started = FALSE; } - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuffer); - size = gst_rtp_buffer_get_payload_len (&rtpbuffer); + size = gst_rtp_buffer_get_payload_len (rtp); /* At least one header and one vp8 byte */ if (G_UNLIKELY (size < 2)) goto too_small; - data = gst_rtp_buffer_get_payload (&rtpbuffer); + data = gst_rtp_buffer_get_payload (rtp); if (G_UNLIKELY (!self->started)) { /* Check if this is the start of a VP8 frame, otherwise bail */ /* S=1 and PartID= 0 */ - if ((data[0] & 0x1F) != 0x10) + if ((data[0] & 0x17) != 0x10) goto done; self->started = TRUE; @@ -159,34 +166,74 @@ if (G_UNLIKELY (hdrsize >= size)) goto too_small; - payload = gst_rtp_buffer_get_payload_subbuffer (&rtpbuffer, hdrsize, -1); + payload = gst_rtp_buffer_get_payload_subbuffer (rtp, hdrsize, -1); gst_adapter_push (self->adapter, payload); /* Marker indicates that it was the last rtp packet for this frame */ - if (gst_rtp_buffer_get_marker (&rtpbuffer)) { + if (gst_rtp_buffer_get_marker (rtp)) { GstBuffer *out; - guint8 flag0; + guint8 header[10]; - gst_adapter_copy (self->adapter, &flag0, 0, 1); + if (gst_adapter_available (self->adapter) < 10) + goto too_small; + gst_adapter_copy (self->adapter, &header, 0, 10); out = gst_adapter_take_buffer (self->adapter, gst_adapter_available (self->adapter)); self->started = FALSE; - gst_rtp_buffer_unmap (&rtpbuffer); /* mark keyframes */ out = gst_buffer_make_writable (out); - if ((flag0 & 0x01)) + /* Filter away all metas that are not sensible to copy */ + gst_rtp_drop_meta (GST_ELEMENT_CAST (self), out, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + if ((header[0] & 0x01)) { GST_BUFFER_FLAG_SET (out, GST_BUFFER_FLAG_DELTA_UNIT); - else + + if (!self->caps_sent) { + gst_buffer_unref (out); + out = NULL; + GST_INFO_OBJECT (self, "Dropping inter-frame before intra-frame"); + gst_pad_push_event (GST_RTP_BASE_DEPAYLOAD_SINKPAD (depay), + gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE, + TRUE, 0)); + } + } else { + guint profile, width, height; + GST_BUFFER_FLAG_UNSET (out, GST_BUFFER_FLAG_DELTA_UNIT); + profile = (header[0] & 0x0e) >> 1; + width = GST_READ_UINT16_LE (header + 6) & 0x3fff; + height = GST_READ_UINT16_LE (header + 8) & 0x3fff; + + if (G_UNLIKELY (self->last_width != width || + self->last_height != height || self->last_profile != profile)) { + gchar profile_str[3]; + GstCaps *srccaps; + + snprintf (profile_str, 3, "%u", profile); + srccaps = gst_caps_new_simple ("video/x-vp8", + "framerate", GST_TYPE_FRACTION, 0, 1, + "height", G_TYPE_INT, height, + "width", G_TYPE_INT, width, + "profile", G_TYPE_STRING, profile_str, NULL); + + gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depay), srccaps); + gst_caps_unref (srccaps); + + self->caps_sent = TRUE; + self->last_width = width; + self->last_height = height; + self->last_profile = profile; + } + } + return out; } done: - gst_rtp_buffer_unmap (&rtpbuffer); return NULL; too_small: @@ -197,17 +244,45 @@ goto done; } +static GstStateChangeReturn +gst_rtp_vp8_depay_change_state (GstElement * element, GstStateChange transition) +{ + GstRtpVP8Depay *self = GST_RTP_VP8_DEPAY (element); + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + self->last_profile = -1; + self->last_height = -1; + self->last_width = -1; + self->caps_sent = FALSE; + break; + default: + break; + } + + return + GST_ELEMENT_CLASS (gst_rtp_vp8_depay_parent_class)->change_state (element, + transition); +} + static gboolean -gst_rtp_vp8_depay_set_caps (GstRTPBaseDepayload * depayload, GstCaps * caps) +gst_rtp_vp8_depay_handle_event (GstRTPBaseDepayload * depay, GstEvent * event) { - GstCaps *srccaps = gst_caps_new_simple ("video/x-vp8", - "framerate", GST_TYPE_FRACTION, 0, 1, - NULL); + GstRtpVP8Depay *self = GST_RTP_VP8_DEPAY (depay); - gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps); - gst_caps_unref (srccaps); + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_FLUSH_STOP: + self->last_profile = -1; + self->last_height = -1; + self->last_width = -1; + break; + default: + break; + } - return TRUE; + return + GST_RTP_BASE_DEPAYLOAD_CLASS + (gst_rtp_vp8_depay_parent_class)->handle_event (depay, event); } gboolean diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvp8depay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvp8depay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvp8depay.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvp8depay.h 2015-10-22 08:02:54.000000000 +0000 @@ -53,6 +53,11 @@ GstRTPBaseDepayload parent; GstAdapter *adapter; gboolean started; + + gboolean caps_sent; + gint last_profile; + gint last_width; + gint last_height; }; GType gst_rtp_vp8_depay_get_type (void); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvp8pay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvp8pay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvp8pay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvp8pay.c 2015-10-22 08:02:54.000000000 +0000 @@ -30,8 +30,10 @@ #include #include #include +#include #include "dboolhuff.h" #include "gstrtpvp8pay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (gst_rtp_vp8_pay_debug); #define GST_CAT_DEFAULT gst_rtp_vp8_pay_debug @@ -82,7 +84,7 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING "," - "clock-rate = (int) 90000, encoding-name = (string) \"VP8-DRAFT-IETF-01\"")); + "clock-rate = (int) 90000, encoding-name = (string) { \"VP8\", \"VP8-DRAFT-IETF-01\" }")); static GstStaticPadTemplate gst_rtp_vp8_pay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -350,13 +352,12 @@ { int i; - for (i = 0; i < self->n_partitions; i++) { - if (offset >= self->partition_offset[i] && - offset < self->partition_offset[i + 1]) - return i; + for (i = 1; i < self->n_partitions; i++) { + if (offset < self->partition_offset[i]) + return i - 1; } - return i; + return i - 1; } static gsize @@ -412,7 +413,6 @@ return out; } - static guint gst_rtp_vp8_payload_next (GstRtpVP8Pay * self, GstBufferList * list, guint offset, GstBuffer * buffer, gsize buffer_size, gsize max_payload_len) @@ -439,6 +439,8 @@ offset == self->partition_offset[partition], mark, buffer); sub = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offset, available); + gst_rtp_copy_meta (GST_ELEMENT_CAST (self), header, buffer, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); out = gst_buffer_append (header, sub); gst_buffer_list_insert (list, -1, out); @@ -509,8 +511,25 @@ static gboolean gst_rtp_vp8_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps) { + GstCaps *src_caps; + GstStructure *s; + char *encoding_name; + + src_caps = gst_pad_get_allowed_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload)); + if (src_caps) { + src_caps = gst_caps_make_writable (src_caps); + src_caps = gst_caps_truncate (src_caps); + s = gst_caps_get_structure (src_caps, 0); + gst_structure_fixate_field_string (s, "encoding-name", "VP8"); + encoding_name = g_strdup (gst_structure_get_string (s, "encoding-name")); + gst_caps_unref (src_caps); + } else { + encoding_name = g_strdup ("VP8-DRAFT-IETF-01"); + } + gst_rtp_base_payload_set_options (payload, "video", TRUE, - "VP8-DRAFT-IETF-01", 90000); + encoding_name, 90000); + g_free (encoding_name); return gst_rtp_base_payload_set_outcaps (payload, NULL); } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvrawdepay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvrawdepay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvrawdepay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvrawdepay.c 2015-10-22 08:02:54.000000000 +0000 @@ -22,10 +22,12 @@ #endif #include +#include #include #include #include "gstrtpvrawdepay.h" +#include "gstrtputils.h" GST_DEBUG_CATEGORY_STATIC (rtpvrawdepay_debug); #define GST_CAT_DEFAULT (rtpvrawdepay_debug) @@ -43,7 +45,16 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " - "clock-rate = (int) 90000, " "encoding-name = (string) \"RAW\"") + "clock-rate = (int) 90000, " + "encoding-name = (string) \"RAW\", " + "sampling = (string) { \"RGB\", \"RGBA\", \"BGR\", \"BGRA\", " + "\"YCbCr-4:4:4\", \"YCbCr-4:2:2\", \"YCbCr-4:2:0\", " + "\"YCbCr-4:1:1\" }," + /* we cannot express these as strings + * "width = (string) [1 32767]," + * "height = (string) [1 32767]," + */ + "depth = (string) { \"8\", \"10\", \"12\", \"16\" }") ); #define gst_rtp_vraw_depay_parent_class parent_class @@ -52,8 +63,8 @@ static gboolean gst_rtp_vraw_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps); -static GstBuffer *gst_rtp_vraw_depay_process (GstRTPBaseDepayload * depayload, - GstBuffer * buf); +static GstBuffer *gst_rtp_vraw_depay_process_packet (GstRTPBaseDepayload * + depay, GstRTPBuffer * rtp); static GstStateChangeReturn gst_rtp_vraw_depay_change_state (GstElement * element, GstStateChange transition); @@ -73,7 +84,8 @@ gstelement_class->change_state = gst_rtp_vraw_depay_change_state; gstrtpbasedepayload_class->set_caps = gst_rtp_vraw_depay_setcaps; - gstrtpbasedepayload_class->process = gst_rtp_vraw_depay_process; + gstrtpbasedepayload_class->process_rtp_packet = + gst_rtp_vraw_depay_process_packet; gstrtpbasedepayload_class->handle_event = gst_rtp_vraw_depay_handle_event; gst_element_class_add_pad_template (gstelement_class, @@ -99,6 +111,7 @@ gst_rtp_vraw_depay_reset (GstRtpVRawDepay * rtpvrawdepay) { if (rtpvrawdepay->outbuf) { + gst_video_frame_unmap (&rtpvrawdepay->frame); gst_buffer_unref (rtpvrawdepay->outbuf); rtpvrawdepay->outbuf = NULL; } @@ -239,8 +252,9 @@ format = GST_VIDEO_FORMAT_Y41B; pgroup = 6; xinc = 4; - } else + } else { goto unknown_format; + } gst_video_info_init (&rtpvrawdepay->vinfo); gst_video_info_set_format (&rtpvrawdepay->vinfo, format, width, height); @@ -306,31 +320,30 @@ } static GstBuffer * -gst_rtp_vraw_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) +gst_rtp_vraw_depay_process_packet (GstRTPBaseDepayload * depayload, + GstRTPBuffer * rtp) { GstRtpVRawDepay *rtpvrawdepay; guint8 *payload, *p0, *yp, *up, *vp, *headers; guint32 timestamp; guint cont, ystride, uvstride, pgroup, payload_len; gint width, height, xinc, yinc; - GstRTPBuffer rtp = { NULL }; - GstVideoFrame frame; + GstVideoFrame *frame; gboolean marker; - GstBuffer *outbuf = NULL; + GstBuffer *buf, *outbuf = NULL; rtpvrawdepay = GST_RTP_VRAW_DEPAY (depayload); - gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp); - - timestamp = gst_rtp_buffer_get_timestamp (&rtp); + timestamp = gst_rtp_buffer_get_timestamp (rtp); if (timestamp != rtpvrawdepay->timestamp || rtpvrawdepay->outbuf == NULL) { - GstBuffer *outbuf; + GstBuffer *new_buffer; GstFlowReturn ret; GST_LOG_OBJECT (depayload, "new frame with timestamp %u", timestamp); /* new timestamp, flush old buffer and create new output buffer */ if (rtpvrawdepay->outbuf) { + gst_video_frame_unmap (&rtpvrawdepay->frame); gst_rtp_base_depayload_push (depayload, rtpvrawdepay->outbuf); rtpvrawdepay->outbuf = NULL; } @@ -345,29 +358,37 @@ gst_caps_unref (caps); } - ret = gst_buffer_pool_acquire_buffer (rtpvrawdepay->pool, &outbuf, NULL); + ret = + gst_buffer_pool_acquire_buffer (rtpvrawdepay->pool, &new_buffer, NULL); + if (G_UNLIKELY (ret != GST_FLOW_OK)) goto alloc_failed; /* clear timestamp from alloc... */ - GST_BUFFER_TIMESTAMP (outbuf) = -1; + GST_BUFFER_PTS (new_buffer) = -1; - rtpvrawdepay->outbuf = outbuf; + if (!gst_video_frame_map (&rtpvrawdepay->frame, &rtpvrawdepay->vinfo, + new_buffer, GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) { + gst_buffer_unref (new_buffer); + goto invalid_frame; + } + + rtpvrawdepay->outbuf = new_buffer; rtpvrawdepay->timestamp = timestamp; } - if (!gst_video_frame_map (&frame, &rtpvrawdepay->vinfo, rtpvrawdepay->outbuf, - GST_MAP_WRITE)) - goto invalid_frame; + frame = &rtpvrawdepay->frame; + + g_assert (frame->buffer != NULL); /* get pointer and strides of the planes */ - p0 = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0); - yp = GST_VIDEO_FRAME_COMP_DATA (&frame, 0); - up = GST_VIDEO_FRAME_COMP_DATA (&frame, 1); - vp = GST_VIDEO_FRAME_COMP_DATA (&frame, 2); + p0 = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); + yp = GST_VIDEO_FRAME_COMP_DATA (frame, 0); + up = GST_VIDEO_FRAME_COMP_DATA (frame, 1); + vp = GST_VIDEO_FRAME_COMP_DATA (frame, 2); - ystride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, 0); - uvstride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, 1); + ystride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); + uvstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); pgroup = rtpvrawdepay->pgroup; width = GST_VIDEO_INFO_WIDTH (&rtpvrawdepay->vinfo); @@ -375,8 +396,9 @@ xinc = rtpvrawdepay->xinc; yinc = rtpvrawdepay->yinc; - payload = gst_rtp_buffer_get_payload (&rtp); - payload_len = gst_rtp_buffer_get_payload_len (&rtp); + payload = gst_rtp_buffer_get_payload (rtp); + payload_len = gst_rtp_buffer_get_payload_len (rtp); + buf = gst_rtp_buffer_get_payload_buffer (rtp); if (payload_len < 3) goto short_packet; @@ -388,6 +410,9 @@ /* remember header position */ headers = payload; + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpvrawdepay), frame->buffer, buf, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + /* find data start */ do { if (payload_len < 6) @@ -540,12 +565,11 @@ payload_len -= length; } - gst_video_frame_unmap (&frame); - marker = gst_rtp_buffer_get_marker (&rtp); - gst_rtp_buffer_unmap (&rtp); + marker = gst_rtp_buffer_get_marker (rtp); if (marker) { GST_LOG_OBJECT (depayload, "marker, flushing frame"); + gst_video_frame_unmap (&rtpvrawdepay->frame); outbuf = rtpvrawdepay->outbuf; rtpvrawdepay->outbuf = NULL; rtpvrawdepay->timestamp = -1; @@ -557,34 +581,26 @@ { GST_ELEMENT_ERROR (depayload, STREAM, FORMAT, (NULL), ("unimplemented sampling")); - gst_video_frame_unmap (&frame); - gst_rtp_buffer_unmap (&rtp); return NULL; } alloc_failed: { GST_WARNING_OBJECT (depayload, "failed to alloc output buffer"); - gst_rtp_buffer_unmap (&rtp); return NULL; } invalid_frame: { GST_ERROR_OBJECT (depayload, "could not map video frame"); - gst_rtp_buffer_unmap (&rtp); return NULL; } wrong_length: { GST_WARNING_OBJECT (depayload, "length not multiple of pgroup"); - gst_video_frame_unmap (&frame); - gst_rtp_buffer_unmap (&rtp); return NULL; } short_packet: { GST_WARNING_OBJECT (depayload, "short packet"); - gst_video_frame_unmap (&frame); - gst_rtp_buffer_unmap (&rtp); return NULL; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvrawdepay.h gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvrawdepay.h --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvrawdepay.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvrawdepay.h 2015-10-22 08:02:54.000000000 +0000 @@ -49,9 +49,9 @@ GstBufferPool *pool; GstVideoInfo vinfo; + GstVideoFrame frame; GstBuffer *outbuf; guint32 timestamp; - guint outsize; gint pgroup; gint xinc, yinc; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvrawpay.c gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvrawpay.c --- gst-plugins-good1.0-1.4.3/gst/rtp/gstrtpvrawpay.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/gstrtpvrawpay.c 2015-10-22 08:02:54.000000000 +0000 @@ -24,8 +24,10 @@ #include #include +#include #include "gstrtpvrawpay.h" +#include "gstrtputils.h" enum { @@ -346,9 +348,9 @@ out = gst_rtp_buffer_new_allocate (left, 0, 0); if (field == 0) { - GST_BUFFER_TIMESTAMP (out) = GST_BUFFER_TIMESTAMP (buffer); + GST_BUFFER_PTS (out) = GST_BUFFER_PTS (buffer); } else { - GST_BUFFER_TIMESTAMP (out) = GST_BUFFER_TIMESTAMP (buffer) + + GST_BUFFER_PTS (out) = GST_BUFFER_PTS (buffer) + GST_BUFFER_DURATION (buffer) / 2; } @@ -555,6 +557,10 @@ gst_buffer_resize (out, 0, gst_buffer_get_size (out) - left); } + gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpvrawpay), out, buffer, + g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + + /* Now either push out the buffer directly */ if (!use_buffer_lists) { ret = gst_rtp_base_payload_push (payload, out); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/Makefile.am gst-plugins-good1.0-1.6.1/gst/rtp/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/rtp/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -38,6 +38,8 @@ gstrtpgsmpay.c \ gstrtpamrdepay.c \ gstrtpamrpay.c \ + gstrtph261pay.c \ + gstrtph261depay.c \ gstrtph263pdepay.c \ gstrtph263ppay.c \ gstrtph263depay.c \ @@ -48,6 +50,8 @@ gstrtpj2kpay.c \ gstrtpjpegdepay.c \ gstrtpjpegpay.c \ + gstrtpklvdepay.c \ + gstrtpklvpay.c \ gstrtpL16depay.c \ gstrtpL16pay.c \ gstrtpL24depay.c \ @@ -80,7 +84,8 @@ gstrtpvrawdepay.c \ gstrtpvrawpay.c \ gstrtpstreampay.c \ - gstrtpstreamdepay.c + gstrtpstreamdepay.c \ + gstrtputils.c libgstrtp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) -Dvp8_norm=gst_rtpvp8_vp8_norm \ @@ -139,6 +144,8 @@ gstrtpmpapay.h \ gstrtpmpvdepay.h \ gstrtpmpvpay.h \ + gstrtph261pay.h \ + gstrtph261depay.h \ gstrtph263pdepay.h \ gstrtph263ppay.h \ gstrtph263depay.h \ @@ -149,6 +156,8 @@ gstrtpj2kpay.h \ gstrtpjpegdepay.h \ gstrtpjpegpay.h \ + gstrtpklvdepay.h \ + gstrtpklvpay.h \ gstrtpmp1sdepay.h \ gstrtpmp2tdepay.h \ gstrtpmp2tpay.h \ @@ -177,20 +186,7 @@ gstrtpvrawdepay.h \ gstrtpvrawpay.h \ gstrtpstreampay.h \ - gstrtpstreamdepay.h + gstrtpstreamdepay.h \ + gstrtputils.h EXTRA_DIST = dboolhuff.LICENSE - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstrtp -:SHARED libgstrtp \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstrtp_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtp_la_CFLAGS) \ - -:LDFLAGS $(libgstrtp_la_LDFLAGS) \ - $(libgstrtp_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtp/Makefile.in gst-plugins-good1.0-1.6.1/gst/rtp/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/rtp/Makefile.in 2014-09-24 07:26:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtp/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/rtp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README TODO 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -176,12 +185,15 @@ libgstrtp_la-gstrtpg726depay.lo libgstrtp_la-gstrtpg729pay.lo \ libgstrtp_la-gstrtpg729depay.lo libgstrtp_la-gstrtpgsmdepay.lo \ libgstrtp_la-gstrtpgsmpay.lo libgstrtp_la-gstrtpamrdepay.lo \ - libgstrtp_la-gstrtpamrpay.lo libgstrtp_la-gstrtph263pdepay.lo \ + libgstrtp_la-gstrtpamrpay.lo libgstrtp_la-gstrtph261pay.lo \ + libgstrtp_la-gstrtph261depay.lo \ + libgstrtp_la-gstrtph263pdepay.lo \ libgstrtp_la-gstrtph263ppay.lo libgstrtp_la-gstrtph263depay.lo \ libgstrtp_la-gstrtph263pay.lo libgstrtp_la-gstrtph264depay.lo \ libgstrtp_la-gstrtph264pay.lo libgstrtp_la-gstrtpj2kdepay.lo \ libgstrtp_la-gstrtpj2kpay.lo libgstrtp_la-gstrtpjpegdepay.lo \ - libgstrtp_la-gstrtpjpegpay.lo libgstrtp_la-gstrtpL16depay.lo \ + libgstrtp_la-gstrtpjpegpay.lo libgstrtp_la-gstrtpklvdepay.lo \ + libgstrtp_la-gstrtpklvpay.lo libgstrtp_la-gstrtpL16depay.lo \ libgstrtp_la-gstrtpL16pay.lo libgstrtp_la-gstrtpL24depay.lo \ libgstrtp_la-gstrtpL24pay.lo libgstrtp_la-gstasteriskh263.lo \ libgstrtp_la-gstrtpmp1sdepay.lo \ @@ -201,7 +213,7 @@ libgstrtp_la-gstrtpvorbispay.lo libgstrtp_la-gstrtpvp8depay.lo \ libgstrtp_la-gstrtpvp8pay.lo libgstrtp_la-gstrtpvrawdepay.lo \ libgstrtp_la-gstrtpvrawpay.lo libgstrtp_la-gstrtpstreampay.lo \ - libgstrtp_la-gstrtpstreamdepay.lo + libgstrtp_la-gstrtpstreamdepay.lo libgstrtp_la-gstrtputils.lo libgstrtp_la_OBJECTS = $(am_libgstrtp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -272,6 +284,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README \ + TODO DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -404,9 +418,6 @@ 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@ @@ -524,17 +535,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -587,6 +598,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -638,6 +650,8 @@ gstrtpgsmpay.c \ gstrtpamrdepay.c \ gstrtpamrpay.c \ + gstrtph261pay.c \ + gstrtph261depay.c \ gstrtph263pdepay.c \ gstrtph263ppay.c \ gstrtph263depay.c \ @@ -648,6 +662,8 @@ gstrtpj2kpay.c \ gstrtpjpegdepay.c \ gstrtpjpegpay.c \ + gstrtpklvdepay.c \ + gstrtpklvpay.c \ gstrtpL16depay.c \ gstrtpL16pay.c \ gstrtpL24depay.c \ @@ -680,7 +696,8 @@ gstrtpvrawdepay.c \ gstrtpvrawpay.c \ gstrtpstreampay.c \ - gstrtpstreamdepay.c + gstrtpstreamdepay.c \ + gstrtputils.c libgstrtp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) -Dvp8_norm=gst_rtpvp8_vp8_norm \ @@ -739,6 +756,8 @@ gstrtpmpapay.h \ gstrtpmpvdepay.h \ gstrtpmpvpay.h \ + gstrtph261pay.h \ + gstrtph261depay.h \ gstrtph263pdepay.h \ gstrtph263ppay.h \ gstrtph263depay.h \ @@ -749,6 +768,8 @@ gstrtpj2kpay.h \ gstrtpjpegdepay.h \ gstrtpjpegpay.h \ + gstrtpklvdepay.h \ + gstrtpklvpay.h \ gstrtpmp1sdepay.h \ gstrtpmp2tdepay.h \ gstrtpmp2tpay.h \ @@ -777,7 +798,8 @@ gstrtpvrawdepay.h \ gstrtpvrawpay.h \ gstrtpstreampay.h \ - gstrtpstreamdepay.h + gstrtpstreamdepay.h \ + gstrtputils.h EXTRA_DIST = dboolhuff.LICENSE all: all-am @@ -796,7 +818,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/rtp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/rtp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -890,6 +911,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpgsmpay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpgstdepay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpgstpay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtph261depay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtph261pay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtph263depay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtph263pay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtph263pdepay.Plo@am__quote@ @@ -902,6 +925,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpj2kpay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpjpegdepay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpjpegpay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpklvdepay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpklvpay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpmp1sdepay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpmp2tdepay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpmp2tpay.Plo@am__quote@ @@ -933,6 +958,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpsv3vdepay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtptheoradepay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtptheorapay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtputils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpvorbisdepay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpvorbispay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtp_la-gstrtpvp8depay.Plo@am__quote@ @@ -1223,6 +1249,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtpamrpay.lo `test -f 'gstrtpamrpay.c' || echo '$(srcdir)/'`gstrtpamrpay.c +libgstrtp_la-gstrtph261pay.lo: gstrtph261pay.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -MT libgstrtp_la-gstrtph261pay.lo -MD -MP -MF $(DEPDIR)/libgstrtp_la-gstrtph261pay.Tpo -c -o libgstrtp_la-gstrtph261pay.lo `test -f 'gstrtph261pay.c' || echo '$(srcdir)/'`gstrtph261pay.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtp_la-gstrtph261pay.Tpo $(DEPDIR)/libgstrtp_la-gstrtph261pay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstrtph261pay.c' object='libgstrtp_la-gstrtph261pay.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 $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtph261pay.lo `test -f 'gstrtph261pay.c' || echo '$(srcdir)/'`gstrtph261pay.c + +libgstrtp_la-gstrtph261depay.lo: gstrtph261depay.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -MT libgstrtp_la-gstrtph261depay.lo -MD -MP -MF $(DEPDIR)/libgstrtp_la-gstrtph261depay.Tpo -c -o libgstrtp_la-gstrtph261depay.lo `test -f 'gstrtph261depay.c' || echo '$(srcdir)/'`gstrtph261depay.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtp_la-gstrtph261depay.Tpo $(DEPDIR)/libgstrtp_la-gstrtph261depay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstrtph261depay.c' object='libgstrtp_la-gstrtph261depay.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 $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtph261depay.lo `test -f 'gstrtph261depay.c' || echo '$(srcdir)/'`gstrtph261depay.c + libgstrtp_la-gstrtph263pdepay.lo: gstrtph263pdepay.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -MT libgstrtp_la-gstrtph263pdepay.lo -MD -MP -MF $(DEPDIR)/libgstrtp_la-gstrtph263pdepay.Tpo -c -o libgstrtp_la-gstrtph263pdepay.lo `test -f 'gstrtph263pdepay.c' || echo '$(srcdir)/'`gstrtph263pdepay.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtp_la-gstrtph263pdepay.Tpo $(DEPDIR)/libgstrtp_la-gstrtph263pdepay.Plo @@ -1293,6 +1333,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtpjpegpay.lo `test -f 'gstrtpjpegpay.c' || echo '$(srcdir)/'`gstrtpjpegpay.c +libgstrtp_la-gstrtpklvdepay.lo: gstrtpklvdepay.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -MT libgstrtp_la-gstrtpklvdepay.lo -MD -MP -MF $(DEPDIR)/libgstrtp_la-gstrtpklvdepay.Tpo -c -o libgstrtp_la-gstrtpklvdepay.lo `test -f 'gstrtpklvdepay.c' || echo '$(srcdir)/'`gstrtpklvdepay.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtp_la-gstrtpklvdepay.Tpo $(DEPDIR)/libgstrtp_la-gstrtpklvdepay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstrtpklvdepay.c' object='libgstrtp_la-gstrtpklvdepay.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 $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtpklvdepay.lo `test -f 'gstrtpklvdepay.c' || echo '$(srcdir)/'`gstrtpklvdepay.c + +libgstrtp_la-gstrtpklvpay.lo: gstrtpklvpay.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -MT libgstrtp_la-gstrtpklvpay.lo -MD -MP -MF $(DEPDIR)/libgstrtp_la-gstrtpklvpay.Tpo -c -o libgstrtp_la-gstrtpklvpay.lo `test -f 'gstrtpklvpay.c' || echo '$(srcdir)/'`gstrtpklvpay.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtp_la-gstrtpklvpay.Tpo $(DEPDIR)/libgstrtp_la-gstrtpklvpay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstrtpklvpay.c' object='libgstrtp_la-gstrtpklvpay.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 $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtpklvpay.lo `test -f 'gstrtpklvpay.c' || echo '$(srcdir)/'`gstrtpklvpay.c + libgstrtp_la-gstrtpL16depay.lo: gstrtpL16depay.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -MT libgstrtp_la-gstrtpL16depay.lo -MD -MP -MF $(DEPDIR)/libgstrtp_la-gstrtpL16depay.Tpo -c -o libgstrtp_la-gstrtpL16depay.lo `test -f 'gstrtpL16depay.c' || echo '$(srcdir)/'`gstrtpL16depay.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtp_la-gstrtpL16depay.Tpo $(DEPDIR)/libgstrtp_la-gstrtpL16depay.Plo @@ -1524,6 +1578,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtpstreamdepay.lo `test -f 'gstrtpstreamdepay.c' || echo '$(srcdir)/'`gstrtpstreamdepay.c +libgstrtp_la-gstrtputils.lo: gstrtputils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -MT libgstrtp_la-gstrtputils.lo -MD -MP -MF $(DEPDIR)/libgstrtp_la-gstrtputils.Tpo -c -o libgstrtp_la-gstrtputils.lo `test -f 'gstrtputils.c' || echo '$(srcdir)/'`gstrtputils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtp_la-gstrtputils.Tpo $(DEPDIR)/libgstrtp_la-gstrtputils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstrtputils.c' object='libgstrtp_la-gstrtputils.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 $(libgstrtp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtp_la_CFLAGS) $(CFLAGS) -c -o libgstrtp_la-gstrtputils.lo `test -f 'gstrtputils.c' || echo '$(srcdir)/'`gstrtputils.c + mostlyclean-libtool: -rm -f *.lo @@ -1737,20 +1798,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstrtp -:SHARED libgstrtp \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstrtp_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtp_la_CFLAGS) \ - -:LDFLAGS $(libgstrtp_la_LDFLAGS) \ - $(libgstrtp_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpbin.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpbin.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpbin.c 2014-09-19 06:38:57.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpbin.c 2015-10-22 08:02:54.000000000 +0000 @@ -80,7 +80,7 @@ * sink_\%u pad that matches the sessionid in the signal and it should have 1 or * more src_\%u pads. For each src_%\u pad, a session will be made (if needed) * and the pad will be linked to the session send_rtp_sink pad. Each session will - * then expose its source pad ad send_rtp_src_\%u on #GstRtpBin. + * then expose its source pad as send_rtp_src_\%u on #GstRtpBin. * An AUX receiver has 1 src_\%u pad that much match the sessionid in the signal * and 1 or more sink_\%u pads. A session will be made for each sink_\%u pad * when the corresponding recv_rtp_sink_\%u pad is requested on #GstRtpBin. @@ -235,8 +235,8 @@ gboolean autoremove; - /* UNIX (ntp) time of last SR sync used */ - guint64 last_unix; + /* NTP time in ns of last SR sync used */ + guint64 last_ntpnstime; /* list of extra elements */ GList *elements; @@ -288,6 +288,8 @@ #define DEFAULT_RTCP_SYNC_INTERVAL 0 #define DEFAULT_DO_SYNC_EVENT FALSE #define DEFAULT_DO_RETRANSMISSION FALSE +#define DEFAULT_RTP_PROFILE GST_RTP_PROFILE_AVP +#define DEFAULT_NTP_TIME_SOURCE GST_RTP_NTP_TIME_SOURCE_NTP enum { @@ -305,14 +307,8 @@ PROP_USE_PIPELINE_CLOCK, PROP_DO_SYNC_EVENT, PROP_DO_RETRANSMISSION, - PROP_LAST -}; - -enum -{ - GST_RTP_BIN_RTCP_SYNC_ALWAYS, - GST_RTP_BIN_RTCP_SYNC_INITIAL, - GST_RTP_BIN_RTCP_SYNC_RTP + PROP_RTP_PROFILE, + PROP_NTP_TIME_SOURCE }; #define GST_RTP_BIN_RTCP_SYNC_TYPE (gst_rtp_bin_rtcp_sync_get_type()) @@ -628,8 +624,13 @@ /* configure SDES items */ GST_OBJECT_LOCK (rtpbin); - g_object_set (session, "sdes", rtpbin->sdes, "use-pipeline-clock", - rtpbin->use_pipeline_clock, NULL); + g_object_set (session, "sdes", rtpbin->sdes, "rtp-profile", + rtpbin->rtp_profile, NULL); + if (rtpbin->use_pipeline_clock) + g_object_set (session, "use-pipeline-clock", rtpbin->use_pipeline_clock, + NULL); + else + g_object_set (session, "ntp-time-source", rtpbin->ntp_time_source, NULL); GST_OBJECT_UNLOCK (rtpbin); /* provide clock_rate to the session manager when needed */ @@ -1010,24 +1011,41 @@ gst_object_ref (clock); GST_OBJECT_UNLOCK (bin); + /* get current clock time and convert to running time */ clock_time = gst_clock_get_time (clock); + rt = clock_time - base_time; if (bin->use_pipeline_clock) { - ntpns = clock_time - base_time; + ntpns = rt; + /* add constant to convert from 1970 based time to 1900 based time */ + ntpns += (2208988800LL * GST_SECOND); } else { - GTimeVal current; - - /* get current NTP time */ - g_get_current_time (¤t); - ntpns = GST_TIMEVAL_TO_TIME (current); + switch (bin->ntp_time_source) { + case GST_RTP_NTP_TIME_SOURCE_NTP: + case GST_RTP_NTP_TIME_SOURCE_UNIX:{ + GTimeVal current; + + /* get current NTP time */ + g_get_current_time (¤t); + ntpns = GST_TIMEVAL_TO_TIME (current); + + /* add constant to convert from 1970 based time to 1900 based time */ + if (bin->ntp_time_source == GST_RTP_NTP_TIME_SOURCE_NTP) + ntpns += (2208988800LL * GST_SECOND); + break; + } + case GST_RTP_NTP_TIME_SOURCE_RUNNING_TIME: + ntpns = rt; + break; + case GST_RTP_NTP_TIME_SOURCE_CLOCK_TIME: + ntpns = clock_time; + break; + default: + g_assert_not_reached (); + break; + } } - /* add constant to convert from 1970 based time to 1900 based time */ - ntpns += (2208988800LL * GST_SECOND); - - /* get current clock time and convert to running time */ - rt = clock_time - base_time; - gst_object_unref (clock); } else { GST_OBJECT_UNLOCK (bin); @@ -1108,12 +1126,8 @@ GstRtpBinClient *client; gboolean created; GSList *walk; - guint64 local_rt; - guint64 local_rtp; - GstClockTime running_time; + GstClockTime running_time, running_time_rtp; guint64 ntpnstime; - gint64 ntpdiff, rtdiff; - guint64 last_unix; /* first find or create the CNAME */ client = get_client (bin, len, data, &created); @@ -1155,51 +1169,56 @@ * local rtptime. The local rtp time is used to construct timestamps on the * buffers so we will calculate what running_time corresponds to the RTP * timestamp in the SR packet. */ - local_rtp = last_extrtptime - base_rtptime; + running_time_rtp = last_extrtptime - base_rtptime; GST_DEBUG_OBJECT (bin, "base %" G_GUINT64_FORMAT ", extrtptime %" G_GUINT64_FORMAT ", local RTP %" G_GUINT64_FORMAT ", clock-rate %d, " "clock-base %" G_GINT64_FORMAT, base_rtptime, - last_extrtptime, local_rtp, clock_rate, rtp_clock_base); + last_extrtptime, running_time_rtp, clock_rate, rtp_clock_base); /* calculate local RTP time in gstreamer timestamp, we essentially perform the * same conversion that a jitterbuffer would use to convert an rtp timestamp * into a corresponding gstreamer timestamp. Note that the base_time also * contains the drift between sender and receiver. */ - local_rt = gst_util_uint64_scale_int (local_rtp, GST_SECOND, clock_rate); - local_rt += base_time; + running_time = + gst_util_uint64_scale_int (running_time_rtp, GST_SECOND, clock_rate); + running_time += base_time; - /* convert ntptime to unix time since 1900 */ - last_unix = gst_util_uint64_scale (ntptime, GST_SECOND, + /* convert ntptime to nanoseconds */ + ntpnstime = gst_util_uint64_scale (ntptime, GST_SECOND, (G_GINT64_CONSTANT (1) << 32)); stream->have_sync = TRUE; GST_DEBUG_OBJECT (bin, - "local UNIX %" G_GUINT64_FORMAT ", remote UNIX %" G_GUINT64_FORMAT, - local_rt, last_unix); + "SR RTP running time %" G_GUINT64_FORMAT ", SR NTP %" G_GUINT64_FORMAT, + running_time, ntpnstime); /* recalc inter stream playout offset, but only if there is more than one * stream or we're doing NTP sync. */ if (bin->ntp_sync) { + gint64 ntpdiff, rtdiff; + guint64 local_ntpnstime; + GstClockTime local_running_time; + /* For NTP sync we need to first get a snapshot of running_time and NTP * time. We know at what running_time we play a certain RTP time, we also * calculated when we would play the RTP time in the SR packet. Now we need * to know how the running_time and the NTP time relate to eachother. */ - get_current_times (bin, &running_time, &ntpnstime); + get_current_times (bin, &local_running_time, &local_ntpnstime); /* see how far away the NTP time is. This is the difference between the * current NTP time and the NTP time in the last SR packet. */ - ntpdiff = ntpnstime - last_unix; + ntpdiff = local_ntpnstime - ntpnstime; /* see how far away the running_time is. This is the difference between the * current running_time and the running_time of the RTP timestamp in the * last SR packet. */ - rtdiff = running_time - local_rt; + rtdiff = local_running_time - running_time; GST_DEBUG_OBJECT (bin, - "NTP time %" G_GUINT64_FORMAT ", last unix %" G_GUINT64_FORMAT, - ntpnstime, last_unix); + "local NTP time %" G_GUINT64_FORMAT ", SR NTP time %" G_GUINT64_FORMAT, + local_ntpnstime, ntpnstime); GST_DEBUG_OBJECT (bin, "NTP diff %" G_GINT64_FORMAT ", RT diff %" G_GINT64_FORMAT, ntpdiff, rtdiff); @@ -1213,12 +1232,12 @@ gboolean all_sync, use_rtp; gboolean rtcp_sync = g_atomic_int_get (&bin->rtcp_sync); - /* calculate delta between server and receiver. last_unix is created by + /* calculate delta between server and receiver. ntpnstime is created by * converting the ntptime in the last SR packet to a gstreamer timestamp. This * delta expresses the difference to our timeline and the server timeline. The * difference in itself doesn't mean much but we can combine the delta of * multiple streams to create a stream specific offset. */ - stream->rt_delta = last_unix - local_rt; + stream->rt_delta = ntpnstime - running_time; /* calculate the min of all deltas, ignoring streams that did not yet have a * valid rt_delta because we did not yet receive an SR packet for those @@ -1332,14 +1351,14 @@ } /* bail out if we adjusted recently enough */ - if (all_sync && (last_unix - bin->priv->last_unix) < + if (all_sync && (ntpnstime - bin->priv->last_ntpnstime) < bin->rtcp_sync_interval * GST_MSECOND) { GST_DEBUG_OBJECT (bin, "discarding RTCP sender packet for sync; " "previous sender info too recent " - "(previous UNIX %" G_GUINT64_FORMAT ")", bin->priv->last_unix); + "(previous NTP %" G_GUINT64_FORMAT ")", bin->priv->last_ntpnstime); return; } - bin->priv->last_unix = last_unix; + bin->priv->last_ntpnstime = ntpnstime; /* calculate offsets for each stream */ for (walk = client->streams; walk; walk = g_slist_next (walk)) { @@ -2066,9 +2085,10 @@ g_object_class_install_property (gobject_class, PROP_USE_PIPELINE_CLOCK, g_param_spec_boolean ("use-pipeline-clock", "Use pipeline clock", - "Use the pipeline running-time to set the NTP time in the RTCP SR messages", + "Use the pipeline running-time to set the NTP time in the RTCP SR messages " + "(DEPRECATED: Use ntp-time-source property)", DEFAULT_USE_PIPELINE_CLOCK, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); /** * GstRtpBin:buffer-mode: * @@ -2119,12 +2139,38 @@ "Send event downstream when a stream is synchronized to the sender", DEFAULT_DO_SYNC_EVENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstRtpBin:do-retransmission: + * + * Enables RTP retransmission on all streams. To control retransmission on + * a per-SSRC basis, connect to the #GstRtpBin::new-jitterbuffer signal and + * set the #GstRtpJitterBuffer::do-retransmission property on the + * #GstRtpJitterBuffer object instead. + */ g_object_class_install_property (gobject_class, PROP_DO_RETRANSMISSION, g_param_spec_boolean ("do-retransmission", "Do retransmission", - "Send an event downstream to request packet retransmission", + "Enable retransmission on all streams", DEFAULT_DO_RETRANSMISSION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstRtpBin:rtp-profile: + * + * Sets the default RTP profile of newly created RTP sessions. The + * profile can be changed afterwards on a per-session basis. + */ + g_object_class_install_property (gobject_class, PROP_RTP_PROFILE, + g_param_spec_enum ("rtp-profile", "RTP Profile", + "Default RTP profile of newly created sessions", + GST_TYPE_RTP_PROFILE, DEFAULT_RTP_PROFILE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_NTP_TIME_SOURCE, + g_param_spec_enum ("ntp-time-source", "NTP Time Source", + "NTP time source for RTCP packets", + gst_rtp_ntp_time_source_get_type (), DEFAULT_NTP_TIME_SOURCE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_bin_change_state); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_rtp_bin_request_new_pad); @@ -2187,6 +2233,8 @@ rtpbin->use_pipeline_clock = DEFAULT_USE_PIPELINE_CLOCK; rtpbin->send_sync_event = DEFAULT_DO_SYNC_EVENT; rtpbin->do_retransmission = DEFAULT_DO_RETRANSMISSION; + rtpbin->rtp_profile = DEFAULT_RTP_PROFILE; + rtpbin->ntp_time_source = DEFAULT_NTP_TIME_SOURCE; /* some default SDES entries */ cname = g_strdup_printf ("user%u@host-%x", g_random_int (), g_random_int ()); @@ -2347,6 +2395,23 @@ gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "do-retransmission", value); break; + case PROP_RTP_PROFILE: + rtpbin->rtp_profile = g_value_get_enum (value); + break; + case PROP_NTP_TIME_SOURCE:{ + GSList *sessions; + GST_RTP_BIN_LOCK (rtpbin); + rtpbin->ntp_time_source = g_value_get_enum (value); + for (sessions = rtpbin->sessions; sessions; + sessions = g_slist_next (sessions)) { + GstRtpBinSession *session = (GstRtpBinSession *) sessions->data; + + g_object_set (G_OBJECT (session->session), + "ntp-time-source", rtpbin->ntp_time_source, NULL); + } + GST_RTP_BIN_UNLOCK (rtpbin); + break; + } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -2409,6 +2474,12 @@ g_value_set_boolean (value, rtpbin->do_retransmission); GST_RTP_BIN_UNLOCK (rtpbin); break; + case PROP_RTP_PROFILE: + g_value_set_enum (value, rtpbin->rtp_profile); + break; + case PROP_NTP_TIME_SOURCE: + g_value_set_enum (value, rtpbin->ntp_time_source); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -2626,7 +2697,7 @@ case GST_STATE_CHANGE_NULL_TO_READY: break; case GST_STATE_CHANGE_READY_TO_PAUSED: - priv->last_unix = 0; + priv->last_ntpnstime = 0; GST_LOG_OBJECT (rtpbin, "clearing shutdown flag"); g_atomic_int_set (&priv->shutdown, 0); break; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpbin.h gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpbin.h --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpbin.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpbin.h 2015-10-22 08:02:54.000000000 +0000 @@ -23,6 +23,7 @@ #include #include "rtpsession.h" +#include "gstrtpsession.h" #include "rtpjitterbuffer.h" #define GST_TYPE_RTP_BIN \ @@ -36,6 +37,13 @@ #define GST_IS_RTP_BIN_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_BIN)) +typedef enum +{ + GST_RTP_BIN_RTCP_SYNC_ALWAYS, + GST_RTP_BIN_RTCP_SYNC_INITIAL, + GST_RTP_BIN_RTCP_SYNC_RTP +} GstRTCPSync; + typedef struct _GstRtpBin GstRtpBin; typedef struct _GstRtpBinClass GstRtpBinClass; typedef struct _GstRtpBinPrivate GstRtpBinPrivate; @@ -56,9 +64,12 @@ RTPJitterBufferMode buffer_mode; gboolean buffering; gboolean use_pipeline_clock; + GstRtpNtpTimeSource ntp_time_source; gboolean send_sync_event; GstClockTime buffer_start; gboolean do_retransmission; + GstRTPProfile rtp_profile; + /* a list of session */ GSList *sessions; @@ -80,7 +91,7 @@ void (*payload_type_change) (GstRtpBin *rtpbin, guint session, guint pt); - void (*new_jitterbuffer) (GstRtpBin *rtpbin, guint session, guint32 ssrc); + void (*new_jitterbuffer) (GstRtpBin *rtpbin, GstElement *jitterbuffer, guint session, guint32 ssrc); /* action signals */ void (*clear_pt_map) (GstRtpBin *rtpbin); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpdtmfmux.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpdtmfmux.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpdtmfmux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpdtmfmux.c 2015-10-22 08:02:54.000000000 +0000 @@ -31,8 +31,8 @@ * * The RTP "DTMF" Muxer muxes multiple RTP streams into a valid RTP * stream. It does exactly what its parent (#rtpmux) does, except - * that it prevent buffers coming over a regular sink_%%u pad from going through - * for the duration of buffers that came in a priority_sink_%%u pad. + * that it prevent buffers coming over a regular sink_\%u pad from going through + * for the duration of buffers that came in a priority_sink_\%u pad. * * This is especially useful if a discontinuous source like dtmfsrc or * rtpdtmfsrc are connected to the priority sink pads. This way, the generated diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpjitterbuffer.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpjitterbuffer.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpjitterbuffer.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpjitterbuffer.c 2015-10-22 08:02:54.000000000 +0000 @@ -128,10 +128,14 @@ #define DEFAULT_MODE RTP_JITTER_BUFFER_MODE_SLAVE #define DEFAULT_PERCENT 0 #define DEFAULT_DO_RETRANSMISSION FALSE +#define DEFAULT_RTX_NEXT_SEQNUM TRUE #define DEFAULT_RTX_DELAY -1 +#define DEFAULT_RTX_MIN_DELAY 0 #define DEFAULT_RTX_DELAY_REORDER 3 #define DEFAULT_RTX_RETRY_TIMEOUT -1 +#define DEFAULT_RTX_MIN_RETRY_TIMEOUT -1 #define DEFAULT_RTX_RETRY_PERIOD -1 +#define DEFAULT_RTX_MAX_RETRIES -1 #define DEFAULT_AUTO_RTX_DELAY (20 * GST_MSECOND) #define DEFAULT_AUTO_RTX_TIMEOUT (40 * GST_MSECOND) @@ -146,12 +150,15 @@ PROP_MODE, PROP_PERCENT, PROP_DO_RETRANSMISSION, + PROP_RTX_NEXT_SEQNUM, PROP_RTX_DELAY, + PROP_RTX_MIN_DELAY, PROP_RTX_DELAY_REORDER, PROP_RTX_RETRY_TIMEOUT, + PROP_RTX_MIN_RETRY_TIMEOUT, PROP_RTX_RETRY_PERIOD, - PROP_STATS, - PROP_LAST + PROP_RTX_MAX_RETRIES, + PROP_STATS }; #define JBUF_LOCK(priv) (g_mutex_lock (&(priv)->jbuf_lock)) @@ -240,15 +247,21 @@ gint64 ts_offset; gboolean do_lost; gboolean do_retransmission; + gboolean rtx_next_seqnum; gint rtx_delay; + guint rtx_min_delay; gint rtx_delay_reorder; gint rtx_retry_timeout; + gint rtx_min_retry_timeout; gint rtx_retry_period; + gint rtx_max_retries; /* the last seqnum we pushed out */ guint32 last_popped_seqnum; /* the next expected seqnum we push */ guint32 next_seqnum; + /* seqnum-base, if known */ + guint32 seqnum_base; /* last output time */ GstClockTime last_out_time; /* last valid input timestamp and rtptime pair */ @@ -256,9 +269,10 @@ guint64 ips_rtptime; GstClockTime packet_spacing; + GQueue gap_packets; + /* the next expected seqnum we receive */ GstClockTime last_in_dts; - guint32 last_in_seqnum; guint32 next_in_seqnum; GArray *timers; @@ -342,9 +356,9 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("application/x-rtp, " - "clock-rate = (int) [ 1, 2147483647 ]" - /* "payload = (int) , " + GST_STATIC_CAPS ("application/x-rtp" + /* "clock-rate = (int) [ 1, 2147483647 ], " + * "payload = (int) , " * "encoding-name = (string) " */ ) ); @@ -523,6 +537,23 @@ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** + * GstRtpJitterBuffer:rtx-next-seqnum + * + * Estimate when the next packet should arrive and schedule a retransmission + * request for it. + * This is, when packet N arrives, a GstRTPRetransmission event is schedule + * for packet N+1. So it will be requested if it does not arrive at the expected time. + * The expected time is calculated using the dts of N and the packet spacing. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_RTX_NEXT_SEQNUM, + g_param_spec_boolean ("rtx-next-seqnum", "RTX next seqnum", + "Estimate when the next packet should arrive and schedule a " + "retransmission request for it.", + DEFAULT_RTX_NEXT_SEQNUM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** * GstRtpJitterBuffer:rtx-delay: * * When a packet did not arrive at the expected time, wait this extra amount @@ -537,6 +568,20 @@ "Extra time in ms to wait before sending retransmission " "event (-1 automatic)", -1, G_MAXINT, DEFAULT_RTX_DELAY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstRtpJitterBuffer:rtx-min-delay: + * + * When a packet did not arrive at the expected time, wait at least this extra amount + * of time before sending a retransmission event. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_RTX_MIN_DELAY, + g_param_spec_uint ("rtx-min-delay", "Minimum RTX Delay", + "Minimum time in ms to wait before sending retransmission " + "event", 0, G_MAXUINT, DEFAULT_RTX_MIN_DELAY, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstRtpJitterBuffer:rtx-delay-reorder: * @@ -570,6 +615,23 @@ "ms (-1 automatic)", -1, G_MAXINT, DEFAULT_RTX_RETRY_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** + * GstRtpJitterBuffer::rtx-min-retry-timeout: + * + * The minimum amount of time between retry timeouts. When + * GstRtpJitterBuffer::rtx-retry-timeout is -1, this value ensures a + * minimum interval between retry timeouts. + * + * When -1 is used, the value will be estimated based on the + * packet spacing. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_RTX_MIN_RETRY_TIMEOUT, + g_param_spec_int ("rtx-min-retry-timeout", "RTX Min Retry Timeout", + "Minimum timeout between sending a transmission event in " + "ms (-1 automatic)", -1, G_MAXINT, DEFAULT_RTX_MIN_RETRY_TIMEOUT, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstRtpJitterBuffer:rtx-retry-period: * * The amount of time to try to get a retransmission. @@ -585,15 +647,56 @@ "(-1 automatic)", -1, G_MAXINT, DEFAULT_RTX_RETRY_PERIOD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** + * GstRtpJitterBuffer:rtx-max-retries: + * + * The maximum number of retries to request a retransmission. + * + * This implies that as maximum (rtx-max-retries + 1) retransmissions will be requested. + * When -1 is used, the number of retransmission request will not be limited. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_RTX_MAX_RETRIES, + g_param_spec_int ("rtx-max-retries", "RTX Max Retries", + "The maximum number of retries to request a retransmission. " + "(-1 not limited)", -1, G_MAXINT, DEFAULT_RTX_MAX_RETRIES, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstRtpJitterBuffer:stats: * * Various jitterbuffer statistics. This property returns a GstStructure * with name application/x-rtp-jitterbuffer-stats with the following fields: * - * "rtx-count" G_TYPE_UINT64 The number of retransmissions requested - * "rtx-success-count" G_TYPE_UINT64 The number of successful retransmissions - * "rtx-per-packet" G_TYPE_DOUBLE Average number of RTX per packet - * "rtx-rtt" G_TYPE_UINT64 Average round trip time per RTX + * + * + * + * #guint64 + * "rtx-count": + * the number of retransmissions requested. + * + * + * + * + * #guint64 + * "rtx-success-count": + * the number of successful retransmissions. + * + * + * + * + * #gdouble + * "rtx-per-packet": + * average number of RTX per packet. + * + * + * + * + * #guint64 + * "rtx-rtt": + * average round trip time per RTX. + * + * + * * * Since: 1.4 */ @@ -711,10 +814,14 @@ priv->drop_on_latency = DEFAULT_DROP_ON_LATENCY; priv->do_lost = DEFAULT_DO_LOST; priv->do_retransmission = DEFAULT_DO_RETRANSMISSION; + priv->rtx_next_seqnum = DEFAULT_RTX_NEXT_SEQNUM; priv->rtx_delay = DEFAULT_RTX_DELAY; + priv->rtx_min_delay = DEFAULT_RTX_MIN_DELAY; priv->rtx_delay_reorder = DEFAULT_RTX_DELAY_REORDER; priv->rtx_retry_timeout = DEFAULT_RTX_RETRY_TIMEOUT; + priv->rtx_min_retry_timeout = DEFAULT_RTX_MIN_RETRY_TIMEOUT; priv->rtx_retry_period = DEFAULT_RTX_RETRY_PERIOD; + priv->rtx_max_retries = DEFAULT_RTX_MAX_RETRIES; priv->last_dts = -1; priv->last_rtptime = -1; @@ -725,6 +832,7 @@ g_cond_init (&priv->jbuf_timer); g_cond_init (&priv->jbuf_event); g_cond_init (&priv->jbuf_query); + g_queue_init (&priv->gap_packets); /* reset skew detection initialy */ rtp_jitter_buffer_reset_skew (priv->jbuf); @@ -790,12 +898,28 @@ static void free_item (RTPJitterBufferItem * item) { + g_return_if_fail (item != NULL); + if (item->data && item->type != ITEM_TYPE_QUERY) gst_mini_object_unref (item->data); g_slice_free (RTPJitterBufferItem, item); } static void +free_item_and_retain_events (RTPJitterBufferItem * item, gpointer user_data) +{ + GList **l = user_data; + + if (item->data && item->type == ITEM_TYPE_EVENT + && GST_EVENT_IS_STICKY (item->data)) { + *l = g_list_prepend (*l, item->data); + } else if (item->data && item->type != ITEM_TYPE_QUERY) { + gst_mini_object_unref (item->data); + } + g_slice_free (RTPJitterBufferItem, item); +} + +static void gst_rtp_jitter_buffer_finalize (GObject * object) { GstRtpJitterBuffer *jitterbuffer; @@ -811,6 +935,8 @@ g_cond_clear (&priv->jbuf_query); rtp_jitter_buffer_flush (priv->jbuf, (GFunc) free_item, NULL); + g_queue_foreach (&priv->gap_packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (&priv->gap_packets); g_object_unref (priv->jbuf); G_OBJECT_CLASS (parent_class)->finalize (object); @@ -821,7 +947,7 @@ { GstRtpJitterBuffer *jitterbuffer; GstPad *otherpad = NULL; - GstIterator *it; + GstIterator *it = NULL; GValue val = { 0, }; jitterbuffer = GST_RTP_JITTER_BUFFER_CAST (parent); @@ -831,13 +957,15 @@ } else if (pad == jitterbuffer->priv->srcpad) { otherpad = jitterbuffer->priv->sinkpad; } else if (pad == jitterbuffer->priv->rtcpsinkpad) { - otherpad = NULL; + it = gst_iterator_new_single (GST_TYPE_PAD, NULL); } - g_value_init (&val, GST_TYPE_PAD); - g_value_set_object (&val, otherpad); - it = gst_iterator_new_single (GST_TYPE_PAD, &val); - g_value_unset (&val); + if (it == NULL) { + g_value_init (&val, GST_TYPE_PAD); + g_value_set_object (&val, otherpad); + it = gst_iterator_new_single (GST_TYPE_PAD, &val); + g_value_unset (&val); + } return it; } @@ -1102,6 +1230,9 @@ priv->next_seqnum = val; JBUF_SIGNAL_EVENT (priv); } + priv->seqnum_base = val; + } else { + priv->seqnum_base = -1; } GST_DEBUG_OBJECT (jitterbuffer, "got seqnum-base %d", priv->next_in_seqnum); @@ -1170,6 +1301,7 @@ priv->last_popped_seqnum = -1; priv->last_out_time = -1; priv->next_seqnum = -1; + priv->seqnum_base = -1; priv->ips_rtptime = -1; priv->ips_dts = GST_CLOCK_TIME_NONE; priv->packet_spacing = 0; @@ -1183,11 +1315,14 @@ priv->avg_jitter = 0; priv->last_dts = -1; priv->last_rtptime = -1; + priv->last_in_dts = 0; GST_DEBUG_OBJECT (jitterbuffer, "flush and reset jitterbuffer"); rtp_jitter_buffer_flush (priv->jbuf, (GFunc) free_item, NULL); rtp_jitter_buffer_disable_buffering (priv->jbuf, FALSE); rtp_jitter_buffer_reset_skew (priv->jbuf); remove_all_timers (jitterbuffer); + g_queue_foreach (&priv->gap_packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (&priv->gap_packets); JBUF_UNLOCK (priv); } @@ -1364,9 +1499,7 @@ GstCaps *caps; gst_event_parse_caps (event, &caps); - if (!gst_jitter_buffer_sink_parse_caps (jitterbuffer, caps)) - goto wrong_caps; - + gst_jitter_buffer_sink_parse_caps (jitterbuffer, caps); break; } case GST_EVENT_SEGMENT: @@ -1377,7 +1510,7 @@ goto newseg_wrong_format; GST_DEBUG_OBJECT (jitterbuffer, - "newsegment: %" GST_SEGMENT_FORMAT, &priv->segment); + "segment: %" GST_SEGMENT_FORMAT, &priv->segment); break; case GST_EVENT_EOS: priv->eos = TRUE; @@ -1397,12 +1530,6 @@ return TRUE; /* ERRORS */ -wrong_caps: - { - GST_DEBUG_OBJECT (jitterbuffer, "received invalid caps"); - gst_event_unref (event); - return FALSE; - } newseg_wrong_format: { GST_DEBUG_OBJECT (jitterbuffer, "received non TIME newsegment"); @@ -1789,6 +1916,29 @@ unschedule_current_timer (jitterbuffer); } +/* get the extra delay to wait before sending RTX */ +static GstClockTime +get_rtx_delay (GstRtpJitterBufferPrivate * priv) +{ + GstClockTime delay; + + if (priv->rtx_delay == -1) { + if (priv->avg_jitter == 0 && priv->packet_spacing == 0) { + delay = DEFAULT_AUTO_RTX_DELAY; + } else { + /* jitter is in nanoseconds, maximum of 2x jitter and half the + * packet spacing is a good margin */ + delay = MAX (priv->avg_jitter * 2, priv->packet_spacing / 2); + } + } else { + delay = priv->rtx_delay * GST_MSECOND; + } + if (priv->rtx_min_delay > 0) + delay = MAX (delay, priv->rtx_min_delay * GST_MSECOND); + + return delay; +} + /* we just received a packet with seqnum and dts. * * First check for old seqnum that we are still expecting. If the gap with the @@ -1836,7 +1986,7 @@ } do_next_seqnum = do_next_seqnum && priv->packet_spacing > 0 - && priv->do_retransmission; + && priv->do_retransmission && priv->rtx_next_seqnum; if (timer && timer->type != TIMER_TYPE_DEADLINE) { if (timer->num_rtx_retry > 0) { @@ -1880,29 +2030,22 @@ } } - if (do_next_seqnum) { + if (do_next_seqnum && dts != GST_CLOCK_TIME_NONE) { GstClockTime expected, delay; /* calculate expected arrival time of the next seqnum */ expected = dts + priv->packet_spacing; - if (priv->rtx_delay == -1) { - if (priv->avg_jitter == 0) - delay = DEFAULT_AUTO_RTX_DELAY; - else - /* jitter is in nanoseconds, 2x jitter is a good margin */ - delay = priv->avg_jitter * 2; - } else { - delay = priv->rtx_delay * GST_MSECOND; - } + delay = get_rtx_delay (priv); /* and update/install timer for next seqnum */ - if (timer) + if (timer) { reschedule_timer (jitterbuffer, timer, priv->next_in_seqnum, expected, delay, TRUE); - else + } else { add_timer (jitterbuffer, TIMER_TYPE_EXPECTED, priv->next_in_seqnum, 0, expected, delay, priv->packet_spacing); + } } else if (timer && timer->type != TIMER_TYPE_DEADLINE) { /* if we had a timer, remove it, we don't know when to expect the next * packet. */ @@ -1921,9 +2064,28 @@ if (priv->ips_rtptime != rtptime) { /* rtptime changed, check dts diff */ if (priv->ips_dts != -1 && dts != -1 && dts > priv->ips_dts) { - priv->packet_spacing = dts - priv->ips_dts; + GstClockTime new_packet_spacing = dts - priv->ips_dts; + GstClockTime old_packet_spacing = priv->packet_spacing; + + /* Biased towards bigger packet spacings to prevent + * too many unneeded retransmission requests for next + * packets that just arrive a little later than we would + * expect */ + if (old_packet_spacing > new_packet_spacing) + priv->packet_spacing = + (new_packet_spacing + 3 * old_packet_spacing) / 4; + else if (old_packet_spacing > 0) + priv->packet_spacing = + (3 * new_packet_spacing + old_packet_spacing) / 4; + else + priv->packet_spacing = new_packet_spacing; + GST_DEBUG_OBJECT (jitterbuffer, - "new packet spacing %" GST_TIME_FORMAT, + "new packet spacing %" GST_TIME_FORMAT + " old packet spacing %" GST_TIME_FORMAT + " combined to %" GST_TIME_FORMAT, + GST_TIME_ARGS (new_packet_spacing), + GST_TIME_ARGS (old_packet_spacing), GST_TIME_ARGS (priv->packet_spacing)); } priv->ips_rtptime = rtptime; @@ -1943,6 +2105,11 @@ "dts %" GST_TIME_FORMAT ", last %" GST_TIME_FORMAT, GST_TIME_ARGS (dts), GST_TIME_ARGS (priv->last_in_dts)); + if (dts == GST_CLOCK_TIME_NONE) { + GST_WARNING_OBJECT (jitterbuffer, "Have no DTS"); + return; + } + /* the total duration spanned by the missing packets */ if (dts >= priv->last_in_dts) total_duration = dts - priv->last_in_dts; @@ -1961,29 +2128,35 @@ GstClockTime gap_time; guint lost_packets; - gap_time = total_duration - priv->latency_ns; - if (duration > 0) { + GstClockTime gap_dur = gap * duration; + if (gap_dur > priv->latency_ns) + gap_time = gap_dur - priv->latency_ns; + else + gap_time = 0; lost_packets = gap_time / duration; - gap_time = lost_packets * duration; } else { + gap_time = total_duration - priv->latency_ns; lost_packets = gap; } /* too many lost packets, some of the missing packets are already * too late and we can generate lost packet events for them. */ - GST_DEBUG_OBJECT (jitterbuffer, "too many lost packets %" GST_TIME_FORMAT - " > %" GST_TIME_FORMAT ", consider %u lost", - GST_TIME_ARGS (total_duration), GST_TIME_ARGS (priv->latency_ns), - lost_packets); + GST_DEBUG_OBJECT (jitterbuffer, + "lost packets (%d, #%d->#%d) duration too large %" GST_TIME_FORMAT + " > %" GST_TIME_FORMAT ", consider %u lost (%" GST_TIME_FORMAT ")", + gap, expected, seqnum, GST_TIME_ARGS (total_duration), + GST_TIME_ARGS (priv->latency_ns), lost_packets, + GST_TIME_ARGS (gap_time)); /* this timer will fire immediately and the lost event will be pushed from * the timer thread */ - add_timer (jitterbuffer, TIMER_TYPE_LOST, expected, lost_packets, - priv->last_in_dts + duration, 0, gap_time); - - expected += lost_packets; - priv->last_in_dts += gap_time; + if (lost_packets > 0) { + add_timer (jitterbuffer, TIMER_TYPE_LOST, expected, lost_packets, + priv->last_in_dts + duration, 0, gap_time); + expected += lost_packets; + priv->last_in_dts += gap_time; + } } expected_dts = priv->last_in_dts + duration; @@ -1997,7 +2170,7 @@ GstClockTime timeout = timer->timeout; timer->duration = duration; - if (timeout > expected_dts) { + if (timeout > (expected_dts + timer->rtx_retry)) { GstClockTime delay = timeout - expected_dts - timer->rtx_retry; reschedule_timer (jitterbuffer, timer, timer->seqnum, expected_dts, delay, TRUE); @@ -2071,6 +2244,119 @@ } } +static gint +compare_buffer_seqnum (GstBuffer * a, GstBuffer * b, gpointer user_data) +{ + GstRTPBuffer rtp_a = GST_RTP_BUFFER_INIT; + GstRTPBuffer rtp_b = GST_RTP_BUFFER_INIT; + guint seq_a, seq_b; + + gst_rtp_buffer_map (a, GST_MAP_READ, &rtp_a); + seq_a = gst_rtp_buffer_get_seq (&rtp_a); + gst_rtp_buffer_unmap (&rtp_a); + + gst_rtp_buffer_map (b, GST_MAP_READ, &rtp_b); + seq_b = gst_rtp_buffer_get_seq (&rtp_b); + gst_rtp_buffer_unmap (&rtp_b); + + return gst_rtp_buffer_compare_seqnum (seq_b, seq_a); +} + +static gboolean +handle_big_gap_buffer (GstRtpJitterBuffer * jitterbuffer, gboolean future, + GstBuffer * buffer, guint8 pt, guint16 seqnum, gint gap) +{ + GstRtpJitterBufferPrivate *priv; + guint gap_packets_length; + gboolean reset = FALSE; + + priv = jitterbuffer->priv; + + if ((gap_packets_length = g_queue_get_length (&priv->gap_packets)) > 0) { + GList *l; + guint32 prev_gap_seq = -1; + gboolean all_consecutive = TRUE; + + g_queue_insert_sorted (&priv->gap_packets, buffer, + (GCompareDataFunc) compare_buffer_seqnum, NULL); + + for (l = priv->gap_packets.head; l; l = l->next) { + GstBuffer *gap_buffer = l->data; + GstRTPBuffer gap_rtp = GST_RTP_BUFFER_INIT; + guint32 gap_seq; + + gst_rtp_buffer_map (gap_buffer, GST_MAP_READ, &gap_rtp); + + all_consecutive = (gst_rtp_buffer_get_payload_type (&gap_rtp) == pt); + + gap_seq = gst_rtp_buffer_get_seq (&gap_rtp); + if (prev_gap_seq == -1) + prev_gap_seq = gap_seq; + else if (gst_rtp_buffer_compare_seqnum (gap_seq, prev_gap_seq) != -1) + all_consecutive = FALSE; + else + prev_gap_seq = gap_seq; + + gst_rtp_buffer_unmap (&gap_rtp); + if (!all_consecutive) + break; + } + + if (all_consecutive && gap_packets_length > 3) { + GST_DEBUG_OBJECT (jitterbuffer, + "buffer too %s %d < %d, got 5 consecutive ones - reset", + (future ? "new" : "old"), gap, + (future ? RTP_MAX_DROPOUT : -RTP_MAX_MISORDER)); + reset = TRUE; + } else if (!all_consecutive) { + g_queue_foreach (&priv->gap_packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (&priv->gap_packets); + GST_DEBUG_OBJECT (jitterbuffer, + "buffer too %s %d < %d, got no 5 consecutive ones - dropping", + (future ? "new" : "old"), gap, + (future ? RTP_MAX_DROPOUT : -RTP_MAX_MISORDER)); + buffer = NULL; + } else { + GST_DEBUG_OBJECT (jitterbuffer, + "buffer too %s %d < %d, got %u consecutive ones - waiting", + (future ? "new" : "old"), gap, + (future ? RTP_MAX_DROPOUT : -RTP_MAX_MISORDER), + gap_packets_length + 1); + buffer = NULL; + } + } else { + GST_DEBUG_OBJECT (jitterbuffer, + "buffer too %s %d < %d, first one - waiting", (future ? "new" : "old"), + gap, -RTP_MAX_MISORDER); + g_queue_push_tail (&priv->gap_packets, buffer); + buffer = NULL; + } + + return reset; +} + +static GstClockTime +get_current_running_time (GstRtpJitterBuffer * jitterbuffer) +{ + GstClock *clock = gst_element_get_clock (GST_ELEMENT_CAST (jitterbuffer)); + GstClockTime running_time = GST_CLOCK_TIME_NONE; + + if (clock) { + GstClockTime base_time = + gst_element_get_base_time (GST_ELEMENT_CAST (jitterbuffer)); + GstClockTime clock_time = gst_clock_get_time (clock); + + if (clock_time > base_time) + running_time = clock_time - base_time; + else + running_time = 0; + + gst_object_unref (clock); + } + + return running_time; +} + static GstFlowReturn gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) @@ -2089,6 +2375,7 @@ gboolean do_next_seqnum = FALSE; RTPJitterBufferItem *item; GstMessage *msg = NULL; + gboolean estimated_dts = FALSE; jitterbuffer = GST_RTP_JITTER_BUFFER_CAST (parent); @@ -2110,12 +2397,26 @@ else if (pts == -1) pts = dts; - /* take the DTS of the buffer. This is the time when the packet was - * received and is used to calculate jitter and clock skew. We will adjust - * this DTS with the smoothed value after processing it in the - * jitterbuffer and assign it as the PTS. */ - /* bring to running time */ - dts = gst_segment_to_running_time (&priv->segment, GST_FORMAT_TIME, dts); + if (dts == -1) { + /* If we have no DTS here, i.e. no capture time, get one from the + * clock now to have something to calculate with in the future. */ + dts = get_current_running_time (jitterbuffer); + pts = dts; + + /* Remember that we estimated the DTS if we are running already + * and this is not our first packet (or first packet after a reset). + * If it's the first packet, we somehow must generate a timestamp for + * everything, otherwise we can't calculate any times + */ + estimated_dts = (priv->next_in_seqnum != -1); + } else { + /* take the DTS of the buffer. This is the time when the packet was + * received and is used to calculate jitter and clock skew. We will adjust + * this DTS with the smoothed value after processing it in the + * jitterbuffer and assign it as the PTS. */ + /* bring to running time */ + dts = gst_segment_to_running_time (&priv->segment, GST_FORMAT_TIME, dts); + } GST_DEBUG_OBJECT (jitterbuffer, "Received packet #%d at time %" GST_TIME_FORMAT ", discont %d", seqnum, @@ -2157,6 +2458,26 @@ calculate_jitter (jitterbuffer, dts, rtptime); + if (priv->seqnum_base != -1) { + gint gap; + + gap = gst_rtp_buffer_compare_seqnum (priv->seqnum_base, seqnum); + + if (gap < 0) { + GST_DEBUG_OBJECT (jitterbuffer, + "packet seqnum #%d before seqnum-base #%d", seqnum, + priv->seqnum_base); + gst_buffer_unref (buffer); + ret = GST_FLOW_OK; + goto finished; + } else if (gap > 16384) { + /* From now on don't compare against the seqnum base anymore as + * at some point in the future we will wrap around and also that + * much reordering is very unlikely */ + priv->seqnum_base = -1; + } + } + expected = priv->next_in_seqnum; /* now check against our expected seqnum */ @@ -2178,21 +2499,34 @@ if (gap < 0) { /* we received an old packet */ - if (G_UNLIKELY (gap < -RTP_MAX_MISORDER)) { - /* too old packet, reset */ - GST_DEBUG_OBJECT (jitterbuffer, "reset: buffer too old %d < %d", gap, - -RTP_MAX_MISORDER); - reset = TRUE; + if (G_UNLIKELY (gap != -1 && gap < -RTP_MAX_MISORDER)) { + reset = + handle_big_gap_buffer (jitterbuffer, FALSE, buffer, pt, seqnum, + gap); + buffer = NULL; } else { GST_DEBUG_OBJECT (jitterbuffer, "old packet received"); } } else { /* new packet, we are missing some packets */ - if (G_UNLIKELY (gap > RTP_MAX_DROPOUT)) { - /* packet too far in future, reset */ - GST_DEBUG_OBJECT (jitterbuffer, "reset: buffer too new %d > %d", gap, + if (G_UNLIKELY (priv->timers->len >= RTP_MAX_DROPOUT)) { + /* If we have timers for more than RTP_MAX_DROPOUT packets + * pending this means that we have a huge gap overall. We can + * reset the jitterbuffer at this point because there's + * just too much data missing to be able to do anything + * sensible with the past data. Just try again from the + * next packet */ + GST_WARNING_OBJECT (jitterbuffer, + "%d pending timers > %d - resetting", priv->timers->len, RTP_MAX_DROPOUT); reset = TRUE; + gst_buffer_unref (buffer); + buffer = NULL; + } else if (G_UNLIKELY (gap >= RTP_MAX_DROPOUT)) { + reset = + handle_big_gap_buffer (jitterbuffer, TRUE, buffer, pt, seqnum, + gap); + buffer = NULL; } else { GST_DEBUG_OBJECT (jitterbuffer, "%d missing packets", gap); /* fill in the gap with EXPECTED timers */ @@ -2202,14 +2536,57 @@ } } if (G_UNLIKELY (reset)) { + GList *events = NULL, *l; + GList *buffers; + GST_DEBUG_OBJECT (jitterbuffer, "flush and reset jitterbuffer"); - rtp_jitter_buffer_flush (priv->jbuf, (GFunc) free_item, NULL); + rtp_jitter_buffer_flush (priv->jbuf, + (GFunc) free_item_and_retain_events, &events); rtp_jitter_buffer_reset_skew (priv->jbuf); remove_all_timers (jitterbuffer); + priv->discont = TRUE; priv->last_popped_seqnum = -1; priv->next_seqnum = seqnum; - do_next_seqnum = TRUE; + + priv->last_in_dts = -1; + priv->next_in_seqnum = -1; + + /* Insert all sticky events again in order, otherwise we would + * potentially loose STREAM_START, CAPS or SEGMENT events + */ + events = g_list_reverse (events); + for (l = events; l; l = l->next) { + RTPJitterBufferItem *item; + + item = alloc_item (l->data, ITEM_TYPE_EVENT, -1, -1, -1, 0, -1); + rtp_jitter_buffer_insert (priv->jbuf, item, &head, NULL); + } + g_list_free (events); + JBUF_SIGNAL_EVENT (priv); + + /* reset spacing estimation when gap */ + priv->ips_rtptime = -1; + priv->ips_dts = GST_CLOCK_TIME_NONE; + + buffers = g_list_copy (priv->gap_packets.head); + g_queue_clear (&priv->gap_packets); + + priv->ips_rtptime = -1; + priv->ips_dts = GST_CLOCK_TIME_NONE; + JBUF_UNLOCK (jitterbuffer->priv); + + for (l = buffers; l; l = l->next) { + ret = gst_rtp_jitter_buffer_chain (pad, parent, l->data); + l->data = NULL; + if (ret != GST_FLOW_OK) + break; + } + for (; l; l = l->next) + gst_buffer_unref (l->data); + g_list_free (buffers); + + return ret; } /* reset spacing estimation when gap */ priv->ips_rtptime = -1; @@ -2217,6 +2594,7 @@ } } else { GST_DEBUG_OBJECT (jitterbuffer, "First buffer #%d", seqnum); + /* we don't know what the next_in_seqnum should be, wait for the last * possible moment to push this buffer, maybe we get an earlier seqnum * while we wait */ @@ -2226,8 +2604,20 @@ priv->ips_rtptime = rtptime; priv->ips_dts = dts; } + + /* We had no huge gap, let's drop all the gap packets */ + if (buffer != NULL) { + GST_DEBUG_OBJECT (jitterbuffer, "Clearing gap packets"); + g_queue_foreach (&priv->gap_packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (&priv->gap_packets); + } else { + GST_DEBUG_OBJECT (jitterbuffer, + "Had big gap, waiting for more consecutive packets"); + JBUF_UNLOCK (jitterbuffer->priv); + return GST_FLOW_OK; + } + if (do_next_seqnum) { - priv->last_in_seqnum = seqnum; priv->last_in_dts = dts; priv->next_in_seqnum = (seqnum + 1) & 0xffff; } @@ -2270,7 +2660,16 @@ } } - item = alloc_item (buffer, ITEM_TYPE_BUFFER, dts, pts, seqnum, 1, rtptime); + /* If we estimated the DTS, don't consider it in the clock skew calculations + * later. The code above always sets dts to pts or the other way around if + * any of those is valid in the buffer, so we know that if we estimated the + * dts that both are unknown */ + if (estimated_dts) + item = + alloc_item (buffer, ITEM_TYPE_BUFFER, GST_CLOCK_TIME_NONE, + GST_CLOCK_TIME_NONE, seqnum, 1, rtptime); + else + item = alloc_item (buffer, ITEM_TYPE_BUFFER, dts, pts, seqnum, 1, rtptime); /* now insert the packet into the queue in sorted order. This function returns * FALSE if a packet with the same seqnum was already in the queue, meaning we @@ -2374,10 +2773,12 @@ GST_LOG_OBJECT (jitterbuffer, "rtp %" G_GUINT32_FORMAT ", ext %" G_GUINT64_FORMAT, rtp_time, priv->ext_timestamp); - if (rtp_time < priv->ext_timestamp) { + ext_time = priv->ext_timestamp; + ext_time = gst_rtp_buffer_ext_timestamp (&ext_time, rtp_time); + if (ext_time < priv->ext_timestamp) { ext_time = priv->ext_timestamp; } else { - ext_time = gst_rtp_buffer_ext_timestamp (&priv->ext_timestamp, rtp_time); + priv->ext_timestamp = ext_time; } if (ext_time > priv->clock_base) @@ -2544,8 +2945,16 @@ break; case ITEM_TYPE_LOST: case ITEM_TYPE_EVENT: - GST_DEBUG_OBJECT (jitterbuffer, "Pushing event %" GST_PTR_FORMAT - ", seqnum %d", outevent, seqnum); + /* We got not enough consecutive packets with a huge gap, we can + * as well just drop them here now on EOS */ + if (GST_EVENT_TYPE (outevent) == GST_EVENT_EOS) { + GST_DEBUG_OBJECT (jitterbuffer, "Clearing gap packets on EOS"); + g_queue_foreach (&priv->gap_packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (&priv->gap_packets); + } + + GST_DEBUG_OBJECT (jitterbuffer, "%sPushing event %" GST_PTR_FORMAT + ", seqnum %d", do_push ? "" : "NOT ", outevent, seqnum); if (do_push) gst_pad_push_event (priv->srcpad, outevent); @@ -2588,30 +2997,31 @@ handle_next_buffer (GstRtpJitterBuffer * jitterbuffer) { GstRtpJitterBufferPrivate *priv = jitterbuffer->priv; - GstFlowReturn result = GST_FLOW_OK; + GstFlowReturn result; RTPJitterBufferItem *item; guint seqnum; guint32 next_seqnum; - gint gap; /* only push buffers when PLAYING and active and not buffering */ if (priv->blocked || !priv->active || - rtp_jitter_buffer_is_buffering (priv->jbuf)) + rtp_jitter_buffer_is_buffering (priv->jbuf)) { return GST_FLOW_WAIT; + } -again: /* peek a buffer, we're just looking at the sequence number. * If all is fine, we'll pop and push it. If the sequence number is wrong we * wait for a timeout or something to change. * The peeked buffer is valid for as long as we hold the jitterbuffer lock. */ item = rtp_jitter_buffer_peek (priv->jbuf); - if (item == NULL) + if (item == NULL) { goto wait; + } /* get the seqnum and the next expected seqnum */ seqnum = item->seqnum; - if (seqnum == -1) - goto do_push; + if (seqnum == -1) { + return pop_and_push_next (jitterbuffer, seqnum); + } next_seqnum = priv->next_seqnum; @@ -2624,22 +3034,19 @@ * fires, so wait for that */ result = GST_FLOW_WAIT; } else { - /* else calculate GAP */ - gap = gst_rtp_buffer_compare_seqnum (next_seqnum, seqnum); + gint gap = gst_rtp_buffer_compare_seqnum (next_seqnum, seqnum); if (G_LIKELY (gap == 0)) { - do_push: /* no missing packet, pop and push */ result = pop_and_push_next (jitterbuffer, seqnum); } else if (G_UNLIKELY (gap < 0)) { - RTPJitterBufferItem *item; /* if we have a packet that we already pushed or considered dropped, pop it * off and get the next packet */ GST_DEBUG_OBJECT (jitterbuffer, "Old packet #%d, next #%d dropping", seqnum, next_seqnum); item = rtp_jitter_buffer_pop (priv->jbuf, NULL); free_item (item); - goto again; + result = GST_FLOW_OK; } else { /* the chain function has scheduled timers to request retransmission or * when to consider the packet lost, wait for that */ @@ -2649,33 +3056,25 @@ result = GST_FLOW_WAIT; } } + return result; wait: { GST_DEBUG_OBJECT (jitterbuffer, "no buffer, going to wait"); - if (priv->eos) - result = GST_FLOW_EOS; - else - result = GST_FLOW_WAIT; - return result; + if (priv->eos) { + return GST_FLOW_EOS; + } else { + return GST_FLOW_WAIT; + } } } -/* the timeout for when we expected a packet expired */ -static gboolean -do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer, - GstClockTime now) +static GstClockTime +get_rtx_retry_timeout (GstRtpJitterBufferPrivate * priv) { - GstRtpJitterBufferPrivate *priv = jitterbuffer->priv; - GstEvent *event; - guint delay; - GstClockTime rtx_retry_period; GstClockTime rtx_retry_timeout; - GstClock *clock; - - GST_DEBUG_OBJECT (jitterbuffer, "expected %d didn't arrive, now %" - GST_TIME_FORMAT, timer->seqnum, GST_TIME_ARGS (now)); + GstClockTime rtx_min_retry_timeout; if (priv->rtx_retry_timeout == -1) { if (priv->avg_rtx_rtt == 0) @@ -2687,32 +3086,79 @@ } else { rtx_retry_timeout = priv->rtx_retry_timeout * GST_MSECOND; } + /* make sure we don't retry too often. On very low latency networks, + * the RTT and jitter can be very low. */ + if (priv->rtx_min_retry_timeout == -1) { + rtx_min_retry_timeout = priv->packet_spacing; + } else { + rtx_min_retry_timeout = priv->rtx_min_retry_timeout * GST_MSECOND; + } + rtx_retry_timeout = MAX (rtx_retry_timeout, rtx_min_retry_timeout); + + return rtx_retry_timeout; +} + +static GstClockTime +get_rtx_retry_period (GstRtpJitterBufferPrivate * priv, + GstClockTime rtx_retry_timeout) +{ + GstClockTime rtx_retry_period; if (priv->rtx_retry_period == -1) { /* we retry up to the configured jitterbuffer size but leaving some * room for the retransmission to arrive in time */ - rtx_retry_period = priv->latency_ns - rtx_retry_timeout; + if (rtx_retry_timeout > priv->latency_ns) { + rtx_retry_period = 0; + } else { + rtx_retry_period = priv->latency_ns - rtx_retry_timeout; + } } else { rtx_retry_period = priv->rtx_retry_period * GST_MSECOND; } + return rtx_retry_period; +} + +/* the timeout for when we expected a packet expired */ +static gboolean +do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer, + GstClockTime now) +{ + GstRtpJitterBufferPrivate *priv = jitterbuffer->priv; + GstEvent *event; + guint delay, delay_ms, avg_rtx_rtt_ms; + guint rtx_retry_timeout_ms, rtx_retry_period_ms; + GstClockTime rtx_retry_period; + GstClockTime rtx_retry_timeout; + GstClock *clock; + + GST_DEBUG_OBJECT (jitterbuffer, "expected %d didn't arrive, now %" + GST_TIME_FORMAT, timer->seqnum, GST_TIME_ARGS (now)); + + rtx_retry_timeout = get_rtx_retry_timeout (priv); + rtx_retry_period = get_rtx_retry_period (priv, rtx_retry_timeout); GST_DEBUG_OBJECT (jitterbuffer, "timeout %" GST_TIME_FORMAT ", period %" GST_TIME_FORMAT, GST_TIME_ARGS (rtx_retry_timeout), GST_TIME_ARGS (rtx_retry_period)); delay = timer->rtx_delay + timer->rtx_retry; + + delay_ms = GST_TIME_AS_MSECONDS (delay); + rtx_retry_timeout_ms = GST_TIME_AS_MSECONDS (rtx_retry_timeout); + rtx_retry_period_ms = GST_TIME_AS_MSECONDS (rtx_retry_period); + avg_rtx_rtt_ms = GST_TIME_AS_MSECONDS (priv->avg_rtx_rtt); + event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("GstRTPRetransmissionRequest", "seqnum", G_TYPE_UINT, (guint) timer->seqnum, "running-time", G_TYPE_UINT64, timer->rtx_base, - "delay", G_TYPE_UINT, GST_TIME_AS_MSECONDS (delay), + "delay", G_TYPE_UINT, delay_ms, "retry", G_TYPE_UINT, timer->num_rtx_retry, - "frequency", G_TYPE_UINT, GST_TIME_AS_MSECONDS (rtx_retry_timeout), - "period", G_TYPE_UINT, GST_TIME_AS_MSECONDS (rtx_retry_period), + "frequency", G_TYPE_UINT, rtx_retry_timeout_ms, + "period", G_TYPE_UINT, rtx_retry_period_ms, "deadline", G_TYPE_UINT, priv->latency_ms, "packet-spacing", G_TYPE_UINT64, priv->packet_spacing, - "avg-rtt", G_TYPE_UINT, GST_TIME_AS_MSECONDS (priv->avg_rtx_rtt), - NULL)); + "avg-rtt", G_TYPE_UINT, avg_rtx_rtt_ms, NULL)); priv->num_rtx_requests++; timer->num_rtx_retry++; @@ -2732,8 +3178,9 @@ GST_TIME_FORMAT ", retry %" GST_TIME_FORMAT ", num_retry %u", GST_TIME_ARGS (timer->rtx_base), GST_TIME_ARGS (timer->rtx_delay), GST_TIME_ARGS (timer->rtx_retry), timer->num_rtx_retry); - - if (timer->rtx_retry + timer->rtx_delay > rtx_retry_period) { + if ((priv->rtx_max_retries != -1 + && timer->num_rtx_retry >= priv->rtx_max_retries) + || (timer->rtx_retry + timer->rtx_delay > rtx_retry_period)) { GST_DEBUG_OBJECT (jitterbuffer, "reschedule as LOST timer"); /* too many retransmission request, we now convert the timer * to a lost timer, leave the num_rtx_retry as it is for stats */ @@ -2759,7 +3206,7 @@ GstRtpJitterBufferPrivate *priv = jitterbuffer->priv; GstClockTime duration, timestamp; guint seqnum, lost_packets, num_rtx_retry, next_in_seqnum; - gboolean late, head; + gboolean head; GstEvent *event; RTPJitterBufferItem *item; @@ -2769,7 +3216,6 @@ if (duration == GST_CLOCK_TIME_NONE && priv->packet_spacing > 0) duration = priv->packet_spacing; lost_packets = MAX (timer->num, 1); - late = timer->num > 0; num_rtx_retry = timer->num_rtx_retry; /* we had a gap and thus we lost some packets. Create an event for this. */ @@ -2794,7 +3240,6 @@ "seqnum", G_TYPE_UINT, (guint) seqnum, "timestamp", G_TYPE_UINT64, timestamp, "duration", G_TYPE_UINT64, duration, - "late", G_TYPE_BOOLEAN, late, "retry", G_TYPE_UINT, num_rtx_retry, NULL)); item = alloc_item (event, ITEM_TYPE_LOST, -1, -1, seqnum, lost_packets, -1); @@ -2885,6 +3330,19 @@ GstClockTime timer_timeout = -1; gint i, len; + /* If we have a clock, update "now" now with the very latest running time + * we have. It is used below when timeouts are triggered to calculate + * any next possible timeout. If we only update it after waiting for the + * clock, we would give a too old time to the timeout functions. + */ + GST_OBJECT_LOCK (jitterbuffer); + if (GST_ELEMENT_CLOCK (jitterbuffer)) { + now = + gst_clock_get_time (GST_ELEMENT_CLOCK (jitterbuffer)) - + GST_ELEMENT_CAST (jitterbuffer)->base_time; + } + GST_OBJECT_UNLOCK (jitterbuffer); + GST_DEBUG_OBJECT (jitterbuffer, "now %" GST_TIME_FORMAT, GST_TIME_ARGS (now)); @@ -2978,7 +3436,6 @@ } if (ret != GST_CLOCK_UNSCHEDULED) { - now = timer_timeout + MAX (clock_jitter, 0); GST_DEBUG_OBJECT (jitterbuffer, "sync done, %d, #%d, %" G_GINT64_FORMAT, ret, priv->timer_seqnum, clock_jitter); } else { @@ -3020,8 +3477,7 @@ JBUF_WAIT_EVENT (priv, flushing); result = GST_FLOW_OK; } - } - while (result == GST_FLOW_OK); + } while (result == GST_FLOW_OK); /* store result for upstream */ priv->srcresult = result; /* if we get here we need to pause */ @@ -3151,7 +3607,7 @@ jitterbuffer = GST_RTP_JITTER_BUFFER (parent); - if (G_UNLIKELY (!gst_rtcp_buffer_validate (buffer))) + if (G_UNLIKELY (!gst_rtcp_buffer_validate_reduced (buffer))) goto invalid_buffer; priv = jitterbuffer->priv; @@ -3433,11 +3889,21 @@ priv->do_retransmission = g_value_get_boolean (value); JBUF_UNLOCK (priv); break; + case PROP_RTX_NEXT_SEQNUM: + JBUF_LOCK (priv); + priv->rtx_next_seqnum = g_value_get_boolean (value); + JBUF_UNLOCK (priv); + break; case PROP_RTX_DELAY: JBUF_LOCK (priv); priv->rtx_delay = g_value_get_int (value); JBUF_UNLOCK (priv); break; + case PROP_RTX_MIN_DELAY: + JBUF_LOCK (priv); + priv->rtx_min_delay = g_value_get_uint (value); + JBUF_UNLOCK (priv); + break; case PROP_RTX_DELAY_REORDER: JBUF_LOCK (priv); priv->rtx_delay_reorder = g_value_get_int (value); @@ -3448,11 +3914,21 @@ priv->rtx_retry_timeout = g_value_get_int (value); JBUF_UNLOCK (priv); break; + case PROP_RTX_MIN_RETRY_TIMEOUT: + JBUF_LOCK (priv); + priv->rtx_min_retry_timeout = g_value_get_int (value); + JBUF_UNLOCK (priv); + break; case PROP_RTX_RETRY_PERIOD: JBUF_LOCK (priv); priv->rtx_retry_period = g_value_get_int (value); JBUF_UNLOCK (priv); break; + case PROP_RTX_MAX_RETRIES: + JBUF_LOCK (priv); + priv->rtx_max_retries = g_value_get_int (value); + JBUF_UNLOCK (priv); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -3514,11 +3990,21 @@ g_value_set_boolean (value, priv->do_retransmission); JBUF_UNLOCK (priv); break; + case PROP_RTX_NEXT_SEQNUM: + JBUF_LOCK (priv); + g_value_set_boolean (value, priv->rtx_next_seqnum); + JBUF_UNLOCK (priv); + break; case PROP_RTX_DELAY: JBUF_LOCK (priv); g_value_set_int (value, priv->rtx_delay); JBUF_UNLOCK (priv); break; + case PROP_RTX_MIN_DELAY: + JBUF_LOCK (priv); + g_value_set_uint (value, priv->rtx_min_delay); + JBUF_UNLOCK (priv); + break; case PROP_RTX_DELAY_REORDER: JBUF_LOCK (priv); g_value_set_int (value, priv->rtx_delay_reorder); @@ -3529,11 +4015,21 @@ g_value_set_int (value, priv->rtx_retry_timeout); JBUF_UNLOCK (priv); break; + case PROP_RTX_MIN_RETRY_TIMEOUT: + JBUF_LOCK (priv); + g_value_set_int (value, priv->rtx_min_retry_timeout); + JBUF_UNLOCK (priv); + break; case PROP_RTX_RETRY_PERIOD: JBUF_LOCK (priv); g_value_set_int (value, priv->rtx_retry_period); JBUF_UNLOCK (priv); break; + case PROP_RTX_MAX_RETRIES: + JBUF_LOCK (priv); + g_value_set_int (value, priv->rtx_max_retries); + JBUF_UNLOCK (priv); + break; case PROP_STATS: g_value_take_boxed (value, gst_rtp_jitter_buffer_create_stats (jitterbuffer)); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpmux.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpmux.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpmux.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpmux.c 2015-10-22 08:02:54.000000000 +0000 @@ -35,7 +35,7 @@ * * Example pipelines * |[ - * gst-launch rtpmux name=mux ! udpsink host=127.0.0.1 port=8888 \ + * gst-launch-1.0 rtpmux name=mux ! udpsink host=127.0.0.1 port=8888 \ * alsasrc ! alawenc ! rtppcmapay ! \ * application/x-rtp, payload=8, rate=8000 ! mux.sink_0 \ * audiotestsrc is-live=1 ! \ @@ -63,7 +63,7 @@ enum { - ARG_0, + PROP_0, PROP_TIMESTAMP_OFFSET, PROP_SEQNUM_OFFSET, PROP_SEQNUM, @@ -191,7 +191,7 @@ { GstRTPMux *rtp_mux = GST_RTP_MUX (parent); GstRTPMuxClass *klass; - gboolean ret = FALSE; + gboolean ret; klass = GST_RTP_MUX_GET_CLASS (rtp_mux); @@ -245,7 +245,7 @@ "src"), "src"); gst_pad_set_event_function (rtp_mux->srcpad, GST_DEBUG_FUNCPTR (gst_rtp_mux_src_event)); - GST_PAD_SET_PROXY_CAPS (rtp_mux->srcpad); + gst_pad_use_fixed_caps (rtp_mux->srcpad); gst_element_add_pad (GST_ELEMENT (rtp_mux), rtp_mux->srcpad); rtp_mux->ssrc = DEFAULT_SSRC; @@ -321,7 +321,7 @@ } } -/* Put our own clock-base on the buffer */ +/* Put our own timestamp-offset on the buffer */ static void gst_rtp_mux_readjust_rtp_timestamp_locked (GstRTPMux * rtp_mux, GstRTPMuxPadPrivate * padpriv, GstRTPBuffer * rtpbuffer) @@ -329,8 +329,8 @@ guint32 ts; guint32 sink_ts_base = 0; - if (padpriv && padpriv->have_clock_base) - sink_ts_base = padpriv->clock_base; + if (padpriv && padpriv->have_timestamp_offset) + sink_ts_base = padpriv->timestamp_offset; ts = gst_rtp_buffer_get_timestamp (rtpbuffer) - sink_ts_base + rtp_mux->ts_base; @@ -394,8 +394,8 @@ return FALSE; if (GST_BUFFER_DURATION_IS_VALID (*buffer) && - GST_BUFFER_TIMESTAMP_IS_VALID (*buffer)) - bd->rtp_mux->last_stop = GST_BUFFER_TIMESTAMP (*buffer) + + GST_BUFFER_PTS_IS_VALID (*buffer)) + bd->rtp_mux->last_stop = GST_BUFFER_PTS (*buffer) + GST_BUFFER_DURATION (*buffer); else bd->rtp_mux->last_stop = GST_CLOCK_TIME_NONE; @@ -504,8 +504,8 @@ } if (GST_BUFFER_DURATION_IS_VALID (buffer) && - GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) - rtp_mux->last_stop = GST_BUFFER_TIMESTAMP (buffer) + + GST_BUFFER_PTS_IS_VALID (buffer)) + rtp_mux->last_stop = GST_BUFFER_PTS (buffer) + GST_BUFFER_DURATION (buffer); else rtp_mux->last_stop = GST_CLOCK_TIME_NONE; @@ -541,16 +541,17 @@ GST_OBJECT_LOCK (rtp_mux); padpriv = gst_pad_get_element_private (pad); if (padpriv && - gst_structure_get_uint (structure, "clock-base", &padpriv->clock_base)) { - padpriv->have_clock_base = TRUE; + gst_structure_get_uint (structure, "timestamp-offset", + &padpriv->timestamp_offset)) { + padpriv->have_timestamp_offset = TRUE; } GST_OBJECT_UNLOCK (rtp_mux); caps = gst_caps_copy (caps); gst_caps_set_simple (caps, - "clock-base", G_TYPE_UINT, rtp_mux->ts_base, - "seqnum-base", G_TYPE_UINT, rtp_mux->seqnum_base, NULL); + "timestamp-offset", G_TYPE_UINT, rtp_mux->ts_base, + "seqnum-offset", G_TYPE_UINT, rtp_mux->seqnum_base, NULL); if (rtp_mux->send_stream_start) { gchar s_id[32]; @@ -601,7 +602,6 @@ GstPad *pad = g_value_get_object (item); GstCaps *peercaps; GstCaps *accumcaps; - GstCaps *intersect; if (pad == mypad) return TRUE; @@ -615,12 +615,9 @@ peercaps = gst_caps_make_writable (peercaps); clear_caps (peercaps, TRUE); - intersect = gst_caps_intersect (accumcaps, peercaps); + g_value_take_boxed (ret, peercaps); - g_value_take_boxed (ret, intersect); - gst_caps_unref (peercaps); - - return !gst_caps_is_empty (intersect); + return !gst_caps_is_empty (peercaps); } static GstCaps * @@ -633,6 +630,7 @@ GstCaps *peercaps; GstCaps *othercaps; GstCaps *tcaps; + GstCaps *other_filtered; peercaps = gst_pad_peer_query_caps (mux->srcpad, filter); @@ -653,24 +651,30 @@ clear_caps (othercaps, FALSE); + other_filtered = gst_caps_copy (othercaps); + clear_caps (other_filtered, TRUE); + g_value_init (&v, GST_TYPE_CAPS); iter = gst_element_iterate_sink_pads (GST_ELEMENT (mux)); do { - gst_value_set_caps (&v, othercaps); + gst_value_set_caps (&v, other_filtered); res = gst_iterator_fold (iter, same_clock_rate_fold, &v, pad); gst_iterator_resync (iter); } while (res == GST_ITERATOR_RESYNC); gst_iterator_free (iter); + gst_caps_unref (other_filtered); - caps = (GstCaps *) gst_value_get_caps (&v); + caps = gst_caps_intersect ((GstCaps *) gst_value_get_caps (&v), othercaps); + + g_value_unset (&v); + gst_caps_unref (othercaps); if (res == GST_ITERATOR_ERROR) { gst_caps_unref (caps); caps = gst_caps_new_empty (); } - gst_caps_unref (othercaps); return caps; } @@ -837,7 +841,7 @@ rtp_mux->last_stop = GST_CLOCK_TIME_NONE; - GST_DEBUG_OBJECT (rtp_mux, "set clock-base to %u", rtp_mux->ts_base); + GST_DEBUG_OBJECT (rtp_mux, "set timestamp-offset to %u", rtp_mux->ts_base); GST_OBJECT_UNLOCK (rtp_mux); } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpmux.h gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpmux.h --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpmux.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpmux.h 2015-10-22 08:02:54.000000000 +0000 @@ -42,8 +42,8 @@ typedef struct { - gboolean have_clock_base; - guint clock_base; + gboolean have_timestamp_offset; + guint timestamp_offset; GstSegment segment; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpptdemux.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpptdemux.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpptdemux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpptdemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -35,9 +35,9 @@ * the RTP stream changes, the #GstRtpPtDemux::payload-type-change signal will be * emitted. * - * The element will try to set complete and unique application/x-rtp caps on the - * outgoing buffers and pads based on the result of the - * #GstRtpPtDemux::request-pt-map signal. + * The element will try to set complete and unique application/x-rtp caps + * on the output pads based on the result of the #GstRtpPtDemux::request-pt-map + * signal. * * * Example pipelines @@ -448,8 +448,8 @@ /* ERRORS */ invalid_buffer: { - /* this is fatal and should be filtered earlier */ - GST_ELEMENT_ERROR (rtpdemux, STREAM, DECODE, (NULL), + /* this should not be fatal */ + GST_ELEMENT_WARNING (rtpdemux, STREAM, DEMUX, (NULL), ("Dropping invalid RTP payload")); gst_buffer_unref (buf); return GST_FLOW_ERROR; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtprtxqueue.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtprtxqueue.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtprtxqueue.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtprtxqueue.c 2015-10-22 08:02:54.000000000 +0000 @@ -44,8 +44,7 @@ { PROP_0, PROP_MAX_SIZE_TIME, - PROP_MAX_SIZE_PACKETS, - PROP_LAST + PROP_MAX_SIZE_PACKETS }; static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", @@ -64,6 +63,8 @@ GstEvent * event); static GstFlowReturn gst_rtp_rtx_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer); +static GstFlowReturn gst_rtp_rtx_queue_chain_list (GstPad * pad, + GstObject * parent, GstBufferList * list); static GstStateChangeReturn gst_rtp_rtx_queue_change_state (GstElement * element, GstStateChange transition); @@ -159,6 +160,8 @@ GST_PAD_SET_PROXY_ALLOCATION (rtx->sinkpad); gst_pad_set_chain_function (rtx->sinkpad, GST_DEBUG_FUNCPTR (gst_rtp_rtx_queue_chain)); + gst_pad_set_chain_list_function (rtx->sinkpad, + GST_DEBUG_FUNCPTR (gst_rtp_rtx_queue_chain_list)); gst_element_add_pad (GST_ELEMENT (rtx), rtx->sinkpad); rtx->queue = g_queue_new (); @@ -246,6 +249,16 @@ gst_pad_push (rtx->srcpad, buffer); } +/* Must be called with rtx->lock */ +static void +shrink_queue (GstRTPRtxQueue * rtx) +{ + if (rtx->max_size_packets) { + while (g_queue_get_length (rtx->queue) > rtx->max_size_packets) + gst_buffer_unref (g_queue_pop_tail (rtx->queue)); + } +} + static GstFlowReturn gst_rtp_rtx_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) { @@ -257,16 +270,13 @@ g_mutex_lock (&rtx->lock); g_queue_push_head (rtx->queue, gst_buffer_ref (buffer)); - - if (rtx->max_size_packets) { - while (g_queue_get_length (rtx->queue) > rtx->max_size_packets) - gst_buffer_unref (g_queue_pop_tail (rtx->queue)); - } + shrink_queue (rtx); pending = rtx->pending; rtx->pending = NULL; g_mutex_unlock (&rtx->lock); + pending = g_list_reverse (pending); g_list_foreach (pending, (GFunc) do_push, rtx); g_list_free (pending); @@ -274,6 +284,43 @@ return ret; } + +static gboolean +push_to_queue (GstBuffer ** buffer, guint idx, gpointer user_data) +{ + GQueue *queue = user_data; + + g_queue_push_head (queue, gst_buffer_ref (*buffer)); + + return TRUE; +} + +static GstFlowReturn +gst_rtp_rtx_queue_chain_list (GstPad * pad, GstObject * parent, + GstBufferList * list) +{ + GstRTPRtxQueue *rtx; + GstFlowReturn ret; + GList *pending; + + rtx = GST_RTP_RTX_QUEUE (parent); + + g_mutex_lock (&rtx->lock); + gst_buffer_list_foreach (list, push_to_queue, rtx->queue); + shrink_queue (rtx); + + pending = rtx->pending; + rtx->pending = NULL; + g_mutex_unlock (&rtx->lock); + + pending = g_list_reverse (pending); + g_list_foreach (pending, (GFunc) do_push, rtx); + g_list_free (pending); + + ret = gst_pad_push_list (rtx->srcpad, list); + + return ret; +} static void gst_rtp_rtx_queue_get_property (GObject * object, diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtprtxreceive.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtprtxreceive.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtprtxreceive.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtprtxreceive.c 2015-10-22 08:02:54.000000000 +0000 @@ -133,8 +133,7 @@ PROP_PAYLOAD_TYPE_MAP, PROP_NUM_RTX_REQUESTS, PROP_NUM_RTX_PACKETS, - PROP_NUM_RTX_ASSOC_PACKETS, - PROP_LAST + PROP_NUM_RTX_ASSOC_PACKETS }; static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", @@ -310,11 +309,11 @@ guint ssrc = 0; gpointer ssrc2 = 0; - /* retrieve seqnum of the packet that need to be restransmisted */ + /* retrieve seqnum of the packet that need to be retransmitted */ if (!gst_structure_get_uint (s, "seqnum", &seqnum)) seqnum = -1; - /* retrieve ssrc of the packet that need to be restransmisted + /* retrieve ssrc of the packet that need to be retransmitted * it's usefull when reconstructing the original packet from the rtx packet */ if (!gst_structure_get_uint (s, "ssrc", &ssrc)) ssrc = -1; @@ -329,7 +328,7 @@ ++rtx->num_rtx_requests; /* First, we lookup in our map to see if we have already associate this - * master stream ssrc with its retransmisted stream. + * master stream ssrc with its retransmitted stream. * Every ssrc are unique so we can use the same hash table * for both retrieving the ssrc1 from ssrc2 and also ssrc2 from ssrc1 */ @@ -389,17 +388,19 @@ retransmit: /* the request has not been already considered * insert it for the first time */ - GST_DEBUG_OBJECT (rtx, - "packet number %" G_GUINT32_FORMAT " of master stream %" - G_GUINT32_FORMAT " needs to be retransmited", seqnum, ssrc); g_hash_table_insert (rtx->seqnum_ssrc1_map, GUINT_TO_POINTER (seqnum), ssrc_assoc_new (ssrc, rtx->last_time)); } } + GST_DEBUG_OBJECT (rtx, + "packet number %" G_GUINT32_FORMAT " of master stream %" + G_GUINT32_FORMAT " needs to be retransmitted", seqnum, ssrc); + GST_OBJECT_UNLOCK (rtx); } + /* Transfer event upstream so that the request can acutally by translated * through gstrtpsession through the network */ res = gst_pad_event_default (pad, parent, event); @@ -427,12 +428,14 @@ guint payload_len = 0; /* copy fixed header */ - mem = gst_memory_copy (rtp->map[0].memory, 0, rtp->size[0]); + mem = gst_memory_copy (rtp->map[0].memory, + (guint8 *) rtp->data[0] - rtp->map[0].data, rtp->size[0]); gst_buffer_append_memory (new_buffer, mem); /* copy extension if any */ if (rtp->size[1]) { - mem = gst_memory_copy (rtp->map[1].memory, 0, rtp->size[1]); + mem = gst_memory_copy (rtp->map[1].memory, + (guint8 *) rtp->data[1] - rtp->map[1].data, rtp->size[1]); gst_buffer_append_memory (new_buffer, mem); } @@ -489,7 +492,7 @@ guint16 orign_seqnum = 0; guint8 payload_type = 0; guint8 origin_payload_type = 0; - gboolean is_rtx = FALSE; + gboolean is_rtx; gboolean drop = FALSE; /* map current rtp packet to parse its header */ @@ -530,13 +533,13 @@ } else { SsrcAssoc *assoc; - /* the current retransmisted packet has its rtx stream not already + /* the current retransmitted packet has its rtx stream not already * associated to a master stream, so retrieve it from our request * history */ if (g_hash_table_lookup_extended (rtx->seqnum_ssrc1_map, GUINT_TO_POINTER (orign_seqnum), NULL, (gpointer *) & assoc)) { GST_DEBUG_OBJECT (rtx, - "associate retransmisted stream %" G_GUINT32_FORMAT + "associate retransmitted stream %" G_GUINT32_FORMAT " to master stream %" G_GUINT32_FORMAT " thanks to packet %" G_GUINT16_FORMAT "", ssrc, assoc->ssrc, orign_seqnum); ssrc1 = GUINT_TO_POINTER (assoc->ssrc); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtprtxsend.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtprtxsend.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtprtxsend.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtprtxsend.c 2015-10-22 08:02:54.000000000 +0000 @@ -61,8 +61,7 @@ PROP_MAX_SIZE_TIME, PROP_MAX_SIZE_PACKETS, PROP_NUM_RTX_REQUESTS, - PROP_NUM_RTX_PACKETS, - PROP_LAST + PROP_NUM_RTX_PACKETS }; static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", @@ -86,6 +85,8 @@ GstEvent * event); static GstFlowReturn gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer); +static GstFlowReturn gst_rtp_rtx_send_chain_list (GstPad * pad, + GstObject * parent, GstBufferList * list); static void gst_rtp_rtx_send_src_loop (GstRtpRtxSend * rtx); static gboolean gst_rtp_rtx_send_activate_mode (GstPad * pad, @@ -119,7 +120,7 @@ typedef struct { guint32 rtx_ssrc; - guint16 next_seqnum; + guint16 seqnum_base, next_seqnum; gint clock_rate; /* history of rtp packets */ @@ -132,7 +133,7 @@ SSRCRtxData *data = g_slice_new0 (SSRCRtxData); data->rtx_ssrc = rtx_ssrc; - data->next_seqnum = g_random_int_range (0, G_MAXUINT16); + data->next_seqnum = data->seqnum_base = g_random_int_range (0, G_MAXUINT16); data->queue = g_sequence_new ((GDestroyNotify) buffer_queue_item_free); return data; @@ -258,6 +259,8 @@ GST_DEBUG_FUNCPTR (gst_rtp_rtx_send_sink_event)); gst_pad_set_chain_function (rtx->sinkpad, GST_DEBUG_FUNCPTR (gst_rtp_rtx_send_chain)); + gst_pad_set_chain_list_function (rtx->sinkpad, + GST_DEBUG_FUNCPTR (gst_rtp_rtx_send_chain_list)); gst_element_add_pad (GST_ELEMENT (rtx), rtx->sinkpad); rtx->queue = gst_data_queue_new (gst_rtp_rtx_send_queue_check_full, NULL, @@ -426,6 +429,9 @@ gst_rtp_buffer_set_padding (&new_rtp, FALSE); gst_rtp_buffer_unmap (&new_rtp); + /* Copy over timestamps */ + gst_buffer_copy_into (new_buffer, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1); + return new_buffer; } @@ -456,11 +462,11 @@ guint ssrc = 0; GstBuffer *rtx_buf = NULL; - /* retrieve seqnum of the packet that need to be restransmisted */ + /* retrieve seqnum of the packet that need to be retransmitted */ if (!gst_structure_get_uint (s, "seqnum", &seqnum)) seqnum = -1; - /* retrieve ssrc of the packet that need to be restransmisted */ + /* retrieve ssrc of the packet that need to be retransmitted */ if (!gst_structure_get_uint (s, "ssrc", &ssrc)) ssrc = -1; @@ -586,22 +592,53 @@ GstCaps *caps; GstStructure *s; guint ssrc; + gint payload; + gpointer rtx_payload; SSRCRtxData *data; gst_event_parse_caps (event, &caps); - g_assert (gst_caps_is_fixed (caps)); s = gst_caps_get_structure (caps, 0); if (!gst_structure_get_uint (s, "ssrc", &ssrc)) ssrc = -1; + if (!gst_structure_get_int (s, "payload", &payload)) + payload = -1; + + if (payload == -1) + GST_WARNING_OBJECT (rtx, "No payload in caps"); GST_OBJECT_LOCK (rtx); data = gst_rtp_rtx_send_get_ssrc_data (rtx, ssrc); + if (!g_hash_table_lookup_extended (rtx->rtx_pt_map, + GUINT_TO_POINTER (payload), NULL, &rtx_payload)) + rtx_payload = GINT_TO_POINTER (-1); + + if (GPOINTER_TO_INT (rtx_payload) == -1 && payload != -1) + GST_WARNING_OBJECT (rtx, "Payload %d not in rtx-pt-map", payload); + + GST_DEBUG_OBJECT (rtx, + "got caps for payload: %d->%d, ssrc: %u->%" G_GUINT32_FORMAT ": %" + GST_PTR_FORMAT, payload, GPOINTER_TO_INT (rtx_payload), ssrc, + data->rtx_ssrc, caps); + gst_structure_get_int (s, "clock-rate", &data->clock_rate); + /* The session might need to know the RTX ssrc */ + caps = gst_caps_copy (caps); + gst_caps_set_simple (caps, "rtx-ssrc", G_TYPE_UINT, data->rtx_ssrc, + "rtx-seqnum-offset", G_TYPE_UINT, data->seqnum_base, NULL); + + if (GPOINTER_TO_INT (rtx_payload) != -1) + gst_caps_set_simple (caps, "rtx-payload", G_TYPE_INT, + GPOINTER_TO_INT (rtx_payload), NULL); + GST_DEBUG_OBJECT (rtx, "got clock-rate from caps: %d for ssrc: %u", data->clock_rate, ssrc); GST_OBJECT_UNLOCK (rtx); + + gst_event_unref (event); + event = gst_event_new_caps (caps); + gst_caps_unref (caps); break; } default: @@ -640,11 +677,10 @@ return (guint32) gst_util_uint64_scale_int (result, 1000, data->clock_rate); } -static GstFlowReturn -gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) +/* Must be called with lock */ +static void +process_buffer (GstRtpRtxSend * rtx, GstBuffer * buffer) { - GstRtpRtxSend *rtx = GST_RTP_RTX_SEND (parent); - GstFlowReturn ret = GST_FLOW_ERROR; GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; BufferQueueItem *item; SSRCRtxData *data; @@ -660,7 +696,9 @@ rtptime = gst_rtp_buffer_get_timestamp (&rtp); gst_rtp_buffer_unmap (&rtp); - GST_OBJECT_LOCK (rtx); + GST_LOG_OBJECT (rtx, + "Processing buffer seqnum: %" G_GUINT16_FORMAT ", ssrc: %" + G_GUINT32_FORMAT, seqnum, ssrc); /* do not store the buffer if it's payload type is unknown */ if (g_hash_table_contains (rtx->rtx_pt_map, GUINT_TO_POINTER (payload_type))) { @@ -683,14 +721,41 @@ g_sequence_remove (g_sequence_get_begin_iter (data->queue)); } } +} + +static GstFlowReturn +gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) +{ + GstRtpRtxSend *rtx = GST_RTP_RTX_SEND (parent); + GstFlowReturn ret; + GST_OBJECT_LOCK (rtx); + process_buffer (rtx, buffer); GST_OBJECT_UNLOCK (rtx); + ret = gst_pad_push (rtx->srcpad, buffer); - GST_LOG_OBJECT (rtx, - "push seqnum: %" G_GUINT16_FORMAT ", ssrc: %" G_GUINT32_FORMAT, seqnum, - ssrc); + return ret; +} - ret = gst_pad_push (rtx->srcpad, buffer); +static gboolean +process_buffer_from_list (GstBuffer ** buffer, guint idx, gpointer user_data) +{ + process_buffer (user_data, *buffer); + return TRUE; +} + +static GstFlowReturn +gst_rtp_rtx_send_chain_list (GstPad * pad, GstObject * parent, + GstBufferList * list) +{ + GstRtpRtxSend *rtx = GST_RTP_RTX_SEND (parent); + GstFlowReturn ret; + + GST_OBJECT_LOCK (rtx); + gst_buffer_list_foreach (list, process_buffer_from_list, rtx); + GST_OBJECT_UNLOCK (rtx); + + ret = gst_pad_push_list (rtx->srcpad, list); return ret; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpsession.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpsession.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpsession.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpsession.c 2015-10-22 08:02:54.000000000 +0000 @@ -122,6 +122,26 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_session_debug); #define GST_CAT_DEFAULT gst_rtp_session_debug +GType +gst_rtp_ntp_time_source_get_type (void) +{ + static GType type = 0; + static const GEnumValue values[] = { + {GST_RTP_NTP_TIME_SOURCE_NTP, "NTP time based on realtime clock", "ntp"}, + {GST_RTP_NTP_TIME_SOURCE_UNIX, "UNIX time based on realtime clock", "unix"}, + {GST_RTP_NTP_TIME_SOURCE_RUNNING_TIME, + "Running time based on pipeline clock", + "running-time"}, + {GST_RTP_NTP_TIME_SOURCE_CLOCK_TIME, "Pipeline clock time", "clock-time"}, + {0, NULL, NULL}, + }; + + if (!type) { + type = g_enum_register_static ("GstRtpNtpTimeSource", values); + } + return type; +} + /* sink pads */ static GstStaticPadTemplate rtpsession_recv_rtp_sink_template = GST_STATIC_PAD_TEMPLATE ("recv_rtp_sink", @@ -191,8 +211,8 @@ LAST_SIGNAL }; -#define DEFAULT_BANDWIDTH RTP_STATS_BANDWIDTH -#define DEFAULT_RTCP_FRACTION (RTP_STATS_BANDWIDTH * RTP_STATS_RTCP_FRACTION) +#define DEFAULT_BANDWIDTH 0 +#define DEFAULT_RTCP_FRACTION RTP_STATS_RTCP_FRACTION #define DEFAULT_RTCP_RR_BANDWIDTH -1 #define DEFAULT_RTCP_RS_BANDWIDTH -1 #define DEFAULT_SDES NULL @@ -201,6 +221,8 @@ #define DEFAULT_USE_PIPELINE_CLOCK FALSE #define DEFAULT_RTCP_MIN_INTERVAL (RTP_STATS_MIN_INTERVAL * GST_SECOND) #define DEFAULT_PROBATION RTP_DEFAULT_PROBATION +#define DEFAULT_RTP_PROFILE GST_RTP_PROFILE_AVP +#define DEFAULT_NTP_TIME_SOURCE GST_RTP_NTP_TIME_SOURCE_NTP enum { @@ -217,7 +239,8 @@ PROP_RTCP_MIN_INTERVAL, PROP_PROBATION, PROP_STATS, - PROP_LAST + PROP_RTP_PROFILE, + PROP_NTP_TIME_SOURCE }; #define GST_RTP_SESSION_GET_PRIVATE(obj) \ @@ -250,6 +273,7 @@ GstClockTime send_latency; gboolean use_pipeline_clock; + GstRtpNtpTimeSource ntp_time_source; guint rtx_count; }; @@ -343,7 +367,7 @@ /* if there is no source using the suggested ssrc, most probably because * this ssrc has just collided, suggest upstream to use it */ - suggested_ssrc = rtp_session_suggest_ssrc (session); + suggested_ssrc = rtp_session_suggest_ssrc (session, NULL); internal_src = rtp_session_get_source_by_ssrc (session, suggested_ssrc); if (!internal_src) gst_structure_set (structure, "suggested-ssrc", G_TYPE_UINT, @@ -610,9 +634,10 @@ g_object_class_install_property (gobject_class, PROP_USE_PIPELINE_CLOCK, g_param_spec_boolean ("use-pipeline-clock", "Use pipeline clock", - "Use the pipeline running-time to set the NTP time in the RTCP SR messages", + "Use the pipeline running-time to set the NTP time in the RTCP SR messages " + "(DEPRECATED: Use ntp-time-source property)", DEFAULT_USE_PIPELINE_CLOCK, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); g_object_class_install_property (gobject_class, PROP_RTCP_MIN_INTERVAL, g_param_spec_uint64 ("rtcp-min-interval", "Minimum RTCP interval", @@ -646,6 +671,17 @@ "Various statistics", GST_TYPE_STRUCTURE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RTP_PROFILE, + g_param_spec_enum ("rtp-profile", "RTP Profile", + "RTP profile to use", GST_TYPE_RTP_PROFILE, DEFAULT_RTP_PROFILE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_NTP_TIME_SOURCE, + g_param_spec_enum ("ntp-time-source", "NTP Time Source", + "NTP time source for RTCP packets", + gst_rtp_ntp_time_source_get_type (), DEFAULT_NTP_TIME_SOURCE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_session_change_state); gstelement_class->request_new_pad = @@ -721,6 +757,8 @@ rtpsession->priv->thread_stopped = TRUE; rtpsession->priv->rtx_count = 0; + + rtpsession->priv->ntp_time_source = DEFAULT_NTP_TIME_SOURCE; } static void @@ -777,6 +815,12 @@ case PROP_PROBATION: g_object_set_property (G_OBJECT (priv->session), "probation", value); break; + case PROP_RTP_PROFILE: + g_object_set_property (G_OBJECT (priv->session), "rtp-profile", value); + break; + case PROP_NTP_TIME_SOURCE: + priv->ntp_time_source = g_value_get_enum (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -834,6 +878,12 @@ case PROP_STATS: g_value_take_boxed (value, gst_rtp_session_create_stats (rtpsession)); break; + case PROP_RTP_PROFILE: + g_object_get_property (G_OBJECT (priv->session), "rtp-profile", value); + break; + case PROP_NTP_TIME_SOURCE: + g_value_set_enum (value, priv->ntp_time_source); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -872,17 +922,35 @@ if (rtpsession->priv->use_pipeline_clock) { ntpns = rt; + /* add constant to convert from 1970 based time to 1900 based time */ + ntpns += (2208988800LL * GST_SECOND); } else { - GTimeVal current; - - /* get current NTP time */ - g_get_current_time (¤t); - ntpns = GST_TIMEVAL_TO_TIME (current); + switch (rtpsession->priv->ntp_time_source) { + case GST_RTP_NTP_TIME_SOURCE_NTP: + case GST_RTP_NTP_TIME_SOURCE_UNIX:{ + GTimeVal current; + + /* get current NTP time */ + g_get_current_time (¤t); + ntpns = GST_TIMEVAL_TO_TIME (current); + + /* add constant to convert from 1970 based time to 1900 based time */ + if (rtpsession->priv->ntp_time_source == GST_RTP_NTP_TIME_SOURCE_NTP) + ntpns += (2208988800LL * GST_SECOND); + break; + } + case GST_RTP_NTP_TIME_SOURCE_RUNNING_TIME: + ntpns = rt; + break; + case GST_RTP_NTP_TIME_SOURCE_CLOCK_TIME: + ntpns = clock_time; + break; + default: + g_assert_not_reached (); + break; + } } - /* add constant to convert from 1970 based time to 1900 based time */ - ntpns += (2208988800LL * GST_SECOND); - gst_object_unref (clock); } else { GST_OBJECT_UNLOCK (rtpsession); @@ -911,7 +979,7 @@ GST_RTP_SESSION_LOCK (rtpsession); while (rtpsession->priv->wait_send) { - GST_LOG_OBJECT (rtpsession, "waiting for RTP thread"); + GST_LOG_OBJECT (rtpsession, "waiting for getting started"); GST_RTP_SESSION_WAIT (rtpsession); GST_LOG_OBJECT (rtpsession, "signaled..."); } @@ -1300,6 +1368,14 @@ gst_object_ref (sync_src); GST_RTP_SESSION_UNLOCK (rtpsession); + /* set rtcp caps on output pad, this happens + * when we receive RTCP muxed with RTP according + * to RFC5761. Otherwise we would have forwarded + * the events from the recv_rtcp_sink pad already + */ + if (!gst_pad_has_current_caps (sync_src)) + do_rtcp_events (rtpsession, sync_src); + GST_LOG_OBJECT (rtpsession, "sending Sync RTCP"); result = gst_pad_push (sync_src, buffer); gst_object_unref (sync_src); @@ -1676,6 +1752,8 @@ it = gst_iterator_new_single (GST_TYPE_PAD, &val); g_value_unset (&val); gst_object_unref (otherpad); + } else { + it = gst_iterator_new_single (GST_TYPE_PAD, NULL); } return it; @@ -1711,8 +1789,16 @@ GST_LOG_OBJECT (rtpsession, "received RTP packet"); + GST_RTP_SESSION_LOCK (rtpsession); + if (rtpsession->priv->wait_send) { + GST_LOG_OBJECT (rtpsession, "signal RTCP thread"); + rtpsession->priv->wait_send = FALSE; + GST_RTP_SESSION_SIGNAL (rtpsession); + } + GST_RTP_SESSION_UNLOCK (rtpsession); + /* get NTP time when this packet was captured, this depends on the timestamp. */ - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); if (GST_CLOCK_TIME_IS_VALID (timestamp)) { /* convert to running time using the segment values */ running_time = @@ -1755,6 +1841,18 @@ GST_EVENT_TYPE_NAME (event)); switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEGMENT: + /* Make sure that the sync_src pad has caps before the segment event. + * Otherwise we might get a segment event before caps from the receive + * RTCP pad, and then later when receiving RTCP packets will set caps. + * This will results in a sticky event misordering warning + */ + if (!gst_pad_has_current_caps (rtpsession->sync_src)) { + GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtcp"); + gst_pad_set_caps (rtpsession->sync_src, caps); + gst_caps_unref (caps); + } + /* fall through */ default: ret = gst_pad_push_event (rtpsession->sync_src, event); break; @@ -1780,6 +1878,14 @@ GST_LOG_OBJECT (rtpsession, "received RTCP packet"); + GST_RTP_SESSION_LOCK (rtpsession); + if (rtpsession->priv->wait_send) { + GST_LOG_OBJECT (rtpsession, "signal RTCP thread"); + rtpsession->priv->wait_send = FALSE; + GST_RTP_SESSION_SIGNAL (rtpsession); + } + GST_RTP_SESSION_UNLOCK (rtpsession); + current_time = gst_clock_get_time (priv->sysclock); get_current_times (rtpsession, NULL, &ntpnstime); @@ -1957,18 +2063,26 @@ GstCaps *result; GstStructure *s1, *s2; guint ssrc; + gboolean is_random; priv = rtpsession->priv; - ssrc = rtp_session_suggest_ssrc (priv->session); + ssrc = rtp_session_suggest_ssrc (priv->session, &is_random); /* we can basically accept anything but we prefer to receive packets with our * internal SSRC so that we don't have to patch it. Create a structure with - * the SSRC and another one without. */ - s1 = gst_structure_new ("application/x-rtp", "ssrc", G_TYPE_UINT, ssrc, NULL); - s2 = gst_structure_new_empty ("application/x-rtp"); + * the SSRC and another one without. + * Only do this if the session actually decided on an ssrc already, + * otherwise we give upstream the opportunity to select an ssrc itself */ + if (!is_random) { + s1 = gst_structure_new ("application/x-rtp", "ssrc", G_TYPE_UINT, ssrc, + NULL); + s2 = gst_structure_new_empty ("application/x-rtp"); - result = gst_caps_new_full (s1, s2, NULL); + result = gst_caps_new_full (s1, s2, NULL); + } else { + result = gst_caps_new_empty_simple ("application/x-rtp"); + } if (filter) { GstCaps *caps = result; @@ -2048,11 +2162,11 @@ * So, just take it from the first group. */ buffer = gst_buffer_list_get (GST_BUFFER_LIST_CAST (data), 0); if (buffer) - timestamp = GST_BUFFER_TIMESTAMP (buffer); + timestamp = GST_BUFFER_PTS (buffer); else timestamp = -1; } else { - timestamp = GST_BUFFER_TIMESTAMP (GST_BUFFER_CAST (data)); + timestamp = GST_BUFFER_PTS (GST_BUFFER_CAST (data)); } if (GST_CLOCK_TIME_IS_VALID (timestamp)) { diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpsession.h gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpsession.h --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpsession.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpsession.h 2015-10-22 08:02:54.000000000 +0000 @@ -76,4 +76,13 @@ GType gst_rtp_session_get_type (void); +typedef enum { + GST_RTP_NTP_TIME_SOURCE_NTP, + GST_RTP_NTP_TIME_SOURCE_UNIX, + GST_RTP_NTP_TIME_SOURCE_RUNNING_TIME, + GST_RTP_NTP_TIME_SOURCE_CLOCK_TIME +} GstRtpNtpTimeSource; + +GType gst_rtp_ntp_time_source_get_type (void); + #endif /* __GST_RTP_SESSION_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpssrcdemux.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpssrcdemux.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/gstrtpssrcdemux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/gstrtpssrcdemux.c 2015-10-22 08:02:54.000000000 +0000 @@ -678,7 +678,7 @@ demux = GST_RTP_SSRC_DEMUX (parent); - if (!gst_rtcp_buffer_validate (buf)) + if (!gst_rtcp_buffer_validate_reduced (buf)) goto invalid_rtcp; gst_rtcp_buffer_map (buf, GST_MAP_READ, &rtcp); @@ -687,7 +687,9 @@ goto invalid_rtcp; } - /* first packet must be SR or RR or else the validate would have failed */ + /* first packet must be SR or RR, or in case of a reduced size RTCP packet + * it must be APP, RTPFB or PSFB feeadback, or else the validate would + * have failed */ switch (gst_rtcp_packet_get_type (&packet)) { case GST_RTCP_TYPE_SR: /* get the ssrc so that we can route it to the right source pad */ @@ -697,6 +699,11 @@ case GST_RTCP_TYPE_RR: ssrc = gst_rtcp_packet_rr_get_ssrc (&packet); break; + case GST_RTCP_TYPE_APP: + case GST_RTCP_TYPE_RTPFB: + case GST_RTCP_TYPE_PSFB: + ssrc = gst_rtcp_packet_fb_get_sender_ssrc (&packet); + break; default: goto unexpected_rtcp; } diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/Makefile.am gst-plugins-good1.0-1.6.1/gst/rtpmanager/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -38,18 +38,3 @@ $(GST_BASE_LIBS) $(GST_LIBS_LIBS) libgstrtpmanager_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstrtpmanager_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - -Android.mk: Makefile.am - androgenizer \ - -:PROJECT libgstrtpmanager -:SHARED libgstrtpmanager \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstrtpmanager_la_SOURCES) \ - $(nodist_libgstrtpmanager_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtpmanager_la_CFLAGS) \ - -:LDFLAGS $(libgstrtpmanager_la_LDFLAGS) \ - $(libgstrtpmanager_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/Makefile.in gst-plugins-good1.0-1.6.1/gst/rtpmanager/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/Makefile.in 2014-09-24 07:26:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/rtpmanager -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -240,6 +249,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -372,9 +382,6 @@ 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@ @@ -492,17 +499,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -555,6 +562,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -624,7 +632,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/rtpmanager/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/rtpmanager/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1045,21 +1052,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am - androgenizer \ - -:PROJECT libgstrtpmanager -:SHARED libgstrtpmanager \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstrtpmanager_la_SOURCES) \ - $(nodist_libgstrtpmanager_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtpmanager_la_CFLAGS) \ - -:LDFLAGS $(libgstrtpmanager_la_LDFLAGS) \ - $(libgstrtpmanager_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpjitterbuffer.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpjitterbuffer.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpjitterbuffer.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpjitterbuffer.c 2015-10-22 08:02:54.000000000 +0000 @@ -170,6 +170,7 @@ /** * rtp_jitter_buffer_set_clock_rate: * @jbuf: an #RTPJitterBuffer + * @clock_rate: the new clock rate * * Set the clock rate in the jitterbuffer. */ @@ -177,13 +178,8 @@ rtp_jitter_buffer_set_clock_rate (RTPJitterBuffer * jbuf, guint32 clock_rate) { if (jbuf->clock_rate != clock_rate) { - if (jbuf->clock_rate == -1) { - GST_DEBUG ("Clock rate changed from %" G_GUINT32_FORMAT " to %" - G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate); - } else { - GST_WARNING ("Clock rate changed from %" G_GUINT32_FORMAT " to %" - G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate); - } + GST_DEBUG ("Clock rate changed from %" G_GUINT32_FORMAT " to %" + G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate); jbuf->clock_rate = clock_rate; rtp_jitter_buffer_reset_skew (jbuf); } @@ -223,6 +219,7 @@ jbuf->skew = 0; jbuf->prev_send_diff = -1; jbuf->prev_out_time = -1; + jbuf->need_resync = TRUE; GST_DEBUG ("reset skew correction"); } @@ -255,6 +252,7 @@ jbuf->window_size = 0; jbuf->skew = 0; } + jbuf->need_resync = FALSE; } static guint64 @@ -263,7 +261,7 @@ RTPJitterBufferItem *high_buf = NULL, *low_buf = NULL; guint64 level; - /* first first buffer with timestamp */ + /* first buffer with timestamp */ high_buf = (RTPJitterBufferItem *) g_queue_peek_tail_link (jbuf->packets); while (high_buf) { if (high_buf->dts != -1 || high_buf->pts != -1) @@ -429,33 +427,28 @@ /* keep track of the last extended rtptime */ jbuf->last_rtptime = ext_rtptime; - /* first time, lock on to time and gstrtptime */ - if (G_UNLIKELY (jbuf->base_time == -1)) { - jbuf->base_time = time; - jbuf->prev_out_time = -1; - GST_DEBUG ("Taking new base time %" GST_TIME_FORMAT, GST_TIME_ARGS (time)); - } - if (G_UNLIKELY (jbuf->base_rtptime == -1)) { - jbuf->base_rtptime = gstrtptime; - jbuf->base_extrtp = ext_rtptime; - jbuf->prev_send_diff = -1; - GST_DEBUG ("Taking new base rtptime %" GST_TIME_FORMAT, - GST_TIME_ARGS (gstrtptime)); - } - - if (G_LIKELY (gstrtptime >= jbuf->base_rtptime)) - send_diff = gstrtptime - jbuf->base_rtptime; - else if (time != -1) { - /* elapsed time at sender, timestamps can go backwards and thus be smaller - * than our base time, take a new base time in that case. */ - GST_WARNING ("backward timestamps at server, taking new base time"); + send_diff = 0; + if (G_LIKELY (jbuf->base_rtptime != -1)) { + /* check elapsed time in RTP units */ + if (G_LIKELY (gstrtptime >= jbuf->base_rtptime)) { + send_diff = gstrtptime - jbuf->base_rtptime; + } else { + /* elapsed time at sender, timestamps can go backwards and thus be + * smaller than our base time, schedule to take a new base time in + * that case. */ + GST_WARNING ("backward timestamps at server, schedule resync"); + jbuf->need_resync = TRUE; + send_diff = 0; + } + } + + /* need resync, lock on to time and gstrtptime if we can, otherwise we + * do with the previous values */ + if (G_UNLIKELY (jbuf->need_resync && time != -1)) { + GST_INFO ("resync to time %" GST_TIME_FORMAT ", rtptime %" + GST_TIME_FORMAT, GST_TIME_ARGS (time), GST_TIME_ARGS (gstrtptime)); rtp_jitter_buffer_resync (jbuf, time, gstrtptime, ext_rtptime, FALSE); send_diff = 0; - } else { - GST_WARNING ("backward timestamps at server but no timestamps"); - send_diff = 0; - /* at least try to get a new timestamp.. */ - jbuf->base_time = -1; } GST_DEBUG ("extrtp %" G_GUINT64_FORMAT ", gstrtp %" GST_TIME_FORMAT ", base %" @@ -748,7 +741,7 @@ case RTP_JITTER_BUFFER_MODE_NONE: case RTP_JITTER_BUFFER_MODE_BUFFER: /* send 0 as the first timestamp and -1 for the other ones. This will - * interpollate them from the RTP timestamps with a 0 origin. In buffering + * interpolate them from the RTP timestamps with a 0 origin. In buffering * mode we will adjust the outgoing timestamps according to the amount of * time we spent buffering. */ if (jbuf->base_time == -1) diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpjitterbuffer.h gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpjitterbuffer.h --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpjitterbuffer.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpjitterbuffer.h 2015-10-22 08:02:54.000000000 +0000 @@ -86,6 +86,7 @@ guint64 high_level; /* for calculating skew */ + gboolean need_resync; GstClockTime base_time; GstClockTime base_rtptime; guint32 clock_rate; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsession.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsession.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsession.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsession.c 2015-10-22 08:02:54.000000000 +0000 @@ -49,12 +49,14 @@ SIGNAL_ON_SENDING_RTCP, SIGNAL_ON_FEEDBACK_RTCP, SIGNAL_SEND_RTCP, + SIGNAL_SEND_RTCP_FULL, + SIGNAL_ON_RECEIVING_RTCP, LAST_SIGNAL }; #define DEFAULT_INTERNAL_SOURCE NULL -#define DEFAULT_BANDWIDTH RTP_STATS_BANDWIDTH -#define DEFAULT_RTCP_FRACTION (RTP_STATS_RTCP_FRACTION * RTP_STATS_BANDWIDTH) +#define DEFAULT_BANDWIDTH 0.0 +#define DEFAULT_RTCP_FRACTION RTP_STATS_RTCP_FRACTION #define DEFAULT_RTCP_RR_BANDWIDTH -1 #define DEFAULT_RTCP_RS_BANDWIDTH -1 #define DEFAULT_RTCP_MTU 1400 @@ -66,6 +68,7 @@ #define DEFAULT_RTCP_FEEDBACK_RETENTION_WINDOW (2 * GST_SECOND) #define DEFAULT_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD (3) #define DEFAULT_PROBATION RTP_DEFAULT_PROBATION +#define DEFAULT_RTP_PROFILE GST_RTP_PROFILE_AVP enum { @@ -87,7 +90,7 @@ PROP_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD, PROP_PROBATION, PROP_STATS, - PROP_LAST + PROP_RTP_PROFILE }; /* update average packet size */ @@ -107,7 +110,8 @@ static void rtp_session_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void rtp_session_send_rtcp (RTPSession * sess, GstClockTime max_delay); +static gboolean rtp_session_send_rtcp (RTPSession * sess, + GstClockTime max_delay); static guint rtp_session_signals[LAST_SIGNAL] = { 0 }; @@ -311,6 +315,8 @@ * * Requests that the #RTPSession initiate a new RTCP packet as soon as * possible within the requested delay. + * + * This sets feedback to %TRUE if not already done before. */ rtp_session_signals[SIGNAL_SEND_RTCP] = g_signal_new ("send-rtcp", G_TYPE_FROM_CLASS (klass), @@ -318,6 +324,44 @@ G_STRUCT_OFFSET (RTPSessionClass, send_rtcp), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_UINT64); + /** + * RTPSession::send-rtcp-full: + * @session: the object which received the signal + * @max_delay: The maximum delay after which the feedback will not be useful + * anymore + * + * Requests that the #RTPSession initiate a new RTCP packet as soon as + * possible within the requested delay. + * + * This sets feedback to %TRUE if not already done before. + * + * Returns: TRUE if the new RTCP packet could be scheduled within the + * requested delay, FALSE otherwise. + * + * Since: 1.6 + */ + rtp_session_signals[SIGNAL_SEND_RTCP_FULL] = + g_signal_new ("send-rtcp-full", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (RTPSessionClass, send_rtcp), NULL, NULL, + g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 1, G_TYPE_UINT64); + + /** + * RTPSession::on-receiving-rtcp + * @session: the object which received the signal + * @buffer: the #GstBuffer containing the RTCP packet that was received + * + * This signal is emitted when receiving an RTCP packet before it is handled + * by the session. It can be used to extract custom information from RTCP packets. + * + * Since: 1.6 + */ + rtp_session_signals[SIGNAL_ON_RECEIVING_RTCP] = + g_signal_new ("on-receiving-rtcp", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RTPSessionClass, on_receiving_rtcp), + NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, + GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE); + g_object_class_install_property (gobject_class, PROP_INTERNAL_SSRC, g_param_spec_uint ("internal-ssrc", "Internal SSRC", "The internal SSRC used for the session (deprecated)", @@ -428,9 +472,9 @@ g_param_spec_uint ("rtcp-immediate-feedback-threshold", "RTCP Immediate Feedback threshold", "The maximum number of members of a RTP session for which immediate" - " feedback is used", + " feedback is used (DEPRECATED: has no effect and is not needed)", 0, G_MAXUINT, DEFAULT_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); g_object_class_install_property (gobject_class, PROP_PROBATION, g_param_spec_uint ("probation", "Number of probations", @@ -456,6 +500,11 @@ "Various statistics", GST_TYPE_STRUCTURE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RTP_PROFILE, + g_param_spec_enum ("rtp-profile", "RTP Profile", + "RTP profile to use for this session", GST_TYPE_RTP_PROFILE, + DEFAULT_RTP_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + klass->get_source_by_ssrc = GST_DEBUG_FUNCPTR (rtp_session_get_source_by_ssrc); klass->send_rtcp = GST_DEBUG_FUNCPTR (rtp_session_send_rtcp); @@ -474,7 +523,11 @@ sess->mask_idx = 0; sess->mask = 0; - for (i = 0; i < 32; i++) { + /* TODO: We currently only use the first hash table but this is the + * beginning of an implementation for RFC2762 + for (i = 0; i < 32; i++) { + */ + for (i = 0; i < 1; i++) { sess->ssrcs[i] = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) g_object_unref); @@ -516,15 +569,19 @@ /* this is the SSRC we suggest */ sess->suggested_ssrc = rtp_session_create_new_ssrc (sess); + sess->internal_ssrc_set = FALSE; sess->first_rtcp = TRUE; sess->next_rtcp_check_time = GST_CLOCK_TIME_NONE; + sess->last_rtcp_check_time = GST_CLOCK_TIME_NONE; + sess->last_rtcp_send_time = GST_CLOCK_TIME_NONE; + sess->last_rtcp_interval = GST_CLOCK_TIME_NONE; - sess->allow_early = TRUE; sess->next_early_rtcp_time = GST_CLOCK_TIME_NONE; sess->rtcp_feedback_retention_window = DEFAULT_RTCP_FEEDBACK_RETENTION_WINDOW; sess->rtcp_immediate_feedback_threshold = DEFAULT_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD; + sess->rtp_profile = DEFAULT_RTP_PROFILE; sess->last_keyframe_request = GST_CLOCK_TIME_NONE; @@ -544,7 +601,10 @@ g_list_free_full (sess->conflicting_addresses, (GDestroyNotify) rtp_conflicting_address_free); - for (i = 0; i < 32; i++) + /* TODO: Change this again when implementing RFC 2762 + * for (i = 0; i < 32; i++) + */ + for (i = 0; i < 1; i++) g_hash_table_destroy (sess->ssrcs[i]); g_mutex_clear (&sess->lock); @@ -607,6 +667,8 @@ case PROP_INTERNAL_SSRC: RTP_SESSION_LOCK (sess); sess->suggested_ssrc = g_value_get_uint (value); + sess->internal_ssrc_set = TRUE; + sess->internal_ssrc_from_caps_or_property = TRUE; RTP_SESSION_UNLOCK (sess); if (sess->callbacks.reconfigure) sess->callbacks.reconfigure (sess, sess->reconfigure_user_data); @@ -660,6 +722,15 @@ case PROP_PROBATION: sess->probation = g_value_get_uint (value); break; + case PROP_RTP_PROFILE: + sess->rtp_profile = g_value_get_enum (value); + /* trigger reconsideration */ + RTP_SESSION_LOCK (sess); + sess->next_rtcp_check_time = 0; + RTP_SESSION_UNLOCK (sess); + if (sess->callbacks.reconsider) + sess->callbacks.reconsider (sess, sess->reconsider_user_data); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -676,7 +747,7 @@ switch (prop_id) { case PROP_INTERNAL_SSRC: - g_value_set_uint (value, rtp_session_suggest_ssrc (sess)); + g_value_set_uint (value, rtp_session_suggest_ssrc (sess, NULL)); break; case PROP_INTERNAL_SOURCE: /* FIXME, return a random source */ @@ -724,6 +795,9 @@ case PROP_STATS: g_value_take_boxed (value, rtp_session_create_stats (sess)); break; + case PROP_RTP_PROFILE: + g_value_set_enum (value, sess->rtp_profile); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1342,8 +1416,10 @@ /* mark the source BYE */ rtp_source_mark_bye (source, "SSRC Collision"); /* if we were suggesting this SSRC, change to something else */ - if (sess->suggested_ssrc == ssrc) + if (sess->suggested_ssrc == ssrc) { sess->suggested_ssrc = rtp_session_create_new_ssrc (sess); + sess->internal_ssrc_set = TRUE; + } on_ssrc_collision (sess, source); @@ -1409,8 +1485,8 @@ * of each non-internal (=remotes) source have to be compared * to each other. */ - gboolean is_doing_rtp_ptp = FALSE; - gboolean is_doing_rtcp_ptp = FALSE; + gboolean is_doing_rtp_ptp; + gboolean is_doing_rtcp_ptp; CompareAddrData data; /* compare the first remote source's ip addr that receive rtp packets @@ -1451,8 +1527,11 @@ sess->stats.active_sources++; if (src->internal) { sess->stats.internal_sources++; - if (sess->suggested_ssrc != src->ssrc) + if (!sess->internal_ssrc_from_caps_or_property + && sess->suggested_ssrc != src->ssrc) { sess->suggested_ssrc = src->ssrc; + sess->internal_ssrc_set = TRUE; + } } /* update point-to-point status */ @@ -1562,13 +1641,14 @@ /** * rtp_session_suggest_ssrc: * @sess: a #RTPSession + * @is_random: if the suggested ssrc is random * * Suggest an unused SSRC in @sess. * * Returns: a free unused SSRC */ guint32 -rtp_session_suggest_ssrc (RTPSession * sess) +rtp_session_suggest_ssrc (RTPSession * sess, gboolean * is_random) { guint32 result; @@ -1576,6 +1656,8 @@ RTP_SESSION_LOCK (sess); result = sess->suggested_ssrc; + if (is_random) + *is_random = !sess->internal_ssrc_set; RTP_SESSION_UNLOCK (sess); return result; @@ -2255,15 +2337,31 @@ pinfo->current_time < sess->next_rtcp_check_time) { GstClockTime time_remaining; - time_remaining = sess->next_rtcp_check_time - pinfo->current_time; - sess->next_rtcp_check_time = - gst_util_uint64_scale (time_remaining, members, pmembers); + /* Scale our next RTCP check time according to the change of numbers + * of members. But only if a) this is the first RTCP, or b) this is not + * a feedback session, or c) this is a feedback session but we schedule + * for every RTCP interval (aka no t-rr-interval set). + * + * FIXME: a) and b) are not great as we will possibly go below Tmin + * for non-feedback profiles and in case of a) below + * Tmin/t-rr-interval in any case. + */ + if (sess->last_rtcp_send_time == GST_CLOCK_TIME_NONE || + !(sess->rtp_profile == GST_RTP_PROFILE_AVPF + || sess->rtp_profile == GST_RTP_PROFILE_SAVPF) || + sess->next_rtcp_check_time - sess->last_rtcp_send_time == + sess->last_rtcp_interval) { + time_remaining = sess->next_rtcp_check_time - pinfo->current_time; + sess->next_rtcp_check_time = + gst_util_uint64_scale (time_remaining, members, pmembers); + sess->next_rtcp_check_time += pinfo->current_time; + } + sess->last_rtcp_interval = + gst_util_uint64_scale (sess->last_rtcp_interval, members, pmembers); GST_DEBUG ("reverse reconsideration %" GST_TIME_FORMAT, GST_TIME_ARGS (sess->next_rtcp_check_time)); - sess->next_rtcp_check_time += pinfo->current_time; - /* mark pending reconsider. We only want to signal the reconsideration * once after we handled all the source in the bye packet */ reconsider = TRUE; @@ -2311,7 +2409,7 @@ "RTT (%" GST_TIME_FORMAT " < %" GST_TIME_FORMAT ")", fir ? "FIR" : "PLI", GST_TIME_ARGS (current_time - sess->last_keyframe_request), - GST_TIME_ARGS (round_trip_in_ns));; + GST_TIME_ARGS (round_trip_in_ns)); return FALSE; } } @@ -2459,7 +2557,7 @@ fci_buffer = gst_buffer_copy_region (packet->rtcp->buffer, GST_BUFFER_COPY_MEMORY, fci_data - packet->rtcp->map.data, fci_length); - GST_BUFFER_TIMESTAMP (fci_buffer) = pinfo->running_time; + GST_BUFFER_PTS (fci_buffer) = pinfo->running_time; } RTP_SESSION_UNLOCK (sess); @@ -2482,10 +2580,14 @@ case GST_RTCP_TYPE_PSFB: switch (fbtype) { case GST_RTCP_PSFB_TYPE_PLI: + if (src) + src->stats.recv_pli_count++; rtp_session_process_pli (sess, sender_ssrc, media_ssrc, current_time); break; case GST_RTCP_PSFB_TYPE_FIR: + if (src) + src->stats.recv_fir_count++; rtp_session_process_fir (sess, sender_ssrc, fci_data, fci_length, current_time); break; @@ -2533,11 +2635,14 @@ g_return_val_if_fail (RTP_IS_SESSION (sess), GST_FLOW_ERROR); g_return_val_if_fail (GST_IS_BUFFER (buffer), GST_FLOW_ERROR); - if (!gst_rtcp_buffer_validate (buffer)) + if (!gst_rtcp_buffer_validate_reduced (buffer)) goto invalid_packet; GST_DEBUG ("received RTCP packet"); + g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_RECEIVING_RTCP], 0, + buffer); + RTP_SESSION_LOCK (sess); /* update pinfo stats */ update_packet_info (sess, &pinfo, FALSE, FALSE, FALSE, buffer, current_time, @@ -2644,11 +2749,25 @@ RTP_SESSION_LOCK (sess); source = obtain_internal_source (sess, ssrc, &created, GST_CLOCK_TIME_NONE); + sess->suggested_ssrc = ssrc; + sess->internal_ssrc_set = TRUE; + sess->internal_ssrc_from_caps_or_property = TRUE; if (source) { rtp_source_update_caps (source, caps); g_object_unref (source); } + + if (gst_structure_get_uint (s, "rtx-ssrc", &ssrc)) { + source = + obtain_internal_source (sess, ssrc, &created, GST_CLOCK_TIME_NONE); + if (source) { + rtp_source_update_caps (source, caps); + g_object_unref (source); + } + } RTP_SESSION_UNLOCK (sess); + } else { + sess->internal_ssrc_from_caps_or_property = FALSE; } } @@ -2740,9 +2859,8 @@ g_hash_table_foreach (sess->ssrcs[sess->mask_idx], (GHFunc) add_bitrates, &bandwidth); - bandwidth /= 8.0; } - if (bandwidth < 8000) + if (bandwidth < RTP_STATS_BANDWIDTH) bandwidth = RTP_STATS_BANDWIDTH; rtp_stats_set_bandwidths (&sess->stats, bandwidth, @@ -2755,9 +2873,12 @@ stats = &sess->bye_stats; result = rtp_stats_calculate_bye_interval (stats); } else { + session_update_ptp (sess); + stats = &sess->stats; result = rtp_stats_calculate_rtcp_interval (stats, - stats->internal_sender_sources > 0, first); + stats->internal_sender_sources > 0, sess->rtp_profile, + sess->is_doing_ptp, first); } GST_DEBUG ("next deterministic interval: %" GST_TIME_FORMAT ", first %d", @@ -2816,16 +2937,17 @@ INIT_AVG (sess->bye_stats.avg_rtcp_packet_size, 100); sess->bye_stats.bye_members = 1; sess->first_rtcp = TRUE; - sess->allow_early = TRUE; /* reschedule transmission */ sess->last_rtcp_send_time = current_time; + sess->last_rtcp_check_time = current_time; interval = calculate_rtcp_interval (sess, FALSE, TRUE); if (interval != GST_CLOCK_TIME_NONE) sess->next_rtcp_check_time = current_time + interval; else sess->next_rtcp_check_time = GST_CLOCK_TIME_NONE; + sess->last_rtcp_interval = interval; GST_DEBUG ("Schedule BYE for %" GST_TIME_FORMAT ", %" GST_TIME_FORMAT, GST_TIME_ARGS (interval), GST_TIME_ARGS (sess->next_rtcp_check_time)); @@ -2852,7 +2974,7 @@ GstFlowReturn rtp_session_schedule_bye (RTPSession * sess, GstClockTime current_time) { - GstFlowReturn result = GST_FLOW_OK; + GstFlowReturn result; g_return_val_if_fail (RTP_IS_SESSION (sess), GST_FLOW_ERROR); @@ -2906,16 +3028,36 @@ GST_DEBUG ("reconsider BYE, more than 50 sources"); /* reconsider BYE if members >= 50 */ interval = calculate_rtcp_interval (sess, FALSE, TRUE); + sess->last_rtcp_interval = interval; } } else { if (sess->first_rtcp) { GST_DEBUG ("first RTCP packet"); /* we are called for the first time */ interval = calculate_rtcp_interval (sess, FALSE, TRUE); + sess->last_rtcp_interval = interval; } else if (sess->next_rtcp_check_time < current_time) { GST_DEBUG ("old check time expired, getting new timeout"); /* get a new timeout when we need to */ interval = calculate_rtcp_interval (sess, FALSE, FALSE); + sess->last_rtcp_interval = interval; + + if ((sess->rtp_profile == GST_RTP_PROFILE_AVPF + || sess->rtp_profile == GST_RTP_PROFILE_SAVPF) + && interval != GST_CLOCK_TIME_NONE) { + /* Apply the rules from RFC 4585 section 3.5.3 */ + if (sess->stats.min_interval != 0) { + GstClockTime T_rr_current_interval = g_random_double_range (0.5, + 1.5) * sess->stats.min_interval * GST_SECOND; + + if (T_rr_current_interval > interval) { + GST_DEBUG ("Adjusting interval for t-rr-interval: %" GST_TIME_FORMAT + " > %" GST_TIME_FORMAT, GST_TIME_ARGS (T_rr_current_interval), + GST_TIME_ARGS (interval)); + interval = T_rr_current_interval; + } + } + } } } @@ -3091,6 +3233,7 @@ fci_data[1] = fci_data[2] = fci_data[3] = 0; source->send_fir = FALSE; + source->stats.sent_fir_count++; } static void @@ -3159,6 +3302,8 @@ source->send_pli = FALSE; data->may_suppress = FALSE; + + source->stats.sent_pli_count++; } /* construct NACK */ @@ -3425,7 +3570,7 @@ static gboolean is_rtcp_time (RTPSession * sess, GstClockTime current_time, ReportData * data) { - GstClockTime new_send_time, elapsed; + GstClockTime new_send_time; GstClockTime interval; RTPSessionStats *stats; @@ -3443,11 +3588,7 @@ GST_DEBUG ("early feedback %" GST_TIME_FORMAT " < now %" GST_TIME_FORMAT, GST_TIME_ARGS (sess->next_early_rtcp_time), GST_TIME_ARGS (current_time)); - goto early; - } - - /* no need to check yet */ - if (sess->next_rtcp_check_time == GST_CLOCK_TIME_NONE || + } else if (sess->next_rtcp_check_time == GST_CLOCK_TIME_NONE || sess->next_rtcp_check_time > current_time) { GST_DEBUG ("no check time yet, next %" GST_TIME_FORMAT " > now %" GST_TIME_FORMAT, GST_TIME_ARGS (sess->next_rtcp_check_time), @@ -3455,22 +3596,32 @@ return FALSE; } -early: - /* get elapsed time since we last reported */ - elapsed = current_time - sess->last_rtcp_send_time; - /* take interval and add jitter */ interval = data->interval; if (interval != GST_CLOCK_TIME_NONE) interval = rtp_stats_add_rtcp_jitter (stats, interval); - /* perform forward reconsideration */ - if (interval != GST_CLOCK_TIME_NONE) { - GST_DEBUG ("forward reconsideration %" GST_TIME_FORMAT ", elapsed %" - GST_TIME_FORMAT, GST_TIME_ARGS (interval), GST_TIME_ARGS (elapsed)); - new_send_time = interval + sess->last_rtcp_send_time; + if (sess->last_rtcp_check_time != GST_CLOCK_TIME_NONE) { + /* perform forward reconsideration */ + if (interval != GST_CLOCK_TIME_NONE) { + GstClockTime elapsed; + + /* get elapsed time since we last reported */ + elapsed = current_time - sess->last_rtcp_check_time; + + GST_DEBUG ("forward reconsideration %" GST_TIME_FORMAT ", elapsed %" + GST_TIME_FORMAT, GST_TIME_ARGS (interval), GST_TIME_ARGS (elapsed)); + new_send_time = interval + sess->last_rtcp_check_time; + } else { + new_send_time = sess->last_rtcp_check_time; + } } else { - new_send_time = sess->last_rtcp_send_time; + /* If this is the first RTCP packet, we can reconsider anything based + * on the last RTCP send time because there was none. + */ + g_warn_if_fail (!data->is_early); + data->is_early = FALSE; + new_send_time = current_time; } if (!data->is_early) { @@ -3480,32 +3631,33 @@ GST_TIME_ARGS (new_send_time)); /* store new check time */ sess->next_rtcp_check_time = new_send_time; + sess->last_rtcp_interval = interval; return FALSE; } - sess->next_rtcp_check_time = current_time + interval; - } else if (interval != GST_CLOCK_TIME_NONE) { - /* Apply the rules from RFC 4585 section 3.5.3 */ - if (stats->min_interval != 0 && !sess->first_rtcp) { - GstClockTime T_rr_current_interval = - g_random_double_range (0.5, 1.5) * stats->min_interval; - - /* This will caused the RTCP to be suppressed if no FB packets are added */ - if (sess->last_rtcp_send_time + T_rr_current_interval > new_send_time) { - GST_DEBUG ("RTCP packet could be suppressed min: %" GST_TIME_FORMAT - " last: %" GST_TIME_FORMAT - " + T_rr_current_interval: %" GST_TIME_FORMAT - " > new_send_time: %" GST_TIME_FORMAT, - GST_TIME_ARGS (stats->min_interval), - GST_TIME_ARGS (sess->last_rtcp_send_time), - GST_TIME_ARGS (T_rr_current_interval), - GST_TIME_ARGS (new_send_time)); - data->may_suppress = TRUE; + + sess->last_rtcp_interval = interval; + if ((sess->rtp_profile == GST_RTP_PROFILE_AVPF + || sess->rtp_profile == GST_RTP_PROFILE_SAVPF) + && interval != GST_CLOCK_TIME_NONE) { + /* Apply the rules from RFC 4585 section 3.5.3 */ + if (stats->min_interval != 0 && !sess->first_rtcp) { + GstClockTime T_rr_current_interval = + g_random_double_range (0.5, 1.5) * stats->min_interval * GST_SECOND; + + if (T_rr_current_interval > interval) { + GST_DEBUG ("Adjusting interval for t-rr-interval: %" GST_TIME_FORMAT + " > %" GST_TIME_FORMAT, GST_TIME_ARGS (T_rr_current_interval), + GST_TIME_ARGS (interval)); + interval = T_rr_current_interval; + } } } + sess->next_rtcp_check_time = current_time + interval; } - GST_DEBUG ("can send RTCP now, next interval %" GST_TIME_FORMAT, - GST_TIME_ARGS (new_send_time)); + + GST_DEBUG ("can send RTCP now, next %" GST_TIME_FORMAT, + GST_TIME_ARGS (sess->next_rtcp_check_time)); return TRUE; } @@ -3664,6 +3816,7 @@ source = obtain_internal_source (sess, sess->suggested_ssrc, &created, current_time); + sess->internal_ssrc_set = TRUE; g_object_unref (source); } @@ -3693,8 +3846,9 @@ if (!is_rtcp_time (sess, current_time, &data)) goto done; - GST_DEBUG ("doing RTCP generation %u for %u sources, early %d", - sess->generation, data.num_to_report, data.is_early); + GST_DEBUG + ("doing RTCP generation %u for %u sources, early %d, may suppress %d", + sess->generation, data.num_to_report, data.is_early, data.may_suppress); /* generate RTCP for all internal sources */ g_hash_table_foreach (sess->ssrcs[sess->mask_idx], @@ -3706,8 +3860,20 @@ /* we keep track of the last report time in order to timeout inactive * receivers or senders */ - if (!data.is_early && !data.may_suppress) + if (!data.is_early) { + GST_DEBUG ("Time since last regular RTCP: %" GST_TIME_FORMAT " - %" + GST_TIME_FORMAT " = %" GST_TIME_FORMAT, + GST_TIME_ARGS (data.current_time), + GST_TIME_ARGS (sess->last_rtcp_send_time), + GST_TIME_ARGS (data.current_time - sess->last_rtcp_send_time)); sess->last_rtcp_send_time = data.current_time; + } + + GST_DEBUG ("Time since last RTCP: %" GST_TIME_FORMAT " - %" GST_TIME_FORMAT + " = %" GST_TIME_FORMAT, GST_TIME_ARGS (data.current_time), + GST_TIME_ARGS (sess->last_rtcp_send_time), + GST_TIME_ARGS (data.current_time - sess->last_rtcp_check_time)); + sess->last_rtcp_check_time = data.current_time; sess->first_rtcp = FALSE; sess->next_early_rtcp_time = GST_CLOCK_TIME_NONE; sess->scheduled_bye = FALSE; @@ -3739,8 +3905,8 @@ sess->stats.nacks_sent += data.nacked_seqnums; } else { GST_DEBUG ("freeing packet callback: %p" - " do_not_suppress: %d may_suppress: %d", - sess->callbacks.send_rtcp, do_not_suppress, data.may_suppress); + " do_not_suppress: %d may_suppress: %d", sess->callbacks.send_rtcp, + do_not_suppress, data.may_suppress); sess->stats.nacks_dropped += data.nacked_seqnums; gst_buffer_unref (buffer); } @@ -3757,38 +3923,67 @@ * @max_delay: maximum delay * * Request transmission of early RTCP + * + * Returns: %TRUE if the related RTCP can be scheduled. */ -void +gboolean rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time, GstClockTime max_delay) { - GstClockTime T_dither_max; + GstClockTime T_dither_max, T_rr, offset = 0; + gboolean ret; + gboolean allow_early; /* Implements the algorithm described in RFC 4585 section 3.5.2 */ RTP_SESSION_LOCK (sess); + /* We assume a feedback profile if something is requesting RTCP + * to be sent */ + sess->rtp_profile = GST_RTP_PROFILE_AVPF; + /* Check if already requested */ /* RFC 4585 section 3.5.2 step 2 */ if (GST_CLOCK_TIME_IS_VALID (sess->next_early_rtcp_time)) { GST_LOG_OBJECT (sess, "already have next early rtcp time"); - goto dont_send; + ret = (current_time + max_delay > sess->next_early_rtcp_time); + goto end; } if (!GST_CLOCK_TIME_IS_VALID (sess->next_rtcp_check_time)) { GST_LOG_OBJECT (sess, "no next RTCP check time"); - goto dont_send; + ret = FALSE; + goto end; } - /* Ignore the request a scheduled packet will be in time anyway */ - if (current_time + max_delay > sess->next_rtcp_check_time) { - GST_LOG_OBJECT (sess, "next scheduled time is soon %" GST_TIME_FORMAT " + %" - GST_TIME_FORMAT " > %" GST_TIME_FORMAT, - GST_TIME_ARGS (current_time), - GST_TIME_ARGS (max_delay), GST_TIME_ARGS (sess->next_rtcp_check_time)); - goto dont_send; + /* RFC 4585 section 3.5.3 step 1 + * If no regular RTCP packet has been sent before, then a regular + * RTCP packet has to be scheduled first and FB messages might be + * included there + */ + if (!GST_CLOCK_TIME_IS_VALID (sess->last_rtcp_send_time)) { + GST_LOG_OBJECT (sess, "no RTCP sent yet"); + + if (current_time + max_delay > sess->next_rtcp_check_time) { + GST_LOG_OBJECT (sess, + "next scheduled time is soon %" GST_TIME_FORMAT " + %" GST_TIME_FORMAT + " > %" GST_TIME_FORMAT, GST_TIME_ARGS (current_time), + GST_TIME_ARGS (max_delay), + GST_TIME_ARGS (sess->next_rtcp_check_time)); + ret = TRUE; + } else { + GST_LOG_OBJECT (sess, + "can't allow early feedback, next scheduled time is too late %" + GST_TIME_FORMAT " + %" GST_TIME_FORMAT " < %" GST_TIME_FORMAT, + GST_TIME_ARGS (current_time), GST_TIME_ARGS (max_delay), + GST_TIME_ARGS (sess->next_rtcp_check_time)); + ret = FALSE; + } + goto end; } + T_rr = sess->last_rtcp_interval; + /* RFC 4585 section 3.5.2 step 2b */ /* If the total sources is <=2, then there is only us and one peer */ /* When there is one auxiliary stream the session can still do point @@ -3798,38 +3993,81 @@ T_dither_max = 0; } else { /* Divide by 2 because l = 0.5 */ - T_dither_max = sess->next_rtcp_check_time - sess->last_rtcp_send_time; + T_dither_max = T_rr; T_dither_max /= 2; } /* RFC 4585 section 3.5.2 step 3 */ if (current_time + T_dither_max > sess->next_rtcp_check_time) { - GST_LOG_OBJECT (sess, "don't send because of dither"); - goto dont_send; - } - - /* RFC 4585 section 3.5.2 step 4 - * Don't send if allow_early is FALSE, but not if we are in - * immediate mode, meaning we are part of a group of at most the - * application-specific threshold. - */ - if (sess->total_sources > sess->rtcp_immediate_feedback_threshold && - sess->allow_early == FALSE) { - GST_LOG_OBJECT (sess, "can't allow early feedback"); - goto dont_send; + GST_LOG_OBJECT (sess, + "don't send because of dither, next scheduled time is too soon %" + GST_TIME_FORMAT " + %" GST_TIME_FORMAT " > %" GST_TIME_FORMAT, + GST_TIME_ARGS (current_time), GST_TIME_ARGS (T_dither_max), + GST_TIME_ARGS (sess->next_rtcp_check_time)); + ret = T_dither_max <= max_delay; + goto end; + } + + /* RFC 4585 section 3.5.2 step 4a and + * RFC 4585 section 3.5.2 step 6 */ + allow_early = FALSE; + if (sess->last_rtcp_check_time == sess->last_rtcp_send_time) { + /* Last time we sent a full RTCP packet, we can now immediately + * send an early one as allow_early was reset to TRUE */ + allow_early = TRUE; + } else if (sess->last_rtcp_check_time + T_rr <= current_time + max_delay) { + /* Last packet we sent was an early RTCP packet and more than + * T_rr has passed since then, meaning we would have suppressed + * a regular RTCP packet already and reset allow_early to TRUE */ + allow_early = TRUE; + + /* We have to offset a bit as T_rr has not passed yet, but will before + * max_delay */ + if (sess->last_rtcp_check_time + T_rr > current_time) + offset = (sess->last_rtcp_check_time + T_rr) - current_time; + } else { + GST_DEBUG_OBJECT (sess, + "can't allow early RTCP yet: last regular %" GST_TIME_FORMAT ", %" + GST_TIME_FORMAT " + %" GST_TIME_FORMAT " > %" GST_TIME_FORMAT " + %" + GST_TIME_FORMAT, GST_TIME_ARGS (sess->last_rtcp_send_time), + GST_TIME_ARGS (sess->last_rtcp_check_time), GST_TIME_ARGS (T_rr), + GST_TIME_ARGS (current_time), GST_TIME_ARGS (max_delay)); + } + + if (!allow_early) { + /* Ignore the request a scheduled packet will be in time anyway */ + if (current_time + max_delay > sess->next_rtcp_check_time) { + GST_LOG_OBJECT (sess, + "next scheduled time is soon %" GST_TIME_FORMAT " + %" GST_TIME_FORMAT + " > %" GST_TIME_FORMAT, GST_TIME_ARGS (current_time), + GST_TIME_ARGS (max_delay), + GST_TIME_ARGS (sess->next_rtcp_check_time)); + ret = TRUE; + } else { + GST_LOG_OBJECT (sess, + "can't allow early feedback and next scheduled time is too late %" + GST_TIME_FORMAT " + %" GST_TIME_FORMAT " < %" GST_TIME_FORMAT, + GST_TIME_ARGS (current_time), GST_TIME_ARGS (max_delay), + GST_TIME_ARGS (sess->next_rtcp_check_time)); + ret = FALSE; + } + goto end; } + /* RFC 4585 section 3.5.2 step 4b */ if (T_dither_max) { /* Schedule an early transmission later */ sess->next_early_rtcp_time = g_random_double () * T_dither_max + - current_time; + current_time + offset; } else { /* If no dithering, schedule it for NOW */ - sess->next_early_rtcp_time = current_time; + sess->next_early_rtcp_time = current_time + offset; } - GST_LOG_OBJECT (sess, "next early RTCP time %" GST_TIME_FORMAT, - GST_TIME_ARGS (sess->next_early_rtcp_time)); + GST_LOG_OBJECT (sess, "next early RTCP time %" GST_TIME_FORMAT + ", next regular RTCP time %" GST_TIME_FORMAT, + GST_TIME_ARGS (sess->next_early_rtcp_time), + GST_TIME_ARGS (sess->next_rtcp_check_time)); RTP_SESSION_UNLOCK (sess); /* notify app of need to send packet early @@ -3837,24 +4075,26 @@ if (sess->callbacks.reconsider) sess->callbacks.reconsider (sess, sess->reconsider_user_data); - return; + return TRUE; -dont_send: +end: RTP_SESSION_UNLOCK (sess); + + return ret; } -static void +static gboolean rtp_session_send_rtcp (RTPSession * sess, GstClockTime max_delay) { GstClockTime now; if (!sess->callbacks.send_rtcp) - return; + return FALSE; now = sess->callbacks.request_time (sess, sess->request_time_user_data); - rtp_session_request_early_rtcp (sess, now, max_delay); + return rtp_session_request_early_rtcp (sess, now, max_delay); } gboolean @@ -3863,6 +4103,11 @@ { RTPSource *src; + if (!rtp_session_send_rtcp (sess, 5 * GST_SECOND)) { + GST_DEBUG ("FIR/PLI not sent"); + return FALSE; + } + RTP_SESSION_LOCK (sess); src = find_source (sess, ssrc); if (src == NULL) @@ -3880,8 +4125,6 @@ } RTP_SESSION_UNLOCK (sess); - rtp_session_send_rtcp (sess, 200 * GST_MSECOND); - return TRUE; /* ERRORS */ @@ -3909,6 +4152,11 @@ { RTPSource *source; + if (!rtp_session_send_rtcp (sess, max_delay)) { + GST_DEBUG ("NACK not sent"); + return FALSE; + } + RTP_SESSION_LOCK (sess); source = find_source (sess, ssrc); if (source == NULL) @@ -3918,8 +4166,6 @@ rtp_source_register_nack (source, seqnum); RTP_SESSION_UNLOCK (sess); - rtp_session_send_rtcp (sess, max_delay); - return TRUE; /* ERRORS */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsession.h gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsession.h --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsession.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsession.h 2015-10-22 08:02:54.000000000 +0000 @@ -220,6 +220,8 @@ guint probation; + GstRTPProfile rtp_profile; + /* bandwidths */ gboolean recalc_bandwidth; guint bandwidth; @@ -228,6 +230,8 @@ guint rtcp_rs_bandwidth; guint32 suggested_ssrc; + gboolean internal_ssrc_set; + gboolean internal_ssrc_from_caps_or_property; /* for sender/receiver counting */ guint32 key; @@ -237,8 +241,10 @@ guint total_sources; guint16 generation; - GstClockTime next_rtcp_check_time; - GstClockTime last_rtcp_send_time; + GstClockTime next_rtcp_check_time; /* tn */ + GstClockTime last_rtcp_check_time; /* tp */ + GstClockTime last_rtcp_send_time; /* t_rr_last */ + GstClockTime last_rtcp_interval; /* T_rr */ GstClockTime start_time; gboolean first_rtcp; gboolean allow_early; @@ -301,7 +307,8 @@ gboolean early); void (*on_feedback_rtcp) (RTPSession *sess, guint type, guint fbtype, guint sender_ssrc, guint media_ssrc, GstBuffer *fci); - void (*send_rtcp) (RTPSession *sess, GstClockTime max_delay); + gboolean (*send_rtcp) (RTPSession *sess, GstClockTime max_delay); + void (*on_receiving_rtcp) (RTPSession *sess, GstBuffer *buffer); }; GType rtp_session_get_type (void); @@ -342,7 +349,7 @@ void rtp_session_set_sdes_struct (RTPSession *sess, const GstStructure *sdes); /* handling sources */ -guint32 rtp_session_suggest_ssrc (RTPSession *sess); +guint32 rtp_session_suggest_ssrc (RTPSession *sess, gboolean *is_random); gboolean rtp_session_add_source (RTPSession *sess, RTPSource *src); guint rtp_session_get_num_sources (RTPSession *sess); @@ -374,7 +381,7 @@ guint64 ntpnstime, GstClockTime running_time); /* request the transmittion of an early RTCP packet */ -void rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time, +gboolean rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time, GstClockTime max_delay); /* Notify session of a request for a new key unit */ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsource.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsource.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsource.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsource.c 2015-10-22 08:02:54.000000000 +0000 @@ -50,8 +50,7 @@ PROP_IS_SENDER, PROP_SDES, PROP_STATS, - PROP_PROBATION, - PROP_LAST + PROP_PROBATION }; /* GObject vmethods */ @@ -111,7 +110,7 @@ * 'tool' G_TYPE_STRING : The name of application or tool * 'note' G_TYPE_STRING : A notice about the source * - * other fields may be present and these represent private items in + * Other fields may be present and these represent private items in * the SDES where the field name is the prefix. */ g_object_class_install_property (gobject_class, PROP_SDES, @@ -122,25 +121,37 @@ /** * RTPSource::stats * - * The statistics of the source. This property returns a GstStructure with - * name application/x-rtp-source-stats with the following fields: + * This property returns a GstStructure named application/x-rtp-source-stats with + * fields useful for statistics and diagnostics. * - * "ssrc" G_TYPE_UINT The SSRC of this source - * "internal" G_TYPE_BOOLEAN If this source is a source of the session - * "validated" G_TYPE_BOOLEAN If the source is validated - * "received-bye" G_TYPE_BOOLEAN If we received a BYE from this source - * "is-csrc" G_TYPE_BOOLEAN If this source was found as CSRC - * "is-sender" G_TYPE_BOOLEAN If this source is a sender + * Take note of each respective field's units: + * + * - NTP times are in the appropriate 32-bit or 64-bit fixed-point format + * starting from January 1, 1970 (except for timespans). + * - RTP times are in clock rate units (i.e. clock rate = 1 second) + * starting at a random offset. + * - For fields indicating packet loss, note that late packets are not considered lost, + * and duplicates are not taken into account. Hence, the loss may be negative + * if there are duplicates. + * + * The following fields are always present. + * + * "ssrc" G_TYPE_UINT the SSRC of this source + * "internal" G_TYPE_BOOLEAN this source is a source of the session + * "validated" G_TYPE_BOOLEAN the source is validated + * "received-bye" G_TYPE_BOOLEAN we received a BYE from this source + * "is-csrc" G_TYPE_BOOLEAN this source was found as CSRC + * "is-sender" G_TYPE_BOOLEAN this source is a sender * "seqnum-base" G_TYPE_INT first seqnum if known * "clock-rate" G_TYPE_INT the clock rate of the media * - * The following two fields are only present when known. + * The following fields are only present when known. * * "rtp-from" G_TYPE_STRING where we received the last RTP packet from * "rtcp-from" G_TYPE_STRING where we received the last RTCP packet from * * The following fields make sense for internal sources and will only increase - * when "is-sender" is TRUE: + * when "is-sender" is TRUE. * * "octets-sent" G_TYPE_UINT64 number of bytes we sent * "packets-sent" G_TYPE_UINT64 number of packets we sent @@ -154,15 +165,15 @@ * Following fields are updated when "is-sender" is TRUE. * * "bitrate" G_TYPE_UINT64 bitrate in bits per second - * "jitter" G_TYPE_UINT estimated jitter + * "jitter" G_TYPE_UINT estimated jitter (in clock rate units) * "packets-lost" G_TYPE_INT estimated amount of packets lost * * The last SR report this source sent. This only updates when "is-sender" is * TRUE. * * "have-sr" G_TYPE_BOOLEAN the source has sent SR - * "sr-ntptime" G_TYPE_UINT64 ntptime of SR - * "sr-rtptime" G_TYPE_UINT rtptime of SR + * "sr-ntptime" G_TYPE_UINT64 NTP time of SR (in NTP Timestamp Format, 32.32 fixed point) + * "sr-rtptime" G_TYPE_UINT RTP time of SR (in clock rate units) * "sr-octet-count" G_TYPE_UINT the number of bytes in the SR * "sr-packet-count" G_TYPE_UINT the number of packets in the SR * @@ -174,9 +185,9 @@ * "sent-rb-fractionlost" G_TYPE_UINT calculated lost fraction * "sent-rb-packetslost" G_TYPE_INT lost packets * "sent-rb-exthighestseq" G_TYPE_UINT last seen seqnum - * "sent-rb-jitter" G_TYPE_UINT jitter - * "sent-rb-lsr" G_TYPE_UINT last SR time - * "sent-rb-dlsr" G_TYPE_UINT delay since last SR + * "sent-rb-jitter" G_TYPE_UINT jitter (in clock rate units) + * "sent-rb-lsr" G_TYPE_UINT last SR time (in NTP Short Format, 16.16 fixed point) + * "sent-rb-dlsr" G_TYPE_UINT delay since last SR (in NTP Short Format, 16.16 fixed point) * * The following fields are only present for non-internal sources and * represents the last RB that this source sent. This is only updated @@ -186,15 +197,16 @@ * "rb-fractionlost" G_TYPE_UINT lost fraction * "rb-packetslost" G_TYPE_INT lost packets * "rb-exthighestseq" G_TYPE_UINT highest received seqnum - * "rb-jitter" G_TYPE_UINT reception jitter - * "rb-lsr" G_TYPE_UINT last SR time - * "rb-dlsr" G_TYPE_UINT delay since last SR + * "rb-jitter" G_TYPE_UINT reception jitter (in clock rate units) + * "rb-lsr" G_TYPE_UINT last SR time (in NTP Short Format, 16.16 fixed point) + * "rb-dlsr" G_TYPE_UINT delay since last SR (in NTP Short Format, 16.16 fixed point) * - * The round trip of this source. This is calculated from the last RB - * values and the recption time of the last RB packet. Only present for + * The round trip of this source is calculated from the last RB + * values and the reception time of the last RB packet. It is only present for * non-internal sources. * - * "rb-round-trip" G_TYPE_UINT the round trip time in nanoseconds + * "rb-round-trip" G_TYPE_UINT the round-trip time (in NTP Short Format, 16.16 fixed point) + * */ g_object_class_install_property (gobject_class, PROP_STATS, g_param_spec_boxed ("stats", "Stats", @@ -238,6 +250,9 @@ src->stats.last_rtptime = GST_CLOCK_TIME_NONE; src->stats.last_rtcptime = GST_CLOCK_TIME_NONE; g_array_set_size (src->nacks, 0); + + src->stats.sent_pli_count = 0; + src->stats.sent_fir_count = 0; } static void @@ -256,7 +271,7 @@ src->payload = -1; src->clock_rate = -1; src->packets = g_queue_new (); - src->seqnum_base = -1; + src->seqnum_offset = -1; src->last_rtptime = -1; src->retained_feedback = g_queue_new (); @@ -278,12 +293,10 @@ rtp_source_finalize (GObject * object) { RTPSource *src; - GstBuffer *buffer; src = RTP_SOURCE_CAST (object); - while ((buffer = g_queue_pop_head (src->packets))) - gst_buffer_unref (buffer); + g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); g_queue_free (src->packets); gst_structure_free (src->sdes); @@ -294,8 +307,7 @@ g_list_free_full (src->conflicting_addresses, (GDestroyNotify) rtp_conflicting_address_free); - while ((buffer = g_queue_pop_head (src->retained_feedback))) - gst_buffer_unref (buffer); + g_queue_foreach (src->retained_feedback, (GFunc) gst_buffer_unref, NULL); g_queue_free (src->retained_feedback); g_array_free (src->nacks, TRUE); @@ -341,7 +353,7 @@ "received-bye", G_TYPE_BOOLEAN, src->marked_bye, "is-csrc", G_TYPE_BOOLEAN, src->is_csrc, "is-sender", G_TYPE_BOOLEAN, is_sender, - "seqnum-base", G_TYPE_INT, src->seqnum_base, + "seqnum-base", G_TYPE_INT, src->seqnum_offset, "clock-rate", G_TYPE_INT, src->clock_rate, NULL); /* add address and port */ @@ -364,7 +376,11 @@ "bitrate", G_TYPE_UINT64, src->bitrate, "packets-lost", G_TYPE_INT, (gint) rtp_stats_get_packets_lost (&src->stats), "jitter", G_TYPE_UINT, - (guint) (src->stats.jitter >> 4), NULL); + (guint) (src->stats.jitter >> 4), + "sent-pli-count", G_TYPE_UINT, src->stats.sent_pli_count, + "recv-pli-count", G_TYPE_UINT, src->stats.recv_pli_count, + "sent-fir-count", G_TYPE_UINT, src->stats.sent_fir_count, + "recv-fir-count", G_TYPE_UINT, src->stats.recv_fir_count, NULL); /* get the last SR. */ have_sr = rtp_source_get_last_sr (src, &time, &ntptime, &rtptime, @@ -741,6 +757,7 @@ GstStructure *s; guint val; gint ival; + gboolean rtx; /* nothing changed, return */ if (caps == NULL || src->caps == caps) @@ -748,11 +765,14 @@ s = gst_caps_get_structure (caps, 0); - if (gst_structure_get_int (s, "payload", &ival)) + rtx = (gst_structure_get_uint (s, "rtx-ssrc", &val) && val == src->ssrc); + + if (gst_structure_get_int (s, rtx ? "rtx-payload" : "payload", &ival)) src->payload = ival; else src->payload = -1; - GST_DEBUG ("got payload %d", src->payload); + + GST_DEBUG ("got %spayload %d", rtx ? "rtx " : "", src->payload); if (gst_structure_get_int (s, "clock-rate", &ival)) src->clock_rate = ival; @@ -761,12 +781,14 @@ GST_DEBUG ("got clock-rate %d", src->clock_rate); - if (gst_structure_get_uint (s, "seqnum-base", &val)) - src->seqnum_base = val; + if (gst_structure_get_uint (s, rtx ? "rtx-seqnum-offset" : "seqnum-offset", + &val)) + src->seqnum_offset = val; else - src->seqnum_base = -1; + src->seqnum_offset = -1; - GST_DEBUG ("got seqnum-base %" G_GINT32_FORMAT, src->seqnum_base); + GST_DEBUG ("got %sseqnum-offset %" G_GINT32_FORMAT, rtx ? "rtx " : "", + src->seqnum_offset); gst_caps_replace (&src->caps, caps); } @@ -942,6 +964,8 @@ src->stats.bytes_received = 0; src->stats.prev_received = 0; src->stats.prev_expected = 0; + src->stats.recv_pli_count = 0; + src->stats.recv_fir_count = 0; GST_DEBUG ("base_seq %d", seq); } @@ -983,9 +1007,9 @@ static gboolean update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo) { - guint16 seqnr, udelta; + guint16 seqnr, expected; RTPSourceStats *stats; - guint16 expected; + gint16 delta; stats = &src->stats; @@ -999,18 +1023,22 @@ src->curr_probation = src->probation; } - udelta = seqnr - stats->max_seq; + expected = src->stats.max_seq + 1; + delta = gst_rtp_buffer_compare_seqnum (expected, seqnr); /* if we are still on probation, check seqnum */ if (src->curr_probation) { - expected = src->stats.max_seq + 1; - /* when in probation, we require consecutive seqnums */ - if (seqnr == expected) { + if (delta == 0) { /* expected packet */ GST_DEBUG ("probation: seqnr %d == expected %d", seqnr, expected); src->curr_probation--; + if (seqnr < stats->max_seq) { + /* sequence number wrapped - count another 64K cycle. */ + stats->cycles += RTP_SEQ_MOD; + } src->stats.max_seq = seqnr; + if (src->curr_probation == 0) { GST_DEBUG ("probation done!"); init_seq (src, seqnr); @@ -1032,16 +1060,21 @@ /* unexpected seqnum in probation */ goto probation_seqnum; } - } else if (udelta < RTP_MAX_DROPOUT) { + } else if (delta >= 0 && delta < RTP_MAX_DROPOUT) { + /* Clear bad packets */ + stats->bad_seq = RTP_SEQ_MOD + 1; /* so seq == bad_seq is false */ + g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (src->packets); + /* in order, with permissible gap */ if (seqnr < stats->max_seq) { /* sequence number wrapped - count another 64K cycle. */ stats->cycles += RTP_SEQ_MOD; } stats->max_seq = seqnr; - } else if (udelta <= RTP_SEQ_MOD - RTP_MAX_MISORDER) { + } else if (delta < -RTP_MAX_MISORDER || delta >= RTP_MAX_DROPOUT) { /* the sequence number made a very large jump */ - if (seqnr == stats->bad_seq) { + if (seqnr == stats->bad_seq && src->packets->head) { /* two sequential packets -- assume that the other side * restarted without telling us so just re-sync * (i.e., pretend this was the first packet). */ @@ -1049,11 +1082,21 @@ } else { /* unacceptable jump */ stats->bad_seq = (seqnr + 1) & (RTP_SEQ_MOD - 1); + g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (src->packets); + g_queue_push_tail (src->packets, pinfo->data); + pinfo->data = NULL; goto bad_sequence; } - } else { + } else { /* delta < 0 && delta >= -RTP_MAX_MISORDER */ + /* Clear bad packets */ + stats->bad_seq = RTP_SEQ_MOD + 1; /* so seq == bad_seq is false */ + g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (src->packets); + /* duplicate or reordered packet, will be filtered by jitterbuffer. */ - GST_WARNING ("duplicate or reordered packet (seqnr %d)", seqnr); + GST_WARNING ("duplicate or reordered packet (seqnr %u, expected %u)", seqnr, + expected); } src->stats.octets_received += pinfo->payload_len; @@ -1062,7 +1105,7 @@ /* for the bitrate estimation */ src->bytes_received += pinfo->payload_len; - GST_LOG ("seq %d, PC: %" G_GUINT64_FORMAT ", OC: %" G_GUINT64_FORMAT, + GST_LOG ("seq %u, PC: %" G_GUINT64_FORMAT ", OC: %" G_GUINT64_FORMAT, seqnr, src->stats.packets_received, src->stats.octets_received); return TRUE; @@ -1173,12 +1216,14 @@ /* we are a sender now */ src->is_sender = TRUE; + /* we are also a receiver of our packets */ + if (!update_receiver_stats (src, pinfo)) + return GST_FLOW_OK; + /* update stats for the SR */ src->stats.packets_sent += pinfo->packets; src->stats.octets_sent += pinfo->payload_len; src->bytes_sent += pinfo->payload_len; - /* we are also a receiver of our packets */ - update_receiver_stats (src, pinfo); running_time = pinfo->running_time; @@ -1232,10 +1277,10 @@ * rtp_source_process_sr: * @src: an #RTPSource * @time: time of packet arrival - * @ntptime: the NTP time in 32.32 fixed point - * @rtptime: the RTP time + * @ntptime: the NTP time (in NTP Timestamp Format, 32.32 fixed point) + * @rtptime: the RTP time (in clock rate units) * @packet_count: the packet count - * @octet_count: the octect count + * @octet_count: the octet count * * Update the sender report in @src. */ @@ -1279,11 +1324,13 @@ * @src: an #RTPSource * @ntpnstime: the current time in nanoseconds since 1970 * @fractionlost: fraction lost since last SR/RR - * @packetslost: the cumululative number of packets lost + * @packetslost: the cumulative number of packets lost * @exthighestseq: the extended last sequence number received - * @jitter: the interarrival jitter - * @lsr: the last SR packet from this source - * @dlsr: the delay since last SR packet + * @jitter: the interarrival jitter (in clock rate units) + * @lsr: the time of the last SR packet on this source + * (in NTP Short Format, 16.16 fixed point) + * @dlsr: the delay since the last SR packet + * (in NTP Short Format, 16.16 fixed point) * * Update the report block in @src. */ @@ -1339,17 +1386,17 @@ * rtp_source_get_new_sr: * @src: an #RTPSource * @ntpnstime: the current time in nanoseconds since 1970 - * @running_time: the current running_time of the pipeline. - * @ntptime: the NTP time in 32.32 fixed point - * @rtptime: the RTP time corresponding to @ntptime + * @running_time: the current running_time of the pipeline + * @ntptime: the NTP time (in NTP Timestamp Format, 32.32 fixed point) + * @rtptime: the RTP time corresponding to @ntptime (in clock rate units) * @packet_count: the packet count - * @octet_count: the octect count + * @octet_count: the octet count * * Get new values to put into a new SR report from this source. * * @running_time and @ntpnstime are captured at the same time and represent the * running time of the pipeline clock and the absolute current system time in - * nanoseconds respectively. Together with the last running_time and rtp timestamp + * nanoseconds respectively. Together with the last running_time and RTP timestamp * we have observed in the source, we can generate @ntptime and @rtptime for an SR * packet. @ntptime is basically the fixed point representation of @ntpnstime * and @rtptime the associated RTP timestamp. @@ -1427,11 +1474,13 @@ * @src: an #RTPSource * @time: the current time of the system clock * @fractionlost: fraction lost since last SR/RR - * @packetslost: the cumululative number of packets lost + * @packetslost: the cumulative number of packets lost * @exthighestseq: the extended last sequence number received - * @jitter: the interarrival jitter - * @lsr: the last SR packet from this source - * @dlsr: the delay since last SR packet + * @jitter: the interarrival jitter (in clock rate units) + * @lsr: the time of the last SR packet on this source + * (in NTP Short Format, 16.16 fixed point) + * @dlsr: the delay since the last SR packet + * (in NTP Short Format, 16.16 fixed point) * * Get new values to put into a new report block from this source. * @@ -1517,10 +1566,10 @@ * rtp_source_get_last_sr: * @src: an #RTPSource * @time: time of packet arrival - * @ntptime: the NTP time in 32.32 fixed point - * @rtptime: the RTP time + * @ntptime: the NTP time (in NTP Timestamp Format, 32.32 fixed point) + * @rtptime: the RTP time (in clock rate units) * @packet_count: the packet count - * @octet_count: the octect count + * @octet_count: the octet count * * Get the values of the last sender report as set with rtp_source_process_sr(). * @@ -1556,12 +1605,15 @@ * rtp_source_get_last_rb: * @src: an #RTPSource * @fractionlost: fraction lost since last SR/RR - * @packetslost: the cumululative number of packets lost + * @packetslost: the cumulative number of packets lost * @exthighestseq: the extended last sequence number received - * @jitter: the interarrival jitter - * @lsr: the last SR packet from this source - * @dlsr: the delay since last SR packet - * @round_trip: the round trip time + * @jitter: the interarrival jitter (in clock rate units) + * @lsr: the time of the last SR packet on this source + * (in NTP Short Format, 16.16 fixed point) + * @dlsr: the delay since the last SR packet + * (in NTP Short Format, 16.16 fixed point) + * @round_trip: the round-trip time + * (in NTP Short Format, 16.16 fixed point) * * Get the values of the last RB report set with rtp_source_process_rb(). * @@ -1714,7 +1766,7 @@ /* Time out AVPF packets that are older than the desired length */ while ((pkt = g_queue_peek_tail (src->retained_feedback)) && - GST_BUFFER_TIMESTAMP (pkt) < feedback_retention_window) + GST_BUFFER_PTS (pkt) < feedback_retention_window) gst_buffer_unref (g_queue_pop_tail (src->retained_feedback)); } @@ -1724,7 +1776,7 @@ const GstBuffer *bufa = a; const GstBuffer *bufb = b; - return GST_BUFFER_TIMESTAMP (bufa) - GST_BUFFER_TIMESTAMP (bufb); + return GST_BUFFER_PTS (bufa) - GST_BUFFER_PTS (bufb); } void @@ -1736,7 +1788,7 @@ buffer = gst_buffer_copy_region (packet->rtcp->buffer, GST_BUFFER_COPY_MEMORY, packet->offset, (gst_rtcp_packet_get_length (packet) + 1) * 4); - GST_BUFFER_TIMESTAMP (buffer) = running_time; + GST_BUFFER_PTS (buffer) = running_time; g_queue_insert_sorted (src->retained_feedback, buffer, compare_buffers, NULL); } @@ -1751,6 +1803,7 @@ } /** + * rtp_source_register_nack: * @src: The #RTPSource * @seqnum: a seqnum * @@ -1798,6 +1851,7 @@ } /** + * rtp_source_get_nacks: * @src: The #RTPSource * @n_nacks: result number of nacks * diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsource.h gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsource.h --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpsource.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpsource.h 2015-10-22 08:02:54.000000000 +0000 @@ -21,7 +21,7 @@ #define __RTP_SOURCE_H__ #include -#include +#include #include #include @@ -158,7 +158,7 @@ gint payload; GstCaps *caps; gint clock_rate; - gint32 seqnum_base; + gint32 seqnum_offset; GstClockTime bye_time; GstClockTime last_activity; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpstats.c gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpstats.c --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpstats.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpstats.c 2015-10-22 08:02:54.000000000 +0000 @@ -120,6 +120,8 @@ * rtp_stats_calculate_rtcp_interval: * @stats: an #RTPSessionStats struct * @sender: if we are a sender + * @profile: RTP profile of this session + * @ptp: if this session is a point-to-point session * @first: if this is the first time * * Calculate the RTCP interval. The result of this function is the amount of @@ -129,22 +131,31 @@ */ GstClockTime rtp_stats_calculate_rtcp_interval (RTPSessionStats * stats, gboolean we_send, - gboolean first) + GstRTPProfile profile, gboolean ptp, gboolean first) { gdouble members, senders, n; gdouble avg_rtcp_size, rtcp_bw; gdouble interval; gdouble rtcp_min_time; - /* Very first call at application start-up uses half the min - * delay for quicker notification while still allowing some time - * before reporting for randomization and to learn about other - * sources so the report interval will converge to the correct - * interval more quickly. - */ - rtcp_min_time = stats->min_interval; - if (first) - rtcp_min_time /= 2.0; + if (profile == GST_RTP_PROFILE_AVPF || profile == GST_RTP_PROFILE_SAVPF) { + /* RFC 4585 3.4d), 3.5.1 */ + + if (first && !ptp) + rtcp_min_time = 1.0; + else + rtcp_min_time = 0.0; + } else { + /* Very first call at application start-up uses half the min + * delay for quicker notification while still allowing some time + * before reporting for randomization and to learn about other + * sources so the report interval will converge to the correct + * interval more quickly. + */ + rtcp_min_time = stats->min_interval; + if (first) + rtcp_min_time /= 2.0; + } /* Dedicate a fraction of the RTCP bandwidth to senders unless * the number of senders is large enough that their share is @@ -166,10 +177,10 @@ /* no bandwidth for RTCP, return NONE to signal that we don't want to send * RTCP packets */ - if (rtcp_bw <= 0.00001) + if (rtcp_bw <= 0.0001) return GST_CLOCK_TIME_NONE; - avg_rtcp_size = stats->avg_rtcp_packet_size; + avg_rtcp_size = 8.0 * stats->avg_rtcp_packet_size; /* * The effective number of sites times the average packet size is * the total number of octets sent when each site sends a report. @@ -249,7 +260,7 @@ if (rtcp_bw <= 0.0001) return GST_CLOCK_TIME_NONE; - avg_rtcp_size = stats->avg_rtcp_packet_size; + avg_rtcp_size = 8.0 * stats->avg_rtcp_packet_size; /* * The effective number of sites times the average packet size is * the total number of octets sent when each site sends a report. diff -Nru gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpstats.h gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpstats.h --- gst-plugins-good1.0-1.4.3/gst/rtpmanager/rtpstats.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtpmanager/rtpstats.h 2015-10-22 08:02:54.000000000 +0000 @@ -22,6 +22,7 @@ #include #include +#include #include /** @@ -105,7 +106,7 @@ * protocol level overhead * @max_seqnr: highest sequence number received * @transit: previous transit time used for calculating @jitter - * @jitter: current jitter + * @jitter: current jitter (in clock rate units scaled by 16 for precision) * @prev_rtptime: previous time when an RTP packet was received * @prev_rtcptime: previous time when an RTCP packet was received * @last_rtptime: time when last RTP packet received @@ -135,6 +136,11 @@ guint64 packets_sent; guint64 octets_sent; + guint sent_pli_count; + guint recv_pli_count; + guint sent_fir_count; + guint recv_fir_count; + /* when we received stuff */ GstClockTime prev_rtptime; GstClockTime prev_rtcptime; @@ -177,12 +183,12 @@ #define RTP_STATS_BYE_TIMEOUT (2 * GST_SECOND) /* - * The maximum number of missing packets we tollerate. These are packets with a + * The maximum number of missing packets we tolerate. These are packets with a * sequence number bigger than the last seen packet. */ #define RTP_MAX_DROPOUT 3000 /* - * The maximum number of misordered packets we tollerate. These are packets with + * The maximum number of misordered packets we tolerate. These are packets with * a sequence number smaller than the last seen packet. */ #define RTP_MAX_MISORDER 100 @@ -217,7 +223,7 @@ gdouble rtcp_bw, guint rs, guint rr); -GstClockTime rtp_stats_calculate_rtcp_interval (RTPSessionStats *stats, gboolean sender, gboolean first); +GstClockTime rtp_stats_calculate_rtcp_interval (RTPSessionStats *stats, gboolean sender, GstRTPProfile profile, gboolean ptp, gboolean first); GstClockTime rtp_stats_add_rtcp_jitter (RTPSessionStats *stats, GstClockTime interval); GstClockTime rtp_stats_calculate_bye_interval (RTPSessionStats *stats); gint64 rtp_stats_get_packets_lost (const RTPSourceStats *stats); diff -Nru gst-plugins-good1.0-1.4.3/gst/rtsp/gstrtpdec.c gst-plugins-good1.0-1.6.1/gst/rtsp/gstrtpdec.c --- gst-plugins-good1.0-1.4.3/gst/rtsp/gstrtpdec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtsp/gstrtpdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -372,6 +372,7 @@ case GST_QUERY_LATENCY: { /* we pretend to be live with a 3 second latency */ + /* FIXME: Do we really have infinite maximum latency? */ gst_query_set_latency (query, TRUE, 3 * GST_SECOND, -1); res = TRUE; break; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtsp/gstrtspsrc.c gst-plugins-good1.0-1.6.1/gst/rtsp/gstrtspsrc.c --- gst-plugins-good1.0-1.4.3/gst/rtsp/gstrtspsrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtsp/gstrtspsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -53,7 +53,7 @@ * protocols can be controlled with the #GstRTSPSrc:protocols property. * * rtspsrc currently understands SDP as the format of the session description. - * For each stream listed in the SDP a new rtp_stream%d pad will be created + * For each stream listed in the SDP a new rtp_stream\%d pad will be created * with caps derived from the SDP media description. This is a caps of mime type * "application/x-rtp" that can be connected to any available RTP depayloader * element. @@ -90,7 +90,7 @@ #include #include #include -#include +#include #include "gst/gst-i18n-plugin.h" @@ -164,6 +164,37 @@ return buffer_mode_type; } +enum _GstRtspSrcNtpTimeSource +{ + NTP_TIME_SOURCE_NTP, + NTP_TIME_SOURCE_UNIX, + NTP_TIME_SOURCE_RUNNING_TIME, + NTP_TIME_SOURCE_CLOCK_TIME +}; + +#define GST_TYPE_RTSP_SRC_NTP_TIME_SOURCE (gst_rtsp_src_ntp_time_source_get_type()) +static GType +gst_rtsp_src_ntp_time_source_get_type (void) +{ + static GType ntp_time_source_type = 0; + static const GEnumValue ntp_time_source_values[] = { + {NTP_TIME_SOURCE_NTP, "NTP time based on realtime clock", "ntp"}, + {NTP_TIME_SOURCE_UNIX, "UNIX time based on realtime clock", "unix"}, + {NTP_TIME_SOURCE_RUNNING_TIME, + "Running time based on pipeline clock", + "running-time"}, + {NTP_TIME_SOURCE_CLOCK_TIME, "Pipeline clock time", "clock-time"}, + {0, NULL, NULL}, + }; + + if (!ntp_time_source_type) { + ntp_time_source_type = + g_enum_register_static ("GstRTSPSrcNtpTimeSource", + ntp_time_source_values); + } + return ntp_time_source_type; +} + #define AES_128_KEY_LEN 16 #define AES_256_KEY_LEN 32 @@ -197,6 +228,10 @@ #define DEFAULT_USE_PIPELINE_CLOCK FALSE #define DEFAULT_TLS_VALIDATION_FLAGS G_TLS_CERTIFICATE_VALIDATE_ALL #define DEFAULT_TLS_DATABASE NULL +#define DEFAULT_TLS_INTERACTION NULL +#define DEFAULT_DO_RETRANSMISSION TRUE +#define DEFAULT_NTP_TIME_SOURCE NTP_TIME_SOURCE_NTP +#define DEFAULT_USER_AGENT "GStreamer/" PACKAGE_VERSION enum { @@ -231,7 +266,10 @@ PROP_SDES, PROP_TLS_VALIDATION_FLAGS, PROP_TLS_DATABASE, - PROP_LAST + PROP_TLS_INTERACTION, + PROP_DO_RETRANSMISSION, + PROP_NTP_TIME_SOURCE, + PROP_USER_AGENT }; #define GST_TYPE_RTSP_NAT_METHOD (gst_rtsp_nat_method_get_type()) @@ -336,6 +374,31 @@ G_DEFINE_TYPE_WITH_CODE (GstRTSPSrc, gst_rtspsrc, GST_TYPE_BIN, G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_rtspsrc_uri_handler_init)); +#ifndef GST_DISABLE_GST_DEBUG +static inline const char * +cmd_to_string (guint cmd) +{ + switch (cmd) { + case CMD_OPEN: + return "OPEN"; + case CMD_PLAY: + return "PLAY"; + case CMD_PAUSE: + return "PAUSE"; + case CMD_CLOSE: + return "CLOSE"; + case CMD_WAIT: + return "WAIT"; + case CMD_RECONNECT: + return "RECONNECT"; + case CMD_LOOP: + return "LOOP"; + } + + return "unknown"; +} +#endif + static gboolean default_select_stream (GstRTSPSrc * src, guint id, GstCaps * caps) { @@ -577,9 +640,10 @@ g_object_class_install_property (gobject_class, PROP_USE_PIPELINE_CLOCK, g_param_spec_boolean ("use-pipeline-clock", "Use pipeline clock", - "Use the pipeline running-time to set the NTP time in the RTCP SR messages", + "Use the pipeline running-time to set the NTP time in the RTCP SR messages" + "(DEPRECATED: Use ntp-time-source property)", DEFAULT_USE_PIPELINE_CLOCK, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); g_object_class_install_property (gobject_class, PROP_SDES, g_param_spec_boxed ("sdes", "SDES", @@ -614,6 +678,61 @@ G_TYPE_TLS_DATABASE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** + * GstRTSPSrc::tls-interaction: + * + * A #GTlsInteraction object to be used when the connection or certificate + * database need to interact with the user. This will be used to prompt the + * user for passwords where necessary. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_TLS_INTERACTION, + g_param_spec_object ("tls-interaction", "TLS interaction", + "A GTlsInteraction object to promt the user for password or certificate", + G_TYPE_TLS_INTERACTION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstRTSPSrc::do-retransmission: + * + * Attempt to ask the server to retransmit lost packets according to RFC4588. + * + * Note: currently only works with SSRC-multiplexed retransmission streams + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_DO_RETRANSMISSION, + g_param_spec_boolean ("do-retransmission", "Retransmission", + "Ask the server to retransmit lost packets", + DEFAULT_DO_RETRANSMISSION, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstRTSPSrc::ntp-time-source: + * + * allows to select the time source that should be used + * for the NTP time in RTCP packets + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_NTP_TIME_SOURCE, + g_param_spec_enum ("ntp-time-source", "NTP Time Source", + "NTP time source for RTCP packets", + GST_TYPE_RTSP_SRC_NTP_TIME_SOURCE, DEFAULT_NTP_TIME_SOURCE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** + * GstRTSPSrc::user-agent: + * + * The string to set in the User-Agent header. + * + * Since: 1.6 + */ + g_object_class_install_property (gobject_class, PROP_USER_AGENT, + g_param_spec_string ("user-agent", "User Agent", + "The User-Agent string to send to the server", + DEFAULT_USER_AGENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** * GstRTSPSrc::handle-request: * @rtspsrc: a #GstRTSPSrc * @request: a #GstRTSPMessage @@ -756,6 +875,10 @@ src->sdes = NULL; src->tls_validation_flags = DEFAULT_TLS_VALIDATION_FLAGS; src->tls_database = DEFAULT_TLS_DATABASE; + src->tls_interaction = DEFAULT_TLS_INTERACTION; + src->do_retransmission = DEFAULT_DO_RETRANSMISSION; + src->ntp_time_source = DEFAULT_NTP_TIME_SOURCE; + src->user_agent = g_strdup (DEFAULT_USER_AGENT); /* get a list of all extensions */ src->extensions = gst_rtsp_ext_list_get (); @@ -790,6 +913,7 @@ g_free (rtspsrc->user_id); g_free (rtspsrc->user_pw); g_free (rtspsrc->multi_iface); + g_free (rtspsrc->user_agent); if (rtspsrc->sdp) { gst_sdp_message_free (rtspsrc->sdp); @@ -804,6 +928,9 @@ if (rtspsrc->tls_database) g_object_unref (rtspsrc->tls_database); + if (rtspsrc->tls_interaction) + g_object_unref (rtspsrc->tls_interaction); + /* free locks */ g_rec_mutex_clear (&rtspsrc->stream_rec_lock); g_rec_mutex_clear (&rtspsrc->state_rec_lock); @@ -1020,6 +1147,20 @@ g_clear_object (&rtspsrc->tls_database); rtspsrc->tls_database = g_value_dup_object (value); break; + case PROP_TLS_INTERACTION: + g_clear_object (&rtspsrc->tls_interaction); + rtspsrc->tls_interaction = g_value_dup_object (value); + break; + case PROP_DO_RETRANSMISSION: + rtspsrc->do_retransmission = g_value_get_boolean (value); + break; + case PROP_NTP_TIME_SOURCE: + rtspsrc->ntp_time_source = g_value_get_enum (value); + break; + case PROP_USER_AGENT: + g_free (rtspsrc->user_agent); + rtspsrc->user_agent = g_value_dup_string (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1151,6 +1292,18 @@ case PROP_TLS_DATABASE: g_value_set_object (value, rtspsrc->tls_database); break; + case PROP_TLS_INTERACTION: + g_value_set_object (value, rtspsrc->tls_interaction); + break; + case PROP_DO_RETRANSMISSION: + g_value_set_boolean (value, rtspsrc->do_retransmission); + break; + case PROP_NTP_TIME_SOURCE: + g_value_set_enum (value, rtspsrc->ntp_time_source); + break; + case PROP_USER_AGENT: + g_value_set_string (value, rtspsrc->user_agent); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1330,6 +1483,7 @@ { guint i, len; const gchar *proto; + GstCaps *global_caps; /* get proto */ proto = gst_sdp_media_get_proto (media); @@ -1347,10 +1501,17 @@ else goto unknown_proto; + /* Parse global SDP attributes once */ + global_caps = gst_caps_new_empty_simple ("application/x-unknown"); + GST_DEBUG ("mapping sdp session level attributes to caps"); + gst_rtspsrc_sdp_attributes_to_caps (sdp->attributes, global_caps); + GST_DEBUG ("mapping sdp media level attributes to caps"); + gst_rtspsrc_sdp_attributes_to_caps (media->attributes, global_caps); + len = gst_sdp_media_formats_len (media); for (i = 0; i < len; i++) { gint pt; - GstCaps *caps; + GstCaps *caps, *outcaps; GstStructure *s; const gchar *enc; PtMapItem item; @@ -1373,19 +1534,23 @@ if (strcmp (enc, "X-ASF-PF") == 0) stream->container = TRUE; } - GST_DEBUG ("mapping sdp session level attributes to caps"); - gst_rtspsrc_sdp_attributes_to_caps (sdp->attributes, caps); - GST_DEBUG ("mapping sdp media level attributes to caps"); - gst_rtspsrc_sdp_attributes_to_caps (media->attributes, caps); + + /* Merge in global caps */ + /* Intersect will merge in missing fields to the current caps */ + outcaps = gst_caps_intersect (caps, global_caps); + gst_caps_unref (caps); /* the first pt will be the default */ if (stream->ptmap->len == 0) stream->default_pt = pt; item.pt = pt; - item.caps = caps; + item.caps = outcaps; + g_array_append_val (stream->ptmap, item); } + + gst_caps_unref (global_caps); return; no_proto: @@ -1565,6 +1730,8 @@ gst_object_unref (stream->rtcppad); if (stream->session) g_object_unref (stream->session); + if (stream->rtx_pt_map) + gst_structure_free (stream->rtx_pt_map); g_free (stream); } @@ -1610,10 +1777,9 @@ gst_sdp_message_free (src->sdp); src->sdp = NULL; } - if (src->start_segment) { - gst_event_unref (src->start_segment); - src->start_segment = NULL; - } + + src->need_segment = FALSE; + if (src->provided_clock) { gst_object_unref (src->provided_clock); src->provided_clock = NULL; @@ -1704,7 +1870,6 @@ parse_keymgmt (const gchar * keymgmt, GstCaps * caps) { gboolean res = FALSE; - gchar *p, *kmpid; gsize size; guchar *data; GstMIKEYMessage *msg; @@ -1712,21 +1877,33 @@ const gchar *srtp_cipher; const gchar *srtp_auth; - p = (gchar *) keymgmt; + { + gchar *orig_value; + gchar *p, *kmpid; - SKIP_SPACES (p); - if (*p == '\0') - return FALSE; + p = orig_value = g_strdup (keymgmt); - PARSE_STRING (p, " ", kmpid); - if (!g_str_equal (kmpid, "mikey")) - return FALSE; + SKIP_SPACES (p); + if (*p == '\0') { + g_free (orig_value); + return FALSE; + } + + PARSE_STRING (p, " ", kmpid); + if (kmpid == NULL || !g_str_equal (kmpid, "mikey")) { + g_free (orig_value); + return FALSE; + } + data = g_base64_decode (p, &size); + + g_free (orig_value); /* Don't need this any more */ + } - data = g_base64_decode (p, &size); if (data == NULL) return FALSE; msg = gst_mikey_message_new_from_data (data, size, NULL, NULL); + g_free (data); if (msg == NULL) return FALSE; @@ -1829,6 +2006,7 @@ gst_buffer_new_wrapped (g_memdup (pkd->key_data, pkd->key_len), pkd->key_len); gst_caps_set_simple (caps, "srtp-key", GST_TYPE_BUFFER, buf, NULL); + gst_buffer_unref (buf); } gst_caps_set_simple (caps, @@ -1875,6 +2053,8 @@ continue; if (!strcmp (key, "range")) continue; + if (!strcmp (key, "framesize")) + continue; if (g_str_equal (key, "key-mgmt")) { parse_keymgmt (attr->value, caps); continue; @@ -1922,6 +2102,7 @@ * Mapping of caps to and from SDP fields: * * a=rtpmap: /[/] + * a=framesize: - * a=fmtp: [=];... */ static GstCaps * @@ -1930,6 +2111,7 @@ GstCaps *caps; const gchar *rtpmap; const gchar *fmtp; + const gchar *framesize; gchar *name = NULL; gint rate = -1; gchar *params = NULL; @@ -2016,6 +2198,11 @@ for (i = 0; pairs[i]; i++) { gchar *valpos; const gchar *val, *key; + gint j; + const gchar *reserved_keys[] = + { "media", "payload", "clock-rate", "encoding-name", + "encoding-params" + }; /* the key may not have a '=', the value can have other '='s */ valpos = strstr (pairs[i], "="); @@ -2034,6 +2221,19 @@ } /* strip the key of spaces, convert key to lowercase but not the value. */ key = g_strstrip (pairs[i]); + + /* skip keys from the fmtp, which we already use ourselves for the + * caps. Some software is adding random things like clock-rate into + * the fmtp, and we would otherwise here set a string-typed clock-rate + * in the caps... and thus fail to create valid RTP caps + */ + for (j = 0; j < G_N_ELEMENTS (reserved_keys); j++) { + if (g_ascii_strcasecmp (reserved_keys[j], key) == 0) { + key = ""; + break; + } + } + if (strlen (key) > 1) { tmp = g_ascii_strdown (key, -1); gst_structure_set (s, tmp, G_TYPE_STRING, val, NULL); @@ -2043,6 +2243,19 @@ g_strfreev (pairs); } } + + /* parse framesize: field */ + if ((framesize = gst_sdp_media_get_attribute_val (media, "framesize"))) { + gchar *p; + + /* p is now of the format - */ + p = (gchar *) framesize; + + PARSE_INT (p, " ", payload); + if (payload != -1 && payload == pt) { + gst_structure_set (s, "a-framesize", G_TYPE_STRING, p, NULL); + } + } return caps; /* ERRORS */ @@ -2341,16 +2554,6 @@ } static gboolean -gst_rtspsrc_do_seek (GstRTSPSrc * src, GstSegment * segment) -{ - src->state = GST_RTSP_STATE_SEEKING; - /* PLAY will add the range header now. */ - src->need_range = TRUE; - - return TRUE; -} - -static gboolean gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event) { gdouble rate; @@ -2439,7 +2642,10 @@ } src->skip = skip; - gst_rtspsrc_do_seek (src, &seeksegment); + src->state = GST_RTSP_STATE_SEEKING; + + /* PLAY will add the range header now. */ + src->need_range = TRUE; /* and continue playing */ if (playing) @@ -2647,9 +2853,8 @@ seekable = seekable && src->seekable && src->segment.duration && GST_CLOCK_TIME_IS_VALID (src->segment.duration); - /* FIXME ?? should we have 0 and segment.duration here; see demuxers */ - gst_query_set_seeking (query, GST_FORMAT_TIME, seekable, - src->segment.start, src->segment.stop); + gst_query_set_seeking (query, GST_FORMAT_TIME, seekable, 0, + src->segment.duration); res = TRUE; } break; @@ -3089,6 +3294,7 @@ g_value_unset (&rtcp_cipher); g_value_unset (&rtcp_auth); + gst_buffer_unref (buf); } } name = g_strdup_printf ("rtcp_sink_%d", session); @@ -3099,6 +3305,125 @@ return gst_object_ref (stream->srtpenc); } +static GstElement * +request_aux_receiver (GstElement * rtpbin, guint sessid, GstRTSPSrc * src) +{ + GstElement *rtx, *bin; + GstPad *pad; + gchar *name; + GstRTSPStream *stream; + + stream = find_stream (src, &sessid, (gpointer) find_stream_by_id); + if (!stream) { + GST_WARNING_OBJECT (src, "Stream %u not found", sessid); + return NULL; + } + + GST_INFO_OBJECT (src, "creating retransmision receiver for session %u " + "with map %" GST_PTR_FORMAT, sessid, stream->rtx_pt_map); + bin = gst_bin_new (NULL); + rtx = gst_element_factory_make ("rtprtxreceive", NULL); + g_object_set (rtx, "payload-type-map", stream->rtx_pt_map, NULL); + gst_bin_add (GST_BIN (bin), rtx); + + pad = gst_element_get_static_pad (rtx, "src"); + name = g_strdup_printf ("src_%u", sessid); + gst_element_add_pad (bin, gst_ghost_pad_new (name, pad)); + g_free (name); + gst_object_unref (pad); + + pad = gst_element_get_static_pad (rtx, "sink"); + name = g_strdup_printf ("sink_%u", sessid); + gst_element_add_pad (bin, gst_ghost_pad_new (name, pad)); + g_free (name); + gst_object_unref (pad); + + return bin; +} + +static void +add_retransmission (GstRTSPSrc * src, GstRTSPTransport * transport) +{ + GList *walk; + guint signal_id; + gboolean do_retransmission = FALSE; + + if (transport->trans != GST_RTSP_TRANS_RTP) + return; + if (transport->profile != GST_RTSP_PROFILE_AVPF && + transport->profile != GST_RTSP_PROFILE_SAVPF) + return; + + signal_id = g_signal_lookup ("request-aux-receiver", + G_OBJECT_TYPE (src->manager)); + /* there's already something connected */ + if (g_signal_handler_find (src->manager, G_SIGNAL_MATCH_ID, signal_id, 0, + NULL, NULL, NULL) != 0) { + GST_DEBUG_OBJECT (src, "Not adding RTX AUX element as " + "\"request-aux-receiver\" signal is " + "already used by the application"); + return; + } + + /* build the retransmission payload type map */ + for (walk = src->streams; walk; walk = g_list_next (walk)) { + GstRTSPStream *stream = (GstRTSPStream *) walk->data; + gboolean do_retransmission_stream = FALSE; + int i; + + if (stream->rtx_pt_map) + gst_structure_free (stream->rtx_pt_map); + stream->rtx_pt_map = gst_structure_new_empty ("application/x-rtp-pt-map"); + + for (i = 0; i < stream->ptmap->len; i++) { + PtMapItem *item = &g_array_index (stream->ptmap, PtMapItem, i); + GstStructure *s = gst_caps_get_structure (item->caps, 0); + const gchar *encoding; + + /* we only care about RTX streams */ + if ((encoding = gst_structure_get_string (s, "encoding-name")) + && g_strcmp0 (encoding, "RTX") == 0) { + const gchar *stream_pt_s; + gint rtx_pt; + + if (gst_structure_get_int (s, "payload", &rtx_pt) + && (stream_pt_s = gst_structure_get_string (s, "apt"))) { + + if (rtx_pt != 0) { + gst_structure_set (stream->rtx_pt_map, stream_pt_s, G_TYPE_UINT, + rtx_pt, NULL); + do_retransmission_stream = TRUE; + } + } + } + } + + if (do_retransmission_stream) { + GST_DEBUG_OBJECT (src, "built retransmission payload map for stream " + "id %i: %" GST_PTR_FORMAT, stream->id, stream->rtx_pt_map); + do_retransmission = TRUE; + } else { + GST_DEBUG_OBJECT (src, "no retransmission payload map for stream " + "id %i", stream->id); + gst_structure_free (stream->rtx_pt_map); + stream->rtx_pt_map = NULL; + } + } + + if (do_retransmission) { + GST_DEBUG_OBJECT (src, "Enabling retransmissions"); + + g_object_set (src->manager, "do-retransmission", TRUE, NULL); + + /* enable RFC4588 retransmission handling by setting rtprtxreceive + * as the "aux" element of rtpbin */ + g_signal_connect (src->manager, "request-aux-receiver", + (GCallback) request_aux_receiver, src); + } else { + GST_DEBUG_OBJECT (src, + "Not enabling retransmissions as no stream had a retransmission payload map"); + } +} /* try to get and configure a manager */ static gboolean @@ -3148,9 +3473,15 @@ g_object_set (src->manager, "ntp-sync", src->ntp_sync, NULL); } - if (g_object_class_find_property (klass, "use-pipeline-clock")) { - g_object_set (src->manager, "use-pipeline-clock", - src->use_pipeline_clock, NULL); + if (src->use_pipeline_clock) { + if (g_object_class_find_property (klass, "use-pipeline-clock")) { + g_object_set (src->manager, "use-pipeline-clock", TRUE, NULL); + } + } else { + if (g_object_class_find_property (klass, "ntp-time-source")) { + g_object_set (src->manager, "ntp-time-source", src->ntp_time_source, + NULL); + } } if (src->sdes && g_object_class_find_property (klass, "sdes")) { @@ -3171,7 +3502,7 @@ * so slaving in jitterbuffer does not make much sense * (and might mess things up due to bursts) */ if (GST_CLOCK_TIME_IS_VALID (src->segment.duration) && - src->segment.duration && !stream->container) { + src->segment.duration && stream->container) { src->use_buffering = TRUE; } else { src->use_buffering = FALSE; @@ -3194,6 +3525,9 @@ g_signal_emit (src, gst_rtspsrc_signals[SIGNAL_NEW_MANAGER], 0, src->manager); + + if (src->do_retransmission) + add_retransmission (src, transport); } g_signal_connect (src->manager, "request-rtp-decoder", (GCallback) request_rtp_decoder, stream); @@ -3219,6 +3553,8 @@ g_signal_emit_by_name (src->manager, "get-internal-session", stream->id, &rtpsession); if (rtpsession) { + GstRTPProfile rtp_profile; + GST_INFO_OBJECT (src, "configure bandwidth in session %p", rtpsession); stream->session = rtpsession; @@ -3240,6 +3576,24 @@ NULL); } + switch (stream->profile) { + case GST_RTSP_PROFILE_AVPF: + rtp_profile = GST_RTP_PROFILE_AVPF; + break; + case GST_RTSP_PROFILE_SAVP: + rtp_profile = GST_RTP_PROFILE_SAVP; + break; + case GST_RTSP_PROFILE_SAVPF: + rtp_profile = GST_RTP_PROFILE_SAVPF; + break; + case GST_RTSP_PROFILE_AVP: + default: + rtp_profile = GST_RTP_PROFILE_AVP; + break; + } + + g_object_set (rtpsession, "rtp-profile", rtp_profile, NULL); + g_object_set (rtpsession, "probation", src->probation, NULL); g_object_set (rtpsession, "internal-ssrc", stream->send_ssrc, NULL); @@ -4149,6 +4503,10 @@ if (src->tls_database) gst_rtsp_connection_set_tls_database (info->connection, src->tls_database); + + if (src->tls_interaction) + gst_rtsp_connection_set_tls_interaction (info->connection, + src->tls_interaction); } if (info->url->transports & GST_RTSP_LOWER_TRANS_HTTP) @@ -4255,6 +4613,23 @@ GST_RTSP_STATE_UNLOCK (src); } +static GstRTSPResult +gst_rtspsrc_init_request (GstRTSPSrc * src, GstRTSPMessage * msg, + GstRTSPMethod method, const gchar * uri) +{ + GstRTSPResult res; + + res = gst_rtsp_message_init_request (msg, method, uri); + if (res < 0) + return res; + + /* set user-agent */ + if (src->user_agent) + gst_rtsp_message_add_header (msg, GST_RTSP_HDR_USER_AGENT, src->user_agent); + + return res; +} + /* FIXME, handle server request, reply with OK, for now */ static GstRTSPResult gst_rtspsrc_handle_request (GstRTSPSrc * src, GstRTSPConnection * conn, @@ -4331,7 +4706,7 @@ if (control == NULL) goto no_control; - res = gst_rtsp_message_init_request (&request, method, control); + res = gst_rtspsrc_init_request (src, &request, method, control); if (res < 0) goto send_error; @@ -4378,7 +4753,6 @@ guint size; GstBuffer *buf; gboolean is_rtcp; - GstEvent *event; channel = message->type_data.data.channel; @@ -4443,6 +4817,7 @@ for (streams = src->streams; streams; streams = g_list_next (streams)) { GstRTSPStream *ostream = (GstRTSPStream *) streams->data; + GstCaps *caps; stream_id = g_strdup_printf ("%s/%d", g_checksum_get_string (cs), ostream->id); @@ -4451,15 +4826,45 @@ g_free (stream_id); gst_rtspsrc_stream_push_event (src, ostream, event); + + if ((caps = stream_get_caps_for_pt (ostream, ostream->default_pt))) { + /* only streams that have a connection to the outside world */ + if (ostream->setup) { + if (ostream->udpsrc[0]) { + gst_element_send_event (ostream->udpsrc[0], + gst_event_new_caps (caps)); + } else if (ostream->channelpad[0]) { + if (GST_PAD_IS_SRC (ostream->channelpad[0])) + gst_pad_push_event (ostream->channelpad[0], + gst_event_new_caps (caps)); + else + gst_pad_send_event (ostream->channelpad[0], + gst_event_new_caps (caps)); + } + + caps = gst_caps_new_empty_simple ("application/x-rtcp"); + + if (ostream->udpsrc[1]) { + gst_element_send_event (ostream->udpsrc[1], + gst_event_new_caps (caps)); + } else if (ostream->channelpad[1]) { + if (GST_PAD_IS_SRC (ostream->channelpad[1])) + gst_pad_push_event (ostream->channelpad[1], + gst_event_new_caps (caps)); + else + gst_pad_send_event (ostream->channelpad[1], + gst_event_new_caps (caps)); + } + + gst_caps_unref (caps); + } + } } g_checksum_free (cs); gst_rtspsrc_activate_streams (src); src->need_activate = FALSE; - } - if ((event = src->start_segment) != NULL) { - src->start_segment = NULL; - gst_rtspsrc_push_event (src, event); + src->need_segment = TRUE; } if (src->base_time == -1) { @@ -4486,6 +4891,15 @@ GST_OBJECT_UNLOCK (src); } + /* If needed send a new segment, don't forget we are live and buffer are + * timestamped with running time */ + if (src->need_segment) { + GstSegment segment; + src->need_segment = FALSE; + gst_segment_init (&segment, GST_FORMAT_TIME); + gst_rtspsrc_push_event (src, gst_event_new_segment (&segment)); + } + if (stream->discont && !is_rtcp) { /* mark first RTP buffer as discont */ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); @@ -4984,7 +5398,7 @@ /* start new request */ gst_rtspsrc_loop_start_cmd (src, cmd); - GST_DEBUG_OBJECT (src, "sending cmd %d", cmd); + GST_DEBUG_OBJECT (src, "sending cmd %s", cmd_to_string (cmd)); GST_OBJECT_LOCK (src); old = src->pending_cmd; @@ -4996,18 +5410,20 @@ src->pending_cmd = CMD_WAIT; GST_OBJECT_UNLOCK (src); /* cancel previous request */ - GST_DEBUG_OBJECT (src, "cancel previous request %d", old); + GST_DEBUG_OBJECT (src, "cancel previous request %s", cmd_to_string (old)); gst_rtspsrc_loop_cancel_cmd (src, old); GST_OBJECT_LOCK (src); } src->pending_cmd = cmd; /* interrupt if allowed */ if (src->busy_cmd & mask) { - GST_DEBUG_OBJECT (src, "connection flush busy %d", src->busy_cmd); + GST_DEBUG_OBJECT (src, "connection flush busy %s", + cmd_to_string (src->busy_cmd)); gst_rtspsrc_connection_flush (src, TRUE); flushed = TRUE; } else { - GST_DEBUG_OBJECT (src, "not interrupting busy cmd %d", src->busy_cmd); + GST_DEBUG_OBJECT (src, "not interrupting busy cmd %s", + cmd_to_string (src->busy_cmd)); } if (src->task) gst_task_start (src->task); @@ -5547,6 +5963,7 @@ switch (int_code) { case GST_RTSP_STS_UNAUTHORIZED: + case GST_RTSP_STS_NOT_FOUND: if (gst_rtspsrc_setup_auth (src, response)) { /* Try the request/response again after configuring the auth info * and loop again */ @@ -5582,6 +5999,10 @@ GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL), ("%s", response->type_data.response.reason)); break; + case GST_RTSP_STS_UNAUTHORIZED: + GST_ELEMENT_ERROR (src, RESOURCE, NOT_AUTHORIZED, (NULL), ("%s", + response->type_data.response.reason)); + break; case GST_RTSP_STS_MOVED_PERMANENTLY: case GST_RTSP_STS_MOVE_TEMPORARILY: { @@ -5717,7 +6138,7 @@ /* masks to be kept in sync with the hardcoded protocol order of preference * in code below */ -static guint protocol_masks[] = { +static const guint protocol_masks[] = { GST_RTSP_LOWER_TRANS_UDP, GST_RTSP_LOWER_TRANS_UDP_MCAST, GST_RTSP_LOWER_TRANS_TCP, @@ -5938,10 +6359,11 @@ GstBuffer *buf; guint8 *key_data; #define KEY_SIZE 30 + guint data_size = GST_ROUND_UP_4 (KEY_SIZE); /* create a random key */ - key_data = g_malloc (KEY_SIZE); - for (i = 0; i < KEY_SIZE; i += 4) + key_data = g_malloc (data_size); + for (i = 0; i < data_size; i += 4) GST_WRITE_UINT32_BE (key_data + i, g_random_int ()); buf = gst_buffer_new_wrapped (key_data, KEY_SIZE); @@ -5951,6 +6373,8 @@ "srtcp-cipher", G_TYPE_STRING, "aes-128-icm", "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80", NULL); + gst_buffer_unref (buf); + return caps; } @@ -6221,7 +6645,7 @@ /* create SETUP request */ res = - gst_rtsp_message_init_request (&request, GST_RTSP_SETUP, + gst_rtspsrc_init_request (src, &request, GST_RTSP_SETUP, stream->conninfo.location); if (res < 0) { g_free (transports); @@ -6250,7 +6674,8 @@ stream->id)); /* handle the code ourselves */ - if ((res = gst_rtspsrc_send (src, conn, &request, &response, &code) < 0)) + res = gst_rtspsrc_send (src, conn, &request, &response, &code); + if (res < 0) goto send_error; switch (code) { @@ -6344,7 +6769,7 @@ break; } - if (!stream->container || (!src->interleaved && !retry)) { + if (!src->interleaved || !retry) { /* now configure the stream with the selected transport */ if (!gst_rtspsrc_stream_configure_transport (stream, &transport)) { GST_DEBUG_OBJECT (src, @@ -6757,7 +7182,7 @@ /* create OPTIONS */ GST_DEBUG_OBJECT (src, "create options..."); res = - gst_rtsp_message_init_request (&request, GST_RTSP_OPTIONS, + gst_rtspsrc_init_request (src, &request, GST_RTSP_OPTIONS, src->conninfo.url_str); if (res < 0) goto create_request_failed; @@ -6780,7 +7205,7 @@ /* create DESCRIBE */ GST_DEBUG_OBJECT (src, "create describe..."); res = - gst_rtsp_message_init_request (&request, GST_RTSP_DESCRIBE, + gst_rtspsrc_init_request (src, &request, GST_RTSP_DESCRIBE, src->conninfo.url_str); if (res < 0) goto create_request_failed; @@ -6814,7 +7239,7 @@ } /* it could be that the DESCRIBE method was not implemented */ - if (!src->methods & GST_RTSP_DESCRIBE) + if (!(src->methods & GST_RTSP_DESCRIBE)) goto no_describe; /* check if reply is SDP */ @@ -6823,7 +7248,7 @@ /* could not be set but since the request returned OK, we assume it * was SDP, else check it. */ if (respcont) { - if (!g_ascii_strcasecmp (respcont, "application/sdp") == 0) + if (g_ascii_strcasecmp (respcont, "application/sdp") != 0) goto wrong_content_type; } @@ -6996,7 +7421,7 @@ /* do TEARDOWN */ res = - gst_rtsp_message_init_request (&request, GST_RTSP_TEARDOWN, setup_url); + gst_rtspsrc_init_request (src, &request, GST_RTSP_TEARDOWN, setup_url); if (res < 0) goto create_request_failed; @@ -7287,8 +7712,6 @@ if (src->manager) g_signal_emit_by_name (src->manager, "reset-sync", NULL); - gst_rtspsrc_set_state (src, GST_STATE_PLAYING); - /* construct a control url */ control = get_aggregate_control (src); @@ -7312,7 +7735,7 @@ } /* do play */ - res = gst_rtsp_message_init_request (&request, GST_RTSP_PLAY, setup_url); + res = gst_rtspsrc_init_request (src, &request, GST_RTSP_PLAY, setup_url); if (res < 0) goto create_request_failed; @@ -7322,9 +7745,7 @@ gst_rtsp_message_take_header (&request, GST_RTSP_HDR_RANGE, hval); /* store the newsegment event so it can be sent from the streaming thread. */ - if (src->start_segment) - gst_event_unref (src->start_segment); - src->start_segment = gst_event_new_segment (&src->segment); + src->need_segment = TRUE; } if (segment->rate != 1.0) { @@ -7410,6 +7831,11 @@ * the manager object when we set a new Range header (we did a seek) */ gst_rtspsrc_configure_caps (src, segment, src->need_range); + /* set to PLAYING after we have configured the caps, otherwise we + * might end up calling request_key (with SRTP) while caps are still + * being configured. */ + gst_rtspsrc_set_state (src, GST_STATE_PLAYING); + /* set again when needed */ src->need_range = FALSE; @@ -7523,7 +7949,7 @@ ("Sending PAUSE request")); if ((res = - gst_rtsp_message_init_request (&request, GST_RTSP_PAUSE, + gst_rtspsrc_init_request (src, &request, GST_RTSP_PAUSE, setup_url)) < 0) goto create_request_failed; @@ -7684,7 +8110,7 @@ src->pending_cmd = CMD_LOOP; else src->pending_cmd = CMD_WAIT; - GST_DEBUG_OBJECT (src, "got command %d", cmd); + GST_DEBUG_OBJECT (src, "got command %s", cmd_to_string (cmd)); /* we got the message command, so ensure communication is possible again */ gst_rtspsrc_connection_flush (src, FALSE); @@ -7924,6 +8350,7 @@ { GstRTSPSrc *src; GstRTSPResult res; + GstSDPResult sres; GstRTSPUrl *newurl = NULL; GstSDPMessage *sdp = NULL; @@ -7934,11 +8361,13 @@ goto was_ok; if (g_str_has_prefix (uri, "rtsp-sdp://")) { - if ((res = gst_sdp_message_new (&sdp) < 0)) + sres = gst_sdp_message_new (&sdp); + if (sres < 0) goto sdp_failed; GST_DEBUG_OBJECT (src, "parsing SDP message"); - if ((res = gst_sdp_message_parse_uri (uri, sdp) < 0)) + sres = gst_sdp_message_parse_uri (uri, sdp); + if (sres < 0) goto invalid_sdp; } else { /* try to parse */ @@ -7979,14 +8408,14 @@ } sdp_failed: { - GST_ERROR_OBJECT (src, "Could not create new SDP (%d)", res); + GST_ERROR_OBJECT (src, "Could not create new SDP (%d)", sres); g_set_error_literal (error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, "Could not create SDP"); return FALSE; } invalid_sdp: { - GST_ERROR_OBJECT (src, "Not a valid SDP (%d) '%s'", res, + GST_ERROR_OBJECT (src, "Not a valid SDP (%d) '%s'", sres, GST_STR_NULL (uri)); gst_sdp_message_free (sdp); g_set_error_literal (error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, diff -Nru gst-plugins-good1.0-1.4.3/gst/rtsp/gstrtspsrc.h gst-plugins-good1.0-1.6.1/gst/rtsp/gstrtspsrc.h --- gst-plugins-good1.0-1.4.3/gst/rtsp/gstrtspsrc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtsp/gstrtspsrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -48,10 +48,7 @@ G_BEGIN_DECLS -#include -#include -#include -#include +#include #include #include "gstrtspext.h" @@ -157,6 +154,7 @@ gboolean is_multicast; guint ttl; + GstStructure *rtx_pt_map; }; /** @@ -184,7 +182,7 @@ gboolean need_range; gboolean skip; gint free_channel; - GstEvent *start_segment; + gboolean need_segment; GstClockTime base_time; /* UDP mode loop */ @@ -236,6 +234,10 @@ GstStructure *sdes; GTlsCertificateFlags tls_validation_flags; GTlsDatabase *tls_database; + GTlsInteraction *tls_interaction; + gboolean do_retransmission; + gint ntp_time_source; + gchar *user_agent; /* state */ GstRTSPState state; diff -Nru gst-plugins-good1.0-1.4.3/gst/rtsp/Makefile.am gst-plugins-good1.0-1.6.1/gst/rtsp/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/rtsp/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtsp/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -6,7 +6,7 @@ libgstrtsp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) libgstrtsp_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(GST_BASE_LIBS) $(GIO_LIBS) \ -lgstrtp-@GST_API_VERSION@ -lgstrtsp-@GST_API_VERSION@ \ - -lgstsdp-@GST_API_VERSION@ -lgstnet-@GST_API_VERSION@ $(GST_LIBS) + -lgstsdp-@GST_API_VERSION@ $(GST_NET_LIBS) $(GST_LIBS) libgstrtsp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstrtsp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) @@ -14,17 +14,3 @@ gstrtsp.h \ gstrtpdec.h \ gstrtspext.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstrtsp -:SHARED libgstrtsp \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstrtsp_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtsp_la_CFLAGS) \ - -:LDFLAGS $(libgstrtsp_la_LDFLAGS) \ - $(libgstrtsp_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/rtsp/Makefile.in gst-plugins-good1.0-1.6.1/gst/rtsp/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/rtsp/Makefile.in 2014-09-24 07:26:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtsp/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/rtsp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -155,7 +164,8 @@ am__DEPENDENCIES_1 = libgstrtsp_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_libgstrtsp_la_OBJECTS = libgstrtsp_la-gstrtsp.lo \ libgstrtsp_la-gstrtspsrc.lo libgstrtsp_la-gstrtpdec.lo \ libgstrtsp_la-gstrtspext.lo @@ -229,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +372,6 @@ 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@ @@ -481,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -563,7 +572,7 @@ libgstrtsp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) libgstrtsp_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(GST_BASE_LIBS) $(GIO_LIBS) \ -lgstrtp-@GST_API_VERSION@ -lgstrtsp-@GST_API_VERSION@ \ - -lgstsdp-@GST_API_VERSION@ -lgstnet-@GST_API_VERSION@ $(GST_LIBS) + -lgstsdp-@GST_API_VERSION@ $(GST_NET_LIBS) $(GST_LIBS) libgstrtsp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstrtsp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) @@ -588,7 +597,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/rtsp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/rtsp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -921,20 +929,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstrtsp -:SHARED libgstrtsp \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstrtsp_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtsp_la_CFLAGS) \ - -:LDFLAGS $(libgstrtsp_la_LDFLAGS) \ - $(libgstrtsp_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/rtsp/README gst-plugins-good1.0-1.6.1/gst/rtsp/README --- gst-plugins-good1.0-1.4.3/gst/rtsp/README 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/rtsp/README 2015-10-22 08:02:54.000000000 +0000 @@ -180,7 +180,7 @@ The streaming server typically uses a different channel to send the media data to clients, typically using RTP over UDP. It is also possible to stream the data to the client using the initial RTSP TCP session (the interleaved -mode). This last mode is usufull when the client is behind a firewall but +mode). This last mode is useful when the client is behind a firewall but does not take advantage of the RTP/UDP features. In both cases, media data is send to the clients in an unmultiplexed format diff -Nru gst-plugins-good1.0-1.4.3/gst/shapewipe/Makefile.am gst-plugins-good1.0-1.6.1/gst/shapewipe/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/shapewipe/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/shapewipe/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -8,18 +8,3 @@ libgstshapewipe_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstshapewipe.h - - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstshapewhipe -:SHARED libgstshapewhipe \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstshapewhipe_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstshapewhipe_la_CFLAGS) \ - -:LDFLAGS $(libgstshapewhipe_la_LDFLAGS) \ - $(libgstshapewhipe_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/shapewipe/Makefile.in gst-plugins-good1.0-1.6.1/gst/shapewipe/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/shapewipe/Makefile.in 2014-09-24 07:26:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/shapewipe/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/shapewipe -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -576,7 +584,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/shapewipe/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/shapewipe/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -885,20 +892,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstshapewhipe -:SHARED libgstshapewhipe \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstshapewhipe_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstshapewhipe_la_CFLAGS) \ - -:LDFLAGS $(libgstshapewhipe_la_LDFLAGS) \ - $(libgstshapewhipe_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/smpte/gstsmptealpha.c gst-plugins-good1.0-1.6.1/gst/smpte/gstsmptealpha.c --- gst-plugins-good1.0-1.4.3/gst/smpte/gstsmptealpha.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/smpte/gstsmptealpha.c 2015-10-22 08:02:54.000000000 +0000 @@ -94,8 +94,7 @@ PROP_BORDER, PROP_DEPTH, PROP_POSITION, - PROP_INVERT, - PROP_LAST, + PROP_INVERT }; #define AYUV_SIZE(w,h) ((w) * (h) * 4) @@ -616,22 +615,20 @@ { GstSMPTEAlpha *smpte = GST_SMPTE_ALPHA (vfilter); gboolean ret; - gint width, height; smpte->process = NULL; - smpte->in_format = GST_VIDEO_INFO_FORMAT (in_info); smpte->out_format = GST_VIDEO_INFO_FORMAT (out_info); - smpte->width = width = GST_VIDEO_INFO_WIDTH (out_info); - smpte->height = height = GST_VIDEO_INFO_HEIGHT (out_info); /* try to update the mask now, this will also adjust the width/height on * success */ GST_OBJECT_LOCK (smpte); ret = gst_smpte_alpha_update_mask (smpte, smpte->type, smpte->invert, - smpte->depth, width, height); + smpte->depth, GST_VIDEO_INFO_WIDTH (out_info), + GST_VIDEO_INFO_HEIGHT (out_info)); GST_OBJECT_UNLOCK (smpte); + if (!ret) goto mask_failed; diff -Nru gst-plugins-good1.0-1.4.3/gst/smpte/gstsmpte.c gst-plugins-good1.0-1.6.1/gst/smpte/gstsmpte.c --- gst-plugins-good1.0-1.4.3/gst/smpte/gstsmpte.c 2014-09-04 09:52:19.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/smpte/gstsmpte.c 2015-10-22 08:02:54.000000000 +0000 @@ -94,8 +94,7 @@ PROP_BORDER, PROP_DEPTH, PROP_DURATION, - PROP_INVERT, - PROP_LAST, + PROP_INVERT }; /* FIXME: should use video meta etc. */ @@ -469,6 +468,9 @@ !gst_pad_has_current_caps (smpte->sinkpad2)) goto not_negotiated; + if (!gst_video_info_is_equal (&smpte->vinfo1, &smpte->vinfo2)) + goto input_formats_do_not_match; + if (smpte->send_stream_start) { gchar s_id[32]; @@ -507,9 +509,6 @@ gst_buffer_unmap (in2, &map); } - if (!gst_video_info_is_equal (&smpte->vinfo1, &smpte->vinfo2)) - goto input_formats_do_not_match; - if (smpte->position < smpte->end_position) { outbuf = gst_buffer_new_and_alloc (I420_SIZE (smpte->width, smpte->height)); diff -Nru gst-plugins-good1.0-1.4.3/gst/smpte/gstsmpte.h gst-plugins-good1.0-1.6.1/gst/smpte/gstsmpte.h --- gst-plugins-good1.0-1.4.3/gst/smpte/gstsmpte.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/smpte/gstsmpte.h 2015-10-22 08:02:54.000000000 +0000 @@ -61,10 +61,8 @@ gboolean invert; /* negotiated format */ - gint format; gint width; gint height; - gdouble fps; gint fps_num; gint fps_denom; GstVideoInfo vinfo1; diff -Nru gst-plugins-good1.0-1.4.3/gst/smpte/Makefile.am gst-plugins-good1.0-1.6.1/gst/smpte/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/smpte/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/smpte/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -9,17 +9,3 @@ -lgstvideo-$(GST_API_VERSION) libgstsmpte_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstsmpte_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstsmpte -:SHARED libgstsmpte \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstsmpte_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsmpte_la_CFLAGS) \ - -:LDFLAGS $(libgstsmpte_la_LDFLAGS) \ - $(libgstsmpte_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/smpte/Makefile.in gst-plugins-good1.0-1.6.1/gst/smpte/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/smpte/Makefile.in 2014-09-24 07:26:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/smpte/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/smpte -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -229,6 +238,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +371,6 @@ 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@ @@ -481,17 +488,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +551,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -581,7 +589,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/smpte/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/smpte/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -930,20 +937,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstsmpte -:SHARED libgstsmpte \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstsmpte_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsmpte_la_CFLAGS) \ - -:LDFLAGS $(libgstsmpte_la_LDFLAGS) \ - $(libgstsmpte_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/spectrum/gstspectrum.c gst-plugins-good1.0-1.6.1/gst/spectrum/gstspectrum.c --- gst-plugins-good1.0-1.4.3/gst/spectrum/gstspectrum.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/spectrum/gstspectrum.c 2015-10-22 08:02:54.000000000 +0000 @@ -201,7 +201,7 @@ g_object_class_install_property (gobject_class, PROP_BANDS, g_param_spec_uint ("bands", "Bands", "Number of frequency bands", - 0, G_MAXUINT, DEFAULT_BANDS, + 2, ((guint) G_MAXINT + 2) / 2, DEFAULT_BANDS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_THRESHOLD, @@ -746,8 +746,7 @@ spectrum->bands); } if (spectrum->message_phase) { - gst_spectrum_message_add_array (pcv, cd->spect_magnitude, - spectrum->bands); + gst_spectrum_message_add_array (pcv, cd->spect_phase, spectrum->bands); } } } diff -Nru gst-plugins-good1.0-1.4.3/gst/spectrum/Makefile.am gst-plugins-good1.0-1.6.1/gst/spectrum/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/spectrum/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/spectrum/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -10,18 +10,3 @@ libgstspectrum_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstspectrum.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstspectrum -:SHARED libgstspectrum \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstspectrum_la_SOURCES) \ - $(nodist_libgstspectrum_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstspectrum_la_CFLAGS) \ - -:LDFLAGS $(libgstspectrum_la_LDFLAGS) \ - $(libgstspectrum_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/spectrum/Makefile.in gst-plugins-good1.0-1.6.1/gst/spectrum/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/spectrum/Makefile.in 2014-09-24 07:26:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/spectrum/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/spectrum -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -582,7 +590,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/spectrum/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/spectrum/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -891,21 +898,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstspectrum -:SHARED libgstspectrum \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstspectrum_la_SOURCES) \ - $(nodist_libgstspectrum_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstspectrum_la_CFLAGS) \ - -:LDFLAGS $(libgstspectrum_la_LDFLAGS) \ - $(libgstspectrum_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/gstdynudpsink.c gst-plugins-good1.0-1.6.1/gst/udp/gstdynudpsink.c --- gst-plugins-good1.0-1.4.3/gst/udp/gstdynudpsink.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/gstdynudpsink.c 2015-10-22 08:02:54.000000000 +0000 @@ -162,7 +162,6 @@ sink->used_socket = NULL; sink->used_socket_v6 = NULL; - sink->cancellable = g_cancellable_new (); } static void @@ -172,10 +171,6 @@ sink = GST_DYNUDPSINK (object); - if (sink->cancellable) - g_object_unref (sink->cancellable); - sink->cancellable = NULL; - if (sink->socket) g_object_unref (sink->socket); sink->socket = NULL; @@ -372,6 +367,26 @@ } } +static void +gst_dynudpsink_create_cancellable (GstDynUDPSink * sink) +{ + GPollFD pollfd; + + sink->cancellable = g_cancellable_new (); + sink->made_cancel_fd = g_cancellable_make_pollfd (sink->cancellable, &pollfd); +} + +static void +gst_dynudpsink_free_cancellable (GstDynUDPSink * sink) +{ + if (sink->made_cancel_fd) { + g_cancellable_release_fd (sink->cancellable); + sink->made_cancel_fd = FALSE; + } + g_object_unref (sink->cancellable); + sink->cancellable = NULL; +} + /* create a socket for sending to remote machine */ static gboolean gst_dynudpsink_start (GstBaseSink * bsink) @@ -381,6 +396,8 @@ udpsink = GST_DYNUDPSINK (bsink); + gst_dynudpsink_create_cancellable (udpsink); + udpsink->external_socket = FALSE; if (udpsink->socket) { @@ -552,6 +569,8 @@ udpsink->used_socket_v6 = NULL; } + gst_dynudpsink_free_cancellable (udpsink); + return TRUE; } @@ -574,7 +593,8 @@ udpsink = GST_DYNUDPSINK (bsink); - g_cancellable_reset (udpsink->cancellable); + gst_dynudpsink_free_cancellable (udpsink); + gst_dynudpsink_create_cancellable (udpsink); return TRUE; } diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/gstdynudpsink.h gst-plugins-good1.0-1.6.1/gst/udp/gstdynudpsink.h --- gst-plugins-good1.0-1.4.3/gst/udp/gstdynudpsink.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/gstdynudpsink.h 2015-10-22 08:02:54.000000000 +0000 @@ -52,6 +52,7 @@ /* the socket in use */ GSocket *used_socket, *used_socket_v6; gboolean external_socket; + gboolean made_cancel_fd; GCancellable *cancellable; }; diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/gstmultiudpsink.c gst-plugins-good1.0-1.6.1/gst/udp/gstmultiudpsink.c --- gst-plugins-good1.0-1.4.3/gst/udp/gstmultiudpsink.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/gstmultiudpsink.c 2015-10-22 08:02:54.000000000 +0000 @@ -112,14 +112,15 @@ PROP_SEND_DUPLICATES, PROP_BUFFER_SIZE, PROP_BIND_ADDRESS, - PROP_BIND_PORT, - PROP_LAST + PROP_BIND_PORT }; static void gst_multiudpsink_finalize (GObject * object); static GstFlowReturn gst_multiudpsink_render (GstBaseSink * sink, GstBuffer * buffer); +static GstFlowReturn gst_multiudpsink_render_list (GstBaseSink * bsink, + GstBufferList * buffer_list); static gboolean gst_multiudpsink_start (GstBaseSink * bsink); static gboolean gst_multiudpsink_stop (GstBaseSink * bsink); @@ -311,11 +312,13 @@ * * Since: 1.0.2 */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_FORCE_IPV4, g_param_spec_boolean ("force-ipv4", "Force IPv4", "Forcing the use of an IPv4 socket (DEPRECATED, has no effect anymore)", - DEFAULT_FORCE_IPV4, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - + DEFAULT_FORCE_IPV4, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); +#endif g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_QOS_DSCP, g_param_spec_int ("qos-dscp", "QoS diff srv code point", "Quality of Service, differentiated services code point (-1 default)", @@ -357,6 +360,7 @@ "Wim Taymans "); gstbasesink_class->render = gst_multiudpsink_render; + gstbasesink_class->render_list = gst_multiudpsink_render_list; gstbasesink_class->start = gst_multiudpsink_start; gstbasesink_class->stop = gst_multiudpsink_stop; gstbasesink_class->unlock = gst_multiudpsink_unlock; @@ -369,6 +373,25 @@ GST_DEBUG_CATEGORY_INIT (multiudpsink_debug, "multiudpsink", 0, "UDP sink"); } +static void +gst_multiudpsink_create_cancellable (GstMultiUDPSink * sink) +{ + GPollFD pollfd; + + sink->cancellable = g_cancellable_new (); + sink->made_cancel_fd = g_cancellable_make_pollfd (sink->cancellable, &pollfd); +} + +static void +gst_multiudpsink_free_cancellable (GstMultiUDPSink * sink) +{ + if (sink->made_cancel_fd) { + g_cancellable_release_fd (sink->cancellable); + sink->made_cancel_fd = FALSE; + } + g_object_unref (sink->cancellable); + sink->cancellable = NULL; +} static void gst_multiudpsink_init (GstMultiUDPSink * sink) @@ -376,6 +399,12 @@ guint max_mem; g_mutex_init (&sink->client_lock); + sink->clients = NULL; + sink->num_v4_unique = 0; + sink->num_v4_all = 0; + sink->num_v6_unique = 0; + sink->num_v6_all = 0; + sink->socket = DEFAULT_SOCKET; sink->socket_v6 = DEFAULT_SOCKET; sink->used_socket = DEFAULT_USED_SOCKET; @@ -391,19 +420,27 @@ sink->send_duplicates = DEFAULT_SEND_DUPLICATES; sink->multi_iface = g_strdup (DEFAULT_MULTICAST_IFACE); - sink->cancellable = g_cancellable_new (); + gst_multiudpsink_create_cancellable (sink); - /* allocate OutputVector and MapInfo for use in the render function, buffers can - * hold up to a maximum amount of memory so we can create a maximally sized - * array for them. */ + /* pre-allocate OutputVector, MapInfo and OutputMessage arrays + * for use in the render and render_list functions */ max_mem = gst_buffer_get_max_memory (); - sink->vec = g_new (GOutputVector, max_mem); - sink->map = g_new (GstMapInfo, max_mem); + sink->n_vecs = max_mem; + sink->vecs = g_new (GOutputVector, sink->n_vecs); + + sink->n_maps = max_mem; + sink->maps = g_new (GstMapInfo, sink->n_maps); + + sink->n_messages = 1; + sink->messages = g_new (GstOutputMessage, sink->n_messages); + + /* we assume that the number of memories per buffer can fit into a guint8 */ + g_warn_if_fail (max_mem <= G_MAXUINT8); } static GstUDPClient * -create_client (GstMultiUDPSink * sink, const gchar * host, gint port) +gst_udp_client_new (GstMultiUDPSink * sink, const gchar * host, gint port) { GstUDPClient *client; GInetAddress *addr; @@ -434,7 +471,8 @@ #endif client = g_slice_new0 (GstUDPClient); - client->refcount = 1; + client->ref_count = 1; + client->add_count = 0; client->host = g_strdup (host); client->port = port; client->addr = g_inet_socket_address_new (addr, port); @@ -444,18 +482,30 @@ name_resolve: { + g_clear_error (&err); g_object_unref (resolver); return NULL; } } +/* call with client lock held */ static void -free_client (GstUDPClient * client) +gst_udp_client_unref (GstUDPClient * client) { - g_object_unref (client->addr); - g_free (client->host); - g_slice_free (GstUDPClient, client); + if (--client->ref_count == 0) { + g_object_unref (client->addr); + g_free (client->host); + g_slice_free (GstUDPClient, client); + } +} + +/* call with client lock held */ +static inline GstUDPClient * +gst_udp_client_ref (GstUDPClient * client) +{ + ++client->ref_count; + return client; } static gint @@ -474,7 +524,7 @@ sink = GST_MULTIUDPSINK (object); - g_list_foreach (sink->clients, (GFunc) free_client, NULL); + g_list_foreach (sink->clients, (GFunc) gst_udp_client_unref, NULL); g_list_free (sink->clients); if (sink->socket) @@ -493,17 +543,17 @@ g_object_unref (sink->used_socket_v6); sink->used_socket_v6 = NULL; - if (sink->cancellable) - g_object_unref (sink->cancellable); - sink->cancellable = NULL; + gst_multiudpsink_free_cancellable (sink); g_free (sink->multi_iface); sink->multi_iface = NULL; - g_free (sink->vec); - sink->vec = NULL; - g_free (sink->map); - sink->map = NULL; + g_free (sink->vecs); + sink->vecs = NULL; + g_free (sink->maps); + sink->maps = NULL; + g_free (sink->messages); + sink->messages = NULL; g_free (sink->bind_address); sink->bind_address = NULL; @@ -513,132 +563,410 @@ G_OBJECT_CLASS (parent_class)->finalize (object); } -static GstFlowReturn -gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer) +/* replacement until we can depend unconditionally on the real one in GLib */ +#ifndef HAVE_G_SOCKET_SEND_MESSAGES +#define g_socket_send_messages gst_socket_send_messages + +static gint +gst_socket_send_messages (GSocket * socket, GstOutputMessage * messages, + guint num_messages, gint flags, GCancellable * cancellable, GError ** error) +{ + gssize result; + gint i; + + for (i = 0; i < num_messages; ++i) { + GstOutputMessage *msg = &messages[i]; + GError *msg_error = NULL; + + result = g_socket_send_message (socket, msg->address, + msg->vectors, msg->num_vectors, + msg->control_messages, msg->num_control_messages, + flags, cancellable, &msg_error); + + if (result < 0) { + /* if we couldn't send all messages, just return how many we did + * manage to send, provided we managed to send at least one */ + if (msg_error->code == G_IO_ERROR_WOULD_BLOCK && i > 0) { + g_error_free (msg_error); + return i; + } else { + g_propagate_error (error, msg_error); + return -1; + } + } + + msg->bytes_sent = result; + } + + return i; +} +#endif /* HAVE_G_SOCKET_SEND_MESSAGES */ + +static gsize +fill_vectors (GOutputVector * vecs, GstMapInfo * maps, guint n, GstBuffer * buf) { - GstMultiUDPSink *sink; - GList *clients; - GOutputVector *vec; - GstMapInfo *map; - guint n_mem, i; - gsize size; GstMemory *mem; - gint num, no_clients; - GError *err = NULL; + gsize size = 0; + guint i; - sink = GST_MULTIUDPSINK_CAST (bsink); + g_assert (gst_buffer_n_memory (buf) == n); - n_mem = gst_buffer_n_memory (buffer); - if (n_mem == 0) - goto no_data; + for (i = 0; i < n; ++i) { + mem = gst_buffer_peek_memory (buf, i); + if (gst_memory_map (mem, &maps[i], GST_MAP_READ)) { + vecs[i].buffer = maps[i].data; + vecs[i].size = maps[i].size; + } else { + GST_WARNING ("Failed to map memory %p for reading", mem); + vecs[i].buffer = ""; + vecs[i].size = 0; + } + size += vecs[i].size; + } - /* pre-allocated, the max number of memory blocks is limited so this - * should not cause overflows */ - vec = sink->vec; - map = sink->map; - - size = 0; - for (i = 0; i < n_mem; i++) { - mem = gst_buffer_peek_memory (buffer, i); - gst_memory_map (mem, &map[i], GST_MAP_READ); + return size; +} - vec[i].buffer = map[i].data; - vec[i].size = map[i].size; +static gsize +gst_udp_calc_message_size (GstOutputMessage * msg) +{ + gsize size = 0; + guint i; + + for (i = 0; i < msg->num_vectors; ++i) + size += msg->vectors[i].size; + + return size; +} + +static gint +gst_udp_messsages_find_first_not_sent (GstOutputMessage * messages, + guint num_messages) +{ + guint i; - size += map[i].size; + for (i = 0; i < num_messages; ++i) { + GstOutputMessage *msg = &messages[i]; + + if (msg->bytes_sent == 0 && gst_udp_calc_message_size (msg) > 0) + return i; } - sink->bytes_to_serve += size; + return -1; +} - /* grab lock while iterating and sending to clients, this should be - * fast as UDP never blocks */ - g_mutex_lock (&sink->client_lock); - GST_LOG_OBJECT (bsink, "about to send %" G_GSIZE_FORMAT " bytes in %u blocks", - size, n_mem); +static inline gchar * +gst_udp_address_get_string (GSocketAddress * addr, gchar * s, gsize size) +{ + GInetSocketAddress *isa = G_INET_SOCKET_ADDRESS (addr); + GInetAddress *ia; + gchar *addr_str; - no_clients = 0; - num = 0; - for (clients = sink->clients; clients; clients = g_list_next (clients)) { - GstUDPClient *client; - GSocket *socket; - GSocketFamily family; - gint count; + ia = g_inet_socket_address_get_address (isa); + addr_str = g_inet_address_to_string (ia); + g_snprintf (s, size, "%s:%u", addr_str, g_inet_socket_address_get_port (isa)); + g_free (addr_str); - client = (GstUDPClient *) clients->data; - no_clients++; - GST_LOG_OBJECT (sink, "sending %" G_GSIZE_FORMAT " bytes to client %p", - size, client); + return s; +} - family = g_socket_address_get_family (G_SOCKET_ADDRESS (client->addr)); - /* Select socket to send from for this address */ - if (family == G_SOCKET_FAMILY_IPV6 || !sink->used_socket) - socket = sink->used_socket_v6; - else - socket = sink->used_socket; +/* Wrapper around g_socket_send_messages() plus error handling (ignoring). + * Returns FALSE if we got cancelled, otherwise TRUE. */ +static gboolean +gst_multiudpsink_send_messages (GstMultiUDPSink * sink, GSocket * socket, + GstOutputMessage * messages, guint num_messages) +{ + gboolean sent_max_size_warning = FALSE; - count = sink->send_duplicates ? client->refcount : 1; + while (num_messages > 0) { + gchar astr[64] G_GNUC_UNUSED; + GError *err = NULL; + guint msg_size, skip, i; + gint ret, err_idx; - while (count--) { - gssize ret; + ret = g_socket_send_messages (socket, messages, num_messages, 0, + sink->cancellable, &err); - ret = - g_socket_send_message (socket, client->addr, vec, n_mem, - NULL, 0, 0, sink->cancellable, &err); + if (G_UNLIKELY (ret < 0)) { + GstOutputMessage *msg; - if (G_UNLIKELY (ret < 0)) { - if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - goto flushing; - - /* we continue after posting a warning, next packets might be ok - * again */ - if (size > UDP_MAX_SIZE) { + if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_clear_error (&err); + return FALSE; + } + + err_idx = gst_udp_messsages_find_first_not_sent (messages, num_messages); + if (err_idx < 0) + break; + + msg = &messages[err_idx]; + msg_size = gst_udp_calc_message_size (msg); + + GST_LOG_OBJECT (sink, "error sending %u bytes to client %s: %s", msg_size, + gst_udp_address_get_string (msg->address, astr, sizeof (astr)), + err->message); + + skip = 1; + if (msg_size > UDP_MAX_SIZE) { + if (!sent_max_size_warning) { GST_ELEMENT_WARNING (sink, RESOURCE, WRITE, - ("Attempting to send a UDP packet larger than maximum size " - "(%" G_GSIZE_FORMAT " > %d)", size, UDP_MAX_SIZE), + ("Attempting to send a UDP packets larger than maximum size " + "(%u > %d)", msg_size, UDP_MAX_SIZE), ("Reason: %s", err ? err->message : "unknown reason")); - } else { - GST_ELEMENT_WARNING (sink, RESOURCE, WRITE, - ("Error sending UDP packet"), ("Reason: %s", - err ? err->message : "unknown reason")); + sent_max_size_warning = FALSE; } - g_clear_error (&err); } else { - num++; - client->bytes_sent += ret; - client->packets_sent++; - sink->bytes_served += ret; + GST_ELEMENT_WARNING (sink, RESOURCE, WRITE, + ("Error sending UDP packets"), ("client %s, reason: %s", + gst_udp_address_get_string (msg->address, astr, sizeof (astr)), + (err != NULL) ? err->message : "unknown reason")); + + for (i = err_idx + 1; i < num_messages; ++i, ++skip) { + if (messages[i].address != msg->address) + break; + } + GST_DEBUG_OBJECT (sink, "skipping %d message(s) to same client", skip); } + + /* ignore any errors and try sending the rest */ + g_clear_error (&err); + ret = skip; } + + g_assert (ret <= num_messages); + + messages += ret; + num_messages -= ret; } + + return TRUE; +} + +static GstFlowReturn +gst_multiudpsink_render_buffers (GstMultiUDPSink * sink, GstBuffer ** buffers, + guint num_buffers, guint8 * mem_nums, guint total_mem_num) +{ + GstOutputMessage *msgs; + gboolean send_duplicates; + GstUDPClient **clients; + GOutputVector *vecs; + GstMapInfo *map_infos; + GstFlowReturn flow_ret; + guint num_addr_v4, num_addr_v6; + guint num_addr, num_msgs; + GError *err = NULL; + guint i, j, mem; + gsize size = 0; + GList *l; + + send_duplicates = sink->send_duplicates; + + g_mutex_lock (&sink->client_lock); + + if (send_duplicates) { + num_addr_v4 = sink->num_v4_all; + num_addr_v6 = sink->num_v6_all; + } else { + num_addr_v4 = sink->num_v4_unique; + num_addr_v6 = sink->num_v6_unique; + } + num_addr = num_addr_v4 + num_addr_v6; + + if (num_addr == 0) + goto no_clients; + + clients = g_newa (GstUDPClient *, num_addr); + for (l = sink->clients, i = 0; l != NULL; l = l->next) { + GstUDPClient *client = l->data; + + clients[i++] = gst_udp_client_ref (client); + for (j = 1; send_duplicates && j < client->add_count; ++j) + clients[i++] = gst_udp_client_ref (client); + } + g_assert_cmpuint (i, ==, num_addr); + g_mutex_unlock (&sink->client_lock); - /* unmap all memory again */ - for (i = 0; i < n_mem; i++) - gst_memory_unmap (map[i].memory, &map[i]); + GST_LOG_OBJECT (sink, "%u buffers, %u memories -> to be sent to %u clients", + num_buffers, total_mem_num, num_addr); - GST_LOG_OBJECT (sink, "sent %" G_GSIZE_FORMAT " bytes to %d (of %d) clients", - size, num, no_clients); + /* ensure our pre-allocated scratch space arrays are large enough */ + if (sink->n_vecs < total_mem_num) { + sink->n_vecs = GST_ROUND_UP_16 (total_mem_num); + g_free (sink->vecs); + sink->vecs = g_new (GOutputVector, sink->n_vecs); + } + vecs = sink->vecs; + + if (sink->n_maps < total_mem_num) { + sink->n_maps = GST_ROUND_UP_16 (total_mem_num); + g_free (sink->maps); + sink->maps = g_new (GstMapInfo, sink->n_maps); + } + map_infos = sink->maps; + + num_msgs = num_addr * num_buffers; + if (sink->n_messages < num_msgs) { + sink->n_messages = GST_ROUND_UP_16 (num_msgs); + g_free (sink->messages); + sink->messages = g_new (GstOutputMessage, sink->n_messages); + } + msgs = sink->messages; + + /* populate first num_buffers messages with output vectors for the buffers */ + for (i = 0, mem = 0; i < num_buffers; ++i) { + size += fill_vectors (&vecs[mem], &map_infos[mem], mem_nums[i], buffers[i]); + msgs[i].vectors = &vecs[mem]; + msgs[i].num_vectors = mem_nums[i]; + msgs[i].num_control_messages = 0; + msgs[i].control_messages = NULL; + msgs[i].address = clients[0]->addr; + mem += mem_nums[i]; + } - return GST_FLOW_OK; + /* FIXME: how about some locking? (there wasn't any before either, but..) */ + sink->bytes_to_serve += size; -no_data: + /* now copy the pre-filled num_buffer messages over to the next num_buffer + * messages for the next client, where we also change the target adddress */ + for (i = 1; i < num_addr; ++i) { + for (j = 0; j < num_buffers; ++j) { + msgs[i * num_buffers + j] = msgs[j]; + msgs[i * num_buffers + j].address = clients[i]->addr; + } + } + + /* now send it! */ { - return GST_FLOW_OK; + gboolean ret; + + /* no IPv4 socket? Send it all from the IPv6 socket then.. */ + if (sink->used_socket == NULL) { + ret = gst_multiudpsink_send_messages (sink, sink->used_socket_v6, + msgs, num_msgs); + } else { + guint num_msgs_v4 = num_buffers * num_addr_v4; + guint num_msgs_v6 = num_buffers * num_addr_v6; + + /* our client list is sorted with IPv4 clients first and IPv6 ones last */ + ret = gst_multiudpsink_send_messages (sink, sink->used_socket, + msgs, num_msgs_v4); + + if (!ret) + goto cancelled; + + ret = gst_multiudpsink_send_messages (sink, sink->used_socket_v6, + msgs + num_msgs_v4, num_msgs_v6); + } + + if (!ret) + goto cancelled; + } + + flow_ret = GST_FLOW_OK; + + /* now update stats */ + g_mutex_lock (&sink->client_lock); + + for (i = 0; i < num_addr; ++i) { + GstUDPClient *client = clients[i]; + + for (j = 0; j < num_buffers; ++j) { + gsize bytes_sent; + + bytes_sent = msgs[i * num_buffers + j].bytes_sent; + + client->bytes_sent += bytes_sent; + client->packets_sent++; + sink->bytes_served += bytes_sent; + } + gst_udp_client_unref (client); } -flushing: + + g_mutex_unlock (&sink->client_lock); + +out: + + for (i = 0; i < mem; ++i) + gst_memory_unmap (map_infos[i].memory, &map_infos[i]); + + return flow_ret; + +no_clients: { - GST_DEBUG ("we are flushing"); g_mutex_unlock (&sink->client_lock); + GST_LOG_OBJECT (sink, "no clients"); + return GST_FLOW_OK; + } +cancelled: + { + GST_INFO_OBJECT (sink, "cancelled"); g_clear_error (&err); + flow_ret = GST_FLOW_FLUSHING; + + g_mutex_lock (&sink->client_lock); + for (i = 0; i < num_addr; ++i) + gst_udp_client_unref (clients[i]); + g_mutex_unlock (&sink->client_lock); + goto out; + } +} + +static GstFlowReturn +gst_multiudpsink_render_list (GstBaseSink * bsink, GstBufferList * buffer_list) +{ + GstMultiUDPSink *sink; + GstBuffer **buffers; + GstFlowReturn flow; + guint8 *mem_nums; + guint total_mems; + guint i, num_buffers; + + sink = GST_MULTIUDPSINK_CAST (bsink); + + num_buffers = gst_buffer_list_length (buffer_list); + if (num_buffers == 0) + goto no_data; + + buffers = g_newa (GstBuffer *, num_buffers); + mem_nums = g_newa (guint8, num_buffers); + for (i = 0, total_mems = 0; i < num_buffers; ++i) { + buffers[i] = gst_buffer_list_get (buffer_list, i); + mem_nums[i] = gst_buffer_n_memory (buffers[i]); + total_mems += mem_nums[i]; + } + + flow = gst_multiudpsink_render_buffers (sink, buffers, num_buffers, + mem_nums, total_mems); - /* unmap all memory */ - for (i = 0; i < n_mem; i++) - gst_memory_unmap (map[i].memory, &map[i]); + return flow; - return GST_FLOW_FLUSHING; +no_data: + { + GST_LOG_OBJECT (sink, "empty buffer"); + return GST_FLOW_OK; } } +static GstFlowReturn +gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer) +{ + GstMultiUDPSink *sink; + GstFlowReturn flow; + guint8 n_mem; + + sink = GST_MULTIUDPSINK_CAST (bsink); + + n_mem = gst_buffer_n_memory (buffer); + + if (n_mem > 0) + flow = gst_multiudpsink_render_buffers (sink, &buffer, 1, &n_mem, n_mem); + else + flow = GST_FLOW_OK; + + return flow; +} + static void gst_multiudpsink_set_clients_string (GstMultiUDPSink * sink, const gchar * string) @@ -687,7 +1015,7 @@ clients = g_list_next (clients); - count = client->refcount; + count = client->add_count; while (count--) { g_string_append_printf (str, "%s:%d%s", client->host, client->port, (clients || count > 1 ? "," : "")); @@ -1232,10 +1560,28 @@ return TRUE; } +static gint +gst_udp_client_compare_socket_family (GstUDPClient * a, GstUDPClient * b) +{ + GSocketFamily fa = g_socket_address_get_family (a->addr); + GSocketFamily fb = g_socket_address_get_family (b->addr); + + if (fa == fb) + return 0; + + /* a should go before b */ + if (fa == G_SOCKET_FAMILY_IPV4 && fb == G_SOCKET_FAMILY_IPV6) + return -1; + + /* b should go before a */ + return 1; +} + static void gst_multiudpsink_add_internal (GstMultiUDPSink * sink, const gchar * host, gint port, gboolean lock) { + GSocketFamily family; GstUDPClient *client; GstUDPClient udpclient; GTimeVal now; @@ -1251,17 +1597,28 @@ find = g_list_find_custom (sink->clients, &udpclient, (GCompareFunc) client_compare); + + if (!find) { + find = g_list_find_custom (sink->clients_to_be_removed, &udpclient, + (GCompareFunc) client_compare); + if (find) + gst_udp_client_ref (find->data); + } + if (find) { client = (GstUDPClient *) find->data; + family = g_socket_address_get_family (client->addr); + GST_DEBUG_OBJECT (sink, "found %d existing clients with host %s, port %d", - client->refcount, host, port); - client->refcount++; + client->add_count, host, port); } else { - client = create_client (sink, host, port); + client = gst_udp_client_new (sink, host, port); if (!client) goto error; + family = g_socket_address_get_family (client->addr); + g_get_current_time (&now); client->connect_time = GST_TIMEVAL_TO_TIME (now); @@ -1269,9 +1626,25 @@ gst_multiudpsink_configure_client (sink, client); GST_DEBUG_OBJECT (sink, "add client with host %s, port %d", host, port); - sink->clients = g_list_prepend (sink->clients, client); + + /* keep IPv4 clients at the beginning, and IPv6 at the end, we can make + * use of this in gst_multiudpsink_render_buffers() */ + sink->clients = g_list_insert_sorted (sink->clients, client, + (GCompareFunc) gst_udp_client_compare_socket_family); + + if (family == G_SOCKET_FAMILY_IPV4) + ++sink->num_v4_unique; + else + ++sink->num_v6_unique; } + ++client->add_count; + + if (family == G_SOCKET_FAMILY_IPV4) + ++sink->num_v4_all; + else + ++sink->num_v6_all; + if (lock) g_mutex_unlock (&sink->client_lock); @@ -1301,6 +1674,7 @@ void gst_multiudpsink_remove (GstMultiUDPSink * sink, const gchar * host, gint port) { + GSocketFamily family; GList *find; GstUDPClient udpclient; GstUDPClient *client; @@ -1318,12 +1692,18 @@ client = (GstUDPClient *) find->data; GST_DEBUG_OBJECT (sink, "found %d clients with host %s, port %d", - client->refcount, host, port); + client->add_count, host, port); - client->refcount--; - if (client->refcount == 0) { + --client->add_count; + + family = g_socket_address_get_family (client->addr); + if (family == G_SOCKET_FAMILY_IPV4) + --sink->num_v4_all; + else + --sink->num_v6_all; + + if (client->add_count == 0) { GInetSocketAddress *saddr = G_INET_SOCKET_ADDRESS (client->addr); - GSocketFamily family = g_socket_address_get_family (client->addr); GInetAddress *addr = g_inet_socket_address_get_address (saddr); GSocket *socket; @@ -1350,15 +1730,29 @@ } } + if (family == G_SOCKET_FAMILY_IPV4) + --sink->num_v4_unique; + else + --sink->num_v6_unique; + + /* Keep state consistent for streaming thread, so remove from client list, + * but keep it around until after the signal has been emitted, in case a + * callback wants to get stats for that client or so */ + sink->clients = g_list_delete_link (sink->clients, find); + + sink->clients_to_be_removed = + g_list_prepend (sink->clients_to_be_removed, client); + /* Unlock to emit signal before we delete the actual client */ g_mutex_unlock (&sink->client_lock); g_signal_emit (G_OBJECT (sink), gst_multiudpsink_signals[SIGNAL_CLIENT_REMOVED], 0, host, port); g_mutex_lock (&sink->client_lock); - sink->clients = g_list_delete_link (sink->clients, find); + sink->clients_to_be_removed = + g_list_remove (sink->clients_to_be_removed, client); - free_client (client); + gst_udp_client_unref (client); } g_mutex_unlock (&sink->client_lock); @@ -1382,9 +1776,13 @@ * socket or anything to free for UDP */ if (lock) g_mutex_lock (&sink->client_lock); - g_list_foreach (sink->clients, (GFunc) free_client, sink); + g_list_foreach (sink->clients, (GFunc) gst_udp_client_unref, sink); g_list_free (sink->clients); sink->clients = NULL; + sink->num_v4_unique = 0; + sink->num_v4_all = 0; + sink->num_v6_unique = 0; + sink->num_v6_all = 0; if (lock) g_mutex_unlock (&sink->client_lock); } @@ -1411,6 +1809,11 @@ find = g_list_find_custom (sink->clients, &udpclient, (GCompareFunc) client_compare); + + if (!find) + find = g_list_find_custom (sink->clients_to_be_removed, &udpclient, + (GCompareFunc) client_compare); + if (!find) goto not_found; @@ -1461,7 +1864,8 @@ sink = GST_MULTIUDPSINK (bsink); - g_cancellable_reset (sink->cancellable); + gst_multiudpsink_free_cancellable (sink); + gst_multiudpsink_create_cancellable (sink); return TRUE; } diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/gstmultiudpsink.h gst-plugins-good1.0-1.6.1/gst/udp/gstmultiudpsink.h --- gst-plugins-good1.0-1.4.3/gst/udp/gstmultiudpsink.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/gstmultiudpsink.h 2015-10-22 08:02:54.000000000 +0000 @@ -38,8 +38,31 @@ typedef struct _GstMultiUDPSink GstMultiUDPSink; typedef struct _GstMultiUDPSinkClass GstMultiUDPSinkClass; +#if GLIB_CHECK_VERSION (2, 43, 2) +#define HAVE_G_SOCKET_SEND_MESSAGES +#endif + +#ifndef HAVE_G_SOCKET_SEND_MESSAGES +/* same as GOutputMessage used for g_socket_send_messages() */ +typedef struct { + /*< private >*/ + GSocketAddress *address; + + GOutputVector *vectors; + guint num_vectors; + + guint bytes_sent; + + GSocketControlMessage **control_messages; + guint num_control_messages; +} GstOutputMessage; +#else +typedef GOutputMessage GstOutputMessage; +#endif /* HAVE_G_SOCKET_SEND_MESSAGES*/ + typedef struct { - gint refcount; + gint ref_count; /* for memory management */ + gint add_count; /* how often this address has been added */ GSocketAddress *addr; gchar *host; @@ -58,13 +81,26 @@ GstBaseSink parent; GSocket *used_socket, *used_socket_v6; + GCancellable *cancellable; + gboolean made_cancel_fd; + /* client management */ GMutex client_lock; GList *clients; - - GOutputVector *vec; - GstMapInfo *map; + guint num_v4_unique; /* number IPv4 clients (excluding duplicates) */ + guint num_v4_all; /* number IPv4 clients (including duplicates) */ + guint num_v6_unique; /* number IPv6 clients (excluding duplicates) */ + guint num_v6_all; /* number IPv6 clients (including duplicates) */ + GList *clients_to_be_removed; + + /* pre-allocated scrap space for render function */ + GOutputVector *vecs; + guint n_vecs; + GstMapInfo *maps; + guint n_maps; + GstOutputMessage *messages; + guint n_messages; /* properties */ guint64 bytes_to_serve; diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/gstudpsrc.c gst-plugins-good1.0-1.6.1/gst/udp/gstudpsrc.c --- gst-plugins-good1.0-1.4.3/gst/udp/gstudpsrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/gstudpsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -3,6 +3,8 @@ * Copyright (C) <2005> Nokia Corporation * Copyright (C) <2012> Collabora Ltd. * Author: Sebastian Dröge + * Copyright (C) 2014 Tim-Philipp Müller + * Copyright (C) 2014 Centricular Ltd * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -34,7 +36,7 @@ * udpsrc can read from multicast groups by setting the #GstUDPSrc:multicast-group * property to the IP address of the multicast group. * - * Alternatively one can provide a custom socket to udpsrc with the #GstUDPSrc:sockfd + * Alternatively one can provide a custom socket to udpsrc with the #GstUDPSrc:socket * property, udpsrc will then not allocate a socket itself but use the provided * one. * @@ -80,10 +82,10 @@ * because it is blocked by a firewall. * * A custom file descriptor can be configured with the - * #GstUDPSrc:sockfd property. The socket will be closed when setting the - * element to READY by default. This behaviour can be - * overriden with the #GstUDPSrc:closefd property, in which case the application - * is responsible for closing the file descriptor. + * #GstUDPSrc:socket property. The socket will be closed when setting + * the element to READY by default. This behaviour can be overriden + * with the #GstUDPSrc:close-socket property, in which case the + * application is responsible for closing the file descriptor. * * * Examples @@ -105,6 +107,7 @@ #include "config.h" #endif +#include #include "gstudpsrc.h" #include @@ -170,9 +173,7 @@ PROP_USED_SOCKET, PROP_AUTO_MULTICAST, PROP_REUSE, - PROP_ADDRESS, - - PROP_LAST + PROP_ADDRESS }; static void gst_udpsrc_uri_handler_init (gpointer g_iface, gpointer iface_data); @@ -182,6 +183,7 @@ static gboolean gst_udpsrc_close (GstUDPSrc * src); static gboolean gst_udpsrc_unlock (GstBaseSrc * bsrc); static gboolean gst_udpsrc_unlock_stop (GstBaseSrc * bsrc); +static gboolean gst_udpsrc_negotiate (GstBaseSrc * basesrc); static void gst_udpsrc_finalize (GObject * object); @@ -221,11 +223,13 @@ "The port to receive the packets from, 0=allocate", 0, G_MAXUINT16, UDP_DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* FIXME 2.0: Remove multicast-group property */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MULTICAST_GROUP, g_param_spec_string ("multicast-group", "Multicast Group", - "The Address of multicast group to join. DEPRECATED: " - "Use address property instead", UDP_DEFAULT_MULTICAST_GROUP, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + "The Address of multicast group to join. (DEPRECATED: " + "Use address property instead)", UDP_DEFAULT_MULTICAST_GROUP, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); +#endif g_object_class_install_property (gobject_class, PROP_MULTICAST_IFACE, g_param_spec_string ("multicast-iface", "Multicast Interface", "The network interface on which to join the multicast group", @@ -294,6 +298,7 @@ gstbasesrc_class->unlock = gst_udpsrc_unlock; gstbasesrc_class->unlock_stop = gst_udpsrc_unlock_stop; gstbasesrc_class->get_caps = gst_udpsrc_getcaps; + gstbasesrc_class->negotiate = gst_udpsrc_negotiate; gstpushsrc_class->create = gst_udpsrc_create; } @@ -318,8 +323,6 @@ udpsrc->used_socket = UDP_DEFAULT_USED_SOCKET; udpsrc->reuse = UDP_DEFAULT_REUSE; - udpsrc->cancellable = g_cancellable_new (); - /* configure basesrc to be a live source */ gst_base_src_set_live (GST_BASE_SRC (udpsrc), TRUE); /* make basesrc output a segment in time */ @@ -357,10 +360,6 @@ g_object_unref (udpsrc->used_socket); udpsrc->used_socket = NULL; - if (udpsrc->cancellable) - g_object_unref (udpsrc->cancellable); - udpsrc->cancellable = NULL; - G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -390,27 +389,150 @@ return result; } +static void +gst_udpsrc_reset_memory_allocator (GstUDPSrc * src) +{ + if (src->mem != NULL) { + gst_memory_unmap (src->mem, &src->map); + gst_memory_unref (src->mem); + src->mem = NULL; + } + if (src->mem_max != NULL) { + gst_memory_unmap (src->mem_max, &src->map_max); + gst_memory_unref (src->mem_max); + src->mem_max = NULL; + } + + src->vec[0].buffer = NULL; + src->vec[0].size = 0; + src->vec[1].buffer = NULL; + src->vec[1].size = 0; + + if (src->allocator != NULL) { + gst_object_unref (src->allocator); + src->allocator = NULL; + } +} + +static gboolean +gst_udpsrc_negotiate (GstBaseSrc * basesrc) +{ + GstUDPSrc *src = GST_UDPSRC_CAST (basesrc); + gboolean ret; + + /* just chain up to the default implementation, we just want to + * retrieve the allocator at the end of it (if there is one) */ + ret = GST_BASE_SRC_CLASS (parent_class)->negotiate (basesrc); + + if (ret) { + GstAllocationParams new_params; + GstAllocator *new_allocator = NULL; + + /* retrieve new allocator */ + gst_base_src_get_allocator (basesrc, &new_allocator, &new_params); + + if (src->allocator != new_allocator || + memcmp (&src->params, &new_params, sizeof (GstAllocationParams)) != 0) { + /* drop old allocator and throw away any memory allocated with it */ + gst_udpsrc_reset_memory_allocator (src); + + /* and save the new allocator and/or new allocation parameters */ + src->allocator = new_allocator; + src->params = new_params; + + GST_INFO_OBJECT (src, "new allocator: %" GST_PTR_FORMAT, new_allocator); + } + } + + return ret; +} + +static gboolean +gst_udpsrc_alloc_mem (GstUDPSrc * src, GstMemory ** p_mem, GstMapInfo * map, + gsize size) +{ + GstMemory *mem; + + mem = gst_allocator_alloc (src->allocator, size, &src->params); + + if (!gst_memory_map (mem, map, GST_MAP_WRITE)) { + gst_memory_unref (mem); + memset (map, 0, sizeof (GstMapInfo)); + return FALSE; + } + *p_mem = mem; + return TRUE; +} + +static gboolean +gst_udpsrc_ensure_mem (GstUDPSrc * src) +{ + if (src->mem == NULL) { + gsize mem_size = 1500; /* typical max. MTU */ + + /* if packets are likely to be smaller, just use that size, otherwise + * default to assuming incoming packets are around MTU size */ + if (src->max_size > 0 && src->max_size < mem_size) + mem_size = src->max_size; + + if (!gst_udpsrc_alloc_mem (src, &src->mem, &src->map, mem_size)) + return FALSE; + + src->vec[0].buffer = src->map.data; + src->vec[0].size = src->map.size; + } + + if (src->mem_max == NULL) { + gsize max_size = MAX_IPV4_UDP_PACKET_SIZE; + + if (!gst_udpsrc_alloc_mem (src, &src->mem_max, &src->map_max, max_size)) + return FALSE; + + src->vec[1].buffer = src->map_max.data; + src->vec[1].size = src->map_max.size; + } + + return TRUE; +} + +static void +gst_udpsrc_create_cancellable (GstUDPSrc * src) +{ + GPollFD pollfd; + + src->cancellable = g_cancellable_new (); + src->made_cancel_fd = g_cancellable_make_pollfd (src->cancellable, &pollfd); +} + +static void +gst_udpsrc_free_cancellable (GstUDPSrc * src) +{ + if (src->made_cancel_fd) { + g_cancellable_release_fd (src->cancellable); + src->made_cancel_fd = FALSE; + } + g_object_unref (src->cancellable); + src->cancellable = NULL; +} + static GstFlowReturn gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf) { - GstFlowReturn ret; GstUDPSrc *udpsrc; GstBuffer *outbuf = NULL; - GstMapInfo info; GSocketAddress *saddr = NULL; - gsize offset; - gssize readsize; - gssize res; + gint flags = G_SOCKET_MSG_NONE; gboolean try_again; GError *err = NULL; + gssize res; + gsize offset; udpsrc = GST_UDPSRC_CAST (psrc); + if (!gst_udpsrc_ensure_mem (udpsrc)) + goto memory_alloc_error; + retry: - /* quick check, avoid going in select when we already have data */ - readsize = g_socket_get_available_bytes (udpsrc->used_socket); - if (readsize > 0) - goto no_select; do { gint64 timeout; @@ -444,95 +566,84 @@ } } while (G_UNLIKELY (try_again)); - /* ask how much is available for reading on the socket, this should be exactly - * one UDP packet. We will check the return value, though, because in some - * case it can return 0 and we don't want a 0 sized buffer. */ - readsize = g_socket_get_available_bytes (udpsrc->used_socket); - if (G_UNLIKELY (readsize < 0)) - goto get_available_error; - - /* If we get here and the readsize is zero, then either select was woken up - * by activity that is not a read, or a poll error occurred, or a UDP packet - * was received that has no data. Since we cannot identify which case it is, - * we handle all of them. This could possibly lead to a UDP packet getting - * lost, but since UDP is not reliable, we can accept this. */ - if (G_UNLIKELY (!readsize)) { - /* try to read a packet (and it will be ignored), - * in case a packet with no data arrived */ - res = - g_socket_receive_from (udpsrc->used_socket, NULL, NULL, - 0, udpsrc->cancellable, &err); - if (G_UNLIKELY (res < 0)) - goto receive_error; - - /* poll again */ - goto retry; - } - -no_select: - GST_LOG_OBJECT (udpsrc, "ioctl says %d bytes available", (int) readsize); - - /* sanity check value from _get_available_bytes(), which might be as - * large as the kernel-side buffer on some operating systems */ - if (g_socket_get_family (udpsrc->used_socket) == G_SOCKET_FAMILY_IPV4) - readsize = MIN (MAX_IPV4_UDP_PACKET_SIZE, readsize); - - ret = GST_BASE_SRC_CLASS (parent_class)->alloc (GST_BASE_SRC_CAST (udpsrc), - -1, readsize, &outbuf); - if (ret != GST_FLOW_OK) - goto alloc_failed; - - gst_buffer_map (outbuf, &info, GST_MAP_WRITE); - offset = 0; - - if (saddr) + if (saddr != NULL) { g_object_unref (saddr); - saddr = NULL; + saddr = NULL; + } res = - g_socket_receive_from (udpsrc->used_socket, &saddr, (gchar *) info.data, - info.size, udpsrc->cancellable, &err); + g_socket_receive_message (udpsrc->used_socket, &saddr, udpsrc->vec, 2, + NULL, NULL, &flags, udpsrc->cancellable, &err); if (G_UNLIKELY (res < 0)) { - /* EHOSTUNREACH for a UDP socket means that a packet sent with udpsink - * generated a "port unreachable" ICMP response. We ignore that and try - * again. */ + /* G_IO_ERROR_HOST_UNREACHABLE for a UDP socket means that a packet sent + * with udpsink generated a "port unreachable" ICMP response. We ignore + * that and try again. + * On Windows we get G_IO_ERROR_CONNECTION_CLOSED instead */ +#if GLIB_CHECK_VERSION(2,44,0) + if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE) || + g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED)) { +#else if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE)) { - gst_buffer_unmap (outbuf, &info); - gst_buffer_unref (outbuf); - outbuf = NULL; +#endif g_clear_error (&err); goto retry; } goto receive_error; } - /* patch offset and size when stripping off the headers */ - if (G_UNLIKELY (udpsrc->skip_first_bytes != 0)) { - if (G_UNLIKELY (readsize < udpsrc->skip_first_bytes)) - goto skip_error; + /* remember maximum packet size */ + if (res > udpsrc->max_size) + udpsrc->max_size = res; + + outbuf = gst_buffer_new (); - offset += udpsrc->skip_first_bytes; - res -= udpsrc->skip_first_bytes; + /* append first memory chunk to buffer */ + gst_buffer_append_memory (outbuf, udpsrc->mem); + + /* if the packet didn't fit into the first chunk, add second one as well */ + if (res > udpsrc->map.size) { + gst_buffer_append_memory (outbuf, udpsrc->mem_max); + gst_memory_unmap (udpsrc->mem_max, &udpsrc->map_max); + udpsrc->vec[1].buffer = NULL; + udpsrc->vec[1].size = 0; + udpsrc->mem_max = NULL; } - gst_buffer_unmap (outbuf, &info); - gst_buffer_resize (outbuf, offset, res); + /* make sure we allocate a new chunk next time (we do this only here because + * we look at map.size to see if the second memory chunk is needed above) */ + gst_memory_unmap (udpsrc->mem, &udpsrc->map); + udpsrc->vec[0].buffer = NULL; + udpsrc->vec[0].size = 0; + udpsrc->mem = NULL; + + offset = udpsrc->skip_first_bytes; + + if (G_UNLIKELY (offset > 0 && res < offset)) + goto skip_error; + + gst_buffer_resize (outbuf, offset, res - offset); /* use buffer metadata so receivers can also track the address */ if (saddr) { gst_buffer_add_net_address_meta (outbuf, saddr); g_object_unref (saddr); + saddr = NULL; } - saddr = NULL; - GST_LOG_OBJECT (udpsrc, "read %d bytes", (int) readsize); + GST_LOG_OBJECT (udpsrc, "read packet of %d bytes", (int) res); *buf = GST_BUFFER_CAST (outbuf); - return ret; + return GST_FLOW_OK; /* ERRORS */ +memory_alloc_error: + { + GST_ELEMENT_ERROR (udpsrc, RESOURCE, READ, (NULL), + ("Failed to allocate or map memory")); + return GST_FLOW_ERROR; + } select_error: { GST_ELEMENT_ERROR (udpsrc, RESOURCE, READ, (NULL), @@ -546,24 +657,8 @@ g_clear_error (&err); return GST_FLOW_FLUSHING; } -get_available_error: - { - GST_ELEMENT_ERROR (udpsrc, RESOURCE, READ, (NULL), - ("get available bytes failed")); - return GST_FLOW_ERROR; - } -alloc_failed: - { - GST_DEBUG ("Allocation failed"); - return ret; - } receive_error: { - if (outbuf != NULL) { - gst_buffer_unmap (outbuf, &info); - gst_buffer_unref (outbuf); - } - if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_BUSY) || g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { g_clear_error (&err); @@ -577,7 +672,6 @@ } skip_error: { - gst_buffer_unmap (outbuf, &info); gst_buffer_unref (outbuf); GST_ELEMENT_ERROR (udpsrc, STREAM, DECODE, (NULL), @@ -824,6 +918,8 @@ GSocketAddress *bind_saddr; GError *err = NULL; + gst_udpsrc_create_cancellable (src); + if (src->socket == NULL) { /* need to allocate a socket */ GST_DEBUG_OBJECT (src, "allocating socket for %s:%d", src->address, @@ -997,6 +1093,11 @@ g_object_unref (addr); } + src->allocator = NULL; + gst_allocation_params_init (&src->params); + + src->max_size = 0; + return TRUE; /* ERRORS */ @@ -1060,7 +1161,9 @@ src = GST_UDPSRC (bsrc); GST_LOG_OBJECT (src, "No longer flushing"); - g_cancellable_reset (src->cancellable); + + gst_udpsrc_free_cancellable (src); + gst_udpsrc_create_cancellable (src); return TRUE; } @@ -1102,6 +1205,10 @@ src->addr = NULL; } + gst_udpsrc_reset_memory_allocator (src); + + gst_udpsrc_free_cancellable (src); + return TRUE; } diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/gstudpsrc.h gst-plugins-good1.0-1.6.1/gst/udp/gstudpsrc.h --- gst-plugins-good1.0-1.4.3/gst/udp/gstudpsrc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/gstudpsrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -61,12 +61,27 @@ gboolean auto_multicast; gboolean reuse; + /* stats */ + guint max_size; + /* our sockets */ GSocket *used_socket; - GCancellable *cancellable; GInetSocketAddress *addr; gboolean external_socket; + gboolean made_cancel_fd; + GCancellable *cancellable; + + /* memory management */ + GstAllocator *allocator; + GstAllocationParams params; + + GstMemory *mem; + GstMapInfo map; + GstMemory *mem_max; + GstMapInfo map_max; + GInputVector vec[2]; + gchar *uri; }; diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/Makefile.am gst-plugins-good1.0-1.6.1/gst/udp/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/udp/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -12,18 +12,3 @@ EXTRA_DIST = README CLEANFILES = $(BUILT_SOURCES) - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstudp -:SHARED libgstudp \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstudp_la_SOURCES) \ - $(nodist_libgstudp_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstudp_la_CFLAGS) \ - -:LDFLAGS $(libgstudp_la_LDFLAGS) \ - $(libgstudp_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/udp/Makefile.in gst-plugins-good1.0-1.6.1/gst/udp/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/udp/Makefile.in 2014-09-24 07:26:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/udp/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/udp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README 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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -230,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -362,9 +372,6 @@ 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@ @@ -482,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -545,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -582,7 +590,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/udp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/udp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -932,21 +939,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstudp -:SHARED libgstudp \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstudp_la_SOURCES) \ - $(nodist_libgstudp_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstudp_la_CFLAGS) \ - -:LDFLAGS $(libgstudp_la_LDFLAGS) \ - $(libgstudp_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/videobox/gstvideobox.c gst-plugins-good1.0-1.6.1/gst/videobox/gstvideobox.c --- gst-plugins-good1.0-1.4.3/gst/videobox/gstvideobox.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videobox/gstvideobox.c 2015-10-22 08:02:54.000000000 +0000 @@ -1951,9 +1951,7 @@ gint r, g, b; guint8 *dest, *src; - dest = GST_VIDEO_FRAME_PLANE_DATA (dest_frame, 0); dest_stride = GST_VIDEO_FRAME_PLANE_STRIDE (dest_frame, 0); - src_stride = GST_VIDEO_FRAME_PLANE_STRIDE (src_frame, 0); in_bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (src_frame, 0); packed_in = (in_bpp < 4); @@ -2059,9 +2057,7 @@ gint r, g, b; guint8 *src, *dest; - src = GST_VIDEO_FRAME_PLANE_DATA (src_frame, 0); src_stride = GST_VIDEO_FRAME_PLANE_STRIDE (src_frame, 0); - dest_stride = GST_VIDEO_FRAME_PLANE_STRIDE (dest_frame, 0); out_bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (dest_frame, 0); packed_out = (out_bpp < 4); @@ -2750,7 +2746,7 @@ min = gst_video_box_transform_dimension (min, delta); max = gst_video_box_transform_dimension (max, delta); - if (min > max) { + if (min >= max) { ret = FALSE; g_value_unset (dest_val); } else { diff -Nru gst-plugins-good1.0-1.4.3/gst/videobox/Makefile.am gst-plugins-good1.0-1.6.1/gst/videobox/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/videobox/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videobox/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -19,18 +19,3 @@ noinst_HEADERS = gstvideobox.h EXTRA_DIST += README - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideobox -:SHARED libgstvideobox \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideobox_la_SOURCES) \ - $(nodist_libgstvideobox_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideobox_la_CFLAGS) \ - -:LDFLAGS $(libgstvideobox_la_LDFLAGS) \ - $(libgstvideobox_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/videobox/Makefile.in gst-plugins-good1.0-1.6.1/gst/videobox/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/videobox/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videobox/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -38,7 +38,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -102,9 +112,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/orc.mak $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/depcomp $(noinst_HEADERS) \ - README subdir = gst/videobox ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -127,7 +134,6 @@ $(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 \ @@ -142,6 +148,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -254,6 +262,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \ + $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -386,9 +396,6 @@ 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@ @@ -506,17 +513,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -569,6 +576,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -625,7 +633,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videobox/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/videobox/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -634,7 +641,7 @@ 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/orc.mak: +$(top_srcdir)/common/orc.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -950,6 +957,8 @@ tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + orc-update: tmp-orc.c $(ORC_SOURCE).h $(top_srcdir)/common/gst-indent tmp-orc.c @@ -987,21 +996,6 @@ cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideobox -:SHARED libgstvideobox \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideobox_la_SOURCES) \ - $(nodist_libgstvideobox_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideobox_la_CFLAGS) \ - -:LDFLAGS $(libgstvideobox_la_LDFLAGS) \ - $(libgstvideobox_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: diff -Nru gst-plugins-good1.0-1.4.3/gst/videocrop/gstaspectratiocrop.c gst-plugins-good1.0-1.6.1/gst/videocrop/gstaspectratiocrop.c --- gst-plugins-good1.0-1.4.3/gst/videocrop/gstaspectratiocrop.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videocrop/gstaspectratiocrop.c 2015-10-22 08:02:54.000000000 +0000 @@ -50,8 +50,8 @@ enum { - ARG_0, - ARG_ASPECT_RATIO_CROP, + PROP_0, + PROP_ASPECT_RATIO_CROP, }; /* we support the same caps as videocrop (sync changes) */ @@ -152,28 +152,22 @@ gst_aspect_ratio_crop_sink_event (GstPad * pad, GstObject * parent, GstEvent * evt) { - gboolean ret; GstAspectRatioCrop *aspect_ratio_crop = GST_ASPECT_RATIO_CROP (parent); - ret = - aspect_ratio_crop->sinkpad_old_eventfunc (pad, parent, - gst_event_ref (evt)); - switch (GST_EVENT_TYPE (evt)) { case GST_EVENT_CAPS: { GstCaps *caps; gst_event_parse_caps (evt, &caps); - ret = gst_aspect_ratio_crop_set_caps (aspect_ratio_crop, caps); + gst_aspect_ratio_crop_set_caps (aspect_ratio_crop, caps); break; } default: break; } - gst_event_unref (evt); - return ret; + return gst_pad_event_default (pad, parent, evt); } static void @@ -189,7 +183,7 @@ gobject_class->get_property = gst_aspect_ratio_crop_get_property; gobject_class->finalize = gst_aspect_ratio_crop_finalize; - g_object_class_install_property (gobject_class, ARG_ASPECT_RATIO_CROP, + g_object_class_install_property (gobject_class, PROP_ASPECT_RATIO_CROP, gst_param_spec_fraction ("aspect-ratio", "aspect-ratio", "Target aspect-ratio of video", 0, 1, G_MAXINT, 1, 0, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -253,8 +247,6 @@ aspect_ratio_crop->sink); gst_object_unref (link_pad); - aspect_ratio_crop->sinkpad_old_eventfunc = - GST_PAD_EVENTFUNC (aspect_ratio_crop->sink); gst_pad_set_event_function (aspect_ratio_crop->sink, GST_DEBUG_FUNCPTR (gst_aspect_ratio_crop_sink_event)); } @@ -456,7 +448,7 @@ GST_OBJECT_LOCK (aspect_ratio_crop); switch (prop_id) { - case ARG_ASPECT_RATIO_CROP: + case PROP_ASPECT_RATIO_CROP: if (GST_VALUE_HOLDS_FRACTION (value)) { aspect_ratio_crop->ar_num = gst_value_get_fraction_numerator (value); aspect_ratio_crop->ar_denom = @@ -487,7 +479,7 @@ GST_OBJECT_LOCK (aspect_ratio_crop); switch (prop_id) { - case ARG_ASPECT_RATIO_CROP: + case PROP_ASPECT_RATIO_CROP: gst_value_set_fraction (value, aspect_ratio_crop->ar_num, aspect_ratio_crop->ar_denom); break; diff -Nru gst-plugins-good1.0-1.4.3/gst/videocrop/gstaspectratiocrop.h gst-plugins-good1.0-1.6.1/gst/videocrop/gstaspectratiocrop.h --- gst-plugins-good1.0-1.4.3/gst/videocrop/gstaspectratiocrop.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videocrop/gstaspectratiocrop.h 2015-10-22 08:02:54.000000000 +0000 @@ -46,7 +46,6 @@ GstElement *videocrop; GstPad *sink; - GstPadEventFunction sinkpad_old_eventfunc; /* target aspect ratio */ gint ar_num; /* if < 1 then don't change ar */ diff -Nru gst-plugins-good1.0-1.4.3/gst/videocrop/gstvideocrop.c gst-plugins-good1.0-1.6.1/gst/videocrop/gstvideocrop.c --- gst-plugins-good1.0-1.4.3/gst/videocrop/gstvideocrop.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videocrop/gstvideocrop.c 2015-10-22 08:02:54.000000000 +0000 @@ -70,11 +70,11 @@ enum { - ARG_0, - ARG_LEFT, - ARG_RIGHT, - ARG_TOP, - ARG_BOTTOM + PROP_0, + PROP_LEFT, + PROP_RIGHT, + PROP_TOP, + PROP_BOTTOM }; /* we support the same caps as aspectratiocrop (sync changes) */ @@ -99,8 +99,6 @@ #define gst_video_crop_parent_class parent_class G_DEFINE_TYPE (GstVideoCrop, gst_video_crop, GST_TYPE_VIDEO_FILTER); -static void gst_video_crop_finalize (GObject * object); - static void gst_video_crop_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_video_crop_get_property (GObject * object, guint prop_id, @@ -176,23 +174,22 @@ basetransform_class = (GstBaseTransformClass *) klass; vfilter_class = (GstVideoFilterClass *) klass; - gobject_class->finalize = gst_video_crop_finalize; gobject_class->set_property = gst_video_crop_set_property; gobject_class->get_property = gst_video_crop_get_property; - g_object_class_install_property (gobject_class, ARG_LEFT, + g_object_class_install_property (gobject_class, PROP_LEFT, g_param_spec_int ("left", "Left", "Pixels to crop at left (-1 to auto-crop)", -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_RIGHT, + g_object_class_install_property (gobject_class, PROP_RIGHT, g_param_spec_int ("right", "Right", "Pixels to crop at right (-1 to auto-crop)", -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_TOP, + g_object_class_install_property (gobject_class, PROP_TOP, g_param_spec_int ("top", "Top", "Pixels to crop at top (-1 to auto-crop)", -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, ARG_BOTTOM, + g_object_class_install_property (gobject_class, PROP_BOTTOM, g_param_spec_int ("bottom", "Bottom", "Pixels to crop at bottom (-1 to auto-crop)", -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -222,20 +219,6 @@ vcrop->crop_left = 0; vcrop->crop_top = 0; vcrop->crop_bottom = 0; - - g_mutex_init (&vcrop->lock); -} - -static void -gst_video_crop_finalize (GObject * object) -{ - GstVideoCrop *vcrop; - - vcrop = GST_VIDEO_CROP (object); - - g_mutex_clear (&vcrop->lock); - - G_OBJECT_CLASS (parent_class)->finalize (object); } #define ROUND_DOWN_2(n) ((n)&(~1)) @@ -422,7 +405,13 @@ { GstVideoCrop *vcrop = GST_VIDEO_CROP (vfilter); - g_mutex_lock (&vcrop->lock); + if (G_UNLIKELY (vcrop->need_update)) { + if (!gst_video_crop_set_info (vfilter, NULL, &vcrop->in_info, NULL, + &vcrop->out_info)) { + return GST_FLOW_ERROR; + } + } + switch (vcrop->packing) { case VIDEO_CROP_PIXEL_FORMAT_PACKED_SIMPLE: gst_video_crop_transform_packed_simple (vcrop, in_frame, out_frame); @@ -439,7 +428,6 @@ default: g_assert_not_reached (); } - g_mutex_unlock (&vcrop->lock); return GST_FLOW_OK; } @@ -534,7 +522,6 @@ return ret; } -/* TODO use filter_caps */ static GstCaps * gst_video_crop_transform_caps (GstBaseTransform * trans, GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps) @@ -559,6 +546,8 @@ bottom = (vcrop->prop_bottom == -1) ? 0 : vcrop->prop_bottom; top = (vcrop->prop_top == -1) ? 0 : vcrop->prop_top; + GST_OBJECT_UNLOCK (vcrop); + if (direction == GST_PAD_SRC) { dx = left + right; dy = top + bottom; @@ -566,7 +555,6 @@ dx = 0 - (left + right); dy = 0 - (top + bottom); } - GST_OBJECT_UNLOCK (vcrop); GST_LOG_OBJECT (vcrop, "transforming caps %" GST_PTR_FORMAT, caps); @@ -624,38 +612,41 @@ GstVideoCrop *crop = GST_VIDEO_CROP (vfilter); int dx, dy; + GST_OBJECT_LOCK (crop); + crop->need_update = FALSE; crop->crop_left = crop->prop_left; crop->crop_right = crop->prop_right; crop->crop_top = crop->prop_top; crop->crop_bottom = crop->prop_bottom; + GST_OBJECT_UNLOCK (crop); dx = GST_VIDEO_INFO_WIDTH (in_info) - GST_VIDEO_INFO_WIDTH (out_info); dy = GST_VIDEO_INFO_HEIGHT (in_info) - GST_VIDEO_INFO_HEIGHT (out_info); - if (crop->prop_left == -1 && crop->prop_right == -1) { + if (crop->crop_left == -1 && crop->crop_right == -1) { crop->crop_left = dx / 2; crop->crop_right = dx / 2 + (dx & 1); - } else if (crop->prop_left == -1) { - if (G_UNLIKELY (crop->prop_right > dx)) + } else if (crop->crop_left == -1) { + if (G_UNLIKELY (crop->crop_right > dx)) goto cropping_too_much; - crop->crop_left = dx - crop->prop_right; - } else if (crop->prop_right == -1) { - if (G_UNLIKELY (crop->prop_left > dx)) + crop->crop_left = dx - crop->crop_right; + } else if (crop->crop_right == -1) { + if (G_UNLIKELY (crop->crop_left > dx)) goto cropping_too_much; - crop->crop_right = dx - crop->prop_left; + crop->crop_right = dx - crop->crop_left; } - if (crop->prop_top == -1 && crop->prop_bottom == -1) { + if (crop->crop_top == -1 && crop->crop_bottom == -1) { crop->crop_top = dy / 2; crop->crop_bottom = dy / 2 + (dy & 1); - } else if (crop->prop_top == -1) { - if (G_UNLIKELY (crop->prop_bottom > dy)) + } else if (crop->crop_top == -1) { + if (G_UNLIKELY (crop->crop_bottom > dy)) goto cropping_too_much; - crop->crop_top = dy - crop->prop_bottom; - } else if (crop->prop_bottom == -1) { - if (G_UNLIKELY (crop->prop_top > dy)) + crop->crop_top = dy - crop->crop_bottom; + } else if (crop->crop_bottom == -1) { + if (G_UNLIKELY (crop->crop_top > dy)) goto cropping_too_much; - crop->crop_bottom = dy - crop->prop_top; + crop->crop_bottom = dy - crop->crop_top; } if (G_UNLIKELY ((crop->crop_left + crop->crop_right) >= @@ -664,8 +655,9 @@ GST_VIDEO_INFO_HEIGHT (in_info))) goto cropping_too_much; - GST_LOG_OBJECT (crop, "incaps = %" GST_PTR_FORMAT ", outcaps = %" - GST_PTR_FORMAT, in, out); + if (in && out) + GST_LOG_OBJECT (crop, "incaps = %" GST_PTR_FORMAT ", outcaps = %" + GST_PTR_FORMAT, in, out); if ((crop->crop_left | crop->crop_right | crop->crop_top | crop-> crop_bottom) == 0) { @@ -709,6 +701,9 @@ } } + crop->in_info = *in_info; + crop->out_info = *out_info; + return TRUE; /* ERROR */ @@ -724,6 +719,16 @@ } } +/* called with object lock */ +static inline void +gst_video_crop_set_crop (GstVideoCrop * vcrop, gint new_value, gint * prop) +{ + if (*prop != new_value) { + *prop = new_value; + vcrop->need_update = TRUE; + } +} + static void gst_video_crop_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) @@ -732,35 +737,35 @@ video_crop = GST_VIDEO_CROP (object); - /* don't modify while we are transforming */ - g_mutex_lock (&video_crop->lock); - - /* protect with the object lock so that we can read them */ GST_OBJECT_LOCK (video_crop); switch (prop_id) { - case ARG_LEFT: - video_crop->prop_left = g_value_get_int (value); - break; - case ARG_RIGHT: - video_crop->prop_right = g_value_get_int (value); - break; - case ARG_TOP: - video_crop->prop_top = g_value_get_int (value); - break; - case ARG_BOTTOM: - video_crop->prop_bottom = g_value_get_int (value); + case PROP_LEFT: + gst_video_crop_set_crop (video_crop, g_value_get_int (value), + &video_crop->prop_left); + break; + case PROP_RIGHT: + gst_video_crop_set_crop (video_crop, g_value_get_int (value), + &video_crop->prop_right); + break; + case PROP_TOP: + gst_video_crop_set_crop (video_crop, g_value_get_int (value), + &video_crop->prop_top); + break; + case PROP_BOTTOM: + gst_video_crop_set_crop (video_crop, g_value_get_int (value), + &video_crop->prop_bottom); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } - GST_LOG_OBJECT (video_crop, "l=%d,r=%d,b=%d,t=%d", - video_crop->crop_left, video_crop->crop_right, video_crop->crop_bottom, - video_crop->crop_top); + GST_LOG_OBJECT (video_crop, "l=%d,r=%d,b=%d,t=%d, need_update:%d", + video_crop->prop_left, video_crop->prop_right, video_crop->prop_bottom, + video_crop->prop_top, video_crop->need_update); + GST_OBJECT_UNLOCK (video_crop); gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM (video_crop)); - g_mutex_unlock (&video_crop->lock); } static void @@ -773,16 +778,16 @@ GST_OBJECT_LOCK (video_crop); switch (prop_id) { - case ARG_LEFT: + case PROP_LEFT: g_value_set_int (value, video_crop->prop_left); break; - case ARG_RIGHT: + case PROP_RIGHT: g_value_set_int (value, video_crop->prop_right); break; - case ARG_TOP: + case PROP_TOP: g_value_set_int (value, video_crop->prop_top); break; - case ARG_BOTTOM: + case PROP_BOTTOM: g_value_set_int (value, video_crop->prop_bottom); break; default: diff -Nru gst-plugins-good1.0-1.4.3/gst/videocrop/gstvideocrop.h gst-plugins-good1.0-1.6.1/gst/videocrop/gstvideocrop.h --- gst-plugins-good1.0-1.4.3/gst/videocrop/gstvideocrop.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videocrop/gstvideocrop.h 2015-10-22 08:02:54.000000000 +0000 @@ -56,6 +56,10 @@ gint prop_right; gint prop_top; gint prop_bottom; + gboolean need_update; + + GstVideoInfo in_info; + GstVideoInfo out_info; gint crop_left; gint crop_right; @@ -64,8 +68,6 @@ VideoCropPixelFormat packing; gint macro_y_off; - - GMutex lock; }; struct _GstVideoCropClass diff -Nru gst-plugins-good1.0-1.4.3/gst/videocrop/Makefile.am gst-plugins-good1.0-1.6.1/gst/videocrop/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/videocrop/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videocrop/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -11,18 +11,3 @@ libgstvideocrop_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstvideocrop.h gstaspectratiocrop.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideocrop -:SHARED libgstvideocrop \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideocrop_la_SOURCES) \ - $(nodist_libgstvideocrop_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideocrop_la_CFLAGS) \ - -:LDFLAGS $(libgstvideocrop_la_LDFLAGS) \ - $(libgstvideocrop_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/videocrop/Makefile.in gst-plugins-good1.0-1.6.1/gst/videocrop/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/videocrop/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videocrop/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/videocrop -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -582,7 +590,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videocrop/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/videocrop/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -899,21 +906,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideocrop -:SHARED libgstvideocrop \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideocrop_la_SOURCES) \ - $(nodist_libgstvideocrop_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideocrop_la_CFLAGS) \ - -:LDFLAGS $(libgstvideocrop_la_LDFLAGS) \ - $(libgstvideocrop_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/videofilter/gstvideobalance.c gst-plugins-good1.0-1.6.1/gst/videofilter/gstvideobalance.c --- gst-plugins-good1.0-1.4.3/gst/videofilter/gstvideobalance.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videofilter/gstvideobalance.c 2015-10-22 08:02:54.000000000 +0000 @@ -67,24 +67,25 @@ PROP_SATURATION }; +#define PROCESSING_CAPS \ + "{ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, " \ + "xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, " \ + "I420, YV12, IYUV, Y41B, NV12, NV21 }" + static GstStaticPadTemplate gst_video_balance_src_template = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ AYUV, " - "ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, " - "xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, " - "I420, YV12, IYUV, Y41B, NV12, NV21 }")) + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (PROCESSING_CAPS) ";" + "video/x-raw(ANY)") ); static GstStaticPadTemplate gst_video_balance_sink_template = -GST_STATIC_PAD_TEMPLATE ("sink", + GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ AYUV, " - "ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, " - "xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, " - "I420, YV12, IYUV, Y41B, NV12, NV21 }")) + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (PROCESSING_CAPS) ";" + "video/x-raw(ANY)") ); static void gst_video_balance_colorbalance_init (GstColorBalanceInterface * @@ -453,7 +454,8 @@ videobalance->process = gst_video_balance_packed_rgb; break; default: - goto unknown_format; + if (!gst_video_balance_is_passthrough (videobalance)) + goto unknown_format; break; } @@ -484,6 +486,36 @@ gst_object_sync_values (GST_OBJECT (balance), stream_time); } +static GstCaps * +gst_video_balance_transform_caps (GstBaseTransform * trans, + GstPadDirection direction, GstCaps * caps, GstCaps * filter) +{ + GstVideoBalance *balance = GST_VIDEO_BALANCE (trans); + GstCaps *ret; + + if (!gst_video_balance_is_passthrough (balance)) { + static GstStaticCaps raw_caps = + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (PROCESSING_CAPS)); + + caps = gst_caps_intersect (caps, gst_static_caps_get (&raw_caps)); + + if (filter) { + ret = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (caps); + } else { + ret = caps; + } + } else { + if (filter) { + ret = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST); + } else { + ret = gst_caps_ref (caps); + } + } + + return ret; +} + static GstFlowReturn gst_video_balance_transform_frame_ip (GstVideoFilter * vfilter, GstVideoFrame * frame) @@ -574,6 +606,8 @@ trans_class->before_transform = GST_DEBUG_FUNCPTR (gst_video_balance_before_transform); trans_class->transform_ip_on_passthrough = FALSE; + trans_class->transform_caps = + GST_DEBUG_FUNCPTR (gst_video_balance_transform_caps); vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_video_balance_set_info); vfilter_class->transform_frame_ip = diff -Nru gst-plugins-good1.0-1.4.3/gst/videofilter/gstvideotemplate.c gst-plugins-good1.0-1.6.1/gst/videofilter/gstvideotemplate.c --- gst-plugins-good1.0-1.4.3/gst/videofilter/gstvideotemplate.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videofilter/gstvideotemplate.c 2015-10-22 08:02:54.000000000 +0000 @@ -68,7 +68,7 @@ enum { - ARG_0 + PROP_0 /* FILL ME */ }; @@ -110,7 +110,7 @@ return videotemplate_type; } -static GstVideofilterFormat gst_videotemplate_formats[] = { +static const GstVideofilterFormat gst_videotemplate_formats[] = { {"I420", 12, gst_videotemplate_planar411,}, }; @@ -145,7 +145,7 @@ videofilter_class = GST_VIDEOFILTER_CLASS (g_class); #if 0 - g_object_class_install_property (gobject_class, ARG_METHOD, + g_object_class_install_property (gobject_class, PROP_METHOD, g_param_spec_enum ("method", "method", "method", GST_TYPE_VIDEOTEMPLATE_METHOD, GST_VIDEOTEMPLATE_METHOD_1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -182,7 +182,7 @@ GST_DEBUG ("gst_videotemplate_set_property"); switch (prop_id) { #if 0 - case ARG_METHOD: + case PROP_METHOD: src->method = g_value_get_enum (value); break; #endif @@ -202,7 +202,7 @@ switch (prop_id) { #if 0 - case ARG_METHOD: + case PROP_METHOD: g_value_set_enum (value, src->method); break; #endif diff -Nru gst-plugins-good1.0-1.4.3/gst/videofilter/Makefile.am gst-plugins-good1.0-1.6.1/gst/videofilter/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/videofilter/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videofilter/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -21,18 +21,3 @@ gstvideoexample.c: $(srcdir)/make_filter $(srcdir)/gstvideotemplate.c $(srcdir)/make_filter Videoexample $(srcdir)/gstvideotemplate.c - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideofilter -:SHARED libgstvideofilter \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideofilter_la_SOURCES) \ - $(nodist_libgstvideofilter_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideofilter_la_CFLAGS) \ - -:LDFLAGS $(libgstvideofilter_la_LDFLAGS) \ - $(libgstvideofilter_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/videofilter/Makefile.in gst-plugins-good1.0-1.6.1/gst/videofilter/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/videofilter/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videofilter/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/videofilter -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -230,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -362,9 +372,6 @@ 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@ @@ -482,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -545,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -593,7 +601,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videofilter/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/videofilter/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -935,25 +942,12 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + gstvideoexample.c: $(srcdir)/make_filter $(srcdir)/gstvideotemplate.c $(srcdir)/make_filter Videoexample $(srcdir)/gstvideotemplate.c -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideofilter -:SHARED libgstvideofilter \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideofilter_la_SOURCES) \ - $(nodist_libgstvideofilter_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideofilter_la_CFLAGS) \ - -:LDFLAGS $(libgstvideofilter_la_LDFLAGS) \ - $(libgstvideofilter_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: diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/blend.c gst-plugins-good1.0-1.6.1/gst/videomixer/blend.c --- gst-plugins-good1.0-1.4.3/gst/videomixer/blend.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/blend.c 2015-10-22 08:02:54.000000000 +0000 @@ -86,9 +86,11 @@ src_height = dest_height - ypos; \ } \ \ - dest = dest + 4 * xpos + (ypos * dest_stride); \ + if (src_height > 0 && src_width > 0) { \ + dest = dest + 4 * xpos + (ypos * dest_stride); \ \ - LOOP (dest, src, src_height, src_width, src_stride, dest_stride, s_alpha); \ + LOOP (dest, src, src_height, src_width, src_stride, dest_stride, s_alpha); \ + } \ } #define BLEND_A32_LOOP(name, method) \ @@ -268,23 +270,23 @@ xpos = 0; \ } \ if (ypos < 0) { \ - yoffset += -ypos; \ + yoffset = -ypos; \ b_src_height -= -ypos; \ ypos = 0; \ } \ /* If x or y offset are larger then the source it's outside of the picture */ \ - if (xoffset > src_width || yoffset > src_height) { \ + if (xoffset >= src_width || yoffset >= src_height) { \ return; \ } \ \ /* adjust width/height if the src is bigger than dest */ \ - if (xpos + src_width > dest_width) { \ + if (xpos + b_src_width > dest_width) { \ b_src_width = dest_width - xpos; \ } \ - if (ypos + src_height > dest_height) { \ + if (ypos + b_src_height > dest_height) { \ b_src_height = dest_height - ypos; \ } \ - if (b_src_width < 0 || b_src_height < 0) { \ + if (b_src_width <= 0 || b_src_height <= 0) { \ return; \ } \ \ diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/gstcms.c gst-plugins-good1.0-1.6.1/gst/videomixer/gstcms.c --- gst-plugins-good1.0-1.4.3/gst/videomixer/gstcms.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/gstcms.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,577 +0,0 @@ -/* GStreamer - * Copyright (C) 2008 David Schleef - * - * 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 -#include -#include "gstcms.h" - -#include -#include -#include - - -/* our simple CMS */ - -void -videomixer_color_xyY_to_XYZ (Color * c) -{ - if (c->v[1] == 0) { - c->v[0] = 0; - c->v[1] = 0; - c->v[2] = 0; - } else { - double X, Y, Z; - X = c->v[0] * c->v[2] / c->v[1]; - Y = c->v[2]; - Z = (1.0 - c->v[0] - c->v[1]) * c->v[2] / c->v[1]; - c->v[0] = X; - c->v[1] = Y; - c->v[2] = Z; - } -} - -void -videomixer_color_XYZ_to_xyY (Color * c) -{ - double d; - d = c->v[0] + c->v[1] + c->v[2]; - if (d == 0) { - c->v[0] = 0.3128; - c->v[1] = 0.3290; - c->v[2] = 0; - } else { - double x, y, Y; - x = c->v[0] / d; - y = c->v[1] / d; - Y = c->v[1]; - c->v[0] = x; - c->v[1] = y; - c->v[2] = Y; - } -} - -void -videomixer_color_set (Color * c, double x, double y, double z) -{ - c->v[0] = x; - c->v[1] = y; - c->v[2] = z; -} - -void -videomixer_color_matrix_set_identity (ColorMatrix * m) -{ - int i, j; - - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - m->m[i][j] = (i == j); - } - } -} - -/* Prettyprint a 4x4 matrix @m@ */ -void -videomixer_color_matrix_dump (ColorMatrix * m) -{ - int i, j; - - printf ("[\n"); - for (i = 0; i < 4; i++) { - printf (" "); - for (j = 0; j < 4; j++) { - printf (" %8.5g", m->m[i][j]); - } - printf ("\n"); - } - printf ("]\n"); -} - -/* Perform 4x4 matrix multiplication: - * - @dst@ = @a@ * @b@ - * - @dst@ may be a pointer to @a@ andor @b@ - */ -void -videomixer_color_matrix_multiply (ColorMatrix * dst, ColorMatrix * a, - ColorMatrix * b) -{ - ColorMatrix tmp; - int i, j, k; - - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - double x = 0; - for (k = 0; k < 4; k++) { - x += a->m[i][k] * b->m[k][j]; - } - tmp.m[i][j] = x; - } - } - - memcpy (dst, &tmp, sizeof (ColorMatrix)); -} - -void -videomixer_color_matrix_apply (ColorMatrix * m, Color * dest, Color * src) -{ - int i; - Color tmp; - - for (i = 0; i < 3; i++) { - double x = 0; - x += m->m[i][0] * src->v[0]; - x += m->m[i][1] * src->v[1]; - x += m->m[i][2] * src->v[2]; - x += m->m[i][3]; - tmp.v[i] = x; - } - memcpy (dest, &tmp, sizeof (tmp)); -} - -void -videomixer_color_matrix_offset_components (ColorMatrix * m, double a1, - double a2, double a3) -{ - ColorMatrix a; - - videomixer_color_matrix_set_identity (&a); - a.m[0][3] = a1; - a.m[1][3] = a2; - a.m[2][3] = a3; - videomixer_color_matrix_multiply (m, &a, m); -} - -void -videomixer_color_matrix_scale_components (ColorMatrix * m, double a1, double a2, - double a3) -{ - ColorMatrix a; - - videomixer_color_matrix_set_identity (&a); - a.m[0][0] = a1; - a.m[1][1] = a2; - a.m[2][2] = a3; - videomixer_color_matrix_multiply (m, &a, m); -} - -void -videomixer_color_matrix_YCbCr_to_RGB (ColorMatrix * m, double Kr, double Kb) -{ - double Kg = 1.0 - Kr - Kb; - ColorMatrix k = { - { - {1., 0., 2 * (1 - Kr), 0.}, - {1., -2 * Kb * (1 - Kb) / Kg, -2 * Kr * (1 - Kr) / Kg, 0.}, - {1., 2 * (1 - Kb), 0., 0.}, - {0., 0., 0., 1.}, - } - }; - - videomixer_color_matrix_multiply (m, &k, m); -} - -void -videomixer_color_matrix_RGB_to_YCbCr (ColorMatrix * m, double Kr, double Kb) -{ - double Kg = 1.0 - Kr - Kb; - ColorMatrix k; - double x; - - k.m[0][0] = Kr; - k.m[0][1] = Kg; - k.m[0][2] = Kb; - k.m[0][3] = 0; - - x = 1 / (2 * (1 - Kb)); - k.m[1][0] = -x * Kr; - k.m[1][1] = -x * Kg; - k.m[1][2] = x * (1 - Kb); - k.m[1][3] = 0; - - x = 1 / (2 * (1 - Kr)); - k.m[2][0] = x * (1 - Kr); - k.m[2][1] = -x * Kg; - k.m[2][2] = -x * Kb; - k.m[2][3] = 0; - - k.m[3][0] = 0; - k.m[3][1] = 0; - k.m[3][2] = 0; - k.m[3][3] = 1; - - videomixer_color_matrix_multiply (m, &k, m); -} - -void -videomixer_color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst) -{ - /* - * At this point, everything is in YCbCr - * All components are in the range [0,255] - */ - videomixer_color_matrix_set_identity (dst); - - /* offset required to get input video black to (0.,0.,0.) */ - videomixer_color_matrix_offset_components (dst, -16, -128, -128); - - /* scale required to get input video black to (0.,0.,0.) */ - videomixer_color_matrix_scale_components (dst, (1 / 219.0), (1 / 224.0), - (1 / 224.0)); - - /* colour matrix, YCbCr -> RGB */ - /* Requires Y in [0,1.0], Cb&Cr in [-0.5,0.5] */ - videomixer_color_matrix_YCbCr_to_RGB (dst, 0.2990, 0.1140); /* SD */ - - /* - * We are now in RGB space - */ - -#if 0 - /* scale to output range. */ - videomixer_color_matrix_scale_components (dst, 255.0, 255.0, 255.0); -#endif -} - -void -videomixer_color_matrix_build_bt709_to_bt601 (ColorMatrix * dst) -{ - videomixer_color_matrix_set_identity (dst); - - /* offset required to get input video black to (0.,0.,0.) */ - videomixer_color_matrix_offset_components (dst, -16, -128, -128); - - /* scale required to get input video black to (0.,0.,0.) */ - videomixer_color_matrix_scale_components (dst, (1 / 219.0), (1 / 224.0), - (1 / 224.0)); - - /* colour matrix, YCbCr -> RGB */ - /* Requires Y in [0,1.0], Cb&Cr in [-0.5,0.5] */ - videomixer_color_matrix_YCbCr_to_RGB (dst, 0.2126, 0.0722); /* HD */ - - videomixer_color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140); /* SD */ - - videomixer_color_matrix_scale_components (dst, 219.0, 224.0, 224.0); - - videomixer_color_matrix_offset_components (dst, 16, 128, 128); -} - -void -videomixer_color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst) -{ - videomixer_color_matrix_set_identity (dst); - - videomixer_color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140); /* SD */ - - videomixer_color_matrix_scale_components (dst, 219.0, 224.0, 224.0); - - videomixer_color_matrix_offset_components (dst, 16, 128, 128); - - { - Color c; - int i; - for (i = 7; i >= 0; i--) { - videomixer_color_set (&c, (i & 2) ? 0.75 : 0.0, (i & 4) ? 0.75 : 0.0, - (i & 1) ? 0.75 : 0.0); - videomixer_color_matrix_apply (dst, &c, &c); - g_print (" { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]), - rint (c.v[2])); - } - videomixer_color_set (&c, -0.075, -0.075, -0.075); - videomixer_color_matrix_apply (dst, &c, &c); - g_print (" { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]), - rint (c.v[2])); - videomixer_color_set (&c, 0.075, 0.075, 0.075); - videomixer_color_matrix_apply (dst, &c, &c); - g_print (" { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]), - rint (c.v[2])); - } -} - -void -videomixer_color_matrix_invert (ColorMatrix * m) -{ - ColorMatrix tmp; - int i, j; - double det; - - videomixer_color_matrix_set_identity (&tmp); - for (j = 0; j < 3; j++) { - for (i = 0; i < 3; i++) { - tmp.m[j][i] = - m->m[(i + 1) % 3][(j + 1) % 3] * m->m[(i + 2) % 3][(j + 2) % 3] - - m->m[(i + 1) % 3][(j + 2) % 3] * m->m[(i + 2) % 3][(j + 1) % 3]; - } - } - det = - tmp.m[0][0] * m->m[0][0] + tmp.m[0][1] * m->m[1][0] + - tmp.m[0][2] * m->m[2][0]; - for (j = 0; j < 3; j++) { - for (i = 0; i < 3; i++) { - tmp.m[i][j] /= det; - } - } - memcpy (m, &tmp, sizeof (tmp)); -} - -void -videomixer_color_matrix_copy (ColorMatrix * dest, ColorMatrix * src) -{ - memcpy (dest, src, sizeof (ColorMatrix)); -} - -void -videomixer_color_matrix_transpose (ColorMatrix * m) -{ - int i, j; - ColorMatrix tmp; - - videomixer_color_matrix_set_identity (&tmp); - for (i = 0; i < 3; i++) { - for (j = 0; j < 3; j++) { - tmp.m[i][j] = m->m[j][i]; - } - } - memcpy (m, &tmp, sizeof (ColorMatrix)); -} - -void -videomixer_color_matrix_build_XYZ (ColorMatrix * dst, - double rx, double ry, - double gx, double gy, double bx, double by, double wx, double wy) -{ - Color r, g, b, w, scale; - ColorMatrix m; - - videomixer_color_set (&r, rx, ry, 1.0); - videomixer_color_xyY_to_XYZ (&r); - videomixer_color_set (&g, gx, gy, 1.0); - videomixer_color_xyY_to_XYZ (&g); - videomixer_color_set (&b, bx, by, 1.0); - videomixer_color_xyY_to_XYZ (&b); - videomixer_color_set (&w, wx, wy, 1.0); - videomixer_color_xyY_to_XYZ (&w); - - videomixer_color_matrix_set_identity (dst); - - dst->m[0][0] = r.v[0]; - dst->m[0][1] = r.v[1]; - dst->m[0][2] = r.v[2]; - dst->m[1][0] = g.v[0]; - dst->m[1][1] = g.v[1]; - dst->m[1][2] = g.v[2]; - dst->m[2][0] = b.v[0]; - dst->m[2][1] = b.v[1]; - dst->m[2][2] = b.v[2]; - - videomixer_color_matrix_dump (dst); - videomixer_color_matrix_copy (&m, dst); - videomixer_color_matrix_invert (&m); - videomixer_color_matrix_dump (&m); - - videomixer_color_matrix_transpose (&m); - videomixer_color_matrix_apply (&m, &scale, &w); - g_print ("%g %g %g\n", scale.v[0], scale.v[1], scale.v[2]); - - dst->m[0][0] = r.v[0] * scale.v[0]; - dst->m[0][1] = r.v[1] * scale.v[0]; - dst->m[0][2] = r.v[2] * scale.v[0]; - dst->m[1][0] = g.v[0] * scale.v[1]; - dst->m[1][1] = g.v[1] * scale.v[1]; - dst->m[1][2] = g.v[2] * scale.v[1]; - dst->m[2][0] = b.v[0] * scale.v[2]; - dst->m[2][1] = b.v[1] * scale.v[2]; - dst->m[2][2] = b.v[2] * scale.v[2]; - - videomixer_color_matrix_transpose (dst); - videomixer_color_matrix_dump (dst); - - videomixer_color_set (&scale, 1, 1, 1); - videomixer_color_matrix_apply (dst, &scale, &scale); - videomixer_color_XYZ_to_xyY (&scale); - g_print ("white %g %g %g\n", scale.v[0], scale.v[1], scale.v[2]); - -} - -void -videomixer_color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst) -{ - /* SMPTE C primaries, SMPTE 170M-2004 */ - videomixer_color_matrix_build_XYZ (dst, - 0.630, 0.340, 0.310, 0.595, 0.155, 0.070, 0.3127, 0.3290); -#if 0 - /* NTSC 1953 primaries, SMPTE 170M-2004 */ - videomixer_color_matrix_build_XYZ (dst, - 0.67, 0.33, 0.21, 0.71, 0.14, 0.08, 0.3127, 0.3290); -#endif -} - -void -videomixer_color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst) -{ - /* Rec. ITU-R BT.709-5 */ - videomixer_color_matrix_build_XYZ (dst, - 0.640, 0.330, 0.300, 0.600, 0.150, 0.060, 0.3127, 0.3290); -} - -void -videomixer_color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst) -{ - /* Dell monitor */ -#if 1 - videomixer_color_matrix_build_XYZ (dst, - 0.662, 0.329, 0.205, 0.683, 0.146, 0.077, 0.3135, 0.3290); -#endif -#if 0 - videomixer_color_matrix_build_XYZ (dst, - 0.630, 0.340, 0.310, 0.595, 0.155, 0.070, 0.3127, 0.3290); -#endif - videomixer_color_matrix_invert (dst); -} - -void -videomixer_color_transfer_function_apply (Color * dest, Color * src) -{ - int i; - - for (i = 0; i < 3; i++) { - if (src->v[i] < 0.0812) { - dest->v[i] = src->v[i] / 4.500; - } else { - dest->v[i] = pow (src->v[i] + 0.099, 1 / 0.4500); - } - } -} - -void -videomixer_color_transfer_function_unapply (Color * dest, Color * src) -{ - int i; - - for (i = 0; i < 3; i++) { - if (src->v[i] < 0.0812 / 4.500) { - dest->v[i] = src->v[i] * 4.500; - } else { - dest->v[i] = pow (src->v[i], 0.4500) - 0.099; - } - } -} - -void -videomixer_color_gamut_clamp (Color * dest, Color * src) -{ - dest->v[0] = CLAMP (src->v[0], 0.0, 1.0); - dest->v[1] = CLAMP (src->v[1], 0.0, 1.0); - dest->v[2] = CLAMP (src->v[2], 0.0, 1.0); -} - -#if 0 -static guint8 * -get_color_transform_table (void) -{ - static guint8 *color_transform_table = NULL; - -#if 1 - if (!color_transform_table) { - ColorMatrix bt601_to_rgb; - ColorMatrix bt601_to_yuv; - ColorMatrix bt601_rgb_to_XYZ; - ColorMatrix dell_XYZ_to_rgb; - guint8 *table_y; - guint8 *table_u; - guint8 *table_v; - int y, u, v; - - videomixer_color_matrix_build_yuv_to_rgb_601 (&bt601_to_rgb); - videomixer_color_matrix_build_rgb_to_yuv_601 (&bt601_to_yuv); - videomixer_color_matrix_build_rgb_to_XYZ_601 (&bt601_rgb_to_XYZ); - videomixer_color_matrix_build_XYZ_to_rgb_dell (&dell_XYZ_to_rgb); - - color_transform_table = g_malloc (0x1000000 * 3); - - table_y = COG_OFFSET (color_transform_table, 0 * 0x1000000); - table_u = COG_OFFSET (color_transform_table, 1 * 0x1000000); - table_v = COG_OFFSET (color_transform_table, 2 * 0x1000000); - - for (y = 0; y < 256; y++) { - for (u = 0; u < 256; u++) { - for (v = 0; v < 256; v++) { - Color c; - - c.v[0] = y; - c.v[1] = u; - c.v[2] = v; - videomixer_color_matrix_apply (&bt601_to_rgb, &c, &c); - color_gamut_clamp (&c, &c); - color_transfer_function_apply (&c, &c); - videomixer_color_matrix_apply (&bt601_rgb_to_XYZ, &c, &c); - videomixer_color_matrix_apply (&dell_XYZ_to_rgb, &c, &c); - color_transfer_function_unapply (&c, &c); - color_gamut_clamp (&c, &c); - videomixer_color_matrix_apply (&bt601_to_yuv, &c, &c); - - table_y[(y << 16) | (u << 8) | (v)] = rint (c.v[0]); - table_u[(y << 16) | (u << 8) | (v)] = rint (c.v[1]); - table_v[(y << 16) | (u << 8) | (v)] = rint (c.v[2]); - } - } - } - } -#endif -#if 0 - if (!color_transform_table) { - ColorMatrix bt709_to_bt601; - guint8 *table_y; - guint8 *table_u; - guint8 *table_v; - int y, u, v; - - videomixer_color_matrix_build_bt709_to_bt601 (&bt709_to_bt601); - - color_transform_table = g_malloc (0x1000000 * 3); - - table_y = COG_OFFSET (color_transform_table, 0 * 0x1000000); - table_u = COG_OFFSET (color_transform_table, 1 * 0x1000000); - table_v = COG_OFFSET (color_transform_table, 2 * 0x1000000); - - for (y = 0; y < 256; y++) { - for (u = 0; u < 256; u++) { - for (v = 0; v < 256; v++) { - Color c; - - c.v[0] = y; - c.v[1] = u; - c.v[2] = v; - videomixer_color_matrix_apply (&bt709_to_bt601, &c, &c); - - table_y[(y << 16) | (u << 8) | (v)] = rint (c.v[0]); - table_u[(y << 16) | (u << 8) | (v)] = rint (c.v[1]); - table_v[(y << 16) | (u << 8) | (v)] = rint (c.v[2]); - } - } - } - } -#endif - - return color_transform_table; -} -#endif diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/gstcms.h gst-plugins-good1.0-1.6.1/gst/videomixer/gstcms.h --- gst-plugins-good1.0-1.4.3/gst/videomixer/gstcms.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/gstcms.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* GStreamer - * Copyright (C) 2008 David Schleef - * - * 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_CMS_H_ -#define _GST_CMS_H_ - -#include - -G_BEGIN_DECLS - -typedef struct _Color Color; -typedef struct _ColorMatrix ColorMatrix; - -struct _Color -{ - double v[3]; -}; - -struct _ColorMatrix -{ - double m[4][4]; -}; - -void videomixer_color_xyY_to_XYZ (Color * c); -void videomixer_color_XYZ_to_xyY (Color * c); -void videomixer_color_set (Color * c, double x, double y, double z); -void videomixer_color_matrix_set_identity (ColorMatrix * m); -void videomixer_color_matrix_dump (ColorMatrix * m); -void videomixer_color_matrix_multiply (ColorMatrix * dst, ColorMatrix * a, ColorMatrix * b); -void videomixer_color_matrix_apply (ColorMatrix * m, Color * dest, Color * src); -void videomixer_color_matrix_offset_components (ColorMatrix * m, double a1, double a2, - double a3); -void videomixer_color_matrix_scale_components (ColorMatrix * m, double a1, double a2, double a3); -void videomixer_color_matrix_YCbCr_to_RGB (ColorMatrix * m, double Kr, double Kb); -void videomixer_color_matrix_RGB_to_YCbCr (ColorMatrix * m, double Kr, double Kb); -void videomixer_color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst); -void videomixer_color_matrix_build_bt709_to_bt601 (ColorMatrix * dst); -void videomixer_color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst); -void videomixer_color_matrix_invert (ColorMatrix * m); -void videomixer_color_matrix_copy (ColorMatrix * dest, ColorMatrix * src); -void videomixer_color_matrix_transpose (ColorMatrix * m); -void videomixer_color_matrix_build_XYZ (ColorMatrix * dst, - double rx, double ry, - double gx, double gy, double bx, double by, double wx, double wy); -void videomixer_color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst); -void videomixer_color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst); -void videomixer_color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst); -void videomixer_color_transfer_function_apply (Color * dest, Color * src); -void videomixer_color_transfer_function_unapply (Color * dest, Color * src); -void videomixer_color_gamut_clamp (Color * dest, Color * src); - -G_END_DECLS - -#endif - diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/Makefile.am gst-plugins-good1.0-1.6.1/gst/videomixer/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/videomixer/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -6,8 +6,6 @@ libgstvideomixer_la_SOURCES = \ blend.c \ - videoconvert.c \ - gstcms.c \ videomixer2.c nodist_libgstvideomixer_la_SOURCES = $(ORC_NODIST_SOURCES) @@ -23,21 +21,4 @@ noinst_HEADERS = \ blend.h \ videomixer2.h \ - videomixer2pad.h \ - videoconvert.h \ - gstcms.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideomixer -:SHARED libgstvideomixer \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideomixer_la_SOURCES) \ - $(nodist_libgstvideomixer_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideomixer_la_CFLAGS) \ - -:LDFLAGS $(libgstvideomixer_la_LDFLAGS) \ - $(libgstvideomixer_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ + videomixer2pad.h diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/Makefile.in gst-plugins-good1.0-1.6.1/gst/videomixer/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/videomixer/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -38,7 +38,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -102,9 +112,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/orc.mak $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/depcomp $(noinst_HEADERS) \ - README subdir = gst/videomixer ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -127,7 +134,6 @@ $(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 \ @@ -142,6 +148,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -180,8 +188,6 @@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libgstvideomixer_la_OBJECTS = libgstvideomixer_la-blend.lo \ - libgstvideomixer_la-videoconvert.lo \ - libgstvideomixer_la-gstcms.lo \ libgstvideomixer_la-videomixer2.lo am__objects_1 = libgstvideomixer_la-tmp-orc.lo nodist_libgstvideomixer_la_OBJECTS = $(am__objects_1) @@ -257,6 +263,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \ + $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -389,9 +397,6 @@ 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@ @@ -509,17 +514,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -572,6 +577,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -597,8 +603,6 @@ cp_v_gen_0 = @echo " CP $@"; libgstvideomixer_la_SOURCES = \ blend.c \ - videoconvert.c \ - gstcms.c \ videomixer2.c nodist_libgstvideomixer_la_SOURCES = $(ORC_NODIST_SOURCES) @@ -616,9 +620,7 @@ noinst_HEADERS = \ blend.h \ videomixer2.h \ - videomixer2pad.h \ - videoconvert.h \ - gstcms.h + videomixer2pad.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -637,7 +639,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videomixer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/videomixer/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -646,7 +647,7 @@ 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/orc.mak: +$(top_srcdir)/common/orc.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -702,9 +703,7 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvideomixer_la-blend.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvideomixer_la-gstcms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvideomixer_la-tmp-orc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvideomixer_la-videoconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvideomixer_la-videomixer2.Plo@am__quote@ .c.o: @@ -738,20 +737,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvideomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvideomixer_la_CFLAGS) $(CFLAGS) -c -o libgstvideomixer_la-blend.lo `test -f 'blend.c' || echo '$(srcdir)/'`blend.c -libgstvideomixer_la-videoconvert.lo: videoconvert.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvideomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvideomixer_la_CFLAGS) $(CFLAGS) -MT libgstvideomixer_la-videoconvert.lo -MD -MP -MF $(DEPDIR)/libgstvideomixer_la-videoconvert.Tpo -c -o libgstvideomixer_la-videoconvert.lo `test -f 'videoconvert.c' || echo '$(srcdir)/'`videoconvert.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstvideomixer_la-videoconvert.Tpo $(DEPDIR)/libgstvideomixer_la-videoconvert.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videoconvert.c' object='libgstvideomixer_la-videoconvert.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 $(libgstvideomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvideomixer_la_CFLAGS) $(CFLAGS) -c -o libgstvideomixer_la-videoconvert.lo `test -f 'videoconvert.c' || echo '$(srcdir)/'`videoconvert.c - -libgstvideomixer_la-gstcms.lo: gstcms.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvideomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvideomixer_la_CFLAGS) $(CFLAGS) -MT libgstvideomixer_la-gstcms.lo -MD -MP -MF $(DEPDIR)/libgstvideomixer_la-gstcms.Tpo -c -o libgstvideomixer_la-gstcms.lo `test -f 'gstcms.c' || echo '$(srcdir)/'`gstcms.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstvideomixer_la-gstcms.Tpo $(DEPDIR)/libgstvideomixer_la-gstcms.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstcms.c' object='libgstvideomixer_la-gstcms.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 $(libgstvideomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvideomixer_la_CFLAGS) $(CFLAGS) -c -o libgstvideomixer_la-gstcms.lo `test -f 'gstcms.c' || echo '$(srcdir)/'`gstcms.c - libgstvideomixer_la-videomixer2.lo: videomixer2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvideomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvideomixer_la_CFLAGS) $(CFLAGS) -MT libgstvideomixer_la-videomixer2.lo -MD -MP -MF $(DEPDIR)/libgstvideomixer_la-videomixer2.Tpo -c -o libgstvideomixer_la-videomixer2.lo `test -f 'videomixer2.c' || echo '$(srcdir)/'`videomixer2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstvideomixer_la-videomixer2.Tpo $(DEPDIR)/libgstvideomixer_la-videomixer2.Plo @@ -986,6 +971,8 @@ tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + orc-update: tmp-orc.c $(ORC_SOURCE).h $(top_srcdir)/common/gst-indent tmp-orc.c @@ -1023,21 +1010,6 @@ cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstvideomixer -:SHARED libgstvideomixer \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstvideomixer_la_SOURCES) \ - $(nodist_libgstvideomixer_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideomixer_la_CFLAGS) \ - -:LDFLAGS $(libgstvideomixer_la_LDFLAGS) \ - $(libgstvideomixer_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: diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videoconvert.c gst-plugins-good1.0-1.6.1/gst/videomixer/videoconvert.c --- gst-plugins-good1.0-1.4.3/gst/videomixer/videoconvert.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videoconvert.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1505 +0,0 @@ -/* GStreamer - * Copyright (C) 2010 David Schleef - * Copyright (C) 2010 Sebastian Dröge - * - * 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 "videoconvert.h" - -#include -#include -#include - -#include "videomixerorc.h" - - -static void videoconvert_convert_generic (VideoConvert * convert, - GstVideoFrame * dest, const GstVideoFrame * src); -static void videoconvert_convert_matrix8 (VideoConvert * convert, - gpointer pixels); -static void videoconvert_convert_matrix16 (VideoConvert * convert, - gpointer pixels); -static gboolean videoconvert_convert_lookup_fastpath (VideoConvert * convert); -static gboolean videoconvert_convert_compute_matrix (VideoConvert * convert); -static gboolean videoconvert_convert_compute_resample (VideoConvert * convert); -static void videoconvert_dither_verterr (VideoConvert * convert, - guint16 * pixels, int j); -static void videoconvert_dither_halftone (VideoConvert * convert, - guint16 * pixels, int j); - - -VideoConvert * -videomixer_videoconvert_convert_new (GstVideoInfo * in_info, - GstVideoInfo * out_info) -{ - VideoConvert *convert; - gint width; - - convert = g_malloc0 (sizeof (VideoConvert)); - - convert->in_info = *in_info; - convert->out_info = *out_info; - convert->dither16 = NULL; - - convert->width = GST_VIDEO_INFO_WIDTH (in_info); - convert->height = GST_VIDEO_INFO_HEIGHT (in_info); - - if (!videoconvert_convert_lookup_fastpath (convert)) { - convert->convert = videoconvert_convert_generic; - if (!videoconvert_convert_compute_matrix (convert)) - goto no_convert; - - if (!videoconvert_convert_compute_resample (convert)) - goto no_convert; - } - - width = convert->width; - - convert->lines = out_info->finfo->pack_lines; - convert->errline = g_malloc0 (sizeof (guint16) * width * 4); - - return convert; - - /* ERRORS */ -no_convert: - { - videomixer_videoconvert_convert_free (convert); - return NULL; - } -} - -void -videomixer_videoconvert_convert_free (VideoConvert * convert) -{ - gint i; - - if (convert->upsample) - gst_video_chroma_resample_free (convert->upsample); - if (convert->downsample) - gst_video_chroma_resample_free (convert->downsample); - - for (i = 0; i < convert->n_tmplines; i++) - g_free (convert->tmplines[i]); - g_free (convert->tmplines); - g_free (convert->errline); - - g_free (convert); -} - -void -videomixer_videoconvert_convert_set_dither (VideoConvert * convert, int type) -{ - switch (type) { - case 0: - default: - convert->dither16 = NULL; - break; - case 1: - convert->dither16 = videoconvert_dither_verterr; - break; - case 2: - convert->dither16 = videoconvert_dither_halftone; - break; - } -} - -void -videomixer_videoconvert_convert_convert (VideoConvert * convert, - GstVideoFrame * dest, const GstVideoFrame * src) -{ - convert->convert (convert, dest, src); -} - -#define SCALE (8) -#define SCALE_F ((float) (1 << SCALE)) - -static void -videoconvert_convert_matrix8 (VideoConvert * convert, gpointer pixels) -{ - int i; - int r, g, b; - int y, u, v; - guint8 *p = pixels; - - for (i = 0; i < convert->width; i++) { - r = p[i * 4 + 1]; - g = p[i * 4 + 2]; - b = p[i * 4 + 3]; - - y = (convert->cmatrix[0][0] * r + convert->cmatrix[0][1] * g + - convert->cmatrix[0][2] * b + convert->cmatrix[0][3]) >> SCALE; - u = (convert->cmatrix[1][0] * r + convert->cmatrix[1][1] * g + - convert->cmatrix[1][2] * b + convert->cmatrix[1][3]) >> SCALE; - v = (convert->cmatrix[2][0] * r + convert->cmatrix[2][1] * g + - convert->cmatrix[2][2] * b + convert->cmatrix[2][3]) >> SCALE; - - p[i * 4 + 1] = CLAMP (y, 0, 255); - p[i * 4 + 2] = CLAMP (u, 0, 255); - p[i * 4 + 3] = CLAMP (v, 0, 255); - } -} - -static void -videoconvert_convert_matrix16 (VideoConvert * convert, gpointer pixels) -{ - int i; - int r, g, b; - int y, u, v; - guint16 *p = pixels; - - for (i = 0; i < convert->width; i++) { - r = p[i * 4 + 1]; - g = p[i * 4 + 2]; - b = p[i * 4 + 3]; - - y = (convert->cmatrix[0][0] * r + convert->cmatrix[0][1] * g + - convert->cmatrix[0][2] * b + convert->cmatrix[0][3]) >> SCALE; - u = (convert->cmatrix[1][0] * r + convert->cmatrix[1][1] * g + - convert->cmatrix[1][2] * b + convert->cmatrix[1][3]) >> SCALE; - v = (convert->cmatrix[2][0] * r + convert->cmatrix[2][1] * g + - convert->cmatrix[2][2] * b + convert->cmatrix[2][3]) >> SCALE; - - p[i * 4 + 1] = CLAMP (y, 0, 65535); - p[i * 4 + 2] = CLAMP (u, 0, 65535); - p[i * 4 + 3] = CLAMP (v, 0, 65535); - } -} - -static gboolean -get_Kr_Kb (GstVideoColorMatrix matrix, gdouble * Kr, gdouble * Kb) -{ - gboolean res = TRUE; - - switch (matrix) { - /* RGB */ - default: - case GST_VIDEO_COLOR_MATRIX_RGB: - res = FALSE; - break; - /* YUV */ - case GST_VIDEO_COLOR_MATRIX_FCC: - *Kr = 0.30; - *Kb = 0.11; - break; - case GST_VIDEO_COLOR_MATRIX_BT709: - *Kr = 0.2126; - *Kb = 0.0722; - break; - case GST_VIDEO_COLOR_MATRIX_BT601: - *Kr = 0.2990; - *Kb = 0.1140; - break; - case GST_VIDEO_COLOR_MATRIX_SMPTE240M: - *Kr = 0.212; - *Kb = 0.087; - break; - } - GST_DEBUG ("matrix: %d, Kr %f, Kb %f", matrix, *Kr, *Kb); - return res; -} - -static gboolean -videoconvert_convert_compute_matrix (VideoConvert * convert) -{ - GstVideoInfo *in_info, *out_info; - ColorMatrix dst; - gint i, j; - const GstVideoFormatInfo *sfinfo, *dfinfo; - const GstVideoFormatInfo *suinfo, *duinfo; - gint offset[4], scale[4]; - gdouble Kr = 0, Kb = 0; - - in_info = &convert->in_info; - out_info = &convert->out_info; - - sfinfo = in_info->finfo; - dfinfo = out_info->finfo; - - if (sfinfo->unpack_func == NULL) - goto no_unpack_func; - - if (dfinfo->pack_func == NULL) - goto no_pack_func; - - suinfo = gst_video_format_get_info (sfinfo->unpack_format); - duinfo = gst_video_format_get_info (dfinfo->unpack_format); - - convert->in_bits = GST_VIDEO_FORMAT_INFO_DEPTH (suinfo, 0); - convert->out_bits = GST_VIDEO_FORMAT_INFO_DEPTH (duinfo, 0); - - GST_DEBUG ("in bits %d, out bits %d", convert->in_bits, convert->out_bits); - - if (in_info->colorimetry.range == out_info->colorimetry.range && - in_info->colorimetry.matrix == out_info->colorimetry.matrix) { - GST_DEBUG ("using identity color transform"); - convert->matrix = NULL; - return TRUE; - } - - /* calculate intermediate format for the matrix. When unpacking, we expand - * input to 16 when one of the inputs is 16 bits */ - if (convert->in_bits == 16 || convert->out_bits == 16) { - convert->matrix = videoconvert_convert_matrix16; - - if (GST_VIDEO_FORMAT_INFO_IS_RGB (suinfo)) - suinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_ARGB64); - else - suinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_AYUV64); - - if (GST_VIDEO_FORMAT_INFO_IS_RGB (duinfo)) - duinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_ARGB64); - else - duinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_AYUV64); - } else { - convert->matrix = videoconvert_convert_matrix8; - } - - videomixer_color_matrix_set_identity (&dst); - - /* 1, bring color components to [0..1.0] range */ - gst_video_color_range_offsets (in_info->colorimetry.range, suinfo, offset, - scale); - - videomixer_color_matrix_offset_components (&dst, -offset[0], -offset[1], - -offset[2]); - - videomixer_color_matrix_scale_components (&dst, 1 / ((float) scale[0]), - 1 / ((float) scale[1]), 1 / ((float) scale[2])); - - /* 2. bring components to R'G'B' space */ - if (get_Kr_Kb (in_info->colorimetry.matrix, &Kr, &Kb)) - videomixer_color_matrix_YCbCr_to_RGB (&dst, Kr, Kb); - - /* 3. inverse transfer function. R'G'B' to linear RGB */ - - /* 4. from RGB to XYZ using the primaries */ - - /* 5. from XYZ to RGB using the primaries */ - - /* 6. transfer function. linear RGB to R'G'B' */ - - /* 7. bring components to YCbCr space */ - if (get_Kr_Kb (out_info->colorimetry.matrix, &Kr, &Kb)) - videomixer_color_matrix_RGB_to_YCbCr (&dst, Kr, Kb); - - /* 8, bring color components to nominal range */ - gst_video_color_range_offsets (out_info->colorimetry.range, duinfo, offset, - scale); - - videomixer_color_matrix_scale_components (&dst, (float) scale[0], - (float) scale[1], (float) scale[2]); - - videomixer_color_matrix_offset_components (&dst, offset[0], offset[1], - offset[2]); - - /* because we're doing fixed point matrix coefficients */ - videomixer_color_matrix_scale_components (&dst, SCALE_F, SCALE_F, SCALE_F); - - for (i = 0; i < 4; i++) - for (j = 0; j < 4; j++) - convert->cmatrix[i][j] = rint (dst.m[i][j]); - - GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[0][0], - convert->cmatrix[0][1], convert->cmatrix[0][2], convert->cmatrix[0][3]); - GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[1][0], - convert->cmatrix[1][1], convert->cmatrix[1][2], convert->cmatrix[1][3]); - GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[2][0], - convert->cmatrix[2][1], convert->cmatrix[2][2], convert->cmatrix[2][3]); - GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[3][0], - convert->cmatrix[3][1], convert->cmatrix[3][2], convert->cmatrix[3][3]); - - return TRUE; - - /* ERRORS */ -no_unpack_func: - { - GST_ERROR ("no unpack_func for format %s", - gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (in_info))); - return FALSE; - } -no_pack_func: - { - GST_ERROR ("no pack_func for format %s", - gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (out_info))); - return FALSE; - } -} - -static void -videoconvert_dither_verterr (VideoConvert * convert, guint16 * pixels, int j) -{ - int i; - guint16 *errline = convert->errline; - unsigned int mask = 0xff; - - for (i = 0; i < 4 * convert->width; i++) { - int x = pixels[i] + errline[i]; - if (x > 65535) - x = 65535; - pixels[i] = x; - errline[i] = x & mask; - } -} - -static void -videoconvert_dither_halftone (VideoConvert * convert, guint16 * pixels, int j) -{ - int i; - static guint16 halftone[8][8] = { - {0, 128, 32, 160, 8, 136, 40, 168}, - {192, 64, 224, 96, 200, 72, 232, 104}, - {48, 176, 16, 144, 56, 184, 24, 152}, - {240, 112, 208, 80, 248, 120, 216, 88}, - {12, 240, 44, 172, 4, 132, 36, 164}, - {204, 76, 236, 108, 196, 68, 228, 100}, - {60, 188, 28, 156, 52, 180, 20, 148}, - {252, 142, 220, 92, 244, 116, 212, 84} - }; - - for (i = 0; i < convert->width * 4; i++) { - int x; - x = pixels[i] + halftone[(i >> 2) & 7][j & 7]; - if (x > 65535) - x = 65535; - pixels[i] = x; - } -} - -static void -alloc_tmplines (VideoConvert * convert, guint lines, gint width) -{ - gint i; - - convert->n_tmplines = lines; - convert->tmplines = g_malloc (lines * sizeof (gpointer)); - for (i = 0; i < lines; i++) - convert->tmplines[i] = g_malloc (sizeof (guint16) * (width + 8) * 4); -} - -static gboolean -videoconvert_convert_compute_resample (VideoConvert * convert) -{ - GstVideoInfo *in_info, *out_info; - const GstVideoFormatInfo *sfinfo, *dfinfo; - gint width; - - in_info = &convert->in_info; - out_info = &convert->out_info; - - sfinfo = in_info->finfo; - dfinfo = out_info->finfo; - - width = convert->width; - - if (sfinfo->w_sub[2] != dfinfo->w_sub[2] || - sfinfo->h_sub[2] != dfinfo->h_sub[2] || - in_info->chroma_site != out_info->chroma_site) { - convert->upsample = gst_video_chroma_resample_new (0, - in_info->chroma_site, 0, sfinfo->unpack_format, sfinfo->w_sub[2], - sfinfo->h_sub[2]); - - - convert->downsample = gst_video_chroma_resample_new (0, - out_info->chroma_site, 0, dfinfo->unpack_format, -dfinfo->w_sub[2], - -dfinfo->h_sub[2]); - - } else { - convert->upsample = NULL; - convert->downsample = NULL; - } - - if (convert->upsample) { - gst_video_chroma_resample_get_info (convert->upsample, - &convert->up_n_lines, &convert->up_offset); - } else { - convert->up_n_lines = 1; - convert->up_offset = 0; - } - if (convert->downsample) { - gst_video_chroma_resample_get_info (convert->downsample, - &convert->down_n_lines, &convert->down_offset); - } else { - convert->down_n_lines = 1; - convert->down_offset = 0; - } - GST_DEBUG ("upsample: %p, site: %d, offset %d, n_lines %d", convert->upsample, - in_info->chroma_site, convert->up_offset, convert->up_n_lines); - GST_DEBUG ("downsample: %p, site: %d, offset %d, n_lines %d", - convert->downsample, out_info->chroma_site, convert->down_offset, - convert->down_n_lines); - - alloc_tmplines (convert, convert->down_n_lines + convert->up_n_lines, width); - - return TRUE; -} - -#define TO_16(x) (((x)<<8) | (x)) - -static void -convert_to16 (gpointer line, gint width) -{ - guint8 *line8 = line; - guint16 *line16 = line; - gint i; - - for (i = (width - 1) * 4; i >= 0; i--) - line16[i] = TO_16 (line8[i]); -} - -static void -convert_to8 (gpointer line, gint width) -{ - guint8 *line8 = line; - guint16 *line16 = line; - gint i; - - for (i = 0; i < width * 4; i++) - line8[i] = line16[i] >> 8; -} - -#define UNPACK_FRAME(frame,dest,line,width) \ - frame->info.finfo->unpack_func (frame->info.finfo, \ - (GST_VIDEO_FRAME_IS_INTERLACED (frame) ? \ - GST_VIDEO_PACK_FLAG_INTERLACED : \ - GST_VIDEO_PACK_FLAG_NONE), \ - dest, frame->data, frame->info.stride, 0, \ - line, width) -#define PACK_FRAME(frame,dest,line,width) \ - frame->info.finfo->pack_func (frame->info.finfo, \ - (GST_VIDEO_FRAME_IS_INTERLACED (frame) ? \ - GST_VIDEO_PACK_FLAG_INTERLACED : \ - GST_VIDEO_PACK_FLAG_NONE), \ - dest, 0, frame->data, frame->info.stride, \ - frame->info.chroma_site, line, width); - -static void -videoconvert_convert_generic (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - int j, k; - gint width, height, lines, max_lines; - guint in_bits, out_bits; - gconstpointer pal; - gsize palsize; - guint up_n_lines, down_n_lines; - gint up_offset, down_offset; - gint in_lines, out_lines; - gint up_line, down_line; - gint start_offset, stop_offset; - gpointer in_tmplines[8]; - gpointer out_tmplines[8]; - - height = convert->height; - width = convert->width; - - in_bits = convert->in_bits; - out_bits = convert->out_bits; - - lines = convert->lines; - up_n_lines = convert->up_n_lines; - up_offset = convert->up_offset; - down_n_lines = convert->down_n_lines; - down_offset = convert->down_offset; - max_lines = convert->n_tmplines; - - in_lines = 0; - out_lines = 0; - - GST_DEBUG ("up_offset %d, up_n_lines %u", up_offset, up_n_lines); - - start_offset = MIN (up_offset, down_offset); - stop_offset = height + start_offset + MAX (up_n_lines, down_n_lines); - - for (; start_offset < stop_offset; start_offset++) { - guint idx, start; - - idx = CLAMP (start_offset, 0, height); - in_tmplines[in_lines] = convert->tmplines[idx % max_lines]; - out_tmplines[out_lines] = in_tmplines[in_lines]; - GST_DEBUG ("start_offset %d/%d, %d, idx %u, in %d, out %d", start_offset, - stop_offset, up_offset, idx, in_lines, out_lines); - - up_line = up_offset + in_lines; - - /* extract the next line */ - if (up_line >= 0 && up_line < height) { - GST_DEBUG ("unpack line %d into %d", up_line, in_lines); - UNPACK_FRAME (src, in_tmplines[in_lines], up_line, width); - } - - if (start_offset >= up_offset) - in_lines++; - - if (start_offset >= down_offset) - out_lines++; - - if (in_lines < up_n_lines) - continue; - - in_lines = 0; - - /* we have enough lines to upsample */ - if (convert->upsample) { - GST_DEBUG ("doing upsample"); - gst_video_chroma_resample (convert->upsample, in_tmplines, width); - } - - /* convert upsampled lines */ - for (k = 0; k < up_n_lines; k++) { - down_line = up_offset + k; - - /* only takes lines with valid output */ - if (down_line < 0 || down_line >= height) - continue; - - GST_DEBUG ("handle line %d, %d/%d, down_line %d", k, out_lines, - down_n_lines, down_line); - - if (out_bits == 16 || in_bits == 16) { - /* FIXME, we can scale in the conversion matrix */ - if (in_bits == 8) - convert_to16 (in_tmplines[k], width); - - if (convert->matrix) - convert->matrix (convert, in_tmplines[k]); - if (convert->dither16) - convert->dither16 (convert, in_tmplines[k], down_line); - - if (out_bits == 8) - convert_to8 (in_tmplines[k], width); - } else { - if (convert->matrix) - convert->matrix (convert, in_tmplines[k]); - } - } - - start = 0; - while (out_lines >= down_n_lines) { - if (convert->downsample) { - GST_DEBUG ("doing downsample %u", start); - gst_video_chroma_resample (convert->downsample, - &out_tmplines[start], width); - } - - for (j = 0; j < down_n_lines; j += lines) { - idx = down_offset + j; - - if (idx < height) { - GST_DEBUG ("packing line %d %d %d", j + start, down_offset, idx); - /* FIXME, not correct if lines > 1 */ - PACK_FRAME (dest, out_tmplines[j + start], idx, width); - } - } - down_offset += down_n_lines; - start += down_n_lines; - out_lines -= down_n_lines; - } - /* we didn't process these lines, move them up for the next round */ - for (j = 0; j < out_lines; j++) { - GST_DEBUG ("move line %d->%d", j + start, j); - out_tmplines[j] = out_tmplines[j + start]; - } - - up_offset += up_n_lines; - } - if ((pal = - gst_video_format_get_palette (GST_VIDEO_FRAME_FORMAT (dest), - &palsize))) { - memcpy (GST_VIDEO_FRAME_PLANE_DATA (dest, 1), pal, palsize); - } -} - -#define FRAME_GET_PLANE_STRIDE(frame, plane) \ - GST_VIDEO_FRAME_PLANE_STRIDE (frame, plane) -#define FRAME_GET_PLANE_LINE(frame, plane, line) \ - (gpointer)(((guint8*)(GST_VIDEO_FRAME_PLANE_DATA (frame, plane))) + \ - FRAME_GET_PLANE_STRIDE (frame, plane) * (line)) - -#define FRAME_GET_COMP_STRIDE(frame, comp) \ - GST_VIDEO_FRAME_COMP_STRIDE (frame, comp) -#define FRAME_GET_COMP_LINE(frame, comp, line) \ - (gpointer)(((guint8*)(GST_VIDEO_FRAME_COMP_DATA (frame, comp))) + \ - FRAME_GET_COMP_STRIDE (frame, comp) * (line)) - -#define FRAME_GET_STRIDE(frame) FRAME_GET_PLANE_STRIDE (frame, 0) -#define FRAME_GET_LINE(frame,line) FRAME_GET_PLANE_LINE (frame, 0, line) - -#define FRAME_GET_Y_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_Y, line) -#define FRAME_GET_U_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_U, line) -#define FRAME_GET_V_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_V, line) -#define FRAME_GET_A_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_A, line) - -#define FRAME_GET_Y_STRIDE(frame) FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_Y) -#define FRAME_GET_U_STRIDE(frame) FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_U) -#define FRAME_GET_V_STRIDE(frame) FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_V) -#define FRAME_GET_A_STRIDE(frame) FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_A) - -/* Fast paths */ - -#define GET_LINE_OFFSETS(interlaced,line,l1,l2) \ - if (interlaced) { \ - l1 = (line & 2 ? line - 1 : line); \ - l2 = l1 + 2; \ - } else { \ - l1 = line; \ - l2 = l1 + 1; \ - } - - -static void -convert_I420_YUY2 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - int i; - gint width = convert->width; - gint height = convert->height; - gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src); - gint l1, l2; - - for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) { - GET_LINE_OFFSETS (interlaced, i, l1, l2); - - videomixer_video_convert_orc_convert_I420_YUY2 (FRAME_GET_LINE (dest, l1), - FRAME_GET_LINE (dest, l2), - FRAME_GET_Y_LINE (src, l1), - FRAME_GET_Y_LINE (src, l2), - FRAME_GET_U_LINE (src, i >> 1), - FRAME_GET_V_LINE (src, i >> 1), (width + 1) / 2); - } - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_I420_UYVY (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - int i; - gint width = convert->width; - gint height = convert->height; - gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src); - gint l1, l2; - - for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) { - GET_LINE_OFFSETS (interlaced, i, l1, l2); - - videomixer_video_convert_orc_convert_I420_UYVY (FRAME_GET_LINE (dest, l1), - FRAME_GET_LINE (dest, l2), - FRAME_GET_Y_LINE (src, l1), - FRAME_GET_Y_LINE (src, l2), - FRAME_GET_U_LINE (src, i >> 1), - FRAME_GET_V_LINE (src, i >> 1), (width + 1) / 2); - } - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_I420_AYUV (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - int i; - gint width = convert->width; - gint height = convert->height; - gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src); - gint l1, l2; - - for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) { - GET_LINE_OFFSETS (interlaced, i, l1, l2); - - videomixer_video_convert_orc_convert_I420_AYUV (FRAME_GET_LINE (dest, l1), - FRAME_GET_LINE (dest, l2), - FRAME_GET_Y_LINE (src, l1), - FRAME_GET_Y_LINE (src, l2), - FRAME_GET_U_LINE (src, i >> 1), FRAME_GET_V_LINE (src, i >> 1), width); - } - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_I420_Y42B (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), width, height); - - videomixer_video_convert_orc_planar_chroma_420_422 (FRAME_GET_U_LINE (dest, - 0), 2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (dest, 1), - 2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), (width + 1) / 2, height / 2); - - videomixer_video_convert_orc_planar_chroma_420_422 (FRAME_GET_V_LINE (dest, - 0), 2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (dest, 1), - 2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), (width + 1) / 2, height / 2); -} - -static void -convert_I420_Y444 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), width, height); - - videomixer_video_convert_orc_planar_chroma_420_444 (FRAME_GET_U_LINE (dest, - 0), 2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (dest, 1), - 2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), (width + 1) / 2, height / 2); - - videomixer_video_convert_orc_planar_chroma_420_444 (FRAME_GET_V_LINE (dest, - 0), 2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (dest, 1), - 2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), (width + 1) / 2, height / 2); - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_YUY2_I420 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - int i; - gint width = convert->width; - gint height = convert->height; - gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src); - gint l1, l2; - - for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) { - GET_LINE_OFFSETS (interlaced, i, l1, l2); - - videomixer_video_convert_orc_convert_YUY2_I420 (FRAME_GET_Y_LINE (dest, l1), - FRAME_GET_Y_LINE (dest, l2), - FRAME_GET_U_LINE (dest, i >> 1), - FRAME_GET_V_LINE (dest, i >> 1), - FRAME_GET_LINE (src, l1), FRAME_GET_LINE (src, l2), (width + 1) / 2); - } - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_YUY2_AYUV (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_YUY2_AYUV (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_YUY2_Y42B (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_YUY2_Y42B (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), - FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0), - FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_YUY2_Y444 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_YUY2_Y444 (FRAME_GET_COMP_LINE (dest, 0, - 0), FRAME_GET_COMP_STRIDE (dest, 0), FRAME_GET_COMP_LINE (dest, 1, 0), - FRAME_GET_COMP_STRIDE (dest, 1), FRAME_GET_COMP_LINE (dest, 2, 0), - FRAME_GET_COMP_STRIDE (dest, 2), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, height); -} - - -static void -convert_UYVY_I420 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - int i; - gint width = convert->width; - gint height = convert->height; - gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src); - gint l1, l2; - - for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) { - GET_LINE_OFFSETS (interlaced, i, l1, l2); - - videomixer_video_convert_orc_convert_UYVY_I420 (FRAME_GET_COMP_LINE (dest, - 0, l1), FRAME_GET_COMP_LINE (dest, 0, l2), - FRAME_GET_COMP_LINE (dest, 1, i >> 1), FRAME_GET_COMP_LINE (dest, 2, - i >> 1), FRAME_GET_LINE (src, l1), FRAME_GET_LINE (src, l2), - (width + 1) / 2); - } - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_UYVY_AYUV (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_UYVY_AYUV (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_UYVY_YUY2 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_UYVY_YUY2 (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_UYVY_Y42B (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_UYVY_Y42B (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), - FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0), - FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_UYVY_Y444 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_UYVY_Y444 (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), - FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0), - FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_AYUV_I420 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - /* only for even width/height */ - videomixer_video_convert_orc_convert_AYUV_I420 (FRAME_GET_Y_LINE (dest, 0), - 2 * FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (dest, 1), - 2 * FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), - FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0), - FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0), - 2 * FRAME_GET_STRIDE (src), FRAME_GET_LINE (src, 1), - 2 * FRAME_GET_STRIDE (src), width / 2, height / 2); -} - -static void -convert_AYUV_YUY2 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - /* only for even width */ - videomixer_video_convert_orc_convert_AYUV_YUY2 (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), width / 2, height); -} - -static void -convert_AYUV_UYVY (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - /* only for even width */ - videomixer_video_convert_orc_convert_AYUV_UYVY (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), width / 2, height); -} - -static void -convert_AYUV_Y42B (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - /* only works for even width */ - videomixer_video_convert_orc_convert_AYUV_Y42B (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), - FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0), - FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), width / 2, height); -} - -static void -convert_AYUV_Y444 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_AYUV_Y444 (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), - FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0), - FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), width, height); -} - -static void -convert_Y42B_I420 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), width, height); - - videomixer_video_convert_orc_planar_chroma_422_420 (FRAME_GET_U_LINE (dest, - 0), FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0), - 2 * FRAME_GET_U_STRIDE (src), FRAME_GET_U_LINE (src, 1), - 2 * FRAME_GET_U_STRIDE (src), (width + 1) / 2, height / 2); - - videomixer_video_convert_orc_planar_chroma_422_420 (FRAME_GET_V_LINE (dest, - 0), FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0), - 2 * FRAME_GET_V_STRIDE (src), FRAME_GET_V_LINE (src, 1), - 2 * FRAME_GET_V_STRIDE (src), (width + 1) / 2, height / 2); - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_Y42B_Y444 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), width, height); - - videomixer_video_convert_orc_planar_chroma_422_444 (FRAME_GET_U_LINE (dest, - 0), FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), (width + 1) / 2, height); - - videomixer_video_convert_orc_planar_chroma_422_444 (FRAME_GET_V_LINE (dest, - 0), FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_Y42B_YUY2 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_Y42B_YUY2 (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_Y42B_UYVY (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_Y42B_UYVY (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), (width + 1) / 2, height); -} - -static void -convert_Y42B_AYUV (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - /* only for even width */ - videomixer_video_convert_orc_convert_Y42B_AYUV (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), width / 2, height); -} - -static void -convert_Y444_I420 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), width, height); - - videomixer_video_convert_orc_planar_chroma_444_420 (FRAME_GET_U_LINE (dest, - 0), FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0), - 2 * FRAME_GET_U_STRIDE (src), FRAME_GET_U_LINE (src, 1), - 2 * FRAME_GET_U_STRIDE (src), width / 2, height / 2); - - videomixer_video_convert_orc_planar_chroma_444_420 (FRAME_GET_V_LINE (dest, - 0), FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0), - 2 * FRAME_GET_V_STRIDE (src), FRAME_GET_V_LINE (src, 1), - 2 * FRAME_GET_V_STRIDE (src), width / 2, height / 2); - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } -} - -static void -convert_Y444_Y42B (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0), - FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), width, height); - - videomixer_video_convert_orc_planar_chroma_444_422 (FRAME_GET_U_LINE (dest, - 0), FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), width / 2, height); - - videomixer_video_convert_orc_planar_chroma_444_422 (FRAME_GET_V_LINE (dest, - 0), FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), width / 2, height); -} - -static void -convert_Y444_YUY2 (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_Y444_YUY2 (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), width / 2, height); -} - -static void -convert_Y444_UYVY (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_Y444_UYVY (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), width / 2, height); -} - -static void -convert_Y444_AYUV (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_Y444_AYUV (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0), - FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0), - FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0), - FRAME_GET_V_STRIDE (src), width, height); -} - -#if G_BYTE_ORDER == G_LITTLE_ENDIAN -static void -convert_AYUV_ARGB (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_AYUV_ARGB (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2], - convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2], - width, height); -} - -static void -convert_AYUV_BGRA (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_AYUV_BGRA (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2], - convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2], - width, height); -} - -static void -convert_AYUV_ABGR (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_AYUV_ABGR (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2], - convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2], - width, height); -} - -static void -convert_AYUV_RGBA (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - gint width = convert->width; - gint height = convert->height; - - videomixer_video_convert_orc_convert_AYUV_RGBA (FRAME_GET_LINE (dest, 0), - FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2], - convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2], - width, height); -} - -static void -convert_I420_BGRA (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src) -{ - int i; - gint width = convert->width; - gint height = convert->height; - - for (i = 0; i < height; i++) { - videomixer_video_convert_orc_convert_I420_BGRA (FRAME_GET_LINE (dest, i), - FRAME_GET_Y_LINE (src, i), - FRAME_GET_U_LINE (src, i >> 1), FRAME_GET_V_LINE (src, i >> 1), - convert->cmatrix[0][0], convert->cmatrix[0][2], - convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2], - width); - } -} -#endif - - - -/* Fast paths */ - -typedef struct -{ - GstVideoFormat in_format; - GstVideoColorMatrix in_matrix; - GstVideoFormat out_format; - GstVideoColorMatrix out_matrix; - gboolean keeps_color_matrix; - gboolean keeps_interlaced; - gboolean needs_color_matrix; - gint width_align, height_align; - void (*convert) (VideoConvert * convert, GstVideoFrame * dest, - const GstVideoFrame * src); -} VideoTransform; - -static const VideoTransform transforms[] = { - {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_I420_YUY2}, - {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_I420_UYVY}, - {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_I420_AYUV}, - {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0, - convert_I420_Y42B}, - {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0, - convert_I420_Y444}, - - {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_I420_YUY2}, - {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_I420_UYVY}, - {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_I420_AYUV}, - {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0, - convert_I420_Y42B}, - {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0, - convert_I420_Y444}, - - {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_YUY2_I420}, - {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_YUY2_I420}, - {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, convert_UYVY_YUY2}, /* alias */ - {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_YUY2_AYUV}, - {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_YUY2_Y42B}, - {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_YUY2_Y444}, - - {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_UYVY_I420}, - {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_UYVY_I420}, - {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_UYVY_YUY2}, - {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_UYVY_AYUV}, - {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_UYVY_Y42B}, - {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_UYVY_Y444}, - - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 1, - convert_AYUV_I420}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 1, - convert_AYUV_I420}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0, - convert_AYUV_YUY2}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0, - convert_AYUV_UYVY}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0, - convert_AYUV_Y42B}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_AYUV_Y444}, - - {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0, - convert_Y42B_I420}, - {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0, - convert_Y42B_I420}, - {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_Y42B_YUY2}, - {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_Y42B_UYVY}, - {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0, - convert_Y42B_AYUV}, - {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_Y42B_Y444}, - - {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 0, - convert_Y444_I420}, - {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 0, - convert_Y444_I420}, - {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0, - convert_Y444_YUY2}, - {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0, - convert_Y444_UYVY}, - {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, - convert_Y444_AYUV}, - {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0, - convert_Y444_Y42B}, - -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_ARGB, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, - convert_AYUV_ARGB}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRA, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, - convert_AYUV_BGRA}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_xRGB, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_ARGB}, /* alias */ - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRx, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_BGRA}, /* alias */ - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_ABGR, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, - convert_AYUV_ABGR}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_RGBA, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, - convert_AYUV_RGBA}, - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_xBGR, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_ABGR}, /* alias */ - {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_RGBx, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_RGBA}, /* alias */ - - {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRA, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0, - convert_I420_BGRA}, - {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRx, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0, - convert_I420_BGRA}, - {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRA, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0, - convert_I420_BGRA}, - {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRx, - GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0, - convert_I420_BGRA}, -#endif -}; - -static gboolean -videoconvert_convert_lookup_fastpath (VideoConvert * convert) -{ - int i; - GstVideoFormat in_format, out_format; - GstVideoColorMatrix in_matrix, out_matrix; - gboolean interlaced; - gint width, height; - - in_format = GST_VIDEO_INFO_FORMAT (&convert->in_info); - out_format = GST_VIDEO_INFO_FORMAT (&convert->out_info); - - width = GST_VIDEO_INFO_WIDTH (&convert->in_info); - height = GST_VIDEO_INFO_HEIGHT (&convert->in_info); - - in_matrix = convert->in_info.colorimetry.matrix; - out_matrix = convert->out_info.colorimetry.matrix; - - interlaced = GST_VIDEO_INFO_IS_INTERLACED (&convert->in_info); - interlaced |= GST_VIDEO_INFO_IS_INTERLACED (&convert->out_info); - - for (i = 0; i < sizeof (transforms) / sizeof (transforms[0]); i++) { - if (transforms[i].in_format == in_format && - transforms[i].out_format == out_format && - (transforms[i].keeps_color_matrix || - (transforms[i].in_matrix == in_matrix && - transforms[i].out_matrix == out_matrix)) && - (transforms[i].keeps_interlaced || !interlaced) && - (transforms[i].width_align & width) == 0 && - (transforms[i].height_align & height) == 0) { - GST_DEBUG ("using fastpath"); - if (transforms[i].needs_color_matrix) - if (!videoconvert_convert_compute_matrix (convert)) - goto no_convert; - convert->convert = transforms[i].convert; - alloc_tmplines (convert, 1, GST_VIDEO_INFO_WIDTH (&convert->in_info)); - return TRUE; - } - } - GST_DEBUG ("no fastpath found"); - return FALSE; - -no_convert: - { - GST_DEBUG ("can't create matrix"); - return FALSE; - } -} diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videoconvert.h gst-plugins-good1.0-1.6.1/gst/videomixer/videoconvert.h --- gst-plugins-good1.0-1.4.3/gst/videomixer/videoconvert.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videoconvert.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -/* Video conversion functions - * Copyright (C) 2010 David Schleef - * - * 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 __COLORSPACE_H__ -#define __COLORSPACE_H__ - -#include -#include "gstcms.h" - -G_BEGIN_DECLS - -typedef struct _VideoConvert VideoConvert; - -typedef enum { - DITHER_NONE, - DITHER_VERTERR, - DITHER_HALFTONE -} ColorSpaceDitherMethod; - -struct _VideoConvert { - GstVideoInfo in_info; - GstVideoInfo out_info; - - gint width; - gint height; - - gint in_bits; - gint out_bits; - gint cmatrix[4][4]; - - ColorSpaceDitherMethod dither; - - guint lines; - - guint n_tmplines; - gpointer *tmplines; - guint16 *errline; - - GstVideoChromaResample *upsample; - guint up_n_lines; - gint up_offset; - GstVideoChromaResample *downsample; - guint down_n_lines; - gint down_offset; - - void (*convert) (VideoConvert *convert, GstVideoFrame *dest, const GstVideoFrame *src); - void (*matrix) (VideoConvert *convert, gpointer pixels); - void (*dither16) (VideoConvert *convert, guint16 * pixels, int j); - -}; - -VideoConvert * videomixer_videoconvert_convert_new (GstVideoInfo *in_info, - GstVideoInfo *out_info); -void videomixer_videoconvert_convert_free (VideoConvert * convert); - -void videomixer_videoconvert_convert_set_dither (VideoConvert * convert, int type); - -void videomixer_videoconvert_convert_convert (VideoConvert * convert, - GstVideoFrame *dest, const GstVideoFrame *src); - - -G_END_DECLS - -#endif /* __GST_COLORSPACE_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videomixer2.c gst-plugins-good1.0-1.6.1/gst/videomixer/videomixer2.c --- gst-plugins-good1.0-1.4.3/gst/videomixer/videomixer2.c 2014-09-04 09:52:33.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videomixer2.c 2015-10-22 08:02:54.000000000 +0000 @@ -84,7 +84,6 @@ #include "videomixer2.h" #include "videomixer2pad.h" -#include "videoconvert.h" #ifdef DISABLE_ORC #define orc_memset memset @@ -435,7 +434,7 @@ continue; if (pad->convert) - videomixer_videoconvert_convert_free (pad->convert); + gst_video_converter_free (pad->convert); pad->convert = NULL; @@ -445,11 +444,15 @@ if (best_format != GST_VIDEO_INFO_FORMAT (&pad->info) || g_strcmp0 (colorimetry, best_colorimetry) || g_strcmp0 (chroma, best_chroma)) { + GstVideoInfo tmp_info = pad->info; + tmp_info.finfo = best_info.finfo; + tmp_info.chroma_site = best_info.chroma_site; + tmp_info.colorimetry = best_info.colorimetry; + GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d", GST_VIDEO_INFO_FORMAT (&pad->info), GST_VIDEO_INFO_FORMAT (&best_info)); - pad->convert = - videomixer_videoconvert_convert_new (&pad->info, &best_info); + pad->convert = gst_video_converter_new (&pad->info, &tmp_info, NULL); pad->need_conversion_update = TRUE; if (!pad->convert) { g_free (colorimetry); @@ -805,7 +808,7 @@ GST_OBJECT_LOCK (mix); mix->proportion = proportion; if (G_LIKELY (timestamp != GST_CLOCK_TIME_NONE)) { - if (G_UNLIKELY (diff > 0)) + if (!mix->live && G_UNLIKELY (diff > 0)) mix->earliest_time = timestamp + 2 * diff + gst_util_uint64_scale_int_round (GST_SECOND, GST_VIDEO_INFO_FPS_D (&mix->info), GST_VIDEO_INFO_FPS_N (&mix->info)); @@ -1140,8 +1143,7 @@ gst_video_frame_map (&converted_frame, &(pad->conversion_info), converted_buf, GST_MAP_READWRITE); - videomixer_videoconvert_convert_convert (pad->convert, &converted_frame, - &frame); + gst_video_converter_frame (pad->convert, &frame, &converted_frame); gst_video_frame_unmap (&frame); } else { converted_frame = frame; @@ -1432,87 +1434,6 @@ } static gboolean -gst_videomixer2_query_latency (GstVideoMixer2 * mix, GstQuery * query) -{ - GstClockTime min, max; - gboolean live; - gboolean res; - GstIterator *it; - gboolean done; - GValue item = { 0 }; - - res = TRUE; - done = FALSE; - live = FALSE; - min = 0; - max = GST_CLOCK_TIME_NONE; - - /* Take maximum of all latency values */ - it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (mix)); - while (!done) { - switch (gst_iterator_next (it, &item)) { - case GST_ITERATOR_DONE: - done = TRUE; - break; - case GST_ITERATOR_OK: - { - GstPad *pad = g_value_get_object (&item); - GstQuery *peerquery; - GstClockTime min_cur, max_cur; - gboolean live_cur; - - peerquery = gst_query_new_latency (); - - /* Ask peer for latency */ - res &= gst_pad_peer_query (pad, peerquery); - - /* take max from all valid return values */ - if (res) { - gst_query_parse_latency (peerquery, &live_cur, &min_cur, &max_cur); - - if (min_cur > min) - min = min_cur; - - if (max_cur != GST_CLOCK_TIME_NONE && - ((max != GST_CLOCK_TIME_NONE && max_cur > max) || - (max == GST_CLOCK_TIME_NONE))) - max = max_cur; - - live = live || live_cur; - } - - gst_query_unref (peerquery); - g_value_reset (&item); - break; - } - case GST_ITERATOR_RESYNC: - live = FALSE; - min = 0; - max = GST_CLOCK_TIME_NONE; - res = TRUE; - gst_iterator_resync (it); - break; - default: - res = FALSE; - done = TRUE; - break; - } - } - g_value_unset (&item); - gst_iterator_free (it); - - if (res) { - /* store the results */ - GST_DEBUG_OBJECT (mix, "Calculated total latency: live %s, min %" - GST_TIME_FORMAT ", max %" GST_TIME_FORMAT, - (live ? "yes" : "no"), GST_TIME_ARGS (min), GST_TIME_ARGS (max)); - gst_query_set_latency (query, live, min, max); - } - - return res; -} - -static gboolean gst_videomixer2_src_query (GstPad * pad, GstObject * parent, GstQuery * query) { GstVideoMixer2 *mix = GST_VIDEO_MIXER2 (parent); @@ -1540,9 +1461,6 @@ case GST_QUERY_DURATION: res = gst_videomixer2_query_duration (mix, query); break; - case GST_QUERY_LATENCY: - res = gst_videomixer2_query_latency (mix, query); - break; case GST_QUERY_CAPS: res = gst_pad_query_default (pad, parent, query); break; @@ -2132,7 +2050,7 @@ mixpad = GST_VIDEO_MIXER2_PAD (pad); if (mixpad->convert) - videomixer_videoconvert_convert_free (mixpad->convert); + gst_video_converter_free (mixpad->convert); mixpad->convert = NULL; mix->sinkpads = g_slist_remove (mix->sinkpads, pad); @@ -2181,7 +2099,7 @@ GstVideoMixer2Pad *mixpad = tmp->data; if (mixpad->convert) - videomixer_videoconvert_convert_free (mixpad->convert); + gst_video_converter_free (mixpad->convert); mixpad->convert = NULL; } diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videomixer2.h gst-plugins-good1.0-1.6.1/gst/videomixer/videomixer2.h --- gst-plugins-good1.0-1.4.3/gst/videomixer/videomixer2.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videomixer2.h 2015-10-22 08:02:54.000000000 +0000 @@ -116,6 +116,9 @@ gboolean send_stream_start; + /* latency */ + gboolean live; + GstTagList *pending_tags; }; diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videomixer2pad.h gst-plugins-good1.0-1.6.1/gst/videomixer/videomixer2pad.h --- gst-plugins-good1.0-1.4.3/gst/videomixer/videomixer2pad.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videomixer2pad.h 2015-10-22 08:02:54.000000000 +0000 @@ -26,8 +26,6 @@ #include -#include "videoconvert.h" - G_BEGIN_DECLS #define GST_TYPE_VIDEO_MIXER2_PAD (gst_videomixer2_pad_get_type()) @@ -69,7 +67,7 @@ GstVideoInfo conversion_info; /* Converter, if NULL no conversion is done */ - VideoConvert *convert; + GstVideoConverter *convert; gboolean need_conversion_update; }; diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videomixerorc-dist.c gst-plugins-good1.0-1.6.1/gst/videomixer/videomixerorc-dist.c --- gst-plugins-good1.0-1.4.3/gst/videomixer/videomixerorc-dist.c 2014-09-24 08:30:52.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videomixerorc-dist.c 2015-10-30 14:27:11.000000000 +0000 @@ -108,125 +108,6 @@ const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m); void video_mixer_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m); -void videomixer_video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n); -void videomixer_video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n); -void videomixer_video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n); -void videomixer_video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, - guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, int n); -void videomixer_video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_420_422 (guint8 * - ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_420_444 (guint8 * - ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_422_444 (guint8 * - ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_444_422 (guint8 * - ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_444_420 (guint8 * - ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_422_420 (guint8 * - ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void videomixer_video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, - guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, int n); -void videomixer_video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, guint8 * ORC_RESTRICT d4, - int d4_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, - const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, - const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, - int n); /* begin Orc C target preamble */ @@ -522,7 +403,7 @@ /* 6: mullw */ var41.i = (var40.i * var36.i) & 0xffff; /* 7: shlw */ - var42.i = var38.i << 8; + var42.i = ((orc_uint16) var38.i) << 8; /* 8: addw */ var43.i = var42.i + var41.i; /* 9: shruw */ @@ -579,7 +460,7 @@ /* 6: mullw */ var41.i = (var40.i * var36.i) & 0xffff; /* 7: shlw */ - var42.i = var38.i << 8; + var42.i = ((orc_uint16) var38.i) << 8; /* 8: addw */ var43.i = var42.i + var41.i; /* 9: shruw */ @@ -725,8 +606,9 @@ var43 = var42.i; /* 3: splatbl */ var44.i = - ((var43 & 0xff) << 24) | ((var43 & 0xff) << 16) | ((var43 & 0xff) << - 8) | (var43 & 0xff); + ((((orc_uint32) var43) & 0xff) << 24) | ((((orc_uint32) var43) & 0xff) + << 16) | ((((orc_uint32) var43) & 0xff) << 8) | (((orc_uint32) var43) + & 0xff); /* 4: convubw */ var45.x4[0] = (orc_uint8) var44.x4[0]; var45.x4[1] = (orc_uint8) var44.x4[1]; @@ -850,8 +732,9 @@ var43 = var42.i; /* 3: splatbl */ var44.i = - ((var43 & 0xff) << 24) | ((var43 & 0xff) << 16) | ((var43 & 0xff) << - 8) | (var43 & 0xff); + ((((orc_uint32) var43) & 0xff) << 24) | ((((orc_uint32) var43) & 0xff) + << 16) | ((((orc_uint32) var43) & 0xff) << 8) | (((orc_uint32) var43) + & 0xff); /* 4: convubw */ var45.x4[0] = (orc_uint8) var44.x4[0]; var45.x4[1] = (orc_uint8) var44.x4[1]; @@ -939,7 +822,7 @@ static const orc_uint8 bc[] = { 1, 7, 9, 26, 118, 105, 100, 101, 111, 95, 109, 105, 120, 101, 114, 95, 111, 114, 99, 95, 98, 108, 101, 110, 100, 95, 97, 114, 103, 98, 11, 4, - 4, 12, 4, 4, 14, 4, 255, 0, 0, 0, 14, 4, 8, 0, 0, 0, + 4, 12, 4, 4, 14, 4, 255, 0, 0, 0, 14, 2, 8, 0, 0, 0, 16, 2, 20, 4, 20, 2, 20, 1, 20, 4, 20, 8, 20, 8, 20, 8, 113, 32, 4, 163, 33, 32, 157, 34, 33, 152, 35, 34, 21, 2, 150, 38, 35, 21, 2, 89, 38, 38, 24, 21, 2, 95, 38, 38, 17, 21, 2, 150, @@ -957,7 +840,7 @@ orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 4, "s1"); orc_program_add_constant (p, 4, 0x000000ff, "c1"); - orc_program_add_constant (p, 4, 0x00000008, "c2"); + orc_program_add_constant (p, 2, 0x00000008, "c2"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 2, "t2"); @@ -1084,8 +967,9 @@ var45 = var44.i; /* 4: splatbl */ var46.i = - ((var45 & 0xff) << 24) | ((var45 & 0xff) << 16) | ((var45 & 0xff) << - 8) | (var45 & 0xff); + ((((orc_uint32) var45) & 0xff) << 24) | ((((orc_uint32) var45) & 0xff) + << 16) | ((((orc_uint32) var45) & 0xff) << 8) | (((orc_uint32) var45) + & 0xff); /* 5: convubw */ var47.x4[0] = (orc_uint8) var46.x4[0]; var47.x4[1] = (orc_uint8) var46.x4[1]; @@ -1212,8 +1096,9 @@ var45 = var44.i; /* 4: splatbl */ var46.i = - ((var45 & 0xff) << 24) | ((var45 & 0xff) << 16) | ((var45 & 0xff) << - 8) | (var45 & 0xff); + ((((orc_uint32) var45) & 0xff) << 24) | ((((orc_uint32) var45) & 0xff) + << 16) | ((((orc_uint32) var45) & 0xff) << 8) | (((orc_uint32) var45) + & 0xff); /* 5: convubw */ var47.x4[0] = (orc_uint8) var46.x4[0]; var47.x4[1] = (orc_uint8) var46.x4[1]; @@ -1302,7 +1187,7 @@ 1, 7, 9, 26, 118, 105, 100, 101, 111, 95, 109, 105, 120, 101, 114, 95, 111, 114, 99, 95, 98, 108, 101, 110, 100, 95, 98, 103, 114, 97, 11, 4, 4, 12, 4, 4, 14, 4, 0, 0, 0, 255, 14, 4, 24, 0, 0, 0, - 14, 4, 8, 0, 0, 0, 16, 2, 20, 4, 20, 4, 20, 2, 20, 1, + 14, 2, 8, 0, 0, 0, 16, 2, 20, 4, 20, 4, 20, 2, 20, 1, 20, 4, 20, 8, 20, 8, 20, 8, 113, 32, 4, 126, 33, 32, 17, 163, 34, 33, 157, 35, 34, 152, 36, 35, 21, 2, 150, 39, 36, 21, 2, 89, 39, 39, 24, 21, 2, 95, 39, 39, 18, 21, 2, 150, 38, 32, 113, 32, @@ -1321,7 +1206,7 @@ orc_program_add_source (p, 4, "s1"); orc_program_add_constant (p, 4, 0xff000000, "c1"); orc_program_add_constant (p, 4, 0x00000018, "c2"); - orc_program_add_constant (p, 4, 0x00000008, "c3"); + orc_program_add_constant (p, 2, 0x00000008, "c3"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 4, "t2"); @@ -1470,8 +1355,9 @@ var46 = var45.i; /* 3: splatbl */ var47.i = - ((var46 & 0xff) << 24) | ((var46 & 0xff) << 16) | ((var46 & 0xff) << - 8) | (var46 & 0xff); + ((((orc_uint32) var46) & 0xff) << 24) | ((((orc_uint32) var46) & 0xff) + << 16) | ((((orc_uint32) var46) & 0xff) << 8) | (((orc_uint32) var46) + & 0xff); /* 4: convubw */ var48.x4[0] = (orc_uint8) var47.x4[0]; var48.x4[1] = (orc_uint8) var47.x4[1]; @@ -1515,8 +1401,9 @@ var58 = var57.i; /* 16: splatbl */ var59.i = - ((var58 & 0xff) << 24) | ((var58 & 0xff) << 16) | ((var58 & 0xff) << - 8) | (var58 & 0xff); + ((((orc_uint32) var58) & 0xff) << 24) | ((((orc_uint32) var58) & 0xff) + << 16) | ((((orc_uint32) var58) & 0xff) << 8) | (((orc_uint32) var58) + & 0xff); /* 17: convubw */ var60.x4[0] = (orc_uint8) var59.x4[0]; var60.x4[1] = (orc_uint8) var59.x4[1]; @@ -1676,8 +1563,9 @@ var46 = var45.i; /* 3: splatbl */ var47.i = - ((var46 & 0xff) << 24) | ((var46 & 0xff) << 16) | ((var46 & 0xff) << - 8) | (var46 & 0xff); + ((((orc_uint32) var46) & 0xff) << 24) | ((((orc_uint32) var46) & 0xff) + << 16) | ((((orc_uint32) var46) & 0xff) << 8) | (((orc_uint32) var46) + & 0xff); /* 4: convubw */ var48.x4[0] = (orc_uint8) var47.x4[0]; var48.x4[1] = (orc_uint8) var47.x4[1]; @@ -1721,8 +1609,9 @@ var58 = var57.i; /* 16: splatbl */ var59.i = - ((var58 & 0xff) << 24) | ((var58 & 0xff) << 16) | ((var58 & 0xff) << - 8) | (var58 & 0xff); + ((((orc_uint32) var58) & 0xff) << 24) | ((((orc_uint32) var58) & 0xff) + << 16) | ((((orc_uint32) var58) & 0xff) << 8) | (((orc_uint32) var58) + & 0xff); /* 17: convubw */ var60.x4[0] = (orc_uint8) var59.x4[0]; var60.x4[1] = (orc_uint8) var59.x4[1]; @@ -1824,9 +1713,9 @@ static const orc_uint8 bc[] = { 1, 7, 9, 28, 118, 105, 100, 101, 111, 95, 109, 105, 120, 101, 114, 95, 111, 114, 99, 95, 111, 118, 101, 114, 108, 97, 121, 95, 97, 114, 103, - 98, + 98, 11, 4, 4, 12, 4, 4, 14, 4, 255, 255, 255, 255, 14, 4, 255, 0, - 0, 0, 14, 4, 0, 255, 255, 255, 14, 4, 8, 0, 0, 0, 16, 2, + 0, 0, 14, 4, 0, 255, 255, 255, 14, 2, 8, 0, 0, 0, 16, 2, 20, 4, 20, 2, 20, 1, 20, 8, 20, 8, 20, 8, 20, 4, 20, 8, 20, 8, 113, 32, 4, 163, 33, 32, 157, 34, 33, 152, 38, 34, 21, 2, 150, 35, 38, 21, 2, 89, 35, 35, 24, 21, 2, 95, 35, 35, 19, 21, @@ -1850,7 +1739,7 @@ orc_program_add_constant (p, 4, 0xffffffff, "c1"); orc_program_add_constant (p, 4, 0x000000ff, "c2"); orc_program_add_constant (p, 4, 0xffffff00, "c3"); - orc_program_add_constant (p, 4, 0x00000008, "c4"); + orc_program_add_constant (p, 2, 0x00000008, "c4"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 2, "t2"); @@ -2028,8 +1917,9 @@ var48 = var47.i; /* 4: splatbl */ var49.i = - ((var48 & 0xff) << 24) | ((var48 & 0xff) << 16) | ((var48 & 0xff) << - 8) | (var48 & 0xff); + ((((orc_uint32) var48) & 0xff) << 24) | ((((orc_uint32) var48) & 0xff) + << 16) | ((((orc_uint32) var48) & 0xff) << 8) | (((orc_uint32) var48) + & 0xff); /* 5: convubw */ var50.x4[0] = (orc_uint8) var49.x4[0]; var50.x4[1] = (orc_uint8) var49.x4[1]; @@ -2075,8 +1965,9 @@ var61 = var60.i; /* 18: splatbl */ var62.i = - ((var61 & 0xff) << 24) | ((var61 & 0xff) << 16) | ((var61 & 0xff) << - 8) | (var61 & 0xff); + ((((orc_uint32) var61) & 0xff) << 24) | ((((orc_uint32) var61) & 0xff) + << 16) | ((((orc_uint32) var61) & 0xff) << 8) | (((orc_uint32) var61) + & 0xff); /* 19: convubw */ var63.x4[0] = (orc_uint8) var62.x4[0]; var63.x4[1] = (orc_uint8) var62.x4[1]; @@ -2240,8 +2131,9 @@ var48 = var47.i; /* 4: splatbl */ var49.i = - ((var48 & 0xff) << 24) | ((var48 & 0xff) << 16) | ((var48 & 0xff) << - 8) | (var48 & 0xff); + ((((orc_uint32) var48) & 0xff) << 24) | ((((orc_uint32) var48) & 0xff) + << 16) | ((((orc_uint32) var48) & 0xff) << 8) | (((orc_uint32) var48) + & 0xff); /* 5: convubw */ var50.x4[0] = (orc_uint8) var49.x4[0]; var50.x4[1] = (orc_uint8) var49.x4[1]; @@ -2287,8 +2179,9 @@ var61 = var60.i; /* 18: splatbl */ var62.i = - ((var61 & 0xff) << 24) | ((var61 & 0xff) << 16) | ((var61 & 0xff) << - 8) | (var61 & 0xff); + ((((orc_uint32) var61) & 0xff) << 24) | ((((orc_uint32) var61) & 0xff) + << 16) | ((((orc_uint32) var61) & 0xff) << 8) | (((orc_uint32) var61) + & 0xff); /* 19: convubw */ var63.x4[0] = (orc_uint8) var62.x4[0]; var63.x4[1] = (orc_uint8) var62.x4[1]; @@ -2390,9 +2283,9 @@ static const orc_uint8 bc[] = { 1, 7, 9, 28, 118, 105, 100, 101, 111, 95, 109, 105, 120, 101, 114, 95, 111, 114, 99, 95, 111, 118, 101, 114, 108, 97, 121, 95, 98, 103, 114, - 97, + 97, 11, 4, 4, 12, 4, 4, 14, 4, 255, 255, 255, 255, 14, 4, 0, 0, - 0, 255, 14, 4, 255, 255, 255, 0, 14, 4, 24, 0, 0, 0, 14, 4, + 0, 255, 14, 4, 255, 255, 255, 0, 14, 4, 24, 0, 0, 0, 14, 2, 8, 0, 0, 0, 16, 2, 20, 4, 20, 4, 20, 2, 20, 1, 20, 8, 20, 8, 20, 8, 20, 4, 20, 8, 20, 8, 113, 32, 4, 126, 33, 32, 19, 163, 34, 33, 157, 35, 34, 152, 39, 35, 21, 2, 150, 36, 39, 21, @@ -2418,7 +2311,7 @@ orc_program_add_constant (p, 4, 0xff000000, "c2"); orc_program_add_constant (p, 4, 0x00ffffff, "c3"); orc_program_add_constant (p, 4, 0x00000018, "c4"); - orc_program_add_constant (p, 4, 0x00000008, "c5"); + orc_program_add_constant (p, 2, 0x00000008, "c5"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 4, "t2"); @@ -2517,8849 +2410,5 @@ func = c->exec; func (ex); -} -#endif - - -/* videomixer_video_convert_orc_memcpy_2d */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_int8 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var32; - orc_int8 var33; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var32 = ptr4[i]; - /* 1: copyb */ - var33 = var32; - /* 2: storeb */ - ptr0[i] = var33; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_memcpy_2d (OrcExecutor * ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_int8 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var32; - orc_int8 var33; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var32 = ptr4[i]; - /* 1: copyb */ - var33 = var32; - /* 2: storeb */ - ptr0[i] = var33; - } - } - -} - -void -videomixer_video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 38, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 109, 101, 109, 99, 112, 121, 95, 50, 100, 11, 1, 1, 12, 1, 1, - 42, 0, 4, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_memcpy_2d); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, "videomixer_video_convert_orc_memcpy_2d"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_memcpy_2d); - orc_program_add_destination (p, 1, "d1"); - orc_program_add_source (p, 1, "s1"); - - orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_I420_UYVY */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n) -{ - int i; - orc_union32 *ORC_RESTRICT ptr0; - orc_union32 *ORC_RESTRICT ptr1; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - orc_union32 var38; - orc_union16 var39; - - ptr0 = (orc_union32 *) d1; - ptr1 = (orc_union32 *) d2; - ptr4 = (orc_union16 *) s1; - ptr5 = (orc_union16 *) s2; - ptr6 = (orc_int8 *) s3; - ptr7 = (orc_int8 *) s4; - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr6[i]; - /* 1: loadb */ - var34 = ptr7[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var39.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[0]; - _dest.x2[1] = var35.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[1]; - _dest.x2[1] = var35.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - /* 6: loadw */ - var37 = ptr5[i]; - /* 7: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[0]; - _dest.x2[1] = var37.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[1]; - _dest.x2[1] = var37.x2[1]; - var38.x2[1] = _dest.i; - } - /* 8: storel */ - ptr1[i] = var38; - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_I420_UYVY (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int n = ex->n; - orc_union32 *ORC_RESTRICT ptr0; - orc_union32 *ORC_RESTRICT ptr1; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - orc_union32 var38; - orc_union16 var39; - - ptr0 = (orc_union32 *) ex->arrays[0]; - ptr1 = (orc_union32 *) ex->arrays[1]; - ptr4 = (orc_union16 *) ex->arrays[4]; - ptr5 = (orc_union16 *) ex->arrays[5]; - ptr6 = (orc_int8 *) ex->arrays[6]; - ptr7 = (orc_int8 *) ex->arrays[7]; - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr6[i]; - /* 1: loadb */ - var34 = ptr7[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var39.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[0]; - _dest.x2[1] = var35.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[1]; - _dest.x2[1] = var35.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - /* 6: loadw */ - var37 = ptr5[i]; - /* 7: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[0]; - _dest.x2[1] = var37.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var39.x2[1]; - _dest.x2[1] = var37.x2[1]; - var38.x2[1] = _dest.i; - } - /* 8: storel */ - ptr1[i] = var38; - } - -} - -void -videomixer_video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, - 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, 99, - 95, - 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50, 48, 95, 85, 89, 86, - 89, 11, 4, 4, 11, 4, 4, 12, 2, 2, 12, 2, 2, 12, 1, 1, - 12, 1, 1, 20, 2, 196, 32, 6, 7, 21, 1, 196, 0, 32, 4, 21, - 1, 196, 1, 32, 5, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_UYVY); -#else - p = orc_program_new (); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_I420_UYVY"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_UYVY); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_destination (p, 4, "d2"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 2, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_source (p, 1, "s4"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_S2, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ex->arrays[ORC_VAR_D1] = d1; - ex->arrays[ORC_VAR_D2] = d2; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->arrays[ORC_VAR_S4] = (void *) s4; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_I420_YUY2 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n) -{ - int i; - orc_union32 *ORC_RESTRICT ptr0; - orc_union32 *ORC_RESTRICT ptr1; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - orc_union32 var38; - orc_union16 var39; - - ptr0 = (orc_union32 *) d1; - ptr1 = (orc_union32 *) d2; - ptr4 = (orc_union16 *) s1; - ptr5 = (orc_union16 *) s2; - ptr6 = (orc_int8 *) s3; - ptr7 = (orc_int8 *) s4; - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr6[i]; - /* 1: loadb */ - var34 = ptr7[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var39.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[0]; - _dest.x2[1] = var39.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[1]; - _dest.x2[1] = var39.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - /* 6: loadw */ - var37 = ptr5[i]; - /* 7: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var39.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var39.x2[1]; - var38.x2[1] = _dest.i; - } - /* 8: storel */ - ptr1[i] = var38; - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_I420_YUY2 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int n = ex->n; - orc_union32 *ORC_RESTRICT ptr0; - orc_union32 *ORC_RESTRICT ptr1; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - orc_union32 var38; - orc_union16 var39; - - ptr0 = (orc_union32 *) ex->arrays[0]; - ptr1 = (orc_union32 *) ex->arrays[1]; - ptr4 = (orc_union16 *) ex->arrays[4]; - ptr5 = (orc_union16 *) ex->arrays[5]; - ptr6 = (orc_int8 *) ex->arrays[6]; - ptr7 = (orc_int8 *) ex->arrays[7]; - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr6[i]; - /* 1: loadb */ - var34 = ptr7[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var39.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[0]; - _dest.x2[1] = var39.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[1]; - _dest.x2[1] = var39.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - /* 6: loadw */ - var37 = ptr5[i]; - /* 7: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var39.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var39.x2[1]; - var38.x2[1] = _dest.i; - } - /* 8: storel */ - ptr1[i] = var38; - } - -} - -void -videomixer_video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, - 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, 99, - 95, - 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50, 48, 95, 89, 85, 89, - 50, 11, 4, 4, 11, 4, 4, 12, 2, 2, 12, 2, 2, 12, 1, 1, - 12, 1, 1, 20, 2, 196, 32, 6, 7, 21, 1, 196, 0, 4, 32, 21, - 1, 196, 1, 5, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_YUY2); -#else - p = orc_program_new (); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_I420_YUY2"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_YUY2); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_destination (p, 4, "d2"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 2, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_source (p, 1, "s4"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D2, ORC_VAR_S2, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ex->arrays[ORC_VAR_D1] = d1; - ex->arrays[ORC_VAR_D2] = d2; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->arrays[ORC_VAR_S4] = (void *) s4; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_I420_AYUV */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n) -{ - int i; - orc_union32 *ORC_RESTRICT ptr0; - orc_union32 *ORC_RESTRICT ptr1; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var36; -#else - orc_int8 var36; -#endif - orc_int8 var37; - orc_union32 var38; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var39; -#else - orc_int8 var39; -#endif - orc_int8 var40; - orc_union32 var41; - orc_int8 var42; - orc_int8 var43; - orc_union16 var44; - orc_union16 var45; - orc_union16 var46; - - ptr0 = (orc_union32 *) d1; - ptr1 = (orc_union32 *) d2; - ptr4 = (orc_int8 *) s1; - ptr5 = (orc_int8 *) s2; - ptr6 = (orc_int8 *) s3; - ptr7 = (orc_int8 *) s4; - - /* 3: loadpb */ - var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - /* 8: loadpb */ - var39 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadupdb */ - var42 = ptr6[i >> 1]; - /* 1: loadupdb */ - var43 = ptr7[i >> 1]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var42; - _dest.x2[1] = var43; - var44.i = _dest.i; - } - /* 4: loadb */ - var37 = ptr4[i]; - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36; - _dest.x2[1] = var37; - var45.i = _dest.i; - } - /* 6: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var45.i; - _dest.x2[1] = var44.i; - var38.i = _dest.i; - } - /* 7: storel */ - ptr0[i] = var38; - /* 9: loadb */ - var40 = ptr5[i]; - /* 10: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var39; - _dest.x2[1] = var40; - var46.i = _dest.i; - } - /* 11: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var46.i; - _dest.x2[1] = var44.i; - var41.i = _dest.i; - } - /* 12: storel */ - ptr1[i] = var41; - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_I420_AYUV (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int n = ex->n; - orc_union32 *ORC_RESTRICT ptr0; - orc_union32 *ORC_RESTRICT ptr1; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var36; -#else - orc_int8 var36; -#endif - orc_int8 var37; - orc_union32 var38; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var39; -#else - orc_int8 var39; -#endif - orc_int8 var40; - orc_union32 var41; - orc_int8 var42; - orc_int8 var43; - orc_union16 var44; - orc_union16 var45; - orc_union16 var46; - - ptr0 = (orc_union32 *) ex->arrays[0]; - ptr1 = (orc_union32 *) ex->arrays[1]; - ptr4 = (orc_int8 *) ex->arrays[4]; - ptr5 = (orc_int8 *) ex->arrays[5]; - ptr6 = (orc_int8 *) ex->arrays[6]; - ptr7 = (orc_int8 *) ex->arrays[7]; - - /* 3: loadpb */ - var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - /* 8: loadpb */ - var39 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadupdb */ - var42 = ptr6[i >> 1]; - /* 1: loadupdb */ - var43 = ptr7[i >> 1]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var42; - _dest.x2[1] = var43; - var44.i = _dest.i; - } - /* 4: loadb */ - var37 = ptr4[i]; - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36; - _dest.x2[1] = var37; - var45.i = _dest.i; - } - /* 6: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var45.i; - _dest.x2[1] = var44.i; - var38.i = _dest.i; - } - /* 7: storel */ - ptr0[i] = var38; - /* 9: loadb */ - var40 = ptr5[i]; - /* 10: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var39; - _dest.x2[1] = var40; - var46.i = _dest.i; - } - /* 11: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var46.i; - _dest.x2[1] = var44.i; - var41.i = _dest.i; - } - /* 12: storel */ - ptr1[i] = var41; - } - -} - -void -videomixer_video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, - const guint8 * ORC_RESTRICT s4, int n) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, - 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, 99, - 95, - 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50, 48, 95, 65, 89, 85, - 86, 11, 4, 4, 11, 4, 4, 12, 1, 1, 12, 1, 1, 12, 1, 1, - 12, 1, 1, 14, 1, 255, 0, 0, 0, 20, 2, 20, 2, 20, 1, 20, - 1, 45, 34, 6, 45, 35, 7, 196, 32, 34, 35, 196, 33, 16, 4, 195, - 0, 33, 32, 196, 33, 16, 5, 195, 1, 33, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_AYUV); -#else - p = orc_program_new (); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_I420_AYUV"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_AYUV); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_destination (p, 4, "d2"); - orc_program_add_source (p, 1, "s1"); - orc_program_add_source (p, 1, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_source (p, 1, "s4"); - orc_program_add_constant (p, 1, 0x000000ff, "c1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 1, "t3"); - orc_program_add_temporary (p, 1, "t4"); - - orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T3, ORC_VAR_S3, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T4, ORC_VAR_S4, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_S2, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ex->arrays[ORC_VAR_D1] = d1; - ex->arrays[ORC_VAR_D2] = d2; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->arrays[ORC_VAR_S4] = (void *) s4; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_YUY2_I420 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, - guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, int n) -{ - int i; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - orc_int8 *ORC_RESTRICT ptr3; - const orc_union32 *ORC_RESTRICT ptr4; - const orc_union32 *ORC_RESTRICT ptr5; - orc_union32 var35; - orc_union32 var36; - orc_int8 var37; - orc_int8 var38; - orc_union16 var39; - orc_union16 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - ptr0 = (orc_union16 *) d1; - ptr1 = (orc_union16 *) d2; - ptr2 = (orc_int8 *) d3; - ptr3 = (orc_int8 *) d4; - ptr4 = (orc_union32 *) s1; - ptr5 = (orc_union32 *) s2; - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var40; - /* 3: loadl */ - var36 = ptr5[i]; - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var41.x2[0] = _src.x2[1]; - var42.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var41.x2[1] = _src.x2[1]; - var42.x2[1] = _src.x2[0]; - } - /* 5: storew */ - ptr1[i] = var42; - /* 6: avgub */ - var43.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var41.x2[0] + 1) >> 1; - var43.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var41.x2[1] + 1) >> 1; - /* 7: splitwb */ - { - orc_union16 _src; - _src.i = var43.i; - var37 = _src.x2[1]; - var38 = _src.x2[0]; - } - /* 8: storeb */ - ptr3[i] = var37; - /* 9: storeb */ - ptr2[i] = var38; - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_YUY2_I420 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int n = ex->n; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - orc_int8 *ORC_RESTRICT ptr3; - const orc_union32 *ORC_RESTRICT ptr4; - const orc_union32 *ORC_RESTRICT ptr5; - orc_union32 var35; - orc_union32 var36; - orc_int8 var37; - orc_int8 var38; - orc_union16 var39; - orc_union16 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - ptr0 = (orc_union16 *) ex->arrays[0]; - ptr1 = (orc_union16 *) ex->arrays[1]; - ptr2 = (orc_int8 *) ex->arrays[2]; - ptr3 = (orc_int8 *) ex->arrays[3]; - ptr4 = (orc_union32 *) ex->arrays[4]; - ptr5 = (orc_union32 *) ex->arrays[5]; - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var40; - /* 3: loadl */ - var36 = ptr5[i]; - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var41.x2[0] = _src.x2[1]; - var42.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var41.x2[1] = _src.x2[1]; - var42.x2[1] = _src.x2[0]; - } - /* 5: storew */ - ptr1[i] = var42; - /* 6: avgub */ - var43.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var41.x2[0] + 1) >> 1; - var43.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var41.x2[1] + 1) >> 1; - /* 7: splitwb */ - { - orc_union16 _src; - _src.i = var43.i; - var37 = _src.x2[1]; - var38 = _src.x2[0]; - } - /* 8: storeb */ - ptr3[i] = var37; - /* 9: storeb */ - ptr2[i] = var38; - } - -} - -void -videomixer_video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, - guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, int n) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, - 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, 99, - 95, - 99, 111, 110, 118, 101, 114, 116, 95, 89, 85, 89, 50, 95, 73, 52, 50, - 48, 11, 2, 2, 11, 2, 2, 11, 1, 1, 11, 1, 1, 12, 4, 4, - 12, 4, 4, 20, 2, 20, 2, 20, 2, 21, 1, 199, 32, 34, 4, 97, - 0, 34, 21, 1, 199, 33, 34, 5, 97, 1, 34, 21, 1, 39, 32, 32, - 33, 199, 3, 2, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_I420); -#else - p = orc_program_new (); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_YUY2_I420"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_I420); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 2, "d2"); - orc_program_add_destination (p, 1, "d3"); - orc_program_add_destination (p, 1, "d4"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_source (p, 4, "s2"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 2, "t3"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_S2, - ORC_VAR_D1); - orc_program_append_2 (p, "storew", 0, ORC_VAR_D2, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D4, ORC_VAR_D3, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ex->arrays[ORC_VAR_D1] = d1; - ex->arrays[ORC_VAR_D2] = d2; - ex->arrays[ORC_VAR_D3] = d3; - ex->arrays[ORC_VAR_D4] = d4; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->arrays[ORC_VAR_S2] = (void *) s2; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_UYVY_YUY2 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var32; - orc_union32 var33; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var32 = ptr4[i]; - /* 1: swapw */ - var33.x2[0] = ORC_SWAP_W (var32.x2[0]); - var33.x2[1] = ORC_SWAP_W (var32.x2[1]); - /* 2: storel */ - ptr0[i] = var33; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_UYVY_YUY2 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var32; - orc_union32 var33; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var32 = ptr4[i]; - /* 1: swapw */ - var33.x2[0] = ORC_SWAP_W (var32.x2[0]); - var33.x2[1] = ORC_SWAP_W (var32.x2[1]); - /* 2: storel */ - ptr0[i] = var33; - } - } - -} - -void -videomixer_video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89, 86, 89, 95, 89, 85, - 89, 50, 11, 4, 4, 12, 4, 4, 21, 1, 183, 0, 4, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_YUY2); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_UYVY_YUY2"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_YUY2); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 4, "s1"); - - orc_program_append_2 (p, "swapw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_planar_chroma_420_422 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_planar_chroma_420_422 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_int8 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var32; - orc_int8 var33; - orc_int8 var34; - orc_int8 var35; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var32 = ptr4[i]; - /* 1: copyb */ - var33 = var32; - /* 2: storeb */ - ptr0[i] = var33; - /* 3: loadb */ - var34 = ptr4[i]; - /* 4: copyb */ - var35 = var34; - /* 5: storeb */ - ptr1[i] = var35; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_planar_chroma_420_422 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_int8 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var32; - orc_int8 var33; - orc_int8 var34; - orc_int8 var35; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var32 = ptr4[i]; - /* 1: copyb */ - var33 = var32; - /* 2: storeb */ - ptr0[i] = var33; - /* 3: loadb */ - var34 = ptr4[i]; - /* 4: copyb */ - var35 = var34; - /* 5: storeb */ - ptr1[i] = var35; - } - } - -} - -void -videomixer_video_convert_orc_planar_chroma_420_422 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 50, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114, 111, 109, 97, 95, 52, - 50, 48, 95, 52, 50, 50, 11, 1, 1, 11, 1, 1, 12, 1, 1, 42, - 0, 4, 42, 1, 4, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_420_422); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_planar_chroma_420_422"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_420_422); - orc_program_add_destination (p, 1, "d1"); - orc_program_add_destination (p, 1, "d2"); - orc_program_add_source (p, 1, "s1"); - - orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "copyb", 0, ORC_VAR_D2, ORC_VAR_S1, ORC_VAR_D1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_planar_chroma_420_444 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_planar_chroma_420_444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var33; - orc_union16 var34; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr4[i]; - /* 1: splatbw */ - var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff); - /* 2: storew */ - ptr0[i] = var34; - /* 3: storew */ - ptr1[i] = var34; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_planar_chroma_420_444 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var33; - orc_union16 var34; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr4[i]; - /* 1: splatbw */ - var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff); - /* 2: storew */ - ptr0[i] = var34; - /* 3: storew */ - ptr1[i] = var34; - } - } - -} - -void -videomixer_video_convert_orc_planar_chroma_420_444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 50, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114, 111, 109, 97, 95, 52, - 50, 48, 95, 52, 52, 52, 11, 2, 2, 11, 2, 2, 12, 1, 1, 20, - 2, 151, 32, 4, 97, 0, 32, 97, 1, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_420_444); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_planar_chroma_420_444"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_420_444); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 2, "d2"); - orc_program_add_source (p, 1, "s1"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "storew", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_D1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_planar_chroma_422_444 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_planar_chroma_422_444 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var33; - orc_union16 var34; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr4[i]; - /* 1: splatbw */ - var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff); - /* 2: storew */ - ptr0[i] = var34; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_planar_chroma_422_444 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var33; - orc_union16 var34; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr4[i]; - /* 1: splatbw */ - var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff); - /* 2: storew */ - ptr0[i] = var34; - } - } - -} - -void -videomixer_video_convert_orc_planar_chroma_422_444 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 50, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114, 111, 109, 97, 95, 52, - 50, 50, 95, 52, 52, 52, 11, 2, 2, 12, 1, 1, 20, 2, 151, 32, - 4, 97, 0, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_422_444); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_planar_chroma_422_444"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_422_444); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_source (p, 1, "s1"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_planar_chroma_444_422 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_planar_chroma_444_422 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_int8 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - orc_union16 var34; - orc_int8 var35; - orc_int8 var36; - orc_int8 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var34 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var34.i; - var36 = _src.x2[1]; - var37 = _src.x2[0]; - } - /* 2: avgub */ - var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1; - /* 3: storeb */ - ptr0[i] = var35; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_planar_chroma_444_422 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_int8 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - orc_union16 var34; - orc_int8 var35; - orc_int8 var36; - orc_int8 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var34 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var34.i; - var36 = _src.x2[1]; - var37 = _src.x2[0]; - } - /* 2: avgub */ - var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1; - /* 3: storeb */ - ptr0[i] = var35; - } - } - -} - -void -videomixer_video_convert_orc_planar_chroma_444_422 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 50, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114, 111, 109, 97, 95, 52, - 52, 52, 95, 52, 50, 50, 11, 1, 1, 12, 2, 2, 20, 1, 20, 1, - 199, 32, 33, 4, 39, 0, 32, 33, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_444_422); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_planar_chroma_444_422"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_444_422); - orc_program_add_destination (p, 1, "d1"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_temporary (p, 1, "t1"); - orc_program_add_temporary (p, 1, "t2"); - - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_planar_chroma_444_420 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_planar_chroma_444_420 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m) -{ - int i; - int j; - orc_int8 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - orc_union16 var35; - orc_union16 var36; - orc_int8 var37; - orc_union16 var38; - orc_int8 var39; - orc_int8 var40; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var35 = ptr4[i]; - /* 1: loadw */ - var36 = ptr5[i]; - /* 2: avgub */ - var38.x2[0] = - ((orc_uint8) var35.x2[0] + (orc_uint8) var36.x2[0] + 1) >> 1; - var38.x2[1] = - ((orc_uint8) var35.x2[1] + (orc_uint8) var36.x2[1] + 1) >> 1; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var38.i; - var39 = _src.x2[1]; - var40 = _src.x2[0]; - } - /* 4: avgub */ - var37 = ((orc_uint8) var39 + (orc_uint8) var40 + 1) >> 1; - /* 5: storeb */ - ptr0[i] = var37; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_planar_chroma_444_420 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_int8 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - orc_union16 var35; - orc_union16 var36; - orc_int8 var37; - orc_union16 var38; - orc_int8 var39; - orc_int8 var40; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var35 = ptr4[i]; - /* 1: loadw */ - var36 = ptr5[i]; - /* 2: avgub */ - var38.x2[0] = - ((orc_uint8) var35.x2[0] + (orc_uint8) var36.x2[0] + 1) >> 1; - var38.x2[1] = - ((orc_uint8) var35.x2[1] + (orc_uint8) var36.x2[1] + 1) >> 1; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var38.i; - var39 = _src.x2[1]; - var40 = _src.x2[0]; - } - /* 4: avgub */ - var37 = ((orc_uint8) var39 + (orc_uint8) var40 + 1) >> 1; - /* 5: storeb */ - ptr0[i] = var37; - } - } - -} - -void -videomixer_video_convert_orc_planar_chroma_444_420 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 50, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114, 111, 109, 97, 95, 52, - 52, 52, 95, 52, 50, 48, 11, 1, 1, 12, 2, 2, 12, 2, 2, 20, - 2, 20, 1, 20, 1, 21, 1, 39, 32, 4, 5, 199, 33, 34, 32, 39, - 0, 33, 34, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_444_420); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_planar_chroma_444_420"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_444_420); - orc_program_add_destination (p, 1, "d1"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 2, "s2"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 1, "t2"); - orc_program_add_temporary (p, 1, "t3"); - - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T3, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_planar_chroma_422_420 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_planar_chroma_422_420 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m) -{ - int i; - int j; - orc_int8 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - orc_int8 var32; - orc_int8 var33; - orc_int8 var34; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var32 = ptr4[i]; - /* 1: loadb */ - var33 = ptr5[i]; - /* 2: avgub */ - var34 = ((orc_uint8) var32 + (orc_uint8) var33 + 1) >> 1; - /* 3: storeb */ - ptr0[i] = var34; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_planar_chroma_422_420 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_int8 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - orc_int8 var32; - orc_int8 var33; - orc_int8 var34; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var32 = ptr4[i]; - /* 1: loadb */ - var33 = ptr5[i]; - /* 2: avgub */ - var34 = ((orc_uint8) var32 + (orc_uint8) var33 + 1) >> 1; - /* 3: storeb */ - ptr0[i] = var34; - } - } - -} - -void -videomixer_video_convert_orc_planar_chroma_422_420 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 50, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114, 111, 109, 97, 95, 52, - 50, 50, 95, 52, 50, 48, 11, 1, 1, 12, 1, 1, 12, 1, 1, 39, - 0, 4, 5, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_422_420); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_planar_chroma_422_420"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_planar_chroma_422_420); - orc_program_add_destination (p, 1, "d1"); - orc_program_add_source (p, 1, "s1"); - orc_program_add_source (p, 1, "s2"); - - orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_YUY2_AYUV */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_union64 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var36; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union16 var37; -#else - orc_union16 var37; -#endif - orc_union64 var38; - orc_union16 var39; - orc_union16 var40; - orc_union32 var41; - orc_union32 var42; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - /* 2: loadpb */ - var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var36 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 3: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var40.x2[0]; - var41.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var40.x2[1]; - var41.x2[1] = _dest.i; - } - /* 4: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var39.i; - _dest.x2[1] = var39.i; - var42.i = _dest.i; - } - /* 5: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[0]; - _dest.x2[1] = var42.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[1]; - _dest.x2[1] = var42.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storeq */ - ptr0[i] = var38; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_YUY2_AYUV (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union64 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var36; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union16 var37; -#else - orc_union16 var37; -#endif - orc_union64 var38; - orc_union16 var39; - orc_union16 var40; - orc_union32 var41; - orc_union32 var42; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - /* 2: loadpb */ - var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var36 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 3: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var40.x2[0]; - var41.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var40.x2[1]; - var41.x2[1] = _dest.i; - } - /* 4: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var39.i; - _dest.x2[1] = var39.i; - var42.i = _dest.i; - } - /* 5: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[0]; - _dest.x2[1] = var42.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[1]; - _dest.x2[1] = var42.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storeq */ - ptr0[i] = var38; - } - } - -} - -void -videomixer_video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 85, 89, 50, 95, 65, 89, - 85, 86, 11, 8, 8, 12, 4, 4, 14, 2, 255, 0, 0, 0, 20, 2, - 20, 2, 20, 4, 20, 4, 21, 1, 199, 33, 32, 4, 21, 1, 196, 34, - 16, 32, 195, 35, 33, 33, 21, 1, 195, 0, 34, 35, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_AYUV); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_YUY2_AYUV"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_AYUV); - orc_program_add_destination (p, 8, "d1"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_constant (p, 2, 0x000000ff, "c1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 4, "t3"); - orc_program_add_temporary (p, 4, "t4"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_UYVY_AYUV */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_union64 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var36; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union16 var37; -#else - orc_union16 var37; -#endif - orc_union64 var38; - orc_union16 var39; - orc_union16 var40; - orc_union32 var41; - orc_union32 var42; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - /* 2: loadpb */ - var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var36 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 3: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var39.x2[0]; - var41.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var39.x2[1]; - var41.x2[1] = _dest.i; - } - /* 4: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var40.i; - _dest.x2[1] = var40.i; - var42.i = _dest.i; - } - /* 5: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[0]; - _dest.x2[1] = var42.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[1]; - _dest.x2[1] = var42.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storeq */ - ptr0[i] = var38; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_UYVY_AYUV (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union64 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var36; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union16 var37; -#else - orc_union16 var37; -#endif - orc_union64 var38; - orc_union16 var39; - orc_union16 var40; - orc_union32 var41; - orc_union32 var42; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - /* 2: loadpb */ - var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var36 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 3: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var39.x2[0]; - var41.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var39.x2[1]; - var41.x2[1] = _dest.i; - } - /* 4: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var40.i; - _dest.x2[1] = var40.i; - var42.i = _dest.i; - } - /* 5: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[0]; - _dest.x2[1] = var42.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union32 _dest; - _dest.x2[0] = var41.x2[1]; - _dest.x2[1] = var42.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storeq */ - ptr0[i] = var38; - } - } - -} - -void -videomixer_video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89, 86, 89, 95, 65, 89, - 85, 86, 11, 8, 8, 12, 4, 4, 14, 2, 255, 0, 0, 0, 20, 2, - 20, 2, 20, 4, 20, 4, 21, 1, 199, 32, 33, 4, 21, 1, 196, 34, - 16, 32, 195, 35, 33, 33, 21, 1, 195, 0, 34, 35, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_AYUV); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_UYVY_AYUV"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_AYUV); - orc_program_add_destination (p, 8, "d1"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_constant (p, 2, 0x000000ff, "c1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 4, "t3"); - orc_program_add_temporary (p, 4, "t4"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_YUY2_Y42B */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var33; - orc_union16 var34; - orc_int8 var35; - orc_int8 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var33 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var33.x2[0]; - var37.x2[0] = _src.x2[1]; - var34.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var33.x2[1]; - var37.x2[1] = _src.x2[1]; - var34.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var34; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var37.i; - var35 = _src.x2[1]; - var36 = _src.x2[0]; - } - /* 4: storeb */ - ptr2[i] = var35; - /* 5: storeb */ - ptr1[i] = var36; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_YUY2_Y42B (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var33; - orc_union16 var34; - orc_int8 var35; - orc_int8 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var33 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var33.x2[0]; - var37.x2[0] = _src.x2[1]; - var34.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var33.x2[1]; - var37.x2[1] = _src.x2[1]; - var34.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var34; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var37.i; - var35 = _src.x2[1]; - var36 = _src.x2[0]; - } - /* 4: storeb */ - ptr2[i] = var35; - /* 5: storeb */ - ptr1[i] = var36; - } - } - -} - -void -videomixer_video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 85, 89, 50, 95, 89, 52, - 50, 66, 11, 2, 2, 11, 1, 1, 11, 1, 1, 12, 4, 4, 20, 2, - 21, 1, 199, 32, 0, 4, 199, 2, 1, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_Y42B); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_YUY2_Y42B"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_Y42B); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 1, "d2"); - orc_program_add_destination (p, 1, "d3"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_D3] = d3; - ex->params[ORC_VAR_D3] = d3_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_UYVY_Y42B */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var33; - orc_union16 var34; - orc_int8 var35; - orc_int8 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var33 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var33.x2[0]; - var34.x2[0] = _src.x2[1]; - var37.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var33.x2[1]; - var34.x2[1] = _src.x2[1]; - var37.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var34; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var37.i; - var35 = _src.x2[1]; - var36 = _src.x2[0]; - } - /* 4: storeb */ - ptr2[i] = var35; - /* 5: storeb */ - ptr1[i] = var36; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_UYVY_Y42B (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var33; - orc_union16 var34; - orc_int8 var35; - orc_int8 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var33 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var33.x2[0]; - var34.x2[0] = _src.x2[1]; - var37.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var33.x2[1]; - var34.x2[1] = _src.x2[1]; - var37.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var34; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var37.i; - var35 = _src.x2[1]; - var36 = _src.x2[0]; - } - /* 4: storeb */ - ptr2[i] = var35; - /* 5: storeb */ - ptr1[i] = var36; - } - } - -} - -void -videomixer_video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89, 86, 89, 95, 89, 52, - 50, 66, 11, 2, 2, 11, 1, 1, 11, 1, 1, 12, 4, 4, 20, 2, - 21, 1, 199, 0, 32, 4, 199, 2, 1, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_Y42B); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_UYVY_Y42B"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_Y42B); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 1, "d2"); - orc_program_add_destination (p, 1, "d3"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_D3] = d3; - ex->params[ORC_VAR_D3] = d3_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_YUY2_Y444 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_union16 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var35; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union16 var39; - orc_int8 var40; - orc_int8 var41; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var39.x2[0] = _src.x2[1]; - var36.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var39.x2[1] = _src.x2[1]; - var36.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var36; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var39.i; - var40 = _src.x2[1]; - var41 = _src.x2[0]; - } - /* 4: splatbw */ - var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff); - /* 5: storew */ - ptr1[i] = var37; - /* 6: splatbw */ - var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff); - /* 7: storew */ - ptr2[i] = var38; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_YUY2_Y444 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_union16 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var35; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union16 var39; - orc_int8 var40; - orc_int8 var41; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var39.x2[0] = _src.x2[1]; - var36.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var39.x2[1] = _src.x2[1]; - var36.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var36; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var39.i; - var40 = _src.x2[1]; - var41 = _src.x2[0]; - } - /* 4: splatbw */ - var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff); - /* 5: storew */ - ptr1[i] = var37; - /* 6: splatbw */ - var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff); - /* 7: storew */ - ptr2[i] = var38; - } - } - -} - -void -videomixer_video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 85, 89, 50, 95, 89, 52, - 52, 52, 11, 2, 2, 11, 2, 2, 11, 2, 2, 12, 4, 4, 20, 2, - 20, 1, 20, 1, 21, 1, 199, 32, 0, 4, 199, 34, 33, 32, 151, 1, - 33, 151, 2, 34, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_Y444); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_YUY2_Y444"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_YUY2_Y444); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 2, "d2"); - orc_program_add_destination (p, 2, "d3"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 1, "t2"); - orc_program_add_temporary (p, 1, "t3"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D3, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_D3] = d3; - ex->params[ORC_VAR_D3] = d3_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_UYVY_Y444 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_union16 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var35; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union16 var39; - orc_int8 var40; - orc_int8 var41; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var36.x2[0] = _src.x2[1]; - var39.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var36.x2[1] = _src.x2[1]; - var39.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var36; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var39.i; - var40 = _src.x2[1]; - var41 = _src.x2[0]; - } - /* 4: splatbw */ - var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff); - /* 5: storew */ - ptr1[i] = var37; - /* 6: splatbw */ - var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff); - /* 7: storew */ - ptr2[i] = var38; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_UYVY_Y444 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_union16 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var35; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union16 var39; - orc_int8 var40; - orc_int8 var41; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var36.x2[0] = _src.x2[1]; - var39.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var36.x2[1] = _src.x2[1]; - var39.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var36; - /* 3: splitwb */ - { - orc_union16 _src; - _src.i = var39.i; - var40 = _src.x2[1]; - var41 = _src.x2[0]; - } - /* 4: splatbw */ - var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff); - /* 5: storew */ - ptr1[i] = var37; - /* 6: splatbw */ - var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff); - /* 7: storew */ - ptr2[i] = var38; - } - } - -} - -void -videomixer_video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89, 86, 89, 95, 89, 52, - 52, 52, 11, 2, 2, 11, 2, 2, 11, 2, 2, 12, 4, 4, 20, 2, - 20, 1, 20, 1, 21, 1, 199, 0, 32, 4, 199, 34, 33, 32, 151, 1, - 33, 151, 2, 34, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_Y444); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_UYVY_Y444"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_Y444); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 2, "d2"); - orc_program_add_destination (p, 2, "d3"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 1, "t2"); - orc_program_add_temporary (p, 1, "t3"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D3, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_D3] = d3; - ex->params[ORC_VAR_D3] = d3_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_UYVY_I420 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, - guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, int n) -{ - int i; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - orc_int8 *ORC_RESTRICT ptr3; - const orc_union32 *ORC_RESTRICT ptr4; - const orc_union32 *ORC_RESTRICT ptr5; - orc_union32 var35; - orc_union32 var36; - orc_int8 var37; - orc_int8 var38; - orc_union16 var39; - orc_union16 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - ptr0 = (orc_union16 *) d1; - ptr1 = (orc_union16 *) d2; - ptr2 = (orc_int8 *) d3; - ptr3 = (orc_int8 *) d4; - ptr4 = (orc_union32 *) s1; - ptr5 = (orc_union32 *) s2; - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var39; - /* 3: loadl */ - var36 = ptr5[i]; - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var41.x2[0] = _src.x2[1]; - var42.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var41.x2[1] = _src.x2[1]; - var42.x2[1] = _src.x2[0]; - } - /* 5: storew */ - ptr1[i] = var41; - /* 6: avgub */ - var43.x2[0] = ((orc_uint8) var40.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = ((orc_uint8) var40.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 7: splitwb */ - { - orc_union16 _src; - _src.i = var43.i; - var37 = _src.x2[1]; - var38 = _src.x2[0]; - } - /* 8: storeb */ - ptr3[i] = var37; - /* 9: storeb */ - ptr2[i] = var38; - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_UYVY_I420 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int n = ex->n; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - orc_int8 *ORC_RESTRICT ptr3; - const orc_union32 *ORC_RESTRICT ptr4; - const orc_union32 *ORC_RESTRICT ptr5; - orc_union32 var35; - orc_union32 var36; - orc_int8 var37; - orc_int8 var38; - orc_union16 var39; - orc_union16 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - ptr0 = (orc_union16 *) ex->arrays[0]; - ptr1 = (orc_union16 *) ex->arrays[1]; - ptr2 = (orc_int8 *) ex->arrays[2]; - ptr3 = (orc_int8 *) ex->arrays[3]; - ptr4 = (orc_union32 *) ex->arrays[4]; - ptr5 = (orc_union32 *) ex->arrays[5]; - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var35 = ptr4[i]; - /* 1: splitwb */ - { - orc_union16 _src; - _src.i = var35.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var35.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: storew */ - ptr0[i] = var39; - /* 3: loadl */ - var36 = ptr5[i]; - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var36.x2[0]; - var41.x2[0] = _src.x2[1]; - var42.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var36.x2[1]; - var41.x2[1] = _src.x2[1]; - var42.x2[1] = _src.x2[0]; - } - /* 5: storew */ - ptr1[i] = var41; - /* 6: avgub */ - var43.x2[0] = ((orc_uint8) var40.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = ((orc_uint8) var40.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 7: splitwb */ - { - orc_union16 _src; - _src.i = var43.i; - var37 = _src.x2[1]; - var38 = _src.x2[0]; - } - /* 8: storeb */ - ptr3[i] = var37; - /* 9: storeb */ - ptr2[i] = var38; - } - -} - -void -videomixer_video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1, - guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, - guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, - const guint8 * ORC_RESTRICT s2, int n) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, - 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, 99, - 95, - 99, 111, 110, 118, 101, 114, 116, 95, 85, 89, 86, 89, 95, 73, 52, 50, - 48, 11, 2, 2, 11, 2, 2, 11, 1, 1, 11, 1, 1, 12, 4, 4, - 12, 4, 4, 20, 2, 20, 2, 20, 2, 21, 1, 199, 34, 32, 4, 97, - 0, 34, 21, 1, 199, 34, 33, 5, 97, 1, 34, 21, 1, 39, 32, 32, - 33, 199, 3, 2, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_I420); -#else - p = orc_program_new (); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_UYVY_I420"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_UYVY_I420); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 2, "d2"); - orc_program_add_destination (p, 1, "d3"); - orc_program_add_destination (p, 1, "d4"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_source (p, 4, "s2"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 2, "t3"); - - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_S2, - ORC_VAR_D1); - orc_program_append_2 (p, "storew", 0, ORC_VAR_D2, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D4, ORC_VAR_D3, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ex->arrays[ORC_VAR_D1] = d1; - ex->arrays[ORC_VAR_D2] = d2; - ex->arrays[ORC_VAR_D3] = d3; - ex->arrays[ORC_VAR_D4] = d4; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->arrays[ORC_VAR_S2] = (void *) s2; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_I420 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, guint8 * ORC_RESTRICT d4, - int d4_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - orc_int8 *ORC_RESTRICT ptr3; - const orc_union64 *ORC_RESTRICT ptr4; - const orc_union64 *ORC_RESTRICT ptr5; - orc_union64 var40; - orc_union16 var41; - orc_union64 var42; - orc_union16 var43; - orc_int8 var44; - orc_int8 var45; - orc_union32 var46; - orc_union32 var47; - orc_union32 var48; - orc_union32 var49; - orc_union32 var50; - orc_union16 var51; - orc_union16 var52; - orc_int8 var53; - orc_int8 var54; - orc_int8 var55; - orc_int8 var56; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j); - ptr3 = ORC_PTR_OFFSET (d4, d4_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var40 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var40.x2[0]; - var46.x2[0] = _src.x2[1]; - var47.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var40.x2[1]; - var46.x2[1] = _src.x2[1]; - var47.x2[1] = _src.x2[0]; - } - /* 2: select1wb */ - { - orc_union16 _src; - _src.i = var47.x2[0]; - var41.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var47.x2[1]; - var41.x2[1] = _src.x2[1]; - } - /* 3: storew */ - ptr0[i] = var41; - /* 4: loadq */ - var42 = ptr5[i]; - /* 5: splitlw */ - { - orc_union32 _src; - _src.i = var42.x2[0]; - var48.x2[0] = _src.x2[1]; - var49.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var42.x2[1]; - var48.x2[1] = _src.x2[1]; - var49.x2[1] = _src.x2[0]; - } - /* 6: select1wb */ - { - orc_union16 _src; - _src.i = var49.x2[0]; - var43.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var49.x2[1]; - var43.x2[1] = _src.x2[1]; - } - /* 7: storew */ - ptr1[i] = var43; - /* 8: avgub */ - var50.x4[0] = - ((orc_uint8) var46.x4[0] + (orc_uint8) var48.x4[0] + 1) >> 1; - var50.x4[1] = - ((orc_uint8) var46.x4[1] + (orc_uint8) var48.x4[1] + 1) >> 1; - var50.x4[2] = - ((orc_uint8) var46.x4[2] + (orc_uint8) var48.x4[2] + 1) >> 1; - var50.x4[3] = - ((orc_uint8) var46.x4[3] + (orc_uint8) var48.x4[3] + 1) >> 1; - /* 9: splitwb */ - { - orc_union16 _src; - _src.i = var50.x2[0]; - var51.x2[0] = _src.x2[1]; - var52.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var50.x2[1]; - var51.x2[1] = _src.x2[1]; - var52.x2[1] = _src.x2[0]; - } - /* 10: splitwb */ - { - orc_union16 _src; - _src.i = var52.i; - var53 = _src.x2[1]; - var54 = _src.x2[0]; - } - /* 11: avgub */ - var44 = ((orc_uint8) var53 + (orc_uint8) var54 + 1) >> 1; - /* 12: storeb */ - ptr2[i] = var44; - /* 13: splitwb */ - { - orc_union16 _src; - _src.i = var51.i; - var55 = _src.x2[1]; - var56 = _src.x2[0]; - } - /* 14: avgub */ - var45 = ((orc_uint8) var55 + (orc_uint8) var56 + 1) >> 1; - /* 15: storeb */ - ptr3[i] = var45; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_I420 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - orc_union16 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - orc_int8 *ORC_RESTRICT ptr3; - const orc_union64 *ORC_RESTRICT ptr4; - const orc_union64 *ORC_RESTRICT ptr5; - orc_union64 var40; - orc_union16 var41; - orc_union64 var42; - orc_union16 var43; - orc_int8 var44; - orc_int8 var45; - orc_union32 var46; - orc_union32 var47; - orc_union32 var48; - orc_union32 var49; - orc_union32 var50; - orc_union16 var51; - orc_union16 var52; - orc_int8 var53; - orc_int8 var54; - orc_int8 var55; - orc_int8 var56; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j); - ptr3 = ORC_PTR_OFFSET (ex->arrays[3], ex->params[3] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var40 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var40.x2[0]; - var46.x2[0] = _src.x2[1]; - var47.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var40.x2[1]; - var46.x2[1] = _src.x2[1]; - var47.x2[1] = _src.x2[0]; - } - /* 2: select1wb */ - { - orc_union16 _src; - _src.i = var47.x2[0]; - var41.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var47.x2[1]; - var41.x2[1] = _src.x2[1]; - } - /* 3: storew */ - ptr0[i] = var41; - /* 4: loadq */ - var42 = ptr5[i]; - /* 5: splitlw */ - { - orc_union32 _src; - _src.i = var42.x2[0]; - var48.x2[0] = _src.x2[1]; - var49.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var42.x2[1]; - var48.x2[1] = _src.x2[1]; - var49.x2[1] = _src.x2[0]; - } - /* 6: select1wb */ - { - orc_union16 _src; - _src.i = var49.x2[0]; - var43.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var49.x2[1]; - var43.x2[1] = _src.x2[1]; - } - /* 7: storew */ - ptr1[i] = var43; - /* 8: avgub */ - var50.x4[0] = - ((orc_uint8) var46.x4[0] + (orc_uint8) var48.x4[0] + 1) >> 1; - var50.x4[1] = - ((orc_uint8) var46.x4[1] + (orc_uint8) var48.x4[1] + 1) >> 1; - var50.x4[2] = - ((orc_uint8) var46.x4[2] + (orc_uint8) var48.x4[2] + 1) >> 1; - var50.x4[3] = - ((orc_uint8) var46.x4[3] + (orc_uint8) var48.x4[3] + 1) >> 1; - /* 9: splitwb */ - { - orc_union16 _src; - _src.i = var50.x2[0]; - var51.x2[0] = _src.x2[1]; - var52.x2[0] = _src.x2[0]; - } - { - orc_union16 _src; - _src.i = var50.x2[1]; - var51.x2[1] = _src.x2[1]; - var52.x2[1] = _src.x2[0]; - } - /* 10: splitwb */ - { - orc_union16 _src; - _src.i = var52.i; - var53 = _src.x2[1]; - var54 = _src.x2[0]; - } - /* 11: avgub */ - var44 = ((orc_uint8) var53 + (orc_uint8) var54 + 1) >> 1; - /* 12: storeb */ - ptr2[i] = var44; - /* 13: splitwb */ - { - orc_union16 _src; - _src.i = var51.i; - var55 = _src.x2[1]; - var56 = _src.x2[0]; - } - /* 14: avgub */ - var45 = ((orc_uint8) var55 + (orc_uint8) var56 + 1) >> 1; - /* 15: storeb */ - ptr3[i] = var45; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, guint8 * ORC_RESTRICT d4, - int d4_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 73, 52, - 50, 48, 11, 2, 2, 11, 2, 2, 11, 1, 1, 11, 1, 1, 12, 8, - 8, 12, 8, 8, 20, 4, 20, 4, 20, 4, 20, 4, 20, 2, 20, 2, - 20, 1, 20, 1, 21, 1, 198, 33, 32, 4, 21, 1, 189, 0, 32, 21, - 1, 198, 34, 32, 5, 21, 1, 189, 1, 32, 21, 2, 39, 35, 33, 34, - 21, 1, 199, 37, 36, 35, 199, 38, 39, 36, 39, 2, 38, 39, 199, 38, - 39, 37, 39, 3, 38, 39, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_I420); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_I420"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_I420); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 2, "d2"); - orc_program_add_destination (p, 1, "d3"); - orc_program_add_destination (p, 1, "d4"); - orc_program_add_source (p, 8, "s1"); - orc_program_add_source (p, 8, "s2"); - orc_program_add_temporary (p, 4, "t1"); - orc_program_add_temporary (p, 4, "t2"); - orc_program_add_temporary (p, 4, "t3"); - orc_program_add_temporary (p, 4, "t4"); - orc_program_add_temporary (p, 2, "t5"); - orc_program_add_temporary (p, 2, "t6"); - orc_program_add_temporary (p, 1, "t7"); - orc_program_add_temporary (p, 1, "t8"); - - orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "select1wb", 1, ORC_VAR_D1, ORC_VAR_T1, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S2, - ORC_VAR_D1); - orc_program_append_2 (p, "select1wb", 1, ORC_VAR_D2, ORC_VAR_T1, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 2, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T3, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 0, ORC_VAR_D3, ORC_VAR_T7, ORC_VAR_T8, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_T6, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 0, ORC_VAR_D4, ORC_VAR_T7, ORC_VAR_T8, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_D3] = d3; - ex->params[ORC_VAR_D3] = d3_stride; - ex->arrays[ORC_VAR_D4] = d4; - ex->params[ORC_VAR_D4] = d4_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_YUY2 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union64 *ORC_RESTRICT ptr4; - orc_union64 var37; - orc_union32 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - orc_union16 var44; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var37 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var37.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var37.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: splitlw */ - { - orc_union32 _src; - _src.i = var39.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 3: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 4: select1wb */ - { - orc_union16 _src; - _src.i = var40.x2[0]; - var44.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var40.x2[1]; - var44.x2[1] = _src.x2[1]; - } - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var44.x2[0]; - _dest.x2[1] = var43.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var44.x2[1]; - _dest.x2[1] = var43.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storel */ - ptr0[i] = var38; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_YUY2 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union64 *ORC_RESTRICT ptr4; - orc_union64 var37; - orc_union32 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - orc_union16 var44; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var37 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var37.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var37.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: splitlw */ - { - orc_union32 _src; - _src.i = var39.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 3: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 4: select1wb */ - { - orc_union16 _src; - _src.i = var40.x2[0]; - var44.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var40.x2[1]; - var44.x2[1] = _src.x2[1]; - } - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var44.x2[0]; - _dest.x2[1] = var43.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var44.x2[1]; - _dest.x2[1] = var43.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storel */ - ptr0[i] = var38; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 89, 85, - 89, 50, 11, 4, 4, 12, 8, 8, 20, 2, 20, 2, 20, 2, 20, 4, - 20, 4, 21, 1, 198, 36, 35, 4, 198, 33, 34, 36, 21, 1, 39, 33, - 33, 34, 21, 1, 189, 32, 35, 21, 1, 196, 0, 32, 33, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_YUY2); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_YUY2"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_YUY2); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 8, "s1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 2, "t3"); - orc_program_add_temporary (p, 4, "t4"); - orc_program_add_temporary (p, 4, "t5"); - - orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, - ORC_VAR_D1); - orc_program_append_2 (p, "select1wb", 1, ORC_VAR_T1, ORC_VAR_T4, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_UYVY */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union64 *ORC_RESTRICT ptr4; - orc_union64 var37; - orc_union32 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - orc_union16 var44; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var37 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var37.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var37.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: splitlw */ - { - orc_union32 _src; - _src.i = var39.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 3: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 4: select1wb */ - { - orc_union16 _src; - _src.i = var40.x2[0]; - var44.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var40.x2[1]; - var44.x2[1] = _src.x2[1]; - } - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[0]; - _dest.x2[1] = var44.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[1]; - _dest.x2[1] = var44.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storel */ - ptr0[i] = var38; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_UYVY (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union64 *ORC_RESTRICT ptr4; - orc_union64 var37; - orc_union32 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - orc_union16 var44; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var37 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var37.x2[0]; - var39.x2[0] = _src.x2[1]; - var40.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var37.x2[1]; - var39.x2[1] = _src.x2[1]; - var40.x2[1] = _src.x2[0]; - } - /* 2: splitlw */ - { - orc_union32 _src; - _src.i = var39.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 3: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 4: select1wb */ - { - orc_union16 _src; - _src.i = var40.x2[0]; - var44.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var40.x2[1]; - var44.x2[1] = _src.x2[1]; - } - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[0]; - _dest.x2[1] = var44.x2[0]; - var38.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[1]; - _dest.x2[1] = var44.x2[1]; - var38.x2[1] = _dest.i; - } - /* 6: storel */ - ptr0[i] = var38; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 85, 89, - 86, 89, 11, 4, 4, 12, 8, 8, 20, 2, 20, 2, 20, 2, 20, 4, - 20, 4, 21, 1, 198, 36, 35, 4, 198, 33, 34, 36, 21, 1, 39, 33, - 33, 34, 21, 1, 189, 32, 35, 21, 1, 196, 0, 33, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_UYVY); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_UYVY"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_UYVY); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 8, "s1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 2, "t3"); - orc_program_add_temporary (p, 4, "t4"); - orc_program_add_temporary (p, 4, "t5"); - - orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, - ORC_VAR_D1); - orc_program_append_2 (p, "select1wb", 1, ORC_VAR_T1, ORC_VAR_T4, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_Y42B */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - int i; - int j; - orc_union16 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union64 *ORC_RESTRICT ptr4; - orc_union64 var36; - orc_int8 var37; - orc_int8 var38; - orc_union16 var39; - orc_union32 var40; - orc_union32 var41; - orc_union16 var42; - orc_union16 var43; - orc_union16 var44; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var36 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var36.x2[0]; - var40.x2[0] = _src.x2[1]; - var41.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var36.x2[1]; - var40.x2[1] = _src.x2[1]; - var41.x2[1] = _src.x2[0]; - } - /* 2: splitlw */ - { - orc_union32 _src; - _src.i = var40.i; - var42.i = _src.x2[1]; - var43.i = _src.x2[0]; - } - /* 3: avgub */ - var44.x2[0] = - ((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1; - var44.x2[1] = - ((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1; - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var44.i; - var37 = _src.x2[1]; - var38 = _src.x2[0]; - } - /* 5: storeb */ - ptr2[i] = var37; - /* 6: storeb */ - ptr1[i] = var38; - /* 7: select1wb */ - { - orc_union16 _src; - _src.i = var41.x2[0]; - var39.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var41.x2[1]; - var39.x2[1] = _src.x2[1]; - } - /* 8: storew */ - ptr0[i] = var39; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_Y42B (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union16 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union64 *ORC_RESTRICT ptr4; - orc_union64 var36; - orc_int8 var37; - orc_int8 var38; - orc_union16 var39; - orc_union32 var40; - orc_union32 var41; - orc_union16 var42; - orc_union16 var43; - orc_union16 var44; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadq */ - var36 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var36.x2[0]; - var40.x2[0] = _src.x2[1]; - var41.x2[0] = _src.x2[0]; - } - { - orc_union32 _src; - _src.i = var36.x2[1]; - var40.x2[1] = _src.x2[1]; - var41.x2[1] = _src.x2[0]; - } - /* 2: splitlw */ - { - orc_union32 _src; - _src.i = var40.i; - var42.i = _src.x2[1]; - var43.i = _src.x2[0]; - } - /* 3: avgub */ - var44.x2[0] = - ((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1; - var44.x2[1] = - ((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1; - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var44.i; - var37 = _src.x2[1]; - var38 = _src.x2[0]; - } - /* 5: storeb */ - ptr2[i] = var37; - /* 6: storeb */ - ptr1[i] = var38; - /* 7: select1wb */ - { - orc_union16 _src; - _src.i = var41.x2[0]; - var39.x2[0] = _src.x2[1]; - } - { - orc_union16 _src; - _src.i = var41.x2[1]; - var39.x2[1] = _src.x2[1]; - } - /* 8: storew */ - ptr0[i] = var39; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 89, 52, - 50, 66, 11, 2, 2, 11, 1, 1, 11, 1, 1, 12, 8, 8, 20, 4, - 20, 4, 20, 2, 20, 2, 21, 1, 198, 33, 32, 4, 198, 34, 35, 33, - 21, 1, 39, 34, 34, 35, 199, 2, 1, 34, 21, 1, 189, 0, 32, 2, - 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_Y42B); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_Y42B"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_Y42B); - orc_program_add_destination (p, 2, "d1"); - orc_program_add_destination (p, 1, "d2"); - orc_program_add_destination (p, 1, "d3"); - orc_program_add_source (p, 8, "s1"); - orc_program_add_temporary (p, 4, "t1"); - orc_program_add_temporary (p, 4, "t2"); - orc_program_add_temporary (p, 2, "t3"); - orc_program_add_temporary (p, 2, "t4"); - - orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T3, - ORC_VAR_D1); - orc_program_append_2 (p, "select1wb", 1, ORC_VAR_D1, ORC_VAR_T1, - ORC_VAR_D1, ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_D3] = d3; - ex->params[ORC_VAR_D3] = d3_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_Y444 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - int i; - int j; - orc_int8 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var34; - orc_int8 var35; - orc_int8 var36; - orc_int8 var37; - orc_union16 var38; - orc_union16 var39; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j); - ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var34 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var34.i; - var38.i = _src.x2[1]; - var39.i = _src.x2[0]; - } - /* 2: splitwb */ - { - orc_union16 _src; - _src.i = var38.i; - var35 = _src.x2[1]; - var36 = _src.x2[0]; - } - /* 3: storeb */ - ptr2[i] = var35; - /* 4: storeb */ - ptr1[i] = var36; - /* 5: select1wb */ - { - orc_union16 _src; - _src.i = var39.i; - var37 = _src.x2[1]; - } - /* 6: storeb */ - ptr0[i] = var37; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_Y444 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_int8 *ORC_RESTRICT ptr0; - orc_int8 *ORC_RESTRICT ptr1; - orc_int8 *ORC_RESTRICT ptr2; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var34; - orc_int8 var35; - orc_int8 var36; - orc_int8 var37; - orc_union16 var38; - orc_union16 var39; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j); - ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var34 = ptr4[i]; - /* 1: splitlw */ - { - orc_union32 _src; - _src.i = var34.i; - var38.i = _src.x2[1]; - var39.i = _src.x2[0]; - } - /* 2: splitwb */ - { - orc_union16 _src; - _src.i = var38.i; - var35 = _src.x2[1]; - var36 = _src.x2[0]; - } - /* 3: storeb */ - ptr2[i] = var35; - /* 4: storeb */ - ptr1[i] = var36; - /* 5: select1wb */ - { - orc_union16 _src; - _src.i = var39.i; - var37 = _src.x2[1]; - } - /* 6: storeb */ - ptr0[i] = var37; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1, - int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, - guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, - int s1_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 89, 52, - 52, 52, 11, 1, 1, 11, 1, 1, 11, 1, 1, 12, 4, 4, 20, 2, - 20, 2, 198, 33, 32, 4, 199, 2, 1, 33, 189, 0, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_Y444); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_Y444"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_Y444); - orc_program_add_destination (p, 1, "d1"); - orc_program_add_destination (p, 1, "d2"); - orc_program_add_destination (p, 1, "d3"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1, - ORC_VAR_D1, ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_D2] = d2; - ex->params[ORC_VAR_D2] = d2_stride; - ex->arrays[ORC_VAR_D3] = d3; - ex->params[ORC_VAR_D3] = d3_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_Y42B_YUY2 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr5[i]; - /* 1: loadb */ - var34 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var37.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[0]; - _dest.x2[1] = var37.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[1]; - _dest.x2[1] = var37.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_Y42B_YUY2 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr5[i]; - /* 1: loadb */ - var34 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var37.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[0]; - _dest.x2[1] = var37.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var35.x2[1]; - _dest.x2[1] = var37.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - } - } - -} - -void -videomixer_video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52, 50, 66, 95, 89, 85, - 89, 50, 11, 4, 4, 12, 2, 2, 12, 1, 1, 12, 1, 1, 20, 2, - 196, 32, 5, 6, 21, 1, 196, 0, 4, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y42B_YUY2); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_Y42B_YUY2"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y42B_YUY2); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 1, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->params[ORC_VAR_S3] = s3_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_Y42B_UYVY */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr5[i]; - /* 1: loadb */ - var34 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var37.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var35.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var35.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_Y42B_UYVY (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var33; - orc_int8 var34; - orc_union16 var35; - orc_union32 var36; - orc_union16 var37; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var33 = ptr5[i]; - /* 1: loadb */ - var34 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var33; - _dest.x2[1] = var34; - var37.i = _dest.i; - } - /* 3: loadw */ - var35 = ptr4[i]; - /* 4: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[0]; - _dest.x2[1] = var35.x2[0]; - var36.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var37.x2[1]; - _dest.x2[1] = var35.x2[1]; - var36.x2[1] = _dest.i; - } - /* 5: storel */ - ptr0[i] = var36; - } - } - -} - -void -videomixer_video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52, 50, 66, 95, 85, 89, - 86, 89, 11, 4, 4, 12, 2, 2, 12, 1, 1, 12, 1, 1, 20, 2, - 196, 32, 5, 6, 21, 1, 196, 0, 32, 4, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y42B_UYVY); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_Y42B_UYVY"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y42B_UYVY); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 1, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_temporary (p, 2, "t1"); - - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->params[ORC_VAR_S3] = s3_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_Y42B_AYUV */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - int i; - int j; - orc_union64 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var36; - orc_int8 var37; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union16 var38; -#else - orc_union16 var38; -#endif - orc_union16 var39; - orc_union64 var40; - orc_union16 var41; - orc_union32 var42; - orc_union32 var43; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j); - - /* 3: loadpb */ - var38.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - var38.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var36 = ptr5[i]; - /* 1: loadb */ - var37 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36; - _dest.x2[1] = var37; - var41.i = _dest.i; - } - /* 4: loadw */ - var39 = ptr4[i]; - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[0]; - _dest.x2[1] = var39.x2[0]; - var42.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[1]; - _dest.x2[1] = var39.x2[1]; - var42.x2[1] = _dest.i; - } - /* 6: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var41.i; - _dest.x2[1] = var41.i; - var43.i = _dest.i; - } - /* 7: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var42.x2[0]; - _dest.x2[1] = var43.x2[0]; - var40.x2[0] = _dest.i; - } - { - orc_union32 _dest; - _dest.x2[0] = var42.x2[1]; - _dest.x2[1] = var43.x2[1]; - var40.x2[1] = _dest.i; - } - /* 8: storeq */ - ptr0[i] = var40; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_Y42B_AYUV (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union64 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var36; - orc_int8 var37; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union16 var38; -#else - orc_union16 var38; -#endif - orc_union16 var39; - orc_union64 var40; - orc_union16 var41; - orc_union32 var42; - orc_union32 var43; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j); - - /* 3: loadpb */ - var38.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - var38.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var36 = ptr5[i]; - /* 1: loadb */ - var37 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36; - _dest.x2[1] = var37; - var41.i = _dest.i; - } - /* 4: loadw */ - var39 = ptr4[i]; - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[0]; - _dest.x2[1] = var39.x2[0]; - var42.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[1]; - _dest.x2[1] = var39.x2[1]; - var42.x2[1] = _dest.i; - } - /* 6: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var41.i; - _dest.x2[1] = var41.i; - var43.i = _dest.i; - } - /* 7: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var42.x2[0]; - _dest.x2[1] = var43.x2[0]; - var40.x2[0] = _dest.i; - } - { - orc_union32 _dest; - _dest.x2[0] = var42.x2[1]; - _dest.x2[1] = var43.x2[1]; - var40.x2[1] = _dest.i; - } - /* 8: storeq */ - ptr0[i] = var40; - } - } - -} - -void -videomixer_video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52, 50, 66, 95, 65, 89, - 85, 86, 11, 8, 8, 12, 2, 2, 12, 1, 1, 12, 1, 1, 14, 1, - 255, 0, 0, 0, 20, 2, 20, 2, 20, 4, 20, 4, 196, 32, 5, 6, - 21, 1, 196, 35, 16, 4, 195, 34, 32, 32, 21, 1, 195, 0, 35, 34, - 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y42B_AYUV); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_Y42B_AYUV"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y42B_AYUV); - orc_program_add_destination (p, 8, "d1"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 1, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_constant (p, 1, 0x000000ff, "c1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 4, "t3"); - orc_program_add_temporary (p, 4, "t4"); - - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T3, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->params[ORC_VAR_S3] = s3_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_Y444_YUY2 */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_union16 *ORC_RESTRICT ptr6; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var36 = ptr5[i]; - /* 1: loadw */ - var37 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[0]; - _dest.x2[1] = var37.x2[0]; - var40.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[1]; - _dest.x2[1] = var37.x2[1]; - var40.x2[1] = _dest.i; - } - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var40.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 4: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 5: loadw */ - var38 = ptr4[i]; - /* 6: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[0]; - _dest.x2[1] = var43.x2[0]; - var39.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[1]; - _dest.x2[1] = var43.x2[1]; - var39.x2[1] = _dest.i; - } - /* 7: storel */ - ptr0[i] = var39; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_Y444_YUY2 (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_union16 *ORC_RESTRICT ptr6; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var36 = ptr5[i]; - /* 1: loadw */ - var37 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[0]; - _dest.x2[1] = var37.x2[0]; - var40.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[1]; - _dest.x2[1] = var37.x2[1]; - var40.x2[1] = _dest.i; - } - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var40.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 4: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 5: loadw */ - var38 = ptr4[i]; - /* 6: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[0]; - _dest.x2[1] = var43.x2[0]; - var39.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var38.x2[1]; - _dest.x2[1] = var43.x2[1]; - var39.x2[1] = _dest.i; - } - /* 7: storel */ - ptr0[i] = var39; - } - } - -} - -void -videomixer_video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52, 52, 52, 95, 89, 85, - 89, 50, 11, 4, 4, 12, 2, 2, 12, 2, 2, 12, 2, 2, 20, 2, - 20, 4, 20, 2, 20, 2, 21, 1, 196, 33, 5, 6, 198, 34, 35, 33, - 21, 1, 39, 32, 34, 35, 21, 1, 196, 0, 4, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y444_YUY2); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_Y444_YUY2"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y444_YUY2); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 2, "s2"); - orc_program_add_source (p, 2, "s3"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 4, "t2"); - orc_program_add_temporary (p, 2, "t3"); - orc_program_add_temporary (p, 2, "t4"); - - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S3, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->params[ORC_VAR_S3] = s3_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_Y444_UYVY */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_union16 *ORC_RESTRICT ptr6; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var36 = ptr5[i]; - /* 1: loadw */ - var37 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[0]; - _dest.x2[1] = var37.x2[0]; - var40.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[1]; - _dest.x2[1] = var37.x2[1]; - var40.x2[1] = _dest.i; - } - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var40.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 4: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 5: loadw */ - var38 = ptr4[i]; - /* 6: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[0]; - _dest.x2[1] = var38.x2[0]; - var39.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[1]; - _dest.x2[1] = var38.x2[1]; - var39.x2[1] = _dest.i; - } - /* 7: storel */ - ptr0[i] = var39; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_Y444_UYVY (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union16 *ORC_RESTRICT ptr4; - const orc_union16 *ORC_RESTRICT ptr5; - const orc_union16 *ORC_RESTRICT ptr6; - orc_union16 var36; - orc_union16 var37; - orc_union16 var38; - orc_union32 var39; - orc_union32 var40; - orc_union16 var41; - orc_union16 var42; - orc_union16 var43; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j); - - - for (i = 0; i < n; i++) { - /* 0: loadw */ - var36 = ptr5[i]; - /* 1: loadw */ - var37 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[0]; - _dest.x2[1] = var37.x2[0]; - var40.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var36.x2[1]; - _dest.x2[1] = var37.x2[1]; - var40.x2[1] = _dest.i; - } - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var40.i; - var41.i = _src.x2[1]; - var42.i = _src.x2[0]; - } - /* 4: avgub */ - var43.x2[0] = - ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1; - var43.x2[1] = - ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1; - /* 5: loadw */ - var38 = ptr4[i]; - /* 6: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[0]; - _dest.x2[1] = var38.x2[0]; - var39.x2[0] = _dest.i; - } - { - orc_union16 _dest; - _dest.x2[0] = var43.x2[1]; - _dest.x2[1] = var38.x2[1]; - var39.x2[1] = _dest.i; - } - /* 7: storel */ - ptr0[i] = var39; - } - } - -} - -void -videomixer_video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52, 52, 52, 95, 85, 89, - 86, 89, 11, 4, 4, 12, 2, 2, 12, 2, 2, 12, 2, 2, 20, 2, - 20, 4, 20, 2, 20, 2, 21, 1, 196, 33, 5, 6, 198, 34, 35, 33, - 21, 1, 39, 32, 34, 35, 21, 1, 196, 0, 32, 4, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y444_UYVY); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_Y444_UYVY"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y444_UYVY); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 2, "s1"); - orc_program_add_source (p, 2, "s2"); - orc_program_add_source (p, 2, "s3"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 4, "t2"); - orc_program_add_temporary (p, 2, "t3"); - orc_program_add_temporary (p, 2, "t4"); - - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S3, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_T2, - ORC_VAR_D1); - orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->params[ORC_VAR_S3] = s3_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_Y444_AYUV */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var34; - orc_int8 var35; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var36; -#else - orc_int8 var36; -#endif - orc_int8 var37; - orc_union32 var38; - orc_union16 var39; - orc_union16 var40; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); - ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j); - - /* 3: loadpb */ - var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var34 = ptr5[i]; - /* 1: loadb */ - var35 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var34; - _dest.x2[1] = var35; - var39.i = _dest.i; - } - /* 4: loadb */ - var37 = ptr4[i]; - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36; - _dest.x2[1] = var37; - var40.i = _dest.i; - } - /* 6: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var40.i; - _dest.x2[1] = var39.i; - var38.i = _dest.i; - } - /* 7: storel */ - ptr0[i] = var38; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_Y444_AYUV (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var34; - orc_int8 var35; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var36; -#else - orc_int8 var36; -#endif - orc_int8 var37; - orc_union32 var38; - orc_union16 var39; - orc_union16 var40; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); - ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j); - - /* 3: loadpb */ - var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var34 = ptr5[i]; - /* 1: loadb */ - var35 = ptr6[i]; - /* 2: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var34; - _dest.x2[1] = var35; - var39.i = _dest.i; - } - /* 4: loadb */ - var37 = ptr4[i]; - /* 5: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var36; - _dest.x2[1] = var37; - var40.i = _dest.i; - } - /* 6: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var40.i; - _dest.x2[1] = var39.i; - var38.i = _dest.i; - } - /* 7: storel */ - ptr0[i] = var38; - } - } - -} - -void -videomixer_video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, - const guint8 * ORC_RESTRICT s2, int s2_stride, - const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52, 52, 52, 95, 65, 89, - 85, 86, 11, 4, 4, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 1, - 255, 0, 0, 0, 20, 2, 20, 2, 196, 32, 5, 6, 196, 33, 16, 4, - 195, 0, 33, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y444_AYUV); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_Y444_AYUV"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_Y444_AYUV); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 1, "s1"); - orc_program_add_source (p, 1, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_constant (p, 1, 0x000000ff, "c1"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_S1, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->params[ORC_VAR_S2] = s2_stride; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->params[ORC_VAR_S3] = s3_stride; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_ARGB */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = p1; - /* 11: loadpw */ - var49.i = p2; - /* 14: loadpw */ - var50.i = p3; - /* 17: loadpw */ - var51.i = p4; - /* 20: loadpw */ - var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var74; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var75; - _dest.x2[1] = var76; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_ARGB (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = ex->params[24]; - /* 11: loadpw */ - var49.i = ex->params[25]; - /* 14: loadpw */ - var50.i = ex->params[26]; - /* 17: loadpw */ - var51.i = ex->params[27]; - /* 20: loadpw */ - var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var74; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var75; - _dest.x2[1] = var76; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 65, 82, - 71, 66, 11, 4, 4, 12, 4, 4, 14, 1, 128, 0, 0, 0, 16, 2, - 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20, 1, 20, 1, 20, 1, - 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 1, 20, 1, - 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198, 38, 36, 45, 199, 33, - 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37, 34, 151, 38, 35, 90, - 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39, 90, 41, 37, 26, 71, - 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40, 90, 36, 38, 28, 71, - 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44, 41, 196, 39, 32, 42, - 196, 41, 43, 44, 195, 45, 39, 41, 21, 2, 33, 0, 45, 16, 2, 0, - - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_ARGB); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_ARGB"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_ARGB); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_constant (p, 1, 0x00000080, "c1"); - orc_program_add_parameter (p, 2, "p1"); - orc_program_add_parameter (p, 2, "p2"); - orc_program_add_parameter (p, 2, "p3"); - orc_program_add_parameter (p, 2, "p4"); - orc_program_add_parameter (p, 2, "p5"); - orc_program_add_temporary (p, 1, "t1"); - orc_program_add_temporary (p, 1, "t2"); - orc_program_add_temporary (p, 1, "t3"); - orc_program_add_temporary (p, 1, "t4"); - orc_program_add_temporary (p, 2, "t5"); - orc_program_add_temporary (p, 2, "t6"); - orc_program_add_temporary (p, 2, "t7"); - orc_program_add_temporary (p, 2, "t8"); - orc_program_add_temporary (p, 2, "t9"); - orc_program_add_temporary (p, 2, "t10"); - orc_program_add_temporary (p, 1, "t11"); - orc_program_add_temporary (p, 1, "t12"); - orc_program_add_temporary (p, 1, "t13"); - orc_program_add_temporary (p, 4, "t14"); - - orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5, - ORC_VAR_T14, ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5, - ORC_VAR_T10, ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T1, - ORC_VAR_T11, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T12, - ORC_VAR_T13, ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T8, - ORC_VAR_T10, ORC_VAR_D1); - orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->params[ORC_VAR_P1] = p1; - ex->params[ORC_VAR_P2] = p2; - ex->params[ORC_VAR_P3] = p3; - ex->params[ORC_VAR_P4] = p4; - ex->params[ORC_VAR_P5] = p5; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_BGRA */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = p1; - /* 11: loadpw */ - var49.i = p2; - /* 14: loadpw */ - var50.i = p3; - /* 17: loadpw */ - var51.i = p4; - /* 20: loadpw */ - var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var76; - _dest.x2[1] = var75; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var74; - _dest.x2[1] = var59; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_BGRA (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = ex->params[24]; - /* 11: loadpw */ - var49.i = ex->params[25]; - /* 14: loadpw */ - var50.i = ex->params[26]; - /* 17: loadpw */ - var51.i = ex->params[27]; - /* 20: loadpw */ - var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var76; - _dest.x2[1] = var75; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var74; - _dest.x2[1] = var59; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 66, 71, - 82, 65, 11, 4, 4, 12, 4, 4, 14, 1, 128, 0, 0, 0, 16, 2, - 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20, 1, 20, 1, 20, 1, - 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 1, 20, 1, - 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198, 38, 36, 45, 199, 33, - 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37, 34, 151, 38, 35, 90, - 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39, 90, 41, 37, 26, 71, - 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40, 90, 36, 38, 28, 71, - 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44, 41, 196, 41, 44, 43, - 196, 39, 42, 32, 195, 45, 41, 39, 21, 2, 33, 0, 45, 16, 2, 0, - - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_BGRA); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_BGRA"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_BGRA); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_constant (p, 1, 0x00000080, "c1"); - orc_program_add_parameter (p, 2, "p1"); - orc_program_add_parameter (p, 2, "p2"); - orc_program_add_parameter (p, 2, "p3"); - orc_program_add_parameter (p, 2, "p4"); - orc_program_add_parameter (p, 2, "p5"); - orc_program_add_temporary (p, 1, "t1"); - orc_program_add_temporary (p, 1, "t2"); - orc_program_add_temporary (p, 1, "t3"); - orc_program_add_temporary (p, 1, "t4"); - orc_program_add_temporary (p, 2, "t5"); - orc_program_add_temporary (p, 2, "t6"); - orc_program_add_temporary (p, 2, "t7"); - orc_program_add_temporary (p, 2, "t8"); - orc_program_add_temporary (p, 2, "t9"); - orc_program_add_temporary (p, 2, "t10"); - orc_program_add_temporary (p, 1, "t11"); - orc_program_add_temporary (p, 1, "t12"); - orc_program_add_temporary (p, 1, "t13"); - orc_program_add_temporary (p, 4, "t14"); - - orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5, - ORC_VAR_T14, ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5, - ORC_VAR_T10, ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T13, - ORC_VAR_T12, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T11, - ORC_VAR_T1, ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T10, - ORC_VAR_T8, ORC_VAR_D1); - orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->params[ORC_VAR_P1] = p1; - ex->params[ORC_VAR_P2] = p2; - ex->params[ORC_VAR_P3] = p3; - ex->params[ORC_VAR_P4] = p4; - ex->params[ORC_VAR_P5] = p5; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_ABGR */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = p1; - /* 11: loadpw */ - var49.i = p2; - /* 14: loadpw */ - var50.i = p3; - /* 17: loadpw */ - var51.i = p4; - /* 20: loadpw */ - var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var76; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var75; - _dest.x2[1] = var74; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_ABGR (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = ex->params[24]; - /* 11: loadpw */ - var49.i = ex->params[25]; - /* 14: loadpw */ - var50.i = ex->params[26]; - /* 17: loadpw */ - var51.i = ex->params[27]; - /* 20: loadpw */ - var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var76; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var75; - _dest.x2[1] = var74; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 65, 66, - 71, 82, 11, 4, 4, 12, 4, 4, 14, 1, 128, 0, 0, 0, 16, 2, - 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20, 1, 20, 1, 20, 1, - 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 1, 20, 1, - 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198, 38, 36, 45, 199, 33, - 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37, 34, 151, 38, 35, 90, - 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39, 90, 41, 37, 26, 71, - 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40, 90, 36, 38, 28, 71, - 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44, 41, 196, 41, 32, 44, - 196, 39, 43, 42, 195, 45, 41, 39, 21, 2, 33, 0, 45, 16, 2, 0, - - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_ABGR); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_ABGR"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_ABGR); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_constant (p, 1, 0x00000080, "c1"); - orc_program_add_parameter (p, 2, "p1"); - orc_program_add_parameter (p, 2, "p2"); - orc_program_add_parameter (p, 2, "p3"); - orc_program_add_parameter (p, 2, "p4"); - orc_program_add_parameter (p, 2, "p5"); - orc_program_add_temporary (p, 1, "t1"); - orc_program_add_temporary (p, 1, "t2"); - orc_program_add_temporary (p, 1, "t3"); - orc_program_add_temporary (p, 1, "t4"); - orc_program_add_temporary (p, 2, "t5"); - orc_program_add_temporary (p, 2, "t6"); - orc_program_add_temporary (p, 2, "t7"); - orc_program_add_temporary (p, 2, "t8"); - orc_program_add_temporary (p, 2, "t9"); - orc_program_add_temporary (p, 2, "t10"); - orc_program_add_temporary (p, 1, "t11"); - orc_program_add_temporary (p, 1, "t12"); - orc_program_add_temporary (p, 1, "t13"); - orc_program_add_temporary (p, 4, "t14"); - - orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5, - ORC_VAR_T14, ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5, - ORC_VAR_T10, ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T1, - ORC_VAR_T13, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T12, - ORC_VAR_T11, ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T10, - ORC_VAR_T8, ORC_VAR_D1); - orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->params[ORC_VAR_P1] = p1; - ex->params[ORC_VAR_P2] = p2; - ex->params[ORC_VAR_P3] = p3; - ex->params[ORC_VAR_P4] = p4; - ex->params[ORC_VAR_P5] = p5; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_AYUV_RGBA */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - int i; - int j; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); - ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = p1; - /* 11: loadpw */ - var49.i = p2; - /* 14: loadpw */ - var50.i = p3; - /* 17: loadpw */ - var51.i = p4; - /* 20: loadpw */ - var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var74; - _dest.x2[1] = var75; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var76; - _dest.x2[1] = var59; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_AYUV_RGBA (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int j; - int n = ex->n; - int m = ex->params[ORC_VAR_A1]; - orc_union32 *ORC_RESTRICT ptr0; - const orc_union32 *ORC_RESTRICT ptr4; - orc_union32 var46; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var47; -#else - orc_union32 var47; -#endif - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; - orc_union16 var51; - orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else - orc_union32 var53; -#endif - orc_union32 var54; - orc_union32 var55; - orc_union16 var56; - orc_union16 var57; - orc_int8 var58; - orc_int8 var59; - orc_int8 var60; - orc_int8 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_union16 var71; - orc_union16 var72; - orc_union16 var73; - orc_int8 var74; - orc_int8 var75; - orc_int8 var76; - orc_union16 var77; - orc_union16 var78; - orc_union32 var79; - - for (j = 0; j < m; j++) { - ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); - ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); - - /* 1: loadpb */ - var47.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var47.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpw */ - var48.i = ex->params[24]; - /* 11: loadpw */ - var49.i = ex->params[25]; - /* 14: loadpw */ - var50.i = ex->params[26]; - /* 17: loadpw */ - var51.i = ex->params[27]; - /* 20: loadpw */ - var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadl */ - var46 = ptr4[i]; - /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; - /* 3: splitlw */ - { - orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; - } - /* 4: splitwb */ - { - orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; - } - /* 5: splitwb */ - { - orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; - } - /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); - /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); - /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; - /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; - /* 13: addssw */ - var67.i = ORC_CLAMP_SW (var65.i + var66.i); - /* 15: mulhsw */ - var68.i = (var63.i * var50.i) >> 16; - /* 16: addssw */ - var69.i = ORC_CLAMP_SW (var65.i + var68.i); - /* 18: mulhsw */ - var70.i = (var63.i * var51.i) >> 16; - /* 19: addssw */ - var71.i = ORC_CLAMP_SW (var65.i + var70.i); - /* 21: mulhsw */ - var72.i = (var64.i * var52.i) >> 16; - /* 22: addssw */ - var73.i = ORC_CLAMP_SW (var71.i + var72.i); - /* 23: convssswb */ - var74 = ORC_CLAMP_SB (var67.i); - /* 24: convssswb */ - var75 = ORC_CLAMP_SB (var73.i); - /* 25: convssswb */ - var76 = ORC_CLAMP_SB (var69.i); - /* 26: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var74; - _dest.x2[1] = var75; - var77.i = _dest.i; - } - /* 27: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var76; - _dest.x2[1] = var59; - var78.i = _dest.i; - } - /* 28: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var77.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; - } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; - } - } - -} - -void -videomixer_video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, - int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, - int p2, int p3, int p4, int p5, int n, int m) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 7, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, - 99, - 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89, 85, 86, 95, 82, 71, - 66, 65, 11, 4, 4, 12, 4, 4, 14, 1, 128, 0, 0, 0, 16, 2, - 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20, 1, 20, 1, 20, 1, - 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 1, 20, 1, - 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198, 38, 36, 45, 199, 33, - 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37, 34, 151, 38, 35, 90, - 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39, 90, 41, 37, 26, 71, - 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40, 90, 36, 38, 28, 71, - 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44, 41, 196, 39, 42, 43, - 196, 41, 44, 32, 195, 45, 39, 41, 21, 2, 33, 0, 45, 16, 2, 0, - - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_RGBA); -#else - p = orc_program_new (); - orc_program_set_2d (p); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_AYUV_RGBA"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_AYUV_RGBA); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 4, "s1"); - orc_program_add_constant (p, 1, 0x00000080, "c1"); - orc_program_add_parameter (p, 2, "p1"); - orc_program_add_parameter (p, 2, "p2"); - orc_program_add_parameter (p, 2, "p3"); - orc_program_add_parameter (p, 2, "p4"); - orc_program_add_parameter (p, 2, "p5"); - orc_program_add_temporary (p, 1, "t1"); - orc_program_add_temporary (p, 1, "t2"); - orc_program_add_temporary (p, 1, "t3"); - orc_program_add_temporary (p, 1, "t4"); - orc_program_add_temporary (p, 2, "t5"); - orc_program_add_temporary (p, 2, "t6"); - orc_program_add_temporary (p, 2, "t7"); - orc_program_add_temporary (p, 2, "t8"); - orc_program_add_temporary (p, 2, "t9"); - orc_program_add_temporary (p, 2, "t10"); - orc_program_add_temporary (p, 1, "t11"); - orc_program_add_temporary (p, 1, "t12"); - orc_program_add_temporary (p, 1, "t13"); - orc_program_add_temporary (p, 4, "t14"); - - orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5, - ORC_VAR_T14, ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5, - ORC_VAR_T10, ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T11, - ORC_VAR_T12, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T13, - ORC_VAR_T1, ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T8, - ORC_VAR_T10, ORC_VAR_D1); - orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ORC_EXECUTOR_M (ex) = m; - ex->arrays[ORC_VAR_D1] = d1; - ex->params[ORC_VAR_D1] = d1_stride; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->params[ORC_VAR_S1] = s1_stride; - ex->params[ORC_VAR_P1] = p1; - ex->params[ORC_VAR_P2] = p2; - ex->params[ORC_VAR_P3] = p3; - ex->params[ORC_VAR_P4] = p4; - ex->params[ORC_VAR_P5] = p5; - - func = c->exec; - func (ex); -} -#endif - - -/* videomixer_video_convert_orc_convert_I420_BGRA */ -#ifdef DISABLE_ORC -void -videomixer_video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, - const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, - const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, - int n) -{ - int i; - orc_union32 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var42; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var43; -#else - orc_int8 var43; -#endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var44; -#else - orc_int8 var44; -#endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var45; -#else - orc_int8 var45; -#endif - orc_union16 var46; - orc_union16 var47; - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var51; -#else - orc_int8 var51; -#endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var52; -#else - orc_union32 var52; -#endif - orc_union32 var53; - orc_int8 var54; - orc_union16 var55; - orc_int8 var56; - orc_int8 var57; - orc_union16 var58; - orc_int8 var59; - orc_int8 var60; - orc_union16 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_int8 var71; - orc_int8 var72; - orc_int8 var73; - orc_union16 var74; - orc_union16 var75; - orc_union32 var76; - - ptr0 = (orc_union32 *) d1; - ptr4 = (orc_int8 *) s1; - ptr5 = (orc_int8 *) s2; - ptr6 = (orc_int8 *) s3; - - /* 1: loadpb */ - var43 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 5: loadpb */ - var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpb */ - var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 12: loadpw */ - var46.i = p1; - /* 14: loadpw */ - var47.i = p2; - /* 17: loadpw */ - var48.i = p3; - /* 20: loadpw */ - var49.i = p4; - /* 23: loadpw */ - var50.i = p5; - /* 30: loadpb */ - var51 = (int) 0x0000007f; /* 127 or 6.27463e-322f */ - /* 33: loadpb */ - var52.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var42 = ptr4[i]; - /* 2: subb */ - var54 = var42 - var43; - /* 3: splatbw */ - var55.i = ((var54 & 0xff) << 8) | (var54 & 0xff); - /* 4: loadupdb */ - var56 = ptr5[i >> 1]; - /* 6: subb */ - var57 = var56 - var44; - /* 7: splatbw */ - var58.i = ((var57 & 0xff) << 8) | (var57 & 0xff); - /* 8: loadupdb */ - var59 = ptr6[i >> 1]; - /* 10: subb */ - var60 = var59 - var45; - /* 11: splatbw */ - var61.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 13: mulhsw */ - var62.i = (var55.i * var46.i) >> 16; - /* 15: mulhsw */ - var63.i = (var61.i * var47.i) >> 16; - /* 16: addssw */ - var64.i = ORC_CLAMP_SW (var62.i + var63.i); - /* 18: mulhsw */ - var65.i = (var58.i * var48.i) >> 16; - /* 19: addssw */ - var66.i = ORC_CLAMP_SW (var62.i + var65.i); - /* 21: mulhsw */ - var67.i = (var58.i * var49.i) >> 16; - /* 22: addssw */ - var68.i = ORC_CLAMP_SW (var62.i + var67.i); - /* 24: mulhsw */ - var69.i = (var61.i * var50.i) >> 16; - /* 25: addssw */ - var70.i = ORC_CLAMP_SW (var68.i + var69.i); - /* 26: convssswb */ - var71 = ORC_CLAMP_SB (var64.i); - /* 27: convssswb */ - var72 = ORC_CLAMP_SB (var70.i); - /* 28: convssswb */ - var73 = ORC_CLAMP_SB (var66.i); - /* 29: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var73; - _dest.x2[1] = var72; - var74.i = _dest.i; - } - /* 31: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var71; - _dest.x2[1] = var51; - var75.i = _dest.i; - } - /* 32: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var74.i; - _dest.x2[1] = var75.i; - var76.i = _dest.i; - } - /* 34: addb */ - var53.x4[0] = var76.x4[0] + var52.x4[0]; - var53.x4[1] = var76.x4[1] + var52.x4[1]; - var53.x4[2] = var76.x4[2] + var52.x4[2]; - var53.x4[3] = var76.x4[3] + var52.x4[3]; - /* 35: storel */ - ptr0[i] = var53; - } - -} - -#else -static void -_backup_videomixer_video_convert_orc_convert_I420_BGRA (OrcExecutor * - ORC_RESTRICT ex) -{ - int i; - int n = ex->n; - orc_union32 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - orc_int8 var42; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var43; -#else - orc_int8 var43; -#endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var44; -#else - orc_int8 var44; -#endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var45; -#else - orc_int8 var45; -#endif - orc_union16 var46; - orc_union16 var47; - orc_union16 var48; - orc_union16 var49; - orc_union16 var50; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var51; -#else - orc_int8 var51; -#endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var52; -#else - orc_union32 var52; -#endif - orc_union32 var53; - orc_int8 var54; - orc_union16 var55; - orc_int8 var56; - orc_int8 var57; - orc_union16 var58; - orc_int8 var59; - orc_int8 var60; - orc_union16 var61; - orc_union16 var62; - orc_union16 var63; - orc_union16 var64; - orc_union16 var65; - orc_union16 var66; - orc_union16 var67; - orc_union16 var68; - orc_union16 var69; - orc_union16 var70; - orc_int8 var71; - orc_int8 var72; - orc_int8 var73; - orc_union16 var74; - orc_union16 var75; - orc_union32 var76; - - ptr0 = (orc_union32 *) ex->arrays[0]; - ptr4 = (orc_int8 *) ex->arrays[4]; - ptr5 = (orc_int8 *) ex->arrays[5]; - ptr6 = (orc_int8 *) ex->arrays[6]; - - /* 1: loadpb */ - var43 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 5: loadpb */ - var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpb */ - var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 12: loadpw */ - var46.i = ex->params[24]; - /* 14: loadpw */ - var47.i = ex->params[25]; - /* 17: loadpw */ - var48.i = ex->params[26]; - /* 20: loadpw */ - var49.i = ex->params[27]; - /* 23: loadpw */ - var50.i = ex->params[28]; - /* 30: loadpb */ - var51 = (int) 0x0000007f; /* 127 or 6.27463e-322f */ - /* 33: loadpb */ - var52.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var42 = ptr4[i]; - /* 2: subb */ - var54 = var42 - var43; - /* 3: splatbw */ - var55.i = ((var54 & 0xff) << 8) | (var54 & 0xff); - /* 4: loadupdb */ - var56 = ptr5[i >> 1]; - /* 6: subb */ - var57 = var56 - var44; - /* 7: splatbw */ - var58.i = ((var57 & 0xff) << 8) | (var57 & 0xff); - /* 8: loadupdb */ - var59 = ptr6[i >> 1]; - /* 10: subb */ - var60 = var59 - var45; - /* 11: splatbw */ - var61.i = ((var60 & 0xff) << 8) | (var60 & 0xff); - /* 13: mulhsw */ - var62.i = (var55.i * var46.i) >> 16; - /* 15: mulhsw */ - var63.i = (var61.i * var47.i) >> 16; - /* 16: addssw */ - var64.i = ORC_CLAMP_SW (var62.i + var63.i); - /* 18: mulhsw */ - var65.i = (var58.i * var48.i) >> 16; - /* 19: addssw */ - var66.i = ORC_CLAMP_SW (var62.i + var65.i); - /* 21: mulhsw */ - var67.i = (var58.i * var49.i) >> 16; - /* 22: addssw */ - var68.i = ORC_CLAMP_SW (var62.i + var67.i); - /* 24: mulhsw */ - var69.i = (var61.i * var50.i) >> 16; - /* 25: addssw */ - var70.i = ORC_CLAMP_SW (var68.i + var69.i); - /* 26: convssswb */ - var71 = ORC_CLAMP_SB (var64.i); - /* 27: convssswb */ - var72 = ORC_CLAMP_SB (var70.i); - /* 28: convssswb */ - var73 = ORC_CLAMP_SB (var66.i); - /* 29: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var73; - _dest.x2[1] = var72; - var74.i = _dest.i; - } - /* 31: mergebw */ - { - orc_union16 _dest; - _dest.x2[0] = var71; - _dest.x2[1] = var51; - var75.i = _dest.i; - } - /* 32: mergewl */ - { - orc_union32 _dest; - _dest.x2[0] = var74.i; - _dest.x2[1] = var75.i; - var76.i = _dest.i; - } - /* 34: addb */ - var53.x4[0] = var76.x4[0] + var52.x4[0]; - var53.x4[1] = var76.x4[1] + var52.x4[1]; - var53.x4[2] = var76.x4[2] + var52.x4[2]; - var53.x4[3] = var76.x4[3] + var52.x4[3]; - /* 35: storel */ - ptr0[i] = var53; - } - -} - -void -videomixer_video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, - const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, - const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, - int n) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 9, 46, 118, 105, 100, 101, 111, 109, 105, 120, 101, 114, 95, 118, - 105, - 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116, 95, 111, 114, 99, - 95, - 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50, 48, 95, 66, 71, 82, - 65, 11, 4, 4, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 1, 128, - 0, 0, 0, 14, 4, 127, 0, 0, 0, 16, 2, 16, 2, 16, 2, 16, - 2, 16, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, - 1, 20, 1, 20, 1, 20, 4, 65, 38, 4, 16, 151, 32, 38, 45, 38, - 5, 65, 38, 38, 16, 151, 33, 38, 45, 38, 6, 65, 38, 38, 16, 151, - 34, 38, 90, 32, 32, 24, 90, 35, 34, 25, 71, 35, 32, 35, 90, 37, - 33, 26, 71, 37, 32, 37, 90, 36, 33, 27, 71, 36, 32, 36, 90, 32, - 34, 28, 71, 36, 36, 32, 159, 38, 35, 159, 39, 36, 159, 40, 37, 196, - 37, 40, 39, 196, 35, 38, 17, 195, 41, 37, 35, 21, 2, 33, 0, 41, - 16, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_BGRA); -#else - p = orc_program_new (); - orc_program_set_name (p, - "videomixer_video_convert_orc_convert_I420_BGRA"); - orc_program_set_backup_function (p, - _backup_videomixer_video_convert_orc_convert_I420_BGRA); - orc_program_add_destination (p, 4, "d1"); - orc_program_add_source (p, 1, "s1"); - orc_program_add_source (p, 1, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_constant (p, 1, 0x00000080, "c1"); - orc_program_add_constant (p, 4, 0x0000007f, "c2"); - orc_program_add_parameter (p, 2, "p1"); - orc_program_add_parameter (p, 2, "p2"); - orc_program_add_parameter (p, 2, "p3"); - orc_program_add_parameter (p, 2, "p4"); - orc_program_add_parameter (p, 2, "p5"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 2, "t3"); - orc_program_add_temporary (p, 2, "t4"); - orc_program_add_temporary (p, 2, "t5"); - orc_program_add_temporary (p, 2, "t6"); - orc_program_add_temporary (p, 1, "t7"); - orc_program_add_temporary (p, 1, "t8"); - orc_program_add_temporary (p, 1, "t9"); - orc_program_add_temporary (p, 4, "t10"); - - orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_S1, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T1, ORC_VAR_T7, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T7, ORC_VAR_S2, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T2, ORC_VAR_T7, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T7, ORC_VAR_S3, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T3, ORC_VAR_T7, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_P2, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T6, ORC_VAR_T2, ORC_VAR_P3, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T6, ORC_VAR_T1, ORC_VAR_T6, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_P4, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_T5, - ORC_VAR_D1); - orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_P5, - ORC_VAR_D1); - orc_program_append_2 (p, "addssw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T1, - ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T7, ORC_VAR_T4, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T8, ORC_VAR_T5, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T9, ORC_VAR_T6, - ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T6, ORC_VAR_T9, ORC_VAR_T8, - ORC_VAR_D1); - orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T4, ORC_VAR_T7, ORC_VAR_C2, - ORC_VAR_D1); - orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T10, ORC_VAR_T6, - ORC_VAR_T4, ORC_VAR_D1); - orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T10, ORC_VAR_C1, - ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ex->arrays[ORC_VAR_D1] = d1; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->params[ORC_VAR_P1] = p1; - ex->params[ORC_VAR_P2] = p2; - ex->params[ORC_VAR_P3] = p3; - ex->params[ORC_VAR_P4] = p4; - ex->params[ORC_VAR_P5] = p5; - - func = c->exec; - func (ex); } #endif diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videomixerorc-dist.h gst-plugins-good1.0-1.6.1/gst/videomixer/videomixerorc-dist.h --- gst-plugins-good1.0-1.4.3/gst/videomixer/videomixerorc-dist.h 2014-08-27 10:27:39.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videomixerorc-dist.h 2015-10-22 08:03:36.000000000 +0000 @@ -87,41 +87,6 @@ void video_mixer_orc_blend_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m); void video_mixer_orc_overlay_argb (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m); void video_mixer_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m); -void videomixer_video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n); -void videomixer_video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n); -void videomixer_video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n); -void videomixer_video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n); -void videomixer_video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_420_422 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_420_444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_422_444 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_444_422 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_444_420 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void videomixer_video_convert_orc_planar_chroma_422_420 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void videomixer_video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n); -void videomixer_video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, guint8 * ORC_RESTRICT d4, int d4_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m); -void videomixer_video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, int n); #ifdef __cplusplus } diff -Nru gst-plugins-good1.0-1.4.3/gst/videomixer/videomixerorc.orc gst-plugins-good1.0-1.6.1/gst/videomixer/videomixerorc.orc --- gst-plugins-good1.0-1.4.3/gst/videomixer/videomixerorc.orc 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/videomixer/videomixerorc.orc 2015-10-22 08:02:54.000000000 +0000 @@ -219,734 +219,3 @@ orl t, t, a storel d, t -# Videoconvert logic, copy from videomixer_videoconvert. -# Remove that when videomixer_videoconvert lands in libgstvideo. - -.function videomixer_video_convert_orc_memcpy_2d -.flags 2d -.dest 1 d1 guint8 -.source 1 s1 guint8 - -copyb d1, s1 - -.function videomixer_video_convert_orc_convert_I420_UYVY -.dest 4 d1 guint8 -.dest 4 d2 guint8 -.source 2 y1 guint8 -.source 2 y2 guint8 -.source 1 u guint8 -.source 1 v guint8 -.temp 2 uv - -mergebw uv, u, v -x2 mergebw d1, uv, y1 -x2 mergebw d2, uv, y2 - - -.function videomixer_video_convert_orc_convert_I420_YUY2 -.dest 4 d1 guint8 -.dest 4 d2 guint8 -.source 2 y1 guint8 -.source 2 y2 guint8 -.source 1 u guint8 -.source 1 v guint8 -.temp 2 uv - -mergebw uv, u, v -x2 mergebw d1, y1, uv -x2 mergebw d2, y2, uv - - - -.function videomixer_video_convert_orc_convert_I420_AYUV -.dest 4 d1 guint8 -.dest 4 d2 guint8 -.source 1 y1 guint8 -.source 1 y2 guint8 -.source 1 u guint8 -.source 1 v guint8 -.const 1 c255 255 -.temp 2 uv -.temp 2 ay -.temp 1 tu -.temp 1 tv - -loadupdb tu, u -loadupdb tv, v -mergebw uv, tu, tv -mergebw ay, c255, y1 -mergewl d1, ay, uv -mergebw ay, c255, y2 -mergewl d2, ay, uv - - -.function videomixer_video_convert_orc_convert_YUY2_I420 -.dest 2 y1 guint8 -.dest 2 y2 guint8 -.dest 1 u guint8 -.dest 1 v guint8 -.source 4 yuv1 guint8 -.source 4 yuv2 guint8 -.temp 2 t1 -.temp 2 t2 -.temp 2 ty - -x2 splitwb t1, ty, yuv1 -storew y1, ty -x2 splitwb t2, ty, yuv2 -storew y2, ty -x2 avgub t1, t1, t2 -splitwb v, u, t1 - - -.function videomixer_video_convert_orc_convert_UYVY_YUY2 -.flags 2d -.dest 4 yuy2 guint8 -.source 4 uyvy guint8 - -x2 swapw yuy2, uyvy - - -.function videomixer_video_convert_orc_planar_chroma_420_422 -.flags 2d -.dest 1 d1 guint8 -.dest 1 d2 guint8 -.source 1 s guint8 - -copyb d1, s -copyb d2, s - - -.function videomixer_video_convert_orc_planar_chroma_420_444 -.flags 2d -.dest 2 d1 guint8 -.dest 2 d2 guint8 -.source 1 s guint8 -.temp 2 t - -splatbw t, s -storew d1, t -storew d2, t - - -.function videomixer_video_convert_orc_planar_chroma_422_444 -.flags 2d -.dest 2 d1 guint8 -.source 1 s guint8 -.temp 2 t - -splatbw t, s -storew d1, t - - -.function videomixer_video_convert_orc_planar_chroma_444_422 -.flags 2d -.dest 1 d guint8 -.source 2 s guint8 -.temp 1 t1 -.temp 1 t2 - -splitwb t1, t2, s -avgub d, t1, t2 - - -.function videomixer_video_convert_orc_planar_chroma_444_420 -.flags 2d -.dest 1 d guint8 -.source 2 s1 guint8 -.source 2 s2 guint8 -.temp 2 t -.temp 1 t1 -.temp 1 t2 - -x2 avgub t, s1, s2 -splitwb t1, t2, t -avgub d, t1, t2 - - -.function videomixer_video_convert_orc_planar_chroma_422_420 -.flags 2d -.dest 1 d guint8 -.source 1 s1 guint8 -.source 1 s2 guint8 - -avgub d, s1, s2 - - -.function videomixer_video_convert_orc_convert_YUY2_AYUV -.flags 2d -.dest 8 ayuv guint8 -.source 4 yuy2 guint8 -.const 2 c255 0xff -.temp 2 yy -.temp 2 uv -.temp 4 ayay -.temp 4 uvuv - -x2 splitwb uv, yy, yuy2 -x2 mergebw ayay, c255, yy -mergewl uvuv, uv, uv -x2 mergewl ayuv, ayay, uvuv - - -.function videomixer_video_convert_orc_convert_UYVY_AYUV -.flags 2d -.dest 8 ayuv guint8 -.source 4 uyvy guint8 -.const 2 c255 0xff -.temp 2 yy -.temp 2 uv -.temp 4 ayay -.temp 4 uvuv - -x2 splitwb yy, uv, uyvy -x2 mergebw ayay, c255, yy -mergewl uvuv, uv, uv -x2 mergewl ayuv, ayay, uvuv - - -.function videomixer_video_convert_orc_convert_YUY2_Y42B -.flags 2d -.dest 2 y guint8 -.dest 1 u guint8 -.dest 1 v guint8 -.source 4 yuy2 guint8 -.temp 2 uv - -x2 splitwb uv, y, yuy2 -splitwb v, u, uv - - -.function videomixer_video_convert_orc_convert_UYVY_Y42B -.flags 2d -.dest 2 y guint8 -.dest 1 u guint8 -.dest 1 v guint8 -.source 4 uyvy guint8 -.temp 2 uv - -x2 splitwb y, uv, uyvy -splitwb v, u, uv - - -.function videomixer_video_convert_orc_convert_YUY2_Y444 -.flags 2d -.dest 2 y guint8 -.dest 2 uu guint8 -.dest 2 vv guint8 -.source 4 yuy2 guint8 -.temp 2 uv -.temp 1 u -.temp 1 v - -x2 splitwb uv, y, yuy2 -splitwb v, u, uv -splatbw uu, u -splatbw vv, v - - -.function videomixer_video_convert_orc_convert_UYVY_Y444 -.flags 2d -.dest 2 y guint8 -.dest 2 uu guint8 -.dest 2 vv guint8 -.source 4 uyvy guint8 -.temp 2 uv -.temp 1 u -.temp 1 v - -x2 splitwb y, uv, uyvy -splitwb v, u, uv -splatbw uu, u -splatbw vv, v - - -.function videomixer_video_convert_orc_convert_UYVY_I420 -.dest 2 y1 guint8 -.dest 2 y2 guint8 -.dest 1 u guint8 -.dest 1 v guint8 -.source 4 yuv1 guint8 -.source 4 yuv2 guint8 -.temp 2 t1 -.temp 2 t2 -.temp 2 ty - -x2 splitwb ty, t1, yuv1 -storew y1, ty -x2 splitwb ty, t2, yuv2 -storew y2, ty -x2 avgub t1, t1, t2 -splitwb v, u, t1 - - - -.function videomixer_video_convert_orc_convert_AYUV_I420 -.flags 2d -.dest 2 y1 guint8 -.dest 2 y2 guint8 -.dest 1 u guint8 -.dest 1 v guint8 -.source 8 ayuv1 guint8 -.source 8 ayuv2 guint8 -.temp 4 ay -.temp 4 uv1 -.temp 4 uv2 -.temp 4 uv -.temp 2 uu -.temp 2 vv -.temp 1 t1 -.temp 1 t2 - -x2 splitlw uv1, ay, ayuv1 -x2 select1wb y1, ay -x2 splitlw uv2, ay, ayuv2 -x2 select1wb y2, ay -x4 avgub uv, uv1, uv2 -x2 splitwb vv, uu, uv -splitwb t1, t2, uu -avgub u, t1, t2 -splitwb t1, t2, vv -avgub v, t1, t2 - - - -.function videomixer_video_convert_orc_convert_AYUV_YUY2 -.flags 2d -.dest 4 yuy2 guint8 -.source 8 ayuv guint8 -.temp 2 yy -.temp 2 uv1 -.temp 2 uv2 -.temp 4 ayay -.temp 4 uvuv - -x2 splitlw uvuv, ayay, ayuv -splitlw uv1, uv2, uvuv -x2 avgub uv1, uv1, uv2 -x2 select1wb yy, ayay -x2 mergebw yuy2, yy, uv1 - - -.function videomixer_video_convert_orc_convert_AYUV_UYVY -.flags 2d -.dest 4 yuy2 guint8 -.source 8 ayuv guint8 -.temp 2 yy -.temp 2 uv1 -.temp 2 uv2 -.temp 4 ayay -.temp 4 uvuv - -x2 splitlw uvuv, ayay, ayuv -splitlw uv1, uv2, uvuv -x2 avgub uv1, uv1, uv2 -x2 select1wb yy, ayay -x2 mergebw yuy2, uv1, yy - - - -.function videomixer_video_convert_orc_convert_AYUV_Y42B -.flags 2d -.dest 2 y guint8 -.dest 1 u guint8 -.dest 1 v guint8 -.source 8 ayuv guint8 -.temp 4 ayay -.temp 4 uvuv -.temp 2 uv1 -.temp 2 uv2 - -x2 splitlw uvuv, ayay, ayuv -splitlw uv1, uv2, uvuv -x2 avgub uv1, uv1, uv2 -splitwb v, u, uv1 -x2 select1wb y, ayay - - -.function videomixer_video_convert_orc_convert_AYUV_Y444 -.flags 2d -.dest 1 y guint8 -.dest 1 u guint8 -.dest 1 v guint8 -.source 4 ayuv guint8 -.temp 2 ay -.temp 2 uv - -splitlw uv, ay, ayuv -splitwb v, u, uv -select1wb y, ay - - -.function videomixer_video_convert_orc_convert_Y42B_YUY2 -.flags 2d -.dest 4 yuy2 guint8 -.source 2 y guint8 -.source 1 u guint8 -.source 1 v guint8 -.temp 2 uv - -mergebw uv, u, v -x2 mergebw yuy2, y, uv - - -.function videomixer_video_convert_orc_convert_Y42B_UYVY -.flags 2d -.dest 4 uyvy guint8 -.source 2 y guint8 -.source 1 u guint8 -.source 1 v guint8 -.temp 2 uv - -mergebw uv, u, v -x2 mergebw uyvy, uv, y - - -.function videomixer_video_convert_orc_convert_Y42B_AYUV -.flags 2d -.dest 8 ayuv guint8 -.source 2 yy guint8 -.source 1 u guint8 -.source 1 v guint8 -.const 1 c255 255 -.temp 2 uv -.temp 2 ay -.temp 4 uvuv -.temp 4 ayay - -mergebw uv, u, v -x2 mergebw ayay, c255, yy -mergewl uvuv, uv, uv -x2 mergewl ayuv, ayay, uvuv - - -.function videomixer_video_convert_orc_convert_Y444_YUY2 -.flags 2d -.dest 4 yuy2 guint8 -.source 2 y guint8 -.source 2 u guint8 -.source 2 v guint8 -.temp 2 uv -.temp 4 uvuv -.temp 2 uv1 -.temp 2 uv2 - -x2 mergebw uvuv, u, v -splitlw uv1, uv2, uvuv -x2 avgub uv, uv1, uv2 -x2 mergebw yuy2, y, uv - - -.function videomixer_video_convert_orc_convert_Y444_UYVY -.flags 2d -.dest 4 uyvy guint8 -.source 2 y guint8 -.source 2 u guint8 -.source 2 v guint8 -.temp 2 uv -.temp 4 uvuv -.temp 2 uv1 -.temp 2 uv2 - -x2 mergebw uvuv, u, v -splitlw uv1, uv2, uvuv -x2 avgub uv, uv1, uv2 -x2 mergebw uyvy, uv, y - - -.function videomixer_video_convert_orc_convert_Y444_AYUV -.flags 2d -.dest 4 ayuv guint8 -.source 1 yy guint8 -.source 1 u guint8 -.source 1 v guint8 -.const 1 c255 255 -.temp 2 uv -.temp 2 ay - -mergebw uv, u, v -mergebw ay, c255, yy -mergewl ayuv, ay, uv - - - -.function videomixer_video_convert_orc_convert_AYUV_ARGB -.flags 2d -.dest 4 argb guint8 -.source 4 ayuv guint8 -.param 2 p1 -.param 2 p2 -.param 2 p3 -.param 2 p4 -.param 2 p5 -.temp 1 a -.temp 1 y -.temp 1 u -.temp 1 v -.temp 2 wy -.temp 2 wu -.temp 2 wv -.temp 2 wr -.temp 2 wg -.temp 2 wb -.temp 1 r -.temp 1 g -.temp 1 b -.temp 4 x -.const 1 c128 128 - -x4 subb x, ayuv, c128 -splitlw wv, wy, x -splitwb y, a, wy -splitwb v, u, wv - -splatbw wy, y -splatbw wu, u -splatbw wv, v - -mulhsw wy, wy, p1 - -mulhsw wr, wv, p2 -addssw wr, wy, wr - -mulhsw wb, wu, p3 -addssw wb, wy, wb - -mulhsw wg, wu, p4 -addssw wg, wy, wg -mulhsw wy, wv, p5 -addssw wg, wg, wy - -convssswb r, wr -convssswb g, wg -convssswb b, wb - -mergebw wr, a, r -mergebw wb, g, b -mergewl x, wr, wb -x4 addb argb, x, c128 - -.function videomixer_video_convert_orc_convert_AYUV_BGRA -.flags 2d -.dest 4 bgra guint8 -.source 4 ayuv guint8 -.param 2 p1 -.param 2 p2 -.param 2 p3 -.param 2 p4 -.param 2 p5 -.temp 1 a -.temp 1 y -.temp 1 u -.temp 1 v -.temp 2 wy -.temp 2 wu -.temp 2 wv -.temp 2 wr -.temp 2 wg -.temp 2 wb -.temp 1 r -.temp 1 g -.temp 1 b -.temp 4 x -.const 1 c128 128 - -x4 subb x, ayuv, c128 -splitlw wv, wy, x -splitwb y, a, wy -splitwb v, u, wv - -splatbw wy, y -splatbw wu, u -splatbw wv, v - -mulhsw wy, wy, p1 - -mulhsw wr, wv, p2 -addssw wr, wy, wr - -mulhsw wb, wu, p3 -addssw wb, wy, wb - -mulhsw wg, wu, p4 -addssw wg, wy, wg -mulhsw wy, wv, p5 -addssw wg, wg, wy - -convssswb r, wr -convssswb g, wg -convssswb b, wb - -mergebw wb, b, g -mergebw wr, r, a -mergewl x, wb, wr -x4 addb bgra, x, c128 - - -.function videomixer_video_convert_orc_convert_AYUV_ABGR -.flags 2d -.dest 4 argb guint8 -.source 4 ayuv guint8 -.param 2 p1 -.param 2 p2 -.param 2 p3 -.param 2 p4 -.param 2 p5 -.temp 1 a -.temp 1 y -.temp 1 u -.temp 1 v -.temp 2 wy -.temp 2 wu -.temp 2 wv -.temp 2 wr -.temp 2 wg -.temp 2 wb -.temp 1 r -.temp 1 g -.temp 1 b -.temp 4 x -.const 1 c128 128 - -x4 subb x, ayuv, c128 -splitlw wv, wy, x -splitwb y, a, wy -splitwb v, u, wv - -splatbw wy, y -splatbw wu, u -splatbw wv, v - -mulhsw wy, wy, p1 - -mulhsw wr, wv, p2 -addssw wr, wy, wr - -mulhsw wb, wu, p3 -addssw wb, wy, wb - -mulhsw wg, wu, p4 -addssw wg, wy, wg -mulhsw wy, wv, p5 -addssw wg, wg, wy - -convssswb r, wr -convssswb g, wg -convssswb b, wb - -mergebw wb, a, b -mergebw wr, g, r -mergewl x, wb, wr -x4 addb argb, x, c128 - -.function videomixer_video_convert_orc_convert_AYUV_RGBA -.flags 2d -.dest 4 argb guint8 -.source 4 ayuv guint8 -.param 2 p1 -.param 2 p2 -.param 2 p3 -.param 2 p4 -.param 2 p5 -.temp 1 a -.temp 1 y -.temp 1 u -.temp 1 v -.temp 2 wy -.temp 2 wu -.temp 2 wv -.temp 2 wr -.temp 2 wg -.temp 2 wb -.temp 1 r -.temp 1 g -.temp 1 b -.temp 4 x -.const 1 c128 128 - -x4 subb x, ayuv, c128 -splitlw wv, wy, x -splitwb y, a, wy -splitwb v, u, wv - -splatbw wy, y -splatbw wu, u -splatbw wv, v - -mulhsw wy, wy, p1 - -mulhsw wr, wv, p2 -addssw wr, wy, wr - -mulhsw wb, wu, p3 -addssw wb, wy, wb - -mulhsw wg, wu, p4 -addssw wg, wy, wg -mulhsw wy, wv, p5 -addssw wg, wg, wy - -convssswb r, wr -convssswb g, wg -convssswb b, wb - -mergebw wr, r, g -mergebw wb, b, a -mergewl x, wr, wb -x4 addb argb, x, c128 - - - -.function videomixer_video_convert_orc_convert_I420_BGRA -.dest 4 argb guint8 -.source 1 y guint8 -.source 1 u guint8 -.source 1 v guint8 -.param 2 p1 -.param 2 p2 -.param 2 p3 -.param 2 p4 -.param 2 p5 -.temp 2 wy -.temp 2 wu -.temp 2 wv -.temp 2 wr -.temp 2 wg -.temp 2 wb -.temp 1 r -.temp 1 g -.temp 1 b -.temp 4 x -.const 1 c128 128 - -subb r, y, c128 -splatbw wy, r -loadupdb r, u -subb r, r, c128 -splatbw wu, r -loadupdb r, v -subb r, r, c128 -splatbw wv, r - -mulhsw wy, wy, p1 - -mulhsw wr, wv, p2 -addssw wr, wy, wr - -mulhsw wb, wu, p3 -addssw wb, wy, wb - -mulhsw wg, wu, p4 -addssw wg, wy, wg -mulhsw wy, wv, p5 -addssw wg, wg, wy - -convssswb r, wr -convssswb g, wg -convssswb b, wb - -mergebw wb, b, g -mergebw wr, r, 127 -mergewl x, wb, wr -x4 addb argb, x, c128 - diff -Nru gst-plugins-good1.0-1.4.3/gst/wavenc/gstwavenc.c gst-plugins-good1.0-1.6.1/gst/wavenc/gstwavenc.c --- gst-plugins-good1.0-1.4.3/gst/wavenc/gstwavenc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavenc/gstwavenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -49,37 +49,6 @@ GST_DEBUG_CATEGORY_STATIC (wavenc_debug); #define GST_CAT_DEFAULT wavenc_debug -struct riff_struct -{ - guint8 id[4]; /* RIFF */ - guint32 len; - guint8 wav_id[4]; /* WAVE */ -}; - -struct chunk_struct -{ - guint8 id[4]; - guint32 len; -}; - -struct common_struct -{ - guint16 wFormatTag; - guint16 wChannels; - guint32 dwSamplesPerSec; - guint32 dwAvgBytesPerSec; - guint16 wBlockAlign; - guint16 wBitsPerSample; /* Only for PCM */ -}; - -struct wave_header -{ - struct riff_struct riff; - struct chunk_struct format; - struct common_struct common; - struct chunk_struct data; -}; - typedef struct { /* Offset Size Description Value @@ -113,19 +82,10 @@ } GstWavEncLabl, GstWavEncNote; /* FIXME: mono doesn't produce correct files it seems, at least mplayer xruns */ -/* Max. of two channels, more channels need WAVFORMATEX with - * channel layout, which we do not support yet */ #define SINK_CAPS \ "audio/x-raw, " \ "rate = (int) [ 1, MAX ], " \ - "channels = (int) 1, " \ - "format = (string) { S32LE, S24LE, S16LE, U8, F32LE, F64LE }, " \ - "layout = (string) interleaved" \ - "; " \ - "audio/x-raw, " \ - "rate = (int) [ 1, MAX ], " \ - "channels = (int) 2, " \ - "channel-mask = (bitmask) 0x3, " \ + "channels = (int) [ 1, 65535 ], " \ "format = (string) { S32LE, S24LE, S16LE, U8, F32LE, F64LE }, " \ "layout = (string) interleaved" \ "; " \ @@ -136,6 +96,9 @@ "rate = (int) [ 8000, 192000 ], " \ "channels = (int) [ 1, 2 ]" +#define SRC_CAPS \ + "audio/x-wav; " \ + "audio/x-rf64" static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, @@ -146,7 +109,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-wav") + GST_STATIC_CAPS (SRC_CAPS) ); #define gst_wavenc_parent_class parent_class @@ -197,58 +160,251 @@ wavenc->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); gst_pad_use_fixed_caps (wavenc->srcpad); - gst_pad_set_caps (wavenc->srcpad, - gst_static_pad_template_get_caps (&src_factory)); gst_element_add_pad (GST_ELEMENT (wavenc), wavenc->srcpad); } -#define WAV_HEADER_LEN 44 +#define RIFF_CHUNK_LEN 12 +#define FMT_WAV_CHUNK_LEN 24 +#define FMT_EXT_CHUNK_LEN 48 +#define FACT_CHUNK_LEN 12 +#define DATA_HEADER_LEN 8 +#define DS64_CHUNK_LEN 36 + +static gboolean +use_format_ext (GstWavEnc * wavenc) +{ + return wavenc->channels > 2; +} + +static gboolean +use_fact_chunk (GstWavEnc * wavenc) +{ + return use_format_ext (wavenc) && !wavenc->use_rf64; +} + +static int +get_header_len (GstWavEnc * wavenc) +{ + int len = RIFF_CHUNK_LEN; + + if (use_format_ext (wavenc)) + len += FMT_EXT_CHUNK_LEN; + else + len += FMT_WAV_CHUNK_LEN; + + if (use_fact_chunk (wavenc)) + len += FACT_CHUNK_LEN; + + if (wavenc->use_rf64) + len += DS64_CHUNK_LEN; + + return len + DATA_HEADER_LEN; +} + +static guint64 +gstmask_to_wavmask (guint64 gstmask, GstAudioChannelPosition * pos) +{ + const GstAudioChannelPosition valid_pos = + GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT | + GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT | + GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER | + GST_AUDIO_CHANNEL_POSITION_LFE1 | + GST_AUDIO_CHANNEL_POSITION_REAR_LEFT | + GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT | + GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER | + GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER | + GST_AUDIO_CHANNEL_POSITION_REAR_CENTER | + GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT | + GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT | + GST_AUDIO_CHANNEL_POSITION_TOP_CENTER | + GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT | + GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER | + GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT | + GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT | + GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER | + GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT; + + const GstAudioChannelPosition wav_pos[] = { + GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, + GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, + GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, + GST_AUDIO_CHANNEL_POSITION_LFE1, + GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, + GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, + GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, + GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, + GST_AUDIO_CHANNEL_POSITION_REAR_CENTER, + GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT, + GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT, + GST_AUDIO_CHANNEL_POSITION_TOP_CENTER, + GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT, + GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER, + GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT, + GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT, + GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER, + GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT, + }; + int k; + int chan = 0; + guint64 ret = 0; + guint64 mask = 1; + + if (gstmask == 0 || ((gstmask & ~valid_pos) != 0)) + return 0; + + for (k = 0; k < G_N_ELEMENTS (wav_pos); ++k) { + if (gstmask & wav_pos[k]) { + ret |= mask; + pos[chan++] = wav_pos[k]; + } + mask <<= 1; + } + + return ret; +} + +static guint8 * +write_fmt_chunk (GstWavEnc * wavenc, guint8 * header) +{ + guint16 wBlockAlign; + + wBlockAlign = (wavenc->width / 8) * wavenc->channels; + + memcpy (header, "fmt ", 4); + /* wChannels */ + GST_WRITE_UINT16_LE (header + 10, wavenc->channels); + /* dwSamplesPerSec */ + GST_WRITE_UINT32_LE (header + 12, wavenc->rate); + /* dwAvgBytesPerSec */ + GST_WRITE_UINT32_LE (header + 16, wBlockAlign * wavenc->rate); + /* wBlockAlign */ + GST_WRITE_UINT16_LE (header + 20, wBlockAlign); + /* wBitsPerSample */ + GST_WRITE_UINT16_LE (header + 22, wavenc->width); + + if (use_format_ext (wavenc)) { + GST_DEBUG_OBJECT (wavenc, "Using WAVE_FORMAT_EXTENSIBLE"); + + GST_WRITE_UINT32_LE (header + 4, FMT_EXT_CHUNK_LEN - 8); + + /* wFormatTag */ + GST_WRITE_UINT16_LE (header + 8, 0xFFFE); + /* cbSize */ + GST_WRITE_UINT16_LE (header + 24, 22); + /* wValidBitsPerSample */ + GST_WRITE_UINT16_LE (header + 26, wavenc->width); + /* dwChannelMask */ + GST_WRITE_UINT32_LE (header + 28, (guint32) wavenc->channel_mask); + + GST_WRITE_UINT16_LE (header + 32, wavenc->format); + + memcpy (header + 34, + "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71", 14); + + header += FMT_EXT_CHUNK_LEN; + + } else { + GST_WRITE_UINT32_LE (header + 4, FMT_WAV_CHUNK_LEN - 8); + + /* wFormatTag */ + GST_WRITE_UINT16_LE (header + 8, wavenc->format); + header += FMT_WAV_CHUNK_LEN; + } + + return header; +} + +static guint64 +get_num_frames (GstWavEnc * wavenc) +{ + if (wavenc->channels == 0 || wavenc->width == 0) + return 0; + return wavenc->audio_length / (wavenc->width / 8) / wavenc->channels; +} + +static guint8 * +write_fact_chunk (GstWavEnc * wavenc, guint8 * header) +{ + memcpy (header, "fact", 4); + GST_WRITE_UINT32_LE (header + 4, FACT_CHUNK_LEN - 8); + /* compressed files are only supported up to 2 channels, + * that means we never write a fact chunk for them */ + if (wavenc->use_rf64) + GST_WRITE_UINT32_LE (header + 8, 0xFFFFFFFF); + else + GST_WRITE_UINT32_LE (header + 8, (guint32) get_num_frames (wavenc)); + return header + FACT_CHUNK_LEN; +} + +static guint8 * +write_ds64_chunk (GstWavEnc * wavenc, guint64 riffLen, guint8 * header) +{ + guint64 numFrames = get_num_frames (wavenc); + + GST_DEBUG_OBJECT (wavenc, "riffLen=%" G_GUINT64_FORMAT + ", audio length=%" G_GUINT64_FORMAT ", numFrames=%" G_GUINT64_FORMAT, + riffLen, wavenc->audio_length, numFrames); + + memcpy (header, "ds64", 4); + GST_WRITE_UINT32_LE (header + 4, DS64_CHUNK_LEN - 8); + /* riffSize */ + GST_WRITE_UINT32_LE (header + 8, (guint32) (riffLen & 0xFFFFFFFF)); + GST_WRITE_UINT32_LE (header + 12, (guint32) (riffLen >> 32)); + /* dataSize */ + GST_WRITE_UINT32_LE (header + 16, + (guint32) (wavenc->audio_length & 0xFFFFFFFF)); + GST_WRITE_UINT32_LE (header + 20, (guint32) (wavenc->audio_length >> 32)); + /* sampleCount */ + GST_WRITE_UINT32_LE (header + 24, (guint32) (numFrames & 0xFFFFFFFF)); + GST_WRITE_UINT32_LE (header + 28, (guint32) (numFrames >> 32)); + /* tableLength always zero for now */ + GST_WRITE_UINT32_LE (header + 32, 0); + + return header + DS64_CHUNK_LEN; +} static GstBuffer * gst_wavenc_create_header_buf (GstWavEnc * wavenc) { - struct wave_header wave; GstBuffer *buf; GstMapInfo map; guint8 *header; + guint64 riffLen; - buf = gst_buffer_new_and_alloc (WAV_HEADER_LEN); + GST_DEBUG_OBJECT (wavenc, "Header size: %d", get_header_len (wavenc)); + buf = gst_buffer_new_and_alloc (get_header_len (wavenc)); gst_buffer_map (buf, &map, GST_MAP_WRITE); header = map.data; - memset (header, 0, WAV_HEADER_LEN); + memset (header, 0, get_header_len (wavenc)); - memcpy (wave.riff.id, "RIFF", 4); - wave.riff.len = - wavenc->meta_length + wavenc->audio_length + WAV_HEADER_LEN - 8; - memcpy (wave.riff.wav_id, "WAVE", 4); - - memcpy (wave.format.id, "fmt ", 4); - wave.format.len = 16; - - wave.common.wChannels = wavenc->channels; - wave.common.wBitsPerSample = wavenc->width; - wave.common.dwSamplesPerSec = wavenc->rate; - wave.common.wFormatTag = wavenc->format; - wave.common.wBlockAlign = (wavenc->width / 8) * wave.common.wChannels; - wave.common.dwAvgBytesPerSec = - wave.common.wBlockAlign * wave.common.dwSamplesPerSec; - - memcpy (wave.data.id, "data", 4); - wave.data.len = wavenc->audio_length; - - memcpy (header, (char *) wave.riff.id, 4); - GST_WRITE_UINT32_LE (header + 4, wave.riff.len); - memcpy (header + 8, (char *) wave.riff.wav_id, 4); - memcpy (header + 12, (char *) wave.format.id, 4); - GST_WRITE_UINT32_LE (header + 16, wave.format.len); - GST_WRITE_UINT16_LE (header + 20, wave.common.wFormatTag); - GST_WRITE_UINT16_LE (header + 22, wave.common.wChannels); - GST_WRITE_UINT32_LE (header + 24, wave.common.dwSamplesPerSec); - GST_WRITE_UINT32_LE (header + 28, wave.common.dwAvgBytesPerSec); - GST_WRITE_UINT16_LE (header + 32, wave.common.wBlockAlign); - GST_WRITE_UINT16_LE (header + 34, wave.common.wBitsPerSample); - memcpy (header + 36, (char *) wave.data.id, 4); - GST_WRITE_UINT32_LE (header + 40, wave.data.len); + riffLen = wavenc->meta_length + wavenc->audio_length + + get_header_len (wavenc) - 8; + + /* RIFF chunk */ + if (wavenc->use_rf64) { + GST_DEBUG_OBJECT (wavenc, "Using RF64"); + memcpy (header, "RF64", 4); + GST_WRITE_UINT32_LE (header + 4, 0xFFFFFFFF); + } else { + memcpy (header, "RIFF", 4); + GST_WRITE_UINT32_LE (header + 4, (guint32) riffLen); + } + memcpy (header + 8, "WAVE", 4); + header += RIFF_CHUNK_LEN; + + if (wavenc->use_rf64) + header = write_ds64_chunk (wavenc, riffLen, header); + + header = write_fmt_chunk (wavenc, header); + if (use_fact_chunk (wavenc)) + header = write_fact_chunk (wavenc, header); + + /* data chunk */ + memcpy (header, "data ", 4); + if (wavenc->use_rf64) + GST_WRITE_UINT32_LE (header + 4, 0xFFFFFFFF); + else + GST_WRITE_UINT32_LE (header + 4, (guint32) wavenc->audio_length); gst_buffer_unmap (buf, &map); @@ -264,10 +420,13 @@ /* seek to beginning of file */ gst_segment_init (&segment, GST_FORMAT_BYTES); - gst_pad_push_event (wavenc->srcpad, gst_event_new_segment (&segment)); + if (!gst_pad_push_event (wavenc->srcpad, gst_event_new_segment (&segment))) { + GST_WARNING_OBJECT (wavenc, "Seek to the beginning failed"); + return GST_FLOW_ERROR; + } - GST_DEBUG_OBJECT (wavenc, "writing header, meta_size=%u, audio_size=%u", - wavenc->meta_length, wavenc->audio_length); + GST_DEBUG_OBJECT (wavenc, "writing header, meta_size=%u, audio_size=%" + G_GUINT64_FORMAT, wavenc->meta_length, wavenc->audio_length); outbuf = gst_wavenc_create_header_buf (wavenc); GST_BUFFER_OFFSET (outbuf) = 0; @@ -313,11 +472,26 @@ goto fail; } + wavenc->channels = chans; + wavenc->rate = rate; + wavenc->channel_mask = 0; + if (strcmp (name, "audio/x-raw") == 0) { GstAudioInfo info; + guint64 gstmask; - if (!gst_audio_info_from_caps (&info, caps)) + if (!gst_audio_info_from_caps (&info, caps)) { + GST_WARNING_OBJECT (wavenc, "Could not retrieve audio info from caps"); goto fail; + } + if (gst_audio_channel_positions_to_mask (info.position, wavenc->channels, + FALSE, &gstmask)) { + wavenc->channel_mask = gstmask_to_wavmask (gstmask, wavenc->destPos); + memcpy (wavenc->srcPos, info.position, sizeof (info.position)); + GST_DEBUG_OBJECT (wavenc, "Channel mask input: 0x%" G_GINT64_MODIFIER "x" + " output: 0x%" G_GINT64_MODIFIER "x", gstmask, wavenc->channel_mask); + } + wavenc->audio_format = GST_AUDIO_INFO_FORMAT (&info); if (GST_AUDIO_INFO_IS_INTEGER (&info)) wavenc->format = GST_RIFF_WAVE_FORMAT_PCM; @@ -338,9 +512,6 @@ goto fail; } - wavenc->channels = chans; - wavenc->rate = rate; - GST_LOG_OBJECT (wavenc, "accepted caps: format=0x%04x chans=%u width=%u rate=%u", wavenc->format, wavenc->channels, wavenc->width, wavenc->rate); @@ -854,6 +1025,19 @@ } if (G_UNLIKELY (!wavenc->sent_header)) { + GstStructure *s; + GstCaps *caps = gst_pad_get_allowed_caps (wavenc->srcpad); + + GST_DEBUG_OBJECT (wavenc, "allowed src caps: %" GST_PTR_FORMAT, caps); + if (!gst_caps_is_fixed (caps)) { + caps = gst_caps_truncate (caps); + } + s = gst_caps_get_structure (caps, 0); + wavenc->use_rf64 = gst_structure_has_name (s, "audio/x-rf64"); + + gst_pad_set_caps (wavenc->srcpad, caps); + gst_caps_unref (caps); + /* starting a file, means we have to finish it properly */ wavenc->finished_properly = FALSE; @@ -875,11 +1059,17 @@ buf = gst_buffer_make_writable (buf); - GST_BUFFER_OFFSET (buf) = WAV_HEADER_LEN + wavenc->audio_length; + GST_BUFFER_OFFSET (buf) = get_header_len (wavenc) + wavenc->audio_length; GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET_NONE; wavenc->audio_length += gst_buffer_get_size (buf); + if (wavenc->channel_mask != 0 && + !gst_audio_buffer_reorder_channels (buf, wavenc->audio_format, + wavenc->channels, wavenc->srcPos, wavenc->destPos)) { + GST_WARNING_OBJECT (wavenc, "Could not reorder channels"); + } + flow = gst_pad_push (wavenc->srcpad, buf); return flow; diff -Nru gst-plugins-good1.0-1.4.3/gst/wavenc/gstwavenc.h gst-plugins-good1.0-1.6.1/gst/wavenc/gstwavenc.h --- gst-plugins-good1.0-1.4.3/gst/wavenc/gstwavenc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavenc/gstwavenc.h 2015-10-22 08:02:54.000000000 +0000 @@ -23,6 +23,7 @@ #include +#include G_BEGIN_DECLS @@ -53,15 +54,20 @@ GList *notes; /* useful audio data */ + GstAudioFormat audio_format; guint16 format; guint width; guint rate; guint channels; + guint64 channel_mask; + GstAudioChannelPosition srcPos[64]; + GstAudioChannelPosition destPos[64]; /* data sizes */ - guint32 audio_length; + guint64 audio_length; guint32 meta_length; + gboolean use_rf64; gboolean sent_header; gboolean finished_properly; }; diff -Nru gst-plugins-good1.0-1.4.3/gst/wavenc/Makefile.am gst-plugins-good1.0-1.6.1/gst/wavenc/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/wavenc/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavenc/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -15,17 +15,3 @@ libgstwavenc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstwavenc.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstwavenc -:SHARED libgstwavenc \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstwavenc_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavenc_la_CFLAGS) \ - -:LDFLAGS $(libgstwavenc_la_LDFLAGS) \ - $(libgstwavenc_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/wavenc/Makefile.in gst-plugins-good1.0-1.6.1/gst/wavenc/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/wavenc/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavenc/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/wavenc -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -586,7 +594,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/wavenc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/wavenc/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -895,20 +902,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstwavenc -:SHARED libgstwavenc \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstwavenc_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavenc_la_CFLAGS) \ - -:LDFLAGS $(libgstwavenc_la_LDFLAGS) \ - $(libgstwavenc_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/wavparse/gstwavparse.c gst-plugins-good1.0-1.6.1/gst/wavparse/gstwavparse.c --- gst-plugins-good1.0-1.4.3/gst/wavparse/gstwavparse.c 2014-09-13 13:48:32.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavparse/gstwavparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -59,6 +59,8 @@ GST_DEBUG_CATEGORY_STATIC (wavparse_debug); #define GST_CAT_DEFAULT (wavparse_debug) +#define GST_RIFF_TAG_Fake GST_MAKE_FOURCC ('F','a','k','e') + #define GST_BWF_TAG_iXML GST_MAKE_FOURCC ('i','X','M','L') #define GST_BWF_TAG_qlty GST_MAKE_FOURCC ('q','l','t','y') #define GST_BWF_TAG_mext GST_MAKE_FOURCC ('m','e','x','t') @@ -66,6 +68,10 @@ #define GST_BWF_TAG_link GST_MAKE_FOURCC ('l','i','n','k') #define GST_BWF_TAG_axml GST_MAKE_FOURCC ('a','x','m','l') +/* Data size chunk of RF64, + * see http://tech.ebu.ch/docs/tech/tech3306-2009.pdf */ +#define GST_RS64_TAG_DS64 GST_MAKE_FOURCC ('d','s','6','4') + static void gst_wavparse_dispose (GObject * object); static gboolean gst_wavparse_sink_activate (GstPad * sinkpad, @@ -344,8 +350,7 @@ *bytepos = gst_util_uint64_scale_ceil (ts, (guint64) wav->bps, GST_SECOND); return TRUE; } else if (wav->fact) { - guint64 bps = - gst_util_uint64_scale_int (wav->datasize, wav->rate, wav->fact); + guint64 bps = gst_util_uint64_scale (wav->datasize, wav->rate, wav->fact); *bytepos = gst_util_uint64_scale_ceil (ts, bps, GST_SECOND); return TRUE; } @@ -693,7 +698,7 @@ return TRUE; } else if (wav->fact) { wav->duration = - gst_util_uint64_scale_int_ceil (GST_SECOND, wav->fact, wav->rate); + gst_util_uint64_scale_ceil (GST_SECOND, wav->fact, wav->rate); GST_INFO_OBJECT (wav, "Got duration (fact) %" GST_TIME_FORMAT, GST_TIME_ARGS (wav->duration)); return TRUE; @@ -1030,6 +1035,31 @@ #define MAX_BUFFER_SIZE 4096 +static gboolean +parse_ds64 (GstWavParse * wav, GstBuffer * buf) +{ + GstMapInfo map; + guint32 dataSizeLow, dataSizeHigh; + guint32 sampleCountLow, sampleCountHigh; + + gst_buffer_map (buf, &map, GST_MAP_READ); + dataSizeLow = GST_READ_UINT32_LE (map.data + 2 * 4); + dataSizeHigh = GST_READ_UINT32_LE (map.data + 3 * 4); + sampleCountLow = GST_READ_UINT32_LE (map.data + 4 * 4); + sampleCountHigh = GST_READ_UINT32_LE (map.data + 5 * 4); + gst_buffer_unmap (buf, &map); + if (dataSizeHigh != 0xFFFFFFFF && dataSizeLow != 0xFFFFFFFF) { + wav->datasize = ((guint64) dataSizeHigh << 32) | dataSizeLow; + } + if (sampleCountHigh != 0xFFFFFFFF && sampleCountLow != 0xFFFFFFFF) { + wav->fact = ((guint64) sampleCountHigh << 32) | sampleCountLow; + } + + GST_DEBUG_OBJECT (wav, "Got 'ds64' TAG, datasize : %" G_GINT64_FORMAT + " fact: %" G_GINT64_FORMAT, wav->datasize, wav->fact); + return TRUE; +} + static GstFlowReturn gst_wavparse_stream_headers (GstWavParse * wav) { @@ -1076,7 +1106,8 @@ tag == GST_RIFF_TAG_id3 || tag == GST_RIFF_TAG_IDVX || tag == GST_BWF_TAG_iXML || tag == GST_BWF_TAG_qlty || tag == GST_BWF_TAG_mext || tag == GST_BWF_TAG_levl || - tag == GST_BWF_TAG_link || tag == GST_BWF_TAG_axml) { + tag == GST_BWF_TAG_link || tag == GST_BWF_TAG_axml || + tag == GST_RIFF_TAG_Fake) { GST_DEBUG_OBJECT (wav, "skipping %" GST_FOURCC_FORMAT " chunk", GST_FOURCC_ARGS (tag)); gst_buffer_unref (buf); @@ -1084,6 +1115,13 @@ continue; } + if (tag == GST_RS64_TAG_DS64) { + if (!parse_ds64 (wav, buf)) + goto fail; + else + continue; + } + if (tag != GST_RIFF_TAG_fmt) goto invalid_wav; @@ -1223,18 +1261,33 @@ } GST_INFO_OBJECT (wav, - "Got TAG: %" GST_FOURCC_FORMAT ", offset %" G_GUINT64_FORMAT, - GST_FOURCC_ARGS (tag), wav->offset); + "Got TAG: %" GST_FOURCC_FORMAT ", offset %" G_GUINT64_FORMAT ", size %" + G_GUINT32_FORMAT, GST_FOURCC_ARGS (tag), wav->offset, size); + + /* Maximum valid size is INT_MAX */ + if (size & 0x80000000) { + GST_WARNING_OBJECT (wav, "Invalid size, clipping to 0x7fffffff"); + size = 0x7fffffff; + } + + /* Clip to upstream size if known */ + if (wav->datasize > 0 && size + wav->offset > wav->datasize) { + GST_WARNING_OBJECT (wav, "Clipping chunk size to file size"); + size = wav->datasize - wav->offset; + } /* wav is a st00pid format, we don't know for sure where data starts. * So we have to go bit by bit until we find the 'data' header */ switch (tag) { case GST_RIFF_TAG_data:{ + guint64 size64; + GST_DEBUG_OBJECT (wav, "Got 'data' TAG, size : %u", size); + size64 = size; if (wav->ignore_length) { GST_DEBUG_OBJECT (wav, "Ignoring length"); - size = 0; + size64 = 0; } if (wav->streaming) { gst_adapter_flush (wav->adapter, 8); @@ -1244,27 +1297,33 @@ } wav->offset += 8; wav->datastart = wav->offset; + /* use size from ds64 chunk if available */ + if (size64 == -1 && wav->datasize > 0) { + GST_DEBUG_OBJECT (wav, "Using ds64 datasize"); + size64 = wav->datasize; + } /* If size is zero, then the data chunk probably actually extends to the end of the file */ - if (size == 0 && upstream_size) { - size = upstream_size - wav->datastart; + if (size64 == 0 && upstream_size) { + size64 = upstream_size - wav->datastart; } /* Or the file might be truncated */ else if (upstream_size) { - size = MIN (size, (upstream_size - wav->datastart)); + size64 = MIN (size64, (upstream_size - wav->datastart)); } - wav->datasize = (guint64) size; - wav->dataleft = (guint64) size; - wav->end_offset = size + wav->datastart; + wav->datasize = size64; + wav->dataleft = size64; + wav->end_offset = size64 + wav->datastart; if (!wav->streaming) { /* We will continue parsing tags 'till end */ - wav->offset += size; + wav->offset += size64; } - GST_DEBUG_OBJECT (wav, "datasize = %u", size); + GST_DEBUG_OBJECT (wav, "datasize = %" G_GUINT64_FORMAT, size64); break; } case GST_RIFF_TAG_fact:{ - if (wav->format != GST_RIFF_WAVE_FORMAT_MPEGL12 && + if (wav->fact == 0 && + wav->format != GST_RIFF_WAVE_FORMAT_MPEGL12 && wav->format != GST_RIFF_WAVE_FORMAT_MPEGL3) { const guint data_size = 4; @@ -1301,7 +1360,7 @@ wav->fact = GUINT32_FROM_LE (wav->fact); gst_buffer_unref (buf); } - GST_DEBUG_OBJECT (wav, "have fact %u", wav->fact); + GST_DEBUG_OBJECT (wav, "have fact %" G_GUINT64_FORMAT, wav->fact); wav->offset += 8 + GST_ROUND_UP_2 (size); break; } else { @@ -1780,12 +1839,16 @@ s = gst_caps_get_structure (caps, 0); if (!gst_structure_has_name (s, "audio/x-dts")) return FALSE; - if (prob >= GST_TYPE_FIND_LIKELY) + /* typefind behavior for DTS: + * MAXIMUM: multiple frame syncs detected, certainly DTS + * LIKELY: single frame sync at offset 0. Maybe DTS? + * POSSIBLE: single frame sync, not at offset 0. Highly unlikely + * to be DTS. */ + if (prob > GST_TYPE_FIND_LIKELY) return TRUE; - /* DTS at non-0 offsets and without second sync may yield POSSIBLE .. */ - if (prob < GST_TYPE_FIND_POSSIBLE) + if (prob <= GST_TYPE_FIND_POSSIBLE) return FALSE; - /* .. in which case we want at least a valid-looking rate and channels */ + /* for maybe, check for at least a valid-looking rate and channels */ if (!gst_structure_has_field (s, "channels")) return FALSE; /* and for extra assurance we could also check the rate from the DTS frame @@ -2301,8 +2364,8 @@ } if (stop > 0) { end_offset = stop; - segment.stop -= wav->datastart; - segment.stop = MAX (stop, 0); + stop -= wav->datastart; + stop = MAX (stop, 0); } if (wav->segment.format == GST_FORMAT_TIME) { guint64 bps = wav->bps; @@ -2400,7 +2463,7 @@ static const GstFormat * gst_wavparse_get_formats (GstPad * pad) { - static GstFormat formats[] = { + static const GstFormat formats[] = { GST_FORMAT_TIME, GST_FORMAT_BYTES, GST_FORMAT_DEFAULT, /* a "frame", ie a set of samples per Hz */ diff -Nru gst-plugins-good1.0-1.4.3/gst/wavparse/gstwavparse.h gst-plugins-good1.0-1.6.1/gst/wavparse/gstwavparse.h --- gst-plugins-good1.0-1.4.3/gst/wavparse/gstwavparse.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavparse/gstwavparse.h 2015-10-22 08:02:54.000000000 +0000 @@ -86,7 +86,7 @@ guint16 blockalign; guint16 width; guint32 av_bps; - guint32 fact; + guint64 fact; /* real bps used or 0 when no bitrate is known */ guint32 bps; diff -Nru gst-plugins-good1.0-1.4.3/gst/wavparse/Makefile.am gst-plugins-good1.0-1.6.1/gst/wavparse/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/wavparse/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavparse/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -17,17 +17,3 @@ libgstwavparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gstwavparse.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstwavparse -:SHARED libgstwavparse \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstwavparse_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavparse_la_CFLAGS) \ - -:LDFLAGS $(libgstwavparse_la_LDFLAGS) \ - $(libgstwavparse_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/wavparse/Makefile.in gst-plugins-good1.0-1.6.1/gst/wavparse/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/wavparse/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/wavparse/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/wavparse -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +236,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -359,9 +369,6 @@ 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@ @@ -479,17 +486,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -542,6 +549,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -589,7 +597,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/wavparse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/wavparse/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -898,20 +905,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstwavparse -:SHARED libgstwavparse \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstwavparse_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavparse_la_CFLAGS) \ - -:LDFLAGS $(libgstwavparse_la_LDFLAGS) \ - $(libgstwavparse_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. diff -Nru gst-plugins-good1.0-1.4.3/gst/y4m/gsty4mencode.c gst-plugins-good1.0-1.6.1/gst/y4m/gsty4mencode.c --- gst-plugins-good1.0-1.4.3/gst/y4m/gsty4mencode.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/y4m/gsty4mencode.c 2015-10-22 08:02:54.000000000 +0000 @@ -28,7 +28,7 @@ * * (write everything in one line, without the backslash characters) * - * gst-launch-0.10 videotestsrc num-buffers=250 \ + * gst-launch-1.0 videotestsrc num-buffers=250 \ * ! 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' \ * ! y4menc ! filesink location=test.yuv * @@ -56,7 +56,7 @@ enum { - ARG_0 + PROP_0 }; static GstStaticPadTemplate y4mencode_src_factory = @@ -76,52 +76,45 @@ static void gst_y4m_encode_reset (GstY4mEncode * filter); -static gboolean gst_y4m_encode_sink_event (GstPad * pad, GstObject * parent, - GstEvent * event); -static GstFlowReturn gst_y4m_encode_chain (GstPad * pad, GstObject * parent, - GstBuffer * buf); static GstStateChangeReturn gst_y4m_encode_change_state (GstElement * element, GstStateChange transition); +static GstFlowReturn +gst_y4m_encode_handle_frame (GstVideoEncoder * encoder, + GstVideoCodecFrame * frame); +static gboolean gst_y4m_encode_set_format (GstVideoEncoder * encoder, + GstVideoCodecState * state); + #define gst_y4m_encode_parent_class parent_class -G_DEFINE_TYPE (GstY4mEncode, gst_y4m_encode, GST_TYPE_ELEMENT); +G_DEFINE_TYPE (GstY4mEncode, gst_y4m_encode, GST_TYPE_VIDEO_ENCODER); + static void gst_y4m_encode_class_init (GstY4mEncodeClass * klass) { - GstElementClass *gstelement_class; + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + GstVideoEncoderClass *venc_class = GST_VIDEO_ENCODER_CLASS (klass); - gstelement_class = (GstElementClass *) klass; + element_class->change_state = GST_DEBUG_FUNCPTR (gst_y4m_encode_change_state); - gstelement_class->change_state = - GST_DEBUG_FUNCPTR (gst_y4m_encode_change_state); - - gst_element_class_add_pad_template (gstelement_class, + gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&y4mencode_src_factory)); - gst_element_class_add_pad_template (gstelement_class, + gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&y4mencode_sink_factory)); - gst_element_class_set_static_metadata (gstelement_class, + gst_element_class_set_static_metadata (element_class, "YUV4MPEG video encoder", "Codec/Encoder/Video", "Encodes a YUV frame into the yuv4mpeg format (mjpegtools)", "Wim Taymans "); + venc_class->set_format = gst_y4m_encode_set_format; + venc_class->handle_frame = gst_y4m_encode_handle_frame; + } static void gst_y4m_encode_init (GstY4mEncode * filter) { - filter->sinkpad = - gst_pad_new_from_static_template (&y4mencode_sink_factory, "sink"); - gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); - gst_pad_set_chain_function (filter->sinkpad, - GST_DEBUG_FUNCPTR (gst_y4m_encode_chain)); - gst_pad_set_event_function (filter->sinkpad, - GST_DEBUG_FUNCPTR (gst_y4m_encode_sink_event)); - - filter->srcpad = - gst_pad_new_from_static_template (&y4mencode_src_factory, "src"); - gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); - gst_pad_use_fixed_caps (filter->srcpad); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (filter)); /* init properties */ gst_y4m_encode_reset (filter); @@ -130,76 +123,52 @@ static void gst_y4m_encode_reset (GstY4mEncode * filter) { - filter->negotiated = FALSE; + filter->header = FALSE; } static gboolean -gst_y4m_encode_setcaps (GstPad * pad, GstCaps * vscaps) +gst_y4m_encode_set_format (GstVideoEncoder * encoder, + GstVideoCodecState * state) { - gboolean ret; - GstY4mEncode *filter; - GstVideoInfo info; - - filter = GST_Y4M_ENCODE (GST_PAD_PARENT (pad)); + GstY4mEncode *y4menc; + GstVideoInfo *info; + GstVideoCodecState *output_state; - if (!gst_video_info_from_caps (&info, vscaps)) - goto invalid_format; + y4menc = GST_Y4M_ENCODE (encoder); + info = &state->info; - switch (GST_VIDEO_INFO_FORMAT (&info)) { + switch (GST_VIDEO_INFO_FORMAT (info)) { case GST_VIDEO_FORMAT_I420: - filter->colorspace = "420"; + y4menc->colorspace = "420"; break; case GST_VIDEO_FORMAT_Y42B: - filter->colorspace = "422"; + y4menc->colorspace = "422"; break; case GST_VIDEO_FORMAT_Y41B: - filter->colorspace = "411"; + y4menc->colorspace = "411"; break; case GST_VIDEO_FORMAT_Y444: - filter->colorspace = "444"; + y4menc->colorspace = "444"; break; default: goto invalid_format; } - filter->info = info; + y4menc->info = *info; - /* the template caps will do for the src pad, should always accept */ - ret = gst_pad_set_caps (filter->srcpad, - gst_static_pad_template_get_caps (&y4mencode_src_factory)); + output_state = + gst_video_encoder_set_output_state (encoder, + gst_static_pad_template_get_caps (&y4mencode_src_factory), state); + gst_video_codec_state_unref (output_state); - filter->negotiated = ret; + return TRUE; - return ret; - - /* ERRORS */ invalid_format: { - GST_ERROR_OBJECT (filter, "got invalid caps"); + GST_ERROR_OBJECT (y4menc, "Invalid format"); return FALSE; } -} - -static gboolean -gst_y4m_encode_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) -{ - gboolean res; - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - res = gst_y4m_encode_setcaps (pad, caps); - gst_event_unref (event); - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - return res; } static inline GstBuffer * @@ -252,47 +221,52 @@ return buf; } + static GstFlowReturn -gst_y4m_encode_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) +gst_y4m_encode_handle_frame (GstVideoEncoder * encoder, + GstVideoCodecFrame * frame) { - GstY4mEncode *filter = GST_Y4M_ENCODE (parent); - GstBuffer *outbuf; + GstY4mEncode *filter = GST_Y4M_ENCODE (encoder); GstClockTime timestamp; /* check we got some decent info from caps */ if (GST_VIDEO_INFO_FORMAT (&filter->info) == GST_VIDEO_FORMAT_UNKNOWN) goto not_negotiated; - timestamp = GST_BUFFER_TIMESTAMP (buf); + timestamp = GST_BUFFER_TIMESTAMP (frame->input_buffer); if (G_UNLIKELY (!filter->header)) { gboolean tff = FALSE; if (GST_VIDEO_INFO_IS_INTERLACED (&filter->info)) { - tff = GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_FLAG_TFF); + tff = + GST_BUFFER_FLAG_IS_SET (frame->input_buffer, + GST_VIDEO_BUFFER_FLAG_TFF); } - outbuf = gst_y4m_encode_get_stream_header (filter, tff); + frame->output_buffer = gst_y4m_encode_get_stream_header (filter, tff); filter->header = TRUE; - outbuf = - gst_buffer_append (outbuf, gst_y4m_encode_get_frame_header (filter)); + frame->output_buffer = + gst_buffer_append (frame->output_buffer, + gst_y4m_encode_get_frame_header (filter)); } else { - outbuf = gst_y4m_encode_get_frame_header (filter); + frame->output_buffer = gst_y4m_encode_get_frame_header (filter); } - /* join with data, FIXME, strides are all wrong etc */ - outbuf = gst_buffer_append (outbuf, buf); - /* decorate */ - outbuf = gst_buffer_make_writable (outbuf); - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + frame->output_buffer = + gst_buffer_append (frame->output_buffer, + gst_buffer_copy (frame->input_buffer)); - return gst_pad_push (filter->srcpad, outbuf); + /* decorate */ + frame->output_buffer = gst_buffer_make_writable (frame->output_buffer); + GST_BUFFER_TIMESTAMP (frame->output_buffer) = timestamp; + + return gst_video_encoder_finish_frame (encoder, frame); - /* ERRORS */ not_negotiated: { GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION, (NULL), - ("format wasn't negotiated before chain function")); - gst_buffer_unref (buf); + ("format wasn't negotiated")); + return GST_FLOW_NOT_NEGOTIATED; } } diff -Nru gst-plugins-good1.0-1.4.3/gst/y4m/gsty4mencode.h gst-plugins-good1.0-1.6.1/gst/y4m/gsty4mencode.h --- gst-plugins-good1.0-1.4.3/gst/y4m/gsty4mencode.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/y4m/gsty4mencode.h 2015-10-22 08:02:54.000000000 +0000 @@ -43,13 +43,10 @@ typedef struct _GstY4mEncodeClass GstY4mEncodeClass; struct _GstY4mEncode { - GstElement element; - - GstPad *sinkpad,*srcpad; + GstVideoEncoder parent; /* caps information */ GstVideoInfo info; - gboolean negotiated; const gchar *colorspace; /* state information */ @@ -57,7 +54,7 @@ }; struct _GstY4mEncodeClass { - GstElementClass parent_class; + GstVideoEncoderClass parent_class; }; GType gst_y4m_encode_get_type(void); diff -Nru gst-plugins-good1.0-1.4.3/gst/y4m/Makefile.am gst-plugins-good1.0-1.6.1/gst/y4m/Makefile.am --- gst-plugins-good1.0-1.4.3/gst/y4m/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/y4m/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -8,17 +8,3 @@ libgsty4menc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = gsty4mencode.h - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgsty4menc -:SHARED libgsty4menc \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgsty4menc_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsty4menc_la_CFLAGS) \ - -:LDFLAGS $(libgsty4menc_la_LDFLAGS) \ - $(libgsty4menc_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff -Nru gst-plugins-good1.0-1.4.3/gst/y4m/Makefile.in gst-plugins-good1.0-1.6.1/gst/y4m/Makefile.in --- gst-plugins-good1.0-1.4.3/gst/y4m/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst/y4m/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = gst/y4m -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -226,6 +235,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -358,9 +368,6 @@ 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@ @@ -478,17 +485,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -541,6 +548,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -576,7 +584,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/y4m/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/y4m/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -885,20 +892,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgsty4menc -:SHARED libgsty4menc \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgsty4menc_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsty4menc_la_CFLAGS) \ - -:LDFLAGS $(libgsty4menc_la_LDFLAGS) \ - $(libgsty4menc_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. diff -Nru gst-plugins-good1.0-1.4.3/gst-plugins-good.doap gst-plugins-good1.0-1.6.1/gst-plugins-good.doap --- gst-plugins-good1.0-1.4.3/gst-plugins-good.doap 2014-09-24 07:25:30.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst-plugins-good.doap 2015-10-30 12:10:05.000000000 +0000 @@ -34,31 +34,61 @@ - 1.4.3 - 1.4 + 1.6.1 + 1.6 - 2014-09-24 - + 2015-10-30 + - 1.4.2 - 1.4 + 1.6.0 + 1.6 - 2014-09-19 - + 2015-09-25 + - 1.4.1 - 1.4 + 1.5.91 + 1.5 - 2014-08-27 - + 2015-09-18 + + + + + + + 1.5.90 + 1.5 + + 2015-08-19 + + + + + + + 1.5.2 + 1.5 + + 2015-06-24 + + + + + + + 1.5.1 + 1.5 + + 2015-06-07 + diff -Nru gst-plugins-good1.0-1.4.3/gst-plugins-good.spec gst-plugins-good1.0-1.6.1/gst-plugins-good.spec --- gst-plugins-good1.0-1.4.3/gst-plugins-good.spec 2014-09-24 07:26:18.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/gst-plugins-good.spec 2015-10-30 12:10:23.000000000 +0000 @@ -4,7 +4,7 @@ %define gst_minver 0.11.0 Name: %{gstreamer}-plugins-good -Version: 1.4.3 +Version: 1.6.1 Release: 1.gst Summary: GStreamer plug-ins with good code and licensing diff -Nru gst-plugins-good1.0-1.4.3/INSTALL gst-plugins-good1.0-1.6.1/INSTALL --- gst-plugins-good1.0-1.4.3/INSTALL 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/INSTALL 2015-10-30 12:10:14.000000000 +0000 @@ -1,48 +1,80 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + Basic Installation ================== - These are generic installation instructions. + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -51,62 +83,119 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + Compilers and Options ===================== Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. Installation Names ================== - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular +options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -119,25 +208,80 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + CPU-COMPANY-SYSTEM -See the file `config.sub' for the possible values of each field. If +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't -need to know the host type. +need to know the machine type. - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. Sharing Defaults ================ @@ -150,19 +294,56 @@ `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. -Operation Controls +Defining Variables ================== + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + `configure' recognizes the following options to control how it operates. -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - `--help' - Print a summary of the options to `configure', and exit. +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. `--quiet' `--silent' @@ -175,8 +356,15 @@ Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. -`configure' also accepts some other, not widely useful, options. +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff -Nru gst-plugins-good1.0-1.4.3/install-sh gst-plugins-good1.0-1.6.1/install-sh --- gst-plugins-good1.0-1.4.3/install-sh 2014-08-27 10:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/install-sh 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,81 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +377,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +456,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +474,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -Nru gst-plugins-good1.0-1.4.3/ltmain.sh gst-plugins-good1.0-1.6.1/ltmain.sh --- gst-plugins-good1.0-1.4.3/ltmain.sh 2014-09-24 07:25:49.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/ltmain.sh 2015-10-30 12:10:10.000000000 +0000 @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.10 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.10" +VERSION="2.4.2 Debian-2.4.2-1.11" TIMESTAMP="" package_revision=1.3337 diff -Nru gst-plugins-good1.0-1.4.3/m4/libmikmod.m4 gst-plugins-good1.0-1.6.1/m4/libmikmod.m4 --- gst-plugins-good1.0-1.4.3/m4/libmikmod.m4 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/m4/libmikmod.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,216 +0,0 @@ -# Configure paths for libmikmod -# -# Derived from glib.m4 (Owen Taylor 97-11-3) -# Improved by Chris Butler -# - -dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) -dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and -dnl LIBMIKMOD_LDADD -dnl -AC_DEFUN([AM_PATH_LIBMIKMOD], -[dnl -dnl Get the cflags and libraries from the libmikmod-config script -dnl -AC_ARG_WITH(libmikmod-prefix, - AC_HELP_STRING([--with-libmikmod-prefix=PFX], - [prefix where libmikmod is installed (optional)]), - libmikmod_config_prefix="$withval", libmikmod_config_prefix="") - -AC_ARG_WITH(libmikmod-exec-prefix, - AC_HELP_STRING([--with-libmikmod-exec-prefix=PFX], - [exec prefix where libmikmod is installed (optional)]), - libmikmod_config_exec_prefix="$withval", libmikmod_config_exec_prefix="") - -AC_ARG_ENABLE(libmikmodtest, - AC_HELP_STRING([--disable-libmikmodtest], - [Do not try to compile and run a test libmikmod program]), - , enable_libmikmodtest=yes) - - if test x$libmikmod_config_exec_prefix != x ; then - libmikmod_config_args="$libmikmod_config_args --exec-prefix=$libmikmod_config_exec_prefix" - if test x${LIBMIKMOD_CONFIG+set} != xset ; then - LIBMIKMOD_CONFIG=$libmikmod_config_exec_prefix/bin/libmikmod-config - fi - fi - if test x$libmikmod_config_prefix != x ; then - libmikmod_config_args="$libmikmod_config_args --prefix=$libmikmod_config_prefix" - if test x${LIBMIKMOD_CONFIG+set} != xset ; then - LIBMIKMOD_CONFIG=$libmikmod_config_prefix/bin/libmikmod-config - fi - fi - - AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no) - min_libmikmod_version=ifelse([$1], ,3.1.5,$1) - AC_MSG_CHECKING(for libmikmod - version >= $min_libmikmod_version) - no_libmikmod="" - if test "$LIBMIKMOD_CONFIG" = "no" ; then - no_libmikmod=yes - else - LIBMIKMOD_CFLAGS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --cflags` - LIBMIKMOD_LIBS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --libs` - LIBMIKMOD_LDADD=`$LIBMIKMOD_CONFIG $libmikmod_config_args --ldadd` - libmikmod_config_major_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` - libmikmod_config_minor_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` - libmikmod_config_micro_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` - if test "x$enable_libmikmodtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - AC_LANG_SAVE - AC_LANG_C - CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS $LIBMIKMOD_LDADD" - LIBS="$LIBMIKMOD_LIBS $LIBS" -dnl -dnl Now check if the installed libmikmod is sufficiently new. (Also sanity -dnl checks the results of libmikmod-config to some extent -dnl - rm -f conf.mikmodtest - AC_TRY_RUN([ -#include -#include -#include -#include - -char* my_strdup (char *str) -{ - char *new_str; - - if (str) { - new_str = malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } else - new_str = NULL; - - return new_str; -} - -int main() -{ - int major,minor,micro; - int libmikmod_major_version,libmikmod_minor_version,libmikmod_micro_version; - char *tmp_version; - - system("touch conf.mikmodtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_libmikmod_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_libmikmod_version"); - exit(1); - } - - libmikmod_major_version=(MikMod_GetVersion() >> 16) & 255; - libmikmod_minor_version=(MikMod_GetVersion() >> 8) & 255; - libmikmod_micro_version=(MikMod_GetVersion() ) & 255; - - if ((libmikmod_major_version != $libmikmod_config_major_version) || - (libmikmod_minor_version != $libmikmod_config_minor_version) || - (libmikmod_micro_version != $libmikmod_config_micro_version)) - { - printf("\n*** 'libmikmod-config --version' returned %d.%d.%d, but libmikmod (%d.%d.%d)\n", - $libmikmod_config_major_version, $libmikmod_config_minor_version, $libmikmod_config_micro_version, - libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version); - printf ("*** was found! If libmikmod-config was correct, then it is best\n"); - printf ("*** to remove the old version of libmikmod. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If libmikmod-config was wrong, set the environment variable LIBMIKMOD_CONFIG\n"); - printf("*** to point to the correct copy of libmikmod-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } - else if ((libmikmod_major_version != LIBMIKMOD_VERSION_MAJOR) || - (libmikmod_minor_version != LIBMIKMOD_VERSION_MINOR) || - (libmikmod_micro_version != LIBMIKMOD_REVISION)) - { - printf("*** libmikmod header files (version %ld.%ld.%ld) do not match\n", - LIBMIKMOD_VERSION_MAJOR, LIBMIKMOD_VERSION_MINOR, LIBMIKMOD_REVISION); - printf("*** library (version %d.%d.%d)\n", - libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version); - } - else - { - if ((libmikmod_major_version > major) || - ((libmikmod_major_version == major) && (libmikmod_minor_version > minor)) || - ((libmikmod_major_version == major) && (libmikmod_minor_version == minor) && (libmikmod_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of libmikmod (%d.%d.%d) was found.\n", - libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version); - printf("*** You need a version of libmikmod newer than %d.%d.%d.\n", - major, minor, micro); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the libmikmod-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of libmikmod, but you can also set the LIBMIKMOD_CONFIG environment to point to the\n"); - printf("*** correct copy of libmikmod-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_libmikmod=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - AC_LANG_RESTORE - fi - fi - if test "x$no_libmikmod" = x ; then - AC_MSG_RESULT([yes, `$LIBMIKMOD_CONFIG --version`]) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$LIBMIKMOD_CONFIG" = "no" ; then - echo "*** The libmikmod-config script installed by libmikmod could not be found" - echo "*** If libmikmod was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the LIBMIKMOD_CONFIG environment variable to the" - echo "*** full path to libmikmod-config." - else - if test -f conf.mikmodtest ; then - : - else - echo "*** Could not run libmikmod test program, checking why..." - CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS" - LIBS="$LIBS $LIBMIKMOD_LIBS" - AC_LANG_SAVE - AC_LANG_C - AC_TRY_LINK([ -#include -#include -], [ return (MikMod_GetVersion()!=0); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding libmikmod or finding the wrong" - echo "*** version of libmikmod. If it is not finding libmikmod, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location. Also, make sure you have run ldconfig if that" - echo "*** is required on your system." - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means libmikmod was incorrectly installed" - echo "*** or that you have moved libmikmod since it was installed. In the latter case, you" - echo "*** may want to edit the libmikmod-config script: $LIBMIKMOD_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - AC_LANG_RESTORE - fi - fi - LIBMIKMOD_CFLAGS="" - LIBMIKMOD_LIBS="" - LIBMIKMOD_LDADD="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(LIBMIKMOD_CFLAGS) - AC_SUBST(LIBMIKMOD_LIBS) - AC_SUBST(LIBMIKMOD_LDADD) - rm -f conf.mikmodtest -]) diff -Nru gst-plugins-good1.0-1.4.3/m4/Makefile.am gst-plugins-good1.0-1.6.1/m4/Makefile.am --- gst-plugins-good1.0-1.4.3/m4/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/m4/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -27,7 +27,6 @@ libfame.m4 \ lib-ld.m4 \ lib-link.m4 \ - libmikmod.m4 \ lib-prefix.m4 \ ogg.m4 \ progtest.m4 \ diff -Nru gst-plugins-good1.0-1.4.3/m4/Makefile.in gst-plugins-good1.0-1.6.1/m4/Makefile.in --- gst-plugins-good1.0-1.4.3/m4/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/m4/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,7 +89,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = m4 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README 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 \ @@ -101,7 +110,6 @@ $(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 \ @@ -116,6 +124,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -140,6 +149,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -272,9 +282,6 @@ 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@ @@ -392,17 +399,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -455,6 +462,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -496,7 +504,6 @@ libfame.m4 \ lib-ld.m4 \ lib-link.m4 \ - libmikmod.m4 \ lib-prefix.m4 \ ogg.m4 \ progtest.m4 \ @@ -519,7 +526,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -694,6 +700,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/Makefile.am gst-plugins-good1.0-1.6.1/Makefile.am --- gst-plugins-good1.0-1.4.3/Makefile.am 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -35,14 +35,18 @@ include $(top_srcdir)/common/po.mak check-valgrind: - cd tests/check && make check-valgrind + $(MAKE) -C tests/check check-valgrind if HAVE_GST_CHECK check-torture: - cd tests/check && make torture + $(MAKE) -C tests/check torture +build-checks: + $(MAKE) -C tests/check build-checks else check-torture: true +build-checks: + true endif win32-update: @@ -64,6 +68,7 @@ $(top_builddir)/gst/videofilter/.libs/*gamma.{so,dll,DLL,dylib} CRUFT_DIRS = \ + $(top_srcdir)/docs/plugins/tmpl \ $(top_srcdir)/gst/median \ $(top_srcdir)/gst/qtdemux \ $(top_srcdir)/gst/quicktime \ diff -Nru gst-plugins-good1.0-1.4.3/Makefile.in gst-plugins-good1.0-1.6.1/Makefile.in --- gst-plugins-good1.0-1.4.3/Makefile.in 2014-09-24 07:25:54.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/Makefile.in 2015-10-30 12:10:14.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,17 @@ # set CRUFT_FILES and/or CRUFT_DIRS in your Makefile.am when you include this VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -90,15 +100,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/win32.mak \ - $(top_srcdir)/common/release.mak $(top_srcdir)/common/po.mak \ - $(top_srcdir)/common/coverage/lcov.mak \ - $(top_srcdir)/common/cruft.mak INSTALL NEWS README AUTHORS \ - ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/gst-plugins-good.spec.in \ - ABOUT-NLS $(noinst_HEADERS) COPYING compile config.guess \ - config.rpath config.sub depcomp install-sh missing ltmain.sh subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -121,7 +122,6 @@ $(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 \ @@ -136,6 +136,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(noinst_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -199,6 +201,14 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/gst-plugins-good.spec.in \ + $(top_srcdir)/common/coverage/lcov.mak \ + $(top_srcdir)/common/cruft.mak $(top_srcdir)/common/po.mak \ + $(top_srcdir)/common/release.mak \ + $(top_srcdir)/common/win32.mak ABOUT-NLS AUTHORS COPYING \ + ChangeLog INSTALL NEWS README compile config.guess \ + config.rpath config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -372,9 +382,6 @@ 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@ @@ -492,17 +499,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -555,6 +562,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -617,6 +625,7 @@ $(top_builddir)/gst/videofilter/.libs/*gamma.{so,dll,DLL,dylib} CRUFT_DIRS = \ + $(top_srcdir)/docs/plugins/tmpl \ $(top_srcdir)/gst/median \ $(top_srcdir)/gst/qtdemux \ $(top_srcdir)/gst/quicktime \ @@ -641,7 +650,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -651,7 +659,7 @@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/common/win32.mak $(top_srcdir)/common/release.mak $(top_srcdir)/common/po.mak $(top_srcdir)/common/coverage/lcov.mak $(top_srcdir)/common/cruft.mak: +$(top_srcdir)/common/win32.mak $(top_srcdir)/common/release.mak $(top_srcdir)/common/po.mak $(top_srcdir)/common/coverage/lcov.mak $(top_srcdir)/common/cruft.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -877,15 +885,15 @@ $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -921,18 +929,18 @@ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -1110,6 +1118,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + win32-debug: @echo; \ @@ -1212,12 +1222,16 @@ $(top_srcdir)/common/download-translations $(PACKAGE) check-valgrind: - cd tests/check && make check-valgrind + $(MAKE) -C tests/check check-valgrind @HAVE_GST_CHECK_TRUE@check-torture: -@HAVE_GST_CHECK_TRUE@ cd tests/check && make torture +@HAVE_GST_CHECK_TRUE@ $(MAKE) -C tests/check torture +@HAVE_GST_CHECK_TRUE@build-checks: +@HAVE_GST_CHECK_TRUE@ $(MAKE) -C tests/check build-checks @HAVE_GST_CHECK_FALSE@check-torture: @HAVE_GST_CHECK_FALSE@ true +@HAVE_GST_CHECK_FALSE@build-checks: +@HAVE_GST_CHECK_FALSE@ true win32-update: cp $(top_builddir)/win32/common/config.h-new \ diff -Nru gst-plugins-good1.0-1.4.3/missing gst-plugins-good1.0-1.6.1/missing --- gst-plugins-good1.0-1.4.3/missing 2014-08-27 10:25:58.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/missing 2015-10-30 12:10:14.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru gst-plugins-good1.0-1.4.3/NEWS gst-plugins-good1.0-1.6.1/NEWS --- gst-plugins-good1.0-1.4.3/NEWS 2014-09-24 08:27:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/NEWS 2015-10-30 14:26:38.000000000 +0000 @@ -1,2 +1,29 @@ -This is GStreamer Good Plugins 1.4.3 +This is GStreamer 1.6.1 + +The GStreamer team is proud to announce the first bugfix release in the stable +1.6 release series of your favourite cross-platform multimedia framework! + +This release only contains bugfixes and it is safe to update from 1.6.0. For a +full list of bugfixes see Bugzilla: + https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&limit=0&list_id=73005&order=bug_id&product=GStreamer&resolution=FIXED&target_milestone=1.6.1 + +See http://gstreamer.freedesktop.org/releases/1.6/ for the latest version of this document. + +Major bugfixes + +- Crashes in the gst-libav encoders were fixed +- More DASH-IF test streams are working now +- Live DASH, HLS and MS SmoothStreaming streams work more reliable and other + fixes for the adaptive streaming protocols +- Reverse playback works with scaletempo to keep the audio pitch +- Correct stream-time is reported for negative applied_rate +- SRTP packet validation during decoding does not reject valid packets anymore +- Fixes for audioaggregator and aggregator to start producing output at the + right time, and e.g. not outputting lots of silence in the beginning +- gst-libav's internal ffmpeg snapshot was updated to 2.8.1 +- cerbero has support for Mac OS X 10.11 (El Capitan) +- Various memory leaks were fixed, including major leaks in playbin, playsink + and decodebin +- Various GObject-Introspection annotation fixes for bindings +- and many, many more: https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&limit=0&list_id=73005&order=bug_id&product=GStreamer&resolution=FIXED&target_milestone=1.6.1 diff -Nru gst-plugins-good1.0-1.4.3/pkgconfig/Makefile.in gst-plugins-good1.0-1.6.1/pkgconfig/Makefile.in --- gst-plugins-good1.0-1.4.3/pkgconfig/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/pkgconfig/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,8 +89,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = pkgconfig -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/gstreamer-plugins-good-uninstalled.pc.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 \ @@ -102,7 +110,6 @@ $(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 \ @@ -117,6 +124,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gstreamer-plugins-good-uninstalled.pc @@ -141,6 +149,8 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(srcdir)/gstreamer-plugins-good-uninstalled.pc.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -273,9 +283,6 @@ 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@ @@ -393,17 +400,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -456,6 +463,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -506,7 +514,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pkgconfig/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pkgconfig/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -686,6 +693,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + ### all-local: $(pcverfiles) $(pcverfiles_uninstalled) all-local: $(pcverfiles_uninstalled) Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/af.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/af.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/af.po gst-plugins-good1.0-1.6.1/po/af.po --- gst-plugins-good1.0-1.4.3/po/af.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/af.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2004-03-18 14:16+0200\n" "Last-Translator: Petri Jooste \n" "Language-Team: Afrikaans \n" @@ -49,7 +49,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -86,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +msgid "Internal data flow error." +msgstr "" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -97,9 +100,6 @@ "plugin." msgstr "" -msgid "Internal data flow error." -msgstr "" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -218,10 +218,6 @@ msgstr "" #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Toestel \"%s\" is nie 'n vasleggingtoestel nie." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Toestel \"%s\" is nie 'n vasleggingtoestel nie." @@ -411,6 +407,10 @@ msgstr "" #, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Toestel \"%s\" is nie 'n vasleggingtoestel nie." + +#, fuzzy #~ msgid "Failed trying to get video frames from device '%s'." #~ msgstr "Kon nie genoeg buffers vanaf toestel \"%s\" kry nie." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/az.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/az.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/az.po gst-plugins-good1.0-1.6.1/po/az.po --- gst-plugins-good1.0-1.4.3/po/az.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/az.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins-0.8.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2004-03-19 18:29+0200\n" "Last-Translator: Metin Amiroff \n" "Language-Team: Azerbaijani \n" @@ -50,7 +50,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -87,6 +87,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +msgid "Internal data flow error." +msgstr "" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -98,9 +101,6 @@ "plugin." msgstr "" -msgid "Internal data flow error." -msgstr "" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -219,10 +219,6 @@ msgstr "" #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "\"%s\" avadanlığı capture avadanlığı deyil." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "\"%s\" avadanlığı capture avadanlığı deyil." @@ -412,6 +408,10 @@ msgstr "" #, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "\"%s\" avadanlığı capture avadanlığı deyil." + +#, fuzzy #~ msgid "Failed trying to get video frames from device '%s'." #~ msgstr "\"%s\" avadanlığından kifayət qədər bufferlər alına bilmədi." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/bg.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/bg.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/bg.po gst-plugins-good1.0-1.6.1/po/bg.po --- gst-plugins-good1.0-1.4.3/po/bg.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/bg.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2011-04-26 22:35+0300\n" "Last-Translator: Alexander Shopov \n" "Language-Team: Bulgarian \n" @@ -47,8 +47,9 @@ msgid "Secure connection setup failed." msgstr "Неуспешно осъществяване на шифрирана връзка." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Възникна мрежова грешка или сървърът неочаквано прекъсна връзката." msgid "Server sent bad data." @@ -86,6 +87,9 @@ msgstr "" "Този файл съдържа прекалено много потоци. Изпълняват се само първите %d" +msgid "Internal data flow error." +msgstr "Вътрешна грешка в потока с данни." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -101,9 +105,6 @@ "Не е открит поддържан поток. Може би трябва да разрешите повече транспортни " "протоколи или ви липсва правилната приставка на GStreamer за RTSP." -msgid "Internal data flow error." -msgstr "Вътрешна грешка в потока с данни." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -225,10 +226,6 @@ msgstr "Драйверът за устройството „%s“ не поддържа познати методи за запис." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Устройството „%s“ не е изходно устройство." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Устройството „%s“ не е изходно устройство." @@ -437,6 +434,10 @@ msgid "Cannot operate without a clock" msgstr "Работата без часовник е невъзможна." +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Устройството „%s“ не е изходно устройство." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "Получена е рамка с размер %u вместо очаквания %u." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/ca.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/ca.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/ca.po gst-plugins-good1.0-1.6.1/po/ca.po --- gst-plugins-good1.0-1.4.3/po/ca.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/ca.po 2015-10-30 14:27:13.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2012-01-01 14:19+0100\n" "Last-Translator: Gil Forcada \n" "Language-Team: Catalan \n" @@ -48,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "Ha fallat la configuració de connexió segura." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "S'ha produït un error de xarxa, o el servidor ha tancat la connexió " "inesperadament." @@ -89,6 +90,9 @@ msgstr "" "Aquest fitxer conté massa fluxos. Només s'estan reproduint els primers %d" +msgid "Internal data flow error." +msgstr "S'ha produït un error intern de flux de dades." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -105,9 +109,6 @@ "protocols de transport o bé potser manca el connector d'extensió RTSP del " "GStreamer correcte." -msgid "Internal data flow error." -msgstr "S'ha produït un error intern de flux de dades." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -234,10 +235,6 @@ "El controlador del dispositiu «%s» no és compatible amb cap mètode de " "captura conegut." -#, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "El dispositiu «%s» no és un dispositiu de sortida." - #, c-format msgid "Device '%s' is busy" msgstr "" @@ -467,6 +464,10 @@ msgid "Cannot operate without a clock" msgstr "No es pot operar sense un rellotge" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "El dispositiu «%s» no és un dispositiu de sortida." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "S'ha obtingut una mida de fotograma inesperada de %u en lloc de %u." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/cs.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/cs.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/cs.po gst-plugins-good1.0-1.6.1/po/cs.po --- gst-plugins-good1.0-1.4.3/po/cs.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/cs.po 2015-10-30 12:27:48.000000000 +0000 @@ -4,14 +4,14 @@ # # Miloslav Trmac , 2004. # Petr Kovar , 2007, 2008, 2009, 2010, 2011. -# Marek Černocký , 2013. +# Marek Černocký , 2013, 2015. # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good-1.1.4\n" +"Project-Id-Version: gst-plugins-good-1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2013-09-18 19:18+0200\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-10-15 20:58+0200\n" "Last-Translator: Marek Černocký \n" "Language-Team: Czech \n" "Language: cs\n" @@ -51,7 +51,7 @@ msgstr "Selhalo nastavení zabezpečeného připojení." msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Došlo k chybě sítě nebo server neočekávaně ukončil spojení." msgid "Server sent bad data." @@ -88,6 +88,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Tento soubor obsahuje příliš mnoho proudů. Přehrává se pouze první %d" +msgid "Internal data flow error." +msgstr "Vnitřní chyba datového toku." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -104,9 +107,6 @@ "přenosových protokolů, jinak nejspíš bude scházet potřebný zásuvný modul " "rozšíření GStreamer RTSP." -msgid "Internal data flow error." -msgstr "Vnitřní chyba datového toku." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -230,10 +230,6 @@ msgstr "Ovladač zařízení „%s“ nepodporuje žádnou známou V/V metodu." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Zařízení „%s“ nepodporuje zachytávání videa" - -#, c-format msgid "Device '%s' is busy" msgstr "Zařízení „%s“ je zaneprázdněno" @@ -245,9 +241,9 @@ msgid "Device '%s' cannot capture in the specified format" msgstr "Zařízení „%s“ neumí zachytávat v tomto konkrétním formátu" -#, fuzzy, c-format +#, c-format msgid "Device '%s' does support non-contiguous planes" -msgstr "Zařízení „%s“ nepodporuje zachytávání videa" +msgstr "Zařízení „%s“ nepodporuje nesousedící složky obrazu" #, c-format msgid "Could not get parameters on device '%s'" @@ -256,30 +252,26 @@ msgid "Video device did not accept new frame rate setting." msgstr "Videozařízení nepřijalo nové nastavení snímkové rychlosti." -#, fuzzy msgid "Video device did not provide output format." -msgstr "Videozařízení nepřijalo nové nastavení snímkové rychlosti." +msgstr "Videozařízení neposkytuje výstupní formát." msgid "Video device returned invalid dimensions." -msgstr "" +msgstr "Videozařízení sdělilo neplatné rozměry." -#, fuzzy msgid "Video devices uses an unsupported interlacing method." -msgstr "Ovladač zařízení „%s“ nepodporuje V/V metodu %d" +msgstr "Videozařízení používá nepodporovanou metodu prokládání." msgid "Video devices uses an unsupported pixel format." -msgstr "" +msgstr "Videozařízení používá nepodporovaný rastrový formát." -#, fuzzy msgid "Failed to configure internal buffer pool." -msgstr "Videozařízení se nezdařilo vytvořit společnou vyrovnávací paměť." +msgstr "Selhalo nastavení vnitřní společné vyrovnávací paměti." -#, fuzzy msgid "Video device did not suggest any buffer size." -msgstr "Videozařízení se nezdařilo vytvořit společnou vyrovnávací paměť." +msgstr "Videozařízení nedoporučuje nijakou velikost vyrovnávací paměti." msgid "No downstream pool to import from." -msgstr "" +msgstr "Neexistuje žádný společný proud dat, ze kterého by šlo importovat." #, c-format msgid "Failed to get settings of tuner %d on device '%s'." @@ -306,33 +298,32 @@ msgstr "Selhala změna stavu zapnutí/vypnutí zvuku u zařízení „%s“." msgid "Failed to allocated required memory." -msgstr "" +msgstr "Selhalo přidělení požadované paměti." msgid "Failed to allocate required memory." -msgstr "" +msgstr "Selhalo přidělení požadované paměti." -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported input format" -msgstr "Ovladač zařízení „%s“ nepodporuje V/V metodu %d" +msgstr "Převodník na zařízení „%s“ nepodporuje vstupní formát" -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported output format" -msgstr "Videozařízení nepřijalo nové nastavení snímkové rychlosti." +msgstr "Převodník na zařízení „%s“ nepodporuje výstupní formát" -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported input format" -msgstr "Videozařízení nepřijalo nové nastavení snímkové rychlosti." +msgstr "Kodér na zařízení „%s“ nepodporuje vstupní formát" -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported output format" -msgstr "Videozařízení nepřijalo nové nastavení snímkové rychlosti." +msgstr "Kodér na zařízení „%s“ nepodporuje výstupní formát" -#, fuzzy msgid "Failed to start decoding thread." -msgstr "Selhalo dekódování obrázku JPEG" +msgstr "Selhalo spuštění vlákna dekodéru." msgid "Failed to process frame." -msgstr "" +msgstr "Selhalo zpracování snímku." #, c-format msgid "" @@ -368,7 +359,7 @@ #, c-format msgid "Could not open device '%s' for reading and writing." -msgstr "Nezdařilo se otevřít zařízení „%s“ pro čtení a pro zápisu." +msgstr "Nezdařilo se otevřít zařízení „%s“ pro čtení a zápis." #, c-format msgid "Device '%s' is not a capture device." @@ -378,13 +369,13 @@ msgid "Device '%s' is not a output device." msgstr "Zařízení „%s“ není výstupním zařízením." -#, fuzzy, c-format +#, c-format msgid "Device '%s' is not a M2M device." -msgstr "Zařízení „%s“ není výstupním zařízením." +msgstr "Zařízení „%s“ není zařízením M2M." -#, fuzzy, c-format +#, c-format msgid "Could not dup device '%s' for reading and writing." -msgstr "Nezdařilo se otevřít zařízení „%s“ pro čtení a pro zápisu." +msgstr "Nezdařilo se duplikovat zařízení „%s“ pro čtení a zápis." #, c-format msgid "Failed to set norm for device '%s'." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/da.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/da.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/da.po gst-plugins-good1.0-1.6.1/po/da.po --- gst-plugins-good1.0-1.4.3/po/da.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/da.po 2015-10-30 14:27:13.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good-1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-06-29 23:54+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" @@ -49,8 +49,9 @@ msgid "Secure connection setup failed." msgstr "Opsætning af sikker forbindelse mislykkedes." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Der opstod en netværksfejl, eller serveren lukkede uventet forbindelsen." @@ -91,6 +92,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Denne fil indeholder for mange strømme. Afspil først kun %d" +msgid "Internal data flow error." +msgstr "Intern datastrømsfejl." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -107,9 +111,6 @@ "transportprotokoller eller mangler måske det korrekte udvidelsesmodul til " "GStreamer RTSP." -msgid "Internal data flow error." -msgstr "Intern datastrømsfejl." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -232,10 +233,6 @@ msgstr "Driveren til enhed »%s« understøtter ingen kendt IO-metode." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Enheden »%s« understøtter ikke videooptagelse" - -#, c-format msgid "Device '%s' is busy" msgstr "Enheden »%s« er optaget" @@ -429,3 +426,6 @@ msgid "Cannot operate without a clock" msgstr "Kan ikke fungere uden et ur" + +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Enheden »%s« understøtter ikke videooptagelse" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/de.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/de.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/de.po gst-plugins-good1.0-1.6.1/po/de.po --- gst-plugins-good1.0-1.4.3/po/de.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/de.po 2015-10-30 12:27:48.000000000 +0000 @@ -12,10 +12,10 @@ # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.3.90\n" +"Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2014-06-29 21:20+0100\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-10-21 00:14+0200\n" "Last-Translator: Christian Kirbach \n" "Language-Team: German \n" "Language: de\n" @@ -23,7 +23,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 1.8.5\n" msgid "Jack server not found" msgstr "Jack-Server nicht gefunden" @@ -55,7 +55,7 @@ msgstr "Aufbau einer sichern Verbindung ist gescheitert." msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Ein Netzwerkfehler ist aufgetreten, oder der Server schloss die Verbindung " "unerwartet." @@ -98,6 +98,9 @@ "Diese Datei enthält zu viele Ströme. Es werden nur die ersten %d " "wiedergegeben" +msgid "Internal data flow error." +msgstr "Interner Datenstromfehler." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -114,9 +117,6 @@ "Transport-Protokolle erlauben oder es fehlt vielleicht das richtige Plugin " "zur RTSP-Erweiterung." -msgid "Internal data flow error." -msgstr "Interner Datenstromfehler." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -242,10 +242,6 @@ msgstr "Der Treiber von Gerät »%s« unterstützt keine bekannte EA-Methode" #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Gerät »%s« unterstützt keine Videoaufnahme" - -#, c-format msgid "Device '%s' is busy" msgstr "Gerät »%s« ist belegt" @@ -449,6 +445,9 @@ msgid "Cannot operate without a clock" msgstr "Es kann nicht ohne einen Taktgeber gearbeitet werden." +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Gerät »%s« unterstützt keine Videoaufnahme" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Es konnte keine Verbindung zum Audio-Server hergestellt werden" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/el.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/el.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/el.po gst-plugins-good1.0-1.6.1/po/el.po --- gst-plugins-good1.0-1.4.3/po/el.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/el.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2012-05-05 19:05+0100\n" "Last-Translator: Savvas Radevic \n" "Language-Team: Greek \n" @@ -48,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "Αποτυχία εκκίνησης ασφαλούς σύνδεσης." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Προέκυψε ένα σφάλμα δικτύου ή ο διακομιστής έκλεισε ξαφνικά τη σύνδεση." @@ -87,6 +88,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Αυτό το αρχείο περιέχει πολλές ροές. Αναπαράγεται μόνο η πρώτη %d" +msgid "Internal data flow error." +msgstr "Εσωτερικό σφάλμα ροής δεδομένων." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -103,9 +107,6 @@ "επιτρέψετε περισσότερα πρωτόκολλα μεταγωγής ή αλλιώς να σας λείπει το σωστό " "πρόσθετο RTSP του GStreamer." -msgid "Internal data flow error." -msgstr "Εσωτερικό σφάλμα ροής δεδομένων." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -228,10 +229,6 @@ msgid "The driver of device '%s' does not support any known IO method." msgstr "Ο οδηγός της συσκευής '%s' δεν υποστηρίζει κάποια γνωστή μέθοδο λήψης." -#, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Η συσκευή '%s' δεν είναι συσκευή εξόδου." - #, c-format msgid "Device '%s' is busy" msgstr "" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/en_GB.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/en_GB.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/en_GB.po gst-plugins-good1.0-1.6.1/po/en_GB.po --- gst-plugins-good1.0-1.4.3/po/en_GB.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/en_GB.po 2015-10-30 14:27:13.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gst-plugins 0.8.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2004-04-26 10:41-0400\n" "Last-Translator: Gareth Owen \n" "Language-Team: English (British) \n" @@ -49,7 +49,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -86,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +msgid "Internal data flow error." +msgstr "" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -97,9 +100,6 @@ "plugin." msgstr "" -msgid "Internal data flow error." -msgstr "" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -218,10 +218,6 @@ msgstr "" #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Device \"%s\" is not a capture device." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Device \"%s\" is not a capture device." @@ -411,6 +407,10 @@ msgstr "" #, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Device \"%s\" is not a capture device." + +#, fuzzy #~ msgid "Failed trying to get video frames from device '%s'." #~ msgstr "Could not get enough buffers from device \"%s\"." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/eo.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/eo.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/eo.po gst-plugins-good1.0-1.6.1/po/eo.po --- gst-plugins-good1.0-1.4.3/po/eo.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/eo.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2011-06-04 21:48+0100\n" "Last-Translator: Kristjan SCHMIDT \n" "Language-Team: Esperanto \n" @@ -47,7 +47,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -84,6 +84,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +msgid "Internal data flow error." +msgstr "" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -95,9 +98,6 @@ "plugin." msgstr "" -msgid "Internal data flow error." -msgstr "" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -214,10 +214,6 @@ msgstr "" #, c-format -msgid "Device '%s' does not support video capture" -msgstr "" - -#, c-format msgid "Device '%s' is busy" msgstr "" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/es.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/es.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/es.po gst-plugins-good1.0-1.6.1/po/es.po --- gst-plugins-good1.0-1.4.3/po/es.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/es.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.26.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2011-02-12 18:30+0100\n" "Last-Translator: Jorge González González \n" "Language-Team: Spanish \n" @@ -47,8 +47,9 @@ msgid "Secure connection setup failed." msgstr "Falló la configuración de la conexión segura." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Ocurrió un error de red o el servidor cerró la conexión de forma inesperada." @@ -88,6 +89,9 @@ msgstr "" "Este archivo contiene demasiados flujos. Sólo se reproducirá el primer %d" +msgid "Internal data flow error." +msgstr "Error en el flujo de datos interno." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -104,9 +108,6 @@ "protocolos de transporte o de otra forma puede que le falte la extensión " "correcta de RTSP de GStreamer." -msgid "Internal data flow error." -msgstr "Error en el flujo de datos interno." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -237,10 +238,6 @@ "conocido." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "El dispositivo «%s» no es un dispositivo de salida." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "El dispositivo «%s» no es un dispositivo de salida." @@ -463,6 +460,10 @@ msgid "Cannot operate without a clock" msgstr "No se puede operar sin reloj" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "El dispositivo «%s» no es un dispositivo de salida." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "Se obtuvo un tamaño de cuadro inesperado %u en lugar de %u." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/eu.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/eu.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/eu.po gst-plugins-good1.0-1.6.1/po/eu.po --- gst-plugins-good1.0-1.4.3/po/eu.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/eu.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good-0.10.18.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2010-03-25 12:37+0100\n" "Last-Translator: Mikel Olasagasti Uranga \n" "Language-Team: Basque \n" @@ -51,7 +51,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -92,6 +92,9 @@ msgstr "" "Fitxategi horrek korronte gehiegi ditu. Erreproduzitu soilik lehen %d(r)ak" +msgid "Internal data flow error." +msgstr "Datu-fluxuaren barne-errorea." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -107,9 +110,6 @@ "Ez da onartutako korronterik aurkitu. Garraioko protokolo gehiago baimentzea " "behar da edo GStreamer RTSP hedapen egokia falta zaizu." -msgid "Internal data flow error." -msgstr "Datu-fluxuaren barne-errorea." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -235,10 +235,6 @@ "'%s' gailuaren kontrolatzaileak ez du onartzen kaptura-metodo ezagunik." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "'%s' gailua ez da irteerako gailu bat." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "'%s' gailua ez da irteerako gailu bat." @@ -458,6 +454,10 @@ msgid "Cannot operate without a clock" msgstr "Ezin du funtzionatu erlojurik gabe" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "'%s' gailua ez da irteerako gailu bat." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "Ustekabeko fotograma-tamaina jaso da (%u), %u ordez." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/fi.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/fi.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/fi.po gst-plugins-good1.0-1.6.1/po/fi.po --- gst-plugins-good1.0-1.4.3/po/fi.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/fi.po 2015-10-30 14:27:13.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.25.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2010-11-17 23:03+0200\n" "Last-Translator: Tommi Vainikainen \n" "Language-Team: Finnish \n" @@ -50,8 +50,9 @@ msgid "Secure connection setup failed." msgstr "Turvallisen yhteyden avaus epäonnistui." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Tapahtui verkkovirhe tai palvelin sulki yhteyden yllättäen." msgid "Server sent bad data." @@ -90,6 +91,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Tiedosto sisältää useita virtoja. Soitetaan vain ensimmäiset %d" +msgid "Internal data flow error." +msgstr "Sisäisen tietovirran virhe." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -106,9 +110,6 @@ "siirtoprotokollia, tai vaihtoehtoisesti sinulta saattaa puuttua oikea " "GStreamer-RTSP-laajennusliitännäinen." -msgid "Internal data flow error." -msgstr "Sisäisen tietovirran virhe." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -232,10 +233,6 @@ msgstr "Laitteen ”%s” ajuri ei tue mitään tunnettua kaappaustapaa." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Laite ”%s” ei ole ulostulolaite." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Laite ”%s” ei ole ulostulolaite." @@ -435,6 +432,10 @@ msgid "Cannot operate without a clock" msgstr "Ei voitu toimia ilman kelloa" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Laite ”%s” ei ole ulostulolaite." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "Saatiin odottamaton kehys kooltaan %u odotetun %u sijaan." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/fr.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/fr.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/fr.po gst-plugins-good1.0-1.6.1/po/fr.po --- gst-plugins-good1.0-1.4.3/po/fr.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/fr.po 2015-10-30 14:27:13.000000000 +0000 @@ -4,14 +4,15 @@ # # Nicolas Velin , 2008. # Claude Paroz , 2008-2011. +# Stéphane Aulery , 2015 # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 0.10.28.2\n" +"Project-Id-Version: gst-plugins-good 1.4.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2011-04-28 09:22+0200\n" -"Last-Translator: Claude Paroz \n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-04-26 19:35+0200\n" +"Last-Translator: Stéphane Aulery \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -19,10 +20,10 @@ "Content-Transfer-Encoding: 8bit\n" msgid "Jack server not found" -msgstr "" +msgstr "serveur Jack introuvable" msgid "Failed to decode JPEG image" -msgstr "Échec de décodage de l'image JPEG" +msgstr "Échec de décodage de l’image JPEG" #. TRANSLATORS: 'song title' by 'artist name' #, c-format @@ -47,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "La configuration d'une connexion sécurisée a échoué." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Une erreur réseau s'est produite ou le serveur a fermé abruptement la " "connexion." @@ -89,6 +91,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Ce fichier contient trop de flux. Seuls les %d premiers seront lus." +msgid "Internal data flow error." +msgstr "Erreur interne de flux de données." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -105,9 +110,6 @@ "davantage de protocoles de transport ou il manque peut-être le bon greffon " "d'extension GStreamer RTSP." -msgid "Internal data flow error." -msgstr "Erreur interne de flux de données." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -175,13 +177,11 @@ msgid "AUX 2 In" msgstr "Entrée AUX 2" -#, fuzzy msgid "Codec Loopback" -msgstr "Boucle interne" +msgstr "Codec boucle interne" -#, fuzzy msgid "SunVTS Loopback" -msgstr "Boucle interne" +msgstr "SunVTS boucle interne" msgid "Volume" msgstr "Volume" @@ -222,62 +222,52 @@ msgid "Could not map buffers from device '%s'" msgstr "Impossible de mapper les tampons du périphérique « %s »." -#, fuzzy, c-format +#, c-format msgid "The driver of device '%s' does not support the IO method %d" msgstr "" -"Le pilote du périphérique « %s » ne prend en charge aucune méthode " -"d'enregistrement connue." +"Le pilote du périphérique « %s » ne prend en charge la méthode d’entrée-" +"sortie %d" -#, fuzzy, c-format +#, c-format msgid "The driver of device '%s' does not support any known IO method." msgstr "" -"Le pilote du périphérique « %s » ne prend en charge aucune méthode " -"d'enregistrement connue." +"Le pilote du périphérique « %s » ne prend en charge aucune méthode d’entrée-" +"sortie connue." -#, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Le périphérique « %s » n'est pas un périphérique de sortie." - -#, fuzzy, c-format +#, c-format msgid "Device '%s' is busy" -msgstr "Le périphérique « %s » n'est pas un périphérique de sortie." +msgstr "Périphérique « %s » occupé" -#, fuzzy, c-format +#, c-format msgid "Device '%s' cannot capture at %dx%d" -msgstr "Le périphérique « %s » n'est pas un périphérique d'enregistrement." +msgstr "" +"Le périphérique « %s » ne peut pas capturer avec une résolution de %d x %d" -#, fuzzy, c-format +#, c-format msgid "Device '%s' cannot capture in the specified format" -msgstr "Le périphérique « %s » n'est pas un périphérique d'enregistrement." +msgstr "Le périphérique « %s » ne peut pas capturer dans le format spécifié" -#, fuzzy, c-format +#, c-format msgid "Device '%s' does support non-contiguous planes" -msgstr "Le périphérique « %s » n'est pas un périphérique de sortie." +msgstr "" #, c-format msgid "Could not get parameters on device '%s'" msgstr "Impossible d'obtenir les paramètres du périphérique « %s »" -#, fuzzy msgid "Video device did not accept new frame rate setting." msgstr "" -"Le périphérique d'entrée vidéo n'a pas accepté le nouveau paramètre de " -"fréquence d'image." +"Le périphérique vidéo n'a pas accepté le nouveau paramètre de fréquence " +"d'image." -#, fuzzy msgid "Video device did not provide output format." -msgstr "" -"Le périphérique d'entrée vidéo n'a pas accepté le nouveau paramètre de " -"fréquence d'image." +msgstr "Le périphérique vidéo n'a pas fourni de format de sortie." msgid "Video device returned invalid dimensions." msgstr "" -#, fuzzy msgid "Video devices uses an unsupported interlacing method." msgstr "" -"Le pilote du périphérique « %s » ne prend en charge aucune méthode " -"d'enregistrement connue." msgid "Video devices uses an unsupported pixel format." msgstr "" @@ -285,16 +275,13 @@ msgid "Failed to configure internal buffer pool." msgstr "" -#, fuzzy msgid "Video device did not suggest any buffer size." -msgstr "" -"Le périphérique d'entrée vidéo n'a pas accepté le nouveau paramètre de " -"fréquence d'image." +msgstr "Le périphérique vidéo n'a suggéré aucune taille de cache." msgid "No downstream pool to import from." msgstr "" -#, fuzzy, c-format +#, c-format msgid "Failed to get settings of tuner %d on device '%s'." msgstr "" "Impossible d'obtenir les paramètres du syntoniseur %d du périphérique « %s »." @@ -303,9 +290,9 @@ msgid "Error getting capabilities for device '%s'." msgstr "Erreur de lecture de %d octets sur le périphérique « %s »." -#, fuzzy, c-format +#, c-format msgid "Device '%s' is not a tuner." -msgstr "Le périphérique « %s » n'est pas un périphérique de sortie." +msgstr "Le périphérique « %s » n'est pas un syntoniseur." #, fuzzy, c-format msgid "Failed to get radio input on device '%s'. " @@ -331,27 +318,20 @@ "Le pilote du périphérique « %s » ne prend en charge aucune méthode " "d'enregistrement connue." -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported output format" msgstr "" -"Le périphérique d'entrée vidéo n'a pas accepté le nouveau paramètre de " -"fréquence d'image." -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported input format" msgstr "" -"Le périphérique d'entrée vidéo n'a pas accepté le nouveau paramètre de " -"fréquence d'image." -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported output format" msgstr "" -"Le périphérique d'entrée vidéo n'a pas accepté le nouveau paramètre de " -"fréquence d'image." -#, fuzzy msgid "Failed to start decoding thread." -msgstr "Échec de décodage de l'image JPEG" +msgstr "Échec de démarrage du processus de décodage." msgid "Failed to process frame." msgstr "" @@ -401,9 +381,9 @@ msgid "Device '%s' is not a output device." msgstr "Le périphérique « %s » n'est pas un périphérique de sortie." -#, fuzzy, c-format +#, c-format msgid "Device '%s' is not a M2M device." -msgstr "Le périphérique « %s » n'est pas un périphérique de sortie." +msgstr "Le périphérique « %s » n'est pas un périphérique M2M." #, fuzzy, c-format msgid "Could not dup device '%s' for reading and writing." @@ -463,354 +443,5 @@ msgid "Cannot operate without a clock" msgstr "Impossible de fonctionner sans horloge" -#~ msgid "Got unexpected frame size of %u instead of %u." -#~ msgstr "Taille de trame imprévue de %u à la place de %u." - -#~ msgid "Failed trying to get video frames from device '%s'." -#~ msgstr "L'obtention de trames vidéo du périphérique « %s » a échoué." - -#~ msgid "Failed after %d tries. device %s. system error: %s" -#~ msgstr "Échec après %d tentatives. périphérique %s. erreur système : %s" - -#~ msgid "Bass" -#~ msgstr "Basses" - -#~ msgid "Treble" -#~ msgstr "Aiguës" - -#~ msgid "Synth" -#~ msgstr "Synth" - -#~ msgid "PCM" -#~ msgstr "PCM" - -#~ msgid "Speaker" -#~ msgstr "Haut-parleur" - -#~ msgid "Line-in" -#~ msgstr "Entrée ligne" - -#~ msgid "CD" -#~ msgstr "CD" - -#~ msgid "Mixer" -#~ msgstr "Mélangeur" - -#~ msgid "PCM-2" -#~ msgstr "PCM-2" - -#~ msgid "Record" -#~ msgstr "Enregistrement" - -#~ msgid "In-gain" -#~ msgstr "Gain d'entrée" - -#~ msgid "Out-gain" -#~ msgstr "Gain de sortie" - -#~ msgid "Line-1" -#~ msgstr "Ligne 1" - -#~ msgid "Line-2" -#~ msgstr "Ligne 2" - -#~ msgid "Line-3" -#~ msgstr "Ligne 3" - -#~ msgid "Digital-1" -#~ msgstr "Numérique 1" - -#~ msgid "Digital-2" -#~ msgstr "Numérique 2" - -#~ msgid "Digital-3" -#~ msgstr "Numérique 3" - -#~ msgid "Phone-in" -#~ msgstr "Entrée casque" - -#~ msgid "Phone-out" -#~ msgstr "Sortie casque" - -#~ msgid "Video" -#~ msgstr "Vidéo" - -#~ msgid "Radio" -#~ msgstr "Radio" - -#~ msgid "Could not open audio device for mixer control handling." -#~ msgstr "" -#~ "Impossible d'ouvrir le périphérique audio pour la gestion des contrôles " -#~ "de mixage." - -#~ msgid "" -#~ "Could not open audio device for mixer control handling. This version of " -#~ "the Open Sound System is not supported by this element." -#~ msgstr "" -#~ "Impossible d'ouvrir le périphérique audio pour la gestion des contrôles " -#~ "de mixage. Cette version de OSS (Open Sound System) n'est pas prise en " -#~ "charge par cet élément." - -#~ msgid "Master" -#~ msgstr "Volume général" - -#~ msgid "Front" -#~ msgstr "Avant" - -#~ msgid "Rear" -#~ msgstr "Arrière" - -#~ msgid "Headphones" -#~ msgstr "Écouteurs" - -#~ msgid "Center" -#~ msgstr "Centre" - -#~ msgid "LFE" -#~ msgstr "LFE" - -#~ msgid "Surround" -#~ msgstr "Ambiophonie" - -#~ msgid "Side" -#~ msgstr "Côté" - -#~ msgid "AUX Out" -#~ msgstr "Sortie AUX" - -#~ msgid "3D Depth" -#~ msgstr "Profondeur 3D" - -#~ msgid "3D Center" -#~ msgstr "Centre 3D" - -#~ msgid "3D Enhance" -#~ msgstr "Amélioration 3D" - -#~ msgid "Telephone" -#~ msgstr "Téléphone" - -#~ msgid "Video In" -#~ msgstr "Entrée vidéo" - -#~ msgid "AUX In" -#~ msgstr "Entrée AUX" - -#~ msgid "Record Gain" -#~ msgstr "Gain d'enregistrement" - -#~ msgid "Output Gain" -#~ msgstr "Gain de sortie" - -#~ msgid "Microphone Boost" -#~ msgstr "Amplification micro" - -#~ msgid "Diagnostic" -#~ msgstr "Diagnostic" - -#~ msgid "Bass Boost" -#~ msgstr "Amplification basses" - -#~ msgid "Playback Ports" -#~ msgstr "Ports de lecture" - -#~ msgid "Input" -#~ msgstr "Entrée" - -#~ msgid "Monitor Source" -#~ msgstr "Source de moniteur" - -#~ msgid "Keyboard Beep" -#~ msgstr "Bip de clavier" - -#~ msgid "Simulate Stereo" -#~ msgstr "Stéréo simulée" - -#~ msgid "Stereo" -#~ msgstr "Stéréo" - -#~ msgid "Surround Sound" -#~ msgstr "Son ambiophonique" - -#~ msgid "Microphone Gain" -#~ msgstr "Gain de microphone" - -#~ msgid "Speaker Source" -#~ msgstr "Source de haut-parleur" - -#~ msgid "Microphone Source" -#~ msgstr "Source de microphone" - -#~ msgid "Jack" -#~ msgstr "Jack" - -#~ msgid "Center / LFE" -#~ msgstr "Centre / LFE" - -#~ msgid "Stereo Mix" -#~ msgstr "Mélangeur stéréo" - -#~ msgid "Mono Mix" -#~ msgstr "Mélangeur mono" - -#~ msgid "Input Mix" -#~ msgstr "Mélangeur d'entrée" - -#~ msgid "Microphone 1" -#~ msgstr "Microphone 1" - -#~ msgid "Microphone 2" -#~ msgstr "Microphone 2" - -#~ msgid "Digital Out" -#~ msgstr "Sortie numérique" - -#~ msgid "Digital In" -#~ msgstr "Entrée numérique" - -#~ msgid "HDMI" -#~ msgstr "HDMI" - -#~ msgid "Modem" -#~ msgstr "Modem" - -#~ msgid "Handset" -#~ msgstr "Combiné" - -#~ msgid "Other" -#~ msgstr "Autre" - -#~ msgid "None" -#~ msgstr "Aucun" - -#~ msgid "On" -#~ msgstr "Activé" - -#~ msgid "Off" -#~ msgstr "Désactivé" - -#~ msgid "Mute" -#~ msgstr "Son coupé" - -#~ msgid "Fast" -#~ msgstr "Rapide" - -#~ msgid "Very Low" -#~ msgstr "Très bas" - -#~ msgid "Low" -#~ msgstr "Bas" - -#~ msgid "Medium" -#~ msgstr "Moyen" - -#~ msgid "High" -#~ msgstr "Élevé" - -#~ msgid "Very High" -#~ msgstr "Très élevé" - -#~ msgid "Production" -#~ msgstr "Production" - -#~ msgid "Front Panel Microphone" -#~ msgstr "Micro du panneau avant" - -#~ msgid "Front Panel Line In" -#~ msgstr "Entrée ligne du panneau avant" - -#~ msgid "Front Panel Headphones" -#~ msgstr "Écouteurs du panneau avant" - -#~ msgid "Front Panel Line Out" -#~ msgstr "Sortie ligne du panneau avant" - -#~ msgid "Green Connector" -#~ msgstr "Connecteur vert" - -#~ msgid "Pink Connector" -#~ msgstr "Connecteur rose" - -#~ msgid "Blue Connector" -#~ msgstr "Connecteur bleu" - -#~ msgid "White Connector" -#~ msgstr "Connecteur blanc" - -#~ msgid "Black Connector" -#~ msgstr "Connecteur noir" - -#~ msgid "Gray Connector" -#~ msgstr "Connecteur gris" - -#~ msgid "Orange Connector" -#~ msgstr "Connecteur orange" - -#~ msgid "Red Connector" -#~ msgstr "Connecteur rouge" - -#~ msgid "Yellow Connector" -#~ msgstr "Connecteur jaune" - -#~ msgid "Green Front Panel Connector" -#~ msgstr "Connecteur vert du panneau avant" - -#~ msgid "Pink Front Panel Connector" -#~ msgstr "Connecteur rose du panneau avant" - -#~ msgid "Blue Front Panel Connector" -#~ msgstr "Connecteur bleu du panneau avant" - -#~ msgid "White Front Panel Connector" -#~ msgstr "Connecteur blanc du panneau avant" - -#~ msgid "Black Front Panel Connector" -#~ msgstr "Connecteur noir du panneau avant" - -#~ msgid "Gray Front Panel Connector" -#~ msgstr "Connecteur gris du panneau avant" - -#~ msgid "Orange Front Panel Connector" -#~ msgstr "Connecteur orange du panneau avant" - -#~ msgid "Red Front Panel Connector" -#~ msgstr "Connecteur rouge du panneau avant" - -#~ msgid "Yellow Front Panel Connector" -#~ msgstr "Connecteur jaune du panneau avant" - -#~ msgid "Spread Output" -#~ msgstr "Sortie partagée" - -#~ msgid "Downmix" -#~ msgstr "Mélange réduit" - -#~ msgid "Virtual Mixer Input" -#~ msgstr "Entrée de mélangeur virtuel" - -#~ msgid "Virtual Mixer Output" -#~ msgstr "Sortie de mélangeur virtuel" - -#~ msgid "Virtual Mixer Channels" -#~ msgstr "Canaux de mélangeur virtuel" - -#~ msgid "%s %d Function" -#~ msgstr "Fonction %s %d" - -#~ msgid "%s Function" -#~ msgstr "Fonction %s" - -#~ msgid "Error reading %d bytes on device '%s'." -#~ msgstr "Erreur de lecture de %d octets sur le périphérique « %s »." - -#~ msgid "Could not enqueue buffers in device '%s'." -#~ msgstr "" -#~ "Impossible de mettre les tampons en file d'attente sur le périphérique " -#~ "« %s »." - -#~ msgid "Could not establish connection to sound server" -#~ msgstr "Impossible d'établir une connexion vers le serveur de son" - -#~ msgid "Failed to query sound server capabilities" -#~ msgstr "" -#~ "Échec lors de l'interrogation du serveur de son au sujet de ses capacités" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Le périphérique « %s » ne prend en charge la capture video." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/gl.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/gl.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/gl.po gst-plugins-good1.0-1.6.1/po/gl.po --- gst-plugins-good1.0-1.4.3/po/gl.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/gl.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.0.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2012-12-15 03:46+0200\n" "Last-Translator: Fran Dieguez \n" "Language-Team: Galician \n" @@ -48,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "Produciuse un fallo de configuración da conexión segura." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Produciuse un erro de rede ou o servidor pechou a conexión de forma " "inesperada." @@ -89,6 +90,9 @@ msgstr "" "Este ficheiro contén demasiados fluxos. Só se reproducirá o primeiro %d" +msgid "Internal data flow error." +msgstr "Produciuse un erro interno no fluxo de datos." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -105,9 +109,6 @@ "protocolos de transporte ou de outra forma pode que lle falte a extensión " "correcta de RTSP de GStreamer." -msgid "Internal data flow error." -msgstr "Produciuse un erro interno no fluxo de datos." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -234,10 +235,6 @@ "O controlador do dispositivo «%s» non admite calquera método IO coñecido." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "O dispositivo «%s» non admite a captura de vídeo." - -#, c-format msgid "Device '%s' is busy" msgstr "O dispositivo «%s» está ocupado" @@ -456,6 +453,9 @@ msgid "Cannot operate without a clock" msgstr "Non é posíbel operar sen reloxo" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "O dispositivo «%s» non admite a captura de vídeo." + #~ msgid "Could not establish connection to sound server" #~ msgstr "Non foi posíbel estabelecer a conexión co servidor de son" diff -Nru gst-plugins-good1.0-1.4.3/po/gst-plugins-good-1.0.pot gst-plugins-good1.0-1.6.1/po/gst-plugins-good-1.0.pot --- gst-plugins-good1.0-1.4.3/po/gst-plugins-good-1.0.pot 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/gst-plugins-good-1.0.pot 2015-10-30 12:27:48.000000000 +0000 @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.4.3\n" +"Project-Id-Version: gst-plugins-good 1.6.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,15 +20,15 @@ msgid "Jack server not found" msgstr "" -#: ext/jpeg/gstjpegdec.c:923 ext/jpeg/gstjpegdec.c:1171 -#: ext/jpeg/gstjpegdec.c:1183 ext/jpeg/gstjpegdec.c:1211 -#: ext/jpeg/gstjpegdec.c:1220 ext/jpeg/gstjpegdec.c:1229 -#: ext/jpeg/gstjpegdec.c:1237 +#: ext/jpeg/gstjpegdec.c:925 ext/jpeg/gstjpegdec.c:1178 +#: ext/jpeg/gstjpegdec.c:1190 ext/jpeg/gstjpegdec.c:1219 +#: ext/jpeg/gstjpegdec.c:1228 ext/jpeg/gstjpegdec.c:1237 +#: ext/jpeg/gstjpegdec.c:1245 msgid "Failed to decode JPEG image" msgstr "" #. TRANSLATORS: 'song title' by 'artist name' -#: ext/pulse/pulsesink.c:3079 +#: ext/pulse/pulsesink.c:3133 #, c-format msgid "'%s' by '%s'" msgstr "" @@ -37,114 +37,110 @@ msgid "Could not connect to server" msgstr "" -#: ext/soup/gstsouphttpsrc.c:859 +#: ext/soup/gstsouphttpsrc.c:911 msgid "No URL set." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1216 +#: ext/soup/gstsouphttpsrc.c:1270 msgid "Server does not support seeking." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1491 +#: ext/soup/gstsouphttpsrc.c:1545 msgid "Could not resolve server name." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1497 +#: ext/soup/gstsouphttpsrc.c:1551 msgid "Could not establish connection to server." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1502 +#: ext/soup/gstsouphttpsrc.c:1556 msgid "Secure connection setup failed." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1512 +#: ext/soup/gstsouphttpsrc.c:1566 msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1519 +#: ext/soup/gstsouphttpsrc.c:1573 msgid "Server sent bad data." msgstr "" -#: gst/avi/gstavidemux.c:5677 +#: gst/avi/gstavidemux.c:5679 msgid "Internal data stream error." msgstr "" -#: gst/avi/gstavimux.c:1820 +#: gst/avi/gstavimux.c:1819 msgid "No or invalid input audio, AVI stream will be corrupt." msgstr "" -#: gst/isomp4/qtdemux.c:571 gst/isomp4/qtdemux.c:575 +#: gst/isomp4/qtdemux.c:635 gst/isomp4/qtdemux.c:639 msgid "This file contains no playable streams." msgstr "" -#: gst/isomp4/qtdemux.c:621 gst/isomp4/qtdemux.c:4666 -#: gst/isomp4/qtdemux.c:4733 gst/isomp4/qtdemux.c:4969 +#: gst/isomp4/qtdemux.c:685 gst/isomp4/qtdemux.c:5572 gst/isomp4/qtdemux.c:5639 +#: gst/isomp4/qtdemux.c:5878 msgid "This file is invalid and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:2294 +#: gst/isomp4/qtdemux.c:2433 msgid "Cannot play stream because it is encrypted with PlayReady DRM." msgstr "" -#: gst/isomp4/qtdemux.c:2857 gst/isomp4/qtdemux.c:2933 -#: gst/isomp4/qtdemux.c:2976 gst/isomp4/qtdemux.c:5671 -#: gst/isomp4/qtdemux.c:5678 gst/isomp4/qtdemux.c:6321 -#: gst/isomp4/qtdemux.c:6750 gst/isomp4/qtdemux.c:6757 -#: gst/isomp4/qtdemux.c:8692 +#: gst/isomp4/qtdemux.c:3498 gst/isomp4/qtdemux.c:6595 +#: gst/isomp4/qtdemux.c:6602 gst/isomp4/qtdemux.c:7376 +#: gst/isomp4/qtdemux.c:7805 gst/isomp4/qtdemux.c:7812 +#: gst/isomp4/qtdemux.c:10099 msgid "This file is corrupt and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:3067 +#: gst/isomp4/qtdemux.c:3740 msgid "Invalid atom size." msgstr "" -#: gst/isomp4/qtdemux.c:3135 +#: gst/isomp4/qtdemux.c:3818 msgid "This file is incomplete and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:7511 +#: gst/isomp4/qtdemux.c:8737 msgid "The video in this file might not play correctly." msgstr "" -#: gst/isomp4/qtdemux.c:8733 +#: gst/isomp4/qtdemux.c:10140 #, c-format msgid "This file contains too many streams. Only playing first %d" msgstr "" -#: gst/rtsp/gstrtspsrc.c:6469 +#: gst/multifile/gstsplitmuxsrc.c:532 gst/wavparse/gstwavparse.c:2248 +msgid "Internal data flow error." +msgstr "" + +#: gst/rtsp/gstrtspsrc.c:6894 msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." msgstr "" -#: gst/rtsp/gstrtspsrc.c:6474 +#: gst/rtsp/gstrtspsrc.c:6899 msgid "" "No supported stream was found. You might need to allow more transport " "protocols or may otherwise be missing the right GStreamer RTSP extension " "plugin." msgstr "" -#: gst/wavparse/gstwavparse.c:2185 -msgid "Internal data flow error." -msgstr "" - -#: sys/oss4/oss4-sink.c:493 sys/oss4/oss4-source.c:358 -#: sys/oss/gstosssink.c:384 +#: sys/oss4/oss4-sink.c:493 sys/oss4/oss4-source.c:358 sys/oss/gstosssink.c:384 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:503 sys/oss4/oss4-source.c:368 -#: sys/oss/gstosssink.c:391 +#: sys/oss4/oss4-sink.c:503 sys/oss4/oss4-source.c:368 sys/oss/gstosssink.c:391 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:514 sys/oss4/oss4-source.c:379 -#: sys/oss/gstosssink.c:399 +#: sys/oss4/oss4-sink.c:514 sys/oss4/oss4-source.c:379 sys/oss/gstosssink.c:399 msgid "Could not open audio device for playback." msgstr "" @@ -252,90 +248,85 @@ msgid "AUX 2 Out" msgstr "" -#: sys/v4l2/gstv4l2bufferpool.c:1506 +#: sys/v4l2/gstv4l2bufferpool.c:1672 #, c-format msgid "Error reading %d bytes from device '%s'." msgstr "" -#: sys/v4l2/gstv4l2object.c:1058 +#: sys/v4l2/gstv4l2object.c:1085 #, c-format msgid "Failed to enumerate possible video formats device '%s' can work with" msgstr "" -#: sys/v4l2/gstv4l2object.c:2310 +#: sys/v4l2/gstv4l2object.c:2577 #, c-format msgid "Could not map buffers from device '%s'" msgstr "" -#: sys/v4l2/gstv4l2object.c:2318 +#: sys/v4l2/gstv4l2object.c:2585 #, c-format msgid "The driver of device '%s' does not support the IO method %d" msgstr "" -#: sys/v4l2/gstv4l2object.c:2325 +#: sys/v4l2/gstv4l2object.c:2592 #, c-format msgid "The driver of device '%s' does not support any known IO method." msgstr "" -#: sys/v4l2/gstv4l2object.c:2818 -#, c-format -msgid "Device '%s' does not support video capture" -msgstr "" - -#: sys/v4l2/gstv4l2object.c:2827 +#: sys/v4l2/gstv4l2object.c:3214 sys/v4l2/gstv4l2object.c:3225 #, c-format msgid "Device '%s' is busy" msgstr "" -#: sys/v4l2/gstv4l2object.c:2833 sys/v4l2/gstv4l2object.c:2844 +#: sys/v4l2/gstv4l2object.c:3231 sys/v4l2/gstv4l2object.c:3243 #, c-format msgid "Device '%s' cannot capture at %dx%d" msgstr "" -#: sys/v4l2/gstv4l2object.c:2853 +#: sys/v4l2/gstv4l2object.c:3254 #, c-format msgid "Device '%s' cannot capture in the specified format" msgstr "" -#: sys/v4l2/gstv4l2object.c:2864 +#: sys/v4l2/gstv4l2object.c:3267 #, c-format msgid "Device '%s' does support non-contiguous planes" msgstr "" -#: sys/v4l2/gstv4l2object.c:2874 +#: sys/v4l2/gstv4l2object.c:3278 #, c-format msgid "Could not get parameters on device '%s'" msgstr "" -#: sys/v4l2/gstv4l2object.c:2882 +#: sys/v4l2/gstv4l2object.c:3286 msgid "Video device did not accept new frame rate setting." msgstr "" -#: sys/v4l2/gstv4l2object.c:2975 +#: sys/v4l2/gstv4l2object.c:3391 msgid "Video device did not provide output format." msgstr "" -#: sys/v4l2/gstv4l2object.c:2981 +#: sys/v4l2/gstv4l2object.c:3397 msgid "Video device returned invalid dimensions." msgstr "" -#: sys/v4l2/gstv4l2object.c:2989 +#: sys/v4l2/gstv4l2object.c:3405 msgid "Video devices uses an unsupported interlacing method." msgstr "" -#: sys/v4l2/gstv4l2object.c:2996 +#: sys/v4l2/gstv4l2object.c:3412 msgid "Video devices uses an unsupported pixel format." msgstr "" -#: sys/v4l2/gstv4l2object.c:3411 +#: sys/v4l2/gstv4l2object.c:3824 msgid "Failed to configure internal buffer pool." msgstr "" -#: sys/v4l2/gstv4l2object.c:3417 +#: sys/v4l2/gstv4l2object.c:3830 msgid "Video device did not suggest any buffer size." msgstr "" -#: sys/v4l2/gstv4l2object.c:3432 +#: sys/v4l2/gstv4l2object.c:3845 msgid "No downstream pool to import from." msgstr "" @@ -369,11 +360,11 @@ msgid "Failed to change mute state for device '%s'." msgstr "" -#: sys/v4l2/gstv4l2sink.c:606 +#: sys/v4l2/gstv4l2sink.c:615 msgid "Failed to allocated required memory." msgstr "" -#: sys/v4l2/gstv4l2src.c:477 sys/v4l2/gstv4l2videodec.c:572 +#: sys/v4l2/gstv4l2src.c:510 sys/v4l2/gstv4l2videodec.c:581 msgid "Failed to allocate required memory." msgstr "" @@ -397,11 +388,11 @@ msgid "Encoder on device %s has no supported output format" msgstr "" -#: sys/v4l2/gstv4l2videodec.c:586 +#: sys/v4l2/gstv4l2videodec.c:595 msgid "Failed to start decoding thread." msgstr "" -#: sys/v4l2/gstv4l2videodec.c:594 +#: sys/v4l2/gstv4l2videodec.c:603 msgid "Failed to process frame." msgstr "" @@ -513,10 +504,10 @@ msgid "Failed to set output %d on device %s." msgstr "" -#: sys/ximage/gstximagesrc.c:795 +#: sys/ximage/gstximagesrc.c:828 msgid "Changing resolution at runtime is not yet supported." msgstr "" -#: sys/ximage/gstximagesrc.c:809 +#: sys/ximage/gstximagesrc.c:842 msgid "Cannot operate without a clock" msgstr "" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/hr.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/hr.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/hr.po gst-plugins-good1.0-1.6.1/po/hr.po --- gst-plugins-good1.0-1.4.3/po/hr.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/hr.po 2015-10-30 14:27:13.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2012-04-16 03:04+0200\n" "Last-Translator: Tomislav Krznar \n" "Language-Team: Croatian \n" @@ -46,8 +46,9 @@ msgid "Secure connection setup failed." msgstr "Postavljanje sigurne veze nije uspjelo." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Dogodila se greška mreže, ili je poslužitelj neočekivano zatvorio vezu." @@ -85,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Ova datoteka sadrži previše nizova. Reproduciram samo prvih %d" +msgid "Internal data flow error." +msgstr "Greška unutarnjeg toka podataka." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -100,9 +104,6 @@ "Nisu pronađeni podržani nizovi. Morate dozvoliti više protokola prijenosa " "ili vam možda nedostaje odgovarajući GStreamer RTSP priključak proširenja." -msgid "Internal data flow error." -msgstr "Greška unutarnjeg toka podataka." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -225,10 +226,6 @@ msgid "The driver of device '%s' does not support any known IO method." msgstr "Upravljački program uređaja „%s” ne podržava poznate metode snimanja." -#, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Uređaj „%s” nije izlazni uređaj." - #, c-format msgid "Device '%s' is busy" msgstr "" @@ -428,6 +425,10 @@ msgid "Cannot operate without a clock" msgstr "Ne mogu raditi bez takta" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Uređaj „%s” nije izlazni uređaj." + #~ msgid "Could not establish connection to sound server" #~ msgstr "Ne mogu ostvariti vezu prema poslužitelju zvuka" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/hu.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/hu.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/hu.po gst-plugins-good1.0-1.6.1/po/hu.po --- gst-plugins-good1.0-1.4.3/po/hu.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/hu.po 2015-10-30 14:27:13.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-06-29 12:56+0200\n" "Last-Translator: Balázs Úr \n" "Language-Team: Hungarian \n" @@ -51,8 +51,9 @@ msgid "Secure connection setup failed." msgstr "A biztonságos kapcsolat kialakítása meghiúsult." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Hálózati hiba történt, vagy a kiszolgáló váratlanul lezárta a kapcsolatot." @@ -92,6 +93,9 @@ msgstr "" "A fájl túl sok adatfolyamot tartalmaz. Csak az első %d kerül lejátszásra." +msgid "Internal data flow error." +msgstr "Belső adatfolyam-hiba." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -107,9 +111,6 @@ "Nem található támogatott adatfolyam. Lehet, hogy több átviteli protokollt " "kell engedélyezni, vagy hiányzik a megfelelő GStreamer RTSP bővítmény." -msgid "Internal data flow error." -msgstr "Belső adatfolyam-hiba." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -234,10 +235,6 @@ "A(z) „%s” eszköz illesztőprogramja nem támogat egyetlen ismert IO módot sem." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "A(z) „%s” eszköz nem támogatja a videofelvételt" - -#, c-format msgid "Device '%s' is busy" msgstr "A(z) „%s” eszköz foglalt" @@ -436,6 +433,9 @@ msgid "Cannot operate without a clock" msgstr "Óra nélkül lehetetlen a működés" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "A(z) „%s” eszköz nem támogatja a videofelvételt" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Nem hozható létre kapcsolat a hangkiszolgálóhoz" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/id.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/id.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/id.po gst-plugins-good1.0-1.6.1/po/id.po --- gst-plugins-good1.0-1.4.3/po/id.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/id.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-07-06 21:37+0700\n" "Last-Translator: Andhika Padmawan \n" "Language-Team: Indonesian \n" @@ -48,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "Pengaturan koneksi aman gagal." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Terjadi sebuah galat jaringan, atau server menutup koneksi secara tiba-tiba." @@ -87,6 +88,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Berkas ini berisi terlalu banyak arus. Hanya memutar %d pertama" +msgid "Internal data flow error." +msgstr "Galat aliran data internal." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -103,9 +107,6 @@ "banyak transportasi atau kehilangan plugin ekstensi GStreamer RTSP yang " "benar." -msgid "Internal data flow error." -msgstr "Galat aliran data internal." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -229,10 +230,6 @@ msgstr "Driver dari divais '%s' tak mendukung metode IO apapun yang dikenal." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Divais '%s' tak mendukung penangkapan video" - -#, c-format msgid "Device '%s' is busy" msgstr "Divais '%s' sibuk" @@ -424,3 +421,6 @@ msgid "Cannot operate without a clock" msgstr "Tak dapat beroperasi tanpa jam" + +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Divais '%s' tak mendukung penangkapan video" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/it.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/it.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/it.po gst-plugins-good1.0-1.6.1/po/it.po --- gst-plugins-good1.0-1.4.3/po/it.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/it.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.25.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2010-10-25 10:11+0200\n" "Last-Translator: Luca Ferretti \n" "Language-Team: Italian \n" @@ -45,8 +45,9 @@ msgid "Secure connection setup failed." msgstr "Impostazione della connessione sicura non riuscita." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Si è verificato un errore di rete, oppure il server ha chiuso la connessione " "in modo inatteso." @@ -86,6 +87,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Questo file contiene troppi stream. Riprodotti solo i primi %d" +msgid "Internal data flow error." +msgstr "Errore interno nel flusso di dati." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -103,9 +107,6 @@ "abilitare altri protocolli di trasporto oppure in alternativa potrebbe " "mancare il corretto plugin GStreamer di tipo estensione RTSP." -msgid "Internal data flow error." -msgstr "Errore interno nel flusso di dati." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -229,10 +230,6 @@ msgstr "Il driver del device «%s» non supporta alcun metodo di cattura noto." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Il device «%s» non è un dispositivo di uscita." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Il device «%s» non è un dispositivo di uscita." @@ -455,6 +452,10 @@ msgid "Cannot operate without a clock" msgstr "Impossibile operare senza un clock" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Il device «%s» non è un dispositivo di uscita." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "Ottenuta dimensione inattesa del fotogramma: %u invece di %u." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/ja.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/ja.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/ja.po gst-plugins-good1.0-1.6.1/po/ja.po --- gst-plugins-good1.0-1.4.3/po/ja.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/ja.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.0.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2012-12-22 20:13+0900\n" "Last-Translator: Takeshi Hamasaki \n" "Language-Team: Japanese \n" @@ -48,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "セキュア接続のセットアップに失敗しました。" +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "ネットワークエラーが発生したか、サーバーが予期せず接続を閉じました。" msgid "Server sent bad data." @@ -89,6 +90,9 @@ "このファイルには多くのストリームが格納されているため、最初の %d 個のみ再生し" "ます" +msgid "Internal data flow error." +msgstr "内部データフローエラー。" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -105,9 +109,6 @@ "する必要があるかもしれません。または、正しい GStreamer RTSP 拡張プラグインが" "ないのかもしれません。" -msgid "Internal data flow error." -msgstr "内部データフローエラー。" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -239,10 +240,6 @@ "ん。" #, c-format -msgid "Device '%s' does not support video capture" -msgstr "デバイス '%s' はビデオキャプチャをサポートしていません" - -#, c-format msgid "Device '%s' is busy" msgstr "デバイス`%s'はビジー状態です" @@ -447,6 +444,9 @@ msgid "Cannot operate without a clock" msgstr "クロックなしでは動作できません。" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "デバイス '%s' はビデオキャプチャをサポートしていません" + #~ msgid "Could not establish connection to sound server" #~ msgstr "サウンドサーバーへの接続に失敗しました" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/lt.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/lt.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/lt.po gst-plugins-good1.0-1.6.1/po/lt.po --- gst-plugins-good1.0-1.4.3/po/lt.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/lt.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.23.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2010-07-16 19:34+0300\n" "Last-Translator: Žygimantas Beručka \n" "Language-Team: Lithuanian \n" @@ -51,7 +51,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -88,6 +88,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Šiame faile per daug srautų. Grojami tik pirmieji %d" +msgid "Internal data flow error." +msgstr "Vidinė duomenų srauto klaida." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -103,9 +106,6 @@ "Nerasta palaikomų srautų. Jums gali reikėti leisti daugiau transporto " "protokolų, arba jūs neturite tinkamo GStreamer RTSP papildinio įskiepio." -msgid "Internal data flow error." -msgstr "Vidinė duomenų srauto klaida." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -228,10 +228,6 @@ msgstr "Įrenginio „%s“ tvarkyklė nepalaiko jokių žinomų įrašymo būdų." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Įrenginys „%s“ nėra išvesties įrenginys." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Įrenginys „%s“ nėra išvesties įrenginys." @@ -431,6 +427,10 @@ msgid "Cannot operate without a clock" msgstr "Negali veikti be laikrodžio" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Įrenginys „%s“ nėra išvesties įrenginys." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "Gautas netikėtas kadro dydis %u vietoje %u." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/lv.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/lv.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/lv.po gst-plugins-good1.0-1.6.1/po/lv.po --- gst-plugins-good1.0-1.4.3/po/lv.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/lv.po 2015-10-30 14:27:13.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.2.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-04-20 16:38+0300\n" "Last-Translator: Rihards Prieditis \n" "Language-Team: Latvian \n" @@ -50,8 +50,9 @@ msgid "Secure connection setup failed." msgstr "Neizdevās izveidot drošo savienojumu." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Notika tīkla kļūda, vai serveris negaidīti aizvēra savienojumu." msgid "Server sent bad data." @@ -88,6 +89,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Šī datne satur pārāk daudz straumju. Tiek atskaņota tikai pirmā %d" +msgid "Internal data flow error." +msgstr "Iekšēja datu plūsmas kļūda." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -103,9 +107,6 @@ "Netika atrasta atbalstīta straume. Iespējams, jums jāatļauj vairāk " "transporta protokoli vai arī trūkst GStreamer RTSP paplašinājuma spraudnis. " -msgid "Internal data flow error." -msgstr "Iekšēja datu plūsmas kļūda." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -227,10 +228,6 @@ msgstr "Ierīces “%s” draiveris neatbalsta nevienu zināmo ierakstīšanas metodi." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Ierīce “%s” neatbalsta video tveršanu" - -#, c-format msgid "Device '%s' is busy" msgstr "Ierīce “%s” ir aizņemta" @@ -431,6 +428,9 @@ msgid "Cannot operate without a clock" msgstr "Nevar veikt darbības bez pulksteņa" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Ierīce “%s” neatbalsta video tveršanu" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Nevar izveidot savienojumu ar skaņas serveri" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/mt.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/mt.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/mt.po gst-plugins-good1.0-1.6.1/po/mt.po --- gst-plugins-good1.0-1.4.3/po/mt.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/mt.po 2015-10-30 14:27:13.000000000 +0000 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good-0.10.10.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2008-10-26 19:09+0100\n" "Last-Translator: Michel Bugeja \n" "Language-Team: Maltese \n" @@ -49,7 +49,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -86,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Il-fajl fiħ aktar streams milli suppost. Ser indoqq l-ewwel %d" +msgid "Internal data flow error." +msgstr "Problema interna ta' data flow" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -97,9 +100,6 @@ "plugin." msgstr "" -msgid "Internal data flow error." -msgstr "Problema interna ta' data flow" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -223,10 +223,6 @@ "Id-driver tal-apparat '%s' ma jissapportja l-ebda capture method mifhum." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Device '%s' mhux capture device." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Device '%s' mhux capture device." @@ -436,6 +432,10 @@ msgid "Cannot operate without a clock" msgstr "Ma nistax nħaddem mingħajr arloġġ" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Device '%s' mhux capture device." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "Irċivejt frame size ta' %u minflok kif kien mistenni ta' %u." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/nb.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/nb.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/nb.po gst-plugins-good1.0-1.6.1/po/nb.po --- gst-plugins-good1.0-1.4.3/po/nb.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/nb.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-07-22 13:14+0100\n" "Last-Translator: Johnny A. Solbu \n" "Language-Team: Norwegian Bokmaal \n" @@ -47,8 +47,9 @@ msgid "Secure connection setup failed." msgstr "Oppsett av sikker tilkobling feilet." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Et nettverk feil oppstod, eller tjeneren lukket uventet tilkoblingen." msgid "Server sent bad data." @@ -85,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Filen inneholder for mange strømmer. Spiller bare første %d" +msgid "Internal data flow error." +msgstr "Intern dataflytfeil." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -101,9 +105,6 @@ "transportprotokoller eller den kan mangle den rette GStreamer RTSP-" "utvidelsestillegget." -msgid "Internal data flow error." -msgstr "Intern dataflytfeil." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -225,10 +226,6 @@ msgstr "Driveren av enheten «%s» støtter ikke noen kjente IO-metoder." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Enhet «%s» støtter ikke videoopptak" - -#, c-format msgid "Device '%s' is busy" msgstr "Enheten «%s» er opptatt" @@ -422,6 +419,9 @@ msgid "Cannot operate without a clock" msgstr "Kan ikke operere uten en klokke" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Enhet «%s» støtter ikke videoopptak" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Kunne ikke etablere tilkobling til lydtjener" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/nl.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/nl.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/nl.po gst-plugins-good1.0-1.6.1/po/nl.po --- gst-plugins-good1.0-1.4.3/po/nl.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/nl.po 2015-10-30 12:27:48.000000000 +0000 @@ -1,13 +1,13 @@ -# translation of gst-plugins-good-1.3.90.nl.po to Dutch +# translation of gst-plugins-good.nl.po to Dutch # This file is put in the public domain. # -# Freek de Kruijf , 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014. +# Freek de Kruijf , 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.3.90\n" +"Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2014-07-22 10:55+0200\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-10-17 12:36+0200\n" "Last-Translator: Freek de Kruijf \n" "Language-Team: Dutch \n" "Language: nl\n" @@ -47,10 +47,10 @@ msgstr "Beveiligde verbinding opzetten is mislukt." msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Er trad een netwerkfout op of de server heeft de verbinding onverwacht " -"afgesloten." +"afgebroken." msgid "Server sent bad data." msgstr "De server stuurde onjuiste gegevens." @@ -87,6 +87,9 @@ msgstr "" "Dit bestand bevat te veel stromen. Alleen de eerste %d worden afgespeeld." +msgid "Internal data flow error." +msgstr "Interne fout in de gegevensdoorvoer." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -103,9 +106,6 @@ "overdrachtsprotocollen toestaan of anders ontbreekt de juiste GStreamer RTSP " "extensie-plugin." -msgid "Internal data flow error." -msgstr "Interne fout in de gegevensdoorvoer." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -228,10 +228,6 @@ "Het stuurprogramma van apparaat '%s' ondersteunt geen bekende IO-methode." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Apparaat '%s' ondersteunt het opnemen van video niet" - -#, c-format msgid "Device '%s' is busy" msgstr "Apparaat '%s' is bezet" @@ -428,6 +424,9 @@ msgid "Cannot operate without a clock" msgstr "Kan niet werken zonder een klok." +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Apparaat '%s' ondersteunt het opnemen van video niet" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Kan geen verbinding maken met de geluidsserver" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/or.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/or.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/or.po gst-plugins-good1.0-1.6.1/po/or.po --- gst-plugins-good1.0-1.4.3/po/or.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/or.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2004-09-27 13:32+0530\n" "Last-Translator: Gora Mohanty \n" "Language-Team: Oriya \n" @@ -51,7 +51,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -88,6 +88,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +msgid "Internal data flow error." +msgstr "" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -99,9 +102,6 @@ "plugin." msgstr "" -msgid "Internal data flow error." -msgstr "" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -222,10 +222,6 @@ msgstr "" #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "\"%s\" ଯନ୍ତ୍ର ଗୋଟିଏ ଅନୁଲିପିକାର ନୁହେଁ." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "\"%s\" ଯନ୍ତ୍ର ଗୋଟିଏ ଅନୁଲିପିକାର ନୁହେଁ." @@ -415,6 +411,10 @@ msgstr "" #, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "\"%s\" ଯନ୍ତ୍ର ଗୋଟିଏ ଅନୁଲିପିକାର ନୁହେଁ." + +#, fuzzy #~ msgid "Failed trying to get video frames from device '%s'." #~ msgstr "\"%s\" ଯନ୍ତ୍ରରୁ ପର୍ଯ୍ଯାପ୍ତ ଅସ୍ଥାୟୀ ସଞ୍ଚୟ ସ୍ଥାନ ଆଣିହେଲା ନାହିଁ." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/pl.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/pl.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/pl.po gst-plugins-good1.0-1.6.1/po/pl.po --- gst-plugins-good1.0-1.4.3/po/pl.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/pl.po 2015-10-30 12:27:49.000000000 +0000 @@ -1,13 +1,13 @@ # Polish translation for gst-plugins-good. # This file is distributed under the same license as the gst-plugins-good package. -# Jakub Bogusz , 2007-2014. +# Jakub Bogusz , 2007-2015. # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.3.90\n" +"Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2014-06-29 10:45+0200\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-10-15 20:49+0200\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" "Language: pl\n" @@ -45,7 +45,7 @@ msgstr "Ustanowienie bezpiecznego połączenia nie powiodło się." msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Wystąpił błąd sieciowy lub serwer nieoczekiwanie zamknął połączenie." msgid "Server sent bad data." @@ -83,6 +83,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Ten plik zawiera zbyt dużo strumieni. Odtwarzanie tylko %d pierwszych" +msgid "Internal data flow error." +msgstr "Błąd wewnętrzny przepływu danych." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -99,9 +102,6 @@ "protokołów transportu, albo może brakować właściwej wtyczki rozszerzenia " "RTSP GStreamera." -msgid "Internal data flow error." -msgstr "Błąd wewnętrzny przepływu danych." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -225,10 +225,6 @@ msgstr "Sterownik urządzenia '%s' nie obsługuje żadnej znanej metody we/wy." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Urządzenie '%s' nie obsługuje przechwytywania obrazu" - -#, c-format msgid "Device '%s' is busy" msgstr "Urządzenie '%s' jest zajęte" diff -Nru gst-plugins-good1.0-1.4.3/po/POTFILES.in gst-plugins-good1.0-1.6.1/po/POTFILES.in --- gst-plugins-good1.0-1.4.3/po/POTFILES.in 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/POTFILES.in 2015-10-22 08:02:54.000000000 +0000 @@ -10,6 +10,7 @@ gst/avi/gstavidemux.c gst/avi/gstavimux.c gst/isomp4/qtdemux.c +gst/multifile/gstsplitmuxsrc.c gst/rtsp/gstrtspsrc.c gst/wavparse/gstwavparse.c sys/oss4/oss4-sink.c Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/pt_BR.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/pt_BR.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/pt_BR.po gst-plugins-good1.0-1.6.1/po/pt_BR.po --- gst-plugins-good1.0-1.4.3/po/pt_BR.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/pt_BR.po 2015-10-30 14:27:13.000000000 +0000 @@ -1,18 +1,20 @@ # Brazilian Portuguese translation of gst-plugins-good. # This file is distributed under the same license as the gst-plugins-good package. -# Copyright (C) 2008-2013 Free Software Foundation, Inc. -# Fabrício Godoy , 2008-2013. +# Copyright (C) 2008-2015 Free Software Foundation, Inc. +# Fabrício Godoy , 2008-2015. # # data flow -> fluxo de dados # streaming -> fluxo contínuo # clock -> temporizador +# plane (overlay plane) -> plano de sobreposição +# pool -> coleção, conjunto, agrupamento # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good-1.2.1\n" +"Project-Id-Version: gst-plugins-good-1.4.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2013-12-29 17:48-0200\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-02-01 23:02-0200\n" "Last-Translator: Fabrício Godoy \n" "Language-Team: Brazilian Portuguese \n" @@ -51,8 +53,9 @@ msgid "Secure connection setup failed." msgstr "Configuração de conexão segura falhou." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Um erro de rede ocorreu, ou o servidor fechou a conexão inesperadamente." @@ -92,6 +95,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Este arquivo contêm muitos fluxos. Apenas reproduzindo o primeiro %d" +msgid "Internal data flow error." +msgstr "Erro interno no fluxo de dados." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -108,9 +114,6 @@ "protocolos de transporte sejam permitidos ou senão o plug-in de extensão " "GStreamer RTSP pode estar incorreto." -msgid "Internal data flow error." -msgstr "Erro interno no fluxo de dados." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -236,10 +239,6 @@ "E/S." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "O dispositivo \"%s\" não tem suporte a captura de vídeo" - -#, c-format msgid "Device '%s' is busy" msgstr "O dispositivo \"%s\" está ocupado" @@ -251,9 +250,10 @@ msgid "Device '%s' cannot capture in the specified format" msgstr "O dispositivo \"%s\" não realiza captura no formato especificado" -#, fuzzy, c-format +#, c-format msgid "Device '%s' does support non-contiguous planes" -msgstr "O dispositivo \"%s\" não tem suporte a captura de vídeo" +msgstr "" +"O dispositivo \"%s\" não tem suporte a planos de sobreposição não-contínuos" #, c-format msgid "Could not get parameters on device '%s'" @@ -262,30 +262,27 @@ msgid "Video device did not accept new frame rate setting." msgstr "O dispositivo de vídeo não aceita definir uma nova taxa de quadros." -#, fuzzy msgid "Video device did not provide output format." -msgstr "O dispositivo de vídeo não aceita definir uma nova taxa de quadros." +msgstr "O dispositivo de vídeo não forneceu um formato de saída." msgid "Video device returned invalid dimensions." -msgstr "" +msgstr "O dispositivo de vídeo retornou dimensões inválidas." -#, fuzzy msgid "Video devices uses an unsupported interlacing method." -msgstr "O driver do dispositivo \"%s\" não tem suporte ao método %d de E/S" +msgstr "" +"Os dispositivos de vídeo utilizam um método de entrelaçamento não suportado." msgid "Video devices uses an unsupported pixel format." -msgstr "" +msgstr "Os dispositivos de vídeo utilizam um formato para pixel não suportado." -#, fuzzy msgid "Failed to configure internal buffer pool." -msgstr "O dispositivo de vídeo não pôde reservar um buffer." +msgstr "Falha ao configurar uma coleção de buffer interno." -#, fuzzy msgid "Video device did not suggest any buffer size." -msgstr "O dispositivo de vídeo não pôde reservar um buffer." +msgstr "O dispositivo de vídeo não sugeriu nenhum tamanho de buffer." msgid "No downstream pool to import from." -msgstr "" +msgstr "Nenhuma coleção de fluxo de recebimento para importar." #, c-format msgid "Failed to get settings of tuner %d on device '%s'." @@ -312,33 +309,35 @@ msgstr "Falha ao alternar entre com e sem áudio para o dispositivo \"%s\"." msgid "Failed to allocated required memory." -msgstr "" +msgstr "Falha ao alocar a memória necessária." msgid "Failed to allocate required memory." -msgstr "" +msgstr "Falha ao alocar a memória necessária." -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported input format" -msgstr "O driver do dispositivo \"%s\" não tem suporte ao método %d de E/S" +msgstr "" +"O conversor no dispositivo %s não tem um formato de entrada com suporte" -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported output format" -msgstr "O dispositivo de vídeo não aceita definir uma nova taxa de quadros." +msgstr "O conversor no dispositivo %s não tem um formato de saída com suporte" -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported input format" -msgstr "O dispositivo de vídeo não aceita definir uma nova taxa de quadros." +msgstr "" +"O codificador no dispositivo %s não tem um formato de entrada com suporte" -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported output format" -msgstr "O dispositivo de vídeo não aceita definir uma nova taxa de quadros." +msgstr "" +"O codificador no dispositivo %s não tem um formato de saída com suporte" -#, fuzzy msgid "Failed to start decoding thread." -msgstr "Falha ao decodificar a imagem JPEG" +msgstr "Falha ao iniciar o segmento de decodificação." msgid "Failed to process frame." -msgstr "" +msgstr "Falha ao processar quadro." #, c-format msgid "" @@ -384,13 +383,14 @@ msgid "Device '%s' is not a output device." msgstr "O dispositivo \"%s\" não é um dispositivo de saída." -#, fuzzy, c-format +#, c-format msgid "Device '%s' is not a M2M device." -msgstr "O dispositivo \"%s\" não é um dispositivo de saída." +msgstr "O dispositivo \"%s\" não é um dispositivo M2M." -#, fuzzy, c-format +#, c-format msgid "Could not dup device '%s' for reading and writing." -msgstr "Não foi possível abrir o dispositivo \"%s\" para leitura e gravação." +msgstr "" +"Não foi possível duplicar o dispositivo \"%s\" para leitura e gravação." #, c-format msgid "Failed to set norm for device '%s'." @@ -441,6 +441,9 @@ msgid "Cannot operate without a clock" msgstr "Não é possível operar sem um temporizador" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "O dispositivo \"%s\" não tem suporte a captura de vídeo" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Não foi possível estabelecer uma conexão com servidor de som" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/ro.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/ro.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/ro.po gst-plugins-good1.0-1.6.1/po/ro.po --- gst-plugins-good1.0-1.4.3/po/ro.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/ro.po 2015-10-30 14:27:13.000000000 +0000 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 0.10.23.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2010-08-16 03:22+0300\n" "Last-Translator: Lucian Adrian Grijincu \n" "Language-Team: Romanian \n" @@ -50,7 +50,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -88,6 +88,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Fișierul conține prea multe fluxuri. Se redau doar primele %d" +msgid "Internal data flow error." +msgstr "Eroare internă a fluxului de date." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -104,9 +107,6 @@ "multor protocoale de transport sau de altfel s-ar putea să lipsească modulul " "corect de extensie GStreamer RTSP." -msgid "Internal data flow error." -msgstr "Eroare internă a fluxului de date." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -234,10 +234,6 @@ "cunoscută." #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Dispozitivul „%s” nu este un dispozitiv de ieșire." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Dispozitivul „%s” nu este un dispozitiv de ieșire." @@ -452,6 +448,10 @@ msgid "Cannot operate without a clock" msgstr "Nu se poate opera fără un ceas" +#, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Dispozitivul „%s” nu este un dispozitiv de ieșire." + #~ msgid "Got unexpected frame size of %u instead of %u." #~ msgstr "S-a obținut o dimensiune neașteptată pentru cadru, %u în loc de %u." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/ru.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/ru.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/ru.po gst-plugins-good1.0-1.6.1/po/ru.po --- gst-plugins-good1.0-1.4.3/po/ru.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/ru.po 2015-10-30 12:27:49.000000000 +0000 @@ -3,16 +3,16 @@ # # Артём Попов , 2009. # Pavel Maryanov , 2009. -# Yuri Kozlov , 2011, 2012, 2013, 2014. +# Yuri Kozlov , 2011, 2012, 2013, 2014, 2015. # Pavel Maryanov , 2013. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.3.90\n" +"Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2014-06-29 18:59+0400\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-10-18 13:39+0300\n" "Last-Translator: Yuri Kozlov \n" -"Language-Team: Russian \n" +"Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -51,7 +51,7 @@ msgstr "Не удалось настроить защищённое соединение." msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Произошла сетевая ошибка или сервер неожиданно закрыл соединение." msgid "Server sent bad data." @@ -93,6 +93,9 @@ msgstr "" "Файл содержит слишком много потоков. Будет воспроизведёно только первых %d" +msgid "Internal data flow error." +msgstr "Внутренняя ошибка потока данных." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -108,9 +111,6 @@ "Ни один поток не поддерживается. Возможно требуется разрешить дополнительные " "протоколы передачи или же отсутствует правильный модуль GStreamer RTSP." -msgid "Internal data flow error." -msgstr "Внутренняя ошибка потока данных." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -236,10 +236,6 @@ "вывода." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Устройство «%s» не поддерживает захват видео" - -#, c-format msgid "Device '%s' is busy" msgstr "Устройство «%s» занято" @@ -438,6 +434,9 @@ msgid "Cannot operate without a clock" msgstr "Операция невозможна без часов" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Устройство «%s» не поддерживает захват видео" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Не удалось установить соединение с сервером звука" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/sk.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/sk.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/sk.po gst-plugins-good1.0-1.6.1/po/sk.po --- gst-plugins-good1.0-1.4.3/po/sk.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/sk.po 2015-10-30 14:27:13.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.2.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-01-30 11:08+0100\n" "Last-Translator: Peter Tuharsky \n" "Language-Team: Slovak \n" @@ -47,8 +47,9 @@ msgid "Secure connection setup failed." msgstr "Nastavenie bezpečného pripojenia zlyhalo." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Vyskytla sa sieťová chyba, alebo server nečakane uzavrel spojenie." msgid "Server sent bad data." @@ -86,6 +87,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Tento súbor obsahuje príliš mnoho prúdov údajov. Prehrávam iba prvý %d" +msgid "Internal data flow error." +msgstr "Vnútorná chyba toku údajov." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -102,9 +106,6 @@ "viacero prenosových protokolov, alebo vám možno chýba správny zásuvný modul " "GStreamer RTSP." -msgid "Internal data flow error." -msgstr "Vnútorná chyba toku údajov." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -228,10 +229,6 @@ msgstr "Tento ovládač zariadenia '%s' nepodporuje žiadnu známu IO metódu." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Zariadenie '%s' nie je určené pre nahrávanie videa" - -#, c-format msgid "Device '%s' is busy" msgstr "Zariadenie '%s' je zaneprázdnené" @@ -433,6 +430,9 @@ msgid "Cannot operate without a clock" msgstr "Nemôžem fungovať bez hodín" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Zariadenie '%s' nie je určené pre nahrávanie videa" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Nepodarilo sa nadviazať spojenie so zvukovým serverom" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/sl.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/sl.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/sl.po gst-plugins-good1.0-1.6.1/po/sl.po --- gst-plugins-good1.0-1.4.3/po/sl.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/sl.po 2015-10-30 14:27:13.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good-1.2.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-04-09 22:52+0100\n" "Last-Translator: Klemen Košir \n" "Language-Team: Slovenian \n" @@ -50,8 +50,9 @@ msgid "Secure connection setup failed." msgstr "Nastavitev varne povezave je spodletela." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Prišlo je do omrežne napake ali pa je povezava nepričakovano prekinjena." @@ -89,6 +90,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Datoteka vsebuje več pretokov. Predvajano bo le začetnih %d" +msgid "Internal data flow error." +msgstr "Notranja napaka pretoka podatkov." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -105,9 +109,6 @@ "protokolov prenosa, oziroma manjka ustrezen vstavek GStreamer RTSP " "razširitve." -msgid "Internal data flow error." -msgstr "Notranja napaka pretoka podatkov." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -230,10 +231,6 @@ msgstr "Gonilnik naprave \"%s\" ne podpira nobenega znanega načina I/O." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Naprava \"%s\" ne podpira zajemanja videa." - -#, c-format msgid "Device '%s' is busy" msgstr "Naprava \"%s\" je zaposlena." @@ -436,3 +433,6 @@ msgid "Cannot operate without a clock" msgstr "Izvajanje opravil brez ure ni mogoče" + +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Naprava \"%s\" ne podpira zajemanja videa." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/sq.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/sq.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/sq.po gst-plugins-good1.0-1.6.1/po/sq.po --- gst-plugins-good1.0-1.4.3/po/sq.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/sq.po 2015-10-30 14:27:13.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gst-plugins 0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2004-08-07 20:29+0200\n" "Last-Translator: Laurent Dhima \n" "Language-Team: Albanian \n" @@ -49,7 +49,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -86,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +msgid "Internal data flow error." +msgstr "" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -97,9 +100,6 @@ "plugin." msgstr "" -msgid "Internal data flow error." -msgstr "" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -218,10 +218,6 @@ msgstr "" #, fuzzy, c-format -msgid "Device '%s' does not support video capture" -msgstr "Dispozitivi \"%s\" nuk është një dispozitiv marrje." - -#, fuzzy, c-format msgid "Device '%s' is busy" msgstr "Dispozitivi \"%s\" nuk është një dispozitiv marrje." @@ -411,6 +407,10 @@ msgstr "" #, fuzzy +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Dispozitivi \"%s\" nuk është një dispozitiv marrje." + +#, fuzzy #~ msgid "Failed trying to get video frames from device '%s'." #~ msgstr "E pamundur marrja e buffers të mjaftueshëm nga dispozitivi \"%s\"." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/sr.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/sr.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/sr.po gst-plugins-good1.0-1.6.1/po/sr.po --- gst-plugins-good1.0-1.4.3/po/sr.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/sr.po 2015-10-30 14:27:13.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good-1.4.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-09-13 10:50+0200\n" "Last-Translator: Мирослав Николић \n" "Language-Team: Serbian <(nothing)>\n" @@ -47,8 +47,9 @@ msgid "Secure connection setup failed." msgstr "Подешавање безбедне везе није успело." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Дошло је до грешке на мрежи, или је сервер неочекивано затворио везу." msgid "Server sent bad data." @@ -86,6 +87,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Ова датотека садржи превише токова. Пуштам само први %d" +msgid "Internal data flow error." +msgstr "Унутрaшња грешка протока података." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -102,9 +106,6 @@ "протокола преноса или можда на неки други начин недостаје прави прикључак " "РТСП проширења ГСтримера." -msgid "Internal data flow error." -msgstr "Унутрaшња грешка протока података." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -228,10 +229,6 @@ msgstr "Управљачки програм уређаја „%s“ не подржава ниједан познати УИ начин." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Уређај „%s“ не подржава видео снимање" - -#, c-format msgid "Device '%s' is busy" msgstr "Уређај „%s“ је заузет" @@ -425,3 +422,6 @@ msgid "Cannot operate without a clock" msgstr "Не могу да радим без сата" + +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Уређај „%s“ не подржава видео снимање" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/sv.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/sv.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/sv.po gst-plugins-good1.0-1.6.1/po/sv.po --- gst-plugins-good1.0-1.4.3/po/sv.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/sv.po 2015-10-30 14:27:13.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-07-11 02:52+0200\n" "Last-Translator: Sebastian Rasmussen \n" "Language-Team: Swedish \n" @@ -47,8 +47,9 @@ msgid "Secure connection setup failed." msgstr "Säker anslutning misslyckades." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Ett nätverksfel inträffade eller servern stängde anslutningen oväntat." msgid "Server sent bad data." @@ -86,6 +87,9 @@ msgstr "" "Den här filen innehåller för många strömmar. Spelar endast upp de första %d" +msgid "Internal data flow error." +msgstr "Internt fel i dataflöde." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -102,9 +106,6 @@ "transportprotokoll eller så saknar du kanske det rätta GStreamer-tillägget " "för RTSP." -msgid "Internal data flow error." -msgstr "Internt fel i dataflöde." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -228,10 +229,6 @@ msgstr "Drivrutinen för enheten \"%s\" stöder inte någon känd IO-metod." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Enheten \"%s\" stöder inte videoinfångning." - -#, c-format msgid "Device '%s' is busy" msgstr "Enheten \"%s\" är upptagen" @@ -433,3 +430,6 @@ msgid "Cannot operate without a clock" msgstr "Kan inte fungera utan en klocka" + +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Enheten \"%s\" stöder inte videoinfångning." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/tr.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/tr.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/tr.po gst-plugins-good1.0-1.6.1/po/tr.po --- gst-plugins-good1.0-1.4.3/po/tr.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/tr.po 2015-10-30 14:27:13.000000000 +0000 @@ -1,23 +1,26 @@ # translation of gst-plugins-good-1.0.3.po to Turkish # This file is put in the public domain. +# This file is distributed under the same license as the gst-plugins-good package. # Server Acim , 2010. # Server Acim , 2011. -# Server Acim , 2013. +# Server Acim , 2013, 2015. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.0.3\n" +"Project-Id-Version: gst-plugins-good 1.4.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2013-03-10 13:05+0200\n" -"Last-Translator: Server Acim \n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-01-10 21:07+0100\n" +"Last-Translator: Volkan Gezer \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 1.5\n" msgid "Jack server not found" -msgstr "" +msgstr "Jack sunucusu bulunamadı" msgid "Failed to decode JPEG image" msgstr "JPEG görüntüsünü çözümlenemedi" @@ -45,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "Güvenli bağlantı ayarı yapılamadı." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Bir ağ hatası meydana geldi, veya sunucu bağlantıyı beklenmeyen bir şekilde " "kesti." @@ -67,7 +71,7 @@ msgstr "Bu dosya geçersiz ve oynatılamaz." msgid "Cannot play stream because it is encrypted with PlayReady DRM." -msgstr "" +msgstr "Akış çalınamadı çünkü PlayReady DRM ile şifrelenmiş." msgid "This file is corrupt and cannot be played." msgstr "Bu dosya bozuk ve oynatılamaz." @@ -85,6 +89,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Bu dosya çok fazla akış içeriyor. Sadece ilki oynatılıyor %d" +msgid "Internal data flow error." +msgstr "İç veri akış hatası." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -100,9 +107,6 @@ "Desteklenen akış bulunamadı. Daha fazla aktarım protokolüne izin vermeniz " "veya doğru GStreamer RTSP uzantı eklentisine onay vermeniz gerekebilir." -msgid "Internal data flow error." -msgstr "İç veri akış hatası." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -166,13 +170,11 @@ msgid "AUX 2 In" msgstr "AUX 2 Giriş" -#, fuzzy msgid "Codec Loopback" -msgstr "Geridönüm" +msgstr "Kodek Geridönüşü" -#, fuzzy msgid "SunVTS Loopback" -msgstr "Geridönüm" +msgstr "SunVTS Geridönüşü" msgid "Volume" msgstr "Ses Girişi" @@ -224,10 +226,6 @@ "desteklemiyor." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Aygıt '%s' video yakalamayı desteklemiyor" - -#, c-format msgid "Device '%s' is busy" msgstr "Aygıt '%s' meşgul" @@ -239,9 +237,9 @@ msgid "Device '%s' cannot capture in the specified format" msgstr "Aygıt '%s' belirtilen kipte görüntü yakalayamadı" -#, fuzzy, c-format +#, c-format msgid "Device '%s' does support non-contiguous planes" -msgstr "Aygıt '%s' video yakalamayı desteklemiyor" +msgstr "Aygıt '%s' bitişik olmayan düzlemleri desteklemiyor" #, c-format msgid "Could not get parameters on device '%s'" @@ -250,30 +248,26 @@ msgid "Video device did not accept new frame rate setting." msgstr "Vidyo aygıtı yeni çerçeve oranı ayarlarını kabul etmedi." -#, fuzzy msgid "Video device did not provide output format." -msgstr "Vidyo aygıtı yeni çerçeve oranı ayarlarını kabul etmedi." +msgstr "Video aygıtı çıktı biçimini sağlamadı." msgid "Video device returned invalid dimensions." -msgstr "" +msgstr "Video aygıtı geçersiz boyutlar döndü." -#, fuzzy msgid "Video devices uses an unsupported interlacing method." -msgstr "Bu aygıtın sürücüsü '%s' IO yöntemini desteklemiyor %d" +msgstr "Video aygıtları desteklenmeyen bir birbirine geçme yöntemi kullanıyor." msgid "Video devices uses an unsupported pixel format." -msgstr "" +msgstr "Video aygıtları desteklenmeyen bir piksel biçimini kullanıyor." -#, fuzzy msgid "Failed to configure internal buffer pool." -msgstr "Video aygıtı tampon havuzu yaratamadı." +msgstr "İç tampon bellek havuzu yapılandırılamıyor." -#, fuzzy msgid "Video device did not suggest any buffer size." -msgstr "Video aygıtı tampon havuzu yaratamadı." +msgstr "Video aygıtı herhangi bir tampon bellek boyutu önermedi." msgid "No downstream pool to import from." -msgstr "" +msgstr "İçeri aktarılacak akıntı havuzu yok." #, c-format msgid "Failed to get settings of tuner %d on device '%s'." @@ -300,33 +294,32 @@ msgstr "Aygıt '%s' susturulmaya ayarlanamadı." msgid "Failed to allocated required memory." -msgstr "" +msgstr "Gerekli bellek ayrılamadı." msgid "Failed to allocate required memory." -msgstr "" +msgstr "Gerekli bellek ayrılamıyor." -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported input format" -msgstr "Bu aygıtın sürücüsü '%s' IO yöntemini desteklemiyor %d" +msgstr "Aygıt %s üzerindeki dönüştürücü girdi biçimini desteklemiyor" -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported output format" -msgstr "Bu aygıtın sürücüsü '%s' IO yöntemini desteklemiyor %d" +msgstr "Aygıt %s üzerindeki dönüştürücü çıktı biçimini desteklemiyor" -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported input format" -msgstr "Bu aygıtın sürücüsü '%s' IO yöntemini desteklemiyor %d" +msgstr "Aygıt %s üzerindeki kodlayıcı girdi biçimini deskteklemiyor" -#, fuzzy, c-format +#, c-format msgid "Encoder on device %s has no supported output format" -msgstr "Bu aygıtın sürücüsü '%s' IO yöntemini desteklemiyor %d" +msgstr "Aygıt %s üzerindeki kodlayıcı çıktı biçimini deskteklemiyor" -#, fuzzy msgid "Failed to start decoding thread." -msgstr "JPEG görüntüsünü çözümlenemedi" +msgstr "Çözme işi başlaması başarısız." msgid "Failed to process frame." -msgstr "" +msgstr "İşlem çerçevesi başarısız." #, c-format msgid "" @@ -372,13 +365,13 @@ msgid "Device '%s' is not a output device." msgstr "Aygıt '%s' bir çıkış aygıtı değil." -#, fuzzy, c-format +#, c-format msgid "Device '%s' is not a M2M device." -msgstr "Aygıt '%s' bir çıkış aygıtı değil." +msgstr "Aygıt '%s' bir M2M aygıtı değil." -#, fuzzy, c-format +#, c-format msgid "Could not dup device '%s' for reading and writing." -msgstr "Şu aygıtı '%s' okuma ve yazma için açamıyor." +msgstr "Okuma ve yazma için '%s' aygıtı kopyalanamadı." #, c-format msgid "Failed to set norm for device '%s'." @@ -425,6 +418,9 @@ msgid "Cannot operate without a clock" msgstr "Saat olmadan çalışamaz" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Aygıt '%s' video yakalamayı desteklemiyor" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Ses sunucusuyla bağlantı kurulumayor" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/uk.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/uk.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/uk.po gst-plugins-good1.0-1.6.1/po/uk.po --- gst-plugins-good1.0-1.4.3/po/uk.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/uk.po 2015-10-30 14:27:13.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good 1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2014-06-29 11:40+0300\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" @@ -48,8 +48,9 @@ msgid "Secure connection setup failed." msgstr "Помилка під час спроби налаштування безпечного з’єднання." +#, fuzzy msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" "Сталася помилка роботи з мережею або з’єднання було несподівано розірвано з " "боку сервера." @@ -93,6 +94,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Файл містить надто багато потоків. Відтворюються лише перші %d" +msgid "Internal data flow error." +msgstr "Помилка внутрішнього перенесення даних." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -108,9 +112,6 @@ "Не знайдено підтримуваних потоків. Ймовірно, вам слід увімкнути додаткові " "протоколи передавання даних або встановити додатковий модуль RTSP GStreamer." -msgid "Internal data flow error." -msgstr "Помилка внутрішнього перенесення даних." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -236,10 +237,6 @@ "даних." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Пристрій «%s» не може захоплювати відеодані" - -#, c-format msgid "Device '%s' is busy" msgstr "Пристрій «%s» зайнято" @@ -444,6 +441,9 @@ msgid "Cannot operate without a clock" msgstr "Робота без годинника неможлива" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Пристрій «%s» не може захоплювати відеодані" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Не вдалося встановити з'єднання із звуковим сервером." Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/vi.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/vi.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/vi.po gst-plugins-good1.0-1.6.1/po/vi.po --- gst-plugins-good1.0-1.4.3/po/vi.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/vi.po 2015-10-30 12:27:49.000000000 +0000 @@ -1,15 +1,15 @@ # Vietnamese Translation for GST Plugins Good. -# Copyright © 2014 Free Software Foundation, Inc. +# Copyright © 2015 Free Software Foundation, Inc. # This file is distributed under the same license as the gst-plugins-good package. # Clytie Siddall , 2005-2010. -# Trần Ngọc Quân , 2012-2014. +# Trần Ngọc Quân , 2012-2014, 2015. # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.3.90\n" +"Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2014-06-30 09:12+0700\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-10-16 08:17+0700\n" "Last-Translator: Trần Ngọc Quân \n" "Language-Team: Vietnamese \n" "Language: vi\n" @@ -18,10 +18,7 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Language-Team-Website: \n" -"X-Generator: LocFactoryEditor 1.8\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-Language: Vietnamese\n" -"X-Poedit-Country: VIET NAM\n" +"X-Generator: Gtranslator 2.91.7\n" msgid "Jack server not found" msgstr "Không tìm thấy máy phục vụ Jack" @@ -44,16 +41,16 @@ msgstr "Máy phục vụ không hỗ trợ di chuyển vị trí đọc." msgid "Could not resolve server name." -msgstr "Không thể phân giải tên miền." +msgstr "Không thể phân giải tên máy phục vụ." msgid "Could not establish connection to server." msgstr "Không thể thiết lập kết nối tới máy chủ." msgid "Secure connection setup failed." -msgstr "Cài đặt kết nối an toàn gặp lỗi." +msgstr "Gặp lỗi khi cài đặt kết nối an toàn." msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "Có lỗi mạng đã xảy ra, hoặc máy chủ đóng kết nối bất ngờ." msgid "Server sent bad data." @@ -92,6 +89,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "Tập tin này chứa quá nhiều luồng nên chỉ phát %d đầu tiên" +msgid "Internal data flow error." +msgstr "Lỗi luồng dữ liệu nội bộ." + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -107,9 +107,6 @@ "Không tìm thấy luồng dữ liệu được hỗ trợ. Người dùng có thể cần cho phép " "thêm giao thức truyền, hoặc chưa cài đặt phần bổ sung RTSP Gstreamer đúng." -msgid "Internal data flow error." -msgstr "Lỗi luồng dữ liệu nội bộ." - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -192,7 +189,7 @@ msgstr "Màn hình" msgid "Built-in Speaker" -msgstr "Loa dựng sẵn" +msgstr "Loa tích hợp" msgid "Headphone" msgstr "Tai nghe" @@ -233,10 +230,6 @@ "Trình điều khiển của thiết bị “%s” không hỗ trợ phương pháp VR đã biết nào." #, c-format -msgid "Device '%s' does not support video capture" -msgstr "Thiết bị “%s” không hỗ trợ chức năng quay video" - -#, c-format msgid "Device '%s' is busy" msgstr "Thiết bị “%s” đang bận" @@ -283,7 +276,8 @@ #, c-format msgid "Failed to get settings of tuner %d on device '%s'." msgstr "" -"Lỗi lấy các cài đặt từ thiết bị điều chỉnh cộng hưởng %d trên thiết bị “%s”." +"Gặp lỗi khi lấy các cài đặt từ thiết bị điều chỉnh cộng hưởng %d trên thiết " +"bị “%s”." #, c-format msgid "Error getting capabilities for device '%s'." @@ -339,23 +333,25 @@ "it is a v4l1 driver." msgstr "" "Gặp lỗi khi lấy khả năng của thiết bị “%s”. Nó không phải là trình điều " -"khiển phiên bản 4l2. Kiểm tra nó là trình điều khiển phiên bản 4l1 không." +"khiển phiên bản 4l2. Kiểm tra xem nó có phải là trình điều khiển phiên bản " +"4l1 không." #, c-format msgid "Failed to query attributes of input %d in device %s" -msgstr "Lỗi truy vấn khả năng của %d nhập trong thiết bị %s" +msgstr "Gặp lỗi khi truy vấn các thuộc tính của đầu vào %d trong thiết bị %s" #, c-format msgid "Failed to get setting of tuner %d on device '%s'." -msgstr "Lỗi lấy thiết lập của thiết bị điều hưởng %d trên thiết bị “%s”." +msgstr "" +"Gặp lỗi khi lấy các cài đặt của bộ chỉnh cộng hưởng %d trên thiết bị “%s”." #, c-format msgid "Failed to query norm on device '%s'." -msgstr "Lỗi truy vấn chỉ tiêu trên thiết bị “%s”." +msgstr "Gặp lỗi khi truy vấn chỉ tiêu trên thiết bị “%s”." #, c-format msgid "Failed getting controls attributes on device '%s'." -msgstr "Lỗi lấy các thuộc tính của bộ điều khiển trên thiết bị “%s”." +msgstr "Gặp lỗi khi lấy các thuộc tính của bộ điều khiển trên thiết bị “%s”." #, c-format msgid "Cannot identify device '%s'." @@ -371,7 +367,7 @@ #, c-format msgid "Device '%s' is not a capture device." -msgstr "Thiết bị “%s” không phải là thiết bị bắt hình/tiếng." +msgstr "Thiết bị “%s” không phải là thiết bị ghi hình/tiếng." #, c-format msgid "Device '%s' is not a output device." @@ -416,14 +412,14 @@ #, c-format msgid "Failed to get current input on device '%s'. May be it is a radio device" msgstr "" -"Gặp lỗi khi lấy kết nhập hiện thời vào thiết bị “%s”. Có thể là thiết bị thu " +"Gặp lỗi khi lấy đầu vào hiện thời vào thiết bị “%s”. Có thể là thiết bị thu " "thanh." #, c-format msgid "" "Failed to get current output on device '%s'. May be it is a radio device" msgstr "" -"Gặp lỗi khi lấy kết nhập hiện hành trên thiết bị “%s”. Có thể là thiết bị vô " +"Gặp lỗi khi lấy đầu vào hiện hành trên thiết bị “%s”. Có thể là thiết bị vô " "tuyến." #, c-format @@ -436,6 +432,9 @@ msgid "Cannot operate without a clock" msgstr "Không thể thao tác khi không có đồng hồ" +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "Thiết bị “%s” không hỗ trợ chức năng quay video" + #~ msgid "Could not establish connection to sound server" #~ msgstr "Không thể thiết lập sự kết nối tới máy phục vụ âm thanh" @@ -509,13 +508,13 @@ #~ msgstr "Thu thanh" #~ msgid "Could not open audio device for mixer control handling." -#~ msgstr "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hoà tiếng." +#~ msgstr "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hòa tiếng." #~ msgid "" #~ "Could not open audio device for mixer control handling. This version of " #~ "the Open Sound System is not supported by this element." #~ msgstr "" -#~ "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hoà tiếng. Phiên " +#~ "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hòa tiếng. Phiên " #~ "bản Hệ thống Âm thanh Mở không phải được yếu tố này hỗ trợ." #~ msgid "Master" @@ -615,13 +614,13 @@ #~ msgstr "Tâm / LFE" #~ msgid "Stereo Mix" -#~ msgstr "Hoả tiếng âm lập thể" +#~ msgstr "Hỏa tiếng âm lập thể" #~ msgid "Mono Mix" -#~ msgstr "Hoà tiếng đơn nguồn" +#~ msgstr "Hòa tiếng đơn nguồn" #~ msgid "Input Mix" -#~ msgstr "Hoà tiếng đầu vào" +#~ msgstr "Hòa tiếng đầu vào" #~ msgid "Microphone 1" #~ msgstr "Máy vi âm 1" @@ -750,16 +749,16 @@ #~ msgstr "Mở rộng kết xuất" #~ msgid "Downmix" -#~ msgstr "Hạ hoà tiếng" +#~ msgstr "Hạ hòa tiếng" #~ msgid "Virtual Mixer Input" -#~ msgstr "Hoà tiếng ảo : Vào" +#~ msgstr "Hòa tiếng ảo : Vào" #~ msgid "Virtual Mixer Output" -#~ msgstr "Hoà tiếng ảo : Ra" +#~ msgstr "Hòa tiếng ảo : Ra" #~ msgid "Virtual Mixer Channels" -#~ msgstr "Hoà tiếng ảo : Kênh" +#~ msgstr "Hòa tiếng ảo : Kênh" #~ msgid "%s %d Function" #~ msgstr "Chức năng %s %d" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/zh_CN.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/zh_CN.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/zh_CN.po gst-plugins-good1.0-1.6.1/po/zh_CN.po --- gst-plugins-good1.0-1.4.3/po/zh_CN.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/zh_CN.po 2015-10-30 12:27:49.000000000 +0000 @@ -1,23 +1,24 @@ # Chinese (simplified) translation about gst-plugins-good. # This file is put in the public domain. # Funda Wang , 2005. -# Ji ZhengYu , 2008, 2009 -# +# Ji ZhengYu , 2008, 2009. +# zwpwjwtz , 2015. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 0.10.16.2\n" +"Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" -"PO-Revision-Date: 2009-11-13 22:20+0800\n" -"Last-Translator: Ji ZhengYu \n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" +"PO-Revision-Date: 2015-10-16 19:26+0800\n" +"Last-Translator: Tianze Wang \n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.5\n" msgid "Jack server not found" -msgstr "" +msgstr "未找到插口设备" msgid "Failed to decode JPEG image" msgstr "解码 JPEG 图像出错" @@ -25,35 +26,32 @@ #. TRANSLATORS: 'song title' by 'artist name' #, c-format msgid "'%s' by '%s'" -msgstr "‘%s’ 由 ‘%s’" +msgstr "“%2$s”的“%1$s”" msgid "Could not connect to server" msgstr "无法连接至服务器" msgid "No URL set." -msgstr "" +msgstr "未设置URL。" -#, fuzzy msgid "Server does not support seeking." -msgstr "设备‘%s’不支持视频捕获" +msgstr "设备不支持定位。" -#, fuzzy msgid "Could not resolve server name." -msgstr "无法连接至服务器" +msgstr "无法解析服务器名。" -#, fuzzy msgid "Could not establish connection to server." msgstr "无法建立与音频服务器的连接" msgid "Secure connection setup failed." -msgstr "" +msgstr "安全连接失败。" msgid "" -"A network error occured, or the server closed the connection unexpectedly." -msgstr "" +"A network error occurred, or the server closed the connection unexpectedly." +msgstr "发生了网络错误,或服务器意外地关闭了连接。" msgid "Server sent bad data." -msgstr "" +msgstr "服务器发送了错误的数据。" msgid "Internal data stream error." msgstr "内部数据流错误。" @@ -68,13 +66,13 @@ msgstr "此文件无效,无法播放。" msgid "Cannot play stream because it is encrypted with PlayReady DRM." -msgstr "" +msgstr "无法播放流,因为它已被PlayReady DRM加密。" msgid "This file is corrupt and cannot be played." msgstr "此文件已损坏,无法播放。" msgid "Invalid atom size." -msgstr "" +msgstr "无效的原子尺寸。" msgid "This file is incomplete and cannot be played." msgstr "此文件不完整且无法播放。" @@ -86,6 +84,9 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "此文件包含了太多的流。只播放前面 %d 个" +msgid "Internal data flow error." +msgstr "内部数据流错误。" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -101,9 +102,6 @@ "未找到支持的流媒体。您可能需要启用更多的传送协议,或者也有可能是缺少正确的 " "GStreamer RTSP 扩展插件。" -msgid "Internal data flow error." -msgstr "内部数据流错误。" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -117,24 +115,22 @@ msgid "Could not open audio device for playback." msgstr "无法打开音频设备播放音频。" -#, fuzzy msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." -msgstr "无法打开音频设备播放音频。您无权使用这一设备。" +msgstr "无法打开音频设备进行回放。这一版本的Open Sound System不支持此组件。" msgid "Playback is not supported by this audio device." -msgstr "" +msgstr "此音频设备不支持回放。" msgid "Audio playback error." -msgstr "" +msgstr "音频回放错误。" msgid "Recording is not supported by this audio device." -msgstr "" +msgstr "此音频设备不支持录音。" -#, fuzzy msgid "Error recording from audio device." -msgstr "从设备‘%2$s’中读取 %1$d 个字节时出错。" +msgstr "音频设备录音错误。" msgid "" "Could not open audio device for recording. You don't have permission to open " @@ -144,37 +140,32 @@ msgid "Could not open audio device for recording." msgstr "无法打开音频设备录音。" -#, fuzzy msgid "Record Source" -msgstr "录音" +msgstr "录音源" msgid "Microphone" msgstr "话筒" -#, fuzzy msgid "Line In" -msgstr "线路输入(Line-in)" +msgstr "线路输入" msgid "Internal CD" -msgstr "" +msgstr "内部 CD" -#, fuzzy msgid "SPDIF In" -msgstr "SPDIF 输出" +msgstr "SPDIF输入" -#, fuzzy msgid "AUX 1 In" -msgstr "AUX 1 输出" +msgstr "辅助输入 1" -#, fuzzy msgid "AUX 2 In" -msgstr "AUX 2 输出" +msgstr "辅助输出 2" msgid "Codec Loopback" -msgstr "" +msgstr "编码器回环" msgid "SunVTS Loopback" -msgstr "" +msgstr "SunVTS回环" msgid "Volume" msgstr "音量" @@ -195,143 +186,135 @@ msgstr "线路输出" msgid "SPDIF Out" -msgstr "SPDIF 输出" +msgstr "SPDIF输出" msgid "AUX 1 Out" -msgstr "AUX 1 输出" +msgstr "辅助输出 1" msgid "AUX 2 Out" -msgstr "AUX 2 输出" +msgstr "辅助输出 2" #, c-format msgid "Error reading %d bytes from device '%s'." -msgstr "从设备‘%2$s’中读取 %1$d 个字节时出错。" +msgstr "从设备“%2$s”中读取 %1$d 个字节时出错。" #, c-format msgid "Failed to enumerate possible video formats device '%s' can work with" -msgstr "枚举设备‘%s’可能支持的视频格式时出错" +msgstr "枚举设备“%s”可能支持的视频格式时出错" #, c-format msgid "Could not map buffers from device '%s'" -msgstr "无法从设备‘%s’中映射出缓冲区" +msgstr "无法从设备“%s”中映射出缓冲区" -#, fuzzy, c-format +#, c-format msgid "The driver of device '%s' does not support the IO method %d" -msgstr "设备‘%s’的驱动不支持任何已知的捕获方式。" - -#, fuzzy, c-format -msgid "The driver of device '%s' does not support any known IO method." -msgstr "设备‘%s’的驱动不支持任何已知的捕获方式。" +msgstr "设备“%s”的驱动不支持I/O方式 %d。" #, c-format -msgid "Device '%s' does not support video capture" -msgstr "设备‘%s’不支持视频捕获" +msgid "The driver of device '%s' does not support any known IO method." +msgstr "设备“%s”的驱动不支持任何已知的I/O方式。" #, c-format msgid "Device '%s' is busy" -msgstr "" +msgstr "设备“%s”正忙" #, c-format msgid "Device '%s' cannot capture at %dx%d" -msgstr "设备‘%s’不能在 %dx%d 处捕获" +msgstr "设备“%s”不能在 %dx%d 处捕获" #, c-format msgid "Device '%s' cannot capture in the specified format" -msgstr "设备‘%s’无法以指定格式捕获" +msgstr "设备“%s”无法以指定格式捕获" -#, fuzzy, c-format +#, c-format msgid "Device '%s' does support non-contiguous planes" -msgstr "设备‘%s’不支持视频捕获" +msgstr "设备“%s”不支持非连续平面" #, c-format msgid "Could not get parameters on device '%s'" -msgstr "无法获取设备‘%s’的参数" +msgstr "无法获取设备“%s”的参数" -#, fuzzy msgid "Video device did not accept new frame rate setting." -msgstr "视频输入设备不接受新的帧率设置。" +msgstr "视频设备不接受新的帧率设置。" -#, fuzzy msgid "Video device did not provide output format." -msgstr "视频输入设备不接受新的帧率设置。" +msgstr "视频设备未提供输出格式。" msgid "Video device returned invalid dimensions." -msgstr "" +msgstr "视频设备返回了无效的维度。" msgid "Video devices uses an unsupported interlacing method." -msgstr "" +msgstr "视频设备使用了不支持的隔行扫描方式。" msgid "Video devices uses an unsupported pixel format." -msgstr "" +msgstr "视频设备使用了不支持的像素格式。" msgid "Failed to configure internal buffer pool." -msgstr "" +msgstr "无法配置内部缓冲池。" -#, fuzzy msgid "Video device did not suggest any buffer size." -msgstr "视频输入设备不接受新的帧率设置。" +msgstr "视频设备未提供任何缓冲大小。" msgid "No downstream pool to import from." -msgstr "" +msgstr "没有可以用于导入的下游池。" -#, fuzzy, c-format +#, c-format msgid "Failed to get settings of tuner %d on device '%s'." -msgstr "获取设备 %2$s 上的微调钮 %1$d 的设置时出错" +msgstr "获取设备“%2$s”上微调钮“%1$d”的设置时出错。" -#, fuzzy, c-format +#, c-format msgid "Error getting capabilities for device '%s'." -msgstr "从设备‘%2$s’中读取 %1$d 个字节时出错。" +msgstr "获取设备“%s”有关信息时出错。" -#, fuzzy, c-format +#, c-format msgid "Device '%s' is not a tuner." -msgstr "‘%s’不是输出设备。" +msgstr "设备“%s”不是微调钮。" -#, fuzzy, c-format +#, c-format msgid "Failed to get radio input on device '%s'. " -msgstr "设置设备 %2$s 上的输入 %1$d 时出错。" +msgstr "设置设备“%s”上的广播输出时出错。" #, c-format msgid "Failed to set input %d on device %s." msgstr "设置设备 %2$s 上的输入 %1$d 时出错。" -#, fuzzy, c-format +#, c-format msgid "Failed to change mute state for device '%s'." -msgstr "获取设备‘%s’的信号长度时出错。" +msgstr "改变设备“%s”的静音状态时出错。" msgid "Failed to allocated required memory." -msgstr "" +msgstr "分配请求的内存失败。" msgid "Failed to allocate required memory." -msgstr "" +msgstr "分配请求的内存失败。" -#, fuzzy, c-format +#, c-format msgid "Converter on device %s has no supported input format" -msgstr "设备‘%s’的驱动不支持任何已知的捕获方式。" +msgstr "设备 %s 上的转换器没有支持的输入格式" #, c-format msgid "Converter on device %s has no supported output format" -msgstr "" +msgstr "设备 %s 上的转换器没有支持的输出格式" #, c-format msgid "Encoder on device %s has no supported input format" -msgstr "" +msgstr "设备 %s 上的编码器没有支持的输入格式" #, c-format msgid "Encoder on device %s has no supported output format" -msgstr "" +msgstr "设备 %s 上的编码器没有支持的输出格式" -#, fuzzy msgid "Failed to start decoding thread." -msgstr "解码 JPEG 图像出错" +msgstr "启动解码线程失败。" msgid "Failed to process frame." -msgstr "" +msgstr "处理帧失败。" #, c-format msgid "" "Error getting capabilities for device '%s': It isn't a v4l2 driver. Check if " "it is a v4l1 driver." -msgstr "获取设备‘%s’的信息时出错:它不是一个 v4l2 驱动器,请检查是否为 v4l1。" +msgstr "获取设备“%s”的信息时出错:它不是一个 v4l2 驱动器,请检查是否为 v4l1。" #, c-format msgid "Failed to query attributes of input %d in device %s" @@ -341,78 +324,78 @@ msgid "Failed to get setting of tuner %d on device '%s'." msgstr "获取设备 %2$s 上的微调钮 %1$d 的设置时出错" -#, fuzzy, c-format +#, c-format msgid "Failed to query norm on device '%s'." -msgstr "查寻设备 ‘%s’上的基准时出错。" +msgstr "获取设备“%s”的基准时出错。" #, c-format msgid "Failed getting controls attributes on device '%s'." -msgstr "获取设备‘%s’上的控制属性时出错。" +msgstr "获取设备“%s”上的控制属性时出错。" #, c-format msgid "Cannot identify device '%s'." -msgstr "无法确认设备‘%s’。" +msgstr "无法确认设备“%s”。" #, c-format msgid "This isn't a device '%s'." -msgstr "不是设备‘%s’。" +msgstr "不是设备“%s”。" #, c-format msgid "Could not open device '%s' for reading and writing." -msgstr "无法打开设备‘%s’读写。" +msgstr "无法打开设备“%s”读写。" #, c-format msgid "Device '%s' is not a capture device." -msgstr "‘%s’不是一个捕获设备。" +msgstr "“%s”不是一个捕获设备。" #, c-format msgid "Device '%s' is not a output device." -msgstr "‘%s’不是输出设备。" +msgstr "“%s”不是输出设备。" -#, fuzzy, c-format +#, c-format msgid "Device '%s' is not a M2M device." -msgstr "‘%s’不是输出设备。" +msgstr "设备“%s”不是M2M设备。" -#, fuzzy, c-format +#, c-format msgid "Could not dup device '%s' for reading and writing." -msgstr "无法打开设备‘%s’读写。" +msgstr "无法复制设备“%s”来读取和写入。" -#, fuzzy, c-format +#, c-format msgid "Failed to set norm for device '%s'." -msgstr "设置设备‘%s’的基准时出错。" +msgstr "设置设备“%s”的基准时出错。" #, c-format msgid "Failed to get current tuner frequency for device '%s'." -msgstr "获取设备‘%s’的当前微调钮频率时出错。" +msgstr "获取设备“%s”的当前微调钮频率时出错。" #, c-format msgid "Failed to set current tuner frequency for device '%s' to %lu Hz." -msgstr "设置设备‘%s’的当前微调钮频率为 %lu Hz 时出错。" +msgstr "设置设备“%s”的当前微调钮频率为 %lu Hz 时出错。" #, c-format msgid "Failed to get signal strength for device '%s'." -msgstr "获取设备‘%s’的信号长度时出错。" +msgstr "获取设备“%s”的信号长度时出错。" #, c-format msgid "Failed to get value for control %d on device '%s'." -msgstr "获取设备‘%2$s’的控制器 %1$d 的值出错。" +msgstr "获取设备“%2$s”的控制器 %1$d 的值出错。" #, c-format msgid "Failed to set value %d for control %d on device '%s'." -msgstr "设置设备‘%3$s’的控制器 %2$d 的值为 %1$d 时出错。" +msgstr "设置设备“%3$s”的控制器 %2$d 的值为 %1$d 时出错。" #, c-format msgid "Failed to get current input on device '%s'. May be it is a radio device" -msgstr "获取设备‘%s’上的当前输入出错。也许它是一个广播设备" +msgstr "获取设备“%s”上的当前输入出错。也许它是一个广播设备" -#, fuzzy, c-format +#, c-format msgid "" "Failed to get current output on device '%s'. May be it is a radio device" -msgstr "获取设备‘%s’上的当前输入出错。也许它是一个广播设备" +msgstr "获取设备“%s”上的当前输入出错。它可能是一个广播设备" -#, fuzzy, c-format +#, c-format msgid "Failed to set output %d on device %s." -msgstr "设置设备 %2$s 上的输入 %1$d 时出错。" +msgstr "将输出 %d 设置到设备 %s 上失败。" msgid "Changing resolution at runtime is not yet supported." msgstr "尚不支持在运行时更改分辨率。" @@ -436,7 +419,7 @@ #~ msgstr "波形(PCM)" #~ msgid "Speaker" -#~ msgstr "扬声器(Speaker)" +#~ msgstr "扬声器" #~ msgid "CD" #~ msgstr "CD 音频" @@ -539,3 +522,274 @@ #~ msgid "This file is encrypted and cannot be played." #~ msgstr "此文件已加密,无法播放。" + +#~ msgid "Device '%s' does not support video capture" +#~ msgstr "设备“%s”不支持视频捕捉" + +#~ msgid "Line-in" +#~ msgstr "线路输入" + +#~ msgid "Record" +#~ msgstr "录音" + +#~ msgid "Could not establish connection to sound server" +#~ msgstr "无法建立与音频服务器的连接" + +#~ msgid "Could not open audio device for mixer control handling." +#~ msgstr "无法打开音频设备来进行混音器控制。" + +#~ msgid "" +#~ "Could not open audio device for mixer control handling. This version of " +#~ "the Open Sound System is not supported by this element." +#~ msgstr "" +#~ "无法打开音频设备来进行混音器控制。这一版本的Open Sound System不支持此组" +#~ "件。" + +#~ msgid "Master" +#~ msgstr "主" + +#~ msgid "Front" +#~ msgstr "前" + +#~ msgid "Rear" +#~ msgstr "后" + +#~ msgid "Headphones" +#~ msgstr "头戴式耳机" + +#~ msgid "Center" +#~ msgstr "中" + +#~ msgid "LFE" +#~ msgstr "重低音" + +#~ msgid "Surround" +#~ msgstr "环绕" + +#~ msgid "Side" +#~ msgstr "侧" + +#~ msgid "AUX Out" +#~ msgstr "辅助输出" + +#~ msgid "3D Depth" +#~ msgstr "3D 深度" + +#~ msgid "3D Center" +#~ msgstr "3D 中央" + +#~ msgid "3D Enhance" +#~ msgstr "3D 增强" + +#~ msgid "Telephone" +#~ msgstr "电话" + +#~ msgid "Video In" +#~ msgstr "视频输入" + +#~ msgid "AUX In" +#~ msgstr "辅助输出" + +#~ msgid "Record Gain" +#~ msgstr "录音增益" + +#~ msgid "Output Gain" +#~ msgstr "输出增益" + +#~ msgid "Microphone Boost" +#~ msgstr "麦克风增强" + +#~ msgid "Diagnostic" +#~ msgstr "诊断" + +#~ msgid "Bass Boost" +#~ msgstr "贝司增强" + +#~ msgid "Playback Ports" +#~ msgstr "回放端口" + +#~ msgid "Input" +#~ msgstr "输入" + +#~ msgid "Monitor Source" +#~ msgstr "监控源" + +#~ msgid "Keyboard Beep" +#~ msgstr "键盘蜂鸣" + +#~ msgid "Simulate Stereo" +#~ msgstr "模拟立体声" + +#~ msgid "Stereo" +#~ msgstr "立体声" + +#~ msgid "Surround Sound" +#~ msgstr "环绕声" + +#~ msgid "Microphone Gain" +#~ msgstr "话筒增益" + +#~ msgid "Speaker Source" +#~ msgstr "扬声器源" + +#~ msgid "Microphone Source" +#~ msgstr "话筒源" + +#~ msgid "Jack" +#~ msgstr "插口" + +#~ msgid "Center / LFE" +#~ msgstr "中/重低音" + +#~ msgid "Stereo Mix" +#~ msgstr "立体声混音" + +#~ msgid "Mono Mix" +#~ msgstr "单声道混音" + +#~ msgid "Input Mix" +#~ msgstr "输入混音" + +#~ msgid "Microphone 1" +#~ msgstr "话筒1" + +#~ msgid "Microphone 2" +#~ msgstr "话筒2" + +#~ msgid "Digital Out" +#~ msgstr "数字输出" + +#~ msgid "Digital In" +#~ msgstr "数字输入" + +#~ msgid "HDMI" +#~ msgstr "HDMI" + +#~ msgid "Modem" +#~ msgstr "Modem" + +#~ msgid "Handset" +#~ msgstr "Handset" + +#~ msgid "Other" +#~ msgstr "其他" + +#~ msgid "None" +#~ msgstr "无" + +#~ msgid "On" +#~ msgstr "开" + +#~ msgid "Off" +#~ msgstr "关" + +#~ msgid "Mute" +#~ msgstr "静音" + +#~ msgid "Fast" +#~ msgstr "快" + +#~ msgid "Very Low" +#~ msgstr "非常低" + +#~ msgid "Low" +#~ msgstr "低" + +#~ msgid "Medium" +#~ msgstr "中" + +#~ msgid "High" +#~ msgstr "高" + +#~ msgid "Very High" +#~ msgstr "非常高" + +#~ msgid "Production" +#~ msgstr "产品" + +#~ msgid "Front Panel Microphone" +#~ msgstr "前面板话筒" + +#~ msgid "Front Panel Line In" +#~ msgstr "前面板线路输入" + +#~ msgid "Front Panel Headphones" +#~ msgstr "前面板头戴式耳机" + +#~ msgid "Front Panel Line Out" +#~ msgstr "前面板线路输出" + +#~ msgid "Green Connector" +#~ msgstr "绿色插口" + +#~ msgid "Pink Connector" +#~ msgstr "粉色插口" + +#~ msgid "Blue Connector" +#~ msgstr "蓝色插口" + +#~ msgid "White Connector" +#~ msgstr "白色插口" + +#~ msgid "Black Connector" +#~ msgstr "黑色插口" + +#~ msgid "Gray Connector" +#~ msgstr "灰色插口" + +#~ msgid "Orange Connector" +#~ msgstr "橙色插口" + +#~ msgid "Red Connector" +#~ msgstr "红色插口" + +#~ msgid "Yellow Connector" +#~ msgstr "黄色插口" + +#~ msgid "Green Front Panel Connector" +#~ msgstr "前面板绿色插口" + +#~ msgid "Pink Front Panel Connector" +#~ msgstr "前面板粉色插口" + +#~ msgid "Blue Front Panel Connector" +#~ msgstr "前面板蓝色插口" + +#~ msgid "White Front Panel Connector" +#~ msgstr "前面板白色插口" + +#~ msgid "Black Front Panel Connector" +#~ msgstr "前面板黑色插口" + +#~ msgid "Gray Front Panel Connector" +#~ msgstr "前面板灰色插口" + +#~ msgid "Orange Front Panel Connector" +#~ msgstr "前面板橙色插口" + +#~ msgid "Red Front Panel Connector" +#~ msgstr "前面板红色插口" + +#~ msgid "Yellow Front Panel Connector" +#~ msgstr "前面板黄色插口" + +#~ msgid "Spread Output" +#~ msgstr "分散式输出" + +#~ msgid "Downmix" +#~ msgstr "混缩" + +#~ msgid "Virtual Mixer Input" +#~ msgstr "虚拟混音输入" + +#~ msgid "Virtual Mixer Output" +#~ msgstr "虚拟混音输出" + +#~ msgid "Virtual Mixer Channels" +#~ msgstr "虚拟混音通道" + +#~ msgid "%s %d Function" +#~ msgstr "%s %d 功能" + +#~ msgid "%s Function" +#~ msgstr "%s 功能" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/zh_HK.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/zh_HK.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/zh_HK.po gst-plugins-good1.0-1.6.1/po/zh_HK.po --- gst-plugins-good1.0-1.4.3/po/zh_HK.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/zh_HK.po 2015-10-30 14:27:13.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good-0.10.2 0.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2006-08-29 01:08+0800\n" "Last-Translator: Abel Cheung \n" "Language-Team: Chinese (Hong Kong) \n" @@ -45,7 +45,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -82,6 +82,10 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +#, fuzzy +msgid "Internal data flow error." +msgstr "內部資料串流發生錯誤。" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -93,10 +97,6 @@ "plugin." msgstr "" -#, fuzzy -msgid "Internal data flow error." -msgstr "內部資料串流發生錯誤。" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -213,10 +213,6 @@ msgstr "" #, c-format -msgid "Device '%s' does not support video capture" -msgstr "" - -#, c-format msgid "Device '%s' is busy" msgstr "" Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/po/zh_TW.gmo and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/po/zh_TW.gmo differ diff -Nru gst-plugins-good1.0-1.4.3/po/zh_TW.po gst-plugins-good1.0-1.6.1/po/zh_TW.po --- gst-plugins-good1.0-1.4.3/po/zh_TW.po 2014-09-24 08:30:55.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/po/zh_TW.po 2015-10-30 14:27:13.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gst-plugins-good-0.10.2 0.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2014-09-24 11:30+0300\n" +"POT-Creation-Date: 2015-10-30 14:27+0200\n" "PO-Revision-Date: 2006-08-29 01:08+0800\n" "Last-Translator: Abel Cheung \n" "Language-Team: Chinese (traditional) \n" @@ -45,7 +45,7 @@ msgstr "" msgid "" -"A network error occured, or the server closed the connection unexpectedly." +"A network error occurred, or the server closed the connection unexpectedly." msgstr "" msgid "Server sent bad data." @@ -82,6 +82,10 @@ msgid "This file contains too many streams. Only playing first %d" msgstr "" +#, fuzzy +msgid "Internal data flow error." +msgstr "內部資料串流發生錯誤。" + msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." @@ -93,10 +97,6 @@ "plugin." msgstr "" -#, fuzzy -msgid "Internal data flow error." -msgstr "內部資料串流發生錯誤。" - msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -213,10 +213,6 @@ msgstr "" #, c-format -msgid "Device '%s' does not support video capture" -msgstr "" - -#, c-format msgid "Device '%s' is busy" msgstr "" diff -Nru gst-plugins-good1.0-1.4.3/README gst-plugins-good1.0-1.6.1/README --- gst-plugins-good1.0-1.4.3/README 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/README 2015-10-22 08:02:54.000000000 +0000 @@ -1,4 +1,4 @@ -GStreamer 1.3.x development series +GStreamer 1.5.x development series WHAT IT IS ---------- diff -Nru gst-plugins-good1.0-1.4.3/RELEASE gst-plugins-good1.0-1.6.1/RELEASE --- gst-plugins-good1.0-1.4.3/RELEASE 2014-09-24 08:29:39.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/RELEASE 2015-10-30 14:24:42.000000000 +0000 @@ -1,27 +1,19 @@ -Release notes for GStreamer Good Plugins 1.4.3 +Release notes for GStreamer Good Plugins 1.6.1 -The GStreamer team is pleased to announce a bugfix release of the stable -1.4 release series. The 1.4 release series is adding new features on top -of the 1.2 series and is part of the API and ABI-stable 1.x release -series of the GStreamer multimedia framework that contains new features. -The 1.4.x bugfix releases only contain important bugfixes compared to 1.4.0. +The GStreamer team is proud to announce the first bugfix release in the stable +1.6 release series of your favourite cross-platform multimedia framework! -Binaries for Android, iOS, Mac OS X and Windows are provided by the -GStreamer project for this release. -The 1.x series is a stable series targeted at end users. It is not API -or ABI compatible with the 0.10.x series. It can, however, be installed -in parallel with the 0.10.x series and will not affect an existing -0.10.x installation. +This release only contains bugfixes and it is safe to update from 1.6.0. For a +full list of bugfixes see Bugzilla. -The stable 1.4.x release series is API and ABI compatible with 1.0.x and -any other 1.x release series in the future. Compared to 1.0.x it contains -some new features and more intrusive changes that were considered too -risky as a bugfix. + +See http://gstreamer.freedesktop.org/releases/1.6/ +for the full release notes. @@ -68,8 +60,25 @@ Bugs fixed in this release - * 736944 : videoscale: vs_image_scale_4tap_Y offset should use stride to calculate buffer offset - * 737219 : flacparse: When generating headers, leave total_samples at 0 if upstream duration query returns GST_CLOCK_TIME_NONE. + * 750108 : splitmuxsink: post messages when fragments are being opened and closed + * 753617 : splitmuxsink: allow non-video streams to serve as reference + * 753622 : splitmuxsink: do not destroy the multiqueue & muxer when going to NULL + * 753624 : splitmuxsink: initialize mux_start_time properly + * 754212 : cutter: Fix buffer leak + * 755611 : aacparse: wrong LOAS config reading + * 755708 : matroskademux: assertion failed: (stream- > alignment < = G_MEM_ALIGN) + * 755773 : gdkpixbufoverlay memleak + * 756068 : qtmux: fix sample memory leak + * 756154 : qtmux: doesn't compile on OS X 10.6: strnlen not available + * 756171 : qtmux: fix date memory leak + * 756387 : qtmux: Allow negotiating to S8 as a raw format but stop making it best choice + * 756388 : qtmux: Add ProRes support + * 756544 : qtdemux: Fix taglist leak + * 756561 : qtdemux: fix caps leak + * 756799 : auparse: fix event leak + * 756967 : matroskamux: drops JPEG input buffers with just PTS and no DTS set on them + * 757033 : scaletempo: Does not work properly with negative rates playback + * 757087 : splitmux: unit test fails due to missing files ==== Download ==== @@ -106,6 +115,17 @@ Contributors to this release - * Edward Hervey + * George Kiagiadakis + * Guillaume Desmottes + * Guillaume Marquebielle + * Jan Schmidt + * Nicola Murino + * Nirbheek Chauhan + * Ramiro Polla + * Ryan Hendrickson * Sebastian Dröge + * Thiago Santos + * Thibault Saunier + * Tim-Philipp Müller + * Vineeth TM   \ No newline at end of file diff -Nru gst-plugins-good1.0-1.4.3/REQUIREMENTS gst-plugins-good1.0-1.6.1/REQUIREMENTS --- gst-plugins-good1.0-1.4.3/REQUIREMENTS 2014-07-21 08:24:26.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/REQUIREMENTS 2015-10-22 08:02:54.000000000 +0000 @@ -1,155 +1,164 @@ GStreamer uses a *large* array of tools and libraries, most of which are -optional. We have attempted to make sure that any code that depends on -optional libraries doesn't get built unless you have those libraries. If +optional. We have attempted to make sure that any code that depends on +optional libraries doesn't get built unless you have those libraries. If you find this not to be the case, please, let us know by filing a bug report at http://bugzilla.gnome.org/. +On Debian/Ubuntu, the easiest way to install most build requirements is: + + sudo apt-get build-dep gst-plugins-good1.0 Required tools: =============== -An extra set of tools is required if you wish to build GStreamer out of -CVS (using autogen.sh): +An extra set of tools is required if you wish to build GStreamer +from git (using autogen.sh): -autoconf 2.52 or better -automake 1.5 -gettext 0.11.5 -libtool v1.4 or better -pkgconfig 0.9.0 or better (http://www.freedesktop.org/software/pkgconfig/) +autoconf >= 2.68 https://www.gnu.org/software/autoconf/ +automake >= 1.11 https://www.gnu.org/software/automake/ +gettext >= 0.17 https://www.gnu.org/software/gettext/ +libtool >= 2.2.6 https://www.gnu.org/software/libtool/ +pkgconfig >= 0.9.0 https://www.freedesktop.org/software/pkgconfig/ Required libraries: =================== -Package: GStreamer -Version: 0.10.11.2 -Recommended: 0.10.latest -URL: http://gstreamer.freedesktop.org/ -DebianPackage: libgstreamer0.10-dev -Notes: The required version is updated frequently, so the version - listed in this file is often wrong. If you are compiling from CVS, - the required version is often the latest GStreamer CVS. - -Package: GStreamer Base Plugins -Version: 0.10.11.2 -Recommended: 0.10.latest -URL: http://gstreamer.freedesktop.org/ -DebianPackage: libgstreamer-plugins-base0.10-dev -Notes: The required version is updated frequently, so the version - listed in this file is often wrong. If you are compiling from CVS, - the required version is often the latest GStreamer Base Plugins CVS. - +Package: GStreamer +Version: 1.x (same 1.x version as this package) +Recommended: Latest 1.x +URL: http://gstreamer.freedesktop.org/ +DebianPackage: libgstreamer1.0-dev +Notes: The required version is updated frequently, so the version + listed in this file is often out of date. If you are compiling + from git master, you will usually need GStreamer core and + gst-plugins-base from git master as well. + +Package: GStreamer Base Plugins +Version: 1.x (same 1.x version as this package) +Recommended: Latest 1.x +URL: http://gstreamer.freedesktop.org/ +DebianPackage: libgstreamer-plugins-base1.0-dev +Notes: The required version is updated frequently, so the version + listed in this file is often out of date. If you are compiling + from git master, you will usually need GStreamer core and + gst-plugins-base from git master as well. Optional libraries: =================== -This file lists supporting libraries for which gst-plugins contains plugins, -as well as their minimum version. You can find the corresponding plugins in -ext/(library) +This file lists supporting libraries for which gst-plugins-good contains +plugins, as well as their minimum required version. You can find the +corresponding plugins in ext/(library) Package: Orc -Version: >= 0.4.5 -Recommended: 0.4.latest -URL: http://code.entropywave.com/orc +Version: >= 0.4.17 +Recommended: Latest 0.4.x +URL: http://gstreamer.freedesktop.org/data/src/orc/ DebianPackage: liborc-0.4-dev -Notes: Used by many plugins for accelerating processing - -Package: GTK+ -Version: >= 2.0 -Recommended: >= 2.2 -URL: http://www.gtk.org/ -DebianPackage: libgtk2.0-dev -Plugins: gdkpixbuf (gdkpixbufdec, gdkpixbufscale) -Notes: Also required by several examples. Plugin require >= 2.2. - -Package: Check -DebianPackage: check -URL: http://check.sourceforge.net/ - -Package: Xlib -Plugins: ximagesrc, v4l2 -DebianPackage: libx11-dev libxv-dev libxt-dev - -Package: AALib -Plugins: aasink -URL: http://aa-project.sourceforge.net/aalib/ - -Package: LibXML -Version: >= 2.4.9 -Plugins: annodex (cmmlenc, cmmldec) -URL: http://xmlsoft.org/ - -Package: Cairo -Version: >= 1.0 -Plugins: cairo (cairotextoverlay, cairotimeoverlay) -URL: http://cairographics.org/ - -Package: CDIO -Version: >= 0.71 -Plugins: cdio (cdiocddasrc) -URL: http://www.gnu.org/software/libcdio/ - -Package: FLAC -Version: == 1.1.2 -Plugins: flac (flacenc, flacdec) -URL: http://flac.sourceforge.net/ - -Package: HAL -Version: >= 0.5.6 -Plugins: halelements (halaudiosink, halaudiosrc) -URL: http://hal.freedesktop.org/ - -Package: IJG JPEG library -Plugins: jpeg (jpegenc, jpegdec, smokeenc, smokedec) -URL: http://www.ijg.org/ - -Package: LADSPA -Plugins: ladspa -URL: http://www.ladspa.org/ - -Package: Libcaca -Plugins: cacasink -URL: http://libcaca.zoy.org/ - -Package: Libdv -Version: >= 0.100 -Plugins: dv (dvdec) -URL: http://libdv.sourceforge.net/ - -Package: Libpng -Version: >= 1.2 -Plugins: png (pngenc, pngdec) -URL: http://www.libpng.org/pub/png/libpng.html - -Package: libraw1394 -Plugins: dv1394 -URL: http://www.linux1394.org/ - -Package: libiec61883 -Plugins: dv1394 -URL: http://www.linux1394.org/ - -Package: libshout -Version: >= 2.0 -URL: http://www.icecast.org/ - -Package: speex -Version: >= 1.0.4 or >= 1.1.5 -Plugins: speex (speexenc, speexdec) -URL: http://www.speex.org/ - -Package: taglib -Version: >= 1.4 -DebianPackage: libtag1-dev -URL: http://developer.kde.org/~wheeler/taglib.html - -Package: zlib -Plugins: id3demux -URL: http://www.zlib.net/ - +Notes: Used by many plugins for accelerating SIMD processing using + run-time generated assembly. Not a hard requirement, but + highly recommended. Packagers, please hard-depend on liborc. + The git repository is http://cgit.freedesktop.org/gstreamer/orc/ + (all versions on entropywave.com are outdated) + +Package: gdk-pixbuf Library +Version: >= 2.8.0 +Recommended: Latest 2.x +URL: http://www.gtk.org/ +DebianPackage: libgdk-pixbuf2.0-dev +Plugins: gdkpixbuf (gdkpixbufdec, gdkpixbufoverlay) +Notes: This library does not depend on Gtk+ or Gdk or any window system + +Package: GTK+ +Version: >= 3.0 +Recommended: Latest 3.x +URL: http://www.gtk.org/ +DebianPackage: libgtk-3-dev +Plugins: None +Notes: Only needed by some of the examples, not by any plugins. + +Package: Xlib +Plugins: ximagesrc +DebianPackage: libx11-dev libxv-dev libxt-dev + +Package: AALib +Plugins: aasink +URL: http://aa-project.sourceforge.net/aalib/ + +Package: Cairo +Version: >= 1.10 +DebianPackage: libcairo2-dev +Plugins: cairo (cairooverlay) +URL: http://cairographics.org/ + +Package: FLAC +Version: >= 1.1.4 +DebianPackage: libflac-dev +Plugins: flac (flacenc, flacdec) +URL: http://flac.sourceforge.net/ + +Package: gudev +Version: >= 147 +DebianPackage: libgudev-1.0-dev +Plugins: v4l2 (v4l2src) +URL: http://www.freedesktop.org/software/systemd/ +Notes: This dependency is entirely optional, the video4linux plugin + will work just fine without it. gudev is only required for + the device probing and monitoring functionality to detect + video4linux devices appearing/disappearing at run-time. + +Package: JPEG library +Plugins: jpeg (jpegenc, jpegdec, smokeenc, smokedec) +DebianPackage: libjpeg-dev +URL: http://www.libjpeg-turbo.org/ + or http://www.ijg.org/ for the IJG version + +Package: Libcaca +Plugins: cacasink +DebianPackage: libcaca-dev +URL: http://libcaca.zoy.org/ + +Package: Libdv +Version: >= 0.100 +DebianPackage: libdv4-dev +Plugins: dv (dvdec) +URL: http://libdv.sourceforge.net/ + +Package: Libpng +Version: >= 1.2 +DebianPackage: libpng12-dev +Plugins: png (pngenc, pngdec) +URL: http://www.libpng.org/pub/png/libpng.html + +Package: libraw1394 +Plugins: dv1394 +URL: http://www.linux1394.org/ + +Package: libshout +Version: >= 2.0 +DebianPackage: libshout3-dev +plugins: shout2 (shout2send) +URL: http://www.icecast.org/ + +Package: speex +Version: >= 1.1.6 +Plugins: speex (speexenc, speexdec) +URL: http://www.speex.org/ + +Package: taglib +Version: >= 1.5 +DebianPackage: libtag1-dev +Plugins: taglib (id3v2mux) +URL: http://taglib.github.io/ + +Package: zlib +DebianPackage: zlib1g-dev +Plugins: isomp4 (qtdemux), matroska (matroskademux) +URL: http://www.zlib.net/ Optional (debian) packages: =========================== -gtk-doc-tools 1.6 -- needed to build documentation +gtk-doc-tools >= 1.12 -- needed to build documentation python-xml -- needed to build plugin documentation diff -Nru gst-plugins-good1.0-1.4.3/sys/directsound/gstdirectsoundsink.c gst-plugins-good1.0-1.6.1/sys/directsound/gstdirectsoundsink.c --- gst-plugins-good1.0-1.4.3/sys/directsound/gstdirectsoundsink.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/directsound/gstdirectsoundsink.c 2015-10-22 08:02:54.000000000 +0000 @@ -101,6 +101,10 @@ static void gst_directsound_sink_set_mute (GstDirectSoundSink * sink, gboolean mute); static gboolean gst_directsound_sink_get_mute (GstDirectSoundSink * sink); +static const gchar *gst_directsound_sink_get_device (GstDirectSoundSink * + dsoundsink); +static void gst_directsound_sink_set_device (GstDirectSoundSink * dsoundsink, + const gchar * device_id); static gboolean gst_directsound_sink_is_spdif_format (GstAudioRingBufferSpec * spec); @@ -124,7 +128,8 @@ { PROP_0, PROP_VOLUME, - PROP_MUTE + PROP_MUTE, + PROP_DEVICE }; #define gst_directsound_sink_parent_class parent_class @@ -137,6 +142,9 @@ { GstDirectSoundSink *dsoundsink = GST_DIRECTSOUND_SINK (object); + g_free (dsoundsink->device_id); + dsoundsink->device_id = NULL; + g_mutex_clear (&dsoundsink->dsound_lock); G_OBJECT_CLASS (parent_class)->finalize (object); @@ -189,6 +197,12 @@ "Mute state of this stream", DEFAULT_MUTE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, + PROP_DEVICE, + g_param_spec_string ("device", "Device", + "DirectSound playback device as a GUID string", + NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gst_element_class_set_static_metadata (element_class, "Direct Sound Audio Sink", "Sink/Audio", "Output to a sound card via Direct Sound", @@ -203,6 +217,7 @@ { dsoundsink->volume = 100; dsoundsink->mute = FALSE; + dsoundsink->device_id = NULL; dsoundsink->pDS = NULL; dsoundsink->cached_caps = NULL; dsoundsink->pDSBSecondary = NULL; @@ -226,6 +241,9 @@ case PROP_MUTE: gst_directsound_sink_set_mute (sink, g_value_get_boolean (value)); break; + case PROP_DEVICE: + gst_directsound_sink_set_device (sink, g_value_get_string (value)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -245,6 +263,9 @@ case PROP_MUTE: g_value_set_boolean (value, gst_directsound_sink_get_mute (sink)); break; + case PROP_DEVICE: + g_value_set_string (value, gst_directsound_sink_get_device (sink)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -378,22 +399,51 @@ return res; } +static LPGUID +string_to_guid (const gchar * str) +{ + HRESULT ret; + gunichar2 *wstr; + LPGUID out; + + wstr = g_utf8_to_utf16 (str, -1, NULL, NULL, NULL); + if (!wstr) + return NULL; + + out = g_new (GUID, 1); + ret = CLSIDFromString ((LPOLESTR) wstr, out); + g_free (wstr); + if (ret != NOERROR) { + g_free (out); + return NULL; + } + + return out; +} + static gboolean gst_directsound_sink_open (GstAudioSink * asink) { GstDirectSoundSink *dsoundsink; HRESULT hRes; + LPGUID lpGuid = NULL; dsoundsink = GST_DIRECTSOUND_SINK (asink); + if (dsoundsink->device_id) + lpGuid = string_to_guid (dsoundsink->device_id); + /* create and initialize a DirecSound object */ - if (FAILED (hRes = DirectSoundCreate (NULL, &dsoundsink->pDS, NULL))) { + if (FAILED (hRes = DirectSoundCreate (lpGuid, &dsoundsink->pDS, NULL))) { GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ, ("gst_directsound_sink_open: DirectSoundCreate: %s", DXGetErrorString9 (hRes)), (NULL)); + g_free (lpGuid); return FALSE; } + g_free (lpGuid); + if (FAILED (hRes = IDirectSound_SetCooperativeLevel (dsoundsink->pDS, GetDesktopWindow (), DSSCL_PRIORITY))) { GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ, @@ -444,12 +494,12 @@ gst_util_uint64_scale_int (wfx.nAvgBytesPerSec, spec->buffer_time, GST_MSECOND); /* Make sure we make those numbers multiple of our sample size in bytes */ - dsoundsink->buffer_size += dsoundsink->buffer_size % spec->info.bpf; + dsoundsink->buffer_size -= dsoundsink->buffer_size % spec->info.bpf; spec->segsize = gst_util_uint64_scale_int (wfx.nAvgBytesPerSec, spec->latency_time, GST_MSECOND); - spec->segsize += spec->segsize % spec->info.bpf; + spec->segsize -= spec->segsize % spec->info.bpf; spec->segtotal = dsoundsink->buffer_size / spec->segsize; } else { #ifdef WAVE_FORMAT_DOLBY_AC3_SPDIF @@ -874,3 +924,17 @@ { return FALSE; } + +static const gchar * +gst_directsound_sink_get_device (GstDirectSoundSink * dsoundsink) +{ + return dsoundsink->device_id; +} + +static void +gst_directsound_sink_set_device (GstDirectSoundSink * dsoundsink, + const gchar * device_id) +{ + g_free (dsoundsink->device_id); + dsoundsink->device_id = g_strdup (device_id); +} diff -Nru gst-plugins-good1.0-1.4.3/sys/directsound/gstdirectsoundsink.h gst-plugins-good1.0-1.6.1/sys/directsound/gstdirectsoundsink.h --- gst-plugins-good1.0-1.4.3/sys/directsound/gstdirectsoundsink.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/directsound/gstdirectsoundsink.h 2015-10-22 08:02:54.000000000 +0000 @@ -74,6 +74,9 @@ /* current volume setup by mixer interface */ glong volume; gboolean mute; + + /* current directsound device ID */ + gchar * device_id; GstCaps *cached_caps; /* lock used to protect writes and resets */ diff -Nru gst-plugins-good1.0-1.4.3/sys/directsound/Makefile.in gst-plugins-good1.0-1.6.1/sys/directsound/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/directsound/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/directsound/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = sys/directsound -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -230,6 +239,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -362,9 +372,6 @@ 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@ @@ -482,17 +489,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -545,6 +552,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -591,7 +599,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/directsound/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/directsound/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -908,6 +915,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/Makefile.in gst-plugins-good1.0-1.6.1/sys/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/Makefile.in 2014-09-24 07:26:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -25,7 +25,17 @@ # descending into all subdirectories a second time, but only after the first # (parallel) run has finished, so it should go right through the second time. VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -89,8 +99,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am subdir = sys ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -113,7 +121,6 @@ $(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 \ @@ -128,6 +135,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -186,6 +194,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/common/parallel-subdirs.mak DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -343,9 +353,6 @@ 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@ @@ -463,17 +470,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -526,6 +533,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -597,7 +605,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -606,7 +613,7 @@ 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/parallel-subdirs.mak: +$(top_srcdir)/common/parallel-subdirs.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -893,6 +900,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + .PHONY: independent-subdirs $(SUBDIRS) diff -Nru gst-plugins-good1.0-1.4.3/sys/oss/Makefile.in gst-plugins-good1.0-1.6.1/sys/oss/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/oss/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/oss/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = sys/oss -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -592,7 +600,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/oss/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/oss/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -925,6 +932,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/oss4/Makefile.in gst-plugins-good1.0-1.6.1/sys/oss4/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/oss4/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/oss4/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = sys/oss4 -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -229,6 +238,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +371,6 @@ 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@ @@ -481,17 +488,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +551,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -594,7 +602,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/oss4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/oss4/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -927,6 +934,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudioringbuffer.c gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudioringbuffer.c --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudioringbuffer.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudioringbuffer.c 2015-10-22 08:02:54.000000000 +0000 @@ -61,7 +61,6 @@ #include "gstosxcoreaudio.h" static void gst_osx_audio_ring_buffer_dispose (GObject * object); -static void gst_osx_audio_ring_buffer_finalize (GObject * object); static gboolean gst_osx_audio_ring_buffer_open_device (GstAudioRingBuffer * buf); static gboolean gst_osx_audio_ring_buffer_close_device (GstAudioRingBuffer * @@ -95,7 +94,6 @@ ring_parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = gst_osx_audio_ring_buffer_dispose; - gobject_class->finalize = gst_osx_audio_ring_buffer_finalize; gstringbuffer_class->open_device = GST_DEBUG_FUNCPTR (gst_osx_audio_ring_buffer_open_device); @@ -139,18 +137,13 @@ G_OBJECT_CLASS (ring_parent_class)->dispose (object); } -static void -gst_osx_audio_ring_buffer_finalize (GObject * object) -{ - G_OBJECT_CLASS (ring_parent_class)->finalize (object); -} - static gboolean gst_osx_audio_ring_buffer_open_device (GstAudioRingBuffer * buf) { - GstOsxAudioRingBuffer *osxbuf; + GstOsxAudioRingBuffer *osxbuf = GST_OSX_AUDIO_RING_BUFFER (buf); - osxbuf = GST_OSX_AUDIO_RING_BUFFER (buf); + if (!gst_core_audio_select_device (osxbuf->core_audio)) + return FALSE; return gst_core_audio_open (osxbuf->core_audio); } @@ -206,10 +199,12 @@ } else { format.mFormatFlags |= kAudioFormatFlagIsAlignedHigh; } - if (GST_AUDIO_INFO_IS_BIG_ENDIAN (&spec->info)) { - format.mFormatFlags |= kAudioFormatFlagIsBigEndian; - } } + + if (GST_AUDIO_INFO_IS_BIG_ENDIAN (&spec->info)) { + format.mFormatFlags |= kAudioFormatFlagIsBigEndian; + } + format.mBytesPerFrame = GST_AUDIO_INFO_BPF (&spec->info); format.mBitsPerChannel = depth; format.mBytesPerPacket = GST_AUDIO_INFO_BPF (&spec->info); @@ -225,10 +220,9 @@ GST_DEBUG_OBJECT (osxbuf, "Format: " CORE_AUDIO_FORMAT, CORE_AUDIO_FORMAT_ARGS (format)); - if (GST_IS_OSX_AUDIO_SINK (GST_OBJECT_PARENT (buf))) { - gst_audio_ring_buffer_set_channel_positions (buf, - GST_OSX_AUDIO_SINK (GST_OBJECT_PARENT (buf))->channel_positions); - } + /* gst_audio_ring_buffer_set_channel_positions is not called + * since the AUs perform channel reordering themselves. + * (see gst_core_audio_set_channel_layout) */ buf->size = spec->segtotal * spec->segsize; buf->memory = g_malloc0 (buf->size); @@ -254,7 +248,7 @@ osxbuf = GST_OSX_AUDIO_RING_BUFFER (buf); - gst_core_audio_unitialize (osxbuf->core_audio); + gst_core_audio_uninitialize (osxbuf->core_audio); g_free (buf->memory); buf->memory = NULL; diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosink.c gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosink.c --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosink.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosink.c 2015-10-22 08:02:54.000000000 +0000 @@ -93,17 +93,11 @@ #define DEFAULT_VOLUME 1.0 -#if (G_BYTE_ORDER == G_LITTLE_ENDIAN) -# define FORMATS "{ S32LE, S24LE, S16LE, U8 }" -#else -# define FORMATS "{ S32BE, S24BE, S16BE, U8 }" -#endif - static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw, " - "format = (string) " FORMATS ", " + "format = (string) " GST_AUDIO_FORMATS_ALL ", " "layout = (string) interleaved, " "rate = (int) [1, MAX], " "channels = (int) [1, 9];" @@ -116,9 +110,12 @@ static void gst_osx_audio_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); +static GstStateChangeReturn +gst_osx_audio_sink_change_state (GstElement * element, + GstStateChange transition); + static gboolean gst_osx_audio_sink_query (GstBaseSink * base, GstQuery * query); -static gboolean gst_osx_audio_sink_stop (GstBaseSink * base); static GstCaps *gst_osx_audio_sink_getcaps (GstBaseSink * base, GstCaps * filter); static gboolean gst_osx_audio_sink_acceptcaps (GstOsxAudioSink * sink, @@ -130,7 +127,6 @@ * gst_osx_audio_sink_create_ringbuffer (GstAudioBaseSink * sink); static void gst_osx_audio_sink_osxelement_init (gpointer g_iface, gpointer iface_data); -static gboolean gst_osx_audio_sink_select_device (GstOsxAudioSink * osxsink); static void gst_osx_audio_sink_set_volume (GstOsxAudioSink * sink); static OSStatus gst_osx_audio_sink_io_proc (GstOsxAudioRingBuffer * buf, @@ -177,6 +173,9 @@ gobject_class->set_property = gst_osx_audio_sink_set_property; gobject_class->get_property = gst_osx_audio_sink_get_property; + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_osx_audio_sink_change_state); + #ifndef HAVE_IOS g_object_class_install_property (gobject_class, ARG_DEVICE, g_param_spec_int ("device", "Device ID", "Device ID of output device", @@ -190,7 +189,6 @@ 0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_osx_audio_sink_getcaps); - gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_osx_audio_sink_stop); gstaudiobasesink_class->create_ringbuffer = GST_DEBUG_FUNCPTR (gst_osx_audio_sink_create_ringbuffer); @@ -209,19 +207,10 @@ static void gst_osx_audio_sink_init (GstOsxAudioSink * sink) { - gint i; - GST_DEBUG ("Initialising object"); sink->device_id = kAudioDeviceUnknown; - sink->cached_caps = NULL; - sink->volume = DEFAULT_VOLUME; - - sink->channels = 0; - for (i = 0; i < GST_OSX_AUDIO_MAX_CHANNEL; i++) { - sink->channel_positions[i] = GST_AUDIO_CHANNEL_POSITION_INVALID; - } } static void @@ -246,6 +235,45 @@ } } +static GstStateChangeReturn +gst_osx_audio_sink_change_state (GstElement * element, + GstStateChange transition) +{ + GstOsxAudioSink *osxsink = GST_OSX_AUDIO_SINK (element); + GstOsxAudioRingBuffer *ringbuffer; + GstStateChangeReturn ret; + + switch (transition) { + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (ret == GST_STATE_CHANGE_FAILURE) + goto out; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + /* Device has been selected, AudioUnit set up, so initialize volume */ + gst_osx_audio_sink_set_volume (osxsink); + + /* The device is open now, so fix our device_id if it changed */ + ringbuffer = + GST_OSX_AUDIO_RING_BUFFER (GST_AUDIO_BASE_SINK (osxsink)->ringbuffer); + if (ringbuffer->core_audio->device_id != osxsink->device_id) { + osxsink->device_id = ringbuffer->core_audio->device_id; + g_object_notify (G_OBJECT (osxsink), "device"); + } + break; + + default: + break; + } + +out: + return ret; +} + static void gst_osx_audio_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) @@ -290,37 +318,67 @@ return ret; } -static gboolean -gst_osx_audio_sink_stop (GstBaseSink * base) +static GstCaps * +gst_osx_audio_sink_getcaps (GstBaseSink * sink, GstCaps * filter) { - GstOsxAudioSink *sink = GST_OSX_AUDIO_SINK (base); + GstOsxAudioSink *osxsink; + GstAudioRingBuffer *buf; + GstOsxAudioRingBuffer *osxbuf; + GstCaps *caps, *filtered_caps; + + osxsink = GST_OSX_AUDIO_SINK (sink); - if (sink->cached_caps) { - gst_caps_unref (sink->cached_caps); - sink->cached_caps = NULL; + GST_OBJECT_LOCK (osxsink); + buf = GST_AUDIO_BASE_SINK (sink)->ringbuffer; + if (buf) + gst_object_ref (buf); + GST_OBJECT_UNLOCK (osxsink); + + if (!buf) { + GST_DEBUG_OBJECT (sink, "no ring buffer, returning NULL caps"); + return GST_BASE_SINK_CLASS (parent_class)->get_caps (sink, filter); } - return GST_CALL_PARENT_WITH_DEFAULT (GST_BASE_SINK_CLASS, stop, (base), TRUE); -} + osxbuf = GST_OSX_AUDIO_RING_BUFFER (buf); -static GstCaps * -gst_osx_audio_sink_getcaps (GstBaseSink * base, GstCaps * filter) -{ - GstOsxAudioSink *sink = GST_OSX_AUDIO_SINK (base); - gchar *caps_string = NULL; + /* protect against cached_caps going away */ + GST_OBJECT_LOCK (buf); - if (sink->cached_caps) { - caps_string = gst_caps_to_string (sink->cached_caps); - GST_DEBUG_OBJECT (sink, "using cached caps: %s", caps_string); - g_free (caps_string); - if (filter) - return gst_caps_intersect_full (sink->cached_caps, filter, - GST_CAPS_INTERSECT_FIRST); - return gst_caps_ref (sink->cached_caps); + if (osxbuf->core_audio->cached_caps_valid) { + GST_LOG_OBJECT (sink, "Returning cached caps"); + caps = gst_caps_ref (osxbuf->core_audio->cached_caps); + } else if (buf->open) { + GstCaps *template_caps; + + /* Get template caps */ + template_caps = + gst_pad_get_pad_template_caps (GST_AUDIO_BASE_SINK_PAD (osxsink)); + + /* Device is open, let's probe its caps */ + caps = gst_core_audio_probe_caps (osxbuf->core_audio, template_caps); + gst_caps_replace (&osxbuf->core_audio->cached_caps, caps); + + gst_caps_unref (template_caps); + } else { + GST_DEBUG_OBJECT (sink, "ring buffer not open, returning NULL caps"); + caps = NULL; } - GST_DEBUG_OBJECT (sink, "using template caps"); - return NULL; + GST_OBJECT_UNLOCK (buf); + + gst_object_unref (buf); + + if (!caps) + return NULL; + + if (!filter) + return caps; + + /* Take care of filtered caps */ + filtered_caps = + gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (caps); + return filtered_caps; } static gboolean @@ -434,24 +492,23 @@ osxsink = GST_OSX_AUDIO_SINK (sink); - if (!gst_osx_audio_sink_select_device (osxsink)) { - GST_ERROR_OBJECT (sink, "Could not select device"); - return NULL; - } - GST_DEBUG_OBJECT (sink, "Creating ringbuffer"); ringbuffer = g_object_new (GST_TYPE_OSX_AUDIO_RING_BUFFER, NULL); GST_DEBUG_OBJECT (sink, "osx sink %p element %p ioproc %p", osxsink, GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsink), (void *) gst_osx_audio_sink_io_proc); - gst_osx_audio_sink_set_volume (osxsink); - ringbuffer->core_audio->element = GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsink); - ringbuffer->core_audio->device_id = osxsink->device_id; ringbuffer->core_audio->is_src = FALSE; + /* By default the coreaudio instance created by the ringbuffer + * has device_id==kAudioDeviceUnknown. The user might have + * selected a different one here + */ + if (ringbuffer->core_audio->device_id != osxsink->device_id) + ringbuffer->core_audio->device_id = osxsink->device_id; + return GST_AUDIO_RING_BUFFER (ringbuffer); } @@ -521,136 +578,3 @@ gst_core_audio_set_volume (osxbuf->core_audio, sink->volume); } - -static gboolean -gst_osx_audio_sink_allowed_caps (GstOsxAudioSink * osxsink) -{ - gint i, channels; - gboolean spdif_allowed; - AudioChannelLayout *layout; - GstElementClass *element_class; - GstPadTemplate *pad_template; - GstCaps *caps, *in_caps; - guint64 channel_mask = 0; - GstAudioChannelPosition *pos = osxsink->channel_positions; - - /* First collect info about the HW capabilites and preferences */ - spdif_allowed = - gst_core_audio_audio_device_is_spdif_avail (osxsink->device_id); - layout = gst_core_audio_audio_device_get_channel_layout (osxsink->device_id); - - GST_DEBUG_OBJECT (osxsink, "Selected device ID: %u SPDIF allowed: %d", - (unsigned) osxsink->device_id, spdif_allowed); - - if (layout) { - channels = MIN (layout->mNumberChannelDescriptions, - GST_OSX_AUDIO_MAX_CHANNEL); - } else { - GST_WARNING_OBJECT (osxsink, "This driver does not support " - "kAudioDevicePropertyPreferredChannelLayout."); - channels = 2; - } - - switch (channels) { - case 0: - pos[0] = GST_AUDIO_CHANNEL_POSITION_NONE; - break; - case 1: - pos[0] = GST_AUDIO_CHANNEL_POSITION_MONO; - break; - case 2: - pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT; - pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT; - channel_mask |= GST_AUDIO_CHANNEL_POSITION_MASK (FRONT_LEFT); - channel_mask |= GST_AUDIO_CHANNEL_POSITION_MASK (FRONT_RIGHT); - break; - default: - channels = MIN (layout->mNumberChannelDescriptions, - GST_OSX_AUDIO_MAX_CHANNEL); - for (i = 0; i < channels; i++) { - switch (layout->mChannelDescriptions[i].mChannelLabel) { - case kAudioChannelLabel_Left: - pos[i] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT; - break; - case kAudioChannelLabel_Right: - pos[i] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT; - break; - case kAudioChannelLabel_Center: - pos[i] = GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER; - break; - case kAudioChannelLabel_LFEScreen: - pos[i] = GST_AUDIO_CHANNEL_POSITION_LFE1; - break; - case kAudioChannelLabel_LeftSurround: - pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_LEFT; - break; - case kAudioChannelLabel_RightSurround: - pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT; - break; - case kAudioChannelLabel_RearSurroundLeft: - pos[i] = GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT; - break; - case kAudioChannelLabel_RearSurroundRight: - pos[i] = GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT; - break; - case kAudioChannelLabel_CenterSurround: - pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_CENTER; - break; - default: - GST_WARNING_OBJECT (osxsink, "unrecognized channel: %d", - (int) layout->mChannelDescriptions[i].mChannelLabel); - channel_mask = 0; - channels = 2; - break; - } - } - } - g_free (layout); - - /* Recover the template caps */ - element_class = GST_ELEMENT_GET_CLASS (osxsink); - pad_template = gst_element_class_get_pad_template (element_class, "sink"); - in_caps = gst_pad_template_get_caps (pad_template); - - /* Create the allowed subset */ - caps = gst_caps_new_empty (); - for (i = 0; i < gst_caps_get_size (in_caps); i++) { - GstStructure *in_s, *out_s; - - in_s = gst_caps_get_structure (in_caps, i); - - if (gst_structure_has_name (in_s, "audio/x-ac3") || - gst_structure_has_name (in_s, "audio/x-dts")) { - if (spdif_allowed) { - gst_caps_append_structure (caps, gst_structure_copy (in_s)); - } - } - gst_audio_channel_positions_to_mask (pos, channels, false, &channel_mask); - out_s = gst_structure_copy (in_s); - gst_structure_remove_fields (out_s, "channels", "channel-mask", NULL); - gst_structure_set (out_s, "channels", G_TYPE_INT, channels, - "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL); - gst_caps_append_structure (caps, out_s); - } - - if (osxsink->cached_caps) { - gst_caps_unref (osxsink->cached_caps); - } - - osxsink->cached_caps = caps; - osxsink->channels = channels; - - return TRUE; -} - -static gboolean -gst_osx_audio_sink_select_device (GstOsxAudioSink * osxsink) -{ - gboolean res = FALSE; - - if (!gst_core_audio_select_device (&osxsink->device_id)) - return FALSE; - res = gst_osx_audio_sink_allowed_caps (osxsink); - - return res; -} diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosink.h gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosink.h --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosink.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosink.h 2015-10-22 08:02:54.000000000 +0000 @@ -66,8 +66,6 @@ #define GST_IS_OSX_AUDIO_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSX_AUDIO_SINK)) -#define GST_OSX_AUDIO_MAX_CHANNEL (9) - typedef struct _GstOsxAudioSink GstOsxAudioSink; typedef struct _GstOsxAudioSinkClass GstOsxAudioSinkClass; @@ -79,10 +77,8 @@ AudioUnit audiounit; double volume; - GstCaps *cached_caps; guint channels; - GstAudioChannelPosition channel_positions[GST_OSX_AUDIO_MAX_CHANNEL]; }; struct _GstOsxAudioSinkClass diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosrc.c gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosrc.c --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -79,17 +79,11 @@ ARG_DEVICE }; -#if (G_BYTE_ORDER == G_LITTLE_ENDIAN) -# define FORMATS "{ S32LE }" -#else -# define FORMATS "{ S32BE }" -#endif - static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw, " - "format = (string) " FORMATS ", " + "format = (string) " GST_AUDIO_FORMATS_ALL ", " "layout = (string) interleaved, " "rate = (int) [1, MAX], " "channels = (int) [1, MAX]") ); @@ -99,6 +93,10 @@ static void gst_osx_audio_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); +static GstStateChangeReturn +gst_osx_audio_src_change_state (GstElement * element, + GstStateChange transition); + static GstCaps *gst_osx_audio_src_get_caps (GstBaseSrc * src, GstCaps * filter); static GstAudioRingBuffer *gst_osx_audio_src_create_ringbuffer (GstAudioBaseSrc @@ -109,7 +107,6 @@ AudioUnitRenderActionFlags * ioActionFlags, const AudioTimeStamp * inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * bufferList); -static void gst_osx_audio_src_select_device (GstOsxAudioSrc * osxsrc); static void gst_osx_audio_src_do_init (GType type) @@ -122,11 +119,11 @@ GST_DEBUG_CATEGORY_INIT (osx_audiosrc_debug, "osxaudiosrc", 0, "OSX Audio Src"); - GST_DEBUG ("Adding static interface"); g_type_add_interface_static (type, GST_OSX_AUDIO_ELEMENT_TYPE, &osxelement_info); } +#define gst_osx_audio_src_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstOsxAudioSrc, gst_osx_audio_src, GST_TYPE_AUDIO_BASE_SRC, gst_osx_audio_src_do_init (g_define_type_id)); @@ -146,6 +143,9 @@ gobject_class->set_property = gst_osx_audio_src_set_property; gobject_class->get_property = gst_osx_audio_src_get_property; + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_osx_audio_src_change_state); + gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_osx_audio_src_get_caps); g_object_class_install_property (gobject_class, ARG_DEVICE, @@ -170,7 +170,6 @@ gst_base_src_set_live (GST_BASE_SRC (src), TRUE); src->device_id = kAudioDeviceUnknown; - src->deviceChannels = -1; } static void @@ -205,43 +204,102 @@ } } +static GstStateChangeReturn +gst_osx_audio_src_change_state (GstElement * element, GstStateChange transition) +{ + GstOsxAudioSrc *osxsrc = GST_OSX_AUDIO_SRC (element); + GstOsxAudioRingBuffer *ringbuffer; + GstStateChangeReturn ret; + + switch (transition) { + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (ret == GST_STATE_CHANGE_FAILURE) + goto out; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + /* The device is open now, so fix our device_id if it changed */ + ringbuffer = + GST_OSX_AUDIO_RING_BUFFER (GST_AUDIO_BASE_SRC (osxsrc)->ringbuffer); + if (ringbuffer->core_audio->device_id != osxsrc->device_id) { + osxsrc->device_id = ringbuffer->core_audio->device_id; + g_object_notify (G_OBJECT (osxsrc), "device"); + } + break; + + default: + break; + } + +out: + return ret; +} + static GstCaps * gst_osx_audio_src_get_caps (GstBaseSrc * src, GstCaps * filter) { - GstElementClass *gstelement_class; GstOsxAudioSrc *osxsrc; - GstPadTemplate *pad_template; - GstCaps *caps; - gint min, max; + GstAudioRingBuffer *buf; + GstOsxAudioRingBuffer *osxbuf; + GstCaps *caps, *filtered_caps; - gstelement_class = GST_ELEMENT_GET_CLASS (src); osxsrc = GST_OSX_AUDIO_SRC (src); - if (osxsrc->deviceChannels == -1) { - /* -1 means we don't know the number of channels yet. for now, return - * template caps. - */ - return NULL; + GST_OBJECT_LOCK (osxsrc); + buf = GST_AUDIO_BASE_SRC (src)->ringbuffer; + if (buf) + gst_object_ref (buf); + GST_OBJECT_UNLOCK (osxsrc); + + if (!buf) { + GST_DEBUG_OBJECT (src, "no ring buffer, using template caps"); + return GST_BASE_SRC_CLASS (parent_class)->get_caps (src, filter); } - max = osxsrc->deviceChannels; - if (max < 1) - max = 1; /* 0 channels means 1 channel? */ - - min = MIN (1, max); + osxbuf = GST_OSX_AUDIO_RING_BUFFER (buf); - pad_template = gst_element_class_get_pad_template (gstelement_class, "src"); - g_return_val_if_fail (pad_template != NULL, NULL); + /* protect against cached_caps going away */ + GST_OBJECT_LOCK (buf); - caps = gst_caps_copy (gst_pad_template_get_caps (pad_template)); + if (osxbuf->core_audio->cached_caps_valid) { + GST_LOG_OBJECT (src, "Returning cached caps"); + caps = gst_caps_ref (osxbuf->core_audio->cached_caps); + } else if (buf->open) { + GstCaps *template_caps; + + /* Get template caps */ + template_caps = + gst_pad_get_pad_template_caps (GST_AUDIO_BASE_SRC_PAD (osxsrc)); + + /* Device is open, let's probe its caps */ + caps = gst_core_audio_probe_caps (osxbuf->core_audio, template_caps); + gst_caps_replace (&osxbuf->core_audio->cached_caps, caps); - if (min == max) { - gst_caps_set_simple (caps, "channels", G_TYPE_INT, max, NULL); + gst_caps_unref (template_caps); } else { - gst_caps_set_simple (caps, "channels", GST_TYPE_INT_RANGE, min, max, NULL); + GST_DEBUG_OBJECT (src, "ring buffer not open, using template caps"); + caps = GST_BASE_SRC_CLASS (parent_class)->get_caps (src, NULL); } - return caps; + GST_OBJECT_UNLOCK (buf); + + gst_object_unref (buf); + + if (!caps) + return NULL; + + if (!filter) + return caps; + + /* Take care of filtered caps */ + filtered_caps = + gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (caps); + return filtered_caps; } static GstAudioRingBuffer * @@ -252,18 +310,22 @@ osxsrc = GST_OSX_AUDIO_SRC (src); - gst_osx_audio_src_select_device (osxsrc); - - GST_DEBUG ("Creating ringbuffer"); + GST_DEBUG_OBJECT (osxsrc, "Creating ringbuffer"); ringbuffer = g_object_new (GST_TYPE_OSX_AUDIO_RING_BUFFER, NULL); - GST_DEBUG ("osx src 0x%p element 0x%p ioproc 0x%p", osxsrc, + GST_DEBUG_OBJECT (osxsrc, "osx src 0x%p element 0x%p ioproc 0x%p", osxsrc, GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsrc), (void *) gst_osx_audio_src_io_proc); ringbuffer->core_audio->element = GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsrc); ringbuffer->core_audio->is_src = TRUE; - ringbuffer->core_audio->device_id = osxsrc->device_id; + + /* By default the coreaudio instance created by the ringbuffer + * has device_id==kAudioDeviceUnknown. The user might have + * selected a different one here + */ + if (ringbuffer->core_audio->device_id != osxsrc->device_id) + ringbuffer->core_audio->device_id = osxsrc->device_id; return GST_AUDIO_RING_BUFFER (ringbuffer); } @@ -279,8 +341,16 @@ gint writeseg; gint len; gint remaining; + UInt32 n; gint offset = 0; + /* Previous invoke of AudioUnitRender changed mDataByteSize into + * number of bytes actually read. Reset the members. */ + for (n = 0; n < buf->core_audio->recBufferList->mNumberBuffers; ++n) { + buf->core_audio->recBufferList->mBuffers[n].mDataByteSize = + buf->core_audio->recBufferSize; + } + status = AudioUnitRender (buf->core_audio->audiounit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, buf->core_audio->recBufferList); @@ -289,6 +359,9 @@ return status; } + /* TODO: To support non-interleaved audio, go over all mBuffers, + * not just the first one. */ + remaining = buf->core_audio->recBufferList->mBuffers[0].mDataByteSize; while (remaining) { @@ -326,9 +399,3 @@ iface->io_proc = (AURenderCallback) gst_osx_audio_src_io_proc; } - -static void -gst_osx_audio_src_select_device (GstOsxAudioSrc * osxsrc) -{ - gst_core_audio_select_source_device (&osxsrc->device_id); -} diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosrc.h gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosrc.h --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxaudiosrc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxaudiosrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -57,6 +57,8 @@ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSX_AUDIO_SRC,GstOsxAudioSrc)) #define GST_OSX_AUDIO_SRC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSX_AUDIO_SRC,GstOsxAudioSrcClass)) +#define GST_IS_OSX_AUDIO_SRC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSX_AUDIO_SRC)) typedef struct _GstOsxAudioSrc GstOsxAudioSrc; typedef struct _GstOsxAudioSrcClass GstOsxAudioSrcClass; @@ -66,12 +68,9 @@ GstAudioBaseSrc src; AudioDeviceID device_id; - - /* actual number of channels reported by input device */ - int deviceChannels; }; -struct _GstOsxAudioSrcClass +struct _GstOsxAudioSrcClass { GstAudioBaseSrcClass parent_class; }; diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudio.c gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudio.c --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudio.c 2014-09-19 06:37:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudio.c 2015-10-22 08:02:54.000000000 +0000 @@ -23,7 +23,6 @@ #include "gstosxcoreaudio.h" #include "gstosxcoreaudiocommon.h" -#include "gstosxaudiosrc.h" GST_DEBUG_CATEGORY_STATIC (osx_audio_debug); #define GST_CAT_DEFAULT osx_audio_debug @@ -49,12 +48,54 @@ core_audio->device_id = kAudioDeviceUnknown; core_audio->is_src = FALSE; core_audio->audiounit = NULL; + core_audio->cached_caps = NULL; + core_audio->cached_caps_valid = FALSE; #ifndef HAVE_IOS core_audio->hog_pid = -1; core_audio->disabled_mixing = FALSE; #endif } +static gboolean +_is_outer_scope (AudioUnitScope scope, AudioUnitElement element) +{ + return + (scope == kAudioUnitScope_Input && element == 1) || + (scope == kAudioUnitScope_Output && element == 0); +} + +static void +_audio_unit_property_listener (void *inRefCon, AudioUnit inUnit, + AudioUnitPropertyID inID, AudioUnitScope inScope, + AudioUnitElement inElement) +{ + GstCoreAudio *core_audio; + + core_audio = GST_CORE_AUDIO (inRefCon); + g_assert (inUnit == core_audio->audiounit); + + switch (inID) { + case kAudioUnitProperty_AudioChannelLayout: + case kAudioUnitProperty_StreamFormat: + if (_is_outer_scope (inScope, inElement)) { + /* We don't push gst_event_new_caps here (for src), + * nor gst_event_new_reconfigure (for sink), since Core Audio continues + * to happily function with the old format, doing conversion/resampling + * as needed. + * This merely "refreshes" our PREFERRED caps. */ + + /* This function is called either from a Core Audio thread + * or as a result of a Core Audio API (e.g. AudioUnitInitialize) + * from our own thread. In the latter case, osxbuf can be + * already locked (GStreamer's mutex is not recursive). + * For this reason we use a boolean flag instead of nullifying + * cached_caps. */ + core_audio->cached_caps_valid = FALSE; + } + break; + } +} + /************************** * Public API * *************************/ @@ -66,12 +107,34 @@ core_audio = g_object_new (GST_TYPE_CORE_AUDIO, NULL); core_audio->osxbuf = osxbuf; + core_audio->cached_caps = NULL; return core_audio; } gboolean gst_core_audio_close (GstCoreAudio * core_audio) { + OSStatus status; + + /* Uninitialize the AudioUnit */ + status = AudioUnitUninitialize (core_audio->audiounit); + if (status) { + GST_ERROR_OBJECT (core_audio, "Failed to uninitialize AudioUnit: %d", + (int) status); + return FALSE; + } + + AudioUnitRemovePropertyListenerWithUserData (core_audio->audiounit, + kAudioUnitProperty_AudioChannelLayout, _audio_unit_property_listener, + core_audio); + AudioUnitRemovePropertyListenerWithUserData (core_audio->audiounit, + kAudioUnitProperty_StreamFormat, _audio_unit_property_listener, + core_audio); + + /* core_audio->osxbuf is already locked at this point */ + core_audio->cached_caps_valid = FALSE; + gst_caps_replace (&core_audio->cached_caps, NULL); + AudioComponentInstanceDispose (core_audio->audiounit); core_audio->audiounit = NULL; return TRUE; @@ -80,32 +143,38 @@ gboolean gst_core_audio_open (GstCoreAudio * core_audio) { + OSStatus status; + + /* core_audio->osxbuf is already locked at this point */ + core_audio->cached_caps_valid = FALSE; + gst_caps_replace (&core_audio->cached_caps, NULL); if (!gst_core_audio_open_impl (core_audio)) return FALSE; - if (core_audio->is_src) { - AudioStreamBasicDescription asbd_in; - UInt32 propertySize; - OSStatus status; - - GstOsxAudioSrc *src = - GST_OSX_AUDIO_SRC (GST_OBJECT_PARENT (core_audio->osxbuf)); - - propertySize = sizeof (asbd_in); - status = AudioUnitGetProperty (core_audio->audiounit, - kAudioUnitProperty_StreamFormat, - kAudioUnitScope_Input, 1, &asbd_in, &propertySize); - - if (status) { - AudioComponentInstanceDispose (core_audio->audiounit); - core_audio->audiounit = NULL; - GST_WARNING_OBJECT (core_audio, - "Unable to obtain device properties: %d", (int) status); - return FALSE; - } else { - src->deviceChannels = asbd_in.mChannelsPerFrame; - } + /* Add property listener */ + status = AudioUnitAddPropertyListener (core_audio->audiounit, + kAudioUnitProperty_AudioChannelLayout, _audio_unit_property_listener, + core_audio); + if (status != noErr) { + GST_ERROR_OBJECT (core_audio, "Failed to add audio channel layout property " + "listener for AudioUnit: %d", (int) status); + } + status = AudioUnitAddPropertyListener (core_audio->audiounit, + kAudioUnitProperty_StreamFormat, _audio_unit_property_listener, + core_audio); + if (status != noErr) { + GST_ERROR_OBJECT (core_audio, "Failed to add stream format property " + "listener for AudioUnit: %d", (int) status); + } + + /* Initialize the AudioUnit. We keep the audio unit initialized early so that + * we can probe the underlying device. */ + status = AudioUnitInitialize (core_audio->audiounit); + if (status) { + GST_ERROR_OBJECT (core_audio, "Failed to initialize AudioUnit: %d", + (int) status); + return FALSE; } return TRUE; @@ -142,7 +211,6 @@ AudioStreamBasicDescription format, GstCaps * caps, gboolean is_passthrough) { guint32 frame_size; - OSStatus status; GST_DEBUG_OBJECT (core_audio, "Initializing: passthrough:%d caps:%" GST_PTR_FORMAT, is_passthrough, @@ -150,42 +218,26 @@ if (!gst_core_audio_initialize_impl (core_audio, format, caps, is_passthrough, &frame_size)) { - goto error; + return FALSE; } if (core_audio->is_src) { /* create AudioBufferList needed for recording */ + core_audio->recBufferSize = frame_size * format.mBytesPerFrame; core_audio->recBufferList = - buffer_list_alloc (format.mChannelsPerFrame, - frame_size * format.mBytesPerFrame); + buffer_list_alloc (format.mChannelsPerFrame, core_audio->recBufferSize, + /* Currently always TRUE (i.e. interleaved) */ + !(format.mFormatFlags & kAudioFormatFlagIsNonInterleaved)); } - /* Initialize the AudioUnit */ - status = AudioUnitInitialize (core_audio->audiounit); - if (status) { - GST_ERROR_OBJECT (core_audio, "Failed to initialise AudioUnit: %d", - (int) status); - goto error; - } return TRUE; - -error: - if (core_audio->is_src && core_audio->recBufferList) { - buffer_list_free (core_audio->recBufferList); - core_audio->recBufferList = NULL; - } - return FALSE; } void -gst_core_audio_unitialize (GstCoreAudio * core_audio) +gst_core_audio_uninitialize (GstCoreAudio * core_audio) { - AudioUnitUninitialize (core_audio->audiounit); - - if (core_audio->recBufferList) { - buffer_list_free (core_audio->recBufferList); - core_audio->recBufferList = NULL; - } + buffer_list_free (core_audio->recBufferList); + core_audio->recBufferList = NULL; } void @@ -196,15 +248,9 @@ } gboolean -gst_core_audio_select_device (AudioDeviceID * device_id) -{ - return gst_core_audio_select_device_impl (device_id); -} - -gboolean -gst_core_audio_select_source_device (AudioDeviceID * device_id) +gst_core_audio_select_device (GstCoreAudio * core_audio) { - return gst_core_audio_select_source_device_impl (device_id); + return gst_core_audio_select_device_impl (core_audio); } void @@ -219,3 +265,403 @@ { return gst_core_audio_audio_device_is_spdif_avail_impl (device_id); } + +/* Does the channel have at least one positioned channel? + * (GStreamer is more strict than Core Audio, in that it requires either + * all channels to be positioned, or all unpositioned.) */ +static gboolean +_is_core_audio_layout_positioned (AudioChannelLayout * layout) +{ + guint i; + + g_assert (layout->mChannelLayoutTag == + kAudioChannelLayoutTag_UseChannelDescriptions); + + for (i = 0; i < layout->mNumberChannelDescriptions; ++i) { + GstAudioChannelPosition p = + gst_core_audio_channel_label_to_gst + (layout->mChannelDescriptions[i].mChannelLabel, i, FALSE); + + if (p >= 0) /* not special positition */ + return TRUE; + } + + return FALSE; +} + +static void +_core_audio_parse_channel_descriptions (AudioChannelLayout * layout, + guint * channels, guint64 * channel_mask, GstAudioChannelPosition * pos) +{ + gboolean positioned; + guint i; + + g_assert (layout->mChannelLayoutTag == + kAudioChannelLayoutTag_UseChannelDescriptions); + + positioned = _is_core_audio_layout_positioned (layout); + *channel_mask = 0; + + /* Go over all labels, either taking only positioned or only + * unpositioned channels, up to GST_OSX_AUDIO_MAX_CHANNEL channels. + * + * The resulting 'pos' array will contain either: + * - only regular (>= 0) positions + * - only GST_AUDIO_CHANNEL_POSITION_NONE positions + * in a compact form, skipping over all unsupported positions. + */ + *channels = 0; + for (i = 0; i < layout->mNumberChannelDescriptions; ++i) { + GstAudioChannelPosition p = + gst_core_audio_channel_label_to_gst + (layout->mChannelDescriptions[i].mChannelLabel, i, TRUE); + + /* In positioned layouts, skip all unpositioned channels. + * In unpositioned layouts, skip all invalid channels. */ + if ((positioned && p >= 0) || + (!positioned && p == GST_AUDIO_CHANNEL_POSITION_NONE)) { + + if (pos) + pos[*channels] = p; + *channel_mask |= G_GUINT64_CONSTANT (1) << p; + ++(*channels); + + if (*channels == GST_OSX_AUDIO_MAX_CHANNEL) + break; /* not to overflow */ + } + } +} + +gboolean +gst_core_audio_parse_channel_layout (AudioChannelLayout * layout, + guint * channels, guint64 * channel_mask, GstAudioChannelPosition * pos) +{ + g_assert (channels != NULL); + g_assert (channel_mask != NULL); + g_assert (layout != NULL); + + if (layout->mChannelLayoutTag != + kAudioChannelLayoutTag_UseChannelDescriptions) { + GST_ERROR + ("Only kAudioChannelLayoutTag_UseChannelDescriptions is supported."); + *channels = 0; + *channel_mask = 0; + return FALSE; + } + + switch (layout->mNumberChannelDescriptions) { + case 0: + if (pos) + pos[0] = GST_AUDIO_CHANNEL_POSITION_NONE; + *channels = 0; + *channel_mask = 0; + return TRUE; + case 1: + if (pos) + pos[0] = GST_AUDIO_CHANNEL_POSITION_MONO; + *channels = 1; + *channel_mask = 0; + return TRUE; + case 2: + if (pos) { + pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT; + pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT; + } + *channels = 2; + *channel_mask = + GST_AUDIO_CHANNEL_POSITION_MASK (FRONT_LEFT) | + GST_AUDIO_CHANNEL_POSITION_MASK (FRONT_RIGHT); + return TRUE; + default: + _core_audio_parse_channel_descriptions (layout, channels, channel_mask, + pos); + return TRUE; + } +} + +/* Converts an AudioStreamBasicDescription to preferred caps. + * + * These caps will indicate the AU element's canonical format, which won't + * make Core Audio resample nor convert. + * + * NOTE ON MULTI-CHANNEL AUDIO: + * + * If layout is not NULL, resulting caps will only include the subset + * of channels supported by GStreamer. If the Core Audio layout contained + * ANY positioned channels, then ONLY positioned channels will be included + * in the resulting caps. Otherwise, resulting caps will be unpositioned, + * and include only unpositioned channels. + * (Channels with unsupported AudioChannelLabel will be skipped either way.) + * + * Naturally, the number of channels indicated by 'channels' can be lower + * than the AU element's total number of channels. + */ +GstCaps * +gst_core_audio_asbd_to_caps (AudioStreamBasicDescription * asbd, + AudioChannelLayout * layout) +{ + GstAudioInfo info; + GstAudioFormat format = GST_AUDIO_FORMAT_UNKNOWN; + guint rate, channels, bps, endianness; + guint64 channel_mask; + gboolean sign, interleaved; + + if (asbd->mFormatID != kAudioFormatLinearPCM) { + GST_WARNING ("Only linear PCM is supported"); + goto error; + } + + if (!(asbd->mFormatFlags & kAudioFormatFlagIsPacked)) { + GST_WARNING ("Only packed formats supported"); + goto error; + } + + if (asbd->mFormatFlags & kLinearPCMFormatFlagsSampleFractionMask) { + GST_WARNING ("Fixed point audio is unsupported"); + goto error; + } + + rate = asbd->mSampleRate; + if (rate == kAudioStreamAnyRate) { + GST_WARNING ("No sample rate"); + goto error; + } + + bps = asbd->mBitsPerChannel; + endianness = asbd->mFormatFlags & kAudioFormatFlagIsBigEndian ? + G_BIG_ENDIAN : G_LITTLE_ENDIAN; + sign = asbd->mFormatID & kAudioFormatFlagIsSignedInteger ? TRUE : FALSE; + interleaved = asbd->mFormatFlags & kAudioFormatFlagIsNonInterleaved ? + TRUE : FALSE; + + if (asbd->mFormatFlags & kAudioFormatFlagIsFloat) { + if (bps == 32) { + if (endianness == G_LITTLE_ENDIAN) + format = GST_AUDIO_FORMAT_F32LE; + else + format = GST_AUDIO_FORMAT_F32BE; + + } else if (bps == 64) { + if (endianness == G_LITTLE_ENDIAN) + format = GST_AUDIO_FORMAT_F64LE; + else + format = GST_AUDIO_FORMAT_F64BE; + } + } else { + format = gst_audio_format_build_integer (sign, endianness, bps, bps); + } + + if (format == GST_AUDIO_FORMAT_UNKNOWN) { + GST_WARNING ("Unsupported sample format"); + goto error; + } + + if (layout) { + GstAudioChannelPosition pos[GST_OSX_AUDIO_MAX_CHANNEL]; + + if (!gst_core_audio_parse_channel_layout (layout, &channels, &channel_mask, + pos)) { + GST_WARNING ("Failed to parse channel layout"); + goto error; + } + + /* The AU can have arbitrary channel order, but we're using GstAudioInfo + * which supports only the GStreamer channel order. + * Also, we're eventually producing caps, which only have channel-mask + * (whose implied order is the GStreamer channel order). */ + gst_audio_channel_positions_to_valid_order (pos, channels); + + gst_audio_info_set_format (&info, format, rate, channels, pos); + } else { + channels = MIN (asbd->mChannelsPerFrame, GST_OSX_AUDIO_MAX_CHANNEL); + gst_audio_info_set_format (&info, format, rate, channels, NULL); + } + + return gst_audio_info_to_caps (&info); + +error: + return NULL; +} + +static gboolean +_core_audio_get_property (GstCoreAudio * core_audio, gboolean outer, + AudioUnitPropertyID inID, void *inData, UInt32 * inDataSize) +{ + OSStatus status; + AudioUnitScope scope; + AudioUnitElement element; + + scope = outer ? + CORE_AUDIO_OUTER_SCOPE (core_audio) : CORE_AUDIO_INNER_SCOPE (core_audio); + element = CORE_AUDIO_ELEMENT (core_audio); + + status = + AudioUnitGetProperty (core_audio->audiounit, inID, scope, element, inData, + inDataSize); + + return status == noErr; +} + +static gboolean +_core_audio_get_stream_format (GstCoreAudio * core_audio, + AudioStreamBasicDescription * asbd, gboolean outer) +{ + UInt32 size; + + size = sizeof (AudioStreamBasicDescription); + return _core_audio_get_property (core_audio, outer, + kAudioUnitProperty_StreamFormat, asbd, &size); +} + +AudioChannelLayout * +gst_core_audio_get_channel_layout (GstCoreAudio * core_audio, gboolean outer) +{ + UInt32 size; + AudioChannelLayout *layout; + + if (core_audio->is_src) { + GST_WARNING_OBJECT (core_audio, + "gst_core_audio_get_channel_layout not supported on source."); + return NULL; + } + + if (!_core_audio_get_property (core_audio, outer, + kAudioUnitProperty_AudioChannelLayout, NULL, &size)) { + GST_WARNING_OBJECT (core_audio, "unable to get channel layout"); + return NULL; + } + + layout = g_malloc (size); + if (!_core_audio_get_property (core_audio, outer, + kAudioUnitProperty_AudioChannelLayout, layout, &size)) { + GST_WARNING_OBJECT (core_audio, "unable to get channel layout"); + g_free (layout); + return NULL; + } + + return layout; +} + +#define STEREO_CHANNEL_MASK \ + (GST_AUDIO_CHANNEL_POSITION_MASK (FRONT_LEFT) | \ + GST_AUDIO_CHANNEL_POSITION_MASK (FRONT_RIGHT)) + +GstCaps * +gst_core_audio_probe_caps (GstCoreAudio * core_audio, GstCaps * in_caps) +{ + guint i, channels; + gboolean spdif_allowed; + AudioChannelLayout *layout; + AudioStreamBasicDescription outer_asbd; + gboolean got_outer_asbd; + GstCaps *caps = NULL; + guint64 channel_mask; + + /* Get the ASBD of the outer scope (i.e. input scope of Input, + * output scope of Output). + * This ASBD indicates the hardware format. */ + got_outer_asbd = + _core_audio_get_stream_format (core_audio, &outer_asbd, TRUE); + + /* Collect info about the HW capabilites and preferences */ + spdif_allowed = + gst_core_audio_audio_device_is_spdif_avail (core_audio->device_id); + if (!core_audio->is_src) + layout = gst_core_audio_get_channel_layout (core_audio, TRUE); + else + layout = NULL; /* no supported for sources */ + + GST_DEBUG_OBJECT (core_audio, "Selected device ID: %u SPDIF allowed: %d", + (unsigned) core_audio->device_id, spdif_allowed); + + if (layout) { + if (!gst_core_audio_parse_channel_layout (layout, &channels, &channel_mask, + NULL)) { + GST_WARNING_OBJECT (core_audio, "Failed to parse channel layout"); + channel_mask = 0; + } + + /* If available, start with the preferred caps. */ + if (got_outer_asbd) + caps = gst_core_audio_asbd_to_caps (&outer_asbd, layout); + + g_free (layout); + } else if (got_outer_asbd) { + channels = outer_asbd.mChannelsPerFrame; + channel_mask = 0; + /* If available, start with the preferred caps */ + caps = gst_core_audio_asbd_to_caps (&outer_asbd, NULL); + } else { + GST_ERROR_OBJECT (core_audio, + "Unable to get any information about hardware"); + return NULL; + } + + /* Append the allowed subset based on the template caps */ + if (!caps) + caps = gst_caps_new_empty (); + for (i = 0; i < gst_caps_get_size (in_caps); i++) { + GstStructure *in_s; + + in_s = gst_caps_get_structure (in_caps, i); + + if (gst_structure_has_name (in_s, "audio/x-ac3") || + gst_structure_has_name (in_s, "audio/x-dts")) { + if (spdif_allowed) { + gst_caps_append_structure (caps, gst_structure_copy (in_s)); + } + } else { + GstStructure *out_s; + + out_s = gst_structure_copy (in_s); + gst_structure_set (out_s, "channels", G_TYPE_INT, channels, NULL); + if (channel_mask != 0) { + /* positioned layout */ + gst_structure_set (out_s, + "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL); + } else { + /* unpositioned layout */ + gst_structure_remove_field (out_s, "channel-mask"); + } + +#ifndef HAVE_IOS + if (core_audio->is_src && got_outer_asbd + && outer_asbd.mSampleRate != kAudioStreamAnyRate) { + /* According to Core Audio engineer, AUHAL does not support sample rate conversion. + * on sources. Therefore, we fixate the sample rate. + * + * "You definitely cannot do rate conversion as part of getting input from AUHAL. + * That's the most common cause of those "cannot do in current context" errors." + * http://lists.apple.com/archives/coreaudio-api/2006/Sep/msg00088.html + */ + gst_structure_set (out_s, "rate", G_TYPE_INT, + (gint) outer_asbd.mSampleRate, NULL); + } +#endif + + /* Special cases for upmixing and downmixing. + * Other than that, the AUs don't upmix or downmix multi-channel audio, + * e.g. if you push 5.1-surround audio to a stereo configuration, + * the left and right channels will be played accordingly, + * and the rest will be dropped. */ + + if (channels == 1 || (channels == 2 && + (channel_mask == 0 || channel_mask == STEREO_CHANNEL_MASK))) { + + /* If have stereo channels, then also offer mono since CoreAudio + * upmixes it. If mono, then also offer stereo since CoreAudio + * downmixes to it */ + + gst_structure_set (out_s, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL); + + if (channels == 1) + gst_structure_set (out_s, "channel-mask", GST_TYPE_BITMASK, + STEREO_CHANNEL_MASK, NULL); + } + + gst_caps_append_structure (caps, out_s); + } + } + + return caps; +} diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudiocommon.c gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudiocommon.c --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudiocommon.c 2014-09-19 06:37:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudiocommon.c 2015-10-22 08:02:54.000000000 +0000 @@ -150,18 +150,22 @@ } AudioBufferList * -buffer_list_alloc (int channels, int size) +buffer_list_alloc (UInt32 channels, UInt32 size, gboolean interleaved) { AudioBufferList *list; - int total_size; - int n; + gsize list_size; + UInt32 num_buffers, n; - total_size = sizeof (AudioBufferList) + 1 * sizeof (AudioBuffer); - list = (AudioBufferList *) g_malloc (total_size); - - list->mNumberBuffers = 1; - for (n = 0; n < (int) list->mNumberBuffers; ++n) { - list->mBuffers[n].mNumberChannels = channels; + num_buffers = interleaved ? 1 : channels; + /* AudioBufferList member mBuffers is variable-length array */ + list_size = G_STRUCT_OFFSET (AudioBufferList, mBuffers[num_buffers]); + list = (AudioBufferList *) g_malloc (list_size); + + list->mNumberBuffers = num_buffers; + for (n = 0; n < num_buffers; ++n) { + /* See http://lists.apple.com/archives/coreaudio-api/2015/Feb/msg00027.html */ + list->mBuffers[n].mNumberChannels = interleaved ? channels : 1; + /* AudioUnitRender will keep overwriting mDataByteSize */ list->mBuffers[n].mDataByteSize = size; list->mBuffers[n].mData = g_malloc (size); } @@ -172,11 +176,13 @@ void buffer_list_free (AudioBufferList * list) { - int n; + UInt32 n; + + if (list == NULL) + return; - for (n = 0; n < (int) list->mNumberBuffers; ++n) { - if (list->mBuffers[n].mData) - g_free (list->mBuffers[n].mData); + for (n = 0; n < list->mNumberBuffers; ++n) { + g_free (list->mBuffers[n].mData); } g_free (list); @@ -208,39 +214,67 @@ return FALSE; } +static gboolean +_core_audio_set_property (GstCoreAudio * core_audio, AudioUnitPropertyID inID, + void *inData, UInt32 inDataSize) +{ + OSStatus status; + AudioUnitScope scope; + AudioUnitElement element; + + scope = CORE_AUDIO_INNER_SCOPE (core_audio); + element = CORE_AUDIO_ELEMENT (core_audio); + + status = + AudioUnitSetProperty (core_audio->audiounit, inID, scope, element, inData, + inDataSize); + + if (status != noErr) { + GST_WARNING_OBJECT (core_audio->osxbuf, + "Failed to set Audio Unit property: %d", (int) status); + return FALSE;; + } + + return TRUE; +} + +/* The AudioUnit must be uninitialized before calling this */ gboolean -gst_core_audio_set_channels_layout (GstCoreAudio * core_audio, +gst_core_audio_set_channel_layout (GstCoreAudio * core_audio, gint channels, GstCaps * caps) { - /* Configure the output stream and allocate ringbuffer memory */ AudioChannelLayout *layout = NULL; - OSStatus status; - int layoutSize, element, i; - AudioUnitScope scope; + gboolean ret; + gsize layoutSize; + gint i; GstStructure *structure; - GstAudioChannelPosition *positions = NULL; + GstAudioChannelPosition positions[GST_OSX_AUDIO_MAX_CHANNEL]; guint64 channel_mask; - /* Describe channels */ - layoutSize = sizeof (AudioChannelLayout) + - channels * sizeof (AudioChannelDescription); - layout = g_malloc (layoutSize); + g_return_val_if_fail (channels <= GST_OSX_AUDIO_MAX_CHANNEL, FALSE); + /* Determine the channel positions */ structure = gst_caps_get_structure (caps, 0); - if (gst_structure_get (structure, "channel-mask", GST_TYPE_BITMASK, - &channel_mask, NULL)) { - positions = g_new (GstAudioChannelPosition, channels); + channel_mask = 0; + gst_structure_get (structure, "channel-mask", GST_TYPE_BITMASK, &channel_mask, + NULL); + + if (channel_mask != 0) gst_audio_channel_positions_from_mask (channels, channel_mask, positions); - } + /* AudioChannelLayout member mChannelDescriptions is variable-length array */ + layoutSize = + G_STRUCT_OFFSET (AudioChannelLayout, mChannelDescriptions[channels]); + layout = g_malloc (layoutSize); + + /* Fill out the AudioChannelLayout */ layout->mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelDescriptions; layout->mChannelBitmap = 0; /* Not used */ layout->mNumberChannelDescriptions = channels; for (i = 0; i < channels; i++) { - if (positions) { + if (channel_mask != 0) { layout->mChannelDescriptions[i].mChannelLabel = - gst_audio_channel_position_to_coreaudio_channel_label (positions[i], - i); + gst_audio_channel_position_to_core_audio (positions[i], i); } else { /* Discrete channel numbers are ORed into this */ layout->mChannelDescriptions[i].mChannelLabel = @@ -248,61 +282,31 @@ } /* Others unused */ - layout->mChannelDescriptions[i].mChannelFlags = 0; + layout->mChannelDescriptions[i].mChannelFlags = kAudioChannelFlags_AllOff; layout->mChannelDescriptions[i].mCoordinates[0] = 0.f; layout->mChannelDescriptions[i].mCoordinates[1] = 0.f; layout->mChannelDescriptions[i].mCoordinates[2] = 0.f; } - if (positions) { - g_free (positions); - positions = NULL; - } - - scope = core_audio->is_src ? kAudioUnitScope_Output : kAudioUnitScope_Input; - element = core_audio->is_src ? 1 : 0; - - if (layoutSize) { - status = AudioUnitSetProperty (core_audio->audiounit, - kAudioUnitProperty_AudioChannelLayout, - scope, element, layout, layoutSize); - if (status) { - GST_WARNING_OBJECT (core_audio->osxbuf, - "Failed to set output channel layout: %d", (int) status); - return FALSE; - } - } + /* Sets GStreamer-ordered channel layout on the inner scope. + * Reordering between the inner scope and outer scope is handled + * by the Audio Unit itself. */ + ret = _core_audio_set_property (core_audio, + kAudioUnitProperty_AudioChannelLayout, layout, layoutSize); g_free (layout); - return TRUE; + return ret; } +/* The AudioUnit must be uninitialized before calling this */ gboolean gst_core_audio_set_format (GstCoreAudio * core_audio, AudioStreamBasicDescription format) { - /* Configure the output stream and allocate ringbuffer memory */ - OSStatus status; - UInt32 propertySize; - int element; - AudioUnitScope scope; - GST_DEBUG_OBJECT (core_audio->osxbuf, "Setting format for AudioUnit"); - scope = core_audio->is_src ? kAudioUnitScope_Output : kAudioUnitScope_Input; - element = core_audio->is_src ? 1 : 0; - - propertySize = sizeof (AudioStreamBasicDescription); - status = AudioUnitSetProperty (core_audio->audiounit, - kAudioUnitProperty_StreamFormat, scope, element, &format, propertySize); - - if (status) { - GST_WARNING_OBJECT (core_audio->osxbuf, - "Failed to set audio description: %d", (int) status); - return FALSE;; - } - - return TRUE; + return _core_audio_set_property (core_audio, kAudioUnitProperty_StreamFormat, + &format, sizeof (AudioStreamBasicDescription)); } gboolean @@ -370,14 +374,10 @@ } AudioChannelLabel -gst_audio_channel_position_to_coreaudio_channel_label (GstAudioChannelPosition +gst_audio_channel_position_to_core_audio (GstAudioChannelPosition position, int channel) { switch (position) { - case GST_AUDIO_CHANNEL_POSITION_NONE: - return kAudioChannelLabel_Discrete_0 | channel; - case GST_AUDIO_CHANNEL_POSITION_MONO: - return kAudioChannelLabel_Mono; case GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT: return kAudioChannelLabel_Left; case GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT: @@ -392,19 +392,141 @@ return kAudioChannelLabel_LFEScreen; case GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER: return kAudioChannelLabel_Center; - case GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER: - return kAudioChannelLabel_Center; // ??? - case GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: - return kAudioChannelLabel_Center; // ??? case GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT: return kAudioChannelLabel_LeftSurroundDirect; case GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT: return kAudioChannelLabel_RightSurroundDirect; + case GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER: + return kAudioChannelLabel_LeftCenter; + case GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: + return kAudioChannelLabel_RightCenter; + case GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT: + return kAudioChannelLabel_TopBackLeft; + case GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER: + return kAudioChannelLabel_TopBackCenter; + case GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT: + return kAudioChannelLabel_TopBackRight; + case GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT: + return kAudioChannelLabel_LeftWide; + case GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT: + return kAudioChannelLabel_RightWide; + case GST_AUDIO_CHANNEL_POSITION_LFE2: + return kAudioChannelLabel_LFE2; + case GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT: + return kAudioChannelLabel_VerticalHeightLeft; + case GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT: + return kAudioChannelLabel_VerticalHeightRight; + case GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER: + return kAudioChannelLabel_VerticalHeightCenter; + + /* Special position values */ + case GST_AUDIO_CHANNEL_POSITION_NONE: + return kAudioChannelLabel_Discrete_0 | channel; + case GST_AUDIO_CHANNEL_POSITION_MONO: + return kAudioChannelLabel_Mono; + + /* Following positions are unmapped -- + * i.e. mapped to kAudioChannelLabel_Unknown: */ + case GST_AUDIO_CHANNEL_POSITION_TOP_CENTER: + case GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT: + case GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT: + case GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER: + case GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT: + case GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT: + case GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT: + case GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT: default: return kAudioChannelLabel_Unknown; } } +/* Performs a best-effort conversion. 'channel' is used for warnings only. */ +GstAudioChannelPosition +gst_core_audio_channel_label_to_gst (AudioChannelLabel label, + int channel, gboolean warn) +{ + switch (label) { + case kAudioChannelLabel_Left: + return GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT; + case kAudioChannelLabel_Right: + return GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT; + case kAudioChannelLabel_Center: + return GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER; + case kAudioChannelLabel_LFEScreen: + return GST_AUDIO_CHANNEL_POSITION_LFE1; + case kAudioChannelLabel_LeftSurround: + return GST_AUDIO_CHANNEL_POSITION_REAR_LEFT; + case kAudioChannelLabel_RightSurround: + return GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT; + case kAudioChannelLabel_LeftSurroundDirect: + return GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT; + case kAudioChannelLabel_RightSurroundDirect: + return GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT; + case kAudioChannelLabel_CenterSurround: + return GST_AUDIO_CHANNEL_POSITION_REAR_CENTER; + case kAudioChannelLabel_LeftCenter: + return GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER; + case kAudioChannelLabel_RightCenter: + return GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER; + case kAudioChannelLabel_TopBackLeft: + return GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT; + case kAudioChannelLabel_TopBackCenter: + return GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER; + case kAudioChannelLabel_TopBackRight: + return GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT; + case kAudioChannelLabel_LeftWide: + return GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT; + case kAudioChannelLabel_RightWide: + return GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT; + case kAudioChannelLabel_LFE2: + return GST_AUDIO_CHANNEL_POSITION_LFE2; + case kAudioChannelLabel_VerticalHeightLeft: + return GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT; + case kAudioChannelLabel_VerticalHeightRight: + return GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT; + case kAudioChannelLabel_VerticalHeightCenter: + return GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER; + + /* Special position values */ + + case kAudioChannelLabel_Mono: + /* GST_AUDIO_CHANNEL_POSITION_MONO is only for 1-channel layouts */ + return GST_AUDIO_CHANNEL_POSITION_INVALID; + case kAudioChannelLabel_Discrete: + return GST_AUDIO_CHANNEL_POSITION_NONE; + + /* + Following labels are unmapped -- + i.e. mapped to GST_AUDIO_CHANNEL_POSITION_INVALID: + */ + case kAudioChannelLabel_RearSurroundLeft: + case kAudioChannelLabel_RearSurroundRight: + case kAudioChannelLabel_TopCenterSurround: + case kAudioChannelLabel_LeftTotal: + case kAudioChannelLabel_RightTotal: + case kAudioChannelLabel_HearingImpaired: + case kAudioChannelLabel_Narration: + case kAudioChannelLabel_DialogCentricMix: + case kAudioChannelLabel_CenterSurroundDirect: + case kAudioChannelLabel_Haptic: + default: + if (label >> 16 != 0) { /* kAudioChannelLabel_Discrete_N */ + /* no way to store discrete channel order */ + if (warn) + GST_WARNING + ("Core Audio channel %u labeled kAudioChannelLabel_Discrete_%u -- discrete order will be lost", + channel, ((unsigned int) label) & 0xFFFF); + return GST_AUDIO_CHANNEL_POSITION_NONE; + } else { + if (warn) + GST_WARNING + ("Core Audio channel %u has unsupported label %d and will be skipped", + channel, (int) label); + return GST_AUDIO_CHANNEL_POSITION_INVALID; + } + } +} + void gst_core_audio_dump_channel_layout (AudioChannelLayout * channel_layout) { diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudiocommon.h gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudiocommon.h --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudiocommon.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudiocommon.h 2015-10-22 08:02:54.000000000 +0000 @@ -40,14 +40,14 @@ gboolean gst_core_audio_io_proc_stop (GstCoreAudio * core_audio); -AudioBufferList * buffer_list_alloc (int channels, int size); +AudioBufferList * buffer_list_alloc (UInt32 channels, UInt32 size, gboolean interleaved); void buffer_list_free (AudioBufferList * list); gboolean gst_core_audio_set_format (GstCoreAudio * core_audio, AudioStreamBasicDescription format); -gboolean gst_core_audio_set_channels_layout (GstCoreAudio * core_audio, +gboolean gst_core_audio_set_channel_layout (GstCoreAudio * core_audio, gint channels, GstCaps * caps); gboolean gst_core_audio_open_device (GstCoreAudio *core_audio, @@ -61,5 +61,6 @@ unsigned int inNumberFrames, AudioBufferList * ioData); -AudioChannelLabel gst_audio_channel_position_to_coreaudio_channel_label (GstAudioChannelPosition position, int channel); +AudioChannelLabel gst_audio_channel_position_to_core_audio (GstAudioChannelPosition position, int channel); +GstAudioChannelPosition gst_core_audio_channel_label_to_gst (AudioChannelLabel label, int channel, gboolean warn); diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudio.h gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudio.h --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudio.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudio.h 2015-10-22 08:02:54.000000000 +0000 @@ -27,6 +27,7 @@ #endif #include +#include #ifdef HAVE_IOS #include #define AudioDeviceID gint @@ -62,10 +63,17 @@ #define GST_IS_CORE_AUDIO_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CORE_AUDIO)) +/* TODO: Consider raising to 64 */ +#define GST_OSX_AUDIO_MAX_CHANNEL (9) + #define CORE_AUDIO_FORMAT_IS_SPDIF(f) ((f).mFormat.mFormatID == 'IAC3' || (f).mFormat.mFormatID == 'iac3' || (f).mFormat.mFormatID == kAudioFormat60958AC3 || (f).mFormat.mFormatID == kAudioFormatAC3) #define CORE_AUDIO_FORMAT "FormatID: %" GST_FOURCC_FORMAT " rate: %f flags: 0x%x BytesPerPacket: %u FramesPerPacket: %u BytesPerFrame: %u ChannelsPerFrame: %u BitsPerChannel: %u" -#define CORE_AUDIO_FORMAT_ARGS(f) GST_FOURCC_ARGS((f).mFormatID),(f).mSampleRate,(unsigned)(f).mFormatFlags,(unsigned)(f).mBytesPerPacket,(unsigned)(f).mFramesPerPacket,(unsigned)(f).mBytesPerFrame,(unsigned)(f).mChannelsPerFrame,(unsigned)(f).mBitsPerChannel +#define CORE_AUDIO_FORMAT_ARGS(f) GST_FOURCC_ARGS((unsigned int)(f).mFormatID),(f).mSampleRate,(unsigned int)(f).mFormatFlags,(unsigned int)(f).mBytesPerPacket,(unsigned int)(f).mFramesPerPacket,(unsigned int)(f).mBytesPerFrame,(unsigned int)(f).mChannelsPerFrame,(unsigned int)(f).mBitsPerChannel + +#define CORE_AUDIO_INNER_SCOPE(core_audio) ((core_audio)->is_src ? kAudioUnitScope_Output : kAudioUnitScope_Input) +#define CORE_AUDIO_OUTER_SCOPE(core_audio) ((core_audio)->is_src ? kAudioUnitScope_Input : kAudioUnitScope_Output) +#define CORE_AUDIO_ELEMENT(core_audio) ((core_audio)->is_src ? 1 : 0) typedef struct _GstCoreAudio GstCoreAudio; typedef struct _GstCoreAudioClass GstCoreAudioClass; @@ -80,13 +88,15 @@ gboolean is_src; gboolean is_passthrough; AudioDeviceID device_id; - AudioStreamBasicDescription stream_format; + gboolean cached_caps_valid; /* thread-safe flag */ + GstCaps *cached_caps; gint stream_idx; gboolean io_proc_active; gboolean io_proc_needs_deactivation; /* For LPCM in/out */ AudioUnit audiounit; + UInt32 recBufferSize; /* AudioUnitRender clobbers mDataByteSize */ AudioBufferList *recBufferList; #ifndef HAVE_IOS @@ -95,7 +105,7 @@ gboolean disabled_mixing; AudioStreamID stream_id; gboolean revert_format; - AudioStreamBasicDescription original_format; + AudioStreamBasicDescription original_format, stream_format; AudioDeviceIOProcID procID; #endif }; @@ -120,7 +130,7 @@ GstCaps *caps, gboolean is_passthrough); -void gst_core_audio_unitialize (GstCoreAudio *core_audio); +void gst_core_audio_uninitialize (GstCoreAudio *core_audio); gboolean gst_core_audio_start_processing (GstCoreAudio *core_audio); @@ -139,12 +149,18 @@ gboolean gst_core_audio_audio_device_is_spdif_avail (AudioDeviceID device_id); -gboolean gst_core_audio_select_device (AudioDeviceID *device_id); +gboolean gst_core_audio_select_device (GstCoreAudio * core_audio); -gboolean gst_core_audio_select_source_device (AudioDeviceID *device_id); +GstCaps * +gst_core_audio_probe_caps (GstCoreAudio * core_audio, GstCaps * in_caps); -AudioChannelLayout * gst_core_audio_audio_device_get_channel_layout (AudioDeviceID device_id); +AudioChannelLayout * +gst_core_audio_get_channel_layout (GstCoreAudio * core_audio, gboolean outer); +gboolean gst_core_audio_parse_channel_layout (AudioChannelLayout * layout, + guint * channels, guint64 * channel_mask, GstAudioChannelPosition * pos); +GstCaps * gst_core_audio_asbd_to_caps (AudioStreamBasicDescription * asbd, + AudioChannelLayout * layout); G_END_DECLS diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudiohal.c gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudiohal.c --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudiohal.c 2014-09-19 06:37:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudiohal.c 2015-10-22 08:02:54.000000000 +0000 @@ -49,15 +49,19 @@ } static inline AudioDeviceID -_audio_system_get_default_output (void) +_audio_system_get_default_device (gboolean output) { OSStatus status = noErr; UInt32 propertySize = sizeof (AudioDeviceID); AudioDeviceID device_id = kAudioDeviceUnknown; + AudioObjectPropertySelector prop_selector; + + prop_selector = output ? kAudioHardwarePropertyDefaultOutputDevice : + kAudioHardwarePropertyDefaultInputDevice; AudioObjectPropertyAddress defaultDeviceAddress = { - kAudioHardwarePropertyDefaultOutputDevice, - kAudioDevicePropertyScopeOutput, + prop_selector, + kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; @@ -67,6 +71,8 @@ GST_ERROR ("failed getting default output device: %d", (int) status); } + GST_DEBUG ("Default device id: %u", (unsigned) device_id); + return device_id; } @@ -79,7 +85,7 @@ AudioObjectPropertyAddress audioDevicesAddress = { kAudioHardwarePropertyDevices, - kAudioDevicePropertyScopeOutput, + kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; @@ -107,15 +113,19 @@ } static inline gboolean -_audio_device_is_alive (AudioDeviceID device_id) +_audio_device_is_alive (AudioDeviceID device_id, gboolean output) { OSStatus status = noErr; int alive = FALSE; UInt32 propertySize = sizeof (alive); + AudioObjectPropertyScope prop_scope; + + prop_scope = output ? kAudioDevicePropertyScopeOutput : + kAudioDevicePropertyScopeInput; AudioObjectPropertyAddress audioDeviceAliveAddress = { kAudioDevicePropertyDeviceIsAlive, - kAudioDevicePropertyScopeOutput, + prop_scope, kAudioObjectPropertyElementMaster }; @@ -249,15 +259,19 @@ } static inline gchar * -_audio_device_get_name (AudioDeviceID device_id) +_audio_device_get_name (AudioDeviceID device_id, gboolean output) { OSStatus status = noErr; UInt32 propertySize = 0; gchar *device_name = NULL; + AudioObjectPropertyScope prop_scope; + + prop_scope = output ? kAudioDevicePropertyScopeOutput : + kAudioDevicePropertyScopeInput; AudioObjectPropertyAddress deviceNameAddress = { kAudioDevicePropertyDeviceName, - kAudioDevicePropertyScopeOutput, + prop_scope, kAudioObjectPropertyElementMaster }; @@ -305,16 +319,22 @@ return TRUE; } -AudioChannelLayout * -gst_core_audio_audio_device_get_channel_layout (AudioDeviceID device_id) +#ifdef GST_CORE_AUDIO_DEBUG +static AudioChannelLayout * +gst_core_audio_audio_device_get_channel_layout (AudioDeviceID device_id, + gboolean output) { OSStatus status = noErr; UInt32 propertySize = 0; AudioChannelLayout *layout = NULL; + AudioObjectPropertyScope prop_scope; + + prop_scope = output ? kAudioDevicePropertyScopeOutput : + kAudioDevicePropertyScopeInput; AudioObjectPropertyAddress channelLayoutAddress = { kAudioDevicePropertyPreferredChannelLayout, - kAudioDevicePropertyScopeOutput, + prop_scope, kAudioObjectPropertyElementMaster }; @@ -322,7 +342,7 @@ status = AudioObjectGetPropertyDataSize (device_id, &channelLayoutAddress, 0, NULL, &propertySize); if (status != noErr) { - GST_ERROR ("failed to get prefered layout: %d", (int) status); + GST_ERROR ("failed to get preferred layout: %d", (int) status); goto beach; } @@ -331,7 +351,7 @@ status = AudioObjectGetPropertyData (device_id, &channelLayoutAddress, 0, NULL, &propertySize, layout); if (status != noErr) { - GST_ERROR ("failed to get prefered layout: %d", (int) status); + GST_ERROR ("failed to get preferred layout: %d", (int) status); goto failed; } @@ -365,6 +385,7 @@ g_free (layout); return NULL; } +#endif static inline AudioStreamID * _audio_device_get_streams (AudioDeviceID device_id, gint * nstreams) @@ -988,6 +1009,8 @@ static gboolean gst_core_audio_open_impl (GstCoreAudio * core_audio) { + gboolean ret; + /* The following is needed to instruct HAL to create their own * thread to handle the notifications. */ _audio_system_set_runloop (NULL); @@ -1002,8 +1025,21 @@ * we will do input with it. * http://developer.apple.com/technotes/tn2002/tn2091.html */ - return gst_core_audio_open_device (core_audio, kAudioUnitSubType_HALOutput, + ret = gst_core_audio_open_device (core_audio, kAudioUnitSubType_HALOutput, "HALOutput"); + if (!ret) { + GST_DEBUG ("Could not open device"); + goto done; + } + + ret = gst_core_audio_bind_device (core_audio); + if (!ret) { + GST_DEBUG ("Could not bind device"); + goto done; + } + +done: + return ret; } static gboolean @@ -1087,6 +1123,15 @@ gboolean is_passthrough, guint32 * frame_size) { gboolean ret = FALSE; + OSStatus status; + + /* Uninitialize the AudioUnit before changing formats */ + status = AudioUnitUninitialize (core_audio->audiounit); + if (status) { + GST_ERROR_OBJECT (core_audio, "Failed to uninitialize AudioUnit: %d", + (int) status); + return FALSE; + } core_audio->is_passthrough = is_passthrough; if (is_passthrough) { @@ -1101,13 +1146,10 @@ if (!gst_core_audio_set_format (core_audio, format)) goto done; - if (!gst_core_audio_set_channels_layout (core_audio, + if (!gst_core_audio_set_channel_layout (core_audio, format.mChannelsPerFrame, caps)) goto done; - if (!gst_core_audio_bind_device (core_audio)) - goto done; - if (core_audio->is_src) { propertySize = sizeof (*frame_size); status = AudioUnitGetProperty (core_audio->audiounit, kAudioDevicePropertyBufferFrameSize, kAudioUnitScope_Global, 0, /* N/A for global */ @@ -1124,20 +1166,33 @@ ret = TRUE; done: + /* Format changed, initialise the AudioUnit again */ + status = AudioUnitInitialize (core_audio->audiounit); + if (status) { + GST_ERROR_OBJECT (core_audio, "Failed to initialize AudioUnit: %d", + (int) status); + ret = FALSE; + } + if (ret) { GST_DEBUG_OBJECT (core_audio, "osxbuf ring buffer acquired"); } + return ret; } static gboolean -gst_core_audio_select_device_impl (AudioDeviceID * device_id) +gst_core_audio_select_device_impl (GstCoreAudio * core_audio) { AudioDeviceID *devices = NULL; + AudioDeviceID device_id = core_audio->device_id; AudioDeviceID default_device_id = 0; - AudioChannelLayout *channel_layout; gint i, ndevices = 0; + gboolean output = !core_audio->is_src; gboolean res = FALSE; +#ifdef GST_CORE_AUDIO_DEBUG + AudioChannelLayout *channel_layout; +#endif devices = _audio_system_get_devices (&ndevices); @@ -1148,10 +1203,11 @@ GST_DEBUG ("found %d audio device(s)", ndevices); +#ifdef GST_CORE_AUDIO_DEBUG for (i = 0; i < ndevices; i++) { gchar *device_name; - if ((device_name = _audio_device_get_name (devices[i]))) { + if ((device_name = _audio_device_get_name (devices[i], output))) { if (!_audio_device_has_output (devices[i])) { GST_DEBUG ("Input Device ID: %u Name: %s", (unsigned) devices[i], device_name); @@ -1160,7 +1216,7 @@ (unsigned) devices[i], device_name); channel_layout = - gst_core_audio_audio_device_get_channel_layout (devices[i]); + gst_core_audio_audio_device_get_channel_layout (devices[i], output); if (channel_layout) { gst_core_audio_dump_channel_layout (channel_layout); g_free (channel_layout); @@ -1170,31 +1226,38 @@ g_free (device_name); } } +#endif /* Find the ID of the default output device */ - default_device_id = _audio_system_get_default_output (); + default_device_id = _audio_system_get_default_device (output); /* Here we decide if selected device is valid or autoselect * the default one when required */ - if (*device_id == kAudioDeviceUnknown) { + if (device_id == kAudioDeviceUnknown) { if (default_device_id != kAudioDeviceUnknown) { - *device_id = default_device_id; + device_id = default_device_id; res = TRUE; + } else { + /* No device of required type available */ + res = FALSE; } } else { for (i = 0; i < ndevices; i++) { - if (*device_id == devices[i]) { + if (device_id == devices[i]) { res = TRUE; } } - if (res && !_audio_device_is_alive (*device_id)) { + if (res && !_audio_device_is_alive (device_id, output)) { GST_ERROR ("Requested device not usable"); res = FALSE; goto done; } } + if (res) + core_audio->device_id = device_id; + done: g_free (devices); return res; @@ -1221,34 +1284,3 @@ return res; } - -static gboolean -gst_core_audio_select_source_device_impl (AudioDeviceID * device_id) -{ - OSStatus status; - UInt32 propertySize; - - if (*device_id == kAudioDeviceUnknown) { - /* If no specific device has been selected by the user, then pick the - * default device */ - GST_DEBUG ("Selecting device for OSXAudioSrc"); - propertySize = sizeof (*device_id); - status = AudioHardwareGetProperty (kAudioHardwarePropertyDefaultInputDevice, - &propertySize, device_id); - - if (status) { - GST_WARNING ("AudioHardwareGetProperty returned %d", (int) status); - } else { - GST_DEBUG ("AudioHardwareGetProperty returned 0"); - } - - if (*device_id == kAudioDeviceUnknown) { - GST_WARNING ("AudioHardwareGetProperty: device_id is " - "kAudioDeviceUnknown"); - } - - GST_DEBUG ("AudioHardwareGetProperty: device_id is %lu", (long) *device_id); - } - - return TRUE; -} diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudioremoteio.c gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudioremoteio.c --- gst-plugins-good1.0-1.4.3/sys/osxaudio/gstosxcoreaudioremoteio.c 2014-09-19 06:37:01.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/gstosxcoreaudioremoteio.c 2015-10-22 08:02:54.000000000 +0000 @@ -64,7 +64,7 @@ gdouble rate, guint * samples, gdouble * latency) { OSStatus status; - UInt32 size; + UInt32 size = sizeof (double); status = AudioUnitGetProperty (core_audio->audiounit, kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0, /* N/A for global */ latency, &size); @@ -84,10 +84,22 @@ AudioStreamBasicDescription format, GstCaps * caps, gboolean is_passthrough, guint32 * frame_size) { + gboolean ret = FALSE; + OSStatus status; + + /* Uninitialize the AudioUnit before changing formats */ + status = AudioUnitUninitialize (core_audio->audiounit); + if (status) { + GST_ERROR_OBJECT (core_audio, "Failed to uninitialize AudioUnit: %d", + (int) status); + return FALSE; + } + core_audio->is_passthrough = is_passthrough; core_audio->stream_idx = 0; + if (!gst_core_audio_set_format (core_audio, format)) - return FALSE; + goto done; /* FIXME: Use kAudioSessionProperty_CurrentHardwareSampleRate and * kAudioSessionProperty_CurrentHardwareIOBufferDuration with property @@ -96,25 +108,24 @@ *frame_size = 4196; GST_DEBUG_OBJECT (core_audio, "osxbuf ring buffer acquired"); - return TRUE; -} + ret = TRUE; -AudioChannelLayout * -gst_core_audio_audio_device_get_channel_layout (AudioDeviceID device_id) -{ - return NULL; -} +done: + /* Format changed, initialise the AudioUnit again */ + status = AudioUnitInitialize (core_audio->audiounit); + if (status) { + GST_ERROR_OBJECT (core_audio, "Failed to initialize AudioUnit: %d", + (int) status); + ret = FALSE; + } -static gboolean -gst_core_audio_select_device_impl (AudioDeviceID * device_id) -{ - /* No device selection in iOS */ - return TRUE; + return ret; } static gboolean -gst_core_audio_select_source_device_impl (AudioDeviceID * device_id) +gst_core_audio_select_device_impl (GstCoreAudio * core_audio) { + /* No device selection in iOS */ return TRUE; } diff -Nru gst-plugins-good1.0-1.4.3/sys/osxaudio/Makefile.in gst-plugins-good1.0-1.6.1/sys/osxaudio/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/osxaudio/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxaudio/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,8 +92,6 @@ target_triplet = @target@ @HAVE_IOS_FALSE@am__append_1 = -Wl,-framework,AudioUnit -Wl,-framework,CoreServices subdir = sys/osxaudio -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 \ @@ -105,7 +113,6 @@ $(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 \ @@ -120,6 +127,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -234,6 +243,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -366,9 +376,6 @@ 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@ @@ -486,17 +493,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -549,6 +556,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -608,7 +616,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/osxaudio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/osxaudio/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -965,6 +972,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/osxvideo/cocoawindow.h gst-plugins-good1.0-1.6.1/sys/osxvideo/cocoawindow.h --- gst-plugins-good1.0-1.4.3/sys/osxvideo/cocoawindow.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxvideo/cocoawindow.h 2015-10-22 08:02:54.000000000 +0000 @@ -70,7 +70,9 @@ - (void) addToSuperview: (NSView *)superview; - (void) removeFromSuperview: (id)unused; - (void) setNavigation: (GstNavigation *) nav; +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION - (void) setMainThread: (NSThread *) thread; +#endif @end diff -Nru gst-plugins-good1.0-1.4.3/sys/osxvideo/cocoawindow.m gst-plugins-good1.0-1.6.1/sys/osxvideo/cocoawindow.m --- gst-plugins-good1.0-1.4.3/sys/osxvideo/cocoawindow.m 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxvideo/cocoawindow.m 2015-10-22 08:02:54.000000000 +0000 @@ -336,7 +336,9 @@ NSOpenGLPFAColorSize, 24, NSOpenGLPFAAlphaSize, 8, NSOpenGLPFADepthSize, 24, +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090 NSOpenGLPFAWindow, +#endif 0 }; @@ -573,7 +575,9 @@ NSOpenGLPFAColorSize, 24, NSOpenGLPFAAlphaSize, 8, NSOpenGLPFADepthSize, 24, +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 NSOpenGLPFAFullScreen, +#endif NSOpenGLPFAScreenMask, CGDisplayIDToOpenGLDisplayMask (kCGDirectMainDisplay), 0 @@ -602,7 +606,9 @@ GST_WARNING ("CGCaptureAllDisplays() failed"); return; } +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 [fullScreenContext setFullScreen]; +#endif [fullScreenContext makeCurrentContext]; fullscreen = YES; @@ -648,9 +654,11 @@ [self reshape]; } +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION - (void) setMainThread: (NSThread *) thread { mainThread = thread; } +#endif - (void) haveSuperviewReal:(NSMutableArray *)closure { BOOL haveSuperview = [self superview] != nil; diff -Nru gst-plugins-good1.0-1.4.3/sys/osxvideo/Makefile.in gst-plugins-good1.0-1.6.1/sys/osxvideo/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/osxvideo/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxvideo/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = sys/osxvideo -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -588,7 +596,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/osxvideo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/osxvideo/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -905,6 +912,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/osxvideo/osxvideosink.h gst-plugins-good1.0-1.6.1/sys/osxvideo/osxvideosink.h --- gst-plugins-good1.0-1.4.3/sys/osxvideo/osxvideosink.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxvideo/osxvideosink.h 2015-10-22 08:02:54.000000000 +0000 @@ -130,8 +130,10 @@ -(void) showFrame: (GstBufferObject*) buf; -(void) setView: (NSView*) view; + (BOOL) isMainThread; +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION -(void) nsAppThread; -(void) checkMainRunLoop; +#endif @end G_END_DECLS diff -Nru gst-plugins-good1.0-1.4.3/sys/osxvideo/osxvideosink.m gst-plugins-good1.0-1.6.1/sys/osxvideo/osxvideosink.m --- gst-plugins-good1.0-1.4.3/sys/osxvideo/osxvideosink.m 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/osxvideo/osxvideosink.m 2015-10-22 08:02:54.000000000 +0000 @@ -43,11 +43,11 @@ GST_DEBUG_CATEGORY (gst_debug_osx_video_sink); #define GST_CAT_DEFAULT gst_debug_osx_video_sink +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION #include extern void _CFRunLoopSetCurrent (CFRunLoopRef rl); extern pthread_t _CFMainPThread; - - +#endif static GstStaticPadTemplate gst_osx_video_sink_sink_template_factory = GST_STATIC_PAD_TEMPLATE ("sink", @@ -72,9 +72,13 @@ }; static void gst_osx_video_sink_osxwindow_destroy (GstOSXVideoSink * osxvideosink); + +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION static GMutex _run_loop_check_mutex; static GMutex _run_loop_mutex; static GCond _run_loop_cond; +#endif + static GstOSXVideoSinkClass *sink_class = NULL; static GstVideoSinkClass *parent_class = NULL; @@ -98,6 +102,7 @@ [pool release]; } +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION /* Poll for cocoa events */ static void run_ns_app_loop (void) { @@ -215,6 +220,7 @@ gst_osx_video_sink_stop_cocoa_loop (GstOSXVideoSink * osxvideosink) { } +#endif /* This function handles osx window creation */ static gboolean @@ -245,9 +251,10 @@ rect.size.height = (float) osxwindow->height; osxwindow->gstview =[[GstGLView alloc] initWithFrame:rect]; - +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION gst_osx_video_sink_run_cocoa_loop (osxvideosink); [osxwindow->gstview setMainThread:sink_class->ns_app_thread]; +#endif if (osxvideosink->superview == NULL) { GST_INFO_OBJECT (osxvideosink, "emitting prepare-xwindow-id"); @@ -290,7 +297,9 @@ osxvideosink->osxvideosinkobject, @selector(destroy), (id) nil, YES); GST_OBJECT_UNLOCK (osxvideosink); +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION gst_osx_video_sink_stop_cocoa_loop (osxvideosink); +#endif [pool release]; } @@ -587,7 +596,9 @@ GstOSXVideoSink *osxvideosink = GST_OSX_VIDEO_SINK (navigation); GstPad *peer; GstEvent *event; - GstVideoRectangle src, dst, result; + GstVideoRectangle src = { 0, }; + GstVideoRectangle dst = { 0, }; + GstVideoRectangle result; NSRect bounds; gdouble x, y, xscale = 1.0, yscale = 1.0; @@ -762,6 +773,8 @@ NSRect rect; unsigned int mask; + [NSApplication sharedApplication]; + osxwindow->internal = TRUE; mask = NSTitledWindowMask | @@ -927,6 +940,7 @@ [pool release]; } +#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION -(void) nsAppThread { NSAutoreleasePool *pool; @@ -963,6 +977,7 @@ g_cond_signal (&_run_loop_cond); g_mutex_unlock (&_run_loop_mutex); } +#endif @end diff -Nru gst-plugins-good1.0-1.4.3/sys/sunaudio/Makefile.in gst-plugins-good1.0-1.6.1/sys/sunaudio/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/sunaudio/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/sunaudio/Makefile.in 2015-10-30 12:10:16.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = sys/sunaudio -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -232,6 +241,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -364,9 +374,6 @@ 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@ @@ -484,17 +491,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -547,6 +554,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -600,7 +608,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/sunaudio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/sunaudio/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -957,6 +964,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/ext/types-compat.h gst-plugins-good1.0-1.6.1/sys/v4l2/ext/types-compat.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/ext/types-compat.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/ext/types-compat.h 2015-10-22 08:02:54.000000000 +0000 @@ -44,4 +44,6 @@ #define __s32 gint32 #define __le32 guint32 __bitwise +#define __user + #endif /* __TYPES_COMPAT_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/ext/v4l2-common.h gst-plugins-good1.0-1.6.1/sys/v4l2/ext/v4l2-common.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/ext/v4l2-common.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/ext/v4l2-common.h 2015-10-22 08:02:54.000000000 +0000 @@ -29,6 +29,8 @@ #ifndef __V4L2_COMMON__ #define __V4L2_COMMON__ +#include "ext/types-compat.h" + /* * * Selection interface definitions @@ -41,6 +43,8 @@ #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 /* Cropping bounds */ #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 +/* Native frame size */ +#define V4L2_SEL_TGT_NATIVE_SIZE 0x0003 /* Current composing area */ #define V4L2_SEL_TGT_COMPOSE 0x0100 /* Default composing area */ @@ -68,4 +72,12 @@ #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG +struct v4l2_edid { + __u32 pad; + __u32 start_block; + __u32 blocks; + __u32 reserved[5]; + __u8 *edid; +}; + #endif /* __V4L2_COMMON__ */ diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/ext/v4l2-controls.h gst-plugins-good1.0-1.6.1/sys/v4l2/ext/v4l2-controls.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/ext/v4l2-controls.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/ext/v4l2-controls.h 2015-10-22 08:02:54.000000000 +0000 @@ -60,6 +60,8 @@ #define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */ #define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */ #define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* FM Receiver controls */ +#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ +#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ /* User-class control IDs */ @@ -164,6 +166,14 @@ * this driver */ #define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_USER_BASE + 0x1050) +/* The base for the saa7134 driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060) + +/* The base for the adv7180 driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_USER_BASE + 0x1070) + /* MPEG-class control IDs */ /* The MPEG controls are applicable to all codec controls * and the 'MPEG' part of the define is historical */ @@ -372,6 +382,8 @@ #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) #define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225) #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226) +#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227) +#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) @@ -554,6 +566,11 @@ V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0, V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1, }; +#define V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (V4L2_CID_MPEG_BASE+507) +#define V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (V4L2_CID_MPEG_BASE+508) +#define V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (V4L2_CID_MPEG_BASE+509) +#define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_MPEG_BASE+510) +#define V4L2_CID_MPEG_VIDEO_VPX_PROFILE (V4L2_CID_MPEG_BASE+511) /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) @@ -733,6 +750,8 @@ V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, }; +#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) +#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE+33) /* FM Modulator class control IDs */ @@ -744,6 +763,15 @@ #define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3) #define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5) #define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6) +#define V4L2_CID_RDS_TX_MONO_STEREO (V4L2_CID_FM_TX_CLASS_BASE + 7) +#define V4L2_CID_RDS_TX_ARTIFICIAL_HEAD (V4L2_CID_FM_TX_CLASS_BASE + 8) +#define V4L2_CID_RDS_TX_COMPRESSED (V4L2_CID_FM_TX_CLASS_BASE + 9) +#define V4L2_CID_RDS_TX_DYNAMIC_PTY (V4L2_CID_FM_TX_CLASS_BASE + 10) +#define V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_TX_CLASS_BASE + 11) +#define V4L2_CID_RDS_TX_TRAFFIC_PROGRAM (V4L2_CID_FM_TX_CLASS_BASE + 12) +#define V4L2_CID_RDS_TX_MUSIC_SPEECH (V4L2_CID_FM_TX_CLASS_BASE + 13) +#define V4L2_CID_RDS_TX_ALT_FREQS_ENABLE (V4L2_CID_FM_TX_CLASS_BASE + 14) +#define V4L2_CID_RDS_TX_ALT_FREQS (V4L2_CID_FM_TX_CLASS_BASE + 15) #define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64) #define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65) @@ -803,6 +831,9 @@ #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) +#define V4L2_FLASH_FAULT_UNDER_VOLTAGE (1 << 6) +#define V4L2_FLASH_FAULT_INPUT_VOLTAGE (1 << 7) +#define V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE (1 << 8) #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) @@ -840,6 +871,10 @@ #define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) #define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) #define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) +#define V4L2_CID_TEST_PATTERN_RED (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4) +#define V4L2_CID_TEST_PATTERN_GREENR (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5) +#define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6) +#define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7) /* Image processing controls */ @@ -885,5 +920,40 @@ }; #define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2) +#define V4L2_CID_RDS_RX_PTY (V4L2_CID_FM_RX_CLASS_BASE + 3) +#define V4L2_CID_RDS_RX_PS_NAME (V4L2_CID_FM_RX_CLASS_BASE + 4) +#define V4L2_CID_RDS_RX_RADIO_TEXT (V4L2_CID_FM_RX_CLASS_BASE + 5) +#define V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_RX_CLASS_BASE + 6) +#define V4L2_CID_RDS_RX_TRAFFIC_PROGRAM (V4L2_CID_FM_RX_CLASS_BASE + 7) +#define V4L2_CID_RDS_RX_MUSIC_SPEECH (V4L2_CID_FM_RX_CLASS_BASE + 8) + +#define V4L2_CID_RF_TUNER_CLASS_BASE (V4L2_CTRL_CLASS_RF_TUNER | 0x900) +#define V4L2_CID_RF_TUNER_CLASS (V4L2_CTRL_CLASS_RF_TUNER | 1) + +#define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 11) +#define V4L2_CID_RF_TUNER_BANDWIDTH (V4L2_CID_RF_TUNER_CLASS_BASE + 12) +#define V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 41) +#define V4L2_CID_RF_TUNER_LNA_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 42) +#define V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 51) +#define V4L2_CID_RF_TUNER_MIXER_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 52) +#define V4L2_CID_RF_TUNER_IF_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 61) +#define V4L2_CID_RF_TUNER_IF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 62) +#define V4L2_CID_RF_TUNER_PLL_LOCK (V4L2_CID_RF_TUNER_CLASS_BASE + 91) + + +/* Detection-class control IDs defined by V4L2 */ +#define V4L2_CID_DETECT_CLASS_BASE (V4L2_CTRL_CLASS_DETECT | 0x900) +#define V4L2_CID_DETECT_CLASS (V4L2_CTRL_CLASS_DETECT | 1) + +#define V4L2_CID_DETECT_MD_MODE (V4L2_CID_DETECT_CLASS_BASE + 1) +enum v4l2_detect_md_mode { + V4L2_DETECT_MD_MODE_DISABLED = 0, + V4L2_DETECT_MD_MODE_GLOBAL = 1, + V4L2_DETECT_MD_MODE_THRESHOLD_GRID = 2, + V4L2_DETECT_MD_MODE_REGION_GRID = 3, +}; +#define V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (V4L2_CID_DETECT_CLASS_BASE + 2) +#define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3) +#define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4) #endif diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/ext/videodev2.h gst-plugins-good1.0-1.6.1/sys/v4l2/ext/videodev2.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/ext/videodev2.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/ext/videodev2.h 2015-10-22 08:02:54.000000000 +0000 @@ -77,6 +77,7 @@ /* Four-character-code (FOURCC) */ #define v4l2_fourcc(a, b, c, d)\ ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24)) +#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1 << 31)) /* * E N U M S @@ -122,6 +123,10 @@ (field) == V4L2_FIELD_INTERLACED_BT ||\ (field) == V4L2_FIELD_SEQ_TB ||\ (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_T_OR_B(field) \ + ((field) == V4L2_FIELD_BOTTOM ||\ + (field) == V4L2_FIELD_TOP ||\ + (field) == V4L2_FIELD_ALTERNATE) enum v4l2_buf_type { V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, @@ -137,6 +142,7 @@ #endif V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, + V4L2_BUF_TYPE_SDR_CAPTURE = 11, /* Deprecated, do not use */ V4L2_BUF_TYPE_PRIVATE = 0x80, }; @@ -157,6 +163,8 @@ V4L2_TUNER_RADIO = 1, V4L2_TUNER_ANALOG_TV = 2, V4L2_TUNER_DIGITAL_TV = 3, + V4L2_TUNER_ADC = 4, + V4L2_TUNER_RF = 5, }; enum v4l2_memory { @@ -168,32 +176,181 @@ /* see also http://vektor.theorem.ca/graphics/ycbcr/ */ enum v4l2_colorspace { - /* ITU-R 601 -- broadcast NTSC/PAL */ + /* + * Default colorspace, i.e. let the driver figure it out. + * Can only be used with video capture. + */ + V4L2_COLORSPACE_DEFAULT = 0, + + /* SMPTE 170M: used for broadcast NTSC/PAL SDTV */ V4L2_COLORSPACE_SMPTE170M = 1, - /* 1125-Line (US) HDTV */ + /* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */ V4L2_COLORSPACE_SMPTE240M = 2, - /* HD and modern captures. */ + /* Rec.709: used for HDTV */ V4L2_COLORSPACE_REC709 = 3, - /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ + /* + * Deprecated, do not use. No driver will ever return this. This was + * based on a misunderstanding of the bt878 datasheet. + */ V4L2_COLORSPACE_BT878 = 4, - /* These should be useful. Assume 601 extents. */ + /* + * NTSC 1953 colorspace. This only makes sense when dealing with + * really, really old NTSC recordings. Superseded by SMPTE 170M. + */ V4L2_COLORSPACE_470_SYSTEM_M = 5, + + /* + * EBU Tech 3213 PAL/SECAM colorspace. This only makes sense when + * dealing with really old PAL/SECAM recordings. Superseded by + * SMPTE 170M. + */ V4L2_COLORSPACE_470_SYSTEM_BG = 6, - /* I know there will be cameras that send this. So, this is - * unspecified chromaticities and full 0-255 on each of the - * Y'CbCr components + /* + * Effectively shorthand for V4L2_COLORSPACE_SRGB, V4L2_YCBCR_ENC_601 + * and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG. */ V4L2_COLORSPACE_JPEG = 7, - /* For RGB colourspaces, this is probably a good start. */ + /* For RGB colorspaces such as produces by most webcams. */ V4L2_COLORSPACE_SRGB = 8, + + /* AdobeRGB colorspace */ + V4L2_COLORSPACE_ADOBERGB = 9, + + /* BT.2020 colorspace, used for UHDTV. */ + V4L2_COLORSPACE_BT2020 = 10, + + /* Raw colorspace: for RAW unprocessed images */ + V4L2_COLORSPACE_RAW = 11, +}; + +/* + * Determine how COLORSPACE_DEFAULT should map to a proper colorspace. + * This depends on whether this is a SDTV image (use SMPTE 170M), an + * HDTV image (use Rec. 709), or something else (use sRGB). + */ +#define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv) \ + ((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M : \ + ((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB)) + +enum v4l2_xfer_func { + /* + * Mapping of V4L2_XFER_FUNC_DEFAULT to actual transfer functions + * for the various colorspaces: + * + * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, + * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_REC709 and + * V4L2_COLORSPACE_BT2020: V4L2_XFER_FUNC_709 + * + * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB + * + * V4L2_COLORSPACE_ADOBERGB: V4L2_XFER_FUNC_ADOBERGB + * + * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M + * + * V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE + */ + V4L2_XFER_FUNC_DEFAULT = 0, + V4L2_XFER_FUNC_709 = 1, + V4L2_XFER_FUNC_SRGB = 2, + V4L2_XFER_FUNC_ADOBERGB = 3, + V4L2_XFER_FUNC_SMPTE240M = 4, + V4L2_XFER_FUNC_NONE = 5, +}; + +/* + * Determine how XFER_FUNC_DEFAULT should map to a proper transfer function. + * This depends on the colorspace. + */ +#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ + ((colsp) == V4L2_XFER_FUNC_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \ + ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \ + ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \ + ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \ + V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709)))) + +enum v4l2_ycbcr_encoding { + /* + * Mapping of V4L2_YCBCR_ENC_DEFAULT to actual encodings for the + * various colorspaces: + * + * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, + * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_ADOBERGB and + * V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 + * + * V4L2_COLORSPACE_REC709: V4L2_YCBCR_ENC_709 + * + * V4L2_COLORSPACE_SRGB: V4L2_YCBCR_ENC_SYCC + * + * V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020 + * + * V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M + */ + V4L2_YCBCR_ENC_DEFAULT = 0, + + /* ITU-R 601 -- SDTV */ + V4L2_YCBCR_ENC_601 = 1, + + /* Rec. 709 -- HDTV */ + V4L2_YCBCR_ENC_709 = 2, + + /* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */ + V4L2_YCBCR_ENC_XV601 = 3, + + /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */ + V4L2_YCBCR_ENC_XV709 = 4, + + /* sYCC (Y'CbCr encoding of sRGB) */ + V4L2_YCBCR_ENC_SYCC = 5, + + /* BT.2020 Non-constant Luminance Y'CbCr */ + V4L2_YCBCR_ENC_BT2020 = 6, + + /* BT.2020 Constant Luminance Y'CbcCrc */ + V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7, + + /* SMPTE 240M -- Obsolete HDTV */ + V4L2_YCBCR_ENC_SMPTE240M = 8, }; +/* + * Determine how YCBCR_ENC_DEFAULT should map to a proper Y'CbCr encoding. + * This depends on the colorspace. + */ +#define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \ + ((colsp) == V4L2_COLORSPACE_REC709 ? V4L2_YCBCR_ENC_709 : \ + ((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 : \ + ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M : \ + V4L2_YCBCR_ENC_601))) + +enum v4l2_quantization { + /* + * The default for R'G'B' quantization is always full range, except + * for the BT2020 colorspace. For Y'CbCr the quantization is always + * limited range, except for COLORSPACE_JPEG, SYCC, XV601 or XV709: + * those are full range. + */ + V4L2_QUANTIZATION_DEFAULT = 0, + V4L2_QUANTIZATION_FULL_RANGE = 1, + V4L2_QUANTIZATION_LIM_RANGE = 2, +}; + +/* + * Determine how QUANTIZATION_DEFAULT should map to a proper quantization. + * This depends on whether the image is RGB or not, the colorspace and the + * Y'CbCr encoding. + */ +#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, colsp, ycbcr_enc) \ + (((is_rgb) && (colsp) == V4L2_COLORSPACE_BT2020) ? V4L2_QUANTIZATION_LIM_RANGE : \ + (((is_rgb) || (ycbcr_enc) == V4L2_YCBCR_ENC_XV601 || \ + (ycbcr_enc) == V4L2_YCBCR_ENC_XV709 || (colsp) == V4L2_COLORSPACE_JPEG) ? \ + V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE)) + enum v4l2_priority { V4L2_PRIORITY_UNSET = 0, /* not initialized */ V4L2_PRIORITY_BACKGROUND = 1, @@ -205,8 +362,8 @@ struct v4l2_rect { __s32 left; __s32 top; - __s32 width; - __s32 height; + __u32 width; + __u32 height; }; struct v4l2_fract { @@ -262,6 +419,9 @@ #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ #define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */ +#define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ +#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */ + #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ @@ -280,6 +440,10 @@ __u32 sizeimage; __u32 colorspace; /* enum v4l2_colorspace */ __u32 priv; /* private data, depends on pixelformat */ + __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */ + __u32 ycbcr_enc; /* enum v4l2_ycbcr_encoding */ + __u32 quantization; /* enum v4l2_quantization */ + __u32 xfer_func; /* enum v4l2_xfer_func */ }; /* Pixel format FOURCC depth Description */ @@ -287,15 +451,25 @@ /* RGB formats */ #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ +#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */ +#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */ #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ +#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ +#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ +#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ +#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ +#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */ +#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */ #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ +#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */ +#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */ /* Grey formats */ #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ @@ -304,6 +478,7 @@ #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ +#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ /* Grey bit-packed formats */ #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ @@ -364,10 +539,11 @@ #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ #define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ -#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ + /* 10bit raw bayer packed, 5 bytes for every 4 pixels */ +#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A') +#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A') +#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A') +#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A') /* 10bit raw bayer a-law compressed to 8 bits */ #define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8') #define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8') @@ -378,10 +554,10 @@ #define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8') #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') #define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8') - /* - * 10bit raw bayer, expanded to 16 bits - * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... - */ +#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ /* compressed formats */ @@ -429,6 +605,19 @@ #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */ +/* SDR formats - used only for Software Defined Radio devices */ +#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ +#define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ +#define V4L2_SDR_FMT_CS8 v4l2_fourcc('C', 'S', '0', '8') /* complex s8 */ +#define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */ +#define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */ + +/* priv field value to indicates that subsequent fields are valid. */ +#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe + +/* Flags */ +#define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001 + /* * F O R M A T E N U M E R A T I O N */ @@ -638,7 +827,6 @@ * @length: size in bytes of the buffer (NOT its payload) for single-plane * buffers (when type != *_MPLANE); number of elements in the * planes array for multi-plane buffers - * @input: input number from which the video data has has been captured * * Contains data exchanged by application and driver using one of the Streaming * I/O methods. @@ -667,24 +855,38 @@ }; /* Flags for 'flags' field */ -#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ -#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ -#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ -#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ -#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ -#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ +/* Buffer is mapped (flag) */ +#define V4L2_BUF_FLAG_MAPPED 0x00000001 +/* Buffer is queued for processing */ +#define V4L2_BUF_FLAG_QUEUED 0x00000002 +/* Buffer is ready */ +#define V4L2_BUF_FLAG_DONE 0x00000004 +/* Image is a keyframe (I-frame) */ +#define V4L2_BUF_FLAG_KEYFRAME 0x00000008 +/* Image is a P-frame */ +#define V4L2_BUF_FLAG_PFRAME 0x00000010 +/* Image is a B-frame */ +#define V4L2_BUF_FLAG_BFRAME 0x00000020 /* Buffer is ready, but the data contained within is corrupted. */ -#define V4L2_BUF_FLAG_ERROR 0x0040 -#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ -#define V4L2_BUF_FLAG_PREPARED 0x0400 /* Buffer is prepared for queuing */ +#define V4L2_BUF_FLAG_ERROR 0x00000040 +/* timecode field is valid */ +#define V4L2_BUF_FLAG_TIMECODE 0x00000100 +/* Buffer is prepared for queuing */ +#define V4L2_BUF_FLAG_PREPARED 0x00000400 /* Cache handling flags */ -#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800 -#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000 +#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x00000800 +#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x00001000 /* Timestamp type */ -#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0xe000 -#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 -#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 -#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000 +#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0x0000e000 +#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x00000000 +#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x00002000 +#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x00004000 +/* Timestamp sources. */ +#define V4L2_BUF_FLAG_TSTAMP_SRC_MASK 0x00070000 +#define V4L2_BUF_FLAG_TSTAMP_SRC_EOF 0x00000000 +#define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000 +/* mem2mem encoder/decoder */ +#define V4L2_BUF_FLAG_LAST 0x00100000 /** * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor @@ -722,7 +924,16 @@ /* FIXME: in theory we should pass something like PCI device + memory * region + offset instead of some physical address */ void *base; - struct v4l2_pix_format fmt; + struct { + __u32 width; + __u32 height; + __u32 pixelformat; + __u32 field; /* enum v4l2_field */ + __u32 bytesperline; /* for padding, zero if unused */ + __u32 sizeimage; + __u32 colorspace; /* enum v4l2_colorspace */ + __u32 priv; /* reserved field, set to 0 */ + } fmt; }; /* Flags for the 'capability' field. Read only */ #define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 @@ -744,16 +955,16 @@ struct v4l2_clip { struct v4l2_rect c; - struct v4l2_clip *next; + struct v4l2_clip __user *next; }; struct v4l2_window { struct v4l2_rect w; __u32 field; /* enum v4l2_field */ __u32 chromakey; - struct v4l2_clip *clips; + struct v4l2_clip __user *clips; __u32 clipcount; - void *bitmap; + void __user *bitmap; __u8 global_alpha; }; @@ -1054,17 +1265,23 @@ exactly the same number of half-lines. Whether half-lines can be detected or used depends on the hardware. */ #define V4L2_DV_FL_HALF_LINE (1 << 3) +/* If set, then this is a Consumer Electronics (CE) video format. Such formats + * differ from other formats (commonly called IT formats) in that if RGB + * encoding is used then by default the RGB values use limited range (i.e. + * use the range 16-235) as opposed to 0-255. All formats defined in CEA-861 + * except for the 640x480 format are CE formats. */ +#define V4L2_DV_FL_IS_CE_VIDEO (1 << 4) /* A few useful defines to calculate the total blanking and frame sizes */ #define V4L2_DV_BT_BLANKING_WIDTH(bt) \ - (bt->hfrontporch + bt->hsync + bt->hbackporch) + ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch) #define V4L2_DV_BT_FRAME_WIDTH(bt) \ - (bt->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) + ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) #define V4L2_DV_BT_BLANKING_HEIGHT(bt) \ - (bt->vfrontporch + bt->vsync + bt->vbackporch + \ - bt->il_vfrontporch + bt->il_vsync + bt->il_vbackporch) + ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \ + (bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) #define V4L2_DV_BT_FRAME_HEIGHT(bt) \ - (bt->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) + ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) /** struct v4l2_dv_timings - DV timings * @type: the type of the timings @@ -1084,12 +1301,15 @@ /** struct v4l2_enum_dv_timings - DV timings enumeration * @index: enumeration index + * @pad: the pad number for which to enumerate timings (used with + * v4l-subdev nodes only) * @reserved: must be zeroed * @timings: the timings for the given index */ struct v4l2_enum_dv_timings { __u32 index; - __u32 reserved[3]; + __u32 pad; + __u32 reserved[2]; struct v4l2_dv_timings timings; }; @@ -1127,11 +1347,14 @@ /** struct v4l2_dv_timings_cap - DV timings capabilities * @type: the type of the timings (same as in struct v4l2_dv_timings) + * @pad: the pad number for which to query capabilities (used with + * v4l-subdev nodes only) * @bt: the BT656/1120 timings capabilities */ struct v4l2_dv_timings_cap { __u32 type; - __u32 reserved[3]; + __u32 pad; + __u32 reserved[2]; union { struct v4l2_bt_timings_cap bt; __u32 raw_data[32]; @@ -1186,6 +1409,7 @@ #define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ #define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ +#define V4L2_IN_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ /* * V I D E O O U T P U T S @@ -1209,6 +1433,7 @@ #define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ #define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */ #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ +#define V4L2_OUT_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ /* * C O N T R O L S @@ -1225,7 +1450,11 @@ union { __s32 value; __s64 value64; - char *string; + char __user *string; + __u8 __user *p_u8; + __u16 __user *p_u16; + __u32 __user *p_u32; + void __user *ptr; }; } __attribute__ ((packed)); @@ -1240,6 +1469,7 @@ #define V4L2_CTRL_ID_MASK (0x0fffffff) #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) +#define V4L2_CTRL_MAX_DIMS (4) enum v4l2_ctrl_type { V4L2_CTRL_TYPE_INTEGER = 1, @@ -1250,7 +1480,13 @@ V4L2_CTRL_TYPE_CTRL_CLASS = 6, V4L2_CTRL_TYPE_STRING = 7, V4L2_CTRL_TYPE_BITMASK = 8, - V4L2_CTRL_TYPE_INTEGER_MENU = 9, + V4L2_CTRL_TYPE_INTEGER_MENU = 9, + + /* Compound types are >= 0x0100 */ + V4L2_CTRL_COMPOUND_TYPES = 0x0100, + V4L2_CTRL_TYPE_U8 = 0x0100, + V4L2_CTRL_TYPE_U16 = 0x0101, + V4L2_CTRL_TYPE_U32 = 0x0102, }; /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ @@ -1266,6 +1502,23 @@ __u32 reserved[2]; }; +/* Used in the VIDIOC_QUERY_EXT_CTRL ioctl for querying extended controls */ +struct v4l2_query_ext_ctrl { + __u32 id; + __u32 type; + char name[32]; + __s64 minimum; + __s64 maximum; + __u64 step; + __s64 default_value; + __u32 flags; + __u32 elem_size; + __u32 elems; + __u32 nr_of_dims; + __u32 dims[V4L2_CTRL_MAX_DIMS]; + __u32 reserved[32]; +}; + /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ struct v4l2_querymenu { __u32 id; @@ -1286,9 +1539,12 @@ #define V4L2_CTRL_FLAG_SLIDER 0x0020 #define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040 #define V4L2_CTRL_FLAG_VOLATILE 0x0080 +#define V4L2_CTRL_FLAG_HAS_PAYLOAD 0x0100 +#define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE 0x0200 -/* Query flag, to be ORed with the control ID */ +/* Query flags, to be ORed with the control ID */ #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 +#define V4L2_CTRL_FLAG_NEXT_COMPOUND 0x40000000 /* User-class control IDs defined by V4L2 */ #define V4L2_CID_MAX_CTRLS 1024 @@ -1337,6 +1593,7 @@ #define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 #define V4L2_TUNER_CAP_FREQ_BANDS 0x0400 #define V4L2_TUNER_CAP_HWSEEK_PROG_LIM 0x0800 +#define V4L2_TUNER_CAP_1HZ 0x1000 /* Flags for the 'rxsubchans' field */ #define V4L2_TUNER_SUB_MONO 0x0001 @@ -1553,6 +1810,12 @@ #define V4L2_VBI_UNSYNC (1 << 0) #define V4L2_VBI_INTERLACED (1 << 1) +/* ITU-R start lines for each field */ +#define V4L2_VBI_ITU_525_F1_START (1) +#define V4L2_VBI_ITU_525_F2_START (264) +#define V4L2_VBI_ITU_625_F1_START (1) +#define V4L2_VBI_ITU_625_F2_START (314) + /* Sliced VBI * * This implements is a proposal V4L2 API to allow SLICED VBI @@ -1663,8 +1926,8 @@ */ struct v4l2_plane_pix_format { __u32 sizeimage; - __u16 bytesperline; - __u16 reserved[7]; + __u32 bytesperline; + __u16 reserved[6]; } __attribute__ ((packed)); /** @@ -1676,6 +1939,10 @@ * @colorspace: enum v4l2_colorspace; supplemental to pixelformat * @plane_fmt: per-plane information * @num_planes: number of planes for this format + * @flags: format flags (V4L2_PIX_FMT_FLAG_*) + * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding + * @quantization: enum v4l2_quantization, colorspace quantization + * @xfer_func: enum v4l2_xfer_func, colorspace transfer function */ struct v4l2_pix_format_mplane { __u32 width; @@ -1686,7 +1953,22 @@ struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; __u8 num_planes; - __u8 reserved[11]; + __u8 flags; + __u8 ycbcr_enc; + __u8 quantization; + __u8 xfer_func; + __u8 reserved[7]; +} __attribute__ ((packed)); + +/** + * struct v4l2_sdr_format - SDR format definition + * @pixelformat: little endian four character code (fourcc) + * @buffersize: maximum size in bytes required for data + */ +struct v4l2_sdr_format { + __u32 pixelformat; + __u32 buffersize; + __u8 reserved[24]; } __attribute__ ((packed)); /** @@ -1707,6 +1989,7 @@ struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ + struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */ __u8 raw_data[200]; /* user-defined */ } fmt; }; @@ -1731,6 +2014,8 @@ #define V4L2_EVENT_EOS 2 #define V4L2_EVENT_CTRL 3 #define V4L2_EVENT_FRAME_SYNC 4 +#define V4L2_EVENT_SOURCE_CHANGE 5 +#define V4L2_EVENT_MOTION_DET 6 #define V4L2_EVENT_PRIVATE_START 0x08000000 /* Payload for V4L2_EVENT_VSYNC */ @@ -1762,12 +2047,35 @@ __u32 frame_sequence; }; +#define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) + +struct v4l2_event_src_change { + __u32 changes; +}; + +#define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ (1 << 0) + +/** + * struct v4l2_event_motion_det - motion detection event + * @flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the + * frame_sequence field is valid. + * @frame_sequence: the frame sequence number associated with this event. + * @region_mask: which regions detected motion. + */ +struct v4l2_event_motion_det { + __u32 flags; + __u32 frame_sequence; + __u32 region_mask; +}; + struct v4l2_event { __u32 type; union { struct v4l2_event_vsync vsync; struct v4l2_event_ctrl ctrl; struct v4l2_event_frame_sync frame_sync; + struct v4l2_event_src_change src_change; + struct v4l2_event_motion_det motion_det; __u8 data[64]; } u; __u32 pending; @@ -1883,6 +2191,8 @@ #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) #define VIDIOC_G_INPUT _IOR('V', 38, int) #define VIDIOC_S_INPUT _IOWR('V', 39, int) +#define VIDIOC_G_EDID _IOWR('V', 40, struct v4l2_edid) +#define VIDIOC_S_EDID _IOWR('V', 41, struct v4l2_edid) #define VIDIOC_G_OUTPUT _IOR('V', 46, int) #define VIDIOC_S_OUTPUT _IOWR('V', 47, int) #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) @@ -1956,6 +2266,8 @@ Never use these in applications! */ #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) +#define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl) + /* Reminder: when adding new ioctls please add support for them to drivers/media/video/v4l2-compat-ioctl32.c as well! */ diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2allocator.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2allocator.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2allocator.c 2014-09-16 08:31:22.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2allocator.c 2015-10-22 08:02:54.000000000 +0000 @@ -145,14 +145,6 @@ return ret; } -static void -_v4l2mem_free (GstV4l2Memory * mem) -{ - if (mem->dmafd >= 0) - close (mem->dmafd); - g_slice_free (GstV4l2Memory, mem); -} - static inline GstV4l2Memory * _v4l2mem_new (GstMemoryFlags flags, GstAllocator * allocator, GstMemory * parent, gsize maxsize, gsize align, gsize offset, gsize size, @@ -270,6 +262,14 @@ if (v4l2_ioctl (video_fd, VIDIOC_QUERYBUF, &group->buffer) < 0) goto querybuf_failed; + if (group->buffer.index != index) { + GST_ERROR_OBJECT (allocator, "Buffer index returned by VIDIOC_QUERYBUF " + "didn't match, this indicate the presence of a bug in your driver or " + "libv4l2"); + g_slice_free (GstV4l2MemoryGroup, group); + return NULL; + } + /* Check that provided size matches the format we have negotiation. Failing * there usually means a driver of libv4l bug. */ if (V4L2_TYPE_IS_MULTIPLANAR (allocator->type)) { @@ -380,23 +380,22 @@ GstV4l2Memory *mem = (GstV4l2Memory *) gmem; GstV4l2MemoryGroup *group = mem->group; - GST_LOG_OBJECT (allocator, "freeing plane %i of buffer %u", - mem->plane, group->buffer.index); + /* Only free unparented memory */ + if (mem->mem.parent == NULL) { + GST_LOG_OBJECT (allocator, "freeing plane %i of buffer %u", + mem->plane, group->buffer.index); - switch (allocator->memory) { - case V4L2_MEMORY_MMAP: - if (mem->data) { + if (allocator->memory == V4L2_MEMORY_MMAP) { + if (mem->data) v4l2_munmap (mem->data, group->planes[mem->plane].length); - } else if (group->planes[mem->plane].m.fd > 0) { - close (group->planes[mem->plane].m.fd); - } - break; - default: - /* Nothing to do */ - break; + } + + /* This apply for both mmap with expbuf, and dmabuf imported memory */ + if (mem->dmafd >= 0) + close (mem->dmafd); } - _v4l2mem_free (mem); + g_slice_free (GstV4l2Memory, mem); } static void @@ -490,7 +489,7 @@ flags |= breq_flag; - bcreate.memory = V4L2_MEMORY_MMAP; + bcreate.memory = allocator->type; bcreate.format = allocator->format; if ((v4l2_ioctl (allocator->video_fd, VIDIOC_CREATE_BUFS, &bcreate) == 0)) @@ -521,6 +520,9 @@ if (v4l2_ioctl (allocator->video_fd, VIDIOC_CREATE_BUFS, &bcreate) < 0) goto create_bufs_failed; + if (allocator->groups[bcreate.index] != NULL) + goto create_bufs_bug; + group = gst_v4l2_memory_group_new (allocator, bcreate.index); if (group) { @@ -538,6 +540,13 @@ g_strerror (errno)); goto done; } +create_bufs_bug: + { + GST_ERROR_OBJECT (allocator, "created buffer has already used buffer " + "index %i, this means there is an bug in your driver or libv4l2", + bcreate.index); + goto done; + } } static GstV4l2MemoryGroup * @@ -717,8 +726,7 @@ already_active: { - GST_ERROR_OBJECT (allocator, - "error requesting %d buffers: %s", count, g_strerror (errno)); + GST_ERROR_OBJECT (allocator, "allocator already active"); goto error; } reqbufs_failed: @@ -1127,7 +1135,7 @@ gboolean gst_v4l2_allocator_import_userptr (GstV4l2Allocator * allocator, GstV4l2MemoryGroup * group, gsize img_size, int n_planes, - gpointer * data, gsize * offset) + gpointer * data, gsize * size) { GstV4l2Memory *mem; gint i; @@ -1135,38 +1143,34 @@ g_return_val_if_fail (allocator->memory == V4L2_MEMORY_USERPTR, FALSE); /* TODO Support passing N plane from 1 memory to MPLANE v4l2 format */ - if (n_planes != group->n_mem) + if (V4L2_TYPE_IS_MULTIPLANAR (allocator->type) && n_planes != group->n_mem) goto n_mem_missmatch; for (i = 0; i < group->n_mem; i++) { - gsize size, maxsize; + gsize maxsize, psize; if (V4L2_TYPE_IS_MULTIPLANAR (allocator->type)) { struct v4l2_pix_format_mplane *pix = &allocator->format.fmt.pix_mp; maxsize = pix->plane_fmt[i].sizeimage; + psize = size[i]; } else { maxsize = allocator->format.fmt.pix.sizeimage; + psize = img_size; } - if ((i + 1) == n_planes) { - size = img_size - offset[i]; - } else { - size = offset[i + 1] - offset[i]; - } - - g_assert (size <= img_size); + g_assert (psize <= img_size); GST_LOG_OBJECT (allocator, "imported USERPTR %p plane %d size %" - G_GSIZE_FORMAT, data[i], i, size); + G_GSIZE_FORMAT, data[i], i, psize); mem = (GstV4l2Memory *) group->mem[i]; mem->mem.maxsize = maxsize; - mem->mem.size = size; + mem->mem.size = psize; mem->data = data[i]; group->planes[i].length = maxsize; - group->planes[i].bytesused = size; + group->planes[i].bytesused = psize; group->planes[i].m.userptr = (unsigned long) data[i]; group->planes[i].data_offset = 0; } @@ -1265,8 +1269,9 @@ return ret; } -GstV4l2MemoryGroup * -gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator) +GstFlowReturn +gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator, + GstV4l2MemoryGroup ** group_out) { struct v4l2_buffer buffer = { 0 }; struct v4l2_plane planes[VIDEO_MAX_PLANES] = { {0} }; @@ -1274,7 +1279,7 @@ GstV4l2MemoryGroup *group = NULL; - g_return_val_if_fail (g_atomic_int_get (&allocator->active), FALSE); + g_return_val_if_fail (g_atomic_int_get (&allocator->active), GST_FLOW_ERROR); buffer.type = allocator->type; buffer.memory = allocator->memory; @@ -1288,6 +1293,13 @@ goto error; group = allocator->groups[buffer.index]; + + if (!IS_QUEUED (group->buffer)) { + GST_ERROR_OBJECT (allocator, + "buffer %i was not queued, this indicate a driver bug.", buffer.index); + return GST_FLOW_ERROR; + } + group->buffer = buffer; GST_LOG_OBJECT (allocator, "dequeued buffer %i (flags 0x%X)", buffer.index, @@ -1323,9 +1335,15 @@ for (i = 0; i < group->n_mem; i++) gst_memory_unref (group->mem[i]); - return group; + *group_out = group; + return GST_FLOW_OK; error: + if (errno == EPIPE) { + GST_DEBUG_OBJECT (allocator, "broken pipe signals last buffer"); + return GST_FLOW_EOS; + } + GST_ERROR_OBJECT (allocator, "failed dequeuing a %s buffer: %s", memory_type_to_str (allocator->memory), g_strerror (errno)); @@ -1367,7 +1385,7 @@ break; } - return NULL; + return GST_FLOW_ERROR; } void @@ -1390,17 +1408,3 @@ gst_v4l2_allocator_reset_size (allocator, group); } - -gsize -gst_v4l2_allocator_num_allocated (GstV4l2Allocator * allocator) -{ - gsize num_allocated; - - GST_OBJECT_LOCK (allocator); - - num_allocated = allocator->count; - - GST_OBJECT_UNLOCK (allocator); - - return num_allocated; -} diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2allocator.h gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2allocator.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2allocator.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2allocator.h 2015-10-22 08:02:54.000000000 +0000 @@ -123,7 +123,7 @@ guint gst_v4l2_allocator_start (GstV4l2Allocator * allocator, guint32 count, guint32 memory); -gboolean gst_v4l2_allocator_stop (GstV4l2Allocator * allocator); +GstV4l2Return gst_v4l2_allocator_stop (GstV4l2Allocator * allocator); GstV4l2MemoryGroup* gst_v4l2_allocator_alloc_mmap (GstV4l2Allocator * allocator); @@ -141,20 +141,19 @@ gboolean gst_v4l2_allocator_import_userptr (GstV4l2Allocator * allocator, GstV4l2MemoryGroup *group, gsize img_size, int n_planes, - gpointer * data, gsize * offset); + gpointer * data, gsize * size); void gst_v4l2_allocator_flush (GstV4l2Allocator * allocator); gboolean gst_v4l2_allocator_qbuf (GstV4l2Allocator * allocator, GstV4l2MemoryGroup * group); -GstV4l2MemoryGroup* gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator); +GstFlowReturn gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator, + GstV4l2MemoryGroup ** group); void gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator, GstV4l2MemoryGroup * group); -gsize gst_v4l2_allocator_num_allocated (GstV4l2Allocator * allocator); - G_END_DECLS #endif /* __GST_V4L2_ALLOCATOR_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2bufferpool.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2bufferpool.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2bufferpool.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2bufferpool.c 2015-10-22 08:02:54.000000000 +0000 @@ -46,9 +46,9 @@ #include "gst/gst-i18n-plugin.h" #include -GST_DEBUG_CATEGORY_EXTERN (v4l2_debug); +GST_DEBUG_CATEGORY_STATIC (v4l2bufferpool_debug); GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE); -#define GST_CAT_DEFAULT v4l2_debug +#define GST_CAT_DEFAULT v4l2bufferpool_debug #define GST_V4L2_IMPORT_QUARK gst_v4l2_buffer_pool_import_quark () @@ -61,15 +61,16 @@ enum _GstV4l2BufferPoolAcquireFlags { - GST_V4L2_POOL_ACQUIRE_FLAG_RESURECT = GST_BUFFER_POOL_ACQUIRE_FLAG_LAST, - GST_V4L2_BUFFER_POOL_ACQUIRE_FAG_LAST + GST_V4L2_BUFFER_POOL_ACQUIRE_FLAG_RESURRECT = + GST_BUFFER_POOL_ACQUIRE_FLAG_LAST, + GST_V4L2_BUFFER_POOL_ACQUIRE_FLAG_LAST }; static void gst_v4l2_buffer_pool_release_buffer (GstBufferPool * bpool, GstBuffer * buffer); static gboolean -gst_v4l2_is_buffer_valid (GstBuffer * buffer, GstV4l2MemoryGroup ** group) +gst_v4l2_is_buffer_valid (GstBuffer * buffer, GstV4l2MemoryGroup ** out_group) { GstMemory *mem = gst_buffer_peek_memory (buffer, 0); gboolean valid = FALSE; @@ -83,9 +84,23 @@ if (mem && gst_is_v4l2_memory (mem)) { GstV4l2Memory *vmem = (GstV4l2Memory *) mem; + GstV4l2MemoryGroup *group = vmem->group; + gint i; + + if (group->n_mem != gst_buffer_n_memory (buffer)) + goto done; + + for (i = 0; i < group->n_mem; i++) { + if (group->mem[i] != gst_buffer_peek_memory (buffer, i)) + goto done; + + if (!gst_memory_is_writable (group->mem[i])) + goto done; + } + valid = TRUE; - if (group) - *group = vmem->group; + if (out_group) + *out_group = group; } done: @@ -134,6 +149,9 @@ gst_buffer_resize (dest, 0, gst_buffer_get_size (src)); } + gst_buffer_copy_into (dest, src, + GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1); + GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, pool, "slow copy into buffer %p", dest); @@ -204,18 +222,58 @@ if (finfo && (finfo->format != GST_VIDEO_FORMAT_UNKNOWN && finfo->format != GST_VIDEO_FORMAT_ENCODED)) { + gsize size[GST_VIDEO_MAX_PLANES] = { 0, }; + gint i; + data->is_frame = TRUE; if (!gst_video_frame_map (&data->frame, &pool->caps_info, src, flags)) goto invalid_buffer; + for (i = 0; i < GST_VIDEO_FORMAT_INFO_N_PLANES (finfo); i++) { + if (GST_VIDEO_FORMAT_INFO_IS_TILED (finfo)) { + gint tinfo = GST_VIDEO_FRAME_PLANE_STRIDE (&data->frame, i); + gint pstride; + guint pheight; + + pstride = GST_VIDEO_TILE_X_TILES (tinfo) << + GST_VIDEO_FORMAT_INFO_TILE_WS (finfo); + + pheight = GST_VIDEO_TILE_Y_TILES (tinfo) << + GST_VIDEO_FORMAT_INFO_TILE_HS (finfo); + + size[i] = pstride * pheight; + } else { + size[i] = GST_VIDEO_FRAME_PLANE_STRIDE (&data->frame, i) * + GST_VIDEO_FRAME_COMP_HEIGHT (&data->frame, i); + } + } + + /* In the single planar API, planes must be contiguous in memory and + * therefore they must have expected size. ie: no padding. + * To check these conditions, we check that plane 'i' start address + * + plane 'i' size equals to plane 'i+1' start address */ + if (!V4L2_TYPE_IS_MULTIPLANAR (pool->obj->type)) { + for (i = 0; i < (GST_VIDEO_FORMAT_INFO_N_PLANES (finfo) - 1); i++) { + const struct v4l2_pix_format *pix_fmt = &pool->obj->format.fmt.pix; + gpointer tmp; + gint estride = gst_v4l2_object_extrapolate_stride (finfo, i, + pix_fmt->bytesperline); + guint eheight = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (finfo, i, + pix_fmt->height); + + tmp = ((guint8 *) data->frame.data[i]) + estride * eheight; + if (tmp != data->frame.data[i + 1]) + goto non_contiguous_mem; + } + } + if (!gst_v4l2_allocator_import_userptr (pool->vallocator, group, - data->frame.info.size, finfo->n_planes, data->frame.data, - data->frame.info.offset)) + data->frame.info.size, finfo->n_planes, data->frame.data, size)) goto import_failed; } else { - gsize offset[1] = { 0 }; gpointer ptr[1]; + gsize size[1]; data->is_frame = FALSE; @@ -223,9 +281,10 @@ goto invalid_buffer; ptr[0] = data->map.data; + size[0] = data->map.size; if (!gst_v4l2_allocator_import_userptr (pool->vallocator, group, - data->map.size, 1, ptr, offset)) + data->map.size, 1, ptr, size)) goto import_failed; } @@ -247,6 +306,12 @@ g_slice_free (struct UserPtrData, data); return GST_FLOW_ERROR; } +non_contiguous_mem: + { + GST_ERROR_OBJECT (pool, "memory is not contiguous or plane size mismatch"); + _unmap_userptr_frame (data); + return GST_FLOW_ERROR; + } import_failed: { GST_ERROR_OBJECT (pool, "failed to import data"); @@ -458,7 +523,8 @@ can_allocate = GST_V4L2_ALLOCATOR_CAN_ALLOCATE (pool->vallocator, DMABUF); break; case GST_V4L2_IO_RW: - pool->allocator = g_object_ref (allocator); + if (allocator) + pool->allocator = g_object_ref (allocator); pool->params = params; /* No need to change the configuration */ goto done; @@ -468,12 +534,31 @@ break; } + /* libv4l2 conversion code does not handle CREATE_BUFS, and may lead to + * instability and crash, disable it for now */ + if (can_allocate && obj->fmtdesc->flags & V4L2_FMT_FLAG_EMULATED) { + GST_WARNING_OBJECT (pool, + "libv4l2 converter detected, disabling CREATE_BUFS"); + can_allocate = FALSE; + GST_OBJECT_FLAG_UNSET (pool->vallocator, + GST_V4L2_ALLOCATOR_FLAG_MMAP_CREATE_BUFS + | GST_V4L2_ALLOCATOR_FLAG_USERPTR_CREATE_BUFS + | GST_V4L2_ALLOCATOR_FLAG_DMABUF_CREATE_BUFS); + } + if (min_buffers < GST_V4L2_MIN_BUFFERS) { updated = TRUE; min_buffers = GST_V4L2_MIN_BUFFERS; GST_INFO_OBJECT (pool, "increasing minimum buffers to %u", min_buffers); } + /* respect driver requirements */ + if (min_buffers < obj->min_buffers) { + updated = TRUE; + min_buffers = obj->min_buffers; + GST_INFO_OBJECT (pool, "increasing minimum buffers to %u", min_buffers); + } + if (max_buffers > VIDEO_MAX_FRAME || max_buffers == 0) { updated = TRUE; max_buffers = VIDEO_MAX_FRAME; @@ -499,9 +584,9 @@ GST_BUFFER_POOL_OPTION_VIDEO_META); } - if (updated) - gst_buffer_pool_config_set_params (config, caps, size, min_buffers, - max_buffers); + /* Always update the config to ensure the configured size matches */ + gst_buffer_pool_config_set_params (config, caps, obj->info.size, min_buffers, + max_buffers); /* keep a GstVideoInfo with defaults for the when we need to copy */ gst_video_info_from_caps (&pool->caps_info, caps); @@ -553,7 +638,7 @@ } } -static gboolean +static void gst_v4l2_buffer_pool_streamoff (GstV4l2BufferPool * pool) { GstV4l2Object *obj = pool->obj; @@ -565,29 +650,24 @@ case GST_V4L2_IO_DMABUF_IMPORT: if (pool->streaming) { if (v4l2_ioctl (pool->video_fd, VIDIOC_STREAMOFF, &obj->type) < 0) - goto streamoff_failed; + GST_WARNING_OBJECT (pool, "STREAMOFF failed with errno %d (%s)", + errno, g_strerror (errno)); pool->streaming = FALSE; GST_DEBUG_OBJECT (pool, "Stopped streaming"); + + if (pool->vallocator) + gst_v4l2_allocator_flush (pool->vallocator); } break; default: break; } - - return TRUE; - -streamoff_failed: - { - GST_ERROR_OBJECT (pool, "error with STREAMOFF %d (%s)", errno, - g_strerror (errno)); - return FALSE; - } } -static void -gst_v4l2_buffer_pool_group_released (GstV4l2BufferPool * pool) +static GstFlowReturn +gst_v4l2_buffer_pool_resurect_buffer (GstV4l2BufferPool * pool) { GstBufferPoolAcquireParams params = { 0 }; GstBuffer *buffer = NULL; @@ -596,12 +676,14 @@ GST_DEBUG_OBJECT (pool, "A buffer was lost, reallocating it"); params.flags = - (GstBufferPoolAcquireFlags) GST_V4L2_POOL_ACQUIRE_FLAG_RESURECT; + (GstBufferPoolAcquireFlags) GST_V4L2_BUFFER_POOL_ACQUIRE_FLAG_RESURRECT; ret = gst_buffer_pool_acquire_buffer (GST_BUFFER_POOL (pool), &buffer, ¶ms); if (ret == GST_FLOW_OK) gst_buffer_unref (buffer); + + return ret; } static gboolean @@ -623,12 +705,20 @@ &max_buffers)) goto wrong_config; - /* TODO Also consider min_buffers_for_output when implemented */ - min_latency = MAX (GST_V4L2_MIN_BUFFERS, obj->min_buffers_for_capture); + min_latency = MAX (GST_V4L2_MIN_BUFFERS, obj->min_buffers); switch (obj->mode) { case GST_V4L2_IO_RW: can_allocate = TRUE; +#ifdef HAVE_LIBV4L2 + /* This workaround a unfixable bug in libv4l2 when RW is emulated on top + * of MMAP. In this case, the first read initialize the queues, but the + * poll before that will always fail. Doing an empty read, forces the + * queue to be initialized now. We only do this if we have a streaming + * driver. */ + if (obj->vcap.capabilities & V4L2_CAP_STREAMING) + v4l2_read (obj->video_fd, NULL, 0); +#endif break; case GST_V4L2_IO_DMABUF: case GST_V4L2_IO_MMAP: @@ -653,15 +743,11 @@ * falling back to copy if the pipeline needed more buffers. This also * prevent having to do REQBUFS(N)/REQBUFS(0) everytime configure is * called. */ - if (count != min_buffers) { - GST_WARNING_OBJECT (pool, "using %u buffers instead of %u", - count, min_buffers); + if (count != min_buffers || pool->enable_copy_threshold) { + GST_WARNING_OBJECT (pool, + "Uncertain or not enough buffers, enabling copy threshold"); min_buffers = count; copy_threshold = min_latency; - - /* The initial minimum could be provide either by GstBufferPool or - * driver needs. */ - min_buffers = count; } break; @@ -719,19 +805,13 @@ else max_latency = min_buffers; - /* FIXME Encoder don't negotiate amount of buffers. If we can't grow the - * pool, or the minimum is at V4L2 maximum, enabled copy on threshold - * https://bugzilla.gnome.org/show_bug.cgi?id=732288 */ - if (!can_allocate || min_buffers == VIDEO_MAX_FRAME) - copy_threshold = min_latency; - pool->size = size; pool->copy_threshold = copy_threshold; pool->max_latency = max_latency; pool->min_latency = min_latency; pool->num_queued = 0; - if (max_buffers < min_buffers) + if (max_buffers != 0 && max_buffers < min_buffers) max_buffers = min_buffers; gst_buffer_pool_config_set_params (config, caps, size, min_buffers, @@ -750,7 +830,7 @@ if (!V4L2_TYPE_IS_OUTPUT (obj->type)) pool->group_released_handler = g_signal_connect_swapped (pool->vallocator, "group-released", - G_CALLBACK (gst_v4l2_buffer_pool_group_released), pool); + G_CALLBACK (gst_v4l2_buffer_pool_resurect_buffer), pool); return TRUE; @@ -799,14 +879,12 @@ } if (pool->other_pool) { + gst_buffer_pool_set_active (pool->other_pool, FALSE); gst_object_unref (pool->other_pool); pool->other_pool = NULL; } - if (!gst_v4l2_buffer_pool_streamoff (pool)) - goto streamoff_failed; - - gst_v4l2_allocator_flush (pool->vallocator); + gst_v4l2_buffer_pool_streamoff (pool); for (i = 0; i < VIDEO_MAX_FRAME; i++) { if (pool->buffers[i]) { @@ -815,8 +893,8 @@ pool->buffers[i] = NULL; if (V4L2_TYPE_IS_OUTPUT (pool->obj->type)) - gst_buffer_unref (buffer); - else + gst_v4l2_buffer_pool_release_buffer (bpool, buffer); + else /* Don't re-enqueue capture buffer on stop */ pclass->release_buffer (bpool, buffer); g_atomic_int_add (&pool->num_queued, -1); @@ -825,7 +903,7 @@ ret = GST_BUFFER_POOL_CLASS (parent_class)->stop (bpool); - if (ret) { + if (ret && pool->vallocator) { GstV4l2Return vret; vret = gst_v4l2_allocator_stop (pool->vallocator); @@ -837,11 +915,6 @@ } return ret; - - /* ERRORS */ -streamoff_failed: - GST_ERROR_OBJECT (pool, "device refused to stop streaming"); - return FALSE; } static void @@ -878,10 +951,7 @@ if (pool->other_pool) gst_buffer_pool_set_flushing (pool->other_pool, FALSE); - if (!gst_v4l2_buffer_pool_streamoff (pool)) - goto stop_failed; - - gst_v4l2_allocator_flush (pool->vallocator); + gst_v4l2_buffer_pool_streamoff (pool); /* Reset our state */ switch (obj->mode) { @@ -892,11 +962,7 @@ case GST_V4L2_IO_DMABUF: case GST_V4L2_IO_DMABUF_IMPORT: { - gsize num_allocated; - - num_allocated = gst_v4l2_allocator_num_allocated (pool->vallocator); - - for (i = 0; i < num_allocated; i++) { + for (i = 0; i < VIDEO_MAX_FRAME; i++) { /* Re-enqueue buffers */ if (pool->buffers[i]) { GstBufferPool *bpool = (GstBufferPool *) pool; @@ -909,9 +975,7 @@ gst_mini_object_set_qdata (GST_MINI_OBJECT (buffer), GST_V4L2_IMPORT_QUARK, NULL, NULL); - if (V4L2_TYPE_IS_OUTPUT (obj->type)) - gst_buffer_unref (buffer); - else + if (buffer->pool == NULL) gst_v4l2_buffer_pool_release_buffer (bpool, buffer); g_atomic_int_add (&pool->num_queued, -1); @@ -931,14 +995,6 @@ gst_v4l2_buffer_pool_streamon (pool); gst_poll_set_flushing (pool->poll, FALSE); - - return; - - /* ERRORS */ -stop_failed: - { - GST_ERROR_OBJECT (pool, "device refused to flush"); - } } static GstFlowReturn @@ -946,10 +1002,14 @@ { gint ret; - GST_OBJECT_LOCK (pool); - while (pool->empty) - g_cond_wait (&pool->empty_cond, GST_OBJECT_GET_LOCK (pool)); - GST_OBJECT_UNLOCK (pool); + /* In RW mode there is no queue, hence no need to wait while the queue is + * empty */ + if (pool->obj->mode != GST_V4L2_IO_RW) { + GST_OBJECT_LOCK (pool); + while (pool->empty) + g_cond_wait (&pool->empty_cond, GST_OBJECT_GET_LOCK (pool)); + GST_OBJECT_UNLOCK (pool); + } if (!pool->can_poll_device) goto done; @@ -1000,6 +1060,8 @@ gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool * pool, GstBuffer * buf) { GstV4l2MemoryGroup *group = NULL; + const GstV4l2Object *obj = pool->obj; + GstClockTime timestamp; gint index; if (!gst_v4l2_is_buffer_valid (buf, &group)) { @@ -1018,6 +1080,33 @@ g_atomic_int_inc (&pool->num_queued); pool->buffers[index] = buf; + if (V4L2_TYPE_IS_OUTPUT (obj->type)) { + enum v4l2_field field; + + /* Except when field is set to alternate, buffer field is the same as + * the one defined in format */ + if (V4L2_TYPE_IS_MULTIPLANAR (obj->type)) + field = obj->format.fmt.pix_mp.field; + else + field = obj->format.fmt.pix.field; + + /* NB: At this moment, we can't have alternate mode because it not handled + * yet */ + if (field == V4L2_FIELD_ALTERNATE) { + if (GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_FRAME_FLAG_TFF)) + field = V4L2_FIELD_TOP; + else + field = V4L2_FIELD_BOTTOM; + } + + group->buffer.field = field; + } + + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { + timestamp = GST_BUFFER_TIMESTAMP (buf); + GST_TIME_TO_TIMEVAL (timestamp, group->buffer.timestamp); + } + if (!gst_v4l2_allocator_qbuf (pool->vallocator, group)) goto queue_failed; @@ -1059,8 +1148,10 @@ GST_LOG_OBJECT (pool, "dequeueing a buffer"); - group = gst_v4l2_allocator_dqbuf (pool->vallocator); - if (group == NULL) + res = gst_v4l2_allocator_dqbuf (pool->vallocator, &group); + if (res == GST_FLOW_EOS) + goto eos; + if (res != GST_FLOW_OK) goto dqbuf_failed; /* get our GstBuffer with that index from the pool, if the buffer was @@ -1091,16 +1182,69 @@ } #endif + /* Ignore timestamp and field for OUTPUT device */ + if (V4L2_TYPE_IS_OUTPUT (obj->type)) + goto done; + + /* Check for driver bug in reporting feild */ + if (group->buffer.field == V4L2_FIELD_ANY) { + /* Only warn once to avoid the spamming */ +#ifndef GST_DISABLE_GST_DEBUG + if (!pool->has_warned_on_buggy_field) { + pool->has_warned_on_buggy_field = TRUE; + GST_WARNING_OBJECT (pool, + "Driver should never set v4l2_buffer.field to ANY"); + } +#endif + + /* Use the value from the format (works for UVC bug) */ + group->buffer.field = obj->format.fmt.pix.field; + + /* If driver also has buggy S_FMT, assume progressive */ + if (group->buffer.field == V4L2_FIELD_ANY) { +#ifndef GST_DISABLE_GST_DEBUG + if (!pool->has_warned_on_buggy_field) { + pool->has_warned_on_buggy_field = TRUE; + GST_WARNING_OBJECT (pool, + "Driver should never set v4l2_format.pix.field to ANY"); + } +#endif + + group->buffer.field = V4L2_FIELD_NONE; + } + } + /* set top/bottom field first if v4l2_buffer has the information */ - if (group->buffer.field == V4L2_FIELD_INTERLACED_TB) { - GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); - GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); - } else if (group->buffer.field == V4L2_FIELD_INTERLACED_BT) { - GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); - GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); - } else { - GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); - GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + switch (group->buffer.field) { + case V4L2_FIELD_NONE: + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + break; + case V4L2_FIELD_INTERLACED_TB: + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + break; + case V4L2_FIELD_INTERLACED_BT: + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + break; + case V4L2_FIELD_INTERLACED: + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); + if (obj->tv_norm == V4L2_STD_NTSC_M || + obj->tv_norm == V4L2_STD_NTSC_M_JP || + obj->tv_norm == V4L2_STD_NTSC_M_KR) { + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + } else { + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + } + break; + default: + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + GST_FIXME_OBJECT (pool, + "Unhandled enum v4l2_field %d - treating as progressive", + group->buffer.field); + break; } if (GST_VIDEO_INFO_FORMAT (&obj->info) == GST_VIDEO_FORMAT_ENCODED) { @@ -1110,8 +1254,14 @@ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); } + if (group->buffer.flags & V4L2_BUF_FLAG_ERROR) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_CORRUPTED); + GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + GST_BUFFER_OFFSET (outbuf) = group->buffer.sequence; + GST_BUFFER_OFFSET_END (outbuf) = group->buffer.sequence + 1; +done: *buffer = outbuf; return GST_FLOW_OK; @@ -1122,6 +1272,10 @@ GST_DEBUG_OBJECT (pool, "poll error %s", gst_flow_get_name (res)); return res; } +eos: + { + return GST_FLOW_EOS; + } dqbuf_failed: { return GST_FLOW_ERROR; @@ -1146,7 +1300,7 @@ GST_DEBUG_OBJECT (pool, "acquire"); /* If this is being called to resurect a lost buffer */ - if (params && params->flags & GST_V4L2_POOL_ACQUIRE_FLAG_RESURECT) { + if (params && params->flags & GST_V4L2_BUFFER_POOL_ACQUIRE_FLAG_RESURRECT) { ret = pclass->acquire_buffer (bpool, buffer, params); goto done; } @@ -1164,20 +1318,13 @@ } case GST_V4L2_IO_DMABUF: case GST_V4L2_IO_MMAP: + case GST_V4L2_IO_USERPTR: + case GST_V4L2_IO_DMABUF_IMPORT: { /* just dequeue a buffer, we basically use the queue of v4l2 as the * storage for our buffers. This function does poll first so we can * interrupt it fine. */ ret = gst_v4l2_buffer_pool_dqbuf (pool, buffer); - if (G_UNLIKELY (ret != GST_FLOW_OK)) - goto done; - break; - } - case GST_V4L2_IO_USERPTR: - case GST_V4L2_IO_DMABUF_IMPORT: - { - /* dequeue filled buffer */ - ret = gst_v4l2_buffer_pool_dqbuf (pool, buffer); break; } default: @@ -1246,7 +1393,9 @@ case GST_V4L2_IO_USERPTR: case GST_V4L2_IO_DMABUF_IMPORT: { - if (gst_v4l2_is_buffer_valid (buffer, NULL)) { + GstV4l2MemoryGroup *group; + if (gst_v4l2_is_buffer_valid (buffer, &group)) { + gst_v4l2_allocator_reset_group (pool->vallocator, group); /* queue back in the device */ if (pool->other_pool) gst_v4l2_buffer_pool_prepare_buffer (pool, buffer, NULL); @@ -1306,8 +1455,10 @@ /* playback, put the buffer back in the queue to refill later. */ pclass->release_buffer (bpool, buffer); } else { - /* We keep a ref on queued buffer, so this should never happen */ - g_assert_not_reached (); + /* the buffer is queued in the device but maybe not played yet. We just + * leave it there and not make it available for future calls to acquire + * for now. The buffer will be dequeued and reused later. */ + GST_LOG_OBJECT (pool, "buffer %u is queued", index); } break; } @@ -1325,33 +1476,43 @@ } static void -gst_v4l2_buffer_pool_finalize (GObject * object) +gst_v4l2_buffer_pool_dispose (GObject * object) { GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (object); - gint i; - - for (i = 0; i < VIDEO_MAX_FRAME; i++) { - if (pool->buffers[i]) - gst_buffer_replace (&(pool->buffers[i]), NULL); - } - - if (pool->video_fd >= 0) - v4l2_close (pool->video_fd); - - gst_poll_free (pool->poll); if (pool->vallocator) gst_object_unref (pool->vallocator); + pool->vallocator = NULL; if (pool->allocator) gst_object_unref (pool->allocator); + pool->allocator = NULL; if (pool->other_pool) gst_object_unref (pool->other_pool); + pool->other_pool = NULL; - /* FIXME Is this required to keep around ? */ + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +gst_v4l2_buffer_pool_finalize (GObject * object) +{ + GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (object); + + if (pool->video_fd >= 0) + v4l2_close (pool->video_fd); + + gst_poll_free (pool->poll); + + /* FIXME Is this required to keep around ? + * This can't be done in dispose method because we must not set pointer + * to NULL as it is part of the v4l2object and dispose could be called + * multiple times */ gst_object_unref (pool->obj->element); + g_cond_clear (&pool->empty_cond); + /* FIXME have we done enough here ? */ G_OBJECT_CLASS (parent_class)->finalize (object); @@ -1372,6 +1533,7 @@ GObjectClass *object_class = G_OBJECT_CLASS (klass); GstBufferPoolClass *bufferpool_class = GST_BUFFER_POOL_CLASS (klass); + object_class->dispose = gst_v4l2_buffer_pool_dispose; object_class->finalize = gst_v4l2_buffer_pool_finalize; bufferpool_class->start = gst_v4l2_buffer_pool_start; @@ -1382,6 +1544,9 @@ bufferpool_class->release_buffer = gst_v4l2_buffer_pool_release_buffer; bufferpool_class->flush_start = gst_v4l2_buffer_pool_flush_start; bufferpool_class->flush_stop = gst_v4l2_buffer_pool_flush_stop; + + GST_DEBUG_CATEGORY_INIT (v4l2bufferpool_debug, "v4l2bufferpool", 0, + "V4L2 Buffer Pool"); } /** @@ -1450,6 +1615,7 @@ allocator_failed: { GST_ERROR_OBJECT (pool, "Failed to create V4L2 allocator"); + gst_object_unref (pool); return NULL; } } @@ -1557,20 +1723,36 @@ GstBuffer *tmp; if ((*buf)->pool == bpool) { - if (gst_buffer_get_size (*buf) == 0) - goto eos; + guint num_queued; + + if (gst_buffer_get_size (*buf) == 0) { + if (GST_BUFFER_FLAG_IS_SET (*buf, GST_BUFFER_FLAG_CORRUPTED)) + goto buffer_corrupted; + else + goto eos; + } + + num_queued = g_atomic_int_get (&pool->num_queued); + GST_TRACE_OBJECT (pool, "Only %i buffer left in the capture queue.", + num_queued); + + /* If we have no more buffer, and can allocate it time to do so */ + if (num_queued == 0) { + if (GST_V4L2_ALLOCATOR_CAN_ALLOCATE (pool->vallocator, MMAP)) { + ret = gst_v4l2_buffer_pool_resurect_buffer (pool); + if (ret == GST_FLOW_OK) + goto done; + } + } /* start copying buffers when we are running low on buffers */ - if (g_atomic_int_get (&pool->num_queued) < pool->copy_threshold) { + if (num_queued < pool->copy_threshold) { GstBuffer *copy; if (GST_V4L2_ALLOCATOR_CAN_ALLOCATE (pool->vallocator, MMAP)) { - - if (gst_buffer_pool_acquire_buffer (bpool, ©, - NULL) == GST_FLOW_OK) { - gst_v4l2_buffer_pool_release_buffer (bpool, copy); + ret = gst_v4l2_buffer_pool_resurect_buffer (pool); + if (ret == GST_FLOW_OK) goto done; - } } /* copy the buffer */ @@ -1593,8 +1775,15 @@ /* An empty buffer on capture indicates the end of stream */ if (gst_buffer_get_size (tmp) == 0) { + gboolean corrupted = GST_BUFFER_FLAG_IS_SET (tmp, + GST_BUFFER_FLAG_CORRUPTED); + gst_v4l2_buffer_pool_release_buffer (bpool, tmp); - goto eos; + + if (corrupted) + goto buffer_corrupted; + else + goto eos; } ret = gst_v4l2_buffer_pool_copy_buffer (pool, *buf, tmp); @@ -1701,19 +1890,37 @@ /* if we are not streaming yet (this is the first buffer, start * streaming now */ if (!gst_v4l2_buffer_pool_streamon (pool)) { + /* don't check return value because qbuf would have failed */ + gst_v4l2_is_buffer_valid (to_queue, &group); + + /* qbuf has stored to_queue buffer but we are not in + * streaming state, so the flush logic won't be performed. + * To avoid leaks, flush the allocator and restore the queued + * buffer as non-queued */ + gst_v4l2_allocator_flush (pool->vallocator); + + pool->buffers[group->buffer.index] = NULL; + + gst_mini_object_set_qdata (GST_MINI_OBJECT (to_queue), + GST_V4L2_IMPORT_QUARK, NULL, NULL); gst_buffer_unref (to_queue); + g_atomic_int_add (&pool->num_queued, -1); goto start_failed; } + /* Remove our ref, we will still hold this buffer in acquire as needed, + * otherwise the pool will think it is outstanding and will refuse to stop. */ + gst_buffer_unref (to_queue); + if (g_atomic_int_get (&pool->num_queued) >= pool->min_latency) { GstBuffer *out; /* all buffers are queued, try to dequeue one and release it back * into the pool so that _acquire can get to it again. */ ret = gst_v4l2_buffer_pool_dqbuf (pool, &out); - if (ret == GST_FLOW_OK) + if (ret == GST_FLOW_OK && out->pool == NULL) /* release the rendered buffer back into the pool. This wakes up any * thread waiting for a buffer in _acquire(). */ - gst_buffer_unref (out); + gst_v4l2_buffer_pool_release_buffer (bpool, out); } break; } @@ -1735,10 +1942,19 @@ GST_ERROR_OBJECT (pool, "failed to copy buffer"); return ret; } +buffer_corrupted: + { + GST_WARNING_OBJECT (pool, "Dropping corrupted buffer without payload"); + gst_buffer_unref (*buf); + *buf = NULL; + return GST_V4L2_FLOW_CORRUPTED_BUFFER; + } eos: { GST_DEBUG_OBJECT (pool, "end of stream reached"); - return GST_FLOW_EOS; + gst_buffer_unref (*buf); + *buf = NULL; + return GST_V4L2_FLOW_LAST_BUFFER; } acquire_failed: { @@ -1776,3 +1992,11 @@ gst_object_unref (pool->other_pool); pool->other_pool = gst_object_ref (other_pool); } + +void +gst_v4l2_buffer_pool_copy_at_threshold (GstV4l2BufferPool * pool, gboolean copy) +{ + GST_OBJECT_LOCK (pool); + pool->enable_copy_threshold = copy; + GST_OBJECT_UNLOCK (pool); +} diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2bufferpool.h gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2bufferpool.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2bufferpool.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2bufferpool.h 2015-10-22 08:02:54.000000000 +0000 @@ -44,6 +44,16 @@ #define GST_V4L2_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_BUFFER_POOL, GstV4l2BufferPool)) #define GST_V4L2_BUFFER_POOL_CAST(obj) ((GstV4l2BufferPool*)(obj)) +/* This flow return is used to indicated that the last buffer of a + * drain or a resoltuion change has been found. This should normally + * only occure for mem-2-mem devices. */ +#define GST_V4L2_FLOW_LAST_BUFFER GST_FLOW_CUSTOM_SUCCESS + +/* This flow return is used to indicated that the returned buffer was marked + * with the error flag and had no payload. This error should be recovered by + * simply waiting for next buffer. */ +#define GST_V4L2_FLOW_CORRUPTED_BUFFER GST_FLOW_CUSTOM_SUCCESS_1 + struct _GstV4l2BufferPool { GstBufferPool parent; @@ -65,6 +75,7 @@ GstVideoInfo caps_info; /* Default video information */ gboolean add_videometa; /* set if video meta should be added */ + gboolean enable_copy_threshold; /* If copy_threshold should be set */ guint min_latency; /* number of buffers we will hold */ guint max_latency; /* number of buffers we can hold */ @@ -78,6 +89,9 @@ /* signal handlers */ gulong group_released_handler; + + /* Control to warn only once on buggy feild driver bug */ + gboolean has_warned_on_buggy_field; }; struct _GstV4l2BufferPoolClass @@ -93,6 +107,8 @@ void gst_v4l2_buffer_pool_set_other_pool (GstV4l2BufferPool * pool, GstBufferPool * other_pool); +void gst_v4l2_buffer_pool_copy_at_threshold (GstV4l2BufferPool * pool, + gboolean copy); G_END_DECLS diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2deviceprovider.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2deviceprovider.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2deviceprovider.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2deviceprovider.c 2015-10-30 12:10:05.000000000 +0000 @@ -365,7 +365,6 @@ g_main_context_unref (context); g_thread_join (self->thread); - g_thread_unref (self->thread); self->thread = NULL; self->started = FALSE; } diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2deviceprovider.h gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2deviceprovider.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2deviceprovider.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2deviceprovider.h 2015-10-22 08:02:54.000000000 +0000 @@ -36,7 +36,6 @@ G_BEGIN_DECLS typedef struct _GstV4l2DeviceProvider GstV4l2DeviceProvider; -typedef struct _GstV4l2DeviceProviderPrivate GstV4l2DeviceProviderPrivate; typedef struct _GstV4l2DeviceProviderClass GstV4l2DeviceProviderClass; #define GST_TYPE_V4L2_DEVICE_PROVIDER (gst_v4l2_device_provider_get_type()) @@ -73,7 +72,6 @@ typedef struct _GstV4l2Device GstV4l2Device; -typedef struct _GstV4l2DevicePrivate GstV4l2DevicePrivate; typedef struct _GstV4l2DeviceClass GstV4l2DeviceClass; #define GST_TYPE_V4L2_DEVICE (gst_v4l2_device_get_type()) @@ -98,4 +96,6 @@ GType gst_v4l2_device_get_type (void); +G_END_DECLS + #endif /* __GST_V4L2_DEVICE_PROVIDER_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2object.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2object.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2object.c 2014-09-02 06:11:46.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2object.c 2015-10-22 08:02:54.000000000 +0000 @@ -117,6 +117,9 @@ /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ {V4L2_PIX_FMT_SBGGR8, TRUE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_SGBRG8, TRUE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_SGRBG8, TRUE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_SRGGB8, TRUE, GST_V4L2_CODEC}, /* compressed formats */ {V4L2_PIX_FMT_MJPEG, FALSE, GST_V4L2_CODEC}, @@ -718,6 +721,27 @@ } static void +gst_v4l2_get_driver_min_buffers (GstV4l2Object * v4l2object) +{ + struct v4l2_control control = { 0, }; + + g_return_if_fail (GST_V4L2_IS_OPEN (v4l2object)); + + if (V4L2_TYPE_IS_OUTPUT (v4l2object->type)) + control.id = V4L2_CID_MIN_BUFFERS_FOR_OUTPUT; + else + control.id = V4L2_CID_MIN_BUFFERS_FOR_CAPTURE; + + if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_G_CTRL, &control) == 0) { + GST_DEBUG_OBJECT (v4l2object->element, + "driver requires a minimum of %d buffers", control.value); + v4l2object->min_buffers = control.value; + } else { + v4l2object->min_buffers = 0; + } +} + +static void gst_v4l2_set_defaults (GstV4l2Object * v4l2object) { GstTunerNorm *norm = NULL; @@ -945,6 +969,9 @@ break; case V4L2_PIX_FMT_SBGGR8: + case V4L2_PIX_FMT_SGBRG8: + case V4L2_PIX_FMT_SGRBG8: + case V4L2_PIX_FMT_SRGGB8: rank = BAYER_BASE_RANK; break; @@ -1263,7 +1290,14 @@ case V4L2_PIX_FMT_WNVA: /* Winnov hw compres */ break; case V4L2_PIX_FMT_SBGGR8: - structure = gst_structure_new_empty ("video/x-bayer"); + case V4L2_PIX_FMT_SGBRG8: + case V4L2_PIX_FMT_SGRBG8: + case V4L2_PIX_FMT_SRGGB8: + structure = gst_structure_new ("video/x-bayer", "format", G_TYPE_STRING, + fourcc == V4L2_PIX_FMT_SBGGR8 ? "bggr" : + fourcc == V4L2_PIX_FMT_SGBRG8 ? "gbrg" : + fourcc == V4L2_PIX_FMT_SGRBG8 ? "grbg" : + /* fourcc == V4L2_PIX_FMT_SRGGB8 ? */ "rggb", NULL); break; case V4L2_PIX_FMT_SN9C10X: structure = gst_structure_new_empty ("video/x-sonix"); @@ -1302,7 +1336,7 @@ gst_structure_set (template, "width", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE, "height", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE, - "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, NULL); + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); } break; } @@ -1335,7 +1369,7 @@ gst_structure_set (structure, "width", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE, "height", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE, - "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, NULL); + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); } switch (gst_v4l2_formats[i].format) { @@ -1562,7 +1596,7 @@ static gboolean gst_v4l2_object_get_nearest_size (GstV4l2Object * v4l2object, - guint32 pixelformat, gint * width, gint * height, gboolean * interlaced); + guint32 pixelformat, gint * width, gint * height); static void gst_v4l2_object_add_aspect_ratio (GstV4l2Object * v4l2object, GstStructure * s) @@ -1625,6 +1659,312 @@ return FALSE; } +static gboolean +gst_v4l2_object_get_interlace_mode (enum v4l2_field field, + GstVideoInterlaceMode * interlace_mode) +{ + /* NB: If you add new return values, please fix mode_strings in + * gst_v4l2_object_add_interlace_mode */ + switch (field) { + case V4L2_FIELD_ANY: + GST_ERROR + ("Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git\n"); + /* fallthrough */ + case V4L2_FIELD_NONE: + *interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE; + return TRUE; + case V4L2_FIELD_INTERLACED: + case V4L2_FIELD_INTERLACED_TB: + case V4L2_FIELD_INTERLACED_BT: + *interlace_mode = GST_VIDEO_INTERLACE_MODE_INTERLEAVED; + return TRUE; + default: + GST_ERROR ("Unknown enum v4l2_field %d", field); + return FALSE; + } +} + +static gboolean +gst_v4l2_object_get_colorspace (enum v4l2_colorspace colorspace, + enum v4l2_quantization range, enum v4l2_ycbcr_encoding matrix, + enum v4l2_xfer_func transfer, GstVideoColorimetry * cinfo) +{ + gboolean ret = TRUE; + + /* First step, set the defaults for each primaries */ + switch (colorspace) { + case V4L2_COLORSPACE_SMPTE170M: + ret = gst_video_colorimetry_from_string (cinfo, + GST_VIDEO_COLORIMETRY_BT601); + break; + case V4L2_COLORSPACE_REC709: + ret = gst_video_colorimetry_from_string (cinfo, + GST_VIDEO_COLORIMETRY_BT709); + break; + case V4L2_COLORSPACE_SRGB: + case V4L2_COLORSPACE_JPEG: + /* This is in fact sYCC */ + cinfo->range = GST_VIDEO_COLOR_RANGE_0_255; + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT601; + cinfo->transfer = GST_VIDEO_TRANSFER_SRGB; + cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT709; + break; + case V4L2_COLORSPACE_ADOBERGB: + GST_FIXME ("AdobeRGB is not yet supported by GStreamer"); + /* We are missing the primaries and the transfer function */ + ret = FALSE; + break; + case V4L2_COLORSPACE_BT2020: + ret = gst_video_colorimetry_from_string (cinfo, + GST_VIDEO_COLORIMETRY_BT2020); + break; + case V4L2_COLORSPACE_SMPTE240M: + ret = gst_video_colorimetry_from_string (cinfo, + GST_VIDEO_COLORIMETRY_SMPTE240M); + break; + case V4L2_COLORSPACE_470_SYSTEM_M: + cinfo->range = GST_VIDEO_COLOR_RANGE_16_235; + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT601; + cinfo->transfer = GST_VIDEO_TRANSFER_BT709; + cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT470M; + break; + case V4L2_COLORSPACE_470_SYSTEM_BG: + cinfo->range = GST_VIDEO_COLOR_RANGE_16_235; + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT601; + cinfo->transfer = GST_VIDEO_TRANSFER_BT709; + cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT470BG; + break; + case V4L2_COLORSPACE_RAW: + /* Explicitly unknown */ + cinfo->range = GST_VIDEO_COLOR_RANGE_UNKNOWN; + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_UNKNOWN; + cinfo->transfer = GST_VIDEO_TRANSFER_UNKNOWN; + cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN; + break; + default: + GST_DEBUG ("Unknown enum v4l2_colorspace %d", colorspace); + ret = FALSE; + break; + } + + if (!ret) + goto done; + + /* Second step, apply any custom variation */ + switch (range) { + case V4L2_QUANTIZATION_FULL_RANGE: + cinfo->range = GST_VIDEO_COLOR_RANGE_0_255; + break; + case V4L2_QUANTIZATION_LIM_RANGE: + cinfo->range = GST_VIDEO_COLOR_RANGE_16_235; + break; + case V4L2_QUANTIZATION_DEFAULT: + /* nothing, just use defaults for colorspace */ + break; + default: + GST_WARNING ("Unknown enum v4l2_quantization value %d", range); + cinfo->range = GST_VIDEO_COLOR_RANGE_UNKNOWN; + break; + } + + switch (matrix) { + case V4L2_YCBCR_ENC_XV601: + case V4L2_YCBCR_ENC_SYCC: + GST_FIXME ("XV601 and SYCC not defined, assuming 601"); + /* fallthrough */ + case V4L2_YCBCR_ENC_601: + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT601; + break; + case V4L2_YCBCR_ENC_XV709: + GST_FIXME ("XV709 not defined, assuming 709"); + /* fallthrough */ + case V4L2_YCBCR_ENC_709: + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT709; + break; + case V4L2_YCBCR_ENC_BT2020_CONST_LUM: + GST_FIXME ("BT2020 with constant lumma is not defined, assuming BT2020"); + /* fallthrough */ + case V4L2_YCBCR_ENC_BT2020: + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT2020; + break; + case V4L2_YCBCR_ENC_SMPTE240M: + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_SMPTE240M; + break; + case V4L2_YCBCR_ENC_DEFAULT: + /* nothing, just use defaults for colorspace */ + break; + default: + GST_WARNING ("Unknown enum v4l2_ycbcr_encoding value %d", matrix); + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_UNKNOWN; + break; + } + + switch (transfer) { + case V4L2_XFER_FUNC_709: + cinfo->transfer = GST_VIDEO_TRANSFER_BT709; + break; + case V4L2_XFER_FUNC_SRGB: + cinfo->transfer = GST_VIDEO_TRANSFER_SRGB; + break; + case V4L2_XFER_FUNC_ADOBERGB: + GST_FIXME ("AdobeRGB is not yet supported by GStreamer"); + cinfo->transfer = GST_VIDEO_TRANSFER_UNKNOWN; + break; + case V4L2_XFER_FUNC_SMPTE240M: + cinfo->transfer = GST_VIDEO_TRANSFER_SMPTE240M; + break; + case V4L2_XFER_FUNC_NONE: + cinfo->transfer = GST_VIDEO_TRANSFER_GAMMA10; + break; + case V4L2_XFER_FUNC_DEFAULT: + /* nothing, just use defaults for colorspace */ + break; + default: + GST_WARNING ("Unknown enum v4l2_xfer_func value %d", transfer); + cinfo->transfer = GST_VIDEO_TRANSFER_UNKNOWN; + break; + } + +done: + return ret; +} + +static int +gst_v4l2_object_try_fmt (GstV4l2Object * v4l2object, + struct v4l2_format *try_fmt) +{ + int fd = v4l2object->video_fd; + struct v4l2_format fmt; + int r; + + memcpy (&fmt, try_fmt, sizeof (fmt)); + r = v4l2_ioctl (fd, VIDIOC_TRY_FMT, &fmt); + + if (r < 0 && errno == ENOTTY) { + /* The driver might not implement TRY_FMT, in which case we will try + S_FMT to probe */ + if (GST_V4L2_IS_ACTIVE (v4l2object)) + goto error; + + memcpy (&fmt, try_fmt, sizeof (fmt)); + r = v4l2_ioctl (fd, VIDIOC_S_FMT, &fmt); + } + memcpy (try_fmt, &fmt, sizeof (fmt)); + return r; + +error: + memcpy (try_fmt, &fmt, sizeof (fmt)); + GST_WARNING_OBJECT (v4l2object->element, + "Unable to try format: %s", g_strerror (errno)); + return r; +} + + +static void +gst_v4l2_object_add_interlace_mode (GstV4l2Object * v4l2object, + GstStructure * s, guint32 width, guint32 height, guint32 pixelformat) +{ + struct v4l2_format fmt; + GValue interlace_formats = { 0, }; + GstVideoInterlaceMode interlace_mode, prev = -1; + + const gchar *mode_strings[] = { "progressive", + "interleaved", + "mixed" + }; + + if (!g_str_equal (gst_structure_get_name (s), "video/x-raw")) + return; + + if (v4l2object->never_interlaced) { + gst_structure_set (s, "interlace-mode", G_TYPE_STRING, "progressive", NULL); + return; + } + + g_value_init (&interlace_formats, GST_TYPE_LIST); + + /* Try twice - once for NONE, once for INTERLACED. */ + memset (&fmt, 0, sizeof (fmt)); + fmt.type = v4l2object->type; + fmt.fmt.pix.width = width; + fmt.fmt.pix.height = height; + fmt.fmt.pix.pixelformat = pixelformat; + fmt.fmt.pix.field = V4L2_FIELD_NONE; + + if (gst_v4l2_object_try_fmt (v4l2object, &fmt) == 0 && + gst_v4l2_object_get_interlace_mode (fmt.fmt.pix.field, &interlace_mode)) { + GValue interlace_enum = { 0, }; + g_value_init (&interlace_enum, G_TYPE_STRING); + g_value_set_string (&interlace_enum, mode_strings[interlace_mode]); + gst_value_list_append_and_take_value (&interlace_formats, &interlace_enum); + prev = interlace_mode; + } + + memset (&fmt, 0, sizeof (fmt)); + fmt.type = v4l2object->type; + fmt.fmt.pix.width = width; + fmt.fmt.pix.height = height; + fmt.fmt.pix.pixelformat = pixelformat; + fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; + + if (gst_v4l2_object_try_fmt (v4l2object, &fmt) == 0 && + gst_v4l2_object_get_interlace_mode (fmt.fmt.pix.field, &interlace_mode) && + prev != interlace_mode) { + GValue interlace_enum = { 0, }; + g_value_init (&interlace_enum, G_TYPE_STRING); + g_value_set_string (&interlace_enum, mode_strings[interlace_mode]); + gst_value_list_append_and_take_value (&interlace_formats, &interlace_enum); + } + + gst_v4l2src_value_simplify (&interlace_formats); + gst_structure_take_value (s, "interlace-mode", &interlace_formats); + return; +} + +static void +gst_v4l2_object_add_colorspace (GstV4l2Object * v4l2object, GstStructure * s, + guint32 width, guint32 height, guint32 pixelformat) +{ + struct v4l2_format fmt; + GValue colorimetry = G_VALUE_INIT; + GstVideoColorimetry cinfo; + + memset (&fmt, 0, sizeof (fmt)); + fmt.type = v4l2object->type; + fmt.fmt.pix.width = width; + fmt.fmt.pix.height = height; + fmt.fmt.pix.pixelformat = pixelformat; + + if (gst_v4l2_object_try_fmt (v4l2object, &fmt) == 0) { + enum v4l2_colorspace colorspace; + enum v4l2_quantization range; + enum v4l2_ycbcr_encoding matrix; + enum v4l2_xfer_func transfer; + + if (V4L2_TYPE_IS_MULTIPLANAR (v4l2object->type)) { + colorspace = fmt.fmt.pix_mp.colorspace; + range = fmt.fmt.pix_mp.quantization; + matrix = fmt.fmt.pix_mp.ycbcr_enc; + transfer = fmt.fmt.pix_mp.xfer_func; + } else { + colorspace = fmt.fmt.pix.colorspace; + range = fmt.fmt.pix.quantization; + matrix = fmt.fmt.pix.ycbcr_enc; + transfer = fmt.fmt.pix.xfer_func; + } + + if (gst_v4l2_object_get_colorspace (colorspace, range, matrix, transfer, + &cinfo)) { + g_value_init (&colorimetry, G_TYPE_STRING); + g_value_take_string (&colorimetry, + gst_video_colorimetry_to_string (&cinfo)); + gst_structure_take_value (s, "colorimetry", &colorimetry); + } + } + + return; +} + /* The frame interval enumeration code first appeared in Linux 2.6.19. */ static GstStructure * gst_v4l2_object_probe_caps_for_format_and_size (GstV4l2Object * v4l2object, @@ -1636,18 +1976,6 @@ guint32 num, denom; GstStructure *s; GValue rates = { 0, }; - gboolean interlaced; - gint int_width = width; - gint int_height = height; - - if (v4l2object->never_interlaced) { - interlaced = FALSE; - } else { - /* Interlaced detection using VIDIOC_TRY/S_FMT */ - if (!gst_v4l2_object_get_nearest_size (v4l2object, pixelformat, - &int_width, &int_height, &interlaced)) - return NULL; - } memset (&ival, 0, sizeof (struct v4l2_frmivalenum)); ival.index = 0; @@ -1807,9 +2135,9 @@ gst_structure_set (s, "width", G_TYPE_INT, (gint) width, "height", G_TYPE_INT, (gint) height, NULL); gst_v4l2_object_add_aspect_ratio (v4l2object, s); - if (g_str_equal (gst_structure_get_name (s), "video/x-raw")) - gst_structure_set (s, "interlace-mode", G_TYPE_STRING, - (interlaced ? "mixed" : "progressive"), NULL); + gst_v4l2_object_add_interlace_mode (v4l2object, s, width, height, + pixelformat); + gst_v4l2_object_add_colorspace (v4l2object, s, width, height, pixelformat); if (G_IS_VALUE (&rates)) { gst_v4l2src_value_simplify (&rates); @@ -1818,8 +2146,8 @@ gst_structure_take_value (s, "framerate", &rates); } else if (v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE || v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, - NULL); + gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, + 1, NULL); } return s; @@ -2072,19 +2400,18 @@ default_frame_sizes: { gint min_w, max_w, min_h, max_h, fix_num = 0, fix_denom = 0; - gboolean interlaced; /* This code is for Linux < 2.6.19 */ min_w = min_h = 1; max_w = max_h = GST_V4L2_MAX_SIZE; if (!gst_v4l2_object_get_nearest_size (v4l2object, pixelformat, &min_w, - &min_h, &interlaced)) { + &min_h)) { GST_WARNING_OBJECT (v4l2object->element, "Could not probe minimum capture size for pixelformat %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (pixelformat)); } if (!gst_v4l2_object_get_nearest_size (v4l2object, pixelformat, &max_w, - &max_h, &interlaced)) { + &max_h)) { GST_WARNING_OBJECT (v4l2object->element, "Could not probe maximum capture size for pixelformat %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (pixelformat)); @@ -2117,7 +2444,7 @@ v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { /* if norm can't be used, copy the template framerate */ gst_structure_set (tmp, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, - 100, 1, NULL); + G_MAXINT, 1, NULL); } if (min_w == max_w) @@ -2130,10 +2457,13 @@ else gst_structure_set (tmp, "height", GST_TYPE_INT_RANGE, min_h, max_h, NULL); - if (g_str_equal (gst_structure_get_name (tmp), "video/x-raw")) - gst_structure_set (tmp, "interlace-mode", G_TYPE_STRING, - (interlaced ? "mixed" : "progressive"), NULL); + /* We could consider setting interlace mode from min and max. */ + gst_v4l2_object_add_interlace_mode (v4l2object, tmp, max_w, max_h, + pixelformat); gst_v4l2_object_add_aspect_ratio (v4l2object, tmp); + /* We could consider to check colorspace for min too, in case it depends on + * the size. But in this case, min and max could not be enough */ + gst_v4l2_object_add_colorspace (v4l2object, tmp, max_w, max_h, pixelformat); gst_v4l2_object_update_and_append (v4l2object, pixelformat, ret, tmp); return ret; @@ -2141,31 +2471,12 @@ } static gboolean -gst_v4l2_object_get_interlace (int field, gboolean * interlaced) -{ - switch (field) { - case V4L2_FIELD_ANY: - case V4L2_FIELD_NONE: - *interlaced = FALSE; - return TRUE; - case V4L2_FIELD_INTERLACED: - case V4L2_FIELD_INTERLACED_TB: - case V4L2_FIELD_INTERLACED_BT: - *interlaced = TRUE; - return TRUE; - default: - return FALSE; - } -} - -static gboolean gst_v4l2_object_get_nearest_size (GstV4l2Object * v4l2object, - guint32 pixelformat, gint * width, gint * height, gboolean * interlaced) + guint32 pixelformat, gint * width, gint * height) { struct v4l2_format fmt; - int fd; - int r; gboolean ret = FALSE; + GstVideoInterlaceMode interlace_mode; g_return_val_if_fail (width != NULL, FALSE); g_return_val_if_fail (height != NULL, FALSE); @@ -2174,8 +2485,6 @@ "getting nearest size to %dx%d with format %" GST_FOURCC_FORMAT, *width, *height, GST_FOURCC_ARGS (pixelformat)); - fd = v4l2object->video_fd; - memset (&fmt, 0, sizeof (struct v4l2_format)); /* get size delimiters */ @@ -2184,58 +2493,10 @@ fmt.fmt.pix.width = *width; fmt.fmt.pix.height = *height; fmt.fmt.pix.pixelformat = pixelformat; - fmt.fmt.pix.field = V4L2_FIELD_NONE; - - r = v4l2_ioctl (fd, VIDIOC_TRY_FMT, &fmt); - if ((r < 0 && errno == EINVAL) || - !gst_v4l2_object_get_interlace (fmt.fmt.pix.field, interlaced)) { - /* try again with interlaced video */ - memset (&fmt, 0, sizeof (fmt)); - fmt.type = v4l2object->type; - fmt.fmt.pix.width = *width; - fmt.fmt.pix.height = *height; - fmt.fmt.pix.pixelformat = pixelformat; - fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; - r = v4l2_ioctl (fd, VIDIOC_TRY_FMT, &fmt); - } - - if (r < 0) { - /* The driver might not implement TRY_FMT, in which case we will try - S_FMT to probe */ - if (errno != ENOTTY) - goto error; - - /* Only try S_FMT if we're not actively capturing yet, which we shouldn't - be, because we're still probing */ - if (GST_V4L2_IS_ACTIVE (v4l2object)) - goto error; - - GST_LOG_OBJECT (v4l2object->element, - "Failed to probe size limit with VIDIOC_TRY_FMT, trying VIDIOC_S_FMT"); + fmt.fmt.pix.field = V4L2_FIELD_ANY; - memset (&fmt, 0, sizeof (fmt)); - fmt.type = v4l2object->type; - fmt.fmt.pix.width = *width; - fmt.fmt.pix.height = *height; - fmt.fmt.pix.pixelformat = pixelformat; - fmt.fmt.pix.field = V4L2_FIELD_NONE; - - r = v4l2_ioctl (fd, VIDIOC_S_FMT, &fmt); - if ((r < 0 && errno == EINVAL) || - !gst_v4l2_object_get_interlace (fmt.fmt.pix.field, interlaced)) { - /* try again with interlaced video */ - memset (&fmt, 0, sizeof (fmt)); - fmt.type = v4l2object->type; - fmt.fmt.pix.width = *width; - fmt.fmt.pix.height = *height; - fmt.fmt.pix.pixelformat = pixelformat; - fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; - r = v4l2_ioctl (fd, VIDIOC_S_FMT, &fmt); - } - - if (r < 0) - goto error; - } + if (gst_v4l2_object_try_fmt (v4l2object, &fmt) < 0) + goto error; GST_LOG_OBJECT (v4l2object->element, "got nearest size %dx%d", fmt.fmt.pix.width, fmt.fmt.pix.height); @@ -2243,7 +2504,7 @@ *width = fmt.fmt.pix.width; *height = fmt.fmt.pix.height; - if (!gst_v4l2_object_get_interlace (fmt.fmt.pix.field, interlaced)) { + if (!gst_v4l2_object_get_interlace_mode (fmt.fmt.pix.field, &interlace_mode)) { GST_WARNING_OBJECT (v4l2object->element, "Unsupported field type for %" GST_FOURCC_FORMAT "@%ux%u: %u", GST_FOURCC_ARGS (pixelformat), *width, *height, fmt.fmt.pix.field); @@ -2266,7 +2527,8 @@ { GstV4l2IOMode mode; - GST_DEBUG_OBJECT (v4l2object->element, "initializing the capture system"); + GST_DEBUG_OBJECT (v4l2object->element, "initializing the %s system", + V4L2_TYPE_IS_OUTPUT (v4l2object->type) ? "output" : "capture"); GST_V4L2_CHECK_OPEN (v4l2object); GST_V4L2_CHECK_NOT_ACTIVE (v4l2object); @@ -2293,6 +2555,11 @@ GST_INFO_OBJECT (v4l2object->element, "accessing buffers via mode %d", mode); v4l2object->mode = mode; + /* If min_buffers is not set, the driver either does not support the control or + it has not been asked yet via propose_allocation/decide_allocation. */ + if (!v4l2object->min_buffers) + gst_v4l2_get_driver_min_buffers (v4l2object); + /* Map the buffers */ GST_LOG_OBJECT (v4l2object->element, "initiating buffer pool"); @@ -2367,19 +2634,7 @@ padded_height = info->height + align->padding_top + align->padding_bottom; for (i = 0; i < finfo->n_planes; i++) { - switch (finfo->format) { - case GST_VIDEO_FORMAT_NV12: - case GST_VIDEO_FORMAT_NV12_64Z32: - case GST_VIDEO_FORMAT_NV21: - case GST_VIDEO_FORMAT_NV16: - case GST_VIDEO_FORMAT_NV24: - estride = (i == 0 ? 1 : 2) * - GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (finfo, i, stride); - break; - default: - estride = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (finfo, i, stride); - break; - } + estride = gst_v4l2_object_extrapolate_stride (finfo, i, stride); gst_v4l2_object_set_stride (info, align, i, estride); @@ -2522,8 +2777,32 @@ } } -gboolean -gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps) +gint +gst_v4l2_object_extrapolate_stride (const GstVideoFormatInfo * finfo, + gint plane, gint stride) +{ + gint estride; + + switch (finfo->format) { + case GST_VIDEO_FORMAT_NV12: + case GST_VIDEO_FORMAT_NV12_64Z32: + case GST_VIDEO_FORMAT_NV21: + case GST_VIDEO_FORMAT_NV16: + case GST_VIDEO_FORMAT_NV24: + estride = (plane == 0 ? 1 : 2) * + GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (finfo, plane, stride); + break; + default: + estride = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (finfo, plane, stride); + break; + } + + return estride; +} + +static gboolean +gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps, + gboolean try_only) { gint fd = v4l2object->video_fd; struct v4l2_format format; @@ -2536,10 +2815,15 @@ gint width, height, fps_n, fps_d; gint n_v4l_planes; gint i = 0; - gboolean is_mplane, format_changed; + gboolean is_mplane; + enum v4l2_colorspace colorspace = 0; + enum v4l2_quantization range = 0; + enum v4l2_ycbcr_encoding matrix = 0; + enum v4l2_xfer_func transfer = 0; GST_V4L2_CHECK_OPEN (v4l2object); - GST_V4L2_CHECK_NOT_ACTIVE (v4l2object); + if (!try_only) + GST_V4L2_CHECK_NOT_ACTIVE (v4l2object); is_mplane = V4L2_TYPE_IS_MULTIPLANAR (v4l2object->type); @@ -2572,62 +2856,140 @@ field = V4L2_FIELD_NONE; } - GST_DEBUG_OBJECT (v4l2object->element, "Desired format %dx%d, format " - "%" GST_FOURCC_FORMAT " stride: %d", width, height, - GST_FOURCC_ARGS (pixelformat), GST_VIDEO_INFO_PLANE_STRIDE (&info, 0)); - - memset (&format, 0x00, sizeof (struct v4l2_format)); - format.type = v4l2object->type; + if (V4L2_TYPE_IS_OUTPUT (v4l2object->type)) { + /* We first pick th main colorspace from the primaries */ + switch (info.colorimetry.primaries) { + case GST_VIDEO_COLOR_PRIMARIES_BT709: + /* There is two colorspaces using these primaries, use the range to + * differentiate */ + if (info.colorimetry.range == GST_VIDEO_COLOR_RANGE_16_235) + colorspace = V4L2_COLORSPACE_REC709; + else + colorspace = V4L2_COLORSPACE_SRGB; + break; + case GST_VIDEO_COLOR_PRIMARIES_BT470M: + colorspace = V4L2_COLORSPACE_470_SYSTEM_M; + break; + case GST_VIDEO_COLOR_PRIMARIES_BT470BG: + colorspace = V4L2_COLORSPACE_470_SYSTEM_BG; + break; + case GST_VIDEO_COLOR_PRIMARIES_SMPTE170M: + colorspace = V4L2_COLORSPACE_SMPTE170M; + break; + case GST_VIDEO_COLOR_PRIMARIES_SMPTE240M: + colorspace = V4L2_COLORSPACE_SMPTE240M; + break; + + case GST_VIDEO_COLOR_PRIMARIES_FILM: + case GST_VIDEO_COLOR_PRIMARIES_UNKNOWN: + /* We don't know, we will guess */ + break; - if (v4l2object->no_initial_format) { - format_changed = TRUE; - } else { - if (v4l2_ioctl (fd, VIDIOC_G_FMT, &format) < 0) - goto get_fmt_failed; + default: + GST_WARNING_OBJECT (v4l2object->element, + "Unknown colorimetry primaries %d", info.colorimetry.primaries); + break; + } - /* Note that four first fields are the same between v4l2_pix_format and - * v4l2_pix_format_mplane, so we don't need to duplicate he checks */ + switch (info.colorimetry.range) { + case GST_VIDEO_COLOR_RANGE_0_255: + range = V4L2_QUANTIZATION_FULL_RANGE; + break; + case GST_VIDEO_COLOR_RANGE_16_235: + range = V4L2_QUANTIZATION_LIM_RANGE; + break; + case GST_VIDEO_COLOR_RANGE_UNKNOWN: + /* We let the driver pick a default one */ + break; + default: + GST_WARNING_OBJECT (v4l2object->element, + "Unknown colorimetry range %d", info.colorimetry.range); + break; + } - /* If no size in caps, use configured size */ - if (width == 0 && height == 0) { - width = format.fmt.pix_mp.width; - height = format.fmt.pix_mp.height; - } - - format_changed = format.type != v4l2object->type || - format.fmt.pix_mp.width != width || - format.fmt.pix_mp.height != height || - format.fmt.pix_mp.pixelformat != pixelformat || - format.fmt.pix_mp.field != field; - } + switch (info.colorimetry.matrix) { + case GST_VIDEO_COLOR_MATRIX_RGB: + /* Unspecified, leave to default */ + break; + /* FCC is about the same as BT601 with less digit */ + case GST_VIDEO_COLOR_MATRIX_FCC: + case GST_VIDEO_COLOR_MATRIX_BT601: + matrix = V4L2_YCBCR_ENC_601; + break; + case GST_VIDEO_COLOR_MATRIX_BT709: + matrix = V4L2_YCBCR_ENC_709; + break; + case GST_VIDEO_COLOR_MATRIX_SMPTE240M: + matrix = V4L2_YCBCR_ENC_SMPTE240M; + break; + case GST_VIDEO_COLOR_MATRIX_BT2020: + matrix = V4L2_YCBCR_ENC_BT2020; + break; + case GST_VIDEO_COLOR_MATRIX_UNKNOWN: + /* We let the driver pick a default one */ + break; + default: + GST_WARNING_OBJECT (v4l2object->element, + "Unknown colorimetry matrix %d", info.colorimetry.matrix); + break; + } -#ifndef GST_DISABLE_GST_DEBUG - if (is_mplane) { - GST_DEBUG_OBJECT (v4l2object->element, "Current size is %dx%d, format " - "%" GST_FOURCC_FORMAT " colorspace %d, nb planes %d", - format.fmt.pix_mp.width, format.fmt.pix_mp.height, - GST_FOURCC_ARGS (format.fmt.pix.pixelformat), - format.fmt.pix_mp.colorspace, format.fmt.pix_mp.num_planes); + switch (info.colorimetry.transfer) { + case GST_VIDEO_TRANSFER_GAMMA18: + case GST_VIDEO_TRANSFER_GAMMA20: + case GST_VIDEO_TRANSFER_GAMMA22: + case GST_VIDEO_TRANSFER_GAMMA28: + GST_WARNING_OBJECT (v4l2object->element, + "GAMMA 18, 20, 22, 28 transfer functions not supported"); + /* fallthrough */ + case GST_VIDEO_TRANSFER_GAMMA10: + transfer = V4L2_XFER_FUNC_NONE; + break; + case GST_VIDEO_TRANSFER_BT709: + transfer = V4L2_XFER_FUNC_709; + break; + case GST_VIDEO_TRANSFER_SMPTE240M: + transfer = V4L2_XFER_FUNC_SMPTE240M; + break; + case GST_VIDEO_TRANSFER_SRGB: + transfer = V4L2_XFER_FUNC_SRGB; + break; + case GST_VIDEO_TRANSFER_LOG100: + case GST_VIDEO_TRANSFER_LOG316: + GST_WARNING_OBJECT (v4l2object->element, + "LOG 100, 316 transfer functions not supported"); + /* FIXME No known sensible default, maybe AdobeRGB ? */ + break; + case GST_VIDEO_TRANSFER_UNKNOWN: + /* We let the driver pick a default one */ + break; + default: + GST_WARNING_OBJECT (v4l2object->element, + "Unknown colorimetry tranfer %d", info.colorimetry.transfer); + break; + } - for (i = 0; i < format.fmt.pix_mp.num_planes; i++) - GST_DEBUG_OBJECT (v4l2object->element, " stride %d", - format.fmt.pix_mp.plane_fmt[i].bytesperline); - } else { - GST_DEBUG_OBJECT (v4l2object->element, "Current size is %dx%d, format " - "%" GST_FOURCC_FORMAT " stride %d, colorspace %d", - format.fmt.pix.width, format.fmt.pix.height, - GST_FOURCC_ARGS (format.fmt.pix.pixelformat), - format.fmt.pix.bytesperline, format.fmt.pix.colorspace); + if (colorspace == 0) { + /* Try to guess colorspace according to pixelformat and size */ + if (GST_VIDEO_INFO_IS_YUV (&info)) { + /* SD streams likely use SMPTE170M and HD streams REC709 */ + if (width <= 720 && height <= 576) + colorspace = V4L2_COLORSPACE_SMPTE170M; + else + colorspace = V4L2_COLORSPACE_REC709; + } else if (GST_VIDEO_INFO_IS_RGB (&info)) { + colorspace = V4L2_COLORSPACE_SRGB; + transfer = V4L2_XFER_FUNC_NONE; + } + } } -#endif - /* If nothing changed, we are done */ - if (!format_changed) - goto done; + GST_DEBUG_OBJECT (v4l2object->element, "Desired format %dx%d, format " + "%" GST_FOURCC_FORMAT " stride: %d", width, height, + GST_FOURCC_ARGS (pixelformat), GST_VIDEO_INFO_PLANE_STRIDE (&info, 0)); - /* something different, set the format */ - GST_DEBUG_OBJECT (v4l2object->element, "Setting format to %dx%d, format " - "%" GST_FOURCC_FORMAT, width, height, GST_FOURCC_ARGS (pixelformat)); + memset (&format, 0x00, sizeof (struct v4l2_format)); + format.type = v4l2object->type; if (is_mplane) { format.type = v4l2object->type; @@ -2688,14 +3050,37 @@ } #endif - if (v4l2_ioctl (fd, VIDIOC_S_FMT, &format) < 0) - goto set_fmt_failed; + if (V4L2_TYPE_IS_OUTPUT (v4l2object->type)) { + if (is_mplane) { + format.fmt.pix_mp.colorspace = colorspace; + format.fmt.pix_mp.quantization = range; + format.fmt.pix_mp.ycbcr_enc = matrix; + format.fmt.pix_mp.xfer_func = transfer; + } else { + format.fmt.pix.colorspace = colorspace; + format.fmt.pix.quantization = range; + format.fmt.pix.ycbcr_enc = matrix; + format.fmt.pix.xfer_func = transfer; + } + + GST_DEBUG_OBJECT (v4l2object->element, "Desired colorspace is %d:%d:%d:%d", + colorspace, range, matrix, transfer); + } + + if (try_only) { + if (v4l2_ioctl (fd, VIDIOC_TRY_FMT, &format) < 0) + goto try_fmt_failed; + } else { + if (v4l2_ioctl (fd, VIDIOC_S_FMT, &format) < 0) + goto set_fmt_failed; + } GST_DEBUG_OBJECT (v4l2object->element, "Got format of %dx%d, format " - "%" GST_FOURCC_FORMAT ", nb planes %d", format.fmt.pix.width, - format.fmt.pix_mp.height, + "%" GST_FOURCC_FORMAT ", nb planes %d, colorspace %d", + format.fmt.pix.width, format.fmt.pix_mp.height, GST_FOURCC_ARGS (format.fmt.pix.pixelformat), - is_mplane ? format.fmt.pix_mp.num_planes : 1); + is_mplane ? format.fmt.pix_mp.num_planes : 1, + is_mplane ? format.fmt.pix_mp.colorspace : format.fmt.pix.colorspace); #ifndef GST_DISABLE_GST_DEBUG if (is_mplane) { @@ -2731,6 +3116,9 @@ if (is_mplane && format.fmt.pix_mp.num_planes != n_v4l_planes) goto invalid_planes; + if (try_only) /* good enough for trying only */ + return TRUE; + if (GST_VIDEO_INFO_HAS_ALPHA (&info)) { struct v4l2_control ctl = { 0, }; ctl.id = V4L2_CID_ALPHA_COMPONENT; @@ -2784,12 +3172,19 @@ if (v4l2_ioctl (fd, VIDIOC_S_PARM, &streamparm) < 0) goto set_parm_failed; - /* get new values */ - fps_d = streamparm.parm.capture.timeperframe.numerator; - fps_n = streamparm.parm.capture.timeperframe.denominator; + if (streamparm.parm.capture.timeperframe.numerator > 0 && + streamparm.parm.capture.timeperframe.denominator > 0) { + /* get new values */ + fps_d = streamparm.parm.capture.timeperframe.numerator; + fps_n = streamparm.parm.capture.timeperframe.denominator; - GST_INFO_OBJECT (v4l2object->element, "Set framerate to %u/%u", fps_n, - fps_d); + GST_INFO_OBJECT (v4l2object->element, "Set framerate to %u/%u", fps_n, + fps_d); + } else { + /* fix v4l2 capture driver to provide framerate values */ + GST_WARNING_OBJECT (v4l2object->element, + "Reuse caps framerate %u/%u - fix v4l2 capture driver", fps_n, fps_d); + } GST_VIDEO_INFO_FPS_N (&info) = fps_n; GST_VIDEO_INFO_FPS_D (&info) = fps_d; @@ -2812,12 +3207,15 @@ caps); return FALSE; } -get_fmt_failed: +try_fmt_failed: { - GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, - (_("Device '%s' does not support video capture"), - v4l2object->videodev), - ("Call to G_FMT failed: (%s)", g_strerror (errno))); + if (errno == EBUSY) { + GST_ELEMENT_WARNING (v4l2object->element, RESOURCE, BUSY, + (_("Device '%s' is busy"), v4l2object->videodev), + ("Call to TRY_FMT failed for %" GST_FOURCC_FORMAT " @ %dx%d: %s", + GST_FOURCC_ARGS (pixelformat), width, height, + g_strerror (errno))); + } return FALSE; } set_fmt_failed: @@ -2840,30 +3238,36 @@ } invalid_dimensions: { - GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, - (_("Device '%s' cannot capture at %dx%d"), - v4l2object->videodev, width, height), - ("Tried to capture at %dx%d, but device returned size %dx%d", - width, height, format.fmt.pix.width, format.fmt.pix.height)); + if (!try_only) { + GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, + (_("Device '%s' cannot capture at %dx%d"), + v4l2object->videodev, width, height), + ("Tried to capture at %dx%d, but device returned size %dx%d", + width, height, format.fmt.pix.width, format.fmt.pix.height)); + } return FALSE; } invalid_pixelformat: { - GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, - (_("Device '%s' cannot capture in the specified format"), - v4l2object->videodev), - ("Tried to capture in %" GST_FOURCC_FORMAT - ", but device returned format" " %" GST_FOURCC_FORMAT, - GST_FOURCC_ARGS (pixelformat), - GST_FOURCC_ARGS (format.fmt.pix.pixelformat))); + if (!try_only) { + GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, + (_("Device '%s' cannot capture in the specified format"), + v4l2object->videodev), + ("Tried to capture in %" GST_FOURCC_FORMAT + ", but device returned format" " %" GST_FOURCC_FORMAT, + GST_FOURCC_ARGS (pixelformat), + GST_FOURCC_ARGS (format.fmt.pix.pixelformat))); + } return FALSE; } invalid_planes: { - GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, - (_("Device '%s' does support non-contiguous planes"), - v4l2object->videodev), - ("Device wants %d planes", format.fmt.pix_mp.num_planes)); + if (!try_only) { + GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, + (_("Device '%s' does support non-contiguous planes"), + v4l2object->videodev), + ("Device wants %d planes", format.fmt.pix_mp.num_planes)); + } return FALSE; } get_parm_failed: @@ -2890,6 +3294,18 @@ } } +gboolean +gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps) +{ + return gst_v4l2_object_set_format_full (v4l2object, caps, FALSE); +} + +gboolean +gst_v4l2_object_try_format (GstV4l2Object * v4l2object, GstCaps * caps) +{ + return gst_v4l2_object_set_format_full (v4l2object, caps, TRUE); +} + /** * gst_v4l2_object_acquire_format: * @v4l2object the object @@ -3026,6 +3442,11 @@ return FALSE; } + if (v4l2_ioctl (obj->video_fd, VIDIOC_G_CROP, &crop) < 0) { + GST_WARNING_OBJECT (obj->element, "VIDIOC_G_CROP failed"); + return FALSE; + } + GST_DEBUG_OBJECT (obj->element, "Got cropping left %u, top %u, size %ux%u", crop.c.left, crop.c.top, crop.c.width, crop.c.height); @@ -3163,7 +3584,6 @@ gboolean update; gboolean has_video_meta; gboolean can_share_own_pool, pushing_from_our_pool = FALSE; - struct v4l2_control ctl = { 0, }; GstAllocator *allocator = NULL; GstAllocationParams params = { 0 }; @@ -3200,6 +3620,11 @@ can_share_own_pool = (has_video_meta || !obj->need_video_meta); + gst_v4l2_get_driver_min_buffers (obj); + /* We can't share our own pool, if it exceed V4L2 capacity */ + if (min + obj->min_buffers + 1 > VIDEO_MAX_FRAME) + can_share_own_pool = FALSE; + /* select a pool */ switch (obj->mode) { case GST_V4L2_IO_RW: @@ -3267,16 +3692,6 @@ if (size == 0) goto no_size; - /* Certain driver may expose a minimum through controls */ - ctl.id = V4L2_CID_MIN_BUFFERS_FOR_CAPTURE; - if (v4l2_ioctl (obj->video_fd, VIDIOC_G_CTRL, &ctl) >= 0) { - GST_DEBUG_OBJECT (obj->element, "driver require a minimum of %d buffers", - ctl.value); - obj->min_buffers_for_capture = ctl.value; - } else { - obj->min_buffers_for_capture = 0; - } - /* If pushing from our own pool, configure it with queried minimum, * otherwise use the minimum required */ if (pushing_from_our_pool) { @@ -3284,11 +3699,23 @@ * to fill the pipeline, the minimum required to decoder according to the * driver and 1 more, so we don't endup up with everything downstream or * held by the decoder. */ - own_min = min + obj->min_buffers_for_capture + 1; + own_min = min + obj->min_buffers + 1; + + /* If no allocation parameters where provided, allow for a little more + * buffers and enable copy threshold */ + if (!update) { + own_min += 3; + gst_v4l2_buffer_pool_copy_at_threshold (GST_V4L2_BUFFER_POOL (pool), + TRUE); + } else { + gst_v4l2_buffer_pool_copy_at_threshold (GST_V4L2_BUFFER_POOL (pool), + FALSE); + } + } else { /* In this case we'll have to configure two buffer pool. For our buffer * pool, we'll need what the driver one, and one more, so we can dequeu */ - own_min = obj->min_buffers_for_capture + 1; + own_min = obj->min_buffers + 1; own_min = MAX (own_min, GST_V4L2_MIN_BUFFERS); /* for the downstream pool, we keep what downstream wants, though ensure @@ -3306,16 +3733,8 @@ max = MAX (min, max); /* First step, configure our own pool */ - config = gst_buffer_pool_get_config (obj->pool); - /* If already configured/active, skip it */ - /* FIXME not entirely correct, See bug 728268 */ - if (gst_buffer_pool_is_active (obj->pool)) { - gst_structure_free (config); - goto setup_other_pool; - } - if (obj->need_video_meta || has_video_meta) { GST_DEBUG_OBJECT (obj->element, "activate Video Meta"); gst_buffer_pool_config_add_option (config, @@ -3340,16 +3759,11 @@ goto config_failed; } -setup_other_pool: - /* Now configure the other pool if different */ if (obj->pool != pool) other_pool = pool; if (other_pool) { - if (gst_buffer_pool_is_active (other_pool)) - goto done; - config = gst_buffer_pool_get_config (other_pool); gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); gst_buffer_pool_config_set_params (config, caps, size, min, max); @@ -3386,7 +3800,6 @@ gst_structure_free (config); } -done: if (update) gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max); else @@ -3474,6 +3887,9 @@ } gst_structure_free (config); } + gst_v4l2_get_driver_min_buffers (obj); + + min = MAX (obj->min_buffers, GST_V4L2_MIN_BUFFERS); gst_query_add_allocation_pool (query, pool, size, min, max); diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2object.h gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2object.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2object.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2object.h 2015-10-22 08:02:54.000000000 +0000 @@ -118,8 +118,11 @@ gboolean prefered_non_contiguous; /* This will be set if supported in decide_allocation. It can be used to - * calculate the minimum latency of a m2m decoder. */ - guint32 min_buffers_for_capture; + * calculate the minimum latency. */ + guint32 min_buffers; + + /* This will be set if supported in propose allocation. */ + guint32 min_buffers_for_output; /* wanted mode */ GstV4l2IOMode req_mode; @@ -244,7 +247,11 @@ GstCaps* gst_v4l2_object_get_codec_caps (void); +gint gst_v4l2_object_extrapolate_stride (const GstVideoFormatInfo * finfo, + gint plane, gint stride); + gboolean gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps); +gboolean gst_v4l2_object_try_format (GstV4l2Object * v4l2object, GstCaps * caps); gboolean gst_v4l2_object_caps_equal (GstV4l2Object * v4l2object, GstCaps * caps); diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2sink.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2sink.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2sink.c 2014-09-11 09:57:06.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2sink.c 2015-10-22 08:02:54.000000000 +0000 @@ -116,6 +116,8 @@ static gboolean gst_v4l2sink_set_caps (GstBaseSink * bsink, GstCaps * caps); static GstFlowReturn gst_v4l2sink_show_frame (GstVideoSink * bsink, GstBuffer * buf); +static gboolean gst_v4l2sink_unlock (GstBaseSink * sink); +static gboolean gst_v4l2sink_unlock_stop (GstBaseSink * sink); static void gst_v4l2sink_class_init (GstV4l2SinkClass * klass) @@ -185,6 +187,8 @@ basesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_v4l2sink_set_caps); basesink_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_v4l2sink_propose_allocation); + basesink_class->unlock = GST_DEBUG_FUNCPTR (gst_v4l2sink_unlock); + basesink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_v4l2sink_unlock_stop); videosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_v4l2sink_show_frame); @@ -317,6 +321,11 @@ return; } + if (v4l2_ioctl (fd, VIDIOC_G_CROP, &crop) < 0) { + GST_WARNING_OBJECT (v4l2sink, "VIDIOC_G_CROP failed"); + return; + } + v4l2sink->crop_fields_set = 0; v4l2sink->crop = crop.c; } @@ -486,7 +495,7 @@ LOG_CAPS (v4l2sink, caps); - if (!GST_V4L2_IS_OPEN (v4l2sink->v4l2object)) { + if (!GST_V4L2_IS_OPEN (obj)) { GST_DEBUG_OBJECT (v4l2sink, "device is not open"); return FALSE; } @@ -498,16 +507,16 @@ if (!gst_v4l2_object_stop (obj)) goto stop_failed; - if (!gst_v4l2_object_set_format (v4l2sink->v4l2object, caps)) + if (!gst_v4l2_object_set_format (obj, caps)) goto invalid_format; gst_v4l2sink_sync_overlay_fields (v4l2sink); gst_v4l2sink_sync_crop_fields (v4l2sink); - GST_INFO_OBJECT (v4l2sink, "outputting buffers via mmap()"); + GST_INFO_OBJECT (v4l2sink, "outputting buffers via mode %u", obj->mode); - v4l2sink->video_width = GST_V4L2_WIDTH (v4l2sink->v4l2object); - v4l2sink->video_height = GST_V4L2_HEIGHT (v4l2sink->v4l2object); + v4l2sink->video_width = GST_V4L2_WIDTH (obj); + v4l2sink->video_height = GST_V4L2_HEIGHT (obj); /* TODO: videosink width/height should be scaled according to * pixel-aspect-ratio @@ -608,3 +617,17 @@ return GST_FLOW_ERROR; } } + +static gboolean +gst_v4l2sink_unlock (GstBaseSink * sink) +{ + GstV4l2Sink *v4l2sink = GST_V4L2SINK (sink); + return gst_v4l2_object_unlock (v4l2sink->v4l2object); +} + +static gboolean +gst_v4l2sink_unlock_stop (GstBaseSink * sink) +{ + GstV4l2Sink *v4l2sink = GST_V4L2SINK (sink); + return gst_v4l2_object_unlock_stop (v4l2sink->v4l2object); +} diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2src.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2src.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2src.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2src.c 2015-10-22 08:02:54.000000000 +0000 @@ -270,10 +270,13 @@ if (gst_structure_has_field (structure, "framerate")) gst_structure_fixate_field_nearest_fraction (structure, "framerate", - G_MAXINT, 1); + 100, 1); if (gst_structure_has_field (structure, "format")) gst_structure_fixate_field (structure, "format"); + + if (gst_structure_has_field (structure, "interlace-mode")) + gst_structure_fixate_field (structure, "interlace-mode"); } GST_DEBUG_OBJECT (basesrc, "fixated caps %" GST_PTR_FORMAT, caps); @@ -287,20 +290,11 @@ static gboolean gst_v4l2src_negotiate (GstBaseSrc * basesrc) { - GstV4l2Src *v4l2src; - GstV4l2Object *obj; GstCaps *thiscaps; GstCaps *caps = NULL; GstCaps *peercaps = NULL; gboolean result = FALSE; - v4l2src = GST_V4L2SRC (basesrc); - obj = v4l2src->v4l2object; - - /* We don't allow renegotiation, just return TRUE in that case */ - if (GST_V4L2_IS_ACTIVE (obj)) - return TRUE; - /* first see what is possible on our source pad */ thiscaps = gst_pad_query_caps (GST_BASE_SRC_PAD (basesrc), NULL); GST_DEBUG_OBJECT (basesrc, "caps of src: %" GST_PTR_FORMAT, thiscaps); @@ -429,6 +423,23 @@ } static gboolean +gst_v4l2src_set_format (GstV4l2Src * v4l2src, GstCaps * caps) +{ + GstV4l2Object *obj; + + obj = v4l2src->v4l2object; + + g_signal_emit (v4l2src, gst_v4l2_signals[SIGNAL_PRE_SET_FORMAT], 0, + v4l2src->v4l2object->video_fd, caps); + + if (!gst_v4l2_object_set_format (obj, caps)) + /* error already posted */ + return FALSE; + + return TRUE; +} + +static gboolean gst_v4l2src_set_caps (GstBaseSrc * src, GstCaps * caps) { GstV4l2Src *v4l2src; @@ -441,16 +452,25 @@ if (gst_v4l2_object_caps_equal (obj, caps)) return TRUE; - /* make sure we stop capturing and dealloc buffers */ - if (!gst_v4l2_object_stop (obj)) - return FALSE; - - g_signal_emit (v4l2src, gst_v4l2_signals[SIGNAL_PRE_SET_FORMAT], 0, - v4l2src->v4l2object->video_fd, caps); + if (GST_V4L2_IS_ACTIVE (obj)) { + /* Just check if the format is acceptable, once we know + * no buffers should be outstanding we try S_FMT. + * + * Basesrc will do an allocation query that + * should indirectly reclaim buffers, after that we can + * set the format and then configure our pool */ + if (gst_v4l2_object_try_format (obj, caps)) { + v4l2src->renegotiation_adjust = v4l2src->offset + 1; + v4l2src->pending_set_fmt = TRUE; + } else + return FALSE; + } else { + /* make sure we stop capturing and dealloc buffers */ + if (!gst_v4l2_object_stop (obj)) + return FALSE; - if (!gst_v4l2_object_set_format (obj, caps)) - /* error already posted */ - return FALSE; + return gst_v4l2src_set_format (v4l2src, caps); + } return TRUE; } @@ -459,10 +479,23 @@ gst_v4l2src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query) { GstV4l2Src *src = GST_V4L2SRC (bsrc); - gboolean ret = FALSE; + gboolean ret = TRUE; + + if (src->pending_set_fmt) { + GstCaps *caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc)); + + if (!gst_v4l2_object_stop (src->v4l2object)) + return FALSE; + ret = gst_v4l2src_set_format (src, caps); + gst_caps_unref (caps); + src->pending_set_fmt = FALSE; + } - if (gst_v4l2_object_decide_allocation (src->v4l2object, query)) - ret = GST_BASE_SRC_CLASS (parent_class)->decide_allocation (bsrc, query); + if (ret) { + ret = gst_v4l2_object_decide_allocation (src->v4l2object, query); + if (ret) + ret = GST_BASE_SRC_CLASS (parent_class)->decide_allocation (bsrc, query); + } if (ret) { if (!gst_buffer_pool_set_active (src->v4l2object->pool, TRUE)) @@ -556,11 +589,15 @@ GstV4l2Src *v4l2src = GST_V4L2SRC (src); v4l2src->offset = 0; + v4l2src->renegotiation_adjust = 0; /* activate settings for first frame */ v4l2src->ctrl_time = 0; gst_object_sync_values (GST_OBJECT (src), v4l2src->ctrl_time); + v4l2src->has_bad_timestamp = FALSE; + v4l2src->last_timestamp = 0; + return TRUE; } @@ -575,6 +612,9 @@ gst_v4l2src_unlock_stop (GstBaseSrc * src) { GstV4l2Src *v4l2src = GST_V4L2SRC (src); + + v4l2src->last_timestamp = 0; + return gst_v4l2_object_unlock_stop (v4l2src->v4l2object); } @@ -588,6 +628,9 @@ if (!gst_v4l2_object_stop (obj)) return FALSE; } + + v4l2src->pending_set_fmt = FALSE; + return TRUE; } @@ -629,19 +672,23 @@ { GstV4l2Src *v4l2src = GST_V4L2SRC (src); GstV4l2Object *obj = v4l2src->v4l2object; + GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL_CAST (obj->pool); GstFlowReturn ret; GstClock *clock; GstClockTime abs_time, base_time, timestamp, duration; GstClockTime delay; + GstMessage *qos_msg; - ret = GST_BASE_SRC_CLASS (parent_class)->alloc (GST_BASE_SRC (src), 0, - obj->info.size, buf); + do { + ret = GST_BASE_SRC_CLASS (parent_class)->alloc (GST_BASE_SRC (src), 0, + obj->info.size, buf); - if (G_UNLIKELY (ret != GST_FLOW_OK)) - goto alloc_failed; + if (G_UNLIKELY (ret != GST_FLOW_OK)) + goto alloc_failed; - ret = - gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL_CAST (obj->pool), buf); + ret = gst_v4l2_buffer_pool_process (pool, buf); + + } while (ret == GST_V4L2_FLOW_CORRUPTED_BUFFER); if (G_UNLIKELY (ret != GST_FLOW_OK)) goto error; @@ -670,7 +717,8 @@ abs_time = GST_CLOCK_TIME_NONE; } - if (timestamp != GST_CLOCK_TIME_NONE) { +retry: + if (!v4l2src->has_bad_timestamp && timestamp != GST_CLOCK_TIME_NONE) { struct timespec now; GstClockTime gstnow; @@ -680,7 +728,7 @@ clock_gettime (CLOCK_MONOTONIC, &now); gstnow = GST_TIMESPEC_TO_TIME (now); - if (gstnow < timestamp && (timestamp - gstnow) > (10 * GST_SECOND)) { + if (timestamp > gstnow || (gstnow - timestamp) > (10 * GST_SECOND)) { GTimeVal now; /* very large diff, fall back to system time */ @@ -688,12 +736,39 @@ gstnow = GST_TIMEVAL_TO_TIME (now); } - if (gstnow > timestamp) { - delay = gstnow - timestamp; - } else { - delay = 0; + /* Detect buggy drivers here, and stop using their timestamp. Failing any + * of these condition would imply a very buggy driver: + * - Timestamp in the future + * - Timestamp is going backward compare to last seen timestamp + * - Timestamp is jumping forward for less then a frame duration + * - Delay is bigger then the actual timestamp + * */ + if (timestamp > gstnow) { + GST_WARNING_OBJECT (v4l2src, + "Timestamp in the future detected, ignoring driver timestamps"); + v4l2src->has_bad_timestamp = TRUE; + goto retry; + } + + if (v4l2src->last_timestamp > timestamp) { + GST_WARNING_OBJECT (v4l2src, + "Timestamp going backward, ignoring driver timestamps"); + v4l2src->has_bad_timestamp = TRUE; + goto retry; + } + + delay = gstnow - timestamp; + + if (delay > timestamp) { + GST_WARNING_OBJECT (v4l2src, + "Timestamp does not correlate with any clock, ignoring driver timestamps"); + v4l2src->has_bad_timestamp = TRUE; + goto retry; } + /* Save last timestamp for sanity checks */ + v4l2src->last_timestamp = timestamp; + GST_DEBUG_OBJECT (v4l2src, "ts: %" GST_TIME_FORMAT " now %" GST_TIME_FORMAT " delay %" GST_TIME_FORMAT, GST_TIME_ARGS (timestamp), GST_TIME_ARGS (gstnow), GST_TIME_ARGS (delay)); @@ -706,8 +781,6 @@ } /* set buffer metadata */ - GST_BUFFER_OFFSET (*buf) = v4l2src->offset++; - GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset; if (G_LIKELY (abs_time != GST_CLOCK_TIME_NONE)) { /* the time now is the time of the clock minus the base time */ @@ -736,6 +809,32 @@ GST_INFO_OBJECT (src, "sync to %" GST_TIME_FORMAT " out ts %" GST_TIME_FORMAT, GST_TIME_ARGS (v4l2src->ctrl_time), GST_TIME_ARGS (timestamp)); + /* use generated offset values only if there are not already valid ones + * set by the v4l2 device */ + if (!GST_BUFFER_OFFSET_IS_VALID (*buf) || !GST_BUFFER_OFFSET_END_IS_VALID (*buf)) { + GST_BUFFER_OFFSET (*buf) = v4l2src->offset++; + GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset; + } else { + /* adjust raw v4l2 device sequence, will restart at null in case of renegotiation + * (streamoff/streamon) */ + GST_BUFFER_OFFSET (*buf) += v4l2src->renegotiation_adjust; + GST_BUFFER_OFFSET_END (*buf) += v4l2src->renegotiation_adjust; + /* check for frame loss with given (from v4l2 device) buffer offset */ + if ((v4l2src->offset != 0) && (GST_BUFFER_OFFSET (*buf) != (v4l2src->offset + 1))) { + guint64 lost_frame_count = GST_BUFFER_OFFSET (*buf) - v4l2src->offset - 1; + GST_WARNING_OBJECT (v4l2src, + "lost frames detected: count = %" G_GUINT64_FORMAT " - ts: %" GST_TIME_FORMAT, + lost_frame_count, GST_TIME_ARGS (timestamp)); + + qos_msg = gst_message_new_qos (GST_OBJECT_CAST (v4l2src), TRUE, + GST_CLOCK_TIME_NONE, GST_CLOCK_TIME_NONE, timestamp, + GST_CLOCK_TIME_IS_VALID (duration) ? lost_frame_count * duration : GST_CLOCK_TIME_NONE); + gst_element_post_message (GST_ELEMENT_CAST (v4l2src), qos_msg); + + } + v4l2src->offset = GST_BUFFER_OFFSET (*buf); + } + GST_BUFFER_TIMESTAMP (*buf) = timestamp; GST_BUFFER_DURATION (*buf) = duration; @@ -751,8 +850,15 @@ } error: { - GST_DEBUG_OBJECT (src, "error processing buffer %d (%s)", ret, - gst_flow_get_name (ret)); + if (ret == GST_V4L2_FLOW_LAST_BUFFER) { + GST_ELEMENT_ERROR (src, RESOURCE, FAILED, + ("Driver returned a buffer with no payload, this most likely " + "indicate a bug in the driver."), (NULL)); + ret = GST_FLOW_ERROR; + } else { + GST_DEBUG_OBJECT (src, "error processing buffer %d (%s)", ret, + gst_flow_get_name (ret)); + } return ret; } } diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2src.h gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2src.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2src.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2src.h 2015-10-22 08:02:54.000000000 +0000 @@ -59,7 +59,16 @@ guint64 offset; + /* offset adjust after renegotiation */ + guint64 renegotiation_adjust; + GstClockTime ctrl_time; + + gboolean pending_set_fmt; + + /* Timestamp sanity check */ + GstClockTime last_timestamp; + gboolean has_bad_timestamp; }; struct _GstV4l2SrcClass diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2transform.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2transform.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2transform.c 2014-09-11 09:57:06.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2transform.c 2015-10-22 08:02:54.000000000 +0000 @@ -173,7 +173,7 @@ gst_v4l2_object_close (self->v4l2capture); gst_caps_replace (&self->probed_srccaps, NULL); - gst_caps_replace (&self->probed_srccaps, NULL); + gst_caps_replace (&self->probed_sinkcaps, NULL); } static gboolean @@ -375,7 +375,7 @@ && gst_caps_features_is_equal (f, GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) gst_structure_remove_fields (st, "format", "colorimetry", "chroma-site", - NULL); + "width", "height", NULL); gst_caps_append_structure_full (res, st, gst_caps_features_copy (f)); } @@ -414,24 +414,438 @@ gst_v4l2_transform_fixate_caps (GstBaseTransform * trans, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps) { - GstCaps *result; + GstStructure *ins, *outs; + const GValue *from_par, *to_par; + GValue fpar = { 0, }, tpar = { + 0,}; + + othercaps = gst_caps_truncate (othercaps); + othercaps = gst_caps_make_writable (othercaps); GST_DEBUG_OBJECT (trans, "trying to fixate othercaps %" GST_PTR_FORMAT " based on caps %" GST_PTR_FORMAT, othercaps, caps); - result = gst_caps_intersect (othercaps, caps); - if (gst_caps_is_empty (result)) { - gst_caps_unref (result); - result = othercaps; + ins = gst_caps_get_structure (caps, 0); + outs = gst_caps_get_structure (othercaps, 0); + + from_par = gst_structure_get_value (ins, "pixel-aspect-ratio"); + to_par = gst_structure_get_value (outs, "pixel-aspect-ratio"); + + /* If we're fixating from the sinkpad we always set the PAR and + * assume that missing PAR on the sinkpad means 1/1 and + * missing PAR on the srcpad means undefined + */ + if (direction == GST_PAD_SINK) { + if (!from_par) { + g_value_init (&fpar, GST_TYPE_FRACTION); + gst_value_set_fraction (&fpar, 1, 1); + from_par = &fpar; + } + if (!to_par) { + g_value_init (&tpar, GST_TYPE_FRACTION_RANGE); + gst_value_set_fraction_range_full (&tpar, 1, G_MAXINT, G_MAXINT, 1); + to_par = &tpar; + } } else { - gst_caps_unref (othercaps); + if (!to_par) { + g_value_init (&tpar, GST_TYPE_FRACTION); + gst_value_set_fraction (&tpar, 1, 1); + to_par = &tpar; + + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, + NULL); + } + if (!from_par) { + g_value_init (&fpar, GST_TYPE_FRACTION); + gst_value_set_fraction (&fpar, 1, 1); + from_par = &fpar; + } } - GST_DEBUG_OBJECT (trans, "now fixating %" GST_PTR_FORMAT, result); + /* we have both PAR but they might not be fixated */ + { + gint from_w, from_h, from_par_n, from_par_d, to_par_n, to_par_d; + gint w = 0, h = 0; + gint from_dar_n, from_dar_d; + gint num, den; + + /* from_par should be fixed */ + g_return_val_if_fail (gst_value_is_fixed (from_par), othercaps); + + from_par_n = gst_value_get_fraction_numerator (from_par); + from_par_d = gst_value_get_fraction_denominator (from_par); + + gst_structure_get_int (ins, "width", &from_w); + gst_structure_get_int (ins, "height", &from_h); + + gst_structure_get_int (outs, "width", &w); + gst_structure_get_int (outs, "height", &h); + + /* if both width and height are already fixed, we can't do anything + * about it anymore */ + if (w && h) { + guint n, d; + + GST_DEBUG_OBJECT (trans, "dimensions already set to %dx%d, not fixating", + w, h); + if (!gst_value_is_fixed (to_par)) { + if (gst_video_calculate_display_ratio (&n, &d, from_w, from_h, + from_par_n, from_par_d, w, h)) { + GST_DEBUG_OBJECT (trans, "fixating to_par to %dx%d", n, d); + if (gst_structure_has_field (outs, "pixel-aspect-ratio")) + gst_structure_fixate_field_nearest_fraction (outs, + "pixel-aspect-ratio", n, d); + else if (n != d) + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, + n, d, NULL); + } + } + goto done; + } - result = gst_caps_fixate (result); + /* Calculate input DAR */ + if (!gst_util_fraction_multiply (from_w, from_h, from_par_n, from_par_d, + &from_dar_n, &from_dar_d)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + goto done; + } - return result; + GST_DEBUG_OBJECT (trans, "Input DAR is %d/%d", from_dar_n, from_dar_d); + + /* If either width or height are fixed there's not much we + * can do either except choosing a height or width and PAR + * that matches the DAR as good as possible + */ + if (h) { + GstStructure *tmp; + gint set_w, set_par_n, set_par_d; + + GST_DEBUG_OBJECT (trans, "height is fixed (%d)", h); + + /* If the PAR is fixed too, there's not much to do + * except choosing the width that is nearest to the + * width with the same DAR */ + if (gst_value_is_fixed (to_par)) { + to_par_n = gst_value_get_fraction_numerator (to_par); + to_par_d = gst_value_get_fraction_denominator (to_par); + + GST_DEBUG_OBJECT (trans, "PAR is fixed %d/%d", to_par_n, to_par_d); + + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, to_par_d, + to_par_n, &num, &den)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + goto done; + } + + w = (guint) gst_util_uint64_scale_int (h, num, den); + gst_structure_fixate_field_nearest_int (outs, "width", w); + + goto done; + } + + /* The PAR is not fixed and it's quite likely that we can set + * an arbitrary PAR. */ + + /* Check if we can keep the input width */ + tmp = gst_structure_copy (outs); + gst_structure_fixate_field_nearest_int (tmp, "width", from_w); + gst_structure_get_int (tmp, "width", &set_w); + + /* Might have failed but try to keep the DAR nonetheless by + * adjusting the PAR */ + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, h, set_w, + &to_par_n, &to_par_d)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + gst_structure_free (tmp); + goto done; + } + + if (!gst_structure_has_field (tmp, "pixel-aspect-ratio")) + gst_structure_set_value (tmp, "pixel-aspect-ratio", to_par); + gst_structure_fixate_field_nearest_fraction (tmp, "pixel-aspect-ratio", + to_par_n, to_par_d); + gst_structure_get_fraction (tmp, "pixel-aspect-ratio", &set_par_n, + &set_par_d); + gst_structure_free (tmp); + + /* Check if the adjusted PAR is accepted */ + if (set_par_n == to_par_n && set_par_d == to_par_d) { + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "width", G_TYPE_INT, set_w, + "pixel-aspect-ratio", GST_TYPE_FRACTION, set_par_n, set_par_d, + NULL); + goto done; + } + + /* Otherwise scale the width to the new PAR and check if the + * adjusted with is accepted. If all that fails we can't keep + * the DAR */ + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, set_par_d, + set_par_n, &num, &den)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + goto done; + } + + w = (guint) gst_util_uint64_scale_int (h, num, den); + gst_structure_fixate_field_nearest_int (outs, "width", w); + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, + set_par_n, set_par_d, NULL); + + goto done; + } else if (w) { + GstStructure *tmp; + gint set_h, set_par_n, set_par_d; + + GST_DEBUG_OBJECT (trans, "width is fixed (%d)", w); + + /* If the PAR is fixed too, there's not much to do + * except choosing the height that is nearest to the + * height with the same DAR */ + if (gst_value_is_fixed (to_par)) { + to_par_n = gst_value_get_fraction_numerator (to_par); + to_par_d = gst_value_get_fraction_denominator (to_par); + + GST_DEBUG_OBJECT (trans, "PAR is fixed %d/%d", to_par_n, to_par_d); + + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, to_par_d, + to_par_n, &num, &den)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + goto done; + } + + h = (guint) gst_util_uint64_scale_int (w, den, num); + gst_structure_fixate_field_nearest_int (outs, "height", h); + + goto done; + } + + /* The PAR is not fixed and it's quite likely that we can set + * an arbitrary PAR. */ + + /* Check if we can keep the input height */ + tmp = gst_structure_copy (outs); + gst_structure_fixate_field_nearest_int (tmp, "height", from_h); + gst_structure_get_int (tmp, "height", &set_h); + + /* Might have failed but try to keep the DAR nonetheless by + * adjusting the PAR */ + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, set_h, w, + &to_par_n, &to_par_d)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + gst_structure_free (tmp); + goto done; + } + if (!gst_structure_has_field (tmp, "pixel-aspect-ratio")) + gst_structure_set_value (tmp, "pixel-aspect-ratio", to_par); + gst_structure_fixate_field_nearest_fraction (tmp, "pixel-aspect-ratio", + to_par_n, to_par_d); + gst_structure_get_fraction (tmp, "pixel-aspect-ratio", &set_par_n, + &set_par_d); + gst_structure_free (tmp); + + /* Check if the adjusted PAR is accepted */ + if (set_par_n == to_par_n && set_par_d == to_par_d) { + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "height", G_TYPE_INT, set_h, + "pixel-aspect-ratio", GST_TYPE_FRACTION, set_par_n, set_par_d, + NULL); + goto done; + } + + /* Otherwise scale the height to the new PAR and check if the + * adjusted with is accepted. If all that fails we can't keep + * the DAR */ + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, set_par_d, + set_par_n, &num, &den)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + goto done; + } + + h = (guint) gst_util_uint64_scale_int (w, den, num); + gst_structure_fixate_field_nearest_int (outs, "height", h); + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, + set_par_n, set_par_d, NULL); + + goto done; + } else if (gst_value_is_fixed (to_par)) { + GstStructure *tmp; + gint set_h, set_w, f_h, f_w; + + to_par_n = gst_value_get_fraction_numerator (to_par); + to_par_d = gst_value_get_fraction_denominator (to_par); + + /* Calculate scale factor for the PAR change */ + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, to_par_n, + to_par_d, &num, &den)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + goto done; + } + + /* Try to keep the input height (because of interlacing) */ + tmp = gst_structure_copy (outs); + gst_structure_fixate_field_nearest_int (tmp, "height", from_h); + gst_structure_get_int (tmp, "height", &set_h); + + /* This might have failed but try to scale the width + * to keep the DAR nonetheless */ + w = (guint) gst_util_uint64_scale_int (set_h, num, den); + gst_structure_fixate_field_nearest_int (tmp, "width", w); + gst_structure_get_int (tmp, "width", &set_w); + gst_structure_free (tmp); + + /* We kept the DAR and the height is nearest to the original height */ + if (set_w == w) { + gst_structure_set (outs, "width", G_TYPE_INT, set_w, "height", + G_TYPE_INT, set_h, NULL); + goto done; + } + + f_h = set_h; + f_w = set_w; + + /* If the former failed, try to keep the input width at least */ + tmp = gst_structure_copy (outs); + gst_structure_fixate_field_nearest_int (tmp, "width", from_w); + gst_structure_get_int (tmp, "width", &set_w); + + /* This might have failed but try to scale the width + * to keep the DAR nonetheless */ + h = (guint) gst_util_uint64_scale_int (set_w, den, num); + gst_structure_fixate_field_nearest_int (tmp, "height", h); + gst_structure_get_int (tmp, "height", &set_h); + gst_structure_free (tmp); + + /* We kept the DAR and the width is nearest to the original width */ + if (set_h == h) { + gst_structure_set (outs, "width", G_TYPE_INT, set_w, "height", + G_TYPE_INT, set_h, NULL); + goto done; + } + + /* If all this failed, keep the height that was nearest to the orignal + * height and the nearest possible width. This changes the DAR but + * there's not much else to do here. + */ + gst_structure_set (outs, "width", G_TYPE_INT, f_w, "height", G_TYPE_INT, + f_h, NULL); + goto done; + } else { + GstStructure *tmp; + gint set_h, set_w, set_par_n, set_par_d, tmp2; + + /* width, height and PAR are not fixed but passthrough is not possible */ + + /* First try to keep the height and width as good as possible + * and scale PAR */ + tmp = gst_structure_copy (outs); + gst_structure_fixate_field_nearest_int (tmp, "height", from_h); + gst_structure_get_int (tmp, "height", &set_h); + gst_structure_fixate_field_nearest_int (tmp, "width", from_w); + gst_structure_get_int (tmp, "width", &set_w); + + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, set_h, set_w, + &to_par_n, &to_par_d)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + gst_structure_free (tmp); + goto done; + } + + if (!gst_structure_has_field (tmp, "pixel-aspect-ratio")) + gst_structure_set_value (tmp, "pixel-aspect-ratio", to_par); + gst_structure_fixate_field_nearest_fraction (tmp, "pixel-aspect-ratio", + to_par_n, to_par_d); + gst_structure_get_fraction (tmp, "pixel-aspect-ratio", &set_par_n, + &set_par_d); + gst_structure_free (tmp); + + if (set_par_n == to_par_n && set_par_d == to_par_d) { + gst_structure_set (outs, "width", G_TYPE_INT, set_w, "height", + G_TYPE_INT, set_h, NULL); + + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, + set_par_n, set_par_d, NULL); + goto done; + } + + /* Otherwise try to scale width to keep the DAR with the set + * PAR and height */ + if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, set_par_d, + set_par_n, &num, &den)) { + GST_ELEMENT_ERROR (trans, CORE, NEGOTIATION, (NULL), + ("Error calculating the output scaled size - integer overflow")); + goto done; + } + + w = (guint) gst_util_uint64_scale_int (set_h, num, den); + tmp = gst_structure_copy (outs); + gst_structure_fixate_field_nearest_int (tmp, "width", w); + gst_structure_get_int (tmp, "width", &tmp2); + gst_structure_free (tmp); + + if (tmp2 == w) { + gst_structure_set (outs, "width", G_TYPE_INT, tmp2, "height", + G_TYPE_INT, set_h, NULL); + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, + set_par_n, set_par_d, NULL); + goto done; + } + + /* ... or try the same with the height */ + h = (guint) gst_util_uint64_scale_int (set_w, den, num); + tmp = gst_structure_copy (outs); + gst_structure_fixate_field_nearest_int (tmp, "height", h); + gst_structure_get_int (tmp, "height", &tmp2); + gst_structure_free (tmp); + + if (tmp2 == h) { + gst_structure_set (outs, "width", G_TYPE_INT, set_w, "height", + G_TYPE_INT, tmp2, NULL); + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, + set_par_n, set_par_d, NULL); + goto done; + } + + /* If all fails we can't keep the DAR and take the nearest values + * for everything from the first try */ + gst_structure_set (outs, "width", G_TYPE_INT, set_w, "height", + G_TYPE_INT, set_h, NULL); + if (gst_structure_has_field (outs, "pixel-aspect-ratio") || + set_par_n != set_par_d) + gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, + set_par_n, set_par_d, NULL); + } + } + +done: + GST_DEBUG_OBJECT (trans, "fixated othercaps to %" GST_PTR_FORMAT, othercaps); + + if (from_par == &fpar) + g_value_unset (&fpar); + if (to_par == &tpar) + g_value_unset (&tpar); + + return othercaps; } static GstFlowReturn @@ -468,20 +882,23 @@ if (G_UNLIKELY (ret != GST_FLOW_OK)) goto beach; - pool = gst_base_transform_get_buffer_pool (trans); + do { + pool = gst_base_transform_get_buffer_pool (trans); - if (!gst_buffer_pool_set_active (pool, TRUE)) - goto activate_failed; + if (!gst_buffer_pool_set_active (pool, TRUE)) + goto activate_failed; - GST_DEBUG_OBJECT (self, "Dequeue output buffer"); - ret = gst_buffer_pool_acquire_buffer (pool, outbuf, NULL); - g_object_unref (pool); + GST_DEBUG_OBJECT (self, "Dequeue output buffer"); + ret = gst_buffer_pool_acquire_buffer (pool, outbuf, NULL); + g_object_unref (pool); + + if (ret != GST_FLOW_OK) + goto alloc_failed; - if (ret != GST_FLOW_OK) - goto alloc_failed; + pool = self->v4l2capture->pool; + ret = gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL (pool), outbuf); - pool = self->v4l2capture->pool; - ret = gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL (pool), outbuf); + } while (ret == GST_V4L2_FLOW_CORRUPTED_BUFFER); if (ret != GST_FLOW_OK) { gst_buffer_unref (*outbuf); @@ -651,7 +1068,7 @@ gst_element_class_set_static_metadata (element_class, "V4L2 Video Converter", - "Filter/Converter/Video", + "Filter/Converter/Video/Scaler", "Transform streams via V4L2 API", "Nicolas Dufresne "); diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2tuner.h gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2tuner.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2tuner.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2tuner.h 2015-10-22 08:02:54.000000000 +0000 @@ -195,4 +195,6 @@ iface->signal_strength = interface_as_function ## _tuner_signal_strength; \ } \ +G_END_DECLS + #endif /* __GST_V4L2_TUNER_H__ */ diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2videodec.c gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2videodec.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/gstv4l2videodec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/gstv4l2videodec.c 2015-10-22 08:02:54.000000000 +0000 @@ -269,7 +269,7 @@ gst_v4l2_object_unlock (self->v4l2output); gst_v4l2_object_unlock (self->v4l2capture); gst_pad_stop_task (decoder->srcpad); - GST_VIDEO_DECODER_STREAM_UNLOCK (decoder); + GST_VIDEO_DECODER_STREAM_LOCK (decoder); } self->output_flow = GST_FLOW_OK; @@ -283,6 +283,13 @@ static gboolean gst_v4l2_video_dec_negotiate (GstVideoDecoder * decoder) { + GstV4l2VideoDec *self = GST_V4L2_VIDEO_DEC (decoder); + + /* We don't allow renegotiation without carefull disabling the pool */ + if (self->v4l2capture->pool && + gst_buffer_pool_is_active (GST_BUFFER_POOL (self->v4l2capture->pool))) + return TRUE; + return GST_VIDEO_DECODER_CLASS (parent_class)->negotiate (decoder); } @@ -358,6 +365,7 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder) { GstV4l2VideoDec *self = GST_V4L2_VIDEO_DEC (decoder); + GstV4l2BufferPool *v4l2_pool = GST_V4L2_BUFFER_POOL (self->v4l2capture->pool); GstBufferPool *pool; GstVideoCodecFrame *frame; GstBuffer *buffer = NULL; @@ -365,28 +373,29 @@ GST_LOG_OBJECT (decoder, "Allocate output buffer"); - /* We cannot use the base class allotate helper since it taking the internal - * stream lock. we know that the acquire may need to poll until more frames - * comes in and holding this lock would prevent that. - */ - pool = gst_video_decoder_get_buffer_pool (decoder); + do { + /* We cannot use the base class allotate helper since it taking the internal + * stream lock. we know that the acquire may need to poll until more frames + * comes in and holding this lock would prevent that. + */ + pool = gst_video_decoder_get_buffer_pool (decoder); - /* Pool may be NULL if we started going to READY state */ - if (pool == NULL) { - ret = GST_FLOW_FLUSHING; - goto beach; - } + /* Pool may be NULL if we started going to READY state */ + if (pool == NULL) { + ret = GST_FLOW_FLUSHING; + goto beach; + } - ret = gst_buffer_pool_acquire_buffer (pool, &buffer, NULL); - g_object_unref (pool); + ret = gst_buffer_pool_acquire_buffer (pool, &buffer, NULL); + g_object_unref (pool); - if (ret != GST_FLOW_OK) - goto beach; + if (ret != GST_FLOW_OK) + goto beach; + + GST_LOG_OBJECT (decoder, "Process output buffer"); + ret = gst_v4l2_buffer_pool_process (v4l2_pool, &buffer); - GST_LOG_OBJECT (decoder, "Process output buffer"); - ret = - gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL (self-> - v4l2capture->pool), &buffer); + } while (ret == GST_V4L2_FLOW_CORRUPTED_BUFFER); if (ret != GST_FLOW_OK) goto beach; @@ -615,8 +624,7 @@ ret = GST_VIDEO_DECODER_CLASS (parent_class)->decide_allocation (decoder, query); - latency = self->v4l2capture->min_buffers_for_capture * - self->v4l2capture->duration; + latency = self->v4l2capture->min_buffers * self->v4l2capture->duration; gst_video_decoder_set_latency (decoder, latency, latency); return ret; @@ -662,43 +670,18 @@ return ret; } -static gboolean -gst_v4l2_video_dec_sink_query (GstVideoDecoder * decoder, GstQuery * query) +static GstCaps * +gst_v4l2_video_dec_sink_getcaps (GstVideoDecoder * decoder, GstCaps * filter) { - gboolean ret = TRUE; GstV4l2VideoDec *self = GST_V4L2_VIDEO_DEC (decoder); + GstCaps *result; - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_CAPS:{ - GstCaps *filter, *result = NULL; - GstPad *pad = GST_VIDEO_DECODER_SINK_PAD (decoder); - gst_query_parse_caps (query, &filter); - - if (self->probed_sinkcaps) - result = gst_caps_ref (self->probed_sinkcaps); - else - result = gst_pad_get_pad_template_caps (pad); - - if (filter) { - GstCaps *tmp = result; - result = - gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST); - gst_caps_unref (tmp); - } + result = gst_video_decoder_proxy_getcaps (decoder, self->probed_sinkcaps, + filter); - GST_DEBUG_OBJECT (self, "Returning sink caps %" GST_PTR_FORMAT, result); + GST_DEBUG_OBJECT (self, "Returning sink caps %" GST_PTR_FORMAT, result); - gst_query_set_caps_result (query, result); - gst_caps_unref (result); - break; - } - - default: - ret = GST_VIDEO_DECODER_CLASS (parent_class)->sink_query (decoder, query); - break; - } - - return ret; + return result; } static gboolean @@ -843,8 +826,8 @@ /* FIXME propose_allocation or not ? */ video_decoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_v4l2_video_dec_handle_frame); - video_decoder_class->sink_query = - GST_DEBUG_FUNCPTR (gst_v4l2_video_dec_sink_query); + video_decoder_class->getcaps = + GST_DEBUG_FUNCPTR (gst_v4l2_video_dec_sink_getcaps); video_decoder_class->src_query = GST_DEBUG_FUNCPTR (gst_v4l2_video_dec_src_query); video_decoder_class->sink_event = diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/Makefile.in gst-plugins-good1.0-1.6.1/sys/v4l2/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/v4l2/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -24,7 +24,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -88,9 +98,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/gst-glib-gen.mak \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(noinst_HEADERS) README subdir = sys/v4l2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -113,7 +120,6 @@ $(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 \ @@ -128,6 +134,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -254,6 +262,9 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/common/gst-glib-gen.mak $(top_srcdir)/depcomp \ + README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -386,9 +397,6 @@ 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@ @@ -506,17 +514,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -569,6 +577,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -659,7 +668,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/v4l2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/v4l2/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -668,7 +676,7 @@ 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_srcdir)/common/gst-glib-gen.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1105,6 +1113,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # these are all the rules generating the relevant files $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/v4l2_calls.c gst-plugins-good1.0-1.6.1/sys/v4l2/v4l2_calls.c --- gst-plugins-good1.0-1.4.3/sys/v4l2/v4l2_calls.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/v4l2_calls.c 2015-10-22 08:02:54.000000000 +0000 @@ -842,7 +842,7 @@ freq.tuner = tunernum; /* fill in type - ignore error */ - v4l2_ioctl (v4l2object->video_fd, VIDIOC_G_FREQUENCY, &freq); + (void) v4l2_ioctl (v4l2object->video_fd, VIDIOC_G_FREQUENCY, &freq); freq.frequency = frequency / channel->freq_multiplicator; if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0) diff -Nru gst-plugins-good1.0-1.4.3/sys/v4l2/v4l2_calls.h gst-plugins-good1.0-1.6.1/sys/v4l2/v4l2_calls.h --- gst-plugins-good1.0-1.4.3/sys/v4l2/v4l2_calls.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/v4l2/v4l2_calls.h 2015-10-22 08:02:54.000000000 +0000 @@ -29,7 +29,7 @@ #ifdef HAVE_LIBV4L2 # include #else -# include +# include "ext/videodev2.h" # include # include # include diff -Nru gst-plugins-good1.0-1.4.3/sys/waveform/Makefile.in gst-plugins-good1.0-1.6.1/sys/waveform/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/waveform/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/waveform/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = sys/waveform -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -228,6 +237,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -360,9 +370,6 @@ 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@ @@ -480,17 +487,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -543,6 +550,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -586,7 +594,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/waveform/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/waveform/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -903,6 +910,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/ximage/gstximagesrc.c gst-plugins-good1.0-1.6.1/sys/ximage/gstximagesrc.c --- gst-plugins-good1.0-1.4.3/sys/ximage/gstximagesrc.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/ximage/gstximagesrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -66,7 +66,6 @@ { PROP_0, PROP_DISPLAY_NAME, - PROP_SCREEN_NUM, PROP_SHOW_POINTER, PROP_USE_DAMAGE, PROP_STARTX, @@ -169,6 +168,9 @@ int status; XWindowAttributes attrs; Window window; + int x, y; + Window child; + Bool coord_translated; if (s->xid != 0) { status = XGetWindowAttributes (s->xcontext->disp, s->xid, &attrs); @@ -205,8 +207,19 @@ g_assert (s->xwindow != 0); s->width = attrs.width; s->height = attrs.height; - GST_INFO_OBJECT (s, "Using default window size of %dx%d", - s->width, s->height); + + coord_translated = XTranslateCoordinates (s->xcontext->disp, s->xwindow, + s->xcontext->root, 0, 0, &x, &y, &child); + if (coord_translated) { + s->x = x; + s->y = y; + } else { + s->x = 0; + s->y = 0; + } + + GST_INFO_OBJECT (s, "Using default window size of %dx%d at location %d,%d", + s->width, s->height, s->x, s->y); } use_root_window: @@ -360,6 +373,25 @@ } #ifdef HAVE_XFIXES +static gboolean +gst_ximage_is_pointer_in_region (GstXImageSrc * src) +{ + Window window_returned; + int root_x, root_y; + int win_x, win_y; + unsigned int mask_return; + Bool on_window; + + on_window = XQueryPointer (src->xcontext->disp, src->xwindow, + &window_returned, &window_returned, &root_x, &root_y, &win_x, &win_y, + &mask_return); + + return (on_window && (win_x >= src->startx) && (win_y >= src->starty) && + (win_x < src->endx) && (win_y < src->endy)); +} +#endif + +#ifdef HAVE_XFIXES static void composite_pixel (GstXContext * xcontext, guchar * dest, guchar * src) { @@ -601,8 +633,10 @@ if (ximagesrc->cursor_image) { gint x, y, width, height; - x = ximagesrc->cursor_image->x - ximagesrc->cursor_image->xhot; - y = ximagesrc->cursor_image->y - ximagesrc->cursor_image->yhot; + x = ximagesrc->cursor_image->x - ximagesrc->cursor_image->xhot - + ximagesrc->x; + y = ximagesrc->cursor_image->y - ximagesrc->cursor_image->yhot - + ximagesrc->y; width = ximagesrc->cursor_image->width; height = ximagesrc->cursor_image->height; @@ -684,7 +718,8 @@ #endif #ifdef HAVE_XFIXES - if (ximagesrc->show_pointer && ximagesrc->have_xfixes) { + if (ximagesrc->show_pointer && ximagesrc->have_xfixes + && gst_ximage_is_pointer_in_region (ximagesrc)) { GST_DEBUG_OBJECT (ximagesrc, "Using XFixes to draw cursor"); /* get cursor */ @@ -696,31 +731,29 @@ int startx, starty, iwidth, iheight; gboolean cursor_in_image = TRUE; - cx = ximagesrc->cursor_image->x - ximagesrc->cursor_image->xhot; - if (cx < 0) - cx = 0; - cy = ximagesrc->cursor_image->y - ximagesrc->cursor_image->yhot; - if (cy < 0) - cy = 0; + cx = ximagesrc->cursor_image->x - ximagesrc->cursor_image->xhot - + ximagesrc->x; + cy = ximagesrc->cursor_image->y - ximagesrc->cursor_image->yhot - + ximagesrc->y; count = ximagesrc->cursor_image->width * ximagesrc->cursor_image->height; /* only get where cursor last was, if it is in our range */ if (ximagesrc->endx > ximagesrc->startx && ximagesrc->endy > ximagesrc->starty) { /* check bounds */ - if (cx + ximagesrc->cursor_image->width < ximagesrc->startx || - cx > ximagesrc->endx) { + if (cx + ximagesrc->cursor_image->width < (int) ximagesrc->startx || + cx > (int) ximagesrc->endx) { /* trivial reject */ cursor_in_image = FALSE; - } else if (cy + ximagesrc->cursor_image->height < ximagesrc->starty || - cy > ximagesrc->endy) { + } else if (cy + ximagesrc->cursor_image->height < + (int) ximagesrc->starty || cy > (int) ximagesrc->endy) { /* trivial reject */ cursor_in_image = FALSE; } else { /* find intersect region */ - startx = (cx < ximagesrc->startx) ? ximagesrc->startx : cx; - starty = (cy < ximagesrc->starty) ? ximagesrc->starty : cy; + startx = (cx < (int) ximagesrc->startx) ? ximagesrc->startx : cx; + starty = (cy < (int) ximagesrc->starty) ? ximagesrc->starty : cy; iwidth = (cx + ximagesrc->cursor_image->width < ximagesrc->endx) ? cx + ximagesrc->cursor_image->width - startx : ximagesrc->endx - startx; @@ -888,9 +921,6 @@ g_free (src->display_name); src->display_name = g_strdup (g_value_get_string (value)); break; - case PROP_SCREEN_NUM: - src->screen_num = g_value_get_uint (value); - break; case PROP_SHOW_POINTER: src->show_pointer = g_value_get_boolean (value); break; @@ -946,9 +976,6 @@ g_value_set_string (value, src->display_name); break; - case PROP_SCREEN_NUM: - g_value_set_uint (value, src->screen_num); - break; case PROP_SHOW_POINTER: g_value_set_boolean (value, src->show_pointer); break; @@ -1161,9 +1188,6 @@ g_object_class_install_property (gc, PROP_DISPLAY_NAME, g_param_spec_string ("display-name", "Display", "X Display Name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gc, PROP_SCREEN_NUM, - g_param_spec_uint ("screen-num", "Screen number", "X Screen Number", - 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gc, PROP_SHOW_POINTER, g_param_spec_boolean ("show-pointer", "Show Mouse Pointer", "Show mouse pointer (if XFixes extension enabled)", TRUE, diff -Nru gst-plugins-good1.0-1.4.3/sys/ximage/gstximagesrc.h gst-plugins-good1.0-1.6.1/sys/ximage/gstximagesrc.h --- gst-plugins-good1.0-1.4.3/sys/ximage/gstximagesrc.h 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/ximage/gstximagesrc.h 2015-10-22 08:02:54.000000000 +0000 @@ -49,12 +49,13 @@ /* Information on display */ GstXContext *xcontext; + gint x; + gint y; gint width; gint height; Window xwindow; gchar *display_name; - guint screen_num; /* Window selection */ guint64 xid; diff -Nru gst-plugins-good1.0-1.4.3/sys/ximage/Makefile.in gst-plugins-good1.0-1.6.1/sys/ximage/Makefile.in --- gst-plugins-good1.0-1.4.3/sys/ximage/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/ximage/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = sys/ximage -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -229,6 +238,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -361,9 +371,6 @@ 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@ @@ -481,17 +488,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -544,6 +551,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -588,7 +596,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/ximage/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu sys/ximage/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -905,6 +912,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/sys/ximage/ximageutil.c gst-plugins-good1.0-1.6.1/sys/ximage/ximageutil.c --- gst-plugins-good1.0-1.4.3/sys/ximage/ximageutil.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/ximage/ximageutil.c 2015-10-22 08:02:54.000000000 +0000 @@ -36,6 +36,15 @@ return type; } +static gboolean +gst_meta_ximage_transform (GstBuffer * dest, GstMeta * meta, + GstBuffer * buffer, GQuark type, gpointer data) +{ + /* ximage metadata can't be transformed or copied */ + + return FALSE; +} + const GstMetaInfo * gst_meta_ximage_get_info (void) { @@ -45,7 +54,7 @@ const GstMetaInfo *meta = gst_meta_register (gst_meta_ximage_api_get_type (), "GstMetaXImageSrc", sizeof (GstMetaXImage), (GstMetaInitFunction) NULL, - (GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL); + (GstMetaFreeFunction) NULL, gst_meta_ximage_transform); g_once_init_leave (&meta_ximage_info, meta); } return meta_ximage_info; @@ -175,18 +184,17 @@ return NULL; } xcontext->screen = DefaultScreenOfDisplay (xcontext->disp); - xcontext->screen_num = DefaultScreen (xcontext->disp); - xcontext->visual = DefaultVisual (xcontext->disp, xcontext->screen_num); - xcontext->root = DefaultRootWindow (xcontext->disp); - xcontext->white = XWhitePixel (xcontext->disp, xcontext->screen_num); - xcontext->black = XBlackPixel (xcontext->disp, xcontext->screen_num); + xcontext->visual = DefaultVisualOfScreen (xcontext->screen); + xcontext->root = RootWindowOfScreen (xcontext->screen); + xcontext->white = WhitePixelOfScreen (xcontext->screen); + xcontext->black = BlackPixelOfScreen (xcontext->screen); xcontext->depth = DefaultDepthOfScreen (xcontext->screen); - xcontext->width = DisplayWidth (xcontext->disp, xcontext->screen_num); - xcontext->height = DisplayHeight (xcontext->disp, xcontext->screen_num); + xcontext->width = WidthOfScreen (xcontext->screen); + xcontext->height = HeightOfScreen (xcontext->screen); - xcontext->widthmm = DisplayWidthMM (xcontext->disp, xcontext->screen_num); - xcontext->heightmm = DisplayHeightMM (xcontext->disp, xcontext->screen_num); + xcontext->widthmm = WidthMMOfScreen (xcontext->screen); + xcontext->heightmm = HeightMMOfScreen (xcontext->screen); xcontext->caps = NULL; @@ -321,8 +329,6 @@ GstMetaXImage *meta; gboolean ret = TRUE; - g_return_val_if_fail (ximage != NULL, FALSE); - meta = GST_META_XIMAGE_GET (ximage); parent = meta->parent; diff -Nru gst-plugins-good1.0-1.4.3/sys/ximage/ximageutil.h gst-plugins-good1.0-1.6.1/sys/ximage/ximageutil.h --- gst-plugins-good1.0-1.4.3/sys/ximage/ximageutil.h 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/sys/ximage/ximageutil.h 2015-10-22 08:02:54.000000000 +0000 @@ -50,7 +50,6 @@ * GstXContext: * @disp: the X11 Display of this context * @screen: the default Screen of Display @disp - * @screen_num: the Screen number of @screen * @visual: the default Visual of Screen @screen * @root: the root Window of Display @disp * @white: the value of a white pixel on Screen @screen @@ -78,7 +77,6 @@ Display *disp; Screen *screen; - gint screen_num; Visual *visual; diff -Nru gst-plugins-good1.0-1.4.3/test-driver gst-plugins-good1.0-1.6.1/test-driver --- gst-plugins-good1.0-1.4.3/test-driver 2014-08-27 10:26:06.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/test-driver 2015-10-30 12:10:17.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -106,11 +106,14 @@ # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -119,6 +122,12 @@ *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/aacparse.c gst-plugins-good1.0-1.6.1/tests/check/elements/aacparse.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/aacparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/aacparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -144,7 +144,9 @@ GST_START_TEST (test_parse_adts_detect_mpeg_version) { gst_parser_test_output_caps (adts_frame_mpeg2, sizeof (adts_frame_mpeg2), - NULL, SINK_CAPS_MPEG2 ", stream-format=(string)adts"); + NULL, + SINK_CAPS_MPEG2 + ", stream-format=(string)adts, level=(string)2, profile=(string)lc"); } GST_END_TEST; @@ -187,7 +189,7 @@ GST_START_TEST (test_parse_proxy_constraints) { - GstCaps *caps; + GstCaps *caps, *resultcaps; GstElement *parse, *filter; GstPad *sinkpad; GstStructure *s; @@ -216,12 +218,16 @@ /* should accept without the constraint */ caps = gst_caps_from_string ("audio/mpeg,mpegversion=2"); - fail_unless (gst_pad_query_accept_caps (sinkpad, caps)); + resultcaps = gst_pad_query_caps (sinkpad, caps); + fail_if (gst_caps_is_empty (resultcaps)); + gst_caps_unref (resultcaps); gst_caps_unref (caps); /* should not accept with conflicting version */ caps = gst_caps_from_string ("audio/mpeg,mpegversion=4"); - fail_if (gst_pad_query_accept_caps (sinkpad, caps)); + resultcaps = gst_pad_query_caps (sinkpad, caps); + fail_unless (gst_caps_is_empty (resultcaps)); + gst_caps_unref (resultcaps); gst_caps_unref (caps); gst_object_unref (sinkpad); @@ -238,6 +244,11 @@ Suite *s = suite_create ("aacparse"); TCase *tc_chain = tcase_create ("general"); + /* init test context */ + ctx_factory = "aacparse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + suite_add_tcase (s, tc_chain); /* ADIF tests */ tcase_add_test (tc_chain, test_parse_adif_normal); @@ -265,25 +276,4 @@ * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = aacparse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "aacparse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (aacparse); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/ac3parse.c gst-plugins-good1.0-1.6.1/tests/check/elements/ac3parse.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/ac3parse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/ac3parse.c 2015-10-22 08:02:54.000000000 +0000 @@ -122,6 +122,11 @@ Suite *s = suite_create ("ac3parse"); TCase *tc_chain = tcase_create ("general"); + /* init test context */ + ctx_factory = "ac3parse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_parse_normal); tcase_add_test (tc_chain, test_parse_drain_single); @@ -139,25 +144,4 @@ * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = ac3parse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "ac3parse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (ac3parse); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/alpha.c gst-plugins-good1.0-1.6.1/tests/check/elements/alpha.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/alpha.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/alpha.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,265 @@ +/* GStreamer unit test for the alpha element + * + * Copyright (C) 2007 Ravi Kiran K N + * + * 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. + */ + +#include +#include + + +GstPad *srcpad, *sinkpad; + +static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("AYUV")) + ); +static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ AYUV, " + "ARGB, BGRA, ABGR, RGBA, Y444, xRGB, BGRx, xBGR, " + "RGBx, RGB, BGR, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B } ")) + ); + + +typedef enum +{ + FILL_GREEN, + FILL_BLUE +} +FillColor; + +static GstElement * +setup_alpha (void) +{ + GstElement *alpha; + + alpha = gst_check_setup_element ("alpha"); + srcpad = gst_check_setup_src_pad (alpha, &srctemplate); + sinkpad = gst_check_setup_sink_pad (alpha, &sinktemplate); + + gst_pad_set_active (srcpad, TRUE); + gst_pad_set_active (sinkpad, TRUE); + + return alpha; +} + +static void +cleanup_alpha (GstElement * alpha) +{ + gst_pad_set_active (srcpad, FALSE); + gst_pad_set_active (sinkpad, FALSE); + gst_check_teardown_src_pad (alpha); + gst_check_teardown_sink_pad (alpha); + gst_check_teardown_element (alpha); +} + +#define WIDTH 3 +#define HEIGHT 4 + +static GstCaps * +create_caps_rgba32 (void) +{ + GstCaps *caps; + + caps = gst_caps_new_simple ("video/x-raw", + "width", G_TYPE_INT, WIDTH, + "height", G_TYPE_INT, HEIGHT, + "framerate", GST_TYPE_FRACTION, 0, 1, + "format", G_TYPE_STRING, "RGBA", NULL); + + return caps; +} + +static GstBuffer * +create_buffer_rgba32 (FillColor color) +{ + guint8 rgba32_img[HEIGHT * WIDTH * 4]; + guint32 *rgba32 = (guint32 *) rgba32_img; + + GstBuffer *buf; + GstMapInfo map; + guint32 rgba_col; + int i; + + if (color == FILL_GREEN) + rgba_col = 0xff00ff00; /* GREEN */ + else + rgba_col = 0xffff0000; /* BLUE */ + + for (i = 0; i < HEIGHT * WIDTH; i++) + rgba32[i] = rgba_col; + + buf = gst_buffer_new_and_alloc (HEIGHT * WIDTH * 4); + gst_buffer_map (buf, &map, GST_MAP_READWRITE); + fail_unless_equals_int (map.size, sizeof (rgba32_img)); + memcpy (map.data, rgba32_img, sizeof (rgba32_img)); + + gst_buffer_unmap (buf, &map); + + return buf; +} + + +GST_START_TEST (test_chromakeying) +{ + GstElement *alpha; + GstBuffer *inbuffer; + GstBuffer *outbuffer; + GstCaps *incaps; + guint8 *ayuv; + guint outlength; + GstMapInfo map; + int i; + + incaps = create_caps_rgba32 (); + + alpha = setup_alpha (); + + g_object_set (alpha, "method", 1, NULL); /* Chroma-keying GREEN */ + + fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_PLAYING), + GST_STATE_CHANGE_SUCCESS); + + gst_check_setup_events (srcpad, alpha, incaps, GST_FORMAT_TIME); + + inbuffer = create_buffer_rgba32 (FILL_GREEN); + GST_DEBUG ("Created buffer of %" G_GSIZE_FORMAT " bytes", + gst_buffer_get_size (inbuffer)); + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + + fail_unless_equals_int (gst_pad_push (srcpad, inbuffer), GST_FLOW_OK); + + fail_unless (g_list_length (buffers) == 1); + outbuffer = (GstBuffer *) buffers->data; + fail_if (outbuffer == NULL); + fail_unless (GST_IS_BUFFER (outbuffer)); + + ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1); + outlength = WIDTH * HEIGHT * 4; /* output is AYUV */ + gst_buffer_map (outbuffer, &map, GST_MAP_READ); + fail_unless_equals_int (map.size, outlength); + + ayuv = map.data; + + /* check chroma keying GREEN */ + for (i = 0; i < HEIGHT * WIDTH; i += 4) + fail_unless_equals_int (ayuv[i], 0x00); + + gst_buffer_unmap (outbuffer, &map); + + buffers = g_list_remove (buffers, outbuffer); + gst_buffer_unref (outbuffer); + + fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_NULL), + GST_STATE_CHANGE_SUCCESS); + + /* cleanup */ + cleanup_alpha (alpha); + ASSERT_CAPS_REFCOUNT (incaps, "incaps", 1); + gst_caps_unref (incaps); + +} + +GST_END_TEST; + + + +GST_START_TEST (test_alpha) +{ + GstElement *alpha; + GstBuffer *inbuffer; + GstBuffer *outbuffer; + GstCaps *incaps; + guint8 *ayuv; + guint outlength; + GstMapInfo map; + int i; + + incaps = create_caps_rgba32 (); + + alpha = setup_alpha (); + + g_object_set (alpha, "alpha", 0.5, NULL); /* Alpha value 0.5 */ + + fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_PLAYING), + GST_STATE_CHANGE_SUCCESS); + + gst_check_setup_events (srcpad, alpha, incaps, GST_FORMAT_TIME); + + inbuffer = create_buffer_rgba32 (FILL_BLUE); + GST_DEBUG ("Created buffer of %" G_GSIZE_FORMAT " bytes", + gst_buffer_get_size (inbuffer)); + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + + /* pushing gives away reference */ + GST_DEBUG ("push it"); + fail_unless_equals_int (gst_pad_push (srcpad, inbuffer), GST_FLOW_OK); + GST_DEBUG ("pushed it"); + + /* ... and puts a new buffer on the global list */ + fail_unless (g_list_length (buffers) == 1); + outbuffer = (GstBuffer *) buffers->data; + fail_if (outbuffer == NULL); + fail_unless (GST_IS_BUFFER (outbuffer)); + + ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1); + outlength = WIDTH * HEIGHT * 4; /* output is AYUV */ + gst_buffer_map (outbuffer, &map, GST_MAP_READ); + fail_unless_equals_int (map.size, outlength); + + ayuv = map.data; + + for (i = 0; i < HEIGHT * WIDTH; i += 4) + fail_unless_equals_int (ayuv[i], 0x7F); + + gst_buffer_unmap (outbuffer, &map); + + buffers = g_list_remove (buffers, outbuffer); + gst_buffer_unref (outbuffer); + + fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_NULL), + GST_STATE_CHANGE_SUCCESS); + + /* cleanup */ + GST_DEBUG ("cleanup alpha"); + cleanup_alpha (alpha); + GST_DEBUG ("cleanup, unref incaps"); + ASSERT_CAPS_REFCOUNT (incaps, "incaps", 1); + gst_caps_unref (incaps); + +} + +GST_END_TEST; + + +static Suite * +alpha_suite (void) +{ + Suite *s = suite_create ("alpha"); + TCase *tc_chain = tcase_create ("general"); + + suite_add_tcase (s, tc_chain); + tcase_add_test (tc_chain, test_alpha); + tcase_add_test (tc_chain, test_chromakeying); + + return s; +} + +GST_CHECK_MAIN (alpha); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/apev2mux.c gst-plugins-good1.0-1.6.1/tests/check/elements/apev2mux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/apev2mux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/apev2mux.c 2015-10-22 08:02:54.000000000 +0000 @@ -408,19 +408,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = apev2mux_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (apev2mux); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/aspectratiocrop.c gst-plugins-good1.0-1.6.1/tests/check/elements/aspectratiocrop.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/aspectratiocrop.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/aspectratiocrop.c 2015-10-22 08:02:54.000000000 +0000 @@ -172,19 +172,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = aspectratiocrop_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (aspectratiocrop); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/audioamplify.c gst-plugins-good1.0-1.6.1/tests/check/elements/audioamplify.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/audioamplify.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/audioamplify.c 2015-10-22 08:02:54.000000000 +0000 @@ -464,19 +464,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = amplify_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (amplify); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/audiochebband.c gst-plugins-good1.0-1.6.1/tests/check/elements/audiochebband.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/audiochebband.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/audiochebband.c 2015-10-22 08:02:54.000000000 +0000 @@ -1667,19 +1667,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiochebband_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (audiochebband); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/audiocheblimit.c gst-plugins-good1.0-1.6.1/tests/check/elements/audiocheblimit.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/audiocheblimit.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/audiocheblimit.c 2015-10-22 08:02:54.000000000 +0000 @@ -1083,19 +1083,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiocheblimit_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (audiocheblimit); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/audiodynamic.c gst-plugins-good1.0-1.6.1/tests/check/elements/audiodynamic.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/audiodynamic.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/audiodynamic.c 2015-10-22 08:02:54.000000000 +0000 @@ -439,19 +439,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = dynamic_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (dynamic); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/audioinvert.c gst-plugins-good1.0-1.6.1/tests/check/elements/audioinvert.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/audioinvert.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/audioinvert.c 2015-10-22 08:02:54.000000000 +0000 @@ -281,19 +281,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = invert_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (invert); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/audiowsincband.c gst-plugins-good1.0-1.6.1/tests/check/elements/audiowsincband.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/audiowsincband.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/audiowsincband.c 2015-10-22 08:02:54.000000000 +0000 @@ -1134,19 +1134,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiowsincband_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (audiowsincband); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/audiowsinclimit.c gst-plugins-good1.0-1.6.1/tests/check/elements/audiowsinclimit.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/audiowsinclimit.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/audiowsinclimit.c 2015-10-22 08:02:54.000000000 +0000 @@ -785,19 +785,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiowsinclimit_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (audiowsinclimit); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/avimux.c gst-plugins-good1.0-1.6.1/tests/check/elements/avimux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/avimux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/avimux.c 2015-10-22 08:02:54.000000000 +0000 @@ -266,19 +266,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = avimux_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (avimux); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/dtmf.c gst-plugins-good1.0-1.6.1/tests/check/elements/dtmf.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/dtmf.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/dtmf.c 2015-10-22 08:02:54.000000000 +0000 @@ -233,8 +233,8 @@ "media = (string) \"audio\", " "payload = (int) 99, " "clock-rate = (int) 1000, " - "seqnum-base = (uint) 333, " - "clock-base = (uint) 666, " + "seqnum-offset = (uint) 333, " + "timestamp-offset = (uint) 666, " "ssrc = (uint) 999, " "maxptime = (uint) 20, encoding-name = (string) \"TELEPHONE-EVENT\"") ); @@ -444,8 +444,8 @@ "encoding-name", G_TYPE_STRING, "TELEPHONE-EVENT", "media", G_TYPE_STRING, "audio", "clock-rate", G_TYPE_INT, 1000, "payload", G_TYPE_INT, 99, - "seqnum-base", G_TYPE_UINT, 333, - "clock-base", G_TYPE_UINT, 666, + "seqnum-offset", G_TYPE_UINT, 333, + "timestamp-offset", G_TYPE_UINT, 666, "ssrc", G_TYPE_UINT, 999, "ptime", G_TYPE_UINT, 20, NULL); caps = gst_pad_get_current_caps (sink); fail_unless (gst_caps_can_intersect (caps, expected_caps)); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/equalizer.c gst-plugins-good1.0-1.6.1/tests/check/elements/equalizer.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/equalizer.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/equalizer.c 2015-10-22 08:02:54.000000000 +0000 @@ -377,19 +377,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = equalizer_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (equalizer); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/flacparse.c gst-plugins-good1.0-1.6.1/tests/check/elements/flacparse.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/flacparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/flacparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -250,6 +250,19 @@ Suite *s = suite_create ("flacparse"); TCase *tc_chain = tcase_create ("general"); + + /* init test context */ + ctx_factory = "flacparse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + ctx_discard = 3; + ctx_headers[0].data = streaminfo_header; + ctx_headers[0].size = sizeof (streaminfo_header); + ctx_headers[1].data = comment_header; + ctx_headers[1].size = sizeof (comment_header); + + /* custom offsets, and ts always repeatedly 0 */ + ctx_no_metadata = TRUE; suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_parse_flac_normal); tcase_add_test (tc_chain, test_parse_flac_drain_single); @@ -269,32 +282,4 @@ * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = flacparse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "flacparse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - ctx_discard = 3; - ctx_headers[0].data = streaminfo_header; - ctx_headers[0].size = sizeof (streaminfo_header); - ctx_headers[1].data = comment_header; - ctx_headers[1].size = sizeof (comment_header); - /* custom offsets, and ts always repeatedly 0 */ - ctx_no_metadata = TRUE; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (flacparse); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/id3v2mux.c gst-plugins-good1.0-1.6.1/tests/check/elements/id3v2mux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/id3v2mux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/id3v2mux.c 2015-10-22 08:02:54.000000000 +0000 @@ -518,19 +518,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = id3v2mux_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (id3v2mux); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/jpegdec.c gst-plugins-good1.0-1.6.1/tests/check/elements/jpegdec.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/jpegdec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/jpegdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -138,19 +138,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = jpegdec_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (jpegdec); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/jpegenc.c gst-plugins-good1.0-1.6.1/tests/check/elements/jpegenc.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/jpegenc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/jpegenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -236,19 +236,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = jpegenc_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (jpegenc); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/level.c gst-plugins-good1.0-1.6.1/tests/check/elements/level.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/level.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/level.c 2015-10-22 08:02:54.000000000 +0000 @@ -152,7 +152,8 @@ GstMessage *message; level = setup_level (LEVEL_S16_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 10, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 10, NULL); fail_unless (gst_element_set_state (level, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, "could not set to playing"); @@ -212,7 +213,8 @@ GstClockTime endtime, ts, duration; level = setup_level (LEVEL_S16_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 10, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 10, NULL); gst_element_set_state (level, GST_STATE_PLAYING); /* create a bus to get the level message on */ bus = gst_bus_new (); @@ -256,7 +258,8 @@ const gchar *fields[3] = { "rms", "peak", "decay" }; level = setup_level (LEVEL_S16_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 10, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 10, NULL); gst_element_set_state (level, GST_STATE_PLAYING); /* create a bus to get the level message on */ bus = gst_bus_new (); @@ -308,13 +311,14 @@ GstBus *bus; GstMessage *message; const GstStructure *structure; - gint j; + gint i, j; const GValue *list, *value; gdouble dB; const gchar *fields[3] = { "rms", "peak", "decay" }; level = setup_level (LEVEL_S16_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 10, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 30, NULL); gst_element_set_state (level, GST_STATE_PLAYING); /* create a bus to get the level message on */ bus = gst_bus_new (); @@ -328,41 +332,48 @@ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL); fail_unless (inbuffer == outbuffer); - message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1); - structure = gst_message_get_structure (message); + /* do multiple messages per buffer, to verify that the inner loop in level + * advances the read-index correctly, see + * https://bugzilla.gnome.org/show_bug.cgi?id=754144 + */ + for (i = 0; i < 3; i++) { + GST_DEBUG ("get message number %d", i); + message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1); + structure = gst_message_get_structure (message); + + /* silence has 0 dB for rms, peak and decay */ + for (j = 0; j < 3; ++j) { + GValueArray *arr; - /* silence has 0 dB for rms, peak and decay */ - for (j = 0; j < 3; ++j) { - GValueArray *arr; - - list = gst_structure_get_value (structure, fields[j]); - arr = g_value_get_boxed (list); - value = g_value_array_get_nth (arr, 0); - dB = g_value_get_double (value); - GST_DEBUG ("%s[0] is %lf", fields[j], dB); + list = gst_structure_get_value (structure, fields[j]); + arr = g_value_get_boxed (list); + value = g_value_array_get_nth (arr, 0); + dB = g_value_get_double (value); + GST_DEBUG ("%s[0] is %lf", fields[j], dB); #ifdef HAVE_ISINF - fail_unless (isinf (dB)); + fail_unless (isinf (dB)); #elif defined (HAVE_FPCLASS) - fail_unless (fpclass (dB) == FP_NINF); + fail_unless (fpclass (dB) == FP_NINF); #endif - } - /* block wave of half amplitude has -5.94 dB for rms, peak and decay */ - for (j = 0; j < 3; ++j) { - GValueArray *arr; + } + /* block wave of half amplitude has -5.94 dB for rms, peak and decay */ + for (j = 0; j < 3; ++j) { + GValueArray *arr; - list = gst_structure_get_value (structure, fields[j]); - arr = g_value_get_boxed (list); - value = g_value_array_get_nth (arr, 1); - dB = g_value_get_double (value); - GST_DEBUG ("%s[1] is %lf", fields[j], dB); - fail_if (dB < -6.1); - fail_if (dB > -5.9); + list = gst_structure_get_value (structure, fields[j]); + arr = g_value_get_boxed (list); + value = g_value_array_get_nth (arr, 1); + dB = g_value_get_double (value); + GST_DEBUG ("%s[1] is %lf", fields[j], dB); + fail_if (dB < -6.1); + fail_if (dB > -5.9); + } + gst_message_unref (message); } /* clean up */ /* flush current messages,and future state change messages */ gst_bus_set_flushing (bus, TRUE); - gst_message_unref (message); gst_element_set_bus (level, NULL); gst_object_unref (bus); gst_buffer_unref (outbuffer); @@ -385,7 +396,8 @@ const gchar *fields[3] = { "rms", "peak", "decay" }; level = setup_level (LEVEL_F32_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 10, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 10, NULL); gst_element_set_state (level, GST_STATE_PLAYING); /* create a bus to get the level message on */ bus = gst_bus_new (); @@ -443,7 +455,8 @@ gdouble dB; level = setup_level (LEVEL_S16_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 5, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 5, NULL); gst_element_set_state (level, GST_STATE_PLAYING); /* create a bus to get the level message on */ bus = gst_bus_new (); @@ -504,7 +517,8 @@ GstMessage *message; level = setup_level (LEVEL_S16_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 20, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 20, NULL); gst_element_set_state (level, GST_STATE_PLAYING); /* create a bus to get the level message on */ bus = gst_bus_new (); @@ -545,7 +559,8 @@ GstClockTime ts1, dur1, ts2; level = setup_level (LEVEL_S16_CAPS_STRING); - g_object_set (level, "message", TRUE, "interval", GST_SECOND / 20, NULL); + g_object_set (level, "post-messages", TRUE, + "interval", (guint64) GST_SECOND / 20, NULL); gst_element_set_state (level, GST_STATE_PLAYING); /* create a bus to get the level message on */ bus = gst_bus_new (); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/matroskademux.c gst-plugins-good1.0-1.6.1/tests/check/elements/matroskademux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/matroskademux.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/matroskademux.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,124 @@ +/* GStreamer unit test for matroskademux + * Copyright (C) 2015 Tim-Philipp Müller + * + * 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. + */ + +#include +#include + +const gchar mkv_sub_base64[] = + "GkXfowEAAAAAAAAUQoKJbWF0cm9za2EAQoeBAkKFgQIYU4BnAQAAAAAAAg0RTZt0AQAAAAAAAIxN" + "uwEAAAAAAAASU6uEFUmpZlOsiAAAAAAAAACYTbsBAAAAAAAAElOrhBZUrmtTrIgAAAAAAAABEuya" + "AQAAAAAAABJTq4QQQ6dwU6yI///////////smgEAAAAAAAASU6uEHFO7a1OsiP//////////TbsB" + "AAAAAAAAElOrhBJUw2dTrIgAAAAAAAAB9xVJqWYBAAAAAAAAbnOkkDylQZJlrLziQo8+gsrZVtUq" + "17GDD0JARImIQNGUAAAAAABNgJ9HU3RyZWFtZXIgcGx1Z2luIHZlcnNpb24gMS40LjUAV0GZR1N0" + "cmVhbWVyIE1hdHJvc2thIG11eGVyAERhiAZfU0rcEwgAFlSuawEAAAAAAAA0rgEAAAAAAAAr14EB" + "g4ERc8WIoWF8pYlELidTbolTdWJ0aXRsZQCGjFNfVEVYVC9VVEY4AB9DtnUBAAAAAAAAmeeCA+ig" + "AQAAAAAAAA2bggfQoYeBAAAAZm9voAEAAAAAAAAUm4IH0KGOgQu4ADxpPmJhcjwvaT6gAQAAAAAA" + "AA2bggfQoYeBF3AAYmF6oAEAAAAAAAAOm4IH0KGIgScQAGbDtgCgAQAAAAAAABWbggfQoY+BMsgA" + "PGk+YmFyPC9pPgCgAQAAAAAAAA6bggfQoYiBPoAAYuR6ABJUw2cBAAAAAAAACnNzAQAAAAAAAAA="; + +static void +pad_added_cb (GstElement * matroskademux, GstPad * pad, gpointer user_data) +{ + GstHarness *h = user_data; + + GST_LOG_OBJECT (pad, "got new source pad"); + gst_harness_add_element_src_pad (h, pad); +} + +static void +pull_and_check_buffer (GstHarness * h, GstClockTime pts, GstClockTime duration, + const gchar * output) +{ + GstMapInfo map; + GstBuffer *buf; + + /* wait for buffer */ + buf = gst_harness_pull (h); + + /* Make sure there's no 0-terminator in there */ + fail_unless (gst_buffer_map (buf, &map, GST_MAP_READ)); + GST_MEMDUMP ("subtitle buffer", map.data, map.size); + fail_unless (map.size > 0); + fail_unless (map.data[map.size - 1] != '\0'); + if (output != NULL && memcmp (map.data, output, map.size) != 0) { + g_printerr ("Got:\n"); + gst_util_dump_mem (map.data, map.size);; + g_printerr ("Wanted:\n"); + gst_util_dump_mem ((guint8 *) output, strlen (output)); + g_error ("Did not get output expected."); + } + + gst_buffer_unmap (buf, &map); + + fail_unless_equals_int64 (pts, GST_BUFFER_PTS (buf)); + fail_unless_equals_int64 (duration, GST_BUFFER_DURATION (buf)); + + gst_buffer_unref (buf); +} + +GST_START_TEST (test_sub_terminator) +{ + GstHarness *h; + GstBuffer *buf; + guchar *mkv_data; + gsize mkv_size; + + h = gst_harness_new_with_padnames ("matroskademux", "sink", NULL); + + g_signal_connect (h->element, "pad-added", G_CALLBACK (pad_added_cb), h); + + mkv_data = g_base64_decode (mkv_sub_base64, &mkv_size); + fail_unless (mkv_data != NULL); + + gst_harness_set_src_caps_str (h, "video/x-matroska"); + + buf = gst_buffer_new_wrapped (mkv_data, mkv_size); + GST_BUFFER_OFFSET (buf) = 0; + + fail_unless_equals_int (gst_harness_push (h, buf), GST_FLOW_OK); + gst_harness_push_event (h, gst_event_new_eos ()); + + pull_and_check_buffer (h, 1 * GST_SECOND, 2 * GST_SECOND, "foo"); + pull_and_check_buffer (h, 4 * GST_SECOND, 2 * GST_SECOND, "bar"); + pull_and_check_buffer (h, 7 * GST_SECOND, 2 * GST_SECOND, "baz"); + pull_and_check_buffer (h, 11 * GST_SECOND, 2 * GST_SECOND, "f\303\266"); + pull_and_check_buffer (h, 14 * GST_SECOND, 2 * GST_SECOND, "bar"); + /* The input is invalid UTF-8 here, what happens might depend on locale */ + pull_and_check_buffer (h, 17 * GST_SECOND, 2 * GST_SECOND, NULL); + + fail_unless (gst_harness_try_pull (h) == NULL); + + gst_harness_teardown (h); +} + +GST_END_TEST; + +static Suite * +matroskademux_suite (void) +{ + Suite *s = suite_create ("matroskademux"); + TCase *tc_chain = tcase_create ("general"); + + suite_add_tcase (s, tc_chain); + tcase_add_test (tc_chain, test_sub_terminator); + + return s; +} + +GST_CHECK_MAIN (matroskademux); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/matroskamux.c gst-plugins-good1.0-1.6.1/tests/check/elements/matroskamux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/matroskamux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/matroskamux.c 2015-10-22 08:02:54.000000000 +0000 @@ -477,19 +477,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = matroskamux_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (matroskamux); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/mpegaudioparse.c gst-plugins-good1.0-1.6.1/tests/check/elements/mpegaudioparse.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/mpegaudioparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/mpegaudioparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -129,6 +129,12 @@ Suite *s = suite_create ("mpegaudioparse"); TCase *tc_chain = tcase_create ("general"); + + /* init test context */ + ctx_factory = "mpegaudioparse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_parse_normal); tcase_add_test (tc_chain, test_parse_drain_single); @@ -146,25 +152,4 @@ * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = mpegaudioparse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "mpegaudioparse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (mpegaudioparse); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/mulawdec.c gst-plugins-good1.0-1.6.1/tests/check/elements/mulawdec.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/mulawdec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/mulawdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -20,6 +20,7 @@ #endif #include +#include #include static GstPad *mysrcpad, *mysinkpad; @@ -29,7 +30,7 @@ GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw," - "format = (string) S16LE, " + "format = (string) " GST_AUDIO_NE (S16) ", " "rate = (int) 8000, " "channels = (int) 1, " "layout = (string)interleaved") ); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/mulawenc.c gst-plugins-good1.0-1.6.1/tests/check/elements/mulawenc.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/mulawenc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/mulawenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -20,6 +20,7 @@ #endif #include +#include #include static GstPad *mysrcpad, *mysinkpad; @@ -35,7 +36,7 @@ GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw," - "format = (string) S16LE, " + "format = (string) " GST_AUDIO_NE (S16) ", " "rate = (int) 8000, " "channels = (int) 1, " "layout = (string)interleaved") ); @@ -46,7 +47,7 @@ GstCaps *src_caps; src_caps = gst_caps_from_string ("audio/x-raw," - "format = (string) S16LE, " + "format = (string) " GST_AUDIO_NE (S16) ", " "rate = (int) 8000, " "channels = (int) 1, " "layout = (string)interleaved"); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/multifile.c gst-plugins-good1.0-1.6.1/tests/check/elements/multifile.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/multifile.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/multifile.c 2015-10-22 08:02:54.000000000 +0000 @@ -30,14 +30,64 @@ #include #include +static GList *mfs_messages = NULL; + +static void +mfs_check_next_message (const gchar * filename) +{ + GstMessage *msg; + const gchar *msg_filename; + const GstStructure *structure; + + fail_unless (mfs_messages != NULL); + + msg = mfs_messages->data; + mfs_messages = g_list_delete_link (mfs_messages, mfs_messages); + + structure = gst_message_get_structure (msg); + + msg_filename = gst_structure_get_string (structure, "filename"); + + fail_unless (strcmp (filename, msg_filename) == 0); + + gst_message_unref (msg); +} + static void run_pipeline (GstElement * pipeline) { + GstMessage *msg; + GstBus *bus; + + bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); + gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_get_state (pipeline, NULL, NULL, -1); gst_element_set_state (pipeline, GST_STATE_PLAYING); - /* FIXME too lazy */ - g_usleep (1000000); + + while (1) { + msg = + gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, + GST_MESSAGE_EOS | GST_MESSAGE_ERROR | GST_MESSAGE_ELEMENT); + + fail_unless (msg != NULL); + if (msg) { + if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ELEMENT) { + if (gst_message_has_name (msg, "GstMultiFileSink")) + mfs_messages = g_list_append (mfs_messages, msg); + else + gst_message_unref (msg); + + continue; + } + + fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS); + gst_message_unref (msg); + } + break; + } + + gst_object_unref (bus); gst_element_set_state (pipeline, GST_STATE_NULL); } @@ -64,7 +114,8 @@ mfs = gst_bin_get_by_name (GST_BIN (pipeline), "mfs"); fail_if (mfs == NULL); mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL); - g_object_set (G_OBJECT (mfs), "location", mfs_pattern, NULL); + g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "post-messages", TRUE, + NULL); g_object_unref (mfs); run_pipeline (pipeline); gst_object_unref (pipeline); @@ -74,10 +125,14 @@ s = g_strdup_printf (mfs_pattern, i); fail_if (g_remove (s) != 0); + + mfs_check_next_message (s); + g_free (s); } fail_if (g_remove (my_tmpdir) != 0); + fail_unless (mfs_messages == NULL); g_free (mfs_pattern); g_free (my_tmpdir); } @@ -145,6 +200,7 @@ GstBuffer *buf; GstPad *sink; GstSegment segment; + GstBus *bus; tmpdir = g_get_tmp_dir (); template = g_build_filename (tmpdir, "multifile-test-XXXXXX", NULL); @@ -154,7 +210,10 @@ mfs = gst_element_factory_make ("multifilesink", NULL); fail_if (mfs == NULL); mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL); - g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "next-file", 3, NULL); + g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "next-file", 3, + "post-messages", TRUE, NULL); + bus = gst_bus_new (); + gst_element_set_bus (mfs, bus); fail_if (gst_element_set_state (mfs, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE); @@ -179,18 +238,32 @@ gst_buffer_fill (buf, 0, "baz", 4); fail_if (gst_pad_chain (sink, buf) != GST_FLOW_OK); + gst_pad_send_event (sink, gst_event_new_eos ()); + fail_if (gst_element_set_state (mfs, GST_STATE_NULL) == GST_STATE_CHANGE_FAILURE); + gst_element_set_bus (mfs, NULL); for (i = 0; i < 2; i++) { char *s; + GstMessage *msg; s = g_strdup_printf (mfs_pattern, i); fail_if (g_remove (s) != 0); + + msg = gst_bus_pop_filtered (bus, GST_MESSAGE_ELEMENT); + fail_unless (msg != NULL); + fail_unless (gst_message_has_name (msg, "GstMultiFileSink")); + fail_unless (strcmp (s, + gst_structure_get_string (gst_message_get_structure (msg), + "filename")) == 0); + + gst_message_unref (msg); g_free (s); } fail_if (g_remove (my_tmpdir) != 0); + gst_object_unref (bus); g_free (mfs_pattern); g_free (my_tmpdir); gst_object_unref (sink); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/qtmux.c gst-plugins-good1.0-1.6.1/tests/check/elements/qtmux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/qtmux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/qtmux.c 2015-10-22 08:02:54.000000000 +0000 @@ -38,6 +38,8 @@ * get_peer, and then remove references in every test function */ static GstPad *mysrcpad, *mysinkpad; +#define VIDEO_RAW_CAPS_STRING "video/x-raw" + #define AUDIO_CAPS_STRING "audio/mpeg, " \ "mpegversion = (int) 1, " \ "layer = (int) 3, " \ @@ -78,6 +80,7 @@ GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/quicktime")); + static GstStaticPadTemplate srcvideotemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -89,6 +92,12 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS (VIDEO_CAPS_H264_STRING)); +static GstStaticPadTemplate srcvideorawtemplate = +GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (VIDEO_RAW_CAPS_STRING)); + static GstStaticPadTemplate srcaudiotemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -153,8 +162,24 @@ gst_object_unref (srcpad); } +gboolean downstream_is_seekable; +static gboolean +qtmux_sinkpad_query (GstPad * pad, GstObject * parent, GstQuery * query) +{ + gboolean ret = FALSE; + + if (GST_QUERY_TYPE (query) == GST_QUERY_SEEKING) { + gst_query_set_seeking (query, GST_FORMAT_BYTES, downstream_is_seekable, 0, + -1); + ret = TRUE; + } + + return ret; +} + static GstElement * -setup_qtmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname) +setup_qtmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname, + gboolean seekable) { GstElement *qtmux; @@ -162,6 +187,10 @@ qtmux = gst_check_setup_element ("qtmux"); mysrcpad = setup_src_pad (qtmux, srctemplate, sinkname); mysinkpad = gst_check_setup_sink_pad (qtmux, &sinktemplate); + + downstream_is_seekable = seekable; + gst_pad_set_query_function (mysinkpad, qtmux_sinkpad_query); + gst_pad_set_active (mysrcpad, TRUE); gst_pad_set_active (mysinkpad, TRUE); @@ -191,11 +220,11 @@ int num_buffers; int i; guint8 data0[12] = "\000\000\000\024ftypqt "; - guint8 data1[8] = "\000\000\000\001mdat"; + guint8 data1[16] = "\000\000\000\010free\000\000\000\000mdat"; guint8 data2[4] = "moov"; GstSegment segment; - qtmux = setup_qtmux (srctemplate, sinkname); + qtmux = setup_qtmux (srctemplate, sinkname, TRUE); g_object_set (qtmux, "dts-method", dts_method, NULL); fail_unless (gst_element_set_state (qtmux, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, @@ -285,7 +314,7 @@ guint8 data4[4] = "mfra"; GstSegment segment; - qtmux = setup_qtmux (srctemplate, sinkname); + qtmux = setup_qtmux (srctemplate, sinkname, !streamable); g_object_set (qtmux, "dts-method", dts_method, NULL); g_object_set (qtmux, "fragment-duration", 2000, NULL); g_object_set (qtmux, "streamable", streamable, NULL); @@ -515,7 +544,7 @@ GST_START_TEST (test_reuse) { - GstElement *qtmux = setup_qtmux (&srcvideotemplate, "video_%u"); + GstElement *qtmux = setup_qtmux (&srcvideotemplate, "video_%u", TRUE); GstBuffer *inbuffer; GstCaps *caps; GstSegment segment; @@ -632,6 +661,8 @@ ); static GType test_mp3_enc_get_type (void); +static void test_input_push_segment_start (gpointer user_data, + GstClockTime start); G_DEFINE_TYPE (TestMp3Enc, test_mp3_enc, GST_TYPE_ELEMENT); @@ -888,6 +919,666 @@ GST_END_TEST; +struct TestInputData +{ + GstPad *srcpad; + GstSegment segment; + GList *input; + GThread *thread; + + /* When comparing ts, the input will be subtracted from this */ + gint64 ts_offset; + /* Due to DTS, the segment start might be shifted so this list + * is used to vefity each received segments */ + GList *expected_segment_start; + + GstClockTime expected_gap_ts; + GstClockTime expected_gap_duration; + gboolean gap_received; + + GstPad *sinkpad; + + GList *output_iter; +}; + +static void +test_input_data_init (struct TestInputData *data) +{ + data->ts_offset = 0; + data->expected_segment_start = NULL; + data->expected_gap_ts = 0; + data->expected_gap_duration = 0; + data->gap_received = FALSE; + data->srcpad = NULL; + data->sinkpad = NULL; + data->input = NULL; + data->thread = NULL; + + test_input_push_segment_start (data, 0); +} + +static void +test_input_data_clean (struct TestInputData *data) +{ + g_list_free_full (data->input, (GDestroyNotify) gst_mini_object_unref); + + if (data->sinkpad) { + gst_pad_set_active (data->sinkpad, FALSE); + gst_object_unref (data->sinkpad); + } + + gst_pad_set_active (data->srcpad, FALSE); + teardown_src_pad (data->srcpad); +} + +static gpointer +test_input_push_data (gpointer user_data) +{ + struct TestInputData *data = user_data; + GList *iter; + GstFlowReturn flow; + + for (iter = data->input; iter; iter = g_list_next (iter)) { + if (GST_IS_BUFFER (iter->data)) { + GST_INFO ("Pushing buffer %" GST_PTR_FORMAT " on pad: %s:%s", iter->data, + GST_DEBUG_PAD_NAME (data->srcpad)); + flow = + gst_pad_push (data->srcpad, + gst_buffer_ref ((GstBuffer *) iter->data)); + fail_unless (flow == GST_FLOW_OK); + } else { + GST_INFO_OBJECT (data->srcpad, "Pushing event: %" + GST_PTR_FORMAT, iter->data); + fail_unless (gst_pad_push_event (data->srcpad, + gst_event_ref ((GstEvent *) iter->data)) == TRUE); + } + } + return NULL; +} + +static void +test_input_push_segment_start (gpointer user_data, GstClockTime start) +{ + struct TestInputData *data = user_data; + GstClockTime *start_data = g_malloc (sizeof (GstClockTime)); + + *start_data = start; + data->expected_segment_start = g_list_append (data->expected_segment_start, + start_data); +} + +static GstClockTime +test_input_pop_segment_start (gpointer user_data) +{ + struct TestInputData *data = user_data; + GstClockTime start = GST_CLOCK_TIME_NONE; + GstClockTime *start_data; + + if (data->expected_segment_start) { + start_data = data->expected_segment_start->data; + data->expected_segment_start = + g_list_delete_link (data->expected_segment_start, + data->expected_segment_start); + start = *start_data; + g_free (start_data); + } + + return start; +} + +static GstBuffer * +create_buffer (GstClockTime pts, GstClockTime dts, GstClockTime duration, + guint bytes) +{ + GstBuffer *buf; + guint8 *data; + + data = g_malloc0 (bytes); + buf = gst_buffer_new_wrapped (data, bytes); + GST_BUFFER_PTS (buf) = pts; + GST_BUFFER_DTS (buf) = dts; + GST_BUFFER_DURATION (buf) = duration; + return buf; +} + +static GstFlowReturn +_test_sink_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) +{ + struct TestInputData *test_data = g_object_get_qdata (G_OBJECT (pad), + g_quark_from_static_string ("test-mux-pad")); + GstBuffer *expected_buffer; + + fail_unless (test_data->output_iter); + fail_unless (GST_IS_BUFFER (test_data->output_iter->data)); + expected_buffer = test_data->output_iter->data; + + fail_unless (GST_BUFFER_PTS (buffer) == + (GST_BUFFER_PTS_IS_VALID (expected_buffer) ? + GST_BUFFER_PTS (expected_buffer) - + test_data->ts_offset : GST_BUFFER_PTS (expected_buffer))); + fail_unless (GST_BUFFER_DTS (buffer) == + (GST_BUFFER_DTS_IS_VALID (expected_buffer) ? + GST_BUFFER_DTS (expected_buffer) - + test_data->ts_offset : GST_BUFFER_DTS (buffer))); + fail_unless (GST_BUFFER_DURATION (buffer) == + GST_BUFFER_DURATION (expected_buffer)); + + test_data->output_iter = g_list_next (test_data->output_iter); + + gst_buffer_unref (buffer); + return GST_FLOW_OK; +} + +static void +compare_event (GstEvent * event, GstEvent * expected) +{ + fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_TYPE (expected)); + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CAPS:{ + GstCaps *caps, *expected_caps; + + gst_event_parse_caps (event, &caps); + gst_event_parse_caps (expected, &expected_caps); + fail_unless (gst_caps_can_intersect (caps, expected_caps)); + } + break; + default: + break; + } +} + +static gboolean +_test_sink_pad_event (GstPad * pad, GstObject * parent, GstEvent * event) +{ + struct TestInputData *test_data = g_object_get_qdata (G_OBJECT (pad), + g_quark_from_static_string ("test-mux-pad")); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_STREAM_START: + case GST_EVENT_CAPS: + case GST_EVENT_EOS: + fail_unless (test_data->output_iter); + fail_unless (GST_IS_EVENT (test_data->output_iter->data)); + compare_event (event, test_data->output_iter->data); + test_data->output_iter = g_list_next (test_data->output_iter); + break; + case GST_EVENT_SEGMENT:{ + const GstSegment *segment; + + fail_unless (test_data->output_iter); + fail_unless (GST_IS_EVENT (test_data->output_iter->data)); + gst_event_parse_segment (event, &segment); + fail_unless (segment->start == test_input_pop_segment_start (test_data)); + test_data->output_iter = g_list_next (test_data->output_iter); + break; + } + case GST_EVENT_GAP:{ + GstClockTime timestamp; + GstClockTime duration; + gst_event_parse_gap (event, ×tamp, &duration); + fail_unless (timestamp == test_data->expected_gap_ts); + fail_unless (duration == test_data->expected_gap_duration); + test_data->gap_received = TRUE; + break; + } + case GST_EVENT_TAG: + /* ignore this event */ + break; + default: + GST_ERROR_OBJECT (pad, "Unexpected event: %" GST_PTR_FORMAT, event); + fail ("Unexpected event received %s", GST_EVENT_TYPE_NAME (event)); + break; + } + + gst_event_unref (event); + return TRUE; +} + +static void +_test_pad_added_cb (GstElement * element, GstPad * pad, gpointer udata) +{ + GstCaps *caps; + struct TestInputData **inputs = udata; + gint i = -1; + const gchar *name; + const gchar *strname; + + caps = gst_pad_get_current_caps (pad); + strname = gst_structure_get_name (gst_caps_get_structure (caps, 0)); + if (g_str_has_prefix (strname, "video/")) { + i = 0; /* video is 0, audio is 1 */ + name = "videosink"; + } else { + i = 1; + name = "audiosink"; + } + gst_caps_unref (caps); + + fail_unless (i != -1); + fail_unless (inputs[i]->sinkpad == NULL); + inputs[i]->sinkpad = gst_pad_new (name, GST_PAD_SINK); + inputs[i]->output_iter = inputs[i]->input; + g_object_set_qdata (G_OBJECT (inputs[i]->sinkpad), + g_quark_from_static_string ("test-mux-pad"), inputs[i]); + gst_pad_set_chain_function (inputs[i]->sinkpad, _test_sink_pad_chain); + gst_pad_set_event_function (inputs[i]->sinkpad, _test_sink_pad_event); + gst_pad_set_active (inputs[i]->sinkpad, TRUE); + fail_unless (gst_pad_link (pad, inputs[i]->sinkpad) == GST_PAD_LINK_OK); +} + +static void +check_output (const gchar * location, struct TestInputData *input1, + struct TestInputData *input2) +{ + GstElement *filesrc; + GstElement *demux; + struct TestInputData *inputs[2] = { input1, input2 }; + + filesrc = gst_element_factory_make ("filesrc", NULL); + demux = gst_element_factory_make ("qtdemux", NULL); + + fail_unless (gst_element_link (filesrc, demux)); + + g_object_set (filesrc, "location", location, NULL); + g_signal_connect (demux, "pad-added", (GCallback) _test_pad_added_cb, inputs); + + fail_unless (gst_element_set_state (demux, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS); + fail_unless (gst_element_set_state (filesrc, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS); + + /* FIXME use a main loop */ + g_usleep (2 * G_USEC_PER_SEC); + + fail_unless (gst_element_set_state (demux, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS); + fail_unless (gst_element_set_state (filesrc, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS); + gst_object_unref (filesrc); + gst_object_unref (demux); +} + +/* Muxes a file with qtmux using the inputs provided and + * then verifies that the generated file corresponds to the + * data in the inputs */ +static void +run_muxing_test (struct TestInputData *input1, struct TestInputData *input2) +{ + gchar *location; + GstElement *qtmux; + GstElement *filesink; + + location = g_strdup_printf ("%s/%s-%d", g_get_tmp_dir (), "qtmuxtest", + g_random_int ()); + qtmux = gst_check_setup_element ("qtmux"); + filesink = gst_element_factory_make ("filesink", NULL); + g_object_set (filesink, "location", location, NULL); + gst_element_link (qtmux, filesink); + + input1->srcpad = setup_src_pad (qtmux, &srcvideorawtemplate, "video_%u"); + fail_unless (input1->srcpad != NULL); + gst_pad_set_active (input1->srcpad, TRUE); + + input2->srcpad = setup_src_pad (qtmux, &srcaudioaactemplate, "audio_%u"); + fail_unless (input2->srcpad != NULL); + gst_pad_set_active (input2->srcpad, TRUE); + + fail_unless (gst_element_set_state (filesink, + GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE, + "could not set filesink to playing"); + fail_unless (gst_element_set_state (qtmux, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + + input1->thread = + g_thread_new ("test-push-data-1", test_input_push_data, input1); + input2->thread = + g_thread_new ("test-push-data-2", test_input_push_data, input2); + + /* FIXME set a mainloop and wait for EOS */ + + g_thread_join (input1->thread); + g_thread_join (input2->thread); + input1->thread = NULL; + input2->thread = NULL; + + gst_element_set_state (qtmux, GST_STATE_NULL); + gst_element_set_state (filesink, GST_STATE_NULL); + + check_output (location, input1, input2); + + gst_object_unref (filesink); + test_input_data_clean (input1); + test_input_data_clean (input2); + gst_check_teardown_element (qtmux); + + /* delete file */ + g_unlink (location); + g_free (location); +} + +GST_START_TEST (test_muxing) +{ + struct TestInputData input1, input2; + GstCaps *caps; + + test_input_data_init (&input1); + test_input_data_init (&input2); + + /* Create the inputs, after calling the run below, all this data is + * transfered to it and we have no need to clean up */ + input1.input = NULL; + input1.input = + g_list_append (input1.input, gst_event_new_stream_start ("test-1")); + caps = gst_caps_from_string + ("video/x-raw, width=(int)800, height=(int)600, " + "framerate=(fraction)1/1, format=(string)RGB"); + input1.input = g_list_append (input1.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input1.segment, GST_FORMAT_TIME); + input1.input = + g_list_append (input1.input, gst_event_new_segment (&input1.segment)); + input1.input = + g_list_append (input1.input, create_buffer (0, GST_CLOCK_TIME_NONE, + GST_SECOND, 800 * 600 * 3)); + input1.input = + g_list_append (input1.input, create_buffer (1 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = + g_list_append (input1.input, create_buffer (2 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = g_list_append (input1.input, gst_event_new_eos ()); + + input2.input = NULL; + input2.input = + g_list_append (input2.input, gst_event_new_stream_start ("test-2")); + caps = gst_caps_from_string + ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, " + "stream-format=(string)raw, framed=(boolean)true"); + input2.input = g_list_append (input2.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input2.segment, GST_FORMAT_TIME); + input2.input = + g_list_append (input2.input, gst_event_new_segment (&input2.segment)); + input2.input = + g_list_append (input2.input, create_buffer (0, 0, GST_SECOND, 4096)); + input2.input = + g_list_append (input2.input, create_buffer (1 * GST_SECOND, + 1 * GST_SECOND, GST_SECOND, 4096)); + input2.input = + g_list_append (input2.input, create_buffer (2 * GST_SECOND, + 2 * GST_SECOND, GST_SECOND, 4096)); + input2.input = g_list_append (input2.input, gst_event_new_eos ()); + + run_muxing_test (&input1, &input2); +} + +GST_END_TEST; + + +GST_START_TEST (test_muxing_non_zero_segment) +{ + struct TestInputData input1, input2; + GstCaps *caps; + + test_input_data_init (&input1); + test_input_data_init (&input2); + + /* Create the inputs, after calling the run below, all this data is + * transfered to it and we have no need to clean up */ + input1.input = NULL; + input1.input = + g_list_append (input1.input, gst_event_new_stream_start ("test-1")); + caps = gst_caps_from_string + ("video/x-raw, width=(int)800, height=(int)600, " + "framerate=(fraction)1/1, format=(string)RGB"); + input1.input = g_list_append (input1.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input1.segment, GST_FORMAT_TIME); + input1.segment.start = 10 * GST_SECOND; + input1.input = + g_list_append (input1.input, gst_event_new_segment (&input1.segment)); + input1.input = + g_list_append (input1.input, create_buffer (10 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = + g_list_append (input1.input, create_buffer (11 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = + g_list_append (input1.input, create_buffer (12 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = g_list_append (input1.input, gst_event_new_eos ()); + input1.ts_offset = GST_SECOND * 10; + + input2.input = NULL; + input2.input = + g_list_append (input2.input, gst_event_new_stream_start ("test-2")); + caps = gst_caps_from_string + ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, " + "stream-format=(string)raw, framed=(boolean)true"); + input2.input = g_list_append (input2.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input2.segment, GST_FORMAT_TIME); + input2.segment.start = 10 * GST_SECOND; + input2.input = + g_list_append (input2.input, gst_event_new_segment (&input2.segment)); + input2.input = + g_list_append (input2.input, create_buffer (10 * GST_SECOND, + 10 * GST_SECOND, GST_SECOND, 4096)); + input2.input = + g_list_append (input2.input, create_buffer (11 * GST_SECOND, + 11 * GST_SECOND, GST_SECOND, 4096)); + input2.input = + g_list_append (input2.input, create_buffer (12 * GST_SECOND, + 12 * GST_SECOND, GST_SECOND, 4096)); + input2.input = g_list_append (input2.input, gst_event_new_eos ()); + input2.ts_offset = GST_SECOND * 10; + + run_muxing_test (&input1, &input2); +} + +GST_END_TEST; + + +GST_START_TEST (test_muxing_non_zero_segment_different) +{ + struct TestInputData input1, input2; + GstCaps *caps; + + test_input_data_init (&input1); + test_input_data_init (&input2); + + /* Create the inputs, after calling the run below, all this data is + * transfered to it and we have no need to clean up */ + input1.input = NULL; + input1.input = + g_list_append (input1.input, gst_event_new_stream_start ("test-1")); + caps = gst_caps_from_string + ("video/x-raw, width=(int)800, height=(int)600, " + "framerate=(fraction)1/1, format=(string)RGB"); + input1.input = g_list_append (input1.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input1.segment, GST_FORMAT_TIME); + input1.segment.start = 5 * GST_SECOND; + input1.input = + g_list_append (input1.input, gst_event_new_segment (&input1.segment)); + input1.input = + g_list_append (input1.input, create_buffer (5 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = + g_list_append (input1.input, create_buffer (6 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = + g_list_append (input1.input, create_buffer (7 * GST_SECOND, + GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3)); + input1.input = g_list_append (input1.input, gst_event_new_eos ()); + input1.ts_offset = GST_SECOND * 5; + + input2.input = NULL; + input2.input = + g_list_append (input2.input, gst_event_new_stream_start ("test-2")); + caps = gst_caps_from_string + ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, " + "stream-format=(string)raw, framed=(boolean)true"); + input2.input = g_list_append (input2.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input2.segment, GST_FORMAT_TIME); + input2.segment.start = 10 * GST_SECOND; + input2.input = + g_list_append (input2.input, gst_event_new_segment (&input2.segment)); + input2.input = + g_list_append (input2.input, create_buffer (10 * GST_SECOND, + 10 * GST_SECOND, GST_SECOND, 4096)); + input2.input = + g_list_append (input2.input, create_buffer (11 * GST_SECOND, + 11 * GST_SECOND, GST_SECOND, 4096)); + input2.input = + g_list_append (input2.input, create_buffer (12 * GST_SECOND, + 12 * GST_SECOND, GST_SECOND, 4096)); + input2.input = g_list_append (input2.input, gst_event_new_eos ()); + input2.ts_offset = GST_SECOND * 10; + + run_muxing_test (&input1, &input2); +} + +GST_END_TEST; + +GST_START_TEST (test_muxing_dts_outside_segment) +{ + struct TestInputData input1, input2; + GstCaps *caps; + + test_input_data_init (&input1); + test_input_data_init (&input2); + + /* Create the inputs, after calling the run below, all this data is + * transfered to it and we have no need to clean up */ + input1.input = NULL; + input1.input = + g_list_append (input1.input, gst_event_new_stream_start ("test-1")); + caps = gst_caps_from_string + ("video/x-h264, width=(int)800, height=(int)600, " + "framerate=(fraction)1/1, stream-format=(string)avc, codec_data=(buffer)0000," + " alignment=(string)au, level=(int)2, profile=(string)high"); + input1.input = g_list_append (input1.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input1.segment, GST_FORMAT_TIME); + input1.segment.start = 1 * GST_SECOND; + input1.input = + g_list_append (input1.input, gst_event_new_segment (&input1.segment)); + input1.input = + g_list_append (input1.input, create_buffer (1 * GST_SECOND, + 0, GST_SECOND, 4096)); + input1.input = + g_list_append (input1.input, create_buffer (2 * GST_SECOND, + 1 * GST_SECOND, GST_SECOND, 4096)); + input1.input = + g_list_append (input1.input, create_buffer (3 * GST_SECOND, + 2 * GST_SECOND, GST_SECOND, 4096)); + input1.input = g_list_append (input1.input, gst_event_new_eos ()); + /* First DTS is 0, first PTS is 1s. The segment start being 1, this means + * running time -1s and 0. So the output segment should start from 1s to keep + * the same running time */ + test_input_pop_segment_start (&input1); + test_input_push_segment_start (&input1, GST_SECOND); + + input2.input = NULL; + input2.input = + g_list_append (input2.input, gst_event_new_stream_start ("test-2")); + caps = gst_caps_from_string + ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, " + "stream-format=(string)raw, framed=(boolean)true"); + input2.input = g_list_append (input2.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input2.segment, GST_FORMAT_TIME); + input2.input = + g_list_append (input2.input, gst_event_new_segment (&input2.segment)); + input2.input = + g_list_append (input2.input, create_buffer (0, 0, GST_SECOND, + 44100 * 4 * 2)); + input2.input = + g_list_append (input2.input, create_buffer (GST_SECOND, GST_SECOND, + GST_SECOND, 44100 * 4 * 2)); + input2.input = + g_list_append (input2.input, create_buffer (2 * GST_SECOND, + 2 * GST_SECOND, GST_SECOND, 44100 * 4 * 2)); + input2.input = g_list_append (input2.input, gst_event_new_eos ()); + + run_muxing_test (&input1, &input2); +} + +GST_END_TEST; + +GST_START_TEST (test_muxing_initial_gap) +{ + struct TestInputData input1, input2; + GstCaps *caps; + + test_input_data_init (&input1); + test_input_data_init (&input2); + + /* Create the inputs, after calling the run below, all this data is + * transfered to it and we have no need to clean up */ + input1.input = NULL; + input1.input = + g_list_append (input1.input, gst_event_new_stream_start ("test-1")); + caps = gst_caps_from_string + ("video/x-h264, width=(int)800, height=(int)600, " + "framerate=(fraction)1/1, stream-format=(string)avc, codec_data=(buffer)0000," + " alignment=(string)au, level=(int)2, profile=(string)high"); + input1.input = g_list_append (input1.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input1.segment, GST_FORMAT_TIME); + input1.input = + g_list_append (input1.input, gst_event_new_segment (&input1.segment)); + /* Duplicate the segment to please the harness */ + input1.input = + g_list_append (input1.input, gst_event_new_segment (&input1.segment)); + input1.input = + g_list_append (input1.input, create_buffer (1 * GST_SECOND, + 0, GST_SECOND, 4096)); + input1.input = + g_list_append (input1.input, create_buffer (2 * GST_SECOND, + 1 * GST_SECOND, GST_SECOND, 4096)); + input1.input = + g_list_append (input1.input, create_buffer (3 * GST_SECOND, + 2 * GST_SECOND, GST_SECOND, 4096)); + input1.input = g_list_append (input1.input, gst_event_new_eos ()); + + /* We expect a 1s gap at the start */ + input1.expected_gap_duration = GST_SECOND; + /* There will be two segments, first is 0, so leave it there, second should + * match the first CTTS (PTS - DTS) */ + test_input_push_segment_start (&input1, GST_SECOND); + + input2.input = NULL; + input2.input = + g_list_append (input2.input, gst_event_new_stream_start ("test-2")); + caps = gst_caps_from_string + ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, " + "stream-format=(string)raw, framed=(boolean)true"); + input2.input = g_list_append (input2.input, gst_event_new_caps (caps)); + gst_caps_unref (caps); + gst_segment_init (&input2.segment, GST_FORMAT_TIME); + input2.input = + g_list_append (input2.input, gst_event_new_segment (&input2.segment)); + input2.input = + g_list_append (input2.input, create_buffer (0, 0, GST_SECOND, + 44100 * 4 * 2)); + input2.input = + g_list_append (input2.input, create_buffer (GST_SECOND, GST_SECOND, + GST_SECOND, 44100 * 4 * 2)); + input2.input = + g_list_append (input2.input, create_buffer (2 * GST_SECOND, + 2 * GST_SECOND, GST_SECOND, 44100 * 4 * 2)); + input2.input = g_list_append (input2.input, gst_event_new_eos ()); + + run_muxing_test (&input1, &input2); + + fail_unless (input1.gap_received); +} + +GST_END_TEST; static Suite * qtmux_suite (void) @@ -926,6 +1617,12 @@ tcase_add_test (tc_chain, test_encodebin_qtmux); tcase_add_test (tc_chain, test_encodebin_mp4mux); + tcase_add_test (tc_chain, test_muxing); + tcase_add_test (tc_chain, test_muxing_non_zero_segment); + tcase_add_test (tc_chain, test_muxing_non_zero_segment_different); + tcase_add_test (tc_chain, test_muxing_dts_outside_segment); + tcase_add_test (tc_chain, test_muxing_initial_gap); + return s; } diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rganalysis.c gst-plugins-good1.0-1.6.1/tests/check/elements/rganalysis.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rganalysis.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rganalysis.c 2015-10-22 08:02:54.000000000 +0000 @@ -1976,19 +1976,4 @@ return s; } -int -main (int argc, char **argv) -{ - gint nf; - - Suite *s = rganalysis_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_ENV); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rganalysis); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rglimiter.c gst-plugins-good1.0-1.6.1/tests/check/elements/rglimiter.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rglimiter.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rglimiter.c 2015-10-22 08:02:54.000000000 +0000 @@ -274,19 +274,4 @@ return s; } -int -main (int argc, char **argv) -{ - gint nf; - - Suite *s = rglimiter_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_ENV); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rglimiter); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rgvolume.c gst-plugins-good1.0-1.6.1/tests/check/elements/rgvolume.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rgvolume.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rgvolume.c 2015-10-22 08:02:54.000000000 +0000 @@ -162,7 +162,7 @@ GstCaps *caps; gboolean res; - caps = gst_caps_from_string ("audio/x-raw, format = F32LE, " + caps = gst_caps_from_string ("audio/x-raw, format = " GST_AUDIO_NE (F32) ", " "layout = interleaved, rate = 8000, channels = 1"); res = gst_pad_push_event (mysrcpad, gst_event_new_caps (caps)); fail_unless (res, "CAPS event not handled"); @@ -669,19 +669,4 @@ return s; } -int -main (int argc, char **argv) -{ - gint nf; - - Suite *s = rgvolume_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_ENV); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rgvolume); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtpaux.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtpaux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtpaux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtpaux.c 2015-10-22 08:02:54.000000000 +0000 @@ -202,7 +202,7 @@ RTXSendData send_rtxdata; send_rtxdata.count = 1; send_rtxdata.nb_packets = 0; - send_rtxdata.drop_every_n_packets = 50; + send_rtxdata.drop_every_n_packets = 25; GST_INFO ("preparing test"); @@ -218,8 +218,8 @@ rtpbinsend = gst_element_factory_make ("rtpbin", "rtpbinsend"); g_object_set (rtpbinsend, "latency", 200, "do-retransmission", TRUE, NULL); src = gst_element_factory_make ("audiotestsrc", "src"); - encoder = gst_element_factory_make ("speexenc", "encoder"); - rtppayloader = gst_element_factory_make ("rtpspeexpay", "rtppayloader"); + encoder = gst_element_factory_make ("alawenc", "encoder"); + rtppayloader = gst_element_factory_make ("rtppcmapay", "rtppayloader"); rtprtxsend = gst_element_factory_make ("rtprtxsend", "rtprtxsend"); sendrtp_udpsink = gst_element_factory_make ("udpsink", "sendrtp_udpsink"); g_object_set (sendrtp_udpsink, "host", "127.0.0.1", NULL); @@ -238,7 +238,7 @@ g_object_set (recvrtp_udpsrc, "port", 5006, NULL); rtpcaps = gst_caps_from_string - ("application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)SPEEX,encoding-params=(string)1,octet-align=(string)1"); + ("application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA,payload=(int)96"); g_object_set (recvrtp_udpsrc, "caps", rtpcaps, NULL); gst_caps_unref (rtpcaps); recvrtcp_udpsrc = gst_element_factory_make ("udpsrc", "recvrtcp_udpsrc"); @@ -249,8 +249,8 @@ g_object_set (recvrtcp_udpsink, "sync", FALSE, NULL); g_object_set (recvrtcp_udpsink, "async", FALSE, NULL); rtprtxreceive = gst_element_factory_make ("rtprtxreceive", "rtprtxreceive"); - rtpdepayloader = gst_element_factory_make ("rtpspeexdepay", "rtpdepayloader"); - decoder = gst_element_factory_make ("speexdec", "decoder"); + rtpdepayloader = gst_element_factory_make ("rtppcmadepay", "rtpdepayloader"); + decoder = gst_element_factory_make ("alawdec", "decoder"); converter = gst_element_factory_make ("identity", "converter"); sink = gst_element_factory_make ("fakesink", "sink"); g_object_set (sink, "sync", TRUE, NULL); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtpbin.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtpbin.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtpbin.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtpbin.c 2015-10-22 08:02:54.000000000 +0000 @@ -687,7 +687,7 @@ GST_END_TEST; static Suite * -gstrtpbin_suite (void) +rtpbin_suite (void) { Suite *s = suite_create ("rtpbin"); TCase *tc_chain = tcase_create ("general"); @@ -706,19 +706,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = gstrtpbin_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rtpbin); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtpcollision.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtpcollision.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtpcollision.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtpcollision.c 2015-10-22 08:02:54.000000000 +0000 @@ -156,7 +156,7 @@ return GST_FLOW_OK; } -/* This test build the pipeline audiotestsrc ! speexenc ! rtpspeexpay ! \ +/* This test build the pipeline audiotestsrc ! alawenc ! rtppcmapay ! \ * rtpsession ! fakesink * It manually pushs buffer into rtpsession with same ssrc but different * ip so that collision can be detected @@ -186,9 +186,9 @@ src = gst_element_factory_make ("audiotestsrc", "src"); g_object_set (src, "num-buffers", 5, NULL); - encoder = gst_element_factory_make ("speexenc", NULL); - rtppayloader = gst_element_factory_make ("rtpspeexpay", NULL); - g_object_set (rtppayloader, "pt", 96, NULL); + encoder = gst_element_factory_make ("alawenc", NULL); + rtppayloader = gst_element_factory_make ("rtppcmapay", NULL); + g_object_set (rtppayloader, "pt", 8, NULL); rtpsession = gst_element_factory_make ("rtpsession", NULL); sink = gst_element_factory_make ("fakesink", "sink"); gst_bin_add_many (GST_BIN (bin), src, encoder, rtppayloader, @@ -261,7 +261,7 @@ gst_object_unref (bin); /* check results */ - fail_unless_equals_int (nb_ssrc_changes, 7); + fail_unless_equals_int (nb_ssrc_changes, 4); } GST_END_TEST; @@ -325,7 +325,7 @@ return ret; } -/* This test build the pipeline audiotestsrc ! speexenc ! rtpspeexpay ! \ +/* This test build the pipeline audiotestsrc ! alawenc ! rtppcmapay ! \ * rtprtxsend ! rtpsession ! fakesink * It manually pushs buffer into rtpsession with same ssrc than rtx stream * but different ip so that collision can be detected @@ -355,12 +355,12 @@ src = gst_element_factory_make ("audiotestsrc", "src"); g_object_set (src, "num-buffers", 5, NULL); - encoder = gst_element_factory_make ("speexenc", NULL); - rtppayloader = gst_element_factory_make ("rtpspeexpay", NULL); - g_object_set (rtppayloader, "pt", 96, NULL); + encoder = gst_element_factory_make ("alawenc", NULL); + rtppayloader = gst_element_factory_make ("rtppcmapay", NULL); + g_object_set (rtppayloader, "pt", 8, NULL); rtprtxsend = gst_element_factory_make ("rtprtxsend", NULL); pt_map = gst_structure_new ("application/x-rtp-pt-map", - "96", G_TYPE_UINT, 99, NULL); + "8", G_TYPE_UINT, 99, NULL); g_object_set (rtprtxsend, "payload-type-map", pt_map, NULL); gst_structure_free (pt_map); rtpsession = gst_element_factory_make ("rtpsession", NULL); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtph263.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtph263.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtph263.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtph263.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,116 @@ +/* GStreamer + * + * Copyright (C) 2015 Pexip AS + * @author Stian Selnes + * + * 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. + */ + +#include +#include +#include + +#define RTP_H263_CAPS_STR(p) \ + "application/x-rtp,media=video,encoding-name=H263,clock-rate=90000," \ + "payload=" G_STRINGIFY(p) + +static GstBuffer * +create_rtp_buffer (guint8 * data, gsize size, guint ts, gint seqnum) +{ + GstBuffer *buf = gst_rtp_buffer_new_copy_data (data, size); + GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; + + GST_BUFFER_PTS (buf) = (ts) * (GST_SECOND / 30); + + gst_rtp_buffer_map (buf, GST_MAP_WRITE, &rtp); + gst_rtp_buffer_set_seq (&rtp, seqnum); + gst_rtp_buffer_unmap (&rtp); + + return buf; +} + +GST_START_TEST (test_h263depay_start_packet_too_small_mode_a) +{ + GstHarness *h = gst_harness_new ("rtph263depay"); + guint8 packet[] = { + 0x80, 0xa2, 0x17, 0x62, 0x57, 0xbb, 0x48, 0x98, 0x4a, 0x59, 0xe8, 0xdc, + 0x00, 0x00, 0x80, 0x00 + }; + + gst_harness_set_src_caps_str (h, RTP_H263_CAPS_STR (34)); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h, create_rtp_buffer (packet, sizeof (packet), 0, 0))); + + /* Packet should be dropped and depayloader not crash */ + fail_unless_equals_int (0, gst_harness_buffers_received (h)); + + gst_harness_teardown (h); +} +GST_END_TEST; + +GST_START_TEST (test_h263depay_start_packet_too_small_mode_b) +{ + GstHarness *h = gst_harness_new ("rtph263depay"); + guint8 packet[] = { + 0x80, 0xa2, 0x17, 0x62, 0x57, 0xbb, 0x48, 0x98, 0x4a, 0x59, 0xe8, 0xdc, + 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + gst_harness_set_src_caps_str (h, RTP_H263_CAPS_STR (34)); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h, create_rtp_buffer (packet, sizeof (packet), 0, 0))); + + /* Packet should be dropped and depayloader not crash */ + fail_unless_equals_int (0, gst_harness_buffers_received (h)); + + gst_harness_teardown (h); +} +GST_END_TEST; + +GST_START_TEST (test_h263depay_start_packet_too_small_mode_c) +{ + GstHarness *h = gst_harness_new ("rtph263depay"); + guint8 packet[] = { + 0x80, 0xa2, 0x17, 0x62, 0x57, 0xbb, 0x48, 0x98, 0x4a, 0x59, 0xe8, 0xdc, + 0xc0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + gst_harness_set_src_caps_str (h, RTP_H263_CAPS_STR (34)); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h, create_rtp_buffer (packet, sizeof (packet), 0, 0))); + + /* Packet should be dropped and depayloader not crash */ + fail_unless_equals_int (0, gst_harness_buffers_received (h)); + + gst_harness_teardown (h); +} +GST_END_TEST; + +static Suite * +rtph263_suite (void) +{ + Suite *s = suite_create ("rtph263"); + TCase *tc_chain; + + suite_add_tcase (s, (tc_chain = tcase_create ("h263depay"))); + tcase_add_test (tc_chain, test_h263depay_start_packet_too_small_mode_a); + tcase_add_test (tc_chain, test_h263depay_start_packet_too_small_mode_b); + tcase_add_test (tc_chain, test_h263depay_start_packet_too_small_mode_c); + + return s; +} + +GST_CHECK_MAIN (rtph263); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtpjitterbuffer.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtpjitterbuffer.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtpjitterbuffer.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtpjitterbuffer.c 2015-10-22 08:02:54.000000000 +0000 @@ -5,6 +5,9 @@ * Copyright (C) 2012 Cisco Systems, Inc * Authors: Kelley Rogers * Havard Graff + * Copyright (C) 2013-2015 Pexip AS + * Stian Selnes + * Havard Graff * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -24,6 +27,7 @@ #include #include +#include #include @@ -75,7 +79,8 @@ * "audio/x-raw,channels=1,rate=8000" ! mulawenc ! rtppcmupay ! * fakesink dump=1 */ - guint8 in[] = { /* first 4 bytes are rtp-header, next 4 bytes are timestamp */ + guint8 in[] = { + /* first 4 bytes are rtp-header, next 4 bytes are timestamp */ 0x80, 0x80, 0x1c, 0x24, 0x46, 0xcd, 0xb7, 0x11, 0x3c, 0x3a, 0x7c, 0x5b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff @@ -374,10 +379,14 @@ } GST_END_TEST; -static const guint payload_size = 160; -static const guint clock_rate = 8000; -static const guint pcmu_payload_type = 0; -static const guint test_ssrc = 0x01BADBAD; + +#define PCMU_BUF_CLOCK_RATE 8000 +#define PCMU_BUF_PT 0 +#define PCMU_BUF_SSRC 0x01BADBAD +#define PCMU_BUF_MS 20 +#define PCMU_BUF_DURATION (PCMU_BUF_MS * GST_MSECOND) +#define PCMU_BUF_SIZE (64000 * PCMU_BUF_MS / 1000) +#define PCMU_RTP_TS_DURATION (PCMU_BUF_CLOCK_RATE * PCMU_BUF_MS / 1000) typedef struct { @@ -396,14 +405,14 @@ { return gst_caps_new_simple ("application/x-rtp", "media", G_TYPE_STRING, "audio", - "clock-rate", G_TYPE_INT, clock_rate, + "clock-rate", G_TYPE_INT, PCMU_BUF_CLOCK_RATE, "encoding-name", G_TYPE_STRING, "PCMU", - "payload", G_TYPE_INT, pcmu_payload_type, - "ssrc", G_TYPE_UINT, test_ssrc, NULL); + "payload", G_TYPE_INT, PCMU_BUF_PT, + "ssrc", G_TYPE_UINT, PCMU_BUF_SSRC, NULL); } static GstBuffer * -generate_test_buffer (GstClockTime gst_ts, +generate_test_buffer_full (GstClockTime gst_ts, gboolean marker_bit, guint seq_num, guint32 rtp_ts) { GstBuffer *buf; @@ -411,19 +420,19 @@ guint i; GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; - buf = gst_rtp_buffer_new_allocate (payload_size, 0, 0); + buf = gst_rtp_buffer_new_allocate (PCMU_BUF_SIZE, 0, 0); GST_BUFFER_DTS (buf) = gst_ts; GST_BUFFER_PTS (buf) = gst_ts; gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp); - gst_rtp_buffer_set_payload_type (&rtp, pcmu_payload_type); + gst_rtp_buffer_set_payload_type (&rtp, PCMU_BUF_PT); gst_rtp_buffer_set_marker (&rtp, marker_bit); gst_rtp_buffer_set_seq (&rtp, seq_num); gst_rtp_buffer_set_timestamp (&rtp, rtp_ts); - gst_rtp_buffer_set_ssrc (&rtp, test_ssrc); + gst_rtp_buffer_set_ssrc (&rtp, PCMU_BUF_SSRC); payload = gst_rtp_buffer_get_payload (&rtp); - for (i = 0; i < payload_size; i++) + for (i = 0; i < PCMU_BUF_SIZE; i++) payload[i] = 0xff; gst_rtp_buffer_unmap (&rtp); @@ -431,6 +440,13 @@ return buf; } +static GstBuffer * +generate_test_buffer (guint seq_num) +{ + return generate_test_buffer_full (seq_num * PCMU_BUF_DURATION, + TRUE, seq_num, seq_num * PCMU_RTP_TS_DURATION); +} + static GstFlowReturn test_sink_pad_chain_cb (GstPad * pad, GstObject * parent, GstBuffer * buffer) { @@ -578,15 +594,13 @@ static void verify_lost_event (GstEvent * event, guint32 expected_seqnum, - GstClockTime expected_timestamp, GstClockTime expected_duration, - gboolean expected_late) + GstClockTime expected_timestamp, GstClockTime expected_duration) { const GstStructure *s = gst_event_get_structure (event); const GValue *value; guint32 seqnum; GstClockTime timestamp; GstClockTime duration; - gboolean late; g_assert (gst_structure_get_uint (s, "seqnum", &seqnum)); @@ -598,12 +612,9 @@ g_assert (value && G_VALUE_HOLDS_UINT64 (value)); duration = g_value_get_uint64 (value); - g_assert (gst_structure_get_boolean (s, "late", &late)); - - g_assert_cmpint (seqnum, ==, expected_seqnum); - g_assert_cmpint (timestamp, ==, expected_timestamp); - g_assert_cmpint (duration, ==, expected_duration); - g_assert (late == expected_late); + fail_unless_equals_int (seqnum, expected_seqnum); + fail_unless_equals_int (timestamp, expected_timestamp); + fail_unless_equals_int (duration, expected_duration); gst_event_unref (event); } @@ -643,86 +654,80 @@ GST_START_TEST (test_only_one_lost_event_on_large_gaps) { - TestData data; + GstHarness *h = gst_harness_new ("rtpjitterbuffer"); + GstTestClock *testclock; GstClockID id, test_id; - GstBuffer *in_buf, *out_buf; + GstBuffer *out_buf; GstEvent *out_event; gint jb_latency_ms = 200; - guint buffer_size_ms = (payload_size * 1000) / clock_rate; + gint num_lost_events = jb_latency_ms / PCMU_BUF_MS; GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; - setup_testharness (&data); + gst_harness_set_src_caps (h, generate_caps ()); + gst_harness_use_testclock (h); + testclock = gst_harness_get_testclock (h); + g_object_set (h->element, "do-lost", TRUE, "latency", jb_latency_ms, NULL); - g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL); /* push the first buffer in */ - in_buf = generate_test_buffer (0 * GST_MSECOND, TRUE, 0, 0); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 0); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + gst_harness_push (h, generate_test_buffer (0)); /* wait for the first buffer to be synced to timestamp + latency */ - gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + gst_test_clock_wait_for_next_pending_id (testclock, &id); /* increase the time to timestamp + latency and release the wait */ - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), - jb_latency_ms * GST_MSECOND); - test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - g_assert (test_id == id); + gst_test_clock_set_time (testclock, jb_latency_ms * GST_MSECOND); + test_id = gst_test_clock_process_next_clock_id (testclock); + fail_unless (id == test_id); gst_clock_id_unref (test_id); gst_clock_id_unref (id); /* check for the buffer coming out that was pushed in */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, 0); g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, 0); gst_buffer_unref (out_buf); - /* move time ahead 10 seconds */ - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 10 * GST_SECOND); - - /* wait a bit */ - g_usleep (G_USEC_PER_SEC / 10); + /* move time ahead to just before 10 seconds */ + gst_test_clock_set_time (testclock, 10 * GST_SECOND - 1); - /* check that no buffers have been pushed out and no pending waits */ - g_assert_cmpint (g_async_queue_length (data.buf_queue), ==, 0); - g_assert (gst_test_clock_peek_next_pending_id (GST_TEST_CLOCK (data.clock), - &id) == FALSE); + /* check that we have no pending waits */ + fail_unless_equals_int (0, gst_test_clock_peek_id_count (testclock)); /* a buffer now arrives perfectly on time */ - in_buf = generate_test_buffer (10 * GST_SECOND, FALSE, 500, 500 * 160); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 10 * GST_SECOND); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + gst_harness_push (h, generate_test_buffer (500)); - /* release the wait */ - gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - gst_test_clock_advance_time (GST_TEST_CLOCK (data.clock), GST_MSECOND * 20); - test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - g_assert (id == test_id); - gst_clock_id_unref (test_id); - gst_clock_id_unref (id); + /* release the wait, advancing the clock to 10 sec */ + gst_harness_crank_single_clock_wait (h); - /* we should now receive a packet-lost-event for buffers 1 through 489 */ - out_event = g_async_queue_pop (data.sink_event_queue); + /* drop GstEventStreamStart & GstEventCaps & GstEventSegment */ + for (int i = 0; i < 3; i++) + gst_event_unref (gst_harness_pull_event (h)); + + /* we should now receive a packet-lost-event for buffers 1 through 489 ... */ + out_event = gst_harness_pull_event (h); g_assert (out_event != NULL); - g_assert_cmpint (data.lost_event_count, ==, 1); - verify_lost_event (out_event, 1, 1 * GST_MSECOND * 20, GST_MSECOND * 20 * 490, - TRUE); + verify_lost_event (out_event, 1, 1 * PCMU_BUF_DURATION, + PCMU_BUF_DURATION * 489); - /* churn through sync_times until the new buffer gets pushed out */ - while (g_async_queue_length (data.buf_queue) < 1) { - if (gst_test_clock_peek_next_pending_id (GST_TEST_CLOCK (data.clock), &id)) { - GstClockTime t = gst_clock_id_get_time (id); - if (t > gst_clock_get_time (data.clock)) { - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), t); - } - test_id = - gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - gst_clock_id_unref (test_id); - gst_clock_id_unref (id); - } + /* ... as well as 490 (since at 10 sec 490 is too late) */ + out_event = gst_harness_pull_event (h); + g_assert (out_event != NULL); + verify_lost_event (out_event, 490, 490 * PCMU_BUF_DURATION, + PCMU_BUF_DURATION); + + /* we get as many lost events as the the number of * + * buffers the jitterbuffer is able to wait for */ + for (int i = 1; i < num_lost_events; i++) { + gst_harness_crank_single_clock_wait (h); + out_event = gst_harness_pull_event (h); + g_assert (out_event != NULL); + verify_lost_event (out_event, 490 + i, (490 + i) * PCMU_BUF_DURATION, + PCMU_BUF_DURATION); } - out_buf = g_async_queue_pop (data.buf_queue); + /* and then the buffer is released */ + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT)); gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp); @@ -732,95 +737,81 @@ g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, (10 * GST_SECOND)); gst_buffer_unref (out_buf); - /* we get as many lost events as the the number of buffers the jitterbuffer - * is able to wait for (+ the one we already got) */ - g_assert_cmpint (data.lost_event_count, ==, jb_latency_ms / buffer_size_ms); - - destroy_testharness (&data); + gst_object_unref (testclock); + gst_harness_teardown (h); } GST_END_TEST; GST_START_TEST (test_two_lost_one_arrives_in_time) { - TestData data; - GstClockID id, test_id; - GstBuffer *in_buf, *out_buf; + GstHarness *h = gst_harness_new ("rtpjitterbuffer"); + GstTestClock *testclock; + GstClockID id; + GstBuffer *out_buf; GstEvent *out_event; - gint jb_latency_ms = 100; - GstClockTime buffer_time, now; - gint b; + gint jb_latency_ms = 100; /* FIXME: setting this to 10 produces a + * strange result (30ms lost event), + * find out why! */ GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; + GstClockTime buffer_time; + gint b; - setup_testharness (&data); - - g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL); - - /* push the first buffer in */ - in_buf = generate_test_buffer (0 * GST_MSECOND, TRUE, 0, 0); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 0); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - now = jb_latency_ms * GST_MSECOND; - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), now); - test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - g_assert (test_id == id); - gst_clock_id_unref (test_id); - gst_clock_id_unref (id); - out_buf = g_async_queue_pop (data.buf_queue); - g_assert (out_buf != NULL); + gst_harness_set_src_caps (h, generate_caps ()); + gst_harness_use_testclock (h); + testclock = gst_harness_get_testclock (h); + g_object_set (h->element, "do-lost", TRUE, "latency", jb_latency_ms, NULL); + + /* push the first buffer through */ + gst_harness_push (h, generate_test_buffer (0)); + gst_harness_crank_single_clock_wait (h); + gst_buffer_unref (gst_harness_pull (h)); /* push some buffers arriving in perfect time! */ for (b = 1; b < 3; b++) { - buffer_time = b * GST_MSECOND * 20; - in_buf = generate_test_buffer (buffer_time, TRUE, b, b * 160); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), now + buffer_time); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - gst_buffer_unref (out_buf); + buffer_time = b * PCMU_BUF_DURATION; + gst_harness_push (h, generate_test_buffer (b)); /* check for the buffer coming out that was pushed in */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, buffer_time); g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, buffer_time); + gst_buffer_unref (out_buf); } - gst_buffer_unref (out_buf); /* hop over 2 packets and make another one (gap of 2) */ b = 5; - buffer_time = b * GST_MSECOND * 20; - in_buf = generate_test_buffer (buffer_time, TRUE, b, b * 160); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + buffer_time = b * PCMU_BUF_DURATION; + gst_harness_push (h, generate_test_buffer (b)); /* verify that the jitterbuffer now wait for the latest moment it can push */ - /* the first lost buffer (buffer 3) out on (buffer-timestamp (60) + latency (10) = 70) */ - gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + /* the first lost buffer (buffer 3) out on + * (buffer-timestamp (60) + latency (100) = 160) */ + gst_test_clock_wait_for_next_pending_id (testclock, &id); g_assert_cmpint (gst_clock_id_get_time (id), ==, - (3 * GST_MSECOND * 20) + (jb_latency_ms * GST_MSECOND)); + (3 * PCMU_BUF_DURATION) + (jb_latency_ms * GST_MSECOND)); + gst_clock_id_unref (id); /* let the time expire... */ - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), - gst_clock_id_get_time (id)); - test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - g_assert (test_id == id); - gst_clock_id_unref (test_id); - gst_clock_id_unref (id); + gst_harness_crank_single_clock_wait (h); + + /* drop GstEventStreamStart & GstEventCaps & GstEventSegment */ + for (int i = 0; i < 3; i++) + gst_event_unref (gst_harness_pull_event (h)); /* we should now receive a packet-lost-event for buffer 3 */ - out_event = g_async_queue_pop (data.sink_event_queue); + out_event = gst_harness_pull_event (h); g_assert (out_event != NULL); - g_assert_cmpint (data.lost_event_count, ==, 1); - verify_lost_event (out_event, 3, 3 * GST_MSECOND * 20, GST_MSECOND * 20, - FALSE); + verify_lost_event (out_event, 3, 3 * PCMU_BUF_DURATION, PCMU_BUF_DURATION); /* buffer 4 now arrives just in time (time is 70, buffer 4 expires at 90) */ b = 4; - buffer_time = b * GST_MSECOND * 20; - in_buf = generate_test_buffer (buffer_time, TRUE, b, b * 160); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + buffer_time = b * PCMU_BUF_DURATION; + gst_harness_push (h, generate_test_buffer (b)); /* verify that buffer 4 made it through! */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT)); gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp); @@ -829,7 +820,7 @@ gst_buffer_unref (out_buf); /* and see that buffer 5 now arrives in a normal fashion */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert (!GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT)); gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp); @@ -837,73 +828,66 @@ gst_rtp_buffer_unmap (&rtp); gst_buffer_unref (out_buf); - /* should still have only seen 1 packet lost event */ - g_assert_cmpint (data.lost_event_count, ==, 1); - - destroy_testharness (&data); + gst_object_unref (testclock); + gst_harness_teardown (h); } GST_END_TEST; GST_START_TEST (test_late_packets_still_makes_lost_events) { - TestData data; - GstClockID id, test_id; - GstBuffer *in_buf, *out_buf; + GstHarness *h = gst_harness_new ("rtpjitterbuffer"); + GstTestClock *testclock; + GstBuffer *out_buf; GstEvent *out_event; - gint jb_latency_ms = 10; + gint jb_latency_ms = 100; + GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; GstClockTime buffer_time; gint b; - GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; - setup_testharness (&data); - - g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL); + gst_harness_set_src_caps (h, generate_caps ()); + gst_harness_use_testclock (h); + testclock = gst_harness_get_testclock (h); + g_object_set (h->element, "do-lost", TRUE, "latency", jb_latency_ms, NULL); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 10 * GST_SECOND); + /* advance the clock with 10 seconds */ + gst_test_clock_set_time (testclock, 10 * GST_SECOND); - /* push the first buffer in */ - in_buf = generate_test_buffer (0 * GST_MSECOND, TRUE, 0, 0); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - - gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - g_assert (test_id == id); - gst_clock_id_unref (id); - gst_clock_id_unref (test_id); - out_buf = g_async_queue_pop (data.buf_queue); - g_assert (out_buf != NULL); + /* push the first buffer through */ + gst_buffer_unref (gst_harness_push_and_pull (h, generate_test_buffer (0))); - /* push some buffers in! */ + /* push some buffers arriving in perfect time! */ for (b = 1; b < 3; b++) { - buffer_time = b * GST_MSECOND * 20; - in_buf = generate_test_buffer (buffer_time, TRUE, b, b * 160); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - gst_buffer_unref (out_buf); + buffer_time = b * PCMU_BUF_DURATION; + gst_harness_push (h, generate_test_buffer (b)); /* check for the buffer coming out that was pushed in */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, buffer_time); g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, buffer_time); + gst_buffer_unref (out_buf); } - gst_buffer_unref (out_buf); /* hop over 2 packets and make another one (gap of 2) */ b = 5; - buffer_time = b * GST_MSECOND * 20; - in_buf = generate_test_buffer (buffer_time, TRUE, b, b * 160); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + buffer_time = b * PCMU_BUF_DURATION; + gst_harness_push (h, generate_test_buffer (b)); - /* we should now receive a packet-lost-event for buffer 3 and 4 */ - out_event = g_async_queue_pop (data.sink_event_queue); + /* drop GstEventStreamStart & GstEventCaps & GstEventSegment */ + for (int i = 0; i < 3; i++) + gst_event_unref (gst_harness_pull_event (h)); + + /* we should now receive packet-lost-events for buffer 3 and 4 */ + out_event = gst_harness_pull_event (h); g_assert (out_event != NULL); - g_assert_cmpint (data.lost_event_count, ==, 1); - verify_lost_event (out_event, 3, 3 * GST_MSECOND * 20, GST_MSECOND * 20 * 2, - TRUE); + verify_lost_event (out_event, 3, 3 * PCMU_BUF_DURATION, PCMU_BUF_DURATION); + out_event = gst_harness_pull_event (h); + g_assert (out_event != NULL); + verify_lost_event (out_event, 4, 4 * PCMU_BUF_DURATION, PCMU_BUF_DURATION); /* verify that buffer 5 made it through! */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT)); gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp); @@ -911,74 +895,64 @@ gst_rtp_buffer_unmap (&rtp); gst_buffer_unref (out_buf); - /* should still have only seen 1 packet lost event */ - g_assert_cmpint (data.lost_event_count, ==, 1); - - destroy_testharness (&data); + gst_object_unref (testclock); + gst_harness_teardown (h); } GST_END_TEST; GST_START_TEST (test_all_packets_are_timestamped_zero) { - TestData data; - GstClockID id, test_id; - GstBuffer *in_buf, *out_buf; + GstHarness *h = gst_harness_new ("rtpjitterbuffer"); + GstTestClock *testclock; + GstBuffer *out_buf; GstEvent *out_event; - gint jb_latency_ms = 10; - gint b; + gint jb_latency_ms = 100; GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; + gint b; - setup_testharness (&data); - - g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL); - - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 10 * GST_SECOND); + gst_harness_set_src_caps (h, generate_caps ()); + gst_harness_use_testclock (h); + testclock = gst_harness_get_testclock (h); + g_object_set (h->element, "do-lost", TRUE, "latency", jb_latency_ms, NULL); - /* push the first buffer in */ - in_buf = generate_test_buffer (0 * GST_MSECOND, TRUE, 0, 0); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + /* advance the clock with 10 seconds */ + gst_test_clock_set_time (testclock, 10 * GST_SECOND); - gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - g_assert (test_id == id); - gst_clock_id_unref (test_id); - gst_clock_id_unref (id); - out_buf = g_async_queue_pop (data.buf_queue); - g_assert (out_buf != NULL); + /* push the first buffer through */ + gst_buffer_unref (gst_harness_push_and_pull (h, generate_test_buffer (0))); - /* push some buffers in! */ + /* push some buffers in, all timestamped 0 */ for (b = 1; b < 3; b++) { - in_buf = generate_test_buffer (0, TRUE, b, 0); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - gst_buffer_unref (out_buf); + gst_harness_push (h, generate_test_buffer_full (0 * GST_MSECOND, TRUE, b, + 0)); /* check for the buffer coming out that was pushed in */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, 0); g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, 0); + gst_buffer_unref (out_buf); } - gst_buffer_unref (out_buf); /* hop over 2 packets and make another one (gap of 2) */ b = 5; - in_buf = generate_test_buffer (0, TRUE, b, 0); - g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + gst_harness_push (h, generate_test_buffer_full (0 * GST_MSECOND, TRUE, b, 0)); - /* we should now receive a packet-lost-event for buffer 3 and 4 */ - out_event = g_async_queue_pop (data.sink_event_queue); - g_assert (out_event != NULL); - verify_lost_event (out_event, 3, 0, 0, FALSE); + /* drop GstEventStreamStart & GstEventCaps & GstEventSegment */ + for (int i = 0; i < 3; i++) + gst_event_unref (gst_harness_pull_event (h)); - out_event = g_async_queue_pop (data.sink_event_queue); + /* we should now receive packet-lost-events for buffer 3 and 4 */ + out_event = gst_harness_pull_event (h); g_assert (out_event != NULL); - verify_lost_event (out_event, 4, 0, 0, FALSE); - - g_assert_cmpint (data.lost_event_count, ==, 2); + verify_lost_event (out_event, 3, 0, 0); + out_event = gst_harness_pull_event (h); + g_assert (out_event != NULL); + verify_lost_event (out_event, 4, 0, 0); /* verify that buffer 5 made it through! */ - out_buf = g_async_queue_pop (data.buf_queue); + out_buf = gst_harness_pull (h); g_assert (out_buf != NULL); g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT)); gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp); @@ -986,10 +960,8 @@ gst_rtp_buffer_unmap (&rtp); gst_buffer_unref (out_buf); - /* should still have only seen 2 packet lost events */ - g_assert_cmpint (data.lost_event_count, ==, 2); - - destroy_testharness (&data); + gst_object_unref (testclock); + gst_harness_teardown (h); } GST_END_TEST; @@ -1010,7 +982,7 @@ gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 0); /* push the first buffer in */ - in_buf = generate_test_buffer (0 * GST_MSECOND, TRUE, 0, 0); + in_buf = generate_test_buffer (0); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 20 * GST_MSECOND); @@ -1018,13 +990,14 @@ gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); gst_clock_id_unref (id); - /* put second buffer, the jitterbuffer should now know that the packet spacing - * is 20ms and should ask for retransmission of seqnum 2 in 20ms */ - in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 1, 160); + /* put second buffer, the jitterbuffer should now know that the packet + * spacing is 20ms and should ask for retransmission of seqnum 2 in + * 20ms+10ms because 2*jitter==0 and 0.5*packet_spacing==10ms */ + in_buf = generate_test_buffer (1); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 60 * GST_MSECOND); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 50 * GST_MSECOND); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); g_assert (tid == id); gst_clock_id_unref (tid); @@ -1032,11 +1005,12 @@ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 20, 20 * GST_MSECOND); + verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 10, PCMU_BUF_DURATION); - /* now we wait for the next timeout */ + /* now we wait for the next timeout, all following timeouts 40ms in the + * future because this is rtx-retry-timeout */ gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 100 * GST_MSECOND); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 90 * GST_MSECOND); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); g_assert (id == tid); gst_clock_id_unref (tid); @@ -1044,10 +1018,10 @@ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 60, 20 * GST_MSECOND); + verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 50, PCMU_BUF_DURATION); gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 140 * GST_MSECOND); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 130 * GST_MSECOND); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); g_assert (id == tid); gst_clock_id_unref (tid); @@ -1055,7 +1029,7 @@ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 100, 20 * GST_MSECOND); + verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 90, PCMU_BUF_DURATION); gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 200 * GST_MSECOND); @@ -1070,7 +1044,7 @@ gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 260 * GST_MSECOND); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 240 * GST_MSECOND); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); g_assert (tid == id); gst_clock_id_unref (tid); @@ -1079,7 +1053,7 @@ /* we should now receive a packet-lost-event for buffer 2 */ out_event = g_async_queue_pop (data.sink_event_queue); g_assert (out_event != NULL); - verify_lost_event (out_event, 2, 40 * GST_MSECOND, 20 * GST_MSECOND, FALSE); + verify_lost_event (out_event, 2, 40 * GST_MSECOND, PCMU_BUF_DURATION); destroy_testharness (&data); } @@ -1106,66 +1080,86 @@ gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 0); /* push the first buffer in */ - in_buf = generate_test_buffer (0 * GST_MSECOND, TRUE, 0, 0); + in_buf = generate_test_buffer (0); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 20 * GST_MSECOND); - /* put second buffer, the jitterbuffer should now know that the packet spacing - * is 20ms and should ask for retransmission of seqnum 2 at 60ms */ - in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 1, 160); + /* put second buffer, the jitterbuffer should now know that the packet + * spacing is 20ms and should ask for retransmission of seqnum 2 in + * 20ms+10ms because 2*jitter==0 and 0.5*packet_spacing==10ms */ + in_buf = generate_test_buffer (1); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - /* push buffer 4, 2 and 3 are missing now, we should get retransmission events - * for 3 at 100ms*/ - in_buf = generate_test_buffer (80 * GST_MSECOND, TRUE, 4, 4 * 160); + /* push buffer 4, 2 and 3 are missing now, we should get + * retransmission events for 3 at 100ms*/ + in_buf = generate_test_buffer (4); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); /* wait for first retransmission request */ - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 60 * GST_MSECOND); - do { - gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); - gst_clock_id_unref (id); - gst_clock_id_unref (tid); - } while (id != tid); + gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 50 * GST_MSECOND); + tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); + g_assert (id == tid); + gst_clock_id_unref (id); + gst_clock_id_unref (tid); - /* we should have 2 events now, one for 2 and another for 3 */ + /* First event for 2 */ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 20, 20 * GST_MSECOND); + verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 10, PCMU_BUF_DURATION); + + /* wait for second retransmission request */ + gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 60 * GST_MSECOND); + tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); + g_assert (id == tid); + gst_clock_id_unref (id); + gst_clock_id_unref (tid); + + /* Second event for 3 */ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 0, 20 * GST_MSECOND); + verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 0, PCMU_BUF_DURATION); - /* now we wait for the next timeout */ + /* now we wait for the next timeout for 2 */ gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 100 * GST_MSECOND); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 90 * GST_MSECOND); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); g_assert (id == tid); gst_clock_id_unref (id); gst_clock_id_unref (tid); - /* we should have 2 events now, one for 2 and another for 3 */ + /* First event for 2 */ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 60, 20 * GST_MSECOND); + verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 50, PCMU_BUF_DURATION); + + /* now we wait for the next timeout for 3 */ + gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 100 * GST_MSECOND); + tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); + g_assert (id == tid); + gst_clock_id_unref (id); + gst_clock_id_unref (tid); + + /* Second event for 3 */ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 40, 20 * GST_MSECOND); + verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 40, PCMU_BUF_DURATION); /* make buffer 3 */ - in_buf = generate_test_buffer (60 * GST_MSECOND, TRUE, 3, 3 * 160); + in_buf = generate_test_buffer (3); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); /* make more buffers */ for (i = 5; i < 15; i++) { - in_buf = generate_test_buffer (i * 20 * GST_MSECOND, TRUE, i, i * 160); + in_buf = generate_test_buffer (i); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); } gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 140 * GST_MSECOND); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 130 * GST_MSECOND); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); g_assert (id == tid); gst_clock_id_unref (id); @@ -1174,7 +1168,7 @@ /* now we only get requests for 2 */ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 100, 20 * GST_MSECOND); + verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 90, PCMU_BUF_DURATION); /* this is when buffer 0 deadline expires */ gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); @@ -1205,7 +1199,7 @@ /* we should now receive a packet-lost-event for buffer 2 */ out_event = g_async_queue_pop (data.sink_event_queue); g_assert (out_event != NULL); - verify_lost_event (out_event, 2, 40 * GST_MSECOND, 20 * GST_MSECOND, FALSE); + verify_lost_event (out_event, 2, 40 * GST_MSECOND, PCMU_BUF_DURATION); /* verify that buffers made it through! */ for (i = 3; i < 15; i++) { @@ -1253,49 +1247,53 @@ g_object_set (data.jitter_buffer, "rtx-retry-period", 120, NULL); /* push the first buffer in */ - in_buf = generate_test_buffer (0 * GST_MSECOND, TRUE, 0, 0); + in_buf = generate_test_buffer (0); GST_BUFFER_FLAG_SET (in_buf, GST_BUFFER_FLAG_DISCONT); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 20 * GST_MSECOND); - - /* put second buffer, the jitterbuffer should now know that the packet spacing - * is 20ms and should ask for retransmission of seqnum 2 at 60ms */ - in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 1, 160); + /* put second buffer, the jitterbuffer should now know that the packet + * spacing is 20ms and should ask for retransmission of seqnum 2 in + * 20ms+10ms because 2*jitter==0 and 0.5*packet_spacing==10ms */ + in_buf = generate_test_buffer (1); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); /* push buffer 8, 2 -> 7 are missing now. note that the rtp time is the same * as packet 1 because it was part of a fragmented payload. This means that - * the estimate for 2 could be refined now to 20ms. also packet 2, 3 and 4 are - * exceeding the max allowed reorder distance and should request a + * the estimate for 2 could be refined now to 20ms. also packet 2, 3 and 4 + * are exceeding the max allowed reorder distance and should request a * retransmission right away */ - in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 8, 8 * 160); + in_buf = + generate_test_buffer_full (20 * GST_MSECOND, TRUE, 8, + 8 * PCMU_RTP_TS_DURATION); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); /* we should now receive retransmission requests for 2 -> 5 */ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 2, 20 * GST_MSECOND, 40, 20 * GST_MSECOND); + verify_rtx_event (out_event, 2, 20 * GST_MSECOND, 30, PCMU_BUF_DURATION); for (i = 3; i < 5; i++) { GST_DEBUG ("popping %d", i); out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, i, 20 * GST_MSECOND, 0, 20 * GST_MSECOND); + verify_rtx_event (out_event, i, 20 * GST_MSECOND, 0, PCMU_BUF_DURATION); } g_assert_cmpint (data.rtx_event_count, ==, 3); /* push 9, this should immediately request retransmission of 5 */ - in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 9, 9 * 160); + in_buf = + generate_test_buffer_full (20 * GST_MSECOND, TRUE, 9, + 9 * PCMU_RTP_TS_DURATION); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); /* we should now receive retransmission requests for 5 */ out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, 5, 20 * GST_MSECOND, 0, 20 * GST_MSECOND); + verify_rtx_event (out_event, 5, 20 * GST_MSECOND, 0, PCMU_BUF_DURATION); /* wait for timeout for rtx 6 -> 7 */ gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + gst_test_clock_advance_time (GST_TEST_CLOCK (data.clock), GST_MSECOND * 60); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); g_assert (id == tid); gst_clock_id_unref (id); @@ -1305,7 +1303,7 @@ GST_DEBUG ("popping %d", i); out_event = g_async_queue_pop (data.src_event_queue); g_assert (out_event != NULL); - verify_rtx_event (out_event, i, 20 * GST_MSECOND, 0, 20 * GST_MSECOND); + verify_rtx_event (out_event, i, 20 * GST_MSECOND, 0, PCMU_BUF_DURATION); } /* churn through sync_times until the new buffer gets pushed out */ @@ -1358,7 +1356,7 @@ GST_DEBUG ("popping lost event %d", i); out_event = g_async_queue_pop (data.sink_event_queue); g_assert (out_event != NULL); - verify_lost_event (out_event, i, 20 * GST_MSECOND, 0, FALSE); + verify_lost_event (out_event, i, 20 * GST_MSECOND, 0); } /* verify that buffer 8 made it through! */ @@ -1385,7 +1383,7 @@ GST_DEBUG ("popping lost event 10"); out_event = g_async_queue_pop (data.sink_event_queue); g_assert (out_event != NULL); - verify_lost_event (out_event, 10, 40 * GST_MSECOND, 20 * GST_MSECOND, FALSE); + verify_lost_event (out_event, 10, 40 * GST_MSECOND, PCMU_BUF_DURATION); /* should have seen 6 packet lost events */ g_assert_cmpint (data.lost_event_count, ==, 7); @@ -1417,16 +1415,18 @@ g_object_set (data.jitter_buffer, "rtx-retry-period", 120, NULL); gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 0); - in_buf = generate_test_buffer (timestamp_ms * GST_MSECOND, TRUE, 0, rtp_ts); + in_buf = + generate_test_buffer_full (timestamp_ms * GST_MSECOND, TRUE, 0, rtp_ts); GST_BUFFER_FLAG_SET (in_buf, GST_BUFFER_FLAG_DISCONT); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); timestamp_ms += 20; - rtp_ts += 160; + rtp_ts += PCMU_RTP_TS_DURATION; gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), timestamp_ms * GST_MSECOND); - in_buf = generate_test_buffer (timestamp_ms * GST_MSECOND, TRUE, 1, rtp_ts); + in_buf = + generate_test_buffer_full (timestamp_ms * GST_MSECOND, TRUE, 1, rtp_ts); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); last_rtp = rtp_ts; last_ts = timestamp_ms; @@ -1462,49 +1462,56 @@ g_assert_cmpint (seqnum, ==, 2); gst_event_unref (out_event); - /* Now data comes in again, a "bulk" lost packet is created for 3 -> 6 */ - rtp_ts += (160 * 15); - in_buf = generate_test_buffer (timestamp_ms * GST_MSECOND, TRUE, 16, rtp_ts); + /* Now data comes in again, a "bulk" lost packet is created for 3 -> 5 */ + rtp_ts += (PCMU_RTP_TS_DURATION * 15); + in_buf = + generate_test_buffer_full (timestamp_ms * GST_MSECOND, TRUE, 16, rtp_ts); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); last_ts += 60; last_rtp += 480; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 8, last_rtp); + in_buf = generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 8, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - last_ts += 20; - last_rtp += 160; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 9, last_rtp); + last_ts += PCMU_BUF_MS; + last_rtp += PCMU_RTP_TS_DURATION; + in_buf = generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 9, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - last_ts += 20; - last_rtp += 160; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 10, last_rtp); + last_ts += PCMU_BUF_MS; + last_rtp += PCMU_RTP_TS_DURATION; + in_buf = + generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 10, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - last_ts += 20; - last_rtp += 160; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 11, last_rtp); + last_ts += PCMU_BUF_MS; + last_rtp += PCMU_RTP_TS_DURATION; + in_buf = + generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 11, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - last_ts += 20; - last_rtp += 160; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 12, last_rtp); + last_ts += PCMU_BUF_MS; + last_rtp += PCMU_RTP_TS_DURATION; + in_buf = + generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 12, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - last_ts += 20; - last_rtp += 160; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 13, last_rtp); + last_ts += PCMU_BUF_MS; + last_rtp += PCMU_RTP_TS_DURATION; + in_buf = + generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 13, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - last_ts += 20; - last_rtp += 160; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 14, last_rtp); + last_ts += PCMU_BUF_MS; + last_rtp += PCMU_RTP_TS_DURATION; + in_buf = + generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 14, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); - last_ts += 20; - last_rtp += 160; - in_buf = generate_test_buffer (last_ts * GST_MSECOND, TRUE, 15, last_rtp); + last_ts += PCMU_BUF_MS; + last_rtp += PCMU_RTP_TS_DURATION; + in_buf = + generate_test_buffer_full (last_ts * GST_MSECOND, TRUE, 15, last_rtp); g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); /* Wait for data to be pushed. */ @@ -1529,6 +1536,12 @@ out_event = g_async_queue_pop (data.sink_event_queue); s = gst_event_get_structure (out_event); g_assert (gst_structure_get_uint (s, "seqnum", &seqnum)); + g_assert_cmpint (seqnum, ==, 6); + gst_event_unref (out_event); + + out_event = g_async_queue_pop (data.sink_event_queue); + s = gst_event_get_structure (out_event); + g_assert (gst_structure_get_uint (s, "seqnum", &seqnum)); g_assert_cmpint (seqnum, ==, 7); gst_event_unref (out_event); @@ -1568,6 +1581,96 @@ GST_END_TEST; +GST_START_TEST (test_deadline_ts_offset) +{ + TestData data; + GstClockID id, test_id; + GstBuffer *in_buf, *out_buf; + gint jb_latency_ms = 10; + + setup_testharness (&data); + + g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL); + + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 0); + + /* push the first buffer in */ + in_buf = generate_test_buffer (0); + g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK); + + /* wait_next_timeout() syncs on the deadline timer */ + gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + g_assert_cmpint (gst_clock_id_get_time (id), ==, jb_latency_ms * GST_MSECOND); + + /* add ts-offset while waiting */ + g_object_set (data.jitter_buffer, "ts-offset", 20 * GST_MSECOND, NULL); + + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), + jb_latency_ms * GST_MSECOND); + test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); + g_assert (test_id == id); + + /* wait_next_timeout() syncs on the new deadline timer */ + gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); + g_assert_cmpint (gst_clock_id_get_time (id), ==, + (20 + jb_latency_ms) * GST_MSECOND); + + /* now make deadline timer timeout */ + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), + (20 + jb_latency_ms) * GST_MSECOND); + test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); + g_assert (test_id == id); + + gst_clock_id_unref (test_id); + gst_clock_id_unref (id); + out_buf = g_async_queue_pop (data.buf_queue); + g_assert (out_buf != NULL); + + destroy_testharness (&data); +} + +GST_END_TEST; + +GST_START_TEST (test_dts_gap_larger_than_latency) +{ + GstHarness *h = gst_harness_new ("rtpjitterbuffer"); + GstTestClock *testclock; + GstEvent *out_event; + gint jb_latency_ms = 100; + GstClockTime dts_after_gap = (jb_latency_ms + 1) * GST_MSECOND; + + gst_harness_set_src_caps (h, generate_caps ()); + gst_harness_use_testclock (h); + testclock = gst_harness_get_testclock (h); + g_object_set (h->element, "do-lost", TRUE, "latency", jb_latency_ms, NULL); + + /* push first buffer through */ + gst_harness_push (h, generate_test_buffer (0)); + gst_harness_crank_single_clock_wait (h); + gst_buffer_unref (gst_harness_pull (h)); + + /* Push packet with DTS larger than latency */ + gst_harness_push (h, generate_test_buffer_full (dts_after_gap, + TRUE, 5, 5 * PCMU_RTP_TS_DURATION)); + + /* drop GstEventStreamStart & GstEventCaps & GstEventSegment */ + for (int i = 0; i < 3; i++) + gst_event_unref (gst_harness_pull_event (h)); + + /* Time out and verify lost events */ + for (gint i = 1; i < 5; i++) { + GstClockTime dur = dts_after_gap / 5; + gst_harness_crank_single_clock_wait (h); + out_event = gst_harness_pull_event (h); + fail_unless (out_event != NULL); + verify_lost_event (out_event, i, i * dur, dur); + } + + gst_object_unref (testclock); + gst_harness_teardown (h); +} + +GST_END_TEST; static Suite * rtpjitterbuffer_suite (void) @@ -1589,6 +1692,8 @@ tcase_add_test (tc_chain, test_rtx_two_missing); tcase_add_test (tc_chain, test_rtx_packet_delay); tcase_add_test (tc_chain, test_gap_exceeds_latency); + tcase_add_test (tc_chain, test_deadline_ts_offset); + tcase_add_test (tc_chain, test_dts_gap_larger_than_latency); return s; } diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtpmux.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtpmux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtpmux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtpmux.c 2015-10-22 08:02:54.000000000 +0000 @@ -23,6 +23,7 @@ */ #include +#include #include #include @@ -154,13 +155,17 @@ gst_event_new_stream_start ("stream2"))); gst_caps_set_simple (sinkcaps, - "payload", G_TYPE_INT, 98, "seqnum-base", G_TYPE_UINT, 100, - "clock-base", G_TYPE_UINT, 1000, "ssrc", G_TYPE_UINT, 66, NULL); + "payload", G_TYPE_INT, 98, "seqnum-offset", G_TYPE_UINT, 100, + "timestamp-offset", G_TYPE_UINT, 1000, "ssrc", G_TYPE_UINT, 66, NULL); caps = gst_caps_new_simple ("application/x-rtp", "payload", G_TYPE_INT, 98, "clock-rate", G_TYPE_INT, 3, - "seqnum-base", G_TYPE_UINT, 56, "clock-base", G_TYPE_UINT, 57, + "seqnum-offset", G_TYPE_UINT, 56, "timestamp-offset", G_TYPE_UINT, 57, "ssrc", G_TYPE_UINT, 66, NULL); fail_unless (gst_pad_set_caps (src1, caps)); + gst_caps_unref (caps); + + caps = gst_pad_peer_query_caps (sink, NULL); + fail_if (gst_caps_is_empty (caps)); gst_segment_init (&segment, GST_FORMAT_TIME); segment.start = 100000; @@ -292,6 +297,58 @@ GST_END_TEST; +static GstBuffer * +generate_test_buffer (guint seq_num, guint ssrc) +{ + GstBuffer *buf; + guint8 *payload; + guint i; + GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; + gsize size = 10; + + buf = gst_rtp_buffer_new_allocate (size, 0, 0); + GST_BUFFER_DTS (buf) = GST_MSECOND * 20 * seq_num; + GST_BUFFER_PTS (buf) = GST_MSECOND * 20 * seq_num; + + gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp); + gst_rtp_buffer_set_payload_type (&rtp, 0); + gst_rtp_buffer_set_seq (&rtp, seq_num); + gst_rtp_buffer_set_timestamp (&rtp, 160 * seq_num); + gst_rtp_buffer_set_ssrc (&rtp, ssrc); + + payload = gst_rtp_buffer_get_payload (&rtp); + for (i = 0; i < size; i++) + payload[i] = 0xff; + + gst_rtp_buffer_unmap (&rtp); + + return buf; +} + +GST_START_TEST (test_rtpmux_ssrc) +{ + GstHarness * h = gst_harness_new_with_padnames ("rtpdtmfmux", NULL, "src"); + GstHarness * h0 = gst_harness_new_with_element ( + h->element, "sink_0", NULL); + GstHarness * h1 = gst_harness_new_with_element ( + h->element, "sink_1", NULL); + + g_object_set (h->element, "ssrc", 111111, NULL); + + gst_harness_set_src_caps_str (h0, "application/x-rtp, ssrc=(uint)222222"); + gst_harness_set_src_caps_str (h1, "application/x-rtp, ssrc=(uint)333333"); + + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h0, generate_test_buffer (0, 222222))); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h1, generate_test_buffer (0, 333333))); + + gst_harness_teardown (h0); + gst_harness_teardown (h1); + gst_harness_teardown (h); +} +GST_END_TEST; + static Suite * rtpmux_suite (void) { @@ -299,8 +356,9 @@ TCase *tc_chain; tc_chain = tcase_create ("rtpmux_basic"); - tcase_add_test (tc_chain, test_rtpmux_basic); suite_add_tcase (s, tc_chain); + tcase_add_test (tc_chain, test_rtpmux_basic); + tcase_add_test (tc_chain, test_rtpmux_ssrc); tc_chain = tcase_create ("rtpdtmfmux_basic"); tcase_add_test (tc_chain, test_rtpdtmfmux_basic); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtp-payloading.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtp-payloading.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtp-payloading.c 2014-08-11 06:42:56.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtp-payloading.c 2015-10-22 08:02:54.000000000 +0000 @@ -300,15 +300,10 @@ * @param p Pointer to the RTP pipeline. */ static void -rtp_pipeline_enable_lists (rtp_pipeline * p, guint mtu_size) +rtp_pipeline_enable_lists (rtp_pipeline * p) { GstPad *pad; - /* set mtu size if needed */ - if (mtu_size) { - g_object_set (p->rtppay, "mtu", mtu_size, NULL); - } - /* Add chain list function for the buffer list tests */ pad = gst_element_get_static_pad (p->rtpdepay, "sink"); gst_pad_set_chain_list_function (pad, @@ -344,8 +339,13 @@ return; } + /* set mtu size if needed */ + if (mtu_size > 0) { + g_object_set (p->rtppay, "mtu", mtu_size, NULL); + } + if (use_lists) { - rtp_pipeline_enable_lists (p, mtu_size); + rtp_pipeline_enable_lists (p); chain_list_bytes_received = 0; } @@ -357,7 +357,7 @@ if (use_lists) { /* 'next NAL' indicator is 4 bytes */ - fail_if (chain_list_bytes_received != bytes_sent * LOOP_COUNT); + fail_unless_equals_int (chain_list_bytes_received, bytes_sent * LOOP_COUNT); } } @@ -464,6 +464,24 @@ } GST_END_TEST; + +static const guint8 rtp_h261_frame_data[] = { + 0x00, 0x01, 0x00, 0x06, 0x00, 0x01, 0x11, 0x00, 0x00, 0x4c, 0x40, 0x00, + 0x15, 0x10, +}; + +static int rtp_h261_frame_data_size = 14; +static int rtp_h261_frame_count = 1; + +GST_START_TEST (rtp_h261) +{ + rtp_pipeline_test (rtp_h261_frame_data, rtp_h261_frame_data_size, + rtp_h261_frame_count, "video/x-h261", "rtph261pay", "rtph261depay", + 0, 0, FALSE); +} + +GST_END_TEST; + static const guint8 rtp_h263_frame_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 @@ -476,7 +494,12 @@ GST_START_TEST (rtp_h263) { rtp_pipeline_test (rtp_h263_frame_data, rtp_h263_frame_data_size, - rtp_h263_frame_count, "video/x-h263,variant=(string)itu,h263version=h263", + rtp_h263_frame_count, + "video/x-h263,variant=(string)itu,h263version=h263", + "rtph263pay", "rtph263depay", 0, 0, FALSE); + rtp_pipeline_test (rtp_h263_frame_data, rtp_h263_frame_data_size, + rtp_h263_frame_count, + "video/x-h263,variant=(string)itu,h263version=h263,width=10,height=20", "rtph263pay", "rtph263depay", 0, 0, FALSE); } @@ -645,6 +668,49 @@ GST_END_TEST; +/* KLV data from Day_Flight.mpg */ +static const guint8 rtp_KLV_frame_data[] = { + 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x0b, 0x01, 0x01, + 0x0e, 0x01, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, + 0x81, 0x91, 0x02, 0x08, 0x00, 0x04, 0x6c, 0x8e, + 0x20, 0x03, 0x83, 0x85, 0x41, 0x01, 0x01, 0x05, + 0x02, 0x3d, 0x3b, 0x06, 0x02, 0x15, 0x80, 0x07, + 0x02, 0x01, 0x52, 0x0b, 0x03, 0x45, 0x4f, 0x4e, + 0x0c, 0x0e, 0x47, 0x65, 0x6f, 0x64, 0x65, 0x74, + 0x69, 0x63, 0x20, 0x57, 0x47, 0x53, 0x38, 0x34, + 0x0d, 0x04, 0x4d, 0xc4, 0xdc, 0xbb, 0x0e, 0x04, + 0xb1, 0xa8, 0x6c, 0xfe, 0x0f, 0x02, 0x1f, 0x4a, + 0x10, 0x02, 0x00, 0x85, 0x11, 0x02, 0x00, 0x4b, + 0x12, 0x04, 0x20, 0xc8, 0xd2, 0x7d, 0x13, 0x04, + 0xfc, 0xdd, 0x02, 0xd8, 0x14, 0x04, 0xfe, 0xb8, + 0xcb, 0x61, 0x15, 0x04, 0x00, 0x8f, 0x3e, 0x61, + 0x16, 0x04, 0x00, 0x00, 0x01, 0xc9, 0x17, 0x04, + 0x4d, 0xdd, 0x8c, 0x2a, 0x18, 0x04, 0xb1, 0xbe, + 0x9e, 0xf4, 0x19, 0x02, 0x0b, 0x85, 0x28, 0x04, + 0x4d, 0xdd, 0x8c, 0x2a, 0x29, 0x04, 0xb1, 0xbe, + 0x9e, 0xf4, 0x2a, 0x02, 0x0b, 0x85, 0x38, 0x01, + 0x2e, 0x39, 0x04, 0x00, 0x8d, 0xd4, 0x29, 0x01, + 0x02, 0x1c, 0x5f +}; + +GST_START_TEST (rtp_klv) +{ + rtp_pipeline_test (rtp_KLV_frame_data, G_N_ELEMENTS (rtp_KLV_frame_data), 1, + "meta/x-klv, parsed=(bool)true", "rtpklvpay", "rtpklvdepay", 0, 0, FALSE); +} + +GST_END_TEST; + +GST_START_TEST (rtp_klv_fragmented) +{ + /* force super-small mtu of 60 to fragment KLV unit */ + rtp_pipeline_test (rtp_KLV_frame_data, sizeof (rtp_KLV_frame_data), 1, + "meta/x-klv, parsed=(bool)true", "rtpklvpay", "rtpklvdepay", + sizeof (rtp_KLV_frame_data), 60, FALSE); +} + +GST_END_TEST; + static const guint8 rtp_L16_frame_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 @@ -940,6 +1006,7 @@ tcase_add_test (tc_chain, rtp_pcma); tcase_add_test (tc_chain, rtp_pcmu); tcase_add_test (tc_chain, rtp_mpa); + tcase_add_test (tc_chain, rtp_h261); tcase_add_test (tc_chain, rtp_h263); tcase_add_test (tc_chain, rtp_h263p); tcase_add_test (tc_chain, rtp_h264); @@ -947,6 +1014,8 @@ tcase_add_test (tc_chain, rtp_h264_list_lt_mtu_avc); tcase_add_test (tc_chain, rtp_h264_list_gt_mtu); tcase_add_test (tc_chain, rtp_h264_list_gt_mtu_avc); + tcase_add_test (tc_chain, rtp_klv); + tcase_add_test (tc_chain, rtp_klv_fragmented); tcase_add_test (tc_chain, rtp_L16); tcase_add_test (tc_chain, rtp_L24); tcase_add_test (tc_chain, rtp_mp2t); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtprtx.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtprtx.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtprtx.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtprtx.c 2015-10-22 08:02:54.000000000 +0000 @@ -304,11 +304,62 @@ } RTXReceiveData; static GstPadProbeReturn +do_buffer_list_as_buffers_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer user_data, GstPadProbeCallback callback) +{ + /* Iterate the buffer list, removing any items that we're + * told to drop and creating a new bufferlist. If all buffers + * are dropped, return DROP. + */ + guint i, len; + GstBufferList *list; + GstBufferList *outlist; + GstPadProbeInfo buf_info = *info; + + GST_INFO_OBJECT (pad, "probing each buffer in list individually"); + + list = gst_pad_probe_info_get_buffer_list (info); + + g_return_val_if_fail (list != NULL, GST_PAD_PROBE_REMOVE); + + len = gst_buffer_list_length (list); + outlist = gst_buffer_list_new_sized (len); + + buf_info.type = GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_PUSH; + for (i = 0; i < len; i++) { + GstBuffer *buffer = gst_buffer_list_get (list, i); + GstPadProbeReturn ret; + buf_info.data = buffer; + ret = callback (pad, &buf_info, user_data); + /* If the buffer wasn't dropped, add it to the output list */ + if (ret != GST_PAD_PROBE_DROP) + gst_buffer_list_insert (outlist, -1, gst_buffer_ref (buffer)); + } + + len = gst_buffer_list_length (outlist); + if (len == 0) { + /* Everything was discarded, drop our outlist */ + gst_buffer_list_unref (outlist); + return GST_PAD_PROBE_DROP; + } + + /* Replace the original buffer list with the modified one */ + gst_buffer_list_unref (list); + info->data = outlist; + return GST_PAD_PROBE_OK; +} + +static GstPadProbeReturn rtprtxsend_srcpad_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) { GstPadProbeReturn ret = GST_PAD_PROBE_OK; + GST_LOG_OBJECT (pad, "here"); + if (info->type == (GST_PAD_PROBE_TYPE_BUFFER_LIST | GST_PAD_PROBE_TYPE_PUSH)) + return do_buffer_list_as_buffers_probe (pad, info, user_data, + rtprtxsend_srcpad_probe); + if (info->type == (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_PUSH)) { GstBuffer *buffer = GST_BUFFER (info->data); RTXSendData *rtxdata = (RTXSendData *) user_data; @@ -531,7 +582,8 @@ srcpad = gst_element_get_static_pad (rtprtxsend, "src"); gst_pad_add_probe (srcpad, - (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_PUSH), + (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST | + GST_PAD_PROBE_TYPE_PUSH), (GstPadProbeCallback) rtprtxsend_srcpad_probe, &send_rtxdata, NULL); sinkpad = gst_pad_get_peer (srcpad); fail_if (sinkpad == NULL); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/rtpsession.c gst-plugins-good1.0-1.6.1/tests/check/elements/rtpsession.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/rtpsession.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/rtpsession.c 2015-10-22 08:02:54.000000000 +0000 @@ -232,8 +232,12 @@ gst_clock_id_unref (tid); } + out_buf = g_async_queue_try_pop (data.rtcp_queue); + if (out_buf) + gst_buffer_unref (out_buf); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), - gst_clock_id_get_time (id) + (2 * GST_SECOND)); + gst_clock_id_get_time (id) + (5 * GST_SECOND)); gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); gst_clock_id_unref (id); @@ -446,6 +450,7 @@ GstRTCPPacket rtcp_packet; GstFlowReturn res; gint i, j; + GstCaps *caps; setup_testharness (&data, TRUE); g_object_get (data.session, "internal-session", &internal_session, NULL); @@ -477,6 +482,12 @@ gst_buffer_unref (buf); /* ok, now let's push some RTP packets */ + caps = + gst_caps_new_simple ("application/x-rtp", "ssrc", G_TYPE_UINT, 0x01BADBAD, + NULL); + gst_pad_set_caps (data.src, caps); + gst_caps_unref (caps); + for (i = 1; i < 4; i++) { gst_test_clock_advance_time (GST_TEST_CLOCK (data.clock), 200 * GST_MSECOND); @@ -566,7 +577,7 @@ GST_END_TEST; static Suite * -gstrtpsession_suite (void) +rtpsession_suite (void) { Suite *s = suite_create ("rtpsession"); TCase *tc_chain = tcase_create ("general"); @@ -579,19 +590,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = gstrtpsession_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rtpsession); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/souphttpsrc.c gst-plugins-good1.0-1.6.1/tests/check/elements/souphttpsrc.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/souphttpsrc.c 2014-09-24 07:11:21.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/souphttpsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -126,6 +126,7 @@ g_free (url); g_object_set (src, "automatic-redirect", redirect, NULL); + g_object_set (src, "ssl-ca-file", GST_TEST_FILES_PATH "/test-cert.pem", NULL); if (cookies != NULL) g_object_set (src, "cookies", cookies, NULL); g_object_set (sink, "signal-handoffs", TRUE, NULL); @@ -386,34 +387,9 @@ gst_bin_add (GST_BIN (pipe), sink); fail_unless (gst_element_link (src, sink)); - /* First try Virgin Radio Ogg stream, to see if there's connectivity and all - * (which is an attempt to work around the completely horrid error reporting - * and that we can't distinguish different types of failures here). */ - - g_object_set (src, "location", "http://ogg2.smgradio.com/vr32.ogg", NULL); - g_object_set (src, "num-buffers", 1, NULL); - icy_caps = FALSE; - gst_element_set_state (pipe, GST_STATE_PLAYING); - - msg = gst_bus_poll (GST_ELEMENT_BUS (pipe), - GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1); - if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) { - GST_INFO ("looks like there's no net connectivity or sgmradio.com is " - "down. In any case, let's just skip this test"); - gst_message_unref (msg); - goto done; - } - gst_message_unref (msg); - msg = NULL; - gst_element_set_state (pipe, GST_STATE_NULL); - - /* Now, if the ogg stream works, the mp3 shoutcast stream should work as - * well (time will tell if that's true) */ - /* Virgin Radio 32kbps mp3 shoutcast stream */ g_object_set (src, "location", "http://mp3-vr-32.smgradio.com:80/", NULL); - /* EOS after the first buffer */ g_object_set (src, "num-buffers", 1, NULL); icy_caps = TRUE; @@ -421,22 +397,24 @@ msg = gst_bus_poll (GST_ELEMENT_BUS (pipe), GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1); - if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS) { - GST_DEBUG ("success, we're done here"); - gst_message_unref (msg); - goto done; - } - - { - GError *err = NULL; - - gst_message_parse_error (msg, &err, NULL); - gst_message_unref (msg); - g_error ("Error with ICY mp3 shoutcast stream: %s", err->message); - g_error_free (err); + switch (GST_MESSAGE_TYPE (msg)) { + case GST_MESSAGE_EOS: + GST_DEBUG ("success, we're done here"); + gst_message_unref (msg); + break; + case GST_MESSAGE_ERROR:{ + GError *err = NULL; + + gst_message_parse_error (msg, &err, NULL); + GST_INFO ("Error with ICY mp3 shoutcast stream: %s", err->message); + gst_message_unref (msg); + g_clear_error (&err); + break; + } + default: + break; } -done: icy_caps = FALSE; gst_element_set_state (pipe, GST_STATE_NULL); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/spectrum.c gst-plugins-good1.0-1.6.1/tests/check/elements/spectrum.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/spectrum.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/spectrum.c 2015-10-22 08:02:54.000000000 +0000 @@ -538,19 +538,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = spectrum_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (spectrum); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/splitmux.c gst-plugins-good1.0-1.6.1/tests/check/elements/splitmux.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/splitmux.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/splitmux.c 2015-10-30 12:10:05.000000000 +0000 @@ -0,0 +1,235 @@ +/* GStreamer unit test for splitmuxsrc/sink elements + * + * Copyright (C) 2007 David A. Schleef + * Copyright (C) 2015 Jan Schmidt + * + * 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 +#include + +#include +#include +#include + +gchar *tmpdir = NULL; + +static void +tempdir_setup (void) +{ + const gchar *systmp = g_get_tmp_dir (); + tmpdir = g_build_filename (systmp, "splitmux-test-XXXXXX", NULL); + /* Rewrites tmpdir template input: */ + tmpdir = g_mkdtemp (tmpdir); +} + +static void +tempdir_cleanup (void) +{ + GDir *d; + const gchar *f; + + fail_if (tmpdir == NULL); + + d = g_dir_open (tmpdir, 0, NULL); + fail_if (d == NULL); + + while ((f = g_dir_read_name (d)) != NULL) { + gchar *fname = g_build_filename (tmpdir, f, NULL); + fail_if (g_remove (fname) != 0, "Failed to remove tmp file %s", fname); + g_free (fname); + } + g_dir_close (d); + + fail_if (g_remove (tmpdir) != 0, "Failed to delete tmpdir %s", tmpdir); + + g_free (tmpdir); + tmpdir = NULL; +} + +static guint +count_files (const gchar * target) +{ + GDir *d; + const gchar *f; + guint ret = 0; + + d = g_dir_open (target, 0, NULL); + fail_if (d == NULL); + + while ((f = g_dir_read_name (d)) != NULL) + ret++; + g_dir_close (d); + + return ret; +} + + +static GstMessage * +run_pipeline (GstElement * pipeline) +{ + GstBus *bus = gst_element_get_bus (GST_ELEMENT (pipeline)); + GstMessage *msg; + + gst_element_set_state (pipeline, GST_STATE_PLAYING); + msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1); + gst_element_set_state (pipeline, GST_STATE_NULL); + + gst_object_unref (bus); + + return msg; +} + +static void +dump_error (GstMessage * msg) +{ + GError *err = NULL; + gchar *dbg_info; + + fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR); + + gst_message_parse_error (msg, &err, &dbg_info); + + g_printerr ("ERROR from element %s: %s\n", + GST_OBJECT_NAME (msg->src), err->message); + g_printerr ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none"); + g_error_free (err); + g_free (dbg_info); +} + +static void +test_playback (const gchar * in_pattern) +{ + GstMessage *msg; + GstElement *pipeline; + GstElement *fakesink; + gchar *uri; + + pipeline = gst_element_factory_make ("playbin", NULL); + fail_if (pipeline == NULL); + + fakesink = gst_element_factory_make ("fakesink", NULL); + fail_if (fakesink == NULL); + g_object_set (G_OBJECT (pipeline), "video-sink", fakesink, NULL); + + uri = g_strdup_printf ("splitmux://%s", in_pattern); + + g_object_set (G_OBJECT (pipeline), "uri", uri, NULL); + g_free (uri); + + msg = run_pipeline (pipeline); + + if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) + dump_error (msg); + fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS); + gst_message_unref (msg); + gst_object_unref (pipeline); +} + +GST_START_TEST (test_splitmuxsrc) +{ + gchar *in_pattern = + g_build_filename (GST_TEST_FILES_PATH, "splitvideo*.ogg", NULL); + test_playback (in_pattern); + g_free (in_pattern); +} + +GST_END_TEST; + +GST_START_TEST (test_splitmuxsink) +{ + GstMessage *msg; + GstElement *pipeline; + GstElement *sink; + GstPad *splitmux_sink_pad; + GstPad *enc_src_pad; + gchar *dest_pattern; + guint count; + gchar *in_pattern; + + /* This pipeline has a small time cutoff - it should start a new file + * every GOP, ie 1 second */ + pipeline = + gst_parse_launch + ("videotestsrc num-buffers=15 ! video/x-raw,width=80,height=64,framerate=5/1 ! videoconvert !" + " queue ! theoraenc keyframe-force=5 ! splitmuxsink name=splitsink " + " max-size-time=1000000 max-size-bytes=1000000 muxer=oggmux", NULL); + fail_if (pipeline == NULL); + sink = gst_bin_get_by_name (GST_BIN (pipeline), "splitsink"); + fail_if (sink == NULL); + dest_pattern = g_build_filename (tmpdir, "out%05d.ogg", NULL); + g_object_set (G_OBJECT (sink), "location", dest_pattern, NULL); + g_free (dest_pattern); + g_object_unref (sink); + + msg = run_pipeline (pipeline); + + if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) + dump_error (msg); + fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS); + gst_message_unref (msg); + + /* unlink manually and relase request pad to ensure that we *can* do that + * - https://bugzilla.gnome.org/show_bug.cgi?id=753622 */ + sink = gst_bin_get_by_name (GST_BIN (pipeline), "splitsink"); + fail_if (sink == NULL); + splitmux_sink_pad = gst_element_get_static_pad (sink, "video"); + fail_if (splitmux_sink_pad == NULL); + enc_src_pad = gst_pad_get_peer (splitmux_sink_pad); + fail_if (enc_src_pad == NULL); + fail_unless (gst_pad_unlink (enc_src_pad, splitmux_sink_pad)); + gst_object_unref (enc_src_pad); + gst_element_release_request_pad (sink, splitmux_sink_pad); + gst_object_unref (splitmux_sink_pad); + /* at this point the pad must be releaased - try to find it again to verify */ + splitmux_sink_pad = gst_element_get_static_pad (sink, "video"); + fail_if (splitmux_sink_pad != NULL); + g_object_unref (sink); + + gst_object_unref (pipeline); + + count = count_files (tmpdir); + fail_unless (count == 3, "Expected 3 output files, got %d", count); + + in_pattern = g_build_filename (tmpdir, "out*.ogg", NULL); + test_playback (in_pattern); + g_free (in_pattern); +} + +GST_END_TEST; + +static Suite * +splitmux_suite (void) +{ + Suite *s = suite_create ("splitmux"); + TCase *tc_chain = tcase_create ("general"); + + suite_add_tcase (s, tc_chain); + + tcase_add_checked_fixture (tc_chain, tempdir_setup, tempdir_cleanup); + + tcase_add_test (tc_chain, test_splitmuxsrc); + tcase_add_test (tc_chain, test_splitmuxsink); + + return s; +} + +GST_CHECK_MAIN (splitmux); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/udpsrc.c gst-plugins-good1.0-1.6.1/tests/check/elements/udpsrc.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/udpsrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/udpsrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -26,85 +26,207 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -GST_START_TEST (test_udpsrc_empty_packet) +static gboolean +udpsrc_setup (GstElement ** udpsrc, GSocket ** socket, + GstPad ** sinkpad, GSocketAddress ** sa) { - GstElement *udpsrc; - GSocket *socket; - GstPad *sinkpad; + GInetAddress *ia; int port = 0; + gchar *s; - udpsrc = gst_check_setup_element ("udpsrc"); - fail_unless (udpsrc != NULL); - g_object_set (udpsrc, "port", 0, NULL); - - sinkpad = gst_check_setup_sink_pad_by_name (udpsrc, &sinktemplate, "src"); - fail_unless (sinkpad != NULL); - gst_pad_set_active (sinkpad, TRUE); + *udpsrc = gst_check_setup_element ("udpsrc"); + fail_unless (*udpsrc != NULL); + g_object_set (*udpsrc, "port", 0, NULL); + + *sinkpad = gst_check_setup_sink_pad_by_name (*udpsrc, &sinktemplate, "src"); + fail_unless (*sinkpad != NULL); + gst_pad_set_active (*sinkpad, TRUE); - gst_element_set_state (udpsrc, GST_STATE_PLAYING); - g_object_get (udpsrc, "port", &port, NULL); + gst_element_set_state (*udpsrc, GST_STATE_PLAYING); + g_object_get (*udpsrc, "port", &port, NULL); GST_INFO ("udpsrc port = %d", port); - socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_DATAGRAM, + *socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_DATAGRAM, G_SOCKET_PROTOCOL_UDP, NULL); - if (socket != NULL) { - GSocketAddress *sa; - GInetAddress *ia; - gchar *s; - - ia = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4); - s = g_inet_address_to_string (ia); - GST_LOG ("inet address %s", s); - g_free (s); - sa = g_inet_socket_address_new (ia, port); - - if (g_socket_send_to (socket, sa, "HeLL0", 0, NULL, NULL) == 0) { - GST_INFO ("sent 0 bytes"); - if (g_socket_send_to (socket, sa, "HeLL0", 6, NULL, NULL) == 6) { - GstMapInfo map; - GstBuffer *buf; - guint len; + if (*socket == NULL) { + GST_WARNING ("Could not create IPv4 UDP socket for unit test"); + return FALSE; + } + + ia = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4); + s = g_inet_address_to_string (ia); + GST_LOG ("inet address %s", s); + g_free (s); + *sa = g_inet_socket_address_new (ia, port); + g_object_unref (ia); - GST_INFO ("sent 6 bytes"); + return TRUE; +} + +GST_START_TEST (test_udpsrc_empty_packet) +{ + GSocketAddress *sa = NULL; + GstElement *udpsrc = NULL; + GSocket *socket = NULL; + GstPad *sinkpad = NULL; + + if (!udpsrc_setup (&udpsrc, &socket, &sinkpad, &sa)) + goto no_socket; + + if (g_socket_send_to (socket, sa, "HeLL0", 0, NULL, NULL) == 0) { + GST_INFO ("sent 0 bytes"); + if (g_socket_send_to (socket, sa, "HeLL0", 6, NULL, NULL) == 6) { + GstMapInfo map; + GstBuffer *buf; + guint len; + + GST_INFO ("sent 6 bytes"); + + g_mutex_lock (&check_mutex); + do { + g_cond_wait (&check_cond, &check_mutex); + len = g_list_length (buffers); + GST_INFO ("%u buffers", len); + } while (len < 1); - g_usleep (G_USEC_PER_SEC / 2); + /* wait a bit more for a second buffer */ + if (len < 2) { + g_cond_wait_until (&check_cond, &check_mutex, + g_get_monotonic_time () + G_TIME_SPAN_SECOND / 100); len = g_list_length (buffers); GST_INFO ("%u buffers", len); - fail_unless (len == 1 || len == 2); + } - /* last buffer should be our HeLL0 string */ - buf = GST_BUFFER (g_list_nth_data (buffers, len - 1)); - gst_buffer_map (buf, &map, GST_MAP_READ); - fail_unless_equals_int (map.size, 6); - fail_unless_equals_string ((gchar *) map.data, "HeLL0"); - gst_buffer_unmap (buf, &map); - - /* if there's another buffer, it should be 0 bytes */ - if (len == 2) { - buf = GST_BUFFER (g_list_nth_data (buffers, 0)); - fail_unless_equals_int (gst_buffer_get_size (buf), 0); - } - } else { - GST_WARNING ("send_to(6 bytes) failed"); + fail_unless (len == 1 || len == 2); + + /* last buffer should be our HeLL0 string */ + buf = GST_BUFFER (g_list_nth_data (buffers, len - 1)); + gst_buffer_map (buf, &map, GST_MAP_READ); + fail_unless_equals_int (map.size, 6); + fail_unless_equals_string ((gchar *) map.data, "HeLL0"); + gst_buffer_unmap (buf, &map); + + /* if there's another buffer, it should be 0 bytes */ + if (len == 2) { + buf = GST_BUFFER (g_list_nth_data (buffers, 0)); + fail_unless_equals_int (gst_buffer_get_size (buf), 0); } + g_mutex_unlock (&check_mutex); } else { - GST_WARNING ("send_to(0 bytes) failed"); + GST_WARNING ("send_to(6 bytes) failed"); } - - g_object_unref (sa); - g_object_unref (ia); } else { - GST_WARNING ("Could not create IPv4 UDP socket for unit test"); + GST_WARNING ("send_to(0 bytes) failed"); } +no_socket: + + gst_element_set_state (udpsrc, GST_STATE_NULL); + + gst_check_teardown_pad_by_name (udpsrc, "src"); + gst_check_teardown_element (udpsrc); + + g_object_unref (socket); + g_object_unref (sa); +} + +GST_END_TEST; + +GST_START_TEST (test_udpsrc) +{ + GSocketAddress *sa = NULL; + GstElement *udpsrc = NULL; + GSocket *socket = NULL; + GstPad *sinkpad = NULL; + GstBuffer *buf; + GstMemory *mem; + gchar data[48000]; + gsize max_size; + int i, len; + + for (i = 0; i < G_N_ELEMENTS (data); ++i) + data[i] = i & 0xff; + + if (!udpsrc_setup (&udpsrc, &socket, &sinkpad, &sa)) + goto no_socket; + + if (g_socket_send_to (socket, sa, data, 48000, NULL, NULL) != 48000) + goto send_failure; + + if (g_socket_send_to (socket, sa, data, 21000, NULL, NULL) != 21000) + goto send_failure; + + if (g_socket_send_to (socket, sa, data, 500, NULL, NULL) != 500) + goto send_failure; + + if (g_socket_send_to (socket, sa, data, 1600, NULL, NULL) != 1600) + goto send_failure; + + if (g_socket_send_to (socket, sa, data, 1600, NULL, NULL) != 1400) + goto send_failure; + + GST_INFO ("sent some packets"); + + g_mutex_lock (&check_mutex); + do { + g_cond_wait (&check_cond, &check_mutex); + len = g_list_length (buffers); + GST_INFO ("%u buffers", len); + } while (len < 5); + + /* check that large packets are made up of multiple memory chunks and that + * the first one is fairly small */ + buf = GST_BUFFER (g_list_nth_data (buffers, 0)); + fail_unless_equals_int (gst_buffer_get_size (buf), 48000); + fail_unless_equals_int (gst_buffer_n_memory (buf), 2); + mem = gst_buffer_peek_memory (buf, 0); + gst_memory_get_sizes (mem, NULL, &max_size); + fail_unless (max_size <= 2000); + + buf = GST_BUFFER (g_list_nth_data (buffers, 1)); + fail_unless_equals_int (gst_buffer_get_size (buf), 21000); + fail_unless_equals_int (gst_buffer_n_memory (buf), 2); + mem = gst_buffer_peek_memory (buf, 0); + gst_memory_get_sizes (mem, NULL, &max_size); + fail_unless (max_size <= 2000); + + buf = GST_BUFFER (g_list_nth_data (buffers, 2)); + fail_unless_equals_int (gst_buffer_get_size (buf), 500); + fail_unless_equals_int (gst_buffer_n_memory (buf), 1); + mem = gst_buffer_peek_memory (buf, 0); + gst_memory_get_sizes (mem, NULL, &max_size); + fail_unless (max_size <= 2000); + + buf = GST_BUFFER (g_list_nth_data (buffers, 3)); + fail_unless_equals_int (gst_buffer_get_size (buf), 1600); + fail_unless_equals_int (gst_buffer_n_memory (buf), 2); + mem = gst_buffer_peek_memory (buf, 0); + gst_memory_get_sizes (mem, NULL, &max_size); + fail_unless (max_size <= 2000); + + buf = GST_BUFFER (g_list_nth_data (buffers, 4)); + fail_unless_equals_int (gst_buffer_get_size (buf), 1400); + fail_unless_equals_int (gst_buffer_n_memory (buf), 1); + mem = gst_buffer_peek_memory (buf, 0); + gst_memory_get_sizes (mem, NULL, &max_size); + fail_unless (max_size <= 2000); + + g_list_foreach (buffers, (GFunc) gst_buffer_unref, NULL); + g_list_free (buffers); + buffers = NULL; + +no_socket: +send_failure: + gst_element_set_state (udpsrc, GST_STATE_NULL); gst_check_teardown_pad_by_name (udpsrc, "src"); gst_check_teardown_element (udpsrc); g_object_unref (socket); + g_object_unref (sa); } GST_END_TEST; @@ -117,6 +239,7 @@ suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_udpsrc_empty_packet); + tcase_add_test (tc_chain, test_udpsrc); return s; } diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/videobox.c gst-plugins-good1.0-1.6.1/tests/check/elements/videobox.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/videobox.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/videobox.c 2015-10-22 08:02:54.000000000 +0000 @@ -220,19 +220,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = videobox_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (videobox); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/videocrop.c gst-plugins-good1.0-1.6.1/tests/check/elements/videocrop.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/videocrop.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/videocrop.c 2015-10-22 08:02:54.000000000 +0000 @@ -816,19 +816,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = videocrop_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (videocrop); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/videofilter.c gst-plugins-good1.0-1.6.1/tests/check/elements/videofilter.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/videofilter.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/videofilter.c 2015-10-22 08:02:54.000000000 +0000 @@ -263,19 +263,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = videofilter_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (videofilter); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/vp8dec.c gst-plugins-good1.0-1.6.1/tests/check/elements/vp8dec.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/vp8dec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/vp8dec.c 2015-10-22 08:02:54.000000000 +0000 @@ -59,6 +59,9 @@ vp8dec = gst_check_setup_element ("vp8dec"); fail_unless (vp8dec != NULL); + g_object_set (vp8enc, "name", "encoder", NULL); + g_object_set (vp8dec, "name", "decoder", NULL); + gst_bin_add_many (GST_BIN (bin), vp8enc, vp8dec, NULL); fail_unless (gst_element_link_pads (vp8enc, "src", vp8dec, "sink")); @@ -116,6 +119,31 @@ gst_check_teardown_element (bin); } +static void +_gst_vp8_test_check_output_caps (gint width, gint height, gint fps_n, + gint fps_d) +{ + GstCaps *caps; + GstStructure *structure; + gint caps_w, caps_h, caps_fpsn, caps_fpsd; + + caps = gst_pad_get_current_caps (sinkpad); + fail_unless (caps != NULL); + structure = gst_caps_get_structure (caps, 0); + + fail_unless (gst_structure_get_int (structure, "width", &caps_w)); + fail_unless (gst_structure_get_int (structure, "height", &caps_h)); + fail_unless (gst_structure_get_fraction (structure, "framerate", &caps_fpsn, + &caps_fpsd)); + + fail_unless (width == caps_w); + fail_unless (height == caps_h); + fail_unless (fps_n == caps_fpsn); + fail_unless (fps_d == caps_fpsd); + + gst_caps_unref (caps); +} + GST_START_TEST (test_decode_simple) { GstElement *bin; @@ -162,6 +190,65 @@ GST_END_TEST; + +GST_START_TEST (test_decode_caps_change) +{ + GstElement *bin; + GstBuffer *buffer; + GstSegment seg; + GstElement *encoder; + GstCaps *caps; + + bin = + setup_vp8dec + ("video/x-raw,format=(string)I420,width=(int)320,height=(int)240,framerate=(fraction)25/1"); + + gst_segment_init (&seg, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (srcpad, gst_event_new_segment (&seg))); + + buffer = gst_buffer_new_and_alloc (320 * 240 + 2 * 160 * 120); + gst_buffer_memset (buffer, 0, 0, -1); + + GST_BUFFER_TIMESTAMP (buffer) = gst_util_uint64_scale (0, GST_SECOND, 25); + GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale (1, GST_SECOND, 25); + fail_unless (gst_pad_push (srcpad, buffer) == GST_FLOW_OK); + + /* at this point, the output caps should be the same as the input */ + _gst_vp8_test_check_output_caps (320, 240, 25, 1); + fail_unless_equals_int (g_list_length (buffers), 1); + g_list_free_full (buffers, (GDestroyNotify) gst_buffer_unref); + buffers = NULL; + + /* now change the caps */ + encoder = gst_bin_get_by_name (GST_BIN (bin), "encoder"); + gst_element_set_state (encoder, GST_STATE_NULL); + gst_element_sync_state_with_parent (encoder); + gst_object_unref (encoder); + caps = gst_caps_from_string + ("video/x-raw,format=(string)I420,width=(int)64," + "height=(int)32,framerate=(fraction)30/1"); + fail_unless (gst_pad_push_event (srcpad, gst_event_new_caps (caps))); + fail_unless (gst_pad_push_event (srcpad, gst_event_new_segment (&seg))); + buffer = gst_buffer_new_and_alloc (64 * 32 + 2 * 32 * 16); + gst_buffer_memset (buffer, 0, 0, -1); + gst_caps_unref (caps); + + GST_BUFFER_TIMESTAMP (buffer) = gst_util_uint64_scale (0, GST_SECOND, 30); + GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale (1, GST_SECOND, 30); + fail_unless (gst_pad_push (srcpad, buffer) == GST_FLOW_OK); + + /* at this point, the output caps should be the same as the input */ + _gst_vp8_test_check_output_caps (64, 32, 30, 1); + fail_unless_equals_int (g_list_length (buffers), 1); + g_list_free_full (buffers, (GDestroyNotify) gst_buffer_unref); + buffers = NULL; + + cleanup_vp8dec (bin); +} + +GST_END_TEST; + + static Suite * vp8dec_suite (void) { @@ -171,6 +258,7 @@ suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_decode_simple); + tcase_add_test (tc_chain, test_decode_caps_change); return s; } diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/wavpackdec.c gst-plugins-good1.0-1.6.1/tests/check/elements/wavpackdec.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/wavpackdec.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/wavpackdec.c 2015-10-22 08:02:54.000000000 +0000 @@ -240,19 +240,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = wavpackdec_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (wavpackdec); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/wavpackenc.c gst-plugins-good1.0-1.6.1/tests/check/elements/wavpackenc.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/wavpackenc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/wavpackenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -179,19 +179,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = wavpackenc_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (wavpackenc); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/wavpackparse.c gst-plugins-good1.0-1.6.1/tests/check/elements/wavpackparse.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/wavpackparse.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/wavpackparse.c 2015-10-22 08:02:54.000000000 +0000 @@ -116,6 +116,9 @@ /* should decode the buffer without problems */ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK); + /* inform of no further data */ + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); + num_buffers = g_list_length (buffers); /* should get 2 buffers, each one complete wavpack frame */ fail_unless_equals_int (num_buffers, 2); @@ -177,6 +180,9 @@ /* should decode the buffer without problems */ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK); + /* inform of no further data */ + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); + num_buffers = g_list_length (buffers); /* should get 1 buffers, the second non-broken one */ @@ -225,19 +231,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = wavpackparse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (wavpackparse); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/elements/y4menc.c gst-plugins-good1.0-1.6.1/tests/check/elements/y4menc.c --- gst-plugins-good1.0-1.4.3/tests/check/elements/y4menc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/elements/y4menc.c 2015-10-22 08:02:54.000000000 +0000 @@ -165,19 +165,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = y4menc_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (y4menc); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/generic/states.c gst-plugins-good1.0-1.6.1/tests/check/generic/states.c --- gst-plugins-good1.0-1.4.3/tests/check/generic/states.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/generic/states.c 2015-10-22 08:02:54.000000000 +0000 @@ -210,7 +210,7 @@ static Suite * states_suite (void) { - Suite *s = suite_create ("states"); + Suite *s = suite_create ("states_good"); TCase *tc_chain = tcase_create ("general"); suite_add_tcase (s, tc_chain); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/gst-plugins-good.supp gst-plugins-good1.0-1.6.1/tests/check/gst-plugins-good.supp --- gst-plugins-good1.0-1.4.3/tests/check/gst-plugins-good.supp 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/gst-plugins-good.supp 2015-10-22 08:02:54.000000000 +0000 @@ -125,3 +125,21 @@ fun:jinit_compress_master fun:jpeg_start_compress } + +{ + + Memcheck:Cond + fun:inflateReset2 + fun:inflateInit2_ + fun:png_create_read_struct_2 + fun:png_create_read_struct +} + +{ + + Memcheck:Addr8 + fun:__GI___strncasecmp_l + fun:____strtod_l_internal + fun:gst_value_deserialize_double +} + diff -Nru gst-plugins-good1.0-1.4.3/tests/check/Makefile.am gst-plugins-good1.0-1.6.1/tests/check/Makefile.am --- gst-plugins-good1.0-1.4.3/tests/check/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -6,7 +6,7 @@ REGISTRY_ENVIRONMENT = \ GST_REGISTRY_1_0=$(CHECK_REGISTRY) -TESTS_ENVIRONMENT = \ +AM_TESTS_ENVIRONMENT = \ $(REGISTRY_ENVIRONMENT) \ GST_PLUGIN_SYSTEM_PATH_1_0= \ GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR) \ @@ -37,7 +37,9 @@ distclean-local: distclean-local-orc if USE_PLUGIN_ALPHA -check_alpha = elements/alphacolor +check_alpha = \ + elements/alphacolor \ + elements/alpha else check_alpha = endif @@ -191,6 +193,7 @@ if USE_PLUGIN_MATROSKA check_matroska = \ + elements/matroskademux \ elements/matroskamux \ elements/matroskaparse else @@ -198,7 +201,7 @@ endif if USE_PLUGIN_MULTIFILE -check_multifile = elements/multifile +check_multifile = elements/multifile elements/splitmux else check_multifile = endif @@ -213,7 +216,9 @@ endif if USE_PLUGIN_RTP -check_rtp = elements/rtp-payloading +check_rtp = \ + elements/rtp-payloading \ + elements/rtph263 else check_rtp = endif @@ -392,6 +397,7 @@ AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \ $(GST_OPTION_CFLAGS) $(GST_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \ + -DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \ -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS) @@ -472,6 +478,7 @@ elements_spectrum_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) $(LDADD) elements_alphacolor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) +elements_alpha_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) elements_deinterlace_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) elements_deinterlace_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(LDADD) @@ -500,6 +507,10 @@ elements_matroskamux_LDADD = $(GST_BASE_LIBS) $(LDADD) $(LIBM) +elements_mulawdec_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) + +elements_mulawenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) + elements_multifile_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) elements_multifile_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(LDADD) $(LIBM) @@ -514,6 +525,9 @@ $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS) $(LDADD) elements_rtpbin_buffer_list_SOURCES = elements/rtpbin_buffer_list.c +elements_rtph263_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS) +elements_rtph263_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstrtp-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD) + elements_rtpmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS) elements_rtpmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstrtp-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD) diff -Nru gst-plugins-good1.0-1.4.3/tests/check/Makefile.in gst-plugins-good1.0-1.6.1/tests/check/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/check/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,9 +89,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/check.mak $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ - $(top_srcdir)/test-driver check_PROGRAMS = generic/states$(EXEEXT) \ pipelines/simple-launch-lines$(EXEEXT) \ pipelines/tagschecking$(EXEEXT) $(am__EXEEXT_1) \ @@ -121,7 +128,6 @@ $(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 \ @@ -136,6 +142,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -152,7 +159,8 @@ libparser_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libparser_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -@USE_PLUGIN_ALPHA_TRUE@am__EXEEXT_1 = elements/alphacolor$(EXEEXT) +@USE_PLUGIN_ALPHA_TRUE@am__EXEEXT_1 = elements/alphacolor$(EXEEXT) \ +@USE_PLUGIN_ALPHA_TRUE@ elements/alpha$(EXEEXT) @USE_PLUGIN_AUDIOFX_TRUE@am__EXEEXT_2 = \ @USE_PLUGIN_AUDIOFX_TRUE@ elements/audioamplify$(EXEEXT) \ @USE_PLUGIN_AUDIOFX_TRUE@ elements/audiochebband$(EXEEXT) \ @@ -202,15 +210,18 @@ @USE_PLUGIN_LAW_TRUE@ elements/mulawenc$(EXEEXT) @USE_PLUGIN_LEVEL_TRUE@am__EXEEXT_21 = elements/level$(EXEEXT) @USE_PLUGIN_MATROSKA_TRUE@am__EXEEXT_22 = \ +@USE_PLUGIN_MATROSKA_TRUE@ elements/matroskademux$(EXEEXT) \ @USE_PLUGIN_MATROSKA_TRUE@ elements/matroskamux$(EXEEXT) \ @USE_PLUGIN_MATROSKA_TRUE@ elements/matroskaparse$(EXEEXT) @USE_PLUGIN_MULTIFILE_TRUE@am__EXEEXT_23 = \ -@USE_PLUGIN_MULTIFILE_TRUE@ elements/multifile$(EXEEXT) +@USE_PLUGIN_MULTIFILE_TRUE@ elements/multifile$(EXEEXT) \ +@USE_PLUGIN_MULTIFILE_TRUE@ elements/splitmux$(EXEEXT) @USE_PLUGIN_REPLAYGAIN_TRUE@am__EXEEXT_24 = \ @USE_PLUGIN_REPLAYGAIN_TRUE@ elements/rganalysis$(EXEEXT) \ @USE_PLUGIN_REPLAYGAIN_TRUE@ elements/rglimiter$(EXEEXT) \ @USE_PLUGIN_REPLAYGAIN_TRUE@ elements/rgvolume$(EXEEXT) -@USE_PLUGIN_RTP_TRUE@am__EXEEXT_25 = elements/rtp-payloading$(EXEEXT) +@USE_PLUGIN_RTP_TRUE@am__EXEEXT_25 = elements/rtp-payloading$(EXEEXT) \ +@USE_PLUGIN_RTP_TRUE@ elements/rtph263$(EXEEXT) @USE_PLUGIN_RTPMANAGER_TRUE@am__EXEEXT_26 = elements/rtpaux$(EXEEXT) \ @USE_PLUGIN_RTPMANAGER_TRUE@ elements/rtpbin$(EXEEXT) \ @USE_PLUGIN_RTPMANAGER_TRUE@ elements/rtpbin_buffer_list$(EXEEXT) \ @@ -254,6 +265,14 @@ elements_ac3parse_SOURCES = elements/ac3parse.c elements_ac3parse_OBJECTS = elements/ac3parse.$(OBJEXT) elements_ac3parse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2) +elements_alpha_SOURCES = elements/alpha.c +elements_alpha_OBJECTS = elements/elements_alpha-alpha.$(OBJEXT) +elements_alpha_LDADD = $(LDADD) +elements_alpha_DEPENDENCIES = $(am__DEPENDENCIES_1) +elements_alpha_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(elements_alpha_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ elements_alphacolor_SOURCES = elements/alphacolor.c elements_alphacolor_OBJECTS = \ elements/elements_alphacolor-alphacolor.$(OBJEXT) @@ -501,6 +520,10 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(elements_level_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ $@ +elements_matroskademux_SOURCES = elements/matroskademux.c +elements_matroskademux_OBJECTS = elements/matroskademux.$(OBJEXT) +elements_matroskademux_LDADD = $(LDADD) +elements_matroskademux_DEPENDENCIES = $(am__DEPENDENCIES_1) elements_matroskamux_SOURCES = elements/matroskamux.c elements_matroskamux_OBJECTS = elements/matroskamux.$(OBJEXT) elements_matroskamux_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @@ -514,13 +537,23 @@ elements_mpegaudioparse_DEPENDENCIES = libparser.la \ $(am__DEPENDENCIES_2) elements_mulawdec_SOURCES = elements/mulawdec.c -elements_mulawdec_OBJECTS = elements/mulawdec.$(OBJEXT) +elements_mulawdec_OBJECTS = \ + elements/elements_mulawdec-mulawdec.$(OBJEXT) elements_mulawdec_LDADD = $(LDADD) elements_mulawdec_DEPENDENCIES = $(am__DEPENDENCIES_1) +elements_mulawdec_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(elements_mulawdec_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ elements_mulawenc_SOURCES = elements/mulawenc.c -elements_mulawenc_OBJECTS = elements/mulawenc.$(OBJEXT) +elements_mulawenc_OBJECTS = \ + elements/elements_mulawenc-mulawenc.$(OBJEXT) elements_mulawenc_LDADD = $(LDADD) elements_mulawenc_DEPENDENCIES = $(am__DEPENDENCIES_1) +elements_mulawenc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(elements_mulawenc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ elements_multifile_SOURCES = elements/multifile.c elements_multifile_OBJECTS = \ elements/elements_multifile-multifile.$(OBJEXT) @@ -602,6 +635,15 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(elements_rtpcollision_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +elements_rtph263_SOURCES = elements/rtph263.c +elements_rtph263_OBJECTS = \ + elements/elements_rtph263-rtph263.$(OBJEXT) +elements_rtph263_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +elements_rtph263_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(elements_rtph263_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ elements_rtpjitterbuffer_SOURCES = elements/rtpjitterbuffer.c elements_rtpjitterbuffer_OBJECTS = \ elements/elements_rtpjitterbuffer-rtpjitterbuffer.$(OBJEXT) @@ -658,6 +700,10 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(elements_spectrum_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +elements_splitmux_SOURCES = elements/splitmux.c +elements_splitmux_OBJECTS = elements/splitmux.$(OBJEXT) +elements_splitmux_LDADD = $(LDADD) +elements_splitmux_DEPENDENCIES = $(am__DEPENDENCIES_1) elements_sunaudio_SOURCES = elements/sunaudio.c elements_sunaudio_OBJECTS = \ elements/elements_sunaudio-sunaudio.$(OBJEXT) @@ -840,30 +886,32 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \ - elements/ac3parse.c elements/alphacolor.c elements/amrparse.c \ - elements/apev2mux.c elements/aspectratiocrop.c \ - elements/audioamplify.c elements/audiochebband.c \ - elements/audiocheblimit.c elements/audiodynamic.c \ - elements/audioecho.c elements/audiofirfilter.c \ - elements/audioiirfilter.c elements/audioinvert.c \ - elements/audiopanorama.c elements/audiowsincband.c \ - elements/audiowsinclimit.c elements/autodetect.c \ - elements/avimux.c elements/avisubtitle.c elements/capssetter.c \ - elements/deinterlace.c elements/deinterleave.c elements/dtmf.c \ - elements/equalizer.c elements/flacparse.c elements/flvdemux.c \ - elements/flvmux.c elements/gdkpixbufsink.c elements/icydemux.c \ + elements/ac3parse.c elements/alpha.c elements/alphacolor.c \ + elements/amrparse.c elements/apev2mux.c \ + elements/aspectratiocrop.c elements/audioamplify.c \ + elements/audiochebband.c elements/audiocheblimit.c \ + elements/audiodynamic.c elements/audioecho.c \ + elements/audiofirfilter.c elements/audioiirfilter.c \ + elements/audioinvert.c elements/audiopanorama.c \ + elements/audiowsincband.c elements/audiowsinclimit.c \ + elements/autodetect.c elements/avimux.c elements/avisubtitle.c \ + elements/capssetter.c elements/deinterlace.c \ + elements/deinterleave.c elements/dtmf.c elements/equalizer.c \ + elements/flacparse.c elements/flvdemux.c elements/flvmux.c \ + elements/gdkpixbufsink.c elements/icydemux.c \ elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \ elements/interleave.c elements/jpegdec.c elements/jpegenc.c \ - elements/level.c elements/matroskamux.c \ - elements/matroskaparse.c elements/mpegaudioparse.c \ - elements/mulawdec.c elements/mulawenc.c elements/multifile.c \ - elements/qtmux.c elements/rganalysis.c elements/rglimiter.c \ - elements/rgvolume.c elements/rtp-payloading.c \ - elements/rtpaux.c elements/rtpbin.c \ + elements/level.c elements/matroskademux.c \ + elements/matroskamux.c elements/matroskaparse.c \ + elements/mpegaudioparse.c elements/mulawdec.c \ + elements/mulawenc.c elements/multifile.c elements/qtmux.c \ + elements/rganalysis.c elements/rglimiter.c elements/rgvolume.c \ + elements/rtp-payloading.c elements/rtpaux.c elements/rtpbin.c \ $(elements_rtpbin_buffer_list_SOURCES) elements/rtpcollision.c \ - elements/rtpjitterbuffer.c elements/rtpmux.c elements/rtprtx.c \ - elements/rtpsession.c elements/shapewipe.c \ - elements/souphttpsrc.c elements/spectrum.c elements/sunaudio.c \ + elements/rtph263.c elements/rtpjitterbuffer.c \ + elements/rtpmux.c elements/rtprtx.c elements/rtpsession.c \ + elements/shapewipe.c elements/souphttpsrc.c \ + elements/spectrum.c elements/splitmux.c elements/sunaudio.c \ elements/udpsink.c elements/udpsrc.c elements/videobox.c \ elements/videocrop.c elements/videofilter.c \ elements/videomixer.c elements/vp8dec.c elements/vp8enc.c \ @@ -876,30 +924,32 @@ pipelines/tagschecking.c pipelines/wavenc.c \ pipelines/wavpack.c DIST_SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \ - elements/ac3parse.c elements/alphacolor.c elements/amrparse.c \ - elements/apev2mux.c elements/aspectratiocrop.c \ - elements/audioamplify.c elements/audiochebband.c \ - elements/audiocheblimit.c elements/audiodynamic.c \ - elements/audioecho.c elements/audiofirfilter.c \ - elements/audioiirfilter.c elements/audioinvert.c \ - elements/audiopanorama.c elements/audiowsincband.c \ - elements/audiowsinclimit.c elements/autodetect.c \ - elements/avimux.c elements/avisubtitle.c elements/capssetter.c \ - elements/deinterlace.c elements/deinterleave.c elements/dtmf.c \ - elements/equalizer.c elements/flacparse.c elements/flvdemux.c \ - elements/flvmux.c elements/gdkpixbufsink.c elements/icydemux.c \ + elements/ac3parse.c elements/alpha.c elements/alphacolor.c \ + elements/amrparse.c elements/apev2mux.c \ + elements/aspectratiocrop.c elements/audioamplify.c \ + elements/audiochebband.c elements/audiocheblimit.c \ + elements/audiodynamic.c elements/audioecho.c \ + elements/audiofirfilter.c elements/audioiirfilter.c \ + elements/audioinvert.c elements/audiopanorama.c \ + elements/audiowsincband.c elements/audiowsinclimit.c \ + elements/autodetect.c elements/avimux.c elements/avisubtitle.c \ + elements/capssetter.c elements/deinterlace.c \ + elements/deinterleave.c elements/dtmf.c elements/equalizer.c \ + elements/flacparse.c elements/flvdemux.c elements/flvmux.c \ + elements/gdkpixbufsink.c elements/icydemux.c \ elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \ elements/interleave.c elements/jpegdec.c elements/jpegenc.c \ - elements/level.c elements/matroskamux.c \ - elements/matroskaparse.c elements/mpegaudioparse.c \ - elements/mulawdec.c elements/mulawenc.c elements/multifile.c \ - elements/qtmux.c elements/rganalysis.c elements/rglimiter.c \ - elements/rgvolume.c elements/rtp-payloading.c \ - elements/rtpaux.c elements/rtpbin.c \ + elements/level.c elements/matroskademux.c \ + elements/matroskamux.c elements/matroskaparse.c \ + elements/mpegaudioparse.c elements/mulawdec.c \ + elements/mulawenc.c elements/multifile.c elements/qtmux.c \ + elements/rganalysis.c elements/rglimiter.c elements/rgvolume.c \ + elements/rtp-payloading.c elements/rtpaux.c elements/rtpbin.c \ $(elements_rtpbin_buffer_list_SOURCES) elements/rtpcollision.c \ - elements/rtpjitterbuffer.c elements/rtpmux.c elements/rtprtx.c \ - elements/rtpsession.c elements/shapewipe.c \ - elements/souphttpsrc.c elements/spectrum.c elements/sunaudio.c \ + elements/rtph263.c elements/rtpjitterbuffer.c \ + elements/rtpmux.c elements/rtprtx.c elements/rtpsession.c \ + elements/shapewipe.c elements/souphttpsrc.c \ + elements/spectrum.c elements/splitmux.c elements/sunaudio.c \ elements/udpsink.c elements/udpsrc.c elements/videobox.c \ elements/videocrop.c elements/videofilter.c \ elements/videomixer.c elements/vp8dec.c elements/vp8enc.c \ @@ -1136,6 +1186,8 @@ TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/check.mak \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -1268,9 +1320,6 @@ 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@ @@ -1388,17 +1437,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -1451,6 +1500,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1471,7 +1521,7 @@ REGISTRY_ENVIRONMENT = \ GST_REGISTRY_1_0=$(CHECK_REGISTRY) -TESTS_ENVIRONMENT = \ +AM_TESTS_ENVIRONMENT = \ $(REGISTRY_ENVIRONMENT) \ GST_PLUGIN_SYSTEM_PATH_1_0= \ GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR) \ @@ -1499,7 +1549,10 @@ # the core dumps of some machines have PIDs appended CLEANFILES = core.* test-registry.* @USE_PLUGIN_ALPHA_FALSE@check_alpha = -@USE_PLUGIN_ALPHA_TRUE@check_alpha = elements/alphacolor +@USE_PLUGIN_ALPHA_TRUE@check_alpha = \ +@USE_PLUGIN_ALPHA_TRUE@ elements/alphacolor \ +@USE_PLUGIN_ALPHA_TRUE@ elements/alpha + @USE_PLUGIN_AUDIOFX_FALSE@check_audiofx = @USE_PLUGIN_AUDIOFX_TRUE@check_audiofx = \ @USE_PLUGIN_AUDIOFX_TRUE@ elements/audioamplify \ @@ -1576,11 +1629,12 @@ @USE_PLUGIN_LEVEL_TRUE@check_level = elements/level @USE_PLUGIN_MATROSKA_FALSE@check_matroska = @USE_PLUGIN_MATROSKA_TRUE@check_matroska = \ +@USE_PLUGIN_MATROSKA_TRUE@ elements/matroskademux \ @USE_PLUGIN_MATROSKA_TRUE@ elements/matroskamux \ @USE_PLUGIN_MATROSKA_TRUE@ elements/matroskaparse @USE_PLUGIN_MULTIFILE_FALSE@check_multifile = -@USE_PLUGIN_MULTIFILE_TRUE@check_multifile = elements/multifile +@USE_PLUGIN_MULTIFILE_TRUE@check_multifile = elements/multifile elements/splitmux @USE_PLUGIN_REPLAYGAIN_FALSE@check_replaygain = @USE_PLUGIN_REPLAYGAIN_TRUE@check_replaygain = \ @USE_PLUGIN_REPLAYGAIN_TRUE@ elements/rganalysis \ @@ -1588,7 +1642,10 @@ @USE_PLUGIN_REPLAYGAIN_TRUE@ elements/rgvolume @USE_PLUGIN_RTP_FALSE@check_rtp = -@USE_PLUGIN_RTP_TRUE@check_rtp = elements/rtp-payloading +@USE_PLUGIN_RTP_TRUE@check_rtp = \ +@USE_PLUGIN_RTP_TRUE@ elements/rtp-payloading \ +@USE_PLUGIN_RTP_TRUE@ elements/rtph263 + @USE_PLUGIN_RTPMANAGER_FALSE@check_rtpmanager = @USE_PLUGIN_RTPMANAGER_TRUE@check_rtpmanager = \ @USE_PLUGIN_RTPMANAGER_TRUE@ elements/rtpaux \ @@ -1651,6 +1708,7 @@ TESTS = $(check_PROGRAMS) AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \ $(GST_OPTION_CFLAGS) $(GST_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \ + -DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \ -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS) @@ -1714,6 +1772,7 @@ elements_spectrum_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) elements_spectrum_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) $(LDADD) elements_alphacolor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) +elements_alpha_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) elements_deinterlace_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) elements_deinterlace_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(LDADD) elements_dtmf_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \ @@ -1735,6 +1794,8 @@ elements_jpegenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS) elements_jpegenc_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstapp-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD) elements_matroskamux_LDADD = $(GST_BASE_LIBS) $(LDADD) $(LIBM) +elements_mulawdec_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) +elements_mulawenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) elements_multifile_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) elements_multifile_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(LDADD) $(LIBM) elements_qtmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) @@ -1749,6 +1810,8 @@ $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS) $(LDADD) elements_rtpbin_buffer_list_SOURCES = elements/rtpbin_buffer_list.c +elements_rtph263_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS) +elements_rtph263_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstrtp-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD) elements_rtpmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS) elements_rtpmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstrtp-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD) elements_souphttpsrc_CFLAGS = $(SOUP_CFLAGS) $(AM_CFLAGS) @@ -1820,7 +1883,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/check/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1829,7 +1891,7 @@ 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/check.mak: +$(top_srcdir)/common/check.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1882,6 +1944,12 @@ elements/ac3parse$(EXEEXT): $(elements_ac3parse_OBJECTS) $(elements_ac3parse_DEPENDENCIES) $(EXTRA_elements_ac3parse_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/ac3parse$(EXEEXT) $(AM_V_CCLD)$(LINK) $(elements_ac3parse_OBJECTS) $(elements_ac3parse_LDADD) $(LIBS) +elements/elements_alpha-alpha.$(OBJEXT): elements/$(am__dirstamp) \ + elements/$(DEPDIR)/$(am__dirstamp) + +elements/alpha$(EXEEXT): $(elements_alpha_OBJECTS) $(elements_alpha_DEPENDENCIES) $(EXTRA_elements_alpha_DEPENDENCIES) elements/$(am__dirstamp) + @rm -f elements/alpha$(EXEEXT) + $(AM_V_CCLD)$(elements_alpha_LINK) $(elements_alpha_OBJECTS) $(elements_alpha_LDADD) $(LIBS) elements/elements_alphacolor-alphacolor.$(OBJEXT): \ elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) @@ -2092,6 +2160,12 @@ elements/level$(EXEEXT): $(elements_level_OBJECTS) $(elements_level_DEPENDENCIES) $(EXTRA_elements_level_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/level$(EXEEXT) $(AM_V_CCLD)$(elements_level_LINK) $(elements_level_OBJECTS) $(elements_level_LDADD) $(LIBS) +elements/matroskademux.$(OBJEXT): elements/$(am__dirstamp) \ + elements/$(DEPDIR)/$(am__dirstamp) + +elements/matroskademux$(EXEEXT): $(elements_matroskademux_OBJECTS) $(elements_matroskademux_DEPENDENCIES) $(EXTRA_elements_matroskademux_DEPENDENCIES) elements/$(am__dirstamp) + @rm -f elements/matroskademux$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elements_matroskademux_OBJECTS) $(elements_matroskademux_LDADD) $(LIBS) elements/matroskamux.$(OBJEXT): elements/$(am__dirstamp) \ elements/$(DEPDIR)/$(am__dirstamp) @@ -2110,18 +2184,18 @@ elements/mpegaudioparse$(EXEEXT): $(elements_mpegaudioparse_OBJECTS) $(elements_mpegaudioparse_DEPENDENCIES) $(EXTRA_elements_mpegaudioparse_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/mpegaudioparse$(EXEEXT) $(AM_V_CCLD)$(LINK) $(elements_mpegaudioparse_OBJECTS) $(elements_mpegaudioparse_LDADD) $(LIBS) -elements/mulawdec.$(OBJEXT): elements/$(am__dirstamp) \ - elements/$(DEPDIR)/$(am__dirstamp) +elements/elements_mulawdec-mulawdec.$(OBJEXT): \ + elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) elements/mulawdec$(EXEEXT): $(elements_mulawdec_OBJECTS) $(elements_mulawdec_DEPENDENCIES) $(EXTRA_elements_mulawdec_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/mulawdec$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(elements_mulawdec_OBJECTS) $(elements_mulawdec_LDADD) $(LIBS) -elements/mulawenc.$(OBJEXT): elements/$(am__dirstamp) \ - elements/$(DEPDIR)/$(am__dirstamp) + $(AM_V_CCLD)$(elements_mulawdec_LINK) $(elements_mulawdec_OBJECTS) $(elements_mulawdec_LDADD) $(LIBS) +elements/elements_mulawenc-mulawenc.$(OBJEXT): \ + elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) elements/mulawenc$(EXEEXT): $(elements_mulawenc_OBJECTS) $(elements_mulawenc_DEPENDENCIES) $(EXTRA_elements_mulawenc_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/mulawenc$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(elements_mulawenc_OBJECTS) $(elements_mulawenc_LDADD) $(LIBS) + $(AM_V_CCLD)$(elements_mulawenc_LINK) $(elements_mulawenc_OBJECTS) $(elements_mulawenc_LDADD) $(LIBS) elements/elements_multifile-multifile.$(OBJEXT): \ elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) @@ -2182,6 +2256,12 @@ elements/rtpcollision$(EXEEXT): $(elements_rtpcollision_OBJECTS) $(elements_rtpcollision_DEPENDENCIES) $(EXTRA_elements_rtpcollision_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/rtpcollision$(EXEEXT) $(AM_V_CCLD)$(elements_rtpcollision_LINK) $(elements_rtpcollision_OBJECTS) $(elements_rtpcollision_LDADD) $(LIBS) +elements/elements_rtph263-rtph263.$(OBJEXT): elements/$(am__dirstamp) \ + elements/$(DEPDIR)/$(am__dirstamp) + +elements/rtph263$(EXEEXT): $(elements_rtph263_OBJECTS) $(elements_rtph263_DEPENDENCIES) $(EXTRA_elements_rtph263_DEPENDENCIES) elements/$(am__dirstamp) + @rm -f elements/rtph263$(EXEEXT) + $(AM_V_CCLD)$(elements_rtph263_LINK) $(elements_rtph263_OBJECTS) $(elements_rtph263_LDADD) $(LIBS) elements/elements_rtpjitterbuffer-rtpjitterbuffer.$(OBJEXT): \ elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) @@ -2224,6 +2304,12 @@ elements/spectrum$(EXEEXT): $(elements_spectrum_OBJECTS) $(elements_spectrum_DEPENDENCIES) $(EXTRA_elements_spectrum_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/spectrum$(EXEEXT) $(AM_V_CCLD)$(elements_spectrum_LINK) $(elements_spectrum_OBJECTS) $(elements_spectrum_LDADD) $(LIBS) +elements/splitmux.$(OBJEXT): elements/$(am__dirstamp) \ + elements/$(DEPDIR)/$(am__dirstamp) + +elements/splitmux$(EXEEXT): $(elements_splitmux_OBJECTS) $(elements_splitmux_DEPENDENCIES) $(EXTRA_elements_splitmux_DEPENDENCIES) elements/$(am__dirstamp) + @rm -f elements/splitmux$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elements_splitmux_OBJECTS) $(elements_splitmux_LDADD) $(LIBS) elements/elements_sunaudio-sunaudio.$(OBJEXT): \ elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) @@ -2407,6 +2493,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/avimux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/avisubtitle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/capssetter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_alpha-alpha.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_alphacolor-alphacolor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_audioamplify-audioamplify.Po@am__quote@ @@ -2429,6 +2516,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_jpegdec-jpegdec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_jpegenc-jpegenc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_level-level.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_mulawdec-mulawdec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_mulawenc-mulawenc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_multifile-multifile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_qtmux-qtmux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rganalysis-rganalysis.Po@am__quote@ @@ -2437,6 +2526,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtpaux-rtpaux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtpcollision-rtpcollision.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtph263-rtph263.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtpjitterbuffer-rtpjitterbuffer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtpmux-rtpmux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtprtx-rtprtx.Po@am__quote@ @@ -2455,14 +2545,14 @@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/id3demux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/id3v2mux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/libparser_la-parser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/matroskademux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/matroskamux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/matroskaparse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/mpegaudioparse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/mulawdec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/mulawenc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/rtp-payloading.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/rtpbin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/shapewipe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/splitmux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/udpsink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/videobox.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/vp8dec.Po@am__quote@ @@ -2514,6 +2604,20 @@ @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) $(libparser_la_CFLAGS) $(CFLAGS) -c -o elements/libparser_la-parser.lo `test -f 'elements/parser.c' || echo '$(srcdir)/'`elements/parser.c +elements/elements_alpha-alpha.o: elements/alpha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alpha_CFLAGS) $(CFLAGS) -MT elements/elements_alpha-alpha.o -MD -MP -MF elements/$(DEPDIR)/elements_alpha-alpha.Tpo -c -o elements/elements_alpha-alpha.o `test -f 'elements/alpha.c' || echo '$(srcdir)/'`elements/alpha.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_alpha-alpha.Tpo elements/$(DEPDIR)/elements_alpha-alpha.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/alpha.c' object='elements/elements_alpha-alpha.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) $(elements_alpha_CFLAGS) $(CFLAGS) -c -o elements/elements_alpha-alpha.o `test -f 'elements/alpha.c' || echo '$(srcdir)/'`elements/alpha.c + +elements/elements_alpha-alpha.obj: elements/alpha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alpha_CFLAGS) $(CFLAGS) -MT elements/elements_alpha-alpha.obj -MD -MP -MF elements/$(DEPDIR)/elements_alpha-alpha.Tpo -c -o elements/elements_alpha-alpha.obj `if test -f 'elements/alpha.c'; then $(CYGPATH_W) 'elements/alpha.c'; else $(CYGPATH_W) '$(srcdir)/elements/alpha.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_alpha-alpha.Tpo elements/$(DEPDIR)/elements_alpha-alpha.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/alpha.c' object='elements/elements_alpha-alpha.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) $(elements_alpha_CFLAGS) $(CFLAGS) -c -o elements/elements_alpha-alpha.obj `if test -f 'elements/alpha.c'; then $(CYGPATH_W) 'elements/alpha.c'; else $(CYGPATH_W) '$(srcdir)/elements/alpha.c'; fi` + elements/elements_alphacolor-alphacolor.o: elements/alphacolor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alphacolor_CFLAGS) $(CFLAGS) -MT elements/elements_alphacolor-alphacolor.o -MD -MP -MF elements/$(DEPDIR)/elements_alphacolor-alphacolor.Tpo -c -o elements/elements_alphacolor-alphacolor.o `test -f 'elements/alphacolor.c' || echo '$(srcdir)/'`elements/alphacolor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_alphacolor-alphacolor.Tpo elements/$(DEPDIR)/elements_alphacolor-alphacolor.Po @@ -2822,6 +2926,34 @@ @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) $(elements_level_CFLAGS) $(CFLAGS) -c -o elements/elements_level-level.obj `if test -f 'elements/level.c'; then $(CYGPATH_W) 'elements/level.c'; else $(CYGPATH_W) '$(srcdir)/elements/level.c'; fi` +elements/elements_mulawdec-mulawdec.o: elements/mulawdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_mulawdec_CFLAGS) $(CFLAGS) -MT elements/elements_mulawdec-mulawdec.o -MD -MP -MF elements/$(DEPDIR)/elements_mulawdec-mulawdec.Tpo -c -o elements/elements_mulawdec-mulawdec.o `test -f 'elements/mulawdec.c' || echo '$(srcdir)/'`elements/mulawdec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_mulawdec-mulawdec.Tpo elements/$(DEPDIR)/elements_mulawdec-mulawdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/mulawdec.c' object='elements/elements_mulawdec-mulawdec.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) $(elements_mulawdec_CFLAGS) $(CFLAGS) -c -o elements/elements_mulawdec-mulawdec.o `test -f 'elements/mulawdec.c' || echo '$(srcdir)/'`elements/mulawdec.c + +elements/elements_mulawdec-mulawdec.obj: elements/mulawdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_mulawdec_CFLAGS) $(CFLAGS) -MT elements/elements_mulawdec-mulawdec.obj -MD -MP -MF elements/$(DEPDIR)/elements_mulawdec-mulawdec.Tpo -c -o elements/elements_mulawdec-mulawdec.obj `if test -f 'elements/mulawdec.c'; then $(CYGPATH_W) 'elements/mulawdec.c'; else $(CYGPATH_W) '$(srcdir)/elements/mulawdec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_mulawdec-mulawdec.Tpo elements/$(DEPDIR)/elements_mulawdec-mulawdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/mulawdec.c' object='elements/elements_mulawdec-mulawdec.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) $(elements_mulawdec_CFLAGS) $(CFLAGS) -c -o elements/elements_mulawdec-mulawdec.obj `if test -f 'elements/mulawdec.c'; then $(CYGPATH_W) 'elements/mulawdec.c'; else $(CYGPATH_W) '$(srcdir)/elements/mulawdec.c'; fi` + +elements/elements_mulawenc-mulawenc.o: elements/mulawenc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_mulawenc_CFLAGS) $(CFLAGS) -MT elements/elements_mulawenc-mulawenc.o -MD -MP -MF elements/$(DEPDIR)/elements_mulawenc-mulawenc.Tpo -c -o elements/elements_mulawenc-mulawenc.o `test -f 'elements/mulawenc.c' || echo '$(srcdir)/'`elements/mulawenc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_mulawenc-mulawenc.Tpo elements/$(DEPDIR)/elements_mulawenc-mulawenc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/mulawenc.c' object='elements/elements_mulawenc-mulawenc.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) $(elements_mulawenc_CFLAGS) $(CFLAGS) -c -o elements/elements_mulawenc-mulawenc.o `test -f 'elements/mulawenc.c' || echo '$(srcdir)/'`elements/mulawenc.c + +elements/elements_mulawenc-mulawenc.obj: elements/mulawenc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_mulawenc_CFLAGS) $(CFLAGS) -MT elements/elements_mulawenc-mulawenc.obj -MD -MP -MF elements/$(DEPDIR)/elements_mulawenc-mulawenc.Tpo -c -o elements/elements_mulawenc-mulawenc.obj `if test -f 'elements/mulawenc.c'; then $(CYGPATH_W) 'elements/mulawenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/mulawenc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_mulawenc-mulawenc.Tpo elements/$(DEPDIR)/elements_mulawenc-mulawenc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/mulawenc.c' object='elements/elements_mulawenc-mulawenc.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) $(elements_mulawenc_CFLAGS) $(CFLAGS) -c -o elements/elements_mulawenc-mulawenc.obj `if test -f 'elements/mulawenc.c'; then $(CYGPATH_W) 'elements/mulawenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/mulawenc.c'; fi` + elements/elements_multifile-multifile.o: elements/multifile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_multifile_CFLAGS) $(CFLAGS) -MT elements/elements_multifile-multifile.o -MD -MP -MF elements/$(DEPDIR)/elements_multifile-multifile.Tpo -c -o elements/elements_multifile-multifile.o `test -f 'elements/multifile.c' || echo '$(srcdir)/'`elements/multifile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_multifile-multifile.Tpo elements/$(DEPDIR)/elements_multifile-multifile.Po @@ -2934,6 +3066,20 @@ @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) $(elements_rtpcollision_CFLAGS) $(CFLAGS) -c -o elements/elements_rtpcollision-rtpcollision.obj `if test -f 'elements/rtpcollision.c'; then $(CYGPATH_W) 'elements/rtpcollision.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtpcollision.c'; fi` +elements/elements_rtph263-rtph263.o: elements/rtph263.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtph263_CFLAGS) $(CFLAGS) -MT elements/elements_rtph263-rtph263.o -MD -MP -MF elements/$(DEPDIR)/elements_rtph263-rtph263.Tpo -c -o elements/elements_rtph263-rtph263.o `test -f 'elements/rtph263.c' || echo '$(srcdir)/'`elements/rtph263.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_rtph263-rtph263.Tpo elements/$(DEPDIR)/elements_rtph263-rtph263.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtph263.c' object='elements/elements_rtph263-rtph263.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) $(elements_rtph263_CFLAGS) $(CFLAGS) -c -o elements/elements_rtph263-rtph263.o `test -f 'elements/rtph263.c' || echo '$(srcdir)/'`elements/rtph263.c + +elements/elements_rtph263-rtph263.obj: elements/rtph263.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtph263_CFLAGS) $(CFLAGS) -MT elements/elements_rtph263-rtph263.obj -MD -MP -MF elements/$(DEPDIR)/elements_rtph263-rtph263.Tpo -c -o elements/elements_rtph263-rtph263.obj `if test -f 'elements/rtph263.c'; then $(CYGPATH_W) 'elements/rtph263.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtph263.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_rtph263-rtph263.Tpo elements/$(DEPDIR)/elements_rtph263-rtph263.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtph263.c' object='elements/elements_rtph263-rtph263.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) $(elements_rtph263_CFLAGS) $(CFLAGS) -c -o elements/elements_rtph263-rtph263.obj `if test -f 'elements/rtph263.c'; then $(CYGPATH_W) 'elements/rtph263.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtph263.c'; fi` + elements/elements_rtpjitterbuffer-rtpjitterbuffer.o: elements/rtpjitterbuffer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtpjitterbuffer_CFLAGS) $(CFLAGS) -MT elements/elements_rtpjitterbuffer-rtpjitterbuffer.o -MD -MP -MF elements/$(DEPDIR)/elements_rtpjitterbuffer-rtpjitterbuffer.Tpo -c -o elements/elements_rtpjitterbuffer-rtpjitterbuffer.o `test -f 'elements/rtpjitterbuffer.c' || echo '$(srcdir)/'`elements/rtpjitterbuffer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_rtpjitterbuffer-rtpjitterbuffer.Tpo elements/$(DEPDIR)/elements_rtpjitterbuffer-rtpjitterbuffer.Po @@ -3264,7 +3410,7 @@ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ - else \ + elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ @@ -3403,6 +3549,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +elements/alpha.log: elements/alpha$(EXEEXT) + @p='elements/alpha$(EXEEXT)'; \ + b='elements/alpha'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) elements/audioamplify.log: elements/audioamplify$(EXEEXT) @p='elements/audioamplify$(EXEEXT)'; \ b='elements/audioamplify'; \ @@ -3683,6 +3836,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +elements/matroskademux.log: elements/matroskademux$(EXEEXT) + @p='elements/matroskademux$(EXEEXT)'; \ + b='elements/matroskademux'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) elements/matroskamux.log: elements/matroskamux$(EXEEXT) @p='elements/matroskamux$(EXEEXT)'; \ b='elements/matroskamux'; \ @@ -3704,6 +3864,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +elements/splitmux.log: elements/splitmux$(EXEEXT) + @p='elements/splitmux$(EXEEXT)'; \ + b='elements/splitmux'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) elements/rganalysis.log: elements/rganalysis$(EXEEXT) @p='elements/rganalysis$(EXEEXT)'; \ b='elements/rganalysis'; \ @@ -3732,6 +3899,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +elements/rtph263.log: elements/rtph263$(EXEEXT) + @p='elements/rtph263$(EXEEXT)'; \ + b='elements/rtph263'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) elements/rtpaux.log: elements/rtpaux$(EXEEXT) @p='elements/rtpaux$(EXEEXT)'; \ b='elements/rtpaux'; \ @@ -4137,6 +4311,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \ uninstall uninstall-am +.PRECIOUS: Makefile + # keep target around, since it's referenced in the modules' Makefiles clean-local-check: @@ -4153,37 +4329,38 @@ # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ - $(TESTS_ENVIRONMENT) \ + $(AM_TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # just like 'check', but don't run it again if it fails (useful for debugging) %.check-norepeat: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ - $(TESTS_ENVIRONMENT) \ + $(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ - $(TESTS_ENVIRONMENT) \ + $(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % - @$(TESTS_ENVIRONMENT) \ + @valgrind_log=$(subst /,-,$*-valgrind.log); \ + $(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ @@ -4192,16 +4369,16 @@ --tool=memcheck --leak-check=full --trace-children=yes \ --show-possibly-lost=no \ --leak-resolution=high --num-callers=20 \ - ./$* 2>&1 | tee valgrind.log - @if grep "==" valgrind.log > /dev/null 2>&1; then \ - rm valgrind.log; \ + ./$* 2>&1 | tee $$valgrind_log ; \ + if grep "==" $$valgrind_log > /dev/null 2>&1; then \ + rm $$valgrind_log; \ exit 1; \ - fi - @rm valgrind.log + fi ; \ + rm $$valgrind_log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ @@ -4231,7 +4408,7 @@ # gdb any given test by running make test.gdb %.gdb: % - @$(TESTS_ENVIRONMENT) \ + @$(AM_TESTS_ENVIRONMENT) \ CK_FORK=no \ $(LIBTOOL) --mode=execute \ gdb $* @@ -4284,19 +4461,13 @@ # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." - @failed=0; \ + @failed=0; valgrind_targets=""; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ - $(MAKE) $$t.valgrind; \ - if test "$$?" -ne 0; then \ - echo "Valgrind error for test $$t"; \ - failed=`expr $$failed + 1`; \ - whicht="$$whicht $$t"; \ - fi; \ + valgrind_targets="$$valgrind_targets $$t.valgrind"; \ done; \ - if test "$$failed" -ne 0; then \ - echo "$$failed tests had leaks or errors under valgrind:"; \ - echo "$$whicht"; \ - false; \ + if ! $(MAKE) $$valgrind_targets ; then \ + echo "Some tests had leaks or errors under valgrind"; \ + false; \ fi # valgrind all tests until failure @@ -4341,11 +4512,14 @@ fi inspect: @echo "Inspecting features ..." - @for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ + @for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done +# build all tests +build-checks: $(TESTS) + help: @echo @echo "make check -- run all checks" @@ -4368,6 +4542,7 @@ @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" + @echo "make build-checks -- build all checks (but don't run them)" @echo @echo @echo "Additionally, you can use the GST_CHECKS environment variable to" diff -Nru gst-plugins-good1.0-1.4.3/tests/check/pipelines/simple-launch-lines.c gst-plugins-good1.0-1.6.1/tests/check/pipelines/simple-launch-lines.c --- gst-plugins-good1.0-1.4.3/tests/check/pipelines/simple-launch-lines.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/pipelines/simple-launch-lines.c 2015-10-22 08:02:54.000000000 +0000 @@ -222,6 +222,15 @@ GST_END_TEST; +static gboolean +have_elements (const gchar * element1, const gchar * element2) +{ + return gst_registry_check_feature_version (gst_registry_get (), element1, + GST_VERSION_MAJOR, GST_VERSION_MINOR, 0) && + gst_registry_check_feature_version (gst_registry_get (), element2, + GST_VERSION_MAJOR, GST_VERSION_MINOR, 0); +} + GST_START_TEST (test_video_encoders_decoders) { const gchar *s; @@ -232,21 +241,21 @@ #define ENC_DEC_PIPELINE_STRING(bufcount, enc, dec) "videotestsrc num-buffers=" bufcount " ! " enc " ! " dec " ! fakesink" #define DEFAULT_BUFCOUNT "5" - s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "jpegenc", "jpegdec"); - run_pipeline (setup_pipeline (s), s, - GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING), - GST_MESSAGE_UNKNOWN, target_state); - - s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "pngenc", "pngdec"); - run_pipeline (setup_pipeline (s), s, - GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING), - GST_MESSAGE_UNKNOWN, target_state); + if (have_elements ("jpegenc", "jpegdec")) { + s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "jpegenc", "jpegdec"); + run_pipeline (setup_pipeline (s), s, + GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING), + GST_MESSAGE_UNKNOWN, target_state); + } + if (have_elements ("pngenc", "pngdec")) { + s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "pngenc", "pngdec"); + run_pipeline (setup_pipeline (s), s, + GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING), + GST_MESSAGE_UNKNOWN, target_state); + } - if (gst_registry_check_feature_version (gst_registry_get (), "smokeenc", - GST_VERSION_MAJOR, GST_VERSION_MINOR, 0) && - gst_registry_check_feature_version (gst_registry_get (), "smokedec", - GST_VERSION_MAJOR, GST_VERSION_MINOR, 0)) { + if (have_elements ("smokeenc", "smokedec")) { s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "smokeenc", "smokedec"); run_pipeline (setup_pipeline (s), s, GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING), @@ -294,19 +303,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = simple_launch_lines_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (simple_launch_lines); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/pipelines/tagschecking.c gst-plugins-good1.0-1.6.1/tests/check/pipelines/tagschecking.c --- gst-plugins-good1.0-1.4.3/tests/check/pipelines/tagschecking.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/pipelines/tagschecking.c 2015-10-22 08:02:54.000000000 +0000 @@ -353,20 +353,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = metadata_suite (); - - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (metadata); diff -Nru gst-plugins-good1.0-1.4.3/tests/check/pipelines/wavenc.c gst-plugins-good1.0-1.6.1/tests/check/pipelines/wavenc.c --- gst-plugins-good1.0-1.4.3/tests/check/pipelines/wavenc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/pipelines/wavenc.c 2015-10-22 08:02:54.000000000 +0000 @@ -58,7 +58,7 @@ } /* - * gst-launch \ + * gst-launch-1.0 \ * audiotestsrc freq=440 num-buffers=100 ! interleave name=i ! audioconvert ! wavenc ! filesink location=/tmp/mc.wav \ * audiotestsrc freq=880 num-buffers=100 ! i. * ... diff -Nru gst-plugins-good1.0-1.4.3/tests/check/pipelines/wavpack.c gst-plugins-good1.0-1.6.1/tests/check/pipelines/wavpack.c --- gst-plugins-good1.0-1.4.3/tests/check/pipelines/wavpack.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/check/pipelines/wavpack.c 2015-10-22 08:02:54.000000000 +0000 @@ -202,18 +202,4 @@ return s; } -int -main (int argc, char **argv) -{ - int nf; - Suite *s = wavpack_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (wavpack); diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/audiofx/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/audiofx/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/audiofx/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/audiofx/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,8 +92,6 @@ noinst_PROGRAMS = firfilter-example$(EXEEXT) \ iirfilter-example$(EXEEXT) subdir = tests/examples/audiofx -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 \ @@ -105,7 +113,6 @@ $(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 \ @@ -120,6 +127,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -208,6 +216,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -342,9 +351,6 @@ 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@ @@ -462,17 +468,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -525,6 +531,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -557,7 +564,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/audiofx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/audiofx/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -863,6 +869,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/cairo/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/cairo/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/cairo/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/cairo/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ target_triplet = @target@ noinst_PROGRAMS = cairo_overlay$(EXEEXT) subdir = tests/examples/cairo -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -196,6 +204,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -328,9 +337,6 @@ 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@ @@ -448,17 +454,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -511,6 +517,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -542,7 +549,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/cairo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/cairo/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -829,6 +835,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/equalizer/demo.c gst-plugins-good1.0-1.6.1/tests/examples/equalizer/demo.c --- gst-plugins-good1.0-1.4.3/tests/examples/equalizer/demo.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/equalizer/demo.c 2015-10-22 08:02:54.000000000 +0000 @@ -1,3 +1,22 @@ +/* GStreamer + * Copyright (C) 2007 Sebastian Dröge + * + * 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. + */ + #include #include #include @@ -100,6 +119,15 @@ gdk_window_end_paint (gtk_widget_get_window (drawingarea)); } +static void +dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer user_data) +{ + GstPad *target = GST_PAD (user_data); + + gst_pad_link (newpad, target); + gst_object_unref (target); +} + /* receive spectral data from element message */ static gboolean message_handler (GstBus * bus, GstMessage * message, gpointer data) @@ -130,22 +158,48 @@ main (int argc, char *argv[]) { GstElement *bin; - GstElement *src, *capsfilter, *equalizer, *spectrum, *audioconvert, *sink; + GstElement *decodebin, *decconvert; + GstElement *capsfilter, *equalizer, *spectrum, *sinkconvert, *sink; GstCaps *caps; GstBus *bus; - GtkWidget *appwindow, *vbox, *hbox, *widget; - int i; + GtkWidget *appwindow, *vbox, *hbox, *scale; + int i, num_bands = NBANDS; + + GOptionEntry options[] = { + {"bands", 'b', 0, G_OPTION_ARG_INT, &num_bands, + "Number of bands", NULL}, + {NULL} + }; + GOptionContext *ctx; + GError *err = NULL; + + ctx = g_option_context_new ("- demo of audio equalizer"); + g_option_context_add_main_entries (ctx, options, NULL); + g_option_context_add_group (ctx, gst_init_get_option_group ()); + g_option_context_add_group (ctx, gtk_get_option_group (TRUE)); + + if (!g_option_context_parse (ctx, &argc, &argv, &err)) { + g_print ("Error initializing: %s\n", err->message); + exit (1); + } + + if (argc < 2) { + g_print ("Usage: %s \n", argv[0]); + g_print (" For optional arguments: --help\n"); + exit (-1); + } gst_init (&argc, &argv); gtk_init (&argc, &argv); bin = gst_pipeline_new ("bin"); - /* White noise */ - src = gst_element_factory_make ("audiotestsrc", "src"); - g_object_set (G_OBJECT (src), "wave", 5, "volume", 0.8, NULL); + /* Uri decoding */ + decodebin = gst_element_factory_make ("uridecodebin", "decoder"); + g_object_set (G_OBJECT (decodebin), "uri", argv[1], NULL); /* Force float32 samples */ + decconvert = gst_element_factory_make ("audioconvert", "decconvert"); capsfilter = gst_element_factory_make ("capsfilter", "capsfilter"); caps = gst_caps_new_simple ("audio/x-raw", "format", G_TYPE_STRING, "F32LE", @@ -153,29 +207,35 @@ g_object_set (capsfilter, "caps", caps, NULL); equalizer = gst_element_factory_make ("equalizer-nbands", "equalizer"); - g_object_set (G_OBJECT (equalizer), "num-bands", NBANDS, NULL); + g_object_set (G_OBJECT (equalizer), "num-bands", num_bands, NULL); spectrum = gst_element_factory_make ("spectrum", "spectrum"); g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80, - "message", TRUE, "interval", 500 * GST_MSECOND, NULL); + "post-messages", TRUE, "interval", 500 * GST_MSECOND, NULL); - audioconvert = gst_element_factory_make ("audioconvert", "audioconvert"); + sinkconvert = gst_element_factory_make ("audioconvert", "sinkconvert"); sink = gst_element_factory_make ("autoaudiosink", "sink"); - gst_bin_add_many (GST_BIN (bin), src, capsfilter, equalizer, spectrum, - audioconvert, sink, NULL); - if (!gst_element_link_many (src, capsfilter, equalizer, spectrum, - audioconvert, sink, NULL)) { + gst_bin_add_many (GST_BIN (bin), decodebin, decconvert, capsfilter, equalizer, + spectrum, sinkconvert, sink, NULL); + if (!gst_element_link_many (decconvert, capsfilter, equalizer, spectrum, + sinkconvert, sink, NULL)) { fprintf (stderr, "can't link elements\n"); exit (1); } + /* Handle dynamic pads */ + g_signal_connect (G_OBJECT (decodebin), "pad-added", + G_CALLBACK (dynamic_link), gst_element_get_static_pad (decconvert, + "sink")); + bus = gst_element_get_bus (bin); gst_bus_add_watch (bus, message_handler, NULL); gst_object_unref (bus); appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (appwindow), "Equalizer Demo"); g_signal_connect (G_OBJECT (appwindow), "destroy", G_CALLBACK (on_window_destroy), NULL); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); @@ -188,7 +248,7 @@ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20); - for (i = 0; i < NBANDS; i++) { + for (i = 0; i < num_bands; i++) { GObject *band; gdouble freq; gdouble bw; @@ -208,35 +268,38 @@ scales_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); - widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + /* Create gain scale */ + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, -24.0, 12.0, 0.5); - gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); - gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); - gtk_range_set_value (GTK_RANGE (widget), gain); - gtk_widget_set_size_request (widget, 25, 150); - g_signal_connect (G_OBJECT (widget), "value-changed", + gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE); + gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); + gtk_range_set_value (GTK_RANGE (scale), gain); + gtk_widget_set_size_request (scale, 35, 150); + g_signal_connect (G_OBJECT (scale), "value-changed", G_CALLBACK (on_gain_changed), (gpointer) band); - gtk_box_pack_start (GTK_BOX (scales_hbox), widget, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (scales_hbox), scale, FALSE, FALSE, 0); - widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + /* Create bandwidth scale */ + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, 0.0, 20000.0, 5.0); - gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); - gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); - gtk_range_set_value (GTK_RANGE (widget), bw); - gtk_widget_set_size_request (widget, 25, 150); - g_signal_connect (G_OBJECT (widget), "value-changed", + gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE); + gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); + gtk_range_set_value (GTK_RANGE (scale), bw); + gtk_widget_set_size_request (scale, 45, 150); + g_signal_connect (G_OBJECT (scale), "value-changed", G_CALLBACK (on_bandwidth_changed), (gpointer) band); - gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (scales_hbox), scale, TRUE, TRUE, 0); - widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + /* Create frequency scale */ + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, 20.0, 20000.0, 5.0); - gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); - gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); - gtk_range_set_value (GTK_RANGE (widget), freq); - gtk_widget_set_size_request (widget, 25, 150); - g_signal_connect (G_OBJECT (widget), "value-changed", + gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE); + gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); + gtk_range_set_value (GTK_RANGE (scale), freq); + gtk_widget_set_size_request (scale, 45, 150); + g_signal_connect (G_OBJECT (scale), "value-changed", G_CALLBACK (on_freq_changed), (gpointer) band); - gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (scales_hbox), scale, TRUE, TRUE, 0); gtk_container_add (GTK_CONTAINER (frame), scales_hbox); diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/equalizer/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/equalizer/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/equalizer/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/equalizer/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ target_triplet = @target@ @HAVE_GTK_TRUE@noinst_PROGRAMS = demo$(EXEEXT) subdir = tests/examples/equalizer -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -196,6 +204,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -328,9 +337,6 @@ 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@ @@ -448,17 +454,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -511,6 +517,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -542,7 +549,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/equalizer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/equalizer/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -829,6 +835,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/jack/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/jack/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/jack/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/jack/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ target_triplet = @target@ noinst_PROGRAMS = $(am__EXEEXT_1) subdir = tests/examples/jack -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -195,6 +203,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -327,9 +336,6 @@ 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@ @@ -447,17 +453,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -510,6 +516,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -543,7 +550,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/jack/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/jack/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -830,6 +836,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/level/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/level/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/level/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/level/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ target_triplet = @target@ noinst_PROGRAMS = level-example$(EXEEXT) subdir = tests/examples/level -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -196,6 +204,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -328,9 +337,6 @@ 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@ @@ -448,17 +454,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -511,6 +517,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -541,7 +548,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/level/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/level/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -828,6 +834,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -19,7 +19,17 @@ # descending into all subdirectories a second time, but only after the first # (parallel) run has finished, so it should go right through the second time. VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,8 +93,6 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am subdir = tests/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ @@ -107,7 +115,6 @@ $(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 \ @@ -122,6 +129,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -180,6 +188,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/common/parallel-subdirs.mak DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -337,9 +347,6 @@ 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@ @@ -457,17 +464,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -520,6 +527,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -557,7 +565,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -566,7 +573,7 @@ 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/parallel-subdirs.mak: +$(top_srcdir)/common/parallel-subdirs.mak $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -853,6 +860,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + .PHONY: independent-subdirs $(SUBDIRS) diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/pulse/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/pulse/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/pulse/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/pulse/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ target_triplet = @target@ noinst_PROGRAMS = pulse$(EXEEXT) subdir = tests/examples/pulse -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -196,6 +204,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -328,9 +337,6 @@ 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@ @@ -448,17 +454,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -511,6 +517,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -541,7 +548,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/pulse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/pulse/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -828,6 +834,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/client-PCMA.c gst-plugins-good1.0-1.6.1/tests/examples/rtp/client-PCMA.c --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/client-PCMA.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/client-PCMA.c 2015-10-22 08:02:54.000000000 +0000 @@ -116,9 +116,9 @@ /* build a pipeline equivalent to: * - * gst-launch -v rtpbin name=rtpbin \ + * gst-launch-1.0 -v rtpbin name=rtpbin \ * udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_0 \ - * rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! alsasink \ + * rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! autoaudiosink \ * udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0 \ * rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=$DEST sync=false async=false */ diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/client-rtpaux.c gst-plugins-good1.0-1.6.1/tests/examples/rtp/client-rtpaux.c --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/client-rtpaux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/client-rtpaux.c 2015-10-22 08:02:54.000000000 +0000 @@ -18,6 +18,7 @@ * Boston, MA 02110-1301, USA. */ #include +#include #include /* @@ -352,7 +353,8 @@ rtpBin = gst_element_factory_make ("rtpbin", NULL); gst_bin_add (GST_BIN (pipe), rtpBin); - g_object_set (rtpBin, "latency", 200, "do-retransmission", TRUE, NULL); + g_object_set (rtpBin, "latency", 200, "do-retransmission", TRUE, + "rtp-profile", GST_RTP_PROFILE_AVPF, NULL); videoSession = make_video_session (0); audioSession = make_audio_session (1); diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/client-VP8-OPUS.sh gst-plugins-good1.0-1.6.1/tests/examples/rtp/client-VP8-OPUS.sh --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/client-VP8-OPUS.sh 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/client-VP8-OPUS.sh 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,28 @@ +#!/bin/sh +# +# A simple RTP receiver +# + +VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)VP8" +AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)OPUS" + +SRC=localhost +DEST=localhost + +VIDEO_DEC="rtpvp8depay ! vp8dec" +AUDIO_DEC="rtpopusdepay ! opusdec" + +VIDEO_SINK="videoconvert ! autovideosink" +AUDIO_SINK="audioconvert ! audioresample ! autoaudiosink" + +LATENCY=100 + +gst-launch-1.0 -v rtpbin name=rtpbin latency=$LATENCY \ + udpsrc caps=$VIDEO_CAPS address=$SRC port=5000 ! rtpbin.recv_rtp_sink_0 \ + rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \ + udpsrc address=$SRC port=5001 ! rtpbin.recv_rtcp_sink_0 \ + rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5005 sync=false async=false \ + udpsrc caps=$AUDIO_CAPS address=$SRC port=5002 ! rtpbin.recv_rtp_sink_1 \ + rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \ + udpsrc address=$SRC port=5003 ! rtpbin.recv_rtcp_sink_1 \ + rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5007 sync=false async=false diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/Makefile.am gst-plugins-good1.0-1.6.1/tests/examples/rtp/Makefile.am --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -5,11 +5,11 @@ ERROR_CFLAGS= server_rtpaux_SOURCES = server-rtpaux.c -server_rtpaux_CFLAGS = $(GST_CFLAGS) +server_rtpaux_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) server_rtpaux_LDADD = $(GST_LIBS) client_rtpaux_SOURCES = client-rtpaux.c -client_rtpaux_CFLAGS = $(GST_CFLAGS) +client_rtpaux_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) client_rtpaux_LDADD = $(GST_LIBS) server_alsasrc_PCMA_SOURCES = server-alsasrc-PCMA.c @@ -23,11 +23,13 @@ noinst_SCRIPTS=client-H263p-AMR.sh \ client-H263p-PCMA.sh \ client-H264-PCMA.sh \ + client-VP8-OPUS.sh \ client-PCMA.sh \ server-alsasrc-PCMA.sh \ server-v4l2-H263p-alsasrc-AMR.sh \ server-v4l2-H264-alsasrc-PCMA.sh \ - server-VTS-H263p-ATS-PCMA.sh + server-VTS-H263p-ATS-PCMA.sh \ + server-VTS-VP8-ATS-OPUS.sh EXTRA_DIST= $(noinst_SCRIPTS) \ client-H263p-PCMA.sdp \ diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/rtp/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,8 +93,6 @@ noinst_PROGRAMS = server-alsasrc-PCMA$(EXEEXT) client-PCMA$(EXEEXT) \ client-rtpaux$(EXEEXT) server-rtpaux$(EXEEXT) subdir = tests/examples/rtp -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 \ @@ -106,7 +114,6 @@ $(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 \ @@ -121,6 +128,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -221,6 +229,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -355,9 +364,6 @@ 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@ @@ -475,17 +481,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -538,6 +544,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -551,10 +558,10 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ server_rtpaux_SOURCES = server-rtpaux.c -server_rtpaux_CFLAGS = $(GST_CFLAGS) +server_rtpaux_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) server_rtpaux_LDADD = $(GST_LIBS) client_rtpaux_SOURCES = client-rtpaux.c -client_rtpaux_CFLAGS = $(GST_CFLAGS) +client_rtpaux_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) client_rtpaux_LDADD = $(GST_LIBS) server_alsasrc_PCMA_SOURCES = server-alsasrc-PCMA.c server_alsasrc_PCMA_CFLAGS = $(GST_CFLAGS) @@ -565,11 +572,13 @@ noinst_SCRIPTS = client-H263p-AMR.sh \ client-H263p-PCMA.sh \ client-H264-PCMA.sh \ + client-VP8-OPUS.sh \ client-PCMA.sh \ server-alsasrc-PCMA.sh \ server-v4l2-H263p-alsasrc-AMR.sh \ server-v4l2-H264-alsasrc-PCMA.sh \ - server-VTS-H263p-ATS-PCMA.sh + server-VTS-H263p-ATS-PCMA.sh \ + server-VTS-VP8-ATS-OPUS.sh EXTRA_DIST = $(noinst_SCRIPTS) \ client-H263p-PCMA.sdp \ @@ -591,7 +600,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/rtp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/rtp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -935,6 +943,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/server-alsasrc-PCMA.c gst-plugins-good1.0-1.6.1/tests/examples/rtp/server-alsasrc-PCMA.c --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/server-alsasrc-PCMA.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/server-alsasrc-PCMA.c 2015-10-22 08:02:54.000000000 +0000 @@ -108,7 +108,7 @@ /* build a pipeline equivalent to: * - * gst-launch -v rtpbin name=rtpbin \ + * gst-launch-1.0 -v rtpbin name=rtpbin \ * $AUDIO_SRC ! audioconvert ! audioresample ! $AUDIO_ENC ! $AUDIO_PAY ! rtpbin.send_rtp_sink_0 \ * rtpbin.send_rtp_src_0 ! udpsink port=5002 host=$DEST \ * rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$DEST sync=false async=false \ diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/server-rtpaux.c gst-plugins-good1.0-1.6.1/tests/examples/rtp/server-rtpaux.c --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/server-rtpaux.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/server-rtpaux.c 2015-10-22 08:02:54.000000000 +0000 @@ -18,6 +18,7 @@ * Boston, MA 02110-1301, USA. */ #include +#include /* * An RTP server @@ -272,6 +273,7 @@ gst_object_unref (bus); rtpBin = gst_element_factory_make ("rtpbin", NULL); + g_object_set (rtpBin, "rtp-profile", GST_RTP_PROFILE_AVPF, NULL); gst_bin_add (GST_BIN (pipe), rtpBin); diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/rtp/server-VTS-VP8-ATS-OPUS.sh gst-plugins-good1.0-1.6.1/tests/examples/rtp/server-VTS-VP8-ATS-OPUS.sh --- gst-plugins-good1.0-1.4.3/tests/examples/rtp/server-VTS-VP8-ATS-OPUS.sh 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/rtp/server-VTS-VP8-ATS-OPUS.sh 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh +# +# A simple RTP server +# + +SRC=localhost +DEST=localhost +VCAPS="video/x-raw,width=352,height=288,framerate=15/1" + +gst-launch-1.0 -v rtpbin name=rtpbin \ + videotestsrc ! $VCAPS ! vp8enc ! rtpvp8pay ! rtpbin.send_rtp_sink_0 \ + rtpbin.send_rtp_src_0 ! udpsink host=$DEST port=5000 \ + rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5001 sync=false async=false \ + udpsrc address=$SRC port=5005 ! rtpbin.recv_rtcp_sink_0 \ + audiotestsrc ! opusenc ! rtpopuspay ! rtpbin.send_rtp_sink_1 \ + rtpbin.send_rtp_src_1 ! udpsink host=$DEST port=5002 \ + rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5003 sync=false async=false \ + udpsrc address=$SRC port=5007 ! rtpbin.recv_rtcp_sink_1 diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/shapewipe/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/shapewipe/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/shapewipe/Makefile.in 2014-09-24 07:26:03.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/shapewipe/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,8 +92,6 @@ target_triplet = @target@ noinst_PROGRAMS = shapewipe-example$(EXEEXT) subdir = tests/examples/shapewipe -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 \ @@ -105,7 +113,6 @@ $(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 \ @@ -120,6 +127,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -200,6 +209,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -332,9 +342,6 @@ 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@ @@ -452,17 +459,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -515,6 +522,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -547,7 +555,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/shapewipe/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/shapewipe/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -834,6 +841,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/shapewipe/shapewipe-example.c gst-plugins-good1.0-1.6.1/tests/examples/shapewipe/shapewipe-example.c --- gst-plugins-good1.0-1.4.3/tests/examples/shapewipe/shapewipe-example.c 2014-08-11 06:47:34.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/shapewipe/shapewipe-example.c 2015-10-22 08:02:54.000000000 +0000 @@ -83,7 +83,7 @@ pipeline_string = g_strdup_printf - ("videotestsrc ! video/x-raw,format=(string)AYUV,width=640,height=480 ! shapewipe name=shape border=%f ! videomixer name=mixer ! videoconvert ! autovideosink filesrc location=%s ! typefind ! decodebin2 ! videoconvert ! videoscale ! queue ! shape.mask_sink videotestsrc pattern=snow ! video/x-raw,format=(string)AYUV,width=640,height=480 ! queue ! mixer.", + ("videotestsrc ! video/x-raw,format=(string)AYUV,width=640,height=480 ! shapewipe name=shape border=%f ! videomixer name=mixer ! videoconvert ! autovideosink filesrc location=%s ! typefind ! decodebin ! videoconvert ! videoscale ! queue ! shape.mask_sink videotestsrc pattern=snow ! video/x-raw,format=(string)AYUV,width=640,height=480 ! queue ! mixer.", border, argv[1]); pipeline = gst_parse_launch (pipeline_string, NULL); diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/spectrum/demo-audiotest.c gst-plugins-good1.0-1.6.1/tests/examples/spectrum/demo-audiotest.c --- gst-plugins-good1.0-1.4.3/tests/examples/spectrum/demo-audiotest.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/spectrum/demo-audiotest.c 2015-10-22 08:02:54.000000000 +0000 @@ -218,7 +218,7 @@ spectrum = gst_element_factory_make ("spectrum", "spectrum"); g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80, - "message", TRUE, NULL); + "post-messages", TRUE, NULL); audioconvert = gst_element_factory_make ("audioconvert", "audioconvert"); diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/spectrum/demo-osssrc.c gst-plugins-good1.0-1.6.1/tests/examples/spectrum/demo-osssrc.c --- gst-plugins-good1.0-1.4.3/tests/examples/spectrum/demo-osssrc.c 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/spectrum/demo-osssrc.c 2015-10-22 08:02:54.000000000 +0000 @@ -170,7 +170,7 @@ spectrum = gst_element_factory_make ("spectrum", "spectrum"); g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80, - "message", TRUE, NULL); + "post-messages", TRUE, NULL); sink = gst_element_factory_make ("fakesink", "sink"); diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/spectrum/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/spectrum/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/spectrum/Makefile.in 2014-09-24 07:26:04.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/spectrum/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,8 +93,6 @@ @HAVE_GTK_TRUE@ demo-audiotest$(EXEEXT) \ @HAVE_GTK_TRUE@ spectrum-example$(EXEEXT) subdir = tests/examples/spectrum -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 \ @@ -106,7 +114,6 @@ $(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 \ @@ -121,6 +128,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -218,6 +226,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -350,9 +359,6 @@ 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@ @@ -470,17 +476,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -533,6 +539,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -574,7 +581,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/spectrum/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/spectrum/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -899,6 +905,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/examples/v4l2/Makefile.in gst-plugins-good1.0-1.6.1/tests/examples/v4l2/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/examples/v4l2/Makefile.in 2014-09-24 07:26:04.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/examples/v4l2/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ target_triplet = @target@ noinst_PROGRAMS = camctrl$(EXEEXT) subdir = tests/examples/v4l2 -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 \ @@ -104,7 +112,6 @@ $(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 \ @@ -119,6 +126,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -196,6 +204,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -328,9 +337,6 @@ 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@ @@ -448,17 +454,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -511,6 +517,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -542,7 +549,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/v4l2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/examples/v4l2/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -829,6 +835,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/files/Makefile.am gst-plugins-good1.0-1.6.1/tests/files/Makefile.am --- gst-plugins-good1.0-1.4.3/tests/files/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/files/Makefile.am 2015-10-27 15:17:37.000000000 +0000 @@ -10,5 +10,7 @@ pcm16sine.flv \ pinknoise-vorbis.mkv \ test-cert.pem \ - test-key.pem + test-key.pem \ + splitvideo00.ogg splitvideo01.ogg \ + splitvideo02.ogg diff -Nru gst-plugins-good1.0-1.4.3/tests/files/Makefile.in gst-plugins-good1.0-1.6.1/tests/files/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/files/Makefile.in 2014-09-24 07:26:04.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/files/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,7 +89,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = tests/files -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am 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 \ @@ -101,7 +110,6 @@ $(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 \ @@ -116,6 +124,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -140,6 +149,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -272,9 +282,6 @@ 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@ @@ -392,17 +399,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -455,6 +462,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -478,7 +486,9 @@ pcm16sine.flv \ pinknoise-vorbis.mkv \ test-cert.pem \ - test-key.pem + test-key.pem \ + splitvideo00.ogg splitvideo01.ogg \ + splitvideo02.ogg all: all-am @@ -495,7 +505,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/files/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/files/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -670,6 +679,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/tests/files/splitvideo00.ogg and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/tests/files/splitvideo00.ogg differ Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/tests/files/splitvideo01.ogg and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/tests/files/splitvideo01.ogg differ Binary files /tmp/tmpn9J_Cq/E2WccdGWlS/gst-plugins-good1.0-1.4.3/tests/files/splitvideo02.ogg and /tmp/tmpn9J_Cq/EKB58VmVlu/gst-plugins-good1.0-1.6.1/tests/files/splitvideo02.ogg differ diff -Nru gst-plugins-good1.0-1.4.3/tests/files/test-cert.pem gst-plugins-good1.0-1.6.1/tests/files/test-cert.pem --- gst-plugins-good1.0-1.4.3/tests/files/test-cert.pem 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/files/test-cert.pem 2015-10-22 08:02:54.000000000 +0000 @@ -1,22 +1,17 @@ -----BEGIN CERTIFICATE----- -MIIDjzCCAvigAwIBAgIBADANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCVVMx -FjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNVBAcTBkJvc3RvbjEPMA0GA1UE -ChMGWGltaWFuMRUwEwYDVQQLEwxTb3VwIEtpdGNoZW4xEjAQBgNVBAMTCWxvY2Fs -aG9zdDEeMBwGCSqGSIb3DQEJARYPc291cEB4aW1pYW4uY29tMB4XDTAzMDkyMzE4 -Mzc0MVoXDTEzMDkyMzE4Mzc0MVowgZIxCzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1N -YXNzYWNodXNldHRzMQ8wDQYDVQQHEwZCb3N0b24xDzANBgNVBAoTBlhpbWlhbjEV -MBMGA1UECxMMU291cCBLaXRjaGVuMRIwEAYDVQQDEwlsb2NhbGhvc3QxHjAcBgkq -hkiG9w0BCQEWD3NvdXBAeGltaWFuLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw -gYkCgYEAwzT/WxfdXqb2hbyjQav3FtN7tLxj3UbZKCKDYlizBsNLxb9exfebhV4h -CoAcaSNvLUnk3tAXnk+BDsIC1V4SbwqHYR17PnO3YZ8fkNwh5RGZwNx+zafdfFyu -+3Sh+mE03bljpDlTsgPL8CiFCd68MPRnuHoKt5iTpSyLC6Df0qcCAwEAAaOB8jCB -7zAdBgNVHQ4EFgQU9A9omrgBK5Kkl6FRxrgJU2voj4Uwgb8GA1UdIwSBtzCBtIAU -9A9omrgBK5Kkl6FRxrgJU2voj4WhgZikgZUwgZIxCzAJBgNVBAYTAlVTMRYwFAYD -VQQIEw1NYXNzYWNodXNldHRzMQ8wDQYDVQQHEwZCb3N0b24xDzANBgNVBAoTBlhp -bWlhbjEVMBMGA1UECxMMU291cCBLaXRjaGVuMRIwEAYDVQQDEwlsb2NhbGhvc3Qx -HjAcBgkqhkiG9w0BCQEWD3NvdXBAeGltaWFuLmNvbYIBADAMBgNVHRMEBTADAQH/ -MA0GCSqGSIb3DQEBBAUAA4GBAGCV56N7bEDNdE76T8i68gS00NIVVosVQjS39Ojd -ED+rvq0YYvuc2UXlzAonuCJfwFc73g4wSIjS0xijF5rnugZ+aay0LNv2y+Rf34CQ -RNswrwurFjlxgTOO+Wx2IM64mAnBfj43M8uKEZFqAiGKrZZ0xIqyUMlku0FgXDH2 -Jvpg +MIICpDCCAYwCCQC8Suc8hjfgujANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDDAkx +MjcuMC4wLjEwHhcNMTEwOTE5MTkyMjA1WhcNMjEwOTE2MTkyMjA1WjAUMRIwEAYD +VQQDDAkxMjcuMC4wLjEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCr +OH7kblu+5zkYTk/ZG21OgbIyltxhLDHPmUpl4yDUFqX5BEtoVfg0Ms4ZuaoeDi4t +b2LV6Em3UDQwmwPMm2SakfJvRd3nfL6G3UkkBsVqT3V04M9u8fk6YgHPT8PN1Lj7 +5bv9AMRyQRV1QIPondMhbt8JhlmCR6ALbxYtsXkbQF7qzbj7Y2cjvoHzPQSk0QpB +rEUpj6Schm1NkPen48Z1X1faGL0F3roFHEsf6U1AjP5A4A/UGQsRtq35VzVnKgxW +N7jumUevEMIvyqLjmvK864AHMIRVCOls9GcIta80bViuVqgtuGgVGM/7SoZfIvPF +A10jIe7KQoXWAwRi4WclAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAJfihY634dRr +DeEA4SQ1e0/kB6EF8oeaC+5EuGOJxtoX+yXJfWJsEtmjRwobyOBVV997hdOtdZjo +mdJOCKerOFKccO9PLNJZ+/l4+NHv9OwOcu4UqvrSsps/pmr/22SIyQswbLLJfPAT +KjGTDLlj//zrLxzUGsu7lgGsY4s4fVbftFZv7P5AyErpwiFk8qM1BP0NMkn4XWSA +uSyTeB6O+tWYdh3bA1BeKC2P85sl6xFJI2gxvNTxtdcg9beDqNuEheJ+mEtD3P4w +HDG1vFaAX0MH1RJSDO/dIoJerN6LTjiTYYYg8yV0lmBxijv25Z/3Gi33OuG9jkdR +vXDwJpC+/ko= -----END CERTIFICATE----- diff -Nru gst-plugins-good1.0-1.4.3/tests/files/test-key.pem gst-plugins-good1.0-1.6.1/tests/files/test-key.pem --- gst-plugins-good1.0-1.4.3/tests/files/test-key.pem 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/files/test-key.pem 2015-10-22 08:02:54.000000000 +0000 @@ -1,15 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQDDNP9bF91epvaFvKNBq/cW03u0vGPdRtkoIoNiWLMGw0vFv17F -95uFXiEKgBxpI28tSeTe0BeeT4EOwgLVXhJvCodhHXs+c7dhnx+Q3CHlEZnA3H7N -p918XK77dKH6YTTduWOkOVOyA8vwKIUJ3rww9Ge4egq3mJOlLIsLoN/SpwIDAQAB -AoGAOGAi6zzuKrrPcXo0L/ApEQeMr3rE4I/ogUXOaeWx9l8KkBafmU7UNGUl57Fu -AxM/tXWkypCQcaEGZau0Q8jCS5wKgynNi72F4OzBqgjgW4vvtrjfC1LagnCd2ZMX -V5XVECjO/sEDg0hJeOsXlKbECAgvHMU3dSCGO7DmuG9tIxkCQQDsth1VvVjOdfp6 -klOfYzbAM1p9HIcNPJMeuBFqq//UHX4aPqh/6G6W06TOTN+bjZBmitG9yjV958t2 -rPxl64f7AkEA0x0WOLm5S0LNsv7zwjXuTcj+NCHL36b3dK90oxX8Gq69PANL/EJY -ItpHNLgzzo4DRmQy8q0WZlC9HYk1YljERQJAEN7+AkFnlfeErb3GJgMNQO+oEGi7 -G29o0PSvkRnHNxgPB9HVcqBfWXKmOWnzOgQB+b0FK/DAlUOzFbdImf8KhwJAFLty -hzeV/tIcqUtoXNY3BOSMMkpvXxNikc75QVrTWzt10gLw32EUjreo7oB4dfx0TeFh -L3vYC0w6hkAHQhU9kQJAPSEQ+Bqzlk6BrQNrNFEVzi1Rwpz7LOzhOjuYW6bsiAdX -axA4r6Xh25x08ZU7cqX7gwVLHL6pgrEKuUs0Nc5Klg== +MIIEowIBAAKCAQEAqzh+5G5bvuc5GE5P2RttToGyMpbcYSwxz5lKZeMg1Bal+QRL +aFX4NDLOGbmqHg4uLW9i1ehJt1A0MJsDzJtkmpHyb0Xd53y+ht1JJAbFak91dODP +bvH5OmIBz0/DzdS4++W7/QDEckEVdUCD6J3TIW7fCYZZgkegC28WLbF5G0Be6s24 ++2NnI76B8z0EpNEKQaxFKY+knIZtTZD3p+PGdV9X2hi9Bd66BRxLH+lNQIz+QOAP +1BkLEbat+Vc1ZyoMVje47plHrxDCL8qi45ryvOuABzCEVQjpbPRnCLWvNG1Yrlao +LbhoFRjP+0qGXyLzxQNdIyHuykKF1gMEYuFnJQIDAQABAoIBABh+MXC99LPfYcR/ +V17IVJ+ZYANqn0XrS4jV9dWTYxvTzZRMr/jR63qUFfWKILLB9osbVvkgjIMDnyOg +2S9Iv2B5JkQSq4a0ypCCUTctHMpzaWr5ydKmHK/kWzvrvifQmVG3cGfl1zQ86TPn +sbbx9MTglllHdcB0PInGL1cD/z4NgEbRr1B6aBcq0AHqJJIIHvQNPmH6HGASg48j +hVAZ2sYjp9DSK97HKSABpBCsRN8XrMgYOAsu5a1rtXhjtMUZo6LpEwEwH94rDOgv +ZvJLGrpSvKKWPGcyANyK1a5nzO8INcXY+X54a8VB1YAjymzDy/WM1OX/jBfZem53 +HwC7m5UCgYEA3crcBI9f3aDgCYEUDWZ8hTQUVhvN3pi8QWr7QubMJmIyxBj394wm +hTo8woYxNqy9VkO0X+jxHA0rzN1KvS9j2CAzJ+tYNhEsRc6onjEXKGLhO/1gHbkT +rRx2J1uA2HQTbZNGhws9Qdl3A7syw6fFw9T/5rooWbiv5SDqSCRFzlcCgYEAxaDj +JYyLLl+Jbsltkv71th5TvLi14q6KlZJGEUeSsymUx9evBS7s/h62Boe9/7Y63Zkl +dR3IvxX7HNqW/fGjuQr9jQvMMduil8L218lChuR/4HEsXrSvyw8MIMlDtjTWajB6 +c8eiU+z/5zrlhzooKk2LaQHTUrrbxk9rN0raEOMCgYEA2Klz1wyMVL/0O7SZdyG3 +4JPojdmpeZrwxGMSwt8dbR2ehAv0KCID+z/R3SEj8Eo8x4lqKgsvhfyj3gQLH9as +jZOfBY8U4/RQsHzaIXbJLY2yg1zYSRDkVMap8Xak3k4+MFufmQp0s+ARMFbtl05M +lip8NdOC2WregVFvLDwq6Q8CgYBy3gyoqoPLNGRhLFqv8dlHPWFWc9XkJ6cNQLPR +H1S5JhYAAfEMhjXhjmAmc4ePtY+JdZY7+E/SISiPoM3aVDThPO4aqRzKbeqXYw6u +ZaBxXyakgaNUeJkk4V4fQFxG73cgyYSi/wnu1fX3pFf8vWTTEbdSFWmK0GklXsvm +m28cGQKBgGvG//W8NGfXWL/komyKXw8GJ41Ip0sa20KNkNZwAaA1BVTaHIYT+rxo +SgVQPHmzP8J9p4U0d9lQ5BW0LWERVkFHOg8k0evDsSm3FVbeRCBjlKqVUOLoo4Hk +A+fSYWWWl1j9E9urpiT/d4AQY1bFUxcUebDSK9XT6ZPOusyX0fSe -----END RSA PRIVATE KEY----- diff -Nru gst-plugins-good1.0-1.4.3/tests/icles/gdkpixbufoverlay-test.c gst-plugins-good1.0-1.6.1/tests/icles/gdkpixbufoverlay-test.c --- gst-plugins-good1.0-1.4.3/tests/icles/gdkpixbufoverlay-test.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/icles/gdkpixbufoverlay-test.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,276 @@ +/* GStreamer gdkpixbufoverlay test app + * Copyright (C) 2014 Tim-Philipp Müller + + * 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 +#include +#include +#include + +#include + +#define VIDEO_WIDTH 720 +#define VIDEO_HEIGHT 480 +#define VIDEO_FPS 50 + +/* GdkPixbuf RGBA C-Source image dump from gdk-pixbuf-csource --raw, + * gzipped and then base64 encoded */ +const gchar gzipped_pixdata_base64[] = + "H4sICPX/Z1QAA2xvZ28ucGl4AO2dsZHrNhCG+ewK2II64ClyrhmnTtSBh4kLUOLQAUuwEhSgFtiA" + "A7agwA2wBT5AXJ5w4P5LgKLEO97ezDf2SCAIAftjFwuQ7/c///ojy/77+8eP7Jcs+/WfLMv+t/zW" + "dV32pSmK3HK6sXZbFOXV9PZfWipLbWksHdHQZxVpZP+Ee7u62/d7rt0fivIqimJnOX+w/zhauq68" + "aWjevfdUR1h3vXq/KMqzufueFN1J1FE+stf8KfCzobZ3q/ePojyT3v8gDSyB09GFND7g/N014rpl" + "41xF+Wz0/i817nwFjepP+Rb0PnDwOUOehePyQq1eurlrSkXZOkVx7OblbGK43upf+zcqyldhOT22" + "5GvV9ynKXIriQDpKye242Ldcve2KskX6deaRWVeebnpdu32Koryc4t/iaKksmm9Vvg3W3neWk+Vs" + "qS2tpSOu9NmZtLG4f7R15paS7jXct1q7XxTl2ZDd157dp1A/6q9I+1Wg+QH1g8pmcb7M0szUHseV" + "/KTTtJg39XyudH/NASmbhfzOUtqTNHmhew1cglhT9ad8O16kv7m4eFT3/pVNQ77IX8shLgW/RnsW" + "Li7V5y4UJaDo9wnOT9Sjq1fzn4oSQXHft4tZ00Vpr5jI3yiKwmO1sy/63GZKzNpS+dVyLsaYneVk" + "Ud+rbIqi32M/kC7DtaXzn6vt9Vm95ZbS0lg64rx2nynKdyHQ3oC+A06ZxdtbkztWundpqS1fKo5j" + "9OfQ8+jKJNbW987eye47QGO5WE6u/BPakJP2rt4927X7JhanNaBBzQUpEMbmU2hJk66O2ftt7lrS" + "f8vc4yl+0P7llspyWapOl3th9Hdde4yVz4m17eMD2pP8ZBXjI0l3J7oG1Rf1DlH7dyBOpKuB2+dB" + "2ZzKXS3ugw9+lnKZB49oH2bL1owGH9K4vX5P7Yg+0+O1/Uj/XSRm8ep9Ws6LclrRfe+N1+xYIxjz" + "49Jrh6D+m68inSypPeQja7pXRZp3/z1P6M7XM+xX+7eznElHc3E63Hv2xWmoo89H4yLEnpDg+orq" + "DsnJFq7oWqYtLhd7sbTg3i3dL2VO2Xlt5Oo7DzY1Uc8VtOng9eMZtP0ctpnmJa787Tcm/jbUtmHc" + "xfmG+p0bwz0R9t1hYr33WTgj/ZEfe1R7HfnJ3NNCjIbKoP8f1SBn2w2Nq3htYI9o7uBopnRI9nmO" + "rM/ZveijhWulee+DFrx2xZSHe0Gmn99ix5sd96A+1E97w88pB8bX1ABubfYK4DxG+msYPbWWksqU" + "gu5a0u/O68PQ3t99hWF8kW9vC2gQaWTyWtD2sB5UVzOhGeRLJR2y/pB0k9RHgCqxXaP2kP5Qn9TU" + "n+He7rumwO/j5oSr0FanQZf/jIp33+650qXXjSj2FP2+y58AbYVrPs5PjuyOxsTvq5H+yYb8Mofg" + "u8rgmKb2vq/C+lPtMLj2KOjBbyPSqTS3N9T2Y/D5SbAtdt1r4uapoZ9ife+VroHzlQn2ZCf0dw7K" + "7rk2Cn2VMo6z15pP1KPzt5N72LT+4/Q36hv7d+R8INN/oR2zdunZEcyvANuEPj3SNlkNmvHcIY6x" + "4eeHWbkiSfugvBT3jeLYifKdCdaHggbC+Q7Vi+YOriznW5PG8BENAj3G5FYQTsslWvcxuqqABke6" + "oXzoqGyEfcC1kunnXRRvcfOm2N9mOo4szX1df/DnB4P9BbsOMmANNXf8F9TgaB1p5LlppBehfr+/" + "0PiwuhJ+Y+hbpXpbGsNbLtTcc66LPzP31u+rDznPesJPDnnS5Ny2oMGRnSdoEOVERjpE2qTvTmAc" + "pGuQ7Yg5EyP7QDY3gjQozREzNIhiNXTv1Ni1BeOCyvvxOJqzUJtzUD6MWaX1wKd4P9HbgmfdhFwL" + "p0FOr9x6EOngmtKHpt8TGNUxcQ2yTXGeNLL/lHz4Qxo09/0tNN8gH4zainIcyK7ZuF7Q4D6iDal1" + "1kE5ZD+bfD+DsB48BuXy7L7//mEvgulrKWd3iyUi7ZPzS+J6C1wz+XyFkfMWB0D02tHrl2FfMDYX" + "yfUvitXg2QvBrlHMyM4JEW3oqC+5/orymwbEUWtr5ck65PKidVCGy4leh71AZgwlv9JN6VDQsZSP" + "QddM+iUw7nM5BHWn7jWKbRf6VsrJcjEFtGug2dr7HvntOYQa5OanTT8jY//2tMcXauxCuVBOo+9n" + "YYRxnNIhvN7g2AnGI+iamD4w6bnwqN810QctaUM6V8LlDJFPk9a7qfllzmdVEW2Yg18vmkc/xTrw" + "yTqU9uDD/fgK+b9EHcK1nTDGcF0Hrok6Gyu00c33KBZlifztYY6fPbcG2poUqwl2LeWXuXv4OVEp" + "95XUX/6Yoj5bWx8v0F8OfN3g72rS3TFWewk6RHuHXOwkjoXhfVnsOcdFc5xUJ/Jto7gKlEX5xUlN" + "x/T/RNvFvhA0GDXnCfedPY9+ZUhjvu4Wfy5P0CHKoXGaEMci1TYj7sfqJbI+uBfwSNuFelPPXkp+" + "k823BGXQWuGh3AmYRzf9zpKMOfvyYB8uEiuC8ZXO00zuZ020G83rs8Y/xU8gmwcaRPVKa+uk/LLh" + "8y1NUEbKfc+aww3eP/xS73xIBez5XbKPzwuW3H4h6Ec3j6E9ba6PkR9MGgvBNmPbLeXa58TfKRqM" + "brtJPJuTom/vGm4dwJ2lQXmsWe/cM4l7mFtBOCcjPR+B9iMGW4LnGWLHa4bdzNqbj6wj2QYEXYX+" + "JPWMKlcOvpdEaIcUu0blUA1eX7Bnbx7os02/N4iLRSMY7QuacWwSc24YjhXQgxQ/sT4s0QbQs2kO" + "dl1o+hiYs09p/8x/7kPaqw/3GZGfkPbmka9C5wiQ30RzJdp3R2cTh3MKozk6ta1bgfYGUzU42sMX" + "xsP1q4ttuLxfci7Ps18/RwfPI6f2x4QOG087/m8arRlN2vN9yP+G5yiTcpETbUBxCpo7kGZzof3D" + "OwGG56ca7/NwDkdrwc1qUNiXT4Hrx9hn1WLOj0n7wDF7Vcka9Gw39lyL9Gz51P78ebAv1G9BfWiv" + "A2kQ+mKhzbP2aEz8s8DsmWGDfbxjc/+OENDfib4b3uNUejmZqGd8g/5EY3k1CWt2cz9nONR380XM" + "+HPvHlnivU/ce19aA96FA/TsP2984q6jcpeg/f75kTyoxwfFiSW6ZkJLHDHvt8np93Hv3xliCLT2" + "OIEx3OTeILMf2EztCYKYNcYG2fMQivKdYbQUpY1s/M6ZTcbpivJMMv5Zpdhn7mdpV1GUO1l/NjTU" + "Usx7Z8Iz3ZuM0xXlFWT8s4CsDkmzJZPD0ThUUWaSye8THZ6RqOj/uf2L1f79T0XZCpn8vJJ0Pkb9" + "n6IsCOVoBp/HvS+moe83+T4dRVEUZRmyn2F9swl9yAAA"; + +static GdkPixbuf *logo_pixbuf; + +static GMainLoop *main_loop; +static gint count; + +static GdkPixbuf * +create_overlay_pixbuf (void) +{ + GZlibDecompressor *decompress; + GConverterResult decomp_res; + guchar *gzipped_pixdata, *pixdata, *pixels_copy; + gsize gzipped_size, bytes_read, pixdata_size; + guint stride, width, height; + GdkPixbuf *pixbuf; + + gzipped_pixdata = g_base64_decode (gzipped_pixdata_base64, &gzipped_size); + g_assert (gzipped_pixdata != NULL); + + pixdata = g_malloc (64 * 1024); + + decompress = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP); + decomp_res = g_converter_convert (G_CONVERTER (decompress), + gzipped_pixdata, gzipped_size, pixdata, 64 * 1024, + G_CONVERTER_INPUT_AT_END, &bytes_read, &pixdata_size, NULL); + g_assert (decomp_res == G_CONVERTER_FINISHED); + g_assert (bytes_read == gzipped_size); + g_free (gzipped_pixdata); + g_object_unref (decompress); + + /* 0: Pixbuf magic (0x47646b50) */ + g_assert (GST_READ_UINT32_BE (pixdata) == 0x47646b50); + + /* pixdata length */ + pixdata_size = GST_READ_UINT32_BE (pixdata + 4); + g_assert (pixdata_size > 4 + 4 + 4 + 4 + 4 + 4); + + /* raw, 8-bit depth, RGBA */ + g_assert (GST_READ_UINT32_BE (pixdata + 8) == 0x01010002); + + stride = GST_READ_UINT32_BE (pixdata + 12); + width = GST_READ_UINT32_BE (pixdata + 16); + height = GST_READ_UINT32_BE (pixdata + 20); + + g_assert (pixdata_size == 24 + height * stride); + + pixels_copy = g_memdup (pixdata + 24, height * stride); + + pixbuf = + gdk_pixbuf_new_from_data (pixels_copy, GDK_COLORSPACE_RGB, TRUE, 8, + width, height, stride, (GdkPixbufDestroyNotify) g_free, pixels_copy); + + g_assert (pixbuf != NULL); + + g_free (pixdata); + + return pixbuf; +} + +static gboolean +bus_cb (GstBus * bus, GstMessage * msg, gpointer user_data) +{ + GMainLoop *loop = user_data; + + switch (GST_MESSAGE_TYPE (msg)) { + case GST_MESSAGE_ERROR:{ + GError *err = NULL; + gchar *dbg; + + gst_message_parse_error (msg, &err, &dbg); + gst_object_default_error (msg->src, err, dbg); + g_error_free (err); + g_free (dbg); + g_main_loop_quit (loop); + break; + } + default: + break; + } + return TRUE; +} + +#define SPEED_SCALE_FACTOR (VIDEO_FPS * 4) + +/* nicked from videotestsrc's ball pattern renderer */ +static void +calculate_position (gint * x, gint * y, guint logo_w, guint logo_h, guint n) +{ + guint r_x = logo_w / 2; + guint r_y = logo_h / 2; + guint w = VIDEO_WIDTH + logo_w; + guint h = VIDEO_HEIGHT + logo_h; + + *x = r_x + (0.5 + 0.5 * sin (2 * G_PI * n / SPEED_SCALE_FACTOR)) + * (w - 2 * r_x); + *y = r_y + (0.5 + 0.5 * sin (2 * G_PI * sqrt (2) * n / SPEED_SCALE_FACTOR)) + * (h - 2 * r_y); + + *x -= logo_w; + *y -= logo_h; +} + +static GstPadProbeReturn +buffer_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) +{ + GstElement *overlay = GST_PAD_PARENT (pad); + gint x, y, w, h; + + w = gdk_pixbuf_get_width (logo_pixbuf); + h = gdk_pixbuf_get_height (logo_pixbuf); + + calculate_position (&x, &y, w, h, ++count); + + GST_LOG ("%3d, %3d", x, y); + + g_object_set (overlay, "offset-x", x, "offset-y", y, NULL); + + return GST_PAD_PROBE_OK; +} + +int +main (int argc, char **argv) +{ + GOptionEntry options[] = { + {NULL} + }; + GOptionContext *ctx; + GError *err = NULL; + GstElement *src, *q, *capsfilter, *overlay, *sink; + GstElement *pipeline; + GstPad *sink_pad; + GstCaps *filter_caps; + + ctx = g_option_context_new (""); + g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); + 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); + return 1; + } + g_option_context_free (ctx); + + logo_pixbuf = create_overlay_pixbuf (); + + main_loop = g_main_loop_new (NULL, FALSE); + + pipeline = gst_pipeline_new ("pipeline"); + + src = gst_element_factory_make ("videotestsrc", NULL); + gst_util_set_object_arg (G_OBJECT (src), "pattern", "white"); + + overlay = gst_element_factory_make ("gdkpixbufoverlay", NULL); + + /* set positioning-mode to absolute so we can set negative positions */ + g_object_set (overlay, "pixbuf", logo_pixbuf, "positioning-mode", 1, NULL); + + sink_pad = gst_element_get_static_pad (overlay, "sink"); + gst_pad_add_probe (sink_pad, GST_PAD_PROBE_TYPE_BUFFER, buffer_cb, NULL, + NULL); + gst_object_unref (sink_pad); + + q = gst_element_factory_make ("queue", NULL); + + capsfilter = gst_element_factory_make ("capsfilter", NULL); + filter_caps = gst_caps_from_string ("video/x-raw, format = " + GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS); + gst_caps_set_simple (filter_caps, + "width", G_TYPE_INT, VIDEO_WIDTH, + "height", G_TYPE_INT, VIDEO_HEIGHT, + "framerate", GST_TYPE_FRACTION, VIDEO_FPS, 1, NULL); + g_object_set (capsfilter, "caps", filter_caps, NULL); + gst_caps_unref (filter_caps); + + sink = gst_element_factory_make ("ximagesink", NULL); + + gst_bin_add_many (GST_BIN (pipeline), src, q, overlay, capsfilter, sink, + NULL); + + gst_element_link_many (src, q, overlay, capsfilter, sink, NULL); + + count = 0; + + gst_element_set_state (pipeline, GST_STATE_PLAYING); + + gst_bus_add_watch (GST_ELEMENT_BUS (pipeline), bus_cb, main_loop); + + g_main_loop_run (main_loop); + + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + g_object_unref (logo_pixbuf); + + return 0; +} diff -Nru gst-plugins-good1.0-1.4.3/tests/icles/Makefile.am gst-plugins-good1.0-1.6.1/tests/icles/Makefile.am --- gst-plugins-good1.0-1.4.3/tests/icles/Makefile.am 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/icles/Makefile.am 2015-10-22 08:02:54.000000000 +0000 @@ -1,8 +1,15 @@ if HAVE_GTK -GTK_TESTS = gdkpixbufsink-test +GTK_TESTS = gdkpixbufsink-test gdkpixbufoverlay-test + gdkpixbufsink_test_SOURCES = gdkpixbufsink-test.c gdkpixbufsink_test_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) gdkpixbufsink_test_LDADD = $(GST_LIBS) $(GTK_LIBS) + +gdkpixbufoverlay_test_SOURCES = gdkpixbufoverlay-test.c +gdkpixbufoverlay_test_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ + $(GDK_PIXBUF_CFLAGS) $(GIO_CFLAGS) +gdkpixbufoverlay_test_LDADD = $(GST_LIBS) $(GDK_PIXBUF_LIBS) $(GIO_LIBS) \ + $(LIBM) else GTK_TESTS = endif @@ -39,6 +46,16 @@ equalizer_test_CFLAGS = $(GST_CFLAGS) equalizer_test_LDADD = $(GST_LIBS) +test_accurate_seek_SOURCES = test-accurate-seek.c +test_accurate_seek_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) $(GST_CFLAGS) +test_accurate_seek_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstapp-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) $(GST_LIBS) + +test_segment_seeks_SOURCES = test-segment-seeks.c +test_segment_seeks_CFLAGS = $(GST_CFLAGS) +test_segment_seeks_LDADD = $(GST_LIBS) + videocrop_test_SOURCES = videocrop-test.c videocrop_test_CFLAGS = $(GST_CFLAGS) videocrop_test_LDADD = $(GST_LIBS) @@ -51,5 +68,10 @@ videocrop2_test_CFLAGS = $(GST_CFLAGS) videocrop2_test_LDADD = $(GST_LIBS) -noinst_PROGRAMS = $(GTK_TESTS) $(OSS4_TESTS) $(V4L2_TESTS) $(X_TESTS) equalizer-test videocrop-test videobox-test videocrop2-test - +noinst_PROGRAMS = $(GTK_TESTS) $(OSS4_TESTS) $(V4L2_TESTS) $(X_TESTS) \ + equalizer-test \ + test-accurate-seek \ + test-segment-seeks \ + videocrop-test \ + videobox-test \ + videocrop2-test diff -Nru gst-plugins-good1.0-1.4.3/tests/icles/Makefile.in gst-plugins-good1.0-1.6.1/tests/icles/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/icles/Makefile.in 2014-09-24 07:26:04.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/icles/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,11 +91,10 @@ target_triplet = @target@ noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ $(am__EXEEXT_4) equalizer-test$(EXEEXT) \ + test-accurate-seek$(EXEEXT) test-segment-seeks$(EXEEXT) \ videocrop-test$(EXEEXT) videobox-test$(EXEEXT) \ videocrop2-test$(EXEEXT) subdir = tests/icles -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 \ @@ -107,7 +116,6 @@ $(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 \ @@ -122,11 +130,13 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -@HAVE_GTK_TRUE@am__EXEEXT_1 = gdkpixbufsink-test$(EXEEXT) +@HAVE_GTK_TRUE@am__EXEEXT_1 = gdkpixbufsink-test$(EXEEXT) \ +@HAVE_GTK_TRUE@ gdkpixbufoverlay-test$(EXEEXT) @USE_OSS4_TRUE@am__EXEEXT_2 = test-oss4$(EXEEXT) am__EXEEXT_3 = v4l2src-test$(EXEEXT) @USE_X_TRUE@am__EXEEXT_4 = ximagesrc-test$(EXEEXT) @@ -143,6 +153,16 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(equalizer_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ $@ +am__gdkpixbufoverlay_test_SOURCES_DIST = gdkpixbufoverlay-test.c +@HAVE_GTK_TRUE@am_gdkpixbufoverlay_test_OBJECTS = gdkpixbufoverlay_test-gdkpixbufoverlay-test.$(OBJEXT) +gdkpixbufoverlay_test_OBJECTS = $(am_gdkpixbufoverlay_test_OBJECTS) +@HAVE_GTK_TRUE@gdkpixbufoverlay_test_DEPENDENCIES = \ +@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gdkpixbufoverlay_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(gdkpixbufoverlay_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am__gdkpixbufsink_test_SOURCES_DIST = gdkpixbufsink-test.c @HAVE_GTK_TRUE@am_gdkpixbufsink_test_OBJECTS = gdkpixbufsink_test-gdkpixbufsink-test.$(OBJEXT) gdkpixbufsink_test_OBJECTS = $(am_gdkpixbufsink_test_OBJECTS) @@ -152,6 +172,15 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +am_test_accurate_seek_OBJECTS = \ + test_accurate_seek-test-accurate-seek.$(OBJEXT) +test_accurate_seek_OBJECTS = $(am_test_accurate_seek_OBJECTS) +test_accurate_seek_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +test_accurate_seek_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(test_accurate_seek_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am__test_oss4_SOURCES_DIST = test-oss4.c @USE_OSS4_TRUE@am_test_oss4_OBJECTS = test_oss4-test-oss4.$(OBJEXT) test_oss4_OBJECTS = $(am_test_oss4_OBJECTS) @@ -160,6 +189,14 @@ test_oss4_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_oss4_CFLAGS) \ $(CFLAGS) $(test_oss4_LDFLAGS) $(LDFLAGS) -o $@ +am_test_segment_seeks_OBJECTS = \ + test_segment_seeks-test-segment-seeks.$(OBJEXT) +test_segment_seeks_OBJECTS = $(am_test_segment_seeks_OBJECTS) +test_segment_seeks_DEPENDENCIES = $(am__DEPENDENCIES_1) +test_segment_seeks_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(test_segment_seeks_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am_v4l2src_test_OBJECTS = v4l2src_test-v4l2src-test.$(OBJEXT) v4l2src_test_OBJECTS = $(am_v4l2src_test_OBJECTS) v4l2src_test_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -230,13 +267,17 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(equalizer_test_SOURCES) $(gdkpixbufsink_test_SOURCES) \ - $(test_oss4_SOURCES) $(v4l2src_test_SOURCES) \ - $(videobox_test_SOURCES) $(videocrop_test_SOURCES) \ - $(videocrop2_test_SOURCES) $(ximagesrc_test_SOURCES) +SOURCES = $(equalizer_test_SOURCES) $(gdkpixbufoverlay_test_SOURCES) \ + $(gdkpixbufsink_test_SOURCES) $(test_accurate_seek_SOURCES) \ + $(test_oss4_SOURCES) $(test_segment_seeks_SOURCES) \ + $(v4l2src_test_SOURCES) $(videobox_test_SOURCES) \ + $(videocrop_test_SOURCES) $(videocrop2_test_SOURCES) \ + $(ximagesrc_test_SOURCES) DIST_SOURCES = $(equalizer_test_SOURCES) \ + $(am__gdkpixbufoverlay_test_SOURCES_DIST) \ $(am__gdkpixbufsink_test_SOURCES_DIST) \ - $(am__test_oss4_SOURCES_DIST) $(v4l2src_test_SOURCES) \ + $(test_accurate_seek_SOURCES) $(am__test_oss4_SOURCES_DIST) \ + $(test_segment_seeks_SOURCES) $(v4l2src_test_SOURCES) \ $(videobox_test_SOURCES) $(videocrop_test_SOURCES) \ $(videocrop2_test_SOURCES) $(am__ximagesrc_test_SOURCES_DIST) am__can_run_installinfo = \ @@ -263,6 +304,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_CONFIG = @AALIB_CONFIG@ @@ -395,9 +437,6 @@ 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@ @@ -515,17 +554,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -578,6 +617,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -591,10 +631,17 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_GTK_FALSE@GTK_TESTS = -@HAVE_GTK_TRUE@GTK_TESTS = gdkpixbufsink-test +@HAVE_GTK_TRUE@GTK_TESTS = gdkpixbufsink-test gdkpixbufoverlay-test @HAVE_GTK_TRUE@gdkpixbufsink_test_SOURCES = gdkpixbufsink-test.c @HAVE_GTK_TRUE@gdkpixbufsink_test_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) @HAVE_GTK_TRUE@gdkpixbufsink_test_LDADD = $(GST_LIBS) $(GTK_LIBS) +@HAVE_GTK_TRUE@gdkpixbufoverlay_test_SOURCES = gdkpixbufoverlay-test.c +@HAVE_GTK_TRUE@gdkpixbufoverlay_test_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ +@HAVE_GTK_TRUE@ $(GDK_PIXBUF_CFLAGS) $(GIO_CFLAGS) + +@HAVE_GTK_TRUE@gdkpixbufoverlay_test_LDADD = $(GST_LIBS) $(GDK_PIXBUF_LIBS) $(GIO_LIBS) \ +@HAVE_GTK_TRUE@ $(LIBM) + V4L2_TESTS = v4l2src-test v4l2src_test_SOURCES = v4l2src-test.c v4l2src_test_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) @@ -615,6 +662,16 @@ equalizer_test_SOURCES = equalizer-test.c equalizer_test_CFLAGS = $(GST_CFLAGS) equalizer_test_LDADD = $(GST_LIBS) +test_accurate_seek_SOURCES = test-accurate-seek.c +test_accurate_seek_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) $(GST_CFLAGS) + +test_accurate_seek_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstapp-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) $(GST_LIBS) + +test_segment_seeks_SOURCES = test-segment-seeks.c +test_segment_seeks_CFLAGS = $(GST_CFLAGS) +test_segment_seeks_LDADD = $(GST_LIBS) videocrop_test_SOURCES = videocrop-test.c videocrop_test_CFLAGS = $(GST_CFLAGS) videocrop_test_LDADD = $(GST_LIBS) @@ -640,7 +697,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/icles/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/icles/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -672,14 +728,26 @@ @rm -f equalizer-test$(EXEEXT) $(AM_V_CCLD)$(equalizer_test_LINK) $(equalizer_test_OBJECTS) $(equalizer_test_LDADD) $(LIBS) +gdkpixbufoverlay-test$(EXEEXT): $(gdkpixbufoverlay_test_OBJECTS) $(gdkpixbufoverlay_test_DEPENDENCIES) $(EXTRA_gdkpixbufoverlay_test_DEPENDENCIES) + @rm -f gdkpixbufoverlay-test$(EXEEXT) + $(AM_V_CCLD)$(gdkpixbufoverlay_test_LINK) $(gdkpixbufoverlay_test_OBJECTS) $(gdkpixbufoverlay_test_LDADD) $(LIBS) + gdkpixbufsink-test$(EXEEXT): $(gdkpixbufsink_test_OBJECTS) $(gdkpixbufsink_test_DEPENDENCIES) $(EXTRA_gdkpixbufsink_test_DEPENDENCIES) @rm -f gdkpixbufsink-test$(EXEEXT) $(AM_V_CCLD)$(gdkpixbufsink_test_LINK) $(gdkpixbufsink_test_OBJECTS) $(gdkpixbufsink_test_LDADD) $(LIBS) +test-accurate-seek$(EXEEXT): $(test_accurate_seek_OBJECTS) $(test_accurate_seek_DEPENDENCIES) $(EXTRA_test_accurate_seek_DEPENDENCIES) + @rm -f test-accurate-seek$(EXEEXT) + $(AM_V_CCLD)$(test_accurate_seek_LINK) $(test_accurate_seek_OBJECTS) $(test_accurate_seek_LDADD) $(LIBS) + test-oss4$(EXEEXT): $(test_oss4_OBJECTS) $(test_oss4_DEPENDENCIES) $(EXTRA_test_oss4_DEPENDENCIES) @rm -f test-oss4$(EXEEXT) $(AM_V_CCLD)$(test_oss4_LINK) $(test_oss4_OBJECTS) $(test_oss4_LDADD) $(LIBS) +test-segment-seeks$(EXEEXT): $(test_segment_seeks_OBJECTS) $(test_segment_seeks_DEPENDENCIES) $(EXTRA_test_segment_seeks_DEPENDENCIES) + @rm -f test-segment-seeks$(EXEEXT) + $(AM_V_CCLD)$(test_segment_seeks_LINK) $(test_segment_seeks_OBJECTS) $(test_segment_seeks_LDADD) $(LIBS) + v4l2src-test$(EXEEXT): $(v4l2src_test_OBJECTS) $(v4l2src_test_DEPENDENCIES) $(EXTRA_v4l2src_test_DEPENDENCIES) @rm -f v4l2src-test$(EXEEXT) $(AM_V_CCLD)$(v4l2src_test_LINK) $(v4l2src_test_OBJECTS) $(v4l2src_test_LDADD) $(LIBS) @@ -707,8 +775,11 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer_test-equalizer-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdkpixbufoverlay_test-gdkpixbufoverlay-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_accurate_seek-test-accurate-seek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_oss4-test-oss4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_segment_seeks-test-segment-seeks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v4l2src_test-v4l2src-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/videobox_test-videobox-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/videocrop2_test-videocrop2-test.Po@am__quote@ @@ -753,6 +824,20 @@ @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) $(equalizer_test_CFLAGS) $(CFLAGS) -c -o equalizer_test-equalizer-test.obj `if test -f 'equalizer-test.c'; then $(CYGPATH_W) 'equalizer-test.c'; else $(CYGPATH_W) '$(srcdir)/equalizer-test.c'; fi` +gdkpixbufoverlay_test-gdkpixbufoverlay-test.o: gdkpixbufoverlay-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gdkpixbufoverlay_test_CFLAGS) $(CFLAGS) -MT gdkpixbufoverlay_test-gdkpixbufoverlay-test.o -MD -MP -MF $(DEPDIR)/gdkpixbufoverlay_test-gdkpixbufoverlay-test.Tpo -c -o gdkpixbufoverlay_test-gdkpixbufoverlay-test.o `test -f 'gdkpixbufoverlay-test.c' || echo '$(srcdir)/'`gdkpixbufoverlay-test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gdkpixbufoverlay_test-gdkpixbufoverlay-test.Tpo $(DEPDIR)/gdkpixbufoverlay_test-gdkpixbufoverlay-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gdkpixbufoverlay-test.c' object='gdkpixbufoverlay_test-gdkpixbufoverlay-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) $(gdkpixbufoverlay_test_CFLAGS) $(CFLAGS) -c -o gdkpixbufoverlay_test-gdkpixbufoverlay-test.o `test -f 'gdkpixbufoverlay-test.c' || echo '$(srcdir)/'`gdkpixbufoverlay-test.c + +gdkpixbufoverlay_test-gdkpixbufoverlay-test.obj: gdkpixbufoverlay-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gdkpixbufoverlay_test_CFLAGS) $(CFLAGS) -MT gdkpixbufoverlay_test-gdkpixbufoverlay-test.obj -MD -MP -MF $(DEPDIR)/gdkpixbufoverlay_test-gdkpixbufoverlay-test.Tpo -c -o gdkpixbufoverlay_test-gdkpixbufoverlay-test.obj `if test -f 'gdkpixbufoverlay-test.c'; then $(CYGPATH_W) 'gdkpixbufoverlay-test.c'; else $(CYGPATH_W) '$(srcdir)/gdkpixbufoverlay-test.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gdkpixbufoverlay_test-gdkpixbufoverlay-test.Tpo $(DEPDIR)/gdkpixbufoverlay_test-gdkpixbufoverlay-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gdkpixbufoverlay-test.c' object='gdkpixbufoverlay_test-gdkpixbufoverlay-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) $(gdkpixbufoverlay_test_CFLAGS) $(CFLAGS) -c -o gdkpixbufoverlay_test-gdkpixbufoverlay-test.obj `if test -f 'gdkpixbufoverlay-test.c'; then $(CYGPATH_W) 'gdkpixbufoverlay-test.c'; else $(CYGPATH_W) '$(srcdir)/gdkpixbufoverlay-test.c'; fi` + gdkpixbufsink_test-gdkpixbufsink-test.o: gdkpixbufsink-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) -MT gdkpixbufsink_test-gdkpixbufsink-test.o -MD -MP -MF $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Tpo -c -o gdkpixbufsink_test-gdkpixbufsink-test.o `test -f 'gdkpixbufsink-test.c' || echo '$(srcdir)/'`gdkpixbufsink-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Tpo $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Po @@ -767,6 +852,20 @@ @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) $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) -c -o gdkpixbufsink_test-gdkpixbufsink-test.obj `if test -f 'gdkpixbufsink-test.c'; then $(CYGPATH_W) 'gdkpixbufsink-test.c'; else $(CYGPATH_W) '$(srcdir)/gdkpixbufsink-test.c'; fi` +test_accurate_seek-test-accurate-seek.o: test-accurate-seek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_accurate_seek_CFLAGS) $(CFLAGS) -MT test_accurate_seek-test-accurate-seek.o -MD -MP -MF $(DEPDIR)/test_accurate_seek-test-accurate-seek.Tpo -c -o test_accurate_seek-test-accurate-seek.o `test -f 'test-accurate-seek.c' || echo '$(srcdir)/'`test-accurate-seek.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_accurate_seek-test-accurate-seek.Tpo $(DEPDIR)/test_accurate_seek-test-accurate-seek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-accurate-seek.c' object='test_accurate_seek-test-accurate-seek.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) $(test_accurate_seek_CFLAGS) $(CFLAGS) -c -o test_accurate_seek-test-accurate-seek.o `test -f 'test-accurate-seek.c' || echo '$(srcdir)/'`test-accurate-seek.c + +test_accurate_seek-test-accurate-seek.obj: test-accurate-seek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_accurate_seek_CFLAGS) $(CFLAGS) -MT test_accurate_seek-test-accurate-seek.obj -MD -MP -MF $(DEPDIR)/test_accurate_seek-test-accurate-seek.Tpo -c -o test_accurate_seek-test-accurate-seek.obj `if test -f 'test-accurate-seek.c'; then $(CYGPATH_W) 'test-accurate-seek.c'; else $(CYGPATH_W) '$(srcdir)/test-accurate-seek.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_accurate_seek-test-accurate-seek.Tpo $(DEPDIR)/test_accurate_seek-test-accurate-seek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-accurate-seek.c' object='test_accurate_seek-test-accurate-seek.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) $(test_accurate_seek_CFLAGS) $(CFLAGS) -c -o test_accurate_seek-test-accurate-seek.obj `if test -f 'test-accurate-seek.c'; then $(CYGPATH_W) 'test-accurate-seek.c'; else $(CYGPATH_W) '$(srcdir)/test-accurate-seek.c'; fi` + test_oss4-test-oss4.o: test-oss4.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_oss4_CFLAGS) $(CFLAGS) -MT test_oss4-test-oss4.o -MD -MP -MF $(DEPDIR)/test_oss4-test-oss4.Tpo -c -o test_oss4-test-oss4.o `test -f 'test-oss4.c' || echo '$(srcdir)/'`test-oss4.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_oss4-test-oss4.Tpo $(DEPDIR)/test_oss4-test-oss4.Po @@ -781,6 +880,20 @@ @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) $(test_oss4_CFLAGS) $(CFLAGS) -c -o test_oss4-test-oss4.obj `if test -f 'test-oss4.c'; then $(CYGPATH_W) 'test-oss4.c'; else $(CYGPATH_W) '$(srcdir)/test-oss4.c'; fi` +test_segment_seeks-test-segment-seeks.o: test-segment-seeks.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_segment_seeks_CFLAGS) $(CFLAGS) -MT test_segment_seeks-test-segment-seeks.o -MD -MP -MF $(DEPDIR)/test_segment_seeks-test-segment-seeks.Tpo -c -o test_segment_seeks-test-segment-seeks.o `test -f 'test-segment-seeks.c' || echo '$(srcdir)/'`test-segment-seeks.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_segment_seeks-test-segment-seeks.Tpo $(DEPDIR)/test_segment_seeks-test-segment-seeks.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-segment-seeks.c' object='test_segment_seeks-test-segment-seeks.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) $(test_segment_seeks_CFLAGS) $(CFLAGS) -c -o test_segment_seeks-test-segment-seeks.o `test -f 'test-segment-seeks.c' || echo '$(srcdir)/'`test-segment-seeks.c + +test_segment_seeks-test-segment-seeks.obj: test-segment-seeks.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_segment_seeks_CFLAGS) $(CFLAGS) -MT test_segment_seeks-test-segment-seeks.obj -MD -MP -MF $(DEPDIR)/test_segment_seeks-test-segment-seeks.Tpo -c -o test_segment_seeks-test-segment-seeks.obj `if test -f 'test-segment-seeks.c'; then $(CYGPATH_W) 'test-segment-seeks.c'; else $(CYGPATH_W) '$(srcdir)/test-segment-seeks.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_segment_seeks-test-segment-seeks.Tpo $(DEPDIR)/test_segment_seeks-test-segment-seeks.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-segment-seeks.c' object='test_segment_seeks-test-segment-seeks.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) $(test_segment_seeks_CFLAGS) $(CFLAGS) -c -o test_segment_seeks-test-segment-seeks.obj `if test -f 'test-segment-seeks.c'; then $(CYGPATH_W) 'test-segment-seeks.c'; else $(CYGPATH_W) '$(srcdir)/test-segment-seeks.c'; fi` + v4l2src_test-v4l2src-test.o: v4l2src-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(v4l2src_test_CFLAGS) $(CFLAGS) -MT v4l2src_test-v4l2src-test.o -MD -MP -MF $(DEPDIR)/v4l2src_test-v4l2src-test.Tpo -c -o v4l2src_test-v4l2src-test.o `test -f 'v4l2src-test.c' || echo '$(srcdir)/'`v4l2src-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/v4l2src_test-v4l2src-test.Tpo $(DEPDIR)/v4l2src_test-v4l2src-test.Po @@ -1060,6 +1173,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/tests/icles/test-accurate-seek.c gst-plugins-good1.0-1.6.1/tests/icles/test-accurate-seek.c --- gst-plugins-good1.0-1.4.3/tests/icles/test-accurate-seek.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/icles/test-accurate-seek.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,275 @@ +/* GStreamer interactive test for accurate seeking + * Copyright (C) 2014 Tim-Philipp Müller + * + * 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. + * + * Based on python script by Kibeom Kim + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#define _GNU_SOURCE /* for memmem */ +#include + +#include +#include +#include +#include + +#define SAMPLE_FREQ 44100 + +static GstClockTime +sample_to_nanotime (guint sample) +{ + return (guint64) ((1.0 * sample * GST_SECOND / SAMPLE_FREQ) + 0.5); +} + +static guint +nanotime_to_sample (GstClockTime nanotime) +{ + return gst_util_uint64_scale_round (nanotime, SAMPLE_FREQ, GST_SECOND); +} + +static GstBuffer * +generate_test_data (guint N) +{ + gint16 *left, *right, *stereo; + guint largeN, i, j; + + /* 32767 = (2 ** 15) - 1 */ + /* 32768 = (2 ** 15) */ + largeN = ((N + 32767) / 32768) * 32768; + left = g_new0 (gint16, largeN); + right = g_new0 (gint16, largeN); + stereo = g_new0 (gint16, 2 * largeN); + + for (i = 0; i < (largeN / 32768); ++i) { + gint c = 0; + + for (j = i * 32768; j < ((i + 1) * 32768); ++j) { + left[j] = i; + + if (i % 2 == 0) { + right[j] = c; + } else { + right[j] = 32767 - c; + } + ++c; + } + } + + /* could just fill stereo directly from the start, but keeping original code for now */ + for (i = 0; i < largeN; ++i) { + stereo[(2 * i) + 0] = left[i]; + stereo[(2 * i) + 1] = right[i]; + } + g_free (left); + g_free (right); + + return gst_buffer_new_wrapped (stereo, 2 * largeN * sizeof (gint16)); +} + +static void +generate_test_sound (const gchar * fn, const gchar * launch_string, + guint num_samples) +{ + GstElement *pipeline, *src, *parse, *enc_bin, *sink; + GstFlowReturn flow; + GstMessage *msg; + GstBuffer *buf; + GstCaps *caps; + + pipeline = gst_pipeline_new (NULL); + + src = gst_element_factory_make ("appsrc", NULL); + + caps = gst_caps_new_simple ("audio/x-raw", + "format", G_TYPE_STRING, GST_AUDIO_NE (S16), + "rate", G_TYPE_INT, SAMPLE_FREQ, "channels", G_TYPE_INT, 2, + "layout", G_TYPE_STRING, "interleaved", + "channel-mask", GST_TYPE_BITMASK, (guint64) 3, NULL); + g_object_set (src, "caps", caps, "format", GST_FORMAT_TIME, NULL); + gst_base_src_set_format (GST_BASE_SRC (src), GST_FORMAT_TIME); + gst_caps_unref (caps); + + /* audioparse to put proper timestamps on buffers for us, without which + * vorbisenc in particular is unhappy (or oggmux, rather) */ + parse = gst_element_factory_make ("audioparse", NULL); + if (parse != NULL) { + g_object_set (parse, "use-sink-caps", TRUE, NULL); + } else { + parse = gst_element_factory_make ("identity", NULL); + g_warning ("audioparse element not available, vorbis/ogg might not work\n"); + } + + enc_bin = gst_parse_bin_from_description (launch_string, TRUE, NULL); + + sink = gst_element_factory_make ("filesink", NULL); + g_object_set (sink, "location", fn, NULL); + + gst_bin_add_many (GST_BIN (pipeline), src, parse, enc_bin, sink, NULL); + + gst_element_link_many (src, parse, enc_bin, sink, NULL); + + gst_element_set_state (pipeline, GST_STATE_PLAYING); + + buf = generate_test_data (num_samples); + flow = gst_app_src_push_buffer (GST_APP_SRC (src), buf); + g_assert (flow == GST_FLOW_OK); + + gst_app_src_end_of_stream (GST_APP_SRC (src)); + + /*g_print ("generating test sound %s, waiting for EOS..\n", fn); */ + + msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (pipeline), + GST_CLOCK_TIME_NONE, GST_MESSAGE_EOS | GST_MESSAGE_ERROR); + + g_assert (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS); + gst_message_unref (msg); + + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + + /* g_print ("Done %s\n", fn); */ +} + +static void +test_seek_FORMAT_TIME_by_sample (const gchar * fn, GList * seek_positions) +{ + GstElement *pipeline, *src, *sink; + GstAdapter *adapter; + GstSample *sample; + GstCaps *caps; + gconstpointer answer; + guint answer_size; + + pipeline = gst_parse_launch ("filesrc name=src ! decodebin ! " + "audioconvert dithering=0 ! appsink name=sink", NULL); + + src = gst_bin_get_by_name (GST_BIN (pipeline), "src"); + g_object_set (src, "location", fn, NULL); + gst_object_unref (src); + + sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); + caps = gst_caps_new_simple ("audio/x-raw", + "format", G_TYPE_STRING, GST_AUDIO_NE (S16), + "rate", G_TYPE_INT, SAMPLE_FREQ, "channels", G_TYPE_INT, 2, NULL); + g_object_set (sink, "caps", caps, "sync", FALSE, NULL); + gst_caps_unref (caps); + + gst_element_set_state (pipeline, GST_STATE_PLAYING); + + /* wait for preroll, so we can seek */ + gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (pipeline), GST_CLOCK_TIME_NONE, + GST_MESSAGE_ASYNC_DONE); + + /* first, read entire file to end */ + adapter = gst_adapter_new (); + while ((sample = gst_app_sink_pull_sample (GST_APP_SINK (sink)))) { + gst_adapter_push (adapter, gst_buffer_ref (gst_sample_get_buffer (sample))); + gst_sample_unref (sample); + } + answer_size = gst_adapter_available (adapter); + answer = gst_adapter_map (adapter, answer_size); + /* g_print ("%s: read %u bytes\n", fn, answer_size); */ + + g_print ("%10s\t%10s\t%10s\n", "requested", "sample per ts", "actual(data)"); + + while (seek_positions != NULL) { + gconstpointer found; + GstMapInfo map; + GstBuffer *buf; + gboolean ret; + guint actual_position, buffer_timestamp_position; + guint seek_sample; + + seek_sample = GPOINTER_TO_UINT (seek_positions->data); + + ret = gst_element_seek_simple (pipeline, GST_FORMAT_TIME, + GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, + sample_to_nanotime (seek_sample)); + + g_assert (ret); + + sample = gst_app_sink_pull_sample (GST_APP_SINK (sink)); + + buf = gst_sample_get_buffer (sample); + gst_buffer_map (buf, &map, GST_MAP_READ); + found = memmem (answer, answer_size, map.data, map.size); + gst_buffer_unmap (buf, &map); + + g_assert (found != NULL); + actual_position = ((goffset) ((guint8 *) found - (guint8 *) answer)) / 4; + buffer_timestamp_position = nanotime_to_sample (GST_BUFFER_PTS (buf)); + g_print ("%10u\t%10u\t%10u\n", seek_sample, buffer_timestamp_position, + actual_position); + gst_sample_unref (sample); + + seek_positions = seek_positions->next; + } + + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (sink); + gst_object_unref (pipeline); + g_object_unref (adapter); +} + +static GList * +create_test_samples (guint from, guint to, guint step) +{ + GQueue q = G_QUEUE_INIT; + guint i; + + for (i = from; i < to; i += step) + g_queue_push_tail (&q, GUINT_TO_POINTER (i)); + + return q.head; +} + +#define SECS 10 + +int +main (int argc, char **argv) +{ + GList *test_samples; + + gst_init (&argc, &argv); + + test_samples = create_test_samples (SAMPLE_FREQ, SAMPLE_FREQ * 2, 5000); + + g_print ("\nwav:\n"); + generate_test_sound ("test.wav", "wavenc", SAMPLE_FREQ * SECS); + test_seek_FORMAT_TIME_by_sample ("test.wav", test_samples); + + g_print ("\nflac:\n"); + generate_test_sound ("test.flac", "flacenc", SAMPLE_FREQ * SECS); + test_seek_FORMAT_TIME_by_sample ("test.flac", test_samples); + + g_print ("\nogg:\n"); + generate_test_sound ("test.ogg", + "audioconvert dithering=0 ! vorbisenc quality=1 ! oggmux", + SAMPLE_FREQ * SECS); + test_seek_FORMAT_TIME_by_sample ("test.ogg", test_samples); + + g_print ("\nmp3:\n"); + generate_test_sound ("test.mp3", "lamemp3enc bitrate=320", + SAMPLE_FREQ * SECS); + test_seek_FORMAT_TIME_by_sample ("test.mp3", test_samples); + + g_list_free (test_samples); + return 0; +} diff -Nru gst-plugins-good1.0-1.4.3/tests/icles/test-segment-seeks.c gst-plugins-good1.0-1.6.1/tests/icles/test-segment-seeks.c --- gst-plugins-good1.0-1.4.3/tests/icles/test-segment-seeks.c 1970-01-01 00:00:00.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/icles/test-segment-seeks.c 2015-10-22 08:02:54.000000000 +0000 @@ -0,0 +1,146 @@ +/* GStreamer interactive test for accurate segment seeking + * Copyright (C) 2014 Tim-Philipp Müller + * + * 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. + * + */ + +/* Plays the provided file one second at a time using segment seeks. + * Theoretically this should be just as smooth as if we played the + * file from start to stop in one go, certainly without hickups. + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#define SEGMENT_DURATION (1 * GST_SECOND) + +int +main (int argc, char **argv) +{ + GstElement *playbin; + GstMessage *msg; + gchar *uri; + gint64 dur, start, stop; + gboolean prerolled = FALSE; + + if (argc < 2) { + g_printerr ("Usage: %s FILENAME\n", argv[0]); + return -1; + } + + gst_init (&argc, &argv); + + if (gst_uri_is_valid (argv[1])) + uri = g_strdup (argv[1]); + else + uri = gst_filename_to_uri (argv[1], NULL); + + g_print ("uri: %s\n", uri); + + playbin = gst_element_factory_make ("playbin", NULL); + g_object_set (playbin, "uri", uri, NULL); + +#if 0 + { + GstElement *src; + + playbin = gst_parse_launch ("uridecodebin name=d ! queue ! " + "filesink location=/tmp/raw1.data", NULL); + src = gst_bin_get_by_name (GST_BIN (playbin), "d"); + g_object_set (src, "uri", uri, NULL); + gst_object_unref (src); + } +#endif + + gst_element_set_state (playbin, GST_STATE_PAUSED); + + /* wait for preroll */ + msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (playbin), + GST_CLOCK_TIME_NONE, GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR); + + g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR); + prerolled = TRUE; + + gst_message_unref (msg); + + if (!gst_element_query_duration (playbin, GST_FORMAT_TIME, &dur)) + g_error ("Failed to query duration!\n"); + + g_print ("Duration: %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (dur)); + + start = 0; + do { + GstSeekFlags seek_flags; + gboolean ret; + gboolean segment_done = FALSE; + + seek_flags = GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_SEGMENT; + + if (start == 0) { + prerolled = FALSE; + seek_flags |= GST_SEEK_FLAG_FLUSH; + } + + stop = start + SEGMENT_DURATION; + + g_print ("Segment: %" GST_TIME_FORMAT "-%" GST_TIME_FORMAT "\n", + GST_TIME_ARGS (start), GST_TIME_ARGS (stop)); + + ret = gst_element_seek (playbin, 1.0, GST_FORMAT_TIME, seek_flags, + GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_SET, stop); + + g_assert (ret); + + if (!prerolled) { + while (!prerolled) { + /* wait for preroll again */ + msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (playbin), + GST_CLOCK_TIME_NONE, GST_MESSAGE_SEGMENT_DONE | + GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR); + + g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR); + if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_SEGMENT_DONE) { + segment_done = TRUE; + } else { + prerolled = TRUE; + } + gst_message_unref (msg); + } + + gst_element_set_state (playbin, GST_STATE_PLAYING); + } + + /* wait for end of segment if we didn't get it above already */ + if (!segment_done) { + msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (playbin), + GST_CLOCK_TIME_NONE, GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR); + + g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR); + + gst_message_unref (msg); + } + + start = stop; + } + while (start < dur); + + gst_element_set_state (playbin, GST_STATE_NULL); + gst_object_unref (playbin); + return 0; +} diff -Nru gst-plugins-good1.0-1.4.3/tests/Makefile.in gst-plugins-good1.0-1.6.1/tests/Makefile.in --- gst-plugins-good1.0-1.4.3/tests/Makefile.in 2014-09-24 07:26:02.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/tests/Makefile.in 2015-10-30 12:10:17.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,7 +89,6 @@ host_triplet = @host@ target_triplet = @target@ subdir = tests -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am 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 \ @@ -101,7 +110,6 @@ $(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 \ @@ -116,6 +124,7 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -174,6 +183,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -331,9 +341,6 @@ 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@ @@ -451,17 +458,17 @@ WAVPACK_LIBS = @WAVPACK_LIBS@ XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ XFIXES_LIBS = @XFIXES_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ +XSHM_CFLAGS = @XSHM_CFLAGS@ XSHM_LIBS = @XSHM_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@ @@ -514,6 +521,7 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -549,7 +557,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -844,6 +851,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # 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. diff -Nru gst-plugins-good1.0-1.4.3/win32/common/config.h gst-plugins-good1.0-1.6.1/win32/common/config.h --- gst-plugins-good1.0-1.4.3/win32/common/config.h 2014-09-24 08:28:36.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/win32/common/config.h 2015-10-30 14:22:33.000000000 +0000 @@ -39,6 +39,9 @@ /* The GIO modules directory. */ #undef GIO_MODULE_DIR +/* The GIO install prefix. */ +#undef GIO_PREFIX + /* GStreamer API Version */ #define GST_API_VERSION "1.0" @@ -58,7 +61,7 @@ #define GST_PACKAGE_ORIGIN "Unknown package origin" /* GStreamer package release date/time for plugins as YYYY-MM-DD */ -#define GST_PACKAGE_RELEASE_DATETIME "2014-09-24" +#define GST_PACKAGE_RELEASE_DATETIME "2015-10-30" /* Define if static plugins should be built */ #undef GST_PLUGIN_BUILD_STATIC @@ -90,9 +93,15 @@ /* Define to 1 if you have the `cosh' function. */ #undef HAVE_COSH +/* Define if the target CPU is AARCH64 */ +#undef HAVE_CPU_AARCH64 + /* Define if the target CPU is an Alpha */ #undef HAVE_CPU_ALPHA +/* Define if the target CPU is an ARC */ +#undef HAVE_CPU_ARC + /* Define if the target CPU is an ARM */ #undef HAVE_CPU_ARM @@ -346,7 +355,13 @@ /* Define to enable X libraries and plugins (used by ximagesrc). */ #undef HAVE_X -/* Define to enable X Shared Memory extension. */ +/* Defined if Xdamage is available */ +#undef HAVE_XDAMAGE + +/* Defined if Xfixes is available */ +#undef HAVE_XFIXES + +/* Defined if XShm is available */ #undef HAVE_XSHM /* Define to enable zlib support for qtdemux/matroska. */ @@ -372,7 +387,7 @@ #define PACKAGE_NAME "GStreamer Good Plug-ins" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GStreamer Good Plug-ins 1.4.3" +#define PACKAGE_STRING "GStreamer Good Plug-ins 1.6.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gst-plugins-good" @@ -381,7 +396,7 @@ #undef PACKAGE_URL /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.4.3" +#define PACKAGE_VERSION "1.6.1" /* directory where plugins are located */ #ifdef _DEBUG @@ -405,9 +420,6 @@ /* The size of `void*', as computed by sizeof. */ #undef SIZEOF_VOIDP -/* defined if speex 1.0.x API detected */ -#undef SPEEX_1_0 - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -415,10 +427,7 @@ #undef TARGET_CPU /* Version number of package */ -#define VERSION "1.4.3" - -/* old wavpack API */ -#undef WAVPACK_OLD_API +#define VERSION "1.6.1" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -431,6 +440,3 @@ # undef WORDS_BIGENDIAN # endif #endif - -/* Define to 1 if the X Window System is missing or not being used. */ -#undef X_DISPLAY_MISSING diff -Nru gst-plugins-good1.0-1.4.3/win32/MANIFEST gst-plugins-good1.0-1.6.1/win32/MANIFEST --- gst-plugins-good1.0-1.4.3/win32/MANIFEST 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/win32/MANIFEST 2015-10-22 08:02:54.000000000 +0000 @@ -68,7 +68,6 @@ win32/vs8/libgstladspa.vcproj win32/vs8/libgstlevel.vcproj win32/vs8/libgstmatroska.vcproj -win32/vs8/libgstmikmod.vcproj win32/vs8/libgstmng.vcproj win32/vs8/libgstmonoscope.vcproj win32/vs8/libgstmulaw.vcproj diff -Nru gst-plugins-good1.0-1.4.3/win32/vs8/libgstmikmod.vcproj gst-plugins-good1.0-1.6.1/win32/vs8/libgstmikmod.vcproj --- gst-plugins-good1.0-1.4.3/win32/vs8/libgstmikmod.vcproj 2014-07-21 08:24:27.000000000 +0000 +++ gst-plugins-good1.0-1.6.1/win32/vs8/libgstmikmod.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -